com.googlecode.sarasvati.visual
Interface ProcessToImageMap

All Known Implementing Classes:
ProcessToImageMapAdapter

public interface ProcessToImageMap

Used to generate HTML Image maps of graph processes. It provides methods to generate hrefs and hovers for nodes and arcs.

Author:
Paul Lorenz

Method Summary
 boolean drawArcLabels(Arc arc)
          Controls drawing of arc labels
 String hoverForArc(VisualProcessArc arc)
          Every arc in a generated image of a graph process may have associated text which will pop-up when the arc is hovered over.
 String hoverForNode(VisualProcessNode node)
          Every node in a generated image of a graph process may have associated text which will pop-up when the node is hovered over.
 String hrefForArc(VisualProcessArc arc)
          Every arc in a generated image of a process graph may have a link for when the arc is clicked.
 String hrefForNode(VisualProcessNode node)
          Every node in a generated image of a graph process may have a link for when the node is clicked.
 Icon iconForNode(VisualProcessNode node)
          Each node may have a different Icon representing it in the generated image map.
 boolean isBackArc(Arc arc, boolean defaultValue)
          Controls if this arc should point backwards or forwards.
 

Method Detail

drawArcLabels

boolean drawArcLabels(Arc arc)
Controls drawing of arc labels

Parameters:
arc -
Returns:
true if arc labels should be rendered, false otherwise

isBackArc

boolean isBackArc(Arc arc,
                  boolean defaultValue)
Controls if this arc should point backwards or forwards.

Parameters:
arc - An arc in a process definition
defaultValue - True if the arc is calculated to be backwards based on a GraphTree
Returns:
True if the the arc is generally traversed going back to a previous point in the workflow

iconForNode

Icon iconForNode(VisualProcessNode node)
Each node may have a different Icon representing it in the generated image map. Override this method to specify which Icon to use for a given node.

Parameters:
node - The graph node needing an icon
Returns:
An icon representing the given node.

hrefForNode

String hrefForNode(VisualProcessNode node)
Every node in a generated image of a graph process may have a link for when the node is clicked. The link may be a regular http URL or a javascript: link. If null is returned, no link will be associated with the node.

Parameters:
node - The node to generate the HREF for
Returns:
An HREF for when the node is clicked in the generated image. May be null, in which case no link is generated.

hoverForNode

String hoverForNode(VisualProcessNode node)
Every node in a generated image of a graph process may have associated text which will pop-up when the node is hovered over. If null is returned, no hover will be created for the node.

Parameters:
node - The node to generate the hover for.
Returns:
An String to display in a hover when the node is moused over. May be null, in which case no hover will appear.

hrefForArc

String hrefForArc(VisualProcessArc arc)
Every arc in a generated image of a process graph may have a link for when the arc is clicked. The link may be a regular http URL or a javascript: link. If null is returned, no link will be associated with the arc.

Parameters:
arc - The arc to generate the HREF for
Returns:
An HREF for when the arc is clicked in the generated image. May be null, in which case no link is generated.

hoverForArc

String hoverForArc(VisualProcessArc arc)
Every arc in a generated image of a graph process may have associated text which will pop-up when the arc is hovered over. If null is returned, no hover will be created for the arc.

Parameters:
arc - The arc to generate the hover for.
Returns:
An String to display in a hover when the arc is moused over. May be null, in which case no hover will appear.


Copyright © 2012. All Rights Reserved.