summaryrefslogtreecommitdiffstats
path: root/src/com/vaadin
diff options
context:
space:
mode:
authorArtur Signell <artur@vaadin.com>2011-12-19 12:53:15 +0200
committerArtur Signell <artur@vaadin.com>2011-12-19 13:07:04 +0200
commit4e83a72e86c258495ec0c1062752e862137aa751 (patch)
tree24fcb2673a3554dc8a50556bc6542da499424d61 /src/com/vaadin
parentb21fe98afaf9e9535d4d059aa362c3f11dc639b0 (diff)
downloadvaadin-framework-4e83a72e86c258495ec0c1062752e862137aa751.tar.gz
vaadin-framework-4e83a72e86c258495ec0c1062752e862137aa751.zip
#8026 Removed deprecated API from TextField
Diffstat (limited to 'src/com/vaadin')
-rw-r--r--src/com/vaadin/terminal/gwt/client/WidgetSet.java12
-rw-r--r--src/com/vaadin/ui/TextField.java200
2 files changed, 1 insertions, 211 deletions
diff --git a/src/com/vaadin/terminal/gwt/client/WidgetSet.java b/src/com/vaadin/terminal/gwt/client/WidgetSet.java
index 9a11dd9f0d..e546761b54 100644
--- a/src/com/vaadin/terminal/gwt/client/WidgetSet.java
+++ b/src/com/vaadin/terminal/gwt/client/WidgetSet.java
@@ -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);
}
diff --git a/src/com/vaadin/ui/TextField.java b/src/com/vaadin/ui/TextField.java
index 0d719efd12..e154aaad17 100644
--- a/src/com/vaadin/ui/TextField.java
+++ b/src/com/vaadin/ui/TextField.java
@@ -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;
@@ -35,26 +33,6 @@ import com.vaadin.ui.ClientWidget.LoadStyle;
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.
*/
public TextField() {
@@ -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);
- }
-
}