aboutsummaryrefslogtreecommitdiffstats
path: root/src/com/vaadin/terminal/gwt/client/ui/tree/VTree.java
diff options
context:
space:
mode:
authorSami Viitanen <sami.viitanen@vaadin.com>2012-06-28 15:43:11 +0300
committerArtur Signell <artur@vaadin.com>2012-06-28 16:49:54 +0300
commit18ac8b25501e28cfcfc3271d2c6722a00fa01b98 (patch)
tree3e2b4d90e98c3531e9bd4ac4847cf48a70a6b70d /src/com/vaadin/terminal/gwt/client/ui/tree/VTree.java
parent92784107eddb53bd1a5f651775937a3caf2eeae0 (diff)
downloadvaadin-framework-18ac8b25501e28cfcfc3271d2c6722a00fa01b98.tar.gz
vaadin-framework-18ac8b25501e28cfcfc3271d2c6722a00fa01b98.zip
Tooltips are now handled by the connector and not the widget (#8425)
Diffstat (limited to 'src/com/vaadin/terminal/gwt/client/ui/tree/VTree.java')
-rw-r--r--src/com/vaadin/terminal/gwt/client/ui/tree/VTree.java21
1 files changed, 13 insertions, 8 deletions
diff --git a/src/com/vaadin/terminal/gwt/client/ui/tree/VTree.java b/src/com/vaadin/terminal/gwt/client/ui/tree/VTree.java
index 6f19cba957..7462160bad 100644
--- a/src/com/vaadin/terminal/gwt/client/ui/tree/VTree.java
+++ b/src/com/vaadin/terminal/gwt/client/ui/tree/VTree.java
@@ -45,7 +45,6 @@ import com.vaadin.terminal.gwt.client.MouseEventDetails;
import com.vaadin.terminal.gwt.client.MouseEventDetailsBuilder;
import com.vaadin.terminal.gwt.client.UIDL;
import com.vaadin.terminal.gwt.client.Util;
-import com.vaadin.terminal.gwt.client.VTooltip;
import com.vaadin.terminal.gwt.client.ui.Action;
import com.vaadin.terminal.gwt.client.ui.ActionOwner;
import com.vaadin.terminal.gwt.client.ui.FocusElementPanel;
@@ -656,12 +655,7 @@ public class VTree extends FocusElementPanel implements VHasDropHandler,
return;
}
- if (target == nodeCaptionSpan) {
- client.handleTooltipEvent(event, VTree.this, key);
- }
-
- final boolean inCaption = target == nodeCaptionSpan
- || (icon != null && target == icon.getElement());
+ final boolean inCaption = isCaptionElement(target);
if (inCaption
&& client
.hasEventListeners(VTree.this, ITEM_CLICK_EVENT_ID)
@@ -751,6 +745,18 @@ public class VTree extends FocusElementPanel implements VHasDropHandler,
}
}
+ /**
+ * Checks if the given element is the caption or the icon.
+ *
+ * @param target
+ * The element to check
+ * @return true if the element is the caption or the icon
+ */
+ public boolean isCaptionElement(com.google.gwt.dom.client.Element target) {
+ return (target == nodeCaptionSpan || (icon != null && target == icon
+ .getElement()));
+ }
+
private void fireClick(final Event evt) {
/*
* Ensure we have focus in tree before sending variables. Otherwise
@@ -825,7 +831,6 @@ public class VTree extends FocusElementPanel implements VHasDropHandler,
+ "-caption");
Element wrapper = DOM.createDiv();
nodeCaptionSpan = DOM.createSpan();
- DOM.sinkEvents(nodeCaptionSpan, VTooltip.TOOLTIP_EVENTS);
DOM.appendChild(getElement(), nodeCaptionDiv);
DOM.appendChild(nodeCaptionDiv, wrapper);
DOM.appendChild(wrapper, nodeCaptionSpan);