[cp-patches] FYI: More stub methods in java.awt.*

David Gilbert david.gilbert at object-refinery.com
Fri Jun 9 13:14:16 UTC 2006


This patch (committed) marks some stubs in java.awt.*:

2006-06-09  David Gilbert  <david.gilbert at object-refinery.com>

	* java/awt/datatransfer/DataFlavor.java
	(readExternal): Mark as stub,
	(writeExternal): Likewise,
	* java/awt/dnd/DropTargetContext.java
	(dropComplete): Mark as stub,
	(acceptDrag): Likewise,
	(rejectDrag): Likewise,
	(acceptDrop): Likewise,
	(rejectDrop): Likewise,
	(getCurrentDataFlavors): Likewise,
	(getTransferable): Likewise,
	* java/awt/dnd/DropTargetDropEvent.java
	(dropComplete): Mark as stub.

Regards,

Dave
-------------- next part --------------
Index: java/awt/datatransfer/DataFlavor.java
===================================================================
RCS file: /sources/classpath/classpath/java/awt/datatransfer/DataFlavor.java,v
retrieving revision 1.29
diff -u -r1.29 DataFlavor.java
--- java/awt/datatransfer/DataFlavor.java	18 Feb 2006 10:25:39 -0000	1.29
+++ java/awt/datatransfer/DataFlavor.java	9 Jun 2006 13:03:32 -0000
@@ -38,6 +38,8 @@
 
 package java.awt.datatransfer;
 
+import gnu.classpath.NotImplementedException;
+
 import java.io.ByteArrayInputStream;
 import java.io.IOException;
 import java.io.InputStream;
@@ -785,7 +787,8 @@
    *
    * @exception IOException If an error occurs.
    */
-  public void writeExternal(ObjectOutput stream) throws IOException
+  public void writeExternal(ObjectOutput stream) 
+    throws IOException, NotImplementedException
   {
     // FIXME: Implement me
   }
@@ -801,7 +804,7 @@
    * cannot be found.
    */
   public void readExternal(ObjectInput stream) 
-    throws IOException, ClassNotFoundException
+    throws IOException, ClassNotFoundException, NotImplementedException
   {
     // FIXME: Implement me
   }
Index: java/awt/dnd/DropTargetContext.java
===================================================================
RCS file: /sources/classpath/classpath/java/awt/dnd/DropTargetContext.java,v
retrieving revision 1.10
diff -u -r1.10 DropTargetContext.java
--- java/awt/dnd/DropTargetContext.java	16 Mar 2006 00:50:23 -0000	1.10
+++ java/awt/dnd/DropTargetContext.java	9 Jun 2006 13:03:33 -0000
@@ -1,5 +1,5 @@
 /* DropTargetContext.java --
-   Copyright (C) 2002, 2003, 2004  Free Software Foundation
+   Copyright (C) 2002, 2003, 2004, 2006,  Free Software Foundation
 
 This file is part of GNU Classpath.
 
@@ -37,6 +37,8 @@
 
 package java.awt.dnd;
 
+import gnu.classpath.NotImplementedException;
+
 import java.awt.Component;
 import java.awt.datatransfer.DataFlavor;
 import java.awt.datatransfer.Transferable;
@@ -59,23 +61,23 @@
     protected boolean isLocal;
     protected Transferable transferable;
 
-    TransferableProxy (Transferable t, boolean local)
+    TransferableProxy(Transferable t, boolean local)
     {
       this.transferable = t;
       this.isLocal = local;
     }
     
-    public DataFlavor[] getTransferDataFlavors ()
+    public DataFlavor[] getTransferDataFlavors()
     {
-      return transferable.getTransferDataFlavors ();
+      return transferable.getTransferDataFlavors();
     }
 
-    public boolean isDataFlavorSupported (DataFlavor flavor)
+    public boolean isDataFlavorSupported(DataFlavor flavor)
     {
-      return transferable.isDataFlavorSupported (flavor);
+      return transferable.isDataFlavorSupported(flavor);
     }
 
-    public Object getTransferData (DataFlavor flavor)
+    public Object getTransferData(DataFlavor flavor)
       throws UnsupportedFlavorException, IOException
     {
       return transferable.getTransferData (flavor);
@@ -87,32 +89,32 @@
   private java.awt.dnd.peer.DropTargetContextPeer dtcp;
 
   // package private
-  DropTargetContext (DropTarget dropTarget)
+  DropTargetContext(DropTarget dropTarget)
   {
     this.dropTarget = dropTarget;
   }
 
-  public DropTarget getDropTarget ()
+  public DropTarget getDropTarget()
   {
     return dropTarget;
   }
 
-  public Component getComponent ()
+  public Component getComponent()
   {
-    return dropTarget.getComponent ();
+    return dropTarget.getComponent();
   }
 
-  public void addNotify (java.awt.dnd.peer.DropTargetContextPeer dtcp)
+  public void addNotify(java.awt.dnd.peer.DropTargetContextPeer dtcp)
   {
     this.dtcp = dtcp;
   }
 
-  public void removeNotify ()
+  public void removeNotify()
   {
     this.dtcp = null;
   }
 
-  protected void setTargetActions (int actions)
+  protected void setTargetActions(int actions)
   {
     targetActions = actions;
   }
@@ -127,45 +129,51 @@
    *
    * @exception InvalidDnDOperationException If a drop is not outstanding.
    */
