|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.javadocking.drag.DynamicTabDragger
public class DynamicTabDragger
This is a class for dragging one Dockable
or all the dockables in
a TabDock
dynamically. The dockables will be removed from the old dock and
placed in a new dock while the user is dragging.
One dockable can be dragged by dragging the tab. All the dockables
can be dragged by dragging another part of the tabbed pane. A CompositeDockable
is created with the dockables of the javax.swing.JTabbedPane.
The Dock
s that are used in the application should inherit
from the java.awt.Component class.
With this class a tab of the javax.swing.JTabbedPane can also be dragged. This happens, when one tab is dragged, and the mouse is over the header of the JTabbedPane.
Constructor Summary | |
---|---|
DynamicTabDragger()
|
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 DynamicTabDragger()
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 |