org.grinvin.graphs

Class DefaultAnnotationModel

Implemented Interfaces:
Annotation, AnnotationModel, AnnotationView, MutableAnnotationModel

public class DefaultAnnotationModel
extends DefaultAnnotation
implements MutableAnnotationModel

Constructor Summary

DefaultAnnotationModel(GraphView peer)
Create an annotation for the given peer graph.

Method Summary

void
addAnnotationListener(AnnotationListener l)
Register a annotation listener with this model.
void
fireAnnotationChanged()
Notify all listeners of the fact that the entire annotation was changed.
void
fireElementAnnotationChanged(Element element)
Notify all listeners of the fact that the annotation of an element was changed.
void
removeAnnotationListener(AnnotationListener l)
Unregister a previously registered annotation listener.
@Override
void copy(AnnotationView original)
@Override
void copy(AnnotationView original, GraphView newPeer)
@Override
void setAnnotation(Edge edge, Object annotation)
@Override
void setAnnotation(Vertex vertex, Object annotation)

Methods inherited from class org.grinvin.graphs.DefaultAnnotation

copy, copy, getAnnotation, getAnnotation, getPeer, setAnnotation, setAnnotation

Constructor Details

DefaultAnnotationModel

public DefaultAnnotationModel(GraphView peer)
Create an annotation for the given peer graph.

Method Details

addAnnotationListener

public void addAnnotationListener(AnnotationListener l)
Register a annotation listener with this model.
Specified by:
addAnnotationListener in interface AnnotationModel

fireAnnotationChanged

public void fireAnnotationChanged()
Notify all listeners of the fact that the entire annotation was changed.

fireElementAnnotationChanged

public void fireElementAnnotationChanged(Element element)
Notify all listeners of the fact that the annotation of an element was changed.

removeAnnotationListener

public void removeAnnotationListener(AnnotationListener l)
Unregister a previously registered annotation listener.
Specified by:
removeAnnotationListener in interface AnnotationModel

void copy

public @Override void copy(AnnotationView original)

void copy

public @Override void copy(AnnotationView original,
                           GraphView newPeer)

void setAnnotation

public @Override void setAnnotation(Edge edge,
                                    Object annotation)

void setAnnotation

public @Override void setAnnotation(Vertex vertex,
                                    Object annotation)