Class AbstractControlState<T extends adams.flow.core.Actor & adams.core.Pausable>

  • 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 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.
    • Constructor Detail

      • AbstractControlState

        public AbstractControlState()
    • 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