|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectbibliothek.gui.dock.station.screen.magnet.StickMagnetGraphConstraint
public class StickMagnetGraphConstraint
A constraint tells how much a side of a ScreenDockWindow has to move. Constraints
are used by the StickMagnetGraph during calucaltions.
| Constructor Summary | |
|---|---|
StickMagnetGraphConstraint()
Creates a new constraint |
|
| Method Summary | |
|---|---|
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)
Calls set(MagnetRequest.Side, int), setDirect(MagnetRequest.Side, boolean) and setHard(MagnetRequest.Side, boolean). |
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()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public StickMagnetGraphConstraint()
| Method Detail |
|---|
public void reset()
public String toString()
toString in class Object
public void set(MagnetRequest.Side side,
int delta)
side has to be moved.
side - the side to movedelta - the amount of pixels to move
public 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 check
true if set(MagnetRequest.Side, int) was called at least oncepublic int get(MagnetRequest.Side side)
set earlier for side.
side - the side to get
IllegalArgumentException - if side was not set
public 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 access
public 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 access
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||