From: Artur Signell Date: Wed, 11 Apr 2012 17:07:00 +0000 (+0300) Subject: Move SharedState and ServerRpc classes out from Connector classes X-Git-Tag: 7.0.0.alpha2~81 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=25220b7c0330f2db47af1563904915793a763980;p=vaadin-framework.git Move SharedState and ServerRpc classes out from Connector classes --- diff --git a/src/com/vaadin/terminal/gwt/client/ui/AbstractComponentConnector.java b/src/com/vaadin/terminal/gwt/client/ui/AbstractComponentConnector.java index 57ee8a0bce..f5f177b5d1 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/AbstractComponentConnector.java +++ b/src/com/vaadin/terminal/gwt/client/ui/AbstractComponentConnector.java @@ -14,12 +14,10 @@ import com.vaadin.terminal.gwt.client.ComponentContainerConnector; import com.vaadin.terminal.gwt.client.ComponentState; import com.vaadin.terminal.gwt.client.ConnectorMap; import com.vaadin.terminal.gwt.client.LayoutManager; -import com.vaadin.terminal.gwt.client.MouseEventDetails; import com.vaadin.terminal.gwt.client.TooltipInfo; import com.vaadin.terminal.gwt.client.UIDL; import com.vaadin.terminal.gwt.client.Util; import com.vaadin.terminal.gwt.client.VConsole; -import com.vaadin.terminal.gwt.client.communication.ServerRpc; import com.vaadin.terminal.gwt.client.communication.SharedState; import com.vaadin.terminal.gwt.client.communication.StateChangeEvent; import com.vaadin.terminal.gwt.client.ui.root.RootConnector; @@ -27,17 +25,6 @@ import com.vaadin.terminal.gwt.client.ui.root.RootConnector; public abstract class AbstractComponentConnector extends AbstractConnector implements ComponentConnector { - public interface ClickRPC extends ServerRpc { - /** - * Called when a click event has occurred and there are server side - * listeners for the event. - * - * @param mouseDetails - * Details about the mouse when the event took place - */ - public void click(MouseEventDetails mouseDetails); - } - private ComponentContainerConnector parent; private Widget widget; diff --git a/src/com/vaadin/terminal/gwt/client/ui/AbstractComponentContainerConnector.java b/src/com/vaadin/terminal/gwt/client/ui/AbstractComponentContainerConnector.java index acf525bffb..d6ffc0f091 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/AbstractComponentContainerConnector.java +++ b/src/com/vaadin/terminal/gwt/client/ui/AbstractComponentContainerConnector.java @@ -9,32 +9,15 @@ import java.util.List; import com.google.gwt.event.shared.HandlerRegistration; import com.vaadin.terminal.gwt.client.ComponentConnector; import com.vaadin.terminal.gwt.client.ComponentContainerConnector; -import com.vaadin.terminal.gwt.client.Connector; import com.vaadin.terminal.gwt.client.ConnectorHierarchyChangeEvent; import com.vaadin.terminal.gwt.client.ConnectorHierarchyChangeEvent.ConnectorHierarchyChangeHandler; -import com.vaadin.terminal.gwt.client.MouseEventDetails; import com.vaadin.terminal.gwt.client.Util; import com.vaadin.terminal.gwt.client.VConsole; -import com.vaadin.terminal.gwt.client.communication.ServerRpc; public abstract class AbstractComponentContainerConnector extends AbstractComponentConnector implements ComponentContainerConnector, ConnectorHierarchyChangeHandler { - public interface LayoutClickRPC extends ServerRpc { - /** - * Called when a layout click event has occurred and there are server - * side listeners for the event. - * - * @param mouseDetails - * Details about the mouse when the event took place - * @param clickedConnector - * The child component that was the target of the event - */ - public void layoutClick(MouseEventDetails mouseDetails, - Connector clickedConnector); - } - List children; private final boolean debugLogging = false; diff --git a/src/com/vaadin/terminal/gwt/client/ui/AbstractLayoutConnector.java b/src/com/vaadin/terminal/gwt/client/ui/AbstractLayoutConnector.java index c33a913df9..ec9d60d0a0 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/AbstractLayoutConnector.java +++ b/src/com/vaadin/terminal/gwt/client/ui/AbstractLayoutConnector.java @@ -3,24 +3,10 @@ */ package com.vaadin.terminal.gwt.client.ui; -import com.vaadin.terminal.gwt.client.ComponentState; public abstract class AbstractLayoutConnector extends AbstractComponentContainerConnector { - public static class AbstractLayoutState extends ComponentState { - private int marginsBitmask; - - public int getMarginsBitmask() { - return marginsBitmask; - } - - public void setMarginsBitmask(int marginsBitmask) { - this.marginsBitmask = marginsBitmask; - } - - } - @Override public AbstractLayoutState getState() { return (AbstractLayoutState) super.getState(); diff --git a/src/com/vaadin/terminal/gwt/client/ui/AbstractLayoutState.java b/src/com/vaadin/terminal/gwt/client/ui/AbstractLayoutState.java new file mode 100644 index 0000000000..de917fcd57 --- /dev/null +++ b/src/com/vaadin/terminal/gwt/client/ui/AbstractLayoutState.java @@ -0,0 +1,16 @@ +package com.vaadin.terminal.gwt.client.ui; + +import com.vaadin.terminal.gwt.client.ComponentState; + +public class AbstractLayoutState extends ComponentState { + private int marginsBitmask; + + public int getMarginsBitmask() { + return marginsBitmask; + } + + public void setMarginsBitmask(int marginsBitmask) { + this.marginsBitmask = marginsBitmask; + } + +} \ No newline at end of file diff --git a/src/com/vaadin/terminal/gwt/client/ui/ClickRPC.java b/src/com/vaadin/terminal/gwt/client/ui/ClickRPC.java new file mode 100644 index 0000000000..5a18f26cbc --- /dev/null +++ b/src/com/vaadin/terminal/gwt/client/ui/ClickRPC.java @@ -0,0 +1,15 @@ +package com.vaadin.terminal.gwt.client.ui; + +import com.vaadin.terminal.gwt.client.MouseEventDetails; +import com.vaadin.terminal.gwt.client.communication.ServerRpc; + +public interface ClickRPC extends ServerRpc { + /** + * Called when a click event has occurred and there are server side + * listeners for the event. + * + * @param mouseDetails + * Details about the mouse when the event took place + */ + public void click(MouseEventDetails mouseDetails); +} \ No newline at end of file diff --git a/src/com/vaadin/terminal/gwt/client/ui/LayoutClickEventHandler.java b/src/com/vaadin/terminal/gwt/client/ui/LayoutClickEventHandler.java index 4686a4205b..09caa9ad82 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/LayoutClickEventHandler.java +++ b/src/com/vaadin/terminal/gwt/client/ui/LayoutClickEventHandler.java @@ -8,7 +8,6 @@ import com.google.gwt.user.client.Element; import com.vaadin.terminal.gwt.client.ComponentConnector; import com.vaadin.terminal.gwt.client.MouseEventDetails; import com.vaadin.terminal.gwt.client.MouseEventDetailsBuilder; -import com.vaadin.terminal.gwt.client.ui.AbstractComponentContainerConnector.LayoutClickRPC; public abstract class LayoutClickEventHandler extends AbstractClickEventHandler { diff --git a/src/com/vaadin/terminal/gwt/client/ui/LayoutClickRPC.java b/src/com/vaadin/terminal/gwt/client/ui/LayoutClickRPC.java new file mode 100644 index 0000000000..2956edb33c --- /dev/null +++ b/src/com/vaadin/terminal/gwt/client/ui/LayoutClickRPC.java @@ -0,0 +1,19 @@ +package com.vaadin.terminal.gwt.client.ui; + +import com.vaadin.terminal.gwt.client.Connector; +import com.vaadin.terminal.gwt.client.MouseEventDetails; +import com.vaadin.terminal.gwt.client.communication.ServerRpc; + +public interface LayoutClickRPC extends ServerRpc { + /** + * Called when a layout click event has occurred and there are server + * side listeners for the event. + * + * @param mouseDetails + * Details about the mouse when the event took place + * @param clickedConnector + * The child component that was the target of the event + */ + public void layoutClick(MouseEventDetails mouseDetails, + Connector clickedConnector); +} \ No newline at end of file diff --git a/src/com/vaadin/terminal/gwt/client/ui/absolutelayout/AbsoluteLayoutConnector.java b/src/com/vaadin/terminal/gwt/client/ui/absolutelayout/AbsoluteLayoutConnector.java index d4cf189d7a..a893657c40 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/absolutelayout/AbsoluteLayoutConnector.java +++ b/src/com/vaadin/terminal/gwt/client/ui/absolutelayout/AbsoluteLayoutConnector.java @@ -21,6 +21,7 @@ import com.vaadin.terminal.gwt.client.communication.StateChangeEvent; import com.vaadin.terminal.gwt.client.ui.AbstractComponentContainerConnector; import com.vaadin.terminal.gwt.client.ui.Component; import com.vaadin.terminal.gwt.client.ui.LayoutClickEventHandler; +import com.vaadin.terminal.gwt.client.ui.LayoutClickRPC; import com.vaadin.terminal.gwt.client.ui.absolutelayout.VAbsoluteLayout.AbsoluteWrapper; import com.vaadin.ui.AbsoluteLayout; diff --git a/src/com/vaadin/terminal/gwt/client/ui/absolutelayout/AbsoluteLayoutServerRPC.java b/src/com/vaadin/terminal/gwt/client/ui/absolutelayout/AbsoluteLayoutServerRPC.java index 4dea26ddc9..d8b7ee2e9a 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/absolutelayout/AbsoluteLayoutServerRPC.java +++ b/src/com/vaadin/terminal/gwt/client/ui/absolutelayout/AbsoluteLayoutServerRPC.java @@ -1,7 +1,7 @@ package com.vaadin.terminal.gwt.client.ui.absolutelayout; import com.vaadin.terminal.gwt.client.communication.ServerRpc; -import com.vaadin.terminal.gwt.client.ui.AbstractComponentContainerConnector.LayoutClickRPC; +import com.vaadin.terminal.gwt.client.ui.LayoutClickRPC; public interface AbsoluteLayoutServerRPC extends LayoutClickRPC, ServerRpc { diff --git a/src/com/vaadin/terminal/gwt/client/ui/absolutelayout/AbsoluteLayoutState.java b/src/com/vaadin/terminal/gwt/client/ui/absolutelayout/AbsoluteLayoutState.java index 6dd2bcd28f..1ba919fdfe 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/absolutelayout/AbsoluteLayoutState.java +++ b/src/com/vaadin/terminal/gwt/client/ui/absolutelayout/AbsoluteLayoutState.java @@ -4,7 +4,7 @@ import java.util.HashMap; import java.util.Map; import com.vaadin.terminal.gwt.client.Connector; -import com.vaadin.terminal.gwt.client.ui.AbstractLayoutConnector.AbstractLayoutState; +import com.vaadin.terminal.gwt.client.ui.AbstractLayoutState; public class AbsoluteLayoutState extends AbstractLayoutState { // Maps each component to a position diff --git a/src/com/vaadin/terminal/gwt/client/ui/button/ButtonConnector.java b/src/com/vaadin/terminal/gwt/client/ui/button/ButtonConnector.java index 3c506571bd..1a93859429 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/button/ButtonConnector.java +++ b/src/com/vaadin/terminal/gwt/client/ui/button/ButtonConnector.java @@ -13,10 +13,8 @@ import com.google.gwt.event.shared.HandlerRegistration; import com.google.gwt.user.client.DOM; import com.google.gwt.user.client.ui.Widget; import com.vaadin.terminal.gwt.client.EventHelper; -import com.vaadin.terminal.gwt.client.MouseEventDetails; import com.vaadin.terminal.gwt.client.communication.FieldRpc.FocusAndBlurServerRpc; import com.vaadin.terminal.gwt.client.communication.RpcProxy; -import com.vaadin.terminal.gwt.client.communication.ServerRpc; import com.vaadin.terminal.gwt.client.communication.StateChangeEvent; import com.vaadin.terminal.gwt.client.ui.AbstractComponentConnector; import com.vaadin.terminal.gwt.client.ui.Component; @@ -28,27 +26,6 @@ import com.vaadin.ui.Button; public class ButtonConnector extends AbstractComponentConnector implements BlurHandler, FocusHandler { - /** - * RPC interface for calls from client to server. - * - * @since 7.0 - */ - public interface ButtonServerRpc extends ServerRpc { - /** - * Button click event. - * - * @param mouseEventDetails - * serialized mouse event details - */ - public void click(MouseEventDetails mouseEventDetails); - - /** - * Indicate to the server that the client has disabled the button as a - * result of a click. - */ - public void disableOnClick(); - } - private ButtonServerRpc rpc = RpcProxy.create(ButtonServerRpc.class, this); private FocusAndBlurServerRpc focusBlurProxy = RpcProxy.create( FocusAndBlurServerRpc.class, this); diff --git a/src/com/vaadin/terminal/gwt/client/ui/button/ButtonServerRpc.java b/src/com/vaadin/terminal/gwt/client/ui/button/ButtonServerRpc.java new file mode 100644 index 0000000000..956a9674e6 --- /dev/null +++ b/src/com/vaadin/terminal/gwt/client/ui/button/ButtonServerRpc.java @@ -0,0 +1,25 @@ +package com.vaadin.terminal.gwt.client.ui.button; + +import com.vaadin.terminal.gwt.client.MouseEventDetails; +import com.vaadin.terminal.gwt.client.communication.ServerRpc; + +/** + * RPC interface for calls from client to server. + * + * @since 7.0 + */ +public interface ButtonServerRpc extends ServerRpc { + /** + * Button click event. + * + * @param mouseEventDetails + * serialized mouse event details + */ + public void click(MouseEventDetails mouseEventDetails); + + /** + * Indicate to the server that the client has disabled the button as a + * result of a click. + */ + public void disableOnClick(); +} \ No newline at end of file diff --git a/src/com/vaadin/terminal/gwt/client/ui/button/VButton.java b/src/com/vaadin/terminal/gwt/client/ui/button/VButton.java index 71581f5a63..f42e36839d 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/button/VButton.java +++ b/src/com/vaadin/terminal/gwt/client/ui/button/VButton.java @@ -21,7 +21,6 @@ import com.vaadin.terminal.gwt.client.MouseEventDetailsBuilder; import com.vaadin.terminal.gwt.client.Util; import com.vaadin.terminal.gwt.client.VTooltip; import com.vaadin.terminal.gwt.client.ui.Icon; -import com.vaadin.terminal.gwt.client.ui.button.ButtonConnector.ButtonServerRpc; public class VButton extends FocusWidget implements ClickHandler { diff --git a/src/com/vaadin/terminal/gwt/client/ui/csslayout/CssLayoutConnector.java b/src/com/vaadin/terminal/gwt/client/ui/csslayout/CssLayoutConnector.java index 064a05d367..3d20e01b4b 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/csslayout/CssLayoutConnector.java +++ b/src/com/vaadin/terminal/gwt/client/ui/csslayout/CssLayoutConnector.java @@ -12,16 +12,15 @@ import com.google.gwt.user.client.Element; import com.google.gwt.user.client.ui.Widget; import com.vaadin.terminal.gwt.client.BrowserInfo; import com.vaadin.terminal.gwt.client.ComponentConnector; -import com.vaadin.terminal.gwt.client.Connector; import com.vaadin.terminal.gwt.client.ConnectorHierarchyChangeEvent; import com.vaadin.terminal.gwt.client.Util; import com.vaadin.terminal.gwt.client.VCaption; import com.vaadin.terminal.gwt.client.communication.RpcProxy; -import com.vaadin.terminal.gwt.client.communication.ServerRpc; import com.vaadin.terminal.gwt.client.communication.StateChangeEvent; import com.vaadin.terminal.gwt.client.ui.AbstractLayoutConnector; import com.vaadin.terminal.gwt.client.ui.Component; import com.vaadin.terminal.gwt.client.ui.LayoutClickEventHandler; +import com.vaadin.terminal.gwt.client.ui.LayoutClickRPC; import com.vaadin.terminal.gwt.client.ui.VMarginInfo; import com.vaadin.terminal.gwt.client.ui.csslayout.VCssLayout.FlowPane; import com.vaadin.ui.CssLayout; @@ -29,19 +28,6 @@ import com.vaadin.ui.CssLayout; @Component(CssLayout.class) public class CssLayoutConnector extends AbstractLayoutConnector { - public static class CssLayoutState extends AbstractLayoutState { - private Map childCss = new HashMap(); - - public Map getChildCss() { - return childCss; - } - - public void setChildCss(Map childCss) { - this.childCss = childCss; - } - - } - private LayoutClickEventHandler clickEventHandler = new LayoutClickEventHandler( this) { @@ -57,10 +43,6 @@ public class CssLayoutConnector extends AbstractLayoutConnector { }; }; - public interface CssLayoutServerRPC extends LayoutClickRPC, ServerRpc { - - } - private CssLayoutServerRPC rpc; private Map childToCaption = new HashMap(); diff --git a/src/com/vaadin/terminal/gwt/client/ui/csslayout/CssLayoutServerRPC.java b/src/com/vaadin/terminal/gwt/client/ui/csslayout/CssLayoutServerRPC.java new file mode 100644 index 0000000000..a6e3c0a71a --- /dev/null +++ b/src/com/vaadin/terminal/gwt/client/ui/csslayout/CssLayoutServerRPC.java @@ -0,0 +1,8 @@ +package com.vaadin.terminal.gwt.client.ui.csslayout; + +import com.vaadin.terminal.gwt.client.communication.ServerRpc; +import com.vaadin.terminal.gwt.client.ui.LayoutClickRPC; + +public interface CssLayoutServerRPC extends LayoutClickRPC, ServerRpc { + +} \ No newline at end of file diff --git a/src/com/vaadin/terminal/gwt/client/ui/csslayout/CssLayoutState.java b/src/com/vaadin/terminal/gwt/client/ui/csslayout/CssLayoutState.java new file mode 100644 index 0000000000..558e56a74f --- /dev/null +++ b/src/com/vaadin/terminal/gwt/client/ui/csslayout/CssLayoutState.java @@ -0,0 +1,20 @@ +package com.vaadin.terminal.gwt.client.ui.csslayout; + +import java.util.HashMap; +import java.util.Map; + +import com.vaadin.terminal.gwt.client.Connector; +import com.vaadin.terminal.gwt.client.ui.AbstractLayoutState; + +public class CssLayoutState extends AbstractLayoutState { + private Map childCss = new HashMap(); + + public Map getChildCss() { + return childCss; + } + + public void setChildCss(Map childCss) { + this.childCss = childCss; + } + +} \ No newline at end of file diff --git a/src/com/vaadin/terminal/gwt/client/ui/customlayout/CustomLayoutConnector.java b/src/com/vaadin/terminal/gwt/client/ui/customlayout/CustomLayoutConnector.java index a09efef7ed..9d34859cb7 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/customlayout/CustomLayoutConnector.java +++ b/src/com/vaadin/terminal/gwt/client/ui/customlayout/CustomLayoutConnector.java @@ -3,14 +3,11 @@ */ package com.vaadin.terminal.gwt.client.ui.customlayout; -import java.util.HashMap; -import java.util.Map; import com.google.gwt.core.client.GWT; import com.google.gwt.user.client.DOM; import com.google.gwt.user.client.ui.Widget; import com.vaadin.terminal.gwt.client.ComponentConnector; -import com.vaadin.terminal.gwt.client.Connector; import com.vaadin.terminal.gwt.client.ConnectorHierarchyChangeEvent; import com.vaadin.terminal.gwt.client.communication.StateChangeEvent; import com.vaadin.terminal.gwt.client.ui.AbstractLayoutConnector; @@ -22,37 +19,6 @@ import com.vaadin.ui.CustomLayout; public class CustomLayoutConnector extends AbstractLayoutConnector implements SimpleManagedLayout { - public static class CustomLayoutState extends AbstractLayoutState { - Map childLocations = new HashMap(); - private String templateContents; - private String templateName; - - public String getTemplateContents() { - return templateContents; - } - - public void setTemplateContents(String templateContents) { - this.templateContents = templateContents; - } - - public String getTemplateName() { - return templateName; - } - - public void setTemplateName(String templateName) { - this.templateName = templateName; - } - - public Map getChildLocations() { - return childLocations; - } - - public void setChildLocations(Map childLocations) { - this.childLocations = childLocations; - } - - } - @Override public CustomLayoutState getState() { return (CustomLayoutState) super.getState(); diff --git a/src/com/vaadin/terminal/gwt/client/ui/customlayout/CustomLayoutState.java b/src/com/vaadin/terminal/gwt/client/ui/customlayout/CustomLayoutState.java new file mode 100644 index 0000000000..84a1050865 --- /dev/null +++ b/src/com/vaadin/terminal/gwt/client/ui/customlayout/CustomLayoutState.java @@ -0,0 +1,38 @@ +package com.vaadin.terminal.gwt.client.ui.customlayout; + +import java.util.HashMap; +import java.util.Map; + +import com.vaadin.terminal.gwt.client.Connector; +import com.vaadin.terminal.gwt.client.ui.AbstractLayoutState; + +public class CustomLayoutState extends AbstractLayoutState { + Map childLocations = new HashMap(); + private String templateContents; + private String templateName; + + public String getTemplateContents() { + return templateContents; + } + + public void setTemplateContents(String templateContents) { + this.templateContents = templateContents; + } + + public String getTemplateName() { + return templateName; + } + + public void setTemplateName(String templateName) { + this.templateName = templateName; + } + + public Map getChildLocations() { + return childLocations; + } + + public void setChildLocations(Map childLocations) { + this.childLocations = childLocations; + } + +} \ No newline at end of file diff --git a/src/com/vaadin/terminal/gwt/client/ui/embedded/EmbeddedConnector.java b/src/com/vaadin/terminal/gwt/client/ui/embedded/EmbeddedConnector.java index 9aa0458b01..1a8a54e99d 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/embedded/EmbeddedConnector.java +++ b/src/com/vaadin/terminal/gwt/client/ui/embedded/EmbeddedConnector.java @@ -24,7 +24,6 @@ import com.vaadin.terminal.gwt.client.UIDL; import com.vaadin.terminal.gwt.client.VConsole; import com.vaadin.terminal.gwt.client.VTooltip; import com.vaadin.terminal.gwt.client.communication.RpcProxy; -import com.vaadin.terminal.gwt.client.communication.ServerRpc; import com.vaadin.terminal.gwt.client.ui.AbstractComponentConnector; import com.vaadin.terminal.gwt.client.ui.ClickEventHandler; import com.vaadin.terminal.gwt.client.ui.Component; @@ -34,9 +33,6 @@ import com.vaadin.ui.Embedded; public class EmbeddedConnector extends AbstractComponentConnector implements Paintable { - public interface EmbeddedServerRPC extends ClickRPC, ServerRpc { - } - public static final String ALTERNATE_TEXT = "alt"; EmbeddedServerRPC rpc; diff --git a/src/com/vaadin/terminal/gwt/client/ui/embedded/EmbeddedServerRPC.java b/src/com/vaadin/terminal/gwt/client/ui/embedded/EmbeddedServerRPC.java new file mode 100644 index 0000000000..0796300b0e --- /dev/null +++ b/src/com/vaadin/terminal/gwt/client/ui/embedded/EmbeddedServerRPC.java @@ -0,0 +1,7 @@ +package com.vaadin.terminal.gwt.client.ui.embedded; + +import com.vaadin.terminal.gwt.client.communication.ServerRpc; +import com.vaadin.terminal.gwt.client.ui.ClickRPC; + +public interface EmbeddedServerRPC extends ClickRPC, ServerRpc { +} \ No newline at end of file diff --git a/src/com/vaadin/terminal/gwt/client/ui/formlayout/FormLayoutConnector.java b/src/com/vaadin/terminal/gwt/client/ui/formlayout/FormLayoutConnector.java index aa076784e1..258a280ea7 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/formlayout/FormLayoutConnector.java +++ b/src/com/vaadin/terminal/gwt/client/ui/formlayout/FormLayoutConnector.java @@ -15,7 +15,7 @@ import com.vaadin.terminal.gwt.client.ui.VMarginInfo; import com.vaadin.terminal.gwt.client.ui.formlayout.VFormLayout.Caption; import com.vaadin.terminal.gwt.client.ui.formlayout.VFormLayout.ErrorFlag; import com.vaadin.terminal.gwt.client.ui.formlayout.VFormLayout.VFormLayoutTable; -import com.vaadin.terminal.gwt.client.ui.orderedlayout.AbstractOrderedLayoutConnector.AbstractOrderedLayoutState; +import com.vaadin.terminal.gwt.client.ui.orderedlayout.AbstractOrderedLayoutState; import com.vaadin.ui.FormLayout; @Component(FormLayout.class) diff --git a/src/com/vaadin/terminal/gwt/client/ui/gridlayout/GridLayoutConnector.java b/src/com/vaadin/terminal/gwt/client/ui/gridlayout/GridLayoutConnector.java index c96c2f7b63..9858ed362a 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/gridlayout/GridLayoutConnector.java +++ b/src/com/vaadin/terminal/gwt/client/ui/gridlayout/GridLayoutConnector.java @@ -17,13 +17,12 @@ import com.vaadin.terminal.gwt.client.Paintable; import com.vaadin.terminal.gwt.client.UIDL; import com.vaadin.terminal.gwt.client.VCaption; import com.vaadin.terminal.gwt.client.communication.RpcProxy; -import com.vaadin.terminal.gwt.client.communication.ServerRpc; import com.vaadin.terminal.gwt.client.communication.StateChangeEvent; import com.vaadin.terminal.gwt.client.ui.AbstractComponentContainerConnector; -import com.vaadin.terminal.gwt.client.ui.AbstractLayoutConnector.AbstractLayoutState; import com.vaadin.terminal.gwt.client.ui.AlignmentInfo; import com.vaadin.terminal.gwt.client.ui.Component; import com.vaadin.terminal.gwt.client.ui.LayoutClickEventHandler; +import com.vaadin.terminal.gwt.client.ui.LayoutClickRPC; import com.vaadin.terminal.gwt.client.ui.VMarginInfo; import com.vaadin.terminal.gwt.client.ui.gridlayout.VGridLayout.Cell; import com.vaadin.terminal.gwt.client.ui.layout.VLayoutSlot; @@ -33,37 +32,6 @@ import com.vaadin.ui.GridLayout; public class GridLayoutConnector extends AbstractComponentContainerConnector implements Paintable, DirectionalManagedLayout { - public static class GridLayoutState extends AbstractLayoutState { - private boolean spacing = false; - private int rows = 0; - private int columns = 0; - - public boolean isSpacing() { - return spacing; - } - - public void setSpacing(boolean spacing) { - this.spacing = spacing; - } - - public int getRows() { - return rows; - } - - public void setRows(int rows) { - this.rows = rows; - } - - public int getColumns() { - return columns; - } - - public void setColumns(int cols) { - columns = cols; - } - - } - private LayoutClickEventHandler clickEventHandler = new LayoutClickEventHandler( this) { @@ -79,10 +47,6 @@ public class GridLayoutConnector extends AbstractComponentContainerConnector }; - public interface GridLayoutServerRPC extends LayoutClickRPC, ServerRpc { - - } - private GridLayoutServerRPC rpc; private boolean needCaptionUpdate = false; diff --git a/src/com/vaadin/terminal/gwt/client/ui/gridlayout/GridLayoutServerRPC.java b/src/com/vaadin/terminal/gwt/client/ui/gridlayout/GridLayoutServerRPC.java new file mode 100644 index 0000000000..f771d739d5 --- /dev/null +++ b/src/com/vaadin/terminal/gwt/client/ui/gridlayout/GridLayoutServerRPC.java @@ -0,0 +1,8 @@ +package com.vaadin.terminal.gwt.client.ui.gridlayout; + +import com.vaadin.terminal.gwt.client.communication.ServerRpc; +import com.vaadin.terminal.gwt.client.ui.LayoutClickRPC; + +public interface GridLayoutServerRPC extends LayoutClickRPC, ServerRpc { + +} \ No newline at end of file diff --git a/src/com/vaadin/terminal/gwt/client/ui/gridlayout/GridLayoutState.java b/src/com/vaadin/terminal/gwt/client/ui/gridlayout/GridLayoutState.java new file mode 100644 index 0000000000..ff63177f22 --- /dev/null +++ b/src/com/vaadin/terminal/gwt/client/ui/gridlayout/GridLayoutState.java @@ -0,0 +1,34 @@ +package com.vaadin.terminal.gwt.client.ui.gridlayout; + +import com.vaadin.terminal.gwt.client.ui.AbstractLayoutState; + +public class GridLayoutState extends AbstractLayoutState { + private boolean spacing = false; + private int rows = 0; + private int columns = 0; + + public boolean isSpacing() { + return spacing; + } + + public void setSpacing(boolean spacing) { + this.spacing = spacing; + } + + public int getRows() { + return rows; + } + + public void setRows(int rows) { + this.rows = rows; + } + + public int getColumns() { + return columns; + } + + public void setColumns(int cols) { + columns = cols; + } + +} \ No newline at end of file diff --git a/src/com/vaadin/terminal/gwt/client/ui/nativebutton/NativeButtonConnector.java b/src/com/vaadin/terminal/gwt/client/ui/nativebutton/NativeButtonConnector.java index 93e1172369..042458d701 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/nativebutton/NativeButtonConnector.java +++ b/src/com/vaadin/terminal/gwt/client/ui/nativebutton/NativeButtonConnector.java @@ -18,7 +18,7 @@ import com.vaadin.terminal.gwt.client.communication.StateChangeEvent; import com.vaadin.terminal.gwt.client.ui.AbstractComponentConnector; import com.vaadin.terminal.gwt.client.ui.Component; import com.vaadin.terminal.gwt.client.ui.Icon; -import com.vaadin.terminal.gwt.client.ui.button.ButtonConnector.ButtonServerRpc; +import com.vaadin.terminal.gwt.client.ui.button.ButtonServerRpc; import com.vaadin.terminal.gwt.client.ui.button.ButtonState; import com.vaadin.ui.NativeButton; diff --git a/src/com/vaadin/terminal/gwt/client/ui/nativebutton/VNativeButton.java b/src/com/vaadin/terminal/gwt/client/ui/nativebutton/VNativeButton.java index cca8fc14bf..d0b8f73eb1 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/nativebutton/VNativeButton.java +++ b/src/com/vaadin/terminal/gwt/client/ui/nativebutton/VNativeButton.java @@ -17,7 +17,7 @@ import com.vaadin.terminal.gwt.client.MouseEventDetailsBuilder; import com.vaadin.terminal.gwt.client.Util; import com.vaadin.terminal.gwt.client.VTooltip; import com.vaadin.terminal.gwt.client.ui.Icon; -import com.vaadin.terminal.gwt.client.ui.button.ButtonConnector.ButtonServerRpc; +import com.vaadin.terminal.gwt.client.ui.button.ButtonServerRpc; public class VNativeButton extends Button implements ClickHandler { diff --git a/src/com/vaadin/terminal/gwt/client/ui/orderedlayout/AbstractOrderedLayoutConnector.java b/src/com/vaadin/terminal/gwt/client/ui/orderedlayout/AbstractOrderedLayoutConnector.java index f3d817b586..486621fae2 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/orderedlayout/AbstractOrderedLayoutConnector.java +++ b/src/com/vaadin/terminal/gwt/client/ui/orderedlayout/AbstractOrderedLayoutConnector.java @@ -19,10 +19,10 @@ import com.vaadin.terminal.gwt.client.Util; import com.vaadin.terminal.gwt.client.VCaption; import com.vaadin.terminal.gwt.client.ValueMap; import com.vaadin.terminal.gwt.client.communication.RpcProxy; -import com.vaadin.terminal.gwt.client.communication.ServerRpc; import com.vaadin.terminal.gwt.client.ui.AbstractLayoutConnector; import com.vaadin.terminal.gwt.client.ui.AlignmentInfo; import com.vaadin.terminal.gwt.client.ui.LayoutClickEventHandler; +import com.vaadin.terminal.gwt.client.ui.LayoutClickRPC; import com.vaadin.terminal.gwt.client.ui.VMarginInfo; import com.vaadin.terminal.gwt.client.ui.layout.ComponentConnectorLayoutSlot; import com.vaadin.terminal.gwt.client.ui.layout.VLayoutSlot; @@ -30,24 +30,6 @@ import com.vaadin.terminal.gwt.client.ui.layout.VLayoutSlot; public abstract class AbstractOrderedLayoutConnector extends AbstractLayoutConnector implements Paintable, DirectionalManagedLayout { - public static class AbstractOrderedLayoutState extends AbstractLayoutState { - private boolean spacing = false; - - public boolean isSpacing() { - return spacing; - } - - public void setSpacing(boolean spacing) { - this.spacing = spacing; - } - - } - - public interface AbstractOrderedLayoutServerRPC extends LayoutClickRPC, - ServerRpc { - - } - AbstractOrderedLayoutServerRPC rpc; private LayoutClickEventHandler clickEventHandler = new LayoutClickEventHandler( diff --git a/src/com/vaadin/terminal/gwt/client/ui/orderedlayout/AbstractOrderedLayoutServerRPC.java b/src/com/vaadin/terminal/gwt/client/ui/orderedlayout/AbstractOrderedLayoutServerRPC.java new file mode 100644 index 0000000000..0d6c5f9e1f --- /dev/null +++ b/src/com/vaadin/terminal/gwt/client/ui/orderedlayout/AbstractOrderedLayoutServerRPC.java @@ -0,0 +1,9 @@ +package com.vaadin.terminal.gwt.client.ui.orderedlayout; + +import com.vaadin.terminal.gwt.client.communication.ServerRpc; +import com.vaadin.terminal.gwt.client.ui.LayoutClickRPC; + +public interface AbstractOrderedLayoutServerRPC extends LayoutClickRPC, + ServerRpc { + +} \ No newline at end of file diff --git a/src/com/vaadin/terminal/gwt/client/ui/orderedlayout/AbstractOrderedLayoutState.java b/src/com/vaadin/terminal/gwt/client/ui/orderedlayout/AbstractOrderedLayoutState.java new file mode 100644 index 0000000000..26c2e0dd4c --- /dev/null +++ b/src/com/vaadin/terminal/gwt/client/ui/orderedlayout/AbstractOrderedLayoutState.java @@ -0,0 +1,16 @@ +package com.vaadin.terminal.gwt.client.ui.orderedlayout; + +import com.vaadin.terminal.gwt.client.ui.AbstractLayoutState; + +public class AbstractOrderedLayoutState extends AbstractLayoutState { + private boolean spacing = false; + + public boolean isSpacing() { + return spacing; + } + + public void setSpacing(boolean spacing) { + this.spacing = spacing; + } + +} \ No newline at end of file diff --git a/src/com/vaadin/terminal/gwt/client/ui/panel/PanelConnector.java b/src/com/vaadin/terminal/gwt/client/ui/panel/PanelConnector.java index 7f2afaeb7f..5fe5c6890e 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/panel/PanelConnector.java +++ b/src/com/vaadin/terminal/gwt/client/ui/panel/PanelConnector.java @@ -10,7 +10,6 @@ import com.google.gwt.dom.client.Style.Unit; import com.google.gwt.user.client.ui.Widget; import com.vaadin.terminal.gwt.client.ApplicationConnection; import com.vaadin.terminal.gwt.client.ComponentConnector; -import com.vaadin.terminal.gwt.client.ComponentState; import com.vaadin.terminal.gwt.client.ConnectorHierarchyChangeEvent; import com.vaadin.terminal.gwt.client.LayoutManager; import com.vaadin.terminal.gwt.client.MouseEventDetails; @@ -18,7 +17,6 @@ import com.vaadin.terminal.gwt.client.Paintable; import com.vaadin.terminal.gwt.client.UIDL; import com.vaadin.terminal.gwt.client.Util; import com.vaadin.terminal.gwt.client.communication.RpcProxy; -import com.vaadin.terminal.gwt.client.communication.ServerRpc; import com.vaadin.terminal.gwt.client.ui.AbstractComponentContainerConnector; import com.vaadin.terminal.gwt.client.ui.ClickEventHandler; import com.vaadin.terminal.gwt.client.ui.Component; @@ -31,40 +29,6 @@ import com.vaadin.ui.Panel; public class PanelConnector extends AbstractComponentContainerConnector implements Paintable, SimpleManagedLayout, PostLayoutListener { - public interface PanelServerRPC extends ClickRPC, ServerRpc { - - } - - public static class PanelState extends ComponentState { - private int tabIndex; - private int scrollLeft, scrollTop; - - public int getTabIndex() { - return tabIndex; - } - - public void setTabIndex(int tabIndex) { - this.tabIndex = tabIndex; - } - - public int getScrollLeft() { - return scrollLeft; - } - - public void setScrollLeft(int scrollLeft) { - this.scrollLeft = scrollLeft; - } - - public int getScrollTop() { - return scrollTop; - } - - public void setScrollTop(int scrollTop) { - this.scrollTop = scrollTop; - } - - } - private Integer uidlScrollTop; private ClickEventHandler clickEventHandler = new ClickEventHandler(this) { diff --git a/src/com/vaadin/terminal/gwt/client/ui/panel/PanelServerRPC.java b/src/com/vaadin/terminal/gwt/client/ui/panel/PanelServerRPC.java new file mode 100644 index 0000000000..ad38fb1abf --- /dev/null +++ b/src/com/vaadin/terminal/gwt/client/ui/panel/PanelServerRPC.java @@ -0,0 +1,8 @@ +package com.vaadin.terminal.gwt.client.ui.panel; + +import com.vaadin.terminal.gwt.client.communication.ServerRpc; +import com.vaadin.terminal.gwt.client.ui.ClickRPC; + +public interface PanelServerRPC extends ClickRPC, ServerRpc { + +} \ No newline at end of file diff --git a/src/com/vaadin/terminal/gwt/client/ui/panel/PanelState.java b/src/com/vaadin/terminal/gwt/client/ui/panel/PanelState.java new file mode 100644 index 0000000000..9452ad4c99 --- /dev/null +++ b/src/com/vaadin/terminal/gwt/client/ui/panel/PanelState.java @@ -0,0 +1,33 @@ +package com.vaadin.terminal.gwt.client.ui.panel; + +import com.vaadin.terminal.gwt.client.ComponentState; + +public class PanelState extends ComponentState { + private int tabIndex; + private int scrollLeft, scrollTop; + + public int getTabIndex() { + return tabIndex; + } + + public void setTabIndex(int tabIndex) { + this.tabIndex = tabIndex; + } + + public int getScrollLeft() { + return scrollLeft; + } + + public void setScrollLeft(int scrollLeft) { + this.scrollLeft = scrollLeft; + } + + public int getScrollTop() { + return scrollTop; + } + + public void setScrollTop(int scrollTop) { + this.scrollTop = scrollTop; + } + +} \ No newline at end of file diff --git a/src/com/vaadin/terminal/gwt/client/ui/root/RootServerRPC.java b/src/com/vaadin/terminal/gwt/client/ui/root/RootServerRPC.java index 26cf619766..a02624453e 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/root/RootServerRPC.java +++ b/src/com/vaadin/terminal/gwt/client/ui/root/RootServerRPC.java @@ -1,7 +1,7 @@ package com.vaadin.terminal.gwt.client.ui.root; import com.vaadin.terminal.gwt.client.communication.ServerRpc; -import com.vaadin.terminal.gwt.client.ui.AbstractComponentConnector.ClickRPC; +import com.vaadin.terminal.gwt.client.ui.ClickRPC; public interface RootServerRPC extends ClickRPC, ServerRpc { diff --git a/src/com/vaadin/terminal/gwt/client/ui/splitpanel/AbstractSplitPanelConnector.java b/src/com/vaadin/terminal/gwt/client/ui/splitpanel/AbstractSplitPanelConnector.java index c480e7fb70..66416cf0ec 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/splitpanel/AbstractSplitPanelConnector.java +++ b/src/com/vaadin/terminal/gwt/client/ui/splitpanel/AbstractSplitPanelConnector.java @@ -14,122 +14,20 @@ import com.google.gwt.user.client.Element; import com.google.gwt.user.client.Event; import com.google.gwt.user.client.ui.Widget; import com.vaadin.terminal.gwt.client.ComponentConnector; -import com.vaadin.terminal.gwt.client.ComponentState; -import com.vaadin.terminal.gwt.client.Connector; import com.vaadin.terminal.gwt.client.ConnectorHierarchyChangeEvent; import com.vaadin.terminal.gwt.client.MouseEventDetails; import com.vaadin.terminal.gwt.client.communication.RpcProxy; -import com.vaadin.terminal.gwt.client.communication.ServerRpc; import com.vaadin.terminal.gwt.client.communication.StateChangeEvent; import com.vaadin.terminal.gwt.client.ui.AbstractComponentContainerConnector; import com.vaadin.terminal.gwt.client.ui.ClickEventHandler; import com.vaadin.terminal.gwt.client.ui.SimpleManagedLayout; +import com.vaadin.terminal.gwt.client.ui.splitpanel.AbstractSplitPanelState.SplitterState; import com.vaadin.terminal.gwt.client.ui.splitpanel.VAbstractSplitPanel.SplitterMoveHandler; import com.vaadin.terminal.gwt.client.ui.splitpanel.VAbstractSplitPanel.SplitterMoveHandler.SplitterMoveEvent; public abstract class AbstractSplitPanelConnector extends AbstractComponentContainerConnector implements SimpleManagedLayout { - public interface AbstractSplitPanelRPC extends ServerRpc { - - /** - * Called when the position has been updated by the user. - * - * @param position - * The new position in % if the current unit is %, in px - * otherwise - */ - public void setSplitterPosition(float position); - - /** - * Called when a click event has occurred on the splitter. - * - * @param mouseDetails - * Details about the mouse when the event took place - */ - public void splitterClick(MouseEventDetails mouseDetails); - - } - - public static class SplitterState { - private float position; - private String positionUnit; - private boolean positionReversed = false; - private boolean locked = false; - - public float getPosition() { - return position; - } - - public void setPosition(float position) { - this.position = position; - } - - public String getPositionUnit() { - return positionUnit; - } - - public void setPositionUnit(String positionUnit) { - this.positionUnit = positionUnit; - } - - public boolean isPositionReversed() { - return positionReversed; - } - - public void setPositionReversed(boolean positionReversed) { - this.positionReversed = positionReversed; - } - - public boolean isLocked() { - return locked; - } - - public void setLocked(boolean locked) { - this.locked = locked; - } - - } - - public static class AbstractSplitPanelState extends ComponentState { - private Connector firstChild = null; - private Connector secondChild = null; - private SplitterState splitterState = new SplitterState(); - - public boolean hasFirstChild() { - return firstChild != null; - } - - public boolean hasSecondChild() { - return secondChild != null; - } - - public Connector getFirstChild() { - return firstChild; - } - - public void setFirstChild(Connector firstChild) { - this.firstChild = firstChild; - } - - public Connector getSecondChild() { - return secondChild; - } - - public void setSecondChild(Connector secondChild) { - this.secondChild = secondChild; - } - - public SplitterState getSplitterState() { - return splitterState; - } - - public void setSplitterState(SplitterState splitterState) { - this.splitterState = splitterState; - } - - } - private AbstractSplitPanelRPC rpc; @Override diff --git a/src/com/vaadin/terminal/gwt/client/ui/splitpanel/AbstractSplitPanelRPC.java b/src/com/vaadin/terminal/gwt/client/ui/splitpanel/AbstractSplitPanelRPC.java new file mode 100644 index 0000000000..e450fe43f8 --- /dev/null +++ b/src/com/vaadin/terminal/gwt/client/ui/splitpanel/AbstractSplitPanelRPC.java @@ -0,0 +1,25 @@ +package com.vaadin.terminal.gwt.client.ui.splitpanel; + +import com.vaadin.terminal.gwt.client.MouseEventDetails; +import com.vaadin.terminal.gwt.client.communication.ServerRpc; + +public interface AbstractSplitPanelRPC extends ServerRpc { + + /** + * Called when the position has been updated by the user. + * + * @param position + * The new position in % if the current unit is %, in px + * otherwise + */ + public void setSplitterPosition(float position); + + /** + * Called when a click event has occurred on the splitter. + * + * @param mouseDetails + * Details about the mouse when the event took place + */ + public void splitterClick(MouseEventDetails mouseDetails); + +} \ No newline at end of file diff --git a/src/com/vaadin/terminal/gwt/client/ui/splitpanel/AbstractSplitPanelState.java b/src/com/vaadin/terminal/gwt/client/ui/splitpanel/AbstractSplitPanelState.java new file mode 100644 index 0000000000..0d2b47ad28 --- /dev/null +++ b/src/com/vaadin/terminal/gwt/client/ui/splitpanel/AbstractSplitPanelState.java @@ -0,0 +1,83 @@ +package com.vaadin.terminal.gwt.client.ui.splitpanel; + +import com.vaadin.terminal.gwt.client.ComponentState; +import com.vaadin.terminal.gwt.client.Connector; + +public class AbstractSplitPanelState extends ComponentState { + + private Connector firstChild = null; + private Connector secondChild = null; + private SplitterState splitterState = new SplitterState(); + + public boolean hasFirstChild() { + return firstChild != null; + } + + public boolean hasSecondChild() { + return secondChild != null; + } + + public Connector getFirstChild() { + return firstChild; + } + + public void setFirstChild(Connector firstChild) { + this.firstChild = firstChild; + } + + public Connector getSecondChild() { + return secondChild; + } + + public void setSecondChild(Connector secondChild) { + this.secondChild = secondChild; + } + + public SplitterState getSplitterState() { + return splitterState; + } + + public void setSplitterState(SplitterState splitterState) { + this.splitterState = splitterState; + } + + public static class SplitterState { + private float position; + private String positionUnit; + private boolean positionReversed = false; + private boolean locked = false; + + public float getPosition() { + return position; + } + + public void setPosition(float position) { + this.position = position; + } + + public String getPositionUnit() { + return positionUnit; + } + + public void setPositionUnit(String positionUnit) { + this.positionUnit = positionUnit; + } + + public boolean isPositionReversed() { + return positionReversed; + } + + public void setPositionReversed(boolean positionReversed) { + this.positionReversed = positionReversed; + } + + public boolean isLocked() { + return locked; + } + + public void setLocked(boolean locked) { + this.locked = locked; + } + + } +} \ No newline at end of file diff --git a/src/com/vaadin/terminal/gwt/client/ui/window/WindowConnector.java b/src/com/vaadin/terminal/gwt/client/ui/window/WindowConnector.java index a4f1a884ec..4995441ce5 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/window/WindowConnector.java +++ b/src/com/vaadin/terminal/gwt/client/ui/window/WindowConnector.java @@ -22,7 +22,6 @@ import com.vaadin.terminal.gwt.client.Paintable; import com.vaadin.terminal.gwt.client.UIDL; import com.vaadin.terminal.gwt.client.Util; import com.vaadin.terminal.gwt.client.communication.RpcProxy; -import com.vaadin.terminal.gwt.client.communication.ServerRpc; import com.vaadin.terminal.gwt.client.ui.AbstractComponentContainerConnector; import com.vaadin.terminal.gwt.client.ui.ClickEventHandler; import com.vaadin.terminal.gwt.client.ui.Component; @@ -30,83 +29,12 @@ import com.vaadin.terminal.gwt.client.ui.PostLayoutListener; import com.vaadin.terminal.gwt.client.ui.ShortcutActionHandler; import com.vaadin.terminal.gwt.client.ui.ShortcutActionHandler.BeforeShortcutActionListener; import com.vaadin.terminal.gwt.client.ui.SimpleManagedLayout; -import com.vaadin.terminal.gwt.client.ui.panel.PanelConnector.PanelState; @Component(value = com.vaadin.ui.Window.class) public class WindowConnector extends AbstractComponentContainerConnector implements Paintable, BeforeShortcutActionListener, SimpleManagedLayout, PostLayoutListener { - public interface WindowServerRPC extends ClickRPC, ServerRpc { - } - - public static class WindowState extends PanelState { - private boolean modal = false; - private boolean resizable = true; - private boolean resizeLazy = false; - private boolean draggable = true; - private boolean centered = false;; - private int positionX = -1; - private int positionY = -1; - - public boolean isModal() { - return modal; - } - - public void setModal(boolean modal) { - this.modal = modal; - } - - public boolean isResizable() { - return resizable; - } - - public void setResizable(boolean resizable) { - this.resizable = resizable; - } - - public boolean isResizeLazy() { - return resizeLazy; - } - - public void setResizeLazy(boolean resizeLazy) { - this.resizeLazy = resizeLazy; - } - - public boolean isDraggable() { - return draggable; - } - - public void setDraggable(boolean draggable) { - this.draggable = draggable; - } - - public boolean isCentered() { - return centered; - } - - public void setCentered(boolean centered) { - this.centered = centered; - } - - public int getPositionX() { - return positionX; - } - - public void setPositionX(int positionX) { - this.positionX = positionX; - } - - public int getPositionY() { - return positionY; - } - - public void setPositionY(int positionY) { - this.positionY = positionY; - } - - } - private ClickEventHandler clickEventHandler = new ClickEventHandler(this) { @Override protected void fireClick(NativeEvent event, diff --git a/src/com/vaadin/terminal/gwt/client/ui/window/WindowServerRPC.java b/src/com/vaadin/terminal/gwt/client/ui/window/WindowServerRPC.java new file mode 100644 index 0000000000..f8af015592 --- /dev/null +++ b/src/com/vaadin/terminal/gwt/client/ui/window/WindowServerRPC.java @@ -0,0 +1,7 @@ +package com.vaadin.terminal.gwt.client.ui.window; + +import com.vaadin.terminal.gwt.client.communication.ServerRpc; +import com.vaadin.terminal.gwt.client.ui.ClickRPC; + +public interface WindowServerRPC extends ClickRPC, ServerRpc { +} \ No newline at end of file diff --git a/src/com/vaadin/terminal/gwt/client/ui/window/WindowState.java b/src/com/vaadin/terminal/gwt/client/ui/window/WindowState.java new file mode 100644 index 0000000000..887352b8fa --- /dev/null +++ b/src/com/vaadin/terminal/gwt/client/ui/window/WindowState.java @@ -0,0 +1,70 @@ +package com.vaadin.terminal.gwt.client.ui.window; + +import com.vaadin.terminal.gwt.client.ui.panel.PanelState; + +public class WindowState extends PanelState { + private boolean modal = false; + private boolean resizable = true; + private boolean resizeLazy = false; + private boolean draggable = true; + private boolean centered = false;; + private int positionX = -1; + private int positionY = -1; + + public boolean isModal() { + return modal; + } + + public void setModal(boolean modal) { + this.modal = modal; + } + + public boolean isResizable() { + return resizable; + } + + public void setResizable(boolean resizable) { + this.resizable = resizable; + } + + public boolean isResizeLazy() { + return resizeLazy; + } + + public void setResizeLazy(boolean resizeLazy) { + this.resizeLazy = resizeLazy; + } + + public boolean isDraggable() { + return draggable; + } + + public void setDraggable(boolean draggable) { + this.draggable = draggable; + } + + public boolean isCentered() { + return centered; + } + + public void setCentered(boolean centered) { + this.centered = centered; + } + + public int getPositionX() { + return positionX; + } + + public void setPositionX(int positionX) { + this.positionX = positionX; + } + + public int getPositionY() { + return positionY; + } + + public void setPositionY(int positionY) { + this.positionY = positionY; + } + +} \ No newline at end of file diff --git a/src/com/vaadin/ui/AbstractLayout.java b/src/com/vaadin/ui/AbstractLayout.java index 7d982964e2..4876b40265 100644 --- a/src/com/vaadin/ui/AbstractLayout.java +++ b/src/com/vaadin/ui/AbstractLayout.java @@ -4,7 +4,7 @@ package com.vaadin.ui; -import com.vaadin.terminal.gwt.client.ui.AbstractLayoutConnector.AbstractLayoutState; +import com.vaadin.terminal.gwt.client.ui.AbstractLayoutState; import com.vaadin.ui.Layout.MarginHandler; /** diff --git a/src/com/vaadin/ui/AbstractOrderedLayout.java b/src/com/vaadin/ui/AbstractOrderedLayout.java index f3540af62a..9b21a00836 100644 --- a/src/com/vaadin/ui/AbstractOrderedLayout.java +++ b/src/com/vaadin/ui/AbstractOrderedLayout.java @@ -18,8 +18,8 @@ import com.vaadin.terminal.Sizeable; import com.vaadin.terminal.Vaadin6Component; import com.vaadin.terminal.gwt.client.Connector; import com.vaadin.terminal.gwt.client.MouseEventDetails; -import com.vaadin.terminal.gwt.client.ui.orderedlayout.AbstractOrderedLayoutConnector.AbstractOrderedLayoutServerRPC; -import com.vaadin.terminal.gwt.client.ui.orderedlayout.AbstractOrderedLayoutConnector.AbstractOrderedLayoutState; +import com.vaadin.terminal.gwt.client.ui.orderedlayout.AbstractOrderedLayoutServerRPC; +import com.vaadin.terminal.gwt.client.ui.orderedlayout.AbstractOrderedLayoutState; import com.vaadin.terminal.gwt.client.ui.LayoutClickEventHandler; @SuppressWarnings("serial") diff --git a/src/com/vaadin/ui/AbstractSplitPanel.java b/src/com/vaadin/ui/AbstractSplitPanel.java index 855bfc18b8..5eb46b85a9 100644 --- a/src/com/vaadin/ui/AbstractSplitPanel.java +++ b/src/com/vaadin/ui/AbstractSplitPanel.java @@ -12,10 +12,10 @@ import com.vaadin.event.ComponentEventListener; import com.vaadin.event.MouseEvents.ClickEvent; import com.vaadin.terminal.Sizeable; import com.vaadin.terminal.gwt.client.MouseEventDetails; -import com.vaadin.terminal.gwt.client.ui.splitpanel.AbstractSplitPanelConnector.AbstractSplitPanelRPC; -import com.vaadin.terminal.gwt.client.ui.splitpanel.AbstractSplitPanelConnector.AbstractSplitPanelState; -import com.vaadin.terminal.gwt.client.ui.splitpanel.AbstractSplitPanelConnector.SplitterState; import com.vaadin.terminal.gwt.client.ui.ClickEventHandler; +import com.vaadin.terminal.gwt.client.ui.splitpanel.AbstractSplitPanelRPC; +import com.vaadin.terminal.gwt.client.ui.splitpanel.AbstractSplitPanelState; +import com.vaadin.terminal.gwt.client.ui.splitpanel.AbstractSplitPanelState.SplitterState; import com.vaadin.tools.ReflectTools; /** diff --git a/src/com/vaadin/ui/Button.java b/src/com/vaadin/ui/Button.java index 50559c4a22..f5e45ef3ef 100644 --- a/src/com/vaadin/ui/Button.java +++ b/src/com/vaadin/ui/Button.java @@ -19,8 +19,8 @@ import com.vaadin.event.ShortcutAction.KeyCode; import com.vaadin.event.ShortcutAction.ModifierKey; import com.vaadin.event.ShortcutListener; import com.vaadin.terminal.gwt.client.MouseEventDetails; +import com.vaadin.terminal.gwt.client.ui.button.ButtonServerRpc; import com.vaadin.terminal.gwt.client.ui.button.ButtonState; -import com.vaadin.terminal.gwt.client.ui.button.ButtonConnector.ButtonServerRpc; import com.vaadin.tools.ReflectTools; import com.vaadin.ui.Component.Focusable; diff --git a/src/com/vaadin/ui/CssLayout.java b/src/com/vaadin/ui/CssLayout.java index ddacd4f3d0..ac4f4b31a9 100644 --- a/src/com/vaadin/ui/CssLayout.java +++ b/src/com/vaadin/ui/CssLayout.java @@ -11,8 +11,8 @@ import com.vaadin.event.LayoutEvents.LayoutClickListener; import com.vaadin.event.LayoutEvents.LayoutClickNotifier; import com.vaadin.terminal.gwt.client.Connector; import com.vaadin.terminal.gwt.client.MouseEventDetails; -import com.vaadin.terminal.gwt.client.ui.csslayout.CssLayoutConnector.CssLayoutServerRPC; -import com.vaadin.terminal.gwt.client.ui.csslayout.CssLayoutConnector.CssLayoutState; +import com.vaadin.terminal.gwt.client.ui.csslayout.CssLayoutServerRPC; +import com.vaadin.terminal.gwt.client.ui.csslayout.CssLayoutState; import com.vaadin.terminal.gwt.client.ui.LayoutClickEventHandler; /** diff --git a/src/com/vaadin/ui/CustomLayout.java b/src/com/vaadin/ui/CustomLayout.java index 2327aac0a1..0d74fe9878 100644 --- a/src/com/vaadin/ui/CustomLayout.java +++ b/src/com/vaadin/ui/CustomLayout.java @@ -10,7 +10,7 @@ import java.io.InputStreamReader; import java.util.HashMap; import java.util.Iterator; -import com.vaadin.terminal.gwt.client.ui.customlayout.CustomLayoutConnector.CustomLayoutState; +import com.vaadin.terminal.gwt.client.ui.customlayout.CustomLayoutState; /** *

diff --git a/src/com/vaadin/ui/Embedded.java b/src/com/vaadin/ui/Embedded.java index 1f110ce40a..052436cef7 100644 --- a/src/com/vaadin/ui/Embedded.java +++ b/src/com/vaadin/ui/Embedded.java @@ -17,7 +17,7 @@ import com.vaadin.terminal.Vaadin6Component; import com.vaadin.terminal.gwt.client.MouseEventDetails; import com.vaadin.terminal.gwt.client.ui.ClickEventHandler; import com.vaadin.terminal.gwt.client.ui.embedded.EmbeddedConnector; -import com.vaadin.terminal.gwt.client.ui.embedded.EmbeddedConnector.EmbeddedServerRPC; +import com.vaadin.terminal.gwt.client.ui.embedded.EmbeddedServerRPC; /** * Component for embedding external objects. diff --git a/src/com/vaadin/ui/GridLayout.java b/src/com/vaadin/ui/GridLayout.java index d1d8091aff..3166baf321 100644 --- a/src/com/vaadin/ui/GridLayout.java +++ b/src/com/vaadin/ui/GridLayout.java @@ -21,8 +21,8 @@ import com.vaadin.terminal.PaintTarget; import com.vaadin.terminal.Vaadin6Component; import com.vaadin.terminal.gwt.client.Connector; import com.vaadin.terminal.gwt.client.MouseEventDetails; -import com.vaadin.terminal.gwt.client.ui.gridlayout.GridLayoutConnector.GridLayoutServerRPC; -import com.vaadin.terminal.gwt.client.ui.gridlayout.GridLayoutConnector.GridLayoutState; +import com.vaadin.terminal.gwt.client.ui.gridlayout.GridLayoutServerRPC; +import com.vaadin.terminal.gwt.client.ui.gridlayout.GridLayoutState; import com.vaadin.terminal.gwt.client.ui.LayoutClickEventHandler; /** diff --git a/src/com/vaadin/ui/Panel.java b/src/com/vaadin/ui/Panel.java index 54156307d5..c279870a89 100644 --- a/src/com/vaadin/ui/Panel.java +++ b/src/com/vaadin/ui/Panel.java @@ -18,8 +18,8 @@ import com.vaadin.terminal.Scrollable; import com.vaadin.terminal.Vaadin6Component; import com.vaadin.terminal.gwt.client.MouseEventDetails; import com.vaadin.terminal.gwt.client.ui.ClickEventHandler; -import com.vaadin.terminal.gwt.client.ui.panel.PanelConnector.PanelServerRPC; -import com.vaadin.terminal.gwt.client.ui.panel.PanelConnector.PanelState; +import com.vaadin.terminal.gwt.client.ui.panel.PanelServerRPC; +import com.vaadin.terminal.gwt.client.ui.panel.PanelState; import com.vaadin.ui.Component.Focusable; /** diff --git a/src/com/vaadin/ui/Window.java b/src/com/vaadin/ui/Window.java index 95c9ee16c5..6c3d75a920 100644 --- a/src/com/vaadin/ui/Window.java +++ b/src/com/vaadin/ui/Window.java @@ -24,8 +24,8 @@ import com.vaadin.terminal.PaintException; import com.vaadin.terminal.PaintTarget; import com.vaadin.terminal.Vaadin6Component; import com.vaadin.terminal.gwt.client.MouseEventDetails; -import com.vaadin.terminal.gwt.client.ui.window.WindowConnector.WindowServerRPC; -import com.vaadin.terminal.gwt.client.ui.window.WindowConnector.WindowState; +import com.vaadin.terminal.gwt.client.ui.window.WindowServerRPC; +import com.vaadin.terminal.gwt.client.ui.window.WindowState; /** * A component that represents an application (browser native) window or a sub