use of org.cytoscape.ding.impl.cyannotator.CyAnnotator in project cytoscape-impl by cytoscape.
the class UngroupAnnotationsTask method run.
@Override
public void run(TaskMonitor tm) throws Exception {
if (view instanceof DGraphView) {
DGraphView dView = (DGraphView) view;
CyAnnotator cyAnnotator = dView.getCyAnnotator();
for (Annotation child : group.getMembers()) {
group.removeMember(child);
child.setSelected(true);
}
group.removeAnnotation();
}
}
use of org.cytoscape.ding.impl.cyannotator.CyAnnotator in project cytoscape-impl by cytoscape.
the class RemoveAnnotationTaskFactory method createTaskIterator.
@Override
public TaskIterator createTaskIterator(CyNetworkView networkView, Point2D javaPt, Point2D xformPt) {
CyAnnotator cyAnnotator = ((DGraphView) networkView).getCyAnnotator();
DingAnnotation annotation = cyAnnotator.getAnnotationAt(javaPt);
return new TaskIterator(new RemoveAnnotationTask(networkView, annotation));
}
use of org.cytoscape.ding.impl.cyannotator.CyAnnotator in project cytoscape-impl by cytoscape.
the class ResizeAnnotationTaskFactory method isReady.
@Override
public boolean isReady(CyNetworkView networkView, Point2D javaPt, Point2D xformPt) {
CyAnnotator cyAnnotator = ((DGraphView) networkView).getCyAnnotator();
DingAnnotation annotation = cyAnnotator.getAnnotationAt(javaPt);
if (annotation != null && (annotation instanceof ShapeAnnotationImpl || annotation instanceof ImageAnnotationImpl || annotation instanceof GroupAnnotationImpl)) {
return true;
}
return false;
}
use of org.cytoscape.ding.impl.cyannotator.CyAnnotator in project cytoscape-impl by cytoscape.
the class ResizeAnnotationTaskFactory method createTaskIterator.
@Override
public TaskIterator createTaskIterator(CyNetworkView networkView, Point2D javaPt, Point2D xformPt) {
CyAnnotator cyAnnotator = ((DGraphView) networkView).getCyAnnotator();
DingAnnotation annotation = cyAnnotator.getAnnotationAt(javaPt);
return new TaskIterator(new ResizeAnnotationTask(networkView, annotation, javaPt));
}
use of org.cytoscape.ding.impl.cyannotator.CyAnnotator in project cytoscape-impl by cytoscape.
the class SelectAnnotationTaskFactory method isReady.
@Override
public boolean isReady(CyNetworkView networkView, Point2D javaPt, Point2D xformPt) {
CyAnnotator cyAnnotator = ((DGraphView) networkView).getCyAnnotator();
DingAnnotation annotation = cyAnnotator.getAnnotationAt(javaPt);
if (annotation != null)
return true;
return false;
}
Aggregations