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 forRatactor.- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected booleanm_StopStartthe 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 booleanisStoppable()Returns whether the "stoppable" state of the control state is enabled.voidsetStoppable(boolean value)Sets the "stoppable" state of the control staet.Stringstart()Starts the rat.Stringstop()Stops the rat.StringstopOrStart()Stops/starts the rat.voidupdateButtons()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
-
-