org.tigris.gef.graph.presentation
Class DefaultGraphNodeRenderer

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

public class DefaultGraphNodeRenderer
extends java.lang.Object
implements GraphNodeRenderer, java.io.Serializable

An interface for FigNode factories. Similiar in concept to the Swing class TreeCellRenderer. This Default class asks the NetNode to make its own FigNode.

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

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

Constructor Detail

DefaultGraphNodeRenderer

public DefaultGraphNodeRenderer()
Method Detail

getFigNodeFor

public FigNode getFigNodeFor(GraphModel graph,
                             Layer lay,
                             java.lang.Object node,
                             java.util.Map styleAttributes)
Return a Fig that can be used to represent the given node

Specified by:
getFigNodeFor in interface GraphNodeRenderer
Parameters:
graph - the model in which to place the FigNode
lay - the layer in which to place the FigNode
node - the model element from which to create the FigNode
styleAttributes - an optional map of attributes to style the fig. return the new FigNode

getFigNodeFor

public FigNode getFigNodeFor(java.lang.Object node,
                             java.util.Map styleAttributes)
Return a Fig that can be used to represent the given node

Specified by:
getFigNodeFor in interface GraphNodeRenderer
Parameters:
node - the model element from which to create the FigNode
styleAttributes - an optional map of attributes to style the fig. return the new FigNode