Search in sources :

Example 1 with AbstractWorkflowPortBarFigure

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

the class AbstractWorkflowPortBarEditPart method refreshVisuals.

/**
 * {@inheritDoc}
 */
@Override
protected void refreshVisuals() {
    NodeUIInformation uiInfo = ((WorkflowPortBar) getModel()).getUIInfo();
    if (uiInfo != null && !((AbstractWorkflowPortBarFigure) getFigure()).isInitialized()) {
        int[] bounds = uiInfo.getBounds();
        ((AbstractWorkflowPortBarFigure) getFigure()).setBounds(new Rectangle(bounds[0], bounds[1], bounds[2], bounds[3]));
    }
    super.refreshVisuals();
}
Also used : WorkflowPortBar(org.knime.workbench.editor2.model.WorkflowPortBar) AbstractWorkflowPortBarFigure(org.knime.workbench.editor2.figures.AbstractWorkflowPortBarFigure) 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 AbstractWorkflowPortBarFigure (org.knime.workbench.editor2.figures.AbstractWorkflowPortBarFigure)1 WorkflowPortBar (org.knime.workbench.editor2.model.WorkflowPortBar)1