Class LayoutBlockRouteTableModel
- java.lang.Object
-
- javax.swing.table.AbstractTableModel
-
- jmri.jmrit.display.layoutEditor.blockRoutingTable.LayoutBlockRouteTableModel
-
- All Implemented Interfaces:
java.beans.PropertyChangeListener
,java.io.Serializable
,java.util.EventListener
,javax.swing.table.TableModel
public class LayoutBlockRouteTableModel extends javax.swing.table.AbstractTableModel implements java.beans.PropertyChangeListener
Table data model for display of Roster variable values.Any desired ordering, etc, is handled outside this class.
The initial implementation doesn't automatically update when roster entries change, doesn't allow updating of the entries, and only shows some of the fields. But it's a start....
- Since:
- 2.7.5
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static int
DESTCOL
(package private) static int
DIRECTIONCOL
(package private) boolean
editable
(package private) static int
HOPCOUNTCOL
(package private) static int
LENGTHCOL
(package private) static int
METRICCOL
(package private) static int
NEXTHOPCOL
(package private) static int
NUMCOL
(package private) static int
STATECOL
(package private) static int
VALIDCOL
-
Constructor Summary
Constructors Constructor Description LayoutBlockRouteTableModel(boolean editable, LayoutBlock lBlock)
-
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)
Manager<LayoutBlock>
getManager()
int
getPreferredWidth(int column)
int
getRowCount()
java.lang.Object
getValueAt(int row, int col)
Provides the empty String if attribute doesn't exist.boolean
isCellEditable(int row, int col)
Editable state must be set in ctor.protected boolean
matchPropertyName(java.beans.PropertyChangeEvent e)
void
propertyChange(java.beans.PropertyChangeEvent e)
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
-
DESTCOL
public static final int DESTCOL
- See Also:
- Constant Field Values
-
NEXTHOPCOL
static final int NEXTHOPCOL
- See Also:
- Constant Field Values
-
HOPCOUNTCOL
static final int HOPCOUNTCOL
- See Also:
- Constant Field Values
-
DIRECTIONCOL
static final int DIRECTIONCOL
- See Also:
- Constant Field Values
-
METRICCOL
static final int METRICCOL
- See Also:
- Constant Field Values
-
LENGTHCOL
static final int LENGTHCOL
- See Also:
- Constant Field Values
-
STATECOL
static final int STATECOL
- See Also:
- Constant Field Values
-
VALIDCOL
static final int VALIDCOL
- See Also:
- Constant Field Values
-
NUMCOL
static final int NUMCOL
- See Also:
- Constant Field Values
-
editable
boolean editable
-
-
Constructor Detail
-
LayoutBlockRouteTableModel
public LayoutBlockRouteTableModel(boolean editable, LayoutBlock lBlock)
-
-
Method Detail
-
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)
Editable state must be set in ctor.- Specified by:
isCellEditable
in interfacejavax.swing.table.TableModel
- Overrides:
isCellEditable
in classjavax.swing.table.AbstractTableModel
-
propertyChange
public void propertyChange(java.beans.PropertyChangeEvent e)
- Specified by:
propertyChange
in interfacejava.beans.PropertyChangeListener
-
matchPropertyName
protected boolean matchPropertyName(java.beans.PropertyChangeEvent e)
-
getValueAt
public java.lang.Object getValueAt(int row, int col)
Provides the empty String if attribute doesn't exist.- 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
-
getPreferredWidth
public int getPreferredWidth(int column)
-
dispose
public void dispose()
-
getManager
public Manager<LayoutBlock> getManager()
-
-