Package jmri.jmrit.operations.trains
Class TrainsTableModel
- java.lang.Object
-
- javax.swing.table.AbstractTableModel
-
- jmri.jmrit.operations.trains.TrainsTableModel
-
- All Implemented Interfaces:
java.beans.PropertyChangeListener
,java.io.Serializable
,java.util.EventListener
,javax.swing.table.TableModel
public class TrainsTableModel extends javax.swing.table.AbstractTableModel implements java.beans.PropertyChangeListener
Table Model for edit of trains used by operations- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) class
TrainsTableModel.MyTableCellRenderer
-
Field Summary
Fields Modifier and Type Field Description (package private) TrainsTableFrame
_frame
(package private) javax.swing.JTable
_table
static java.lang.String
ACTIONCOLUMNNAME
(package private) java.lang.Thread
build
static java.lang.String
BUILDBOXCOLUMNNAME
static java.lang.String
BUILDCOLUMNNAME
static java.lang.String
CURRENTCOLUMNNAME
static java.lang.String
DEPARTSCOLUMNNAME
static java.lang.String
DESCRIPTIONCOLUMNNAME
static java.lang.String
EDITCOLUMNNAME
static java.lang.String
IDCOLUMNNAME
static java.lang.String
NAMECOLUMNNAME
static java.lang.String
ROUTECOLUMNNAME
int
SORTBYID
int
SORTBYTIME
static java.lang.String
STATUSCOLUMNNAME
(package private) java.util.List<Train>
sysList
(package private) TrainEditFrame
tef
static java.lang.String
TERMINATESCOLUMNNAME
static java.lang.String
TIMECOLUMNNAME
(package private) TrainManager
trainManager
-
Constructor Summary
Constructors Constructor Description TrainsTableModel()
-
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)
java.awt.Color
getRowColor(int row)
int
getRowCount()
java.lang.Object
getValueAt(int row, int col)
(package private) void
initTable()
(package private) void
initTable(javax.swing.JTable table, TrainsTableFrame frame)
boolean
isCellEditable(int row, int col)
boolean
isShowAll()
void
propertyChange(java.beans.PropertyChangeEvent e)
void
setShowAll(boolean showAll)
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
-
_table
javax.swing.JTable _table
-
_frame
TrainsTableFrame _frame
-
SORTBYTIME
public final int SORTBYTIME
- See Also:
- Constant Field Values
-
SORTBYID
public final int SORTBYID
- See Also:
- Constant Field Values
-
IDCOLUMNNAME
public static final java.lang.String IDCOLUMNNAME
-
TIMECOLUMNNAME
public static final java.lang.String TIMECOLUMNNAME
-
BUILDBOXCOLUMNNAME
public static final java.lang.String BUILDBOXCOLUMNNAME
-
BUILDCOLUMNNAME
public static final java.lang.String BUILDCOLUMNNAME
-
NAMECOLUMNNAME
public static final java.lang.String NAMECOLUMNNAME
-
DESCRIPTIONCOLUMNNAME
public static final java.lang.String DESCRIPTIONCOLUMNNAME
-
ROUTECOLUMNNAME
public static final java.lang.String ROUTECOLUMNNAME
-
DEPARTSCOLUMNNAME
public static final java.lang.String DEPARTSCOLUMNNAME
-
CURRENTCOLUMNNAME
public static final java.lang.String CURRENTCOLUMNNAME
-
TERMINATESCOLUMNNAME
public static final java.lang.String TERMINATESCOLUMNNAME
-
STATUSCOLUMNNAME
public static final java.lang.String STATUSCOLUMNNAME
-
ACTIONCOLUMNNAME
public static final java.lang.String ACTIONCOLUMNNAME
-
EDITCOLUMNNAME
public static final java.lang.String EDITCOLUMNNAME
-
tef
TrainEditFrame tef
-
build
java.lang.Thread build
-
-
Constructor Detail
-
TrainsTableModel
public TrainsTableModel()
-
-
Method Detail
-
setSort
public void setSort(int sort)
-
setShowAll
public void setShowAll(boolean showAll)
-
isShowAll
public boolean isShowAll()
-
initTable
void initTable(javax.swing.JTable table, TrainsTableFrame frame)
-
initTable
void initTable()
-
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
-
getRowColor
public java.awt.Color getRowColor(int row)
-
propertyChange
public void propertyChange(java.beans.PropertyChangeEvent e)
- Specified by:
propertyChange
in interfacejava.beans.PropertyChangeListener
-
dispose
public void dispose()
-
-