|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.table.AbstractTableModel
org.mars_sim.msp.ui.standard.tool.monitor.UnitTableModel
org.mars_sim.msp.ui.standard.tool.monitor.SettlementTableModel
public class SettlementTableModel
The SettlementTableModel that maintains a list of Settlement objects. It maps key attributes of the Settlement into Columns.
Field Summary |
---|
Fields inherited from class javax.swing.table.AbstractTableModel |
---|
listenerList |
Constructor Summary | |
---|---|
SettlementTableModel(UnitManager unitManager)
Constructs a SettlementTableModel model that displays all Settlements in the simulation. |
Method Summary | |
---|---|
protected void |
addUnit(Unit newUnit)
Add a unit to the model. |
void |
destroy()
Prepares the model for deletion. |
java.lang.Object |
getValueAt(int rowIndex,
int columnIndex)
Return the value of a Cell |
protected void |
removeUnit(Unit oldUnit)
Remove a unit from the model. |
void |
unitUpdate(UnitEvent event)
Catch unit update event. |
Methods inherited from class org.mars_sim.msp.ui.standard.tool.monitor.UnitTableModel |
---|
addAll, clear, containsUnit, equals, getColumnClass, getColumnCount, getColumnName, getCountString, getName, getObject, getOrdered, getRowCount, getUnit, getUnitIndex, getUnitNumber |
Methods inherited from class javax.swing.table.AbstractTableModel |
---|
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, isCellEditable, removeTableModelListener, setValueAt |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.swing.table.TableModel |
---|
addTableModelListener, isCellEditable, removeTableModelListener, setValueAt |
Constructor Detail |
---|
public SettlementTableModel(UnitManager unitManager)
unitManager
- Unit manager that holds settlements.Method Detail |
---|
public java.lang.Object getValueAt(int rowIndex, int columnIndex)
rowIndex
- Row index of the cell.columnIndex
- Column index of the cell.public void unitUpdate(UnitEvent event)
event
- the unit event.protected void addUnit(Unit newUnit)
addUnit
in class UnitTableModel
newUnit
- Unit to add to the model.protected void removeUnit(Unit oldUnit)
removeUnit
in class UnitTableModel
oldUnit
- Unit to remove from the model.public void destroy()
destroy
in class UnitTableModel
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |