Package jmri.jmrit.beantable
Class LightTableAction
- All Implemented Interfaces:
ActionListener,Serializable,Cloneable,EventListener,Action
Swing action to create and register a LightTable GUI.
Based on SignalHeadTableAction.java
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class jmri.jmrit.beantable.AbstractTableAction
AbstractTableAction.TableItem<E extends NamedBean> -
Field Summary
FieldsModifier and TypeFieldDescription(package private) JmriJFrame(package private) JCheckBox(package private) JButton(package private) PropertyChangeListener(package private) JButton(package private) Light(package private) JTextField(package private) SystemNameValidator(package private) JLabelstatic String(package private) booleanprotected LightManager(package private) boolean(package private) JSpinner(package private) ManagerComboBox<Light>(package private) SpinnerNumberModel(package private) JLabel(package private) JLabel(package private) JLabel(package private) JLabel(package private) String(package private) JTextField(package private) JLabelFields inherited from class jmri.jmrit.beantable.AbstractTableAction
f, includeAddButton, mFields inherited from class javax.swing.AbstractAction
changeSupport, enabledFields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON -
Constructor Summary
ConstructorsConstructorDescriptionCreate an action with a specific title. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidprotected void(package private) voidRespond to the Cancel/Close button on the Add/Edit Light pane.protected voidCreate the JTable DataModel, along with the changes for the specific case of Lights.(package private) voidCreate lights when the Create New button on the Add/Create pane is pressed and entry is valid.protected Stringstatic StringgetDescriptionText(LightControl lc, int type) Get the description of the type of Light Control.(package private) voidhandleCreateException(Exception ex, String sysName) protected StringSpecify the JavaHelp target for this specific panel.protected voidvoidsetManager(Manager<Light> man) If the subClass is being included in a greater tabbed frame, then this is used to specify which manager the subclass should be using.voidprotected voidsetTitle()Include the correct title.(package private) booleanCheck if LightManager supports variable Lights.booleanvalidatePhysicalTurnout(String inTurnoutName, Component inOpenPane) Validates that a physical turnout exists.Methods inherited from class jmri.jmrit.beantable.AbstractTableAction
actionPerformed, addBottomButtons, addToFrame, addToFrame, addToPanel, columnsVisibleUpdated, configureManagerComboBox, configureTable, displayHwError, dispose, getDataModel, getFrame, getManager, getPanel, getTableDataModel, includeAddButton, nextName, print, removePrefixBoxListener, setFrame, setMenuBarMethods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
-
Field Details
-
lightManager
-
addFrame
-
curLight
-
lightCreatedOrUpdated
boolean lightCreatedOrUpdated -
noWarn
boolean noWarn -
systemLabel
-
prefixBox
-
addRangeBox
-
hardwareAddressTextField
-
hardwareAddressValidator
-
rangeSpinner
-
numberToAdd
-
labelNumToAdd
-
systemSelectionCombo
-
systemNameLabel
-
userName
-
userNameLabel
-
create
-
cancel
-
colorChangeListener
-
status1
-
status2
-
connectionChoice
-
lightControlTitle
-
-
Constructor Details
-
LightTableAction
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
-
LightTableAction
public LightTableAction()
-
-
Method Details
-
setManager
If the subClass is being included in a greater tabbed frame, then this is used to specify which manager the subclass should be using.- Overrides:
setManagerin classAbstractTableAction<Light>- Parameters:
man- Manager for this table tab
-
createModel
Create the JTable DataModel, along with the changes for the specific case of Lights.- Specified by:
createModelin classAbstractTableAction<Light>
-
setTitle
Include the correct title.- Specified by:
setTitlein classAbstractTableAction<Light>
-
helpTarget
Specify the JavaHelp target for this specific panel.- Overrides:
helpTargetin classAbstractTableAction<Light>- Returns:
- a fixed default string "index" pointing to to highest level in JMRI Help
-
addPressed
- Specified by:
addPressedin classAbstractTableAction<Light>
-
prefixChanged
-
addRangeChanged
-
supportsVariableLights
boolean supportsVariableLights()Check if LightManager supports variable Lights. TODO: Will only verify against formats which accept "11" as a Hardware address.- Returns:
- true if system can support variable lights.
-
createPressed
Create lights when the Create New button on the Add/Create pane is pressed and entry is valid.- Parameters:
e- the button press action
-
handleCreateException
-
cancelPressed
Respond to the Cancel/Close button on the Add/Edit Light pane.- Parameters:
e- the button press action
-
getDescriptionText
Get the description of the type of Light Control.- Parameters:
lc- the light controltype- the type of lc- Returns:
- description of the type of lc or an empty string if type is not recognized
-
validatePhysicalTurnout
Validates that a physical turnout exists.- Parameters:
inTurnoutName- the (system or user) name of the turnoutinOpenPane- the pane over which to show dialogs (null to suppress dialogs)- Returns:
- true if valid turnout was entered, false otherwise
-
getClassDescription
- Overrides:
getClassDescriptionin classAbstractTableAction<Light>
-
setMessagePreferencesDetails
- Overrides:
setMessagePreferencesDetailsin classAbstractTableAction<Light>
-
getClassName
- Specified by:
getClassNamein classAbstractTableAction<Light>
-