]> source.dussan.org Git - vaadin-framework.git/commitdiff
#8026 Removed deprecated API from TextField
authorArtur Signell <artur@vaadin.com>
Mon, 19 Dec 2011 10:53:15 +0000 (12:53 +0200)
committerArtur Signell <artur@vaadin.com>
Mon, 19 Dec 2011 11:07:04 +0000 (13:07 +0200)
src/com/vaadin/terminal/gwt/client/WidgetSet.java
src/com/vaadin/ui/TextField.java
tests/testbench/com/vaadin/tests/application/ErrorInUnloadEvent.java
tests/testbench/com/vaadin/tests/components/formlayout/FormLayoutReplaceComponent.java [deleted file]
tests/testbench/com/vaadin/tests/components/notification/Notifications.java
tests/testbench/com/vaadin/tests/components/textfield/SelectionAndCursorPosition.java
tests/testbench/com/vaadin/tests/components/textfield/SizedTextFields.java
tests/testbench/com/vaadin/tests/components/textfield/TextFieldTest.java
tests/testbench/com/vaadin/tests/layouts/FormLayoutWithInvisibleComponent.java
tests/testbench/com/vaadin/tests/layouts/WidgetImplementationSwap.java [deleted file]

index 9a11dd9f0dfd838644d8f2b3258b16364e7467b8..e546761b54ef35348f39aee49f8c53d42c6eb594 100644 (file)
@@ -8,11 +8,8 @@ import com.google.gwt.core.client.GWT;
 import com.google.gwt.user.client.ui.Widget;
 import com.vaadin.terminal.gwt.client.ui.VFilterSelect;
 import com.vaadin.terminal.gwt.client.ui.VListSelect;
-import com.vaadin.terminal.gwt.client.ui.VPasswordField;
 import com.vaadin.terminal.gwt.client.ui.VSplitPanelHorizontal;
 import com.vaadin.terminal.gwt.client.ui.VSplitPanelVertical;
-import com.vaadin.terminal.gwt.client.ui.VTextArea;
-import com.vaadin.terminal.gwt.client.ui.VTextField;
 import com.vaadin.terminal.gwt.client.ui.VUnknownComponent;
 import com.vaadin.terminal.gwt.client.ui.VView;
 import com.vaadin.terminal.gwt.client.ui.VWindow;
@@ -86,12 +83,6 @@ public class WidgetSet {
                     return VListSelect.class;
                 }
             }
