Search in sources :

Example 1 with EdgeLabelLocator

use of org.yakindu.base.xtext.utils.gmf.routing.EdgeLabelLocator in project statecharts by Yakindu.

the class ExternalXtextLabelEditPart method refreshBounds.

@Override
public void refreshBounds() {
    int dx = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
    int dy = ((Integer) getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
    Rectangle bounds = new Rectangle(dx, dy, -1, -1);
    ((AbstractGraphicalEditPart) getParent()).setLayoutConstraint(this, getFigure(), new EdgeLabelLocator(((AbstractConnectionEditPart) getParent()).getConnectionFigure(), bounds, getKeyPoint()));
}
Also used : AbstractConnectionEditPart(org.eclipse.gef.editparts.AbstractConnectionEditPart) AbstractGraphicalEditPart(org.eclipse.gef.editparts.AbstractGraphicalEditPart) EdgeLabelLocator(org.yakindu.base.xtext.utils.gmf.routing.EdgeLabelLocator) Rectangle(org.eclipse.draw2d.geometry.Rectangle)

Aggregations

Rectangle (org.eclipse.draw2d.geometry.Rectangle)1 AbstractConnectionEditPart (org.eclipse.gef.editparts.AbstractConnectionEditPart)1 AbstractGraphicalEditPart (org.eclipse.gef.editparts.AbstractGraphicalEditPart)1 EdgeLabelLocator (org.yakindu.base.xtext.utils.gmf.routing.EdgeLabelLocator)1