to.etc.domui.util
Interface IDragHandler


public interface IDragHandler


Method Summary
 IDragArea getDragArea()
          Indicates that the handler is responsible for the drag and drop implementation, but does not represent the area to drag.
 java.lang.String getTypeName(NodeBase source)
          This must return a "type name" for the thing being dragged.
 void onDropped(DropEvent context)
          Called when the dragged node has been dropped on a DropTarget which has accepted the node.
 

Method Detail

getTypeName

@Nonnull
java.lang.String getTypeName(@Nonnull
                                     NodeBase source)
This must return a "type name" for the thing being dragged. This typename gets passed to any "drop target" and allows that to indicate whether that type is acceptable for that drop target.

Returns:
a non-null string.

onDropped

void onDropped(DropEvent context)
               throws java.lang.Exception
Called when the dragged node has been dropped on a DropTarget which has accepted the node. This should then remove the source to prevent it from being reused.

Throws:
java.lang.Exception

getDragArea

@Nullable
IDragArea getDragArea()
Indicates that the handler is responsible for the drag and drop implementation, but does not represent the area to drag. The area to return is the area to be dragged.

Returns:
the area to be dragged in the user interface.