]> source.dussan.org Git - vaadin-framework.git/commitdiff
Move LegacyComponent from com.vaadin.server to com.vaadin.ui 96/196/2
authorJohannes Dahlström <johannesd@vaadin.com>
Wed, 31 Oct 2012 16:14:30 +0000 (18:14 +0200)
committerJohannes Dahlström <johannesd@vaadin.com>
Fri, 2 Nov 2012 11:40:58 +0000 (13:40 +0200)
Change-Id: I482517e6f83dfed2654476f928bb7bb01c9de202

24 files changed:
client/src/com/vaadin/client/ui/LegacyConnector.java
server/src/com/vaadin/server/AbstractCommunicationManager.java
server/src/com/vaadin/server/GlobalResourceHandler.java
server/src/com/vaadin/server/LegacyComponent.java [deleted file]
server/src/com/vaadin/server/LegacyPaint.java
server/src/com/vaadin/server/VariableOwner.java
server/src/com/vaadin/ui/AbstractSelect.java
server/src/com/vaadin/ui/AbstractTextField.java
server/src/com/vaadin/ui/CustomLayout.java
server/src/com/vaadin/ui/DateField.java
server/src/com/vaadin/ui/DragAndDropWrapper.java
server/src/com/vaadin/ui/Embedded.java
server/src/com/vaadin/ui/Form.java
server/src/com/vaadin/ui/GridLayout.java
server/src/com/vaadin/ui/LegacyComponent.java [new file with mode: 0644]
server/src/com/vaadin/ui/Link.java
server/src/com/vaadin/ui/MenuBar.java
server/src/com/vaadin/ui/Panel.java
server/src/com/vaadin/ui/PopupView.java
server/src/com/vaadin/ui/RichTextArea.java
server/src/com/vaadin/ui/TabSheet.java
server/src/com/vaadin/ui/UI.java
server/src/com/vaadin/ui/Upload.java
server/src/com/vaadin/ui/Window.java

index c5a1325a699c0bc76285a8c8d6c78a1c15de6b37..8e97cd3ef5379c19bc0f0d658ddfbea7987af000 100644 (file)
@@ -19,6 +19,11 @@ import com.vaadin.client.ApplicationConnection;
 import com.vaadin.client.Paintable;
 import com.vaadin.client.UIDL;
 
