Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/snap/BorderNodeSnapHelper.java')
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/snap/BorderNodeSnapHelper.java36
1 files changed, 36 insertions, 0 deletions
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/snap/BorderNodeSnapHelper.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/snap/BorderNodeSnapHelper.java
new file mode 100644
index 00000000000..503f835fce8
--- /dev/null
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/snap/BorderNodeSnapHelper.java
@@ -0,0 +1,36 @@
+/*****************************************************************************
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo - CEA LIST
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.gmfdiag.common.snap;
+
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.gef.SnapToHelper;
+
+/**
+ *
+ * Snap Helper with default behavior for BorderNode (snap only on the center of the figrue
+ * TODO PapyrusDragBorderNodeEditPartTrackerEx should use me
+ */
+public class BorderNodeSnapHelper extends NodeSnapHelper {
+
+ /**
+ *
+ * Constructor.
+ *
+ * @param helper
+ * @param figureToSnapBounds
+ */
+ public BorderNodeSnapHelper(SnapToHelper helper, Rectangle figureToSnapBounds) {
+ super(helper, figureToSnapBounds, false, false, true);
+ }
+
+}

Back to the top