2003-02-17 Michael Koch <konqueror@gmx.de>
authorMichael Koch <konqueror@gmx.de>
Mon, 17 Feb 2003 15:26:30 +0000 (15:26 +0000)
committerMichael Koch <mkoch@gcc.gnu.org>
Mon, 17 Feb 2003 15:26:30 +0000 (15:26 +0000)
* java/awt/dnd/DragSourceContext.java
(addDragSourceListener): Added documentation.
* java/awt/dnd/DragSourceDragEvent.java
(serialVersionUID): New member variable.
(getDropAction): Reformated.
* java/awt/dnd/DragSourceDropEvent.java
(serialVersionUID): New member variable.
(dropSuccess): Renamed from success for serialization issues.
* java/awt/dnd/DragSourceEvent.java
(serialVersionUID): New member variable.
* java/awt/dnd/DropTarget.java
(serialVersionUID): New member variable.
(DropTarget): Implemented, documentation reworked.
(setComponent): Documentation added.
(getComponent): Documentation added.
(setDefaultActions): Documentation added.
(getDefaultActions): Documentation added.
(addDropTargetListener): Documentation added.
* java/awt/dnd/DropTargetContext.java
(DropTargetContext): Documentation added.
(TransferableProxy.TransferableProxy): New method.
(dropComplete): Fixed documentation.
(getTransferable): Fixed documentation.
(createTransferableProxy): Implemented.
* java/awt/dnd/DropTargetDragEvent.java
(DropTargetDragEvent): Documentation added.
(serialVersionUID): New member variable.
(DropTargetDragEvent): Throw exceptions, documentation added.
(acceptDrag): Implemented.
(getCurrentDataFlavors): Implemented.3yy
(getCurrentDataFlavorsAsList): Implemented.
(isDataFlavorSupported): Implemented.
(rejectDrag): Implemented.
* java/awt/dnd/DropTargetDropEvent.java
(DropTargetDropEvent): Documentation added.
(serialVersionUID): New member variable.
(actions): Renamed from srcActions for serialization issues.
(isLocalTx): Renamed from isLocalTx for serialization issues.
(DropTargetDropEvent): New implementation, throw exceptions,
documentation added.
(getCurrentDataFlavors): Implemented.
(getCurrentDataFlavorsAsList): Implemented.
(isDataFlavorSupported): Implemented.
(getSourceActions): Implemented.
(getDropAction): Implemented.
(getTransferable): Implemented.
(acceptDrop): Implemented.
(rejectDrop): Implemented.
* java/awt/dnd/DropTargetListener.java
(drop): Fixed documentation.
* java/awt/dnd/MouseDragGestureRecognizer.java
(MouseDragGestureRecognizer): Documentation added.

2003-02-17  Michael Koch  <konqueror@gmx.de>

* java/awt/font/FontRenderContext.java,
java/awt/font/ShapeGraphicAttribute.java,
java/awt/font/MultipleMaster.java,
java/awt/font/TransformAttribute.java,
java/awt/font/GlyphJustificationInfo.java,
java/awt/font/LineBreakMeasurer.java,
java/awt/font/TextMeasurer.java,
java/awt/font/TextLayout.java,
java/awt/font/LineMetrics.java,
java/awt/font/TextAttribute.java,
java/awt/font/GlyphMetrics.java,
java/awt/font/OpenType.java,
java/awt/font/GlyphVector.java,
java/awt/font/GraphicAttribute.java,
java/awt/font/ImageGraphicAttribute.java,
java/awt/font/NumericShaper.java: New files.
* Makefile.am
(awt_java_source_files): Added the following files:
java/awt/font/FontRenderContext.java
java/awt/font/ShapeGraphicAttribute.java
java/awt/font/MultipleMaster.java
java/awt/font/TransformAttribute.java
java/awt/font/GlyphJustificationInfo.java
java/awt/font/LineBreakMeasurer.java
java/awt/font/TextMeasurer.java
java/awt/font/TextLayout.java
java/awt/font/LineMetrics.java
java/awt/font/TextAttribute.java
java/awt/font/GlyphMetrics.java
java/awt/font/OpenType.java
java/awt/font/GlyphVector.java
java/awt/font/GraphicAttribute.java
java/awt/font/ImageGraphicAttribute.java
java/awt/font/NumericShaper.java
* Makefile.in: Regenerated.

2003-02-17  Michael Koch  <konqueror@gmx.de>

* java/awt/print/Paper.java
(Paper): Implements Cloneable.
* java/awt/print/PrinterJob.java
(setJobName): Return value must be void.
(print): Throws PrinterException.

From-SVN: r62999

29 files changed:
libjava/ChangeLog
libjava/java/awt/dnd/DragSourceContext.java
libjava/java/awt/dnd/DragSourceDragEvent.java
libjava/java/awt/dnd/DragSourceDropEvent.java
libjava/java/awt/dnd/DragSourceEvent.java
libjava/java/awt/dnd/DropTarget.java
libjava/java/awt/dnd/DropTargetContext.java
libjava/java/awt/dnd/DropTargetDragEvent.java
libjava/java/awt/dnd/DropTargetDropEvent.java
libjava/java/awt/dnd/DropTargetListener.java
libjava/java/awt/dnd/MouseDragGestureRecognizer.java
libjava/java/awt/font/FontRenderContext.java [new file with mode: 0644]
libjava/java/awt/font/GlyphJustificationInfo.java [new file with mode: 0644]
libjava/java/awt/font/GlyphMetrics.java [new file with mode: 0644]
libjava/java/awt/font/GlyphVector.java [new file with mode: 0644]
libjava/java/awt/font/GraphicAttribute.java [new file with mode: 0644]
libjava/java/awt/font/ImageGraphicAttribute.java [new file with mode: 0644]
libjava/java/awt/font/LineBreakMeasurer.java [new file with mode: 0644]
libjava/java/awt/font/LineMetrics.java [new file with mode: 0644]
libjava/java/awt/font/MultipleMaster.java [new file with mode: 0644]
libjava/java/awt/font/NumericShaper.java [new file with mode: 0644]
libjava/java/awt/font/OpenType.java [new file with mode: 0644]
libjava/java/awt/font/ShapeGraphicAttribute.java [new file with mode: 0644]
libjava/java/awt/font/TextAttribute.java [new file with mode: 0644]
libjava/java/awt/font/TextLayout.java [new file with mode: 0644]
libjava/java/awt/font/TextMeasurer.java [new file with mode: 0644]
libjava/java/awt/font/TransformAttribute.java [new file with mode: 0644]
libjava/java/awt/print/Paper.java
libjava/java/awt/print/PrinterJob.java

