org.tigris.gef.graph.presentation
Class DefaultGraphEdgeRenderer

java.lang.Object
  extended by org.tigris.gef.graph.presentation.DefaultGraphEdgeRenderer
All Implemented Interfaces:
java.io.Serializable, GraphEdgeRenderer

public class DefaultGraphEdgeRenderer
extends java.lang.Object
implements GraphEdgeRenderer, java.io.Serializable

An interface for FigEdge factories. Similiar in concept to the Swing class TreeCellRenderer.

See Also:
NetEdge.presentationFor(org.tigris.gef.base.Layer), Serialized Form

Constructor Summary
DefaultGraphEdgeRenderer()
           
 
Method Summary
 FigEdge getFigEdgeFor(GraphModel graph, Layer lay, java.lang.Object edge, java.util.Map styleAttributes)
          Return a Fig that can be used to represent the given Edge
 FigEdge getFigEdgeFor(java.lang.Object edge, java.util.Map styleAttributes)
          Return a Fig that can be used to represent the given Edge
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultGraphEdgeRenderer

public DefaultGraphEdgeRenderer()
Method Detail

getFigEdgeFor

public FigEdge getFigEdgeFor(GraphModel graph,
                             Layer lay,
                             java.lang.Object edge,
                             java.util.Map styleAttributes)
Return a Fig that can be used to represent the given Edge

Specified by:
getFigEdgeFor in interface GraphEdgeRenderer
Parameters:
graph - the model in which to place the FigEdge
lay - the layer in which to place the FigEdge
edge - the model element from which to create the FigEdge
styleAttributes - an optional map of attributes to style the fig. return the new FigEdge

getFigEdgeFor

public FigEdge getFigEdgeFor(java.lang.Object edge,
                             java.util.Map styleAttributes)
Return a Fig that can be used to represent the given Edge

Specified by:
getFigEdgeFor in interface GraphEdgeRenderer
Parameters:
edge - the model element from which to create the FigEdge
styleAttributes - an optional map of attributes to style the fig. return the new FigEdge