diff options
author | Artur Signell <artur@vaadin.com> | 2014-09-04 22:12:59 +0300 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2014-12-18 21:47:26 +0000 |
commit | 42ef01bfdb2c93e03b8b8e54b7422cbc9b1eea32 (patch) | |
tree | 6959d960cf291550d97de6a681bc1588bb532be8 /server | |
parent | 304cd3f48a0e7729053491d6f2afc51b3947a240 (diff) | |
download | vaadin-framework-42ef01bfdb2c93e03b8b8e54b7422cbc9b1eea32.tar.gz vaadin-framework-42ef01bfdb2c93e03b8b8e54b7422cbc9b1eea32.zip |
Allow TabSheet and Accordion tab captions to contain HTML (#14609)
Change-Id: If15db442fdbdcc80918e52f8c87e0808f76eb336
Diffstat (limited to 'server')
-rw-r--r-- | server/src/com/vaadin/ui/TabSheet.java | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/server/src/com/vaadin/ui/TabSheet.java b/server/src/com/vaadin/ui/TabSheet.java index 266c93e81f..67dfdd4258 100644 --- a/server/src/com/vaadin/ui/TabSheet.java +++ b/server/src/com/vaadin/ui/TabSheet.java @@ -1621,4 +1621,34 @@ public class TabSheet extends AbstractComponentContainer implements Focusable, } } + /** + * Sets whether HTML is allowed in the tab captions. + * <p> + * If set to true, the captions are rendered in the browser as HTML and the + * developer is responsible for ensuring no harmful HTML is used. If set to + * false, the content is rendered in the browser as plain text. + * <p> + * The default is false, i.e. render tab captions as plain text + * + * @param tabCaptionsAsHtml + * true if the tab captions are rendered as HTML, false if + * rendered as plain text + * @since 7.4 + */ + public void setTabCaptionsAsHtml(boolean tabCaptionsAsHtml) { + getState().tabCaptionsAsHtml = tabCaptionsAsHtml; + } + + /** + * Checks whether HTML is allowed in the tab captions. + * <p> + * The default is false, i.e. render tab captions as plain text + * + * @return true if the tab captions are rendered as HTML, false if rendered + * as plain text + * @since 7.4 + */ + public boolean isTabCaptionsAsHtml() { + return getState(false).tabCaptionsAsHtml; + } } |