Package jmri.jmrit.operations
Class CommonConductorYardmasterPanel
- java.lang.Object
-
- java.awt.Component
-
- java.awt.Container
-
- javax.swing.JComponent
-
- javax.swing.JPanel
-
- jmri.jmrit.operations.OperationsPanel
-
- jmri.jmrit.operations.CommonConductorYardmasterPanel
-
- All Implemented Interfaces:
java.awt.image.ImageObserver
,java.awt.MenuContainer
,java.beans.PropertyChangeListener
,java.io.Serializable
,java.util.EventListener
,javax.accessibility.Accessible
- Direct Known Subclasses:
TrainConductorPanel
,YardmasterByTrackPanel
,YardmasterPanel
public abstract class CommonConductorYardmasterPanel extends OperationsPanel implements java.beans.PropertyChangeListener
Common elements for the Conductor and Yardmaster Frames.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class javax.swing.JPanel
javax.swing.JPanel.AccessibleJPanel
-
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
-
-
Field Summary
Fields Modifier and Type Field Description protected Location
_location
protected Train
_train
protected CarManager
carManager
protected java.util.concurrent.ConcurrentHashMap<java.lang.String,javax.swing.JCheckBox>
checkBoxes
javax.swing.JButton
clearButton
(package private) CarSetFrame
csf
protected EngineManager
engManager
(package private) EngineSetFrame
esf
protected static boolean
IS_MANIFEST
protected boolean
isSetMode
protected javax.swing.JScrollPane
locoPane
javax.swing.JButton
modifyButton
javax.swing.JButton
moveButton
protected javax.swing.JScrollPane
movePane
protected javax.swing.JPanel
pButtons
protected javax.swing.JScrollPane
pickupPane
protected javax.swing.JPanel
pLocationName
protected javax.swing.JPanel
pLocos
protected javax.swing.JPanel
pMoves
protected javax.swing.JPanel
pPickupLocos
protected javax.swing.JPanel
pPickups
protected javax.swing.JPanel
pRailRoadName
protected javax.swing.JPanel
pSetoutLocos
protected javax.swing.JPanel
pSetouts
protected javax.swing.JPanel
pStatus
protected javax.swing.JPanel
pTrackComments
protected javax.swing.JPanel
pTrainDescription
protected javax.swing.JPanel
pWorkPanes
protected java.util.List<RollingStock>
rollingStock
javax.swing.JButton
selectButton
protected javax.swing.JScrollPane
setoutPane
protected static java.lang.String
Space
protected static java.lang.String
Tab
protected javax.swing.JTextPane
textLocationCommentPane
protected javax.swing.JLabel
textLocationName
protected javax.swing.JLabel
textRailRoadName
protected javax.swing.JLabel
textStatus
protected javax.swing.JTextPane
textSwitchListCommentPane
protected javax.swing.JTextPane
textTrainCommentPane
protected javax.swing.JLabel
textTrainDescription
protected javax.swing.JTextPane
textTrainRouteCommentPane
protected javax.swing.JTextPane
textTrainRouteLocationCommentPane
protected TrainCommon
trainCommon
protected TrainManager
trainManager
-
Fields inherited from class jmri.jmrit.operations.OperationsPanel
NEW_LINE, NONE
-
Fields inherited from class javax.swing.JComponent
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
-
-
Constructor Summary
Constructors Constructor Description CommonConductorYardmasterPanel()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected javax.swing.JPanel
addSet(RollingStock rs)
protected void
blockCars(RouteLocation rl, boolean isManifest)
Block cars by track (optional), then pick up and set out for each location in a train's route.void
buttonActionPerformed(java.awt.event.ActionEvent ae)
void
carSetButtonActionPerfomed(java.awt.event.ActionEvent ae)
protected void
check()
protected void
checkBoxActionPerformed(java.awt.event.ActionEvent ae)
protected void
clearAndUpdate()
void
dispose()
void
engineSetButtonActionPerfomed(java.awt.event.ActionEvent ae)
protected java.lang.String
getStatus(RouteLocation rl, boolean isManifest)
void
initComponents()
protected void
initialize()
protected void
loadLocationComment(Location location)
protected void
loadLocationSwitchListComment(Location location)
protected void
loadRailroadName()
protected void
loadRouteComment()
show route comment box only if there's a route commentprotected void
loadRouteLocationComment(RouteLocation rl)
protected void
loadTrainComment()
show train comment box only if there's a commentprotected void
loadTrainDescription()
void
propertyChange(java.beans.PropertyChangeEvent e)
protected void
removeCarFromList(Car car)
protected void
removePropertyChangeListerners()
protected void
selectCheckboxes(boolean enable)
protected void
setCheckBoxFont(javax.swing.JCheckBox checkBox, java.awt.Color color)
protected void
setLabelFont(javax.swing.JLabel label)
protected void
setModifyButtonText()
protected abstract void
update()
protected void
updateComplete()
protected void
updateLocoPanes(RouteLocation rl)
Uses "ep" prefix to denote a checkbox with an engine pick up, and "es" for an engine set out.protected void
updateTrackComments(RouteLocation rl, boolean isManifest)
-
Methods inherited from class jmri.jmrit.operations.OperationsPanel
addButtonAction, addCheckBoxAction, addComboBoxAction, addHorizontalScrollBarKludgeFix, addItem, addItem, addItemLeft, addItemTop, addItemWidth, addRadioButtonAction, addSpinnerChangeListerner, adjustTextAreaColumnWidth, cacheState, clearTableSort, comboBoxActionPerformed, getColorChooserPanel, getColorChooserPanel, getNumberOfCheckboxesPerLine, getWindowFrameRef, loadFontSizeComboBox, loadTableDetails, loadTableDetails, padComboBox, padComboBox, persist, radioButtonActionPerformed, saveTableState, selectNextItemComboBox, spinnerChangeEvent, storeValues
-
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
-
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
-
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, 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, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
-
-
-
-
Field Detail
-
IS_MANIFEST
protected static final boolean IS_MANIFEST
- See Also:
- Constant Field Values
-
Tab
protected static final java.lang.String Tab
- See Also:
- Constant Field Values
-
Space
protected static final java.lang.String Space
- See Also:
- Constant Field Values
-
trainManager
protected TrainManager trainManager
-
engManager
protected EngineManager engManager
-
carManager
protected CarManager carManager
-
trainCommon
protected TrainCommon trainCommon
-
locoPane
protected javax.swing.JScrollPane locoPane
-
pickupPane
protected javax.swing.JScrollPane pickupPane
-
setoutPane
protected javax.swing.JScrollPane setoutPane
-
movePane
protected javax.swing.JScrollPane movePane
-
textRailRoadName
protected javax.swing.JLabel textRailRoadName
-
textTrainDescription
protected javax.swing.JLabel textTrainDescription
-
textLocationName
protected javax.swing.JLabel textLocationName
-
textStatus
protected javax.swing.JLabel textStatus
-
selectButton
public javax.swing.JButton selectButton
-
clearButton
public javax.swing.JButton clearButton
-
modifyButton
public javax.swing.JButton modifyButton
-
moveButton
public javax.swing.JButton moveButton
-
textLocationCommentPane
protected javax.swing.JTextPane textLocationCommentPane
-
textTrainCommentPane
protected javax.swing.JTextPane textTrainCommentPane
-
textTrainRouteCommentPane
protected javax.swing.JTextPane textTrainRouteCommentPane
-
textTrainRouteLocationCommentPane
protected javax.swing.JTextPane textTrainRouteLocationCommentPane
-
textSwitchListCommentPane
protected javax.swing.JTextPane textSwitchListCommentPane
-
pRailRoadName
protected javax.swing.JPanel pRailRoadName
-
pTrainDescription
protected javax.swing.JPanel pTrainDescription
-
pLocationName
protected javax.swing.JPanel pLocationName
-
pTrackComments
protected javax.swing.JPanel pTrackComments
-
pLocos
protected javax.swing.JPanel pLocos
-
pPickupLocos
protected javax.swing.JPanel pPickupLocos
-
pSetoutLocos
protected javax.swing.JPanel pSetoutLocos
-
pPickups
protected javax.swing.JPanel pPickups
-
pSetouts
protected javax.swing.JPanel pSetouts
-
pWorkPanes
protected javax.swing.JPanel pWorkPanes
-
pMoves
protected javax.swing.JPanel pMoves
-
pStatus
protected javax.swing.JPanel pStatus
-
pButtons
protected javax.swing.JPanel pButtons
-
checkBoxes
protected java.util.concurrent.ConcurrentHashMap<java.lang.String,javax.swing.JCheckBox> checkBoxes
-
rollingStock
protected java.util.List<RollingStock> rollingStock
-
isSetMode
protected boolean isSetMode
-
csf
CarSetFrame csf
-
esf
EngineSetFrame esf
-
-
Constructor Detail
-
CommonConductorYardmasterPanel
public CommonConductorYardmasterPanel()
-
-
Method Detail
-
initComponents
public void initComponents()
-
buttonActionPerformed
public void buttonActionPerformed(java.awt.event.ActionEvent ae)
- Overrides:
buttonActionPerformed
in classOperationsPanel
-
initialize
protected void initialize()
-
updateComplete
protected void updateComplete()
-
carSetButtonActionPerfomed
public void carSetButtonActionPerfomed(java.awt.event.ActionEvent ae)
-
engineSetButtonActionPerfomed
public void engineSetButtonActionPerfomed(java.awt.event.ActionEvent ae)
-
checkBoxActionPerformed
protected void checkBoxActionPerformed(java.awt.event.ActionEvent ae)
- Overrides:
checkBoxActionPerformed
in classOperationsPanel
-
check
protected void check()
-
selectCheckboxes
protected void selectCheckboxes(boolean enable)
-
loadTrainDescription
protected void loadTrainDescription()
-
loadTrainComment
protected void loadTrainComment()
show train comment box only if there's a comment
-
loadRailroadName
protected void loadRailroadName()
-
loadLocationComment
protected void loadLocationComment(Location location)
-
loadLocationSwitchListComment
protected void loadLocationSwitchListComment(Location location)
-
loadRouteComment
protected void loadRouteComment()
show route comment box only if there's a route comment
-
loadRouteLocationComment
protected void loadRouteLocationComment(RouteLocation rl)
-
updateTrackComments
protected void updateTrackComments(RouteLocation rl, boolean isManifest)
-
updateLocoPanes
protected void updateLocoPanes(RouteLocation rl)
Uses "ep" prefix to denote a checkbox with an engine pick up, and "es" for an engine set out.- Parameters:
rl
- The routeLocation to show loco pick ups or set outs.
-
blockCars
protected void blockCars(RouteLocation rl, boolean isManifest)
Block cars by track (optional), then pick up and set out for each location in a train's route. This shows each car with a check box or with a set button. The set button is displayed when the checkbox isn't selected and the display is in "set" mode. If the car is a utility. Show the number of cars that have the same attributes, and not the car's road and number. Each car is displayed only once in one of three panes. The three panes are pick up, set out, or local move. To keep track of each car and which pane to use, they are placed in the list "rollingStock" with the prefix "p", "s" or "m" and the car's unique id.- Parameters:
rl
- The RouteLocationisManifest
- True if manifest, false if switch list
-
addSet
protected javax.swing.JPanel addSet(RollingStock rs)
-
setCheckBoxFont
protected void setCheckBoxFont(javax.swing.JCheckBox checkBox, java.awt.Color color)
-
setLabelFont
protected void setLabelFont(javax.swing.JLabel label)
-
setModifyButtonText
protected void setModifyButtonText()
-
getStatus
protected java.lang.String getStatus(RouteLocation rl, boolean isManifest)
-
removeCarFromList
protected void removeCarFromList(Car car)
-
clearAndUpdate
protected void clearAndUpdate()
-
update
protected abstract void update()
-
removePropertyChangeListerners
protected void removePropertyChangeListerners()
-
dispose
public void dispose()
- Overrides:
dispose
in classOperationsPanel
-
propertyChange
public void propertyChange(java.beans.PropertyChangeEvent e)
- Specified by:
propertyChange
in interfacejava.beans.PropertyChangeListener
-
-