public abstract class AbstractDockRelocator extends Object implements DockRelocator
MouseListener and
MouseMotionListener to every
DockElementRepresentatives and handling the
drag and drop events.DockRelocatorModes. These modes
are added through addMode(DockRelocatorMode)| Constructor and Description |
|---|
AbstractDockRelocator(DockController controller)
Creates a new manager.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addMode(DockRelocatorMode mode)
Adds a mode to this relocator, a mode can be activated or deactivated
when the user presses a button like "ctrl" or "shift" during a
drag and drop operation.
|
void |
addVetoableDockRelocatorListener(VetoableDockRelocatorListener listener)
Adds a listener to this manager.
|
protected void |
checkModes(int modifiers)
Ensures that all
DockRelocatorModes are in the state that
fits the current set of modifiers. |
protected void |
disableAllModes()
Sets all
DockRelocatorModes to inactive. |
protected void |
fireCanceled(DockRelocatorEvent event)
Calls
VetoableDockRelocatorListener.grabbing(DockRelocatorEvent) on
all listeners that are currently registered. |
protected void |
fireDragged(DockRelocatorEvent event)
Calls
VetoableDockRelocatorListener.dragged(DockRelocatorEvent) on
all listeners that are currently registered. |
protected void |
fireDragging(DockRelocatorEvent event)
Calls
VetoableDockRelocatorListener.dragging(DockRelocatorEvent) on
all listeners that are currently registered. |
protected void |
fireDropped(DockRelocatorEvent event)
Calls
VetoableDockRelocatorListener.canceled(DockRelocatorEvent) on
all listeners that are currently registered. |
protected void |
fireDropping(DockRelocatorEvent event)
Calls
VetoableDockRelocatorListener.dropping(DockRelocatorEvent) on
all listeners that are currently registered. |
protected void |
fireGrabbed(DockRelocatorEvent event)
Calls
VetoableDockRelocatorListener.grabbed(DockRelocatorEvent) on
all listeners that are currently registered. |
protected void |
fireGrabbing(DockRelocatorEvent event)
Calls
VetoableDockRelocatorListener.grabbing(DockRelocatorEvent) on
all listeners that are currently registered. |
protected void |
fireSearched(DockRelocatorEvent event)
Calls
VetoableDockRelocatorListener.searched(DockRelocatorEvent) on
all listeners that are currently registered. |
DockController |
getController()
Gets the controller for which this relocator works.
|
int |
getDragDistance()
Gets the distance the user must move the mouse in order to begin a
drag operation.
|
Inserter |
getInserter()
Gets the algorithm used to override decisions of a
DockStation. |
Merger |
getMerger()
Gets an algorithm useful for merging two
DockStations. |
boolean |
isDragOnlyTitle()
Tells whether dockables can only be dragged through their title or not.
|
void |
removeMode(DockRelocatorMode mode)
Removes a mode that has earlier been added to this relocator.
|
void |
removeVetoableDockRelocatorListener(VetoableDockRelocatorListener listener)
Removes a listener from this manager.
|
void |
setDragDistance(int dragDistance)
Sets the distance the user must move the mouse in order to begin a
drag operation.
|
void |
setDragOnlyTitle(boolean dragOnlyTitle)
Tells whether dockables can only be dragged through their title or not.
|
void |
setInserter(Inserter inserter)
Sets the algorithm which is used to override decisions of a
DockStation. |
void |
setMerger(Merger merger)
Sets an algorithm for merging two
DockStations. |
protected VetoableDockRelocatorListener[] |
vetoableListeners()
Gets all the
VetoableDockRelocatorListener that are currently registered. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcancel, createDirectRemote, createDirectRemote, createRemote, createRemote, hasTarget, isOnMove, isOnPutpublic AbstractDockRelocator(DockController controller)
controller - the controller whose dockables are movedpublic DockController getController()
public void addVetoableDockRelocatorListener(VetoableDockRelocatorListener listener)
DockRelocatorDockable is moved.addVetoableDockRelocatorListener in interface DockRelocatorlistener - the new listenerpublic void removeVetoableDockRelocatorListener(VetoableDockRelocatorListener listener)
DockRelocatorremoveVetoableDockRelocatorListener in interface DockRelocatorlistener - the listener to removeprotected VetoableDockRelocatorListener[] vetoableListeners()
VetoableDockRelocatorListener that are currently registered.protected void fireGrabbing(DockRelocatorEvent event)
VetoableDockRelocatorListener.grabbing(DockRelocatorEvent) on
all listeners that are currently registered.event - the event to forwardprotected void fireGrabbed(DockRelocatorEvent event)
VetoableDockRelocatorListener.grabbed(DockRelocatorEvent) on
all listeners that are currently registered.event - the event to forwardprotected void fireSearched(DockRelocatorEvent event)
VetoableDockRelocatorListener.searched(DockRelocatorEvent) on
all listeners that are currently registered.event - the event to forwardprotected void fireDragged(DockRelocatorEvent event)
VetoableDockRelocatorListener.dragged(DockRelocatorEvent) on
all listeners that are currently registered.event - the event to forwardprotected void fireDragging(DockRelocatorEvent event)
VetoableDockRelocatorListener.dragging(DockRelocatorEvent) on
all listeners that are currently registered.event - the event to forwardprotected void fireDropping(DockRelocatorEvent event)
VetoableDockRelocatorListener.dropping(DockRelocatorEvent) on
all listeners that are currently registered.event - the event to forwardprotected void fireDropped(DockRelocatorEvent event)
VetoableDockRelocatorListener.canceled(DockRelocatorEvent) on
all listeners that are currently registered.event - the event to forwardprotected void fireCanceled(DockRelocatorEvent event)
VetoableDockRelocatorListener.grabbing(DockRelocatorEvent) on
all listeners that are currently registered.event - the event to forwardpublic boolean isDragOnlyTitle()
DockRelocatorisDragOnlyTitle in interface DockRelocatortrue if a Dockable must be dragged through their
titles, false if every part of the dockable can be
grabbed by the mouse.DockRelocator.setDragOnlyTitle(boolean)public void setDragOnlyTitle(boolean dragOnlyTitle)
DockRelocatorsetDragOnlyTitle in interface DockRelocatordragOnlyTitle - true if a Dockable must be dragged through its
title, false if every part of the dockable can be
grabbed by the mouse.public int getDragDistance()
DockRelocatorgetDragDistance in interface DockRelocatorpublic void setDragDistance(int dragDistance)
DockRelocatorsetDragDistance in interface DockRelocatordragDistance - the distance in pixelpublic Merger getMerger()
DockRelocatorDockStations.getMerger in interface DockRelocatornullpublic void setMerger(Merger merger)
DockRelocatorDockStations.setMerger in interface DockRelocatormerger - the new algorithm, can be nullpublic void setInserter(Inserter inserter)
DockRelocatorDockStation.setInserter in interface DockRelocatorinserter - the algorithm, can be nullpublic Inserter getInserter()
DockRelocatorDockStation.getInserter in interface DockRelocatornullpublic void addMode(DockRelocatorMode mode)
addMode in interface DockRelocatormode - the new mode, not nullpublic void removeMode(DockRelocatorMode mode)
removeMode in interface DockRelocatormode - the mode to removeprotected void disableAllModes()
DockRelocatorModes to inactive.protected void checkModes(int modifiers)
DockRelocatorModes are in the state that
fits the current set of modifiers.modifiers - the state of the last MouseEvent, see
MouseEvent.getModifiersEx()Copyright © 2017 Docking Frames. All rights reserved.