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

    • 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_CheckBoxBulkAction

        protected adams.gui.core.BaseCheckBox m_CheckBoxBulkAction
        the checkbox for bulk actions.
      • m_ButtonPauseResume

        protected adams.gui.core.BaseButton m_ButtonPauseResume
        the button for pausing/resuming.
      • m_SkipBulkActionTrigger

        protected boolean m_SkipBulkActionTrigger
        whether to skip bulk triggers.
    • Constructor Detail

      • AbstractControlPanel

        public AbstractControlPanel()
    • Method Detail

      • initGUI

        protected void initGUI()
        Initializes the widgets.
        Overrides:
        initGUI in class adams.gui.core.BasePanel
      • finishInit

        protected void finishInit()
        Finishes the initialization.
        Overrides:
        finishInit in class adams.gui.core.BasePanel
      • 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
      • getCheckBoxBulkActionToolTipText

        protected String getCheckBoxBulkActionToolTipText()
        Returns the tool tip for the bulk action checkbox.
        Default implementation is null.
        Returns:
        the tip text
      • checkBoxBulkActionTrigger

        protected void checkBoxBulkActionTrigger​(boolean value)
        For custom actions when the bulk action checkbox is selected/unselected.
        Default implementation does nothing.
        Parameters:
        value - whether to check or uncheck
      • isBulkActionEnabled

        public boolean isBulkActionEnabled()
        Checks whether bulk action is enabled.
        Returns:
        true if enabled
      • setBulkActionEnabled

        public void setBulkActionEnabled​(boolean value)
        Sets whether bulk action is enabled.
        Parameters:
        value - true if enabled
      • setChecked

        public void setChecked​(boolean value)
        Sets the selected state of the bulk action checkbox. Only works if isBulkActionEnabled().
        Parameters:
        value - true if to check
        See Also:
        isBulkActionEnabled()
      • setChecked

        public void setChecked​(boolean value,
                               boolean trigger)
        Sets the selected state of the bulk action checkbox. Only works if isBulkActionEnabled().
        Parameters:
        value - true if to check
        See Also:
        isBulkActionEnabled()
      • pause

        public void pause()
        Pauses the rat.
      • resume

        public void resume()
        Resumes the rat.
      • pauseOrResume

        public void pauseOrResume()
        Pauses/resumes the rat.
      • updateButtons

        public void updateButtons()
        Updates the state of the buttons.
      • 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