public static class ColorTable.ColorTableModel
extends javax.swing.table.AbstractTableModel
TableModel
for the ColorTable
.Constructor and Description |
---|
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 . |
Modifier and Type | Method and Description |
---|---|
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) |
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, getListeners, getTableModelListeners, isCellEditable, removeTableModelListener
public ColorTable.ColorTableModel()
ColorTableModel
.public ColorTable.ColorTableModel(java.util.Map choices)
ColorTableModel
and initialize it with the contents
of the specified Map
.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)
.addColorChoice(String, String)
public int getColumnCount()
TableModel#getColumnCount()
public int getRowCount()
TableModel#getRowCount()
public java.lang.Object getValueAt(int row, int col)
TableModel#getValueAt(int, int)
public void setValueAt(java.lang.Object value, int row, int col)
setValueAt
in interface javax.swing.table.TableModel
setValueAt
in class javax.swing.table.AbstractTableModel
TableModel#setValueAt(Object, int, int)
public java.lang.String getColumnName(int index)
getColumnName
in interface javax.swing.table.TableModel
getColumnName
in class javax.swing.table.AbstractTableModel
TableModel#getColumnName(int)
public void save()
ColorTableModel
to Jext properties.public void load()
ColorTableModel
from Jext properties.
Added for the Option Dialog caching.public void addColorChoice(java.lang.String label, java.lang.String property)
ColorTableModel
.label
- String
property name for the description.property
- String
property name for the color.Copyright ? 2002 Romain Guy.