|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjmri.managers.DefaultSignalMastLogicManager
public class DefaultSignalMastLogicManager
JMRI is free software; you can redistribute it and/or modify it under the terms of version 2 of the GNU General Public License as published by the Free Software Foundation. See the "COPYING" file for a copy of this license.
JMRI is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
| Field Summary | |
|---|---|
protected PropertyChangeListener |
propertyBlockManagerListener
|
| Fields inherited from interface jmri.Manager |
|---|
AUDIO, BLOCKBOSS, BLOCKS, CONDITIONALS, IDTAGS, LAYOUTBLOCKS, LIGHTS, LOGIXS, MEMORIES, OBLOCKS, PANELFILES, REPORTERS, ROUTES, SECTIONS, SENSORGROUPS, SENSORS, SIGNALGROUPS, SIGNALHEADS, SIGNALMASTLOGICS, SIGNALMASTS, TIMEBASE, TRANSITS, TURNOUTS, WARRANTS |
| Constructor Summary | |
|---|---|
DefaultSignalMastLogicManager()
|
|
| Method Summary | |
|---|---|
void |
addDestinationMastToLogic(SignalMastLogic src,
SignalMast destination)
|
void |
addPropertyChangeListener(PropertyChangeListener l)
At a minimum, subclasses must notify of changes to the list of available NamedBeans; they may have other properties that will also notify. |
void |
automaticallyDiscoverSignallingPairs()
Discover all possible valid source and destination signalmasts past pairs on all layout editor panels. |
boolean |
checkValidDest(SignalMast sourceMast,
SignalMast destMast)
This uses the layout editor to check if the destination signalmast is reachable from the source signalmast |
void |
deregister(NamedBean n)
Forget a NamedBean Object created outside the manager. |
protected void |
discoverSignallingDest(SignalMast source,
LayoutBlock lProtecting,
LayoutBlock lFacing)
|
void |
discoverSignallingDest(SignalMast source,
LayoutEditor layout)
Discover valid destination signalmasts for a given source signal on a given layout editor panel. |
void |
dispose()
Free resources when no longer used. |
protected void |
firePropertyChange(String p,
Object old,
Object n)
|
NamedBean |
getBeanBySystemName(String systemName)
Locate an instance based on a system name. |
ArrayList<SignalMastLogic> |
getLogicsByDestination(SignalMast destination)
Gather a list of all the signal mast logics, by destination signal mast |
long |
getSignalLogicDelay()
|
SignalMastLogic |
getSignalMastLogic(SignalMast source)
|
ArrayList<SignalMastLogic> |
getSignalMastLogicList()
Returns an arraylist of signalmastlogic |
static SignalSpeedMap |
getSpeedMap()
|
String[] |
getSystemNameArray()
|
List<String> |
getSystemNameList()
|
String |
getSystemPrefix()
Provides access to the system prefix string. |
int |
getXMLOrder()
|
void |
initialise()
Used to initialise all the signalmast logics. primarily used after loading. |
String |
makeSystemName(String s)
|
SignalMastLogic |
newSignalMastLogic(SignalMast source)
|
void |
register(NamedBean n)
Remember a NamedBean Object created outside the manager. |
protected void |
registerSelf()
By default, register this manager to store as configuration information. |
void |
removeDestinationMastToLogic(SignalMastLogic src,
SignalMast destination)
|
void |
removePropertyChangeListener(PropertyChangeListener l)
At a minimum, subclasses must notify of changes to the list of available NamedBeans; they may have other properties that will also notify. |
void |
removeSignalMastLogic(SignalMastLogic sml)
Completely remove the signalmast logic. |
void |
removeSignalMastLogic(SignalMastLogic sml,
SignalMast dest)
Remove a destination mast from the signalmast logic |
void |
setSignalLogicDelay(long l)
|
char |
systemLetter()
Deprecated. |
char |
typeLetter()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected PropertyChangeListener propertyBlockManagerListener
| Constructor Detail |
|---|
public DefaultSignalMastLogicManager()
| Method Detail |
|---|
public int getXMLOrder()
getXMLOrder in interface Managerpublic static final SignalSpeedMap getSpeedMap()
public SignalMastLogic getSignalMastLogic(SignalMast source)
getSignalMastLogic in interface SignalMastLogicManagerpublic SignalMastLogic newSignalMastLogic(SignalMast source)
newSignalMastLogic in interface SignalMastLogicManager
public void addDestinationMastToLogic(SignalMastLogic src,
SignalMast destination)
addDestinationMastToLogic in interface SignalMastLogicManager
public void removeDestinationMastToLogic(SignalMastLogic src,
SignalMast destination)
removeDestinationMastToLogic in interface SignalMastLogicManagerpublic ArrayList<SignalMastLogic> getLogicsByDestination(SignalMast destination)
getLogicsByDestination in interface SignalMastLogicManagerpublic ArrayList<SignalMastLogic> getSignalMastLogicList()
getSignalMastLogicList in interface SignalMastLogicManager
public void removeSignalMastLogic(SignalMastLogic sml,
SignalMast dest)
removeSignalMastLogic in interface SignalMastLogicManagersml - The signalmast logic of the source signaldest - The destination mastpublic void removeSignalMastLogic(SignalMastLogic sml)
removeSignalMastLogic in interface SignalMastLogicManagerprotected void registerSelf()
public void dispose()
Manager
dispose in interface Managerdispose in interface SignalMastLogicManagerpublic void initialise()
initialise in interface SignalMastLogicManagerpublic NamedBean getBeanBySystemName(String systemName)
Manager
getBeanBySystemName in interface ManagersystemName - System Name of the required NamedBean
@Deprecated public char systemLetter()
systemLetter in interface Managerpublic String getSystemPrefix()
Manager
getSystemPrefix in interface Managerpublic char typeLetter()
typeLetter in interface Managerpublic String makeSystemName(String s)
makeSystemName in interface Managerpublic String[] getSystemNameArray()
getSystemNameArray in interface Managerpublic List<String> getSystemNameList()
getSystemNameList in interface Managerpublic void addPropertyChangeListener(PropertyChangeListener l)
Manager
addPropertyChangeListener in interface Managerpublic void removePropertyChangeListener(PropertyChangeListener l)
Manager
removePropertyChangeListener in interface Manager
protected void firePropertyChange(String p,
Object old,
Object n)
public void register(NamedBean n)
ManagerThe non-system-specific SignalHeadManagers use this method extensively.
register in interface Managerpublic void deregister(NamedBean n)
ManagerThe non-system-specific RouteManager uses this method.
deregister in interface Managerpublic long getSignalLogicDelay()
getSignalLogicDelay in interface SignalMastLogicManagerpublic void setSignalLogicDelay(long l)
setSignalLogicDelay in interface SignalMastLogicManager
public void discoverSignallingDest(SignalMast source,
LayoutEditor layout)
throws JmriException
discoverSignallingDest in interface SignalMastLogicManagersource - Source SignalMastlayout - Layout Editor panel to check.
JmriException
protected void discoverSignallingDest(SignalMast source,
LayoutBlock lProtecting,
LayoutBlock lFacing)
throws JmriException
JmriException
public void automaticallyDiscoverSignallingPairs()
throws JmriException
automaticallyDiscoverSignallingPairs in interface SignalMastLogicManagerJmriException
public boolean checkValidDest(SignalMast sourceMast,
SignalMast destMast)
throws JmriException
checkValidDest in interface SignalMastLogicManagersourceMast - Source SignalMastdestMast - Destination SignalMast
JmriException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||