com.metamatrix.toolbox.ui.widget.transfer
Interface DragAndDropController

All Known Subinterfaces:
TreeNodeDragAndDropController

public interface DragAndDropController

Provides the base interface necessary to support both drag and drop (D&D) operations for a component.

Since:
2.1
Version:
2.1
Author:
John P. A. Verhaeg

Method Summary
 int getAllowedDragActions()
          Gets the allowed drag actions.
 int getAllowedDropActions()
          Gets the allowed drop actions.
 java.awt.Component getComponent()
          Gets the Component upon which drag and drop operations can occur.
 java.lang.Object getDragSource()
          Returns the object being dragged.
 java.lang.Object getDropTarget()
          Returns the object that would receive the dragged object if it were dropped at the current mouse position.
 boolean isDragging()
          Returns whether a drag is in progress.
 void setAllowedDragActions(int actions)
          Sets the allowed drag actions.
 void setAllowedDropActions(int actions)
          Sets the allowed drop actions.
 void setComponent(java.awt.Component component)
          Sets the Component upon which drag and drop operations can occur.
 

Method Detail

getAllowedDragActions

int getAllowedDragActions()
Gets the allowed drag actions.

Returns:
The allowed drag actions
Since:
2.1
See Also:
DnDConstants#ACTION_COPY, DnDConstants#ACTION_MOVE, DnDConstants#ACTION_COPY_OR_MOVE

getAllowedDropActions

int getAllowedDropActions()
Gets the allowed drop actions.

Returns:
The allowed drop actions
Since:
2.1
See Also:
DnDConstants#ACTION_COPY, DnDConstants#ACTION_MOVE, DnDConstants#ACTION_COPY_OR_MOVE

getComponent

java.awt.Component getComponent()
Gets the Component upon which drag and drop operations can occur.

Returns:
The Component upon which drag and drop operations can occur.
Since:
2.1

getDragSource

java.lang.Object getDragSource()
Returns the object being dragged.

Returns:
The object being dragged
Since:
2.1

getDropTarget

java.lang.Object getDropTarget()
Returns the object that would receive the dragged object if it were dropped at the current mouse position.

Returns:
The node being dragged
Since:
2.1

isDragging

boolean isDragging()
Returns whether a drag is in progress.

Returns:
True if a drag is in progress
Since:
2.1

setAllowedDragActions

void setAllowedDragActions(int actions)
Sets the allowed drag actions.

Parameters:
actions - The allowed drag actions
Since:
2.1
See Also:
DnDConstants#ACTION_COPY, DnDConstants#ACTION_MOVE, DnDConstants#ACTION_COPY_OR_MOVE

setAllowedDropActions

void setAllowedDropActions(int actions)
Sets the allowed drop actions.

Parameters:
actions - The allowed drop actions
Since:
2.1
See Also:
DnDConstants#ACTION_COPY, DnDConstants#ACTION_MOVE, DnDConstants#ACTION_COPY_OR_MOVE

setComponent

void setComponent(java.awt.Component component)
Sets the Component upon which drag and drop operations can occur.

Parameters:
component - An instance of Component
Since:
2.1


Copyright © 2009. All Rights Reserved.