Package com.atlassian.gadgets.dashboard
Enum Class Layout
- All Implemented Interfaces:
Serializable,Comparable<Layout>,Constable
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.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionsingle columntwo columns of equal sizethree columns, each of equal sizetwo columns, the first being smaller than the secondthree columns, the first and third are of equal size with the second column larger than the otherstwo columns, the first being larger than the second -
Method Summary
Modifier and TypeMethodDescriptionbooleancontains(DashboardState.ColumnIndex column) Checks if thecolumnexists in this layout.Return an immutableIterableover theColumnIndexes that exist in this layout.intReturns the number of columns in this layout.booleanChecks if thecolumnshares the space with the other columns on the screen equally or if it is greedy and should take up more space.static LayoutReturns the enum constant of this class with the specified name.static Layout[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
A
single column -
AA
two columns of equal size -
AB
two columns, the first being smaller than the second -
BA
two columns, the first being larger than the second -
AAA
three columns, each of equal size -
ABA
three columns, the first and third are of equal size with the second column larger than the others
-
-
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
-
getNumberOfColumns
public int getNumberOfColumns()Returns the number of columns in this layout.- Returns:
- the number of columns in this layout
-
contains
Checks if thecolumnexists in this layout.- Parameters:
column- Column to check exists in this layout- Returns:
trueif the column exists in this layout,falseotherwise
-
getColumnRange
Return an immutableIterableover theColumnIndexes that exist in this layout.- Returns:
- an immutable
Iterableover theColumnIndexes that exist in this layout.
-
isColumnSizingFair
Checks if thecolumnshares 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
-