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;
* @author hoelzl
* @author $Author$
* @version $Rev$
* @ConQAT.Rating YELLOW Hash: FC9D74B52F6CC2BB215327823B90DB25
* @ConQAT.Rating YELLOW Hash: FC5EB05DCFC761ED4DBC64A5254DCD3A
*/
public class ConstrainedNonResizableEditPolicy<T extends ILayoutedModelElement & INamedCommentedElement>
extends NonResizableEditPolicy {
......@@ -66,8 +66,8 @@ public class ConstrainedNonResizableEditPolicy<T extends ILayoutedModelElement &
public void showSourceFeedback(Request request) {
if (REQ_MOVE.equals(request.getType())) {
// get the bounds of the parent
Rectangle containerBounds = LayoutDataUtils
.getNodeBounds((ILayoutedModelElement) part.getModel());
Rectangle containerBounds = LayoutDataUtils.getNodeBounds(part
.getModel());
// get the child position relative to the parent
Point childPos = getHostFigure().getBounds().getLocation()
.getTranslated(containerBounds.getLocation().getNegated());
......@@ -91,8 +91,7 @@ public class ConstrainedNonResizableEditPolicy<T extends ILayoutedModelElement &
// snap to grid
orient.setOffset(SnapToGridUtils.snapToGrid(orient.getOffset()));
// use the calculated value for positioning
Dimension d = LayoutDataUtils
.getNodeSize((ILayoutedModelElement) part.getModel());
Dimension d = LayoutDataUtils.getNodeSize(part.getModel());
org.fortiss.tooling.base.model.layout.Point p = LayoutDataUtils
.getAbsolute(orient, d,
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