aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--server/src/main/java/com/vaadin/ui/AbstractTextField.java26
-rw-r--r--server/src/test/java/com/vaadin/tests/server/component/abstracttextfield/AbstractTextFieldDeclarativeTest.java4
-rw-r--r--shared/src/main/java/com/vaadin/shared/ui/textfield/AbstractTextFieldState.java5
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/textfield/InputPromptAndCursorPosition.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/layouts/FormLayoutWithInvisibleComponent.java2
-rw-r--r--uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridHeaderFooterComponents.java2
6 files changed, 4 insertions, 37 deletions
diff --git a/server/src/main/java/com/vaadin/ui/AbstractTextField.java b/server/src/main/java/com/vaadin/ui/AbstractTextField.java
index e447fd6724..e1b0273c6c 100644
--- a/server/src/main/java/com/vaadin/ui/AbstractTextField.java
+++ b/server/src/main/java/com/vaadin/ui/AbstractTextField.java
@@ -213,32 +213,6 @@ public abstract class AbstractTextField extends AbstractField<String> {
}
/**
- * Gets 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.
- *
- * @return the number of columns in the editor.
- */
- public int getColumns() {
- return getState(false).columns;
- }
-
- /**
- * 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.
- *
- * @param columns
- * the number of columns to set.
- */
- public void setColumns(int columns) {
- if (columns < 0) {
- columns = 0;
- }
- getState().columns = columns;
- }
-
- /**
* Sets the mode how the TextField triggers {@link ValueChange}s.
*
* @param mode
diff --git a/server/src/test/java/com/vaadin/tests/server/component/abstracttextfield/AbstractTextFieldDeclarativeTest.java b/server/src/test/java/com/vaadin/tests/server/component/abstracttextfield/AbstractTextFieldDeclarativeTest.java
index e5d7ef04ec..63367363d5 100644
--- a/server/src/test/java/com/vaadin/tests/server/component/abstracttextfield/AbstractTextFieldDeclarativeTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/component/abstracttextfield/AbstractTextFieldDeclarativeTest.java
@@ -36,15 +36,13 @@ public class AbstractTextFieldDeclarativeTest
String design = "<vaadin-text-field "
// + "null-representation=this-is-null "
// + "null-setting-allowed "
- + "maxlength=5 columns=3 "
- + "placeholder=input value-change-mode=eager "
+ + "maxlength=5 " + "placeholder=input value-change-mode=eager "
+ "value-change-timeout=100 />";
AbstractTextField tf = new TextField();
// FIXME
// tf.setNullRepresentation("this-is-null");
// tf.setNullSettingAllowed(true);
tf.setMaxLength(5);
- tf.setColumns(3);
tf.setPlaceholder("input");
tf.setValueChangeMode(ValueChangeMode.EAGER);
tf.setValueChangeTimeout(100);
diff --git a/shared/src/main/java/com/vaadin/shared/ui/textfield/AbstractTextFieldState.java b/shared/src/main/java/com/vaadin/shared/ui/textfield/AbstractTextFieldState.java
index b35fd89a27..2eac070b5e 100644
--- a/shared/src/main/java/com/vaadin/shared/ui/textfield/AbstractTextFieldState.java
+++ b/shared/src/main/java/com/vaadin/shared/ui/textfield/AbstractTextFieldState.java
@@ -32,11 +32,6 @@ public abstract class AbstractTextFieldState extends AbstractFieldState {
public int maxLength = -1;
/**
- * Number of visible columns in the TextField.
- */
- public int columns = 0;
-
- /**
* The prompt to display in an empty field. Null when disabled.
*/
@DelegateToWidget
diff --git a/uitest/src/main/java/com/vaadin/tests/components/textfield/InputPromptAndCursorPosition.java b/uitest/src/main/java/com/vaadin/tests/components/textfield/InputPromptAndCursorPosition.java
index bc69e04dcb..643c96b170 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/textfield/InputPromptAndCursorPosition.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/textfield/InputPromptAndCursorPosition.java
@@ -12,7 +12,7 @@ public class InputPromptAndCursorPosition extends AbstractTestUI {
@Override
protected void setup(VaadinRequest request) {
final TextField tf = new TextField();
- tf.setColumns(40);
+ tf.setWidth("40em");
tf.setValue(
"Delete this text to reveal input prompt and update cursor position.");
tf.setPlaceholder("This is an input prompt");
diff --git a/uitest/src/main/java/com/vaadin/tests/layouts/FormLayoutWithInvisibleComponent.java b/uitest/src/main/java/com/vaadin/tests/layouts/FormLayoutWithInvisibleComponent.java
index 76a3dba08f..b17a2a771b 100644
--- a/uitest/src/main/java/com/vaadin/tests/layouts/FormLayoutWithInvisibleComponent.java
+++ b/uitest/src/main/java/com/vaadin/tests/layouts/FormLayoutWithInvisibleComponent.java
@@ -33,7 +33,7 @@ public class FormLayoutWithInvisibleComponent extends TestBase {
messages = new TextArea("Messages hidden");
messages.setRows(10);
- messages.setColumns(40);
+ messages.setWidth("40em");
messages.setVisible(false);
messages.setEnabled(false);
formLayout.addComponent(messages);
diff --git a/uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridHeaderFooterComponents.java b/uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridHeaderFooterComponents.java
index ffcf312544..cae129a906 100644
--- a/uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridHeaderFooterComponents.java
+++ b/uitest/src/main/java/com/vaadin/v7/tests/components/grid/GridHeaderFooterComponents.java
@@ -123,7 +123,7 @@ public class GridHeaderFooterComponents extends AbstractTestUIWithLog {
private TextField createTextField(final Object pid) {
TextField filterField = new TextField();
- filterField.setColumns(8);
+ filterField.setWidth("8em");
filterField.setValue("Filter: " + pid);
filterField.addValueChangeListener(listener -> {
log("value change for field in " + pid + " to "