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 booleanm_DebugOnwhether debugging is enabled.protected booleanm_Deprecatedwhether the actor is deprecated.protected ActorExecutionm_Executionhow to paint visual cues.protected booleanm_ForwardsInputwhether the input is forwarded to the sub-actors.protected booleanm_HasInputwhether actor accepts input.protected booleanm_HasOutputwhether the actor generates output.protected booleanm_HasSubActorswhether the actor has sub-actors.protected ImageIconm_Iconthe actual icon.protected doublem_ScaleFactorthe 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 booleangetDebugOn()Returns whether the actor has debugging enabled.ActorExecutiongetExecution()Returns how to paint the visual cues.booleangetForwardsInput()Returns whether the actor forwards the input to its sub-actors.ImageIcongetIcon()Returns the underlying icon.intgetIconHeight()The icon height.intgetIconWidth()The icon width.doublegetScaleFactor()Returns the scale factor in use.booleanhasInput()Returns whether the actor accepts input.booleanhasOutput()Returns whether the actor generates output.booleanhasSubActors()Returns whether the actor has sub-actors.booleanisDeprecated()Returns whether the actor is deprecated.protected voidpaintBackground(Graphics g, int x, int y, int w, int h)Pains the background of the icon.voidpaintIcon(Component c, Graphics g, int x, int y)Draws the icon.voidsetExecution(ActorExecution value)Sets how the visual cues are painted.StringtoString()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:
getIconWidthin interfaceIcon- Returns:
- the width
-
getIconHeight
public int getIconHeight()
The icon height.- Specified by:
getIconHeightin interfaceIcon- Returns:
- the height
-
-