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:
  • Enum Constant Details

  • Method Details

    • values

      public static UI.CellOrder[] 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 UI.CellOrder 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
    • isRowMajor

      public final boolean isRowMajor()
      Tells if the outer list (or Tuple) 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.