|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface GraphRepresentation
This is the interface that should be implemented by any class offering a representation for a Graph
instance.
A representation is supposed to be associated with the same Graph
instance throughout its entire lifetime.
This is why the associated Graph
instance should be set in the constructor of the GraphRepresentation
instance.
It is possible to use an instance of this interface also in a tree of representations, in which each representation has a parent.
The representation is based on RepresentationElement
instances, each being usually assigned to a graph
element (instance of VisualizableGraphComponent
). The elements of the representation are linked so that they
form a tree, rooted by the element returned by getRepresentation
.
Method Summary | |
---|---|
java.lang.Object |
displayRepresentation()
Depending on the nature of the representation, this method returns a way to visualize the representation. |
RepresentationElement |
getRepresentation()
Gets the root element of the representation. |
GraphRepresentation |
getRootRepresentation()
Gets the root representation of the tree of representation this instance is part of. |
GraphRepresentation |
setParentRepresentation(GraphRepresentation parent)
Set the parent representation in a multi-level graph representation. |
GraphRepresentation |
update()
Instructs the representation to update, since some elements of the graph may have changed. |
Method Detail |
---|
GraphRepresentation update()
FIXME: this is inefficient as it will cause the whole representation to update - there is no indication on what part of the graph has changed.
GraphRepresentation setParentRepresentation(GraphRepresentation parent)
The argument may be null
, to indicate this representation does not belong to a larger one, or is the
root of a larger representation.
parent
- : the parent representation.
GraphRepresentation getRootRepresentation()
GraphRepresentation
.RepresentationElement getRepresentation()
RepresentationElement
instance.java.lang.Object displayRepresentation()
String
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |