org.grinvin.gred

Class GraphBundleWithModels

Implemented Interfaces:
GraphBundle, GraphBundleView

public class GraphBundleWithModels
extends DefaultGraphBundle

Implementation of GraphBundle which uses a DefaultGraphModel to represent a graph and uses a DefaultEmbeddingModel to represent an embedding.

Field Summary

Fields inherited from class org.grinvin.graphs.DefaultGraphBundle

InvariantValue>invariantValues, annotations, embeddings, graph, graphIconFactory, listeners, properties

Method Summary

DefaultAnnotationModel
createAnnotation()
This implementation creates an annotation of type DefaultAnnotationModel.
DefaultEmbeddingModel
createEmbedding()
This implementation creates an embedding of type DefaultEmbeddingModel.
DefaultGraphModel
createGraph()
This implementation creates a graph of type DefaultGraphModel.
DefaultAnnotationModel
getAnnotation()
Return the default annotation for this graph, or null if no such annotation is stored in the bundle.
DefaultAnnotationModel
getAnnotation(int index)
Return the annotation with the given index.
DefaultEmbeddingModel
getEmbedding()
Return the default embedding for this graph, or null if no such embedding is stored in the bundle.
DefaultEmbeddingModel
getEmbedding(int index)
Return the embedding with given index.
DefaultGraphModel
getGraph()
Abstract graph representation for this graph bundle.

Methods inherited from class org.grinvin.graphs.DefaultGraphBundle

addGraphBundleListener, addInvariantValue, adjacencyList, booleanAdjacencyMatrix, createAnnotation, createEmbedding, createGraph, distanceMatrix, eccentricityList, fireGraphBundleChanged, getAnnotation, getAnnotation, getAnnotationCount, getCachedInvariantValue, getDescription, getEmbedding, getEmbedding, getEmbeddingCount, getGraph, getGraphIconFactory, getInvariantValue, getInvariantValues, getInvariants, getName, getProperties, invalidate, invalidate, removeGraphBundleListener, setGraphIconFactory, setProperties

Method Details

createAnnotation

public DefaultAnnotationModel createAnnotation()
This implementation creates an annotation of type DefaultAnnotationModel.
Specified by:
createAnnotation in interface GraphBundle
Overrides:
createAnnotation in interface DefaultGraphBundle

createEmbedding

public DefaultEmbeddingModel createEmbedding()
This implementation creates an embedding of type DefaultEmbeddingModel.
Specified by:
createEmbedding in interface GraphBundle
Overrides:
createEmbedding in interface DefaultGraphBundle

createGraph

public DefaultGraphModel createGraph()
This implementation creates a graph of type DefaultGraphModel.
Specified by:
createGraph in interface GraphBundle
Overrides:
createGraph in interface DefaultGraphBundle

getAnnotation

public DefaultAnnotationModel getAnnotation()
Return the default annotation for this graph, or null if no such annotation is stored in the bundle. The peer of this annotation is the graph returned by GraphBundleView.getGraph().
Specified by:
getAnnotation in interface GraphBundleView
Overrides:
getAnnotation in interface DefaultGraphBundle

getAnnotation

public DefaultAnnotationModel getAnnotation(int index)
Return the annotation with the given index. The peer of this annotation is the graph returned by GraphBundleView.getGraph().
Specified by:
getAnnotation in interface GraphBundleView
Overrides:
getAnnotation in interface DefaultGraphBundle

getEmbedding

public DefaultEmbeddingModel getEmbedding()
Return the default embedding for this graph, or null if no such embedding is stored in the bundle. The peer of this embedding is the graph returned by GraphBundleView.getGraph().
Specified by:
getEmbedding in interface GraphBundleView
Overrides:
getEmbedding in interface DefaultGraphBundle

getEmbedding

public DefaultEmbeddingModel getEmbedding(int index)
Return the embedding with given index. Index 0 corresponds to the default embedding. The peer of this embedding is the graph returned by GraphBundleView.getGraph().
Specified by:
getEmbedding in interface GraphBundleView
Overrides:
getEmbedding in interface DefaultGraphBundle

getGraph

public DefaultGraphModel getGraph()
Abstract graph representation for this graph bundle.
Specified by:
getGraph in interface GraphBundle
getGraph in interface GraphBundleView
Overrides:
getGraph in interface DefaultGraphBundle