Enum Region
- All Implemented Interfaces:
Serializable
,Comparable<Region>
Indicates a region of a larger area in internationalized relative terms.
- Author:
- Garret Wilson
-
Enum Constant Summary
Enum ConstantDescriptionIn the center of the area.At the end of a line; "right" in left-to-right, top-to-bottom orientation.At the beginning of a line; "left" in left-to-right, top-to-bottom orientation.At the end of a page; "bottom" in left-to-right, top-to-bottom orientation.At the beginning of a page; "top" in left-to-right, top-to-bottom orientation. -
Field Summary
Modifier and TypeFieldDescriptionstatic final int
The number of regions for each of the the line and page flows.protected static final Region[][][]
The three regions for each axis/direction combination. -
Method Summary
Modifier and TypeMethodDescriptionstatic Region
getRegion
(Orientation orientation, Flow flow, int regionIndex) Determines the corresponding region for an orientation flow and absolute region number.static Region
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 Details
-
LINE_START
At the beginning of a line; "left" in left-to-right, top-to-bottom orientation. -
LINE_END
At the end of a line; "right" 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. -
PAGE_END
At the end of a page; "bottom" in left-to-right, top-to-bottom orientation. -
CENTER
In the center of the area.
-
-
Field Details
-
FLOW_REGION_COUNT
public static final int FLOW_REGION_COUNTThe number of regions for each of the the line and page flows.- See Also:
-
REGIONS
The three regions for each axis/direction combination.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
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:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
getRegion
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:
IllegalArgumentException
- if the given region index is less than0
or greater than2
.
-