public interface AnnotationFactory<T extends Annotation>
Annotation
s. This factory will be provided
as a service through OSGi.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 |
---|---|
T |
createAnnotation(Class<? extends T> type,
CyNetworkView view,
Map<String,String> argMap)
Create an annotation.
|
Icon |
getIcon()
An icon that represents this AnnotationFactory.
|
String |
getId()
Returns the unique id of the AnnotationFactory implementation.
|
String |
getName()
A short name to be displayed to the user.
|
Class<T> |
getType() |
String getId()
String getName()
Icon getIcon()
T createAnnotation(Class<? extends T> type, CyNetworkView view, Map<String,String> argMap)
AnnotationManager#addAnnotation()
method.type
- the class of annotation you want to createview
- the CyNetworkView
the new annotation will belong toargMap
- the arguments to use to initialize the annotation. See the descriptions for
each annotation type to see the list of keys for the arg map.Copyright 2011-2015 Cytoscape Consortium. All rights reserved.