|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JLabel
jmri.jmrit.display.PositionableLabel
jmri.jmrit.display.PositionableIcon
jmri.jmrit.display.IndicatorTrackIcon
public class IndicatorTrackIcon
An icon to display the status of a track segment in a block
This responds to the following conditions: 1. KnownState of an occupancy sensor of the block where the track segment appears 2. Allocation of a route by a Warrant where the track segment appears 3. Current position of a train being run under a Warrant where the track segment appears in a block of the route 4. Out of Service for a block that cannot or should not be used 5. An error state of the block where the track segment appears (short/no power etc.)
A click on the icon does not change any of the above conditions..
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.swing.JLabel |
|---|
JLabel.AccessibleJLabel |
| Nested classes/interfaces inherited from class javax.swing.JComponent |
|---|
JComponent.AccessibleJComponent |
| Nested classes/interfaces inherited from class java.awt.Container |
|---|
Container.AccessibleAWTContainer |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary | |
|---|---|
(package private) static org.slf4j.Logger |
log
|
| Fields inherited from class jmri.jmrit.display.PositionableIcon |
|---|
_iconFamily, _iconMap, _rotate, _scale |
| Fields inherited from class jmri.jmrit.display.PositionableLabel |
|---|
_control, _controlling, _displayLevel, _editable, _editor, _hidden, _icon, _iconEditor, _iconEditorFrame, _namedIcon, _paletteFrame, _popupUtil, _positionable, _rotateText, _showTooltip, _text, _tooltip, _unRotatedText, _viewCoordinates, active, disableItem, rbean |
| Fields inherited from class javax.swing.JLabel |
|---|
labelFor |
| Fields inherited from class javax.swing.JComponent |
|---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
| Fields inherited from class java.awt.Component |
|---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface javax.swing.SwingConstants |
|---|
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
IndicatorTrackIcon(Editor editor)
|
|
| Method Summary | |
|---|---|
void |
addPath(String path)
|
Positionable |
deepClone()
Make a deep copy of Positional object. |
(package private) void |
displayState(String status)
Drive the current state of the display from the state of the turnout. |
void |
dispose()
Clean up when this object is no longer needed. |
protected void |
editItem()
|
Positionable |
finishClone(Positionable p)
Finsh the deep Copy of a Positional object. |
HashMap<String,NamedIcon> |
getIconMap()
|
NamedBeanHandle<OBlock> |
getNamedOccBlock()
|
NamedBeanHandle<Sensor> |
getNamedOccSensor()
|
String |
getNameString()
Methods to add popup menu items return true if a popup item is set |
OBlock |
getOccBlock()
|
Sensor |
getOccSensor()
|
ArrayList<String> |
getPaths()
|
String |
getStatus()
|
void |
propertyChange(PropertyChangeEvent evt)
|
void |
removePath(String path)
|
boolean |
setEditItemMenu(JPopupMenu popup)
|
void |
setIcon(String name,
NamedIcon icon)
Place icon by its bean state name |
void |
setOccBlock(String pName)
Attached a named OBlock to display status |
void |
setOccBlockHandle(NamedBeanHandle<OBlock> blockHandle)
|
void |
setOccSensor(String pName)
Attached a named sensor to display status |
void |
setOccSensorHandle(NamedBeanHandle<Sensor> senHandle)
|
void |
setPaths(ArrayList<String> paths)
|
void |
setShowTrain(boolean set)
|
void |
setStatus(int state)
|
boolean |
showPopUp(JPopupMenu popup)
Pop-up displays unique attributes |
boolean |
showTrain()
|
(package private) void |
updateItem()
|
| Methods inherited from class jmri.jmrit.display.PositionableIcon |
|---|
cloneMap, displayState, getDegrees, getFamily, getIcon, getIconStateNames, maxHeight, maxWidth, rotate, rotateOrthogonal, setFamily, setScale |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
static org.slf4j.Logger log
| Constructor Detail |
|---|
public IndicatorTrackIcon(Editor editor)
| Method Detail |
|---|
public Positionable deepClone()
Positionable
deepClone in interface PositionabledeepClone in class PositionableLabelpublic Positionable finishClone(Positionable p)
Positionable
finishClone in interface PositionablefinishClone in class PositionableIconpublic HashMap<String,NamedIcon> getIconMap()
public void setOccSensor(String pName)
setOccSensor in interface IndicatorTrackpName - Used as a system/user name to lookup the sensor objectpublic void setOccSensorHandle(NamedBeanHandle<Sensor> senHandle)
setOccSensorHandle in interface IndicatorTrackpublic Sensor getOccSensor()
getOccSensor in interface IndicatorTrackpublic NamedBeanHandle<Sensor> getNamedOccSensor()
getNamedOccSensor in interface IndicatorTrackpublic void setOccBlock(String pName)
setOccBlock in interface IndicatorTrackpName - Used as a system/user name to lookup the OBlock objectpublic void setOccBlockHandle(NamedBeanHandle<OBlock> blockHandle)
setOccBlockHandle in interface IndicatorTrackpublic OBlock getOccBlock()
getOccBlock in interface IndicatorTrackpublic NamedBeanHandle<OBlock> getNamedOccBlock()
getNamedOccBlock in interface IndicatorTrackpublic void setShowTrain(boolean set)
setShowTrain in interface IndicatorTrackpublic boolean showTrain()
showTrain in interface IndicatorTrackpublic ArrayList<String> getPaths()
getPaths in interface IndicatorTrackpublic void setPaths(ArrayList<String> paths)
public void addPath(String path)
addPath in interface IndicatorTrackpublic void removePath(String path)
removePath in interface IndicatorTrackpublic void setStatus(int state)
setStatus in interface IndicatorTrack
public void setIcon(String name,
NamedIcon icon)
public String getStatus()
public void propertyChange(PropertyChangeEvent evt)
propertyChange in interface PropertyChangeListenerpublic String getNameString()
Positionable
getNameString in interface PositionablegetNameString in class PositionableLabelpublic boolean showPopUp(JPopupMenu popup)
showPopUp in interface PositionableshowPopUp in class PositionableLabelvoid displayState(String status)
public boolean setEditItemMenu(JPopupMenu popup)
setEditItemMenu in interface PositionablesetEditItemMenu in class PositionableLabelprotected void editItem()
void updateItem()
public void dispose()
PositionableLabel
dispose in class PositionableLabel
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||