-  public void dropComplete (boolean success)
+  public void dropComplete(boolean success)
+    throws NotImplementedException
   {
     // FIXME: implement this
   }
 
-  protected void acceptDrag (int dragOperation)
+  protected void acceptDrag(int dragOperation)
+    throws NotImplementedException
   {
     // FIXME: implement this
   }
 
-  protected void rejectDrag ()
+  protected void rejectDrag()
+    throws NotImplementedException
   {
     // FIXME: implement this
   }
 
-  protected void acceptDrop (int dropOperation)
+  protected void acceptDrop(int dropOperation)
+    throws NotImplementedException
   {
     // FIXME: implement this
   }
 
-  protected void rejectDrop ()
+  protected void rejectDrop()
+    throws NotImplementedException
   {
     // FIXME: implement this
   }
 
-  protected DataFlavor[] getCurrentDataFlavors ()
+  protected DataFlavor[] getCurrentDataFlavors()
+    throws NotImplementedException
   {
     // FIXME: implement this
     return null;
   }
 
-  protected List getCurrentDataFlavorsAsList ()
+  protected List getCurrentDataFlavorsAsList()
   {
-    return Arrays.asList (getCurrentDataFlavors ());
+    return Arrays.asList(getCurrentDataFlavors());
   }
 
-  protected boolean isDataFlavorSupported (DataFlavor flavor)
+  protected boolean isDataFlavorSupported(DataFlavor flavor)
   {
-    return getCurrentDataFlavorsAsList ().contains (flavor);
+    return getCurrentDataFlavorsAsList().contains(flavor);
   }
 
   /**
@@ -173,7 +181,8 @@
    *
    * @exception InvalidDnDOperationException If a drag is not outstanding.
    */
-  protected Transferable getTransferable() throws InvalidDnDOperationException
+  protected Transferable getTransferable() 
+    throws InvalidDnDOperationException, NotImplementedException
   {
     // FIXME: implement this
     return null;
@@ -181,6 +190,6 @@
 
   protected Transferable createTransferableProxy(Transferable t, boolean local)
   {
-    return new TransferableProxy (t, local);
+    return new TransferableProxy(t, local);
   }
 } // class DropTargetContext
Index: java/awt/dnd/DropTargetDropEvent.java
===================================================================
RCS file: /sources/classpath/classpath/java/awt/dnd/DropTargetDropEvent.java,v
retrieving revision 1.3
diff -u -r1.3 DropTargetDropEvent.java
--- java/awt/dnd/DropTargetDropEvent.java	2 Jul 2005 20:32:26 -0000	1.3
+++ java/awt/dnd/DropTargetDropEvent.java	9 Jun 2006 13:03:33 -0000
@@ -37,6 +37,8 @@
 
 package java.awt.dnd;
 
