use of org.knime.workbench.editor2.WorkflowMarqueeSelectionTool in project knime-core by knime.
the class AnnotationEditPart method getDragTracker.
/**
* {@inheritDoc}
* If dragging started on the "move" icon (top left corner) return the normal edit part dragger tool, otherwise
* return the marquee selection tool.
*/
@Override
public DragTracker getDragTracker(final Request request) {
Object object = request.getExtendedData().get(WorkflowSelectionTool.DRAG_START_LOCATION);
IFigure f = getFigure();
if (object instanceof Point && f instanceof WorkflowAnnotationFigure && getSelected() == SELECTED_NONE) {
PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor().getEditorSite();
Rectangle iconBounds = ((WorkflowAnnotationFigure) f).getEditIconBounds().getCopy();
if (!iconBounds.contains((Point) object)) {
return new WorkflowMarqueeSelectionTool();
}
}
// "normal" edit part dragging
return new WorkflowSelectionDragEditPartsTracker(this);
}
Aggregations