Class NceMacroEditPanel
- All Implemented Interfaces:
ImageObserver,MenuContainer,Serializable,EventListener,Accessible,AbstractMRListener,NceListener,NcePanelInterface
Macro addr 0 xC800
Macro addr 1 xC814
Macro addr 2 xC828
Macro addr 3 xC83C
. . . .
Macro addr 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 0xE00-0xEFF, cab address = 0x0E 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:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classNested class to create one of these using old-style defaultsNested classes/interfaces inherited from class javax.swing.JPanel
JPanel.AccessibleJPanelNested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponentNested 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.FlipBufferStrategy -
Field Summary
FieldsModifier and TypeFieldDescription(package private) JTextField(package private) JTextField(package private) JTextField(package private) JTextField(package private) JTextField(package private) JTextField(package private) JTextField(package private) JTextField(package private) JTextField(package private) JTextField(package private) JButton(package private) JCheckBox(package private) JCheckBox(package private) JButton(package private) JButton(package private) JButton(package private) JButton(package private) JButton(package private) JButton(package private) JButton(package private) JButton(package private) JButton(package private) JButton(package private) JButton(package private) JButton(package private) JButton(package private) JButton(package private) JButton(package private) JButton(package private) JButton(package private) JButton(package private) JButton(package private) JButton(package private) JButton(package private) JLabel(package private) JTextField(package private) Thread(package private) JButton(package private) JLabel(package private) JLabel(package private) JLabel(package private) JLabel(package private) JLabel(package private) JLabel(package private) JLabel(package private) JLabel(package private) JLabel(package private) JLabel(package private) JButton(package private) intresponse from read(package private) int[](package private) JButton(package private) JButton(package private) JLabel(package private) JLabel(package private) JLabel(package private) JLabel(package private) JLabel(package private) JLabel(package private) JLabel(package private) JLabel(package private) JLabel(package private) JLabel(package private) JLabel(package private) JLabel(package private) JLabel(package private) JLabel(package private) JLabel(package private) JLabelFields inherited from class javax.swing.JComponent
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOWFields inherited from class java.awt.Component
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTFields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidvoidvoidProvide a help target string which an enclosing frame can provide as a help reference.The minimum frame size for font size 16getTitle()Provide a recommended title for an enclosing frame.void2nd stage of initialization, invoked after the constuctor is complete.voidinitContext(Object context) 3rd stage of initialization, invoked after Swing components exist.voidvoidMethods inherited from class jmri.util.swing.JmriPanel
dispose, getMenus, getWindowInterface, initComponents, isMultipleInstances, setWindowInterfaceMethods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUIMethods 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, updateMethods 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, validateTreeMethods 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 Details
-
nceMemoryThread
-
textMacro
-
textReply
-
macroReply
-
previousButton
-
nextButton
-
getButton
-
saveButton
-
backUpButton
-
restoreButton
-
checkBoxEmpty
-
checkBoxNce
-
macroTextField
-
space2
-
space3
-
space4
-
space15
-
num1
-
textAccy1
-
accyTextField1
-
cmdButton1
-
deleteButton1
-
num2
-
textAccy2
-
accyTextField2
-
cmdButton2
-
deleteButton2
-
num3
-
textAccy3
-
accyTextField3
-
cmdButton3
-
deleteButton3
-
num4
-
textAccy4
-
accyTextField4
-
cmdButton4
-
deleteButton4
-
num5
-
textAccy5
-
accyTextField5
-
cmdButton5
-
deleteButton5
-
num6
-
textAccy6
-
accyTextField6
-
cmdButton6
-
deleteButton6
-
num7
-
textAccy7
-
accyTextField7
-
cmdButton7
-
deleteButton7
-
num8
-
textAccy8
-
accyTextField8
-
cmdButton8
-
deleteButton8
-
num9
-
textAccy9
-
accyTextField9
-
cmdButton9
-
deleteButton9
-
num10
-
textAccy10
-
accyTextField10
-
cmdButton10
-
deleteButton10
-
recChar
int recCharresponse from read -
recChars
int[] recChars
-
-
Constructor Details
-
NceMacroEditPanel
public NceMacroEditPanel()
-
-
Method Details
-
initContext
3rd stage of initialization, invoked after Swing components exist.- Overrides:
initContextin classNcePanel- Parameters:
context- the context that this panel may be initialized with
-
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:
getHelpTargetin classJmriPanel- Returns:
- the target String
-
getTitle
Provide a recommended title for an enclosing frame. -
getMinimumDimension
The minimum frame size for font size 16- Overrides:
getMinimumDimensionin classJmriPanel
-
initComponents
2nd stage of initialization, invoked after the constuctor is complete.This needs to be connected to the initContext() method in implementing classes.
- Specified by:
initComponentsin interfaceNcePanelInterface- Overrides:
initComponentsin classNcePanel- Parameters:
memo- the system connection memo for this connection
-
buttonActionPerformed
-
buttonActionCmdPerformed
-
buttonActionDeletePerformed
-
checkBoxActionPerformed
-
message
- Specified by:
messagein interfaceNceListener
-
reply
- Specified by:
replyin interfaceNceListener
-