|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object bibliothek.gui.dock.station.screen.window.WindowMover
public class WindowMover
The WindowMover
can be used by any ScreenDockWindow
showing a DockElementRepresentative
. The
mover adds a listener to the element and moves the entire window if the element is dragged. The mover also
ensures that drag and drop still works.
This class also supports magnetization
.
Constructor Summary | |
---|---|
WindowMover(ScreenDockWindow window)
Creates a new mover |
Method Summary | |
---|---|
protected void |
convertPointToScreen(Point point,
Component component)
Converst the point point on component to screen coordinates. |
boolean |
isAllowDragAndDrop()
Tells whether drag and drop operations are allowed even if the window is moved around. |
boolean |
isResetOnDropable()
Tells whether the window jumps back to its starting position if a dropable stop is found. |
void |
setAllowDragAndDrop(boolean allowDragAndDrop)
Sets whether drag and drop operations are still allowed even if the window is moved around. |
void |
setElement(DockElementRepresentative element)
Sets the element which is currently shown by the window. |
void |
setResetOnDropable(boolean resetOnDropable)
Sets whether the window jumps back to its starting position if a dropable stop is found. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public WindowMover(ScreenDockWindow window)
window
- the window which is to be moved, must not be null
Method Detail |
---|
public void setElement(DockElementRepresentative element)
element
- the element that is shown, can be null
public void setAllowDragAndDrop(boolean allowDragAndDrop)
allowDragAndDrop
- whether to allow drag and drop operationspublic boolean isAllowDragAndDrop()
public void setResetOnDropable(boolean resetOnDropable)
resetOnDropable
- whether the window can jump back to its starting positionpublic boolean isResetOnDropable()
protected void convertPointToScreen(Point point, Component component)
point
on component
to screen coordinates.
point
- the point to convertcomponent
- the current coordinate system of the point
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |