]> source.dussan.org Git - vaadin-framework.git/commitdiff
#5402 Removed java 1.6 annotations and added javadocs for html support in OptionGroup...
authorLeif Åstrand <leif@vaadin.com>
Tue, 9 Aug 2011 11:40:51 +0000 (11:40 +0000)
committerLeif Åstrand <leif@vaadin.com>
Tue, 9 Aug 2011 11:40:51 +0000 (11:40 +0000)
svn changeset:20224/svn branch:6.7

src/com/vaadin/ui/OptionGroup.java
tests/src/com/vaadin/tests/components/optiongroup/HtmlOptionGroupItems.java
tests/src/com/vaadin/tests/components/optiongroup/OptionGroups.java

index a8cebc1c5d7ad9a369cbcc37d7799989b0d6a7e9..8daf6b6f998d062f19e0c6cd260c46b53a365248 100644 (file)
@@ -172,11 +172,28 @@ public class OptionGroup extends AbstractSelect implements
         return true;
     }
 
+    /**
+     * Sets whether html is allowed in the item captions. If set to true, the
+     * captions are passed to the browser as html and the developer is
+     * responsible for ensuring no harmful html is used. If set to false, the
+     * content is passed to the browser as plain text.
+     * 
+     * @param htmlContentAllowed
+     *            true if the captions are used as html, false if used as plain
+     *            text
+     */
     public void setHtmlContentAllowed(boolean htmlContentAllowed) {
         this.htmlContentAllowed = htmlContentAllowed;
         requestRepaint();
     }
 
+    /**
+     * Checks whether captions are interpreted as html or plain text.
+     * 
+     * @return true if the captions are used as html, false if used as plain
+     *         text
+     * @see #setHtmlContentAllowed(boolean)
+     */
     public boolean isHtmlContentAllowed() {
         return htmlContentAllowed;
     }
index e90fe106a63684a5ee4d892bab6ffd05f2f79004..0f6ae8917abbe518a0a054e9e96f8d97f591f052 100644 (file)
@@ -54,7 +54,6 @@ public class HtmlOptionGroupItems extends ComponentTestCase<OptionGroup> {
     private Component createInvertHtmlItemsAction() {
         return createButtonAction("Toggle html mode",
                 new Command<OptionGroup, Boolean>() {
-                    @Override
                     public void execute(OptionGroup og, Boolean value,
                             Object data) {
                         og.setHtmlContentAllowed(!og.isHtmlContentAllowed());
index 56967445296c3746fb2fab1e7fdd82d90ddad270..07dee0ad0cdc0cce9197c53cac2a05f99116ce41 100644 (file)
@@ -17,7 +17,6 @@ public class OptionGroups extends AbstractSelectTestCase<OptionGroup> {
         createDisabledItemsMultiToggle("Disabled items");\r
         createBooleanAction("HTML content allowed", CATEGORY_STATE, false,\r
                 new Command<OptionGroup, Boolean>() {\r
-                    @Override\r
                     public void execute(OptionGroup og, Boolean value,\r
                             Object data) {\r
                         og.setHtmlContentAllowed(value.booleanValue());\r