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.LoggingObjectAncestor 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 Tm_Actorthe actor to manage.protected Ratsm_Groupthe rats group this belongs to.protected RatControlm_Ownerthe owner.protected booleanm_PauseResumethe button for pausing/resuming.
-
Constructor Summary
Constructors Constructor Description AbstractControlState()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TgetActor()Returns the actor in use.RatsgetGroup()Returns the Rats group this control belongs to.RatControlgetOwner()Returns the RatControl actor this control belongs to.booleanisPausable()Returns whether the control panel is enabled.voidpause()Pauses the rat.voidpauseOrResume()Pauses/resumes the rat.voidresume()Resumes the rat.voidsetActor(T value)Sets the actor to manage.voidsetGroup(Rats value)Sets the Rats groups this control belongs to.voidsetOwner(RatControl value)Sets the RatControl actor this control belongs to.voidsetPausable(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
-
-