summaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
authorAleksi Hietanen <aleksi@vaadin.com>2016-08-10 12:50:44 +0300
committerArtur Signell <artur@vaadin.com>2016-08-18 20:05:57 +0300
commit470deb3e15d96388049f2acb6278a2af4bc81155 (patch)
tree5a3b8ffbbae2f6e62eb1c6611c16b31d81a2e7b7 /client
parentf3c880194b20b9f9d192e72724865233065ccf04 (diff)
downloadvaadin-framework-470deb3e15d96388049f2acb6278a2af4bc81155.tar.gz
vaadin-framework-470deb3e15d96388049f2acb6278a2af4bc81155.zip
Implement new PasswordField (#52)
Change-Id: I12236a856403942382633aad5992467576baa7fc
Diffstat (limited to 'client')
-rw-r--r--client/src/main/java/com/vaadin/client/ui/VPasswordField.java7
-rw-r--r--client/src/main/java/com/vaadin/client/ui/passwordfield/PasswordFieldConnector.java5
-rw-r--r--client/src/main/java/com/vaadin/client/v7/ui/VLegacyPasswordField.java34
-rw-r--r--client/src/main/java/com/vaadin/client/v7/ui/passwordfield/LegacyPasswordFieldConnector.java32
4 files changed, 72 insertions, 6 deletions
diff --git a/client/src/main/java/com/vaadin/client/ui/VPasswordField.java b/client/src/main/java/com/vaadin/client/ui/VPasswordField.java
index 9399b17f8d..d8c3b1f012 100644
--- a/client/src/main/java/com/vaadin/client/ui/VPasswordField.java
+++ b/client/src/main/java/com/vaadin/client/ui/VPasswordField.java
@@ -17,18 +17,19 @@
package com.vaadin.client.ui;
import com.google.gwt.user.client.DOM;
-import com.vaadin.client.v7.ui.VLegacyTextField;
/**
* This class represents a password field.
*
* @author Vaadin Ltd.
- *
*/
-public class VPasswordField extends VLegacyTextField {
+public class VPasswordField extends VTextField {
+
+ public static final String CLASSNAME = "v-passwordfield";
public VPasswordField() {
super(DOM.createInputPassword());
+ setStyleName(CLASSNAME);
}
}
diff --git a/client/src/main/java/com/vaadin/client/ui/passwordfield/PasswordFieldConnector.java b/client/src/main/java/com/vaadin/client/ui/passwordfield/PasswordFieldConnector.java
index 403ccc4193..c129c12c8f 100644
--- a/client/src/main/java/com/vaadin/client/ui/passwordfield/PasswordFieldConnector.java
+++ b/client/src/main/java/com/vaadin/client/ui/passwordfield/PasswordFieldConnector.java
@@ -13,16 +13,15 @@
* License for the specific language governing permissions and limitations under
* the License.
*/
-
package com.vaadin.client.ui.passwordfield;
import com.vaadin.client.ui.VPasswordField;
-import com.vaadin.client.v7.ui.textfield.LegacyTextFieldConnector;
+import com.vaadin.client.ui.textfield.TextFieldConnector;
import com.vaadin.shared.ui.Connect;
import com.vaadin.ui.PasswordField;
@Connect(PasswordField.class)
-public class PasswordFieldConnector extends LegacyTextFieldConnector {
+public class PasswordFieldConnector extends TextFieldConnector {
@Override
public VPasswordField getWidget() {
diff --git a/client/src/main/java/com/vaadin/client/v7/ui/VLegacyPasswordField.java b/client/src/main/java/com/vaadin/client/v7/ui/VLegacyPasswordField.java
new file mode 100644
index 0000000000..ffc1422eb0
--- /dev/null
+++ b/client/src/main/java/com/vaadin/client/v7/ui/VLegacyPasswordField.java
@@ -0,0 +1,34 @@
+/*
+ * Copyright 2000-2016 Vaadin Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+
+package com.vaadin.client.v7.ui;
+
+import com.google.gwt.user.client.DOM;
+
+/**
+ * This class represents a password field.
+ *
+ * @author Vaadin Ltd.
+ *
+ */
+@Deprecated
+public class VLegacyPasswordField extends VLegacyTextField {
+
+ public VLegacyPasswordField() {
+ super(DOM.createInputPassword());
+ }
+
+}
diff --git a/client/src/main/java/com/vaadin/client/v7/ui/passwordfield/LegacyPasswordFieldConnector.java b/client/src/main/java/com/vaadin/client/v7/ui/passwordfield/LegacyPasswordFieldConnector.java
new file mode 100644
index 0000000000..1c3f89d693
--- /dev/null
+++ b/client/src/main/java/com/vaadin/client/v7/ui/passwordfield/LegacyPasswordFieldConnector.java
@@ -0,0 +1,32 @@
+/*
+ * Copyright 2000-2016 Vaadin Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+
+package com.vaadin.client.v7.ui.passwordfield;
+
+import com.vaadin.client.v7.ui.VLegacyPasswordField;
+import com.vaadin.client.v7.ui.textfield.LegacyTextFieldConnector;
+import com.vaadin.shared.ui.Connect;
+import com.vaadin.v7.ui.LegacyPasswordField;
+
+@Deprecated
+@Connect(LegacyPasswordField.class)
+public class LegacyPasswordFieldConnector extends LegacyTextFieldConnector {
+
+ @Override
+ public VLegacyPasswordField getWidget() {
+ return (VLegacyPasswordField) super.getWidget();
+ }
+}