Interface DefaultEnumeratedColumnTableModel.EnumeratedTableColumn<C extends Enum<C>,R>

Type Parameters:
C - the type of the enum
R - the type of rows
Enclosing class:
DefaultEnumeratedColumnTableModel<C extends Enum<C> & DefaultEnumeratedColumnTableModel.EnumeratedTableColumn<C,R>,R>

public static interface DefaultEnumeratedColumnTableModel.EnumeratedTableColumn<C extends Enum<C>,R>
An interface on enums used to describe table columns
  • Method Details

    • getValueClass

      Class<?> getValueClass()
      Get the value class of cells in this column
      Returns:
      the class
    • getValueOf

      Object getValueOf(R row)
      Get the value of this column for the given row
      Parameters:
      row - the row
      Returns:
      the value
    • getHeader

      String getHeader()
      Get the name of this column
      Returns:
      the name
    • setValueOf

      default void setValueOf(R row, Object value)
      Get the value of this column for the given row
      Parameters:
      row - the row
      value - the new value
    • isEditable

      default boolean isEditable(R row)
      Check if this column can be modified for the given row
      Parameters:
      row - the row
      Returns:
      true if editable
    • isSortable

      default boolean isSortable()
      Check if this column can be sorted

      TODO: Either this should be implemented as ported to GDynamicColumnTableModel, or removed.

      Returns:
      true if sortable
    • isVisible

      default boolean isVisible()
      Check if this column should be visible by default
      Returns:
      true if visible
    • defaultSortDirection

      default ColumnSortState.SortDirection defaultSortDirection()
      Get the default sort direction for this column
      Returns:
      the sort direction
    • getPreferredWidth

      default int getPreferredWidth()
    • getRenderer

      default GColumnRenderer<?> getRenderer()
      Because of limitations with Java generics and Enumerations, type checking cannot be guaranteed here. The user must ensure that any returned by getValueOf(Object) can be accepted by the renderer returned here. The framework will perform an unchecked cast of the renderer.
      Returns:
      the renderer
    • getSettingsDefinitions

      default SettingsDefinition[] getSettingsDefinitions()