Class Renderer.ActorIcon

  • All Implemented Interfaces:
    Icon
    Direct Known Subclasses:
    Renderer.DisabledIcon
    Enclosing class:
    Renderer

    public static class Renderer.ActorIcon
    extends Object
    implements Icon
    Basic class for drawing icons for actors in the flow.
    Version:
    $Revision$
    Author:
    fracpete (fracpete at waikato dot ac dot nz)
    • Field Detail

      • m_Icon

        protected ImageIcon m_Icon
        the actual icon.
      • m_ScaleFactor

        protected double m_ScaleFactor
        the scale factor.
      • m_Execution

        protected ActorExecution m_Execution
        how to paint visual cues.
      • m_DebugOn

        protected boolean m_DebugOn
        whether debugging is enabled.
      • m_HasInput

        protected boolean m_HasInput
        whether actor accepts input.
      • m_HasOutput

        protected boolean m_HasOutput
        whether the actor generates output.
      • m_HasSubActors

        protected boolean m_HasSubActors
        whether the actor has sub-actors.
      • m_ForwardsInput

        protected boolean m_ForwardsInput
        whether the input is forwarded to the sub-actors.
      • m_Deprecated

        protected boolean m_Deprecated
        whether the actor is deprecated.
    • Constructor Detail

      • ActorIcon

        public ActorIcon​(ImageIcon icon,
                         double scaleFactor,
                         ActorExecution execution,
                         boolean debugOn,
                         boolean hasInput,
                         boolean hasOutput,
                         boolean hasSubActors,
                         boolean forwardsInput,
                         boolean deprecated)
        Initializes the icon.
        Parameters:
        icon - the actual icon
        scaleFactor - the scale factor (1.0 = default size)
        execution - how to paint the visual cues
        debugOn - whether debugging is on
        hasInput - whether the actor accepts input
        hasOutput - whether the actor generates output
        hasSubActors - whether the actor has sub actors
        forwardsInput - whether the input is forwarded to the sub-actors
        deprecated - whether the actor is deprecated
    • Method Detail

      • paintBackground

        protected void paintBackground​(Graphics g,
                                       int x,
                                       int y,
                                       int w,
                                       int h)
        Pains the background of the icon.
        Parameters:
        g - the graphics context
        x - the x position
        y - the y position
        w - the width of the icon
        h - the height of the icon
      • paintIcon

        public void paintIcon​(Component c,
                              Graphics g,
                              int x,
                              int y)
        Draws the icon.
        Specified by:
        paintIcon in interface Icon
        Parameters:
        c - the component to draw it on
        g - the graphics context
        x - the x position
        y - the y position
      • getIcon

        public ImageIcon getIcon()
        Returns the underlying icon.
        Returns:
        the actual icon
      • getScaleFactor

        public double getScaleFactor()
        Returns the scale factor in use.
        Returns:
        the scale factor
      • setExecution

        public void setExecution​(ActorExecution value)
        Sets how the visual cues are painted.
        Parameters:
        value - how to paint the cues
      • getExecution

        public ActorExecution getExecution()
        Returns how to paint the visual cues.
        Returns:
        how to paint the visual cues
      • getDebugOn

        public boolean getDebugOn()
        Returns whether the actor has debugging enabled.
        Returns:
        true if the actor has debugging enabled
      • hasInput

        public boolean hasInput()
        Returns whether the actor accepts input.
        Returns:
        true if the actor accepts input
      • hasOutput

        public boolean hasOutput()
        Returns whether the actor generates output.
        Returns:
        true if the actor generates output
      • hasSubActors

        public boolean hasSubActors()
        Returns whether the actor has sub-actors.
        Returns:
        true if the actor manages actors
      • getForwardsInput

        public boolean getForwardsInput()
        Returns whether the actor forwards the input to its sub-actors.
        Returns:
        true if the actor forwards the data to its sub-actors
      • isDeprecated

        public boolean isDeprecated()
        Returns whether the actor is deprecated.
        Returns:
        true if the actor is deprecated
      • getIconWidth

        public int getIconWidth()
        The icon width.
        Specified by:
        getIconWidth in interface Icon
        Returns:
        the width
      • getIconHeight

        public int getIconHeight()
        The icon height.
        Specified by:
        getIconHeight in interface Icon
        Returns:
        the height
      • toString

        public String toString()
        Returns a short string description of the icon.
        Overrides:
        toString in class Object
        Returns:
        the description