Package jmri.jmrit.operations.locations
Class TrackTableModel
- java.lang.Object
-
- javax.swing.table.AbstractTableModel
-
- jmri.jmrit.operations.OperationsTableModel
-
- jmri.jmrit.operations.locations.TrackTableModel
-
- All Implemented Interfaces:
java.beans.PropertyChangeListener
,java.io.Serializable
,java.util.EventListener
,javax.swing.event.TableColumnModelListener
,javax.swing.table.TableModel
- Direct Known Subclasses:
InterchangeTableModel
,SpurTableModel
,StagingTableModel
,YardTableModel
public abstract class TrackTableModel extends OperationsTableModel implements java.beans.PropertyChangeListener, javax.swing.event.TableColumnModelListener
Table Model for edit of tracks 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 protected boolean
_dirty
protected Location
_location
protected javax.swing.JTable
_table
protected java.util.List<Track>
_tracksList
protected java.lang.String
_trackType
protected static int
ALT_TRACK_COLUMN
protected static int
CARS_COLUMN
protected static int
COMMENT_COLUMN
protected static int
CUSTOM_LOAD_COLUMN
protected static int
DEFAULT_LOAD_COLUMN
protected static int
DESTINATION_COLUMN
protected static int
DISABLE_LOAD_CHANGE_COLUMN
protected static int
EDIT_COLUMN
protected static int
HIGHESTCOLUMN
protected static int
HOLD_COLUMN
protected static int
ID_COLUMN
protected static int
LENGTH_COLUMN
protected static int
LOAD_COLUMN
protected static int
LOCOS_COLUMN
protected static int
MOVES_COLUMN
protected static int
NAME_COLUMN
protected static int
ORDER_COLUMN
protected static int
PICKUPS_COLUMN
protected static int
PLANPICKUP_COLUMN
protected static int
POOL_COLUMN
protected static int
REPORTER_COLUMN
protected static int
RESERVED_COLUMN
protected static int
RESTRICTION_COLUMN
protected static int
ROAD_COLUMN
protected static int
ROUTED_COLUMN
protected static int
SCHEDULE_COLUMN
protected static int
SETOUT_COLUMN
protected static int
SHIP_COLUMN
(package private) TrackEditFrame
tef
protected static int
TRAIN_DIRECTION_COLUMN
protected static int
USED_LENGTH_COLUMN
-
Constructor Summary
Constructors Constructor Description TrackTableModel()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
columnAdded(javax.swing.event.TableColumnModelEvent e)
void
columnMarginChanged(javax.swing.event.ChangeEvent e)
void
columnMoved(javax.swing.event.TableColumnModelEvent e)
void
columnRemoved(javax.swing.event.TableColumnModelEvent e)
void
columnSelectionChanged(javax.swing.event.ListSelectionEvent e)
void
dispose()
protected abstract void
editTrack(int row)
java.lang.Class<?>
getColumnClass(int col)
int
getColumnCount()
java.lang.String
getColumnName(int col)
int
getRowCount()
java.lang.Object
getValueAt(int row, int col)
protected void
initTable(javax.swing.JTable table, Location location, java.lang.String trackType)
boolean
isCellEditable(int row, int col)
void
propertyChange(java.beans.PropertyChangeEvent e)
void
setValueAt(java.lang.Object value, int row, int col)
-
Methods inherited from class jmri.jmrit.operations.OperationsTableModel
getForegroundColor, initTable
-
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener
-
-
-
-
Field Detail
-
_tracksList
protected java.util.List<Track> _tracksList
-
_trackType
protected java.lang.String _trackType
-
_table
protected javax.swing.JTable _table
-
_dirty
protected boolean _dirty
-
ID_COLUMN
protected static final int ID_COLUMN
- See Also:
- Constant Field Values
-
NAME_COLUMN
protected static final int NAME_COLUMN
- See Also:
- Constant Field Values
-
LENGTH_COLUMN
protected static final int LENGTH_COLUMN
- See Also:
- Constant Field Values
-
USED_LENGTH_COLUMN
protected static final int USED_LENGTH_COLUMN
- See Also:
- Constant Field Values
-
RESERVED_COLUMN
protected static final int RESERVED_COLUMN
- See Also:
- Constant Field Values
-
MOVES_COLUMN
protected static final int MOVES_COLUMN
- See Also:
- Constant Field Values
-
CARS_COLUMN
protected static final int CARS_COLUMN
- See Also:
- Constant Field Values
-
LOCOS_COLUMN
protected static final int LOCOS_COLUMN
- See Also:
- Constant Field Values
-
PICKUPS_COLUMN
protected static final int PICKUPS_COLUMN
- See Also:
- Constant Field Values
-
SETOUT_COLUMN
protected static final int SETOUT_COLUMN
- See Also:
- Constant Field Values
-
SCHEDULE_COLUMN
protected static final int SCHEDULE_COLUMN
- See Also:
- Constant Field Values
-
ROAD_COLUMN
protected static final int ROAD_COLUMN
- See Also:
- Constant Field Values
-
LOAD_COLUMN
protected static final int LOAD_COLUMN
- See Also:
- Constant Field Values
-
DEFAULT_LOAD_COLUMN
protected static final int DEFAULT_LOAD_COLUMN
- See Also:
- Constant Field Values
-
CUSTOM_LOAD_COLUMN
protected static final int CUSTOM_LOAD_COLUMN
- See Also:
- Constant Field Values
-
DISABLE_LOAD_CHANGE_COLUMN
protected static final int DISABLE_LOAD_CHANGE_COLUMN
- See Also:
- Constant Field Values
-
SHIP_COLUMN
protected static final int SHIP_COLUMN
- See Also:
- Constant Field Values
-
RESTRICTION_COLUMN
protected static final int RESTRICTION_COLUMN
- See Also:
- Constant Field Values
-
DESTINATION_COLUMN
protected static final int DESTINATION_COLUMN
- See Also:
- Constant Field Values
-
ROUTED_COLUMN
protected static final int ROUTED_COLUMN
- See Also:
- Constant Field Values
-
HOLD_COLUMN
protected static final int HOLD_COLUMN
- See Also:
- Constant Field Values
-
POOL_COLUMN
protected static final int POOL_COLUMN
- See Also:
- Constant Field Values
-
PLANPICKUP_COLUMN
protected static final int PLANPICKUP_COLUMN
- See Also:
- Constant Field Values
-
ALT_TRACK_COLUMN
protected static final int ALT_TRACK_COLUMN
- See Also:
- Constant Field Values
-
ORDER_COLUMN
protected static final int ORDER_COLUMN
- See Also:
- Constant Field Values
-
TRAIN_DIRECTION_COLUMN
protected static final int TRAIN_DIRECTION_COLUMN
- See Also:
- Constant Field Values
-
REPORTER_COLUMN
protected static final int REPORTER_COLUMN
- See Also:
- Constant Field Values
-
COMMENT_COLUMN
protected static final int COMMENT_COLUMN
- See Also:
- Constant Field Values
-
EDIT_COLUMN
protected static final int EDIT_COLUMN
- See Also:
- Constant Field Values
-
HIGHESTCOLUMN
protected static final int HIGHESTCOLUMN
- See Also:
- Constant Field Values
-
tef
TrackEditFrame tef
-
-
Constructor Detail
-
TrackTableModel
public TrackTableModel()
-
-
Method Detail
-
initTable
protected void initTable(javax.swing.JTable table, Location location, java.lang.String trackType)
-
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
-
editTrack
protected abstract void editTrack(int row)
-
dispose
public void dispose()
-
propertyChange
public void propertyChange(java.beans.PropertyChangeEvent e)
- Specified by:
propertyChange
in interfacejava.beans.PropertyChangeListener
-
columnAdded
public void columnAdded(javax.swing.event.TableColumnModelEvent e)
- Specified by:
columnAdded
in interfacejavax.swing.event.TableColumnModelListener
-
columnRemoved
public void columnRemoved(javax.swing.event.TableColumnModelEvent e)
- Specified by:
columnRemoved
in interfacejavax.swing.event.TableColumnModelListener
-
columnMoved
public void columnMoved(javax.swing.event.TableColumnModelEvent e)
- Specified by:
columnMoved
in interfacejavax.swing.event.TableColumnModelListener
-
columnMarginChanged
public void columnMarginChanged(javax.swing.event.ChangeEvent e)
- Specified by:
columnMarginChanged
in interfacejavax.swing.event.TableColumnModelListener
-
columnSelectionChanged
public void columnSelectionChanged(javax.swing.event.ListSelectionEvent e)
- Specified by:
columnSelectionChanged
in interfacejavax.swing.event.TableColumnModelListener
-
-