diff options
Diffstat (limited to 'compatibility-client')
-rw-r--r-- | compatibility-client/src/main/java/com/vaadin/v7/client/connectors/GridConnector.java | 15 |
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) { |