Package jmri.jmrit.beantable
Class TurnoutTableAction
- All Implemented Interfaces:
ActionListener,Serializable,Cloneable,EventListener,Action
Swing action to create and register a TurnoutTable GUI.
- 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) JButton(package private) JmriJFrame(package private) JTextField(package private) SystemNameValidator(package private) JSpinner(package private) UserPreferencesManager(package private) ManagerComboBox<Turnout>(package private) JCheckBox(package private) SpinnerNumberModel(package private) JLabel(package private) Stringprotected TurnoutManager(package private) JTextFieldFields 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
ConstructorsConstructorDescriptionTurnoutTableAction(String actionName) Create an action with a specific title. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidvoidAdd the check boxes to show/hide extra columns to the Turnout table frame.voidPlace the check boxes to show/hide extra columns to the tabbed Turnout table panel.(package private) voidprotected voidcolumnsVisibleUpdated(boolean[] colsVisible) Override to update column select checkboxes.protected voidconfigureTable(JTable table) Perform configuration of the JTable as required by a specific TableAction.protected voidCreate the JTable DataModel, along with the changes for the specific case of Turnouts.(package private) voidRespond to Create new item button pressed on Add Turnout pane.protected String(package private) voidhandleCreateException(Exception ex, String sysName) protected StringSpecify the JavaHelp target for this specific panel.protected voidsetDefaultSpeeds(JFrame _who) Show a pane to configure closed and thrown turnout speed defaults.voidsetManager(Manager<Turnout> 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.voidInsert table specific Automation and Speeds menus.voidprotected voidsetTitle()Include the correct title.static voidupdateAutomationBox(Turnout t, JComboBox<String> cb) Add the content and make the appropriate selection to a combo box for a turnout's automation choices.Methods inherited from class jmri.jmrit.beantable.AbstractTableAction
actionPerformed, addBottomButtons, addToFrame, configureManagerComboBox, displayHwError, dispose, getDataModel, getFrame, getManager, getPanel, getTableDataModel, includeAddButton, nextName, print, removePrefixBoxListener, setFrameMethods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
-
Field Details
-
turnoutManager
-
addFrame
-
hardwareAddressTextField
-
userNameTextField
-
prefixBox
-
rangeSpinner
-
numberToAddSpinner
-
rangeBox
-
systemSelectionCombo
-
addButton
-
statusBarLabel
-
pref
-
hardwareAddressValidator
-
-
Constructor Details
-
TurnoutTableAction
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:
actionName- title of the action
-
TurnoutTableAction
public TurnoutTableAction()
-
-
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<Turnout>- Parameters:
man- Manager for this table tab
-
createModel
Create the JTable DataModel, along with the changes for the specific case of Turnouts.- Specified by:
createModelin classAbstractTableAction<Turnout>
-
setTitle
Include the correct title.- Specified by:
setTitlein classAbstractTableAction<Turnout>
-
helpTarget
Specify the JavaHelp target for this specific panel.- Overrides:
helpTargetin classAbstractTableAction<Turnout>- Returns:
- a fixed default string "index" pointing to to highest level in JMRI Help
-
addPressed
- Specified by:
addPressedin classAbstractTableAction<Turnout>
-
updateAutomationBox
Add the content and make the appropriate selection to a combo box for a turnout's automation choices.- Parameters:
t- turnoutcb- the JComboBox
-
setDefaultSpeeds
Show a pane to configure closed and thrown turnout speed defaults.- Parameters:
_who- parent JFrame to center the pane on
-
configureTable
Description copied from class:AbstractTableActionPerform configuration of the JTable as required by a specific TableAction.- Overrides:
configureTablein classAbstractTableAction<Turnout>- Parameters:
table- The table to configure.
-
addToFrame
Add the check boxes to show/hide extra columns to the Turnout table frame.Keep contents synchronized with
addToPanel(AbstractTableTabAction)- Overrides:
addToFramein classAbstractTableAction<Turnout>- Parameters:
f- a Turnout table frame
-
addToPanel
Place the check boxes to show/hide extra columns to the tabbed Turnout table panel.Keep contents synchronized with
addToFrame(BeanTableFrame)- Overrides:
addToPanelin classAbstractTableAction<Turnout>- Parameters:
f- a Turnout table action
-
columnsVisibleUpdated
Override to update column select checkboxes. Notification that column visibility for the JTable has updated.This is overridden by classes which have column visibility Checkboxes on bottom bar.
Called on table startup and whenever a column goes hidden / visible.
- Overrides:
columnsVisibleUpdatedin classAbstractTableAction<Turnout>- Parameters:
colsVisible- array of ALL table columns and their visibility status in order of main Table Model, NOT XTableColumnModel.
-
setMenuBar
Insert table specific Automation and Speeds menus. Account for the Window and Help menus, which are already added to the menu bar as part of the creation of the JFrame, by adding the Automation menu 2 places earlier unless the table is part of the ListedTableFrame, that adds the Help menu later on.- Overrides:
setMenuBarin classAbstractTableAction<Turnout>- Parameters:
f- the JFrame of this table
-
cancelPressed
-
createPressed
Respond to Create new item button pressed on Add Turnout pane.- Parameters:
e- the click event
-
handleCreateException
-
getClassName
- Specified by:
getClassNamein classAbstractTableAction<Turnout>
-
setMessagePreferencesDetails
- Overrides:
setMessagePreferencesDetailsin classAbstractTableAction<Turnout>
-
getClassDescription
- Overrides:
getClassDescriptionin classAbstractTableAction<Turnout>
-