Class EntryExitPairs
- All Implemented Interfaces:
PropertyChangeListener
,EventListener
,PropertyChangeFirer
,PropertyChangeProvider
,SilenceablePropertyChangeProvider
,VetoableChangeFirer
,VetoableChangeProvider
,InstanceManagerAutoDefault
,Manager<DestinationPoints>
public class EntryExitPairs extends VetoableChangeSupport implements Manager<DestinationPoints>, InstanceManagerAutoDefault, PropertyChangeListener
The route is based upon having a sensor assigned at a known location on the panel (set at the boundary of two different blocks) through to a sensor at a remote location on the same panel. Using the layout block routing, a path can then be set between the two sensors so long as one exists and no section of track is set occupied. If available an alternative route will be used when the direct path is occupied (blocked).
Initial implementation only handles the setting up of turnouts on a path.
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) class
EntryExitPairs.DeletePair
Class to store NX pair components.(package private) static class
EntryExitPairs.SourceToDest
Class to store NX sets consisting of a source point, a destination point, a direction and a reference.(package private) static class
EntryExitPairs.StackDetails
Class to collect (stack) routes when they are requested but blocked.Nested classes/interfaces inherited from interface jmri.Manager
Manager.ManagerDataEvent<E extends NamedBean>, Manager.ManagerDataListener<E extends NamedBean>, Manager.NameValidity
-
Field Summary
Fields Modifier and Type Field Description (package private) boolean
allocateToDispatcher
static int
AUTOCANCEL
static int
AUTOCLEAR
static int
AUTOSTACK
static int
CANCELROUTE
(package private) Timer
checkTimer
static int
CLEARROUTE
(package private) int
currentDealing
(package private) List<EntryExitPairs.DeletePair>
deletePairList
List of NX pairs that are scheduled for deletion.(package private) List<Object>
destinationList
static int
EXITROUTE
static int
FULLINTERLOCK
Constant value to represent that the entryExit will do full interlocking.(package private) static JPanel
glassPane
(package private) int
interlockTypeToUseWhenStable
(package private) List<Manager.ManagerDataListener<DestinationPoints>>
listeners
(package private) int
memoryClearDelay
(package private) String
memoryOption
static int
NXBUTTONACTIVE
static int
NXBUTTONINACTIVE
static int
NXBUTTONSELECTED
(package private) HashMap<PointDetails,Source>
nxpair
static int
OVERLAP_CANCEL
static int
OVERLAP_STACK
(package private) static List<PointDetails>
pointDetails
static int
PROMPTUSER
protected PropertyChangeListener
propertyBlockManagerListener
protected PropertyChangeListener
propertyDestinationListener
(package private) int
refCounter
(package private) int
routeClearOption
(package private) int
routeOverlapOption
(package private) List<EntryExitPairs.SourceToDest>
routesToSet
List holding SourceToDest sets of routes between two points.LayoutBlockConnectivityTools.Metric
routingMethod
(package private) boolean
runWhenStabilised
static int
SETUPSIGNALMASTLOGIC
Constant value to represent that the entryExit will set up the turnouts between two different points and configure the Signal Mast Logic to use the correct blocks.static int
SETUPTURNOUTSONLY
Constant value to represent that the entryExit will only set up the turnouts between two different points.(package private) SignalMastLogicManager
smlm
(package private) JDialog
stackDialog
(package private) List<EntryExitPairs.StackDetails>
stackList
(package private) StackNXPanel
stackPanel
static int
STACKROUTE
(package private) LayoutEditor
toUseWhenStable
int
turnoutSetDelay
Delay between issuing Turnout commandsFields inherited from interface jmri.Manager
ANALOGIOS, AUDIO, BLOCKBOSS, BLOCKS, CONDITIONALS, CTCDATA, deprecatedManagerLogger, ENTRYEXIT, IDTAGS, LAYOUTBLOCKS, LIGHTS, LOGIXNG_ANALOG_ACTIONS, LOGIXNG_ANALOG_EXPRESSIONS, LOGIXNG_CONDITIONALNGS, LOGIXNG_DIGITAL_ACTIONS, LOGIXNG_DIGITAL_BOOLEAN_ACTIONS, LOGIXNG_DIGITAL_EXPRESSIONS, LOGIXNG_MODULES, LOGIXNG_STRING_ACTIONS, LOGIXNG_STRING_EXPRESSIONS, LOGIXNG_TABLES, LOGIXNGS, LOGIXS, MEMORIES, METERFRAMES, METERS, OBLOCKS, PANELFILES, REPORTERS, ROUTES, SECTIONS, SENSORGROUPS, SENSORS, SIGNALGROUPS, SIGNALHEADS, SIGNALMASTLOGICS, SIGNALMASTS, STRINGIOS, TIMEBASE, TRANSITS, TURNOUTS, WARRANTS
-
Constructor Summary
Constructors Constructor Description EntryExitPairs()
Constructor for creating an EntryExitPairs object and create a transparent JPanel for it. -
Method Summary
Modifier and Type Method Description void
addDataListener(Manager.ManagerDataListener<DestinationPoints> e)
Deprecated.void
addNXDestination(NamedBean source, NamedBean destination, LayoutEditor panel)
void
addNXDestination(NamedBean source, NamedBean destination, LayoutEditor panel, String id)
void
addNXSourcePoint(LayoutBlock facing, List<LayoutBlock> protecting, NamedBean loc, LayoutEditor panel)
void
addNXSourcePoint(NamedBean source)
void
addNXSourcePoint(NamedBean source, LayoutEditor panel)
void
automaticallyDiscoverEntryExitPairs(LayoutEditor editor, int interlockType)
Discover all possible valid source and destination Signal Mast Logic pairs on all Layout Editor panels.boolean
canBeBiDirectional(Object source, LayoutEditor panel, Object dest)
void
cancelInterlock(Object source, LayoutEditor panel, Object dest)
void
cancelStackedRoute(DestinationPoints dp, boolean reverse)
Remove a stacked route from stackList.(package private) void
checkRoute()
Step through stackList and activate the first stacked route in line if it is no longer blocked.(package private) void
createDeletePairList(NamedBean sensor)
Rebuild the delete pair list based on the supplied sensor.void
deleteBean(DestinationPoints bean, String property)
Method for a UI to delete a bean.boolean
deleteNxPair(NamedBean sensor)
Entry point to delete all of the NX pairs for a specific sensor. 1) Build a list of affected NX pairs. 2) Check for Conditional references. 3) If no references, do the delete process with user approval.boolean
deleteNxPair(NamedBean entrySensor, NamedBean exitSensor, LayoutEditor panel)
Entry point to delete a specific NX pair.void
deregister(DestinationPoints n)
Forget a NamedBean Object created outside the manager.void
dispose()
Free resources when no longer used.String
getBeanTypeHandled(boolean plural)
Get the user-readable name of the type of NamedBean handled by this manager.DestinationPoints
getBySystemName(String systemName)
Locate an existing instance based on a system name.DestinationPoints
getByUserName(String userName)
Locate an existing instance based on a user name.int
getClearDownOption()
List<Object>
getDestinationList(Object obj, LayoutEditor panel)
boolean
getDispatcherIntegration()
Object
getEndPointLocation(NamedBean source, LayoutEditor panel)
List<String>
getEntryExitList()
int
getEntryExitType(Object source, LayoutEditor panel, Object dest)
JPanel
getGlassPane()
Get the transparent JPanel for this EntryExitPairs.SystemConnectionMemo
getMemo()
Get the system connection for this manager.int
getMemoryClearDelay()
String
getMemoryOption()
DestinationPoints
getNamedBean(String name)
Locate an existing instance based on a name.Class<DestinationPoints>
getNamedBeanClass()
Get the class of NamedBean supported by this Manager.List<DestinationPoints>
getNamedBeanList()
Deprecated.SortedSet<DestinationPoints>
getNamedBeanSet()
Implemented to support the Conditional combo box name listList<Object>
getNxDestination()
int
getNxPairNumbers(LayoutEditor panel)
List<Object>
getNxSource(LayoutEditor panel)
int
getObjectCount()
Get the count of managed objects.int
getOverlapOption()
String
getPointAsString(NamedBean obj, LayoutEditor panel)
Get the name of a destinationPoint on a LE Panel.PointDetails
getPointDetails(Object obj, LayoutEditor panel)
Return a point from a given LE Panel.(package private) PointDetails
getPointDetails(LayoutBlock source, List<LayoutBlock> destination, LayoutEditor panel)
Return either an existing point stored in pointDetails, or create a new one as required.Color
getSettingRouteColor()
int
getSettingTimer()
Source
getSourceForPoint(PointDetails pd)
List<Object>
getSourceList(LayoutEditor panel)
Return a list of all source (origin) points on a given Layout Editor panel.List<LayoutEditor>
getSourcePanelList()
List<DestinationPoints>
getStackedInterlocks()
Get a list of all stacked routes from stackList.List<String>
getSystemNameList()
Deprecated.String
getSystemPrefix()
Provide access to the system prefix string.String
getUniqueId(Object source, LayoutEditor panel, Object dest)
int
getXMLOrder()
Determine the order that types should be written when storing panel files.boolean
isDestinationValid(Object source, Object dest, LayoutEditor panel)
boolean
isEnabled(Object source, LayoutEditor panel, Object dest)
boolean
isPathActive(Object sourceObj, Object destObj, LayoutEditor panel)
boolean
isRouteStacked(DestinationPoints dp, boolean reverse)
Query if a stacked route is in stackList.boolean
isUniDirection(Object source, LayoutEditor panel, Object dest)
List<String>
layoutBlockSensors(LayoutBlock layoutBlock)
Create a list of sensors that have the layout block as either facing or protecting.String
makeSystemName(String s)
Create a SystemName by prepending the system name prefix to the name if not already present.(package private) void
processRoutesToSet()
Activate each SourceToDest set in routesToSetvoid
propertyChange(PropertyChangeEvent evt)
PointDetails
providePoint(NamedBean source, LayoutEditor panel)
Generate the point details, given a known source and a Layout Editor panel.void
register(DestinationPoints n)
Remember a NamedBean Object created outside the manager.void
removeDataListener(Manager.ManagerDataListener<DestinationPoints> e)
Deprecated.void
removeNXSensor(Sensor sensor)
void
removePropertyChangeListener(PropertyChangeListener list, NamedBean obj, LayoutEditor panel)
(package private) void
removeRemainingRoute()
Remove remaining SourceToDest sets in routesToSetvoid
setClearDownOption(int i)
void
setDispatcherIntegration(boolean boo)
void
setEnabled(Object source, LayoutEditor panel, Object dest, boolean set)
void
setEntryExitType(Object source, LayoutEditor panel, Object dest, int set)
void
setMemoryClearDelay(int secs)
void
setMemoryOption(String memoryName)
void
setMultiPointRoute(PointDetails requestpd, LayoutEditor panel)
void
setOverlapOption(int i)
void
setPropertyChangesSilenced(String propertyName, boolean silenced)
Suppress sendingPropertyChangeEvent
s for the named property.void
setSettingRouteColor(Color col)
void
setSettingTimer(int i)
void
setSingleSegmentRoute(String nxPair)
Set the route between the two points represented by the Destination Point name.void
setUniDirection(Object source, LayoutEditor panel, Object dest, boolean set)
void
stackNXRoute(DestinationPoints dp, boolean reverse)
If a route is requested but is currently blocked, ask user if it should be added to stackList.char
typeLetter()
boolean
useDifferentColorWhenSetting()
void
vetoableChange(PropertyChangeEvent evt)
Methods inherited from class jmri.beans.VetoableChangeSupport
addVetoableChangeListener, addVetoableChangeListener, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, getVetoableChangeListeners, getVetoableChangeListeners, removeVetoableChangeListener, removeVetoableChangeListener
Methods inherited from class jmri.beans.PropertyChangeSupport
addPropertyChangeListener, addPropertyChangeListener, fireIndexedPropertyChange, fireIndexedPropertyChange, fireIndexedPropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getPropertyChangeListeners, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface jmri.Manager
getBeanBySystemName, getBeanByUserName, getBeanTypeHandled, getEntryToolTip, getKnownBeanProperties, getSubSystemNamePrefix, getSystemNamePrefix, isValidSystemNameFormat, makeSystemName, makeSystemName, setDataListenerMute, setPropertyChangesMuted, validateBadCharsInSystemNameFormat, validateIntegerSystemNameFormat, validateNmraAccessorySystemNameFormat, validateSystemNameFormat, validateSystemNameFormat, validateSystemNameFormatOnlyNumeric, validateSystemNamePrefix, validateTrimmedMin1NumberSystemNameFormat, validateTrimmedSystemNameFormat, validateUppercaseTrimmedSystemNameFormat, validSystemNameFormat
Methods inherited from interface jmri.beans.PropertyChangeProvider
addPropertyChangeListener, addPropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener
Methods inherited from interface jmri.beans.VetoableChangeProvider
addVetoableChangeListener, addVetoableChangeListener, getVetoableChangeListeners, getVetoableChangeListeners, removeVetoableChangeListener, removeVetoableChangeListener
-
Field Details
-
routingMethod
-
NXBUTTONSELECTED
- See Also:
- Constant Field Values
-
NXBUTTONACTIVE
- See Also:
- Constant Field Values
-
NXBUTTONINACTIVE
- See Also:
- Constant Field Values
-
SETUPTURNOUTSONLY
Constant value to represent that the entryExit will only set up the turnouts between two different points.- See Also:
- Constant Field Values
-
SETUPSIGNALMASTLOGIC
Constant value to represent that the entryExit will set up the turnouts between two different points and configure the Signal Mast Logic to use the correct blocks.- See Also:
- Constant Field Values
-
FULLINTERLOCK
Constant value to represent that the entryExit will do full interlocking. It will set the turnouts and "reserve" the blocks.- See Also:
- Constant Field Values
-
allocateToDispatcher
boolean allocateToDispatcher -
PROMPTUSER
- See Also:
- Constant Field Values
-
AUTOCLEAR
- See Also:
- Constant Field Values
-
AUTOCANCEL
- See Also:
- Constant Field Values
-
AUTOSTACK
- See Also:
- Constant Field Values
-
OVERLAP_CANCEL
- See Also:
- Constant Field Values
-
OVERLAP_STACK
- See Also:
- Constant Field Values
-
routeClearOption
int routeClearOption -
routeOverlapOption
-
memoryOption
-
memoryClearDelay
int memoryClearDelay -
glassPane
-
turnoutSetDelay
Delay between issuing Turnout commands -
nxpair
-
refCounter
int refCounter -
routesToSet
List holding SourceToDest sets of routes between two points. -
currentDealing
int currentDealing -
propertyDestinationListener
-
destinationList
-
deletePairList
List of NX pairs that are scheduled for deletion.- Since:
- 4.11.2
-
smlm
-
CANCELROUTE
- See Also:
- Constant Field Values
-
CLEARROUTE
- See Also:
- Constant Field Values
-
EXITROUTE
- See Also:
- Constant Field Values
-
STACKROUTE
- See Also:
- Constant Field Values
-
pointDetails
-
stackList
-
stackPanel
-
stackDialog
-
checkTimer
-
runWhenStabilised
boolean runWhenStabilised -
toUseWhenStable
-
interlockTypeToUseWhenStable
-
propertyBlockManagerListener
-
listeners
-
-
Constructor Details
-
EntryExitPairs
public EntryExitPairs()Constructor for creating an EntryExitPairs object and create a transparent JPanel for it.
-
-
Method Details
-
getSettingTimer
-
setSettingTimer
-
useDifferentColorWhenSetting
-
getSettingRouteColor
-
setSettingRouteColor
-
setDispatcherIntegration
-
getDispatcherIntegration
-
getGlassPane
Get the transparent JPanel for this EntryExitPairs.- Returns:
- JPanel overlay
-
addNXSourcePoint
public void addNXSourcePoint(LayoutBlock facing, List<LayoutBlock> protecting, NamedBean loc, LayoutEditor panel) -
addNXSourcePoint
-
addNXSourcePoint
-
getEndPointLocation
-
getXMLOrder
Determine the order that types should be written when storing panel files. Uses one of the constants defined in this class.Yes, that's an overly-centralized methodology, but it works for now.
- Specified by:
getXMLOrder
in interfaceManager<DestinationPoints>
- Returns:
- write order for this Manager; larger is later.
-
getBySystemName
Locate an existing instance based on a system name.- Specified by:
getBySystemName
in interfaceManager<DestinationPoints>
- Parameters:
systemName
- System Name of the required NamedBean- Returns:
- requested NamedBean object or null if none exists
-
getByUserName
Locate an existing instance based on a user name.- Specified by:
getByUserName
in interfaceManager<DestinationPoints>
- Parameters:
userName
- System Name of the required NamedBean- Returns:
- requested NamedBean object or null if none exists
-
getNamedBean
Locate an existing instance based on a name.- Specified by:
getNamedBean
in interfaceManager<DestinationPoints>
- Parameters:
name
- User Name or System Name of the required NamedBean- Returns:
- requested NamedBean object or null if none exists
-
getMemo
Get the system connection for this manager.- Specified by:
getMemo
in interfaceManager<DestinationPoints>
- Returns:
- the system connection for this manager
-
getSystemPrefix
Provide access to the system prefix string. This was previously called the "System letter"- Specified by:
getSystemPrefix
in interfaceManager<DestinationPoints>
- Returns:
- the system prefix
-
typeLetter
- Specified by:
typeLetter
in interfaceManager<DestinationPoints>
- Returns:
- The type letter for a specific implementation
-
makeSystemName
Create a SystemName by prepending the system name prefix to the name if not already present.Note: implementations must call
Manager.validateSystemNameFormat(java.lang.String, java.util.Locale)
to ensure the returned name is valid.- Specified by:
makeSystemName
in interfaceManager<DestinationPoints>
- Parameters:
s
- the item to make the system name for- Returns:
- A system name from a user input, typically a number.
-
getObjectCount
Get the count of managed objects.- Specified by:
getObjectCount
in interfaceManager<DestinationPoints>
- Returns:
- the number of managed objects
-
getSystemNameList
Deprecated.Provide an unmodifiable List of system names.Note: this is ordered by the underlying NamedBeans, not on the Strings themselves.
Note: Access via
Manager.getNamedBeanSet()
is faster.Note: This is not a live list; the contents don't stay up to date
- Specified by:
getSystemNameList
in interfaceManager<DestinationPoints>
- Returns:
- Unmodifiable access to a list of system names
-
getNamedBeanList
Deprecated.Implemented to support the Conditional combo box name list- Specified by:
getNamedBeanList
in interfaceManager<DestinationPoints>
- Returns:
- a list of Destination Point beans
- Since:
- 4.9.3
-
getNamedBeanSet
Implemented to support the Conditional combo box name list- Specified by:
getNamedBeanSet
in interfaceManager<DestinationPoints>
- Returns:
- a list of Destination Point beans
- Since:
- 4.9.3
-
register
Remember a NamedBean Object created outside the manager.The non-system-specific SignalHeadManagers use this method extensively.
- Specified by:
register
in interfaceManager<DestinationPoints>
- Parameters:
n
- the bean
-
deregister
Forget a NamedBean Object created outside the manager.The non-system-specific RouteManager uses this method.
- Specified by:
deregister
in interfaceManager<DestinationPoints>
- Parameters:
n
- the bean
-
setClearDownOption
-
getClearDownOption
-
setOverlapOption
-
getOverlapOption
-
setMemoryOption
-
getMemoryOption
-
setMemoryClearDelay
-
getMemoryClearDelay
-
dispose
Free resources when no longer used. Specifically, remove all references to and from this object, so it can be garbage-collected.- Specified by:
dispose
in interfaceManager<DestinationPoints>
-
providePoint
Generate the point details, given a known source and a Layout Editor panel.- Parameters:
source
- Origin of movementpanel
- A Layout Editor panel- Returns:
- A PointDetails object
-
getSourceList
Return a list of all source (origin) points on a given Layout Editor panel.- Parameters:
panel
- A Layout Editor panel- Returns:
- A list of source objects
-
getSourceForPoint
-
getNxPairNumbers
-
setSingleSegmentRoute
Set the route between the two points represented by the Destination Point name.- Parameters:
nxPair
- The system or user name of the destination point.- Since:
- 4.11.1
-
setMultiPointRoute
-
processRoutesToSet
void processRoutesToSet()Activate each SourceToDest set in routesToSet -
removeRemainingRoute
void removeRemainingRoute()Remove remaining SourceToDest sets in routesToSet -
getNxSource
-
getNxDestination
-
getSourcePanelList
-
propertyChange
- Specified by:
propertyChange
in interfacePropertyChangeListener
- Since:
- 4.17.4
-
addNXDestination
-
addNXDestination
public void addNXDestination(NamedBean source, NamedBean destination, LayoutEditor panel, String id)- Parameters:
source
- the source bean.destination
- the destination bean.panel
- the layout editor panel.id
- the points details id.- Since:
- 4.17.4 Register in Property Change Listener.
-
getDestinationList
-
removeNXSensor
-
deleteNxPair
Entry point to delete all of the NX pairs for a specific sensor. 1) Build a list of affected NX pairs. 2) Check for Conditional references. 3) If no references, do the delete process with user approval.- Parameters:
sensor
- The sensor whose pairs should be deleted.- Returns:
- true if the delete was successful. False if prevented by Conditional references or user choice.
- Since:
- 4.11.2
-
deleteNxPair
Entry point to delete a specific NX pair.- Parameters:
entrySensor
- The sensor that acts as the entry point.exitSensor
- The sensor that acts as the exit point.panel
- The layout editor panel that contains the entry sensor.- Returns:
- true if the delete was successful. False if there are Conditional references.
- Since:
- 4.11.2
-
createDeletePairList
Rebuild the delete pair list based on the supplied sensor. Find all of the NX pairs that use this sensor as either a source or destination. They will be candidates for deletion.- Parameters:
sensor
- The sensor being deleted,- Since:
- 4.11.2
-
layoutBlockSensors
Create a list of sensors that have the layout block as either facing or protecting. Called byLayoutTrackEditor.hasNxSensorPairs(jmri.jmrit.display.layoutEditor.LayoutBlock)
.- Parameters:
layoutBlock
- The layout block to be checked.- Returns:
- the a list of sensors affected by the layout block or an empty list.
- Since:
- 4.11.2
-
isDestinationValid
-
isUniDirection
-
setUniDirection
-
canBeBiDirectional
-
isEnabled
-
setEnabled
-
setEntryExitType
-
getEntryExitType
-
getUniqueId
-
getEntryExitList
-
isPathActive
-
cancelInterlock
-
getPointDetails
Return a point from a given LE Panel.- Parameters:
obj
- The point objectpanel
- The Layout Editor panel on which the point was placed- Returns:
- the point object, null if the point is not found
-
getPointDetails
PointDetails getPointDetails(LayoutBlock source, List<LayoutBlock> destination, LayoutEditor panel)Return either an existing point stored in pointDetails, or create a new one as required.- Parameters:
source
- The Layout Block functioning as the source (origin)destination
- A (list of) Layout Blocks functioning as destinationspanel
- The Layout Editor panel on which the point is to be placed- Returns:
- the point object
-
getPointAsString
Get the name of a destinationPoint on a LE Panel.- Parameters:
obj
- the point objectpanel
- The Layout Editor panel on which it is expected to be placed- Returns:
- the name of the point
-
stackNXRoute
If a route is requested but is currently blocked, ask user if it should be added to stackList.- Parameters:
dp
- DestinationPoints objectreverse
- true for a reversed running direction, mostly false
-
getStackedInterlocks
Get a list of all stacked routes from stackList.- Returns:
- an List containing destinationPoint elements
-
isRouteStacked
Query if a stacked route is in stackList.- Parameters:
dp
- DestinationPoints objectreverse
- true for a reversed running direction, mostly false- Returns:
- true if dp is in stackList
-
cancelStackedRoute
Remove a stacked route from stackList.- Parameters:
dp
- DestinationPoints objectreverse
- true for a reversed running direction, mostly false
-
checkRoute
void checkRoute()Step through stackList and activate the first stacked route in line if it is no longer blocked. -
removePropertyChangeListener
public void removePropertyChangeListener(PropertyChangeListener list, NamedBean obj, LayoutEditor panel) -
automaticallyDiscoverEntryExitPairs
public void automaticallyDiscoverEntryExitPairs(LayoutEditor editor, int interlockType) throws JmriExceptionDiscover all possible valid source and destination Signal Mast Logic pairs on all Layout Editor panels.- Parameters:
editor
- The Layout Editor panelinterlockType
- Integer value representing the type of interlocking, one of SETUPTURNOUTSONLY, SETUPSIGNALMASTLOGIC or FULLINTERLOCK- Throws:
JmriException
- when an error occurs during discovery
-
vetoableChange
- Throws:
PropertyVetoException
-
deleteBean
public void deleteBean(@Nonnull DestinationPoints bean, @Nonnull String property) throws PropertyVetoExceptionDescription copied from interface:Manager
Method for a UI to delete a bean.The UI should first request a "CanDelete", this will return a list of locations (and descriptions) where the bean is in use via throwing a VetoException, then if that comes back clear, or the user agrees with the actions, then a "DoDelete" can be called which inform the listeners to delete the bean, then it will be deregistered and disposed of.
If a property name of "DoNotDelete" is thrown back in the VetoException then the delete process should be aborted.
- Specified by:
deleteBean
in interfaceManager<DestinationPoints>
- Parameters:
bean
- The NamedBean to be deletedproperty
- The programmatic name of the request. "CanDelete" will enquire with all listeners if the item can be deleted. "DoDelete" tells the listener to delete the item- Throws:
PropertyVetoException
- If the recipients wishes the delete to be aborted (see above)
-
getBeanTypeHandled
Description copied from interface:Manager
Get the user-readable name of the type of NamedBean handled by this manager.For instance, in the code where we are dealing with just a bean and a message that needs to be passed to the user or in a log.
- Specified by:
getBeanTypeHandled
in interfaceManager<DestinationPoints>
- Parameters:
plural
- true to return plural form of the type; false to return singular form- Returns:
- a string of the bean type that the manager handles, eg Turnout, Sensor etc
-
getNamedBeanClass
Get the class of NamedBean supported by this Manager. This should be the generic class used in the Manager's class declaration.- Specified by:
getNamedBeanClass
in interfaceManager<DestinationPoints>
- Returns:
- the class supported by this Manager.
-
setPropertyChangesSilenced
@OverridingMethodsMustInvokeSuper public void setPropertyChangesSilenced(@Nonnull String propertyName, boolean silenced)Suppress sendingPropertyChangeEvent
s for the named property.Stopping the suppression of sending change events may send a PropertyChangeEvent if the property changed while silenced, but otherwise should not fire a PropertyChangeEvent.
- Specified by:
setPropertyChangesSilenced
in interfaceSilenceablePropertyChangeProvider
- Parameters:
propertyName
- the name of the property to mutesilenced
- true if events are to be suppressed; false otherwise
-
addDataListener
Deprecated.Register aManager.ManagerDataListener
to hear about adding or removing items from the list of NamedBeans.- Specified by:
addDataListener
in interfaceManager<DestinationPoints>
- Parameters:
e
- the data listener to add
-
removeDataListener
Deprecated.Unregister a previously-addedManager.ManagerDataListener
.- Specified by:
removeDataListener
in interfaceManager<DestinationPoints>
- Parameters:
e
- the data listener to remove- See Also:
Manager.addDataListener(ManagerDataListener)
-