org.objectweb.fractal.explorer.graph
Class FractalGraph

java.lang.Object
  extended by org.objectweb.fractal.explorer.graph.FractalGraph

public class FractalGraph
extends Object

Utilities class for graphic representation

Version:
September 2004
Author:
Alexandre Vandekerkhove

Constructor Summary
FractalGraph()
          Empty constructor
 
Method Summary
protected  void addBinds(org.objectweb.util.explorer.swing.graph.Graph graph, Component superComponent, org.objectweb.util.explorer.swing.graph.CompositeVertex composite)
          calls the graph method to represent all the binds between the sub-components of a composite component and the binds between the sub-components client interfaces and the server interfaces of the composite component
protected  void addInternalBinds(org.objectweb.util.explorer.swing.graph.Graph graph, Component superComponent, org.objectweb.util.explorer.swing.graph.CompositeVertex composite)
          calls the graph method in order to represent the internal edges of a composite component (edges between the internal client interfaces of the composite component and the external interfaces of the sub-components)
protected  void addNeighbors(Component component, org.objectweb.util.explorer.swing.graph.PrimitiveVertex primitiveVertex, org.objectweb.util.explorer.swing.graph.Graph graph, boolean controllersDisplay)
          This method draws the neigbors of a primitive component selected by the user neighbor = a component which is directly bound to the primitive component selected
protected  void addPortsComposite(Component component, org.objectweb.util.explorer.swing.graph.CompositeVertex composite)
          calls the graph method to represent all the ports on a composite component (around the border)
protected  void addPortsPrimitive(Component component, org.objectweb.util.explorer.swing.graph.PrimitiveVertex primitive)
          calls the graph method to represent all the ports on a primitive component represented without its super-component
protected  void addSubComponentPorts(org.objectweb.util.explorer.swing.graph.CompositeVertex composite, Component subComponent)
          adds all the ports of a sub-component of a composite component
protected  void addSubComponents(org.objectweb.util.explorer.swing.graph.Graph graph, Component superComponent, org.objectweb.util.explorer.swing.graph.CompositeVertex composite)
          adds all the sub-components of a composite component with their ports
protected  void drawBind(org.objectweb.util.explorer.swing.graph.Graph graph, Object component, String namePort, Object targetComponent, String nameTargetPort, org.objectweb.util.explorer.swing.graph.CompositeVertex composite, boolean isInternalEdge)
          Method to draw a bind and make the connection between 2 interfaces
 org.objectweb.util.explorer.swing.graph.Graph getFractalGraph(Component component)
          method to construct a graph which represents a component selected by the user If the component is a composite component, draws its sub-components with the interfaces and the binds
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FractalGraph

public FractalGraph()
Empty constructor

Method Detail

addPortsComposite

protected void addPortsComposite(Component component,
                                 org.objectweb.util.explorer.swing.graph.CompositeVertex composite)
calls the graph method to represent all the ports on a composite component (around the border)

Parameters:
component - the composite component to represent
composite - the (CompositeVertex) associated

addPortsPrimitive

protected void addPortsPrimitive(Component component,
                                 org.objectweb.util.explorer.swing.graph.PrimitiveVertex primitive)
calls the graph method to represent all the ports on a primitive component represented without its super-component

Parameters:
component - the primitive component to represent
primitive - the (PrimitiveVertex) associated

addNeighbors

protected void addNeighbors(Component component,
                            org.objectweb.util.explorer.swing.graph.PrimitiveVertex primitiveVertex,
                            org.objectweb.util.explorer.swing.graph.Graph graph,
                            boolean controllersDisplay)
This method draws the neigbors of a primitive component selected by the user neighbor = a component which is directly bound to the primitive component selected

Parameters:
component - the primitive component selected
primitiveVertex - the (PrimitiveVertex) associated
graph - the graph in which the components are represented
controllersDisplay - true : allows the display of the control interfaces

addSubComponentPorts

protected void addSubComponentPorts(org.objectweb.util.explorer.swing.graph.CompositeVertex composite,
                                    Component subComponent)
adds all the ports of a sub-component of a composite component

Parameters:
composite - the (CompositeVertex) associated to the composite component
subComponent - a sub-component

addSubComponents

protected void addSubComponents(org.objectweb.util.explorer.swing.graph.Graph graph,
                                Component superComponent,
                                org.objectweb.util.explorer.swing.graph.CompositeVertex composite)
adds all the sub-components of a composite component with their ports

Parameters:
graph - the graph in which the sub-components will be represented
superComponent - the composite component to represent
composite - the (CompositeVertex) associated

drawBind

protected void drawBind(org.objectweb.util.explorer.swing.graph.Graph graph,
                        Object component,
                        String namePort,
                        Object targetComponent,
                        String nameTargetPort,
                        org.objectweb.util.explorer.swing.graph.CompositeVertex composite,
                        boolean isInternalEdge)
Method to draw a bind and make the connection between 2 interfaces

Parameters:
graph - the graph in which the bind will be drawn
component - the client component
namePort - the name of the client interface
targetComponent - the server component
nameTargetPort - the name of the server interface
composite - the (CompositeVertex) which represents the super-component of the 2 components bound
isInternalEdge - true if the bind concerns an internal interface of the super-component

addBinds

protected void addBinds(org.objectweb.util.explorer.swing.graph.Graph graph,
                        Component superComponent,
                        org.objectweb.util.explorer.swing.graph.CompositeVertex composite)
calls the graph method to represent all the binds between the sub-components of a composite component and the binds between the sub-components client interfaces and the server interfaces of the composite component

Parameters:
graph - the graph in which the binds will be represented
superComponent - the composite component to represent
composite - the (CompositeVertex) associated

addInternalBinds

protected void addInternalBinds(org.objectweb.util.explorer.swing.graph.Graph graph,
                                Component superComponent,
                                org.objectweb.util.explorer.swing.graph.CompositeVertex composite)
calls the graph method in order to represent the internal edges of a composite component (edges between the internal client interfaces of the composite component and the external interfaces of the sub-components)

Parameters:
graph - the graph in which the binds will be represented
superComponent - the composite component to draw
composite - the (CompositeVertex) associated

getFractalGraph

public org.objectweb.util.explorer.swing.graph.Graph getFractalGraph(Component component)
method to construct a graph which represents a component selected by the user If the component is a composite component, draws its sub-components with the interfaces and the binds

Parameters:
component - the component selected by the user
Returns:
the (Graph) associated