Algernon Software

org.algernon.app.j2p
Class SlotTable

java.lang.Object
  extended byjavax.swing.table.AbstractTableModel
      extended byjavax.swing.table.DefaultTableModel
          extended byorg.algernon.app.j2p.SlotTable
All Implemented Interfaces:
Serializable, TableModel

public class SlotTable
extends DefaultTableModel
implements TableModel

SlotTable stores information about slots and serves as the Data Model for displaying them in a JTable.

See Also:
Serialized Form

Field Summary
(package private) static int DOMAIN_POSITION
           
(package private) static int NUMBER_OF_COLS
           
(package private) static int RANGE_POSITION
           
(package private) static int SLOT_POSITION
           
 
Fields inherited from class javax.swing.table.DefaultTableModel
columnIdentifiers, dataVector
 
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Constructor Summary
SlotTable(Java2Protege app, Object[] columnNames)
           
 
Method Summary
 void add(J2PSlot slot)
           
 Collection get(String slotName)
          Returns a Collection of the slots with the given name.
 Iterator getIterator()
           
 boolean isCellEditable(int row, int col)
           
 void setValueAt(Object value, int row, int col)
           
 
Methods inherited from class javax.swing.table.DefaultTableModel
addColumn, addColumn, addColumn, addRow, addRow, convertToVector, convertToVector, getColumnCount, getColumnName, getDataVector, getRowCount, getValueAt, insertRow, insertRow, moveRow, newDataAvailable, newRowsAdded, removeRow, rowsRemoved, setColumnCount, setColumnIdentifiers, setColumnIdentifiers, setDataVector, setDataVector, setNumRows, setRowCount
 
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, getListeners, getTableModelListeners, removeTableModelListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.swing.table.TableModel
addTableModelListener, getColumnClass, getColumnCount, getColumnName, getRowCount, getValueAt, removeTableModelListener
 

Field Detail

NUMBER_OF_COLS

static int NUMBER_OF_COLS

SLOT_POSITION

static int SLOT_POSITION

DOMAIN_POSITION

static int DOMAIN_POSITION

RANGE_POSITION

static int RANGE_POSITION
Constructor Detail

SlotTable

public SlotTable(Java2Protege app,
                 Object[] columnNames)
Method Detail

isCellEditable

public boolean isCellEditable(int row,
                              int col)
Specified by:
isCellEditable in interface TableModel

setValueAt

public void setValueAt(Object value,
                       int row,
                       int col)
Specified by:
setValueAt in interface TableModel

add

public void add(J2PSlot slot)

get

public Collection get(String slotName)
Returns a Collection of the slots with the given name.

Parameters:
slotName -
Returns:
a Collection of slots. There may be duplicates.

getIterator

public Iterator getIterator()

Algernon Software