aboutsummaryrefslogtreecommitdiff
path: root/libjava/java/awt/dnd/DropTargetContext.java
diff options
context:
space:
mode:
authorMichael Koch <konqueror@gmx.de>2003-03-02 14:24:48 +0000
committerMichael Koch <mkoch@gcc.gnu.org>2003-03-02 14:24:48 +0000
commitb4822ade387234e8ee361ed9b69ab399f12afa04 (patch)
tree43e0188013ec61445b1395a9275af27bbb9149b4 /libjava/java/awt/dnd/DropTargetContext.java
parent8a035a6bf6c79874f0d3f57152562979d0e222f6 (diff)
downloadgcc-b4822ade387234e8ee361ed9b69ab399f12afa04.zip
gcc-b4822ade387234e8ee361ed9b69ab399f12afa04.tar.gz
gcc-b4822ade387234e8ee361ed9b69ab399f12afa04.tar.bz2
DnDEventMulticaster.java: New file.
2003-03-02 Michael Koch <konqueror@gmx.de> * java/awt/dnd/DnDEventMulticaster.java: New file. * java/awt/dnd/DragSource.java (flavorMap): New member variable. (dragSourceListener): New member variable. (dragSourceMotionListener): New member variable. (getFlavorMap): Implemented. (createDragGestureRecognizer): Implemented. (addDragSourceListener): Implemented. (removeDragSourceListener): Implemented. (getDragSourceListeners): Implemented. (addDragSourceMotionListener): Implemented. (removeDragSourceMotionListener): Implemented. (getDragSourceMotionListeners): Implemented. (getListeners): Implemented. * java/awt/dnd/DragSourceContext.java (peer): New member variable. (cursor): New member variable. (transferable): New member variable. (trigger): New member variable. (dragSourceListener): New member variable. (image): New member variable. (offset): New member variable. (DragSourceContext): Implemented. (getDragSource): Implemented. (getComponent): Implemented. (getTrigger): Implemented. (getSourceActions): Implemented. (setCursor): Implemented. (getCursor): Implemented. (addDragSourceListener): Implemented. (removeDragSourceListener): Implemented. (getTransferable): Implemented. * java/awt/dnd/DropTarget.java (DropTargetAutoScroller.component): New member variable. (DropTargetAutoScroller.point): New member variable. (DropTargetAutoScroller.DropTargetAutoScroller): Implemented. (DropTargetAutoScroller.updateLocation): Implemented. (active): Renamed from isActive, defaults to true now. (component): New member variable. (flavorMap): New member variable. (actions): New member variable. (dropTargetContext): New member variable. (dropTargetListener): New member variable. (DropTarget): Implemented. (getComponent): Implemented. (setComponent): Implemented. (setDefaultActions): Implemented. (getDefaultActions): Implemented. (setActive): Use active instead of isActive. (isActive): Use active instead of isActive. (addDropTargetListener): Implemented. (removeDropTargetListener): Implemented. (getFlavorMap): Implemented. (setFlavorMap): Implemented. (getDropTargetContext): Implemented. (createDropTargetContext): Implemented. (createDropTargetAutoScroller): Implemented. * java/awt/dnd/DropTargetContext.java (TransferableProxy.getTransferDataFlavors): Implemented. (TransferableProxy.isDataFlavorSupported): Implemented. (TransferableProxy.getTransferData): Implemented. (dropTarget): New member variable. (dtcp): New member variable. (DropTargetContext): New package private constructor. (getDropTarget): Implemented. (getComponent): Implemented. (addNotify): Implemented. (removeNotify): Implemented. (getCurrentDataFlavorsAsList): Implemented. (isDataFlavorSupported): Implemented. * java/awt/dnd/MouseDragGestureRecognizer.java (registerListeners): Implemented. (unregisterListeners): Implemented. * Makefile.am (awt_java_source_files): Added java/awt/dnd/DnDEventMulticaster.java. * Makefile.in: Regenerated. From-SVN: r63665
Diffstat (limited to 'libjava/java/awt/dnd/DropTargetContext.java')
-rw-r--r--libjava/java/awt/dnd/DropTargetContext.java33
1 files changed, 17 insertions, 16 deletions
diff --git a/libjava/java/awt/dnd/DropTargetContext.java b/libjava/java/awt/dnd/DropTargetContext.java
index eca2f6e..4fc1a44 100644
--- a/libjava/java/awt/dnd/DropTargetContext.java
+++ b/libjava/java/awt/dnd/DropTargetContext.java
@@ -67,46 +67,49 @@ public class DropTargetContext implements Serializable
public DataFlavor[] getTransferDataFlavors ()
{
- // FIXME: implement this
- return null;
+ return transferable.getTransferDataFlavors ();
}
public boolean isDataFlavorSupported (DataFlavor flavor)
{
- // FIXME: implement this
- return false;
+ return transferable.isDataFlavorSupported (flavor);
}
public Object getTransferData (DataFlavor flavor)
throws UnsupportedFlavorException, IOException
{
- // FIXME: implement this
- return null;
+ return transferable.getTransferData (flavor);
}
}
+ private DropTarget dropTarget;
private int targetActions;
+ private java.awt.dnd.peer.DropTargetContextPeer dtcp;
+
+ // package private
+ DropTargetContext (DropTarget dropTarget)
+ {
+ this.dropTarget = dropTarget;
+ }
public DropTarget getDropTarget ()
{
- // FIXME: implement this
- return null;
+ return dropTarget;
}
public Component getComponent ()
{
- // FIXME: implement this
- return null;
+ return dropTarget.getComponent ();
}
public void addNotify (java.awt.dnd.peer.DropTargetContextPeer dtcp)
{
- // FIXME: implement this
+ this.dtcp = dtcp;
}
public void removeNotify ()
{
- // FIXME: implement this
+ this.dtcp = null;
}
protected void setTargetActions (int actions)
@@ -157,14 +160,12 @@ public class DropTargetContext implements Serializable
protected List getCurrentDataFlavorsAsList ()
{
- // FIXME: implement this
- return null;
+ return Arrays.asList (getCurrentDataFlavors ());
}
protected boolean isDataFlavorSupported (DataFlavor flavor)
{
- // FIXME: implement this
- return false;
+ return getCurrentDataFlavorsAsList ().contains (flavor);
}
/**