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 class
static interface
This performs a more general navigation function than Autoscroll. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
Disable system-wide drop target navigation.void
dispose()
void
void
void
void
void
void
static void
Enable system-wide drop target navigation.static RootPaneContainer
Find the first instance ofRootPaneContainer
in the given container.static int
Returns the current setting of the auto-navigation delay.static void
register
(Class cls, DropTargetNavigator.Navigator navigator) Register a new navigator for the given component class.static void
setNavigationDelay
(int ms) Change the delay (in ms) in starting an automatic navigation.
-
Constructor Details
-
DropTargetNavigator
public DropTargetNavigator() -
DropTargetNavigator
-
-
Method Details
-
dragEnter
- Specified by:
dragEnter
in interfaceDragSourceListener
-
dragOver
- Specified by:
dragOver
in interfaceDragSourceListener
-
dropActionChanged
- Specified by:
dropActionChanged
in interfaceDragSourceListener
-
dragExit
- Specified by:
dragExit
in interfaceDragSourceListener
-
dragMouseMoved
- Specified by:
dragMouseMoved
in interfaceDragSourceMotionListener
-
dragDropEnd
- Specified by:
dragDropEnd
in interfaceDragSourceListener
-
dispose
public void dispose() -
findRootPaneContainer
Find the first instance ofRootPaneContainer
in the given container. Basically finds applets.