jmri.implementation
Class AbstractSignalMast

Show UML class diagram
java.lang.Object
  extended by jmri.implementation.AbstractNamedBean
      extended by jmri.implementation.AbstractSignalMast
All Implemented Interfaces:
Serializable, NamedBean, SignalMast
Direct Known Subclasses:
SignalHeadSignalMast

public abstract class AbstractSignalMast
extends AbstractNamedBean
implements SignalMast, Serializable

Abstract class providing the basic logic of the SignalMast interface.

See Also:
Serialized Form

Field Summary
 
Fields inherited from interface jmri.NamedBean
INCONSISTENT, UNKNOWN
 
Constructor Summary
AbstractSignalMast(String systemName)
           
AbstractSignalMast(String systemName, String userName)
           
 
Method Summary
 String getAspect()
          Get current aspect name.
 String getSpeed()
           
 int getState()
          The state is the index of the current aspect in the list of possible aspects.
 void setAspect(String aspect)
          Set aspect to a valid name in the current signal system definition.
 void setState(int i)
          Provide generic access to internal state.
 
Methods inherited from class jmri.implementation.AbstractNamedBean
addPropertyChangeListener, dispose, getComment, getDisplayName, getNumPropertyChangeListeners, getProperty, getPropertyChangeListeners, getPropertyKeys, getSystemName, getUserName, removePropertyChangeListener, setComment, setProperty, setUserName
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface jmri.SignalMast
getAppearanceMap, getSignalSystem, getValidAspects
 
Methods inherited from interface jmri.NamedBean
addPropertyChangeListener, dispose, getComment, getDisplayName, getNumPropertyChangeListeners, getProperty, getPropertyKeys, getSystemName, getUserName, removePropertyChangeListener, setComment, setProperty, setUserName
 

Constructor Detail

AbstractSignalMast

public AbstractSignalMast(String systemName,
                          String userName)

AbstractSignalMast

public AbstractSignalMast(String systemName)
Method Detail

setAspect

public void setAspect(String aspect)
Description copied from interface: SignalMast
Set aspect to a valid name in the current signal system definition.

Specified by:
setAspect in interface SignalMast

getAspect

public String getAspect()
Description copied from interface: SignalMast
Get current aspect name. This is a bound property.

Specified by:
getAspect in interface SignalMast
Returns:
null if not yet set

getSpeed

public String getSpeed()

getState

public int getState()
The state is the index of the current aspect in the list of possible aspects.

Specified by:
getState in interface NamedBean

setState

public void setState(int i)
Description copied from interface: NamedBean
Provide generic access to internal state.

This generally shouldn't be used by Java code; use the class-specific form instead. (E.g. setCommandedState in Turnout) This provided to make Jython script access easier to read.

Specified by:
setState in interface NamedBean


Copyright © 1997 - 2010 JMRI Community.
JMRI, DecoderPro, PanelPro, SoundPro, DispatcherPro and associated logos are our trademarks.

Additional information on copyright, trademarks and licenses is linked here.
Site hosted by: Get JMRI Model Railroad Interface at SourceForge.net. Fast, secure and Free Open Source software downloads