public class WindowMover extends Object
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.magnetization.| Constructor and Description |
|---|
WindowMover(ScreenDockWindow window)
Creates a new mover
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
convertPointToScreen(Point point,
Component component)
Converts 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 droppable 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 droppable stop is found.
|
public WindowMover(ScreenDockWindow window)
window - the window which is to be moved, must not be nullpublic void setElement(DockElementRepresentative element)
element - the element that is shown, can be nullpublic 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()
Copyright © 2017 Docking Frames. All rights reserved.