|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface LightManager
Interface for obtaining Lights.
This doesn't have a "new" method, as Lights are separately implemented, instead of being system-specific.
Based on SignalHeadManager.java
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.
| 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. |
void |
dispose()
Free resources when no longer used. |
Light |
getBySystemName(String s)
Locate a Light by its system name |
Light |
getByUserName(String s)
Locate a Light by its user name |
Light |
getLight(String name)
Locate via user name, then system name if needed. |
List |
getSystemNameList()
Get a list of all Light system names. |
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 |
validSystemNameConfig(String systemName)
Validate system name for the current hardware configuration returns 'true' if system name has a valid meaning in current configuration, else returns 'false' |
boolean |
validSystemNameFormat(String systemName)
Validate system name format returns 'true' if system name has a valid format, else returns 'false' |
| Methods inherited from interface jmri.Manager |
|---|
addPropertyChangeListener, deregister, makeSystemName, register, removePropertyChangeListener, systemLetter, typeLetter |
| Method Detail |
|---|
Light provideLight(String name)
name -
void dispose()
Manager
dispose in interface ManagerLight getLight(String name)
name -
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:
Light getByUserName(String s)
Light getBySystemName(String s)
boolean validSystemNameFormat(String systemName)
boolean validSystemNameConfig(String systemName)
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.
This routine is implemented in AbstractLightManager to return the same name. 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.
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.
This routine is implemented in AbstractLightManager to return "". If a system implementation has alternate names, the system specific Light Manager should override this routine and supply the alternate name.
List getSystemNameList()
getSystemNameList in interface Managervoid activateAllLights()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||