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());
}
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());
}
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);
}
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());
}
Aggregations