Package adams.flow.standalone.ratcontrol
Class AbstractControlState<T extends adams.flow.core.Actor & adams.core.Pausable>
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.flow.standalone.ratcontrol.AbstractControlState<T>
-
- All Implemented Interfaces:
adams.core.logging.LoggingSupporter
,adams.core.SizeOfHandler
,Serializable
- Direct Known Subclasses:
RatControlState
,RatsControlState
public abstract class AbstractControlState<T extends adams.flow.core.Actor & adams.core.Pausable> extends adams.core.logging.LoggingObject
Ancestor for control states.- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected T
m_Actor
the actor to manage.protected Rats
m_Group
the rats group this belongs to.protected RatControl
m_Owner
the owner.protected boolean
m_PauseResume
the button for pausing/resuming.
-
Constructor Summary
Constructors Constructor Description AbstractControlState()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description T
getActor()
Returns the actor in use.Rats
getGroup()
Returns the Rats group this control belongs to.RatControl
getOwner()
Returns the RatControl actor this control belongs to.boolean
isPausable()
Returns whether the control panel is enabled.void
pause()
Pauses the rat.void
pauseOrResume()
Pauses/resumes the rat.void
resume()
Resumes the rat.void
setActor(T value)
Sets the actor to manage.void
setGroup(Rats value)
Sets the Rats groups this control belongs to.void
setOwner(RatControl value)
Sets the RatControl actor this control belongs to.void
setPausable(boolean value)
Sets the "pauseable" state of the control panel.
-
-
-
Field Detail
-
m_Owner
protected RatControl m_Owner
the owner.
-
m_Group
protected Rats m_Group
the rats group this belongs to.
-
m_Actor
protected T extends adams.flow.core.Actor & adams.core.Pausable m_Actor
the actor to manage.
-
m_PauseResume
protected boolean m_PauseResume
the button for pausing/resuming.
-
-
Method Detail
-
setOwner
public void setOwner(RatControl value)
Sets the RatControl actor this control belongs to.- Parameters:
value
- the owner
-
getOwner
public RatControl getOwner()
Returns the RatControl actor this control belongs to.- Returns:
- the owner
-
setGroup
public void setGroup(Rats value)
Sets the Rats groups this control belongs to.- Parameters:
value
- the group
-
getGroup
public Rats getGroup()
Returns the Rats group this control belongs to.- Returns:
- the group
-
setActor
public void setActor(T value)
Sets the actor to manage.- Parameters:
value
- the actor
-
getActor
public T getActor()
Returns the actor in use.- Returns:
- the actor
-
pause
public void pause()
Pauses the rat.
-
resume
public void resume()
Resumes the rat.
-
pauseOrResume
public void pauseOrResume()
Pauses/resumes the rat.
-
setPausable
public void setPausable(boolean value)
Sets the "pauseable" state of the control panel.- Parameters:
value
- true if to enable
-
isPausable
public boolean isPausable()
Returns whether the control panel is enabled.- Returns:
- true if enabled
-
-