Package jmri.jmrit.operations.locations
Class LocationsTableModel
- java.lang.Object
-
- javax.swing.table.AbstractTableModel
-
- jmri.jmrit.operations.locations.LocationsTableModel
-
- All Implemented Interfaces:
java.beans.PropertyChangeListener
,java.io.Serializable
,java.util.EventListener
,javax.swing.table.TableModel
public class LocationsTableModel extends javax.swing.table.AbstractTableModel implements java.beans.PropertyChangeListener
Table Model for edit of locations used by operations- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected javax.swing.JTable
_table
static int
ACTION_COLUMN
protected static int
CARS_COLUMN
static int
DIVISION_COLUMN
static int
DROPS_COLUMN
static int
EDIT_COLUMN
(package private) java.util.List<LocationEditFrame>
frameList
static int
ID_COLUMN
static int
LENGTH_COLUMN
(package private) LocationManager
locationManager
(package private) java.util.List<Location>
locationsList
protected static int
LOCOS_COLUMN
static int
NAME_COLUMN
static int
NUMBER_COLUMN
static int
PICKUPS_COLUMN
static int
REPORTER_COLUMN
static int
ROLLINGSTOCK_COLUMN
int
SORTBYID
int
SORTBYNAME
static int
TRACK_COLUMN
static int
USED_LENGTH_COLUMN
-
Constructor Summary
Constructors Constructor Description LocationsTableModel()
-
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
getRowCount()
java.lang.Object
getValueAt(int row, int col)
(package private) void
initTable(LocationsTableFrame frame, javax.swing.JTable table)
boolean
isCellEditable(int row, int col)
void
propertyChange(java.beans.PropertyChangeEvent e)
protected void
setColumnsVisible()
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
-
locationManager
LocationManager locationManager
-
_table
protected javax.swing.JTable _table
-
ID_COLUMN
public static final int ID_COLUMN
- See Also:
- Constant Field Values
-
NAME_COLUMN
public static final int NAME_COLUMN
- See Also:
- Constant Field Values
-
TRACK_COLUMN
public static final int TRACK_COLUMN
- See Also:
- Constant Field Values
-
NUMBER_COLUMN
public static final int NUMBER_COLUMN
- See Also:
- Constant Field Values
-
LENGTH_COLUMN
public static final int LENGTH_COLUMN
- See Also:
- Constant Field Values
-
USED_LENGTH_COLUMN
public static final int USED_LENGTH_COLUMN
- See Also:
- Constant Field Values
-
ROLLINGSTOCK_COLUMN
public static final int ROLLINGSTOCK_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
public static final int PICKUPS_COLUMN
- See Also:
- Constant Field Values
-
DROPS_COLUMN
public static final int DROPS_COLUMN
- See Also:
- Constant Field Values
-
DIVISION_COLUMN
public static final int DIVISION_COLUMN
- See Also:
- Constant Field Values
-
REPORTER_COLUMN
public static final int REPORTER_COLUMN
- See Also:
- Constant Field Values
-
ACTION_COLUMN
public static final int ACTION_COLUMN
- See Also:
- Constant Field Values
-
EDIT_COLUMN
public static final int EDIT_COLUMN
- See Also:
- Constant Field Values
-
SORTBYNAME
public final int SORTBYNAME
- See Also:
- Constant Field Values
-
SORTBYID
public final int SORTBYID
- See Also:
- Constant Field Values
-
locationsList
java.util.List<Location> locationsList
-
frameList
java.util.List<LocationEditFrame> frameList
-
-
Constructor Detail
-
LocationsTableModel
public LocationsTableModel()
-
-
Method Detail
-
setSort
public void setSort(int sort)
-
initTable
void initTable(LocationsTableFrame frame, javax.swing.JTable table)
-
setColumnsVisible
protected void setColumnsVisible()
-
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
-
propertyChange
public void propertyChange(java.beans.PropertyChangeEvent e)
- Specified by:
propertyChange
in interfacejava.beans.PropertyChangeListener
-
dispose
public void dispose()
-
-