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_locationprotected Train_trainprotected CarManagercarManagerprotected java.util.concurrent.ConcurrentHashMap<java.lang.String,javax.swing.JCheckBox>checkBoxesjavax.swing.JButtonclearButton(package private) CarSetFramecsfprotected EngineManagerengManager(package private) EngineSetFrameesfprotected static booleanIS_MANIFESTprotected booleanisSetModeprotected javax.swing.JScrollPanelocoPanejavax.swing.JButtonmodifyButtonjavax.swing.JButtonmoveButtonprotected javax.swing.JScrollPanemovePaneprotected javax.swing.JPanelpButtonsprotected javax.swing.JScrollPanepickupPaneprotected javax.swing.JPanelpLocationNameprotected javax.swing.JPanelpLocosprotected javax.swing.JPanelpMovesprotected javax.swing.JPanelpPickupLocosprotected javax.swing.JPanelpPickupsprotected javax.swing.JPanelpRailRoadNameprotected javax.swing.JPanelpSetoutLocosprotected javax.swing.JPanelpSetoutsprotected javax.swing.JPanelpStatusprotected javax.swing.JPanelpTrackCommentsprotected javax.swing.JPanelpTrainDescriptionprotected javax.swing.JPanelpWorkPanesprotected java.util.List<RollingStock>rollingStockjavax.swing.JButtonselectButtonprotected javax.swing.JScrollPanesetoutPaneprotected static java.lang.StringSpaceprotected static java.lang.StringTabprotected javax.swing.JTextPanetextLocationCommentPaneprotected javax.swing.JLabeltextLocationNameprotected javax.swing.JLabeltextRailRoadNameprotected javax.swing.JLabeltextStatusprotected javax.swing.JTextPanetextSwitchListCommentPaneprotected javax.swing.JTextPanetextTrainCommentPaneprotected javax.swing.JLabeltextTrainDescriptionprotected javax.swing.JTextPanetextTrainRouteCommentPaneprotected javax.swing.JTextPanetextTrainRouteLocationCommentPaneprotected javax.swing.JTextPanetextTrainStatusPaneprotected TrainCommontrainCommonprotected TrainManagertrainManager-
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.JPaneladdSet(RollingStock rs)protected voidblockCars(RouteLocation rl, boolean isManifest)Block cars by track (optional), then pick up and set out for each location in a train's route.voidbuttonActionPerformed(java.awt.event.ActionEvent ae)voidcarSetButtonActionPerfomed(java.awt.event.ActionEvent ae)protected voidcheck()protected voidcheckBoxActionPerformed(java.awt.event.ActionEvent ae)protected voidclearAndUpdate()voiddispose()voidengineSetButtonActionPerfomed(java.awt.event.ActionEvent ae)protected java.lang.StringgetStatus(RouteLocation rl, boolean isManifest)voidinitComponents()protected voidinitialize()protected voidloadLocationComment(Location location)protected voidloadLocationSwitchListComment(Location location)protected voidloadRailroadName()protected voidloadRouteComment()show route comment box only if there's a route commentprotected voidloadRouteLocationComment(RouteLocation rl)protected voidloadTrainComment()show train comment box only if there's a commentprotected voidloadTrainDescription()voidpropertyChange(java.beans.PropertyChangeEvent e)protected voidremoveCarFromList(Car car)protected voidremovePropertyChangeListerners()protected voidselectCheckboxes(boolean enable)protected voidsetCheckBoxFont(javax.swing.JCheckBox checkBox, java.awt.Color color)protected voidsetLabelFont(javax.swing.JLabel label)protected voidsetModifyButtonText()protected abstract voidupdate()protected voidupdateComplete()protected voidupdateLocoPanes(RouteLocation rl)Uses "ep" prefix to denote a checkbox with an engine pick up, and "es" for an engine set out.protected voidupdateTrackComments(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
-
textTrainStatusPane
protected javax.swing.JTextPane textTrainStatusPane
-
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:
buttonActionPerformedin 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:
checkBoxActionPerformedin 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:
disposein classOperationsPanel
-
propertyChange
public void propertyChange(java.beans.PropertyChangeEvent e)
- Specified by:
propertyChangein interfacejava.beans.PropertyChangeListener
-
-