Cytoscape 3.1.1 API

org.cytoscape.view.presentation.annotations
Interface AnnotationFactory<T extends Annotation>


public interface AnnotationFactory<T extends Annotation>

An interface describing a factory used to create Annotations. This factory will be provided as a service through OSGi.


Cytoscape Backwards Compatibility (API Interface): We expect that this interface will be used but not implemented by developers using this interface. As such, we reserve the right to add methods to the interface as part of minor version upgrades. We will not remove methods for any changes other than major version upgrades.

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>

Method Summary
 T createAnnotation(Class<? extends T> type, CyNetworkView view, Map<String,String> argMap)
          Create an annotation.
 

Method Detail

createAnnotation

T createAnnotation(Class<? extends T> type,
                   CyNetworkView view,
                   Map<String,String> argMap)
Create an annotation. This method takes the type of annotation to create and a list of arguments to use to actually create the annotation. This list may be null if the caller does not wish to pre-initialize annotations. Creating an annotation does not add the annotation to the view. In order to make the annotation visible, it must be added using AnnotationManager#addAnnotation() method.

Parameters:
type - the class of annotation you want to create
argMap - 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.
Returns:
the new annotation

Cytoscape 3.1.1 API

Copyright 2011 Cytoscape Consortium. All rights reserved.