| 
 | Arch4J 1.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
  |
  +--javax.swing.table.AbstractTableModel
        |
        +--javax.swing.table.DefaultTableModel
              |
              +--org.arch4j.ui.table.ObjectTableModel
A table model where each row is a single object.
| Field Summary | 
| Fields inherited from class javax.swing.table.DefaultTableModel | 
| columnIdentifiers, dataVector | 
| Fields inherited from class javax.swing.table.AbstractTableModel | 
| listenerList | 
| Constructor Summary | |
| ObjectTableModel(Collection anObjectList,
                 Collection anAccessorList,
                 Collection aColumnHeadingList,
                 Collection aRowHeadingList)Creates a new instance of ObjectTableModel | |
| ObjectTableModel(Collection anObjectList,
                 ObjectRowBuilder aRowBuilder,
                 Collection aColumnHeadingList,
                 Collection aRowHeadingList)Creates a new instance of ObjectTableModel | |
| ObjectTableModel(Object[][] objects,
                 String[] headers) | |
| Method Summary | |
|  void | addObject(Object anObject)Add another object to the table. | 
|  void | addRowFor(Object anObject)Add another object row. | 
|  int | getIndex(Object anObject)Gets the index of the object. | 
|  Collection | getObjects()Gets a copy of all the objects in the table. | 
| protected  Vector | getRowData(Object anObject)Get the data for an object. | 
|  Object | getRowObject(int anIndex)Get the object for the given row index. | 
| protected  int | getSelectionMode()Returns the selectionMode. | 
| protected  void | refreshTableData()Refresh the data in the table rows. | 
|  void | refreshTableData(Object anObject)Refresh the row data for the given object. | 
| protected  void | removeAllRows()Remove all rows from the table. | 
|  void | removeObject(Object anObject)Remove an object from the table. | 
|  void | setObjects(Collection anObjectList)Set the objects that represent rows in the table. | 
| protected  void | setSelectionMode(int selectionMode)Sets the selectionMode. | 
| Methods inherited from class javax.swing.table.DefaultTableModel | 
| addColumn, addColumn, addColumn, addRow, addRow, convertToVector, convertToVector, getColumnCount, getColumnName, getDataVector, getRowCount, getValueAt, insertRow, insertRow, isCellEditable, moveRow, newDataAvailable, newRowsAdded, removeRow, rowsRemoved, setColumnCount, setColumnIdentifiers, setColumnIdentifiers, setDataVector, setDataVector, setNumRows, setRowCount, setValueAt | 
| 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 | 
| Constructor Detail | 
public ObjectTableModel(Object[][] objects,
                        String[] headers)
public ObjectTableModel(Collection anObjectList,
                        Collection anAccessorList,
                        Collection aColumnHeadingList,
                        Collection aRowHeadingList)
public ObjectTableModel(Collection anObjectList,
                        ObjectRowBuilder aRowBuilder,
                        Collection aColumnHeadingList,
                        Collection aRowHeadingList)
| Method Detail | 
public Object getRowObject(int anIndex)
anIndex - The index of the row to get the object for.
public void setObjects(Collection anObjectList)
anObjectList - The objects for each row.public void addObject(Object anObject)
anObject - The object to add.public void removeObject(Object anObject)
anObject - The object to remove.public int getIndex(Object anObject)
anObject - The object to get the index for.public void addRowFor(Object anObject)
anObject - The object to add a row for.protected void refreshTableData()
public void refreshTableData(Object anObject)
anObject - The object to update the data for.protected Vector getRowData(Object anObject)
anObject - The object to get the data for.protected void removeAllRows()
protected int getSelectionMode()
protected void setSelectionMode(int selectionMode)
selectionMode - The selectionMode to setpublic Collection getObjects()
| 
 | Arch4J 1.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||