Search in sources :

Example 31 with NodeUIInformation

use of org.knime.core.node.workflow.NodeUIInformation 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

NodeUIInformation (org.knime.core.node.workflow.NodeUIInformation)31 NodeID (org.knime.core.node.workflow.NodeID)11 ConnectionUIInformation (org.knime.core.node.workflow.ConnectionUIInformation)8 NodeContainer (org.knime.core.node.workflow.NodeContainer)7 WorkflowManager (org.knime.core.node.workflow.WorkflowManager)7 NodeContainerUI (org.knime.core.ui.node.workflow.NodeContainerUI)7 WorkflowPortBar (org.knime.workbench.editor2.model.WorkflowPortBar)7 ConnectionID (org.knime.core.node.workflow.ConnectionID)6 HashMap (java.util.HashMap)5 Map (java.util.Map)5 ConnectionContainer (org.knime.core.node.workflow.ConnectionContainer)5 Point (org.eclipse.draw2d.geometry.Point)4 Rectangle (org.eclipse.draw2d.geometry.Rectangle)4 NodeContainerEditPart (org.knime.workbench.editor2.editparts.NodeContainerEditPart)4 MessageBox (org.eclipse.swt.widgets.MessageBox)3 NodeAnnotation (org.knime.core.node.workflow.NodeAnnotation)3 WorkflowAnnotation (org.knime.core.node.workflow.WorkflowAnnotation)3 ArrayList (java.util.ArrayList)2 IFigure (org.eclipse.draw2d.IFigure)2 Test (org.junit.Test)2