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;
}
}
Aggregations