com.rapidminer.gui.graphs
Interface GraphCreator<V,E>

All Known Implementing Classes:
AssociationRulesGraphCreator, ClusterModelGraphCreator, GraphCreatorAdaptor, SimilarityGraphCreator, TransitionGraphCreator, TreeModelGraphCreator

public interface GraphCreator<V,E>

Creates a graph which can be displayed by the graph viewer. This class serves as a sort of graph model combined with some methods tuning the displaying of nodes and edges in the graph.

Author:
Ingo Mierswa

Field Summary
static int EDGE_SHAPE_BENT_LINE
           
static int EDGE_SHAPE_CUBIC_CURVE
           
static int EDGE_SHAPE_LINE
           
static int EDGE_SHAPE_QUAD_CURVE
           
static int EDGE_SHAPE_WEDGE
           
 
Method Summary
 edu.uci.ics.jung.graph.Graph<V,E> createGraph()
          Creates the graph.
 edu.uci.ics.jung.visualization.renderers.Renderer.EdgeLabel<V,E> getEdgeLabelRenderer()
          Returns the renderer for edge labels.
 java.lang.String getEdgeName(E id)
          Returns the text that should be displayed at the edge with the given id.
 int getEdgeShape()
          Returns the shape of the edges.
 double getEdgeStrength(E id)
          Returns the strength of the edge.
 int getLabelOffset()
          Returns the label offset.
 int getMinLeafHeight()
          Returns the minimal height for leafs.
 int getMinLeafWidth()
          Returns the minimal width for leafs.
 int getNumberOfOptionComponents()
          Returns the number of option componenents which will be added to the control panel of the GraphViewer.
 java.lang.Object getObject(V id)
          Returns the object for the given id, e.g. a cluster node.
 GraphObjectViewer getObjectViewer()
          Returns the viewer for objects.
 javax.swing.JComponent getOptionComponent(GraphViewer viewer, int index)
          Returns the desired option componenents which will be added to the control panel of the GraphViewer.
 edu.uci.ics.jung.visualization.renderers.Renderer.VertexLabel<V,E> getVertexLabelRenderer()
          Returns the renderer used for node labels.
 java.lang.String getVertexName(V id)
          Returns the name that should be displayed in each vertex.
 org.apache.commons.collections15.Transformer<V,java.awt.Paint> getVertexPaintTransformer(edu.uci.ics.jung.visualization.VisualizationViewer<V,E> viewer)
          Returns the transformer which maps vertices to the paint (color) used for drawing.
 edu.uci.ics.jung.visualization.renderers.Renderer.Vertex<V,E> getVertexRenderer()
          Returns the renderer used for the nodes.
 java.lang.String getVertexToolTip(V id)
          Returns the text that should be displayed as tool tip for each vertex.
 boolean isBold(V id)
          Returns true if the vertex with the given id should use a bold font.
 boolean isEdgeLabelDecorating()
          Returns true if the edge label should be decorated.
 boolean isLeaf(V id)
          Returns true if the node with the given id is a leaf.
 boolean isRotatingEdgeLabels()
          Returns true if the edge labels should be rotated.
 boolean showEdgeLabelsDefault()
          Indicates if the edge labels should be initially shown.
 boolean showVertexLabelsDefault()
          Indicates if the vertex labels should be initially shown.
 

Field Detail

EDGE_SHAPE_LINE

static final int EDGE_SHAPE_LINE
See Also:
Constant Field Values

EDGE_SHAPE_QUAD_CURVE

static final int EDGE_SHAPE_QUAD_CURVE
See Also:
Constant Field Values

EDGE_SHAPE_CUBIC_CURVE

static final int EDGE_SHAPE_CUBIC_CURVE
See Also:
Constant Field Values

EDGE_SHAPE_BENT_LINE

static final int EDGE_SHAPE_BENT_LINE
See Also:
Constant Field Values

EDGE_SHAPE_WEDGE

