Package jmri.jmrit.beantable
Class BlockTableAction
- All Implemented Interfaces:
ActionListener,Serializable,Cloneable,EventListener,Action
Swing action to create and register a BlockTable GUI.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumRules for restoring block values *Nested classes/interfaces inherited from class jmri.jmrit.beantable.AbstractTableAction
AbstractTableAction.TableItem<E extends NamedBean> -
Field Summary
FieldsFields 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidvoidAdd the radioButtons (only 1 may be selected).(package private) voidprotected voidCreate the JTable DataModel, along with the changes for the specific case of Block objects.(package private) voidprotected StringGet the Bean Manager in use by the TableAction.static BlockTableAction.RestoreRuleRetrieve the restore rule selection from user preferences(package private) voidhandleCreateException(String sysName) protected StringSpecify the JavaHelp target for this specific panel.(package private) voidRespond to Create new item pressed on Add Block pane.voidInsert 2 table specific menus.(package private) voidSave the restore rule selection.protected voidsetTitle()Include the correct title.Methods inherited from class jmri.jmrit.beantable.AbstractTableAction
actionPerformed, addBottomButtons, addToFrame, addToPanel, columnsVisibleUpdated, configureManagerComboBox, configureTable, displayHwError, dispose, getDataModel, getFrame, getPanel, getTableDataModel, includeAddButton, nextName, print, removePrefixBoxListener, setFrame, setManager, setMessagePreferencesDetailsMethods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
-
Field Details
-
BLOCK_METRIC_PREF
-
-
Constructor Details
-
BlockTableAction
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- the Action title
-
BlockTableAction
public BlockTableAction()
-
-
Method Details
-
createModel
Create the JTable DataModel, along with the changes for the specific case of Block objects.- Specified by:
createModelin classAbstractTableAction<Block>
-
getManager
Description copied from class:AbstractTableActionGet the Bean Manager in use by the TableAction.- Overrides:
getManagerin classAbstractTableAction<Block>- Returns:
- Bean Manager, could be Proxy or normal Manager, may be null.
-
setTitle
Description copied from class:AbstractTableActionInclude the correct title.- Specified by:
setTitlein classAbstractTableAction<Block>
-
addToFrame
Add the radioButtons (only 1 may be selected).- Overrides:
addToFramein classAbstractTableAction<Block>- Parameters:
f- the Frame to add to
-
setMenuBar
Insert 2 table specific 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 menus 2 places earlier unless the table is part of the ListedTableFrame, that adds the Help menu later on.
- Overrides:
setMenuBarin classAbstractTableAction<Block>- Parameters:
f- the JFrame of this table
-
setRestoreRule
Save the restore rule selection. Called by menu item change events.- Parameters:
newRule- The RestoreRule enum constant
-
getRestoreRule
Retrieve the restore rule selection from user preferences- Returns:
- restoreRule
-
helpTarget
Description copied from class:AbstractTableActionSpecify the JavaHelp target for this specific panel.- Overrides:
helpTargetin classAbstractTableAction<Block>- Returns:
- a fixed default string "index" pointing to to highest level in JMRI Help
-
addPressed
- Specified by:
addPressedin classAbstractTableAction<Block>
-
cancelPressed
-
okPressed
Respond to Create new item pressed on Add Block pane.- Parameters:
e- the click event
-
handleCreateException
-
deletePaths
-
getClassDescription
- Overrides:
getClassDescriptionin classAbstractTableAction<Block>
-
getClassName
- Specified by:
getClassNamein classAbstractTableAction<Block>
-