Search in sources :

Example 1 with AbstractPortFigure

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

the class InPortConnectionAnchor method getBox.

/**
 * @return The chop box for the in port figure
 */
@Override
protected Rectangle getBox() {
    IFigure owner = getOwner();
    if (!(owner instanceof AbstractPortFigure)) {
        return super.getBox();
    }
    AbstractPortFigure port = (AbstractPortFigure) owner;
    return port.computePortShapeBounds(port.getBounds());
}
Also used : AbstractPortFigure(org.knime.workbench.editor2.figures.AbstractPortFigure) IFigure(org.eclipse.draw2d.IFigure)

Example 2 with AbstractPortFigure

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

the class OutPortConnectionAnchor method getBox.

/**
 * @return The chop box for the out-port figure
 */
@Override
protected Rectangle getBox() {
    IFigure owner = getOwner();
    if (!(owner instanceof AbstractPortFigure)) {
        return super.getBox();
    }
    AbstractPortFigure port = (AbstractPortFigure) owner;
    return port.computePortShapeBounds(port.getBounds());
}
Also used : AbstractPortFigure(org.knime.workbench.editor2.figures.AbstractPortFigure) IFigure(org.eclipse.draw2d.IFigure)

Example 3 with AbstractPortFigure

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

the class AbstractPortEditPart method setIndex.

/**
 * @param index the new position of the port.
 */
public void setIndex(final int index) {
    m_index = index;
    AbstractPortFigure fig = (AbstractPortFigure) getFigure();
    fig.setPortIdx(index);
}
Also used : AbstractPortFigure(org.knime.workbench.editor2.figures.AbstractPortFigure)

Example 4 with AbstractPortFigure

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

the class AbstractPortEditPart method refreshVisuals.

/**
 * Refreshes the visuals of the port visuals.
 *
 * @see org.eclipse.gef.editparts.AbstractEditPart#refreshVisuals()
 */
@Override
protected void refreshVisuals() {
    // get the figure and update the constraint for it - locator is provided
    // by the figure itself
    AbstractWorkflowEditPart parent = (AbstractWorkflowEditPart) getParent();
    AbstractPortFigure f = (AbstractPortFigure) getFigure();
    parent.setLayoutConstraint(this, f, f.getLocator());
}
Also used : AbstractPortFigure(org.knime.workbench.editor2.figures.AbstractPortFigure)

Aggregations

AbstractPortFigure (org.knime.workbench.editor2.figures.AbstractPortFigure)4 IFigure (org.eclipse.draw2d.IFigure)2