Class Rats.RatStatusPanel

  • All Implemented Interfaces:
    com.googlecode.lanterna.gui2.Component, com.googlecode.lanterna.gui2.Container, com.googlecode.lanterna.gui2.TextGUIElement
    Enclosing class:
    Rats

    public static class Rats.RatStatusPanel
    extends com.googlecode.lanterna.gui2.Panel
    Panel for a single Rat.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected com.googlecode.lanterna.gui2.Button m_ButtonPauseResume
      the button for pause/resume.
      protected com.googlecode.lanterna.gui2.Button m_ButtonStopStart
      the button for stop/start.
      protected int m_ID
      the flow ID.
      protected com.googlecode.lanterna.gui2.Label m_LabelName
      the label.
      protected String m_Name
      the name of the rat.
      protected Rats m_Owner
      the owner.
      protected boolean m_Pausable
      whether it is pausable.
      protected boolean m_Paused
      whether it is paused.
      protected boolean m_Stoppable
      whether it is stoppable.
      protected boolean m_Stopped
      whether it is stopped.
    • Constructor Summary

      Constructors 
      Constructor Description
      RatStatusPanel​(Rats owner, int id, String name, boolean pausable, boolean paused, boolean stoppable, boolean stopped)
      Initializes the panel.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      com.googlecode.lanterna.gui2.Label getLabelName()
      Returns the label with the name.
      protected void initGUI()
      initializes the widgets.
      protected void pauseResume()
      Pauses/resumes the rat.
      protected void stopStart()
      Stops/starts the rat.
      • Methods inherited from class com.googlecode.lanterna.gui2.Panel

        addComponent, addComponent, calculatePreferredSize, containsComponent, createDefaultRenderer, getChildCount, getChildren, getLayoutManager, handleInput, invalidate, isInvalid, nextFocus, previousFocus, removeAllComponents, removeComponent, setLayoutManager, updateLookupMap
      • Methods inherited from class com.googlecode.lanterna.gui2.AbstractComponent

        addTo, draw, getBasePane, getLayoutData, getParent, getPosition, getPreferredSize, getRenderer, getSize, getTextGUI, getTheme, getThemeDefinition, hasParent, isInside, onAdded, onAfterDrawing, onBeforeDrawing, onRemoved, runOnGUIThreadIfExistsOtherwiseRunDirect, self, setLayoutData, setPosition, setPreferredSize, setRenderer, setSize, setTheme, toBasePane, toGlobal, withBorder
      • Methods inherited from interface com.googlecode.lanterna.gui2.Component

        addTo, getBasePane, getLayoutData, getParent, getPosition, getPreferredSize, getRenderer, getSize, getTextGUI, getTheme, getThemeDefinition, hasParent, isInside, onAdded, onRemoved, setLayoutData, setPosition, setPreferredSize, setSize, setTheme, toBasePane, toGlobal, withBorder
      • Methods inherited from interface com.googlecode.lanterna.gui2.TextGUIElement

        draw
    • Field Detail

      • m_Owner

        protected Rats m_Owner
        the owner.
      • m_ID

        protected int m_ID
        the flow ID.
      • m_Name

        protected String m_Name
        the name of the rat.
      • m_Pausable

        protected boolean m_Pausable
        whether it is pausable.
      • m_Paused

        protected boolean m_Paused
        whether it is paused.
      • m_Stoppable

        protected boolean m_Stoppable
        whether it is stoppable.
      • m_Stopped

        protected boolean m_Stopped
        whether it is stopped.
      • m_LabelName

        protected com.googlecode.lanterna.gui2.Label m_LabelName
        the label.
      • m_ButtonPauseResume

        protected com.googlecode.lanterna.gui2.Button m_ButtonPauseResume
        the button for pause/resume.
      • m_ButtonStopStart

        protected com.googlecode.lanterna.gui2.Button m_ButtonStopStart
        the button for stop/start.
    • Constructor Detail

      • RatStatusPanel

        public RatStatusPanel​(Rats owner,
                              int id,
                              String name,
                              boolean pausable,
                              boolean paused,
                              boolean stoppable,
                              boolean stopped)
        Initializes the panel.
        Parameters:
        owner - the owner
        id - the flow ID
        name - the name of the rat
        pausable - whether pausable at all
        paused - whether currently paused
        stoppable - whether stoppable at all
        stopped - whether currently stopped
    • Method Detail

      • initGUI

        protected void initGUI()
        initializes the widgets.
      • getLabelName

        public com.googlecode.lanterna.gui2.Label getLabelName()
        Returns the label with the name.
        Returns:
        the label
      • pauseResume

        protected void pauseResume()
        Pauses/resumes the rat.
      • stopStart

        protected void stopStart()
        Stops/starts the rat.