com.googlecode.sarasvati.visual
Class DefaultProcessLookAndFeel

java.lang.Object
  extended by com.googlecode.sarasvati.visual.DefaultProcessLookAndFeel
All Implemented Interfaces:
ProcessLookAndFeel

public class DefaultProcessLookAndFeel
extends Object
implements ProcessLookAndFeel

Generates widgets using a TaskIcon for nodes of type 'task', and DefaultNodeIcon for all other node types.

Author:
Paul Lorenz

Field Summary
protected  boolean drawArcLabels
           
protected  boolean drawSelfArcs
           
static DefaultProcessLookAndFeel INSTANCE
           
 
Constructor Summary
DefaultProcessLookAndFeel(boolean drawSelfArcs, boolean drawArcLabels)
           
 
Method Summary
 boolean drawArcLabels(Arc arc)
          Controls if arc labels should be drawn.
 boolean drawSelfArcs(Arc arc)
          Controls if self arcs should be drawn to the given arc.
protected  String getTaskType()
           
 boolean isBackArc(Arc arc, boolean defaultValue)
          Controls if this arc should point backwards or forwards.
 Icon newIconForNode(VisualProcessNode node)
           
 org.netbeans.api.visual.widget.Widget newWidget(VisualProcessNode node, SarasvatiProcessScene scene)
          Returns a new Widget to represent the given VisualProcessNode.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INSTANCE

public static final DefaultProcessLookAndFeel INSTANCE

drawSelfArcs

protected boolean drawSelfArcs

drawArcLabels

protected boolean drawArcLabels
Constructor Detail

DefaultProcessLookAndFeel

public DefaultProcessLookAndFeel(boolean drawSelfArcs,
                                 boolean drawArcLabels)
Method Detail

drawArcLabels

public boolean drawArcLabels(Arc arc)
Description copied from interface: ProcessLookAndFeel
Controls if arc labels should be drawn.

Specified by:
drawArcLabels in interface ProcessLookAndFeel
Parameters:
arc - An arc in a process definition
Returns:
True if arc labels should be drawn, false otherwise

drawSelfArcs

public boolean drawSelfArcs(Arc arc)
Description copied from interface: ProcessLookAndFeel
Controls if self arcs should be drawn to the given arc.

Specified by:
drawSelfArcs in interface ProcessLookAndFeel
Parameters:
arc - An arc in a process definition
Returns:
True if self arcs should be drawn, false otherwise

newIconForNode

public Icon newIconForNode(VisualProcessNode node)

newWidget

public org.netbeans.api.visual.widget.Widget newWidget(VisualProcessNode node,
                                                       SarasvatiProcessScene scene)
Description copied from interface: ProcessLookAndFeel
Returns a new Widget to represent the given VisualProcessNode.

Specified by:
newWidget in interface ProcessLookAndFeel
Parameters:
node - The node we need a widget for
scene - The scene the widget is created in
Returns:
A new widget for the given node

getTaskType

protected String getTaskType()

isBackArc

public boolean isBackArc(Arc arc,
                         boolean defaultValue)
Description copied from interface: ProcessLookAndFeel
Controls if this arc should point backwards or forwards.

Specified by:
isBackArc in interface ProcessLookAndFeel
Parameters:
arc - An arc in a process definition
defaultValue - The calculated value based on the relative positions in a GraphTree
Returns:
True if the the arc is generally traversed going back to a previous point in the workflow


Copyright © 2012. All Rights Reserved.