Enum Region
- java.lang.Object
-
- java.lang.Enum<Region>
-
- io.guise.framework.component.layout.Region
-
-
Enum Constant Summary
Enum Constants Enum Constant Description CENTER
In the center of the area.LINE_END
At the end of a line; "right" in left-to-right, top-to-bottom orientation.LINE_START
At the beginning of a line; "left" in left-to-right, top-to-bottom orientation.PAGE_END
At the end of a page; "bottom" in left-to-right, top-to-bottom orientation.PAGE_START
At the beginning of a page; "top" in left-to-right, top-to-bottom orientation.
-
Field Summary
Fields Modifier and Type Field Description static int
FLOW_REGION_COUNT
The number of regions for each of the the line and page flows.protected static Region[][][]
REGIONS
The three regions for each axis/direction combination.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Region
getRegion(Orientation orientation, Flow flow, int regionIndex)
Determines the corresponding region for an orientation flow and absolute region number.static Region
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static Region[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
LINE_START
public static final Region LINE_START
At the beginning of a line; "left" in left-to-right, top-to-bottom orientation.
-
LINE_END
public static final Region LINE_END
At the end of a line; "right" in left-to-right, top-to-bottom orientation.
-
PAGE_START
public static final Region PAGE_START
At the beginning of a page; "top" in left-to-right, top-to-bottom orientation.
-
PAGE_END
public static final Region PAGE_END
At the end of a page; "bottom" in left-to-right, top-to-bottom orientation.
-
CENTER
public static final Region CENTER
In the center of the area.
-
-
Field Detail
-
FLOW_REGION_COUNT
public static final int FLOW_REGION_COUNT
The number of regions for each of the the line and page flows.- See Also:
- Constant Field Values
-
REGIONS
protected static final Region[][][] REGIONS
The three regions for each axis/direction combination.
-
-
Method Detail
-
values
public static Region[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (Region c : Region.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Region valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
getRegion
public static Region getRegion(Orientation orientation, Flow flow, int regionIndex)
Determines the corresponding region for an orientation flow and absolute region number. For example, a left-to-right, top-to-bottom page flow of index2
will yieldPAGE_END
, while a right-to-left, top-to-bottom line flow of index2
will yieldLINE_START
.- Parameters:
orientation
- The component orientation.flow
- The flow (line or page).regionIndex
- The absolute region index (0, 1, or 2) from the upper left-hand corner.- Returns:
- The corresponding region for the orientation.
- Throws:
java.lang.IllegalArgumentException
- if the given region index is less than0
or greater than2
.
-
-