diff options
author | Teemu Suo-Anttila <teemusa@vaadin.com> | 2016-11-02 11:02:16 +0200 |
---|---|---|
committer | Pekka Hyvönen <pekka@vaadin.com> | 2016-11-02 10:07:49 +0000 |
commit | 35c0e4dc46d9ef420e4cc45806cbb9f7e3fc85d8 (patch) | |
tree | b105ef11567405e785d704678f89e78e64900120 /client | |
parent | cff9d87dd9554727a44cf6af535a644706391ab4 (diff) | |
download | vaadin-framework-35c0e4dc46d9ef420e4cc45806cbb9f7e3fc85d8.tar.gz vaadin-framework-35c0e4dc46d9ef420e4cc45806cbb9f7e3fc85d8.zip |
Clean up state hierarchy for AbstractFieldState
Change-Id: I33c8c977bf8cd2d4c637d7988586496ce963465f
Diffstat (limited to 'client')
-rw-r--r-- | client/src/main/java/com/vaadin/client/connectors/AbstractMultiSelectConnector.java | 6 | ||||
-rw-r--r-- | client/src/main/java/com/vaadin/client/ui/AbstractFieldConnector.java | 12 |
2 files changed, 3 insertions, 15 deletions
diff --git a/client/src/main/java/com/vaadin/client/connectors/AbstractMultiSelectConnector.java b/client/src/main/java/com/vaadin/client/connectors/AbstractMultiSelectConnector.java index 0dbe3cb331..60966c39a9 100644 --- a/client/src/main/java/com/vaadin/client/connectors/AbstractMultiSelectConnector.java +++ b/client/src/main/java/com/vaadin/client/connectors/AbstractMultiSelectConnector.java @@ -26,12 +26,12 @@ import com.google.gwt.user.client.ui.IsWidget; import com.google.gwt.user.client.ui.Widget; import com.vaadin.client.data.DataSource; import com.vaadin.client.ui.HasRequiredIndicator; +import com.vaadin.shared.AbstractFieldState; import com.vaadin.shared.Range; import com.vaadin.shared.Registration; import com.vaadin.shared.data.selection.MultiSelectServerRpc; import com.vaadin.shared.data.selection.SelectionModel; import com.vaadin.shared.ui.ListingJsonConstants; -import com.vaadin.shared.ui.RequiredIndicatorState; import elemental.json.JsonObject; @@ -158,8 +158,8 @@ public abstract class AbstractMultiSelectConnector } @Override - public RequiredIndicatorState getState() { - return (RequiredIndicatorState) super.getState(); + public AbstractFieldState getState() { + return (AbstractFieldState) super.getState(); } @Override diff --git a/client/src/main/java/com/vaadin/client/ui/AbstractFieldConnector.java b/client/src/main/java/com/vaadin/client/ui/AbstractFieldConnector.java index 015b805ee1..fde1f548a0 100644 --- a/client/src/main/java/com/vaadin/client/ui/AbstractFieldConnector.java +++ b/client/src/main/java/com/vaadin/client/ui/AbstractFieldConnector.java @@ -26,27 +26,15 @@ public abstract class AbstractFieldConnector extends AbstractComponentConnector return (AbstractFieldState) super.getState(); } - public boolean isModified() { - return getState().modified; - } - @Override public boolean isRequiredIndicatorVisible() { return getState().required && !isReadOnly(); } @Override - public boolean isErrorIndicatorVisible() { - return super.isErrorIndicatorVisible() && !getState().hideErrors; - } - - @Override protected void updateWidgetStyleNames() { super.updateWidgetStyleNames(); - // add / remove modified style name to Fields - setWidgetStyleName(StyleConstants.MODIFIED, isModified()); - // add / remove error style name to Fields setWidgetStyleNameWithPrefix(getWidget().getStylePrimaryName(), StyleConstants.REQUIRED_EXT, isRequiredIndicatorVisible()); |