From: Artur Signell Date: Tue, 14 Aug 2012 12:06:05 +0000 (+0300) Subject: Removed depdencies from server to client (#9279) X-Git-Tag: 7.0.0.beta1~228^2~20 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=eb51296d21be72954a0fea624519bcc66bb29f87;p=vaadin-framework.git Removed depdencies from server to client (#9279) --- diff --git a/client/src/com/vaadin/terminal/gwt/client/ui/dd/VDragAndDropManager.java b/client/src/com/vaadin/terminal/gwt/client/ui/dd/VDragAndDropManager.java index bc98860716..225dd8ccda 100644 --- a/client/src/com/vaadin/terminal/gwt/client/ui/dd/VDragAndDropManager.java +++ b/client/src/com/vaadin/terminal/gwt/client/ui/dd/VDragAndDropManager.java @@ -22,6 +22,7 @@ import com.google.gwt.user.client.Event.NativePreviewHandler; import com.google.gwt.user.client.Timer; import com.google.gwt.user.client.ui.RootPanel; import com.google.gwt.user.client.ui.Widget; +import com.vaadin.shared.ApplicationConstants; import com.vaadin.shared.MouseEventDetails; import com.vaadin.shared.ui.dd.DragEventType; import com.vaadin.terminal.gwt.client.ApplicationConnection; @@ -225,8 +226,6 @@ public class VDragAndDropManager { } - public static final String DD_SERVICE = "DD"; - private static VDragAndDropManager instance; private HandlerRegistration handlerRegistration; private VDragEvent currentDrag; @@ -598,17 +597,20 @@ public class VDragAndDropManager { * Transferable is sent on each request) */ visitId++; - client.updateVariable(DD_SERVICE, "visitId", visitId, false); - client.updateVariable(DD_SERVICE, "eventId", currentDrag.getEventId(), - false); - client.updateVariable(DD_SERVICE, "dhowner", paintable, false); + client.updateVariable(ApplicationConstants.DRAG_AND_DROP_CONNECTOR_ID, + "visitId", visitId, false); + client.updateVariable(ApplicationConstants.DRAG_AND_DROP_CONNECTOR_ID, + "eventId", currentDrag.getEventId(), false); + client.updateVariable(ApplicationConstants.DRAG_AND_DROP_CONNECTOR_ID, + "dhowner", paintable, false); VTransferable transferable = currentDrag.getTransferable(); - client.updateVariable(DD_SERVICE, "component", - transferable.getDragSource(), false); + client.updateVariable(ApplicationConstants.DRAG_AND_DROP_CONNECTOR_ID, + "component", transferable.getDragSource(), false); - client.updateVariable(DD_SERVICE, "type", drop.ordinal(), false); + client.updateVariable(ApplicationConstants.DRAG_AND_DROP_CONNECTOR_ID, + "type", drop.ordinal(), false); if (currentDrag.getCurrentGwtEvent() != null) { try { @@ -624,11 +626,11 @@ public class VDragAndDropManager { } else { currentDrag.getDropDetails().put("mouseEvent", null); } - client.updateVariable(DD_SERVICE, "evt", currentDrag.getDropDetails(), - false); + client.updateVariable(ApplicationConstants.DRAG_AND_DROP_CONNECTOR_ID, + "evt", currentDrag.getDropDetails(), false); - client.updateVariable(DD_SERVICE, "tra", transferable.getVariableMap(), - true); + client.updateVariable(ApplicationConstants.DRAG_AND_DROP_CONNECTOR_ID, + "tra", transferable.getVariableMap(), true); } diff --git a/server/src/com/vaadin/terminal/AbstractJavaScriptExtension.java b/server/src/com/vaadin/terminal/AbstractJavaScriptExtension.java index 7bafb6d2b3..69c70435f0 100644 --- a/server/src/com/vaadin/terminal/AbstractJavaScriptExtension.java +++ b/server/src/com/vaadin/terminal/AbstractJavaScriptExtension.java @@ -5,7 +5,6 @@ package com.vaadin.terminal; import com.vaadin.shared.JavaScriptExtensionState; -import com.vaadin.terminal.gwt.client.ApplicationConnection; import com.vaadin.ui.JavaScriptFunction; /** @@ -66,7 +65,8 @@ import com.vaadin.ui.JavaScriptFunction; * functions is described bellow. *
  • translateVaadinUri(uri) - Translates a Vaadin URI to a URL * that can be used in the browser. This is just way of accessing - * {@link ApplicationConnection#translateVaadinUri(String)}
  • + * {@link com.vaadin.terminal.gwt.client.ApplicationConnection#translateVaadinUri(String)} + * * * The connector wrapper also supports these special functions: * *

    * diff --git a/server/src/com/vaadin/terminal/JavaScriptCallbackHelper.java b/server/src/com/vaadin/terminal/JavaScriptCallbackHelper.java index 265e578c6d..e3669b84ab 100644 --- a/server/src/com/vaadin/terminal/JavaScriptCallbackHelper.java +++ b/server/src/com/vaadin/terminal/JavaScriptCallbackHelper.java @@ -15,7 +15,6 @@ import java.util.Set; import com.vaadin.external.json.JSONArray; import com.vaadin.external.json.JSONException; import com.vaadin.shared.JavaScriptConnectorState; -import com.vaadin.terminal.gwt.client.JavaScriptConnectorHelper; import com.vaadin.tools.ReflectTools; import com.vaadin.ui.AbstractJavaScriptComponent; import com.vaadin.ui.JavaScript.JavaScriptCallbackRpc; @@ -25,7 +24,7 @@ import com.vaadin.ui.JavaScriptFunction; * Internal helper class used to implement functionality common to * {@link AbstractJavaScriptComponent} and {@link AbstractJavaScriptExtension}. * Corresponding support in client-side code is in - * {@link JavaScriptConnectorHelper}. + * {@link com.vaadin.terminal.gwt.client.JavaScriptConnectorHelper}. *

    * You should most likely no use this class directly. * diff --git a/server/src/com/vaadin/terminal/PaintTarget.java b/server/src/com/vaadin/terminal/PaintTarget.java index b658c9f4a3..9fa8f67bac 100644 --- a/server/src/com/vaadin/terminal/PaintTarget.java +++ b/server/src/com/vaadin/terminal/PaintTarget.java @@ -8,8 +8,6 @@ import java.io.Serializable; import java.util.Map; import com.vaadin.terminal.StreamVariable.StreamingStartEvent; -import com.vaadin.terminal.gwt.client.ApplicationConnection; -import com.vaadin.terminal.gwt.client.Paintable; import com.vaadin.terminal.gwt.server.ClientConnector; import com.vaadin.ui.Component; @@ -40,7 +38,7 @@ public interface PaintTarget extends Serializable { throws PaintException; /** - * Result of starting to paint a Paintable ( + * Result of starting to paint a Component ( * {@link PaintTarget#startPaintable(Component, String)}). * * @since 7.0 @@ -52,7 +50,7 @@ public interface PaintTarget extends Serializable { */ PAINTING, /** - * A previously unpainted or painted {@link Paintable} has been queued + * A previously unpainted or painted {@link Component} has been queued * be created/update later in a separate change in the same set of * changes. */ @@ -65,9 +63,9 @@ public interface PaintTarget extends Serializable { * scheme, that checks the paintable has actually changed or can a cached * version be used instead. This method should call the startTag method. *

    - * If the Paintable is found in cache and this function returns true it may - * omit the content and close the tag, in which case cached content should - * be used. + * If the {@link Component} is found in cache and this function returns true + * it may omit the content and close the tag, in which case cached content + * should be used. *

    *

    * This method may also add only a reference to the paintable and queue the @@ -186,7 +184,7 @@ public interface PaintTarget extends Serializable { *

    * The urls in UIDL message may use Vaadin specific protocol. Before * actually using the urls on the client side, they should be passed via - * {@link ApplicationConnection#translateVaadinUri(String)}. + * {@link com.vaadin.terminal.gwt.client.ApplicationConnection#translateVaadinUri(String)}. *

    * Note that in current terminal implementation StreamVariables are cleaned * from the terminal only when: @@ -281,14 +279,14 @@ public interface PaintTarget extends Serializable { throws PaintException; /** - * Adds a Paintable type attribute. On client side the value will be a + * Adds a Component type attribute. On client side the value will be a * terminal specific reference to corresponding component on client side * implementation. * * @param name * the name of the attribute * @param value - * the Paintable to be referenced on client side + * the Component to be referenced on client side * @throws PaintException */ public void addAttribute(String name, Component value) @@ -407,7 +405,7 @@ public interface PaintTarget extends Serializable { throws PaintException; /** - * Adds a Paintable type variable. On client side the variable value will be + * Adds a Component type variable. On client side the variable value will be * a terminal specific reference to corresponding component on client side * implementation. When updated from client side, terminal will map the * client side component reference back to a corresponding server side diff --git a/server/src/com/vaadin/terminal/gwt/server/DragAndDropService.java b/server/src/com/vaadin/terminal/gwt/server/DragAndDropService.java index efb5666efa..a3a6970092 100644 --- a/server/src/com/vaadin/terminal/gwt/server/DragAndDropService.java +++ b/server/src/com/vaadin/terminal/gwt/server/DragAndDropService.java @@ -19,12 +19,12 @@ import com.vaadin.event.dd.DropTarget; import com.vaadin.event.dd.TargetDetails; import com.vaadin.event.dd.TargetDetailsImpl; import com.vaadin.event.dd.acceptcriteria.AcceptCriterion; +import com.vaadin.shared.ApplicationConstants; import com.vaadin.shared.communication.SharedState; import com.vaadin.shared.ui.dd.DragEventType; import com.vaadin.terminal.Extension; import com.vaadin.terminal.PaintException; import com.vaadin.terminal.VariableOwner; -import com.vaadin.terminal.gwt.client.ui.dd.VDragAndDropManager; import com.vaadin.ui.Component; import com.vaadin.ui.Root; @@ -230,7 +230,7 @@ public class DragAndDropService implements VariableOwner, ClientConnector { @Override public String getConnectorId() { - return VDragAndDropManager.DD_SERVICE; + return ApplicationConstants.DRAG_AND_DROP_CONNECTOR_ID; } @Override diff --git a/shared/src/com/vaadin/shared/ApplicationConstants.java b/shared/src/com/vaadin/shared/ApplicationConstants.java index ff87e6c4b6..e3c147d396 100644 --- a/shared/src/com/vaadin/shared/ApplicationConstants.java +++ b/shared/src/com/vaadin/shared/ApplicationConstants.java @@ -33,4 +33,6 @@ public class ApplicationConstants { public static final String V_RESOURCE_PATH = "v-resourcePath"; + @Deprecated + public static final String DRAG_AND_DROP_CONNECTOR_ID = "DD"; }