All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.gloaming.awt.dnd.DropTarget

java.lang.Object
   |
   +----com.gloaming.awt.dnd.DropTarget

public class DropTarget
extends java.lang.Object
Local equivelent to the Java2 DropTarget.

See Also:
java.awt.dnd.DropTarget

Constructor Index

 o DropTarget()
Creates an empty, unattached, DropTarget.
 o DropTarget(Component, DropTargetListener)
Creates an active DropTarget, attached to a Component, that will send drag events to the given DropTargetListener.
 o DropTarget(Component, int, DropTargetListener)
Creates an active DropTarget, attached to a Component, that reponds to a predetermined set of drop actions, that will send drag events to the given DropTargetListener.
 o DropTarget(Component, int, DropTargetListener, boolean)
Creates a DropTarget, attached to a Component, that reponds to a predetermined set of drop actions, that will send drag events to the given DropTargetListener, and who's active state is pre-initialized using the 'active' parameter.

Method Index

 o addDropTargetListener(DropTargetListener)
Sets the listener that will receive the target drag events.
 o getComponent()
Gets the AWT Component, if any, that this DropTarget is associated with.
 o getDefaultActions()
Gets the default actions for the DropTarget.
 o isActive()
Return the state (active or inactive) of this DropTarget.
 o removeDropTargetListener(DropTargetListener)
Removes a listener from the DragTarget.
 o setActive(boolean)
Sets the active, or inactive, state of this DropTarget.
 o setComponent(Component)
Attaches this DropTarget to the specified component.
 o setDefaultActions(int)
Sets the default actions for the DropTarget.

Constructors

 o DropTarget
 public DropTarget()
Creates an empty, unattached, DropTarget.

 o DropTarget
 public DropTarget(java.awt.Component c,
                   com.gloaming.awt.dnd.DropTargetListener listener)
Creates an active DropTarget, attached to a Component, that will send drag events to the given DropTargetListener.

Parameters:
c - AWT Component that will accept dragged data
listener - Listener that will receive the drop events
 o DropTarget
 public DropTarget(java.awt.Component c,
                   int ops,
                   com.gloaming.awt.dnd.DropTargetListener listener)
Creates an active DropTarget, attached to a Component, that reponds to a predetermined set of drop actions, that will send drag events to the given DropTargetListener.

Parameters:
c - AWT Component that will accept dragged data
ops - Drag actions supported by this target
listener - Listener that will receive the drop events
 o DropTarget
 public DropTarget(java.awt.Component c,
                   int ops,
                   com.gloaming.awt.dnd.DropTargetListener listener,
                   boolean active)
Creates a DropTarget, attached to a Component, that reponds to a predetermined set of drop actions, that will send drag events to the given DropTargetListener, and who's active state is pre-initialized using the 'active' parameter.

Parameters:
c - AWT Component that will accept dragged data
ops - Drag actions supported by this target
listener - Listener that will receive the drop events
active - Initial state of target

Methods

 o addDropTargetListener
 public void addDropTargetListener(com.gloaming.awt.dnd.DropTargetListener listener) throws java.util.TooManyListenersException
Sets the listener that will receive the target drag events.

Parameters:
listener - DropTargetListener that will receive target drag events
 o removeDropTargetListener
 public void removeDropTargetListener(com.gloaming.awt.dnd.DropTargetListener listener)
Removes a listener from the DragTarget.

Parameters:
listener - DropTargetListener that was previously recieving events from this event source
 o isActive
 public boolean isActive()
Return the state (active or inactive) of this DropTarget. An inactive drop target does not receive any drag events.

Returns:
true if drop target is active
 o setActive
 public void setActive(boolean isActive)
Sets the active, or inactive, state of this DropTarget. An inactive drop target does not receive any drag events.

Parameters:
isActive - state of target
 o getComponent
 public java.awt.Component getComponent()
Gets the AWT Component, if any, that this DropTarget is associated with.

Returns:
attached Component, or null
 o setComponent
 public void setComponent(java.awt.Component c)
Attaches this DropTarget to the specified component.

Parameters:
c - Component to attach to, or null to disconnect this DropTarget
 o getDefaultActions
 public int getDefaultActions()
Gets the default actions for the DropTarget.

Returns:
current default action
 o setDefaultActions
 public void setDefaultActions(int ops)
Sets the default actions for the DropTarget.

Parameters:
actions - default actions

All Packages  Class Hierarchy  This Package  Previous  Next  Index