public interface AnnotationManager
org.cytoscape.view.model.NetworkView
. Annotations must
be added to the annotation manager to be displayed.
GroupAnnotation
cycles are not allowed. The structure created by using GroupAnnotations
must be a tree. If adding a GroupAnnotation would cause a cycle then IllegalArgumentException will be thrown.
Module: presentation-api
To use this in your app, include the following dependency in your POM:
<dependency> <groupId>org.cytoscape</groupId> <artifactId>presentation-api</artifactId> </dependency>
Modifier and Type | Method and Description |
---|---|
void |
addAnnotation(Annotation annotation)
Add an annotation to the specified network view.
|
void |
addAnnotations(Collection<? extends Annotation> annotations)
Adds annotations to the specified network view.
|
List<Annotation> |
getAnnotations(CyNetworkView networkView)
Retrieve the list of annotations for a specific network view.
|
void |
removeAnnotation(Annotation annotation)
Remove an annotation from its network view.
|
void |
removeAnnotations(Collection<? extends Annotation> annotations)
Removes annotations from its network view .
|
void addAnnotation(Annotation annotation)
annotation
- the annotation to addnetworkView
- the network view to add this annotation toIllegalArgumentException
- if the annotation is a GroupAnnotation and it causes a cyclevoid addAnnotations(Collection<? extends Annotation> annotations)
annotations
- the annotations to addnetworkView
- the network view to add this annotation toIllegalArgumentException
- if any of the annotations are a GroupAnnotation and causes a cyclevoid removeAnnotation(Annotation annotation)
annotation
- the annotation to removevoid removeAnnotations(Collection<? extends Annotation> annotations)
annotations
- the annotations to removeList<Annotation> getAnnotations(CyNetworkView networkView)
networkView
- the network view to get the list fromCopyright 2011-2015 Cytoscape Consortium. All rights reserved.