Package jmri.jmrix.nce.consist
Class NceConsistEditPanel
- java.lang.Object
-
- java.awt.Component
-
- java.awt.Container
-
- javax.swing.JComponent
-
- javax.swing.JPanel
-
- jmri.util.swing.JmriPanel
-
- jmri.jmrix.nce.swing.NcePanel
-
- jmri.jmrix.nce.consist.NceConsistEditPanel
-
- All Implemented Interfaces:
java.awt.image.ImageObserver
,java.awt.MenuContainer
,java.io.Serializable
,java.util.EventListener
,javax.accessibility.Accessible
,AbstractMRListener
,NceListener
,NcePanelInterface
public class NceConsistEditPanel extends NcePanel implements NceListener
Pane for user edit of NCE Consists NCE Consists are stored in Command Station (CS) memory starting at address xF500 and ending xFAFF (PH5 0x4E00 - 0x53FF). NCE supports up to 127 consists, numbered 1 to 127. They track the lead loco, rear loco, and four mid locos in the consist file. NCE cabs start at consist 127 when building and reviewing consists, so we also start with 127. Consist lead locos are stored in memory locations xF500 through xF5FF (PH5 0x4E00 - 0x4EFF). Consist rear locos are stored in memory locations xF600 through xF6FF (PH5 0x4F00 - 0x4FFF). Mid consist locos (four max) are stored in memory locations xF700 through xFAFF (PH5 0x500 - 0x53FF). If a long address is in use, bits 6 and 7 of the high byte are set. Example: Long address 3 = 0xc0 0x03 Short address 3 = 0x00 0x03 NCE file format: :F500 (con 0 lead loco) (con 1 lead loco) ....... (con 7 lead loco) :F510 (con 8 lead loco) ........ (con 15 lead loco) . . :F5F0 (con 120 lead loco) ..... (con 127 lead loco) :F600 (con 0 rear loco) (con 1 rear loco) ....... (con 7 rear loco) . . :F6F0 (con 120 rear loco) ..... (con 127 rear loco) :F700 (con 0 mid loco1) (con 0 mid loco2) (con 0 mid loco3) (con 0 mid loco4) . . :FAF0 (con 126 mid loco1) .. (con 126 mid loco4)(con 127 mid loco1) .. (con 127 mid loco4) :0000- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
NceConsistEditPanel.Default
Nested class to create one of these using old-style defaults-
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
adrButton1
(package private) javax.swing.JButton
adrButton2
(package private) javax.swing.JButton
adrButton3
(package private) javax.swing.JButton
adrButton4
(package private) javax.swing.JButton
adrButton5
(package private) javax.swing.JButton
adrButton6
(package private) javax.swing.JButton
backUpButton
(package private) javax.swing.JCheckBox
checkBoxConsist
(package private) javax.swing.JCheckBox
checkBoxEmpty
(package private) javax.swing.JCheckBox
checkBoxVerify
(package private) javax.swing.JButton
clearCancelButton
(package private) javax.swing.JButton
cmdButton1
(package private) javax.swing.JButton
cmdButton2
(package private) javax.swing.JButton
cmdButton3
(package private) javax.swing.JButton
cmdButton4
(package private) javax.swing.JButton
cmdButton5
(package private) javax.swing.JButton
cmdButton6
(package private) javax.swing.JComboBox<java.lang.String>
conRosterBox
protected java.util.List<NceConsistRosterEntry>
consistList
(package private) java.awt.event.ActionListener
consistRosterListener
(package private) javax.swing.JLabel
consistStatus
(package private) javax.swing.JTextField
consistTextField
(package private) javax.swing.JButton
deleteButton
(package private) javax.swing.JButton
dirButton1
(package private) javax.swing.JButton
dirButton2
(package private) javax.swing.JButton
dirButton3
(package private) javax.swing.JButton
dirButton4
(package private) javax.swing.JButton
dirButton5
(package private) javax.swing.JButton
dirButton6
(package private) javax.swing.JButton
getButton
(package private) javax.swing.JComboBox<java.lang.Object>
locoRosterBox1
(package private) javax.swing.JComboBox<java.lang.Object>
locoRosterBox2
(package private) javax.swing.JComboBox<java.lang.Object>
locoRosterBox3
(package private) javax.swing.JComboBox<java.lang.Object>
locoRosterBox4
(package private) javax.swing.JComboBox<java.lang.Object>
locoRosterBox5
(package private) javax.swing.JComboBox<java.lang.Object>
locoRosterBox6
(package private) javax.swing.JTextField
locoTextField1
(package private) javax.swing.JTextField
locoTextField2
(package private) javax.swing.JTextField
locoTextField3
(package private) javax.swing.JTextField
locoTextField4
(package private) javax.swing.JTextField
locoTextField5
(package private) javax.swing.JTextField
locoTextField6
(package private) NceConsistRoster
nceConsistRoster
(package private) NceConsistRosterEntry
nceConsistRosterEntry
(package private) javax.swing.JButton
nextButton
(package private) javax.swing.JButton
previousButton
(package private) javax.swing.JButton
restoreButton
(package private) javax.swing.JButton
saveLoadButton
(package private) javax.swing.JLabel
space1
(package private) javax.swing.JLabel
space15
(package private) javax.swing.JLabel
space2
(package private) javax.swing.JLabel
space3a
(package private) javax.swing.JLabel
space3b
(package private) javax.swing.JLabel
space3c
(package private) javax.swing.JLabel
space3d
(package private) javax.swing.JLabel
textAddress
(package private) javax.swing.JLabel
textAddrType
(package private) javax.swing.JLabel
textConModel
(package private) javax.swing.JLabel
textConRoadName
(package private) javax.swing.JLabel
textConRoadNumber
(package private) javax.swing.JLabel
textConRoster
(package private) javax.swing.JLabel
textConsist
(package private) javax.swing.JLabel
textDirection
(package private) javax.swing.JLabel
textLoco1
(package private) javax.swing.JLabel
textLoco2
(package private) javax.swing.JLabel
textLoco3
(package private) javax.swing.JLabel
textLoco4
(package private) javax.swing.JLabel
textLoco5
(package private) javax.swing.JLabel
textLoco6
(package private) javax.swing.JLabel
textLocomotive
(package private) javax.swing.JLabel
textRoster
(package private) javax.swing.JLabel
textStatus
(package private) javax.swing.JButton
throttleButton
-
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 NceConsistEditPanel()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
buttonActionAdrPerformed(java.awt.event.ActionEvent ae)
void
buttonActionCmdPerformed(java.awt.event.ActionEvent ae)
void
buttonActionDirPerformed(java.awt.event.ActionEvent ae)
void
buttonActionPerformed(java.awt.event.ActionEvent ae)
void
checkBoxActionPerformed(java.awt.event.ActionEvent ae)
void
consistRosterSelected(java.awt.event.ActionEvent ae)
java.lang.String
getHelpTarget()
Provide a help target string which an enclosing frame can provide as a help reference.java.util.List<javax.swing.JMenu>
getMenus()
Provide menu items to add to a menu bar.java.awt.Dimension
getMinimumDimension()
The minimum frame size for font size 16java.lang.String
getTitle()
Provide a recommended title for an enclosing frame.void
initComponents(NceSystemConnectionMemo m)
2nd stage of initialization, invoked after the constuctor is complete.void
initContext(java.lang.Object context)
3rd stage of initialization, invoked after Swing components exist.void
locoSelected(java.awt.event.ActionEvent ae)
void
message(NceMessage m)
void
reply(NceReply nceReply)
void
reportError()
-
Methods inherited from class jmri.util.swing.JmriPanel
dispose, getWindowInterface, initComponents, isMultipleInstances, setWindowInterface
-
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
-
nceConsistRoster
NceConsistRoster nceConsistRoster
-
textConsist
javax.swing.JLabel textConsist
-
textStatus
javax.swing.JLabel textStatus
-
consistStatus
javax.swing.JLabel consistStatus
-
previousButton
javax.swing.JButton previousButton
-
nextButton
javax.swing.JButton nextButton
-
getButton
javax.swing.JButton getButton
-
throttleButton
javax.swing.JButton throttleButton
-
clearCancelButton
javax.swing.JButton clearCancelButton
-
saveLoadButton
javax.swing.JButton saveLoadButton
-
deleteButton
javax.swing.JButton deleteButton
-
backUpButton
javax.swing.JButton backUpButton
-
restoreButton
javax.swing.JButton restoreButton
-
checkBoxEmpty
javax.swing.JCheckBox checkBoxEmpty
-
checkBoxVerify
javax.swing.JCheckBox checkBoxVerify
-
checkBoxConsist
javax.swing.JCheckBox checkBoxConsist
-
consistTextField
javax.swing.JTextField consistTextField
-
textLocomotive
javax.swing.JLabel textLocomotive
-
textRoster
javax.swing.JLabel textRoster
-
textAddress
javax.swing.JLabel textAddress
-
textAddrType
javax.swing.JLabel textAddrType
-
textDirection
javax.swing.JLabel textDirection
-
textConRoster
javax.swing.JLabel textConRoster
-
textConRoadName
javax.swing.JLabel textConRoadName
-
textConRoadNumber
javax.swing.JLabel textConRoadNumber
-
textConModel
javax.swing.JLabel textConModel
-
conRosterBox
javax.swing.JComboBox<java.lang.String> conRosterBox
-
space1
javax.swing.JLabel space1
-
space2
javax.swing.JLabel space2
-
space3a
javax.swing.JLabel space3a
-
space3b
javax.swing.JLabel space3b
-
space3c
javax.swing.JLabel space3c
-
space3d
javax.swing.JLabel space3d
-
space15
javax.swing.JLabel space15
-
textLoco1
javax.swing.JLabel textLoco1
-
locoTextField1
javax.swing.JTextField locoTextField1
-
locoRosterBox1
javax.swing.JComboBox<java.lang.Object> locoRosterBox1
-
adrButton1
javax.swing.JButton adrButton1
-
cmdButton1
javax.swing.JButton cmdButton1
-
dirButton1
javax.swing.JButton dirButton1
-
textLoco2
javax.swing.JLabel textLoco2
-
locoTextField2
javax.swing.JTextField locoTextField2
-
locoRosterBox2
javax.swing.JComboBox<java.lang.Object> locoRosterBox2
-
adrButton2
javax.swing.JButton adrButton2
-
cmdButton2
javax.swing.JButton cmdButton2
-
dirButton2
javax.swing.JButton dirButton2
-
textLoco3
javax.swing.JLabel textLoco3
-
locoTextField3
javax.swing.JTextField locoTextField3
-
locoRosterBox3
javax.swing.JComboBox<java.lang.Object> locoRosterBox3
-
adrButton3
javax.swing.JButton adrButton3
-
cmdButton3
javax.swing.JButton cmdButton3
-
dirButton3
javax.swing.JButton dirButton3
-
textLoco4
javax.swing.JLabel textLoco4
-
locoTextField4
javax.swing.JTextField locoTextField4
-
locoRosterBox4
javax.swing.JComboBox<java.lang.Object> locoRosterBox4
-
adrButton4
javax.swing.JButton adrButton4
-
cmdButton4
javax.swing.JButton cmdButton4
-
dirButton4
javax.swing.JButton dirButton4
-
textLoco5
javax.swing.JLabel textLoco5
-
locoTextField5
javax.swing.JTextField locoTextField5
-
locoRosterBox5
javax.swing.JComboBox<java.lang.Object> locoRosterBox5
-
adrButton5
javax.swing.JButton adrButton5
-
cmdButton5
javax.swing.JButton cmdButton5
-
dirButton5
javax.swing.JButton dirButton5
-
textLoco6
javax.swing.JLabel textLoco6
-
locoTextField6
javax.swing.JTextField locoTextField6
-
locoRosterBox6
javax.swing.JComboBox<java.lang.Object> locoRosterBox6
-
adrButton6
javax.swing.JButton adrButton6
-
cmdButton6
javax.swing.JButton cmdButton6
-
dirButton6
javax.swing.JButton dirButton6
-
nceConsistRosterEntry
NceConsistRosterEntry nceConsistRosterEntry
-
consistList
protected java.util.List<NceConsistRosterEntry> consistList
-
consistRosterListener
java.awt.event.ActionListener consistRosterListener
-
-
Constructor Detail
-
NceConsistEditPanel
public NceConsistEditPanel()
-
-
Method Detail
-
initContext
public void initContext(java.lang.Object context)
3rd stage of initialization, invoked after Swing components exist.- Overrides:
initContext
in classNcePanel
- Parameters:
context
- the context that this panel may be initialized with
-
getHelpTarget
public java.lang.String getHelpTarget()
Provide a help target string which an enclosing frame can provide as a help reference.This automatically provides a reference to the usual place for JMRI window-specific help pages that are named for the implementing class, but note this is a Pane class, not a Frame class.
- Overrides:
getHelpTarget
in classJmriPanel
- Returns:
- the target String
-
getTitle
public java.lang.String getTitle()
Provide a recommended title for an enclosing frame.
-
getMenus
@Nonnull public java.util.List<javax.swing.JMenu> getMenus()
Provide menu items to add to a menu bar.
-
getMinimumDimension
public java.awt.Dimension getMinimumDimension()
The minimum frame size for font size 16- Overrides:
getMinimumDimension
in classJmriPanel
-
initComponents
public void initComponents(NceSystemConnectionMemo m)
2nd stage of initialization, invoked after the constuctor is complete.This needs to be connected to the initContext() method in implementing classes.
- Specified by:
initComponents
in interfaceNcePanelInterface
- Overrides:
initComponents
in classNcePanel
- Parameters:
m
- the system connection memo for this connection
-
buttonActionPerformed
public void buttonActionPerformed(java.awt.event.ActionEvent ae)
-
buttonActionCmdPerformed
public void buttonActionCmdPerformed(java.awt.event.ActionEvent ae)
-
buttonActionAdrPerformed
public void buttonActionAdrPerformed(java.awt.event.ActionEvent ae)
-
buttonActionDirPerformed
public void buttonActionDirPerformed(java.awt.event.ActionEvent ae)
-
locoSelected
public void locoSelected(java.awt.event.ActionEvent ae)
-
consistRosterSelected
public void consistRosterSelected(java.awt.event.ActionEvent ae)
-
checkBoxActionPerformed
public void checkBoxActionPerformed(java.awt.event.ActionEvent ae)
-
message
public void message(NceMessage m)
- Specified by:
message
in interfaceNceListener
-
reply
public void reply(NceReply nceReply)
- Specified by:
reply
in interfaceNceListener
-
reportError
public void reportError()
-
-