aboutsummaryrefslogtreecommitdiff
path: root/libjava/java/awt
diff options
context:
space:
mode:
Diffstat (limited to 'libjava/java/awt')
-rw-r--r--libjava/java/awt/dnd/DragSourceContext.java8
-rw-r--r--libjava/java/awt/dnd/DragSourceDragEvent.java13
-rw-r--r--libjava/java/awt/dnd/DragSourceDropEvent.java19
-rw-r--r--libjava/java/awt/dnd/DragSourceEvent.java8
-rw-r--r--libjava/java/awt/dnd/DropTarget.java53
-rw-r--r--libjava/java/awt/dnd/DropTargetContext.java21
-rw-r--r--libjava/java/awt/dnd/DropTargetDragEvent.java52
-rw-r--r--libjava/java/awt/dnd/DropTargetDropEvent.java90
-rw-r--r--libjava/java/awt/dnd/DropTargetListener.java2
-rw-r--r--libjava/java/awt/dnd/MouseDragGestureRecognizer.java13
-rw-r--r--libjava/java/awt/font/FontRenderContext.java115
-rw-r--r--libjava/java/awt/font/GlyphJustificationInfo.java77
-rw-r--r--libjava/java/awt/font/GlyphMetrics.java134
-rw-r--r--libjava/java/awt/font/GlyphVector.java145
-rw-r--r--libjava/java/awt/font/GraphicAttribute.java84
-rw-r--r--libjava/java/awt/font/ImageGraphicAttribute.java109
-rw-r--r--libjava/java/awt/font/LineBreakMeasurer.java113
-rw-r--r--libjava/java/awt/font/LineMetrics.java67
-rw-r--r--libjava/java/awt/font/MultipleMaster.java61
-rw-r--r--libjava/java/awt/font/NumericShaper.java137
-rw-r--r--libjava/java/awt/font/OpenType.java111
-rw-r--r--libjava/java/awt/font/ShapeGraphicAttribute.java105
-rw-r--r--libjava/java/awt/font/TextAttribute.java121
-rw-r--r--libjava/java/awt/font/TextLayout.java321
-rw-r--r--libjava/java/awt/font/TextMeasurer.java97
-rw-r--r--libjava/java/awt/font/TransformAttribute.java73
-rw-r--r--libjava/java/awt/print/Paper.java2
-rw-r--r--libjava/java/awt/print/PrinterJob.java6
28 files changed, 2085 insertions, 72 deletions
diff --git a/libjava/java/awt/dnd/DragSourceContext.java b/libjava/java/awt/dnd/DragSourceContext.java
index ca26b94..45191d2 100644
--- a/libjava/java/awt/dnd/DragSourceContext.java
+++ b/libjava/java/awt/dnd/DragSourceContext.java
@@ -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
{
}
diff --git a/libjava/java/awt/dnd/DragSourceDragEvent.java b/libjava/java/awt/dnd/DragSourceDragEvent.java
index 0a1d759..6417492 100644
--- a/libjava/java/awt/dnd/DragSourceDragEvent.java
+++ b/libjava/java/awt/dnd/DragSourceDragEvent.java
@@ -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
diff --git a/libjava/java/awt/dnd/DragSourceDropEvent.java b/libjava/java/awt/dnd/DragSourceDropEvent.java
index 4b70d1b..a645814 100644
--- a/libjava/java/awt/dnd/DragSourceDropEvent.java
+++ b/libjava/java/awt/dnd/DragSourceDropEvent.java
@@ -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
diff --git a/libjava/java/awt/dnd/DragSourceEvent.java b/libjava/java/awt/dnd/DragSourceEvent.java
index 9d5b00b..60f6eb2 100644
--- a/libjava/java/awt/dnd/DragSourceEvent.java
+++ b/libjava/java/awt/dnd/DragSourceEvent.java
@@ -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;
diff --git a/libjava/java/awt/dnd/DropTarget.java b/libjava/java/awt/dnd/DropTarget.java
index 53c0917..09c642c 100644
--- a/libjava/java/awt/dnd/DropTarget.java
+++ b/libjava/java/awt/dnd/DropTarget.java
@@ -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
diff --git a/libjava/java/awt/dnd/DropTargetContext.java b/libjava/java/awt/dnd/DropTargetContext.java
index 86adaad..eca2f6e 100644
--- a/libjava/java/awt/dnd/DropTargetContext.java
+++ b/libjava/java/awt/dnd/DropTargetContext.java
@@ -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
diff --git a/libjava/java/awt/dnd/DropTargetDragEvent.java b/libjava/java/awt/dnd/DropTargetDragEvent.java
index a22ddc8..e95b2d1 100644
--- a/libjava/java/awt/dnd/DropTargetDragEvent.java
+++ b/libjava/java/awt/dnd/DropTargetDragEvent.java
@@ -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
diff --git a/libjava/java/awt/dnd/DropTargetDropEvent.java b/libjava/java/awt/dnd/DropTargetDropEvent.java
index 9a14f22..bb57f23 100644
--- a/libjava/java/awt/dnd/DropTargetDropEvent.java
+++ b/libjava/java/awt/dnd/DropTargetDropEvent.java
@@ -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
diff --git a/libjava/java/awt/dnd/DropTargetListener.java b/libjava/java/awt/dnd/DropTargetListener.java
index 861aa89..8025ff2 100644
--- a/libjava/java/awt/dnd/DropTargetListener.java
+++ b/libjava/java/awt/dnd/DropTargetListener.java
@@ -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
*/
diff --git a/libjava/java/awt/dnd/MouseDragGestureRecognizer.java b/libjava/java/awt/dnd/MouseDragGestureRecognizer.java
index 1ef2e6c..d010324 100644
--- a/libjava/java/awt/dnd/MouseDragGestureRecognizer.java
+++ b/libjava/java/awt/dnd/MouseDragGestureRecognizer.java
@@ -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
index 0000000..b8202a8
--- /dev/null
+++ b/libjava/java/awt/font/FontRenderContext.java
@@ -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
index 0000000..e95a2c9
--- /dev/null
+++ b/libjava/java/awt/font/GlyphJustificationInfo.java
@@ -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
index 0000000..975f098
--- /dev/null
+++ b/libjava/java/awt/font/GlyphMetrics.java
@@ -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
index 0000000..ae103b8
--- /dev/null
+++ b/libjava/java/awt/font/GlyphVector.java
@@ -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
index 0000000..377b8da
--- /dev/null
+++ b/libjava/java/awt/font/GraphicAttribute.java
@@ -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
index 0000000..ca5b95f
--- /dev/null
+++ b/libjava/java/awt/font/ImageGraphicAttribute.java
@@ -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
index 0000000..19f1525
--- /dev/null
+++ b/libjava/java/awt/font/LineBreakMeasurer.java
@@ -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
index 0000000..580de8f
--- /dev/null
+++ b/libjava/java/awt/font/LineMetrics.java
@@ -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
index 0000000..4fe6916
--- /dev/null
+++ b/libjava/java/awt/font/MultipleMaster.java
@@ -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
index 0000000..de934f2
--- /dev/null
+++ b/libjava/java/awt/font/NumericShaper.java
@@ -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
index 0000000..df5ed52
--- /dev/null
+++ b/libjava/java/awt/font/OpenType.java
@@ -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
index 0000000..12ae9cd
--- /dev/null
+++ b/libjava/java/awt/font/ShapeGraphicAttribute.java
@@ -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
index 0000000..ccc8049
--- /dev/null
+++ b/libjava/java/awt/font/TextAttribute.java
@@ -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
index 0000000..60c4966
--- /dev/null
+++ b/libjava/java/awt/font/TextLayout.java
@@ -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
index 0000000..2aa5a07
--- /dev/null
+++ b/libjava/java/awt/font/TextMeasurer.java
@@ -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
index 0000000..b241704
--- /dev/null
+++ b/libjava/java/awt/font/TransformAttribute.java
@@ -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 ());
+ }
+}
diff --git a/libjava/java/awt/print/Paper.java b/libjava/java/awt/print/Paper.java
index cba4aec..e4e8587 100644
--- a/libjava/java/awt/print/Paper.java
+++ b/libjava/java/awt/print/Paper.java
@@ -43,7 +43,7 @@ package java.awt.print;
*
* @author Aaron M. Renn (arenn@urbanophile.com)
*/
-public class Paper
+public class Paper implements Cloneable
{
/*
diff --git a/libjava/java/awt/print/PrinterJob.java b/libjava/java/awt/print/PrinterJob.java
index b9e558c..ccaf5dc 100644
--- a/libjava/java/awt/print/PrinterJob.java
+++ b/libjava/java/awt/print/PrinterJob.java
@@ -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