Class PaneProgFrame
- java.lang.Object
-
- java.awt.Component
-
- java.awt.Container
-
- java.awt.Window
-
- java.awt.Frame
-
- javax.swing.JFrame
-
- jmri.util.JmriJFrame
-
- jmri.jmrit.symbolicprog.tabbedframe.PaneProgFrame
-
- All Implemented Interfaces:
java.awt.event.ComponentListener
,java.awt.event.WindowListener
,java.awt.image.ImageObserver
,java.awt.MenuContainer
,java.beans.PropertyChangeListener
,java.io.Serializable
,java.util.EventListener
,javax.accessibility.Accessible
,javax.swing.RootPaneContainer
,javax.swing.WindowConstants
,BeanInterface
,PaneContainer
,ModifiedFlag
,WindowInterface
- Direct Known Subclasses:
PaneOpsProgFrame
,PaneServiceProgFrame
public abstract class PaneProgFrame extends JmriJFrame implements java.beans.PropertyChangeListener, PaneContainer
Frame providing a command station programmer from decoder definition files.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static class
PaneProgFrame.SearchPair
-
Nested classes/interfaces inherited from class jmri.util.JmriJFrame
JmriJFrame.ScreenDimensions
-
Nested classes/interfaces inherited from class javax.swing.JFrame
javax.swing.JFrame.AccessibleJFrame
-
Nested classes/interfaces inherited from class java.awt.Window
java.awt.Window.AccessibleAWTWindow, java.awt.Window.Type
-
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
-
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
-
Nested classes/interfaces inherited from interface jmri.util.swing.WindowInterface
WindowInterface.Hint
-
-
Field Summary
Fields Modifier and Type Field Description (package private) FunctionLabelPane
_flPane
(package private) java.lang.String
_frameEntryId
(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) java.util.List<javax.swing.JComponent>
activeComponents
(package private) EnumVariableValue
addMode
(package private) CvTableModel
cvModel
(package private) java.lang.String
decoderAllowResetDefaults
(package private) ShutDownTask
decoderDirtyTask
(package private) java.util.List<org.jdom2.Element>
decoderPaneList
(package private) org.jdom2.Element
decoderRoot
(package private) java.lang.String
decoderShowEmptyPanes
(package private) java.lang.String[]
defaultCvNumbers
(package private) int[]
defaultCvValues
(package private) VariableValue
extendAddr
(package private) java.util.ArrayList<javax.swing.JMenu>
extraMenuList
(package private) java.util.ArrayList<ExtraMenuTableModel>
extraMenuModelList
(package private) ShutDownTask
fileDirtyTask
(package private) java.lang.String
filename
(package private) BusyGlassPane
glassPane
(package private) boolean
justChanges
(package private) java.awt.event.ItemListener
l1
(package private) java.awt.event.ItemListener
l2
(package private) java.awt.event.ItemListener
l3
(package private) java.awt.event.ItemListener
l4
(package private) boolean
longMode
(package private) boolean
maxFnNumDirty
(package private) java.lang.String
maxFnNumNew
(package private) java.lang.String
maxFnNumOld
(package private) javax.swing.JMenuBar
menuBar
(package private) org.jdom2.Element
modelElem
Data element holding the 'model' element representing the decoder type.(package private) Programmer
mProgrammer
(package private) java.lang.String
newAddr
(package private) int
nextSearchTarget
(package private) boolean
noDecoder
(package private) java.util.List<javax.swing.JPanel>
paneList
(package private) int
paneListIndex
(package private) VariableValue
primaryAddr
(package private) org.jdom2.Element
programmerRoot
(package private) java.lang.String
programmerShowEmptyPanes
(package private) javax.swing.JLabel
progStatus
(package private) javax.swing.JToggleButton
readAllButton
(package private) javax.swing.JToggleButton
readChangesButton
(package private) javax.swing.JMenu
resetMenu
(package private) ResetTableModel
resetModel
(package private) SearchBar
searchBar
(package private) java.util.ArrayList<PaneProgFrame.SearchPair>
searchTargetList
(package private) java.lang.String
suppressFunctionLabels
(package private) java.lang.String
suppressRosterMedia
(package private) javax.swing.JTabbedPane
tabPane
(package private) javax.swing.JPanel
tempPane
(package private) VariableTableModel
variableModel
(package private) javax.swing.JToggleButton
writeAllButton
(package private) javax.swing.JToggleButton
writeChangesButton
-
Fields inherited from class jmri.util.JmriJFrame
allowInFrameServlet, properties, reuseFrameSavedPosition, reuseFrameSavedSized, windowInterface
-
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
-
-
Constructor Summary
Constructors Constructor Description PaneProgFrame(DecoderFile pDecoderFile, RosterEntry pRosterEntry, java.lang.String pFrameEntryId, java.lang.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
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description (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] buttons if possible.BusyGlassPane
getBusyGlassPane()
static boolean
getCanCacheDefault()
static boolean
getDoConfirmRead()
FunctionLabelPane
getFnLabelPane()
java.awt.Dimension
getMaximumSize()
Provide a maximum frame size that is limited to what can fit on the screen after toolbars, etc are deducted.protected abstract javax.swing.JPanel
getModePane()
Abstract method to provide a JPanel setting the programming mode, if appropriate.java.util.List<javax.swing.JPanel>
getPaneList()
java.awt.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()
RosterEntryPane
getRosterPane()
static boolean
getShowCvNumbers()
static boolean
getShowEmptyPanes()
Get value of Preference option to show empty panes.protected void
handleDirtyFile()
protected void
installComponents()
boolean
isBusy()
static boolean
isIncludedFE(org.jdom2.Element e, org.jdom2.Element aModelElement, RosterEntry aRosterEntry, java.lang.String extraIncludes, java.lang.String extraExcludes)
Front end to DecoderFile.isIncluded() Retrieves "productID" and "model attributes from the "model" element and "family" attribute from the roster entry.protected void
loadDecoderFile(DecoderFile df, RosterEntry re)
protected void
loadDecoderFromLoco(RosterEntry r)
protected void
loadJPanel(java.awt.Component c, javax.swing.JPanel tab)
protected void
loadProgrammerFile(RosterEntry r)
protected void
loadSearchTargets()
protected javax.swing.JPanel
makeFunctionLabelPane(RosterEntry r)
protected javax.swing.JPanel
makeInfoPane(RosterEntry r)
protected javax.swing.JPanel
makeMediaPane(RosterEntry r)
void
newPane(java.lang.String name, org.jdom2.Element pane, org.jdom2.Element modelElem, boolean enableEmpty, boolean programmerPane)
void
paneFinished()
protected void
pickProgrammerMode(org.jdom2.Element programming)
void
prepGlassPane(javax.swing.AbstractButton activeButton)
Create a BusyGlassPane transparent layer over the panel blocking any other interaction, excluding a supplied button.void
printPanes(boolean preview)
Prepare a roster entry to be printed, and display a selection list.protected void
processModifierElements(org.jdom2.Element e, PaneProgPane pane, VariableTableModel model, javax.swing.JTabbedPane tabPane, int index)
If there are any modifier elements, process them.void
propertyChange(java.beans.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 the "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.jdom2.Element root, RosterEntry r)
protected void
resetToDefaults()
Reset all CV values to defaults stored earlier.protected void
saveDefaults()
Save all CV values.protected void
searchDidNotFind()
protected void
searchGoesTo(PaneProgFrame.SearchPair result)
static void
setCanCacheDefault(boolean yes)
static void
setDoConfirmRead(boolean yes)
(package private) void
setProgrammingGui(javax.swing.JPanel bottom)
(package private) void
setSearchGui(javax.swing.JPanel bottom)
static void
setShowCvNumbers(boolean yes)
Option to control appearance of CV numbers in tool tips.static void
setShowEmptyPanes(boolean yes)
Set value of Preference option to show empty panes.boolean
storeFile()
Store the locomotives information in the roster (and a RosterEntry file).(package private) void
updateDccAddress()
void
windowClosing(java.awt.event.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 jmri.util.JmriJFrame
addHelpMenu, componentHidden, componentMoved, componentResized, componentShown, generateWindowRef, getAllowInFrameServlet, getEscapeKeyAction, getEscapeKeyClosesWindow, getFrame, getFrame, getFrameList, getFrameList, getIndexedProperty, getModifiedFlag, getProperty, getPropertyNames, getSavePosition, getSaveSize, getScreenDimensions, getWindowFrameRef, getWindowInterface, handleModified, hasIndexedProperty, hasProperty, initComponents, makePrivateWindow, markWindowModified, multipleInstances, pack, setAllowInFrameServlet, setEscapeKeyAction, setEscapeKeyClosesWindow, setFrameLocation, setIndexedProperty, setModifiedFlag, setProperty, setSavePosition, setSaveSize, setShutDownTask, setWindowInterface, show, show, storeValues, undecorate, windowActivated, windowClosed, windowDeactivated, windowDeiconified, windowIconified, windowOpened
-
Methods inherited from class javax.swing.JFrame
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update
-
Methods inherited from class java.awt.Frame
addNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setBackground, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setOpacity, setResizable, setShape, setState, setTitle, setUndecorated
-
Methods inherited from class java.awt.Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, getBackground, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOpacity, getOwnedWindows, getOwner, getOwnerlessWindows, getShape, getToolkit, getType, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isAutoRequestFocus, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isOpaque, isShowing, isValidateRoot, paint, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setAutoRequestFocus, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImages, setLocation, setLocation, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setType, setVisible, show, toBack, toFront
-
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMinimumSize, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusDownCycle, validate, validateTree
-
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, requestFocusInWindow, resize, resize, revalidate, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setMaximumSize, setMixingCutoutShape, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
-
-
-
-
Field Detail
-
progStatus
javax.swing.JLabel progStatus
-
cvModel
CvTableModel cvModel
-
variableModel
VariableTableModel variableModel
-
resetModel
ResetTableModel resetModel
-
resetMenu
javax.swing.JMenu resetMenu
-
extraMenuModelList
java.util.ArrayList<ExtraMenuTableModel> extraMenuModelList
-
extraMenuList
java.util.ArrayList<javax.swing.JMenu> extraMenuList
-
mProgrammer
Programmer mProgrammer
-
noDecoder
boolean noDecoder
-
menuBar
javax.swing.JMenuBar menuBar
-
tempPane
javax.swing.JPanel tempPane
-
_opsMode
boolean _opsMode
-
maxFnNumDirty
boolean maxFnNumDirty
-
maxFnNumOld
java.lang.String maxFnNumOld
-
maxFnNumNew
java.lang.String maxFnNumNew
-
_rosterEntry
RosterEntry _rosterEntry
-
_rPane
RosterEntryPane _rPane
-
_flPane
FunctionLabelPane _flPane
-
_rMPane
RosterMediaPane _rMPane
-
_frameEntryId
java.lang.String _frameEntryId
-
paneList
java.util.List<javax.swing.JPanel> paneList
-
paneListIndex
int paneListIndex
-
decoderPaneList
java.util.List<org.jdom2.Element> decoderPaneList
-
glassPane
BusyGlassPane glassPane
-
activeComponents
java.util.List<javax.swing.JComponent> activeComponents
-
filename
java.lang.String filename
-
programmerShowEmptyPanes
java.lang.String programmerShowEmptyPanes
-
decoderShowEmptyPanes
java.lang.String decoderShowEmptyPanes
-
decoderAllowResetDefaults
java.lang.String decoderAllowResetDefaults
-
suppressFunctionLabels
java.lang.String suppressFunctionLabels
-
suppressRosterMedia
java.lang.String suppressRosterMedia
-
tabPane
javax.swing.JTabbedPane tabPane
-
readChangesButton
javax.swing.JToggleButton readChangesButton
-
writeChangesButton
javax.swing.JToggleButton writeChangesButton
-
readAllButton
javax.swing.JToggleButton readAllButton
-
writeAllButton
javax.swing.JToggleButton writeAllButton
-
l1
java.awt.event.ItemListener l1
-
l2
java.awt.event.ItemListener l2
-
l3
java.awt.event.ItemListener l3
-
l4
java.awt.event.ItemListener l4
-
decoderDirtyTask
ShutDownTask decoderDirtyTask
-
fileDirtyTask
ShutDownTask fileDirtyTask
-
searchTargetList
java.util.ArrayList<PaneProgFrame.SearchPair> searchTargetList
-
nextSearchTarget
int nextSearchTarget
-
modelElem
org.jdom2.Element modelElem
Data element holding the 'model' element representing the decoder type.
-
decoderRoot
org.jdom2.Element decoderRoot
-
programmerRoot
org.jdom2.Element programmerRoot
-
defaultCvValues
int[] defaultCvValues
-
defaultCvNumbers
java.lang.String[] defaultCvNumbers
-
primaryAddr
VariableValue primaryAddr
-
extendAddr
VariableValue extendAddr
-
addMode
EnumVariableValue addMode
-
longMode
boolean longMode
-
newAddr
java.lang.String newAddr
-
justChanges
boolean justChanges
-
_read
boolean _read
-
_programmingPane
PaneProgPane _programmingPane
-
-
Constructor Detail
-
PaneProgFrame
public PaneProgFrame(DecoderFile pDecoderFile, @Nonnull RosterEntry pRosterEntry, java.lang.String pFrameEntryId, java.lang.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. Note that we're assuming the roster entry has the right decoder, at least w.r.t. the loco file.
- Fill CV values from the roster entry
- Create the programmer panes
- Parameters:
pDecoderFile
- XML file defining the decoder contents; if null, the decoder definition is found from the RosterEntrypRosterEntry
- RosterEntry for information on this locomotivepFrameEntryId
- Roster ID (entry) loaded into the framepProgrammerFile
- Name of the programmer file to usepProg
- Programmer object to be used to access CVsopsMode
- true for opsMode, else false.
-
-
Method Detail
-
getRosterPane
public RosterEntryPane getRosterPane()
-
getFnLabelPane
public FunctionLabelPane getFnLabelPane()
-
getModePane
protected abstract javax.swing.JPanel getModePane()
Abstract method to provide a JPanel setting the programming mode, if appropriate.A null value is ignored (?)
- Returns:
- new mode panel for inclusion in the GUI
-
installComponents
protected void installComponents()
-
setProgrammingGui
void setProgrammingGui(javax.swing.JPanel bottom)
-
setSearchGui
void setSearchGui(javax.swing.JPanel bottom)
-
loadSearchTargets
protected void loadSearchTargets()
-
loadJPanel
protected void loadJPanel(java.awt.Component c, javax.swing.JPanel tab)
-
searchDidNotFind
protected void searchDidNotFind()
-
searchGoesTo
protected void searchGoesTo(PaneProgFrame.SearchPair result)
-
getPaneList
public java.util.List<javax.swing.JPanel> getPaneList()
-
addHelp
void addHelp()
-
getPreferredSize
public java.awt.Dimension getPreferredSize()
Description copied from class:JmriJFrame
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.- Overrides:
getPreferredSize
in classJmriJFrame
- Returns:
- the preferred size or the maximum size, whichever is smaller
-
getMaximumSize
public java.awt.Dimension getMaximumSize()
Description copied from class:JmriJFrame
Provide a maximum frame size that is limited to what can fit on the screen after toolbars, etc are deducted.Some 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.
- Overrides:
getMaximumSize
in classJmriJFrame
- Returns:
- the maximum window size
-
enableReadButtons
void enableReadButtons()
Enable the [Read all] and [Read changes] buttons if possible. This checks to make sure this is appropriate, given the attached programmer's capability.
-
isIncludedFE
public static boolean isIncludedFE(org.jdom2.Element e, org.jdom2.Element aModelElement, RosterEntry aRosterEntry, java.lang.String extraIncludes, java.lang.String extraExcludes)
Front end to DecoderFile.isIncluded()- Retrieves "productID" and "model attributes from the "model" element and "family" attribute from the roster entry.
- Then invokes DecoderFile.isIncluded() with the retrieved values.
- Deals gracefully with null or missing elements and attributes.
- Parameters:
e
- XML element with possible "include" and "exclude" attributes to be checkedaModelElement
- "model" element from the Decoder Index, used to get "model" and "productID".aRosterEntry
- The current roster entry, used to get "family".extraIncludes
- additional "include" termsextraExcludes
- additional "exclude" terms.- Returns:
- true if front ended included, else false.
-
pickProgrammerMode
protected void pickProgrammerMode(@Nonnull org.jdom2.Element programming)
-
loadDecoderFromLoco
protected void loadDecoderFromLoco(RosterEntry r)
-
loadDecoderFile
protected void loadDecoderFile(@Nonnull DecoderFile df, @Nonnull RosterEntry re)
-
loadProgrammerFile
protected void loadProgrammerFile(RosterEntry r)
-
checkDirtyDecoder
protected boolean checkDirtyDecoder()
- Returns:
- true if decoder needs to be written
-
checkDirtyFile
protected boolean checkDirtyFile()
- Returns:
- true if file needs to be written
-
handleDirtyFile
protected void handleDirtyFile()
-
windowClosing
public void windowClosing(java.awt.event.WindowEvent e)
Close box has been clicked; handle check for dirty with respect to decoder or file, then close.- Specified by:
windowClosing
in interfacejava.awt.event.WindowListener
- Overrides:
windowClosing
in classJmriJFrame
- Parameters:
e
- Not used
-
readConfig
void readConfig(org.jdom2.Element root, RosterEntry r)
-
resetToDefaults
protected void resetToDefaults()
Reset all CV values to defaults stored earlier.This will in turn update the variables.
-
saveDefaults
protected void saveDefaults()
Save all CV values.These stored values are used by {link #resetToDefaults()}
-
makeInfoPane
protected javax.swing.JPanel makeInfoPane(RosterEntry r)
-
makeFunctionLabelPane
protected javax.swing.JPanel makeFunctionLabelPane(RosterEntry r)
-
makeMediaPane
protected javax.swing.JPanel makeMediaPane(RosterEntry r)
-
updateDccAddress
void updateDccAddress()
-
newPane
public void newPane(java.lang.String name, org.jdom2.Element pane, org.jdom2.Element modelElem, boolean enableEmpty, boolean programmerPane)
-
processModifierElements
protected void processModifierElements(org.jdom2.Element e, PaneProgPane pane, VariableTableModel model, javax.swing.JTabbedPane tabPane, int index)
If there are any modifier elements, process them.- Parameters:
e
- Process the contents of this elementpane
- Destination of any visible itemsmodel
- Used to locate any needed variablestabPane
- For overall GUI navigationindex
- Which pane in the overall window
-
getBusyGlassPane
public BusyGlassPane getBusyGlassPane()
- Specified by:
getBusyGlassPane
in interfacePaneContainer
-
prepGlassPane
public void prepGlassPane(javax.swing.AbstractButton activeButton)
Create a BusyGlassPane transparent layer over the panel blocking any other interaction, excluding a supplied button.- Specified by:
prepGlassPane
in interfacePaneContainer
- Parameters:
activeButton
- a button to put on top of the pane
-
paneFinished
public void paneFinished()
- Specified by:
paneFinished
in interfacePaneContainer
-
enableButtons
public void enableButtons(boolean stat)
Enable the read/write buttons.In addition, if a programming mode pane is present, its "set" button is enabled.
- Specified by:
enableButtons
in interfacePaneContainer
- Parameters:
stat
- Are reads possible? If false, so not enable the read buttons.
-
isBusy
public boolean isBusy()
- Specified by:
isBusy
in interfacePaneContainer
-
readChanges
public boolean readChanges()
Invoked by "Read Changes" button, this sets in motion a continuing sequence of "read changes" operations on the panes.Each invocation of this method reads one pane; completion of that request will cause it to happen again, reading the next pane, until there's nothing left to read.
- Returns:
- true if a read has been started, false if the operation is complete.
-
readAll
public boolean readAll()
Invoked by the "Read All" button, this sets in motion a continuing sequence of "read all" operations on the panes.Each invocation of this method reads one pane; completion of that request will cause it to happen again, reading the next pane, until there's nothing left to read.
- Returns:
- true if a read has been started, false if the operation is complete.
-
doRead
boolean doRead()
-
writeAll
public boolean writeAll()
Invoked by "Write All" button, this sets in motion a continuing sequence of "write all" operations on each pane. Each invocation of this method writes one pane; completion of that request will cause it to happen again, writing the next pane, until there's nothing left to write.- Returns:
- true if a write has been started, false if the operation is complete.
-
writeChanges
public boolean writeChanges()
Invoked by "Write Changes" button, this sets in motion a continuing sequence of "write changes" operations on each pane.Each invocation of this method writes one pane; completion of that request will cause it to happen again, writing the next pane, until there's nothing left to write.
- Returns:
- true if a write has been started, false if the operation is complete
-
doWrite
boolean doWrite()
-
printPanes
public void printPanes(boolean preview)
Prepare a roster entry to be printed, and display a selection list.- Parameters:
preview
- true if output should go to a Preview pane on screen, false to output to a printer (dialog)- See Also:
PrintRosterEntry.doPrintPanes(boolean)
-
propertyChange
public void propertyChange(java.beans.PropertyChangeEvent e)
Get notification of a variable property change in the pane, specifically "busy" going to false at the end of a programming operation.- Specified by:
propertyChange
in interfacejava.beans.PropertyChangeListener
- Parameters:
e
- Event, used to find source
-
storeFile
public boolean storeFile()
Store the locomotives information in the roster (and a RosterEntry file).- Returns:
- false if store failed
-
dispose
public void dispose()
Local dispose, which also invokes parent. Note that we remove the components (removeAll) before taking those apart.- Specified by:
dispose
in interfaceWindowInterface
- Overrides:
dispose
in classJmriJFrame
-
setShowEmptyPanes
public static void setShowEmptyPanes(boolean yes)
Set value of Preference option to show empty panes.- Parameters:
yes
- true if empty panes should be shown
-
getShowEmptyPanes
public static boolean getShowEmptyPanes()
Get value of Preference option to show empty panes.- Returns:
- value from programmer config. manager, else true.
-
setShowCvNumbers
public static void setShowCvNumbers(boolean yes)
Option to control appearance of CV numbers in tool tips.- Parameters:
yes
- true is CV numbers should be shown
-
getShowCvNumbers
public static boolean getShowCvNumbers()
-
setCanCacheDefault
public static void setCanCacheDefault(boolean yes)
-
getCanCacheDefault
public static boolean getCanCacheDefault()
-
setDoConfirmRead
public static void setDoConfirmRead(boolean yes)
-
getDoConfirmRead
public static boolean getDoConfirmRead()
-
getRosterEntry
public RosterEntry getRosterEntry()
-
-