Search in sources :

Example 1 with WorkflowInPortBarFigure

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

the class WorkflowInPortBarEditPart 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 WorkflowInPortBarFigure(newBounds);
    } else {
        return new WorkflowInPortBarFigure(getMinMaxXcoordInWorkflow()[0]);
    }
}
Also used : WorkflowPortBar(org.knime.workbench.editor2.model.WorkflowPortBar) NodeUIInformation(org.knime.core.node.workflow.NodeUIInformation) Rectangle(org.eclipse.draw2d.geometry.Rectangle) WorkflowInPortBarFigure(org.knime.workbench.editor2.figures.WorkflowInPortBarFigure)

Aggregations

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