public interface MagnetRequest
ScreenDockWindow. Also offers
methods to define attractions.| Modifier and Type | Interface and Description |
|---|---|
static class |
MagnetRequest.Side
Describes one side of a
ScreenDockWindow. |
| Modifier and Type | Method and Description |
|---|---|
void |
directAttraction(Rectangle bounds)
Directly changes the size and location of the
window to match
bounds.Note that the current BoundaryRestriction may modify bounds |
Rectangle |
getBounds()
Gets the boundaries the
window would have if there would
be no outside influences (like magnetism) to the boundaries. |
Rectangle |
getInitialBounds(ScreenDockWindow window)
Gets the boundaries of
window when this request was created. |
Rectangle |
getResultBounds()
Gets the boundaries the
window would actually have if
the operation would end right now. |
ScreenDockWindow |
getWindow()
Gets the window that has changed.
|
boolean |
is(MagnetRequest.Side side)
|
boolean |
isEast()
Tells whether the location of the east side of the
window
changed. |
boolean |
isMoved()
Tells whether the entire
window was moved. |
boolean |
isNorth()
Tells whether the location of the north side of the
window
changed. |
boolean |
isResized()
Tells whether the
window changed its size. |
boolean |
isSouth()
Tells whether the location of the south side of the
window
changed. |
boolean |
isWest()
Tells whether the location of the west side of the
window
changed. |
void |
movingAttraction(ScreenDockWindow neighbor,
MagnetRequest.Side windowSide,
MagnetRequest.Side neighborSide)
Moves the
window such that its side windowSide is at
the same location as the side neighborSide from neighbor. |
void |
resizingAttraction(ScreenDockWindow neighbor,
MagnetRequest.Side windowSide,
MagnetRequest.Side neighborSide)
Resizes the
window such that its side windowSide is at
the same location as the side neighborSide from neighbor. |
ScreenDockWindow getWindow()
Rectangle getBounds()
window would have if there would
be no outside influences (like magnetism) to the boundaries.nullgetResultBounds()Rectangle getResultBounds()
window would actually have if
the operation would end right now.nullgetBounds()Rectangle getInitialBounds(ScreenDockWindow window)
window when this request was created.window - some windowwindowIllegalArgumentException - if window is not known to this requestboolean isMoved()
window was moved. A window
either is moved, resized or nothing happened.true if the entire window was movedisResized()boolean isResized()
window changed its size. A window
either is moved, resized or nothing happened.true if the window was resizedisMoved()boolean isNorth()
window
changed. This may be due to a movement of the entire window or because the window
was resized.true if the north side changed its positionboolean isSouth()
window
changed. This may be due to a movement of the entire window or because the window
was resized.true if the south side changed its positionboolean isEast()
window
changed. This may be due to a movement of the entire window or because the window
was resized.true if the east side changed its positionboolean isWest()
window
changed. This may be due to a movement of the entire window or because the window
was resized.true if the west side changed its positionboolean is(MagnetRequest.Side side)
side - the side to ask whether it changedtrue if the side changed its positionvoid resizingAttraction(ScreenDockWindow neighbor, MagnetRequest.Side windowSide, MagnetRequest.Side neighborSide)
window such that its side windowSide is at
the same location as the side neighborSide from neighbor.neighbor - the window to which window is attractedwindowSide - the side of the window which has to be movedneighborSide - the side of neighbor which has to be matchedIllegalArgumentException - if neighbor is null or
is the window itself, if either windowSide or
neighborSide is null, if windowSide and
neighborSide are not the same and not the opposite (e.g. north and west)void movingAttraction(ScreenDockWindow neighbor, MagnetRequest.Side windowSide, MagnetRequest.Side neighborSide)
window such that its side windowSide is at
the same location as the side neighborSide from neighbor.neighbor - the window to which window is attractedwindowSide - the side of the window which has to be movedneighborSide - the side of neighbor which has to be matchedIllegalArgumentException - if neighbor is null or
is the window itself, if either windowSide or
neighborSide is null, if windowSide and
neighborSide are not the same and not the opposite (e.g. north and west)void directAttraction(Rectangle bounds)
window to match
bounds.BoundaryRestriction may modify boundsbounds - the new boundaries to useCopyright © 2017 Docking Frames. All rights reserved.