Package jmri.jmrit.etcs.dmi.swing
Class DmiPanel
- java.lang.Object
-
- java.awt.Component
-
- java.awt.Container
-
- javax.swing.JComponent
-
- javax.swing.JPanel
-
- jmri.jmrit.etcs.dmi.swing.DmiPanel
-
- All Implemented Interfaces:
java.awt.image.ImageObserver
,java.awt.MenuContainer
,java.io.Serializable
,javax.accessibility.Accessible
@API(status=EXPERIMENTAL) public class DmiPanel extends javax.swing.JPanel
JPanel containing the ERTMS ETCS DMI.- Since:
- 5.7.4
- 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 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 DmiPanel()
Create a new DmiPanel.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addAnnouncement(TrackCondition tc)
Add a TrackCondition Announcement to under the Dial.protected void
addFlashListener(java.beans.PropertyChangeListener pcl, boolean fast)
Add a listener to synchronise panel flashing.void
advance(int distance)
Advance the train.void
dispose()
Dispose of any Listeners, e.g.void
extendMovementAuthorities(MovementAuthority dma)
Extend the Movement Authority.protected void
firePropertyChange(java.lang.String property, java.lang.String newVal)
Fire a Property Change from this panel.protected int
getMode()
Get the displayed operating mode.java.util.List<MovementAuthority>
getMovementAuthorities()
Get a List of current Movement Authorities.TrackCondition
getNextAnnouncement(boolean mustBeStation)
Get the next Planning Track Announcement with the Movement Authority.void
messageDriver(CabMessage msg)
Send a CabMessage to the Driver.void
playDmiSound(int sound)
Play one of the DMI UI Sounds.void
removeAnnouncement(TrackCondition tc)
Remove an Announcement from under the Dial.protected void
removeFlashListener(java.beans.PropertyChangeListener pcl, boolean fast)
Remove a listener from panel Flash timer notifications.void
removeMessage(java.lang.String messageId)
Remove a previously sent CabMessage from the display.void
resetMovementAuthorities(java.util.List<MovementAuthority> a)
Reset the Movement Authorities to the supplied List.void
setActualSpeed(float speed)
Set the speed value to be displayed by the dial and in centre of dial.void
setAdhesionFactorOn(boolean newVal)
Set the adhesion Factor symbol displayed.protected void
setAtoMode(int mode)
Set Automatic Train Operation Mode.void
setCentreCircleAndDialColor(java.awt.Color colour)
Set the Centre Speedometer Circle and Dial Colour.void
setCoasting(boolean visible)
Set the Coasting Symbol visible.void
setCsgSections(java.util.List<DmiCircularSpeedGuideSection> list)
Set a list of Circular Speed Guide sections to display.void
setDisplaySpeedUnit(java.lang.String newVal)
Set a speed unit to be displayed in the dial.void
setDistanceToTarget(float distance)
Set the distance to target bar.void
setDoorIcon(int mode)
Set Door Icon.void
setDwellTime(int mins, int secs)
Set remaining Station Dwell time.void
setIndicationMarker(int distance, int whichSpeedChange)
Set the Indication marker.void
setIntervetionSymbol(boolean newVal)
Set if Intervention Symbol is displayed.void
setLevel(int level)
Display Level Symbol.void
setLevelTransition(int newLevel, boolean ackRequired)
Set Level Transition Announcement Notification.void
setLimitedSupervisionSpeed(float spd)
Set a Limited Supervision Speed.void
setMaxDialSpeed(int speed)
Set the Maximum Speed on the Speed Dial.void
setMode(int newMode)
Set Mode. 0 - No Mode Displayed 1 - Shunting 4 - Trip 6 - Post Trip 7 - On Sight 9 - Staff Responsible 11 - Full Supervision Mode 12 - Non-leading 13 - Standby 14 - Reversing 16 - Unfitted 18 - System Failure 21 - Limited Supervision 23 - Automatic Driving ( From ERTMS4 ) 24 - Supervised Manoeuvre ( From ERTMS4 )void
setModeAcknowledge(int newMode)
Set the display to acknowledge the transition to a new Mode.void
setNextAdviceChange(int distance)
Set distance to the next Advice Change.void
setReleaseSpeed(int speed)
Set the release speed.void
setReleaseSpeedColour(java.awt.Color newColour)
Set the text colour of the Release Speed.void
setReversingPermittedSymbol(boolean newVal)
Set the Reversing Permitted symbol visible.void
setSafeRadioConnection(int newVal)
Set the Safe Radio Connection Symbol.void
setScale(int scale)
Set the Scale on the Planning Area. 0 : 0 - 1000 1 : 0 - 2000 2 : 0 - 4000 3 : 0 - 8000 4 : 0 - 16000 5 : 0 - 32000void
setSkipStoppingPoint(int mode)
Set Skip Stopping Point Icon.void
setStoppingAccuracy(int acc)
Set Stopping accuracy symbol visible.void
setStoppingPointLabel(java.lang.String station, java.lang.String eta)
Set stopping point text.void
setSupervisedDirection(int newDirection)
Set the Direction Symbol and visibility.void
setTargetAdviceSpeed(int newVal)
Set the ATO Target Advice Speed.void
setTrackAheadFreeQuestionVisible(boolean newVal)
Set the Track Ahead Free?void
setTunnelStoppingDistance(int distance)
No value displayed if distance < 1void
setTunnelStoppingIconVisible(boolean visible, boolean ack)
Set Tunnel Stopping Icon Visible.void
setVisible(boolean newVal)
void
stopDmiSound(int sound)
Stop playing a DMI Sound.-
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, 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
-
WHITE
public static final java.awt.Color WHITE
-
BLACK
public static final java.awt.Color BLACK
-
GREY
public static final java.awt.Color GREY
-
DARK_GREY
public static final java.awt.Color DARK_GREY
-
MEDIUM_GREY
public static final java.awt.Color MEDIUM_GREY
-
DARK_BLUE
public static final java.awt.Color DARK_BLUE
-
ORANGE
public static final java.awt.Color ORANGE
-
RED
public static final java.awt.Color RED
-
YELLOW
public static final java.awt.Color YELLOW
-
BACKGROUND_COLOUR
protected static final java.awt.Color BACKGROUND_COLOUR
-
BORDER_ACK
protected static final javax.swing.border.Border BORDER_ACK
-
BORDER_NORMAL
protected static final javax.swing.border.Border BORDER_NORMAL
-
FONT_NAME
protected static final java.lang.String FONT_NAME
- See Also:
- Constant Field Values
-
PROP_CHANGE_CABMESSAGE_ACK
public static final java.lang.String PROP_CHANGE_CABMESSAGE_ACK
- See Also:
- Constant Field Values
-
PROP_CHANGE_LEVEL_NTC_TRANSITION_ACK
public static final java.lang.String PROP_CHANGE_LEVEL_NTC_TRANSITION_ACK
- See Also:
- Constant Field Values
-
PROP_CHANGE_LEVEL_0_TRANSITION_ACK
public static final java.lang.String PROP_CHANGE_LEVEL_0_TRANSITION_ACK
- See Also:
- Constant Field Values
-
PROP_CHANGE_LEVEL_1_TRANSITION_ACK
public static final java.lang.String PROP_CHANGE_LEVEL_1_TRANSITION_ACK
- See Also:
- Constant Field Values
-
PROP_CHANGE_LEVEL_2_TRANSITION_ACK
public static final java.lang.String PROP_CHANGE_LEVEL_2_TRANSITION_ACK
- See Also:
- Constant Field Values
-
PROP_CHANGE_LEVEL_3_TRANSITION_ACK
public static final java.lang.String PROP_CHANGE_LEVEL_3_TRANSITION_ACK
- See Also:
- Constant Field Values
-
MODE_NONE
public static final int MODE_NONE
- See Also:
- Constant Field Values
-
MODE_SHUNTING
public static final int MODE_SHUNTING
- See Also:
- Constant Field Values
-
MODE_TRIP
public static final int MODE_TRIP
- See Also:
- Constant Field Values
-
MODE_POST_TRIP
public static final int MODE_POST_TRIP
- See Also:
- Constant Field Values
-
MODE_ON_SIGHT
public static final int MODE_ON_SIGHT
- See Also:
- Constant Field Values
-
MODE_STAFF_RESPONSIBLE
public static final int MODE_STAFF_RESPONSIBLE
- See Also:
- Constant Field Values
-
MODE_FULL_SUPERVISION
public static final int MODE_FULL_SUPERVISION
- See Also:
- Constant Field Values
-
MODE_NON_LEADING
public static final int MODE_NON_LEADING
- See Also:
- Constant Field Values
-
MODE_STANDBY
public static final int MODE_STANDBY
- See Also:
- Constant Field Values
-
MODE_REVERSING
public static final int MODE_REVERSING
- See Also:
- Constant Field Values
-
MODE_UNFITTED
public static final int MODE_UNFITTED
- See Also:
- Constant Field Values
-
MODE_SYSTEM_FAILURE
public static final int MODE_SYSTEM_FAILURE
- See Also:
- Constant Field Values
-
MODE_NATIONAL_SYSTEM
public static final int MODE_NATIONAL_SYSTEM
- See Also:
- Constant Field Values
-
MODE_LIMITED_SUPERVISION
public static final int MODE_LIMITED_SUPERVISION
- See Also:
- Constant Field Values
-
MODE_AUTOMATIC_DRIVING
public static final int MODE_AUTOMATIC_DRIVING
- See Also:
- Constant Field Values
-
MODE_SUPERVISED_MANOEUVRE
public static final int MODE_SUPERVISED_MANOEUVRE
- See Also:
- Constant Field Values
-
PROP_CHANGE_MODE_SHUNTING_ACK
public static final java.lang.String PROP_CHANGE_MODE_SHUNTING_ACK
- See Also:
- Constant Field Values
-
PROP_CHANGE_MODE_TRIP_ACK
public static final java.lang.String PROP_CHANGE_MODE_TRIP_ACK
- See Also:
- Constant Field Values
-
PROP_CHANGE_MODE_ON_SIGHT_ACK
public static final java.lang.String PROP_CHANGE_MODE_ON_SIGHT_ACK
- See Also:
- Constant Field Values
-
PROP_CHANGE_MODE_STAFF_RESPONSIBLE_ACK
public static final java.lang.String PROP_CHANGE_MODE_STAFF_RESPONSIBLE_ACK
- See Also:
- Constant Field Values
-
PROP_CHANGE_MODE_REVERSING_ACK
public static final java.lang.String PROP_CHANGE_MODE_REVERSING_ACK
- See Also:
- Constant Field Values
-
PROP_CHANGE_MODE_UNFITTED_ACK
public static final java.lang.String PROP_CHANGE_MODE_UNFITTED_ACK
- See Also:
- Constant Field Values
-
PROP_CHANGE_MODE_NATIONAL_SYSTEM_ACK
public static final java.lang.String PROP_CHANGE_MODE_NATIONAL_SYSTEM_ACK
- See Also:
- Constant Field Values
-
PROP_CHANGE_MODE_LIMITED_SUPERVISION_ACK
public static final java.lang.String PROP_CHANGE_MODE_LIMITED_SUPERVISION_ACK
- See Also:
- Constant Field Values
-
PROP_CHANGE_TRACK_AHEAD_FREE_TRUE
public static final java.lang.String PROP_CHANGE_TRACK_AHEAD_FREE_TRUE
- See Also:
- Constant Field Values
-
PROP_CHANGE_ATO_DRIVER_REQUEST_START
public static final java.lang.String PROP_CHANGE_ATO_DRIVER_REQUEST_START
- See Also:
- Constant Field Values
-
PROP_CHANGE_ATO_DRIVER_REQUEST_STOP
public static final java.lang.String PROP_CHANGE_ATO_DRIVER_REQUEST_STOP
- See Also:
- Constant Field Values
-
PROP_CHANGE_SKIP_STOPPING_POINT_INACTIVE_DRIVER
public static final java.lang.String PROP_CHANGE_SKIP_STOPPING_POINT_INACTIVE_DRIVER
- See Also:
- Constant Field Values
-
PROP_CHANGE_SKIP_STOPPING_POINT_REQUEST_DRIVER
public static final java.lang.String PROP_CHANGE_SKIP_STOPPING_POINT_REQUEST_DRIVER
- See Also:
- Constant Field Values
-
PROP_CHANGE_TUNNEL_STOP_AREA_ACK
public static final java.lang.String PROP_CHANGE_TUNNEL_STOP_AREA_ACK
- See Also:
- Constant Field Values
-
PROP_CHANGE_SOUND_HORN_ACK
public static final java.lang.String PROP_CHANGE_SOUND_HORN_ACK
- See Also:
- Constant Field Values
-
PROP_CHANGE_LOWER_PANT_ACK
public static final java.lang.String PROP_CHANGE_LOWER_PANT_ACK
- See Also:
- Constant Field Values
-
PROP_CHANGE_RAISE_PANT_ACK
public static final java.lang.String PROP_CHANGE_RAISE_PANT_ACK
- See Also:
- Constant Field Values
-
PROP_CHANGE_AIRCON_OPEN_ACK
public static final java.lang.String PROP_CHANGE_AIRCON_OPEN_ACK
- See Also:
- Constant Field Values
-
PROP_CHANGE_AIRCON_CLOSE_ACK
public static final java.lang.String PROP_CHANGE_AIRCON_CLOSE_ACK
- See Also:
- Constant Field Values
-
PROP_CHANGE_NEUTRAL_START_ACK
public static final java.lang.String PROP_CHANGE_NEUTRAL_START_ACK
- See Also:
- Constant Field Values
-
PROP_CHANGE_NEUTRAL_END_ACK
public static final java.lang.String PROP_CHANGE_NEUTRAL_END_ACK
- See Also:
- Constant Field Values
-
PROP_CHANGE_NONSTOP_ACK
public static final java.lang.String PROP_CHANGE_NONSTOP_ACK
- See Also:
- Constant Field Values
-
PROP_CHANGE_INHIBIT_MAG_BRAKE_ACK
public static final java.lang.String PROP_CHANGE_INHIBIT_MAG_BRAKE_ACK
- See Also:
- Constant Field Values
-
PROP_CHANGE_INHIBIT_EDDY_BRAKE_ACK
public static final java.lang.String PROP_CHANGE_INHIBIT_EDDY_BRAKE_ACK
- See Also:
- Constant Field Values
-
PROP_CHANGE_INHIBIT_REGEN_BRAKE_ACK
public static final java.lang.String PROP_CHANGE_INHIBIT_REGEN_BRAKE_ACK
- See Also:
- Constant Field Values
-
PROP_CHANGE_TRACTION_0_ACK
public static final java.lang.String PROP_CHANGE_TRACTION_0_ACK
- See Also:
- Constant Field Values
-
PROP_CHANGE_TRACTION_25KV_ACK
public static final java.lang.String PROP_CHANGE_TRACTION_25KV_ACK
- See Also:
- Constant Field Values
-
PROP_CHANGE_TRACTION_15KV_ACK
public static final java.lang.String PROP_CHANGE_TRACTION_15KV_ACK
- See Also:
- Constant Field Values
-
PROP_CHANGE_TRACTION_3KV_ACK
public static final java.lang.String PROP_CHANGE_TRACTION_3KV_ACK
- See Also:
- Constant Field Values
-
PROP_CHANGE_TRACTION_1_5KV_ACK
public static final java.lang.String PROP_CHANGE_TRACTION_1_5KV_ACK
- See Also:
- Constant Field Values
-
PROP_CHANGE_TRACTION_750V_ACK
public static final java.lang.String PROP_CHANGE_TRACTION_750V_ACK
- See Also:
- Constant Field Values
-
PROPERTY_CENTRE_TEXT
protected static final java.lang.String PROPERTY_CENTRE_TEXT
-
-
Constructor Detail
-
DmiPanel
public DmiPanel()
Create a new DmiPanel.
-
-
Method Detail
-
setMaxDialSpeed
public void setMaxDialSpeed(int speed)
Set the Maximum Speed on the Speed Dial.- Parameters:
speed
- 140, 180, 250 or 400
-
setActualSpeed
public void setActualSpeed(float speed)
Set the speed value to be displayed by the dial and in centre of dial.- Parameters:
speed
- no unit specified.
-
setCentreCircleAndDialColor
public void setCentreCircleAndDialColor(java.awt.Color colour)
Set the Centre Speedometer Circle and Dial Colour. Default is DmiPanel.GREY- Parameters:
colour
- the colour to use.
-
setCsgSections
public void setCsgSections(java.util.List<DmiCircularSpeedGuideSection> list)
Set a list of Circular Speed Guide sections to display.- Parameters:
list
- the list to display.
-
setDisplaySpeedUnit
public void setDisplaySpeedUnit(java.lang.String newVal)
Set a speed unit to be displayed in the dial.- Parameters:
newVal
- the speed unit, for display purpose only.
-
setTargetAdviceSpeed
public void setTargetAdviceSpeed(int newVal)
Set the ATO Target Advice Speed.- Parameters:
newVal
- Target speed. Negative values hide the advice.
-
setNextAdviceChange
public void setNextAdviceChange(int distance)
Set distance to the next Advice Change.- Parameters:
distance
- to next advice. Negative values hide the advice.
-
setReleaseSpeed
public void setReleaseSpeed(int speed)
Set the release speed. A negative value hides the speed.- Parameters:
speed
- to display.
-
setReleaseSpeedColour
public void setReleaseSpeedColour(java.awt.Color newColour)
Set the text colour of the Release Speed.- Parameters:
newColour
- the colour to use.
-
setLevelTransition
public void setLevelTransition(int newLevel, boolean ackRequired)
Set Level Transition Announcement Notification. Note that some valid options for ERTMS3.6 are invalid for ERTMS4 , e.g. 2, false.- Parameters:
newLevel
- -2 : No notification displayed. -1 : NTC 0 : Level 0 1 : Level 1 Intermittent 2 : Level 2 3 : Level 3ackRequired
- true if acknowledgement required by driver, else false.
-
setLevel
public void setLevel(int level)
Display Level Symbol.- Parameters:
level
- -2 : No notification displayed. -1 : NTC 0 : Level 0 1 : Level 1 Intermittent 2 : Level 2 3 : Level 3 ( ERTMS < 4 )
-
setMode
public void setMode(int newMode)
Set Mode. 0 - No Mode Displayed 1 - Shunting 4 - Trip 6 - Post Trip 7 - On Sight 9 - Staff Responsible 11 - Full Supervision Mode 12 - Non-leading 13 - Standby 14 - Reversing 16 - Unfitted 18 - System Failure 21 - Limited Supervision 23 - Automatic Driving ( From ERTMS4 ) 24 - Supervised Manoeuvre ( From ERTMS4 )- Parameters:
newMode
- the mode to display.
-
setModeAcknowledge
public void setModeAcknowledge(int newMode)
Set the display to acknowledge the transition to a new Mode.- Parameters:
newMode
- the new Mode to request acknowledgement for.
-
getMode
protected int getMode()
Get the displayed operating mode.- Returns:
- the current mode.
-
addAnnouncement
public void addAnnouncement(TrackCondition tc)
Add a TrackCondition Announcement to under the Dial.- Parameters:
tc
- the Announcement to add.
-
removeAnnouncement
public void removeAnnouncement(TrackCondition tc)
Remove an Announcement from under the Dial.- Parameters:
tc
- the Announcement to remove.
-
setLimitedSupervisionSpeed
public void setLimitedSupervisionSpeed(float spd)
Set a Limited Supervision Speed. A negative value hides the icon.- Parameters:
spd
- the Limited Supervision Speed.
-
setDistanceToTarget
public void setDistanceToTarget(float distance)
Set the distance to target bar. A negative value hides the field. Values displayed to nearest 10m.- Parameters:
distance
- the distance to set.
-
setAdhesionFactorOn
public void setAdhesionFactorOn(boolean newVal)
Set the adhesion Factor symbol displayed.- Parameters:
newVal
- true to display, else false.
-
setIntervetionSymbol
public void setIntervetionSymbol(boolean newVal)
Set if Intervention Symbol is displayed.- Parameters:
newVal
- true to display, false to hide.
-
setReversingPermittedSymbol
public void setReversingPermittedSymbol(boolean newVal)
Set the Reversing Permitted symbol visible.- Parameters:
newVal
- true to display, false to hide.
-
setIndicationMarker
public void setIndicationMarker(int distance, int whichSpeedChange)
Set the Indication marker. Negative values not displayed.- Parameters:
distance
- the distance at which to display the marker.whichSpeedChange
- the order of the speed change in the Movement Authority.
-
setAtoMode
protected void setAtoMode(int mode)
Set Automatic Train Operation Mode.- Parameters:
mode
- the new ATO Mode. 0: No ATO 1: ATO selected 2: ATO Ready for Engagement 3: ATO Engaged 4: ATO Disengaging 5: ATO failure
-
setCoasting
public void setCoasting(boolean visible)
Set the Coasting Symbol visible. Only valid to display if in ATO mode- Parameters:
visible
- true to display, else false.
-
setStoppingAccuracy
public void setStoppingAccuracy(int acc)
Set Stopping accuracy symbol visible. Only valid in ATO Mode.- Parameters:
acc
- -2: Hidden, -1: Undershot 0: Accurate 1: Overshot
-
setStoppingPointLabel
public void setStoppingPointLabel(java.lang.String station, java.lang.String eta)
Set stopping point text. Only valid in ATO mode.- Parameters:
station
- the next station.eta
- ETA of next station.
-
setDwellTime
public void setDwellTime(int mins, int secs)
Set remaining Station Dwell time.- Parameters:
mins
- minutes remaining.secs
- seconds remaining.
-
setDoorIcon
public void setDoorIcon(int mode)
Set Door Icon.- Parameters:
mode
- the icon code to display. 0: Unset 10: Request driver to open both sides doors 11: Request driver to open left doors 12: Request driver to open right doors 13: Doors are open 14: Request driver to close doors 15: Doors are being closed by ATO 16: Doors are closed
-
setSkipStoppingPoint
public void setSkipStoppingPoint(int mode)
Set Skip Stopping Point Icon.- Parameters:
mode
- the icon code to display. 0: Unset 17: Skip Stopping Point Inactive 18: Skip Stopping Point requested by ATO-TS 19: Skip Stopping Point requested by driver
-
setSupervisedDirection
public void setSupervisedDirection(int newDirection)
Set the Direction Symbol and visibility.- Parameters:
newDirection
- -1: Reverse, 0 Hidden, 1 Forwards.
-
setTunnelStoppingDistance
public void setTunnelStoppingDistance(int distance)
No value displayed if distance < 1- Parameters:
distance
- in m to stopping area.
-
setTunnelStoppingIconVisible
public void setTunnelStoppingIconVisible(boolean visible, boolean ack)
Set Tunnel Stopping Icon Visible.- Parameters:
visible
- true if visible, false hidden.ack
- true if Acknowledgement Required.
-
setSafeRadioConnection
public void setSafeRadioConnection(int newVal)
Set the Safe Radio Connection Symbol.- Parameters:
newVal
- -1 default, not displayed. 0 Connection Lost 1 Connection OK
-
setTrackAheadFreeQuestionVisible
public void setTrackAheadFreeQuestionVisible(boolean newVal)
Set the Track Ahead Free? Question visible.- Parameters:
newVal
- true to display, false to hide.
-
setScale
public void setScale(int scale)
Set the Scale on the Planning Area. 0 : 0 - 1000 1 : 0 - 2000 2 : 0 - 4000 3 : 0 - 8000 4 : 0 - 16000 5 : 0 - 32000- Parameters:
scale
- the scale to use.
-
resetMovementAuthorities
public void resetMovementAuthorities(@Nonnull java.util.List<MovementAuthority> a)
Reset the Movement Authorities to the supplied List. Existing MAs will be discarded.- Parameters:
a
- List of MAs.
-
getMovementAuthorities
public java.util.List<MovementAuthority> getMovementAuthorities()
Get a List of current Movement Authorities.- Returns:
- List of MAs.
-
extendMovementAuthorities
public void extendMovementAuthorities(@Nonnull MovementAuthority dma)
Extend the Movement Authority.- Parameters:
dma
- the Movement Authority to add to existing List.
-
getNextAnnouncement
@CheckForNull public TrackCondition getNextAnnouncement(boolean mustBeStation)
Get the next Planning Track Announcement with the Movement Authority.- Parameters:
mustBeStation
- true if only station data is required.- Returns:
- the next Announcement, may be null if none within the Movement Authority.
-
advance
public void advance(int distance)
Advance the train. Updates planning panel. Updates distance to target.- Parameters:
distance
- to advance.
-
messageDriver
public void messageDriver(CabMessage msg)
Send a CabMessage to the Driver.- Parameters:
msg
- the CabMessage to send.
-
removeMessage
public void removeMessage(java.lang.String messageId)
Remove a previously sent CabMessage from the display.- Parameters:
messageId
- the messageId of the CabMessage to remove.
-
playDmiSound
public void playDmiSound(int sound) throws java.lang.IllegalArgumentException
Play one of the DMI UI Sounds.1 - S1_toofast.wav - 2 secs, plays once.
2 - S2_warning.wav - 3 secs, loops until stopped.
3 - S_info.wav - 1 sec, plays once.
4 - click.wav - 1 sec, plays once.
- Parameters:
sound
- which Sound,- Throws:
java.lang.IllegalArgumentException
-
stopDmiSound
public void stopDmiSound(int sound)
Stop playing a DMI Sound.- Parameters:
sound
- the sound to Stop, normally 2 which plays in a loop.
-
addFlashListener
protected void addFlashListener(java.beans.PropertyChangeListener pcl, boolean fast)
Add a listener to synchronise panel flashing.- Parameters:
pcl
- the listener to add.fast
- true if fast flashing, false for slow.
-
removeFlashListener
protected void removeFlashListener(java.beans.PropertyChangeListener pcl, boolean fast)
Remove a listener from panel Flash timer notifications.- Parameters:
pcl
- the listener to remove.fast
- true if fast listener, false if slow.
-
firePropertyChange
protected void firePropertyChange(java.lang.String property, java.lang.String newVal)
Fire a Property Change from this panel. Old value fired as empty String.- Parameters:
property
- the property name.newVal
- the new value.
-
setVisible
public void setVisible(boolean newVal)
- Overrides:
setVisible
in classjavax.swing.JComponent
-
dispose
public void dispose()
Dispose of any Listeners, e.g. Fast Clock.
-
-