use of org.eclipse.gmf.runtime.notation.Bounds in project statecharts by Yakindu.
the class StateTemplatesModification method setPreferredSize.
protected void setPreferredSize(View view) {
Bounds bounds = (Bounds) ((Node) view).getLayoutConstraint();
bounds.setWidth(-1);
bounds.setHeight(-1);
}
use of org.eclipse.gmf.runtime.notation.Bounds in project statecharts by Yakindu.
the class FactoryUtils method setRegionViewLayoutConstraint.
private static void setRegionViewLayoutConstraint(Node regionView) {
Bounds bounds = NotationFactory.eINSTANCE.createBounds();
bounds.setX(INITIAL_TEXT_COMPARTMENT_WIDTH + INITIAL_TEXT_COMPARTMENT_X + SPACING);
bounds.setY(INITIAL_TEXT_COMPARTMENT_Y);
bounds.setHeight(INITIAL_REGION_HEIGHT);
bounds.setWidth(INITIAL_REGION_WIDTH);
regionView.setLayoutConstraint(bounds);
}
use of org.eclipse.gmf.runtime.notation.Bounds in project statecharts by Yakindu.
the class GroupStatesIntoCompositeRefactoring method moveSelectedStateNodesTo.
protected void moveSelectedStateNodesTo(View containerView, Bounds compositeBounds) {
for (GraphicalEditPart editPart : getContextObjects()) {
Node stateNode = (Node) editPart.getNotationView();
ViewUtil.insertChildView(containerView, stateNode, ViewUtil.APPEND, true);
Bounds newBounds = NotationFactory.eINSTANCE.createBounds();
Bounds oldBounds = (Bounds) stateNode.getLayoutConstraint();
// FIXME use bounds of region view
newBounds.setX(oldBounds.getX() - compositeBounds.getX() - 7);
// FIXME use bounds of region view
newBounds.setY(oldBounds.getY() - compositeBounds.getY() - 34);
((Node) editPart.getNotationView()).setLayoutConstraint(newBounds);
}
}
use of org.eclipse.gmf.runtime.notation.Bounds in project statecharts by Yakindu.
the class FactoryUtils method setInitialStateViewLayoutConstraint.
private static void setInitialStateViewLayoutConstraint(Node initialStateView) {
Bounds bounds = NotationFactory.eINSTANCE.createBounds();
bounds.setX(70);
bounds.setY(20);
initialStateView.setLayoutConstraint(bounds);
}
use of org.eclipse.gmf.runtime.notation.Bounds in project statecharts by Yakindu.
the class FactoryUtils method setStateViewLayoutConstraint.
private static void setStateViewLayoutConstraint(Node stateNode) {
Bounds bounds = NotationFactory.eINSTANCE.createBounds();
bounds.setX(40);
bounds.setY(80);
stateNode.setLayoutConstraint(bounds);
}
Aggregations