|
||||||||||
| 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.jmrit.symbolicprog.tabbedframe.PaneProgFrame
public abstract class PaneProgFrame
Frame providing a command station programmer from decoder definition files.
| 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.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| Nested classes/interfaces inherited from interface jmri.util.swing.WindowInterface |
|---|
WindowInterface.Hint |
| Field Summary | |
|---|---|
(package private) FunctionLabelPane |
_flPane
|
(package private) boolean |
_opsMode
|
(package private) PaneProgPane |
_programmingPane
|
(package private) boolean |
_read
|
(package private) RosterMediaPane |
_rMPane
|
(package private) RosterEntry |
_rosterEntry
|
(package private) RosterEntryPane |
_rPane
|
(package private) List<JComponent> |
activeComponents
|
(package private) VariableValue |
addMode
|
(package private) CvTableModel |
cvModel
|
(package private) ShutDownTask |
decoderDirtyTask
|
(package private) org.jdom.Element |
decoderRoot
|
(package private) int[] |
defaultCvNumbers
|
(package private) int[] |
defaultCvValues
|
(package private) int[] |
defaultIndexedCvValues
|
(package private) VariableValue |
extendAddr
|
(package private) ShutDownTask |
fileDirtyTask
|
(package private) String |
filename
|
(package private) BusyGlassPane |
glassPane
|
(package private) IndexedCvTableModel |
iCvModel
|
(package private) boolean |
justChanges
|
(package private) ItemListener |
l1
|
(package private) ItemListener |
l2
|
(package private) ItemListener |
l3
|
(package private) ItemListener |
l4
|
(package private) static org.slf4j.Logger |
log
|
(package private) org.jdom.Element |
modelElem
Data element holding the 'model' element representing the decoder type |
(package private) JPanel |
modePane
|
(package private) Programmer |
mProgrammer
|
(package private) List<JPanel> |
paneList
|
(package private) int |
paneListIndex
|
(package private) VariableValue |
primaryAddr
|
(package private) org.jdom.Element |
programmerRoot
|
(package private) JLabel |
progStatus
|
(package private) JToggleButton |
readAllButton
|
(package private) JToggleButton |
readChangesButton
|
(package private) JMenu |
resetMenu
|
(package private) ResetTableModel |
resetModel
|
(package private) static boolean |
showEmptyPanes
|
(package private) JTabbedPane |
tabPane
|
(package private) VariableTableModel |
variableModel
|
(package private) JToggleButton |
writeAllButton
|
(package private) JToggleButton |
writeChangesButton
|
| Fields inherited from class jmri.util.JmriJFrame |
|---|
allowInFrameServlet, properties, reuseFrameSavedPosition, reuseFrameSavedSized, windowInterface |
| 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 | |
|---|---|
PaneProgFrame(DecoderFile pDecoderFile,
RosterEntry pRosterEntry,
String pFrameTitle,
String pProgrammerFile,
Programmer pProg,
boolean opsMode)
Initialization sequence: Ask the RosterEntry to read its contents If the decoder file is specified, open and load it, otherwise get the decoder filename from the RosterEntry and load that. |
|
| Method Summary | |
|---|---|
(package private) void |
addHelp()
|
protected boolean |
checkDirtyDecoder()
|
protected boolean |
checkDirtyFile()
|
void |
dispose()
local dispose, which also invokes parent. |
(package private) boolean |
doRead()
|
(package private) boolean |
doWrite()
|
void |
enableButtons(boolean stat)
Enable the read/write buttons. |
(package private) void |
enableReadButtons()
Enable the read all and read changes button if possible. |
BusyGlassPane |
getBusyGlassPane()
|
Dimension |
getMaximumSize()
Provide a maximum frame size that is limited to what can fit on the screen after toolbars, etc are deducted. |
protected abstract JPanel |
getModePane()
Abstract method to provide a JPanel setting the programming mode, if appropriate. |
List<JPanel> |
getPaneList()
|
Dimension |
getPreferredSize()
The preferred size must fit on the physical screen, so calculate the lesser of either the preferred size from the layout or the screen size. |
RosterEntry |
getRosterEntry()
|
static boolean |
getShowEmptyPanes()
|
protected void |
handleDirtyFile()
|
protected void |
installComponents()
|
boolean |
isBusy()
|
protected void |
loadDecoderFile(DecoderFile df,
RosterEntry re)
|
protected void |
loadDecoderFromLoco(RosterEntry r)
|
protected void |
loadProgrammerFile(RosterEntry r)
|
protected JPanel |
makeFunctionLabelPane(RosterEntry r)
|
protected JPanel |
makeInfoPane(RosterEntry r)
|
protected JPanel |
makeMediaPane(RosterEntry r)
|
void |
newPane(String name,
org.jdom.Element pane,
org.jdom.Element modelElem,
boolean enableEmpty)
|
void |
paneFinished()
|
void |
prepGlassPane(AbstractButton activeButton)
|
void |
printPanes(boolean preview)
|
void |
propertyChange(PropertyChangeEvent e)
get notification of a variable property change in the pane, specifically "busy" going to false at the end of a programming operation |
boolean |
readAll()
invoked by "Read All" button, this sets in motion a continuing sequence of "read all" operations on the panes. |
boolean |
readChanges()
invoked by "Read Changes" button, this sets in motion a continuing sequence of "read changes" operations on the panes. |
(package private) void |
readConfig(org.jdom.Element root,
RosterEntry r)
|
protected void |
resetToDefaults()
reset all CV values to defaults stored earlier. |
protected void |
saveDefaults()
Save all CV values. |
static void |
setShowEmptyPanes(boolean yes)
Option to control appearance of empty panes |
boolean |
storeFile()
Store the locomotives information in the roster (and a RosterEntry file). |
(package private) void |
updateDccAddress()
|
void |
windowClosing(WindowEvent e)
Close box has been clicked; handle check for dirty with respect to decoder or file, then close. |
boolean |
writeAll()
invoked by "Write All" button, this sets in motion a continuing sequence of "write all" operations on each pane. |
boolean |
writeChanges()
invoked by "Write Changes" button, this sets in motion a continuing sequence of "write changes" operations on each pane. |
| Methods inherited from class java.awt.Frame |
|---|
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, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.awt.MenuContainer |
|---|
getFont, postEvent |
| Field Detail |
|---|
JLabel progStatus
CvTableModel cvModel
IndexedCvTableModel iCvModel
VariableTableModel variableModel
ResetTableModel resetModel
JMenu resetMenu
Programmer mProgrammer
JPanel modePane
boolean _opsMode
RosterEntry _rosterEntry
RosterEntryPane _rPane
FunctionLabelPane _flPane
RosterMediaPane _rMPane
List<JPanel> paneList
int paneListIndex
BusyGlassPane glassPane
List<JComponent> activeComponents
String filename
JTabbedPane tabPane
JToggleButton readChangesButton
JToggleButton writeChangesButton
JToggleButton readAllButton
JToggleButton writeAllButton
ItemListener l1
ItemListener l2
ItemListener l3
ItemListener l4
ShutDownTask decoderDirtyTask
ShutDownTask fileDirtyTask
org.jdom.Element modelElem
org.jdom.Element decoderRoot
org.jdom.Element programmerRoot
int[] defaultCvValues
int[] defaultCvNumbers
int[] defaultIndexedCvValues
VariableValue primaryAddr
VariableValue extendAddr
VariableValue addMode
boolean justChanges
boolean _read
PaneProgPane _programmingPane
static boolean showEmptyPanes
static org.slf4j.Logger log
| Constructor Detail |
|---|
public PaneProgFrame(DecoderFile pDecoderFile,
RosterEntry pRosterEntry,
String pFrameTitle,
String pProgrammerFile,
Programmer pProg,
boolean opsMode)
pDecoderFile - XML file defining the decoder contentspRosterEntry - RosterEntry for information on this locomotivepFrameTitle - Name/title for the framepProgrammerFile - Name of the programmer file to usepProg - Programmer object to be used to access CVs| Method Detail |
|---|
protected abstract JPanel getModePane()
protected void installComponents()
public List<JPanel> getPaneList()
void addHelp()
public Dimension getPreferredSize()
JmriJFrame
getPreferredSize in class JmriJFramepublic Dimension getMaximumSize()
JmriJFrameSome of the methods used here return null pointers on some Java implementations, however, so this will return the superclasses's maximum size if the algorithm used here fails.
getMaximumSize in class JmriJFramevoid enableReadButtons()
protected void loadDecoderFromLoco(RosterEntry r)
protected void loadDecoderFile(DecoderFile df,
RosterEntry re)
protected void loadProgrammerFile(RosterEntry r)
protected boolean checkDirtyDecoder()
protected boolean checkDirtyFile()
protected void handleDirtyFile()
public void windowClosing(WindowEvent e)
windowClosing in interface WindowListenerwindowClosing in class JmriJFramee - Not used
void readConfig(org.jdom.Element root,
RosterEntry r)
protected void resetToDefaults()
protected void saveDefaults()
protected JPanel makeInfoPane(RosterEntry r)
protected JPanel makeFunctionLabelPane(RosterEntry r)
protected JPanel makeMediaPane(RosterEntry r)
void updateDccAddress()
public void newPane(String name,
org.jdom.Element pane,
org.jdom.Element modelElem,
boolean enableEmpty)
public BusyGlassPane getBusyGlassPane()
getBusyGlassPane in interface PaneContainerpublic void prepGlassPane(AbstractButton activeButton)
prepGlassPane in interface PaneContainerpublic void paneFinished()
paneFinished in interface PaneContainerpublic void enableButtons(boolean stat)
In addition, if a programming mode pane is present, it's "set" button is enabled.
enableButtons in interface PaneContainerstat - Are reads possible? If false, so not enable
the read buttons.public boolean isBusy()
isBusy in interface PaneContainerpublic boolean readChanges()
public boolean readAll()
boolean doRead()
public boolean writeAll()
public boolean writeChanges()
boolean doWrite()
public void printPanes(boolean preview)
public void propertyChange(PropertyChangeEvent e)
propertyChange in interface PropertyChangeListenere - Event, used to find sourcepublic boolean storeFile()
public void dispose()
dispose in interface WindowInterfacedispose in class JmriJFramepublic static void setShowEmptyPanes(boolean yes)
public static boolean getShowEmptyPanes()
public RosterEntry getRosterEntry()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||