index 85d57f7354c46553ec52cfb10b5652c5b0e3e044..b5fada9b90c1d4c17276db746bb7246279fe8bf9 100644 (file)
@@ -1,3 +1,104 @@
+2003-02-17  Michael Koch  <konqueror@gmx.de>
+
+       * java/awt/dnd/DragSourceContext.java
+       (addDragSourceListener): Added documentation.
+       * java/awt/dnd/DragSourceDragEvent.java
+       (serialVersionUID): New member variable.
+       (getDropAction): Reformated.
+       * java/awt/dnd/DragSourceDropEvent.java
+       (serialVersionUID): New member variable.
+       (dropSuccess): Renamed from success for serialization issues.
+       * java/awt/dnd/DragSourceEvent.java
+       (serialVersionUID): New member variable.
+       * java/awt/dnd/DropTarget.java
+       (serialVersionUID): New member variable.
+       (DropTarget): Implemented, documentation reworked.
+       (setComponent): Documentation added.
+       (getComponent): Documentation added.
+       (setDefaultActions): Documentation added.
+       (getDefaultActions): Documentation added.
+       (addDropTargetListener): Documentation added.
+       * java/awt/dnd/DropTargetContext.java
+       (DropTargetContext): Documentation added.
+       (TransferableProxy.TransferableProxy): New method.
+       (dropComplete): Fixed documentation.
+       (getTransferable): Fixed documentation.
+       (createTransferableProxy): Implemented.
+       * java/awt/dnd/DropTargetDragEvent.java
+       (DropTargetDragEvent): Documentation added.
+       (serialVersionUID): New member variable.
+       (DropTargetDragEvent): Throw exceptions, documentation added.
+       (acceptDrag): Implemented.
+       (getCurrentDataFlavors): Implemented.3yy
+       (getCurrentDataFlavorsAsList): Implemented.
+       (isDataFlavorSupported): Implemented.
+       (rejectDrag): Implemented.
+       * java/awt/dnd/DropTargetDropEvent.java
+       (DropTargetDropEvent): Documentation added.
+       (serialVersionUID): New member variable.
+       (actions): Renamed from srcActions for serialization issues.
+       (isLocalTx): Renamed from isLocalTx for serialization issues.
+       (DropTargetDropEvent): New implementation, throw exceptions,
+       documentation added.
+       (getCurrentDataFlavors): Implemented.
+       (getCurrentDataFlavorsAsList): Implemented.
+       (isDataFlavorSupported): Implemented.
+       (getSourceActions): Implemented.
+       (getDropAction): Implemented.
+       (getTransferable): Implemented.
+       (acceptDrop): Implemented.
+       (rejectDrop): Implemented.
+       * java/awt/dnd/DropTargetListener.java
+       (drop): Fixed documentation.
+       * java/awt/dnd/MouseDragGestureRecognizer.java
+       (MouseDragGestureRecognizer): Documentation added.
+
+2003-02-17  Michael Koch  <konqueror@gmx.de>
+
+       * java/awt/font/FontRenderContext.java,
+       java/awt/font/ShapeGraphicAttribute.java,
+       java/awt/font/MultipleMaster.java,
+       java/awt/font/TransformAttribute.java,
+       java/awt/font/GlyphJustificationInfo.java,
+       java/awt/font/LineBreakMeasurer.java,
+       java/awt/font/TextMeasurer.java,
+       java/awt/font/TextLayout.java,
+       java/awt/font/LineMetrics.java,
+       java/awt/font/TextAttribute.java,
+       java/awt/font/GlyphMetrics.java,
+       java/awt/font/OpenType.java,
+       java/awt/font/GlyphVector.java,
+       java/awt/font/GraphicAttribute.java,
+       java/awt/font/ImageGraphicAttribute.java,
+       java/awt/font/NumericShaper.java: New files.
+       * Makefile.am
+       (awt_java_source_files): Added the following files:
+       java/awt/font/FontRenderContext.java
+       java/awt/font/ShapeGraphicAttribute.java
+       java/awt/font/MultipleMaster.java
+       java/awt/font/TransformAttribute.java
+       java/awt/font/GlyphJustificationInfo.java
+       java/awt/font/LineBreakMeasurer.java
+       java/awt/font/TextMeasurer.java
+       java/awt/font/TextLayout.java
+       java/awt/font/LineMetrics.java
+       java/awt/font/TextAttribute.java
+       java/awt/font/GlyphMetrics.java
+       java/awt/font/OpenType.java
+       java/awt/font/GlyphVector.java
+       java/awt/font/GraphicAttribute.java
+       java/awt/font/ImageGraphicAttribute.java
+       java/awt/font/NumericShaper.java
+       * Makefile.in: Regenerated.
+
+2003-02-17  Michael Koch  <konqueror@gmx.de>
+
+       * java/awt/print/Paper.java
+       (Paper): Implements Cloneable.
+       * java/awt/print/PrinterJob.java
+       (setJobName): Return value must be void.
+       (print): Throws PrinterException.
+       
 2003-02-16  Tom Tromey  <tromey@redhat.com>
 
        * verify.cc (_Jv_BytecodeVerifier::pop_jump): Removed unused
index ca26b941b3edc657689639ad1695b65cce0dc805..45191d24365634f3970c93090a570bf90f78ec57 100644 (file)
@@ -92,7 +92,13 @@ public class DragSourceContext
     return null;
   }
 
-  public void addDragSourceListener(DragSourceListener l)
+  /**
+   * Adds a <code>DragSourceListener</code>.
+   *
+   * @exception TooManyListenersException If a <code>DragSourceListener</code>
+   * has already been added.
+   */
+  public void addDragSourceListener (DragSourceListener dsl)
     throws TooManyListenersException
   {
   }
index 0a1d759e986ceaa3242f2f6455e56dd9b954a2d6..6417492f89e0a05dff4c82bb4adedd108bb0483f 100644 (file)
@@ -41,10 +41,16 @@ package java.awt.dnd;
 import gnu.java.awt.EventModifier;
 
 /**
- * STUBBED
+ * @author Michael Koch
+ * @since 1.2
  */
 public class DragSourceDragEvent extends DragSourceEvent
 {
+  /**
+   * Compatible with JDK 1.2+
+   */
+  private static final long serialVersionUID = 481346297933902471L;
+
   private final int dropAction;
   private final int targetActions;
   private final int gestureModifiers;
@@ -89,7 +95,8 @@ public class DragSourceDragEvent extends DragSourceEvent
 
   public int getDropAction()
   {
-    return dropAction & targetActions
-      & ((DragSourceContext) source).getSourceActions();
+    return (dropAction
+            & targetActions
+            & ((DragSourceContext) source).getSourceActions());
   }
 } // class DragSourceDragEvent
index 4b70d1bf0b0aca457de8894cde1165718954146c..a645814f160c3ff6f5fc4e9cea07db4be0099657 100644 (file)
@@ -46,30 +46,35 @@ package java.awt.dnd;
  */
 public class DragSourceDropEvent extends DragSourceEvent
 {
+  /**
+   * Compatible with JDK 1.2+
+   */
+  private static final long serialVersionUID = -5571321229470821891L;
+
   private final int dropAction;
-  private final boolean success;
+  private final boolean dropSuccess;
 
   public DragSourceDropEvent (DragSourceContext context)
   {
     super (context);
     this.dropAction = 0;
-    this.success = false;
+    this.dropSuccess = false;
   }
   
   public DragSourceDropEvent (DragSourceContext context, int dropAction,
-                              boolean success)
+                              boolean dropSuccess)
   {
     super (context);
     this.dropAction = dropAction;
-    this.success = success;
+    this.dropSuccess = dropSuccess;
   }
 
   public DragSourceDropEvent (DragSourceContext context, int dropAction,
-                              boolean success, int x, int y)
+                              boolean dropSuccess, int x, int y)
   {
     super (context, x, y);
     this.dropAction = dropAction;
-    this.success = success;
+    this.dropSuccess = dropSuccess;
   }
 
   public int getDropAction()
@@ -79,6 +84,6 @@ public class DragSourceDropEvent extends DragSourceEvent
 
   public boolean getDropSuccess()
   {
-    return success;
+    return dropSuccess;
   }
 } // class DragSourceDropEvent
index 9d5b00bf9eb0b9a7d470229b4dfa72c9e3b95e68..60f6eb2f29563074818c4b24fe3e8d7c4a65e6d7 100644 (file)
@@ -41,8 +41,16 @@ package java.awt.dnd;
 import java.awt.Point;
 import java.util.EventObject;
 
