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) intentryExitType(package private) javax.swing.JButtonjButton_Stack(package private) java.lang.ObjectlastSeenActiveBlockObject(package private) EntryExitPairsmanager(package private) static intNXMESSAGEBOXCLEARTIMEOUT(package private) PointDetailspointstatic java.lang.StringPROPERTY_ACTIVEString constant for active.static java.lang.StringPROPERTY_FAILEDString constant for failed.static java.lang.StringPROPERTY_NO_CHANGEString constant for no change.static java.lang.StringPROPERTY_STACKEDString constant for stacked.protected java.beans.PropertyChangeListenerpropertyBlockListener(package private) SignalMastLogicsml(package private) Sourcesrc-
Fields inherited from class jmri.implementation.AbstractNamedBean
listenerRefs, mSystemName, register
-
Fields inherited from interface jmri.NamedBean
DISPLAY_NAME_FORMAT, INCONSISTENT, PROPERTY_COMMENT, PROPERTY_ENABLED, PROPERTY_KNOWN_STATE, PROPERTY_STATE, PROPERTY_USERNAME, QUOTED_NAME_FORMAT, UNKNOWN
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedDestinationPoints(PointDetails point, java.lang.String id, Source src)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) voidactiveBean(boolean reverseDirection)(package private) voidactiveBean(boolean reverseDirection, boolean showMessage)protected voidblockStateUpdated(java.beans.PropertyChangeEvent e)(package private) voidcancelClearInterlock(int cancelClear)(package private) voidcancelClearOptionBox()voiddispose()Deactivate this object, so that it releases as many resources as possible and no longer effects others.java.lang.StringgetBeanType()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.PointDetailsgetDestPoint()(package private) intgetEntryExitType()(package private) LayoutBlockgetFacing()(package private) java.util.List<LayoutBlock>getProtecting()(package private) NamedBeangetSignal()SourcegetSource()intgetState()Provide generic access to internal state.(package private) booleangetUniDirection()(package private) java.lang.StringgetUniqueId()java.util.List<NamedBeanUsageReport>getUsageReport(NamedBean bean)Get a list of references for the specified bean.(package private) voidhandleNoCurrentRoute(boolean reverse, java.lang.String message)booleanisActive()booleanisEnabled()public for testing purposes.booleanisReversed()(package private) booleanisRouteToPointSet()booleanisUniDirection()(package private) voidremoveBlockFromRoute(LayoutBlock lBlock)protected voidsetActiveEntryExit(boolean boo)protected voidsetActiveEntryExit(boolean boo, boolean reversed)voidsetEnabled(boolean boo)(package private) voidsetEntryExitType(int type)voidsetInterlockRoute(boolean reverseDirection)(package private) voidsetRoute(boolean state)(package private) voidsetRouteFrom(boolean set)(package private) voidsetRouteTo(boolean set)voidsetState(int state)Provide generic access to internal state.(package private) voidsetUniDirection(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
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface jmri.NamedBean
compareTo, getRecommendedToolTip
-
-
-
-
Field Detail
-
PROPERTY_ACTIVE
public static final java.lang.String PROPERTY_ACTIVE
String constant for active.- See Also:
- Constant Field Values
-
PROPERTY_NO_CHANGE
public static final java.lang.String PROPERTY_NO_CHANGE
String constant for no change.- See Also:
- Constant Field Values
-
PROPERTY_STACKED
public static final java.lang.String PROPERTY_STACKED
String constant for stacked.- See Also:
- Constant Field Values
-
PROPERTY_FAILED
public static final java.lang.String PROPERTY_FAILED
String constant for failed.- See Also:
- Constant Field Values
-
point
transient PointDetails point
-
entryExitType
int entryExitType
-
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:NamedBeanFor 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:AbstractNamedBeanDeactivate 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:
disposein interfaceNamedBean- Overrides:
disposein classAbstractNamedBean
-
getState
public int getState()
Description copied from interface:NamedBeanProvide 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:NamedBeanProvide 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:NamedBeanGet a list of references for the specified bean.- Parameters:
bean- The bean to be checked.- Returns:
- a list of NamedBeanUsageReports or an empty ArrayList.
-
-