]> source.dussan.org Git - vaadin-framework.git/commitdiff
renamed DropTargetDetails... to TargetDetails... Should be just as clear for develope...
authorMatti Tahvonen <matti.tahvonen@itmill.com>
Wed, 24 Mar 2010 16:25:51 +0000 (16:25 +0000)
committerMatti Tahvonen <matti.tahvonen@itmill.com>
Wed, 24 Mar 2010 16:25:51 +0000 (16:25 +0000)
svn changeset:12077/svn branch:6.3

24 files changed:
src/com/vaadin/event/dd/DragAndDropEvent.java
src/com/vaadin/event/dd/DropTarget.java
src/com/vaadin/event/dd/DropTargetDetails.java [deleted file]
src/com/vaadin/event/dd/DropTargetDetailsImpl.java [deleted file]
src/com/vaadin/event/dd/TargetDetails.java [new file with mode: 0644]
src/com/vaadin/event/dd/TargetDetailsImpl.java [new file with mode: 0644]
src/com/vaadin/event/dd/acceptcriteria/TargetDetailIs.java
src/com/vaadin/terminal/gwt/server/DragAndDropService.java
src/com/vaadin/ui/AbstractSelect.java
src/com/vaadin/ui/DragAndDropWrapper.java
src/com/vaadin/ui/Table.java
src/com/vaadin/ui/Tree.java
tests/src/com/vaadin/tests/dd/AcceptAnythingWindow.java
tests/src/com/vaadin/tests/dd/AcceptFromComponent.java
tests/src/com/vaadin/tests/dd/CustomDDImplementation.java
tests/src/com/vaadin/tests/dd/DDTest1.java
tests/src/com/vaadin/tests/dd/DDTest2.java
tests/src/com/vaadin/tests/dd/DDTest4.java
tests/src/com/vaadin/tests/dd/DDTest6.java
tests/src/com/vaadin/tests/dd/DDTest7.java
tests/src/com/vaadin/tests/dd/DDTest8.java
tests/src/com/vaadin/tests/dd/DragDropPane.java
tests/src/com/vaadin/tests/dd/HorizontalLayoutSortableWithWrappers.java
tests/src/com/vaadin/tests/dd/HorizontalSortableCssLayoutWithWrappers.java

