Package jmri.jmrit.beantable
Class OBlockTableAction
- java.lang.Object
-
- javax.swing.AbstractAction
-
- jmri.jmrit.beantable.AbstractTableAction<OBlock>
-
- jmri.jmrit.beantable.OBlockTableAction
-
- All Implemented Interfaces:
java.awt.event.ActionListener
,java.beans.PropertyChangeListener
,java.io.Serializable
,java.lang.Cloneable
,java.util.EventListener
,javax.swing.Action
public class OBlockTableAction extends AbstractTableAction<OBlock> implements java.beans.PropertyChangeListener
GUI to define OBlocks, OPaths and Portals. Overrides some of the AbstractTableAction methods as this is a hybrid pane. Relies onTableFrames
.- 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 Modifier and Type Field Description protected boolean
_tabbed
(package private) JmriJFrame
addOBlockFrame
(package private) javax.swing.JCheckBox
autoSystemNameBox
(package private) BlockPortalTableModel
blockportals
protected javax.swing.JPanel
dataPanel
protected javax.swing.JTabbedPane
dataTabs
protected boolean
init
(package private) javax.swing.JSpinner
numberToAddSpinner
protected OBlockManager
oblockManager
(package private) OBlockTableModel
oblocks
(package private) OBlockTableFrame
otf
(package private) OBlockTablePanel
otp
(package private) PortalEditFrame
portalFrame
protected PortalManager
portalManager
(package private) PortalTableModel
portals
(package private) UserPreferencesManager
pref
(package private) javax.swing.JCheckBox
rangeBox
(package private) javax.swing.SpinnerNumberModel
rangeSpinner
(package private) SignalEditFrame
signalFrame
(package private) SignalTableModel
signals
(package private) javax.swing.JTextField
startAddress
(package private) javax.swing.JLabel
statusBar
(package private) java.lang.String
systemNameAuto
(package private) TableFrames
tf
(package private) javax.swing.JTextField
userName
-
Fields inherited from class jmri.jmrit.beantable.AbstractTableAction
f, includeAddButton, m
-
-
Constructor Summary
Constructors Constructor Description OBlockTableAction()
Default constructorOBlockTableAction(java.lang.String actionName)
Create an action with a specific title.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
actionPerformed(java.awt.event.ActionEvent e)
Open OBlock tables action handler.protected void
addOBlockPressed(java.awt.event.ActionEvent e)
(package private) void
addPortalPressed(java.awt.event.ActionEvent e)
protected void
addPressed(java.awt.event.ActionEvent e)
(package private) void
addSignalPressed(java.awt.event.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(java.awt.event.ActionEvent e)
protected void
createModel()
Create the JTable DataModel, along with the extra stuff for this specific NamedBean type.(package private) void
createObPressed(java.awt.event.ActionEvent e)
Respond to Create new OBlock button pressed on Add OBlock pane.java.lang.String
getClassDescription()
protected java.lang.String
getClassName()
Create or update the blockPathTableModel.javax.swing.JPanel
getPanel()
(package private) void
handleCreateException(java.lang.String sysName)
protected java.lang.String
helpTarget()
Specify the JavaHelp target for this specific panel.void
propertyChange(java.beans.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.void
setMessagePreferencesDetails()
protected void
setTitle()
Include the correct title.(package private) void
status(java.lang.String message, boolean warn)
-
Methods inherited from class jmri.jmrit.beantable.AbstractTableAction
addBottomButtons, addToFrame, addToPanel, columnsVisibleUpdated, configureManagerComboBox, configureTable, displayHwError, dispose, getDataModel, getFrame, getManager, getTableDataModel, includeAddButton, nextName, print, removePrefixBoxListener, setFrame
-
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
-
-
-
-
Field Detail
-
_tabbed
protected boolean _tabbed
-
dataPanel
protected javax.swing.JPanel dataPanel
-
dataTabs
protected javax.swing.JTabbedPane dataTabs
-
init
protected boolean init
-
oblocks
OBlockTableModel oblocks
-
portals
PortalTableModel portals
-
signals
SignalTableModel signals
-
blockportals
BlockPortalTableModel blockportals
-
oblockManager
@Nonnull protected OBlockManager oblockManager
-
portalManager
@Nonnull protected PortalManager portalManager
-
tf
TableFrames tf
-
otf
OBlockTableFrame otf
-
otp
OBlockTablePanel otp
-
portalFrame
PortalEditFrame portalFrame
-
signalFrame
SignalEditFrame signalFrame
-
startAddress
javax.swing.JTextField startAddress
-
userName
javax.swing.JTextField userName
-
rangeSpinner
javax.swing.SpinnerNumberModel rangeSpinner
-
numberToAddSpinner
javax.swing.JSpinner numberToAddSpinner
-
rangeBox
javax.swing.JCheckBox rangeBox
-
autoSystemNameBox
javax.swing.JCheckBox autoSystemNameBox
-
statusBar
javax.swing.JLabel statusBar
-
addOBlockFrame
JmriJFrame addOBlockFrame
-
systemNameAuto
java.lang.String systemNameAuto
-
-
Constructor Detail
-
OBlockTableAction
public OBlockTableAction(java.lang.String actionName)
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 Detail
-
setManager
public void setManager(@Nonnull Manager<OBlock> om)
Configure managers for all tabs on OBlocks table pane.- Overrides:
setManager
in classAbstractTableAction<OBlock>
- Parameters:
om
- the manager to assign
-
addToFrame
public void addToFrame(@Nonnull BeanTableFrame<OBlock> f)
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
public void actionPerformed(java.awt.event.ActionEvent e)
Open OBlock tables action handler.- Specified by:
actionPerformed
in interfacejava.awt.event.ActionListener
- Overrides:
actionPerformed
in classAbstractTableAction<OBlock>
- Parameters:
e
- menu action- See Also:
TableFrames
-
createModel
protected void 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
public javax.swing.JPanel getPanel()
- Overrides:
getPanel
in classAbstractTableAction<OBlock>
-
setTitle
protected void setTitle()
Include the correct title.- Specified by:
setTitle
in classAbstractTableAction<OBlock>
-
setMenuBar
public void setMenuBar(BeanTableFrame<OBlock> f)
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
protected void addPressed(java.awt.event.ActionEvent e)
- Specified by:
addPressed
in classAbstractTableAction<OBlock>
-
addOBlockPressed
protected void addOBlockPressed(java.awt.event.ActionEvent e)
-
cancelObPressed
void cancelObPressed(java.awt.event.ActionEvent e)
-
createObPressed
void createObPressed(java.awt.event.ActionEvent e)
Respond to Create new OBlock button pressed on Add OBlock pane. Adapted fromMemoryTableAction.addPressed(ActionEvent)
- Parameters:
e
- the click event
-
addPortalPressed
void addPortalPressed(java.awt.event.ActionEvent e)
-
addSignalPressed
void addSignalPressed(java.awt.event.ActionEvent e)
-
handleCreateException
void handleCreateException(java.lang.String sysName)
-
getClassName
protected java.lang.String getClassName()
Create or update the blockPathTableModel. Used in EditBlockPath pane. // * @param block to build a table for- Specified by:
getClassName
in classAbstractTableAction<OBlock>
-
getClassDescription
public java.lang.String getClassDescription()
- Overrides:
getClassDescription
in classAbstractTableAction<OBlock>
-
setMessagePreferencesDetails
public void setMessagePreferencesDetails()
- Overrides:
setMessagePreferencesDetails
in classAbstractTableAction<OBlock>
-
propertyChange
public void propertyChange(java.beans.PropertyChangeEvent e)
- Specified by:
propertyChange
in interfacejava.beans.PropertyChangeListener
-
status
void status(java.lang.String message, boolean warn)
-
helpTarget
protected java.lang.String 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
-
-