Enum Class MapTitlePosition

java.lang.Object
java.lang.Enum<MapTitlePosition>
com.jbstrap.jbmap.enums.MapTitlePosition
All Implemented Interfaces:
Serializable, Comparable<MapTitlePosition>, Constable

public enum MapTitlePosition extends Enum<MapTitlePosition>
Map title positions.
Since:
4.0
  • Enum Constant Details

    • TOP_LEFT

      public static final MapTitlePosition TOP_LEFT
      The map title is displayed above the map, aligned to the left.
    • TOP_CENTER

      public static final MapTitlePosition TOP_CENTER
      The map title is displayed above the map, aligned to the center.
    • TOP_RIGHT

      public static final MapTitlePosition TOP_RIGHT
      The map title is displayed above the map, aligned to the left.
    • BOTTOM_LEFT

      public static final MapTitlePosition BOTTOM_LEFT
      The map title is displayed below the map, aligned to the left.
    • BOTTOM_CENTER

      public static final MapTitlePosition BOTTOM_CENTER
      The map title is displayed below the map, aligned to the center.
    • BOTTOM_RIGHT

      public static final MapTitlePosition BOTTOM_RIGHT
      The map title is displayed below the map, aligned to the right.
  • Method Details

    • values

      public static MapTitlePosition[] 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

      public static MapTitlePosition valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • getPosition

      public String 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

      public String 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

      public static MapTitlePosition fromPositionAlign(String position, String align)
      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

      public static MapTitlePosition fromName(String name)
      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