COPIED from javax.swing.plaf.basic.BasicDropTargetListener
because that copy is package private.
The Swing DropTarget implementation supports multicast notification
to listeners, so this implementation is used as an additional
listener that extends the primary drop target functionality
(i.e. linkage to the TransferHandler) to include autoscroll and
establish an insertion point for the drop. This is used by the ComponentUI
of components supporting a selection mechanism, which have a
way of indicating a location within their model.
The autoscroll functionality is based upon the Swing scrolling mechanism
of the Scrollable interface. The unit scroll increment is used to as
the scroll amount, and the scrolling is based upon JComponent.getVisibleRect
and JComponent.scrollRectToVisible. The band of area around the visible
rectangle used to invoke autoscroll is based upon the unit scroll increment
as that is assumed to represent the last possible item in the visible region.
The subclasses are expected to implement the following methods to manage the
insertion location via the components selection mechanism.
- saveComponentState
- restoreComponentState
- restoreComponentStateForDrop
- updateInsertionLocation
author: Timothy Prinzing version: 1.8 01/23/03 |