diff options
author | Artur Signell <artur@vaadin.com> | 2016-08-25 14:46:30 +0300 |
---|---|---|
committer | Artur Signell <artur@vaadin.com> | 2016-08-26 11:40:13 +0300 |
commit | c11121e2b7e685d42eb129c8a97e5ed4690af2f2 (patch) | |
tree | e1ed542be05eda64d12d18f8310db9900f835cb5 | |
parent | 58853fe47bb01a0c0c2b5c380056d22ccccd6f08 (diff) | |
download | vaadin-framework-c11121e2b7e685d42eb129c8a97e5ed4690af2f2.tar.gz vaadin-framework-c11121e2b7e685d42eb129c8a97e5ed4690af2f2.zip |
Move old Field and AbstractField to compatibility package
Change-Id: Ia9b6f77763abac87ec61d1ee198cb8d41419a934
9 files changed, 34 insertions, 25 deletions
diff --git a/server/src/main/java/com/vaadin/v7/ui/AbstractField.java b/compatibility-server/src/main/java/com/vaadin/v7/ui/AbstractField.java index 33f262d581..33f262d581 100644 --- a/server/src/main/java/com/vaadin/v7/ui/AbstractField.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/ui/AbstractField.java diff --git a/server/src/main/java/com/vaadin/v7/ui/Field.java b/compatibility-server/src/main/java/com/vaadin/v7/ui/Field.java index 0756dfaf90..0756dfaf90 100644 --- a/server/src/main/java/com/vaadin/v7/ui/Field.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/ui/Field.java diff --git a/compatibility-server/src/test/java/com/vaadin/v7/tests/VaadinClasses.java b/compatibility-server/src/test/java/com/vaadin/v7/tests/VaadinClasses.java new file mode 100644 index 0000000000..b37f1bbe86 --- /dev/null +++ b/compatibility-server/src/test/java/com/vaadin/v7/tests/VaadinClasses.java @@ -0,0 +1,21 @@ +package com.vaadin.v7.tests; + +import java.io.IOException; +import java.util.List; + +import com.vaadin.v7.ui.Field; + +@SuppressWarnings("deprecation") +public class VaadinClasses { + + public static List<Class<? extends Field>> getFields() { + try { + return com.vaadin.tests.VaadinClasses.findClasses(Field.class, + "com.vaadin.ui"); + } catch (IOException e) { + e.printStackTrace(); + return null; + } + } + +} diff --git a/server/src/test/java/com/vaadin/tests/server/components/AbstractFieldValueChangeTestBase.java b/compatibility-server/src/test/java/com/vaadin/v7/tests/server/component/abstractfield/AbstractFieldValueChangeTestBase.java index 36057e935f..e37e19aecb 100644 --- a/server/src/test/java/com/vaadin/tests/server/components/AbstractFieldValueChangeTestBase.java +++ b/compatibility-server/src/test/java/com/vaadin/v7/tests/server/component/abstractfield/AbstractFieldValueChangeTestBase.java @@ -1,4 +1,4 @@ -package com.vaadin.tests.server.components; +package com.vaadin.v7.tests.server.component.abstractfield; import org.easymock.EasyMock; import org.junit.Test; diff --git a/server/src/test/java/com/vaadin/tests/server/component/FieldDefaultValuesTest.java b/compatibility-server/src/test/java/com/vaadin/v7/tests/server/component/abstractfield/FieldDefaultValuesTest.java index ba2bccfb78..a53e3bbbd1 100644 --- a/server/src/test/java/com/vaadin/tests/server/component/FieldDefaultValuesTest.java +++ b/compatibility-server/src/test/java/com/vaadin/v7/tests/server/component/abstractfield/FieldDefaultValuesTest.java @@ -13,7 +13,7 @@ * License for the specific language governing permissions and limitations under * the License. */ -package com.vaadin.tests.server.component; +package com.vaadin.v7.tests.server.component.abstractfield; import java.util.ArrayList; import java.util.List; @@ -21,8 +21,8 @@ import java.util.List; import org.junit.Assert; import org.junit.Test; -import com.vaadin.tests.VaadinClasses; import com.vaadin.ui.Slider; +import com.vaadin.v7.tests.VaadinClasses; import com.vaadin.v7.ui.Field; public class FieldDefaultValuesTest { @@ -67,8 +67,7 @@ public class FieldDefaultValuesTest { throws InstantiationException, IllegalAccessException { List<Field<?>> fieldInstances = new ArrayList<Field<?>>(); - for (Class<? extends Field> fieldType : VaadinClasses - .getFields()) { + for (Class<? extends Field> fieldType : VaadinClasses.getFields()) { fieldInstances.add(fieldType.newInstance()); } return fieldInstances; diff --git a/compatibility-server/src/test/java/com/vaadin/v7/tests/server/component/textfield/TextFieldValueChangeTest.java b/compatibility-server/src/test/java/com/vaadin/v7/tests/server/component/textfield/TextFieldValueChangeTest.java index bb286296b4..9a35dbeacd 100644 --- a/compatibility-server/src/test/java/com/vaadin/v7/tests/server/component/textfield/TextFieldValueChangeTest.java +++ b/compatibility-server/src/test/java/com/vaadin/v7/tests/server/component/textfield/TextFieldValueChangeTest.java @@ -8,9 +8,9 @@ import org.junit.Assert; import org.junit.Before; import org.junit.Test; -import com.vaadin.tests.server.components.AbstractFieldValueChangeTestBase; import com.vaadin.v7.data.Property.ValueChangeEvent; import com.vaadin.v7.data.util.ObjectProperty; +import com.vaadin.v7.tests.server.component.abstractfield.AbstractFieldValueChangeTestBase; import com.vaadin.v7.ui.AbstractField; import com.vaadin.v7.ui.TextField; diff --git a/compatibility-server/src/test/java/com/vaadin/v7/tests/server/components/ComboBoxValueChangeTest.java b/compatibility-server/src/test/java/com/vaadin/v7/tests/server/components/ComboBoxValueChangeTest.java index dbba1a0e9f..ffb46c519a 100644 --- a/compatibility-server/src/test/java/com/vaadin/v7/tests/server/components/ComboBoxValueChangeTest.java +++ b/compatibility-server/src/test/java/com/vaadin/v7/tests/server/components/ComboBoxValueChangeTest.java @@ -4,8 +4,8 @@ import org.junit.Before; import com.vaadin.server.ServerRpcManager; import com.vaadin.server.ServerRpcMethodInvocation; -import com.vaadin.tests.server.components.AbstractFieldValueChangeTestBase; import com.vaadin.v7.shared.ui.combobox.ComboBoxServerRpc; +import com.vaadin.v7.tests.server.component.abstractfield.AbstractFieldValueChangeTestBase; import com.vaadin.v7.ui.AbstractField; import com.vaadin.v7.ui.ComboBox; diff --git a/server/src/main/java/com/vaadin/event/FieldEvents.java b/server/src/main/java/com/vaadin/event/FieldEvents.java index a8e5ca8191..ba84e96b3f 100644 --- a/server/src/main/java/com/vaadin/event/FieldEvents.java +++ b/server/src/main/java/com/vaadin/event/FieldEvents.java @@ -24,7 +24,6 @@ import com.vaadin.shared.communication.FieldRpc.FocusAndBlurServerRpc; import com.vaadin.ui.Component; import com.vaadin.ui.Component.Event; import com.vaadin.util.ReflectTools; -import com.vaadin.v7.ui.Field; /** * Interface that serves as a wrapper for {@link Field} related events. @@ -43,7 +42,7 @@ public interface FieldEvents { public interface FocusNotifier extends Serializable { /** * Adds a <code>FocusListener</code> to the Component which gets fired - * when a <code>LegacyField</code> receives keyboard focus. + * when a <code>Field</code> receives keyboard focus. * * @param listener * @see FocusListener @@ -74,7 +73,7 @@ public interface FieldEvents { public interface BlurNotifier extends Serializable { /** * Adds a <code>BlurListener</code> to the Component which gets fired - * when a <code>LegacyField</code> loses keyboard focus. + * when a <code>Field</code> loses keyboard focus. * * @param listener * @see BlurListener @@ -95,7 +94,7 @@ public interface FieldEvents { /** * <code>FocusEvent</code> class for holding additional event information. - * Fired when a <code>LegacyField</code> receives keyboard focus. + * Fired when a <code>Field</code> receives keyboard focus. * * @since 6.2 */ @@ -114,7 +113,7 @@ public interface FieldEvents { /** * <code>FocusListener</code> interface for listening for - * <code>FocusEvent</code> fired by a <code>LegacyField</code>. + * <code>FocusEvent</code> fired by a <code>Field</code>. * * @see FocusEvent * @since 6.2 @@ -135,7 +134,7 @@ public interface FieldEvents { /** * <code>BlurEvent</code> class for holding additional event information. - * Fired when a <code>LegacyField</code> loses keyboard focus. + * Fired when a <code>Field</code> loses keyboard focus. * * @since 6.2 */ @@ -154,7 +153,7 @@ public interface FieldEvents { /** * <code>BlurListener</code> interface for listening for - * <code>BlurEvent</code> fired by a <code>LegacyField</code>. + * <code>BlurEvent</code> fired by a <code>Field</code>. * * @see BlurEvent * @since 6.2 diff --git a/server/src/test/java/com/vaadin/tests/VaadinClasses.java b/server/src/test/java/com/vaadin/tests/VaadinClasses.java index ad1119a8ad..ba56fcee35 100644 --- a/server/src/test/java/com/vaadin/tests/VaadinClasses.java +++ b/server/src/test/java/com/vaadin/tests/VaadinClasses.java @@ -29,7 +29,6 @@ import com.vaadin.ui.UI; import com.vaadin.ui.VerticalSplitPanel; import com.vaadin.ui.Window; import com.vaadin.ui.themes.BaseTheme; -import com.vaadin.v7.ui.Field; @SuppressWarnings("deprecation") public class VaadinClasses { @@ -63,15 +62,6 @@ public class VaadinClasses { } } - public static List<Class<? extends Field>> getFields() { - try { - return findClasses(Field.class, "com.vaadin.ui"); - } catch (IOException e) { - e.printStackTrace(); - return null; - } - } - public static List<Class<? extends BaseTheme>> getThemeClasses() { try { return findClasses(BaseTheme.class, "com.vaadin.ui.themes"); @@ -136,7 +126,7 @@ public class VaadinClasses { } - private static <T> List<Class<? extends T>> findClasses(Class<T> baseClass, + public static <T> List<Class<? extends T>> findClasses(Class<T> baseClass, String basePackage) throws IOException { return findClasses(baseClass, basePackage, new String[] {}); } |