net.xqhs.graphs.representation
Interface VisualizableGraphComponent

All Known Implementing Classes:
AbstractVisualizableGraphComponent, ContextGraph.ContextEdge, EdgeP, HyperNode, NodeP, SettableEdge, SimpleEdge, SimpleNode

public interface VisualizableGraphComponent

This interface should be implemented by all classes that are associated with specific graph components and that are meant to be represented by means of GraphRepresentation objects.

The methods relate to managing the links between the component, the representation element, and the representation root.

Normally, an implementation of this interface keeps a list of existing representation elements and whole-graph representations for the component, that can be updated when the component changes.

Author:
Andrei Olaru

Method Summary
 void addRepresentation(RepresentationElement repr)
          Adds a new representation for this component (as a RepresentationElement) to the list of active representations.
 RepresentationElement getFirstRepresentationForRoot(GraphRepresentation representation)
          Gets the first (and potentially only) element representing this component that is part of the specified (multi-level) representation.
 java.util.Collection<RepresentationElement> getRepresentations()
          Gets a collection of the elements representing this component (in various representations).
 java.util.Collection<RepresentationElement> getRepresentationsForRoot(GraphRepresentation representation)
          Gets a collection of elements representing this component, filtered to match only the one(s) that belong to a particular (multi-level) representation.
 

Method Detail

addRepresentation

void addRepresentation(RepresentationElement repr)
Adds a new representation for this component (as a RepresentationElement) to the list of active representations.

Parameters:
repr - : the element representing this component.

getRepresentations

java.util.Collection<RepresentationElement> getRepresentations()
Gets a collection of the elements representing this component (in various representations).

Returns:
a collection of the representing elements.

getRepresentationsForRoot

java.util.Collection<RepresentationElement> getRepresentationsForRoot(GraphRepresentation representation)
Gets a collection of elements representing this component, filtered to match only the one(s) that belong to a particular (multi-level) representation.

Parameters:
representation - : the root representation to which the returned elements belong.
Returns:
the elements representing this component and belonging to the specified representation.

getFirstRepresentationForRoot

RepresentationElement getFirstRepresentationForRoot(GraphRepresentation representation)
Gets the first (and potentially only) element representing this component that is part of the specified (multi-level) representation.

Parameters:
representation - : the root representation to which the returned element should belong.
Returns:
the required representing element.