Package jmri.jmrit.beantable
Class LogixNGGlobalVariableTableAction
- java.lang.Object
-
- javax.swing.AbstractAction
-
- jmri.jmrit.beantable.AbstractTableAction<E>
-
- jmri.jmrit.beantable.AbstractLogixNGTableAction<GlobalVariable>
-
- jmri.jmrit.beantable.LogixNGGlobalVariableTableAction
-
- All Implemented Interfaces:
java.awt.event.ActionListener
,java.io.Serializable
,java.lang.Cloneable
,java.util.EventListener
,javax.swing.Action
public class LogixNGGlobalVariableTableAction extends AbstractLogixNGTableAction<GlobalVariable>
Swing action to create and register a LogixNG Global Variables Table.Also contains the panes to create, edit, and delete a LogixNG Global Variable.
Most of the text used in this GUI is in BeanTableBundle.properties, accessed via Bundle.getMessage().
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected class
LogixNGGlobalVariableTableAction.TableModel
-
Nested classes/interfaces inherited from class jmri.jmrit.beantable.AbstractTableAction
AbstractTableAction.TableItem<E extends NamedBean>
-
-
Field Summary
-
Fields inherited from class jmri.jmrit.beantable.AbstractLogixNGTableAction
_addUserName, _autoSystemName, _curNamedBean, _editor, _logixNGSysName, _pickTables, _showReminder, _sysNameLabel, _systemName, _userNameLabel, addLogixNGFrame, conditionalRowNumber, create, deleteBean, systemNameAuto
-
Fields inherited from class jmri.jmrit.beantable.AbstractTableAction
f, includeAddButton, m
-
-
Constructor Summary
Constructors Constructor Description LogixNGGlobalVariableTableAction()
Create a LogixNGTableAction instance with default title.LogixNGGlobalVariableTableAction(java.lang.String s)
Create a LogixNGGlobalVariablesTableAction instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addToFrame(BeanTableFrame<GlobalVariable> f)
Allow subclasses to add to the frame without having to actually subclass the BeanTableDataFrame.void
addToFrame(ListedTableFrame.TabbedTableItem<GlobalVariable> tti)
Allow subclasses to add to the frame without having to actually subclass the BeanTableDataFrame.protected GlobalVariable
createBean(java.lang.String userName)
protected GlobalVariable
createBean(java.lang.String systemName, java.lang.String userName)
protected void
createModel()
Create the JTable DataModel, along with the changes (overrides of BeanTableDataModel) for the specific case of a LogixNG table.void
deleteBean(GlobalVariable globalVariable)
void
enableAll(boolean enable)
protected java.lang.String
getAddTitleKey()
protected java.lang.String
getBeanText(GlobalVariable e, Base.PrintTreeSettings printTreeSettings)
protected java.lang.String
getBrowserTitle()
java.lang.String
getClassDescription()
protected java.lang.String
getCreateButtonHintKey()
protected AbstractLogixNGEditor<GlobalVariable>
getEditor(BeanTableDataModel<GlobalVariable> m, java.lang.String sName)
protected void
getListenerRefsIncludingChildren(GlobalVariable globalVariable, java.util.List<java.lang.String> list)
protected Manager<GlobalVariable>
getManager()
Get the Bean Manager in use by the TableAction.protected boolean
hasChildren(GlobalVariable globalVariable)
protected java.lang.String
helpTarget()
Specify the JavaHelp target for this specific panel.protected boolean
isCopyBeanSupported()
protected boolean
isEditSupported()
protected boolean
isEnabled(GlobalVariable globalVariable)
protected javax.swing.JPanel
makeAddFrame(java.lang.String titleId, java.lang.String startMessageId)
Create or copy bean frame.void
setEnabled(GlobalVariable globalVariable, boolean enable)
protected void
setTitle()
Set title of NamedBean table.-
Methods inherited from class jmri.jmrit.beantable.AbstractLogixNGTableAction
addPressed, autoSystemName, browseMonoSpace, browserPressed, cancelAddPressed, checkFlags, checkLogixNGSysName, checkLogixNGUserName, copyBean, copyPressed, createPressed, deletePressed, editPressed, execute, executePressed, getClassName, handleCreateException, isExecuteSupported, setMenuBar, setMessagePreferencesDetails, showSaveReminder
-
Methods inherited from class jmri.jmrit.beantable.AbstractTableAction
actionPerformed, addBottomButtons, addToPanel, columnsVisibleUpdated, configureManagerComboBox, configureTable, displayHwError, dispose, getFrame, getPanel, getTableDataModel, includeAddButton, nextName, print, removePrefixBoxListener, setFrame, setManager
-
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
-
-
-
-
Constructor Detail
-
LogixNGGlobalVariableTableAction
public LogixNGGlobalVariableTableAction(java.lang.String s)
Create a LogixNGGlobalVariablesTableAction instance.- Parameters:
s
- the Action title, not the title of the resulting frame. Perhaps this should be changed?
-
LogixNGGlobalVariableTableAction
public LogixNGGlobalVariableTableAction()
Create a LogixNGTableAction instance with default title.
-
-
Method Detail
-
setTitle
protected void setTitle()
Description copied from class:AbstractLogixNGTableAction
Set title of NamedBean table.- Overrides:
setTitle
in classAbstractLogixNGTableAction<GlobalVariable>
-
getClassDescription
public java.lang.String getClassDescription()
- Overrides:
getClassDescription
in classAbstractLogixNGTableAction<GlobalVariable>
-
getEditor
protected AbstractLogixNGEditor<GlobalVariable> getEditor(BeanTableDataModel<GlobalVariable> m, java.lang.String sName)
- Specified by:
getEditor
in classAbstractLogixNGTableAction<GlobalVariable>
-
isEditSupported
protected boolean isEditSupported()
- Overrides:
isEditSupported
in classAbstractLogixNGTableAction<GlobalVariable>
-
getManager
protected Manager<GlobalVariable> getManager()
Description copied from class:AbstractTableAction
Get the Bean Manager in use by the TableAction.- Specified by:
getManager
in classAbstractLogixNGTableAction<GlobalVariable>
- Returns:
- Bean Manager, could be Proxy or normal Manager, may be null.
-
setEnabled
public void setEnabled(GlobalVariable globalVariable, boolean enable)
- Specified by:
setEnabled
in classAbstractLogixNGTableAction<GlobalVariable>
-
isEnabled
protected boolean isEnabled(GlobalVariable globalVariable)
- Specified by:
isEnabled
in classAbstractLogixNGTableAction<GlobalVariable>
-
enableAll
public void enableAll(boolean enable)
- Specified by:
enableAll
in classAbstractLogixNGTableAction<GlobalVariable>
-
createBean
protected GlobalVariable createBean(java.lang.String userName)
- Specified by:
createBean
in classAbstractLogixNGTableAction<GlobalVariable>
-
createBean
protected GlobalVariable createBean(java.lang.String systemName, java.lang.String userName)
- Specified by:
createBean
in classAbstractLogixNGTableAction<GlobalVariable>
-
deleteBean
public void deleteBean(GlobalVariable globalVariable)
- Specified by:
deleteBean
in classAbstractLogixNGTableAction<GlobalVariable>
-
isCopyBeanSupported
protected boolean isCopyBeanSupported()
- Overrides:
isCopyBeanSupported
in classAbstractLogixNGTableAction<GlobalVariable>
-
getBeanText
protected java.lang.String getBeanText(GlobalVariable e, Base.PrintTreeSettings printTreeSettings)
- Specified by:
getBeanText
in classAbstractLogixNGTableAction<GlobalVariable>
-
getBrowserTitle
protected java.lang.String getBrowserTitle()
- Specified by:
getBrowserTitle
in classAbstractLogixNGTableAction<GlobalVariable>
-
getAddTitleKey
protected java.lang.String getAddTitleKey()
- Specified by:
getAddTitleKey
in classAbstractLogixNGTableAction<GlobalVariable>
-
getCreateButtonHintKey
protected java.lang.String getCreateButtonHintKey()
- Specified by:
getCreateButtonHintKey
in classAbstractLogixNGTableAction<GlobalVariable>
-
helpTarget
protected java.lang.String helpTarget()
Description copied from class:AbstractTableAction
Specify the JavaHelp target for this specific panel.- Overrides:
helpTarget
in classAbstractLogixNGTableAction<GlobalVariable>
- Returns:
- a fixed default string "index" pointing to to highest level in JMRI Help
-
makeAddFrame
protected javax.swing.JPanel makeAddFrame(java.lang.String titleId, java.lang.String startMessageId)
Create or copy bean frame.- Specified by:
makeAddFrame
in classAbstractLogixNGTableAction<GlobalVariable>
- Parameters:
titleId
- property key to fetch as title of the frame (using Bundle)startMessageId
- part 1 of property key to fetch as user instruction on pane, either 1 or 2 is added to form the whole key- Returns:
- the button JPanel
-
getListenerRefsIncludingChildren
protected void getListenerRefsIncludingChildren(GlobalVariable globalVariable, java.util.List<java.lang.String> list)
- Specified by:
getListenerRefsIncludingChildren
in classAbstractLogixNGTableAction<GlobalVariable>
-
hasChildren
protected boolean hasChildren(GlobalVariable globalVariable)
- Specified by:
hasChildren
in classAbstractLogixNGTableAction<GlobalVariable>
-
createModel
protected void createModel()
Create the JTable DataModel, along with the changes (overrides of BeanTableDataModel) for the specific case of a LogixNG table.- Overrides:
createModel
in classAbstractLogixNGTableAction<GlobalVariable>
-
addToFrame
public void addToFrame(@Nonnull BeanTableFrame<GlobalVariable> f)
Description copied from class:AbstractTableAction
Allow subclasses to add to the frame without having to actually subclass the BeanTableDataFrame.- Overrides:
addToFrame
in classAbstractTableAction<GlobalVariable>
- Parameters:
f
- the Frame to add to
-
addToFrame
public void addToFrame(@Nonnull ListedTableFrame.TabbedTableItem<GlobalVariable> tti)
Description copied from class:AbstractTableAction
Allow subclasses to add to the frame without having to actually subclass the BeanTableDataFrame.- Overrides:
addToFrame
in classAbstractTableAction<GlobalVariable>
- Parameters:
tti
- the TabbedTableItem to add to
-
-