|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.javadocking.drag.StaticDragger
public class StaticDragger
This is a class for dragging all the dockables in a LeafDock
.
A CompositeDockable
is created with 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 | |
---|---|
StaticDragger()
Constructs a dragger with a default painter for painting the dragged dockables: a SwDockableDragPainter with a DefaultRectanglePainter . |
|
StaticDragger(DockableDragPainter dockableDragPainter)
Constructs a dragger with the given painter for painting the dragged dockables. |
Method Summary | |
---|---|
void |
cancelDragging(java.awt.event.MouseEvent mouseEvent)
Resets the cursor and other fields. |
void |
drag(java.awt.event.MouseEvent mouseEvent)
Searches the dock where the dockable will be docked for the current mouse location. |
DockableDragPainter |
getDockableDragPainter()
Gets the painter for painting the dragged dockables. |
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. |
protected java.awt.Cursor |
retrieveCanNotDockCursor()
Gets the cursor that is used for dragging a dockable, when the dockable cannot be docked in an underlying dock. |
void |
setDockableDragPainter(DockableDragPainter dockableDragPainter)
Sets the painter for painting the dragged dockables. |
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)
Resets the cursor. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StaticDragger()
SwDockableDragPainter
with a DefaultRectanglePainter
.
public StaticDragger(DockableDragPainter dockableDragPainter)
dockableDragPainter
- The painter for painting the dragged dockables.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)
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.public DockableDragPainter getDockableDragPainter()
public void setDockableDragPainter(DockableDragPainter dockableDragPainter)
dockableDragPainter
- The painter for painting the dragged dockables.protected java.awt.Cursor retrieveCanDockCursor()
protected java.awt.Cursor retrieveCanNotDockCursor()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |