Package muntjac :: Package event :: Package dd :: Module target_details
[hide private]
[frames] | no frames]

Source Code for Module muntjac.event.dd.target_details

 1  # Copyright (C) 2012 Vaadin Ltd.  
 2  # Copyright (C) 2012 Richard Lincoln 
 3  #  
 4  # Licensed under the Apache License, Version 2.0 (the "License");  
 5  # you may not use this file except in compliance with the License.  
 6  # You may obtain a copy of the License at  
 7  #  
 8  #     http://www.apache.org/licenses/LICENSE-2.0  
 9  #  
10  # Unless required by applicable law or agreed to in writing, software  
11  # distributed under the License is distributed on an "AS IS" BASIS,  
12  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  
13  # See the License for the specific language governing permissions and  
14  # limitations under the License. 
15   
16  """wraps drop target related information about DragAndDropEvent.""" 
17   
18   
19 -class ITargetDetails(object):
20 """ITargetDetails wraps drop target related information about 21 L{DragAndDropEvent}. 22 23 When a ITargetDetails object is used in L{DropHandler} it is often 24 preferable to cast the ITargetDetails to an implementation provided by 25 DropTarget like L{TreeTargetDetails}. They often provide a better typed, 26 drop target specific API. 27 """ 28
29 - def getData(self, key):
30 """Gets target data associated with the given string key 31 32 @return: The data associated with the key 33 """ 34 raise NotImplementedError
35 36
37 - def getTarget(self):
38 """@return: the drop target on which the L{DragAndDropEvent} 39 happened.""" 40 raise NotImplementedError
41