Package adams.gui.flow.tree
Class Renderer.ActorIcon
- java.lang.Object
-
- adams.gui.flow.tree.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 Summary
Fields Modifier and Type Field Description protected boolean
m_DebugOn
whether debugging is enabled.protected boolean
m_Deprecated
whether the actor is deprecated.protected ActorExecution
m_Execution
how to paint visual cues.protected boolean
m_ForwardsInput
whether the input is forwarded to the sub-actors.protected boolean
m_HasInput
whether actor accepts input.protected boolean
m_HasOutput
whether the actor generates output.protected boolean
m_HasSubActors
whether the actor has sub-actors.protected ImageIcon
m_Icon
the actual icon.protected double
m_ScaleFactor
the scale factor.
-
Constructor Summary
Constructors Constructor Description ActorIcon(ImageIcon icon, double scaleFactor, ActorExecution execution, boolean debugOn, boolean hasInput, boolean hasOutput, boolean hasSubActors, boolean forwardsInput, boolean deprecated)
Initializes the icon.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
getDebugOn()
Returns whether the actor has debugging enabled.ActorExecution
getExecution()
Returns how to paint the visual cues.boolean
getForwardsInput()
Returns whether the actor forwards the input to its sub-actors.ImageIcon
getIcon()
Returns the underlying icon.int
getIconHeight()
The icon height.int
getIconWidth()
The icon width.double
getScaleFactor()
Returns the scale factor in use.boolean
hasInput()
Returns whether the actor accepts input.boolean
hasOutput()
Returns whether the actor generates output.boolean
hasSubActors()
Returns whether the actor has sub-actors.boolean
isDeprecated()
Returns whether the actor is deprecated.protected void
paintBackground(Graphics g, int x, int y, int w, int h)
Pains the background of the icon.void
paintIcon(Component c, Graphics g, int x, int y)
Draws the icon.void
setExecution(ActorExecution value)
Sets how the visual cues are painted.String
toString()
Returns a short string description of the icon.
-
-
-
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 iconscaleFactor
- the scale factor (1.0 = default size)execution
- how to paint the visual cuesdebugOn
- whether debugging is onhasInput
- whether the actor accepts inputhasOutput
- whether the actor generates outputhasSubActors
- whether the actor has sub actorsforwardsInput
- whether the input is forwarded to the sub-actorsdeprecated
- 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 contextx
- the x positiony
- the y positionw
- the width of the iconh
- the height of the icon
-
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 interfaceIcon
- Returns:
- the width
-
getIconHeight
public int getIconHeight()
The icon height.- Specified by:
getIconHeight
in interfaceIcon
- Returns:
- the height
-
-