Package jmri.jmrit.beantable
Class SignalGroupTableAction.SignalGroupSignalHeadModel
- java.lang.Object
-
- javax.swing.table.AbstractTableModel
-
- jmri.jmrit.beantable.SignalGroupTableAction.SignalGroupOutputModel
-
- jmri.jmrit.beantable.SignalGroupTableAction.SignalGroupSignalHeadModel
-
- All Implemented Interfaces:
java.beans.PropertyChangeListener
,java.io.Serializable
,java.util.EventListener
,javax.swing.table.TableModel
- Enclosing class:
- SignalGroupTableAction
class SignalGroupTableAction.SignalGroupSignalHeadModel extends SignalGroupTableAction.SignalGroupOutputModel
Table Model to manage Signal Head outputs in a Signal Group.
-
-
Field Summary
Fields Modifier and Type Field Description static int
EDIT_COLUMN
static int
STATE_OFF_COLUMN
static int
STATE_ON_COLUMN
-
Fields inherited from class jmri.jmrit.beantable.SignalGroupTableAction.SignalGroupOutputModel
INCLUDE_COLUMN, SNAME_COLUMN, STATE_COLUMN, UNAME_COLUMN
-
-
Constructor Summary
Constructors Constructor Description SignalGroupSignalHeadModel()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) void
addPcl()
void
dispose()
Remove listener from Signal Head in group.SignalHead
getBean(int r)
Fetch existing bean object for a row in the Signal Head table.java.lang.Class<?>
getColumnClass(int c)
int
getColumnCount()
java.lang.String
getColumnName(int c)
java.lang.String
getDisplayName(int r)
Fetch User Name (System Name if User Name is empty) for a row in the Signal Head table.int
getRowCount()
The number of rows in the Signal Head table.java.lang.Object
getValueAt(int r, int c)
Fill in info cells of the Signal Head table on the Add/Edit Group Edit pane.boolean
isCellEditable(int r, int c)
void
setSetToState(java.lang.String x)
void
setValueAt(java.lang.Object type, int r, int c)
Store info from the cells of the Signal Head table of the Add/Edit Group Edit pane.-
Methods inherited from class jmri.jmrit.beantable.SignalGroupTableAction.SignalGroupOutputModel
propertyChange
-
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener
-
-
-
-
Field Detail
-
STATE_ON_COLUMN
public static final int STATE_ON_COLUMN
- See Also:
- Constant Field Values
-
STATE_OFF_COLUMN
public static final int STATE_OFF_COLUMN
- See Also:
- Constant Field Values
-
EDIT_COLUMN
public static final int EDIT_COLUMN
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
SignalGroupSignalHeadModel
SignalGroupSignalHeadModel()
-
-
Method Detail
-
addPcl
final void addPcl()
-
isCellEditable
public boolean isCellEditable(int r, int c)
- Specified by:
isCellEditable
in interfacejavax.swing.table.TableModel
- Overrides:
isCellEditable
in classSignalGroupTableAction.SignalGroupOutputModel
-
getColumnCount
public int getColumnCount()
- Specified by:
getColumnCount
in interfacejavax.swing.table.TableModel
- Overrides:
getColumnCount
in classSignalGroupTableAction.SignalGroupOutputModel
-
getColumnClass
public java.lang.Class<?> getColumnClass(int c)
- Specified by:
getColumnClass
in interfacejavax.swing.table.TableModel
- Overrides:
getColumnClass
in classSignalGroupTableAction.SignalGroupOutputModel
-
getColumnName
public java.lang.String getColumnName(int c)
- Specified by:
getColumnName
in interfacejavax.swing.table.TableModel
- Overrides:
getColumnName
in classSignalGroupTableAction.SignalGroupOutputModel
-
setSetToState
public void setSetToState(java.lang.String x)
-
getRowCount
public int getRowCount()
The number of rows in the Signal Head table.- Returns:
- The number of rows
-
getValueAt
public java.lang.Object getValueAt(int r, int c)
Fill in info cells of the Signal Head table on the Add/Edit Group Edit pane.- Parameters:
r
- Index of the cell rowc
- Index of the cell column
-
getDisplayName
public java.lang.String getDisplayName(int r)
Fetch User Name (System Name if User Name is empty) for a row in the Signal Head table.- Parameters:
r
- index in the signal head table of head to be edited- Returns:
- name of signal head
-
getBean
public SignalHead getBean(int r)
Fetch existing bean object for a row in the Signal Head table.- Parameters:
r
- index in the signal head table of head to be edited- Returns:
- bean object of the head
-
setValueAt
public void setValueAt(java.lang.Object type, int r, int c)
Store info from the cells of the Signal Head table of the Add/Edit Group Edit pane.- Specified by:
setValueAt
in interfacejavax.swing.table.TableModel
- Overrides:
setValueAt
in classjavax.swing.table.AbstractTableModel
- Parameters:
type
- The contents from the tabler
- Index of the cell row of the entryc
- Index of the cell column of the entry
-
dispose
public void dispose()
Remove listener from Signal Head in group. Called on Delete.
-
-