Class NodeConfigManagerFrame
java.lang.Object
java.awt.Component
java.awt.Container
java.awt.Window
java.awt.Frame
javax.swing.JFrame
jmri.util.JmriJFrame
jmri.jmrix.cmri.serial.nodeconfigmanager.NodeConfigManagerFrame
- All Implemented Interfaces:
ComponentListener,WindowListener,ImageObserver,MenuContainer,Serializable,EventListener,Accessible,RootPaneContainer,WindowConstants,BeanInterface,ModifiedFlag,WindowInterface
Frames for a table view to manage CMRInet node configuration management. c2
Created a table view for node configuration operations. Add, Edit, Delete and
Update are executed from the NodeTableManager. This class was derived from
the NodeConfig class.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassSet up table for selecting card type by address for USIC_SUSIC nodesclassSet up table for selecting card type by address for CPNODE/CPMEGA nodesclassSet up table for displaying bit assignmentsclassSet up table for selecting card type by address for CPNODE/CPMEGA nodesclassSet up model for SMINI table for designating oscillating 2-lead searchlightsNested classes/interfaces inherited from class jmri.util.JmriJFrame
JmriJFrame.ScreenDimensionsNested classes/interfaces inherited from class javax.swing.JFrame
JFrame.AccessibleJFrameNested classes/interfaces inherited from class java.awt.Frame
Frame.AccessibleAWTFrameNested classes/interfaces inherited from class java.awt.Window
Window.AccessibleAWTWindow, Window.TypeNested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainerNested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategyNested classes/interfaces inherited from interface jmri.util.swing.WindowInterface
WindowInterface.Hint -
Field Summary
FieldsModifier and TypeFieldDescription(package private) JButtonprotected JButtonprotected Stringprotected Stringprotected Stringprotected intprotected JButtonprotected JLabelprotected JCheckBoxprotected JCheckBoxprotected JCheckBoxprotected JCheckBoxprotected JCheckBoxprotected JCheckBoxprotected JCheckBoxprotected JCheckBoxprotected JCheckBoxprotected JCheckBoxprotected boolean(package private) ArrayList<SerialNode>protected int(package private) NodeConfigManagerFrameprotected SerialNodeprotected intprotected JButtonprotected Stringprotected Stringprotected Stringprotected boolean(package private) JButtonprotected JButtonprotected booleanprotected JButtonprotected Stringprotected Stringprotected Stringprotected booleanprotected booleanprotected Borderprotected intprotected JTextFieldprotected JLabelprotected JTextFieldprotected String(package private) JLabel(package private) jmri.jmrix.cmri.serial.nodeconfigmanager.NodeConfigManagerFrame.HandlerClassprotected JTableprotected NodeConfigManagerFrame.NodeTableModelprotected JPanelprotected intprotected intintprotected intintintintprotected JLabelprotected intprotected JPanelprotected JPanelprotected JPanelprotected JPanelprotected JPanelprotected JPanelprotected JPanelprotected JPanelprotected JPanel(package private) JButtonprotected intprotected JTextFieldprotected intprotected JTextFieldprotected intprotected intprotected JLabelprotected JLabelprotected JLabelprotected JButtonFields inherited from class jmri.util.JmriJFrame
allowInFrameServlet, properties, reuseFrameSavedPosition, reuseFrameSavedSized, windowInterfaceFields inherited from class javax.swing.JFrame
accessibleContext, rootPane, rootPaneCheckingEnabledFields inherited from class java.awt.Frame
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSORFields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTFields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTHFields inherited from interface javax.swing.WindowConstants
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidvoidvoidvoidvoidHandle cancel button clicked.protected booleanCheck for consistency errors by node type.voidHandle the delete button clickvoidHandle delete button pressed.voiddeleteNodeButtonActionPerformed(int nodeAddr) Set up delete node window.voidHandle the done button click.voidHandle done button clicked.voidEdit node table selection.voideditNodeButtonActionPerformed(int nodeaddr) Create and load edit function window.intGet the selected node address from the node table.voidHandle info action.voidBy default, Swing components should be created an installed in this method, rather than in the ctor itself.voidMethod to initialize configured nodes and sets up the node select combo boxvoidInitialize the node configuration window This window is a template for ADD,EDIT,DELETE node operationsvoidvoidPrint.protected booleanRead pulse width from window.protected booleanRead receive delay from window.(package private) voidSet the node parameters by type.voidsetupNodeInformationWindow(int nodeaddr) Load all of the configured node information from the serial node class.voidHandle update button clicked.voidThe JmriJFrame implementation callsJmriJFrame.handleModified().Methods inherited from class jmri.util.JmriJFrame
addHelpMenu, componentHidden, componentMoved, componentResized, componentShown, dispose, generateWindowRef, getAllowInFrameServlet, getEscapeKeyAction, getEscapeKeyClosesWindow, getFrame, getFrame, getFrameList, getFrameList, getIndexedProperty, getMaximumSize, getModifiedFlag, getPreferredSize, getProperty, getPropertyNames, getSavePosition, getSaveSize, getScreenDimensions, getWindowFrameRef, getWindowInterface, handleModified, hasIndexedProperty, hasProperty, makePrivateWindow, makePublicWindow, markWindowModified, multipleInstances, pack, setAllowInFrameServlet, setEscapeKeyAction, setEscapeKeyClosesWindow, setFrameLocation, setIndexedProperty, setModifiedFlag, setProperty, setSavePosition, setSaveSize, setShutDownTask, setWindowInterface, show, show, storeValues, undecorate, windowActivated, windowClosed, windowDeactivated, windowDeiconified, windowIconified, windowOpenedMethods inherited from class javax.swing.JFrame
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, updateMethods inherited from class java.awt.Frame
addNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setBackground, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setOpacity, setResizable, setShape, setState, setTitle, setUndecoratedMethods inherited from class java.awt.Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, getBackground, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOpacity, getOwnedWindows, getOwner, getOwnerlessWindows, getShape, getToolkit, getType, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isAutoRequestFocus, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isOpaque, isShowing, isValidateRoot, paint, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setAutoRequestFocus, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImages, setLocation, setLocation, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setType, setVisible, show, toBack, toFrontMethods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMinimumSize, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusDownCycle, validate, validateTreeMethods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, requestFocusInWindow, resize, resize, revalidate, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setMaximumSize, setMixingCutoutShape, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycleMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.awt.MenuContainer
getFont, postEvent
-
Field Details
-
cmriNode
-
numConfigNodes
-
numBits
-
numInputBits
-
numOutputBits
-
selectedNodeAddr
-
selectedTableRow
-
doingPrint
-
nodeLabel
-
nodeTablePanel
-
inputBorder
-
nodeTableModel
-
nodeTable
-
addButton
-
doneButton
-
printButton
-
curFrame
-
nodeAddrField
-
nodeAddrStatic
-
nodeTypeBox
-
receiveDelayField
-
nodeDescription
-
pulseWidthField
-
cardSizeBox
-
cardSize8Box
-
cardSizeText
-
onBoardBytesText
-
addNodeButton
-
editNodeButton
-
deleteNodeButton
-
doneNodeButton
-
updateNodeButton
-
cancelNodeButton
-
statusText1
-
statusText2
-
statusText3
-
panel2
-
panel2a
-
panel2b
-
panel2c
-
panelnodeDescBox
-
panelnodeDesc
-
panelnetOpt
-
panelnetOptBox
-
panelnodeOpt
-
changedNode
-
editMode
-
curNode
-
nodeAddress
-
nodeType
-
bitsPerCard
-
receiveDelay
-
pulseWidth
-
num2LSearchLights
-
numCards
-
cpNodeOnboard
-
osNodeOnboard
-
errorInStatus1
-
errorInStatus2
-
editStatus1
-
editStatus2
-
editStatus3
-
addStatus1
-
addStatus2
-
addStatus3
-
delStatus1
-
delStatus2
-
delStatus3
-
nodeDescText
-
deleteNodeAddress
-
nodeOptHandler
jmri.jmrix.cmri.serial.nodeconfigmanager.NodeConfigManagerFrame.HandlerClass nodeOptHandler -
cbx_cmrinetopt_AUTOPOLL
-
cbx_cmrinetopt_USECMRIX
-
cbx_cmrinetopt_USEBCC
-
cbx_cmrinetopt_BIT8
-
cbx_cmrinetopt_BIT15
-
cbx_cpnodeopt_SENDEOT
-
cbx_cpnodeopt_BIT1
-
cbx_cpnodeopt_BIT2
-
cbx_cpnodeopt_BIT8
-
cbx_cpnodeopt_BIT15
-
-
Constructor Details
-
NodeConfigManagerFrame
Constructor method.- Parameters:
memo- system connection.
-
-
Method Details
-
initComponents
By default, Swing components should be created an installed in this method, rather than in the ctor itself.- Overrides:
initComponentsin classJmriJFrame
-
getSelectedNodeAddr
Get the selected node address from the node table.- Returns:
- selected node ID.
-
doneButtonActionPerformed
Handle the done button click. -
addButtonActionPerformed
-
printButtonActionPerformed
Print.- Parameters:
e- the triggering event
-
editActionSelected
Edit node table selection. -
deleteActionSelected
Handle the delete button click -
infoActionSelected
Handle info action. -
initializeNodes
Method to initialize configured nodes and sets up the node select combo box -
initNodeVariables
-
initNodeConfigWindow
Initialize the node configuration window This window is a template for ADD,EDIT,DELETE node operations -
buttonSet_ADD
-
buttonSet_EDIT
-
buttonSet_DELETE
-
addNodeButtonActionPerformed
-
setupNodeInformationWindow
Load all of the configured node information from the serial node class.- Parameters:
nodeaddr- the node address
-
editNodeButtonActionPerformed
Create and load edit function window.- Parameters:
nodeaddr- the node address
-
updateNodeButtonActionPerformed
Handle update button clicked. -
deleteNodeButtonActionConfirm
Handle delete button pressed. -
deleteNodeButtonActionPerformed
Set up delete node window.- Parameters:
nodeAddr- the node address
-
doneNodeButtonActionPerformed
Handle done button clicked. -
cancelNodeButtonActionPerformed
Handle cancel button clicked. -
windowClosing
Description copied from class:JmriJFrameThe JmriJFrame implementation callsJmriJFrame.handleModified().- Specified by:
windowClosingin interfaceWindowListener- Overrides:
windowClosingin classJmriJFrame
-
setNodeParameters
void setNodeParameters()Set the node parameters by type. Some parameters are specific to a particular node type. -
readReceiveDelay
Read receive delay from window. If an error is detected, a suitable error message is placed in the Notes area.- Returns:
- true if successful; false otherwise
-
readPulseWidth
Read pulse width from window. If an error is detected, a suitable error message is placed in the Notes area.- Returns:
- true if successful; false otherwise
-
checkConsistency
Check for consistency errors by node type. If an error is detected, a suitable error message is placed in the Notes area.- Returns:
- true if successful; false otherwise
-