Package jmri.jmrit.beantable
Class SensorTableAction
- All Implemented Interfaces:
ActionListener,Serializable,Cloneable,EventListener,Action
Swing action to create and register a SensorTable GUI.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class jmri.jmrit.beantable.AbstractTableAction
AbstractTableAction.TableItem<E extends NamedBean> -
Field Summary
FieldsModifier and TypeFieldDescription(package private) JButton(package private) JmriJFrame(package private) JTextField(package private) SystemNameValidator(package private) JLabel(package private) JSpinner(package private) UserPreferencesManager(package private) ManagerComboBox<Sensor>(package private) JCheckBox(package private) SpinnerNumberModelprotected SensorManager(package private) JLabel(package private) String(package private) JTextField(package private) JLabelFields inherited from class jmri.jmrit.beantable.AbstractTableAction
f, includeAddButton, mFields inherited from class javax.swing.AbstractAction
changeSupport, enabledFields 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
ConstructorsConstructorDescriptionSensorTableAction(String actionName) Create an action with a specific title. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidvoidAllow subclasses to add to the frame without having to actually subclass the BeanTableDataFrame.voidIf the subClass is being included in a greater tabbed frame, then this method is used to add the details to the tabbed frame.(package private) voidprotected voidcolumnsVisibleUpdated(boolean[] colsVisible) Override to update showDebounceBox, showPullUpBox, showStateForgetAndQueryBox.protected voidconfigureTable(JTable table) Perform configuration of the JTable as required by a specific TableAction.protected voidCreate the JTable DataModel, along with the changes for the specific case of Sensors.(package private) voidRespond to Create new item button pressed on Add Sensor pane.protected String(package private) voidhandleCreateException(Exception ex, String hwAddress) protected StringSpecify the JavaHelp target for this specific panel.protected voidsetDefaultDebounce(JFrame _who) protected voidsetDefaultState(JFrame _who) voidsetManager(Manager<Sensor> s) If the subClass is being included in a greater tabbed frame, then this is used to specify which manager the subclass should be using.voidInsert a table specific Defaults menu.voidprotected voidsetTitle()Include the correct title.Methods inherited from class jmri.jmrit.beantable.AbstractTableAction
actionPerformed, addBottomButtons, addToFrame, configureManagerComboBox, displayHwError, dispose, getDataModel, getFrame, getManager, getPanel, getTableDataModel, includeAddButton, nextName, print, removePrefixBoxListener, setFrameMethods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
-
Field Details
-
sensorManager
-
addFrame
-
hardwareAddressTextField
-
userNameField
-
prefixBox
-
rangeSpinner
-
numberToAddSpinner
-
rangeBox
-
hwAddressLabel
-
userNameLabel
-
systemSelectionCombo
-
addButton
-
statusBarLabel
-
p
-
connectionChoice
-
hardwareAddressValidator
-
-
Constructor Details
-
SensorTableAction
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
-
SensorTableAction
public SensorTableAction()
-
-
Method Details
-
setManager
If the subClass is being included in a greater tabbed frame, then this is used to specify which manager the subclass should be using.- Overrides:
setManagerin classAbstractTableAction<Sensor>- Parameters:
s- Manager for this table tab
-
createModel
Create the JTable DataModel, along with the changes for the specific case of Sensors.- Specified by:
createModelin classAbstractTableAction<Sensor>
-
setTitle
Include the correct title.- Specified by:
setTitlein classAbstractTableAction<Sensor>
-
helpTarget
Specify the JavaHelp target for this specific panel.- Overrides:
helpTargetin classAbstractTableAction<Sensor>- Returns:
- a fixed default string "index" pointing to to highest level in JMRI Help
-
addPressed
- Specified by:
addPressedin classAbstractTableAction<Sensor>
-
cancelPressed
-
createPressed
Respond to Create new item button pressed on Add Sensor pane.- Parameters:
e- the click event
-
handleCreateException
-
setDefaultDebounce
-
setDefaultState
-
setMenuBar
Insert a table specific Defaults menu. Account for the Window and Help menus, which are already added to the menu bar as part of the creation of the JFrame, by adding the Tools menu 2 places earlier unless the table is part of the ListedTableFrame, that adds the Help menu later on.- Overrides:
setMenuBarin classAbstractTableAction<Sensor>- Parameters:
f- the JFrame of this table
-
configureTable
Description copied from class:AbstractTableActionPerform configuration of the JTable as required by a specific TableAction.- Overrides:
configureTablein classAbstractTableAction<Sensor>- Parameters:
table- The table to configure.
-
addToFrame
Allow subclasses to add to the frame without having to actually subclass the BeanTableDataFrame.- Overrides:
addToFramein classAbstractTableAction<Sensor>- Parameters:
f- the Frame to add to
-
columnsVisibleUpdated
Override to update showDebounceBox, showPullUpBox, showStateForgetAndQueryBox. Notification that column visibility for the JTable has updated.This is overridden by classes which have column visibility Checkboxes on bottom bar.
Called on table startup and whenever a column goes hidden / visible.
- Overrides:
columnsVisibleUpdatedin classAbstractTableAction<Sensor>- Parameters:
colsVisible- array of ALL table columns and their visibility status in order of main Table Model, NOT XTableColumnModel.
-
addToPanel
If the subClass is being included in a greater tabbed frame, then this method is used to add the details to the tabbed frame.- Overrides:
addToPanelin classAbstractTableAction<Sensor>- Parameters:
f- AbstractTableTabAction for the containing frame containing these and other tabs
-
setMessagePreferencesDetails
- Overrides:
setMessagePreferencesDetailsin classAbstractTableAction<Sensor>
-
getClassName
- Specified by:
getClassNamein classAbstractTableAction<Sensor>
-
getClassDescription
- Overrides:
getClassDescriptionin classAbstractTableAction<Sensor>
-