+/**
+ * @deprecated This class is only intended to ease migration and should not be
+ *             used for new projects.
+ */
+@Deprecated
 public abstract class LegacyConnector extends AbstractComponentConnector
         implements Paintable {
 
index a294d67a3183cd89f31901e87a17f4f717b49896..202c7cf780dfe1f9144263dd182f18824666c468 100644 (file)
@@ -82,6 +82,7 @@ import com.vaadin.ui.AbstractField;
 import com.vaadin.ui.Component;
 import com.vaadin.ui.ConnectorTracker;
 import com.vaadin.ui.HasComponents;
+import com.vaadin.ui.LegacyComponent;
 import com.vaadin.ui.LegacyWindow;
 import com.vaadin.ui.UI;
 import com.vaadin.ui.Window;
index 5b89408d017fef73e90a47be118c11960eda3a90..4ba3e25e287fb974cd9ebee0621f60afd3ae082f 100644 (file)
@@ -29,6 +29,7 @@ import java.util.regex.Pattern;
 import javax.servlet.http.HttpServletResponse;
 
 import com.vaadin.shared.ApplicationConstants;
+import com.vaadin.ui.LegacyComponent;
 import com.vaadin.ui.UI;
 
 /**
diff --git a/server/src/com/vaadin/server/LegacyComponent.java b/server/src/com/vaadin/server/LegacyComponent.java
deleted file mode 100644 (file)
index b6e620f..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-/* 
- * Copyright 2011 Vaadin Ltd.
- * 
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy of
- * the License at
- * 
- * http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-package com.vaadin.server;
-
-import java.util.EventListener;
-
-import com.vaadin.ui.Component;
-
-/**
- * Interface provided to ease porting of Vaadin 6 components to Vaadin 7. By
- * implementing this interface your Component will be able to use
- * {@link #paintContent(PaintTarget)} and
- * {@link #changeVariables(Object, java.util.Map)} just like in Vaadin 6.
- * 
- * @author Vaadin Ltd
- * @since 7.0.0
- * 
- */
-public interface LegacyComponent extends VariableOwner, Component,
-        EventListener {
-
-    /**
-     * <p>
-     * Paints the Paintable into a UIDL stream. This method creates the UIDL
-     * sequence describing it and outputs it to the given UIDL stream.
-     * </p>
-     * 
-     * <p>
-     * It is called when the contents of the component should be painted in
-     * response to the component first being shown or having been altered so
-     * that its visual representation is changed.
-     * </p>
-     * 
-     * @param target
-     *            the target UIDL stream where the component should paint itself
-     *            to.
-     * @throws PaintException
-     *             if the paint operation failed.
-     */
-    public void paintContent(PaintTarget target) throws PaintException;
-
-    /**
-     * (non-Javadoc) {@inheritDoc}
-     * <p>
-     * For a LegacyComponent, markAsDirty will also cause
-     * {@link #paintContent(PaintTarget)} to be called before sending changes to
-     * the client.
-     * 
-     * @see com.vaadin.server.ClientConnector#markAsDirty()
-     */
-    @Override
-    public void markAsDirty();
-}
index c39e0e82478ff9ba4d8e542f79f184f5db20fc9f..971aec682f06a9205eba6b3a41de7ccf45cba864 100644 (file)
@@ -20,6 +20,7 @@ import java.io.Serializable;
 import com.vaadin.server.PaintTarget.PaintStatus;
 import com.vaadin.ui.Component;
 import com.vaadin.ui.HasComponents;
+import com.vaadin.ui.LegacyComponent;
 
 public class LegacyPaint implements Serializable {
     /**
index c917996e6bfc51b8970fdcae09ee2690085af004..704b4cdae9d4076125c2adeb47260faea5f5b41d 100644 (file)
@@ -19,6 +19,8 @@ package com.vaadin.server;
 import java.io.Serializable;
 import java.util.Map;
 
+import com.vaadin.ui.LegacyComponent;
+
 /**
  * <p>
  * Listener interface for UI variable changes. The user communicates with the
index d2092ceb2c8acbc103f80624353ba418ec2b594a..e656ef1e0a54b71eb2a0ace9732f9bc2493c11cb 100644 (file)
@@ -41,7 +41,6 @@ import com.vaadin.event.dd.acceptcriteria.ClientSideCriterion;
 import com.vaadin.event.dd.acceptcriteria.ContainsDataFlavor;
 import com.vaadin.event.dd.acceptcriteria.TargetDetailIs;
 import com.vaadin.server.KeyMapper;
-import com.vaadin.server.LegacyComponent;
 import com.vaadin.server.PaintException;
 import com.vaadin.server.PaintTarget;
 import com.vaadin.server.Resource;
index e8618a33eee72fab4b2ed42f8edd98dfcf66c1bc..5a436d92c158c701bcc339af3db153ae81132ea1 100644 (file)
@@ -27,7 +27,6 @@ import com.vaadin.event.FieldEvents.FocusNotifier;
 import com.vaadin.event.FieldEvents.TextChangeEvent;
 import com.vaadin.event.FieldEvents.TextChangeListener;
 import com.vaadin.event.FieldEvents.TextChangeNotifier;
-import com.vaadin.server.LegacyComponent;
 import com.vaadin.server.PaintException;
 import com.vaadin.server.PaintTarget;
 import com.vaadin.shared.ui.textfield.AbstractTextFieldState;
index 39540a388271439efd48ffcdf6f069e50185dba2..19bd5a54b35779011f977ffeae49ae276c5d8994 100644 (file)
@@ -25,7 +25,6 @@ import java.util.Map;
 import java.util.Set;
 
 import com.vaadin.server.JsonPaintTarget;
-import com.vaadin.server.LegacyComponent;
 import com.vaadin.server.PaintException;
 import com.vaadin.server.PaintTarget;
 import com.vaadin.shared.ui.customlayout.CustomLayoutState;
index 39230bf662a43f3022914429bacc3c7a61699c20..77f18df30440eb32aa3dfa6ce6a1ee7b003c6462 100644 (file)
@@ -34,7 +34,6 @@ import com.vaadin.event.FieldEvents.BlurEvent;
 import com.vaadin.event.FieldEvents.BlurListener;
 import com.vaadin.event.FieldEvents.FocusEvent;
 import com.vaadin.event.FieldEvents.FocusListener;
-import com.vaadin.server.LegacyComponent;
 import com.vaadin.server.PaintException;
 import com.vaadin.server.PaintTarget;
 import com.vaadin.shared.ui.datefield.DateFieldConstants;
index ca4807ff5dfb7f265e136ad6bdef8f7c40f14c23..81efa8883e40dd1abe4bf89a848aee9bd4ddd10c 100644 (file)
@@ -29,7 +29,6 @@ import com.vaadin.event.dd.DropHandler;
 import com.vaadin.event.dd.DropTarget;
 import com.vaadin.event.dd.TargetDetails;
 import com.vaadin.event.dd.TargetDetailsImpl;
-import com.vaadin.server.LegacyComponent;
 import com.vaadin.server.PaintException;
 import com.vaadin.server.PaintTarget;
 import com.vaadin.server.StreamVariable;
index d61fd442924d522d67114f73aeb8ae762d42e8bd..a47989ad369b4577b3c23490f696b1d677e1f664 100644 (file)
@@ -22,7 +22,6 @@ import java.util.Map;
 
 import com.vaadin.event.MouseEvents.ClickEvent;
 import com.vaadin.event.MouseEvents.ClickListener;
-import com.vaadin.server.LegacyComponent;
 import com.vaadin.server.PaintException;
 import com.vaadin.server.PaintTarget;
 import com.vaadin.server.Resource;
index 46a335669e67afea7f931357025fd3800e69e16b..9668eaf914d2016b0ed8f1df1eaee119fc6638dc 100644 (file)
@@ -39,7 +39,6 @@ import com.vaadin.event.ActionManager;
 import com.vaadin.server.AbstractErrorMessage;
 import com.vaadin.server.CompositeErrorMessage;
 import com.vaadin.server.ErrorMessage;
-import com.vaadin.server.LegacyComponent;
 import com.vaadin.server.PaintException;
 import com.vaadin.server.PaintTarget;
 import com.vaadin.server.UserError;
index 566bd812a3e00d2f8984e05992379c66ab901de6..39be937c0133c8c78ec55331a2d51737ecb89694 100644 (file)
@@ -27,7 +27,6 @@ import java.util.Map.Entry;
 import com.vaadin.event.LayoutEvents.LayoutClickEvent;
 import com.vaadin.event.LayoutEvents.LayoutClickListener;
 import com.vaadin.event.LayoutEvents.LayoutClickNotifier;
-import com.vaadin.server.LegacyComponent;
 import com.vaadin.server.LegacyPaint;
 import com.vaadin.server.PaintException;
 import com.vaadin.server.PaintTarget;
diff --git a/server/src/com/vaadin/ui/LegacyComponent.java b/server/src/com/vaadin/ui/LegacyComponent.java
new file mode 100644 (file)
index 0000000..5538c3a
--- /dev/null
@@ -0,0 +1,72 @@
+/* 
+ * Copyright 2011 Vaadin Ltd.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.ui;
+
+import java.util.EventListener;
+
+import com.vaadin.server.ClientConnector;
+import com.vaadin.server.PaintException;
+import com.vaadin.server.PaintTarget;
+import com.vaadin.server.VariableOwner;
+
+/**
+ * Interface provided to ease porting of Vaadin 6 components to Vaadin 7. By
+ * implementing this interface your Component will be able to use
+ * {@link #paintContent(PaintTarget)} and
+ * {@link #changeVariables(Object, java.util.Map)} just like in Vaadin 6.
+ * 
+ * @deprecated This class is only intended to ease migration and should not be
+ *             used for new projects.
+ * 
+ * @author Vaadin Ltd
+ * @since 7.0.0
+ */
+@Deprecated
+public interface LegacyComponent extends VariableOwner, Component,
+        EventListener {
+
+    /**
+     * <p>
+     * Paints the Paintable into a UIDL stream. This method creates the UIDL
+     * sequence describing it and outputs it to the given UIDL stream.
+     * </p>
+     * 
+     * <p>
+     * It is called when the contents of the component should be painted in
+     * response to the component first being shown or having been altered so
+     * that its visual representation is changed.
+     * </p>
+     * 
+     * @param target
+     *            the target UIDL stream where the component should paint itself
+     *            to.
+     * @throws PaintException
+     *             if the paint operation failed.
+     */
+    public void paintContent(PaintTarget target) throws PaintException;
+
+    /**
+     * (non-Javadoc) {@inheritDoc}
+     * <p>
+     * For a LegacyComponent, markAsDirty will also cause
+     * {@link #paintContent(PaintTarget)} to be called before sending changes to
+     * the client.
+     * 
+     * @see com.vaadin.server.ClientConnector#markAsDirty()
+     */
+    @Override
+    public void markAsDirty();
+}
index 6e286174a557c5d6a705ec7bcfaf0ecf2fce224d..883ff40aa30b4daf14809983cd0ad863c70bfa6b 100644 (file)
@@ -18,7 +18,6 @@ package com.vaadin.ui;
 
 import java.util.Map;
 
-import com.vaadin.server.LegacyComponent;
 import com.vaadin.server.PaintException;
 import com.vaadin.server.PaintTarget;
 import com.vaadin.server.Resource;
index a254f62fc838125c9114238f3b9a96fbc7f545a9..f3b5cb036934c2e74e4bfb30166247e4e99c5848 100644 (file)
@@ -22,7 +22,6 @@ import java.util.List;
 import java.util.Map;
 import java.util.Stack;
 
-import com.vaadin.server.LegacyComponent;
 import com.vaadin.server.PaintException;
 import com.vaadin.server.PaintTarget;
 import com.vaadin.server.Resource;
index f73cd5128ed1222144c6948c697b93489aa78911..8d501cd94904042d20bd8377c79e9878b74e9897 100644 (file)
@@ -25,7 +25,6 @@ import com.vaadin.event.Action.Handler;
 import com.vaadin.event.ActionManager;
 import com.vaadin.event.MouseEvents.ClickEvent;
 import com.vaadin.event.MouseEvents.ClickListener;
-import com.vaadin.server.LegacyComponent;
 import com.vaadin.server.PaintException;
 import com.vaadin.server.PaintTarget;
 import com.vaadin.server.Scrollable;
index 182e71d6c9dd9c2bd303f9c1e054068a46dcedce..97a198f73f59cd4304dbaecf0d6e8d1a304a14c1 100644 (file)
@@ -20,7 +20,6 @@ import java.lang.reflect.Method;
 import java.util.Iterator;
 import java.util.Map;
 
-import com.vaadin.server.LegacyComponent;
 import com.vaadin.server.LegacyPaint;
 import com.vaadin.server.PaintException;
 import com.vaadin.server.PaintTarget;
index e687c68815d2c5155539f4a28d0058cdcdf7e775..81432e212d0f1b41234a66b00f6b46ac0a3d3510 100644 (file)
@@ -19,7 +19,6 @@ package com.vaadin.ui;
 import java.util.Map;
 
 import com.vaadin.data.Property;
-import com.vaadin.server.LegacyComponent;
 import com.vaadin.server.PaintException;
 import com.vaadin.server.PaintTarget;
 
index 1293966e58d6ab571c493279b11d922750b1e67f..c45789ed33e2c1c0f9b37b050a65e006796ac37e 100644 (file)
@@ -32,7 +32,6 @@ import com.vaadin.event.FieldEvents.FocusListener;
 import com.vaadin.event.FieldEvents.FocusNotifier;
 import com.vaadin.server.ErrorMessage;
 import com.vaadin.server.KeyMapper;
-import com.vaadin.server.LegacyComponent;
 import com.vaadin.server.LegacyPaint;
 import com.vaadin.server.PaintException;
 import com.vaadin.server.PaintTarget;
index fb6ab9a0e1232e189caa69babc6108c254ed0415..4d743859daff8b538be3524a98928c09ddba9585 100644 (file)
@@ -31,7 +31,6 @@ import com.vaadin.event.ActionManager;
 import com.vaadin.event.MouseEvents.ClickEvent;
 import com.vaadin.event.MouseEvents.ClickListener;
 import com.vaadin.navigator.Navigator;
-import com.vaadin.server.LegacyComponent;
 import com.vaadin.server.Page;
 import com.vaadin.server.PaintException;
 import com.vaadin.server.PaintTarget;
index 624f6a3f911f4087ec6212754eeb95a43cd7f7c0..47b4684c3229a02a3fc8feb1273153ba3601c590 100644 (file)
@@ -24,7 +24,6 @@ import java.util.Iterator;
 import java.util.LinkedHashSet;
 import java.util.Map;
 
-import com.vaadin.server.LegacyComponent;
 import com.vaadin.server.NoInputStreamException;
 import com.vaadin.server.NoOutputStreamException;
 import com.vaadin.server.PaintException;
index d7a33d742c8a348ca2d241bea78727dbd7bfc035..b09ef1349735b4e5a8c3b82e54892724c57ef3eb 100644 (file)
@@ -31,7 +31,6 @@ import com.vaadin.event.ShortcutAction;
 import com.vaadin.event.ShortcutAction.KeyCode;
 import com.vaadin.event.ShortcutAction.ModifierKey;
 import com.vaadin.event.ShortcutListener;
-import com.vaadin.server.LegacyComponent;
 import com.vaadin.server.PaintException;
 import com.vaadin.server.PaintTarget;
 import com.vaadin.shared.MouseEventDetails;