|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.javadocking.drag.DynamicDragger
public class DynamicDragger
This is a class for dragging all the dockables in a LeafDock
dynamically.
The dockables will be removed from the old dock and
placed in a new dock while the user is dragging.
If there is only one Dockable
in the leaf dock, then the dockable is dragged,
else a CompositeDockable
is created with all the dockables of the leaf dock.
The Dock
s that are used in the application should inherit
from the java.awt.Component class.
Constructor Summary | |
---|---|
DynamicDragger()
Constructs a dynamic dragger for the dockables of a dock. |
|
DynamicDragger(Dockable fixedDockable)
Constructs a dynamic dragger for the given dockable. |
Method Summary | |
---|---|
void |
cancelDragging(java.awt.event.MouseEvent mouseEvent)
It is not possible to cancel previous changes. |
void |
drag(java.awt.event.MouseEvent mouseEvent)
Searches the dock, where the dockable can be docked for the current mouse location. |
protected java.awt.Cursor |
retrieveCanDockCursor()
Gets the cursor that is used for dragging a dockable, when the dockable can be docked in an underlying dock. |
void |
showPopupMenu(java.awt.event.MouseEvent mouseEvent)
Shows the popup menu for the selected dockable or the selected composite dockable. |
boolean |
startDragging(java.awt.event.MouseEvent mouseEvent)
Tries to start the dragging of a Dockable
from a source Dock to a destination dock. |
void |
stopDragging(java.awt.event.MouseEvent mouseEvent)
Finishes the dragging of a Dockable object
from a source Dock to a destination dock. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DynamicDragger()
public DynamicDragger(Dockable fixedDockable)
fixedDockable
- The only dockable that is dragged by this dragger.Method Detail |
---|
public boolean startDragging(java.awt.event.MouseEvent mouseEvent)
Dragger
Tries to start the dragging of a Dockable
from a source Dock
to a destination dock.
The dockable that should be dragged is searched for the given mouse position.
startDragging
in interface Dragger
mouseEvent
- The mouse event that was triggered.
public void drag(java.awt.event.MouseEvent mouseEvent)
drag
in interface Dragger
mouseEvent
- The new mouse event that was triggered.public void cancelDragging(java.awt.event.MouseEvent mouseEvent)
cancelDragging
in interface Dragger
mouseEvent
- The last mouse event that was triggered.public void stopDragging(java.awt.event.MouseEvent mouseEvent)
Dragger
Finishes the dragging of a Dockable
object
from a source Dock
to a destination dock.
Static draggers typically do the docking now: the destination dock is searched for the given mouse location. They try to remove the dockable from its current dock and add it to its destination dock. If the destination dock is the same dock as the origin, they can move the dockable to a new position.
Dynamic draggers typically only clean up now.
stopDragging
in interface Dragger
mouseEvent
- The last mouse event that was triggered.public void showPopupMenu(java.awt.event.MouseEvent mouseEvent)
Dragger
showPopupMenu
in interface Dragger
mouseEvent
- The last mouse event that was triggered.protected java.awt.Cursor retrieveCanDockCursor()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |