Package muntjac :: Package ui :: Module abstract_select :: Class AcceptItem
[hide private]
[frames] | no frames]

Class AcceptItem

source code

                                                   object --+            
                                                            |            
    event.dd.acceptcriteria.accept_criterion.IAcceptCriterion --+        
                                                                |        
event.dd.acceptcriteria.client_side_criterion.ClientSideCriterion --+    
                                                                    |    
                                             AbstractItemSetCriterion --+
                                                                        |
                                                                       AcceptItem

This criterion accepts a only a Transferable that contains given IItem (practically its identifier) from a specific AbstractSelect.

Instance Methods [hide private]
 
__init__(self, select, *itemId)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
accept(self, dragEvent)
Validates the data in event to be appropriate for the DropHandler.drop method.
source code

Inherited from AbstractItemSetCriterion: paintContent

Inherited from event.dd.acceptcriteria.client_side_criterion.ClientSideCriterion: getIdentifier, isClientSideVerifiable, paint, paintResponse

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  ALL = ContainsDataFlavor('itemId')
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, select, *itemId)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Parameters:
  • select - the select from which the item id's are checked
  • itemId - the item identifier(s) of the select that are accepted
Overrides: object.__init__

accept(self, dragEvent)

source code 

Validates the data in event to be appropriate for the DropHandler.drop method.

Note that even if your criterion is validated on client side, you should always validate the data on server side too.

Overrides: event.dd.acceptcriteria.accept_criterion.IAcceptCriterion.accept
(inherited documentation)