public class DropTargetNavigator extends Object implements DragSourceListener, DragSourceMotionListener
Autoscroll, and various other aids to positioning
drop targets during a drag.
JTabbedPane
JTree
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.| Modifier and Type | Class and Description |
|---|---|
static class |
DropTargetNavigator.AbstractNavigator |
static interface |
DropTargetNavigator.Navigator
This performs a more general navigation function than Autoscroll.
|
| Constructor and Description |
|---|
DropTargetNavigator() |
DropTargetNavigator(DragSource src) |
| Modifier and Type | Method and Description |
|---|---|
static void |
disableDropTargetNavigation()
Disable system-wide drop target navigation.
|
void |
dispose() |
void |
dragDropEnd(DragSourceDropEvent e) |
void |
dragEnter(DragSourceDragEvent e) |
void |
dragExit(DragSourceEvent e) |
void |
dragMouseMoved(DragSourceDragEvent e) |
void |
dragOver(DragSourceDragEvent e) |
void |
dropActionChanged(DragSourceDragEvent e) |
static void |
enableDropTargetNavigation()
Enable system-wide drop target navigation.
|
static RootPaneContainer |
findRootPaneContainer(Container c)
Find the first instance of
RootPaneContainer in the given
container. |
static int |
getNavigationDelay()
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.
|
public DropTargetNavigator()
public DropTargetNavigator(DragSource src)
public static void setNavigationDelay(int ms)
public static int getNavigationDelay()
public static void register(Class cls, DropTargetNavigator.Navigator navigator)
public static void enableDropTargetNavigation()
public static void disableDropTargetNavigation()
public void dragEnter(DragSourceDragEvent e)
dragEnter in interface DragSourceListenerpublic void dragOver(DragSourceDragEvent e)
dragOver in interface DragSourceListenerpublic void dropActionChanged(DragSourceDragEvent e)
dropActionChanged in interface DragSourceListenerpublic void dragExit(DragSourceEvent e)
dragExit in interface DragSourceListenerpublic void dragMouseMoved(DragSourceDragEvent e)
dragMouseMoved in interface DragSourceMotionListenerpublic void dragDropEnd(DragSourceDropEvent e)
dragDropEnd in interface DragSourceListenerpublic void dispose()
public static RootPaneContainer findRootPaneContainer(Container c)
RootPaneContainer in the given
container. Basically finds applets.Copyright © 2023. All rights reserved.