diff options
author | Teemu Suo-Anttila <teemusa@vaadin.com> | 2016-11-16 11:19:09 +0200 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2016-11-18 12:28:58 +0000 |
commit | 848feaaf30762204cb4d9c7bf8b76fbb8bb675da (patch) | |
tree | 510e6c209096d85257f2be388fe44094ab59726a /server/src/main/java/com/vaadin/ui | |
parent | 9d6baef98851d0cd5092581f954f9b3ee6908003 (diff) | |
download | vaadin-framework-848feaaf30762204cb4d9c7bf8b76fbb8bb675da.tar.gz vaadin-framework-848feaaf30762204cb4d9c7bf8b76fbb8bb675da.zip |
Add HTML/Component support to Grid Footers
Change-Id: Iaffe3214163f66c0617a5bea4b79f4ae39d0bc08
Diffstat (limited to 'server/src/main/java/com/vaadin/ui')
-rw-r--r-- | server/src/main/java/com/vaadin/ui/Grid.java | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/server/src/main/java/com/vaadin/ui/Grid.java b/server/src/main/java/com/vaadin/ui/Grid.java index 42aab6a7e4..29c97af24a 100644 --- a/server/src/main/java/com/vaadin/ui/Grid.java +++ b/server/src/main/java/com/vaadin/ui/Grid.java @@ -1647,6 +1647,44 @@ public class Grid<T> extends AbstractListing<T> implements HasComponents { * the footer caption to set, not null */ public void setText(String text); + + /** + * Returns the HTML content displayed in this cell. + * + * @return the html + * + */ + public String getHtml(); + + /** + * Sets the HTML content displayed in this cell. + * + * @param html + * the html to set + */ + public void setHtml(String html); + + /** + * Returns the component displayed in this cell. + * + * @return the component + */ + public Component getComponent(); + + /** + * Sets the component displayed in this cell. + * + * @param component + * the component to set + */ + public void setComponent(Component component); + + /** + * Returns the type of content stored in this cell. + * + * @return cell content type + */ + public GridStaticCellType getCellType(); } private class HeaderImpl extends Header { @@ -1932,6 +1970,16 @@ public class Grid<T> extends AbstractListing<T> implements HasComponents { } }); } + Footer footer = getFooter(); + for (int i = 0; i < footer.getRowCount(); ++i) { + FooterRow row = footer.getRow(i); + getColumns().forEach(column -> { + FooterCell cell = row.getCell(column); + if (cell.getCellType() == GridStaticCellType.WIDGET) { + componentSet.add(cell.getComponent()); + } + }); + } return Collections.unmodifiableSet(componentSet).iterator(); } |