|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface MagnetRequest
Describes the movement of a ScreenDockWindow
. Also offers
methods to define attractions.
Nested Class Summary | |
---|---|
static class |
MagnetRequest.Side
Describes one side of a ScreenDockWindow . |
Method Summary | |
---|---|
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)
Calls isWest() , isEast() , isNorth() or isSouth() depending
on 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 . |
Method Detail |
---|
ScreenDockWindow getWindow()
Rectangle getBounds()
window
would have if there would
be no outside influences (like magnetism) to the boundaries.
null
getResultBounds()
Rectangle getResultBounds()
window
would actually have if
the operation would end right now.
null
getBounds()
Rectangle getInitialBounds(ScreenDockWindow window)
window
when this request was created.
window
- some window
window
IllegalArgumentException
- 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)
isWest()
, isEast()
, isNorth()
or isSouth()
depending
on side
.
side
- the side to ask whether it changed
true
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 matched
IllegalArgumentException
- 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 matched
IllegalArgumentException
- 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 bounds
bounds
- the new boundaries to use
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |