Package snap.geom
Enum Class Pos
- All Implemented Interfaces:
Serializable
,Comparable<Pos>
,Constable
A class to represent a position on both horizonal and vertical axis (e.g. TOP_LEFT, BOTTOM_RIGHT, etc.).
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescription -
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Pos
Returns the Pos for a string.static Pos
Returns a pos for given HPos and VPos.getHPos()
Returns the Horizontal position.Returns the opposing position.getSide()
Returns the Side most associated with position (corners go to LEFT/RIGHT, center to null).getVPos()
Returns the vertical position.boolean
isCorner()
Returns whether position is corner.boolean
Returns whether position is top or bottom.boolean
isSide()
Returns whether position is side.boolean
Returns whether position is top or bottom.static Pos
Returns the Pos for an object.static Pos
Returns the enum constant of this class with the specified name.static Pos[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
TOP_LEFT
-
TOP_CENTER
-
TOP_RIGHT
-
CENTER_LEFT
-
CENTER
-
CENTER_RIGHT
-
BOTTOM_LEFT
-
BOTTOM_CENTER
-
BOTTOM_RIGHT
-
-
Field Details
-
ALL_OUTER
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
getHPos
Returns the Horizontal position. -
getVPos
Returns the vertical position. -
isSide
public boolean isSide()Returns whether position is side. -
isCorner
public boolean isCorner()Returns whether position is corner. -
getOpposing
Returns the opposing position. -
getSide
Returns the Side most associated with position (corners go to LEFT/RIGHT, center to null). -
isLeftOrRight
public boolean isLeftOrRight()Returns whether position is top or bottom. -
isTopOrBottom
public boolean isTopOrBottom()Returns whether position is top or bottom. -
of
Returns the Pos for an object. -
get
Returns the Pos for a string. -
get
Returns a pos for given HPos and VPos.
-