Search in sources :

Example 1 with BoundedTextAnnotation

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

the class BoundedTextAnnotationFactory method createAnnotation.

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

Aggregations

DGraphView (org.cytoscape.ding.impl.DGraphView)1 BoundedTextAnnotationImpl (org.cytoscape.ding.impl.cyannotator.annotations.BoundedTextAnnotationImpl)1 BoundedTextAnnotation (org.cytoscape.view.presentation.annotations.BoundedTextAnnotation)1