Package jmri.jmrit.withrottle
Class TrackPowerController
- java.lang.Object
-
- jmri.jmrit.withrottle.AbstractController
-
- jmri.jmrit.withrottle.TrackPowerController
-
- All Implemented Interfaces:
java.beans.PropertyChangeListener
,java.util.EventListener
public class TrackPowerController extends AbstractController implements java.beans.PropertyChangeListener
Handle two-way communications regarding track power.
-
-
Field Summary
-
Fields inherited from class jmri.jmrit.withrottle.AbstractController
canBuildList, isValid, listeners, sysNameList
-
-
Constructor Summary
Constructors Constructor Description TrackPowerController()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
deregister()
Deregister as listener of NamedBeansvoid
handleMessage(java.lang.String message, DeviceServer deviceServer)
Break down a message and use it.void
propertyChange(java.beans.PropertyChangeEvent event)
void
register()
Register as listener of NamedBeans to be updated of changes.void
sendCurrentState()
boolean
verifyCreation()
isValid is used to indicate if the Controller is created.-
Methods inherited from class jmri.jmrit.withrottle.AbstractController
addControllerListener, buildList, checkCanBuildList, filterList, removeControllerListener
-
-
-
-
Constructor Detail
-
TrackPowerController
public TrackPowerController()
-
-
Method Detail
-
verifyCreation
public boolean verifyCreation()
Description copied from class:AbstractController
isValid is used to indicate if the Controller is created. If false, we can null the controller and reduce overhead.- Specified by:
verifyCreation
in classAbstractController
- Returns:
- isValid
-
handleMessage
public void handleMessage(java.lang.String message, DeviceServer deviceServer)
Description copied from class:AbstractController
Break down a message and use it.- Specified by:
handleMessage
in classAbstractController
- Parameters:
message
- message for controller to parse and take actiondeviceServer
- DeviceServer that sent this message, used to send response messages to proper client
-
sendCurrentState
public void sendCurrentState()
-
propertyChange
public void propertyChange(java.beans.PropertyChangeEvent event)
- Specified by:
propertyChange
in interfacejava.beans.PropertyChangeListener
-
register
public void register()
Description copied from class:AbstractController
Register as listener of NamedBeans to be updated of changes.- Specified by:
register
in classAbstractController
-
deregister
public void deregister()
Description copied from class:AbstractController
Deregister as listener of NamedBeans- Specified by:
deregister
in classAbstractController
-
-