Package muntjac :: Package event :: Package dd :: Module drop_handler :: Class IDropHandler
[hide private]
[frames] | no frames]

Class IDropHandler

source code

object --+
         |
        IDropHandler

DropHandlers contain the actual business logic for drag and drop operations.

The drop method is used to receive the transferred data and the getAcceptCriterion method contains the (possibly client side verifiable) criterion whether the dragged data will be handled at all.

Instance Methods [hide private]
 
drop(self, event)
Drop method is called when the end user has finished the drag operation on a DropTarget and DragAndDropEvent has passed AcceptCriterion defined by getAcceptCriterion method.
source code
 
getAcceptCriterion(self)
Returns the AcceptCriterion used to evaluate whether the Transferable will be handed over to IDropHandler.drop method.
source code

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

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

drop(self, event)

source code 

Drop method is called when the end user has finished the drag operation on a DropTarget and DragAndDropEvent has passed AcceptCriterion defined by getAcceptCriterion method. The actual business logic of drag and drop operation is implemented into this method.

Parameters:
  • event - the event related to this drop

getAcceptCriterion(self)

source code 

Returns the AcceptCriterion used to evaluate whether the Transferable will be handed over to IDropHandler.drop method. If client side can't verify the AcceptCriterion, the same criteria may be tested also prior to actual drop - during the drag operation.

Based on information from AcceptCriterion components may display some hints for the end user whether the drop will be accepted or not.

Muntjac contains a variety of criteria built in that can be composed to more complex criterion. If the build in criteria are not enough, developer can use a ServerSideCriterion or build own custom criterion with client side counterpart.

If developer wants to handle everything in the drop method, AcceptAll instance can be returned.

Returns:
the AcceptCriterion