aboutsummaryrefslogtreecommitdiff
path: root/libjava
diff options
context:
space:
mode:
authorMichael Koch <konqueror@gmx.de>2002-10-03 14:40:43 +0000
committerMichael Koch <mkoch@gcc.gnu.org>2002-10-03 14:40:43 +0000
commite37383993dd7fdd71cbb33b84898bdde368c35af (patch)
tree97606a77a4158cc8724b7910bf112687a1d71b4d /libjava
parenta8e8f5c359b655106f4d59afc99315d0bb420040 (diff)
downloadgcc-e37383993dd7fdd71cbb33b84898bdde368c35af.zip
gcc-e37383993dd7fdd71cbb33b84898bdde368c35af.tar.gz
gcc-e37383993dd7fdd71cbb33b84898bdde368c35af.tar.bz2
Autoscroll.java: New file, merge from Classpath.
2002-10-03 Michael Koch <konqueror@gmx.de> * java/awt/dnd/Autoscroll.java: New file, merge from Classpath. * java/awt/dnd/DragSourceAdapter.java: (dragExit): Fixed typos in argument type. (dragDropEnd): Fixed typos in argument type. * java/awt/dnd/DragSourceDropEvent.java: New file, merge from Classpath. * java/awt/dnd/DropTarget.java: Added stubs, merge from Classpath. * java/awt/dnd/DropTargetAdapter.java: New file, merge from Classpath. * java/awt/dnd/DropTargetContext.java: New file, merge from Classpath. * java/awt/dnd/DropTargetDragEvent.java: New file, merge from Classpath. * java/awt/dnd/DropTargetDropEvent.java: New file, merge from Classpath. * java/awt/dnd/DropTargetEvent.java: New file, merge from Classpath. * java/awt/dnd/DropTargetListener.java: New file, merge from Classpath. * java/awt/dnd/MouseDragGestureRecognizer.java: New file, merge from Classpath. * java/awt/dnd/peer/DropTargetContextPeer.java: New file, merge from Classpath. From-SVN: r57777
Diffstat (limited to 'libjava')
-rw-r--r--libjava/ChangeLog28
-rw-r--r--libjava/java/awt/dnd/Autoscroll.java67
-rw-r--r--libjava/java/awt/dnd/DragSourceAdapter.java4
-rw-r--r--libjava/java/awt/dnd/DragSourceDropEvent.java84
-rw-r--r--libjava/java/awt/dnd/DropTarget.java182
-rw-r--r--libjava/java/awt/dnd/DropTargetAdapter.java100
-rw-r--r--libjava/java/awt/dnd/DropTargetContext.java174
-rw-r--r--libjava/java/awt/dnd/DropTargetDragEvent.java107
-rw-r--r--libjava/java/awt/dnd/DropTargetDropEvent.java132
-rw-r--r--libjava/java/awt/dnd/DropTargetEvent.java56
-rw-r--r--libjava/java/awt/dnd/DropTargetListener.java89
-rw-r--r--libjava/java/awt/dnd/MouseDragGestureRecognizer.java118
-rw-r--r--libjava/java/awt/dnd/peer/DropTargetContextPeer.java45
13 files changed, 1182 insertions, 4 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog
index 61b0915..1beed9e 100644
--- a/libjava/ChangeLog
+++ b/libjava/ChangeLog
@@ -1,5 +1,33 @@
2002-10-03 Michael Koch <konqueror@gmx.de>
+ * java/awt/dnd/Autoscroll.java:
+ New file, merge from Classpath.
+ * java/awt/dnd/DragSourceAdapter.java:
+ (dragExit): Fixed typos in argument type.
+ (dragDropEnd): Fixed typos in argument type.
+ * java/awt/dnd/DragSourceDropEvent.java:
+ New file, merge from Classpath.
+ * java/awt/dnd/DropTarget.java:
+ Added stubs, merge from Classpath.
+ * java/awt/dnd/DropTargetAdapter.java:
+ New file, merge from Classpath.
+ * java/awt/dnd/DropTargetContext.java:
+ New file, merge from Classpath.
+ * java/awt/dnd/DropTargetDragEvent.java:
+ New file, merge from Classpath.
+ * java/awt/dnd/DropTargetDropEvent.java:
+ New file, merge from Classpath.
+ * java/awt/dnd/DropTargetEvent.java:
+ New file, merge from Classpath.
+ * java/awt/dnd/DropTargetListener.java:
+ New file, merge from Classpath.
+ * java/awt/dnd/MouseDragGestureRecognizer.java:
+ New file, merge from Classpath.
+ * java/awt/dnd/peer/DropTargetContextPeer.java:
+ New file, merge from Classpath.
+
+2002-10-03 Michael Koch <konqueror@gmx.de>
+
* java/net/DatagramPacket.java
(setLength): Fixed typo and be HTML-aware.
* java/net/InetSocketAddress.java
diff --git a/libjava/java/awt/dnd/Autoscroll.java b/libjava/java/awt/dnd/Autoscroll.java
new file mode 100644
index 0000000..e7d3e28
--- /dev/null
+++ b/libjava/java/awt/dnd/Autoscroll.java
@@ -0,0 +1,67 @@
+/* Autoscroll.java --
+ Copyright (C) 2002 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+package java.awt.dnd;
+
+import java.awt.Point;
+import java.awt.Insets;
+
+/**
+ * During DnD operations it is possible that a user may wish to drop the
+ * subject of the operation on a region of a scrollable GUI control that
+ * is not currently visible to the user.
+ *
+ * @author Michael Koch <konqueror@gmx.de>
+ * @since 1.2
+ * @status updated to 1.4
+ */
+public interface Autoscroll
+{
+ /**
+ * This method returns the Insets describing the autoscrolling region or
+ * border relative to the geometry of the implementing Component
+ */
+ public Insets getAutoscrollInsets ();
+
+ /**
+ * Notify the Component to autoscroll
+ *
+ * @param location A Point indicating the location of the cursor that
+ * triggered this operation
+ */
+ public void autoscroll (Point location);
+} // interface Autoscroll
diff --git a/libjava/java/awt/dnd/DragSourceAdapter.java b/libjava/java/awt/dnd/DragSourceAdapter.java
index 55daf41..2b2e155 100644
--- a/libjava/java/awt/dnd/DragSourceAdapter.java
+++ b/libjava/java/awt/dnd/DragSourceAdapter.java
@@ -108,7 +108,7 @@ public abstract class DragSourceAdapter
*
* @param e the event
*/
- public void dragExit(DragSourceDragEvent e)
+ public void dragExit(DragSourceEvent e)
{
}
@@ -120,7 +120,7 @@ public abstract class DragSourceAdapter
*
* @param e the event
*/
- public void dragDropEnd(DragSourceDragEvent e)
+ public void dragDropEnd(DragSourceDropEvent e)
{
}
} // class DragSourceAdapter
diff --git a/libjava/java/awt/dnd/DragSourceDropEvent.java b/libjava/java/awt/dnd/DragSourceDropEvent.java
new file mode 100644
index 0000000..4b70d1b
--- /dev/null
+++ b/libjava/java/awt/dnd/DragSourceDropEvent.java
@@ -0,0 +1,84 @@
+/* DragSourceDragEvent.java --
+ Copyright (C) 2002 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+package java.awt.dnd;
+
+/**
+ * @author Michael Koch <konqueror@gmx.de>
+ * @since 1.2
+ *
+ * Written using JDK 1.4.1 Online API
+ * Status: JDK 1.4 complete
+ */
+public class DragSourceDropEvent extends DragSourceEvent
+{
+ private final int dropAction;
+ private final boolean success;
+
+ public DragSourceDropEvent (DragSourceContext context)
+ {
+ super (context);
+ this.dropAction = 0;
+ this.success = false;
+ }
+
+ public DragSourceDropEvent (DragSourceContext context, int dropAction,
+ boolean success)
+ {
+ super (context);
+ this.dropAction = dropAction;
+ this.success = success;
+ }
+
+ public DragSourceDropEvent (DragSourceContext context, int dropAction,
+ boolean success, int x, int y)
+ {
+ super (context, x, y);
+ this.dropAction = dropAction;
+ this.success = success;
+ }
+
+ public int getDropAction()
+ {
+ return dropAction & ((DragSourceContext) source).getSourceActions();
+ }
+
+ public boolean getDropSuccess()
+ {
+ return success;
+ }
+} // class DragSourceDropEvent
diff --git a/libjava/java/awt/dnd/DropTarget.java b/libjava/java/awt/dnd/DropTarget.java
index 9ae4234..9d81745 100644
--- a/libjava/java/awt/dnd/DropTarget.java
+++ b/libjava/java/awt/dnd/DropTarget.java
@@ -36,5 +36,183 @@ obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
package java.awt.dnd;
-/** STUB CLASS ONLY */
-public class DropTarget {}
+
+import java.awt.Point;
+import java.awt.Component;
+import java.awt.datatransfer.FlavorMap;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.util.TooManyListenersException;
+
+public class DropTarget
+{
+ protected static class DropTargetAutoScroller
+ implements ActionListener
+ {
+ protected DropTargetAutoScroller (Component c, Point p)
+ {
+ }
+
+ protected void updateLocation (Point newLocn)
+ {
+ }
+
+ protected void stop ()
+ {
+ }
+
+ public void actionPerformed (ActionEvent e)
+ {
+ }
+ }
+
+ /**
+ * FIXME
+ *
+ * @exception HeadlessException FIXME
+ */
+ public DropTarget ()
+ {
+ }
+
+ /**
+ * FIXME
+ *
+ * @exception HeadlessException FIXME
+ */
+ public DropTarget (Component c, DropTargetListener dtl)
+ {
+ }
+
+ /**
+ * FIXME
+ *
+ * @exception HeadlessException FIXME
+ */
+ public DropTarget (Component c, int i, DropTargetListener dtl)
+ {
+ }
+
+ /**
+ * FIXME
+ *
+ * @exception HeadlessException FIXME
+ */
+ public DropTarget (Component c, int i, DropTargetListener dtl, boolean b)
+ {
+ }
+
+ /**
+ * FIXME
+ *
+ * @exception HeadlessException FIXME
+ */
+ public DropTarget (Component c, int i, DropTargetListener dtl, boolean b,
+ FlavorMap fm)
+ {
+ }
+
+ public void setComponent (Component c)
+ {
+ }
+
+ public Component getComponent ()
+ {
+ return null;
+ }
+
+ public void setDefaultActions (int ops)
+ {
+ }
+
+ public int getDefaultActions ()
+ {
+ return 0;
+ }
+
+ public void setActive(boolean isActive)
+ {
+ }
+
+ public boolean isActive()
+ {
+ return false;
+ }
+
+ /**
+ * @exception TooManyListenersException FIXME
+ */
+ public void addDropTargetListener (DropTargetListener dtl)
+ throws TooManyListenersException
+ {
+ }
+
+ public void removeDropTargetListener(DropTargetListener dtl)
+ {
+ }
+
+ public void dragEnter(DropTargetDragEvent dtde)
+ {
+ }
+
+ public void dragOver(DropTargetDragEvent dtde)
+ {
+ }
+
+ public void dropActionChanged(DropTargetDragEvent dtde)
+ {
+ }
+
+ public void dragExit(DropTargetEvent dte)
+ {
+ }
+
+ public void drop(DropTargetDropEvent dtde)
+ {
+ }
+
+ public FlavorMap getFlavorMap()
+ {
+ return null;
+ }
+
+ public void setFlavorMap(FlavorMap fm)
+ {
+ }
+
+ public void addNotify(java.awt.peer.ComponentPeer peer)
+ {
+ }
+
+ public void removeNotify(java.awt.peer.ComponentPeer peer)
+ {
+ }
+
+ public DropTargetContext getDropTargetContext()
+ {
+ return null;
+ }
+
+ protected DropTargetContext createDropTargetContext()
+ {
+ return null;
+ }
+
+ protected DropTarget.DropTargetAutoScroller createDropTargetAutoScroller
+ (Component c, Point p)
+ {
+ return null;
+ }
+
+ protected void initializeAutoscrolling(Point p)
+ {
+ }
+
+ protected void updateAutoscroll(Point dragCursorLocn)
+ {
+ }
+
+ protected void clearAutoscroll()
+ {
+ }
+} // class DropTarget
diff --git a/libjava/java/awt/dnd/DropTargetAdapter.java b/libjava/java/awt/dnd/DropTargetAdapter.java
new file mode 100644
index 0000000..4ece882
--- /dev/null
+++ b/libjava/java/awt/dnd/DropTargetAdapter.java
@@ -0,0 +1,100 @@
+/* DragSourceAdapter.java -- drag-and-drop listener adapter
+ Copyright (C) 2002 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+package java.awt.dnd;
+
+/**
+ * This class implements <code>DropTargetListener</code>, and implements all methods
+ * with empty bodies. This allows a listener interested in implementing only
+ * a subset of these interfaces to extend this class and override only the
+ * desired methods.
+ *
+ * @author Michael Koch <konqueror@gmx.de>
+ * @since 1.4
+ * @status updated to 1.4
+ */
+public abstract class DropTargetAdapter
+ implements DropTargetListener
+{
+ /**
+ * Default constructor.
+ */
+ public DropTargetAdapter()
+ {
+ }
+
+ /**
+ * Called when the cursor hotspot enters a drop site which will accept the
+ * drag.
+ *
+ * @param e the event
+ */
+ public void dragEnter (DropTargetDragEvent e)
+ {
+ }
+
+ /**
+ * Called when the cursor hotspot moves inside of a drop site which will
+ * accept the drag.
+ *
+ * @param e the event
+ */
+ public void dragOver (DropTargetDragEvent e)
+ {
+ }
+
+ /**
+ * Called when the user modifies the drop gesture. This is often the case
+ * when additional mouse or key events are received during the drag.
+ *
+ * @param e the event
+ */
+ public void dropActionChanged (DropTargetDragEvent e)
+ {
+ }
+
+ /**
+ * Called when the cursor hotspot moves outside of a drop site which will
+ * accept the drag. This could also happen if the drop site is no longer
+ * active, or no longer accepts the drag.
+ *
+ * @param e the event
+ */
+ public void dragExit(DropTargetEvent e)
+ {
+ }
+} // class DropTargetAdapter
diff --git a/libjava/java/awt/dnd/DropTargetContext.java b/libjava/java/awt/dnd/DropTargetContext.java
new file mode 100644
index 0000000..255ab84
--- /dev/null
+++ b/libjava/java/awt/dnd/DropTargetContext.java
@@ -0,0 +1,174 @@
+/* DropTargetContext.java --
+ Copyright (C) 2002 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+package java.awt.dnd;
+
+import java.awt.dnd.peer.DropTargetContextPeer;
+import java.io.Serializable;
+import java.io.IOException;
+import java.awt.Component;
+import java.awt.datatransfer.DataFlavor;
+import java.awt.datatransfer.Transferable;
+import java.awt.datatransfer.UnsupportedFlavorException;
+import java.util.List;
+
+public class DropTargetContext implements Serializable
+{
+ protected class TransferableProxy implements Transferable
+ {
+ protected boolean isLocal;
+ protected Transferable transferable;
+
+ public DataFlavor[] getTransferDataFlavors ()
+ {
+ // FIXME: implement this
+ return null;
+ }
+
+ public boolean isDataFlavorSupported (DataFlavor flavor)
+ {
+ // FIXME: implement this
+ return false;
+ }
+
+ public Object getTransferData (DataFlavor flavor)
+ throws UnsupportedFlavorException, IOException
+ {
+ // FIXME: implement this
+ return null;
+ }
+ }
+
+ private int targetActions;
+
+ public DropTarget getDropTarget ()
+ {
+ // FIXME: implement this
+ return null;
+ }
+
+ public Component getComponent ()
+ {
+ // FIXME: implement this
+ return null;
+ }
+
+ public void addNotify (java.awt.dnd.peer.DropTargetContextPeer dtcp)
+ {
+ // FIXME: implement this
+ }
+
+ public void removeNotify ()
+ {
+ // FIXME: implement this
+ }
+
+ protected void setTargetActions (int actions)
+ {
+ targetActions = actions;
+ }
+
+ protected int getTargetActions()
+ {
+ return targetActions;
+ }
+
+ /**
+ * FIXME
+ *
+ * @exception InvalidDnDOperationException FIXME
+ */
+ public void dropComplete (boolean success)
+ {
+ // FIXME: implement this
+ }
+
+ protected void acceptDrag (int dragOperation)
+ {
+ // FIXME: implement this
+ }
+
+ protected void rejectDrag ()
+ {
+ // FIXME: implement this
+ }
+
+ protected void acceptDrop (int dropOperation)
+ {
+ // FIXME: implement this
+ }
+
+ protected void rejectDrop ()
+ {
+ // FIXME: implement this
+ }
+
+ protected DataFlavor[] getCurrentDataFlavors ()
+ {
+ // FIXME: implement this
+ return null;
+ }
+
+ protected List getCurrentDataFlavorsAsList ()
+ {
+ // FIXME: implement this
+ return null;
+ }
+
+ protected boolean isDataFlavorSupported (DataFlavor flavor)
+ {
+ // FIXME: implement this
+ return false;
+ }
+
+ /**
+ * FIXME
+ *
+ * @exception InvalidDnDOperationException FIXME
+ */
+ protected Transferable getTransferable() throws InvalidDnDOperationException
+ {
+ // FIXME: implement this
+ return null;
+ }
+
+ protected Transferable createTransferableProxy(Transferable t, boolean local)
+ {
+ // FIXME: implement this
+ return null;
+ }
+} // class DropTargetContext
diff --git a/libjava/java/awt/dnd/DropTargetDragEvent.java b/libjava/java/awt/dnd/DropTargetDragEvent.java
new file mode 100644
index 0000000..a22ddc8
--- /dev/null
+++ b/libjava/java/awt/dnd/DropTargetDragEvent.java
@@ -0,0 +1,107 @@
+/* DropTargetDragEvent.java --
+ Copyright (C) 2002 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+package java.awt.dnd;
+
+import java.util.List;
+import java.awt.Point;
+import java.awt.datatransfer.DataFlavor;
+
+public class DropTargetDragEvent extends DropTargetEvent
+{
+ private final int dropAction;
+ private final int srcActions;
+ private final Point location;
+
+ /**
+ * FIXME
+ *
+ * @exception NullPointerException FIXME
+ */
+ public DropTargetDragEvent (DropTargetContext context, Point location,
+ int dropAction, int srcActions)
+ {
+ super (context);
+ this.dropAction = dropAction;
+ this.srcActions = srcActions;
+ this.location = location;
+ }
+
+ public void acceptDrag (int dragOperation)
+ {
+ // FIXME: implement this
+ }
+
+ public DataFlavor[] getCurrentDataFlavors ()
+ {
+ // FIXME: implement this
+ return null;
+ }
+
+ public List getCurrentDataFlavorsAsList ()
+ {
+ // FIXME: implement this
+ return null;
+ }
+
+ public int getDropAction()
+ {
+ return 0;
+ //return dropAction & ((DropTargetContext) source).getTargetActions();
+ }
+
+ public Point getLocation ()
+ {
+ return location;
+ }
+
+ public int getSourceActions ()
+ {
+ return srcActions;
+ }
+
+ public boolean isDataFlavorSupported (DataFlavor df)
+ {
+ // FIXME: implement this
+ return true;
+ }
+
+ public void rejectDrag ()
+ {
+ // FIXME: implement this
+ }
+} // class DropTargetDragEvent
diff --git a/libjava/java/awt/dnd/DropTargetDropEvent.java b/libjava/java/awt/dnd/DropTargetDropEvent.java
new file mode 100644
index 0000000..9a14f22
--- /dev/null
+++ b/libjava/java/awt/dnd/DropTargetDropEvent.java
@@ -0,0 +1,132 @@
+/* DropTargetDropEvent.java --
+ Copyright (C) 2002 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+package java.awt.dnd;
+
+import java.awt.Point;
+import java.awt.datatransfer.DataFlavor;
+import java.awt.datatransfer.Transferable;
+import java.util.List;
+
+public class DropTargetDropEvent extends DropTargetEvent
+{
+ private final int dropAction;
+ private final int srcActions;
+ private final Point location;
+ private final boolean isLocal;
+
+ public DropTargetDropEvent (DropTargetContext dtc, Point location,
+ int dropAction, int srcActions)
+ {
+ super (dtc);
+ this.dropAction = dropAction;
+ this.srcActions = srcActions;
+ this.location = location;
+ this.isLocal = false;
+ }
+
+ public DropTargetDropEvent (DropTargetContext dtc, Point location,
+ int dropAction, int srcActions, boolean isLocal)
+ {
+ super (dtc);
+ this.dropAction = dropAction;
+ this.srcActions = srcActions;
+ this.location = location;
+ this.isLocal = isLocal;
+ }
+
+ public Point getLocation ()
+ {
+ return location;
+ }
+
+ public DataFlavor[] getCurrentDataFlavors ()
+ {
+ // FIXME: implement this
+ return null;
+ }
+
+ public List getCurrentDataFlavorsAsList ()
+ {
+ // FIXME: implement this
+ return null;
+ }
+
+ public boolean isDataFlavorSupported (DataFlavor flavor)
+ {
+ // FIXME: implement this
+ return false;
+ }
+
+ public int getSourceActions ()
+ {
+ // FIXME: implement this
+ return 0;
+ }
+
+ public int getDropAction ()
+ {
+ // FIXME: implement this
+ return 0;
+ }
+
+ public Transferable getTransferable ()
+ {
+ // FIXME: implement this
+ return null;
+ }
+
+ public void acceptDrop (int dropAction)
+ {
+ // FIXME: implement this
+ }
+
+ public void rejectDrop ()
+ {
+ // FIXME: implement this
+ }
+
+ public void dropComplete (boolean success)
+ {
+ // FIXME: implement this
+ }
+
+ public boolean isLocalTransfer()
+ {
+ return isLocal;
+ }
+} // class DropTargetDropEvent
diff --git a/libjava/java/awt/dnd/DropTargetEvent.java b/libjava/java/awt/dnd/DropTargetEvent.java
new file mode 100644
index 0000000..3065c2b
--- /dev/null
+++ b/libjava/java/awt/dnd/DropTargetEvent.java
@@ -0,0 +1,56 @@
+/* DropTarget.java --
+ Copyright (C) 2002 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+package java.awt.dnd;
+
+import java.util.EventObject;
+
+public class DropTargetEvent extends EventObject
+{
+ protected DropTargetContext context;
+
+ public DropTargetEvent (DropTargetContext context)
+ {
+ super (context);
+ this.context = context;
+ }
+
+ public DropTargetContext getDropTargetContext ()
+ {
+ return context;
+ }
+}
diff --git a/libjava/java/awt/dnd/DropTargetListener.java b/libjava/java/awt/dnd/DropTargetListener.java
new file mode 100644
index 0000000..861aa89
--- /dev/null
+++ b/libjava/java/awt/dnd/DropTargetListener.java
@@ -0,0 +1,89 @@
+/* DropTargetListener.java -- listen to events during the drop
+ Copyright (C) 2002 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package java.awt.dnd;
+
+import java.util.EventListener;
+
+/**
+ * @author Michael Koch <konqueror@gmx.de>
+ * @since 1.2
+ * @status updated to 1.4
+ */
+public interface DropTargetListener extends EventListener
+{
+ /**
+ * Called when the cursor hotspot enters a drop site which will accept the
+ * drag.
+ *
+ * @param e the drag source drag event
+ */
+ void dragEnter (DropTargetDragEvent e);
+
+ /**
+ * Called when the cursor hotspot moves inside of a drop site which will
+ * accept the drag.
+ *
+ * @param e the drag source drag event
+ */
+ void dragOver (DropTargetDragEvent e);
+
+ /**
+ * Called when the user modifies the drop gesture. This is often the case
+ * when additional mouse or key events are received during the drag.
+ *
+ * @param e the drag source drag event
+ */
+ void dropActionChanged (DropTargetDragEvent e);
+
+ /**
+ * Called when the cursor hotspot moves outside of a drop site which will
+ * accept the drag. This could also happen if the drop site is no longer
+ * active, or no longer accepts the drag.
+ *
+ * @param e the drag source drag event
+ */
+ void dragExit (DropTargetEvent e);
+
+ /**
+ * FIXME
+ *
+ * @param e the drag source drag event
+ */
+ void drop (DropTargetDropEvent e);
+} // interface DropTargetListener
diff --git a/libjava/java/awt/dnd/MouseDragGestureRecognizer.java b/libjava/java/awt/dnd/MouseDragGestureRecognizer.java
new file mode 100644
index 0000000..1ef2e6c
--- /dev/null
+++ b/libjava/java/awt/dnd/MouseDragGestureRecognizer.java
@@ -0,0 +1,118 @@
+/* MouseDragGestureRecognizer.java --
+ Copyright (C) 2002 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+package java.awt.dnd;
+
+import java.awt.Component;
+import java.awt.event.MouseEvent;
+import java.awt.event.MouseListener;
+import java.awt.event.MouseMotionListener;
+
+/**
+ * @author Michael Koch <konqueror@gmx.de>
+ */
+
+public abstract class MouseDragGestureRecognizer
+ extends DragGestureRecognizer
+ implements MouseListener, MouseMotionListener
+{
+ protected MouseDragGestureRecognizer (DragSource ds, Component c, int act,
+ DragGestureListener dgl)
+ {
+ super (ds, c, act, dgl);
+ }
+
+ protected MouseDragGestureRecognizer (DragSource ds, Component c, int act)
+ {
+ super (ds, c, act);
+ }
+
+ protected MouseDragGestureRecognizer (DragSource ds, Component c)
+ {
+ super (ds, c);
+ }
+
+ protected MouseDragGestureRecognizer (DragSource ds)
+ {
+ super (ds);
+ }
+
+ protected void registerListeners ()
+ {
+ // FIXME: implement this
+ }
+
+ protected void unregisterListeners ()
+ {
+ // FIXME: implement this
+ }
+
+ public void mouseClicked (MouseEvent e)
+ {
+ // FIXME: implement this
+ }
+
+ public void mousePressed (MouseEvent e)
+ {
+ // FIXME: implement this
+ }
+
+ public void mouseReleased (MouseEvent e)
+ {
+ // FIXME: implement this
+ }
+
+ public void mouseEntered (MouseEvent e)
+ {
+ // FIXME: implement this
+ }
+
+ public void mouseExited (MouseEvent e)
+ {
+ // FIXME: implement this
+ }
+
+ public void mouseDragged (MouseEvent e)
+ {
+ // FIXME: implement this
+ }
+
+ public void mouseMoved (MouseEvent e)
+ {
+ // FIXME: implement this
+ }
+} // class MouseDragGestureRecognizer
diff --git a/libjava/java/awt/dnd/peer/DropTargetContextPeer.java b/libjava/java/awt/dnd/peer/DropTargetContextPeer.java
new file mode 100644
index 0000000..ad166d9
--- /dev/null
+++ b/libjava/java/awt/dnd/peer/DropTargetContextPeer.java
@@ -0,0 +1,45 @@
+/* DropTargetContextPeer.java -- interface for drag-and-drop peers
+ Copyright (C) 2002 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+package java.awt.dnd.peer;
+
+/**
+ * @author Michael Koch <konqueror@gmx.de>
+ */
+public interface DropTargetContextPeer
+{
+} // interface DropTargetContextPeer