+/**
+ * @since 1.2
+ */
 public class DragSourceEvent extends EventObject
 {
+  /**
+   * Compatible with JDK 1.2+
+   */
+  private static final long serialVersionUID = -763287114604032641L;
+  
   private final boolean locationSpecified;
   private final int x;
   private final int y;
index 53c09178d32e69e67c3890917d0ea70ce057fcf7..09c642cf54f68f3a3509d7707bdab8692521ff6c 100644 (file)
@@ -50,6 +50,11 @@ import java.util.TooManyListenersException;
 public class DropTarget
   implements DropTargetListener, EventListener, Serializable
 {
+  /**
+   * Compatible with JDK 1.2+
+   */
+  private static final long serialVersionUID = -6283860791671019047L;
+
   protected static class DropTargetAutoScroller
     implements ActionListener
   {
@@ -74,64 +79,85 @@ public class DropTarget
   private boolean isActive = false;
     
   /**
-   * FIXME
+   * Creates a <code>DropTarget</code> object.
    *
-   * @exception HeadlessException FIXME
+   * @exception HeadlessException If GraphicsEnvironment.isHeadless()
+   * returns true.
    */
   public DropTarget ()
   {
+    this (null, 0, null, true, null);
   }
   
   /**
-   * FIXME
+   * Creates a <code>DropTarget</code> object.
    *
-   * @exception HeadlessException FIXME
+   * @exception HeadlessException If GraphicsEnvironment.isHeadless()
+   * returns true.
    */
   public DropTarget (Component c, DropTargetListener dtl)
   {
+    this (c, 0, dtl, true, null);
   }
   
   /**
-   * FIXME
+   * Creates a <code>DropTarget</code> object.
    *
-   * @exception HeadlessException FIXME
+   * @exception HeadlessException If GraphicsEnvironment.isHeadless()
+   * returns true.
    */
   public DropTarget (Component c, int i, DropTargetListener dtl)
   {
+    this (c, i, dtl, true, null);
   }
   
   /**
-   * FIXME
+   * Creates a <code>DropTarget</code> object.
    *
-   * @exception HeadlessException FIXME
+   * @exception HeadlessException If GraphicsEnvironment.isHeadless()
+   * returns true.
    */
   public DropTarget (Component c, int i, DropTargetListener dtl, boolean b)
   {
+    this (c, i, dtl, b, null);
   }
   
   /**
-   * FIXME
+   * Creates a <code>DropTarget</code> object.
    *
-   * @exception HeadlessException FIXME
+   * @exception HeadlessException If GraphicsEnvironment.isHeadless()
+   * returns true.
    */
   public DropTarget (Component c, int i, DropTargetListener dtl, boolean b,
-                    FlavorMap fm)
+                     FlavorMap fm)
   {
   }
 
+  /**
+   * Sets the component associated with this drop target object.
+   */
   public void setComponent (Component c)
   {
   }
 
+  /**
+   * Returns the component associated with this drop target object.
+   */
   public Component getComponent ()
   {
     return null;
   }
 
+  /**
+   * Sets the default actions.
+   */
   public void setDefaultActions (int ops)
   {
   }
 
+  /**
+   * Returns the default actions.
+   */
   public int getDefaultActions ()
   {
     return 0;
@@ -148,7 +174,10 @@ public class DropTarget
   }
 
   /**
-   * @exception TooManyListenersException FIXME
+   * Adds a new <code>DropTargetListener</code>.
+   * 
+   * @exception TooManyListenersException If there is already a
+   * <code>DropTargetListener</code>.
    */
   public void addDropTargetListener (DropTargetListener dtl)
     throws TooManyListenersException
index 86adaade95e32fe1ea4703dba441ba87d0edb2be..eca2f6e3763761a6ac149ec2efe9b9325e1cdd84 100644 (file)
@@ -46,6 +46,10 @@ import java.awt.datatransfer.Transferable;
 import java.awt.datatransfer.UnsupportedFlavorException;
 import java.util.List;
 
+/**
+ * @author Michael Koch <konqueror@gmx.de>
+ * @since 1.2
+ */
 public class DropTargetContext implements Serializable
 {
   static final long serialVersionUID = -634158968993743371L;
@@ -55,6 +59,12 @@ public class DropTargetContext implements Serializable
     protected boolean isLocal;
     protected Transferable transferable;
 
+    TransferableProxy (Transferable t, boolean local)
+    {
+      this.transferable = t;
+      this.isLocal = local;
+    }
+    
     public DataFlavor[] getTransferDataFlavors ()
     {
       // FIXME: implement this
@@ -110,9 +120,9 @@ public class DropTargetContext implements Serializable
   }
 
   /**
-   * FIXME
+   * Signals that the drop is completed.
    *
-   * @exception InvalidDnDOperationException FIXME
+   * @exception InvalidDnDOperationException If a drop is not outstanding.
    */
   public void dropComplete (boolean success)
   {
@@ -158,9 +168,9 @@ public class DropTargetContext implements Serializable
   }
 
   /**
-   * FIXME
+   * Return the <code>Transferable</code> operandof this operation.
    *
-   * @exception InvalidDnDOperationException FIXME
+   * @exception InvalidDnDOperationException If a drag is not outstanding.
    */
   protected Transferable getTransferable() throws InvalidDnDOperationException
   {
@@ -170,7 +180,6 @@ public class DropTargetContext implements Serializable
 
   protected Transferable createTransferableProxy(Transferable t, boolean local)
   {
-    // FIXME: implement this
-    return null;
+    return new TransferableProxy (t, local);
   }
 } // class DropTargetContext
index a22ddc8e32a3649a95958f9ad7dcb2955e2a9652..e95b2d1ae87d6932f0b27776c6cd9eec0d83dd09 100644 (file)
@@ -41,21 +41,56 @@ import java.util.List;
 import java.awt.Point;
 import java.awt.datatransfer.DataFlavor;
 
+/**
+ * @since 1.2
+ */
 public class DropTargetDragEvent extends DropTargetEvent
 {
+  /**
+   * Compatible with 1.2+
+   */
+  private static final long serialVersionUID = -8422265619058953682L;
+
   private final int dropAction;
   private final int srcActions;
   private final Point location;
 
   /**
-   * FIXME
+   * Initializes a <code>DropTargetDragEvent</code>.
    *
-   * @exception NullPointerException FIXME
+   * @exception IllegalArgumentException If dropAction is not one of DnDConstants,
+   * srcActions is not a bitwise mask of DnDConstants, or dtc is null.
+   * @exception NullPointerException If location is null.
    */
   public DropTargetDragEvent (DropTargetContext context, Point location,
                               int dropAction, int srcActions)
   {
     super (context);
+
+    if (location == null)
+      throw new NullPointerException ();
+
+    if (context == null)
+      throw new IllegalArgumentException ();
+
+    if (dropAction != DnDConstants.ACTION_NONE
+        && dropAction != DnDConstants.ACTION_COPY
+        && dropAction != DnDConstants.ACTION_MOVE
+        && dropAction != DnDConstants.ACTION_COPY_OR_MOVE
+        && dropAction != DnDConstants.ACTION_LINK
+        && dropAction != DnDConstants.ACTION_REFERENCE)
+      throw new IllegalArgumentException ();
+
+    int srcActionsMask = DnDConstants.ACTION_NONE
+                         | DnDConstants.ACTION_COPY
+                         | DnDConstants.ACTION_MOVE
+                         | DnDConstants.ACTION_COPY_OR_MOVE
+                         | DnDConstants.ACTION_LINK
+                         | DnDConstants.ACTION_REFERENCE;
+    
+    if (~(srcActions ^ srcActionsMask) != 0)
+      throw new IllegalArgumentException ();
+    
     this.dropAction = dropAction;
     this.srcActions = srcActions;
     this.location = location;
@@ -63,19 +98,17 @@ public class DropTargetDragEvent extends DropTargetEvent
 
   public void acceptDrag (int dragOperation)
   {
-    // FIXME: implement this
+    context.acceptDrag (dragOperation);
   }
 
   public DataFlavor[] getCurrentDataFlavors ()
   {
-    // FIXME: implement this
-    return null;
+    return context.getCurrentDataFlavors ();
   }
   
   public List getCurrentDataFlavorsAsList ()
   {
-    // FIXME: implement this
-    return null;
+    return context.getCurrentDataFlavorsAsList ();
   }
   
   public int getDropAction()
@@ -96,12 +129,11 @@ public class DropTargetDragEvent extends DropTargetEvent
 
   public boolean isDataFlavorSupported (DataFlavor df)
   {
-    // FIXME: implement this
-    return true;
+    return context.isDataFlavorSupported (df);
   }
 
   public void rejectDrag ()
   {
-    // FIXME: implement this
+    context.rejectDrag ();
   }
 } // class DropTargetDragEvent
index 9a14f226302452f4ebfea174d45f82fb96e32eac..bb57f23b08f83ab56db29dce28ac1d2adcfa90ec 100644 (file)
@@ -42,31 +42,75 @@ import java.awt.datatransfer.DataFlavor;
 import java.awt.datatransfer.Transferable;
 import java.util.List;
 
+/**
+ * @since 1.2
+ */
 public class DropTargetDropEvent extends DropTargetEvent
 {
+  /**
+   * Compatible with JDK 1.2+
+   */
+  private static final long serialVersionUID = -1721911170440459322L;
+
   private final int dropAction;
-  private final int srcActions;
+  private final int actions;
   private final Point location;
-  private final boolean isLocal;
+  private final boolean isLocalTx;
   
+  /**
+   * Initializes a <code>DropTargetDropEvent</code>. By default this constructor
+   * assumes that the target is not int same JVM.
+   *
+   * @exception IllegalArgumentException If dropAction is not one of DnDConstants,
+   * 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 srcActions)
+                              int dropAction, int actions)
   {
-    super (dtc);
-    this.dropAction = dropAction;
-    this.srcActions = srcActions;
-    this.location = location;
-    this.isLocal = false;
+    this (dtc, location, dropAction, actions, false);
   }
 
+  /**
+   * Initializes a <code>DropTargetDropEvent</code>.
+   *
+   * @exception IllegalArgumentException If dropAction is not one of DnDConstants,
+   * 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 srcActions, boolean isLocal)
+                              int dropAction, int actions, boolean isLocalTx)
   {
     super (dtc);
+
+    if (location == null)
+      throw new NullPointerException ();
+
+    if (dtc == null)
+      throw new IllegalArgumentException ();
+
+    if (dropAction != DnDConstants.ACTION_NONE
+        && dropAction != DnDConstants.ACTION_COPY
+        && dropAction != DnDConstants.ACTION_MOVE
+        && dropAction != DnDConstants.ACTION_COPY_OR_MOVE
+        && dropAction != DnDConstants.ACTION_LINK
+        && dropAction != DnDConstants.ACTION_REFERENCE)
+      throw new IllegalArgumentException ();
+
+    int actionsMask = DnDConstants.ACTION_NONE
+                      | DnDConstants.ACTION_COPY
+                      | DnDConstants.ACTION_MOVE
+                      | DnDConstants.ACTION_COPY_OR_MOVE
+                      | DnDConstants.ACTION_LINK
+                      | DnDConstants.ACTION_REFERENCE;
+    
+    if (~(actions ^ actionsMask) != 0)
+      throw new IllegalArgumentException ();
+    
     this.dropAction = dropAction;
-    this.srcActions = srcActions;
+    this.actions = actions;
     this.location = location;
-    this.isLocal = isLocal;
+    this.isLocalTx = isLocalTx;
   }
   
   public Point getLocation ()
@@ -76,48 +120,42 @@ public class DropTargetDropEvent extends DropTargetEvent
 
   public DataFlavor[] getCurrentDataFlavors ()
   {
-    // FIXME: implement this
-    return null;
+    return context.getCurrentDataFlavors ();
   }
 
   public List getCurrentDataFlavorsAsList ()
   {
-    // FIXME: implement this
-    return null;
+    return context.getCurrentDataFlavorsAsList ();
   }
 
   public boolean isDataFlavorSupported (DataFlavor flavor)
   {
-    // FIXME: implement this
-    return false;
+    return context.isDataFlavorSupported (flavor);
   }
 
   public int getSourceActions ()
   {
-    // FIXME: implement this
-    return 0;
+    return actions;
   }
 
   public int getDropAction ()
   {
-    // FIXME: implement this
-    return 0;
+    return dropAction;
   }
 
   public Transferable getTransferable ()
   {
-    // FIXME: implement this
-    return null;
+    return context.getTransferable ();
   }
 
   public void acceptDrop (int dropAction)
   {
-    // FIXME: implement this
+    context.acceptDrop (dropAction);
   }
 
   public void rejectDrop ()
   {
-    // FIXME: implement this
+    context.rejectDrop ();
   }
 
   public void dropComplete (boolean success)
@@ -127,6 +165,6 @@ public class DropTargetDropEvent extends DropTargetEvent
 
   public boolean isLocalTransfer()
   {
-    return isLocal;
+    return isLocalTx;
   }
 } // class DropTargetDropEvent
index 861aa89140e27dd895ecb1f52a026dcd5ad3069e..8025ff239208470569bffb5c6fcaa486c7968b5b 100644 (file)
@@ -81,7 +81,7 @@ public interface DropTargetListener extends EventListener
   void dragExit (DropTargetEvent e);
 
   /**
-   * FIXME
+   * Called when the drag operation has terminated with a drop.
    *
    * @param e the drag source drag event
    */
index 1ef2e6cb4832fd5888d903d295d3d85b90eacb3f..d01032433c019b32155f7b26734bdaa9b4c67d66 100644 (file)
@@ -45,27 +45,38 @@ import java.awt.event.MouseMotionListener;
 /**
  * @author Michael Koch <konqueror@gmx.de>
  */
-
 public abstract class MouseDragGestureRecognizer 
   extends DragGestureRecognizer
   implements MouseListener, MouseMotionListener
 {
+  /**
+   * Creates a <code>MouseDragGestureRecognizer</code> object.
+   */
   protected MouseDragGestureRecognizer (DragSource ds, Component c, int act,
                                        DragGestureListener dgl)
   {
     super (ds, c, act, dgl);
   }
 
+  /**
+   * Creates a <code>MouseDragGestureRecognizer</code> object.
+   */
   protected MouseDragGestureRecognizer (DragSource ds, Component c, int act)
   {
     super (ds, c, act);
   }
 
+  /**
+   * Creates a <code>MouseDragGestureRecognizer</code> object.
+   */
   protected MouseDragGestureRecognizer (DragSource ds, Component c)
   {
     super (ds, c);
   }
 
+  /**
+   * Creates a <code>MouseDragGestureRecognizer</code> object.
+   */
   protected MouseDragGestureRecognizer (DragSource ds)
   {
     super (ds);
diff --git a/libjava/java/awt/font/FontRenderContext.java b/libjava/java/awt/font/FontRenderContext.java
new file mode 100644 (file)
index 0000000..b8202a8
--- /dev/null
@@ -0,0 +1,115 @@
+/* FontRenderContext.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.font;
+
+import java.awt.geom.AffineTransform;
+
+/**
+ * @author Michael Koch
+ */
+public class FontRenderContext
+{
+  private AffineTransform affineTransform;
+  private boolean isAntiAliased;
+  private boolean usesFractionalMetrics;
+  /**
+   * Construct a new <code>FontRenderContext</code>.
+   */
+  protected FontRenderContext()
+  {
+    // Do nothing here.
+  }
+  /**
+   * Construct a new <code>FontRenderContext</code>.
+   */
+  public FontRenderContext (AffineTransform tx, boolean isAntiAliased,
+                            boolean usesFractionalMetrics)
+  {
+    if (tx != null
+        && !tx.isIdentity ())
+      {
+        this.affineTransform = new AffineTransform (tx);
+      }
+    
+    this.isAntiAliased = isAntiAliased;
+    this.usesFractionalMetrics = usesFractionalMetrics;
+  }
+
+  public boolean equals (Object obj)
+  {
+    if (! (obj instanceof FontRenderContext))
+      return false;
+
+    return equals ((FontRenderContext) obj);
+  }
+
+  public boolean equals (FontRenderContext rhs)
+  {
+    return (affineTransform.equals (rhs.getTransform ())
+            && isAntiAliased == rhs.isAntiAliased ()
+            && usesFractionalMetrics == rhs.usesFractionalMetrics ());
+  }
+
+  public AffineTransform getTransform ()
+  {
+    return affineTransform;
+  }
+
+  /**
+   * Returns the hash code of the font render context.
+   */
+  public int hashCode ()
+  {
+    // FIXME: check what SUN does here.
+    return affineTransform == null ? 0 : affineTransform.hashCode ();
+  }
+
+  public boolean isAntiAliased ()
+  {
+    return isAntiAliased;
+  }
+
+  public boolean usesFractionalMetrics ()
+  {
+    return usesFractionalMetrics;
+  }
+}
diff --git a/libjava/java/awt/font/GlyphJustificationInfo.java b/libjava/java/awt/font/GlyphJustificationInfo.java
new file mode 100644 (file)
index 0000000..e95a2c9
--- /dev/null
@@ -0,0 +1,77 @@
+/* GlyphJustificationInfo.java
+   Copyright (C) 2003 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.font;
+
+/**
+ * @author Michael Koch
+ */
+public final class GlyphJustificationInfo
+{
+  public static final int PRIORITY_KASHIDA = 0;
+  public static final int PRIORITY_WHITESPACE = 1;
+  public static final int PRIORITY_INTERCHAR = 2;
+  public static final int PRIORITY_NONE = 3;
+  
+  public final float weight;
+  public final int growPriority;
+  public final boolean growAbsorb;
+  public final float growLeftLimit;
+  public final float growRightLimit;
+  public final int shrinkPriority;
+  public final boolean shrinkAbsorb;
+  public final float shrinkLeftLimit;
+  public final float shrinkRightLimit;
+       
+  public GlyphJustificationInfo (float weight, boolean growAbsorb,
+                                 int growPriority, float growLeftLimit,
+                                 float growRightLimit, boolean shrinkAbsorb,
+                                 int shrinkPriority, float shrinkLeftLimit,
+                                 float shrinkRightLimit)
+  {
+    this.weight = weight;
+    this.growAbsorb = growAbsorb;
+    this.growPriority = growPriority;
+    this.growLeftLimit = growLeftLimit;
+    this.growRightLimit = growRightLimit;
+    this.shrinkAbsorb = shrinkAbsorb;
+    this.shrinkPriority = shrinkPriority;
+    this.shrinkLeftLimit = shrinkLeftLimit;
+    this.shrinkRightLimit = shrinkRightLimit;
+  }
+}
diff --git a/libjava/java/awt/font/GlyphMetrics.java b/libjava/java/awt/font/GlyphMetrics.java
new file mode 100644 (file)
index 0000000..975f098
--- /dev/null
@@ -0,0 +1,134 @@
+/* GlyphMetrics.java
+   Copyright (C) 2003 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.font;
+
+import java.awt.geom.Rectangle2D;
+
+/**
+ * @author Michael Koch
+ */
+public final class GlyphMetrics
+{
+  public static final byte COMBINING = 2;
+  public static final byte COMPONENT = 3;
+  public static final byte LIGATURE = 1;
+  public static final byte STANDARD = 0;
+  public static final byte WHITESPACE = 4;
+  private boolean horizontal;
+  private float advanceX;
+  private float advanceY;
+  private Rectangle2D bounds;
+  private byte glyphType;
+  
+  public GlyphMetrics (boolean horizontal, float advanceX, float advanceY,
+                       Rectangle2D bounds, byte glyphType)
+  {
+    this.horizontal = horizontal;
+    this.advanceX = advanceX;
+    this.advanceY = advanceY;
+    this.bounds = bounds;
+    this.glyphType = glyphType;
+  }
+  
+  public GlyphMetrics (float advance, Rectangle2D bounds, byte glyphType)
+  {
+    this (true, advance, advance, bounds, glyphType);
+  }
+
+  public float getAdvance ()
+  {
+    return horizontal ? advanceX : advanceY;
+  }
+
+  public float getAdvanceX ()
+  {
+    return advanceX;
+  }
+
+  public float getAdvanceY ()
+  {
+    return advanceY;
+  }
+
+  public Rectangle2D getBounds2D ()
+  {
+    return bounds;
+  }
+
+  public float getLSB ()
+  {
+    throw new Error ("not implemented");
+  }
+
+  public float getRSB ()
+  {
+    throw new Error ("not implemented");
+  }
+
+  public int getType ()
+  {
+    return glyphType;
+  }
+
+  public boolean isCombining ()
+  {
+    return (glyphType == COMBINING);
+  }
+
+  public boolean isComponent ()
+  {
+    return (glyphType == COMPONENT);
+  }
+
+  public boolean isLigature()
+  {
+    return (glyphType == LIGATURE);
+  }
+
+  public boolean isStandard()
+  {
+    return (glyphType == STANDARD);
+  }
+
+  public boolean isWhitespace()
+  {
+    return (glyphType == WHITESPACE);
+  }
+}
diff --git a/libjava/java/awt/font/GlyphVector.java b/libjava/java/awt/font/GlyphVector.java
new file mode 100644 (file)
index 0000000..ae103b8
--- /dev/null
@@ -0,0 +1,145 @@
+/* GlyphVector.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.font;
+
+import java.awt.Font;
+import java.awt.Rectangle;
+import java.awt.Shape;
+import java.awt.geom.AffineTransform;
+import java.awt.geom.Point2D;
+import java.awt.geom.Rectangle2D;
+
+/**
+ * @author Michael Koch
+ */
+public abstract class GlyphVector implements Cloneable
+{
+  public static final int FLAG_COMPLEX_GLYPHS = 8;
+  public static final int FLAG_HAS_POSITION_ADJUSTMENTS = 2;
+  public static final int FLAG_HAS_TRANSFORMS = 1;
+  public static final int FLAG_MASK = 15;
+  public static final int FLAG_RUN_RTL = 4;
+
+  /**
+   * Constructs a <code>GlyphVector</code> object.
+   */
+  public GlyphVector ()
+  {
+  }
+
+  public abstract boolean equals (GlyphVector set);
+
+  public abstract Font getFont ();
+
+  public abstract FontRenderContext getFontRenderContext ();
+    
+  public int getGlyphCharIndex (int glyphIndex)
+  {
+    throw new Error ("not implemented");
+  }
+    
+  public int[] getGlyphCharIndices (int beginGlyphIndex, int numEntries,
+                                    int[] codeReturn)
+  {
+    throw new Error ("not implemented");
+  }
+    
+  public abstract int getGlyphCode (int glyphIndex);
+
+  public abstract int[] getGlyphCodes (int beginGlyphIndex, int numEntries,
+                                       int[] codeReturn);
+
+  public abstract GlyphJustificationInfo getGlyphJustificationInfo
+    (int glyphIndex);
+
+  public abstract Shape getGlyphLogicalBounds (int glyphIndex);
+
+  public abstract GlyphMetrics getGlyphMetrics (int glyphIndex);
+
+  public abstract Shape getGlyphOutline (int glyphIndex);
+
+  public Shape getGlyphOutline (int glyphIndex, float x, float y)
+  {
+    throw new Error ("not implemented");
+  }
+
+  public Rectangle getGlyphPixelBounds (int index, FontRenderContext renderFRC,
+                                        float x, float y)
+  {
+    throw new Error ("not implemented");
+  }
+
+  public abstract Point2D getGlyphPosition (int glyphIndex);
+
+  public abstract float[] getGlyphPositions (int beginGlyphIndex,
+                                             int numEntries,
+                                             float[] positionReturn);
+
+  public abstract AffineTransform getGlyphTransform (int glyphIndex);
+
+  public abstract Shape getGlyphVisualBounds (int glyphIndex);
+
+  public int getLayoutFlags ()
+  {
+    throw new Error ("not implemented");
+  }
+
+  public abstract Rectangle2D getLogicalBounds ();
+
+  public abstract int getNumGlyphs ();
+  
+  public abstract Shape getOutline ();
+
+  public abstract Shape getOutline (float x, float y);
+
+  public Rectangle getPixelBounds (FontRenderContext renderFRC,
+                                   float x, float y)
+  {
+    throw new Error ("not implemented");
+  }
+
+  public abstract Rectangle2D getVisualBounds ();
+
+  public abstract void performDefaultLayout ();
+
+  public abstract void setGlyphPosition (int glyphIndex, Point2D newPos);
+
+  public abstract void setGlyphTransform (int glyphIndex,
+                                          AffineTransform newTX);
+}
diff --git a/libjava/java/awt/font/GraphicAttribute.java b/libjava/java/awt/font/GraphicAttribute.java
new file mode 100644 (file)
index 0000000..377b8da
--- /dev/null
@@ -0,0 +1,84 @@
+/* GraphicAttribute.java
+   Copyright (C) 2003 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.font;
+
+import java.awt.Graphics2D;
+import java.awt.geom.Rectangle2D;
+
+/**
+ * @author Michael Koch
+ */
+public abstract class GraphicAttribute
+{
+  public static final int BOTTOM_ALIGNMENT = -2;
+  public static final int CENTER_BASELINE = 1;
+  public static final int HANGING_BASELINE = 2;
+  public static final int ROMAN_BASELINE = 0;
+  public static final int TOP_ALIGNMENT = -1;
+
+  private int alignment;
+  
+  protected GraphicAttribute (int alignment)
+  {
+    this.alignment = alignment;
+  }
+
+  public abstract void draw (Graphics2D graphics, float x, float y);
+
+  public abstract float getAdvance ();
+
+  public int getAlignment ()
+  {
+    return alignment;
+  }
+
+  public abstract float getAscent ();
+
+  public Rectangle2D getBounds ()
+  {
+    throw new Error ("not implemented");
+  }
+
+  public abstract float getDescent ();
+
+  public GlyphJustificationInfo getJustificationInfo ()
+  {
+    throw new Error ("not implemented");
+  }
+}
diff --git a/libjava/java/awt/font/ImageGraphicAttribute.java b/libjava/java/awt/font/ImageGraphicAttribute.java
new file mode 100644 (file)
index 0000000..ca5b95f
--- /dev/null
@@ -0,0 +1,109 @@
+/* ImageGraphicAttribute.java
+   Copyright (C) 2003 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.font;
+
+import java.awt.Graphics2D;
+import java.awt.Image;
+import java.awt.geom.Rectangle2D;
+
+/**
+ * @author Michael Koch
+ */
+public class ImageGraphicAttribute extends GraphicAttribute
+{
+  private Image image;
+  
+  public ImageGraphicAttribute (Image image, int alignment)
+  {
+    super (alignment);
+    this.image = image;
+  }
+
+  public ImageGraphicAttribute (Image image, int alignment, float originX,
+                                float originY)
+  {
+    super (alignment);
+    this.image = image;
+    
+    throw new Error ("not implemented");
+  }
+
+  public void draw (Graphics2D graphics, float x, float y)
+  {
+    throw new Error ("not implemented");
+  }
+
+  public boolean equals (Object obj)
+  {
+    if (! (obj instanceof ImageGraphicAttribute))
+      return false;
+
+    return equals ((ImageGraphicAttribute) obj);
+  }
+
+  public boolean equals (ImageGraphicAttribute rhs)
+  {
+    throw new Error ("not implemented");
+  }
+
+  public float getAdvance ()
+  {
+    throw new Error ("not implemented");
+  }
+
+  public float getAscent ()
+  {
+    throw new Error ("not implemented");
+  }
+
+  public Rectangle2D getBounds () 
+  {
+    throw new Error ("not implemented");
+  }
+
+  public float getDescent ()
+  {
+    throw new Error ("not implemented");
+  }
+
+  public int hashCode ()
+  {
+    throw new Error ("not implemented");
+  }
+}
diff --git a/libjava/java/awt/font/LineBreakMeasurer.java b/libjava/java/awt/font/LineBreakMeasurer.java
new file mode 100644 (file)
index 0000000..19f1525
--- /dev/null
@@ -0,0 +1,113 @@
+/* LineBreakMeasurer.java
+   Copyright (C) 2003 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.font;
+
+import java.text.AttributedCharacterIterator;
+import java.text.BreakIterator;
+
+public final class LineBreakMeasurer
+{
+  private AttributedCharacterIterator ci;
+  private FontRenderContext frc;
+  private BreakIterator bi;
+
+  /**
+   * Constructs a <code>LineBreakMeasurer</code> object.
+   */
+  public LineBreakMeasurer (AttributedCharacterIterator text,
+                            FontRenderContext frc)
+  {
+    this (text, null, frc);
+  }
+
+  /**
+   * Constructs a <code>LineBreakMeasurer</code> object.
+   */
+  public LineBreakMeasurer (AttributedCharacterIterator text,
+                            BreakIterator breakIter, FontRenderContext frc) 
+  {
+    this.ci = text;
+    this.bi = breakIter;
+    this.frc = frc;
+  }
+
+  public void deleteChar (AttributedCharacterIterator newParagraph,
+                          int deletePos)
+  {
+    throw new Error ("not implemented");
+  }
+
+  public int getPosition ()
+  {
+    return ci.getIndex ();
+  }
+
+  public void insertChar (AttributedCharacterIterator newParagraph,
+                          int insertPos)
+  {
+    throw new Error ("not implemented");
+  }
+
+  public TextLayout nextLayout (float wrappingWidth)
+  {
+    throw new Error ("not implemented");
+  }
+
+  public TextLayout nextLayout (float wrappingWidth, int offsetLimit,
+                                boolean requireNextWord)
+  {
+    throw new Error ("not implemented");
+  }
+
+  public int nextOffset (float wrappingWidth)
+  {
+    throw new Error ("not implemented");
+  }
+
+  public int nextOffset (float wrappingWidth, int offsetLimit,
+                         boolean requireNextWord)
+  {
+    throw new Error ("not implemented");
+  }
+
+  public void setPosition (int newPosition)
+  {
+    ci.setIndex (newPosition);
+  }
+}
diff --git a/libjava/java/awt/font/LineMetrics.java b/libjava/java/awt/font/LineMetrics.java
new file mode 100644 (file)
index 0000000..580de8f
--- /dev/null
@@ -0,0 +1,67 @@
+/* LineMetrics.java -- Information about about a line display characteristics
+   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.font;
+
+/**
+ * @author Michael Koch
+ */
+public abstract class LineMetrics
+{
+  public abstract float getAscent();
+  
+  public abstract int getBaselineIndex();
+  
+  public abstract float[] getBaselineOffsets();
+  
+  public abstract float getDescent();
+  
+  public abstract float getHeight();
+  
+  public abstract float getLeading();
+  
+  public abstract int getNumChars();
+  
+  public abstract float getStrikethroughOffset();
+  
+  public abstract float getStrikethroughThickness();
+  
+  public abstract float getUnderlineOffset();
+  
+  public abstract float getUnderlineThickness();
+}
diff --git a/libjava/java/awt/font/MultipleMaster.java b/libjava/java/awt/font/MultipleMaster.java
new file mode 100644 (file)
index 0000000..4fe6916
--- /dev/null
@@ -0,0 +1,61 @@
+/* MultipleMaster.java
+   Copyright (C) 2003 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.font;
+
+import java.awt.Font;
+
+/**
+ * @author Michael Koch
+ */
+public interface MultipleMaster
+{
+  public Font deriveMMFont (float[] axes);
+  
+  public Font deriveMMFont (float[] glyphWidths, float avgStemWidth,
+                            float typicalCapHeight, float typicalXHeight,
+                            float italicAngle);
+  
+  public float[] getDesignAxisDefaults ();
+  
+  public String[] getDesignAxisNames ();
+  
+  public float[] getDesignAxisRanges ();
+  
+  public int getNumDesignAxes ();
+}
diff --git a/libjava/java/awt/font/NumericShaper.java b/libjava/java/awt/font/NumericShaper.java
new file mode 100644 (file)
index 0000000..de934f2
--- /dev/null
@@ -0,0 +1,137 @@
+/* NumericShaper.java
+   Copyright (C) 2003 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.font;
+
+import java.io.Serializable;
+
+/**
+ * @author Michael Koch
+ * @since 1.4
+ */
+public final class NumericShaper implements Serializable
+{
+  private static final long serialVersionUID = -8022764705923730308L;
+  
+  public static final int ALL_RANGES  = 524287;
+  public static final int ARABIC  = 2;
+  public static final int BENGALI  = 16;
+  public static final int DEVANAGARI  = 8;
+  public static final int EASTERN_ARABIC  = 4;
+  public static final int ETHIOPIC  = 65536;
+  public static final int EUROPEAN  = 1;
+  public static final int GUJARATI  = 64;
+  public static final int GURMUKHI  = 32;
+  public static final int KANNADA  = 1024;
+  public static final int KHMER  = 131072;
+  public static final int LAO  = 8192;
+  public static final int MALAYALAM  = 2048;
+  public static final int MONGOLIAN  = 262144;
+  public static final int MYANMAR  = 32768;
+  public static final int ORIYA  = 128;
+  public static final int TAMIL  = 256;
+  public static final int TELUGU  = 512;
+  public static final int THAI  = 4096;
+  public static final int TIBETAN  = 16384;
+
+  private int ranges;
+  private int context;
+  
+  private NumericShaper (int ranges, int context)
+  {
+    this.ranges = ranges;
+    this.context = context;
+  }
+
+  public boolean equals (Object obj)
+  {
+    if (! (obj instanceof NumericShaper))
+      return false;
+
+    NumericShaper tmp = (NumericShaper) obj;
+    
+    return (ranges == tmp.ranges
+            && context == tmp.context);
+  }
+
+  public static NumericShaper getContextualShaper (int ranges)
+  {
+    throw new Error ("not implemented");
+  }
+
+  public static NumericShaper getContextualShaper (int ranges,
+                                                   int defaultContext)
+  {
+    throw new Error ("not implemented");
+  }
+
+  public int getRanges ()
+  {
+    return ranges;
+  }
+
+  public static NumericShaper getShaper (int singleRange)
+  {
+    throw new Error ("not implemented");
+  }
+
+  public int hashCode ()
+  {
+    throw new Error ("not implemented");
+  }
+
+  public boolean isContextual ()
+  {
+    throw new Error ("not implemented");
+  }
+
+  public void shape (char[] text, int start, int count)
+  {
+    shape (text, start, count, context);
+  }
+
+  public void shape (char[] text, int start, int count, int context)
+  {
+    throw new Error ("not implemented");
+  }
+
+  public String toString ()
+  {
+    throw new Error ("not implemented");
+  }
+}
diff --git a/libjava/java/awt/font/OpenType.java b/libjava/java/awt/font/OpenType.java
new file mode 100644 (file)
index 0000000..df5ed52
--- /dev/null
@@ -0,0 +1,111 @@
+/* OpenType.java
+   Copyright (C) 2003 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.font;
+
+/**
+ * @author Michael Koch
+ */
+public interface OpenType
+{
+  int TAG_ACNT = 1633906292;
+  int TAG_AVAR = 1635148146;
+  int TAG_BASE = 1111577413;
+  int TAG_BDAT = 1650745716;
+  int TAG_BLOC = 1651273571;
+  int TAG_BSLN = 1651731566;
+  int TAG_CFF = 1128678944;
+  int TAG_CMAP = 1668112752;
+  int TAG_CVAR = 1668702578;
+  int TAG_CVT = 1668707360;
+  int TAG_DSIG = 1146308935;
+  int TAG_EBDT = 1161970772;
+  int TAG_EBLC = 1161972803;
+  int TAG_EBSC = 1161974595;
+  int TAG_FDSC = 1717859171;
+  int TAG_FEAT = 1717920116;
+  int TAG_FMTX = 1718449272;
+  int TAG_FPGM = 1718642541;
+  int TAG_FVAR = 1719034226;
+  int TAG_GASP = 1734439792;
+  int TAG_GDEF = 1195656518;
+  int TAG_GLYF = 1735162214;
+  int TAG_GPOS = 1196445523;
+  int TAG_GSUB = 1196643650;
+  int TAG_GVAR = 1735811442;
+  int TAG_HDMX = 1751412088;
+  int TAG_HEAD = 1751474532;
+  int TAG_HHEA = 1751672161;
+  int TAG_HMTX = 1752003704;
+  int TAG_JSTF = 1246975046;
+  int TAG_JUST = 1786082164;
+  int TAG_KERN = 1801810542;
+  int TAG_LCAR = 1818452338;
+  int TAG_LOCA = 1819239265;
+  int TAG_LTSH = 1280594760;
+  int TAG_MAXP = 1835104368;
+  int TAG_MMFX = 1296909912;
+  int TAG_MMSD = 1296913220;
+  int TAG_MORT = 1836020340;
+  int TAG_NAME = 1851878757;
+  int TAG_OPBD = 1836020340;
+  int TAG_OS2 = 1330851634;
+  int TAG_PCLT = 1346587732;
+  int TAG_POST = 1886352244;
+  int TAG_PREP = 1886545264;
+  int TAG_PROP = 1886547824;
+  int TAG_TRAK = 1953653099;
+  int TAG_TYP1 = 1954115633;
+  int TAG_VDMX = 1447316824;
+  int TAG_VHEA = 1986553185;
+  int TAG_VMTX = 1986884728;
+  
+  public byte[] getFontTable (int sfntTag);
+  
+  public byte[] getFontTable (int sfntTag, int offset, int count);
+  
+  public byte[] getFontTable (String strSfntTag);
+  
+  public byte[] getFontTable (String strSfntTag, int offset, int count);
+  
+  public int getFontTableSize (int sfntTag);
+  
+  public int getFontTableSize (String strSfntTag);
+  
+  public int getVersion ();
+}
diff --git a/libjava/java/awt/font/ShapeGraphicAttribute.java b/libjava/java/awt/font/ShapeGraphicAttribute.java
new file mode 100644 (file)
index 0000000..12ae9cd
--- /dev/null
@@ -0,0 +1,105 @@
+/* ShapeGraphicAttribute.java
+   Copyright (C) 2003 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.font;
+
+import java.awt.Graphics2D;
+import java.awt.Shape;
+import java.awt.geom.Rectangle2D;
+
+public final class ShapeGraphicAttribute extends GraphicAttribute
+{
+  public static final boolean FILL = false;
+  public static final boolean STROKE = true;
+
+  private Shape shape;
+  private boolean stroke;
+  
+  public ShapeGraphicAttribute (Shape shape, int alignment, boolean stroke)
+  {
+    super (alignment);
+    this.shape = shape;
+    this.stroke = stroke;
+  }
+
+  public void draw (Graphics2D graphics, float x, float y)
+  {
+    throw new Error ("not implemented");
+  }
+
+  public boolean equals (Object obj)
+  {
+    if (! (obj instanceof ShapeGraphicAttribute))
+      return false;
+
+    return equals ((ShapeGraphicAttribute) obj);
+  }
+
+  public boolean equals (ShapeGraphicAttribute rhs)
+  {
+    return (shape.equals (rhs.shape)
+            && getAlignment () == rhs.getAlignment ()
+            && stroke == rhs.stroke);
+  }
+
+  public float getAdvance ()
+  {
+    throw new Error ("not implemented");
+  }
+
+  public float getAscent ()
+  {
+    throw new Error ("not implemented");
+  }
+
+  public Rectangle2D getBounds ()
+  {
+    return shape.getBounds2D ();
+  }
+
+  public float getDescent ()
+  {
+    throw new Error ("not implemented");
+  }
+
+  public int hashCode ()
+  {
+    // FIXME: Check what SUN does here
+    return shape.hashCode ();
+  }
+}
diff --git a/libjava/java/awt/font/TextAttribute.java b/libjava/java/awt/font/TextAttribute.java
new file mode 100644 (file)
index 0000000..ccc8049
--- /dev/null
@@ -0,0 +1,121 @@
+/* TextAttribute.java
+   Copyright (C) 2003 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.font;
+
+import java.text.AttributedCharacterIterator;
+
+public final class TextAttribute extends AttributedCharacterIterator.Attribute
+{
+  private static final long serialVersionUID = 7744112784117861702L;
+  
+  public static final TextAttribute BACKGROUND =
+    new TextAttribute ("BACKGROUND");
+  public static final TextAttribute BIDI_EMBEDDING =
+    new TextAttribute ("BIDI_EMBEDDING");
+  public static final TextAttribute CHAR_REPLACEMENT =
+    new TextAttribute ("CHAR_REPLACEMENT");
+  public static final TextAttribute FAMILY = new TextAttribute ("FAMILY");
+  public static final TextAttribute FONT = new TextAttribute ("FONT");
+  public static final TextAttribute FOREGROUND =
+    new TextAttribute ("FOREGROUND");
+  public static final TextAttribute INPUT_METHOD_HIGHLIGHT =
+    new TextAttribute ("INPUT_METHOD_HIGHLIGHT");
+  public static final TextAttribute INPUT_METHOD_UNDERLINE =
+    new TextAttribute ("INPUT_METHOD_UNDERLINE");
+  public static final TextAttribute JUSTIFICATION =
+    new TextAttribute ("JUSTIFICATION");
+  public static final Float JUSTIFICATION_FULL = new Float (1.0);
+  public static final Float JUSTIFICATION_NONE = new Float (0.0);
+  public static final TextAttribute NUMERIC_SHAPING =
+    new TextAttribute ("NUMERIC_SHAPING");
+  public static final TextAttribute POSTURE = new TextAttribute ("POSTURE");
+  public static final Float POSTURE_OBLIQUE = new Float (0.2);
+  public static final Float POSTURE_REGULAR = new Float (0.0);
+  public static final TextAttribute RUN_DIRECTION =
+    new TextAttribute ("RUN_DIRECTION");
+  public static final Boolean RUN_DIRECTION_LTR = new Boolean (true);
+  public static final Boolean RUN_DIRECTION_RTL = new Boolean (false);
+  public static final TextAttribute SIZE = new TextAttribute ("SIZE");
+  public static final TextAttribute STRIKETHROUGH =
+    new TextAttribute ("STRIKETHROUGH");
+  public static final Boolean STRIKETHROUGH_ON = new Boolean (true);
+  public static final TextAttribute SUPERSCRIPT =
+    new TextAttribute ("SUPERSCRIPT");
+  public static final Integer SUPERSCRIPT_SUB = new Integer (-1);
+  public static final Integer SUPERSCRIPT_SUPER = new Integer (1);
+  public static final TextAttribute SWAP_COLORS =
+    new TextAttribute ("SWAP_COLORS");
+  public static final Boolean SWAP_COLORS_ON = new Boolean (true);
+  public static final TextAttribute TRANSFORM = new TextAttribute ("TRANSFORM");
+  public static final TextAttribute UNDERLINE = new TextAttribute ("UNDERLINE");
+  public static final Integer UNDERLINE_LOW_DASHED = new Integer (0);
+  public static final Integer UNDERLINE_LOW_DOTTED = new Integer (0);
+  public static final Integer UNDERLINE_LOW_GRAY = new Integer (0);
+  public static final Integer UNDERLINE_LOW_ONE_PIXEL = new Integer (0);
+  public static final Integer UNDERLINE_LOW_TWO_PIXEL = new Integer (0);
+  public static final Integer UNDERLINE_ON = new Integer (0);
+  public static final TextAttribute WEIGHT = new TextAttribute ("WEIGHT");
+  public static final Float WEIGHT_BOLD = new Float (2.0);
+  public static final Float WEIGHT_DEMIBOLD = new Float (1.75);
+  public static final Float WEIGHT_DEMILIGHT = new Float (0.875);
+  public static final Float WEIGHT_EXTRA_LIGHT = new Float (0.5);
+  public static final Float WEIGHT_EXTRABOLD = new Float (2.5);
+  public static final Float WEIGHT_HEAVY = new Float (2.25);
+  public static final Float WEIGHT_LIGHT = new Float (0.75);
+  public static final Float WEIGHT_MEDIUM = new Float (1.5);
+  public static final Float WEIGHT_REGULAR = new Float (1.0);
+  public static final Float WEIGHT_SEMIBOLD = new Float (1.25);
+  public static final Float WEIGHT_ULTRABOLD = new Float (2.75);
+  public static final TextAttribute WIDTH = new TextAttribute ("");
+  public static final Float WIDTH_CONDENSED = new Float (0.75);
+  public static final Float WIDTH_EXTENDED = new Float (1.5);
+  public static final Float WIDTH_REGULAR = new Float (1.0);
+  public static final Float WIDTH_SEMI_CONDENSED = new Float (0.875);
+  public static final Float WIDTH_SEMI_EXTENDED = new Float (1.25);
+             
+  protected TextAttribute (String name)
+  {
+    super (name);
+  }
+  
+  protected Object readResolve ()
+  {
+    throw new Error ("not implemented");
+  }
+}
diff --git a/libjava/java/awt/font/TextLayout.java b/libjava/java/awt/font/TextLayout.java
new file mode 100644 (file)
index 0000000..60c4966
--- /dev/null
@@ -0,0 +1,321 @@
+/* TextLayout.java
+   Copyright (C) 2003 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.font;
+
+import java.awt.Font;
+import java.awt.Graphics2D;
+import java.awt.Shape;
+import java.awt.geom.AffineTransform;
+import java.awt.geom.Rectangle2D;
+import java.text.AttributedCharacterIterator;
+import java.util.Map;
+
+/**
+ * @author Michael Koch
+ */
+public final class TextLayout implements Cloneable
+{
+  public static final CaretPolicy DEFAULT_CARET_POLICY = new CaretPolicy ();
+
+  public static class CaretPolicy
+  {
+    public CaretPolicy ()
+    {
+      // Do nothing here.
+    }
+
+    public TextHitInfo getStrongCaret (TextHitInfo hit1, TextHitInfo hit2,
+                                       TextLayout layout)
+    {
+      throw new Error ("not implemented");
+    }
+  }
+
+  private FontRenderContext fontRenderContext;
+  
+  public TextLayout (AttributedCharacterIterator text, FontRenderContext frc)
+  {
+    // FIXME
+    this.fontRenderContext = frc;
+  }
+
+  public TextLayout (String string, Font font, FontRenderContext frc) 
+  {
+    // FIXME
+    this.fontRenderContext = frc;
+  }
+
+  public TextLayout (String string, Map attributes, FontRenderContext frc) 
+  {
+    // FIXME
+    this.fontRenderContext = frc;
+  }
+
+  protected Object clone ()
+  {
+    try
+      {
+        return super.clone ();
+      }
+    catch (CloneNotSupportedException e)
+      {
+        // This should never occur
+        throw new InternalError ();
+      }
+  }
+
+  public void draw (Graphics2D g2, float x, float y) 
+  {
+    throw new Error ("not implemented");
+  }
+
+  public boolean equals (Object obj)
+  {
+    if (! (obj instanceof TextLayout))
+      return false;
+
+    return equals ((TextLayout) obj);
+  }
+
+  public boolean equals (TextLayout tl)
+  {
+    throw new Error ("not implemented");
+  }
+
+  public float getAdvance ()
+  {
+    throw new Error ("not implemented");
+  }
+
+  public float getAscent ()
+  {
+    throw new Error ("not implemented");
+  }
+
+  public byte getBaseline ()
+  {
+    throw new Error ("not implemented");
+  }
+
+  public float[] getBaselineOffsets ()
+  {
+    throw new Error ("not implemented");
+  }
+
+  public Shape getBlackBoxBounds (int firstEndpoint, int secondEndpoint)
+  {
+    throw new Error ("not implemented");
+  }
+
+  public Rectangle2D getBounds()
+  {
+    throw new Error ("not implemented");
+  }
+
+  public float[] getCaretInfo (TextHitInfo hit)
+  {
+    throw new Error ("not implemented");
+  }
+
+  public float[] getCaretInfo (TextHitInfo hit, Rectangle2D bounds)
+  {
+    throw new Error ("not implemented");
+  }
+
+  public Shape getCaretShape (TextHitInfo hit)
+  {
+    throw new Error ("not implemented");
+  }
+
+  public Shape getCaretShape (TextHitInfo hit, Rectangle2D bounds)
+  {
+    throw new Error ("not implemented");
+  }
+
+  public Shape[] getCaretShapes (int offset)
+  {
+    throw new Error ("not implemented");
+  }
+
+  public Shape[] getCaretShapes (int offset, Rectangle2D bounds)
+  {
+    throw new Error ("not implemented");
+  }
+
+  public Shape[] getCaretShapes (int offset, Rectangle2D bounds,
+                                 TextLayout.CaretPolicy policy)
+  {
+    throw new Error ("not implemented");
+  }
+
+  public int getCharacterCount ()
+  {
+    throw new Error ("not implemented");
+  }
+
+  public byte getCharacterLevel (int index)
+  {
+    throw new Error ("not implemented");
+  }
+
+  public float getDescent ()
+  {
+    throw new Error ("not implemented");
+  }
+
+  public TextLayout getJustifiedLayout (float justificationWidth)
+  {
+    throw new Error ("not implemented");
+  }
+
+  public float getLeading ()
+  {
+    throw new Error ("not implemented");
+  }
+
+  public Shape getLogicalHighlightShape (int firstEndpoint, int secondEndpoint)
+  {
+    throw new Error ("not implemented");
+  }
+
+  public Shape getLogicalHighlightShape (int firstEndpoint, int secondEndpoint,
+                                         Rectangle2D bounds)
+  {
+    throw new Error ("not implemented");
+  }
+
+  public int[] getLogicalRangesForVisualSelection (TextHitInfo firstEndpoint,
+                                                   TextHitInfo secondEndpoint)
+  {
+    throw new Error ("not implemented");
+  }
+
+  public TextHitInfo getNextLeftHit (int offset)
+  {
+    throw new Error ("not implemented");
+  }
+
+  public TextHitInfo getNextLeftHit (int offset, TextLayout.CaretPolicy policy)
+  {
+    throw new Error ("not implemented");
+  }
+
+  public TextHitInfo getNextLeftHit (TextHitInfo hit)
+  {
+    throw new Error ("not implemented");
+  }
+
+  public TextHitInfo getNextRightHit (int offset)
+  {
+    throw new Error ("not implemented");
+  }
+
+  public TextHitInfo getNextRightHit (int offset, TextLayout.CaretPolicy policy)
+  {
+    throw new Error ("not implemented");
+  }
+
+  public TextHitInfo getNextRightHit (TextHitInfo hit)
+  {
+    throw new Error ("not implemented");
+  }
+
+  public Shape getOutline (AffineTransform tx)
+  {
+    throw new Error ("not implemented");
+  }
+
+  public float getVisibleAdvance ()
+  {
+    throw new Error ("not implemented");
+  }
+
+  public Shape getVisualHighlightShape (TextHitInfo firstEndpoint,
+                                        TextHitInfo secondEndpoint)
+  {
+    throw new Error ("not implemented");
+  }
+
+  public Shape getVisualHighlightShape (TextHitInfo firstEndpoint,
+                                        TextHitInfo secondEndpoint,
+                                        Rectangle2D bounds)
+  {
+    throw new Error ("not implemented");
+  }
+
+  public TextHitInfo getVisualOtherHit (TextHitInfo hit)
+  {
+    throw new Error ("not implemented");
+  }
+
+  protected void handleJustify (float justificationWidth)
+  {
+    throw new Error ("not implemented");
+  }
+
+  public int hashCode ()
+  {
+    throw new Error ("not implemented");
+  }
+
+  public TextHitInfo hitTestChar (float x, float y)
+  {
+    throw new Error ("not implemented");
+  }
+
+  public TextHitInfo hitTestChar (float x, float y, Rectangle2D bounds)
+  {
+    throw new Error ("not implemented");
+  }
+
+  public boolean isLeftToRight ()
+  {
+    throw new Error ("not implemented");
+  }
+
+  public boolean isVertical ()
+  {
+    throw new Error ("not implemented");
+  }
+
+  public String toString ()
+  {
+    throw new Error ("not implemented");
+  }
+}
diff --git a/libjava/java/awt/font/TextMeasurer.java b/libjava/java/awt/font/TextMeasurer.java
new file mode 100644 (file)
index 0000000..2aa5a07
--- /dev/null
@@ -0,0 +1,97 @@
+/* TextMeasurer.java
+   Copyright (C) 2003 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.font;
+
+import java.text.AttributedCharacterIterator;
+
+/**
+ * @author Michael Koch
+ * @since 1.3
+ */
+public final class TextMeasurer implements Cloneable
+{
+  private AttributedCharacterIterator ci;
+  private FontRenderContext frc;
+  
+  public TextMeasurer (AttributedCharacterIterator text, FontRenderContext frc)
+  {
+    this.ci = text;
+    this.frc = frc;
+  }
+
+  protected Object clone ()
+  {
+    try
+      {
+        return super.clone ();
+      }
+    catch (CloneNotSupportedException e)
+      {
+        // This may never occur
+        throw new InternalError ();
+      }
+  }
+
+  public void deleteChar (AttributedCharacterIterator newParagraph,
+                          int deletePos)
+  {
+    throw new Error ("not implemented");
+  }
+
+  public float getAdvanceBetween (int start, int limit)
+  {
+    throw new Error ("not implemented");
+  }
+
+  public TextLayout getLayout (int start, int limit)
+  {
+    throw new Error ("not implemented");
+  }
+
+  public int getLineBreakIndex (int start, float maxAdvance)
+  {
+    throw new Error ("not implemented");
+  }
+
+  public void insertChar (AttributedCharacterIterator newParagraph,
+                          int insertPos)
+  {
+    throw new Error ("not implemented");
+  }
+}
diff --git a/libjava/java/awt/font/TransformAttribute.java b/libjava/java/awt/font/TransformAttribute.java
new file mode 100644 (file)
index 0000000..b241704
--- /dev/null
@@ -0,0 +1,73 @@
+/* TransformAttribute.java
+   Copyright (C) 2003 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.font;
+
+import java.awt.geom.AffineTransform;
+import java.io.Serializable;
+
+/**
+ * @author Michael Koch
+ */
+public final class TransformAttribute implements Serializable
+{
+  private static final long serialVersionUID = 3356247357827709530L;
+
+  private AffineTransform affineTransform;
+  
+  public TransformAttribute (AffineTransform transform) 
+  {
+    if (transform != null)
+      {
+        this.affineTransform = new AffineTransform (transform);
+      }
+  }
+
+  public AffineTransform getTransform ()
+  {
+    return affineTransform;
+  }
+
+  /**
+   * @since 1.4
+   */
+  public boolean isIdentity ()
+  {
+    return (affineTransform == null ? false : affineTransform.isIdentity ());
+  }
+}
index cba4aec23d14c7419ef9960e9f189af965d06592..e4e8587277b7f3ccdb96e9998f6822e8c90ea8d5 100644 (file)
@@ -43,7 +43,7 @@ package java.awt.print;
   *
   * @author Aaron M. Renn (arenn@urbanophile.com)
   */
-public class Paper
+public class Paper implements Cloneable
 {
 
 /*
index b9e558caa26452384103a10bb95e859b458a28fa..ccaf5dcb782c8e35759ba77e565afd68852450c9 100644 (file)
@@ -118,8 +118,7 @@ getJobName();
   *
   * @param job_name The name of the print job.
   */
-public abstract String
-setJobName(String job_name);
+public abstract void setJobName (String job_name);
 
 /*************************************************************************/
 
@@ -195,8 +194,7 @@ pageDialog(PageFormat page_format);
 /**
   * Prints the pages.
   */
-public abstract void
-print();
+public abstract void print () throws PrinterException;
 
 /**
   * Displays a dialog box to the user which allows the print job