Class DestinationPoints
- java.lang.Object
-
- jmri.implementation.AbstractNamedBean
-
- jmri.jmrit.entryexit.DestinationPoints
-
- All Implemented Interfaces:
java.lang.Comparable<NamedBean>
,PropertyChangeProvider
,NamedBean
public class DestinationPoints extends AbstractNamedBean
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface jmri.NamedBean
NamedBean.BadNameException, NamedBean.BadSystemNameException, NamedBean.BadUserNameException, NamedBean.DisplayOptions, NamedBean.DuplicateSystemNameException
-
-
Field Summary
Fields Modifier and Type Field Description (package private) boolean
activeEntryExit
(package private) boolean
activeEntryExitReversed
(package private) LayoutBlock
destination
(package private) boolean
disposed
(package private) boolean
enabled
(package private) int
entryExitType
(package private) javax.swing.JButton
jButton_Stack
(package private) java.lang.Object
lastSeenActiveBlockObject
(package private) EntryExitPairs
manager
(package private) static int
NXMESSAGEBOXCLEARTIMEOUT
(package private) PointDetails
point
protected java.beans.PropertyChangeListener
propertyBlockListener
(package private) java.util.List<LayoutBlock>
routeDetails
(package private) SignalMastLogic
sml
(package private) Source
src
(package private) java.lang.Boolean
uniDirection
-
Fields inherited from class jmri.implementation.AbstractNamedBean
listenerRefs, mSystemName, register
-
Fields inherited from interface jmri.NamedBean
DISPLAY_NAME_FORMAT, INCONSISTENT, PROPERTY_STATE, QUOTED_NAME_FORMAT, UNKNOWN
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
DestinationPoints(PointDetails point, java.lang.String id, Source src)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) void
activeBean(boolean reverseDirection)
(package private) void
activeBean(boolean reverseDirection, boolean showMessage)
protected void
blockStateUpdated(java.beans.PropertyChangeEvent e)
(package private) void
cancelClearInterlock(int cancelClear)
(package private) void
cancelClearOptionBox()
void
dispose()
Deactivate this object, so that it releases as many resources as possible and no longer effects others.java.lang.String
getBeanType()
For instances in the code where we are dealing with just a bean and a message needs to be passed to the user or in a log.PointDetails
getDestPoint()
(package private) int
getEntryExitType()
(package private) LayoutBlock
getFacing()
(package private) java.util.List<LayoutBlock>
getProtecting()
(package private) NamedBean
getSignal()
Source
getSource()
int
getState()
Provide generic access to internal state.(package private) boolean
getUniDirection()
(package private) java.lang.String
getUniqueId()
java.util.List<NamedBeanUsageReport>
getUsageReport(NamedBean bean)
Get a list of references for the specified bean.(package private) void
handleNoCurrentRoute(boolean reverse, java.lang.String message)
boolean
isActive()
boolean
isEnabled()
public for testing purposes.boolean
isReversed()
(package private) boolean
isRouteToPointSet()
boolean
isUniDirection()
(package private) void
removeBlockFromRoute(LayoutBlock lBlock)
protected void
setActiveEntryExit(boolean boo)
protected void
setActiveEntryExit(boolean boo, boolean reversed)
void
setEnabled(boolean boo)
(package private) void
setEntryExitType(int type)
void
setInterlockRoute(boolean reverseDirection)
(package private) void
setRoute(boolean state)
(package private) void
setRouteFrom(boolean set)
(package private) void
setRouteTo(boolean set)
void
setState(int state)
Provide generic access to internal state.(package private) void
setUniDirection(boolean uni)
-
Methods inherited from class jmri.implementation.AbstractNamedBean
addPropertyChangeListener, addPropertyChangeListener, addPropertyChangeListener, addPropertyChangeListener, compareSystemNameSuffix, describeState, equals, firePropertyChange, getComment, getDisplayName, getDisplayName, getListenerRef, getListenerRefs, getNumPropertyChangeListeners, getProperty, getPropertyChangeListeners, getPropertyChangeListeners, getPropertyChangeListenersByReference, getPropertyKeys, getSystemName, getUserName, hashCode, removeProperty, removePropertyChangeListener, removePropertyChangeListener, setComment, setProperty, setUserName, toString, toStringSuffix, updateListenerRef, vetoableChange
-
-
-
-
Field Detail
-
point
transient PointDetails point
-
uniDirection
java.lang.Boolean uniDirection
-
entryExitType
int entryExitType
-
enabled
boolean enabled
-
activeEntryExit
boolean activeEntryExit
-
activeEntryExitReversed
boolean activeEntryExitReversed
-
routeDetails
java.util.List<LayoutBlock> routeDetails
-
destination
LayoutBlock destination
-
disposed
boolean disposed
-
manager
transient EntryExitPairs manager
-
sml
transient SignalMastLogic sml
-
NXMESSAGEBOXCLEARTIMEOUT
static final int NXMESSAGEBOXCLEARTIMEOUT
- See Also:
- Constant Field Values
-
propertyBlockListener
protected transient java.beans.PropertyChangeListener propertyBlockListener
-
lastSeenActiveBlockObject
java.lang.Object lastSeenActiveBlockObject
-
jButton_Stack
javax.swing.JButton jButton_Stack
-
-
Constructor Detail
-
DestinationPoints
protected DestinationPoints(PointDetails point, java.lang.String id, Source src)
-
-
Method Detail
-
getBeanType
public java.lang.String getBeanType()
Description copied from interface:NamedBean
For instances in the code where we are dealing with just a bean and a message needs to be passed to the user or in a log.- Returns:
- a string of the bean type, eg Turnout, Sensor etc
-
isEnabled
public boolean isEnabled()
public for testing purposes.- Returns:
- true if enabled, else false.
-
setEnabled
public void setEnabled(boolean boo)
-
getUniqueId
java.lang.String getUniqueId()
-
getDestPoint
public PointDetails getDestPoint()
-
getSource
public Source getSource()
- Returns:
- source.
- Since:
- 4.17.4 Making the source object available for scripting in Jython.
-
getUniDirection
boolean getUniDirection()
-
setUniDirection
void setUniDirection(boolean uni)
-
setRouteTo
void setRouteTo(boolean set)
-
setRouteFrom
void setRouteFrom(boolean set)
-
isRouteToPointSet
boolean isRouteToPointSet()
-
getFacing
LayoutBlock getFacing()
-
getProtecting
java.util.List<LayoutBlock> getProtecting()
-
getEntryExitType
int getEntryExitType()
-
setEntryExitType
void setEntryExitType(int type)
-
blockStateUpdated
protected void blockStateUpdated(java.beans.PropertyChangeEvent e)
-
removeBlockFromRoute
void removeBlockFromRoute(LayoutBlock lBlock)
-
setRoute
void setRoute(boolean state)
-
cancelClearOptionBox
void cancelClearOptionBox()
-
cancelClearInterlock
void cancelClearInterlock(int cancelClear)
-
setInterlockRoute
public void setInterlockRoute(boolean reverseDirection)
-
activeBean
void activeBean(boolean reverseDirection)
-
activeBean
void activeBean(boolean reverseDirection, boolean showMessage)
-
handleNoCurrentRoute
void handleNoCurrentRoute(boolean reverse, java.lang.String message)
-
dispose
public void dispose()
Description copied from class:AbstractNamedBean
Deactivate this object, so that it releases as many resources as possible and no longer effects others.For example, if this object has listeners, after a call to this method it should no longer notify those listeners. Any native or system-wide resources it maintains should be released, including threads, files, etc.
It is an error to invoke any other methods on this object once dispose() has been called. Note, however, that there is no guarantee about behavior in that case.
Afterwards, references to this object may still exist elsewhere, preventing its garbage collection. But it's formally dead, and shouldn't be keeping any other objects alive. Therefore, this method should null out any references to other objects that this NamedBean contained.
- Specified by:
dispose
in interfaceNamedBean
- Overrides:
dispose
in classAbstractNamedBean
-
getState
public int getState()
Description copied from interface:NamedBean
Provide generic access to internal state.This generally shouldn't be used by Java code; use the class-specific form instead (e.g. getCommandedState in Turnout). This is provided to make scripts easier to read.
- Returns:
- the state
-
isActive
public boolean isActive()
-
isReversed
public boolean isReversed()
-
isUniDirection
public boolean isUniDirection()
-
setState
public void setState(int state)
Description copied from interface:NamedBean
Provide generic access to internal state.This generally shouldn't be used by Java code; use the class-specific form instead (e.g. setCommandedState in Turnout). This is provided to make scripts access easier to read.
- Parameters:
state
- the state
-
setActiveEntryExit
protected void setActiveEntryExit(boolean boo)
-
setActiveEntryExit
protected void setActiveEntryExit(boolean boo, boolean reversed)
-
getUsageReport
public java.util.List<NamedBeanUsageReport> getUsageReport(NamedBean bean)
Description copied from interface:NamedBean
Get a list of references for the specified bean.- Parameters:
bean
- The bean to be checked.- Returns:
- a list of NamedBeanUsageReports or an empty ArrayList.
-
-