geofasc.swing.tool
public class ComponentMouseDragger extends Object
ComponentMouseDragger singleton class can be used to enable
mouse dragging on components.
It is advisable to use this class only for components belonging to a
container having a null-layout since the components will be positioned
absolutely. If a dragged component's parent is a JLayeredPane,
additionally that component is moved to the pane's front. Use
register(Component) to enable and deregister(Component) to
disable mouse dragging for a component.| Modifier and Type | Method and Description |
|---|---|
static void |
deregister(Component comp)
Deregisters the given component from this class and disables mouse
dragging for it.
|
static ComponentMouseDragger |
getInstance()
Gets the singleton instance of this class.
|
static void |
register(Component comp)
Registers the given component to this class and enables mouse dragging
for it.
|
public static void deregister(Component comp)
comp - the component to registerpublic static ComponentMouseDragger getInstance()
public static void register(Component comp)
comp - the component to register