Package org.graffiti.attributes
Interface AttributeConsumer
- All Known Implementing Classes:
MatrixView
public interface AttributeConsumer
Interfaces an object, which depends on the presence of a set of attributes.
An attribute consumer specifies, which attributes should be available in a
node, edge and graph object. Each time, a node or an edge is created, the
specified attributes will be created by the graph instance. E.g.: a 2D view
depends on some graphics attributes ("graphics") in every node and
edge object. It implements this interface and returns a
CollectionAttribute
of these attributes and their default
values:
public CollectionAttribute getNodeAttribute() { return new NodeGraphicAttribute(); } public CollectionAttribute getEdgeAttribute() { return new EdgeGraphicAttribute(); }Every time, a new node- or edge-object is created, it will contain (deep-)copies of these collection attributes.
- Version:
- $Revision: 1.4 $
-
Method Summary
Modifier and Type Method Description CollectionAttribute
getEdgeAttribute()
Returns the attribute, which should be available in a edge object.CollectionAttribute
getGraphAttribute()
Returns the attribute, which should be available in a graph object.CollectionAttribute
getNodeAttribute()
Returns the attribute, which should be available in a node object.
-
Method Details
-
getEdgeAttribute
CollectionAttribute getEdgeAttribute()Returns the attribute, which should be available in a edge object. May returnnull
.- Returns:
- DOCUMENT ME!
-
getGraphAttribute
CollectionAttribute getGraphAttribute()Returns the attribute, which should be available in a graph object. May returnnull
.- Returns:
- DOCUMENT ME!
-
getNodeAttribute
CollectionAttribute getNodeAttribute()Returns the attribute, which should be available in a node object. May returnnull
.- Returns:
- DOCUMENT ME!
-