diff options
author | Artur Signell <artur@vaadin.com> | 2012-11-22 12:19:05 +0200 |
---|---|---|
committer | Artur Signell <artur@vaadin.com> | 2012-11-22 14:52:21 +0200 |
commit | a50b5143598423724fda02788369b7eb0fb9fb30 (patch) | |
tree | 6fbd892ff27c5252ec2fbb60c267134dda882455 /server/src/com/vaadin/ui/NativeSelect.java | |
parent | 7fb247173e34e445e13fcec76b30246be8799791 (diff) | |
download | vaadin-framework-a50b5143598423724fda02788369b7eb0fb9fb30.tar.gz vaadin-framework-a50b5143598423724fda02788369b7eb0fb9fb30.zip |
Deprecated setColumns in selects (#5814)
Change-Id: Iada489b12b904d1a52d2e4633e4360d61b88a4af
Diffstat (limited to 'server/src/com/vaadin/ui/NativeSelect.java')
-rw-r--r-- | server/src/com/vaadin/ui/NativeSelect.java | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/server/src/com/vaadin/ui/NativeSelect.java b/server/src/com/vaadin/ui/NativeSelect.java index 8006813276..7b7bbb73b1 100644 --- a/server/src/com/vaadin/ui/NativeSelect.java +++ b/server/src/com/vaadin/ui/NativeSelect.java @@ -51,13 +51,21 @@ public class NativeSelect extends AbstractSelect { } /** - * Sets the number of columns in the editor. If the number of columns is set - * 0, the actual number of displayed columns is determined implicitly by the - * adapter. + * Sets the width of the component so that it can display approximately the + * given number of letters. + * <p> + * Calling {@code setColumns(10);} is equivalent to calling + * {@code setWidth("10em");} + * </p> * + * @deprecated As of 7.0. "Columns" does not reflect the exact number of + * characters that will be displayed. It is better to use + * setWidth together with "em" to control the width of the + * field. * @param columns * the number of columns to set. */ + @Deprecated public void setColumns(int columns) { if (columns < 0) { columns = 0; @@ -68,6 +76,16 @@ public class NativeSelect extends AbstractSelect { } } + /** + * Gets the number of columns for the component. + * + * @see #setColumns(int) + * @deprecated As of 7.0. "Columns" does not reflect the exact number of + * characters that will be displayed. It is better to use + * setWidth together with "em" to control the width of the + * field. + */ + @Deprecated public int getColumns() { return columns; } |