Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## gnu.options
Class ColorTable.ColorTableModel

    java.lang.Object
      javax.swing.table.AbstractTableModel
          gnu.options.ColorTable.ColorTableModel

All Implemented Interfaces:
  java.io.Serializable, javax.swing.table.TableModel

Enclosing class:
  ColorTable

    public static class ColorTable.ColorTableModel

extends javax.swing.table.AbstractTableModel

`TableModel` for the `ColorTable`.

See Also:
  Serialized Form

Field Summary

Fields inherited from class javax.swing.table.AbstractTableModel
`listenerList`

Constructor Summary
`ColorTable.ColorTableModel()` Construct an empty `ColorTableModel`.
`ColorTable.ColorTableModel(java.util.Map choices)` Construct a `ColorTableModel` and initialize it with the contents of the specified `Map`.

Method Summary
`void` | `addColorChoice(java.lang.String label, java.lang.String property)` Add the specified color choice to this `ColorTableModel`.
`int` | `getColumnCount()`
`java.lang.String` | `getColumnName(int index)`
`int` | `getRowCount()`
`java.lang.Object` | `getValueAt(int row, int col)`
`void` | `load()` Reload all the colors of this `ColorTableModel` from Jext properties.
`void` | `save()` Save the contents of this `ColorTableModel` to Jext properties.
`void` | `setValueAt(java.lang.Object value, int row, int col)`

Methods inherited from class javax.swing.table.AbstractTableModel
`addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, getListeners, getTableModelListeners, isCellEditable, removeTableModelListener`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ColorTable.ColorTableModel

    public ColorTable.ColorTableModel()

  Construct an empty `ColorTableModel`.

### ColorTable.ColorTableModel

    public ColorTable.ColorTableModel(java.util.Map choices)

  Construct a `ColorTableModel` and initialize it with the contents of the specified `Map`.

  Parameters:
    `choices` - the `Map` containing the initial choices for this `ColorTableModel`. This should be a map of `String` to `String`, so it would be sensible to use a `Properties` object, but this is not enforced beyond that the `String` forms of the keys and values in the `Map` will be used. Each map entry will be added to the `ColorTableModel` as if by `addColorChoice(String, String)`.
  See Also:
    `addColorChoice(String, String)`

Method Detail

### getColumnCount

    public int getColumnCount()

  See Also:
    `getColumnCount()`

### getRowCount

    public int getRowCount()

  See Also:
    `getRowCount()`

### getValueAt

    public java.lang.Object getValueAt(int row,
                                       int col)

  See Also:
    `getValueAt(int, int)`

### setValueAt

    public void setValueAt(java.lang.Object value,
                           int row,
                           int col)

  Specified by:
    `setValueAt` in interface `javax.swing.table.TableModel`
  Overrides:
    `setValueAt` in class `javax.swing.table.AbstractTableModel`
  See Also:
    `setValueAt(Object, int, int)`

### getColumnName

    public java.lang.String getColumnName(int index)

  Specified by:
    `getColumnName` in interface `javax.swing.table.TableModel`
  Overrides:
    `getColumnName` in class `javax.swing.table.AbstractTableModel`
  See Also:
    `getColumnName(int)`

### save

    public void save()

  Save the contents of this `ColorTableModel` to Jext properties.

### load

    public void load()

  Reload all the colors of this `ColorTableModel` from Jext properties. Added for the Option Dialog caching.

### addColorChoice

    public void addColorChoice(java.lang.String label,
                               java.lang.String property)

  Add the specified color choice to this `ColorTableModel`.

  Parameters:
    `label` - `String` property name for the description.
    `property` - `String` property name for the color.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © Madkit Team (O. Gutknecht, J. Ferber, F. Michel et al.) All Rights Reserved.