summaryrefslogtreecommitdiffstats
path: root/src/com
diff options
context:
space:
mode:
authorMatti Tahvonen <matti.tahvonen@itmill.com>2010-11-04 17:52:03 +0000
committerMatti Tahvonen <matti.tahvonen@itmill.com>2010-11-04 17:52:03 +0000
commit7c4cabc0d93b318f3f6b34e165cfbf5d6f48a7ea (patch)
tree8d9b27158891713f0342071226aec9536305bc86 /src/com
parent271843820c77639d97670f63bf97697387b5a7a1 (diff)
downloadvaadin-framework-7c4cabc0d93b318f3f6b34e165cfbf5d6f48a7ea.tar.gz
vaadin-framework-7c4cabc0d93b318f3f6b34e165cfbf5d6f48a7ea.zip
depracated obsolete helper method from AbstractField. Replaced the implementation body to use DefaultFieldFactory's method instead
svn changeset:15871/svn branch:6.5
Diffstat (limited to 'src/com')
-rw-r--r--src/com/vaadin/ui/AbstractField.java28
1 files changed, 6 insertions, 22 deletions
diff --git a/src/com/vaadin/ui/AbstractField.java b/src/com/vaadin/ui/AbstractField.java
index 4aa56a93f8..faa2dad5a1 100644
--- a/src/com/vaadin/ui/AbstractField.java
+++ b/src/com/vaadin/ui/AbstractField.java
@@ -8,7 +8,6 @@ import java.io.Serializable;
import java.lang.reflect.Method;
import java.util.Collection;
import java.util.Collections;
-import java.util.Date;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.Map;
@@ -1014,29 +1013,14 @@ public abstract class AbstractField extends AbstractComponent implements Field,
*
* @param propertyType
* the Type of the property, that needs to be edited.
+ * @deprecated use e.g.
+ * {@link DefaultFieldFactory#createFieldByPropertyType(Class)}
+ * instead
*/
+ @Deprecated
public static AbstractField constructField(Class<?> propertyType) {
-
- // Null typed properties can not be edited
- if (propertyType == null) {
- return null;
- }
-
- // Date field
- if (Date.class.isAssignableFrom(propertyType)) {
- return new DateField();
- }
-
- // Boolean field
- if (Boolean.class.isAssignableFrom(propertyType)) {
- final Button button = new Button("");
- button.setSwitchMode(true);
- button.setImmediate(false);
- return button;
- }
-
- // Text field is used by default
- return new TextField();
+ return (AbstractField) DefaultFieldFactory
+ .createFieldByPropertyType(propertyType);
}
/*