Package adams.flow.standalone.ratcontrol
Class RatControlState
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.flow.standalone.ratcontrol.AbstractControlState<Rat>
-
- adams.flow.standalone.ratcontrol.RatControlState
-
- All Implemented Interfaces:
adams.core.logging.LoggingSupporter
,adams.core.SizeOfHandler
,Serializable
public class RatControlState extends AbstractControlState<Rat>
Control state forRat
actor.- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
m_StopStart
the button for stopping/starting.-
Fields inherited from class adams.flow.standalone.ratcontrol.AbstractControlState
m_Actor, m_Group, m_Owner, m_PauseResume
-
-
Constructor Summary
Constructors Constructor Description RatControlState()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isStoppable()
Returns whether the "stoppable" state of the control state is enabled.void
setStoppable(boolean value)
Sets the "stoppable" state of the control staet.String
start()
Starts the rat.String
stop()
Stops the rat.String
stopOrStart()
Stops/starts the rat.void
updateButtons()
Updates the state of the buttons.-
Methods inherited from class adams.flow.standalone.ratcontrol.AbstractControlState
getActor, getGroup, getOwner, isPausable, pause, pauseOrResume, resume, setActor, setGroup, setOwner, setPausable
-
-
-
-
Method Detail
-
stop
public String stop()
Stops the rat.- Returns:
- null if successful, otherwise error message
-
start
public String start()
Starts the rat.- Returns:
- null if successful, otherwise error message
-
stopOrStart
public String stopOrStart()
Stops/starts the rat.- Returns:
- null if successful, otherwise error message
-
updateButtons
public void updateButtons()
Updates the state of the buttons.
-
setStoppable
public void setStoppable(boolean value)
Sets the "stoppable" state of the control staet.- Parameters:
value
- true if to enable
-
isStoppable
public boolean isStoppable()
Returns whether the "stoppable" state of the control state is enabled.- Returns:
- true if enabled
-
-