Search in sources :

Example 1 with ImageAnnotation

use of org.cytoscape.view.presentation.annotations.ImageAnnotation in project cytoscape-impl by cytoscape.

the class ImageAnnotationFactory method createAnnotation.

@Override
public ImageAnnotation createAnnotation(Class<? extends ImageAnnotation> clazz, CyNetworkView view, Map<String, String> argMap) {
    if (!(view instanceof DGraphView))
        return null;
    DGraphView dView = (DGraphView) view;
    if (ImageAnnotation.class.equals(clazz)) {
        final CustomGraphicsManager customGraphicsManager = serviceRegistrar.getService(CustomGraphicsManager.class);
        final ImageAnnotationImpl a = new ImageAnnotationImpl(dView, argMap, customGraphicsManager, getActiveWindow());
        a.update();
        return (ImageAnnotation) a;
    } else {
        return null;
    }
}
Also used : ImageAnnotation(org.cytoscape.view.presentation.annotations.ImageAnnotation) ImageAnnotationImpl(org.cytoscape.ding.impl.cyannotator.annotations.ImageAnnotationImpl) CustomGraphicsManager(org.cytoscape.ding.customgraphics.CustomGraphicsManager) DGraphView(org.cytoscape.ding.impl.DGraphView)

Aggregations

CustomGraphicsManager (org.cytoscape.ding.customgraphics.CustomGraphicsManager)1 DGraphView (org.cytoscape.ding.impl.DGraphView)1 ImageAnnotationImpl (org.cytoscape.ding.impl.cyannotator.annotations.ImageAnnotationImpl)1 ImageAnnotation (org.cytoscape.view.presentation.annotations.ImageAnnotation)1