Enum Class ChartTitlePosition

java.lang.Object
java.lang.Enum<ChartTitlePosition>
com.jbstrap.ui.components.charts.params.enums.ChartTitlePosition
All Implemented Interfaces:
Serializable, Comparable<ChartTitlePosition>, Constable

public enum ChartTitlePosition extends Enum<ChartTitlePosition>
Chart title positions.
Since:
4.0
Author:
JBStrap
  • Enum Constant Details

    • TOP_LEFT

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

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

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

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

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

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

    • values

      public static ChartTitlePosition[] 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 ChartTitlePosition 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 chart title in a string.
      Returns:
      "top", if the chart title is displayed at the top, or "bottom" if it is displayed at the bottom
    • getAlign

      public String getAlign()
      Gets the chart 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 ChartTitlePosition fromPositionAlign(String position, String align)
      Determines the chart title’s position based on its vertical and horizontal position.
      Parameters:
      position - Chart title vertical position Possible values: top, bottom
      align - Chart 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 ChartTitlePosition fromName(String name)
      Determines the chart’s position based on the specified name.
      Parameters:
      name - Position name
      Returns:
      Chart title position or null if there is no corresponding position for the name