diff options
author | adaussy | 2011-12-08 12:43:50 +0000 |
---|---|---|
committer | adaussy | 2011-12-08 12:43:50 +0000 |
commit | a9edb2160f2a0206a5fc1b89204d35216a4d727b (patch) | |
tree | 655bb558b889d9eccc3ef351a8f7cff11b92214e | |
parent | 30620a7030f75ffb8166d2d0e359bd4ae2823ef0 (diff) | |
download | org.eclipse.papyrus-a9edb2160f2a0206a5fc1b89204d35216a4d727b.tar.gz org.eclipse.papyrus-a9edb2160f2a0206a5fc1b89204d35216a4d727b.tar.xz org.eclipse.papyrus-a9edb2160f2a0206a5fc1b89204d35216a4d727b.zip |
REOPENED - bug 354622: [ActivityDiagram] Object Flows selection prevent selecting other close elements.
https://bugs.eclipse.org/bugs/show_bug.cgi?id=354622
This will correct bug about select ghost element with invisible wrappingLabel
-rw-r--r-- | plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/PapyrusWrappingLabel.java | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/PapyrusWrappingLabel.java b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/PapyrusWrappingLabel.java new file mode 100644 index 00000000000..2d0cd349764 --- /dev/null +++ b/plugins/uml/org.eclipse.papyrus.diagram.common/src/org/eclipse/papyrus/diagram/common/figure/node/PapyrusWrappingLabel.java @@ -0,0 +1,43 @@ +/*****************************************************************************
+ * Copyright (c) 2010 Atos Origin.
+ *
+ *
+ * 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:
+ * Atos Origin - Initial API and implementation
+ * Arthur Daussy - Bug 354622 - [ActivityDiagram] Object Flows selection prevent selecting other close elements.
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.diagram.common.figure.node;
+
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+
+/**
+ * This correct the bug where invisible label can be selected
+ * @author arthur daussy
+ *
+ */
+public class PapyrusWrappingLabel extends WrappingLabel {
+ /**
+ * Bug 354622 - [ActivityDiagram] Object Flows selection prevent selecting other close elements.
+ * On this bug bug come from that invisible label return true containsPoint(int, int) even if there invisible
+ * @see org.eclipse.draw2d.Figure#containsPoint(int, int)
+ *
+ * @param x
+ * @param y
+ * @return
+ */
+ @Override
+ public boolean containsPoint(int x, int y) {
+ if (isVisible()){
+ return super.containsPoint(x, y);
+ }
+ return false;
+ }
+
+
+}
|