diff options
author | Jouni Koivuviita <jouni@vaadin.com> | 2012-08-07 16:05:49 +0300 |
---|---|---|
committer | Jouni Koivuviita <jouni@vaadin.com> | 2012-08-07 16:05:49 +0300 |
commit | 8356465b3897fa16233064cfd586b4557f33e8e4 (patch) | |
tree | aa14a1e52e85935486e7a4aec453247939a228fc /src/com/vaadin/shared/ui/label | |
parent | 9a83722fde94af949b45d4c091399ba9e1f6ba29 (diff) | |
parent | 5813e0e9e5af4f946e5ea9c73d426e95d93b7bc4 (diff) | |
download | vaadin-framework-8356465b3897fa16233064cfd586b4557f33e8e4.tar.gz vaadin-framework-8356465b3897fa16233064cfd586b4557f33e8e4.zip |
merge master
Diffstat (limited to 'src/com/vaadin/shared/ui/label')
-rw-r--r-- | src/com/vaadin/shared/ui/label/ContentMode.java | 46 | ||||
-rw-r--r-- | src/com/vaadin/shared/ui/label/LabelState.java | 28 |
2 files changed, 74 insertions, 0 deletions
diff --git a/src/com/vaadin/shared/ui/label/ContentMode.java b/src/com/vaadin/shared/ui/label/ContentMode.java new file mode 100644 index 0000000000..a58f2cdebb --- /dev/null +++ b/src/com/vaadin/shared/ui/label/ContentMode.java @@ -0,0 +1,46 @@ +/* +@VaadinApache2LicenseForJavaFiles@ + */ +package com.vaadin.shared.ui.label; + +/** + * Content modes defining how the client should interpret a Label's value. + * + * @since 7.0.0 + */ +public enum ContentMode { + /** + * Content mode, where the label contains only plain text. + */ + TEXT, + + /** + * Content mode, where the label contains pre formatted text. In this mode + * newlines are preserved when rendered on the screen. + */ + PREFORMATTED, + + /** + * Content mode, where the label contains XHTML. Care should be taken to + * ensure + */ + XHTML, + + /** + * Content mode, where the label contains well-formed or well-balanced XML. + * This is handled in the same way as {@link #XHTML}. + * + * @deprecated Use {@link #XHTML} instead + */ + @Deprecated + XML, + + /** + * Legacy content mode, where the label contains RAW output. This is handled + * in exactly the same way as {@link #XHTML}. + * + * @deprecated Use {@link #XHTML} instead + */ + @Deprecated + RAW; +} diff --git a/src/com/vaadin/shared/ui/label/LabelState.java b/src/com/vaadin/shared/ui/label/LabelState.java new file mode 100644 index 0000000000..0298e40179 --- /dev/null +++ b/src/com/vaadin/shared/ui/label/LabelState.java @@ -0,0 +1,28 @@ +/* +@VaadinApache2LicenseForJavaFiles@ + */ +package com.vaadin.shared.ui.label; + +import com.vaadin.shared.ComponentState; + +public class LabelState extends ComponentState { + private ContentMode contentMode = ContentMode.TEXT; + private String text = ""; + + public ContentMode getContentMode() { + return contentMode; + } + + public void setContentMode(ContentMode contentMode) { + this.contentMode = contentMode; + } + + public String getText() { + return text; + } + + public void setText(String text) { + this.text = text; + } + +} |