API Overview API Index Package Overview Direct link to this page
JDK 1.6
  java.awt.dnd. DropTarget View Source
Author(s)
Since
1.2
Version
1.51, 04/07/06
Serial
Hierarchy
 Object
      DropTarget
Implements
 DropTargetListener
 Serializable
Subclasses
Description
public class DropTarget
  The DropTarget is associated with a Component when that Component wishes to accept drops during Drag and Drop operations.
See also:   
Constructors
public DropTarget () throws HeadlessException
  Creates a DropTarget.
public DropTarget (Component c, DropTargetListener dtl) throws HeadlessException
  Creates a DropTarget given the Component to associate itself with, and the DropTargetListener to handle event processing.
public DropTarget (Component c, int ops, DropTargetListener dtl) throws HeadlessException
  Creates a DropTarget given the Component to associate itself with, an int representing the default acceptable action(s) to support, and a DropTargetListener to handle event processing.
public DropTarget (Component c, int ops, DropTargetListener dtl, boolean act) throws HeadlessException
  Creates a DropTarget given the Component to associate itself with, an int representing the default acceptable action(s) to support, a DropTargetListener to handle event processing, and a boolean indicating if the DropTarget is currently accepting drops.
public DropTarget (Component c, int ops, DropTargetListener dtl, boolean act, FlavorMap fm) throws HeadlessException
  Creates a new DropTarget given the Component to associate itself with, an int representing the default acceptable action(s) to support, a DropTargetListener to handle event processing, a boolean indicating if the DropTarget is currently accepting drops, and a FlavorMap to use (or null for the default FlavorMap).
Methods
Hide/Show inherited methods
publicsynchronized void addDropTargetListener (DropTargetListener dtl) throws TooManyListenersException
  Adds a new DropTargetListener (UNICAST SOURCE).
public void addNotify (ComponentPeer peer)
  Notify the DropTarget that it has been associated with a Component This method is usually called from java.awt.Component.addNotify() of the Component associated with this DropTarget to notify the DropTarget that a ComponentPeer has been associated with that Component.
protected void clearAutoscroll ()
clear autoscrolling
protected DropTargetAutoScroller createDropTargetAutoScroller (Component c, Point p)
  create an embedded autoscroller
protected DropTargetContext createDropTargetContext ()
  Creates the DropTargetContext associated with this DropTarget.
pack-private void doSetDefaultActions (int ops)
publicsynchronized void dragEnter (DropTargetDragEvent dtde) [Specified in DropTargetListener]
  Calls dragEnter on the registered DropTargetListener and passes it the specified DropTargetDragEvent.
publicsynchronized void dragExit (DropTargetEvent dte) [Specified in DropTargetListener]
  Calls dragExit on the registered DropTargetListener and passes it the specified DropTargetEvent.
publicsynchronized void dragOver (DropTargetDragEvent dtde) [Specified in DropTargetListener]
  Calls dragOver on the registered DropTargetListener and passes it the specified DropTargetDragEvent.
publicsynchronized void drop (DropTargetDropEvent dtde) [Specified in DropTargetListener]
  Calls drop on the registered DropTargetListener and passes it the specified DropTargetDropEvent if this DropTarget is active.
publicsynchronized void dropActionChanged (DropTargetDragEvent dtde) [Specified in DropTargetListener]
  Calls dropActionChanged on the registered DropTargetListener and passes it the specified DropTargetDragEvent.
publicsynchronized Component getComponent ()
  Gets the Component associated with this DropTarget.
public int getDefaultActions ()
  Gets an int representing the current action(s) supported by this DropTarget.
public DropTargetContext getDropTargetContext ()
  Gets the DropTargetContext associated with this DropTarget.
public FlavorMap getFlavorMap ()
  Gets the FlavorMap associated with this DropTarget.
protected void initializeAutoscrolling (Point p)
  initialize autoscrolling
public boolean isActive ()
  Reports whether or not this DropTarget is currently active (ready to accept drops).
publicsynchronized void removeDropTargetListener (DropTargetListener dtl)
  Removes the current DropTargetListener (UNICAST SOURCE).
public void removeNotify (ComponentPeer peer)
  Notify the DropTarget that it has been disassociated from a Component This method is usually called from java.awt.Component.removeNotify() of the Component associated with this DropTarget to notify the DropTarget that a ComponentPeer has been disassociated with that Component.
publicsynchronized void setActive (boolean isActive)
  Sets the DropTarget active if true, inactive if false.
publicsynchronized void setComponent (Component c)
  Note: this interface is required to permit the safe association of a DropTarget with a Component in one of two ways, either: component.setDropTarget(droptarget); or droptarget.setComponent(component);
public void setDefaultActions (int ops)
  Sets the default acceptable actions for this DropTarget
public void setFlavorMap (FlavorMap fm)
  Sets the FlavorMap associated with this DropTarget.
protected void updateAutoscroll (Point dragCursorLocn)
  update autoscrolling with current cursor locn
Fields
Hide/Show inherited fields
pack-private int actions
  Default permissible actions supported by this DropTarget.
pack-private boolean active
true if the DropTarget is accepting Drag & Drop operations.
Nested Classes
  DropTarget.DropTargetAutoScroller
this protected nested class implements autoscrolling
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar