Package swingtree
Enum Class UI.CellOrder
- All Implemented Interfaces:
Serializable,Comparable<UI.CellOrder>,Constable,UIEnum<UI.CellOrder>
- Enclosing class:
UI
@Immutable
public static enum UI.CellOrder
extends Enum<UI.CellOrder>
implements UIEnum<UI.CellOrder>
Defines along which axis the cells of a
JTable are stored: either
row by row (row major), where the outer sequence holds the rows and each
inner sequence the cells of one row, or column by column (column major),
where the outer sequence holds the columns.
This is a storage detail rather than a display detail, because a table always
shows rows and columns and every API here speaks in (row, column) terms.
It matters for performance though: only a ROW_MAJOR table can forward
a change to a single row to the JTable as a targeted row event, so
large and frequently changing tables belong in a row major order.
See UIFactoryMethods.table(swingtree.UI.CellOrder, TableListDataSource) or
TableData.of(swingtree.UI.CellOrder, String...)
for more information about the usage of this enum.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanTells if the outer list (orTuple) of a data source using this cell order holds the rows of the table (row major) or its columns (column major).static UI.CellOrderReturns the enum constant of this class with the specified name.static UI.CellOrder[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
ROW_MAJOR
-
COLUMN_MAJOR
-
-
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
-
isRowMajor
public final boolean isRowMajor()Tells if the outer list (orTuple) of a data source using this cell order holds the rows of the table (row major) or its columns (column major).- Returns:
- True if this is
ROW_MAJOR.
-