Class NceMacroEditPanel

  • All Implemented Interfaces:
    java.awt.image.ImageObserver, java.awt.MenuContainer,, java.util.EventListener, javax.accessibility.Accessible, AbstractMRListener, NceListener, NcePanelInterface

    public class NceMacroEditPanel
    extends NcePanel
    implements NceListener
    Frame for user edit of NCE macros NCE macros are stored in Command Station (CS) memory starting at address xC800 (PH5 0x6000). Each macro consists of 20 bytes. The last macro 255 is at address xDBEC. Macro addr 0 xC800 1 xC814 2 xC828 3 xC83C . . . . 255 xDBEC Each macro can close or throw up to ten accessories. Macros can also be linked together. Two bytes (16 bit word) define an accessory address and command, or the address of the next macro to be executed. If the upper byte of the macro data word is xFF, then the next byte contains the address of the next macro to be executed by the NCE CS. For example, xFF08 means link to macro 8. NCE uses the NMRA DCC accessory decoder packet format for the word definition of their macros. Macro data byte: bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 _ _ _ _ 1 0 A A A A A A 1 A A A C D D D addr bit 7 6 5 4 3 2 10 9 8 1 0 turnout T By convention, MSB address bits 10 - 8 are one's complement. NCE macros always set the C bit to 1. The LSB "D" (0) determines if the accessory is to be thrown (0) or closed (1). The next two bits "D D" are the LSBs of the accessory address. Note that NCE display addresses are 1 greater than NMRA DCC. Note that address bit 2 isn't supposed to be inverted, but it is the way NCE implemented their macros. Examples: 81F8 = accessory 1 thrown 9FFC = accessory 123 thrown B5FD = accessory 211 close BF8F = accessory 2044 close FF10 = link macro 16 Updated for including the USB 7.* for 1.65 command station Variables found on cab context page 14 (Cab address 14) ;macro table MACRO_TBL ;table of macros, 16 entries of 16 bytes organized as: ; macro 0, high byte, low byte - 7 more times (8 accy commands total) ; macro 1, high byte, low byte - 7 more times (8 accy commands total) ; ; macro 16, high byte, low byte - 7 more times (8 accy commands total)
    See Also:
    Serialized Form
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  NceMacroEditPanel.Default
      Nested class to create one of these using old-style defaults
      • Nested classes/interfaces inherited from class javax.swing.JPanel

      • Nested classes/interfaces inherited from class javax.swing.JComponent

      • Nested classes/interfaces inherited from class java.awt.Container

      • Nested classes/interfaces inherited from class java.awt.Component

        java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
    • Field Summary

      Modifier and Type Field Description
      (package private) javax.swing.JTextField accyTextField1  
      (package private) javax.swing.JTextField accyTextField10  
      (package private) javax.swing.JTextField accyTextField2  
      (package private) javax.swing.JTextField accyTextField3  
      (package private) javax.swing.JTextField accyTextField4  
      (package private) javax.swing.JTextField accyTextField5  
      (package private) javax.swing.JTextField accyTextField6  
      (package private) javax.swing.JTextField accyTextField7  
      (package private) javax.swing.JTextField accyTextField8  
      (package private) javax.swing.JTextField accyTextField9  
      (package private) javax.swing.JButton backUpButton  
      (package private) javax.swing.JCheckBox checkBoxEmpty  
      (package private) javax.swing.JCheckBox checkBoxNce  
      (package private) javax.swing.JButton cmdButton1  
      (package private) javax.swing.JButton cmdButton10  
      (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.JButton cmdButton7  
      (package private) javax.swing.JButton cmdButton8  
      (package private) javax.swing.JButton cmdButton9  
      (package private) javax.swing.JButton deleteButton1  
      (package private) javax.swing.JButton deleteButton10  
      (package private) javax.swing.JButton deleteButton2  
      (package private) javax.swing.JButton deleteButton3  
      (package private) javax.swing.JButton deleteButton4  
      (package private) javax.swing.JButton deleteButton5  
      (package private) javax.swing.JButton deleteButton6  
      (package private) javax.swing.JButton deleteButton7  
      (package private) javax.swing.JButton deleteButton8  
      (package private) javax.swing.JButton deleteButton9  
      (package private) javax.swing.JButton getButton  
      (package private) javax.swing.JLabel macroReply  
      (package private) javax.swing.JTextField macroTextField  
      (package private) java.lang.Thread nceMemoryThread  
      (package private) javax.swing.JButton nextButton  
      (package private) javax.swing.JLabel num1  
      (package private) javax.swing.JLabel num10  
      (package private) javax.swing.JLabel num2  
      (package private) javax.swing.JLabel num3  
      (package private) javax.swing.JLabel num4  
      (package private) javax.swing.JLabel num5  
      (package private) javax.swing.JLabel num6  
      (package private) javax.swing.JLabel num7  
      (package private) javax.swing.JLabel num8  
      (package private) javax.swing.JLabel num9  
      (package private) javax.swing.JButton previousButton  
      (package private) int recChar
      response from read
      (package private) int[] recChars  
      (package private) javax.swing.JButton restoreButton  
      (package private) javax.swing.JButton saveButton  
      (package private) javax.swing.JLabel space15  
      (package private) javax.swing.JLabel space2  
      (package private) javax.swing.JLabel space3  
      (package private) javax.swing.JLabel space4  
      (package private) javax.swing.JLabel textAccy1  
      (package private) javax.swing.JLabel textAccy10  
      (package private) javax.swing.JLabel textAccy2  
      (package private) javax.swing.JLabel textAccy3  
      (package private) javax.swing.JLabel textAccy4  
      (package private) javax.swing.JLabel textAccy5  
      (package private) javax.swing.JLabel textAccy6  
      (package private) javax.swing.JLabel textAccy7  
      (package private) javax.swing.JLabel textAccy8  
      (package private) javax.swing.JLabel textAccy9  
      (package private) javax.swing.JLabel textMacro  
      (package private) javax.swing.JLabel textReply  
      • Fields inherited from class jmri.jmrix.nce.swing.NcePanel

      • Fields inherited from class javax.swing.JComponent

      • Fields inherited from class java.awt.Component

      • Fields inherited from interface java.awt.image.ImageObserver

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void buttonActionCmdPerformed​(java.awt.event.ActionEvent ae)  
      void buttonActionDeletePerformed​(java.awt.event.ActionEvent ae)  
      void buttonActionPerformed​(java.awt.event.ActionEvent ae)  
      void checkBoxActionPerformed​(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.lang.String getTitle()
      Provide a recommended title for an enclosing frame.
      void initComponents​(NceSystemConnectionMemo memo)
      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 message​(NceMessage m)  
      void reply​(NceReply r)  
      • 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
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait