Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/ExecutionSpecificationRectangleFigure.java')
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/ExecutionSpecificationRectangleFigure.java66
1 files changed, 66 insertions, 0 deletions
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/ExecutionSpecificationRectangleFigure.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/ExecutionSpecificationRectangleFigure.java
new file mode 100644
index 00000000000..7df1a7caf06
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/ExecutionSpecificationRectangleFigure.java
@@ -0,0 +1,66 @@
+/*****************************************************************************
+ * Copyright (c) 2017 CEA LIST and others.
+ *
+ * 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:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.TreeSearch;
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.RoundedCompartmentFigure;
+import org.eclipse.papyrus.uml.diagram.sequence.figures.ILifelineInternalFigure;
+
+public class ExecutionSpecificationRectangleFigure extends RoundedCompartmentFigure implements ILifelineInternalFigure {
+ /**
+ *
+ */
+ private final AbstractExecutionSpecificationEditPart abstractExecutionSpecificationEditPart;
+
+ public ExecutionSpecificationRectangleFigure(AbstractExecutionSpecificationEditPart abstractExecutionSpecificationEditPart) {
+ this.abstractExecutionSpecificationEditPart = abstractExecutionSpecificationEditPart;
+
+ }
+
+ @Override
+ public IFigure findMouseEventTargetAt(int x, int y) {
+ // check children first instead of self
+ IFigure f = findMouseEventTargetInDescendantsAt(x, y);
+ if (f != null) {
+ return f;
+ }
+ if (!containsPoint(x, y)) {
+ return null;
+ }
+ if (isMouseEventTarget()) {
+ return this;
+ }
+ return null;
+ }
+
+ @Override
+ public IFigure findFigureAt(int x, int y, TreeSearch search) {
+ if (search.prune(this)) {
+ return null;
+ }
+ IFigure child = findDescendantAtExcluding(x, y, search);
+ if (child != null) {
+ return child;
+ }
+ if (!containsPoint(x, y)) {
+ return null;
+ }
+ if (search.accept(this)) {
+ return this;
+ }
+ return null;
+ }
+} \ No newline at end of file

Back to the top