diff options
author | Leif Åstrand <leif@vaadin.com> | 2012-08-22 21:12:47 +0300 |
---|---|---|
committer | Leif Åstrand <leif@vaadin.com> | 2012-08-22 21:12:47 +0300 |
commit | 050bec8a443b916e45adf4bf7ea91241690d37e2 (patch) | |
tree | f2c338ec73f5dfb0d1cb4607a5e9529ba0f89c04 /server/src/com/vaadin/ui | |
parent | 38358ae25543433f8cc381101bc340adc7e5c67f (diff) | |
download | vaadin-framework-050bec8a443b916e45adf4bf7ea91241690d37e2.tar.gz vaadin-framework-050bec8a443b916e45adf4bf7ea91241690d37e2.zip |
Make the (server-side) getState method protected (#9315)
Diffstat (limited to 'server/src/com/vaadin/ui')
23 files changed, 29 insertions, 39 deletions
diff --git a/server/src/com/vaadin/ui/AbsoluteLayout.java b/server/src/com/vaadin/ui/AbsoluteLayout.java index a3bc577fe3..8981895717 100644 --- a/server/src/com/vaadin/ui/AbsoluteLayout.java +++ b/server/src/com/vaadin/ui/AbsoluteLayout.java @@ -61,7 +61,7 @@ public class AbsoluteLayout extends AbstractLayout implements } @Override - public AbsoluteLayoutState getState() { + protected AbsoluteLayoutState getState() { return (AbsoluteLayoutState) super.getState(); } diff --git a/server/src/com/vaadin/ui/AbstractComponent.java b/server/src/com/vaadin/ui/AbstractComponent.java index cde5217ca1..1eb95311cd 100644 --- a/server/src/com/vaadin/ui/AbstractComponent.java +++ b/server/src/com/vaadin/ui/AbstractComponent.java @@ -713,7 +713,7 @@ public abstract class AbstractComponent extends AbstractClientConnector * @return updated component shared state */ @Override - public ComponentState getState() { + protected ComponentState getState() { return (ComponentState) super.getState(); } diff --git a/server/src/com/vaadin/ui/AbstractField.java b/server/src/com/vaadin/ui/AbstractField.java index b914fb4c46..8ac7b21daf 100644 --- a/server/src/com/vaadin/ui/AbstractField.java +++ b/server/src/com/vaadin/ui/AbstractField.java @@ -1615,7 +1615,7 @@ public abstract class AbstractField<T> extends AbstractComponent implements } @Override - public AbstractFieldState getState() { + protected AbstractFieldState getState() { return (AbstractFieldState) super.getState(); } diff --git a/server/src/com/vaadin/ui/AbstractJavaScriptComponent.java b/server/src/com/vaadin/ui/AbstractJavaScriptComponent.java index c442bf2204..67b6447ef9 100644 --- a/server/src/com/vaadin/ui/AbstractJavaScriptComponent.java +++ b/server/src/com/vaadin/ui/AbstractJavaScriptComponent.java @@ -17,6 +17,8 @@ package com.vaadin.ui; import com.vaadin.shared.ui.JavaScriptComponentState; import com.vaadin.terminal.JavaScriptCallbackHelper; +import com.vaadin.terminal.gwt.client.ApplicationConnection; +import com.vaadin.terminal.gwt.client.ui.JavaScriptWidget; /** * Base class for Components with all client-side logic implemented using @@ -90,9 +92,8 @@ import com.vaadin.terminal.JavaScriptCallbackHelper; * {@link #addFunction(String, JavaScriptFunction)} on the server will * automatically be present as a function that triggers the registered function * on the server.</li> - * <li>Any field name referred to using - * {@link #callFunction(String, Object...)} on the server will be called if a - * function has been assigned to the field.</li> + * <li>Any field name referred to using {@link #callFunction(String, Object...)} + * on the server will be called if a function has been assigned to the field.</li> * </ul> * <p> * @@ -168,7 +169,7 @@ public abstract class AbstractJavaScriptComponent extends AbstractComponent { } @Override - public JavaScriptComponentState getState() { + protected JavaScriptComponentState getState() { return (JavaScriptComponentState) super.getState(); } } diff --git a/server/src/com/vaadin/ui/AbstractLayout.java b/server/src/com/vaadin/ui/AbstractLayout.java index dd1d5eab12..6743b09211 100644 --- a/server/src/com/vaadin/ui/AbstractLayout.java +++ b/server/src/com/vaadin/ui/AbstractLayout.java @@ -29,7 +29,7 @@ public abstract class AbstractLayout extends AbstractComponentContainer implements Layout { @Override - public AbstractLayoutState getState() { + protected AbstractLayoutState getState() { return (AbstractLayoutState) super.getState(); } diff --git a/server/src/com/vaadin/ui/AbstractMedia.java b/server/src/com/vaadin/ui/AbstractMedia.java index 51a3bcd2be..7a29c8f4ce 100644 --- a/server/src/com/vaadin/ui/AbstractMedia.java +++ b/server/src/com/vaadin/ui/AbstractMedia.java @@ -33,7 +33,7 @@ import com.vaadin.terminal.gwt.server.ResourceReference; public abstract class AbstractMedia extends AbstractComponent { @Override - public AbstractMediaState getState() { + protected AbstractMediaState getState() { return (AbstractMediaState) super.getState(); } diff --git a/server/src/com/vaadin/ui/AbstractOrderedLayout.java b/server/src/com/vaadin/ui/AbstractOrderedLayout.java index 3ac4e76bdb..cac9c05fb8 100644 --- a/server/src/com/vaadin/ui/AbstractOrderedLayout.java +++ b/server/src/com/vaadin/ui/AbstractOrderedLayout.java @@ -63,7 +63,7 @@ public abstract class AbstractOrderedLayout extends AbstractLayout implements } @Override - public AbstractOrderedLayoutState getState() { + protected AbstractOrderedLayoutState getState() { return (AbstractOrderedLayoutState) super.getState(); } @@ -394,6 +394,7 @@ public abstract class AbstractOrderedLayout extends AbstractLayout implements return components.get(index); } + @Override public void setMargin(boolean enabled) { setMargin(new MarginInfo(enabled)); } @@ -403,6 +404,7 @@ public abstract class AbstractOrderedLayout extends AbstractLayout implements * * @see com.vaadin.ui.Layout.MarginHandler#getMargin() */ + @Override public MarginInfo getMargin() { return new MarginInfo(getState().getMarginsBitmask()); } @@ -412,6 +414,7 @@ public abstract class AbstractOrderedLayout extends AbstractLayout implements * * @see com.vaadin.ui.Layout.MarginHandler#setMargin(MarginInfo) */ + @Override public void setMargin(MarginInfo marginInfo) { getState().setMarginsBitmask(marginInfo.getBitMask()); requestRepaint(); diff --git a/server/src/com/vaadin/ui/AbstractSplitPanel.java b/server/src/com/vaadin/ui/AbstractSplitPanel.java index 03e8a2dfb6..68964e2c35 100644 --- a/server/src/com/vaadin/ui/AbstractSplitPanel.java +++ b/server/src/com/vaadin/ui/AbstractSplitPanel.java @@ -520,7 +520,7 @@ public abstract class AbstractSplitPanel extends AbstractComponentContainer { } @Override - public AbstractSplitPanelState getState() { + protected AbstractSplitPanelState getState() { return (AbstractSplitPanelState) super.getState(); } diff --git a/server/src/com/vaadin/ui/AbstractTextField.java b/server/src/com/vaadin/ui/AbstractTextField.java index 86315f801f..54d15eff26 100644 --- a/server/src/com/vaadin/ui/AbstractTextField.java +++ b/server/src/com/vaadin/ui/AbstractTextField.java @@ -92,7 +92,7 @@ public abstract class AbstractTextField extends AbstractField<String> implements } @Override - public AbstractTextFieldState getState() { + protected AbstractTextFieldState getState() { return (AbstractTextFieldState) super.getState(); } diff --git a/server/src/com/vaadin/ui/Button.java b/server/src/com/vaadin/ui/Button.java index f568d770e8..c55a955679 100644 --- a/server/src/com/vaadin/ui/Button.java +++ b/server/src/com/vaadin/ui/Button.java @@ -509,7 +509,7 @@ public class Button extends AbstractComponent implements } @Override - public ButtonState getState() { + protected ButtonState getState() { return (ButtonState) super.getState(); } diff --git a/server/src/com/vaadin/ui/CheckBox.java b/server/src/com/vaadin/ui/CheckBox.java index 158c9d0032..6da86b9711 100644 --- a/server/src/com/vaadin/ui/CheckBox.java +++ b/server/src/com/vaadin/ui/CheckBox.java @@ -106,7 +106,7 @@ public class CheckBox extends AbstractField<Boolean> { } @Override - public CheckBoxState getState() { + protected CheckBoxState getState() { return (CheckBoxState) super.getState(); } diff --git a/server/src/com/vaadin/ui/Component.java b/server/src/com/vaadin/ui/Component.java index ff7ed47930..89e282d4e1 100644 --- a/server/src/com/vaadin/ui/Component.java +++ b/server/src/com/vaadin/ui/Component.java @@ -23,7 +23,6 @@ import java.util.Locale; import com.vaadin.Application; import com.vaadin.event.FieldEvents; -import com.vaadin.shared.ComponentState; import com.vaadin.terminal.ErrorMessage; import com.vaadin.terminal.Resource; import com.vaadin.terminal.Sizeable; @@ -624,19 +623,6 @@ public interface Component extends ClientConnector, Sizeable, Serializable { public Locale getLocale(); /** - * Returns the current shared state bean for the component. The state (or - * changes to it) is communicated from the server to the client. - * - * Subclasses can use a more specific return type for this method. - * - * @return The state object for the component - * - * @since 7.0 - */ - @Override - public ComponentState getState(); - - /** * Adds an unique id for component that get's transferred to terminal for * testing purposes. Keeping identifiers unique is the responsibility of the * programmer. diff --git a/server/src/com/vaadin/ui/CssLayout.java b/server/src/com/vaadin/ui/CssLayout.java index 0192debc4a..c80986b768 100644 --- a/server/src/com/vaadin/ui/CssLayout.java +++ b/server/src/com/vaadin/ui/CssLayout.java @@ -211,7 +211,7 @@ public class CssLayout extends AbstractLayout implements LayoutClickNotifier { } @Override - public CssLayoutState getState() { + protected CssLayoutState getState() { return (CssLayoutState) super.getState(); } diff --git a/server/src/com/vaadin/ui/CustomLayout.java b/server/src/com/vaadin/ui/CustomLayout.java index d47b2f92b3..0948a92e5b 100644 --- a/server/src/com/vaadin/ui/CustomLayout.java +++ b/server/src/com/vaadin/ui/CustomLayout.java @@ -123,7 +123,7 @@ public class CustomLayout extends AbstractLayout implements Vaadin6Component { } @Override - public CustomLayoutState getState() { + protected CustomLayoutState getState() { return (CustomLayoutState) super.getState(); } diff --git a/server/src/com/vaadin/ui/Form.java b/server/src/com/vaadin/ui/Form.java index a1ec0f9917..8efd85009c 100644 --- a/server/src/com/vaadin/ui/Form.java +++ b/server/src/com/vaadin/ui/Form.java @@ -200,7 +200,7 @@ public class Form extends AbstractField<Object> implements Item.Editor, } @Override - public FormState getState() { + protected FormState getState() { return (FormState) super.getState(); } diff --git a/server/src/com/vaadin/ui/GridLayout.java b/server/src/com/vaadin/ui/GridLayout.java index b31ab82741..52aef4c253 100644 --- a/server/src/com/vaadin/ui/GridLayout.java +++ b/server/src/com/vaadin/ui/GridLayout.java @@ -141,7 +141,7 @@ public class GridLayout extends AbstractLayout implements } @Override - public GridLayoutState getState() { + protected GridLayoutState getState() { return (GridLayoutState) super.getState(); } diff --git a/server/src/com/vaadin/ui/JavaScript.java b/server/src/com/vaadin/ui/JavaScript.java index 35cc1893f6..5984c63e7a 100644 --- a/server/src/com/vaadin/ui/JavaScript.java +++ b/server/src/com/vaadin/ui/JavaScript.java @@ -66,7 +66,7 @@ public class JavaScript extends AbstractExtension { } @Override - public JavaScriptManagerState getState() { + protected JavaScriptManagerState getState() { return (JavaScriptManagerState) super.getState(); } diff --git a/server/src/com/vaadin/ui/Label.java b/server/src/com/vaadin/ui/Label.java index 10fa741058..d0a6059865 100644 --- a/server/src/com/vaadin/ui/Label.java +++ b/server/src/com/vaadin/ui/Label.java @@ -151,7 +151,7 @@ public class Label extends AbstractComponent implements Property<String>, } @Override - public LabelState getState() { + protected LabelState getState() { return (LabelState) super.getState(); } diff --git a/server/src/com/vaadin/ui/Panel.java b/server/src/com/vaadin/ui/Panel.java index ba68238707..985eed8a28 100644 --- a/server/src/com/vaadin/ui/Panel.java +++ b/server/src/com/vaadin/ui/Panel.java @@ -489,7 +489,7 @@ public class Panel extends AbstractComponentContainer implements Scrollable, } @Override - public PanelState getState() { + protected PanelState getState() { return (PanelState) super.getState(); } diff --git a/server/src/com/vaadin/ui/Root.java b/server/src/com/vaadin/ui/Root.java index 020ff869fa..4b90d613bb 100644 --- a/server/src/com/vaadin/ui/Root.java +++ b/server/src/com/vaadin/ui/Root.java @@ -498,7 +498,7 @@ public abstract class Root extends AbstractComponentContainer implements } @Override - public RootState getState() { + protected RootState getState() { return (RootState) super.getState(); } diff --git a/server/src/com/vaadin/ui/TextArea.java b/server/src/com/vaadin/ui/TextArea.java index fed06b561a..f885781d46 100644 --- a/server/src/com/vaadin/ui/TextArea.java +++ b/server/src/com/vaadin/ui/TextArea.java @@ -81,7 +81,7 @@ public class TextArea extends AbstractTextField { } @Override - public TextAreaState getState() { + protected TextAreaState getState() { return (TextAreaState) super.getState(); } diff --git a/server/src/com/vaadin/ui/Video.java b/server/src/com/vaadin/ui/Video.java index 95a38c59d5..04ecc9af06 100644 --- a/server/src/com/vaadin/ui/Video.java +++ b/server/src/com/vaadin/ui/Video.java @@ -44,7 +44,7 @@ import com.vaadin.terminal.gwt.server.ResourceReference; public class Video extends AbstractMedia { @Override - public VideoState getState() { + protected VideoState getState() { return (VideoState) super.getState(); } diff --git a/server/src/com/vaadin/ui/Window.java b/server/src/com/vaadin/ui/Window.java index d1d2c25d8b..705e093bce 100644 --- a/server/src/com/vaadin/ui/Window.java +++ b/server/src/com/vaadin/ui/Window.java @@ -838,7 +838,7 @@ public class Window extends Panel implements FocusNotifier, BlurNotifier, } @Override - public WindowState getState() { + protected WindowState getState() { return (WindowState) super.getState(); } } |