|
Search this API | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objecty.layout.Direction
public final class Direction
Direction provides four main directions and some methods to work with them.

| Field Summary | |
|---|---|
static Direction |
DOWN
Decodes the down direction. |
static Direction |
LEFT
Decodes the left direction. |
static Direction |
RIGHT
Decodes the right direction. |
static Direction |
UP
Decodes the up direction. |
| Method Summary | |
|---|---|
int |
getDirection()
Returns the direction encoded as an integer value. |
Direction |
getMirror()
Returns the mirror direction. |
Direction |
getTurnCCW()
Returns the direction that follows this direction in counterclockwise order. |
Direction |
getTurnCW()
Returns the direction that follows this direction in clockwise order. |
boolean |
isHorizontal()
Returns whether or not this direction is horizontal ( RIGHT or LEFT). |
boolean |
isVertical()
Returns whether or not this direction is vertical ( UP or DOWN). |
java.lang.String |
toString()
Returns a string representation of the direction. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final Direction UP
public static final Direction RIGHT
public static final Direction DOWN
public static final Direction LEFT
| Method Detail |
|---|
public Direction getTurnCW()
The new direction is turned 90 degrees in clockwise direction compared to this instance.
java.lang.IllegalArgumentException - if the current direction value is invalidpublic Direction getTurnCCW()
The new direction is turned 90 degrees in counterclockwise direction compared to this instance.
java.lang.IllegalArgumentException - if the current direction value is invalidpublic Direction getMirror()
The new direction is turned 180 degrees compared to this instance.
java.lang.IllegalArgumentException - if the current direction value is invalidpublic boolean isHorizontal()
RIGHT or LEFT).
true if this direction is horizontal, false otherwisepublic boolean isVertical()
UP or DOWN).
true if this direction is vertical, false otherwisepublic int getDirection()
0 for direction UP, 1 for RIGHT, 2 for
DOWN, and 3 for LEFTpublic java.lang.String toString()
toString in class java.lang.ObjectUP, > for RIGHT, v for DOWN, and < for LEFT.
java.lang.IllegalArgumentException - if the current direction value is invalid
|
© Copyright 2000-2025, yWorks GmbH. All rights reserved. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||