Enum Class Layout

java.lang.Object
java.lang.Enum<Layout>
com.atlassian.gadgets.dashboard.Layout
All Implemented Interfaces:
Serializable, Comparable<Layout>, Constable

public enum Layout extends Enum<Layout>
Dashboards can be laid out in multiple ways: with a single column (A), with two columns of equal size (AA), with two columns where one is smaller and the other is larger (AB), etc. A larger column is said to be "greedy" because it takes up more room than any of the other columns in the tab. A normal column is said to be "fair" because it tries to share space equally with the other tabs.
  • Enum Constant Details

    • A

      public static final Layout A
      single column
    • AA

      public static final Layout AA
      two columns of equal size
    • AB

      public static final Layout AB
      two columns, the first being smaller than the second
    • BA

      public static final Layout BA
      two columns, the first being larger than the second
    • AAA

      public static final Layout AAA
      three columns, each of equal size
    • ABA

      public static final Layout ABA
      three columns, the first and third are of equal size with the second column larger than the others
  • Method Details

    • values

      public static Layout[] 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 Layout 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
    • getNumberOfColumns

      public int getNumberOfColumns()
      Returns the number of columns in this layout.
      Returns:
      the number of columns in this layout
    • contains

      public boolean contains(DashboardState.ColumnIndex column)
      Checks if the column exists in this layout.
      Parameters:
      column - Column to check exists in this layout
      Returns:
      true if the column exists in this layout, false otherwise
    • getColumnRange

      public Iterable<DashboardState.ColumnIndex> getColumnRange()
      Return an immutable Iterable over the ColumnIndexes that exist in this layout.
      Returns:
      an immutable Iterable over the ColumnIndexes that exist in this layout.
    • isColumnSizingFair

      public boolean isColumnSizingFair(DashboardState.ColumnIndex column)
      Checks if the column shares the space with the other columns on the screen equally or if it is greedy and should take up more space.
      Parameters:
      column - column index to check for sizing fairness
      Returns:
      whether the column tries to share space equally and fairly with other columns
      Throws:
      IllegalArgumentException - thrown if the column is not contained in this layout