|
||||||||||
| 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 |
| Field Summary |
|---|
| Fields inherited from class jmri.util.JmriJFrame |
|---|
reuseFrameSavedPosition, reuseFrameSavedSized |
| 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 | |
|---|---|
protected boolean |
checkDirtyDecoder()
|
protected boolean |
checkDirtyFile()
|
void |
dispose()
local dispose, which also invokes parent. |
void |
doPrintPanes(boolean preview)
|
void |
enableButtons(boolean stat)
Enable the read/write buttons. |
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,
Element pane,
Element modelElem,
boolean enableEmpty)
|
void |
paneFinished()
|
void |
prepGlassPane(AbstractButton activeButton)
|
void |
printInfoSection(HardcopyWriter w)
|
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. |
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). |
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 |
| 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()
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 JmriJFrameprotected 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 usedprotected void resetToDefaults()
protected void saveDefaults()
protected JPanel makeInfoPane(RosterEntry r)
protected JPanel makeFunctionLabelPane(RosterEntry r)
protected JPanel makeMediaPane(RosterEntry r)
public void newPane(String name,
Element pane,
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()
public boolean writeAll()
public boolean writeChanges()
public void doPrintPanes(boolean preview)
public void printPanes(boolean preview)
public void printInfoSection(HardcopyWriter w)
public void propertyChange(PropertyChangeEvent e)
propertyChange in interface PropertyChangeListenere - Event, used to find sourcepublic boolean storeFile()
public void dispose()
dispose 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 | |||||||||