Package jmri.jmrit.beantable.signalmast
Class AddSignalMastPanel
- java.lang.Object
-
- java.awt.Component
-
- java.awt.Container
-
- javax.swing.JComponent
-
- javax.swing.JPanel
-
- jmri.jmrit.beantable.signalmast.AddSignalMastPanel
-
- All Implemented Interfaces:
java.awt.image.ImageObserver
,java.awt.MenuContainer
,java.io.Serializable
,javax.accessibility.Accessible
public class AddSignalMastPanel extends javax.swing.JPanel
JPanel to create a new Signal Mast. "Driver" refers to a particular class of SignalMast implementation that's to be configured.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class javax.swing.JPanel
javax.swing.JPanel.AccessibleJPanel
-
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
-
-
Field Summary
Fields Modifier and Type Field Description (package private) javax.swing.JButton
apply
(package private) javax.swing.JButton
cancel
(package private) javax.swing.JPanel
centerPanel
(package private) java.awt.CardLayout
cl
(package private) javax.swing.JButton
create
(package private) SignalMastAddPane
currentPane
(package private) javax.swing.JComboBox<java.lang.String>
mastBox
(package private) boolean
mastBoxPassive
(package private) java.util.List<SignalMastAddPane>
panes
(package private) javax.swing.JPanel
signalHeadPanel
(package private) javax.swing.JComboBox<java.lang.String>
signalMastDriver
(package private) javax.swing.JComboBox<java.lang.String>
sigSysBox
(package private) javax.swing.JTextField
userName
-
Fields inherited from class javax.swing.JComponent
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
-
-
Constructor Summary
Constructors Constructor Description AddSignalMastPanel()
Constructor providing a blank panel to configure a new signal mast after pressing 'Add...' on the Signal Mast Table.AddSignalMastPanel(SignalMast mast)
Build a panel filled in for existing mast after pressing 'Edit' in the Signal Mast table.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) boolean
checkUserName(java.lang.String nam)
Check of user name done when creating new SignalMast.(package private) void
init()
(package private) void
issueDialogFailMessage(java.lang.RuntimeException ex)
(package private) int
issueNoUserNameGiven()
(package private) void
issueWarningUserName(java.lang.String nam)
(package private) void
issueWarningUserNameAsSystem(java.lang.String nam)
(package private) void
loadMastDefinitions()
Load the mast definitions from the selected signal system.void
refresh()
Called when an already-initialized AddSignalMastPanel is being displayed again, right before it's set visible.(package private) void
selection(java.lang.String view)
Select a particular signal implementation to display.protected void
updateSelectedDriver()
Update contents of Add/Edit mast panel appropriate for chosen Driver type.-
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
-
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
-
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree
-
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
-
-
-
-
Field Detail
-
userName
javax.swing.JTextField userName
-
sigSysBox
javax.swing.JComboBox<java.lang.String> sigSysBox
-
mastBox
javax.swing.JComboBox<java.lang.String> mastBox
-
mastBoxPassive
boolean mastBoxPassive
-
signalMastDriver
javax.swing.JComboBox<java.lang.String> signalMastDriver
-
panes
java.util.List<SignalMastAddPane> panes
-
centerPanel
javax.swing.JPanel centerPanel
-
cl
java.awt.CardLayout cl
-
currentPane
SignalMastAddPane currentPane
-
signalHeadPanel
javax.swing.JPanel signalHeadPanel
-
cancel
javax.swing.JButton cancel
-
apply
javax.swing.JButton apply
-
create
javax.swing.JButton create
-
-
Constructor Detail
-
AddSignalMastPanel
public AddSignalMastPanel()
Constructor providing a blank panel to configure a new signal mast after pressing 'Add...' on the Signal Mast Table.Responds to choice of signal system, mast type and driver
updateSelectedDriver()
-
AddSignalMastPanel
public AddSignalMastPanel(SignalMast mast)
Build a panel filled in for existing mast after pressing 'Edit' in the Signal Mast table.- Parameters:
mast
-NamedBeanHandle<SignalMast>
for the signal mast to be retrieved- See Also:
AddSignalMastPanel()
-
-
Method Detail
-
init
final void init()
-
selection
final void selection(java.lang.String view)
Select a particular signal implementation to display.- Parameters:
view
- The signal implementation pane name to display
-
loadMastDefinitions
void loadMastDefinitions()
Load the mast definitions from the selected signal system.
-
updateSelectedDriver
protected void updateSelectedDriver()
Update contents of Add/Edit mast panel appropriate for chosen Driver type.Invoked when selecting a Signal Mast Driver in
loadMastDefinitions()
-
checkUserName
boolean checkUserName(java.lang.String nam)
Check of user name done when creating new SignalMast. In case of error, it looks a message and (if not headless) shows a dialog.- Parameters:
nam
- User name to be checked- Returns:
- true if OK to proceed
-
issueWarningUserName
void issueWarningUserName(java.lang.String nam)
-
issueWarningUserNameAsSystem
void issueWarningUserNameAsSystem(java.lang.String nam)
-
issueNoUserNameGiven
int issueNoUserNameGiven()
-
issueDialogFailMessage
void issueDialogFailMessage(java.lang.RuntimeException ex)
-
refresh
public void refresh()
Called when an already-initialized AddSignalMastPanel is being displayed again, right before it's set visible.
-
-