Class TrainsScheduleTableModel
- java.lang.Object
-
- javax.swing.table.AbstractTableModel
-
- jmri.jmrit.operations.trains.schedules.TrainsScheduleTableModel
-
- All Implemented Interfaces:
java.beans.PropertyChangeListener
,java.io.Serializable
,java.util.EventListener
,javax.swing.table.TableModel
public class TrainsScheduleTableModel extends javax.swing.table.AbstractTableModel implements java.beans.PropertyChangeListener
Table Model for edit of train schedules used by operations- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description (package private) TrainsScheduleTableFrame
_frame
(package private) javax.swing.JTable
_table
(package private) TrainScheduleManager
scheduleManager
int
SORTBYDEPARTS
int
SORTBYID
int
SORTBYNAME
int
SORTBYROUTE
int
SORTBYTERMINATES
int
SORTBYTIME
(package private) java.util.List<Train>
sysList
(package private) TrainManager
trainManager
-
Constructor Summary
Constructors Constructor Description TrainsScheduleTableModel()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
dispose()
java.lang.Class<?>
getColumnClass(int col)
int
getColumnCount()
java.lang.String
getColumnName(int col)
int
getFixedColumn()
int
getRowCount()
TrainSchedule
getSchedule(int col)
java.util.List<Train>
getSelectedTrainList()
java.lang.Object
getValueAt(int row, int col)
(package private) void
initTable()
(package private) void
initTable(javax.swing.JTable table, TrainsScheduleTableFrame frame)
boolean
isCellEditable(int row, int col)
void
propertyChange(java.beans.PropertyChangeEvent e)
void
setSort(int sort)
void
setValueAt(java.lang.Object value, int row, int col)
-
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener
-
-
-
-
Field Detail
-
trainManager
TrainManager trainManager
-
scheduleManager
TrainScheduleManager scheduleManager
-
SORTBYNAME
public final int SORTBYNAME
- See Also:
- Constant Field Values
-
SORTBYTIME
public final int SORTBYTIME
- See Also:
- Constant Field Values
-
SORTBYDEPARTS
public final int SORTBYDEPARTS
- See Also:
- Constant Field Values
-
SORTBYTERMINATES
public final int SORTBYTERMINATES
- See Also:
- Constant Field Values
-
SORTBYROUTE
public final int SORTBYROUTE
- See Also:
- Constant Field Values
-
SORTBYID
public final int SORTBYID
- See Also:
- Constant Field Values
-
_table
javax.swing.JTable _table
-
_frame
TrainsScheduleTableFrame _frame
-
-
Constructor Detail
-
TrainsScheduleTableModel
public TrainsScheduleTableModel()
-
-
Method Detail
-
setSort
public void setSort(int sort)
-
getSelectedTrainList
public java.util.List<Train> getSelectedTrainList()
-
initTable
void initTable(javax.swing.JTable table, TrainsScheduleTableFrame frame)
-
initTable
void initTable()
-
getRowCount
public int getRowCount()
- Specified by:
getRowCount
in interfacejavax.swing.table.TableModel
-
getFixedColumn
public int getFixedColumn()
-
getColumnCount
public int getColumnCount()
- Specified by:
getColumnCount
in interfacejavax.swing.table.TableModel
-
getColumnName
public java.lang.String getColumnName(int col)
- Specified by:
getColumnName
in interfacejavax.swing.table.TableModel
- Overrides:
getColumnName
in classjavax.swing.table.AbstractTableModel
-
getColumnClass
public java.lang.Class<?> getColumnClass(int col)
- Specified by:
getColumnClass
in interfacejavax.swing.table.TableModel
- Overrides:
getColumnClass
in classjavax.swing.table.AbstractTableModel
-
isCellEditable
public boolean isCellEditable(int row, int col)
- Specified by:
isCellEditable
in interfacejavax.swing.table.TableModel
- Overrides:
isCellEditable
in classjavax.swing.table.AbstractTableModel
-
getValueAt
public java.lang.Object getValueAt(int row, int col)
- Specified by:
getValueAt
in interfacejavax.swing.table.TableModel
-
setValueAt
public void setValueAt(java.lang.Object value, int row, int col)
- Specified by:
setValueAt
in interfacejavax.swing.table.TableModel
- Overrides:
setValueAt
in classjavax.swing.table.AbstractTableModel
-
propertyChange
public void propertyChange(java.beans.PropertyChangeEvent e)
- Specified by:
propertyChange
in interfacejava.beans.PropertyChangeListener
-
getSchedule
public TrainSchedule getSchedule(int col)
-
dispose
public void dispose()
-
-