|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectbibliothek.gui.dock.control.relocator.AbstractDockRelocator
public abstract class AbstractDockRelocator
A manager adding MouseListener and
MouseMotionListener to every
DockElementRepresentatives and handling the
drag and drop events.
The behaviour of a drag and drop operation can be made dependent of the
keys that are pressed, using some DockRelocatorModes. These modes
are added through addMode(DockRelocatorMode)
| Constructor Summary | |
|---|---|
AbstractDockRelocator(DockController controller)
Creates a new manager. |
|
| Method Summary | |
|---|---|
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 |
isDragOnlyTitel()
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 |
setDragOnlyTitel(boolean dragOnlyTitel)
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface bibliothek.gui.dock.control.DockRelocator |
|---|
cancel, createDirectRemote, createDirectRemote, createRemote, createRemote, hasTarget, isOnMove, isOnPut |
| Constructor Detail |
|---|
public AbstractDockRelocator(DockController controller)
controller - the controller whose dockables are moved| Method Detail |
|---|
public DockController getController()
public void addVetoableDockRelocatorListener(VetoableDockRelocatorListener listener)
DockRelocatorDockable is moved.
addVetoableDockRelocatorListener in interface DockRelocatorlistener - the new listenerpublic void removeVetoableDockRelocatorListener(VetoableDockRelocatorListener listener)
DockRelocator
removeVetoableDockRelocatorListener 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 isDragOnlyTitel()
DockRelocator
isDragOnlyTitel 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.setDragOnlyTitel(boolean)public void setDragOnlyTitel(boolean dragOnlyTitel)
DockRelocator
setDragOnlyTitel in interface DockRelocatordragOnlyTitel - 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()
DockRelocator
getDragDistance in interface DockRelocatorpublic void setDragDistance(int dragDistance)
DockRelocator
setDragDistance 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
InputEvent.getModifiersEx()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||