fcmodeler.mapping
Class MappingUtility

java.lang.Object
  |
  +--fcmodeler.mapping.MappingUtility

public class MappingUtility
extends java.lang.Object

A utility class containing methods used to update the appearance of node and edge figures based on properties of thier corresponding nodes and edges.

Since:
JDK1.3
Version:
$Revision: 1.1 $
Author:
Julie Dickerson , Zach Cox

Method Summary
static void map(diva.graph.model.Graph graph, java.util.Set nodeMappings, java.util.Set edgeMappings, diva.graph.GraphView view, boolean permanent)
          Maps the property values of the nodes and edges in the graph to visual attribute values of the corresponding node and edge figures in the view using the specified node and edge mapping rules.
static void mapEdges(java.util.Iterator edges, java.util.Set edgeMappings, diva.graph.GraphView view, boolean permanent)
          Maps the property values of the edges to visual attributes of the corresponding edge figures in the view using the specified edge mapping rules.
static void mapNodes(java.util.Iterator nodes, java.util.Set nodeMappings, diva.graph.GraphView view, boolean permanent)
          Maps the property values of the nodes in the graph to visual attributes of the corresponding node figures in the view using the specified node mapping rules.
static void usePermanents(diva.graph.GraphView view)
          Calls the usePermanents method on all node and edge figures in the graph view.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

map

public static void map(diva.graph.model.Graph graph,
                       java.util.Set nodeMappings,
                       java.util.Set edgeMappings,
                       diva.graph.GraphView view,
                       boolean permanent)
Maps the property values of the nodes and edges in the graph to visual attribute values of the corresponding node and edge figures in the view using the specified node and edge mapping rules.
Parameters:
graph - the graph containing the nodes and edges.
nodeMappings - the set of node mappings.
edgeMappings - the set of edge mappings.
view - the graph view.
permanent - if set to true, the permanent visual attributes will be updated.

mapEdges

public static void mapEdges(java.util.Iterator edges,
                            java.util.Set edgeMappings,
                            diva.graph.GraphView view,
                            boolean permanent)
Maps the property values of the edges to visual attributes of the corresponding edge figures in the view using the specified edge mapping rules.
Parameters:
edges - the edges.
edgeMappings - the set of edge mappings.
view - the graph view.
permanent - if set to true, the permanent visual attriubtes will be update.

mapNodes

public static void mapNodes(java.util.Iterator nodes,
                            java.util.Set nodeMappings,
                            diva.graph.GraphView view,
                            boolean permanent)
Maps the property values of the nodes in the graph to visual attributes of the corresponding node figures in the view using the specified node mapping rules.
Parameters:
nodes - the nodes.
nodeMappings - the set of node mappings.
view - the graph view.
permanent - if set to true, the permanent visual attriubtes will be update.

usePermanents

public static void usePermanents(diva.graph.GraphView view)
Calls the usePermanents method on all node and edge figures in the graph view.
Parameters:
view - the graph view with the node and edge figures.