Package jmri.jmrit.beantable
Class AbstractTableTabAction<E extends NamedBean>
- java.lang.Object
-
- javax.swing.AbstractAction
-
- jmri.jmrit.beantable.AbstractTableAction<E>
-
- jmri.jmrit.beantable.AbstractTableTabAction<E>
-
- All Implemented Interfaces:
java.awt.event.ActionListener,java.io.Serializable,java.lang.Cloneable,java.util.EventListener,javax.swing.Action
- Direct Known Subclasses:
EcosLocoTableTabAction,IdTagTableTabAction,LightTableTabAction,ReporterTableTabAction,SensorTableTabAction,StringIOTableTabAction,TurnoutTableTabAction
public abstract class AbstractTableTabAction<E extends NamedBean> extends AbstractTableAction<E>
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classAbstractTableTabAction.TabbedTableItem<E extends NamedBean>-
Nested classes/interfaces inherited from class jmri.jmrit.beantable.AbstractTableAction
AbstractTableAction.TableItem<E extends NamedBean>
-
-
Field Summary
Fields Modifier and Type Field Description protected javax.swing.JTabbedPanedataTabsprotected booleaninitprotected java.util.ArrayList<AbstractTableTabAction.TabbedTableItem<E>>tabbedTableArray-
Fields inherited from class jmri.jmrit.beantable.AbstractTableAction
f, includeAddButton, m
-
-
Constructor Summary
Constructors Constructor Description AbstractTableTabAction(java.lang.String s)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected voidaddPressed(java.awt.event.ActionEvent e)voidaddToBottomBox(javax.swing.JComponent c, java.lang.String str)voidaddToFrame(BeanTableFrame<E> f)Allow subclasses to add to the frame without having to actually subclass the BeanTableDataFrame.protected voidcreateModel()Create the JTable DataModel, along with the changes for the specific NamedBean type.voiddispose()Dispose of the BeanTableDataModel ( if present ), which removes the DataModel property change listeners from Beans.BeanTableDataModel<E>getDataModel()Get the relevant data model for the current table.protected abstract Manager<E>getManager()Get the Bean Manager in use by the TableAction.protected abstract AbstractTableAction<E>getNewTableAction(java.lang.String choice)javax.swing.JComponentgetPanel()protected abstract java.lang.StringhelpTarget()Specify the JavaHelp target for this specific panel.voidprint(javax.swing.JTable.PrintMode mode, java.text.MessageFormat headerFormat, java.text.MessageFormat footerFormat)Used with the Tabbed instances of table action, so that the print option is handled via that on the appropriate tab.voidsetMenuBar(BeanTableFrame<E> f)Allow subclasses to alter the frame's Menubar without having to actually subclass the BeanTableDataFrame.protected voidsetTitle()Include the correct title.-
Methods inherited from class jmri.jmrit.beantable.AbstractTableAction
actionPerformed, addBottomButtons, addToFrame, addToPanel, columnsVisibleUpdated, configureManagerComboBox, configureTable, displayHwError, getClassDescription, getClassName, getFrame, getTableDataModel, includeAddButton, nextName, removePrefixBoxListener, setFrame, setManager, setMessagePreferencesDetails
-
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
-
-
-
-
Field Detail
-
dataTabs
protected javax.swing.JTabbedPane dataTabs
-
init
protected boolean init
-
tabbedTableArray
protected java.util.ArrayList<AbstractTableTabAction.TabbedTableItem<E extends NamedBean>> tabbedTableArray
-
-
Constructor Detail
-
AbstractTableTabAction
public AbstractTableTabAction(java.lang.String s)
-
-
Method Detail
-
createModel
protected void createModel()
Description copied from class:AbstractTableActionCreate the JTable DataModel, along with the changes for the specific NamedBean type.- Specified by:
createModelin classAbstractTableAction<E extends NamedBean>
-
getManager
protected abstract Manager<E> getManager()
Description copied from class:AbstractTableActionGet the Bean Manager in use by the TableAction.- Overrides:
getManagerin classAbstractTableAction<E extends NamedBean>- Returns:
- Bean Manager, could be Proxy or normal Manager, may be null.
-
getNewTableAction
protected abstract AbstractTableAction<E> getNewTableAction(java.lang.String choice)
-
getPanel
public javax.swing.JComponent getPanel()
- Overrides:
getPanelin classAbstractTableAction<E extends NamedBean>
-
setTitle
protected void setTitle()
Description copied from class:AbstractTableActionInclude the correct title.- Specified by:
setTitlein classAbstractTableAction<E extends NamedBean>
-
helpTarget
protected abstract java.lang.String helpTarget()
Description copied from class:AbstractTableActionSpecify the JavaHelp target for this specific panel.- Overrides:
helpTargetin classAbstractTableAction<E extends NamedBean>- Returns:
- a fixed default string "index" pointing to to highest level in JMRI Help
-
addPressed
protected void addPressed(java.awt.event.ActionEvent e)
- Specified by:
addPressedin classAbstractTableAction<E extends NamedBean>
-
addToFrame
public void addToFrame(BeanTableFrame<E> f)
Description copied from class:AbstractTableActionAllow subclasses to add to the frame without having to actually subclass the BeanTableDataFrame.- Overrides:
addToFramein classAbstractTableAction<E extends NamedBean>- Parameters:
f- the Frame to add to
-
setMenuBar
public void setMenuBar(BeanTableFrame<E> f)
Description copied from class:AbstractTableActionAllow subclasses to alter the frame's Menubar without having to actually subclass the BeanTableDataFrame.- Overrides:
setMenuBarin classAbstractTableAction<E extends NamedBean>- Parameters:
f- the Frame to attach the menubar to
-
addToBottomBox
public void addToBottomBox(javax.swing.JComponent c, java.lang.String str)
-
getDataModel
public BeanTableDataModel<E> getDataModel()
Description copied from class:AbstractTableActionGet the relevant data model for the current table.This is overridden in the tabbed-table classes to return their own local data model.
Unlike
AbstractTableAction.getTableDataModel(), this therefore doesn't attempt to (re)-create the model.- Overrides:
getDataModelin classAbstractTableAction<E extends NamedBean>
-
print
public void print(javax.swing.JTable.PrintMode mode, java.text.MessageFormat headerFormat, java.text.MessageFormat footerFormat)
Description copied from class:AbstractTableActionUsed with the Tabbed instances of table action, so that the print option is handled via that on the appropriate tab.- Overrides:
printin classAbstractTableAction<E extends NamedBean>- Parameters:
mode- table print modeheaderFormat- messageFormat for headerfooterFormat- messageFormat for footer
-
dispose
public void dispose()
Description copied from class:AbstractTableActionDispose of the BeanTableDataModel ( if present ), which removes the DataModel property change listeners from Beans.- Overrides:
disposein classAbstractTableAction<E extends NamedBean>
-
-