Class ScheduleTableModel
- java.lang.Object
-
- javax.swing.table.AbstractTableModel
-
- jmri.jmrit.operations.OperationsTableModel
-
- jmri.jmrit.operations.locations.schedules.ScheduleTableModel
-
- All Implemented Interfaces:
java.beans.PropertyChangeListener
,java.io.Serializable
,java.util.EventListener
,javax.swing.table.TableModel
public class ScheduleTableModel extends OperationsTableModel implements java.beans.PropertyChangeListener
Table Model for edit of a schedule used by operations- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class jmri.jmrit.operations.OperationsTableModel
OperationsTableModel.MyTableCellRenderer
-
-
Field Summary
Fields Modifier and Type Field Description (package private) ScheduleEditFrame
_frame
(package private) java.util.List<ScheduleItem>
_list
(package private) Location
_location
(package private) boolean
_matchMode
(package private) Schedule
_schedule
(package private) javax.swing.JTable
_table
(package private) Track
_track
protected static java.lang.String
POINTER
(package private) java.lang.String[]
randomValues
-
Constructor Summary
Constructors Constructor Description ScheduleTableModel()
-
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)
protected javax.swing.JComboBox<Location>
getDestComboBox(ScheduleItem si)
protected java.awt.Color
getForegroundColor(int row)
protected javax.swing.JComboBox<java.lang.String>
getLoadComboBox(ScheduleItem si)
protected javax.swing.JComboBox<java.lang.String>
getRandomComboBox(ScheduleItem si)
int
getRowCount()
protected javax.swing.JComboBox<java.lang.String>
getShipComboBox(ScheduleItem si)
protected javax.swing.JComboBox<Track>
getTrackComboBox(ScheduleItem si)
java.lang.Object
getValueAt(int row, int col)
protected void
initTable(ScheduleEditFrame frame, javax.swing.JTable table, Schedule schedule, Location location, Track track)
boolean
isCellEditable(int row, int col)
void
propertyChange(java.beans.PropertyChangeEvent e)
void
setMatchMode(boolean mode)
void
setValueAt(java.lang.Object value, int row, int col)
-
Methods inherited from class jmri.jmrit.operations.OperationsTableModel
initTable
-
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener
-
-
-
-
Field Detail
-
POINTER
protected static final java.lang.String POINTER
- See Also:
- Constant Field Values
-
_table
javax.swing.JTable _table
-
_frame
ScheduleEditFrame _frame
-
_matchMode
boolean _matchMode
-
_list
java.util.List<ScheduleItem> _list
-
randomValues
java.lang.String[] randomValues
-
-
Constructor Detail
-
ScheduleTableModel
public ScheduleTableModel()
-
-
Method Detail
-
initTable
protected void initTable(ScheduleEditFrame frame, javax.swing.JTable table, Schedule schedule, Location location, Track track)
-
getRowCount
public int getRowCount()
- Specified by:
getRowCount
in interfacejavax.swing.table.TableModel
-
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
-
getForegroundColor
protected java.awt.Color getForegroundColor(int row)
- Overrides:
getForegroundColor
in classOperationsTableModel
-
getRandomComboBox
protected javax.swing.JComboBox<java.lang.String> getRandomComboBox(ScheduleItem si)
-
getLoadComboBox
protected javax.swing.JComboBox<java.lang.String> getLoadComboBox(ScheduleItem si)
-
getShipComboBox
protected javax.swing.JComboBox<java.lang.String> getShipComboBox(ScheduleItem si)
-
getDestComboBox
protected javax.swing.JComboBox<Location> getDestComboBox(ScheduleItem si)
-
getTrackComboBox
protected javax.swing.JComboBox<Track> getTrackComboBox(ScheduleItem si)
-
setMatchMode
public void setMatchMode(boolean mode)
-
propertyChange
public void propertyChange(java.beans.PropertyChangeEvent e)
- Specified by:
propertyChange
in interfacejava.beans.PropertyChangeListener
-
dispose
public void dispose()
-
-