diff options
author | Artur Signell <artur@vaadin.com> | 2012-11-20 12:04:11 +0200 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2012-11-20 11:54:40 +0000 |
commit | 65981705b433d9ed02c667a2d838ced2b6314573 (patch) | |
tree | a38571384ebd060d002062a682e5b6bf5537c811 /shared | |
parent | a4fbf0a60ca9ec83346d403c569dc7c6db91b87f (diff) | |
download | vaadin-framework-65981705b433d9ed02c667a2d838ced2b6314573.tar.gz vaadin-framework-65981705b433d9ed02c667a2d838ced2b6314573.zip |
Renamed ComponentState to AbstractComponentState (#9032)
Change-Id: Ida6e0cb7064580be36627fd735d79b82ee69356d
Diffstat (limited to 'shared')
17 files changed, 41 insertions, 40 deletions
diff --git a/shared/src/com/vaadin/shared/ComponentState.java b/shared/src/com/vaadin/shared/AbstractComponentState.java index d8b5fec587..e1f7916874 100644 --- a/shared/src/com/vaadin/shared/ComponentState.java +++ b/shared/src/com/vaadin/shared/AbstractComponentState.java @@ -19,15 +19,16 @@ package com.vaadin.shared; import java.util.List; import com.vaadin.shared.communication.SharedState; +import com.vaadin.ui.AbstractComponent; /** - * Default shared state implementation for UI components. + * Default shared state implementation for {@link AbstractComponent}. * - * State classes of concrete components should extend this class. + * State classes of components should typically extend this class. * * @since 7.0 */ -public class ComponentState extends SharedState { +public class AbstractComponentState extends SharedState { public String height = ""; public String width = ""; public boolean readOnly = false; diff --git a/shared/src/com/vaadin/shared/ui/AbstractEmbeddedState.java b/shared/src/com/vaadin/shared/ui/AbstractEmbeddedState.java index 608152cc54..b7e689f8bc 100644 --- a/shared/src/com/vaadin/shared/ui/AbstractEmbeddedState.java +++ b/shared/src/com/vaadin/shared/ui/AbstractEmbeddedState.java @@ -1,8 +1,8 @@ package com.vaadin.shared.ui; -import com.vaadin.shared.ComponentState; +import com.vaadin.shared.AbstractComponentState; -public class AbstractEmbeddedState extends ComponentState { +public class AbstractEmbeddedState extends AbstractComponentState { public static final String SOURCE_RESOURCE = "source"; diff --git a/shared/src/com/vaadin/shared/ui/AbstractLayoutState.java b/shared/src/com/vaadin/shared/ui/AbstractLayoutState.java index 4fc865626c..cbb02ceaa4 100644 --- a/shared/src/com/vaadin/shared/ui/AbstractLayoutState.java +++ b/shared/src/com/vaadin/shared/ui/AbstractLayoutState.java @@ -15,8 +15,8 @@ */ package com.vaadin.shared.ui; -import com.vaadin.shared.ComponentState; +import com.vaadin.shared.AbstractComponentState; -public class AbstractLayoutState extends ComponentState { +public class AbstractLayoutState extends AbstractComponentState { }
\ No newline at end of file diff --git a/shared/src/com/vaadin/shared/ui/AbstractMediaState.java b/shared/src/com/vaadin/shared/ui/AbstractMediaState.java index 76d4e1b000..56c1989d5b 100644 --- a/shared/src/com/vaadin/shared/ui/AbstractMediaState.java +++ b/shared/src/com/vaadin/shared/ui/AbstractMediaState.java @@ -18,10 +18,10 @@ package com.vaadin.shared.ui; import java.util.ArrayList; import java.util.List; -import com.vaadin.shared.ComponentState; +import com.vaadin.shared.AbstractComponentState; import com.vaadin.shared.communication.URLReference; -public class AbstractMediaState extends ComponentState { +public class AbstractMediaState extends AbstractComponentState { public boolean showControls; public String altText; diff --git a/shared/src/com/vaadin/shared/ui/BrowserPopupExtensionState.java b/shared/src/com/vaadin/shared/ui/BrowserPopupExtensionState.java index a9ca6841d8..199de54f8f 100644 --- a/shared/src/com/vaadin/shared/ui/BrowserPopupExtensionState.java +++ b/shared/src/com/vaadin/shared/ui/BrowserPopupExtensionState.java @@ -16,9 +16,9 @@ package com.vaadin.shared.ui; -import com.vaadin.shared.ComponentState; +import com.vaadin.shared.AbstractComponentState; -public class BrowserPopupExtensionState extends ComponentState { +public class BrowserPopupExtensionState extends AbstractComponentState { public String target = "_blank"; diff --git a/shared/src/com/vaadin/shared/ui/ComponentStateUtil.java b/shared/src/com/vaadin/shared/ui/ComponentStateUtil.java index 33f841fa09..8106e8af98 100644 --- a/shared/src/com/vaadin/shared/ui/ComponentStateUtil.java +++ b/shared/src/com/vaadin/shared/ui/ComponentStateUtil.java @@ -2,7 +2,7 @@ package com.vaadin.shared.ui; import java.util.HashSet; -import com.vaadin.shared.ComponentState; +import com.vaadin.shared.AbstractComponentState; import com.vaadin.shared.communication.SharedState; public final class ComponentStateUtil { @@ -11,27 +11,27 @@ public final class ComponentStateUtil { // Util class is not instantiable } - public static final boolean isUndefinedWidth(ComponentState state) { + public static final boolean isUndefinedWidth(AbstractComponentState state) { return state.width == null || "".equals(state.width); } - public static final boolean isUndefinedHeight(ComponentState state) { + public static final boolean isUndefinedHeight(AbstractComponentState state) { return state.height == null || "".equals(state.height); } - public static final boolean hasDescription(ComponentState state) { + public static final boolean hasDescription(AbstractComponentState state) { return state.description != null && !"".equals(state.description); } - public static final boolean hasStyles(ComponentState state) { + public static final boolean hasStyles(AbstractComponentState state) { return state.styles != null && !state.styles.isEmpty(); } - public static final boolean isRelativeWidth(ComponentState state) { + public static final boolean isRelativeWidth(AbstractComponentState state) { return state.width != null && state.width.endsWith("%"); } - public static final boolean isRelativeHeight(ComponentState state) { + public static final boolean isRelativeHeight(AbstractComponentState state) { return state.height != null && state.height.endsWith("%"); } diff --git a/shared/src/com/vaadin/shared/ui/JavaScriptComponentState.java b/shared/src/com/vaadin/shared/ui/JavaScriptComponentState.java index 7a2eedd95d..1252b7f235 100644 --- a/shared/src/com/vaadin/shared/ui/JavaScriptComponentState.java +++ b/shared/src/com/vaadin/shared/ui/JavaScriptComponentState.java @@ -21,10 +21,10 @@ import java.util.HashSet; import java.util.Map; import java.util.Set; -import com.vaadin.shared.ComponentState; +import com.vaadin.shared.AbstractComponentState; import com.vaadin.shared.JavaScriptConnectorState; -public class JavaScriptComponentState extends ComponentState implements +public class JavaScriptComponentState extends AbstractComponentState implements JavaScriptConnectorState { private Set<String> callbackNames = new HashSet<String>(); diff --git a/shared/src/com/vaadin/shared/ui/TabIndexState.java b/shared/src/com/vaadin/shared/ui/TabIndexState.java index a9cb56e5ed..bb446829be 100644 --- a/shared/src/com/vaadin/shared/ui/TabIndexState.java +++ b/shared/src/com/vaadin/shared/ui/TabIndexState.java @@ -15,7 +15,7 @@ */ package com.vaadin.shared.ui; -import com.vaadin.shared.ComponentState; +import com.vaadin.shared.AbstractComponentState; /** * Interface implemented by state classes that support tab indexes. @@ -24,7 +24,7 @@ import com.vaadin.shared.ComponentState; * @since 7.0.0 * */ -public class TabIndexState extends ComponentState { +public class TabIndexState extends AbstractComponentState { /** * The <i>tabulator index</i> of the field. diff --git a/shared/src/com/vaadin/shared/ui/button/ButtonState.java b/shared/src/com/vaadin/shared/ui/button/ButtonState.java index e7272379bb..48feb596dc 100644 --- a/shared/src/com/vaadin/shared/ui/button/ButtonState.java +++ b/shared/src/com/vaadin/shared/ui/button/ButtonState.java @@ -16,14 +16,14 @@ package com.vaadin.shared.ui.button; -import com.vaadin.shared.ComponentState; +import com.vaadin.shared.AbstractComponentState; import com.vaadin.shared.ui.TabIndexState; /** * Shared state for {@link com.vaadin.ui.Button} and * {@link com.vaadin.ui.NativeButton}. * - * @see ComponentState + * @see AbstractComponentState * * @since 7.0 */ diff --git a/shared/src/com/vaadin/shared/ui/label/LabelState.java b/shared/src/com/vaadin/shared/ui/label/LabelState.java index 2cccc310aa..72cdcaad62 100644 --- a/shared/src/com/vaadin/shared/ui/label/LabelState.java +++ b/shared/src/com/vaadin/shared/ui/label/LabelState.java @@ -15,9 +15,9 @@ */ package com.vaadin.shared.ui.label; -import com.vaadin.shared.ComponentState; +import com.vaadin.shared.AbstractComponentState; -public class LabelState extends ComponentState { +public class LabelState extends AbstractComponentState { { primaryStyleName = "v-label"; } diff --git a/shared/src/com/vaadin/shared/ui/link/LinkState.java b/shared/src/com/vaadin/shared/ui/link/LinkState.java index 96b4600000..3e4436f5e3 100644 --- a/shared/src/com/vaadin/shared/ui/link/LinkState.java +++ b/shared/src/com/vaadin/shared/ui/link/LinkState.java @@ -1,8 +1,8 @@ package com.vaadin.shared.ui.link; -import com.vaadin.shared.ComponentState; +import com.vaadin.shared.AbstractComponentState; -public class LinkState extends ComponentState { +public class LinkState extends AbstractComponentState { { primaryStyleName = "v-link"; } diff --git a/shared/src/com/vaadin/shared/ui/menubar/MenuBarState.java b/shared/src/com/vaadin/shared/ui/menubar/MenuBarState.java index cf1ef99c06..192dfa2e0f 100644 --- a/shared/src/com/vaadin/shared/ui/menubar/MenuBarState.java +++ b/shared/src/com/vaadin/shared/ui/menubar/MenuBarState.java @@ -1,8 +1,8 @@ package com.vaadin.shared.ui.menubar; -import com.vaadin.shared.ComponentState; +import com.vaadin.shared.AbstractComponentState; -public class MenuBarState extends ComponentState { +public class MenuBarState extends AbstractComponentState { { primaryStyleName = "v-menubar"; } diff --git a/shared/src/com/vaadin/shared/ui/panel/PanelState.java b/shared/src/com/vaadin/shared/ui/panel/PanelState.java index 9d502df8fe..433bef72a5 100644 --- a/shared/src/com/vaadin/shared/ui/panel/PanelState.java +++ b/shared/src/com/vaadin/shared/ui/panel/PanelState.java @@ -15,9 +15,9 @@ */ package com.vaadin.shared.ui.panel; -import com.vaadin.shared.ComponentState; +import com.vaadin.shared.AbstractComponentState; -public class PanelState extends ComponentState { +public class PanelState extends AbstractComponentState { { primaryStyleName = "v-panel"; } diff --git a/shared/src/com/vaadin/shared/ui/popupview/PopupViewState.java b/shared/src/com/vaadin/shared/ui/popupview/PopupViewState.java index 0f83d0fcd4..2af516daac 100644 --- a/shared/src/com/vaadin/shared/ui/popupview/PopupViewState.java +++ b/shared/src/com/vaadin/shared/ui/popupview/PopupViewState.java @@ -1,8 +1,8 @@ package com.vaadin.shared.ui.popupview; -import com.vaadin.shared.ComponentState; +import com.vaadin.shared.AbstractComponentState; -public class PopupViewState extends ComponentState { +public class PopupViewState extends AbstractComponentState { public String html; public boolean hideOnMouseOut; diff --git a/shared/src/com/vaadin/shared/ui/splitpanel/AbstractSplitPanelState.java b/shared/src/com/vaadin/shared/ui/splitpanel/AbstractSplitPanelState.java index 8bddffdfd6..fb1b4c1262 100644 --- a/shared/src/com/vaadin/shared/ui/splitpanel/AbstractSplitPanelState.java +++ b/shared/src/com/vaadin/shared/ui/splitpanel/AbstractSplitPanelState.java @@ -17,10 +17,10 @@ package com.vaadin.shared.ui.splitpanel; import java.io.Serializable; -import com.vaadin.shared.ComponentState; +import com.vaadin.shared.AbstractComponentState; import com.vaadin.shared.Connector; -public class AbstractSplitPanelState extends ComponentState { +public class AbstractSplitPanelState extends AbstractComponentState { public Connector firstChild = null; public Connector secondChild = null; public SplitterState splitterState = new SplitterState(); diff --git a/shared/src/com/vaadin/shared/ui/tabsheet/TabsheetState.java b/shared/src/com/vaadin/shared/ui/tabsheet/TabsheetState.java index a36acca9dc..c89a20bb22 100644 --- a/shared/src/com/vaadin/shared/ui/tabsheet/TabsheetState.java +++ b/shared/src/com/vaadin/shared/ui/tabsheet/TabsheetState.java @@ -1,8 +1,8 @@ package com.vaadin.shared.ui.tabsheet; -import com.vaadin.shared.ComponentState; +import com.vaadin.shared.AbstractComponentState; -public class TabsheetState extends ComponentState { +public class TabsheetState extends AbstractComponentState { { primaryStyleName = "v-tabsheet"; } diff --git a/shared/src/com/vaadin/shared/ui/ui/UIState.java b/shared/src/com/vaadin/shared/ui/ui/UIState.java index 028218409f..59eff36435 100644 --- a/shared/src/com/vaadin/shared/ui/ui/UIState.java +++ b/shared/src/com/vaadin/shared/ui/ui/UIState.java @@ -15,9 +15,9 @@ */ package com.vaadin.shared.ui.ui; -import com.vaadin.shared.ComponentState; +import com.vaadin.shared.AbstractComponentState; -public class UIState extends ComponentState { +public class UIState extends AbstractComponentState { { primaryStyleName = "v-ui"; } |