static final int EDGE_SHAPE_WEDGE
See Also:
Constant Field Values
Method Detail

createGraph

edu.uci.ics.jung.graph.Graph<V,E> createGraph()
Creates the graph.


getVertexName

java.lang.String getVertexName(V id)
Returns the name that should be displayed in each vertex. May return null (no name will be shown for this node).


getVertexToolTip

java.lang.String getVertexToolTip(V id)
Returns the text that should be displayed as tool tip for each vertex. May return null (no tool tip will be shown for this node).


getEdgeName

java.lang.String getEdgeName(E id)
Returns the text that should be displayed at the edge with the given id. May return null (no text will be shown for this edge).


getEdgeStrength

double getEdgeStrength(E id)
Returns the strength of the edge. Should be normalized between 0 and 1.


getEdgeShape

int getEdgeShape()
Returns the shape of the edges. Must be one out of the constants EDGE_SHAPE_LINE, EDGE_SHAPE_QUAD_CURVE, EDGE_SHAPE_CUBIC_CURVE, EDGE_SHAPE_BENT_LINE, or EDGE_SHAPE_WEDGE.


getMinLeafHeight

int getMinLeafHeight()
Returns the minimal height for leafs. Might be important for graphs where the leafs should be rendered in some specialized way. May return -1 (no minimal height).


getMinLeafWidth

int getMinLeafWidth()
Returns the minimal width for leafs. Might be important for graphs where the leafs should be rendered in some specialized way. May return -1 (no minimal width).


isBold

boolean isBold(V id)
Returns true if the vertex with the given id should use a bold font.


isRotatingEdgeLabels

boolean isRotatingEdgeLabels()
Returns true if the edge labels should be rotated.


getVertexPaintTransformer

org.apache.commons.collections15.Transformer<V,java.awt.Paint> getVertexPaintTransformer(edu.uci.ics.jung.visualization.VisualizationViewer<V,E> viewer)
Returns the transformer which maps vertices to the paint (color) used for drawing. May return null.


getVertexRenderer

edu.uci.ics.jung.visualization.renderers.Renderer.Vertex<V,E> getVertexRenderer()
Returns the renderer used for the nodes. May return null (use default renderer).


getVertexLabelRenderer

edu.uci.ics.jung.visualization.renderers.Renderer.VertexLabel<V,E> getVertexLabelRenderer()
Returns the renderer used for node labels. May return null (use default renderer).


getEdgeLabelRenderer

edu.uci.ics.jung.visualization.renderers.Renderer.EdgeLabel<V,E> getEdgeLabelRenderer()
Returns the renderer for edge labels. May return null (use default renderer).


isEdgeLabelDecorating

boolean isEdgeLabelDecorating()
Returns true if the edge label should be decorated.


isLeaf

boolean isLeaf(V id)
Returns true if the node with the given id is a leaf.


getObjectViewer

GraphObjectViewer getObjectViewer()
Returns the viewer for objects. Will be notified after clicks on nodes. May return null (no object viewer is used).


getObject

java.lang.Object getObject(V id)
Returns the object for the given id, e.g. a cluster node. The result of this method will be given to the object viewer after a mouse click.


getNumberOfOptionComponents

int getNumberOfOptionComponents()
Returns the number of option componenents which will be added to the control panel of the GraphViewer.


getOptionComponent

javax.swing.JComponent getOptionComponent(GraphViewer viewer,
                                          int index)
Returns the desired option componenents which will be added to the control panel of the GraphViewer.


getLabelOffset

int getLabelOffset()
Returns the label offset. In most case, using -1 is just fine (default offset). Some tree like graphs might prefer to use 0 since they manage the offset themself.


showEdgeLabelsDefault

boolean showEdgeLabelsDefault()
Indicates if the edge labels should be initially shown.


showVertexLabelsDefault

boolean showVertexLabelsDefault()
Indicates if the vertex labels should be initially shown.



Copyright © 2001-2009 by Rapid-I