Search in sources :

Example 1 with WorkflowOutPortBarFigure

use of org.knime.workbench.editor2.figures.WorkflowOutPortBarFigure in project knime-core by knime.

the class WorkflowOutPortBarEditPart method createFigure.

/**
 * {@inheritDoc}
 */
@Override
protected IFigure createFigure() {
    NodeUIInformation uiInfo = ((WorkflowPortBar) getModel()).getUIInfo();
    if (uiInfo != null) {
        int[] bounds = uiInfo.getBounds();
        Rectangle newBounds = new Rectangle(bounds[0], bounds[1], bounds[2], bounds[3]);
        return new WorkflowOutPortBarFigure(newBounds);
    } else {
        int[] minmax = getMinMaxXcoordInWorkflow();
        return new WorkflowOutPortBarFigure(minmax[1]);
    }
}
Also used : WorkflowPortBar(org.knime.workbench.editor2.model.WorkflowPortBar) WorkflowOutPortBarFigure(org.knime.workbench.editor2.figures.WorkflowOutPortBarFigure) NodeUIInformation(org.knime.core.node.workflow.NodeUIInformation) Rectangle(org.eclipse.draw2d.geometry.Rectangle)

Aggregations

Rectangle (org.eclipse.draw2d.geometry.Rectangle)1 NodeUIInformation (org.knime.core.node.workflow.NodeUIInformation)1 WorkflowOutPortBarFigure (org.knime.workbench.editor2.figures.WorkflowOutPortBarFigure)1 WorkflowPortBar (org.knime.workbench.editor2.model.WorkflowPortBar)1