-        } else if (widgetClass == VTextField.class) {
-            if (uidl.hasAttribute("multiline")) {
-                return VTextArea.class;
-            } else if (uidl.hasAttribute("secret")) {
-                return VPasswordField.class;
-            }
         } else if (widgetClass == VSplitPanelHorizontal.class
                 && uidl.hasAttribute("vertical")) {
             return VSplitPanelVertical.class;
@@ -141,9 +132,6 @@ public class WidgetSet {
          */
         if (fullyqualifiedName.equals("com.vaadin.ui.Select")) {
             loadImplementation(VListSelect.class);
-        } else if (fullyqualifiedName.equals("com.vaadin.ui.TextField")) {
-            loadImplementation(VTextArea.class);
-            loadImplementation(VPasswordField.class);
         } else if (fullyqualifiedName.equals("com.vaadin.ui.SplitPanel")) {
             loadImplementation(VSplitPanelVertical.class);
         }
index 0d719efd126d8e020d6f6b3e8f64af0e6cabac90..e154aaad170562b310d38ef1808c735bdfb1e5d4 100644 (file)
@@ -5,8 +5,6 @@
 package com.vaadin.ui;
 
 import com.vaadin.data.Property;
-import com.vaadin.terminal.PaintException;
-import com.vaadin.terminal.PaintTarget;
 import com.vaadin.terminal.gwt.client.ui.VTextField;
 import com.vaadin.ui.ClientWidget.LoadStyle;
 
@@ -34,26 +32,6 @@ import com.vaadin.ui.ClientWidget.LoadStyle;
 @ClientWidget(value = VTextField.class, loadStyle = LoadStyle.EAGER)
 public class TextField extends AbstractTextField {
 
-    /**
-     * Tells if input is used to enter sensitive information that is not echoed
-     * to display. Typically passwords.
-     */
-    @Deprecated
-    private boolean secret = false;
-
-    /**
-     * Number of visible rows in a multiline TextField. Value 0 implies a
-     * single-line text-editor.
-     */
-    @Deprecated
-    private int rows = 0;
-
-    /**
-     * Tells if word-wrapping should be used in multiline mode.
-     */
-    @Deprecated
-    private boolean wordwrap = true;
-
     /**
      * Constructs an empty <code>TextField</code> with no caption.
      */
@@ -106,7 +84,7 @@ public class TextField extends AbstractTextField {
      * 
      * @param caption
      *            the caption <code>String</code> for the editor.
-     * @param text
+     * @param value
      *            the initial text content of the editor.
      */
     public TextField(String caption, String value) {
@@ -114,180 +92,4 @@ public class TextField extends AbstractTextField {
         setCaption(caption);
     }
 
-    /**
-     * Gets the secret property. If a field is used to enter secret information
-     * the information is not echoed to display.
-     * 
-     * @return <code>true</code> if the field is used to enter secret
-     *         information, <code>false</code> otherwise.
-     * 
-     * @deprecated Starting from 6.5 use {@link PasswordField} instead for
-     *             secret text input.
-     */
-    @Deprecated
-    public boolean isSecret() {
-        return secret;
-    }
-
-    /**
-     * Sets the secret property on and off. If a field is used to enter secret
-     * information the information is not echoed to display.
-     * 
-     * @param secret
-     *            the value specifying if the field is used to enter secret
-     *            information.
-     * @deprecated Starting from 6.5 use {@link PasswordField} instead for
-     *             secret text input.
-     */
-    @Deprecated
-    public void setSecret(boolean secret) {
-        if (this.secret != secret) {
-            this.secret = secret;
-            requestRepaint();
-        }
-    }
-
-    @Override
-    public void paintContent(PaintTarget target) throws PaintException {
-        if (isSecret()) {
-            target.addAttribute("secret", true);
-        }
-
-        final int rows = getRows();
-        if (rows != 0) {
-            target.addAttribute("rows", rows);
-            target.addAttribute("multiline", true);
-
-            if (!isWordwrap()) {
-                // Wordwrap is only painted if turned off to minimize
-                // communications
-                target.addAttribute("wordwrap", false);
-            }
-        }
-
-        super.paintContent(target);
-
-    }
-
-    /**
-     * Gets the number of rows in the editor. If the number of rows is set to 0,
-     * the actual number of displayed rows is determined implicitly by the
-     * adapter.
-     * 
-     * @return number of explicitly set rows.
-     * @deprecated Starting from 6.5 use {@link TextArea} for a multi-line text
-     *             input.
-     * 
-     */
-    @Deprecated
-    public int getRows() {
-        return rows;
-    }
-
-    /**
-     * Sets the number of rows in the editor.
-     * 
-     * @param rows
-     *            the number of rows for this editor.
-     * 
-     * @deprecated Starting from 6.5 use {@link TextArea} for a multi-line text
-     *             input.
-     */
-    @Deprecated
-    public void setRows(int rows) {
-        if (rows < 0) {
-            rows = 0;
-        }
-        if (this.rows != rows) {
-            this.rows = rows;
-            requestRepaint();
-        }
-    }
-
-    /**
-     * Tests if the editor is in word-wrap mode.
-     * 
-     * @return <code>true</code> if the component is in the word-wrap mode,
-     *         <code>false</code> if not.
-     * @deprecated Starting from 6.5 use {@link TextArea} for a multi-line text
-     *             input.
-     */
-    @Deprecated
-    public boolean isWordwrap() {
-        return wordwrap;
-    }
-
-    /**
-     * Sets the editor's word-wrap mode on or off.
-     * 
-     * @param wordwrap
-     *            the boolean value specifying if the editor should be in
-     *            word-wrap mode after the call or not.
-     * 
-     * @deprecated Starting from 6.5 use {@link TextArea} for a multi-line text
-     *             input.
-     */
-    @Deprecated
-    public void setWordwrap(boolean wordwrap) {
-        if (this.wordwrap != wordwrap) {
-            this.wordwrap = wordwrap;
-            requestRepaint();
-        }
-    }
-
-    /**
-     * Sets the height of the {@link TextField} instance.
-     * 
-     * <p>
-     * Setting height for {@link TextField} also has a side-effect that puts
-     * {@link TextField} into multiline mode (aka "textarea"). Multiline mode
-     * can also be achieved by calling {@link #setRows(int)}. The height value
-     * overrides the number of rows set by {@link #setRows(int)}.
-     * <p>
-     * If you want to set height of single line {@link TextField}, call
-     * {@link #setRows(int)} with value 0 after setting the height. Setting rows
-     * to 0 resets the side-effect.
-     * <p>
-     * Starting from 6.5 you should use {@link TextArea} instead of
-     * {@link TextField} for multiline text input.
-     * 
-     * 
-     * @see com.vaadin.ui.AbstractComponent#setHeight(float, int)
-     */
-    @Override
-    public void setHeight(float height, int unit) {
-        super.setHeight(height, unit);
-        if (height > 1 && getClass() == TextField.class) {
-            /*
-             * In html based terminals we most commonly want to make component
-             * to be textarea if height is defined. Setting row field above 0
-             * will render component as textarea.
-             */
-
-            setRows(2);
-        }
-    }
-
-    /**
-     * Sets the height of the {@link TextField} instance.
-     * 
-     * <p>
-     * Setting height for {@link TextField} also has a side-effect that puts
-     * {@link TextField} into multiline mode (aka "textarea"). Multiline mode
-     * can also be achieved by calling {@link #setRows(int)}. The height value
-     * overrides the number of rows set by {@link #setRows(int)}.
-     * <p>
-     * If you want to set height of single line {@link TextField}, call
-     * {@link #setRows(int)} with value 0 after setting the height. Setting rows
-     * to 0 resets the side-effect.
-     * 
-     * @see com.vaadin.ui.AbstractComponent#setHeight(java.lang.String)
-     */
-    @Override
-    public void setHeight(String height) {
-        // will call setHeight(float, int) the actually does the magic. Method
-        // is overridden just to document side-effects.
-        super.setHeight(height);
-    }
-
 }
index 46c966fe8b135867128a0351c1e6388c29debd9b..2e007831cb712fcd8c1bb1d295bb543e8670b27c 100644 (file)
@@ -9,6 +9,7 @@ import com.vaadin.ui.Component;
 import com.vaadin.ui.FormLayout;
 import com.vaadin.ui.HorizontalLayout;
 import com.vaadin.ui.Label;
+import com.vaadin.ui.PasswordField;
 import com.vaadin.ui.Root;
 import com.vaadin.ui.TextField;
 import com.vaadin.ui.VerticalLayout;
@@ -38,9 +39,8 @@ public class ErrorInUnloadEvent extends AbstractTestCase {
         FormLayout formLayout = new FormLayout();
         final TextField userField = new TextField("Username");
         userField.setDebugId("user");
-        final TextField passwordField = new TextField("Password");
+        final PasswordField passwordField = new PasswordField("Password");
         passwordField.setDebugId("pwd");
-        passwordField.setSecret(true);
         Button login = new Button("login");
         login.setDebugId("loginButton");
         login.setClickShortcut(KeyCode.ENTER);
@@ -51,8 +51,8 @@ public class ErrorInUnloadEvent extends AbstractTestCase {
 
         login.addListener(new ClickListener() {
             public void buttonClick(final ClickEvent event) {
-                String username = (String) userField.getValue();
-                String password = (String) passwordField.getValue();
+                String username = userField.getValue();
+                String password = passwordField.getValue();
 
                 setUser(username);
                 showMainWindow();
diff --git a/tests/testbench/com/vaadin/tests/components/formlayout/FormLayoutReplaceComponent.java b/tests/testbench/com/vaadin/tests/components/formlayout/FormLayoutReplaceComponent.java
deleted file mode 100644 (file)
index 4382a45..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-package com.vaadin.tests.components.formlayout;\r
-\r
-import com.vaadin.data.Property.ValueChangeEvent;\r
-import com.vaadin.data.Property.ValueChangeListener;\r
-import com.vaadin.tests.components.TestBase;\r
-import com.vaadin.ui.CheckBox;\r
-import com.vaadin.ui.FormLayout;\r
-import com.vaadin.ui.TextField;\r
-\r
-public class FormLayoutReplaceComponent extends TestBase {\r
-\r
-    @Override\r
-    protected void setup() {\r
-        addComponent(new FL());\r
-\r
-    }\r
-\r
-    public class FL extends FormLayout implements ValueChangeListener {\r
-\r
-        private TextField messages;\r
-        private CheckBox control;\r
-\r
-        @SuppressWarnings("deprecation")\r
-        public FL() {\r
-            setCaption("Test");\r
-            control = new CheckBox("Messages On/Off");\r
-            control.addListener(this);\r
-            control.setImmediate(true);\r
-            addComponent(control);\r
-\r
-            // The bug is in replaceComponent, triggered when VTextField is\r
-            // replaced by VTextArea so cannot replace this with TextArea.\r
-            messages = new TextField("Messages");\r
-            messages.setRows(10);\r
-            messages.setColumns(40);\r
-            messages.setVisible(false);\r
-            messages.setEnabled(false);\r
-            addComponent(messages);\r
-        }\r
-\r
-        public void valueChange(ValueChangeEvent event) {\r
-            if (event.getProperty() == control) {\r
-                messages.setVisible(control.getValue());\r
-            }\r
-\r
-        }\r
-    }\r
-\r
-    @Override\r
-    protected String getDescription() {\r
-        return "Check or uncheck the CheckBox to show/hide the messages field inside the FormLayout.";\r
-    }\r
-\r
-    @Override\r
-    protected Integer getTicketNumber() {\r
-        return 6308;\r
-    }\r
-\r
-}
index 583c57cb79766172dbb9b53ce8bc592beea7def9..a59a5421f51a4ddafdca67d80e46037c9be9eda9 100644 (file)
@@ -7,18 +7,18 @@ import com.vaadin.ui.Button.ClickListener;
 import com.vaadin.ui.NativeSelect;\r
 import com.vaadin.ui.Notification;\r
 import com.vaadin.ui.Root;\r
-import com.vaadin.ui.TextField;\r
+import com.vaadin.ui.TextArea;\r
 \r
 public class Notifications extends TestBase implements ClickListener {\r
 \r
     private static final String CAPTION = "CAPTION";\r
-    private TextField tf;\r
+    private TextArea tf;\r
     private NativeSelect type;\r
 \r
     @SuppressWarnings("deprecation")\r
     @Override\r
     protected void setup() {\r
-        tf = new TextField("Text", "Hello world");\r
+        tf = new TextArea("Text", "Hello world");\r
         tf.setRows(10);\r
         addComponent(tf);\r
         type = new NativeSelect();\r
@@ -51,7 +51,7 @@ public class Notifications extends TestBase implements ClickListener {
     }\r
 \r
     public void buttonClick(ClickEvent event) {\r
-        Notification n = new Notification((String) tf.getValue(),\r
+        Notification n = new Notification(tf.getValue(),\r
                 (Integer) type.getValue());\r
         Root.getCurrentRoot().showNotification(n);\r
 \r
index d362a3050d4629c6c14b86f7eeae49351f4cf026..3f05158c1078a9b99fa6fbccecf3add7f3ec3e81 100644 (file)
@@ -10,34 +10,28 @@ import com.vaadin.ui.CheckBox;
 import com.vaadin.ui.FormLayout;
 import com.vaadin.ui.HorizontalLayout;
 import com.vaadin.ui.Panel;
+import com.vaadin.ui.TextArea;
 import com.vaadin.ui.TextField;
 
 public class SelectionAndCursorPosition extends TestBase {
 
-    TextField tf = new TextField();
+    TextField tf = createTextField();
+    TextArea ta = createTextArea();
 
     @Override
     protected void setup() {
-
-        tf.setCaption("Text field");
-        tf.setValue("So we have some text to select");
-        tf.setWidth("400px");
-
         FormLayout fl = new FormLayout();
         Panel panel = new Panel(fl);
         panel.setCaption("Hackers panel");
         CheckBox ml = new CheckBox("Multiline");
         ml.setImmediate(true);
         ml.addListener(new Property.ValueChangeListener() {
-            @SuppressWarnings("deprecation")
             public void valueChange(ValueChangeEvent event) {
-                if (tf.getHeight() < 0) {
-                    tf.setHeight("50px");
+                if (tf.getApplication() == null) {
+                    replaceComponent(ta, tf);
                 } else {
-                    tf.setSizeUndefined();
-                    tf.setRows(0);
+                    replaceComponent(tf, ta);
                 }
-                tf.setWidth("400px");
             }
         });
         fl.addComponent(ml);
@@ -58,8 +52,8 @@ public class SelectionAndCursorPosition extends TestBase {
         b = new Button("select");
         b.addListener(new ClickListener() {
             public void buttonClick(ClickEvent event) {
-                int startPos = Integer.parseInt((String) start.getValue());
-                int lenght = Integer.parseInt((String) length.getValue());
+                int startPos = Integer.parseInt(start.getValue());
+                int lenght = Integer.parseInt(length.getValue());
                 tf.setSelectionRange(startPos, lenght);
             }
         });
@@ -74,7 +68,7 @@ public class SelectionAndCursorPosition extends TestBase {
         b = new Button("set");
         b.addListener(new ClickListener() {
             public void buttonClick(ClickEvent event) {
-                int startPos = Integer.parseInt((String) pos.getValue());
+                int startPos = Integer.parseInt(pos.getValue());
                 tf.setCursorPosition(startPos);
             }
         });
@@ -90,6 +84,25 @@ public class SelectionAndCursorPosition extends TestBase {
 
     }
 
+    private static TextField createTextField() {
+        TextField tf = new TextField();
+        tf.setCaption("Text field");
+        tf.setValue("So we have some text to select");
+        tf.setWidth("400px");
+
+        return tf;
+    }
+
+    private static TextArea createTextArea() {
+        TextArea ta = new TextArea();
+        ta.setCaption("Text area");
+        ta.setValue("So we have some text to select");
+        ta.setWidth("400px");
+        ta.setHeight("50px");
+
+        return ta;
+    }
+
     @Override
     protected String getDescription() {
         return "For usability reasons it is often essential that developer "
index 93ab80b88a43f1d234d7acbb9748f548c1a72b3e..7d993682fdec0bb1e2cf335e9526fc558cdf2779 100644 (file)
@@ -3,6 +3,7 @@ package com.vaadin.tests.components.textfield;
 import com.vaadin.tests.components.TestBase;
 import com.vaadin.ui.Component;
 import com.vaadin.ui.CssLayout;
+import com.vaadin.ui.TextArea;
 import com.vaadin.ui.TextField;
 import com.vaadin.ui.VerticalLayout;
 
@@ -37,10 +38,10 @@ public class SizedTextFields extends TestBase {
         vl.setHeight("40px");
         vl.setWidth("200px");
 
-        tf = new TextField();
-        tf.setRows(2); // make it text area, instead of oneliner
-        tf.setSizeFull();
-        vl.addComponent(tf);
+        TextArea ta = new TextArea();
+        ta.setRows(2); // make it text area, instead of oneliner
+        ta.setSizeFull();
+        vl.addComponent(ta);
         vl.setCaption("Fullsize textarea in 100px height 200px width box");
         cssLayout.addComponent(vl);
 
index 81b753d6e4870726bc02f9389d8f228cc37ea8da..4f5b62e327dea7495370cdce9c9ec25e2973fd0d 100644 (file)
@@ -1,7 +1,5 @@
 package com.vaadin.tests.components.textfield;\r
 \r
-import java.util.LinkedHashMap;\r
-\r
 import com.vaadin.event.FieldEvents.TextChangeListener;\r
 import com.vaadin.tests.components.abstractfield.AbstractTextFieldTest;\r
 import com.vaadin.ui.TextField;\r
@@ -9,27 +7,6 @@ import com.vaadin.ui.TextField;
 public class TextFieldTest extends AbstractTextFieldTest<TextField> implements\r
         TextChangeListener {\r
 \r
-    private Command<TextField, Boolean> secretCommand = new Command<TextField, Boolean>() {\r
-        @SuppressWarnings("deprecation")\r
-        public void execute(TextField c, Boolean value, Object data) {\r
-            c.setSecret(value);\r
-        }\r
-    };\r
-\r
-    private Command<TextField, Boolean> wordwrapCommand = new Command<TextField, Boolean>() {\r
-        @SuppressWarnings("deprecation")\r
-        public void execute(TextField c, Boolean value, Object data) {\r
-            c.setWordwrap(value);\r
-        }\r
-    };\r
-\r
-    private Command<TextField, Integer> rowsCommand = new Command<TextField, Integer>() {\r
-        @SuppressWarnings("deprecation")\r
-        public void execute(TextField c, Integer value, Object data) {\r
-            c.setRows(value);\r
-        }\r
-    };\r
-\r
     @Override\r
     protected Class<TextField> getTestClass() {\r
         return TextField.class;\r
@@ -38,22 +15,6 @@ public class TextFieldTest extends AbstractTextFieldTest<TextField> implements
     @Override\r
     protected void createActions() {\r
         super.createActions();\r
-        createSecretAction(CATEGORY_FEATURES);\r
-        createWordwrapAction(CATEGORY_FEATURES);\r
-        createRowsAction(CATEGORY_FEATURES);\r
-    }\r
-\r
-    private void createRowsAction(String category) {\r
-        LinkedHashMap<String, Integer> options = createIntegerOptions(20);\r
-        createSelectAction("Rows", category, options, "0", rowsCommand);\r
-    }\r
-\r
-    private void createSecretAction(String category) {\r
-        createBooleanAction("Secret", category, false, secretCommand);\r
-    }\r
-\r
-    private void createWordwrapAction(String category) {\r
-        createBooleanAction("Wordwrap", category, false, wordwrapCommand);\r
     }\r
 \r
 }\r
index bef997775dc36798f8e5bc16892bf0507e0c523f..7fc33edfc745c7ccdf20daa7f68d085aedfd92f2 100644 (file)
@@ -5,11 +5,11 @@ import com.vaadin.data.Property.ValueChangeListener;
 import com.vaadin.tests.components.TestBase;
 import com.vaadin.ui.CheckBox;
 import com.vaadin.ui.FormLayout;
-import com.vaadin.ui.TextField;
+import com.vaadin.ui.TextArea;
 
 public class FormLayoutWithInvisibleComponent extends TestBase {
 
-    private TextField messages;
+    private TextArea messages;
 
     @Override
     protected String getDescription() {
@@ -37,7 +37,7 @@ public class FormLayoutWithInvisibleComponent extends TestBase {
         control.setImmediate(true);
         formLayout.addComponent(control);
 
-        messages = new TextField("Messages hidden");
+        messages = new TextArea("Messages hidden");
         messages.setRows(10);
         messages.setColumns(40);
         messages.setVisible(false);
diff --git a/tests/testbench/com/vaadin/tests/layouts/WidgetImplementationSwap.java b/tests/testbench/com/vaadin/tests/layouts/WidgetImplementationSwap.java
deleted file mode 100644 (file)
index 283e9f7..0000000
+++ /dev/null
@@ -1,157 +0,0 @@
-package com.vaadin.tests.layouts;
-
-import com.vaadin.tests.components.TestBase;
-import com.vaadin.ui.AbsoluteLayout;
-import com.vaadin.ui.AbstractLayout;
-import com.vaadin.ui.Button;
-import com.vaadin.ui.Button.ClickEvent;
-import com.vaadin.ui.CssLayout;
-import com.vaadin.ui.GridLayout;
-import com.vaadin.ui.HorizontalLayout;
-import com.vaadin.ui.TextField;
-import com.vaadin.ui.VerticalLayout;
-
-@SuppressWarnings("deprecation")
-public class WidgetImplementationSwap extends TestBase {
-
-    @Override
-    protected void setup() {
-        setTheme("tests-tickets");
-
-        {
-            final AbstractLayout layout = new AbsoluteLayout();
-            layout.setCaption(layout.getClass().getSimpleName());
-            layout.setStyleName("borders");
-            layout.setWidth("500px");
-            layout.setHeight("50px");
-            addComponent(layout);
-            final TextField tf = new TextField();
-            layout.addComponent(tf);
-            Button b = new Button("-> TextArea", new Button.ClickListener() {
-                public void buttonClick(ClickEvent event) {
-                    if (tf.getRows() == 0) {
-                        tf.setRows(3);
-                        event.getButton().setCaption("Move");
-                    } else {
-                        layout.setCaption(layout.getClass().getSimpleName()
-                                + " done");
-                        event.getButton().setCaption("done");
-                    }
-
-                }
-            });
-            addComponent(b);
-        }
-        {
-            final AbstractLayout layout = new VerticalLayout();
-            layout.setCaption(layout.getClass().getSimpleName());
-            layout.setStyleName("borders");
-            layout.setWidth("500px");
-            layout.setHeight("50px");
-            addComponent(layout);
-            final TextField tf = new TextField();
-            layout.addComponent(tf);
-            Button b = new Button("-> TextArea", new Button.ClickListener() {
-                public void buttonClick(ClickEvent event) {
-                    if (tf.getRows() == 0) {
-                        tf.setRows(3);
-                        event.getButton().setCaption("Move");
-                    } else {
-                        layout.setCaption(layout.getClass().getSimpleName()
-                                + " done");
-                        event.getButton().setCaption("done");
-                    }
-
-                }
-            });
-            addComponent(b);
-        }
-
-        {
-            final AbstractLayout layout = new HorizontalLayout();
-            layout.setCaption(layout.getClass().getSimpleName());
-            layout.setStyleName("borders");
-            layout.setWidth("500px");
-            layout.setHeight("50px");
-            addComponent(layout);
-            final TextField tf = new TextField();
-            layout.addComponent(tf);
-            Button b = new Button("-> TextArea", new Button.ClickListener() {
-                public void buttonClick(ClickEvent event) {
-                    if (tf.getRows() == 0) {
-                        tf.setRows(3);
-                        event.getButton().setCaption("Move");
-                    } else {
-                        layout.setCaption(layout.getClass().getSimpleName()
-                                + " done");
-                        event.getButton().setCaption("done");
-                    }
-
-                }
-            });
-            addComponent(b);
-        }
-
-        {
-            final AbstractLayout layout = new GridLayout();
-            layout.setCaption(layout.getClass().getSimpleName());
-            layout.setStyleName("borders");
-            layout.setWidth("500px");
-            layout.setHeight("50px");
-            addComponent(layout);
-            final TextField tf = new TextField();
-            layout.addComponent(tf);
-            Button b = new Button("-> TextArea", new Button.ClickListener() {
-                public void buttonClick(ClickEvent event) {
-                    if (tf.getRows() == 0) {
-                        tf.setRows(3);
-                        event.getButton().setCaption("Move");
-                    } else {
-                        layout.setCaption(layout.getClass().getSimpleName()
-                                + " done");
-                        event.getButton().setCaption("done");
-                    }
-
-                }
-            });
-            addComponent(b);
-        }
-
-        {
-            final AbstractLayout layout = new CssLayout();
-            layout.setCaption(layout.getClass().getSimpleName());
-            layout.setStyleName("borders");
-            layout.setWidth("500px");
-            layout.setHeight("50px");
-            addComponent(layout);
-            final TextField tf = new TextField();
-            layout.addComponent(tf);
-            Button b = new Button("-> TextArea", new Button.ClickListener() {
-                public void buttonClick(ClickEvent event) {
-                    if (tf.getRows() == 0) {
-                        tf.setRows(3);
-                        event.getButton().setCaption("Move");
-                    } else {
-                        layout.setCaption(layout.getClass().getSimpleName()
-                                + " done");
-                        event.getButton().setCaption("done");
-                    }
-
-                }
-            });
-            addComponent(b);
-        }
-
-    }
-
-    @Override
-    protected String getDescription() {
-        return "First click turns TextField into a TextArea (on the client); second click modifies the layout - widget should still be a TextArea.";
-    }
-
-    @Override
-    protected Integer getTicketNumber() {
-        return 5457;
-    }
-
-}