|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.javadocking.drag.StaticDockableDragger
public class StaticDockableDragger
This is a class for dragging one Dockable.
The Docks that are used in the application should inherit
from the java.awt.Component class.
| Constructor Summary | |
|---|---|
StaticDockableDragger(Dockable draggedDockable)
Constructs a dragger with a default painter for painting the dragged dockables: a SwDockableDragPainter with a DefaultRectanglePainter. |
|
StaticDockableDragger(Dockable draggedDockable,
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. |
Dockable |
getDraggedDockable()
Gets the dockable that is dragged by this dragger. |
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 StaticDockableDragger(Dockable draggedDockable)
SwDockableDragPainter with a DefaultRectanglePainter.
draggedDockable - The dockable that will be dragged by this dragger.
java.lang.IllegalArgumentException - If the dockable is null.
public StaticDockableDragger(Dockable draggedDockable,
DockableDragPainter dockableDragPainter)
draggedDockable - The dockable that will be dragged by this dragger.dockableDragPainter - The painter for painting the dragged dockables.
java.lang.IllegalArgumentException - If the dockable is null.| 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 DraggermouseEvent - The mouse event that was triggered.
public void drag(java.awt.event.MouseEvent mouseEvent)
drag in interface DraggermouseEvent - The new mouse event that was triggered.public void cancelDragging(java.awt.event.MouseEvent mouseEvent)
cancelDragging in interface DraggermouseEvent - The last mouse event that was triggered.public void stopDragging(java.awt.event.MouseEvent mouseEvent)
stopDragging in interface DraggermouseEvent - The last mouse event that was triggered.public void showPopupMenu(java.awt.event.MouseEvent mouseEvent)
Dragger
showPopupMenu in interface DraggermouseEvent - The last mouse event that was triggered.public DockableDragPainter getDockableDragPainter()
public void setDockableDragPainter(DockableDragPainter dockableDragPainter)
dockableDragPainter - The painter for painting the dragged dockables.public Dockable getDraggedDockable()
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 | |||||||||