org.favabeans.views
Class DropTargetAdapter

java.lang.Object
  |
  +--org.favabeans.views.DropTargetAdapter

public abstract class DropTargetAdapter
extends Object

A DropTargetAdapter is responsible for making an AWT component in FavaBeans drop-capable.


Constructor Summary
DropTargetAdapter(Component component)
          Create a new DropTargetAdapter.
 
Method Summary
 Component getComponent()
           
 Object getTargetContainer()
          Obtain the target container for this DropTargetAdapter.
protected  void provideDragUnderFeedback(boolean state)
          This method is a hook for implementations to provide visual drag-under feedback.
 void setTargetContainer(Object targetContainer)
          Set the target container for this DropTargetAdapter.
protected  void updateTargetContainer(Point location)
          This method is a hook for implementations to update the target container under the mouse cursor during a drag.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DropTargetAdapter

public DropTargetAdapter(Component component)
Create a new DropTargetAdapter.
Parameters:
component - the AWT component which will be drop-enabled.
Method Detail

getComponent

public Component getComponent()
Returns:
the AWT component which is being drop-enabled by this DropTargetAdapter.

setTargetContainer

public void setTargetContainer(Object targetContainer)
Set the target container for this DropTargetAdapter.
Parameters:
targetContainer - an object the DnDTargetContainer Facet of which will be used to implement the semantics of the target side of the DnD operation.

getTargetContainer

public Object getTargetContainer()
Obtain the target container for this DropTargetAdapter.
Returns:
the target container.

provideDragUnderFeedback

protected void provideDragUnderFeedback(boolean state)
This method is a hook for implementations to provide visual drag-under feedback. A subclass can assume that, when this method is called, the data being dropped has already been verified to be acceptable to the DnDTarget Facet of the object returned from getModelAtLocation(Point).

The default implementation of this method is a no-op.

Parameters:
state - whether to enable or disable drag-under feedback.

updateTargetContainer

protected void updateTargetContainer(Point location)
This method is a hook for implementations to update the target container under the mouse cursor during a drag.

The default implementation of this method is a no-op.

Parameters:
location - the location at which the user is currently gesturing.


Copyright © 2000-2001, Regents of the University of Minnesota. All Rights Reserved.