diff options
author | Artur Signell <artur@vaadin.com> | 2016-08-18 17:43:28 +0300 |
---|---|---|
committer | Artur Signell <artur@vaadin.com> | 2016-08-19 06:25:44 +0000 |
commit | 599f6fa601f9cd8cd025061eb97b3e521c5b65c2 (patch) | |
tree | 6e679bc789fce8ef4cbc1019b99d0c66ecdd126d /server/src | |
parent | 1b73770105899b9015ff6685e7d6674934336ca4 (diff) | |
download | vaadin-framework-599f6fa601f9cd8cd025061eb97b3e521c5b65c2.tar.gz vaadin-framework-599f6fa601f9cd8cd025061eb97b3e521c5b65c2.zip |
Remove dependencies from core framework to old componnets
Change-Id: I4667d58ee54c8fda5af0608e232e403c4f8e424b
Diffstat (limited to 'server/src')
10 files changed, 27 insertions, 33 deletions
diff --git a/server/src/main/java/com/vaadin/ui/AbstractComponent.java b/server/src/main/java/com/vaadin/ui/AbstractComponent.java index 4e7cb19b74..536e831d87 100644 --- a/server/src/main/java/com/vaadin/ui/AbstractComponent.java +++ b/server/src/main/java/com/vaadin/ui/AbstractComponent.java @@ -62,7 +62,6 @@ import com.vaadin.shared.util.SharedUtil; import com.vaadin.ui.declarative.DesignAttributeHandler; import com.vaadin.ui.declarative.DesignContext; import com.vaadin.util.ReflectTools; -import com.vaadin.v7.ui.LegacyField; /** * An abstract class that defines default implementation for the @@ -1334,7 +1333,7 @@ public abstract class AbstractComponent extends AbstractClientConnector /** * Gets the {@link ActionManager} used to manage the - * {@link ShortcutListener}s added to this {@link LegacyField}. + * {@link ShortcutListener}s added to this component. * * @return the ActionManager in use */ diff --git a/server/src/main/java/com/vaadin/ui/Component.java b/server/src/main/java/com/vaadin/ui/Component.java index ac96c9e2d6..993d88d992 100644 --- a/server/src/main/java/com/vaadin/ui/Component.java +++ b/server/src/main/java/com/vaadin/ui/Component.java @@ -30,7 +30,6 @@ import com.vaadin.server.Resource; import com.vaadin.server.Sizeable; import com.vaadin.server.VariableOwner; import com.vaadin.ui.declarative.DesignContext; -import com.vaadin.v7.ui.LegacyField; /** * {@code Component} is the top-level interface that is and must be implemented @@ -379,8 +378,8 @@ public interface Component extends ClientConnector, Sizeable, Serializable { /** * Tests whether the component is in the read-only mode. The user can not - * change the value of a read-only component. As only {@link AbstractField} - * or {@link LegacyField} components normally have a value that can be input + * change the value of a read-only component. As only {@code AbstractField} + * or {@code LegacyField} components normally have a value that can be input * or changed by the user, this is mostly relevant only to field components, * though not restricted to them. * @@ -406,7 +405,7 @@ public interface Component extends ClientConnector, Sizeable, Serializable { * can not change the value of a read-only component. * * <p> - * As only {@link AbstractField} or{@link LegacyField} components normally + * As only {@code AbstractField} or{@code LegacyField} components normally * have a value that can be input or changed by the user, this is mostly * relevant only to field components, though not restricted to them. * </p> @@ -1028,14 +1027,14 @@ public interface Component extends ClientConnector, Sizeable, Serializable { /** * A sub-interface implemented by components that can obtain input focus. - * This includes all {@link LegacyField} components as well as some other - * components, such as {@link Upload}. + * This includes all {@code LegacyField} components as well as some other + * components, such as {@code Upload}. * * <p> * Focus can be set with {@link #focus()}. This interface does not provide * an accessor that would allow finding out the currently focused component; * focus information can be acquired for some (but not all) - * {@link LegacyField} components through the + * {@code LegacyField} components through the * {@link com.vaadin.event.FieldEvents.FocusListener} and * {@link com.vaadin.event.FieldEvents.BlurListener} interfaces. * </p> @@ -1069,7 +1068,7 @@ public interface Component extends ClientConnector, Sizeable, Serializable { * <p> * Notice that this interface does not provide an accessor that would * allow finding out the currently focused component. Focus information - * can be acquired for some (but not all) {@link LegacyField} components + * can be acquired for some (but not all) {@code LegacyField} components * through the {@link com.vaadin.event.FieldEvents.FocusListener} and * {@link com.vaadin.event.FieldEvents.BlurListener} interfaces. * </p> diff --git a/server/src/main/java/com/vaadin/ui/LoginForm.java b/server/src/main/java/com/vaadin/ui/LoginForm.java index 0cd2b18cf9..d5ec373a43 100644 --- a/server/src/main/java/com/vaadin/ui/LoginForm.java +++ b/server/src/main/java/com/vaadin/ui/LoginForm.java @@ -28,7 +28,6 @@ import com.vaadin.server.StreamResource; import com.vaadin.shared.ui.loginform.LoginFormConstants; import com.vaadin.shared.ui.loginform.LoginFormRpc; import com.vaadin.shared.ui.loginform.LoginFormState; -import com.vaadin.v7.ui.LegacyTextField; /** * Login form with auto-completion and auto-fill for all major browsers. You can diff --git a/server/src/main/java/com/vaadin/ui/themes/ValoTheme.java b/server/src/main/java/com/vaadin/ui/themes/ValoTheme.java index 721ce98d7d..c6b1260e93 100644 --- a/server/src/main/java/com/vaadin/ui/themes/ValoTheme.java +++ b/server/src/main/java/com/vaadin/ui/themes/ValoTheme.java @@ -17,7 +17,6 @@ package com.vaadin.ui.themes; import com.vaadin.server.FontAwesome; import com.vaadin.ui.Notification.Type; -import com.vaadin.ui.Table.ColumnHeaderMode; /** * <p> @@ -625,7 +624,7 @@ public class ValoTheme { /** * Hide the table column headers (effectively the same as - * {@link ColumnHeaderMode#HIDDEN}). Can be combined with any other + * {@code ColumnHeaderMode.HIDDEN}). Can be combined with any other * Table/TreeTable style. */ public static final String TABLE_NO_HEADER = "no-header"; diff --git a/server/src/test/java/com/vaadin/tests/design/ComponentFactoryTest.java b/server/src/test/java/com/vaadin/tests/design/ComponentFactoryTest.java index 3a0fca2acd..d978444c45 100644 --- a/server/src/test/java/com/vaadin/tests/design/ComponentFactoryTest.java +++ b/server/src/test/java/com/vaadin/tests/design/ComponentFactoryTest.java @@ -19,17 +19,15 @@ import java.io.ByteArrayInputStream; import java.util.ArrayList; import java.util.List; -import com.vaadin.ui.AbstractComponent; - import org.junit.After; import org.junit.Assert; import org.junit.Test; +import com.vaadin.ui.AbstractComponent; import com.vaadin.ui.Component; import com.vaadin.ui.Label; import com.vaadin.ui.declarative.Design; import com.vaadin.ui.declarative.Design.ComponentFactory; -import com.vaadin.v7.ui.LegacyTextField; import com.vaadin.ui.declarative.DesignContext; import com.vaadin.ui.declarative.DesignException; diff --git a/server/src/test/java/com/vaadin/tests/design/InvalidLayoutTemplate.java b/server/src/test/java/com/vaadin/tests/design/InvalidLayoutTemplate.java index 104f563b49..549caf6675 100644 --- a/server/src/test/java/com/vaadin/tests/design/InvalidLayoutTemplate.java +++ b/server/src/test/java/com/vaadin/tests/design/InvalidLayoutTemplate.java @@ -17,8 +17,8 @@ package com.vaadin.tests.design; import com.vaadin.ui.Button; import com.vaadin.ui.NativeButton; +import com.vaadin.ui.TextField; import com.vaadin.ui.VerticalLayout; -import com.vaadin.v7.ui.LegacyTextField; /** * @@ -30,7 +30,7 @@ public class InvalidLayoutTemplate extends VerticalLayout { private NativeButton secondButton; private NativeButton yetanotherbutton; // generated based on caption private Button clickme; // generated based on caption - private LegacyTextField shouldNotBeMapped; + private TextField shouldNotBeMapped; public NativeButton getFirstButton() { return firstButton; @@ -48,7 +48,7 @@ public class InvalidLayoutTemplate extends VerticalLayout { return clickme; } - public LegacyTextField getShouldNotBeMapped() { + public TextField getShouldNotBeMapped() { return shouldNotBeMapped; } diff --git a/server/src/test/java/com/vaadin/tests/design/ParseLayoutTest.java b/server/src/test/java/com/vaadin/tests/design/ParseLayoutTest.java index e8756e160a..56e9a44087 100644 --- a/server/src/test/java/com/vaadin/tests/design/ParseLayoutTest.java +++ b/server/src/test/java/com/vaadin/tests/design/ParseLayoutTest.java @@ -36,7 +36,7 @@ import org.junit.Test; import com.vaadin.ui.Component; import com.vaadin.ui.HorizontalLayout; -import com.vaadin.ui.TextArea; +import com.vaadin.ui.PasswordField; import com.vaadin.ui.TextField; import com.vaadin.ui.VerticalLayout; import com.vaadin.ui.declarative.Design; @@ -195,7 +195,7 @@ public class ParseLayoutTest { // Check the remaining two components of the vertical layout assertTextField(vlayout); - assertTextArea(vlayout); + assertPasswordField(vlayout); } private void assertComponentHierarchy() { @@ -209,11 +209,11 @@ public class ParseLayoutTest { assertThat(tf.getCaption(), is("Text input")); } - private void assertTextArea(VerticalLayout layout) { - TextArea ta = (TextArea) layout.getComponent(2); + private void assertPasswordField(VerticalLayout layout) { + PasswordField pf = (PasswordField) layout.getComponent(2); - assertThat(ta.getCaption(), is("Text area")); - assertThat(ta.getWidth(), is(300f)); - assertThat(ta.getHeight(), is(200f)); + assertThat(pf.getCaption(), is("Password field")); + assertThat(pf.getWidth(), is(300f)); + assertThat(pf.getHeight(), is(200f)); } } diff --git a/server/src/test/java/com/vaadin/tests/design/designroot/ExtendedDesignWithAnnotation.java b/server/src/test/java/com/vaadin/tests/design/designroot/ExtendedDesignWithAnnotation.java index 62abcaecb9..28d419b27e 100644 --- a/server/src/test/java/com/vaadin/tests/design/designroot/ExtendedDesignWithAnnotation.java +++ b/server/src/test/java/com/vaadin/tests/design/designroot/ExtendedDesignWithAnnotation.java @@ -15,13 +15,13 @@ */ package com.vaadin.tests.design.designroot; -import com.vaadin.v7.ui.LegacyTextField; +import com.vaadin.ui.TextField; public class ExtendedDesignWithAnnotation extends DesignWithAnnotation { - private LegacyTextField customField = new LegacyTextField(); + private TextField customField = new TextField(); public ExtendedDesignWithAnnotation() { - customField.setInputPrompt("Something"); + customField.setPlaceholder("Something"); addComponent(customField); } diff --git a/server/src/test/java/com/vaadin/tests/design/designroot/ExtendedDesignWithEmptyAnnotation.java b/server/src/test/java/com/vaadin/tests/design/designroot/ExtendedDesignWithEmptyAnnotation.java index ab2b2c1d49..3653108fa5 100644 --- a/server/src/test/java/com/vaadin/tests/design/designroot/ExtendedDesignWithEmptyAnnotation.java +++ b/server/src/test/java/com/vaadin/tests/design/designroot/ExtendedDesignWithEmptyAnnotation.java @@ -17,17 +17,17 @@ package com.vaadin.tests.design.designroot; import com.vaadin.ui.Button.ClickEvent; import com.vaadin.ui.Button.ClickListener; -import com.vaadin.v7.ui.LegacyTextField; import com.vaadin.ui.Notification; +import com.vaadin.ui.TextField; public class ExtendedDesignWithEmptyAnnotation extends DesignWithEmptyAnnotation { - private LegacyTextField customField = new LegacyTextField(); + private TextField customField = new TextField(); public ExtendedDesignWithEmptyAnnotation() { super(); - customField.setInputPrompt("Something"); + customField.setPlaceholder("Something"); addComponent(customField); ok.addClickListener(new ClickListener() { diff --git a/server/src/test/resources/com/vaadin/tests/design/testFile.html b/server/src/test/resources/com/vaadin/tests/design/testFile.html index ab23d1d1b2..f7f015b1b2 100644 --- a/server/src/test/resources/com/vaadin/tests/design/testFile.html +++ b/server/src/test/resources/com/vaadin/tests/design/testFile.html @@ -13,7 +13,7 @@ <vaadin-button plain-text width = "150px">Click me</vaadin-button> </vaadin-horizontal-layout> <vaadin-text-field caption = "Text input"/> - <vaadin-text-area caption = "Text area" height="200px" width="300px"/> + <vaadin-password-field caption = "Password field" height="200px" width="300px"/> </vaadin-vertical-layout> </body> </html>
\ No newline at end of file |