Package furbelow

Class DropTargetNavigator

java.lang.Object
furbelow.DropTargetNavigator
All Implemented Interfaces:
DragSourceListener, DragSourceMotionListener, EventListener

public class DropTargetNavigator extends Object implements DragSourceListener, DragSourceMotionListener
Provides auto-scrolling behavior on scrollable components which do not implement Autoscroll, and various other aids to positioning drop targets during a drag.
  • Switch tabs in a JTabbedPane
  • Expand nodes in a JTree
  • Autoscroll components that wouldn't be otherwise
Ideally, there would be a DropTargetNavigable interface similar to DropTargetNavigator.Navigator here, and components would implement it as needed. For this implementation, custom classes requiring drop target navigation should register a handler for themselves in the static initializer for that class.