org.jext.options
Class StyleTable.StyleTableModel

java.lang.Object
  extended byjavax.swing.table.AbstractTableModel
      extended byorg.jext.options.StyleTable.StyleTableModel
All Implemented Interfaces:
java.io.Serializable, javax.swing.table.TableModel
Enclosing class:
StyleTable

public static class StyleTable.StyleTableModel
extends javax.swing.table.AbstractTableModel

TableModel for the StyleTable.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Constructor Summary
StyleTable.StyleTableModel()
           
StyleTable.StyleTableModel(java.util.Map choices)
          Construct a StyleTableModel and initialize it with the contents of the specified Map.
 
Method Summary
 void addStyleChoice(java.lang.String label, java.lang.String property)
          Add the specified style choice to this StyleTableModel.
 int getColumnCount()
           
 java.lang.String getColumnName(int index)
           
 int getRowCount()
           
 java.lang.Object getValueAt(int row, int col)
           
 void load()
           
 void save()
          Save the contents of this StyleTableModel 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

StyleTable.StyleTableModel

public StyleTable.StyleTableModel()

StyleTable.StyleTableModel

public StyleTable.StyleTableModel(java.util.Map choices)
Construct a StyleTableModel and initialize it with the contents of the specified Map.

Parameters:
choices - the Map containing the initial choices for this StyleTableModel. 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 StyleTableModel as if by addStyleChoice(String, String).
See Also:
addStyleChoice(String, String)
Method Detail

getColumnCount

public int getColumnCount()
See Also:
TableModel#getColumnCount()

getRowCount

public int getRowCount()
See Also:
TableModel#getRowCount()

getValueAt

public java.lang.Object getValueAt(int row,
                                   int col)
See Also:
TableModel#getValueAt(int, int)

setValueAt

public void setValueAt(java.lang.Object value,
                       int row,
                       int col)
See Also:
TableModel#setValueAt(Object, int, int)

getColumnName

public java.lang.String getColumnName(int index)
See Also:
TableModel#getColumnName(int)

save

public void save()
Save the contents of this StyleTableModel to Jext properties.


load

public void load()

addStyleChoice

public void addStyleChoice(java.lang.String label,
                           java.lang.String property)
Add the specified style choice to this StyleTableModel.

Parameters:
label - String property name for the description.
property - String property name for the style.


Copyright ? 2002 Romain Guy.