|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjmri.managers.AbstractManager
jmri.managers.AbstractLightManager
public abstract class AbstractLightManager
Abstract partial implementation of a LightManager.
Based on AbstractSignalHeadManager.java and AbstractSensorManager.java
| Constructor Summary | |
|---|---|
AbstractLightManager()
|
|
| Method Summary | |
|---|---|
void |
activateAllLights()
Activate the control mechanism for each Light controlled by this LightManager. |
boolean |
allowMultipleAdditions(String systemName)
A method that determines if it is possible to add a range of lights in numerical order eg 11 thru 18, primarily used to show/not show the add range box in the add Light window |
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. |
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 systemName,
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. |
boolean |
supportsVariableLights(String systemName)
Returns 'true' if the System can potentially support variable Lights Note: LightManagers for Systems that can support variable Lights should override this method and return 'true'. |
char |
typeLetter()
Returns the second letter in the system name for a Light |
| Methods inherited from class jmri.managers.AbstractManager |
|---|
addPropertyChangeListener, deregister, dispose, getSystemNameArray, getSystemNameList, makeSystemName, propertyChange, register, removePropertyChangeListener, systemLetter |
| Methods inherited from class java.lang.Object |
|---|
equals, 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, getSystemNameArray, getSystemPrefix, 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 systemName,
String userName)
This will always return a valid object reference; a new object will be created if necessary. In that case:
newLight in interface LightManagerpublic 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 LightManagerpublic boolean supportsVariableLights(String systemName)
supportsVariableLights in interface LightManagerpublic boolean allowMultipleAdditions(String systemName)
allowMultipleAdditions in interface LightManager
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||