Package docking.theme.gui

# Class ThemeColorTableModel

java.lang.Object
javax.swing.table.AbstractTableModel
docking.widgets.table.AbstractGTableModel<ColorValue>
docking.widgets.table.AbstractSortedTableModel<ColorValue>
docking.widgets.table.GDynamicColumnTableModel<ColorValue,Object>
docking.theme.gui.ThemeColorTableModel

All Implemented Interfaces:
  `ConfigurableColumnTableModel`, `DynamicColumnTableModel<ColorValue>`, `RowObjectTableModel<ColorValue>`, `SelectionStorage<ColorValue>`, `SortedTableModel`, `VariableColumnTableModel`, `Serializable`, `EventListener`, `ChangeListener`, `TableModel`

public class ThemeColorTableModel extends GDynamicColumnTableModel<ColorValue,Object>
Table model for theme colors

See Also:
  - Serialized Form

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected List<ColorValue>`
  `colors`

  ### Fields inherited from class docking.widgets.table.GDynamicColumnTableModel

  `columnSettings, serviceProvider, tableColumns`

  ### Fields inherited from class docking.widgets.table.AbstractSortedTableModel

  `hasEverSorted`

  ### Fields inherited from class docking.widgets.table.AbstractGTableModel

  `isDisposed, WIDTH_UNDEFINED`

  ### Fields inherited from class javax.swing.table.AbstractTableModel

  `listenerList`

  ### Fields inherited from interface docking.widgets.table.SortedTableModel

  `ASCENDING_ORDER, DESCENDING_ORDER`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ThemeColorTableModel(GThemeValuesCache valuesProvider)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected TableColumnDescriptor<ColorValue>`
  `createTableColumnDescriptor()`
  `protected void`
  `filter()`
  `Object`
  `getDataSource()`
  Returns the table's context for the data.
  `List<ColorValue>`
  `getModelData()`
  Implementors should return the current data of the model.
  `String`
  `getName()`
  Returns the name of this model
  `boolean`
  `isShowingSystemValues()`
  `void`
  `reloadAll()`
  Reloads all the current values and all the default values in the table.
  `void`
  `reloadCurrent()`
  Reloads the just the current values shown in the table.
  `void`
  `setShowSystemValues(boolean show)`

  ### Methods inherited from class docking.widgets.table.GDynamicColumnTableModel

  `addTableColumn, addTableColumn, addTableColumns, addTableColumns, createSortComparator, createSortComparatorForColumn, dispose, disposeDynamicColumnData, getColumn, getColumnClass, getColumnCount, getColumnDescription, getColumnDisplayName, getColumnIndex, getColumnIndex, getColumnName, getColumnSettings, getColumnSettingsDefinitions, getColumnValueForRow, getDefaultColumnCount, getHeaderRenderer, getMaxLines, getPreferredColumnWidth, getRenderer, getTableColumnDescriptor, getUniqueIdentifier, isDefaultColumn, isSortable, isVisibleByDefault, loadDiscoveredTableColumns, reloadColumns, removeTableColumn, removeTableColumns, setAllColumnSettings, stateChanged`

  ### Methods inherited from class docking.widgets.table.AbstractSortedTableModel

  `addSortListener, cleanupTableSortState, createSortingContext, fireTableChanged, getIndexForRowObject, getIndexForRowObject, getPendingSortState, getPrimarySortColumnIndex, getRowIndex, getRowObject, getTableSortState, getValueAt, initializeSorting, isSorted, isSortPending, notifyModelSorted, reSort, setDefaultTableSortState, setTableSortState, sort, sortCompleted`

  ### Methods inherited from class docking.widgets.table.AbstractGTableModel

  `getLastSelectedObjects, getRowCount, isDisposed, refresh, setLastSelectedObjects`

  ### Methods inherited from class javax.swing.table.AbstractTableModel

  `addTableModelListener, findColumn, fireTableCellUpdated, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, isCellEditable, removeTableModelListener, setValueAt`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

  ### Methods inherited from interface docking.widgets.table.RowObjectTableModel

  `fireTableDataChanged, getRowIndex, getRowObject`

  ### Methods inherited from interface javax.swing.table.TableModel

  `addTableModelListener, getRowCount, getValueAt, isCellEditable, removeTableModelListener, setValueAt`

- ## Field Details

  - ### colors

    protected List<ColorValue> colors

- ## Constructor Details

  - ### ThemeColorTableModel

    public ThemeColorTableModel(GThemeValuesCache valuesProvider)

- ## Method Details

  - ### setShowSystemValues

    public void setShowSystemValues(boolean show)

  - ### isShowingSystemValues

    public boolean isShowingSystemValues()

  - ### reloadCurrent

    public void reloadCurrent()
    Reloads the just the current values shown in the table. Called whenever a color changes.

  - ### reloadAll

    public void reloadAll()
    Reloads all the current values and all the default values in the table. Called when the theme changes or the application defaults have been forced to reload.

  - ### filter

    protected void filter()

  - ### getName

    public String getName()
    Description copied from interface: `RowObjectTableModel`
    Returns the name of this model
    Returns:
      the name of this model

  - ### getModelData

    public List<ColorValue> getModelData()
    Description copied from interface: `RowObjectTableModel`
    Implementors should return the current data of the model. For models that support filtering, this will be the filtered version of the data. Furthermore, the data should be the underlying data and not a copy, as this method will potentially sort the given data.

    For those subclasses using an array, you may use the `Arrays` class to create a list backed by the array (`Arrays.asList(Object...)`).

    Returns:
      the model data.

  - ### createTableColumnDescriptor

    protected TableColumnDescriptor<ColorValue> createTableColumnDescriptor()
    Specified by:
      `createTableColumnDescriptor` in class `GDynamicColumnTableModel<ColorValue,Object>`

  - ### getDataSource

    public Object getDataSource()
    Description copied from class: `GDynamicColumnTableModel`
    Returns the table's context for the data.
    Specified by:
      `getDataSource` in class `GDynamicColumnTableModel<ColorValue,Object>`
    Returns:
      the table's context for the data.