diff options
author | Denis Anisimov <denis@vaadin.com> | 2015-09-24 11:53:58 +0300 |
---|---|---|
committer | Denis Anisimov <denis@vaadin.com> | 2015-10-16 09:58:35 +0300 |
commit | bf030a07b0614c9782dd02669900529175069c15 (patch) | |
tree | 7609ceaac9d81f8994e7fa32f6d263a1e654f7b6 /client | |
parent | 5b4906440b4113674b5c7cd88be68c0581bc564e (diff) | |
download | vaadin-framework-bf030a07b0614c9782dd02669900529175069c15.tar.gz vaadin-framework-bf030a07b0614c9782dd02669900529175069c15.zip |
Provide own states for a number of components (#18987).
Change-Id: I9fe4a332bb8170a6482610d1b83bad73e049a3a1
Diffstat (limited to 'client')
6 files changed, 30 insertions, 4 deletions
diff --git a/client/src/com/vaadin/client/ui/audio/AudioConnector.java b/client/src/com/vaadin/client/ui/audio/AudioConnector.java index f238ecc08c..a451d117f2 100644 --- a/client/src/com/vaadin/client/ui/audio/AudioConnector.java +++ b/client/src/com/vaadin/client/ui/audio/AudioConnector.java @@ -24,6 +24,7 @@ import com.vaadin.client.communication.StateChangeEvent; import com.vaadin.client.ui.MediaBaseConnector; import com.vaadin.client.ui.VAudio; import com.vaadin.shared.ui.Connect; +import com.vaadin.shared.ui.audio.AudioState; import com.vaadin.ui.Audio; @Connect(Audio.class) @@ -40,6 +41,11 @@ public class AudioConnector extends MediaBaseConnector { } @Override + public AudioState getState() { + return (AudioState) super.getState(); + } + + @Override public void onStateChanged(StateChangeEvent stateChangeEvent) { super.onStateChanged(stateChangeEvent); diff --git a/client/src/com/vaadin/client/ui/formlayout/FormLayoutConnector.java b/client/src/com/vaadin/client/ui/formlayout/FormLayoutConnector.java index 9517619cf3..bab4153649 100644 --- a/client/src/com/vaadin/client/ui/formlayout/FormLayoutConnector.java +++ b/client/src/com/vaadin/client/ui/formlayout/FormLayoutConnector.java @@ -30,15 +30,15 @@ import com.vaadin.client.ui.VFormLayout.ErrorFlag; import com.vaadin.client.ui.VFormLayout.VFormLayoutTable; import com.vaadin.shared.ui.Connect; import com.vaadin.shared.ui.MarginInfo; -import com.vaadin.shared.ui.orderedlayout.AbstractOrderedLayoutState; +import com.vaadin.shared.ui.orderedlayout.FormLayoutState; import com.vaadin.ui.FormLayout; @Connect(FormLayout.class) public class FormLayoutConnector extends AbstractLayoutConnector { @Override - public AbstractOrderedLayoutState getState() { - return (AbstractOrderedLayoutState) super.getState(); + public FormLayoutState getState() { + return (FormLayoutState) super.getState(); } @Override diff --git a/client/src/com/vaadin/client/ui/optiongroup/OptionGroupBaseConnector.java b/client/src/com/vaadin/client/ui/optiongroup/OptionGroupBaseConnector.java index a655635edc..0757bc395b 100644 --- a/client/src/com/vaadin/client/ui/optiongroup/OptionGroupBaseConnector.java +++ b/client/src/com/vaadin/client/ui/optiongroup/OptionGroupBaseConnector.java @@ -24,6 +24,7 @@ import com.vaadin.client.ui.AbstractFieldConnector; import com.vaadin.client.ui.VNativeButton; import com.vaadin.client.ui.VOptionGroupBase; import com.vaadin.client.ui.VTextField; +import com.vaadin.shared.ui.select.AbstractSelectState; public abstract class OptionGroupBaseConnector extends AbstractFieldConnector implements Paintable { @@ -108,4 +109,9 @@ public abstract class OptionGroupBaseConnector extends AbstractFieldConnector public VOptionGroupBase getWidget() { return (VOptionGroupBase) super.getWidget(); } + + @Override + public AbstractSelectState getState() { + return (AbstractSelectState) super.getState(); + } } diff --git a/client/src/com/vaadin/client/ui/richtextarea/RichTextAreaConnector.java b/client/src/com/vaadin/client/ui/richtextarea/RichTextAreaConnector.java index 5fe637447e..bcf61a9338 100644 --- a/client/src/com/vaadin/client/ui/richtextarea/RichTextAreaConnector.java +++ b/client/src/com/vaadin/client/ui/richtextarea/RichTextAreaConnector.java @@ -27,6 +27,7 @@ import com.vaadin.client.ui.SimpleManagedLayout; import com.vaadin.client.ui.VRichTextArea; import com.vaadin.shared.ui.Connect; import com.vaadin.shared.ui.Connect.LoadStyle; +import com.vaadin.shared.ui.textarea.RichTextAreaState; import com.vaadin.shared.util.SharedUtil; import com.vaadin.ui.RichTextArea; @@ -135,4 +136,9 @@ public class RichTextAreaConnector extends AbstractFieldConnector implements getWidget().rta.setHeight(editorHeight + "px"); } } + + @Override + public RichTextAreaState getState() { + return (RichTextAreaState) super.getState(); + } } diff --git a/client/src/com/vaadin/client/ui/upload/UploadConnector.java b/client/src/com/vaadin/client/ui/upload/UploadConnector.java index ca16b7c513..9e25770a17 100644 --- a/client/src/com/vaadin/client/ui/upload/UploadConnector.java +++ b/client/src/com/vaadin/client/ui/upload/UploadConnector.java @@ -28,6 +28,7 @@ import com.vaadin.shared.EventId; import com.vaadin.shared.ui.Connect; import com.vaadin.shared.ui.upload.UploadClientRpc; import com.vaadin.shared.ui.upload.UploadServerRpc; +import com.vaadin.shared.ui.upload.UploadState; import com.vaadin.ui.Upload; @Connect(Upload.class) @@ -103,4 +104,9 @@ public class UploadConnector extends AbstractComponentConnector implements public VUpload getWidget() { return (VUpload) super.getWidget(); } + + @Override + public UploadState getState() { + return (UploadState) super.getState(); + } } diff --git a/client/src/com/vaadin/client/widgets/Grid.java b/client/src/com/vaadin/client/widgets/Grid.java index 3242560882..e10da5494a 100644 --- a/client/src/com/vaadin/client/widgets/Grid.java +++ b/client/src/com/vaadin/client/widgets/Grid.java @@ -219,6 +219,8 @@ public class Grid<T> extends ResizeComposite implements HasSelectionHandlers<T>, SubPartAware, DeferredWorker, Focusable, com.google.gwt.user.client.ui.Focusable, HasWidgets, HasEnabled { + private static final String STYLE_NAME = "v-grid"; + private static final String SELECT_ALL_CHECKBOX_CLASSNAME = "-select-all-checkbox"; /** @@ -5719,7 +5721,7 @@ public class Grid<T> extends ResizeComposite implements getElement().setTabIndex(0); cellFocusHandler = new CellFocusHandler(); - setStylePrimaryName("v-grid"); + setStylePrimaryName(STYLE_NAME); escalator.getHeader().setEscalatorUpdater(createHeaderUpdater()); escalator.getBody().setEscalatorUpdater(createBodyUpdater()); |