+import gnu.classpath.NotImplementedException;
+
 import java.awt.Point;
 import java.awt.datatransfer.DataFlavor;
 import java.awt.datatransfer.Transferable;
@@ -65,10 +67,10 @@
    * actions is not a bitwise mask of DnDConstants, or dtc is null.
    * @exception NullPointerException If location is null.
    */
-  public DropTargetDropEvent (DropTargetContext dtc, Point location,
-                              int dropAction, int actions)
+  public DropTargetDropEvent(DropTargetContext dtc, Point location,
+                             int dropAction, int actions)
   {
-    this (dtc, location, dropAction, actions, false);
+    this(dtc, location, dropAction, actions, false);
   }
 
   /**
@@ -78,16 +80,16 @@
    * actions is not a bitwise mask of DnDConstants, or dtc is null.
    * @exception NullPointerException If location is null.
    */
-  public DropTargetDropEvent (DropTargetContext dtc, Point location,
-                              int dropAction, int actions, boolean isLocalTx)
+  public DropTargetDropEvent(DropTargetContext dtc, Point location,
+                             int dropAction, int actions, boolean isLocalTx)
   {
-    super (dtc);
+    super(dtc);
 
     if (location == null)
-      throw new NullPointerException ();
+      throw new NullPointerException();
 
     if (dtc == null)
-      throw new IllegalArgumentException ();
+      throw new IllegalArgumentException();
 
     if (dropAction != DnDConstants.ACTION_NONE
         && dropAction != DnDConstants.ACTION_COPY
@@ -95,7 +97,7 @@
         && dropAction != DnDConstants.ACTION_COPY_OR_MOVE
         && dropAction != DnDConstants.ACTION_LINK
         && dropAction != DnDConstants.ACTION_REFERENCE)
-      throw new IllegalArgumentException ();
+      throw new IllegalArgumentException();
 
     int actionsMask = DnDConstants.ACTION_NONE
                       | DnDConstants.ACTION_COPY
@@ -105,7 +107,7 @@
                       | DnDConstants.ACTION_REFERENCE;
     
     if (~(actions ^ actionsMask) != 0)
-      throw new IllegalArgumentException ();
+      throw new IllegalArgumentException();
     
     this.dropAction = dropAction;
     this.actions = actions;
@@ -113,52 +115,53 @@
     this.isLocalTx = isLocalTx;
   }
   
-  public Point getLocation ()
+  public Point getLocation()
   {
     return location;
   }
 
-  public DataFlavor[] getCurrentDataFlavors ()
+  public DataFlavor[] getCurrentDataFlavors()
   {
-    return context.getCurrentDataFlavors ();
+    return context.getCurrentDataFlavors();
   }
 
-  public List getCurrentDataFlavorsAsList ()
+  public List getCurrentDataFlavorsAsList()
   {
-    return context.getCurrentDataFlavorsAsList ();
+    return context.getCurrentDataFlavorsAsList();
   }
 
-  public boolean isDataFlavorSupported (DataFlavor flavor)
+  public boolean isDataFlavorSupported(DataFlavor flavor)
   {
-    return context.isDataFlavorSupported (flavor);
+    return context.isDataFlavorSupported(flavor);
   }
 
-  public int getSourceActions ()
+  public int getSourceActions()
   {
     return actions;
   }
 
-  public int getDropAction ()
+  public int getDropAction()
   {
     return dropAction;
   }
 
-  public Transferable getTransferable ()
+  public Transferable getTransferable()
   {
     return context.getTransferable ();
   }
 
-  public void acceptDrop (int dropAction)
+  public void acceptDrop(int dropAction)
   {
-    context.acceptDrop (dropAction);
+    context.acceptDrop(dropAction);
   }
 
-  public void rejectDrop ()
+  public void rejectDrop()
   {
-    context.rejectDrop ();
+    context.rejectDrop();
   }
 
-  public void dropComplete (boolean success)
+  public void dropComplete(boolean success)
+    throws NotImplementedException
   {
     // FIXME: implement this
   }


More information about the Classpath-patches mailing list