Package jmri.jmrit.beantable
Class OBlockTableAction
- All Implemented Interfaces:
ActionListener
,PropertyChangeListener
,Serializable
,Cloneable
,EventListener
,Action
public class OBlockTableAction extends AbstractTableAction<OBlock> implements PropertyChangeListener
GUI to define OBlocks, OPaths and Portals. Overrides some of the AbstractTableAction methods as this is a hybrid pane.
Relies on
TableFrames
.- See Also:
- Serialized Form
-
Field Summary
Fields 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 Constructor Description OBlockTableAction()
Default constructorOBlockTableAction(String actionName)
Create an action with a specific title. -
Method Summary
Modifier and Type Method Description void
actionPerformed(ActionEvent e)
Open OBlock tables action handler.protected void
addOBlockPressed(ActionEvent e)
(package private) void
addPortalPressed(ActionEvent e)
protected void
addPressed(ActionEvent e)
(package private) void
addSignalPressed(ActionEvent e)
void
addToFrame(BeanTableFrame<OBlock> f)
Allow subclasses to add to the frame without having to actually subclass the BeanTableDataFrame.(package private) void
cancelObPressed(ActionEvent e)
protected void
createModel()
Create the JTable DataModel, along with the extra stuff for this specific NamedBean type.(package private) void
createObPressed(ActionEvent e)
Respond to Create new OBlock button pressed on Add OBlock pane.String
getClassDescription()
protected String
getClassName()
Create or update the blockPathTableModel.JPanel
getPanel()
(package private) void
handleCreateException(String sysName)
protected String
helpTarget()
Specify the JavaHelp target for this specific panel.void
propertyChange(PropertyChangeEvent e)
void
setManager(Manager<OBlock> om)
Configure managers for all tabs on OBlocks table pane.void
setMenuBar(BeanTableFrame<OBlock> f)
Allow subclasses to alter the frame's Menubar without having to actually subclass the BeanTableDataFrame.protected void
setTitle()
Include the correct title.(package private) void
status(String message, boolean warn)
Methods inherited from class jmri.jmrit.beantable.AbstractTableAction
addToPanel, columnsVisibleUpdated, configureManagerComboBox, configureTable, displayHwError, dispose, getFrame, getManager, getTableDataModel, includeAddButton, nextName, print, removePrefixBoxListener, setFrame, setMessagePreferencesDetails
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
-
Field Details
-
Constructor Details
-
OBlockTableAction
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
-
OBlockTableAction
public OBlockTableAction()Default constructor
-
-
Method Details
-
setManager
Configure managers for all tabs on OBlocks table pane.- Overrides:
setManager
in classAbstractTableAction<OBlock>
- Parameters:
om
- the manager to assign
-
addToFrame
Description copied from class:AbstractTableAction
Allow subclasses to add to the frame without having to actually subclass the BeanTableDataFrame.- Overrides:
addToFrame
in classAbstractTableAction<OBlock>
- Parameters:
f
- the Frame to add to
-
actionPerformed
Open OBlock tables action handler.- Specified by:
actionPerformed
in interfaceActionListener
- Overrides:
actionPerformed
in classAbstractTableAction<OBlock>
- Parameters:
e
- menu action- See Also:
TableFrames
-
createModel
Create the JTable DataModel, along with the extra stuff for this specific NamedBean type. Is directly called to prepare the Tables > OBlock Table entry in the left sidebar list, bypassing actionPerformed(a)- Specified by:
createModel
in classAbstractTableAction<OBlock>
-
getPanel
- Overrides:
getPanel
in classAbstractTableAction<OBlock>
-
setTitle
Include the correct title.- Specified by:
setTitle
in classAbstractTableAction<OBlock>
-
setMenuBar
Description copied from class:AbstractTableAction
Allow subclasses to alter the frame's Menubar without having to actually subclass the BeanTableDataFrame.- Overrides:
setMenuBar
in classAbstractTableAction<OBlock>
- Parameters:
f
- the Frame to attach the menubar to
-
addPressed
- Specified by:
addPressed
in classAbstractTableAction<OBlock>
-
addOBlockPressed
-
cancelObPressed
-
createObPressed
Respond to Create new OBlock button pressed on Add OBlock pane. Adapted fromMemoryTableAction.addPressed(ActionEvent)
- Parameters:
e
- the click event
-
addPortalPressed
-
addSignalPressed
-
handleCreateException
-
getClassName
Create or update the blockPathTableModel. Used in EditBlockPath pane. // * @param block to build a table for- Specified by:
getClassName
in classAbstractTableAction<OBlock>
-
getClassDescription
- Overrides:
getClassDescription
in classAbstractTableAction<OBlock>
-
propertyChange
- Specified by:
propertyChange
in interfacePropertyChangeListener
-
status
-
helpTarget
Description copied from class:AbstractTableAction
Specify the JavaHelp target for this specific panel.- Overrides:
helpTarget
in classAbstractTableAction<OBlock>
- Returns:
- a fixed default string "index" pointing to to highest level in JMRI Help
-