diff options
Diffstat (limited to 'shared')
22 files changed, 52 insertions, 48 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/annotations/Delayed.java b/shared/src/com/vaadin/shared/annotations/Delayed.java index 706ffc1c53..a9914ac35f 100644 --- a/shared/src/com/vaadin/shared/annotations/Delayed.java +++ b/shared/src/com/vaadin/shared/annotations/Delayed.java @@ -37,7 +37,7 @@ import com.vaadin.shared.communication.ServerRpc; @Documented public @interface Delayed { /** - * By setting lastonly to <code>true</code>, any previous invocations of the + * By setting lastOnly to <code>true</code>, any previous invocations of the * same method will be removed from the queue when a new invocation is * added. This can be used in cases where only the last value is of * interest. @@ -50,5 +50,5 @@ public @interface Delayed { * method should be sent to the server, <code>false</code> if all * enqueued invocations should be sent. */ - public boolean lastonly() default false; + public boolean lastOnly() default false; } diff --git a/shared/src/com/vaadin/shared/communication/LegacyChangeVariablesInvocation.java b/shared/src/com/vaadin/shared/communication/LegacyChangeVariablesInvocation.java index 2ffc56dd71..c41087e284 100644 --- a/shared/src/com/vaadin/shared/communication/LegacyChangeVariablesInvocation.java +++ b/shared/src/com/vaadin/shared/communication/LegacyChangeVariablesInvocation.java @@ -48,9 +48,9 @@ public class LegacyChangeVariablesInvocation extends MethodInvocation { } @Override - public String getLastonlyTag() { + public String getLastOnlyTag() { assert variableChanges.size() == 1; - return super.getLastonlyTag() + return super.getLastOnlyTag() + variableChanges.keySet().iterator().next(); } diff --git a/shared/src/com/vaadin/shared/communication/MethodInvocation.java b/shared/src/com/vaadin/shared/communication/MethodInvocation.java index c4da937c27..1e683ce231 100644 --- a/shared/src/com/vaadin/shared/communication/MethodInvocation.java +++ b/shared/src/com/vaadin/shared/communication/MethodInvocation.java @@ -74,14 +74,14 @@ public class MethodInvocation implements Serializable { /** * Gets a String tag that is used to uniquely identify previous method * invocations that should be purged from the queue if - * <code>{@literal @}Delay(lastonly = true)</code> is used. + * <code>{@literal @}Delay(lastOnly = true)</code> is used. * <p> * The returned string should contain at least one non-number char to ensure - * it doesn't collide with the keys used for invocations without lastonly. + * it doesn't collide with the keys used for invocations without lastOnly. * * @return a string identifying this method invocation */ - public String getLastonlyTag() { + public String getLastOnlyTag() { return connectorId + "-" + getInterfaceName() + "-" + getMethodName(); } 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/datefield/PopupDateFieldState.java b/shared/src/com/vaadin/shared/ui/datefield/PopupDateFieldState.java index c0d3b20c28..deed182d8e 100644 --- a/shared/src/com/vaadin/shared/ui/datefield/PopupDateFieldState.java +++ b/shared/src/com/vaadin/shared/ui/datefield/PopupDateFieldState.java @@ -4,4 +4,7 @@ public class PopupDateFieldState extends TextualDateFieldState { { primaryStyleName = "v-datefield"; } + + public boolean textFieldEnabled = true; + } 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/UIServerRpc.java b/shared/src/com/vaadin/shared/ui/ui/UIServerRpc.java index ef28a12415..11a400bbe0 100644 --- a/shared/src/com/vaadin/shared/ui/ui/UIServerRpc.java +++ b/shared/src/com/vaadin/shared/ui/ui/UIServerRpc.java @@ -20,7 +20,7 @@ import com.vaadin.shared.communication.ServerRpc; import com.vaadin.shared.ui.ClickRpc; public interface UIServerRpc extends ClickRpc, ServerRpc { - @Delayed(lastonly = true) + @Delayed(lastOnly = true) public void resize(int viewWidth, int viewHeight, int windowWidth, int windowHeight); }
\ No newline at end of file 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"; } |