|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjmri.AbstractManager
jmri.AbstractLightManager
public abstract class AbstractLightManager
Abstract partial implementation of a LightManager.
Based on AbstractSignalHeadManager.java and AbstractSensorManager.java
| Field Summary |
|---|
| Fields inherited from class jmri.AbstractManager |
|---|
_tsys, _tuser |
| Constructor Summary | |
|---|---|
AbstractLightManager()
|
|
| Method Summary | |
|---|---|
void |
activateAllLights()
Activate the control mechanism for each Light controlled by this LightManager. |
String |
convertSystemNameToAlternate(String systemName)
Convert the system name to a normalized alternate name This routine is to allow testing to ensure that two Lights with alternate names that refer to the same output bit are not created. |
protected abstract Light |
createNewLight(String systemName,
String userName)
Internal method to invoke the factory, after all the logic for returning an existing method has been invoked. |
Light |
getBySystemName(String name)
Locate a Light by its system name |
Light |
getByUserName(String key)
Locate a Light by its user name |
Light |
getLight(String name)
Locate via user name, then system name if needed. |
Light |
newLight(String sysName,
String userName)
Return an instance with the specified system and user names. |
String |
normalizeSystemName(String systemName)
Normalize the system name This routine is used to ensure that each system name is uniquely linked to one C/MRI bit, by removing extra zeros inserted by the user. |
Light |
provideLight(String name)
Locate via user name, then system name if needed. |
char |
typeLetter()
Returns the second letter in the system name for a Light |
| Methods inherited from class jmri.AbstractManager |
|---|
addPropertyChangeListener, deregister, dispose, firePropertyChange, getInstanceBySystemName, getInstanceByUserName, getSystemNameList, makeSystemName, propertyChange, register, removePropertyChangeListener |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface jmri.LightManager |
|---|
dispose, getSystemNameList, validSystemNameConfig, validSystemNameFormat |
| Methods inherited from interface jmri.Manager |
|---|
addPropertyChangeListener, deregister, makeSystemName, register, removePropertyChangeListener, systemLetter |
| Methods inherited from interface java.beans.PropertyChangeListener |
|---|
propertyChange |
| Constructor Detail |
|---|
public AbstractLightManager()
| Method Detail |
|---|
public char typeLetter()
typeLetter in interface Managerpublic Light provideLight(String name)
provideLight in interface LightManagername -
public Light getLight(String name)
getLight in interface LightManagername -
public Light getBySystemName(String name)
getBySystemName in interface LightManagerpublic Light getByUserName(String key)
getByUserName in interface LightManager
public Light newLight(String sysName,
String userName)
This will always return a valid object reference; a new object will be created if necessary. In that case:
newLight in interface LightManager
protected abstract Light createNewLight(String systemName,
String userName)
public void activateAllLights()
activateAllLights in interface LightManagerpublic String normalizeSystemName(String systemName)
This routine is used to ensure that each system name is uniquely linked to one C/MRI bit, by removing extra zeros inserted by the user.
If a system implementation has names that could be normalized, the system-specific Light Manager should override this routine and supply a normalized system name.
normalizeSystemName in interface LightManagerpublic String convertSystemNameToAlternate(String systemName)
This routine is to allow testing to ensure that two Lights with alternate names that refer to the same output bit are not created.
If a system implementation has alternate names, the system specific Light Manager should override this routine and supply the alternate name.
convertSystemNameToAlternate in interface LightManager
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||