|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.swing.table.AbstractTableModel
nl.tudelft.simulation.introspection.gui.CollectionTableModel
public class CollectionTableModel
A tablemodel used to manage and present the instances of a composite property.
(c) copyright 2002-2005-2004 Delft
University of Technology , the Netherlands.
See for project information www.simulation.tudelft.nl
License of use: Lesser
General Public License (LGPL) , no warranty.
| Field Summary | |
|---|---|
protected java.util.Map<java.lang.Integer,java.lang.Object> |
instances
the instances of the collection |
protected java.util.List<java.lang.Integer> |
keys
the keys identifying specific instances |
| Fields inherited from class javax.swing.table.AbstractTableModel |
|---|
listenerList |
| Constructor Summary | |
|---|---|
CollectionTableModel(Property parentProperty)
constructs a new CollectionTableModel |
|
CollectionTableModel(Property parentProperty,
Introspector introspector)
constructs a new CollectionTableModel |
|
| Method Summary | |
|---|---|
void |
createRow()
Creates a new row at the end of the TableModel. |
void |
createRows(int amount)
Creates a number of new rows at the end of the TableModel |
void |
deleteRow(int index)
Deletes a specific row from the TableModel. |
void |
deleteRows(int[] indices)
Deletes a specific set of rows from the TableModel. |
java.lang.Class<?> |
getColumnClass(int columnIndex)
|
int |
getColumnCount()
|
java.lang.String |
getColumnName(int columnIndex)
|
Introspector |
getIntrospector()
|
ModelManager |
getModelManager()
By default, a {see DefaultModelManager}returned. |
protected Property |
getProperty(int index)
|
Property |
getProperty(java.lang.String propertyName)
The collection table model labels all properties according to their rowIndex. |
int |
getRowCount()
|
java.lang.Class |
getTypeAt(int rowIndex,
int columnIndex)
gets the class of the the object at row,column. |
java.lang.Object |
getValueAt(int rowIndex,
int columnIndex)
|
boolean |
isCellEditable(int rowIndex,
int columnIndex)
|
boolean |
isRowEditable()
|
void |
setModelManager(ModelManager manager)
Sets the modelmanager. |
void |
setValueAt(java.lang.Object aValue,
int rowIndex,
int columnIndex)
|
| Methods inherited from class javax.swing.table.AbstractTableModel |
|---|
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, 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, removeTableModelListener |
| Methods inherited from interface javax.swing.table.TableModel |
|---|
addTableModelListener, removeTableModelListener |
| Field Detail |
|---|
protected java.util.Map<java.lang.Integer,java.lang.Object> instances
protected java.util.List<java.lang.Integer> keys
| Constructor Detail |
|---|
public CollectionTableModel(Property parentProperty)
parentProperty - the parentPropert
public CollectionTableModel(Property parentProperty,
Introspector introspector)
parentProperty - the parentPropertyintrospector - the introspector to use| Method Detail |
|---|
public int getRowCount()
getRowCount in interface javax.swing.table.TableModelTableModel.getRowCount()public int getColumnCount()
getColumnCount in interface javax.swing.table.TableModelTableModel.getColumnCount()
public java.lang.Object getValueAt(int rowIndex,
int columnIndex)
getValueAt in interface javax.swing.table.TableModelTableModel.getValueAt(int, int)public java.lang.String getColumnName(int columnIndex)
getColumnName in interface javax.swing.table.TableModelgetColumnName in class javax.swing.table.AbstractTableModelTableModel.getColumnName(int)
public boolean isCellEditable(int rowIndex,
int columnIndex)
isCellEditable in interface javax.swing.table.TableModelisCellEditable in class javax.swing.table.AbstractTableModelTableModel.isCellEditable(int, int)
public void setValueAt(java.lang.Object aValue,
int rowIndex,
int columnIndex)
setValueAt in interface javax.swing.table.TableModelsetValueAt in class javax.swing.table.AbstractTableModelTableModel.setValueAt(Object, int, int)public java.lang.Class<?> getColumnClass(int columnIndex)
getColumnClass in interface javax.swing.table.TableModelgetColumnClass in class javax.swing.table.AbstractTableModelTableModel.getColumnClass(int)public Property getProperty(java.lang.String propertyName)
getProperty in interface IntrospectingTableModelInterfacepropertyName - The name of the Property to be returned
#getProperty(java.lang.String)protected Property getProperty(int index)
index - the index of the property
public void createRow()
DynamicTableModel
createRow in interface DynamicTableModelDynamicTableModel.createRow()public void createRows(int amount)
DynamicTableModel
createRows in interface DynamicTableModelamount - The number of rows to be created.DynamicTableModel.createRows(int)public void deleteRow(int index)
DynamicTableModel
deleteRow in interface DynamicTableModelindex - The (TableModel) index of the row to be deletedDynamicTableModel.deleteRow(int)public void deleteRows(int[] indices)
DynamicTableModel
deleteRows in interface DynamicTableModelindices - The (TableModel) indices of the rows to be deletedDynamicTableModel.deleteRows(int[])public Introspector getIntrospector()
getIntrospector in interface IntrospectingTableModelInterface#getIntrospector()
public java.lang.Class getTypeAt(int rowIndex,
int columnIndex)
IntrospectingTableModelInterface
getTypeAt in interface IntrospectingTableModelInterfacerowIndex - the rowNumbercolumnIndex - the columnNumber
#getTypeAt(int,int)public void setModelManager(ModelManager manager)
manager - the managerpublic ModelManager getModelManager()
getModelManager in interface IntrospectingTableModelInterface#getModelManager()public boolean isRowEditable()
isRowEditable in interface DynamicTableModelDynamicTableModel.isRowEditable()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||