Package jmri.jmrit.beantable
Class LogixNGTableAction
- java.lang.Object
-
- javax.swing.AbstractAction
-
- jmri.jmrit.beantable.AbstractTableAction<E>
-
- jmri.jmrit.beantable.AbstractLogixNGTableAction<LogixNG>
-
- jmri.jmrit.beantable.LogixNGTableAction
-
- All Implemented Interfaces:
java.awt.event.ActionListener
,java.io.Serializable
,java.lang.Cloneable
,java.util.EventListener
,javax.swing.Action
public class LogixNGTableAction extends AbstractLogixNGTableAction<LogixNG>
Swing action to create and register a LogixNG Table.Also contains the panes to create, edit, and delete a LogixNG.
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
LogixNGTableAction.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 LogixNGTableAction()
Create a LogixNGTableAction instance with default title.LogixNGTableAction(java.lang.String s)
Create a LogixNGTableAction instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
copyBean(LogixNG sourceBean, LogixNG targetBean)
protected LogixNG
createBean(java.lang.String userName)
protected LogixNG
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(LogixNG logixNG)
protected void
enableAll(boolean enable)
protected void
execute(LogixNG logixNG)
protected java.lang.String
getAddTitleKey()
protected java.lang.String
getBeanText(LogixNG e, Base.PrintTreeSettings printTreeSettings)
protected java.lang.String
getBrowserTitle()
protected java.lang.String
getCreateButtonHintKey()
protected AbstractLogixNGEditor<LogixNG>
getEditor(BeanTableDataModel<LogixNG> m, java.lang.String sName)
protected void
getListenerRefsIncludingChildren(LogixNG logixNG, java.util.List<java.lang.String> list)
protected Manager<LogixNG>
getManager()
Get the Bean Manager in use by the TableAction.protected boolean
hasChildren(LogixNG logixNG)
protected boolean
isCopyBeanSupported()
protected boolean
isEnabled(LogixNG logixNG)
protected boolean
isExecuteSupported()
protected javax.swing.JPanel
makeAddFrame(java.lang.String titleId, java.lang.String startMessageId)
Create or copy bean frame.protected void
setEnabled(LogixNG logixNG, boolean enable)
-
Methods inherited from class jmri.jmrit.beantable.AbstractLogixNGTableAction
addPressed, autoSystemName, browseMonoSpace, browserPressed, cancelAddPressed, checkFlags, checkLogixNGSysName, checkLogixNGUserName, copyPressed, createPressed, deletePressed, editPressed, executePressed, getClassDescription, getClassName, handleCreateException, helpTarget, isEditSupported, setMenuBar, setMessagePreferencesDetails, setTitle, showSaveReminder
-
Methods inherited from class jmri.jmrit.beantable.AbstractTableAction
actionPerformed, addBottomButtons, addToFrame, addToFrame, 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
-
LogixNGTableAction
public LogixNGTableAction(java.lang.String s)
Create a LogixNGTableAction instance.- Parameters:
s
- the Action title, not the title of the resulting frame. Perhaps this should be changed?
-
LogixNGTableAction
public LogixNGTableAction()
Create a LogixNGTableAction instance with default title.
-
-
Method Detail
-
createModel
protected void createModel()
Description copied from class:AbstractLogixNGTableAction
Create the JTable DataModel, along with the changes (overrides of BeanTableDataModel) for the specific case of a LogixNG table.- Overrides:
createModel
in classAbstractLogixNGTableAction<LogixNG>
-
getEditor
protected AbstractLogixNGEditor<LogixNG> getEditor(BeanTableDataModel<LogixNG> m, java.lang.String sName)
- Specified by:
getEditor
in classAbstractLogixNGTableAction<LogixNG>
-
getManager
protected Manager<LogixNG> getManager()
Description copied from class:AbstractTableAction
Get the Bean Manager in use by the TableAction.- Specified by:
getManager
in classAbstractLogixNGTableAction<LogixNG>
- Returns:
- Bean Manager, could be Proxy or normal Manager, may be null.
-
setEnabled
protected void setEnabled(LogixNG logixNG, boolean enable)
- Specified by:
setEnabled
in classAbstractLogixNGTableAction<LogixNG>
-
isEnabled
protected boolean isEnabled(LogixNG logixNG)
- Specified by:
isEnabled
in classAbstractLogixNGTableAction<LogixNG>
-
enableAll
protected void enableAll(boolean enable)
- Specified by:
enableAll
in classAbstractLogixNGTableAction<LogixNG>
-
createBean
protected LogixNG createBean(java.lang.String userName)
- Specified by:
createBean
in classAbstractLogixNGTableAction<LogixNG>
-
createBean
protected LogixNG createBean(java.lang.String systemName, java.lang.String userName)
- Specified by:
createBean
in classAbstractLogixNGTableAction<LogixNG>
-
deleteBean
public void deleteBean(LogixNG logixNG)
- Specified by:
deleteBean
in classAbstractLogixNGTableAction<LogixNG>
-
copyBean
protected void copyBean(@Nonnull LogixNG sourceBean, @Nonnull LogixNG targetBean)
- Overrides:
copyBean
in classAbstractLogixNGTableAction<LogixNG>
-
isCopyBeanSupported
protected boolean isCopyBeanSupported()
- Overrides:
isCopyBeanSupported
in classAbstractLogixNGTableAction<LogixNG>
-
isExecuteSupported
protected boolean isExecuteSupported()
- Overrides:
isExecuteSupported
in classAbstractLogixNGTableAction<LogixNG>
-
execute
protected void execute(@Nonnull LogixNG logixNG)
- Overrides:
execute
in classAbstractLogixNGTableAction<LogixNG>
-
getBeanText
protected java.lang.String getBeanText(LogixNG e, Base.PrintTreeSettings printTreeSettings)
- Specified by:
getBeanText
in classAbstractLogixNGTableAction<LogixNG>
-
getBrowserTitle
protected java.lang.String getBrowserTitle()
- Specified by:
getBrowserTitle
in classAbstractLogixNGTableAction<LogixNG>
-
getAddTitleKey
protected java.lang.String getAddTitleKey()
- Specified by:
getAddTitleKey
in classAbstractLogixNGTableAction<LogixNG>
-
getCreateButtonHintKey
protected java.lang.String getCreateButtonHintKey()
- Specified by:
getCreateButtonHintKey
in classAbstractLogixNGTableAction<LogixNG>
-
makeAddFrame
protected javax.swing.JPanel makeAddFrame(java.lang.String titleId, java.lang.String startMessageId)
Create or copy bean frame.- Specified by:
makeAddFrame
in classAbstractLogixNGTableAction<LogixNG>
- 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(LogixNG logixNG, java.util.List<java.lang.String> list)
- Specified by:
getListenerRefsIncludingChildren
in classAbstractLogixNGTableAction<LogixNG>
-
hasChildren
protected boolean hasChildren(LogixNG logixNG)
- Specified by:
hasChildren
in classAbstractLogixNGTableAction<LogixNG>
-
-