Package com.jbstrap.jbmap.enums
Enum Class MapTitlePosition
- All Implemented Interfaces:
Serializable
,Comparable<MapTitlePosition>
,Constable
Map title positions.
- Since:
- 4.0
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionThe map title is displayed below the map, aligned to the center.The map title is displayed below the map, aligned to the left.The map title is displayed below the map, aligned to the right.The map title is displayed above the map, aligned to the center.The map title is displayed above the map, aligned to the left.The map title is displayed above the map, aligned to the left. -
Method Summary
Modifier and TypeMethodDescriptionstatic MapTitlePosition
Determines the map’s position based on the specified name.static MapTitlePosition
fromPositionAlign
(String position, String align) Determines the map title’s position based on its vertical and horizontal position.getAlign()
Gets the map title’s horizontal position in a string.Gets the vertical position of the map title in a string.static MapTitlePosition
Returns the enum constant of this class with the specified name.static MapTitlePosition[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
TOP_LEFT
The map title is displayed above the map, aligned to the left. -
TOP_CENTER
The map title is displayed above the map, aligned to the center. -
TOP_RIGHT
The map title is displayed above the map, aligned to the left. -
BOTTOM_LEFT
The map title is displayed below the map, aligned to the left. -
BOTTOM_CENTER
The map title is displayed below the map, aligned to the center. -
BOTTOM_RIGHT
The map title is displayed below the map, aligned to the right.
-
-
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
-
getPosition
Gets the vertical position of the map title in a string.- Returns:
"top"
, if the map title is displayed at the top, or"bottom"
if it is displayed at the bottom
-
getAlign
Gets the map title’s horizontal position in a string.- Returns:
"left"
if aligned to the left,"right"
if aligned to the right or"center"
if aligned to the center.
-
fromPositionAlign
Determines the map title’s position based on its vertical and horizontal position.- Parameters:
position
- Map title vertical position Possible values:top, bottom
align
- Map title horizontal position Possible values:left, center, right
- Returns:
- Title position or
null
, if there is no position corresponding to the specified name
-
fromName
Determines the map’s position based on the specified name.- Parameters:
name
- Position name- Returns:
- Map title position or
null
if there is no corresponding position for the name
-