aboutsummaryrefslogtreecommitdiff
path: root/libjava/java/awt/dnd
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2003-01-02 00:14:24 +0000
committerTom Tromey <tromey@gcc.gnu.org>2003-01-02 00:14:24 +0000
commit62d2eed656d2b664b21f128afbdc27720fb3939f (patch)
tree16e5e7e16e0e667ba0696007d49bc3344f03cb6c /libjava/java/awt/dnd
parent3c32ae1c35f838a0d4ef571656b5427ade5c861d (diff)
downloadgcc-62d2eed656d2b664b21f128afbdc27720fb3939f.zip
gcc-62d2eed656d2b664b21f128afbdc27720fb3939f.tar.gz
gcc-62d2eed656d2b664b21f128afbdc27720fb3939f.tar.bz2
Makefile.in: Rebuilt.
* Makefile.in: Rebuilt. * Makefile.am (rmi_java_source_files): Added RMIClassLoaderSpi. * java/awt/AlphaComposite.java, java/awt/BasicStroke.java, java/awt/BufferCapabilities.java, java/awt/Button.java, java/awt/CheckboxMenuItem.java, java/awt/Choice.java, java/awt/Container.java, java/awt/Cursor.java, java/awt/EventQueue.java, java/awt/FileDialog.java, java/awt/Graphics2D.java, java/awt/Label.java, java/awt/Menu.java, java/awt/MenuBar.java, java/awt/MenuComponent.java, java/awt/PopupMenu.java, java/awt/ScrollPane.java, java/awt/Scrollbar.java, java/awt/TextArea.java, java/awt/TextField.java, java/awt/color/CMMException.java, java/awt/color/ColorSpace.java, java/awt/color/ICC_Profile.java, java/awt/color/ProfileDataException.java, java/awt/datatransfer/Clipboard.java, java/awt/datatransfer/DataFlavor.java, java/awt/datatransfer/FlavorMap.java, java/awt/datatransfer/SystemFlavorMap.java, java/awt/dnd/DragGestureEvent.java, java/awt/dnd/DragGestureRecognizer.java, java/awt/dnd/DragSource.java, java/awt/dnd/DropTarget.java, java/awt/event/WindowEvent.java, java/awt/geom/PathIterator.java, java/awt/im/InputMethodHighlight.java, java/io/PipedOutputStream.java, java/io/PipedWriter.java, java/rmi/server/RMIClassLoader.java: Merged from Classpath. * gnu/awt/j2d/Graphics2DImpl.java (drawImage): Changed type of `op' to BufferedImageOp. From-SVN: r60768
Diffstat (limited to 'libjava/java/awt/dnd')
-rw-r--r--libjava/java/awt/dnd/DragGestureEvent.java27
-rw-r--r--libjava/java/awt/dnd/DragGestureRecognizer.java6
-rw-r--r--libjava/java/awt/dnd/DragSource.java46
-rw-r--r--libjava/java/awt/dnd/DropTarget.java9
4 files changed, 87 insertions, 1 deletions
diff --git a/libjava/java/awt/dnd/DragGestureEvent.java b/libjava/java/awt/dnd/DragGestureEvent.java
index 84fa1cb..3d26882 100644
--- a/libjava/java/awt/dnd/DragGestureEvent.java
+++ b/libjava/java/awt/dnd/DragGestureEvent.java
@@ -113,15 +113,42 @@ public class DragGestureEvent extends EventObject
{
return null;
}
+
+ /**
+ * Starts the drag given the initial Cursor to display, the Transferable
+ * object, and the DragSourceListener to use.
+ *
+ * @exception InvalidDnDOperationException If the Drag and Drop system is
+ * unable to initiate a drag operation, or if the user attempts to start
+ * a drag while an existing drag operation is still executing.
+ */
public void startDrag(Cursor dragCursor, Transferable trans)
{
startDrag(dragCursor, null, null, trans, null);
}
+
+ /**
+ * Starts the drag given the initial Cursor to display, the Transferable
+ * object, and the DragSourceListener to use.
+ *
+ * @exception InvalidDnDOperationException If the Drag and Drop system is
+ * unable to initiate a drag operation, or if the user attempts to start
+ * a drag while an existing drag operation is still executing.
+ */
public void startDrag(Cursor dragCursor, Transferable trans,
DragSourceListener l)
{
startDrag(dragCursor, null, null, trans, l);
}
+
+ /**
+ * Starts the drag given the initial Cursor to display, the Transferable
+ * object, and the DragSourceListener to use.
+ *
+ * @exception InvalidDnDOperationException If the Drag and Drop system is
+ * unable to initiate a drag operation, or if the user attempts to start
+ * a drag while an existing drag operation is still executing.
+ */
public void startDrag(Cursor dragCursor, Image dragImage, Point imageOffset,
Transferable trans, DragSourceListener l)
{
diff --git a/libjava/java/awt/dnd/DragGestureRecognizer.java b/libjava/java/awt/dnd/DragGestureRecognizer.java
index 674e26e..cd204b6 100644
--- a/libjava/java/awt/dnd/DragGestureRecognizer.java
+++ b/libjava/java/awt/dnd/DragGestureRecognizer.java
@@ -130,6 +130,12 @@ public abstract class DragGestureRecognizer implements Serializable
throw new Error("not implemented");
}
+ /**
+ * Register a new DragGestureListener.
+ *
+ * @exception TooManyListenersException If a DragGestureListener has already
+ * been added.
+ */
public void addDragGestureListener(DragGestureListener dgl)
throws TooManyListenersException
{
diff --git a/libjava/java/awt/dnd/DragSource.java b/libjava/java/awt/dnd/DragSource.java
index 01cae00..740235a 100644
--- a/libjava/java/awt/dnd/DragSource.java
+++ b/libjava/java/awt/dnd/DragSource.java
@@ -40,6 +40,8 @@ package java.awt.dnd;
import java.awt.Component;
import java.awt.Cursor;
+import java.awt.GraphicsEnvironment;
+import java.awt.HeadlessException;
import java.awt.Image;
import java.awt.Point;
import java.awt.datatransfer.FlavorMap;
@@ -62,10 +64,20 @@ public class DragSource implements Serializable
public static final Cursor DefaultMoveNoDrop = null;
public static final Cursor DefaultLinkNoDrop = null;
+ /**
+ * Initializes the drag source.
+ *
+ * @exception HeadlessException If GraphicsEnvironment.isHeadless() is true.
+ */
public DragSource()
{
+ if (GraphicsEnvironment.isHeadless())
+ throw new HeadlessException ();
}
+ /**
+ * @exception HeadlessException If GraphicsEnvironment.isHeadless() is true.
+ */
public static DragSource getDefaultDragSource()
{
return null;
@@ -76,6 +88,13 @@ public class DragSource implements Serializable
return false;
}
+ /**
+ * Start a drag, given the DragGestureEvent that initiated the drag.
+ *
+ * @exception InvalidDnDOperationException If the Drag and Drop system is
+ * unable to initiate a drag operation, or if the user attempts to start
+ * a drag while an existing drag operation is still executing.
+ */
public void startDrag(DragGestureEvent trigger, Cursor dragCursor,
Image dragImage, Point imageOffset,
Transferable trans, DragSourceListener dsl,
@@ -83,6 +102,13 @@ public class DragSource implements Serializable
{
}
+ /**
+ * Start a drag, given the DragGestureEvent that initiated the drag.
+ *
+ * @exception InvalidDnDOperationException If the Drag and Drop system is
+ * unable to initiate a drag operation, or if the user attempts to start
+ * a drag while an existing drag operation is still executing.
+ */
public void startDrag(DragGestureEvent trigger, Cursor dragCursor,
Transferable trans, DragSourceListener dsl,
FlavorMap map)
@@ -90,6 +116,13 @@ public class DragSource implements Serializable
startDrag(trigger, dragCursor, null, null, trans, dsl, map);
}
+ /**
+ * Start a drag, given the DragGestureEvent that initiated the drag.
+ *
+ * @exception InvalidDnDOperationException If the Drag and Drop system is
+ * unable to initiate a drag operation, or if the user attempts to start
+ * a drag while an existing drag operation is still executing.
+ */
public void startDrag(DragGestureEvent trigger, Cursor dragCursor,
Image dragImage, Point imageOffset,
Transferable trans, DragSourceListener dsl)
@@ -97,12 +130,25 @@ public class DragSource implements Serializable
startDrag(trigger, dragCursor, dragImage, imageOffset, trans, dsl, null);
}
+ /**
+ * Start a drag, given the DragGestureEvent that initiated the drag.
+ *
+ * @exception InvalidDnDOperationException If the Drag and Drop system is
+ * unable to initiate a drag operation, or if the user attempts to start
+ * a drag while an existing drag operation is still executing.
+ */
public void startDrag(DragGestureEvent trigger, Cursor dragCursor,
Transferable trans, DragSourceListener dsl)
{
startDrag(trigger, dragCursor, null, null, trans, dsl, null);
}
+ /**
+ * Creates the DragSourceContext to handle this drag.
+ *
+ * @exception IllegalArgumentException FIXME
+ * @exception NullPointerException If dscp, dgl, dragImage or t is null.
+ */
protected DragSourceContext
createDragSourceContext(DragSourceContextPeer peer, DragGestureEvent dge,
Cursor cursor, Image image, Point offset,
diff --git a/libjava/java/awt/dnd/DropTarget.java b/libjava/java/awt/dnd/DropTarget.java
index c469605..53c0917 100644
--- a/libjava/java/awt/dnd/DropTarget.java
+++ b/libjava/java/awt/dnd/DropTarget.java
@@ -42,10 +42,13 @@ import java.awt.Component;
import java.awt.datatransfer.FlavorMap;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
+import java.io.Serializable;
+import java.util.EventListener;
import java.util.TooManyListenersException;
/** STUB CLASS ONLY */
public class DropTarget
+ implements DropTargetListener, EventListener, Serializable
{
protected static class DropTargetAutoScroller
implements ActionListener
@@ -67,6 +70,9 @@ public class DropTarget
}
}
+ // FIXME: check the correctness of default value.
+ private boolean isActive = false;
+
/**
* FIXME
*
@@ -133,11 +139,12 @@ public class DropTarget
public void setActive(boolean isActive)
{
+ this.isActive = isActive;
}
public boolean isActive()
{
- return false;
+ return this.isActive;
}
/**