|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
java.awt.Window
java.awt.Frame
javax.swing.JFrame
jmri.util.JmriJFrame
jmri.jmrix.loconet.AbstractBoardProgFrame
public abstract class AbstractBoardProgFrame
Display and modify an Digitrax board configuration.
The read and write require a sequence of operations, which we handle with a state variable.
Programming of the board is done via configuration messages, so the board should not be put into programming mode via the built-in pushbutton while this tool is in use.
Throughout, the terminology is "closed" == true, "thrown" == false. Variables are named for their closed state.
Some of the message formats used in this class are Copyright Digitrax, Inc. and used with permission as part of the JMRI project. That permission does not extend to uses in other software products. If you wish to use this code, algorithm or these message formats outside of JMRI, please contact Digitrax Inc for separate permission.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.swing.JFrame |
|---|
JFrame.AccessibleJFrame |
| Nested classes/interfaces inherited from class java.awt.Frame |
|---|
Frame.AccessibleAWTFrame |
| Nested classes/interfaces inherited from class java.awt.Window |
|---|
Window.AccessibleAWTWindow |
| Nested classes/interfaces inherited from class java.awt.Container |
|---|
Container.AccessibleAWTContainer |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary | |
|---|---|
protected boolean[] |
opsw
True is "closed", false is "thrown". |
| Fields inherited from class javax.swing.JFrame |
|---|
accessibleContext, EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabled |
| Fields 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_CURSOR |
| Fields inherited from class java.awt.Component |
|---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface javax.swing.WindowConstants |
|---|
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
protected |
AbstractBoardProgFrame(String title)
|
| Method Summary | |
|---|---|
protected void |
appendLine(JComponent c)
Handle layout details during construction. |
protected abstract void |
copyToOpsw()
Copy from the GUI to the opsw array. |
void |
dispose()
When window is finally destroyed, remove it from the list of windows. |
void |
message(LocoNetMessage m)
Member function that will be invoked by a LocoNetInterface implementation to forward a LocoNet message from the layout. |
protected abstract int |
nextState(int state)
Specify which opsw (and which sequence) need to be read/written |
protected JPanel |
provideAddressing(String type)
Provide read, write buttons and address |
protected JComponent |
provideStatusLine()
provide the status line for the GUI |
protected void |
setStatus(String msg)
|
protected void |
setTypeWord(int type)
Configure the type word in the LocoNet messages. |
protected abstract void |
updateDisplay()
|
| Methods inherited from class jmri.util.JmriJFrame |
|---|
addHelpMenu, addNotify, getFrame, getFrameList, getMaximumSize, getModifiedFlag, getPreferredSize, handleModified, initComponents, markWindowModified, setModifiedFlag, setShutDownTask, storeValues, windowActivated, windowClosed, windowClosing, windowDeactivated, windowDeiconified, windowIconified, windowOpened |
| Methods inherited from class java.awt.Frame |
|---|
finalize, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setResizable, setState, setTitle, setUndecorated |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.awt.MenuContainer |
|---|
getFont, postEvent |
| Field Detail |
|---|
protected boolean[] opsw
| Constructor Detail |
|---|
protected AbstractBoardProgFrame(String title)
| Method Detail |
|---|
protected JPanel provideAddressing(String type)
protected JComponent provideStatusLine()
protected void setStatus(String msg)
protected void appendLine(JComponent c)
c - component to put on a single lineprotected void setTypeWord(int type)
Known values:
protected abstract void copyToOpsw()
Used before write operations start
protected abstract void updateDisplay()
protected abstract int nextState(int state)
public void message(LocoNetMessage m)
LocoNetListener
message in interface LocoNetListenerm - The received LocoNet message. Note that this same object
may be presented to multiple users. It should not be
modified here.public void dispose()
JmriJFrameSubclasses that over-ride this method must invoke this implementation with super.dispose()
dispose in class JmriJFrame
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||