|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjmri.managers.AbstractManager
jmri.managers.AbstractTurnoutManager
public abstract class AbstractTurnoutManager
Abstract partial implementation of a TurnoutManager.
| Field Summary |
|---|
| Fields inherited from class jmri.managers.AbstractManager |
|---|
_tsys, _tuser |
| 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 | |
|---|---|
AbstractTurnoutManager()
|
|
| Method Summary | |
|---|---|
boolean |
allowMultipleAdditions(String systemName)
A temporary method that determines if it is possible to add a range of turnouts in numerical order eg 10 to 30 |
int |
askControlType(String systemName)
Get from the user, the type of output to be used bits to control a turnout. |
int |
askNumControlBits(String systemName)
Get from the user, the number of addressed bits used to control a turnout. |
protected abstract Turnout |
createNewTurnout(String systemName,
String userName)
Internal method to invoke the factory, after all the logic for returning an existing method has been invoked. |
String |
createSystemName(String curAddress,
String prefix)
Returns a system name for a given hardware address and system prefix. |
Turnout |
getBySystemName(String name)
Locate an instance based on a system name. |
Turnout |
getByUserName(String key)
Locate an instance based on a user name. |
String |
getClosedText()
Get text to be used for the Turnout.CLOSED state in user communication. |
String |
getDefaultClosedSpeed()
|
String |
getDefaultThrownSpeed()
|
String |
getNextValidAddress(String curAddress,
String prefix)
Determine if the address supplied is valid and free, if not then it shall return the next free valid address up to a maximum of 10 address away from the initial address. |
String |
getThrownText()
Get text to be used for the Turnout.THROWN state in user communication. |
Turnout |
getTurnout(String name)
Locate via user name, then system name if needed. |
String[] |
getValidOperationTypes()
Get a list of the valid TurnoutOPeration subtypes for use with turnouts of this system |
int |
getXMLOrder()
|
boolean |
isControlTypeSupported(String systemName)
Determines if the manager supports the handling of pulsed and steady state control as the askControlType will always return a value even if it is not supported |
boolean |
isNumControlBitsSupported(String systemName)
Determines if the manager supports multiple control bits, as the askNumControlBits will always return a value even if it is not supported |
Turnout |
newTurnout(String systemName,
String userName)
Return an instance with the specified system and user names. |
Turnout |
provideTurnout(String name)
Locate via user name, then system name if needed. |
void |
setDefaultClosedSpeed(String speed)
|
void |
setDefaultThrownSpeed(String speed)
|
char |
typeLetter()
|
| Methods inherited from class jmri.managers.AbstractManager |
|---|
addPropertyChangeListener, deregister, dispose, firePropertyChange, getBeanBySystemName, getInstanceBySystemName, getInstanceByUserName, getSystemNameArray, getSystemNameList, makeSystemName, propertyChange, register, registerSelf, removePropertyChangeListener, systemLetter |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface jmri.TurnoutManager |
|---|
getSystemNameList |
| Methods inherited from interface jmri.Manager |
|---|
addPropertyChangeListener, deregister, dispose, getBeanBySystemName, getSystemNameArray, getSystemPrefix, makeSystemName, register, removePropertyChangeListener, systemLetter |
| Constructor Detail |
|---|
public AbstractTurnoutManager()
| Method Detail |
|---|
public int getXMLOrder()
getXMLOrder in interface ManagergetXMLOrder in class AbstractManagerpublic char typeLetter()
typeLetter in interface Managerpublic Turnout provideTurnout(String name)
TurnoutManager
provideTurnout in interface TurnoutManagername - User name, system name, or address which
can be promoted to system name
public Turnout getTurnout(String name)
TurnoutManager
getTurnout in interface TurnoutManagerpublic Turnout getBySystemName(String name)
TurnoutManager
getBySystemName in interface TurnoutManagerpublic Turnout getByUserName(String key)
TurnoutManager
getByUserName in interface TurnoutManager
public Turnout newTurnout(String systemName,
String userName)
TurnoutManagerThis will always return a valid object reference; a new object will be created if necessary. In that case:
newTurnout in interface TurnoutManagerpublic String getClosedText()
getClosedText in interface TurnoutManagerpublic String getThrownText()
getThrownText in interface TurnoutManagerpublic int askNumControlBits(String systemName)
askNumControlBits in interface TurnoutManagerpublic boolean isNumControlBitsSupported(String systemName)
TurnoutManager
isNumControlBitsSupported in interface TurnoutManagerpublic int askControlType(String systemName)
askControlType in interface TurnoutManagerpublic boolean isControlTypeSupported(String systemName)
TurnoutManager
isControlTypeSupported in interface TurnoutManager
protected abstract Turnout createNewTurnout(String systemName,
String userName)
public String[] getValidOperationTypes()
TurnoutManager
getValidOperationTypes in interface TurnoutManagerpublic boolean allowMultipleAdditions(String systemName)
allowMultipleAdditions in interface TurnoutManager
public String createSystemName(String curAddress,
String prefix)
throws JmriException
TurnoutManager
createSystemName in interface TurnoutManagerJmriException
public String getNextValidAddress(String curAddress,
String prefix)
throws JmriException
TurnoutManager
getNextValidAddress in interface TurnoutManagercurAddress - - The hardware address of the turnout we which to check.prefix - - The System Prefix used to make up the systemName
JmriException
public void setDefaultClosedSpeed(String speed)
throws JmriException
setDefaultClosedSpeed in interface TurnoutManagerJmriException
public void setDefaultThrownSpeed(String speed)
throws JmriException
setDefaultThrownSpeed in interface TurnoutManagerJmriExceptionpublic String getDefaultThrownSpeed()
getDefaultThrownSpeed in interface TurnoutManagerpublic String getDefaultClosedSpeed()
getDefaultClosedSpeed in interface TurnoutManager
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||