diff options
author | Artur Signell <artur@vaadin.com> | 2012-11-28 20:53:55 +0200 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2012-11-29 11:13:51 +0000 |
commit | 393a5faf1e0e21212ee0f9fed756244d7c3dc807 (patch) | |
tree | 619d775b58aa0ed96d0b3e006da2e84e29fa546e /client/src/com | |
parent | d87c6f72508a4c76c0c2274bccaf4191bb5fa204 (diff) | |
download | vaadin-framework-393a5faf1e0e21212ee0f9fed756244d7c3dc807.tar.gz vaadin-framework-393a5faf1e0e21212ee0f9fed756244d7c3dc807.zip |
Fixed tooltip handling for TreeTable (#9088)
Change-Id: I9e4ae2ae4a040de795121db359d930ccda115f62
Diffstat (limited to 'client/src/com')
-rw-r--r-- | client/src/com/vaadin/client/ui/VTreeTable.java | 4 | ||||
-rw-r--r-- | client/src/com/vaadin/client/ui/treetable/TreeTableConnector.java | 27 |
2 files changed, 29 insertions, 2 deletions
diff --git a/client/src/com/vaadin/client/ui/VTreeTable.java b/client/src/com/vaadin/client/ui/VTreeTable.java index d4bfa9698d..318fcb3bca 100644 --- a/client/src/com/vaadin/client/ui/VTreeTable.java +++ b/client/src/com/vaadin/client/ui/VTreeTable.java @@ -122,7 +122,7 @@ public class VTreeTable extends VScrollTable { } } - class VTreeTableScrollBody extends VScrollTable.VScrollTableBody { + public class VTreeTableScrollBody extends VScrollTable.VScrollTableBody { private int indentWidth = -1; VTreeTableScrollBody() { @@ -138,7 +138,7 @@ public class VTreeTable extends VScrollTable { return new VTreeTableRow(uidl, aligns2); } - class VTreeTableRow extends + public class VTreeTableRow extends VScrollTable.VScrollTableBody.VScrollTableRow { private boolean isTreeCellAdded = false; diff --git a/client/src/com/vaadin/client/ui/treetable/TreeTableConnector.java b/client/src/com/vaadin/client/ui/treetable/TreeTableConnector.java index be6e54c5ce..db16bb32a1 100644 --- a/client/src/com/vaadin/client/ui/treetable/TreeTableConnector.java +++ b/client/src/com/vaadin/client/ui/treetable/TreeTableConnector.java @@ -15,12 +15,16 @@ */ package com.vaadin.client.ui.treetable; +import com.google.gwt.dom.client.Element; import com.vaadin.client.ApplicationConnection; +import com.vaadin.client.TooltipInfo; import com.vaadin.client.UIDL; +import com.vaadin.client.Util; import com.vaadin.client.ui.FocusableScrollPanel; import com.vaadin.client.ui.VScrollTable.VScrollTableBody.VScrollTableRow; import com.vaadin.client.ui.VTreeTable; import com.vaadin.client.ui.VTreeTable.PendingNavigationEvent; +import com.vaadin.client.ui.VTreeTable.VTreeTableScrollBody.VTreeTableRow; import com.vaadin.client.ui.table.TableConnector; import com.vaadin.shared.ui.Connect; import com.vaadin.shared.ui.treetable.TreeTableConstants; @@ -112,4 +116,27 @@ public class TreeTableConnector extends TableConnector { public TreeTableState getState() { return (TreeTableState) super.getState(); } + + @Override + public TooltipInfo getTooltipInfo(Element element) { + + TooltipInfo info = null; + + if (element != getWidget().getElement()) { + Object node = Util.findWidget( + (com.google.gwt.user.client.Element) element, + VTreeTableRow.class); + + if (node != null) { + VTreeTableRow row = (VTreeTableRow) node; + info = row.getTooltip(element); + } + } + + if (info == null) { + info = super.getTooltipInfo(element); + } + + return info; + } } |