Package jmri.jmrit.beantable
Class SignalHeadTableAction
- java.lang.Object
-
- javax.swing.AbstractAction
-
- jmri.jmrit.beantable.AbstractTableAction<SignalHead>
-
- jmri.jmrit.beantable.SignalHeadTableAction
-
- All Implemented Interfaces:
java.awt.event.ActionListener
,java.io.Serializable
,java.lang.Cloneable
,java.util.EventListener
,javax.swing.Action
public class SignalHeadTableAction extends AbstractTableAction<SignalHead>
Swing action to create and register a SignalHeadTable GUI.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class jmri.jmrit.beantable.AbstractTableAction
AbstractTableAction.TableItem<E extends NamedBean>
-
-
Field Summary
-
Fields inherited from class jmri.jmrit.beantable.AbstractTableAction
f, includeAddButton, m
-
-
Constructor Summary
Constructors Constructor Description SignalHeadTableAction()
SignalHeadTableAction(java.lang.String s)
Create an action with a specific title.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addPressed(java.awt.event.ActionEvent e)
Provide GUI for adding a new SignalHead.boolean
checkIntegerOnly(java.lang.String s)
protected void
createModel()
Create the JTable DataModel, along with the changes for the specific case of SignalHeads.void
dccSignalPanel()
void
dccSignalPanelEdt()
void
dispose()
java.lang.String
getClassDescription()
protected java.lang.String
getClassName()
protected Turnout
getTurnoutFromPanel(BeanSelectCreatePanel<Turnout> bp, java.lang.String reference)
Create Turnout object for a signal mast output.protected java.lang.String
helpTarget()
Specify the JavaHelp target for this specific panel.protected void
setTitle()
Include the correct title.protected Turnout
updateTurnoutFromPanel(BeanSelectCreatePanel<Turnout> bp, java.lang.String reference, Turnout oldTurnout, java.lang.String title)
Update Turnout object for a signal mast output.-
Methods inherited from class jmri.jmrit.beantable.AbstractTableAction
actionPerformed, addBottomButtons, addToFrame, addToFrame, addToPanel, columnsVisibleUpdated, configureManagerComboBox, configureTable, displayHwError, getFrame, getManager, getPanel, getTableDataModel, includeAddButton, nextName, print, removePrefixBoxListener, setFrame, setManager, setMenuBar, setMessagePreferencesDetails
-
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
-
-
-
-
Constructor Detail
-
SignalHeadTableAction
public SignalHeadTableAction(java.lang.String s)
Create an action with a specific title.Note that the argument is the Action title, not the title of the resulting frame. Perhaps this should be changed?
- Parameters:
s
- title of the action
-
SignalHeadTableAction
public SignalHeadTableAction()
-
-
Method Detail
-
createModel
protected void createModel()
Create the JTable DataModel, along with the changes for the specific case of SignalHeads.- Specified by:
createModel
in classAbstractTableAction<SignalHead>
-
setTitle
protected void setTitle()
Description copied from class:AbstractTableAction
Include the correct title.- Specified by:
setTitle
in classAbstractTableAction<SignalHead>
-
helpTarget
protected java.lang.String helpTarget()
Description copied from class:AbstractTableAction
Specify the JavaHelp target for this specific panel.- Overrides:
helpTarget
in classAbstractTableAction<SignalHead>
- Returns:
- a fixed default string "index" pointing to to highest level in JMRI Help
-
addPressed
protected void addPressed(java.awt.event.ActionEvent e)
Provide GUI for adding a new SignalHead.Because there are multiple options, each of which requires different inputs, we directly manipulate which parts of the GUI are displayed when the selected type is changed.
- Specified by:
addPressed
in classAbstractTableAction<SignalHead>
- Parameters:
e
- name of the event heard
-
checkIntegerOnly
public boolean checkIntegerOnly(java.lang.String s)
-
dispose
public void dispose()
- Overrides:
dispose
in classAbstractTableAction<SignalHead>
-
updateTurnoutFromPanel
protected Turnout updateTurnoutFromPanel(BeanSelectCreatePanel<Turnout> bp, java.lang.String reference, Turnout oldTurnout, java.lang.String title)
Update Turnout object for a signal mast output.- Parameters:
bp
- Pane in which the new output/bean was entered by userreference
- Turnout application descriptionoldTurnout
- Previously used outputtitle
- for warning pane- Returns:
- The newly defined output as Turnout object
-
getTurnoutFromPanel
protected Turnout getTurnoutFromPanel(BeanSelectCreatePanel<Turnout> bp, java.lang.String reference)
Create Turnout object for a signal mast output.- Parameters:
bp
- Pane in which the new output/bean was entered by userreference
- Turnout application description- Returns:
- The new output as Turnout object
-
getClassName
protected java.lang.String getClassName()
- Specified by:
getClassName
in classAbstractTableAction<SignalHead>
-
getClassDescription
public java.lang.String getClassDescription()
- Overrides:
getClassDescription
in classAbstractTableAction<SignalHead>
-
dccSignalPanel
public void dccSignalPanel()
-
dccSignalPanelEdt
public void dccSignalPanelEdt()
-
-