|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
jmri.util.swing.JmriPanel
jmri.jmrix.nce.swing.NcePanel
jmri.jmrix.nce.macro.NceMacroEditPanel
public class NceMacroEditPanel
Frame for user edit of NCE macros NCE macros are stored in Command Station (CS) memory starting at address xC800. 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 defination 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
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.swing.JPanel |
|---|
JPanel.AccessibleJPanel |
| Nested classes/interfaces inherited from class javax.swing.JComponent |
|---|
JComponent.AccessibleJComponent |
| Nested classes/interfaces inherited from class java.awt.Container |
|---|
Container.AccessibleAWTContainer |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary | |
|---|---|
static int |
CS_MACRO_MEM
|
| Fields inherited from class jmri.jmrix.nce.swing.NcePanel |
|---|
memo |
| Fields inherited from class javax.swing.JComponent |
|---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
| Fields inherited from class java.awt.Component |
|---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
NceMacroEditPanel()
|
|
| Method Summary | |
|---|---|
void |
buttonActionCmdPerformed(ActionEvent ae)
|
void |
buttonActionDeletePerformed(ActionEvent ae)
|
void |
buttonActionPerformed(ActionEvent ae)
|
void |
checkBoxActionPerformed(ActionEvent ae)
|
String |
getHelpTarget()
Provide a help target string which an enclosing frame can provide as a help reference. |
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(Object context)
3rd stage of initialization, invoked after Swing components exist. |
void |
message(NceMessage m)
|
void |
reply(NceReply r)
|
| Methods inherited from class jmri.util.swing.JmriPanel |
|---|
dispose, getMenus, getWindowInterface, initComponents, isMultipleInstances, setWindowInterface |
| Methods inherited from class javax.swing.JPanel |
|---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int CS_MACRO_MEM
| Constructor Detail |
|---|
public NceMacroEditPanel()
| Method Detail |
|---|
public void initContext(Object context)
throws Exception
JmriPanel
initContext in class NcePanelExceptionpublic String getHelpTarget()
JmriPanel
getHelpTarget in class JmriPanelpublic String getTitle()
JmriPanel
getTitle in class JmriPanel
public void initComponents(NceSystemConnectionMemo memo)
throws Exception
NcePanelInterfaceThis needs to be connected to the initContext() method in implementing classes.
initComponents in interface NcePanelInterfaceinitComponents in class NcePanelExceptionpublic void buttonActionPerformed(ActionEvent ae)
public void buttonActionCmdPerformed(ActionEvent ae)
public void buttonActionDeletePerformed(ActionEvent ae)
public void checkBoxActionPerformed(ActionEvent ae)
public void message(NceMessage m)
message in interface NceListenerpublic void reply(NceReply r)
reply in interface NceListener
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||