index 01817200f9ba0e41d42dc6871ff7237e0bf777b9..721e00036947432eeccdfd2b9a5c83321a889e8b 100644 (file)
@@ -16,7 +16,7 @@ import com.vaadin.event.dd.acceptcriteria.AcceptCriterion;
  * <p>
  * DragAndDropEvent instances contains both the dragged data in
  * {@link Transferable} (generated by {@link DragSource} and details about the
- * current drop event in {@link DropTargetDetails} (generated by
+ * current drop event in {@link TargetDetails} (generated by
  * {@link DropTarget}.
  * 
  * @since 6.3
@@ -24,10 +24,10 @@ import com.vaadin.event.dd.acceptcriteria.AcceptCriterion;
  */
 public class DragAndDropEvent implements Serializable {
     private Transferable transferable;
-    private DropTargetDetails dropTargetDetails;
+    private TargetDetails dropTargetDetails;
 
     public DragAndDropEvent(Transferable transferable,
-            DropTargetDetails dropTargetDetails) {
+            TargetDetails dropTargetDetails) {
         this.transferable = transferable;
         this.dropTargetDetails = dropTargetDetails;
     }
@@ -44,7 +44,7 @@ public class DragAndDropEvent implements Serializable {
      * @return the DropTargetDetails containing drop target related details of
      *         drag and drop operation
      */
-    public DropTargetDetails getDropTargetDetails() {
+    public TargetDetails getDropTargetDetails() {
         return dropTargetDetails;
     }
 
index b2ab244c43206b37b7e4c6b4491409fe9e7478af..31c6754f6faeeb19bcd69c6dc7fc486ccd427a15 100644 (file)
@@ -27,7 +27,7 @@ public interface DropTarget extends Component {
      * {@link DropHandler}. Implementation may for exmaple translate the drop
      * target details provided by the client side (drop target) to meaningful
      * server side values. If null is returned the terminal implementation will
-     * automatically create a {@link DropTargetDetails} with raw client side
+     * automatically create a {@link TargetDetails} with raw client side
      * data.
      * 
      * @see DragSource#getTransferable(Map)
@@ -37,7 +37,7 @@ public interface DropTarget extends Component {
      * @return A DropTargetDetails object with the translated data or null to
      *         use a default implementation.
      */
-    public DropTargetDetails translateDropTargetDetails(
+    public TargetDetails translateDropTargetDetails(
             Map<String, Object> clientVariables);
 
 }
\ No newline at end of file
diff --git a/src/com/vaadin/event/dd/DropTargetDetails.java b/src/com/vaadin/event/dd/DropTargetDetails.java
deleted file mode 100644 (file)
index 770d58d..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
-@ITMillApache2LicenseForJavaFiles@
- */
-package com.vaadin.event.dd;
-
-import java.io.Serializable;
-
-import com.vaadin.ui.Tree.TreeDropTargetDetails;
-
-/**
- * DropTargetDetails wraps drop target related information about
- * {@link DragAndDropEvent}.
- * <p>
- * When a DropTargetDetails object is used in {@link DropHandler} it is often
- * preferable to cast the DropTargetDetail to an implementation provided by
- * DropTarget like {@link TreeDropTargetDetails}. They often provide better
- * typed, drop target specific API.
- * 
- * @since 6.3
- * 
- */
-public interface DropTargetDetails extends Serializable {
-
-    /**
-     * Gets target data associated to given string key
-     * 
-     * @param key
-     * @return
-     */
-    public Object getData(String key);
-
-    /**
-     * @return the drop target on which the {@link DragAndDropEvent} happened.
-     */
-    public DropTarget getTarget();
-
-}
diff --git a/src/com/vaadin/event/dd/DropTargetDetailsImpl.java b/src/com/vaadin/event/dd/DropTargetDetailsImpl.java
deleted file mode 100644 (file)
index bcc35c6..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
-@ITMillApache2LicenseForJavaFiles@
- */
-package com.vaadin.event.dd;
-
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * A HashMap backed implementation of {@link DropTargetDetails} for terminal
- * implementation and for extension.
- * 
- * @since 6.3
- * 
- */
-public class DropTargetDetailsImpl implements DropTargetDetails {
-
-    private static final long serialVersionUID = -5099462771593036776L;
-    private HashMap<String, Object> data = new HashMap<String, Object>();
-    private DropTarget dropTarget;
-
-    protected DropTargetDetailsImpl(Map<String, Object> rawDropData) {
-        data.putAll(rawDropData);
-    }
-
-    public DropTargetDetailsImpl(Map<String, Object> rawDropData,
-            DropTarget dropTarget) {
-        this(rawDropData);
-        this.dropTarget = dropTarget;
-    }
-
-    public Object getData(String key) {
-        return data.get(key);
-    }
-
-    public Object setData(String key, Object value) {
-        return data.put(key, value);
-    }
-
-    public DropTarget getTarget() {
-        return dropTarget;
-    }
-
-}
\ No newline at end of file
diff --git a/src/com/vaadin/event/dd/TargetDetails.java b/src/com/vaadin/event/dd/TargetDetails.java
new file mode 100644 (file)
index 0000000..f83edf8
--- /dev/null
@@ -0,0 +1,37 @@
+/*
+@ITMillApache2LicenseForJavaFiles@
+ */
+package com.vaadin.event.dd;
+
+import java.io.Serializable;
+
+import com.vaadin.ui.Tree.TreeTargetDetails;
+
+/**
+ * TargetDetails wraps drop target related information about
+ * {@link DragAndDropEvent}.
+ * <p>
+ * When a TargetDetails object is used in {@link DropHandler} it is often
+ * preferable to cast the TargetDetails to an implementation provided by
+ * DropTarget like {@link TreeTargetDetails}. They often provide a better typed,
+ * drop target specific API.
+ * 
+ * @since 6.3
+ * 
+ */
+public interface TargetDetails extends Serializable {
+
+    /**
+     * Gets target data associated to given string key
+     * 
+     * @param key
+     * @return
+     */
+    public Object getData(String key);
+
+    /**
+     * @return the drop target on which the {@link DragAndDropEvent} happened.
+     */
+    public DropTarget getTarget();
+
+}
diff --git a/src/com/vaadin/event/dd/TargetDetailsImpl.java b/src/com/vaadin/event/dd/TargetDetailsImpl.java
new file mode 100644 (file)
index 0000000..5b23a2a
--- /dev/null
@@ -0,0 +1,44 @@
+/*
+@ITMillApache2LicenseForJavaFiles@
+ */
+package com.vaadin.event.dd;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * A HashMap backed implementation of {@link TargetDetails} for terminal
+ * implementation and for extension.
+ * 
+ * @since 6.3
+ * 
+ */
+@SuppressWarnings("serial")
+public class TargetDetailsImpl implements TargetDetails {
+
+    private HashMap<String, Object> data = new HashMap<String, Object>();
+    private DropTarget dropTarget;
+
+    protected TargetDetailsImpl(Map<String, Object> rawDropData) {
+        data.putAll(rawDropData);
+    }
+
+    public TargetDetailsImpl(Map<String, Object> rawDropData,
+            DropTarget dropTarget) {
+        this(rawDropData);
+        this.dropTarget = dropTarget;
+    }
+
+    public Object getData(String key) {
+        return data.get(key);
+    }
+
+    public Object setData(String key, Object value) {
+        return data.put(key, value);
+    }
+
+    public DropTarget getTarget() {
+        return dropTarget;
+    }
+
+}
\ No newline at end of file
index c20f10667d8d0cd3926e55122216ee846e461ae9..89783aefe4e2c11045efc79e621ae1b535cca8dc 100644 (file)
@@ -7,7 +7,7 @@
 package com.vaadin.event.dd.acceptcriteria;
 
 import com.vaadin.event.dd.DragAndDropEvent;
-import com.vaadin.event.dd.DropTargetDetails;
+import com.vaadin.event.dd.TargetDetails;
 import com.vaadin.terminal.PaintException;
 import com.vaadin.terminal.PaintTarget;
 import com.vaadin.terminal.gwt.client.ui.dd.VTargetDetailIs;
@@ -30,7 +30,7 @@ public class TargetDetailIs extends ClientSideCriterion {
 
     /**
      * Constructs a criterion which ensures that the value there is a value in
-     * {@link DropTargetDetails} that equals the reference value.
+     * {@link TargetDetails} that equals the reference value.
      * 
      * @param dataFlavor
      *            the type of data to be checked
index 3c17cb0b32f30bf22b7c221f5fbc81ff03b4c5a3..9f8e3ba17ecba765494752f56a60b548583285ec 100644 (file)
@@ -12,8 +12,8 @@ import com.vaadin.event.dd.DragAndDropEvent;
 import com.vaadin.event.dd.DragSource;
 import com.vaadin.event.dd.DropHandler;
 import com.vaadin.event.dd.DropTarget;
-import com.vaadin.event.dd.DropTargetDetails;
-import com.vaadin.event.dd.DropTargetDetailsImpl;
+import com.vaadin.event.dd.TargetDetails;
+import com.vaadin.event.dd.TargetDetailsImpl;
 import com.vaadin.event.dd.acceptcriteria.AcceptCriterion;
 import com.vaadin.terminal.PaintException;
 import com.vaadin.terminal.VariableOwner;
@@ -89,7 +89,7 @@ public class DragAndDropService implements VariableOwner {
          * source for Transferable, drop target for DragDropDetails).
          */
         Transferable transferable = constructTransferable(dropTarget, variables);
-        DropTargetDetails dropData = constructDragDropDetails(dropTarget,
+        TargetDetails dropData = constructDragDropDetails(dropTarget,
                 variables);
         DragAndDropEvent dropEvent = new DragAndDropEvent(transferable,
                 dropData);
@@ -116,7 +116,7 @@ public class DragAndDropService implements VariableOwner {
          * source for Transferable, current target for DragDropDetails).
          */
         Transferable transferable = constructTransferable(dropTarget, variables);
-        DropTargetDetails dragDropDetails = constructDragDropDetails(
+        TargetDetails dragDropDetails = constructDragDropDetails(
                 dropTarget, variables);
 
         dragEvent = new DragAndDropEvent(transferable, dragDropDetails);
@@ -134,17 +134,17 @@ public class DragAndDropService implements VariableOwner {
      * @return
      */
     @SuppressWarnings("unchecked")
-    private DropTargetDetails constructDragDropDetails(DropTarget dropTarget,
+    private TargetDetails constructDragDropDetails(DropTarget dropTarget,
             Map<String, Object> variables) {
         Map<String, Object> rawDragDropDetails = (Map<String, Object>) variables
                 .get("evt");
 
-        DropTargetDetails dropData = dropTarget
+        TargetDetails dropData = dropTarget
                 .translateDropTargetDetails(rawDragDropDetails);
 
         if (dropData == null) {
             // Create a default DragDropDetails with all the raw variables
-            dropData = new DropTargetDetailsImpl(rawDragDropDetails, dropTarget);
+            dropData = new TargetDetailsImpl(rawDragDropDetails, dropTarget);
         }
 
         return dropData;
index 42bc93a18390bf8c26aa6e05ce12247ef48ec049..137f415555c0c24254091483ac849ff7b215bcb2 100644 (file)
@@ -23,7 +23,7 @@ import com.vaadin.event.DataBoundTransferable;
 import com.vaadin.event.Transferable;
 import com.vaadin.event.dd.DragAndDropEvent;
 import com.vaadin.event.dd.DropTarget;
-import com.vaadin.event.dd.DropTargetDetailsImpl;
+import com.vaadin.event.dd.TargetDetailsImpl;
 import com.vaadin.event.dd.acceptcriteria.ClientCriterion;
 import com.vaadin.event.dd.acceptcriteria.ClientSideCriterion;
 import com.vaadin.event.dd.acceptcriteria.ContainsDataFlavor;
@@ -1714,7 +1714,7 @@ public abstract class AbstractSelect extends AbstractField implements
         }
 
         public boolean accept(DragAndDropEvent dragEvent) {
-            AbstractSelectDropTargetDetails dropTargetData = (AbstractSelectDropTargetDetails) dragEvent
+            AbstractSelectTargetDetails dropTargetData = (AbstractSelectTargetDetails) dragEvent
                     .getDropTargetDetails();
             if (dropTargetData.getTarget() != select) {
                 return false;
@@ -1801,12 +1801,12 @@ public abstract class AbstractSelect extends AbstractField implements
     }
 
     /**
-     * DropTargetDetails implementation for subclasses of {@link AbstractSelect}
+     * TargetDetails implementation for subclasses of {@link AbstractSelect}
      * that implement {@link DropTarget}.
      * 
      * @since 6.3
      */
-    public class AbstractSelectDropTargetDetails extends DropTargetDetailsImpl {
+    public class AbstractSelectTargetDetails extends TargetDetailsImpl {
 
         /**
          * The item id over which the drag event happened.
@@ -1818,8 +1818,7 @@ public abstract class AbstractSelect extends AbstractField implements
          * corresponding item Id
          * 
          */
-        protected AbstractSelectDropTargetDetails(
-                Map<String, Object> rawVariables) {
+        protected AbstractSelectTargetDetails(Map<String, Object> rawVariables) {
             super(rawVariables, (DropTarget) AbstractSelect.this);
             // eagar fetch itemid, mapper may be emptied
             String keyover = (String) getData("itemIdOver");
index c9e8954529b2cffc980f3b3ae59b30f135b2b71a..e431592e8e07ea27e795b84624f7125b2562a857 100644 (file)
@@ -14,8 +14,8 @@ import com.vaadin.event.TransferableImpl;
 import com.vaadin.event.dd.DragSource;
 import com.vaadin.event.dd.DropHandler;
 import com.vaadin.event.dd.DropTarget;
-import com.vaadin.event.dd.DropTargetDetails;
-import com.vaadin.event.dd.DropTargetDetailsImpl;
+import com.vaadin.event.dd.TargetDetails;
+import com.vaadin.event.dd.TargetDetailsImpl;
 import com.vaadin.terminal.PaintException;
 import com.vaadin.terminal.PaintTarget;
 import com.vaadin.terminal.UploadStream;
@@ -28,6 +28,7 @@ import com.vaadin.ui.DragAndDropWrapper.WrapperTransferable.Html5File;
 import com.vaadin.ui.Upload.Receiver;
 import com.vaadin.ui.Upload.UploadException;
 
+@SuppressWarnings("serial")
 @ClientWidget(VDragAndDropWrapper.class)
 public class DragAndDropWrapper extends CustomComponent implements DropTarget,
         DragSource {
@@ -142,9 +143,9 @@ public class DragAndDropWrapper extends CustomComponent implements DropTarget,
 
     private Map<String, Html5File> receivers = new HashMap<String, Html5File>();
 
-    public class WrapperDropDetails extends DropTargetDetailsImpl {
+    public class WrapperTargetDetails extends TargetDetailsImpl {
 
-        public WrapperDropDetails(Map<String, Object> rawDropData) {
+        public WrapperTargetDetails(Map<String, Object> rawDropData) {
             super(rawDropData, DragAndDropWrapper.this);
         }
 
@@ -231,9 +232,9 @@ public class DragAndDropWrapper extends CustomComponent implements DropTarget,
         requestRepaint();
     }
 
-    public DropTargetDetails translateDropTargetDetails(
+    public TargetDetails translateDropTargetDetails(
             Map<String, Object> clientVariables) {
-        return new WrapperDropDetails(clientVariables);
+        return new WrapperTargetDetails(clientVariables);
     }
 
     public Transferable getTransferable(final Map<String, Object> rawVariables) {
index 842c6b206c44d819d8a937c20cc729aba7f1fca2..043df9417215b7094d35f53583d60a50ef239456 100644 (file)
@@ -3425,9 +3425,9 @@ public class Table extends AbstractSelect implements Action.Container,
         this.dropHandler = dropHandler;
     }
 
-    public AbstractSelectDropTargetDetails translateDropTargetDetails(
+    public AbstractSelectTargetDetails translateDropTargetDetails(
             Map<String, Object> clientVariables) {
-        return new AbstractSelectDropTargetDetails(clientVariables);
+        return new AbstractSelectTargetDetails(clientVariables);
     }
 
     /**
@@ -3469,7 +3469,7 @@ public class Table extends AbstractSelect implements Action.Container,
          * .event.dd.DragAndDropEvent)
          */
         public boolean accept(DragAndDropEvent dragEvent) {
-            AbstractSelectDropTargetDetails dropTargetData = (AbstractSelectDropTargetDetails) dragEvent
+            AbstractSelectTargetDetails dropTargetData = (AbstractSelectTargetDetails) dragEvent
                     .getDropTargetDetails();
             table = (Table) dragEvent.getDropTargetDetails().getTarget();
             ArrayList<Object> visibleItemIds = new ArrayList<Object>(table
index 670f9d8f2bb4aa1cae424a85a7d09ebbdba3e114..7aef155f61536565316df61760c7211b6b348831 100644 (file)
@@ -32,7 +32,7 @@ import com.vaadin.event.dd.DragAndDropEvent;
 import com.vaadin.event.dd.DragSource;
 import com.vaadin.event.dd.DropHandler;
 import com.vaadin.event.dd.DropTarget;
-import com.vaadin.event.dd.DropTargetDetails;
+import com.vaadin.event.dd.TargetDetails;
 import com.vaadin.event.dd.acceptcriteria.ClientCriterion;
 import com.vaadin.event.dd.acceptcriteria.ClientSideCriterion;
 import com.vaadin.event.dd.acceptcriteria.ServerSideCriterion;
@@ -1122,13 +1122,13 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
     }
 
     /**
-     * A {@link DropTargetDetails} implementation with Tree specific api.
+     * A {@link TargetDetails} implementation with Tree specific api.
      * 
      * @since 6.3
      */
-    public class TreeDropTargetDetails extends AbstractSelectDropTargetDetails {
+    public class TreeTargetDetails extends AbstractSelectTargetDetails {
 
-        TreeDropTargetDetails(Map<String, Object> rawVariables) {
+        TreeTargetDetails(Map<String, Object> rawVariables) {
             super(rawVariables);
         }
 
@@ -1211,9 +1211,9 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
      * @see
      * com.vaadin.event.dd.DropTarget#translateDropTargetDetails(java.util.Map)
      */
-    public TreeDropTargetDetails translateDropTargetDetails(
+    public TreeTargetDetails translateDropTargetDetails(
             Map<String, Object> clientVariables) {
-        return new TreeDropTargetDetails(clientVariables);
+        return new TreeTargetDetails(clientVariables);
     }
 
     /**
@@ -1326,7 +1326,7 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
          * .event.dd.DragAndDropEvent)
          */
         public boolean accept(DragAndDropEvent dragEvent) {
-            AbstractSelectDropTargetDetails dropTargetData = (AbstractSelectDropTargetDetails) dragEvent
+            AbstractSelectTargetDetails dropTargetData = (AbstractSelectTargetDetails) dragEvent
                     .getDropTargetDetails();
             tree = (Tree) dragEvent.getDropTargetDetails().getTarget();
             allowedItemIds = getAllowedItemIds(dragEvent, tree);
@@ -1392,7 +1392,7 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
                 // must be over tree node and in the middle of it (not top or
                 // bottom
                 // part)
-                TreeDropTargetDetails eventDetails = (TreeDropTargetDetails) dragEvent
+                TreeTargetDetails eventDetails = (TreeTargetDetails) dragEvent
                         .getDropTargetDetails();
 
                 Object itemIdOver = eventDetails.getItemIdOver();
@@ -1451,7 +1451,7 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
 
         public boolean accept(DragAndDropEvent dragEvent) {
             try {
-                TreeDropTargetDetails eventDetails = (TreeDropTargetDetails) dragEvent
+                TreeTargetDetails eventDetails = (TreeTargetDetails) dragEvent
                         .getDropTargetDetails();
 
                 if (eventDetails.getItemIdOver() != null) {
index c9bfa528a30ebf0845b3a4f329e49131b5f2c5a4..a2f7540b2cca6577bd6e027050bd089694797ae1 100644 (file)
@@ -15,7 +15,7 @@ import com.vaadin.ui.Label;
 import com.vaadin.ui.Window;
 import com.vaadin.ui.AbsoluteLayout.ComponentPosition;
 import com.vaadin.ui.DragAndDropWrapper.DragStartMode;
-import com.vaadin.ui.DragAndDropWrapper.WrapperDropDetails;
+import com.vaadin.ui.DragAndDropWrapper.WrapperTargetDetails;
 import com.vaadin.ui.DragAndDropWrapper.WrapperTransferable;
 
 public class AcceptAnythingWindow extends Window {
@@ -33,7 +33,7 @@ public class AcceptAnythingWindow extends Window {
             }
 
             public void drop(DragAndDropEvent event) {
-                WrapperDropDetails ed = (WrapperDropDetails) event
+                WrapperTargetDetails ed = (WrapperTargetDetails) event
                         .getDropTargetDetails();
                 Transferable transferable = event.getTransferable();
                 TransferableImpl ctr = (TransferableImpl) transferable;
index da602fd0b83be9b9f842650603d6600865d7a403..e21d083783c8223edd8a984ede9db23d602ac95b 100644 (file)
@@ -15,7 +15,7 @@ import com.vaadin.ui.Label;
 import com.vaadin.ui.Tree;
 import com.vaadin.ui.Window;
 import com.vaadin.ui.AbsoluteLayout.ComponentPosition;
-import com.vaadin.ui.DragAndDropWrapper.WrapperDropDetails;
+import com.vaadin.ui.DragAndDropWrapper.WrapperTargetDetails;
 import com.vaadin.ui.DragAndDropWrapper.WrapperTransferable;
 
 public class AcceptFromComponent extends Window {
@@ -57,7 +57,7 @@ public class AcceptFromComponent extends Window {
 
             public void drop(DragAndDropEvent event) {
 
-                WrapperDropDetails ed = (WrapperDropDetails) event
+                WrapperTargetDetails ed = (WrapperTargetDetails) event
                         .getDropTargetDetails();
                 Transferable ctr = event.getTransferable();
                 if (ctr.getSourceComponent() != null) {
index 04292a6ba952f274cbae7faf020084259aba1573..c789ead11326a27fb57a45b4382924ee4610a003 100644 (file)
@@ -5,7 +5,7 @@ import java.util.Map;
 import com.vaadin.event.dd.DragAndDropEvent;
 import com.vaadin.event.dd.DropHandler;
 import com.vaadin.event.dd.DropTarget;
-import com.vaadin.event.dd.DropTargetDetails;
+import com.vaadin.event.dd.TargetDetails;
 import com.vaadin.event.dd.acceptcriteria.AcceptAll;
 import com.vaadin.event.dd.acceptcriteria.AcceptCriterion;
 import com.vaadin.ui.AbstractComponent;
@@ -55,7 +55,7 @@ public class CustomDDImplementation extends CustomComponent {
             };
         }
 
-        public DropTargetDetails translateDropTargetDetails(
+        public TargetDetails translateDropTargetDetails(
                 Map<String, Object> clientVariables) {
             // If component has some special drop details that it needs to
             // translate for server side use, developer must return a
index cfe6aa20c4d7cd73ba70b115239e549e8e43f613..9a9f5cea450fe9a5e0002d63ca2a904bb67d0155 100644 (file)
@@ -23,7 +23,7 @@ import com.vaadin.ui.Tree;
 import com.vaadin.ui.AbstractSelect.AcceptItem;
 import com.vaadin.ui.Table.TableDragMode;
 import com.vaadin.ui.Tree.TreeDragMode;
-import com.vaadin.ui.Tree.TreeDropTargetDetails;
+import com.vaadin.ui.Tree.TreeTargetDetails;
 
 /**
  * DD playground. Better quality example/prototype codes in {@link DDTest2}.
@@ -187,7 +187,7 @@ public class DDTest1 extends TestBase {
             }
 
             public void drop(DragAndDropEvent event) {
-                TreeDropTargetDetails details = (TreeDropTargetDetails) event
+                TreeTargetDetails details = (TreeTargetDetails) event
                         .getDropTargetDetails();
                 // TODO set properties, so same sorter could be used in Table
                 Transferable transferable = event.getTransferable();
index 45552d9c791b823d8aba884677bc1e7ea66f33a0..aaf527c494fb33e88db4e35fcf68ed367bd70102 100644 (file)
@@ -25,7 +25,7 @@ import com.vaadin.ui.HorizontalLayout;
 import com.vaadin.ui.Table;
 import com.vaadin.ui.Tree;
 import com.vaadin.ui.Window;
-import com.vaadin.ui.AbstractSelect.AbstractSelectDropTargetDetails;
+import com.vaadin.ui.AbstractSelect.AbstractSelectTargetDetails;
 import com.vaadin.ui.AbstractSelect.AcceptItem;
 import com.vaadin.ui.Table.TableTransferable;
 import com.vaadin.ui.Tree.TargetItemAllowsChildren;
@@ -102,7 +102,7 @@ public class DDTest2 extends TestBase {
                     data = "-no Text data flawor-";
                 }
                 tree3.addItem(data);
-                AbstractSelect.AbstractSelectDropTargetDetails dropTargetData = (AbstractSelect.AbstractSelectDropTargetDetails) dropEvent
+                AbstractSelect.AbstractSelectTargetDetails dropTargetData = (AbstractSelect.AbstractSelectTargetDetails) dropEvent
                         .getDropTargetDetails();
                 tree3.setParent(data, dropTargetData.getItemIdOver());
 
@@ -165,7 +165,7 @@ public class DDTest2 extends TestBase {
                  * As we also accept only drops on folders, we know dropDetails
                  * is from Tree and it contains itemIdOver.
                  */
-                AbstractSelectDropTargetDetails details = (AbstractSelectDropTargetDetails) event
+                AbstractSelectTargetDetails details = (AbstractSelectTargetDetails) event
                         .getDropTargetDetails();
                 Object idOver = details.getItemIdOver();
                 tree1.setParent(itemId, idOver);
@@ -190,7 +190,7 @@ public class DDTest2 extends TestBase {
 
         dropHandler = new DropHandler() {
             public void drop(DragAndDropEvent event) {
-                AbstractSelectDropTargetDetails details = (AbstractSelectDropTargetDetails) event
+                AbstractSelectTargetDetails details = (AbstractSelectTargetDetails) event
                         .getDropTargetDetails();
                 Transferable transferable = event.getTransferable();
 
index 7ee866afc40b31dbd075978fc48779b61bf41402..a3ed32e87b1547524cf9236075d472dc77e41d4a 100644 (file)
@@ -18,7 +18,7 @@ import com.vaadin.tests.util.TestUtils;
 import com.vaadin.ui.HorizontalLayout;
 import com.vaadin.ui.Table;
 import com.vaadin.ui.Window;
-import com.vaadin.ui.AbstractSelect.AbstractSelectDropTargetDetails;
+import com.vaadin.ui.AbstractSelect.AbstractSelectTargetDetails;
 
 public class DDTest4 extends TestBase {
 
@@ -70,7 +70,7 @@ public class DDTest4 extends TestBase {
             }
 
             public void drop(DragAndDropEvent dropEvent) {
-                AbstractSelectDropTargetDetails dropTargetData = (AbstractSelectDropTargetDetails) dropEvent
+                AbstractSelectTargetDetails dropTargetData = (AbstractSelectTargetDetails) dropEvent
                         .getDropTargetDetails();
                 DataBoundTransferable transferable = (DataBoundTransferable) dropEvent
                         .getTransferable();
index 475ee52a8774d54d1a9a06750c0ab53eff12418a..f0283276b9510bfb63741c17ebffa6e05c2937db 100644 (file)
@@ -47,7 +47,7 @@ import com.vaadin.ui.Window;
 import com.vaadin.ui.AbsoluteLayout.ComponentPosition;
 import com.vaadin.ui.DragAndDropWrapper.WrapperTransferable.Html5File;
 import com.vaadin.ui.Tree.TreeDragMode;
-import com.vaadin.ui.Tree.TreeDropTargetDetails;
+import com.vaadin.ui.Tree.TreeTargetDetails;
 import com.vaadin.ui.Upload.Receiver;
 
 public class DDTest6 extends TestBase {
@@ -110,7 +110,7 @@ public class DDTest6 extends TestBase {
             public void drop(DragAndDropEvent dropEvent) {
                 File file = null;
                 Folder folder = null;
-                TreeDropTargetDetails dropTargetData = (TreeDropTargetDetails) dropEvent
+                TreeTargetDetails dropTargetData = (TreeTargetDetails) dropEvent
                         .getDropTargetDetails();
                 folder = (Folder) dropTargetData.getItemIdInto();
                 if (dropEvent.getTransferable() instanceof DataBoundTransferable) {
@@ -369,7 +369,7 @@ public class DDTest6 extends TestBase {
                 MouseEventDetails mouseDownEvent = transferable
                         .getMouseDownEvent();
 
-                WrapperDropDetails dropTargetDetails = (WrapperDropDetails) dropEvent
+                WrapperTargetDetails dropTargetDetails = (WrapperTargetDetails) dropEvent
                         .getDropTargetDetails();
                 MouseEventDetails mouseEvent = dropTargetDetails
                         .getMouseEvent();
index f460447b173b0f59122571de88739af9bc3d6183..8178c4e535c6d92b8ac22e6bb3798ab07f4efe6f 100644 (file)
@@ -18,7 +18,7 @@ import com.vaadin.tests.util.TestUtils;
 import com.vaadin.ui.HorizontalLayout;
 import com.vaadin.ui.Table;
 import com.vaadin.ui.Window;
-import com.vaadin.ui.AbstractSelect.AbstractSelectDropTargetDetails;
+import com.vaadin.ui.AbstractSelect.AbstractSelectTargetDetails;
 
 public class DDTest7 extends TestBase {
 
@@ -100,7 +100,7 @@ public class DDTest7 extends TestBase {
             }
 
             public void drop(DragAndDropEvent dropEvent) {
-                AbstractSelectDropTargetDetails dropTargetData = (AbstractSelectDropTargetDetails) dropEvent
+                AbstractSelectTargetDetails dropTargetData = (AbstractSelectTargetDetails) dropEvent
                         .getDropTargetDetails();
                 DataBoundTransferable transferable = (DataBoundTransferable) dropEvent
                         .getTransferable();
index 26207ca499682f8998ec730f78318395a444f8ce..1a756998149146146baeaa97a1b635d48572a3fd 100644 (file)
@@ -15,7 +15,7 @@ import com.vaadin.tests.components.TestBase;
 import com.vaadin.ui.AbstractSelect;
 import com.vaadin.ui.Tree;
 import com.vaadin.ui.Tree.TreeDragMode;
-import com.vaadin.ui.Tree.TreeDropTargetDetails;
+import com.vaadin.ui.Tree.TreeTargetDetails;
 
 /**
  * DD playground. Better quality example/prototype codes in {@link DDTest2}.
@@ -112,7 +112,7 @@ public class DDTest8 extends TestBase {
             }
 
             public void drop(DragAndDropEvent event) {
-                TreeDropTargetDetails details = (TreeDropTargetDetails) event
+                TreeTargetDetails details = (TreeTargetDetails) event
                         .getDropTargetDetails();
                 // TODO set properties, so same sorter could be used in Table
                 Transferable transferable = event.getTransferable();
index 543f5bfa1d3896ac0f08a91e9575eaea5eb53604..5ff1aa92326cf9e034f079b798ac3405ac9adea4 100644 (file)
@@ -54,7 +54,7 @@ public class DragDropPane extends DragAndDropWrapper implements DropHandler {
 
     public void drop(DragAndDropEvent event) {
 
-        WrapperDropDetails ed = (WrapperDropDetails) event
+        WrapperTargetDetails ed = (WrapperTargetDetails) event
                 .getDropTargetDetails();
         Transferable ctr = event.getTransferable();
         // use "component" (from DragDropPane) if available, else take
index db21ea743f73bbaf81a506f827ef6c32bfe247de..dfc235e8a96000f2814855ed0a5e69d05404f872 100644 (file)
@@ -7,7 +7,7 @@ import com.vaadin.event.TransferableImpl;
 import com.vaadin.event.dd.DragAndDropEvent;
 import com.vaadin.event.dd.DropHandler;
 import com.vaadin.event.dd.DropTarget;
-import com.vaadin.event.dd.DropTargetDetails;
+import com.vaadin.event.dd.TargetDetails;
 import com.vaadin.event.dd.acceptcriteria.AcceptCriterion;
 import com.vaadin.event.dd.acceptcriteria.And;
 import com.vaadin.event.dd.acceptcriteria.TargetDetailIs;
@@ -69,7 +69,7 @@ public class HorizontalLayoutSortableWithWrappers extends Window {
                     Iterator<Component> componentIterator = layout
                             .getComponentIterator();
                     Component next = componentIterator.next();
-                    DropTargetDetails dropTargetData = dropEvent
+                    TargetDetails dropTargetData = dropEvent
                             .getDropTargetDetails();
                     DropTarget target = dropTargetData.getTarget();
                     while (next != target) {
index 521712490e7f5b8d0c47c95699102d4421f5c705..ec228a7990603553e3ecc54e38dd2c53d00175bc 100644 (file)
@@ -7,7 +7,7 @@ import com.vaadin.event.TransferableImpl;
 import com.vaadin.event.dd.DragAndDropEvent;
 import com.vaadin.event.dd.DropHandler;
 import com.vaadin.event.dd.DropTarget;
-import com.vaadin.event.dd.DropTargetDetails;
+import com.vaadin.event.dd.TargetDetails;
 import com.vaadin.event.dd.acceptcriteria.AcceptAll;
 import com.vaadin.event.dd.acceptcriteria.AcceptCriterion;
 import com.vaadin.ui.Component;
@@ -62,7 +62,7 @@ public class HorizontalSortableCssLayoutWithWrappers extends Window {
                     Iterator<Component> componentIterator = cssLayout
                             .getComponentIterator();
                     Component next = componentIterator.next();
-                    DropTargetDetails dropTargetData = dropEvent
+                    TargetDetails dropTargetData = dropEvent
                             .getDropTargetDetails();
                     DropTarget target = dropTargetData.getTarget();
                     while (next != target) {