summaryrefslogtreecommitdiffstats
path: root/compatibility-client
diff options
context:
space:
mode:
authorIlia Motornyi <elmot@vaadin.com>2018-02-15 15:33:05 +0200
committerGitHub <noreply@github.com>2018-02-15 15:33:05 +0200
commit6d84351fee4bdb6e877d9100c8645e6c6044864e (patch)
treee11270aa15b3b348b9ee3ff8714fc126b4a6af34 /compatibility-client
parentfd4dedf921f6cf0f80bfedac8474562b41325e56 (diff)
downloadvaadin-framework-6d84351fee4bdb6e877d9100c8645e6c6044864e.tar.gz
vaadin-framework-6d84351fee4bdb6e877d9100c8645e6c6044864e.zip
Allow configuring content modes for Grid cell tooltips (#10632)
* Allow configuring content modes for Grid cell tooltips
Diffstat (limited to 'compatibility-client')
-rw-r--r--compatibility-client/src/main/java/com/vaadin/v7/client/connectors/GridConnector.java15
1 files changed, 12 insertions, 3 deletions
diff --git a/compatibility-client/src/main/java/com/vaadin/v7/client/connectors/GridConnector.java b/compatibility-client/src/main/java/com/vaadin/v7/client/connectors/GridConnector.java
index 06981feac5..f6233eae1f 100644
--- a/compatibility-client/src/main/java/com/vaadin/v7/client/connectors/GridConnector.java
+++ b/compatibility-client/src/main/java/com/vaadin/v7/client/connectors/GridConnector.java
@@ -55,6 +55,7 @@ import com.vaadin.client.ui.layout.ElementResizeListener;
import com.vaadin.shared.MouseEventDetails;
import com.vaadin.shared.data.sort.SortDirection;
import com.vaadin.shared.ui.Connect;
+import com.vaadin.shared.ui.ContentMode;
import com.vaadin.v7.client.connectors.RpcDataSourceConnector.DetailsListener;
import com.vaadin.v7.client.connectors.RpcDataSourceConnector.RpcDataSource;
import com.vaadin.v7.client.widget.escalator.events.RowHeightChangedEvent;
@@ -1301,10 +1302,12 @@ public class GridConnector extends AbstractHasComponentsConnector
.getObject(GridState.JSONKEY_CELLDESCRIPTION);
if (cellDescriptions != null && cellDescriptions.hasKey(c.id)) {
- return new TooltipInfo(cellDescriptions.getString(c.id));
+ return createCellTooltipInfo(cellDescriptions.getString(c.id),
+ getState().cellTooltipContentMode);
} else if (row.hasKey(GridState.JSONKEY_ROWDESCRIPTION)) {
- return new TooltipInfo(
- row.getString(GridState.JSONKEY_ROWDESCRIPTION));
+ return createCellTooltipInfo(
+ row.getString(GridState.JSONKEY_ROWDESCRIPTION),
+ getState().rowTooltipContentMode);
} else {
return null;
}
@@ -1313,6 +1316,12 @@ public class GridConnector extends AbstractHasComponentsConnector
return super.getTooltipInfo(element);
}
+ private static TooltipInfo createCellTooltipInfo(String text,
+ ContentMode contentMode) {
+ TooltipInfo info = new TooltipInfo(text);
+ info.setContentMode(contentMode);
+ return info;
+ }
@Override
protected void sendContextClickEvent(MouseEventDetails details,
EventTarget eventTarget) {