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
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.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic interfaceThis performs a more general navigation function than Autoscroll. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidDisable system-wide drop target navigation.voiddispose()voidvoidvoidvoidvoidvoidstatic voidEnable system-wide drop target navigation.static RootPaneContainerFind the first instance ofRootPaneContainerin the given container.static intReturns the current setting of the auto-navigation delay.static voidregister(Class cls, DropTargetNavigator.Navigator navigator) Register a new navigator for the given component class.static voidsetNavigationDelay(int ms) Change the delay (in ms) in starting an automatic navigation.
-
Constructor Details
-
DropTargetNavigator
public DropTargetNavigator() -
DropTargetNavigator
-
-
Method Details
-
dragEnter
- Specified by:
dragEnterin interfaceDragSourceListener
-
dragOver
- Specified by:
dragOverin interfaceDragSourceListener
-
dropActionChanged
- Specified by:
dropActionChangedin interfaceDragSourceListener
-
dragExit
- Specified by:
dragExitin interfaceDragSourceListener
-
dragMouseMoved
- Specified by:
dragMouseMovedin interfaceDragSourceMotionListener
-
dragDropEnd
- Specified by:
dragDropEndin interfaceDragSourceListener
-
dispose
public void dispose() -
findRootPaneContainer
Find the first instance ofRootPaneContainerin the given container. Basically finds applets.