public class StickMagnetGraphConstraint extends Object
ScreenDockWindow has to move. Constraints
are used by the StickMagnetGraph during calculations.| Constructor and Description |
|---|
StickMagnetGraphConstraint()
Creates a new constraint
|
| Modifier and Type | Method and Description |
|---|---|
int |
get(MagnetRequest.Side side)
Gets the value that was
set earlier for side. |
boolean |
isDirect(MagnetRequest.Side side)
Tells whether
side is a directly set side. |
boolean |
isHard(MagnetRequest.Side side)
Tells whether
side is a hard side. |
boolean |
isSet(MagnetRequest.Side side)
Tells whether
set(MagnetRequest.Side, int) was called for side. |
void |
reset()
Unsets all values of this constraint.
|
void |
set(MagnetRequest.Side side,
int delta)
Sets how much
side has to be moved. |
void |
set(MagnetRequest.Side side,
int delta,
boolean direct,
boolean hard)
|
void |
setDirect(MagnetRequest.Side side,
boolean direct)
Marks
side to be set directly. |
void |
setHard(MagnetRequest.Side side,
boolean hard)
Marks
side as a hard side. |
String |
toString() |
public StickMagnetGraphConstraint()
public void reset()
public void set(MagnetRequest.Side side, int delta)
side has to be moved.side - the side to movedelta - the amount of pixels to movepublic void set(MagnetRequest.Side side, int delta, boolean direct, boolean hard)
set(MagnetRequest.Side, int), setDirect(MagnetRequest.Side, boolean) and setHard(MagnetRequest.Side, boolean).side - the side to changedelta - the amount of pixels to move sidedirect - whether the side was calculated or just guessedhard - whether the side depends directly from user inputpublic boolean isSet(MagnetRequest.Side side)
set(MagnetRequest.Side, int) was called for side.side - the side to checktrue if set(MagnetRequest.Side, int) was called at least oncepublic int get(MagnetRequest.Side side)
set earlier for side.side - the side to getIllegalArgumentException - if side was not setpublic void setHard(MagnetRequest.Side side, boolean hard)
side as a hard side. A hard side depends directly from the user
input.side - the side to changehard - whether the side is hard or notpublic boolean isHard(MagnetRequest.Side side)
side is a hard side. A hard side depends directly from the
user input.side - the side to accesspublic void setDirect(MagnetRequest.Side side, boolean direct)
side to be set directly. A direct side is actually calculated, an indirect side
is just guessed.side - the side to changedirect - whether the side was set directlypublic boolean isDirect(MagnetRequest.Side side)
side is a directly set side.side - the side to accessCopyright © 2017 Docking Frames. All rights reserved.