guk.editIM
Class StringTable

java.lang.Object
  |
  +--javax.swing.table.AbstractTableModel
        |
        +--guk.editIM.MapTable
              |
              +--guk.editIM.StringTable
All Implemented Interfaces:
java.io.Serializable, javax.swing.table.TableCellRenderer, javax.swing.table.TableModel

public class StringTable
extends MapTable
implements javax.swing.table.TableCellRenderer

An implementation of the data model for the many to many unicode keymap editor table in terms of an AbstractTableModel. Most methods are explained in their MapTable versions already.

See Also:
., Serialized Form

Fields inherited from class guk.editIM.MapTable
assignments, changedFlag, tcRenderer, transferFormat
 
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Constructor Summary
StringTable()
          The table initially contains a single demo object.
 
Method Summary
 int getRowCount()
          The there must be a row that the user can select, because selecting the last row means adding a row to the StringTable in the EditIM user interface.
 void processCommand(java.lang.String command, int modifiers, boolean checked)
          This processes incoming commands.
 void setValueAt(java.lang.Object val, int row, int col)
          When setting the value leads to both key sequence and glyph string becoming empty, the affected row will be removed.
 
Methods inherited from class guk.editIM.MapTable
addEntry, addRow, clearChanged, flushTable, getColumnClass, getColumnCount, getColumnName, getTableCellRendererComponent, getValueAt, isCellEditable, isChanged, readTable, removeEntry
 
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, removeTableModelListener
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 
Methods inherited from interface javax.swing.table.TableCellRenderer
getTableCellRendererComponent
 

Constructor Detail

StringTable

public StringTable()
The table initially contains a single demo object.
Method Detail

getRowCount

public int getRowCount()
The there must be a row that the user can select, because selecting the last row means adding a row to the StringTable in the EditIM user interface.
Overrides:
getRowCount in class MapTable
Returns:
The number of rows that exist in the table, never 0.

setValueAt

public void setValueAt(java.lang.Object val,
                       int row,
                       int col)
When setting the value leads to both key sequence and glyph string becoming empty, the affected row will be removed.
Overrides:
setValueAt in class MapTable
See Also:
setValueAt(Object,int,int) in MapTable.

processCommand

public void processCommand(java.lang.String command,
                           int modifiers,
                           boolean checked)
This processes incoming commands. addchar row glyph is the only command that StringTable accepts. The addchar command will append a glyph to a row, without checking if the glyph column in that row is currently being edited, so you should do that before sending the command.
Overrides:
processCommand in class MapTable
See Also:
processCommand(String,int,boolean) in MapTable.