diff options
author | Henri Sara <hesara@vaadin.com> | 2016-11-26 08:47:28 +0200 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2016-11-28 09:19:39 +0000 |
commit | 24c541c32ce83aff9c4217f5dd9fff1fa816c13e (patch) | |
tree | ef62bbddfdb3d440faa7206da12066ade8de3c25 /server/src/main/java | |
parent | b05b8aa3f0b2ef139c4f32f899ec47aaccd96eb4 (diff) | |
download | vaadin-framework-24c541c32ce83aff9c4217f5dd9fff1fa816c13e.tar.gz vaadin-framework-24c541c32ce83aff9c4217f5dd9fff1fa816c13e.zip |
Use state classes for Embedded, InlineDateField and NativeButton
Make the components use pre-existing state classes..
Change-Id: Ieeb5232cf45682c64e6a0802732a8f2ea333a972
Diffstat (limited to 'server/src/main/java')
-rw-r--r-- | server/src/main/java/com/vaadin/ui/Embedded.java | 10 | ||||
-rw-r--r-- | server/src/main/java/com/vaadin/ui/InlineDateField.java | 12 | ||||
-rw-r--r-- | server/src/main/java/com/vaadin/ui/NativeButton.java | 12 |
3 files changed, 34 insertions, 0 deletions
diff --git a/server/src/main/java/com/vaadin/ui/Embedded.java b/server/src/main/java/com/vaadin/ui/Embedded.java index 5933530130..786c6d3a86 100644 --- a/server/src/main/java/com/vaadin/ui/Embedded.java +++ b/server/src/main/java/com/vaadin/ui/Embedded.java @@ -30,6 +30,7 @@ import com.vaadin.shared.MouseEventDetails; import com.vaadin.shared.Registration; import com.vaadin.shared.ui.embedded.EmbeddedConstants; import com.vaadin.shared.ui.embedded.EmbeddedServerRpc; +import com.vaadin.shared.ui.embedded.EmbeddedState; /** * A component for embedding external objects. @@ -555,4 +556,13 @@ public class Embedded extends AbstractComponent implements LegacyComponent { // TODO Remove once LegacyComponent is no longer implemented } + @Override + protected EmbeddedState getState() { + return (EmbeddedState) super.getState(); + } + + @Override + protected EmbeddedState getState(boolean markAsDirty) { + return (EmbeddedState) super.getState(markAsDirty); + } } diff --git a/server/src/main/java/com/vaadin/ui/InlineDateField.java b/server/src/main/java/com/vaadin/ui/InlineDateField.java index a1610949f1..cf5017bf34 100644 --- a/server/src/main/java/com/vaadin/ui/InlineDateField.java +++ b/server/src/main/java/com/vaadin/ui/InlineDateField.java @@ -17,6 +17,8 @@ package com.vaadin.ui; import java.time.LocalDate; +import com.vaadin.shared.ui.datefield.InlineDateFieldState; + /** * A date entry component, which displays the actual date selector inline. * @@ -57,4 +59,14 @@ public class InlineDateField extends AbstractDateField { super(caption); } + @Override + protected InlineDateFieldState getState() { + return (InlineDateFieldState) super.getState(); + } + + @Override + protected InlineDateFieldState getState(boolean markAsDirty) { + return (InlineDateFieldState) super.getState(markAsDirty); + } + } diff --git a/server/src/main/java/com/vaadin/ui/NativeButton.java b/server/src/main/java/com/vaadin/ui/NativeButton.java index 0215f06aaf..7fa581d0f4 100644 --- a/server/src/main/java/com/vaadin/ui/NativeButton.java +++ b/server/src/main/java/com/vaadin/ui/NativeButton.java @@ -15,6 +15,8 @@ */ package com.vaadin.ui; +import com.vaadin.shared.ui.button.NativeButtonState; + @SuppressWarnings("serial") public class NativeButton extends Button { @@ -30,4 +32,14 @@ public class NativeButton extends Button { super(caption, listener); } + @Override + protected NativeButtonState getState() { + return (NativeButtonState) super.getState(); + } + + @Override + protected NativeButtonState getState(boolean markAsDirty) { + return (NativeButtonState) super.getState(markAsDirty); + } + } |