|
||||||||||
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.EventTableModel
public class EventTableModel
This class provides a table model for use with the MonitorWindow that provides a mean to display the Historical Event. This is actually an Adapter onto the existing Event Manager.
Field Summary |
---|
Fields inherited from class javax.swing.table.AbstractTableModel |
---|
listenerList |
Constructor Summary | |
---|---|
EventTableModel(HistoricalEventManager manager)
Create a new Event model based on the specified event manager. |
Method Summary | |
---|---|
void |
destroy()
Prepares the model for deletion. |
void |
eventAdded(int index,
HistoricalEvent event)
A new event has been added at the specified manager. |
void |
eventsRemoved(int startIndex,
int endIndex)
A consequective sequence of events have been removed from the manager. |
java.lang.Class<?> |
getColumnClass(int columnIndex)
Return the type of the column requested. |
int |
getColumnCount()
Return the number of columns |
java.lang.String |
getColumnName(int columnIndex)
Return the name of the column requested. |
java.lang.String |
getCountString()
Gets the model count string. |
boolean |
getDisplayMalfunction()
Checks if malfunction events are to be displayed. |
boolean |
getDisplayMedical()
Checks if medical events are to be displayed. |
boolean |
getDisplayMission()
Checks if mission events are to be displayed. |
boolean |
getDisplaySupply()
Checks if supply events are to be displayed. |
boolean |
getDisplayTask()
Checks if task events are to be displayed. |
java.lang.String |
getName()
Get the name of the model. |
java.lang.Object |
getObject(int row)
Get the unit at the specified row. |
boolean |
getOrdered()
Is this model already ordered according to some external criteria. |
int |
getRowCount()
Get the number of rows in the model. |
java.lang.Object |
getValueAt(int rowIndex,
int columnIndex)
Return the value of a Cell |
void |
setDisplayMalfunction(boolean display)
Sets if malfunction events are to be displayed. |
void |
setDisplayMedical(boolean display)
Sets if medical events are to be displayed. |
void |
setDisplayMission(boolean display)
Sets if mission events are to be displayed. |
void |
setDisplaySupply(boolean display)
Sets if supply events are to be displayed. |
void |
setDisplayTask(boolean display)
Sets if task events are to be displayed. |
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, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.swing.table.TableModel |
---|
addTableModelListener, isCellEditable, removeTableModelListener, setValueAt |
Constructor Detail |
---|
public EventTableModel(HistoricalEventManager manager)
manager
- Manager to extract events from.Method Detail |
---|
public int getColumnCount()
getColumnCount
in interface javax.swing.table.TableModel
public java.lang.Class<?> getColumnClass(int columnIndex)
getColumnClass
in interface javax.swing.table.TableModel
getColumnClass
in class javax.swing.table.AbstractTableModel
columnIndex
- Index of column.
public java.lang.String getColumnName(int columnIndex)
getColumnName
in interface javax.swing.table.TableModel
getColumnName
in class javax.swing.table.AbstractTableModel
columnIndex
- Index of column.
public java.lang.String getName()
public int getRowCount()
getRowCount
in interface javax.swing.table.TableModel
public java.lang.Object getObject(int row)
row
- Indexes of Unit to retrieve.
public boolean getOrdered()
public java.lang.Object getValueAt(int rowIndex, int columnIndex)
getValueAt
in interface javax.swing.table.TableModel
rowIndex
- Row index of the cell.columnIndex
- Column index of the cell.public java.lang.String getCountString()
public void eventAdded(int index, HistoricalEvent event)
eventAdded
in interface HistoricalEventListener
index
- Index of new event in the manager.event
- The new event added.public void eventsRemoved(int startIndex, int endIndex)
eventsRemoved
in interface HistoricalEventListener
startIndex
- First exclusive index of the event to be removed.endIndex
- Last exclusive index of the event to be removed..public boolean getDisplayMalfunction()
public void setDisplayMalfunction(boolean display)
display
- true if displayedpublic boolean getDisplayMedical()
public void setDisplayMedical(boolean display)
display
- true if displayedpublic boolean getDisplayMission()
public void setDisplayMission(boolean display)
display
- true if displayedpublic boolean getDisplayTask()
public void setDisplayTask(boolean display)
display
- true if displayedpublic boolean getDisplaySupply()
public void setDisplaySupply(boolean display)
display
- true if displayedpublic void destroy()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |