Skip to content
Snippets Groups Projects
Commit 501033b5 authored by Daniel Ratiu's avatar Daniel Ratiu
Browse files

small cleaning

refs 311
parent a47e1a9d
No related branches found
No related tags found
No related merge requests found
...@@ -47,7 +47,7 @@ import org.fortiss.tooling.kernel.model.INamedCommentedElement; ...@@ -47,7 +47,7 @@ import org.fortiss.tooling.kernel.model.INamedCommentedElement;
* @author hoelzl * @author hoelzl
* @author $Author$ * @author $Author$
* @version $Rev$ * @version $Rev$
* @ConQAT.Rating YELLOW Hash: FC9D74B52F6CC2BB215327823B90DB25 * @ConQAT.Rating YELLOW Hash: FC5EB05DCFC761ED4DBC64A5254DCD3A
*/ */
public class ConstrainedNonResizableEditPolicy<T extends ILayoutedModelElement & INamedCommentedElement> public class ConstrainedNonResizableEditPolicy<T extends ILayoutedModelElement & INamedCommentedElement>
extends NonResizableEditPolicy { extends NonResizableEditPolicy {
...@@ -66,8 +66,8 @@ public class ConstrainedNonResizableEditPolicy<T extends ILayoutedModelElement & ...@@ -66,8 +66,8 @@ public class ConstrainedNonResizableEditPolicy<T extends ILayoutedModelElement &
public void showSourceFeedback(Request request) { public void showSourceFeedback(Request request) {
if (REQ_MOVE.equals(request.getType())) { if (REQ_MOVE.equals(request.getType())) {
// get the bounds of the parent // get the bounds of the parent
Rectangle containerBounds = LayoutDataUtils Rectangle containerBounds = LayoutDataUtils.getNodeBounds(part
.getNodeBounds((ILayoutedModelElement) part.getModel()); .getModel());
// get the child position relative to the parent // get the child position relative to the parent
Point childPos = getHostFigure().getBounds().getLocation() Point childPos = getHostFigure().getBounds().getLocation()
.getTranslated(containerBounds.getLocation().getNegated()); .getTranslated(containerBounds.getLocation().getNegated());
...@@ -91,8 +91,7 @@ public class ConstrainedNonResizableEditPolicy<T extends ILayoutedModelElement & ...@@ -91,8 +91,7 @@ public class ConstrainedNonResizableEditPolicy<T extends ILayoutedModelElement &
// snap to grid // snap to grid
orient.setOffset(SnapToGridUtils.snapToGrid(orient.getOffset())); orient.setOffset(SnapToGridUtils.snapToGrid(orient.getOffset()));
// use the calculated value for positioning // use the calculated value for positioning
Dimension d = LayoutDataUtils Dimension d = LayoutDataUtils.getNodeSize(part.getModel());
.getNodeSize((ILayoutedModelElement) part.getModel());
org.fortiss.tooling.base.model.layout.Point p = LayoutDataUtils org.fortiss.tooling.base.model.layout.Point p = LayoutDataUtils
.getAbsolute(orient, d, .getAbsolute(orient, d,
DefaultLayoutConstants.DEFAULT_SHAPE_INSETS); DefaultLayoutConstants.DEFAULT_SHAPE_INSETS);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment