diff options
Diffstat (limited to 'server/src/com/vaadin/ui/TabSheet.java')
-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; + } } |