[cp-patches] FYI: Thread javadoc tweaks

2006-11-30 Thread Gary Benson
Hi all,

This commit adds a couple of notes to java.lang.Thread's
javadoc that were in libgcj but not in Classpath.

Cheers,
Gary
Index: ChangeLog
===
RCS file: /cvsroot/classpath/classpath/ChangeLog,v
retrieving revision 1.8884
diff -u -r1.8884 ChangeLog
--- ChangeLog   29 Nov 2006 20:48:29 -  1.8884
+++ ChangeLog   30 Nov 2006 09:29:54 -
@@ -1,3 +1,7 @@
+2006-11-30  Gary Benson  [EMAIL PROTECTED]
+
+   * java/lang/Thread.java: Javadoc fixes.
+
 2006-11-29  Tania Bento  [EMAIL PROTECTED]
 
* tools/gnu/classpath/tools/appletviewer/TagParser.java:
Index: java/lang/Thread.java
===
RCS file: /cvsroot/classpath/classpath/java/lang/Thread.java,v
retrieving revision 1.31
diff -u -r1.31 Thread.java
--- java/lang/Thread.java   1 Jul 2006 12:56:10 -   1.31
+++ java/lang/Thread.java   30 Nov 2006 09:29:54 -
@@ -850,11 +850,13 @@
* are no guarantees which thread will be next to run, but most VMs will
* choose the highest priority thread that has been waiting longest.
*
-   * @param ms the number of milliseconds to sleep.
+   * @param ms the number of milliseconds to sleep, or 0 for forever
* @throws InterruptedException if the Thread is (or was) interrupted;
* it's iinterrupted status/i will be cleared
* @throws IllegalArgumentException if ms is negative
* @see #interrupt()
+   * @see #notify()
+   * @see #wait(long)
*/
   public static void sleep(long ms) throws InterruptedException
   {
@@ -874,13 +876,15 @@
* immediately when time expires, because some other thread may be
* active.  So don't expect real-time performance.
*
-   * @param ms the number of milliseconds to sleep
+   * @param ms the number of milliseconds to sleep, or 0 for forever
* @param ns the number of extra nanoseconds to sleep (0-99)
* @throws InterruptedException if the Thread is (or was) interrupted;
* it's iinterrupted status/i will be cleared
* @throws IllegalArgumentException if ms or ns is negative
* or ns is larger than 99.
* @see #interrupt()
+   * @see #notify()
+   * @see #wait(long, int)
*/
   public static void sleep(long ms, int ns) throws InterruptedException
   {


[cp-patches] FYI: HTML Frame(set) support

2006-11-30 Thread Roman Kennke
This implements support for HTML frames. Right now it supports frame
layout by absolute, percent (%) and relative (*) values. It misses frame
borders and margins, but these will be added real soon.

It can even layout frames in grids (when both the rows and cols
attributes are set on a frameset). This is one more feature that is not
supported by Sun:

http://kennke.org/~roman/framesgridsun.png
http://kennke.org/~roman/framesgridcp.png
http://kennke.org/~roman/frames.html

2006-11-30  Roman Kennke  [EMAIL PROTECTED]

* javax/swing/text/html/FrameSetView.java: New class. Implements
HTML framesets.
* javax/swing/text/html/FrameView.java: New class. Implements
HTML frames.
* javax/swing/text/html/HTMLDocument.java:
(HTMLReader.addSpecialElement): Only add one artificial space.
* javax/swing/text/html/HTMLEditorKit.java
(HTMLFactory.create): Uncomment code for FrameSetView and FrameView.
* gnu/javax/swing/text/html/parser/support/Parser.java
(_handleEmptyTag): Also consume whitespace after frame tags.

/Roman
Index: javax/swing/text/html/FrameSetView.java
===
RCS file: javax/swing/text/html/FrameSetView.java
diff -N javax/swing/text/html/FrameSetView.java
--- /dev/null	1 Jan 1970 00:00:00 -
+++ javax/swing/text/html/FrameSetView.java	30 Nov 2006 13:41:59 -
@@ -0,0 +1,274 @@
+/* FrameSetView.java -- Implements HTML frameset
+   Copyright (C) 2006 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., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 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 javax.swing.text.html;
+
+import java.util.StringTokenizer;
+
+import javax.swing.text.AttributeSet;
+import javax.swing.text.BoxView;
+import javax.swing.text.Element;
+import javax.swing.text.View;
+import javax.swing.text.ViewFactory;
+
+/**
+ * Implements HTML framesets. This is implemented as a vertical box that
+ * holds the rows of the frameset. Each row is again a horizontal box that
+ * holds the actual columns.
+ */
+public class FrameSetView
+  extends BoxView
+{
+
+  /**
+   * A row of a frameset.
+   */
+  private class FrameSetRow
+extends BoxView
+  {
+private int row;
+FrameSetRow(Element el, int r)
+{
+  super(el, X_AXIS);
+  row = r;
+}
+
+protected void loadChildren(ViewFactory f)
+{
+  // Load the columns here.
+  Element el = getElement();
+  View[] columns = new View[numViews[X_AXIS]];
+  int offset = row * numViews[X_AXIS];
+  for (int c = 0; c  numViews[X_AXIS]; c++)
+{
+  Element child = el.getElement(offset + c);
+  columns[c] = f.create(child);
+}
+  replace(0, 0, columns);
+}
+
+protected void layoutMajorAxis(int targetSpan, int axis, int[] offsets,
+   int[] spans)
+{
+  int numRows = numViews[X_AXIS];
+  int[] abs = absolute[X_AXIS];
+  int[] rel = relative[X_AXIS];
+  int[] perc = percent[X_AXIS];
+  layoutViews(targetSpan, axis, offsets, spans, numRows, abs, rel, perc);
+}
+  }
+
+  /**
+   * Holds the absolute layout information for the views along one axis. The
+   * indices are absolute[axis][index], where axis is either X_AXIS (columns)
+   * or Y_AXIS (rows). Rows or columns that don't have absolute layout have
+   * a -1 in 

[cp-patches] FYI: BufferedImageGraphics transforms

2006-11-30 Thread Francis Kung
Hi,

This patch fixes some one-pixel offsets appearing in some images with
custom composites.  Any transforms should be applied to the buffered
composite prior to the compositing operation, rather than afterwards.

Also rolled into this patch is some minor fix-up and simplification to
an earlier patch, calculating scanlines and heights for buffered image
updating.

Cheers,
Francis


2006-11-30  Francis Kung  [EMAIL PROTECTED]

* gnu/java/awt/peer/gtk/BufferedImageGraphics.java
(draw): Set transform in buffered composite.
(drawComposite): Do not transform bounds; round bounds.
(drawGlyphVector):  Set transform in buffered composite.
(drawRenderedImage):  Set transform in buffered composite.
(fill):  Set transform in buffered composite.
(updateBufferedImage): Fix scanline  height calculations.
* gnu/java/awt/peer/gtk/CairoGraphics2D.java
(createPath): Simplify width  height calculation.
(drawImage): Also transform width  height.

Index: gnu/java/awt/peer/gtk/BufferedImageGraphics.java
===
RCS file: /cvsroot/classpath/classpath/gnu/java/awt/peer/gtk/BufferedImageGraphics.java,v
retrieving revision 1.19
diff -u -r1.19 BufferedImageGraphics.java
--- gnu/java/awt/peer/gtk/BufferedImageGraphics.java	24 Nov 2006 16:33:26 -	1.19
+++ gnu/java/awt/peer/gtk/BufferedImageGraphics.java	30 Nov 2006 18:37:57 -
@@ -248,13 +248,13 @@
 if (sm.getScanlineStride() == imageWidth  minX == 0) 
   {
 System.arraycopy(pixels, y * imageWidth, 
- db, y * imageWidth - minY,
+ db, (y - minY) * imageWidth,
  height * imageWidth);
   }
 else
   {
 int scanline = sm.getScanlineStride();
-for (int i = y; i  height; i++)
+for (int i = y; i  (height + y); i++)
   System.arraycopy(pixels, i * imageWidth + x, db,
(i - minY) * scanline + x - minX, width);
   
@@ -313,6 +313,7 @@
 Graphics2D g2d = (Graphics2D)buffer.getGraphics();
 g2d.setStroke(this.getStroke());
 g2d.setColor(this.getColor());
+g2d.setTransform(transform);
 g2d.draw(s);
 
 drawComposite(r.getBounds2D(), null);
@@ -334,6 +335,7 @@
 Graphics2D g2d = (Graphics2D)buffer.getGraphics();
 g2d.setPaint(this.getPaint());
 g2d.setColor(this.getColor());
+g2d.setTransform(transform);
 g2d.fill(s);
 
 drawComposite(s.getBounds2D(), null);
@@ -353,6 +355,7 @@
 
 Graphics2D g2d = (Graphics2D)buffer.getGraphics();
 g2d.setRenderingHints(this.getRenderingHints());
+g2d.setTransform(transform);
 g2d.drawRenderedImage(image, xform);
 
 drawComposite(buffer.getRaster().getBounds(), null);
@@ -427,43 +430,64 @@
 Graphics2D g2d = (Graphics2D)buffer.getGraphics();
 g2d.setPaint(this.getPaint());
 g2d.setStroke(this.getStroke());
+g2d.setTransform(transform);
 g2d.drawGlyphVector(gv, x, y);
 
 drawComposite(bounds, null);
   }
   }
   
+  /**
+   * Perform composite drawing from the buffer onto the main image.
+   * 
+   * The image to be composited should already be drawn into the buffer, in the
+   * proper place, after all necessary transforms have been applied.
+   * 
+   * @param bounds The bounds to draw, in user-space.
+   * @param observer The image observer, if any (may be null).
+   * @return True on success, false on failure.
+   */
   private boolean drawComposite(Rectangle2D bounds, ImageObserver observer)
   {
-// Clip source to visible areas that need updating
-Rectangle2D clip = this.getClipBounds();
-Rectangle2D.intersect(bounds, clip, bounds);
-clip = new Rectangle(buffer.getMinX(), buffer.getMinY(),
- buffer.getWidth(), buffer.getHeight());
-Rectangle2D.intersect(bounds, clip, bounds);
+// Find bounds in device space
+double[] points = new double[] {bounds.getX(), bounds.getY(),
+bounds.getMaxX(), bounds.getMaxY()};
+transform.transform(points, 0, points, 0, 2);
+bounds = new Rectangle2D.Double(points[0], points[1],
+(points[2] - points[0]),
+(points[3] - points[1]));
+
+// Clip bounds by the stored clip, and by the internal buffer
+Rectangle2D devClip = this.getClipInDevSpace();
+Rectangle2D.intersect(bounds, devClip, bounds);
+devClip = new Rectangle(buffer.getMinX(), buffer.getMinY(),
+buffer.getWidth(), buffer.getHeight());
+Rectangle2D.intersect(bounds, devClip, bounds);
+
+// Round bounds as needed, but be conservative in our rounding
+// (otherwise it may leave 

[cp-patches] FYI: ElementIterator fixup

2006-11-30 Thread Roman Kennke
In implementing the form submit feature for HTML I (first) made use of
the ElementIterator class. There have been a couple of problems. Most
importantly, the iteration seemed to go beyong the root element upwards
in the element tree.
I found the implementation a little hard to grok and then a little
fragile. I have changed it a little to keep the state together with the
elements on a Stack and fixed my problems while doing so.

2006-11-30  Roman Kennke  [EMAIL PROTECTED]

* javax/swing/text/ElementIterator.java
(ElementRef): New inner class.
(currentDepth): Removed.
(currentElement): Removed.
(previousItem): Removed.
(stack): New field. Holds the iteration stack.
(state): Removed.
(ElementIterator(Document)): Removed init of removed fields.
(ElementIterator(Element)): Removed init of removed fields.
(current): Changed to stack based algorithm.
(deepestLeaf): New helper method.
(depth): Changed to stack based algorithm.
(first): Changed to stack based algorithm.
(next): Changed to stack based algorithm.
(previous): Changed to stack based algorithm.

/Roman

Index: javax/swing/text/ElementIterator.java
===
RCS file: /cvsroot/classpath/classpath/javax/swing/text/ElementIterator.java,v
retrieving revision 1.2
diff -u -1 -5 -r1.2 ElementIterator.java
--- javax/swing/text/ElementIterator.java	22 Aug 2005 11:35:23 -	1.2
+++ javax/swing/text/ElementIterator.java	30 Nov 2006 19:00:17 -
@@ -25,157 +25,248 @@
 
 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 javax.swing.text;
 
+import java.util.Stack;
+
 /**
  * This class can be used to iterate over the [EMAIL PROTECTED] Element} tree of
  * a [EMAIL PROTECTED] Document} or an [EMAIL PROTECTED] Element}.  This iterator performs
  * an in-order traversal -- first it visits a node, then each of the
  * node's children in order.  No locking is performed during the
  * iteration; that is up to the caller.
  */
 public class ElementIterator implements Cloneable
 {
+  /**
+   * Uses to track the iteration on the stack. 
+   */
+  private class ElementRef
+  {
+/**
+ * The element.
+ */
+Element element;
+
+/**
+ * The child index. -1 means the element itself. = 0 values mean the
+ * n-th child of the element.
+ */
+int index;
+
+/**
+ * Creates a new ElementRef.
+ *
+ * @param el the element
+ */
+ElementRef(Element el)
+{
+  element = el;
+  index = -1;
+}
+  }
+
   // The root element.
   private Element root;
-  // The current element.
-  private Element currentElement;
-  // The depth to which we have descended in the tree.
-  private int currentDepth;
-
-  // This is at least as big as the current depth, and at index N
-  // contains the index of the child element we're currently
-  // examining.
-  private int[] state;
 
-  // The previous item.
-  private Element previousItem;
+  /**
+   * Holds ElementRefs.
+   */
+  private Stack stack;
 
   /**
* Create a new ElementIterator to iterate over the given document.
* @param document the Document over which we iterate
*/
   public ElementIterator(Document document)
   {
-this.root = document.getDefaultRootElement();
-this.currentElement = root;
-this.state = new int[5];
+root = document.getDefaultRootElement();
   }
 
   /**
* Create a new ElementIterator to iterate over the given document.
* @param root the Document over which we iterate
*/
   public ElementIterator(Element root)
   {
 this.root = root;
-this.currentElement = root;
-this.state = new int[5];
   }
 
   /**
* Returns a new ElementIterator which is a clone of this
* ElementIterator.
*/
   public Object clone()
   {
 try
   {
 	return super.clone();
   }
 catch (CloneNotSupportedException _)
   {
 	// Can't happen.
 	return null;
   }
   }
 
   /**
* Returns the current element.
*/
   public Element current()
   {
-return currentElement;
+Element current;
+if (stack == null)
+  current = first();
+else
+  {
+current = null;
+if (! stack.isEmpty())
+  {
+

[cp-patches] FYI: Form submit support

2006-11-30 Thread Roman Kennke
This implements basic form submit support for the Swing html package.
You can now try and start a google search (although, the results pages
render quite ugly right now).

Coincidentally this API-completes the package against JDK1.5. :-)


2006-11-30  Roman Kennke  [EMAIL PROTECTED]

* javax/swing/text/html/FormSubmitEvent.java: New class.
* javax/swing/text/html/FormView.java
(SubmitThread): New class for submitting data in a separate thread.
(actionPerformed): Fetch the actual for data.
(addData): New helper method.
(getElementFormData): New helper method.
(getFormData): New helper method.
(getInputFormData): New helper method.
(submitData): Implemented.
* javax/swing/text/html/FrameView.java
(createComponent): Add this as hyperlink listener.
Set the target document as frame document.
(getTopEditorPane): New helper method.
(hyperlinkUpdate): Implementation of the HyperlinkListener interface.
(handleHyperlinkEvent): New helper method.
(handleFormSubmitEvent): New helper method.
* javax/swing/text/html/HTMLDocument.java
(HTMLReader.BaseAction.start): Track the base target.
(HTMLReader.BaseAction.end): Removed.
(baseTarget): New field.
(frameDocument): New field.
(getBaseTarget): New property accessor.
(isFrameDocument): New property accessor.
(processHTMLFrameHyperlinkEvent): Implemented.
(setFrameDocument): New property accessor.
(updateFrame): New helper method.
(updateFrameSet): New helper method.
* javax/swing/text/html/HTMLEditorKit.java
(LinkController.createHyperlinkEvent): Handle frame documents.
(autoFormSubmission): New field.
(HTMLEditorKit): Set autoFormSubmission to true.
(isAutoFormSubmission): New property accessor.
(setAutoFormSubmission): New property accessor.

/Roman
Index: javax/swing/text/html/FormSubmitEvent.java
===
RCS file: javax/swing/text/html/FormSubmitEvent.java
diff -N javax/swing/text/html/FormSubmitEvent.java
--- /dev/null	1 Jan 1970 00:00:00 -
+++ javax/swing/text/html/FormSubmitEvent.java	30 Nov 2006 19:37:07 -
@@ -0,0 +1,123 @@
+/* FormSubmitEvent.java -- Event fired on form submit
+   Copyright (C) 2006 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., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 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 javax.swing.text.html;
+
+import java.net.URL;
+
+import javax.swing.text.Element;
+
+/**
+ * The event fired on form submit.
+ *
+ * @since 1.5
+ */
+public class FormSubmitEvent
+  extends HTMLFrameHyperlinkEvent
+{
+
+  // FIXME: Use enums when available.
+  /**
+   * The submit method.
+   */
+  public static class MethodType
+  {
+/**
+ * Indicates a form submit with HTTP method POST.
+ */
+public static final MethodType POST = new MethodType();
+
+/**
+ * Indicates a form submit with HTTP method GET.
+ */
+public static final MethodType GET = new MethodType();
+
+private MethodType()
+{
+}
+  }
+
+  /**
+   * The submit method.
+   */
+  private MethodType method;
+
+  /**
+   * The actual submit data.
+   */
+  private String data;
+
+  /**
+   * Creates a new FormSubmitEvent.
+   *
+   * 

[cp-testresults] Japi diffs for classpath

2006-11-30 Thread Stuart Ballard
Japi diff jdk12 vs classpath:
Full results:
http://www.kaffe.org/~stuart/japi/htmlout/h-jdk12-classpath.html

Changes since last run:

-Comparison run at Wed Nov 29 12:00:57 2006 GMT
-jdk12 API scanned at 2006/11/29 05:01:23 EST
-classpath API scanned at 2006/11/29 06:50:28 EST
+Comparison run at Thu Nov 30 12:01:50 2006 GMT
+jdk12 API scanned at 2006/11/30 05:01:11 EST
+classpath API scanned at 2006/11/30 06:51:17 EST
-java.awt.font: 96.47% good
+java.awt.font: 100% good
-Total: 99.79% good, 0.01% missing
+Total: 99.81% good, 0.01% missing


Japi diff jdk15 vs classpath:
Full results:
http://www.kaffe.org/~stuart/japi/htmlout/h-jdk15-classpath.html

Changes since last run:

-Comparison run at Wed Nov 29 12:08:28 2006 GMT
-jdk15 API scanned at 2006/11/29 05:19:57 EST
-classpath API scanned at 2006/11/29 06:50:28 EST
+Comparison run at Thu Nov 30 12:09:04 2006 GMT
+jdk15 API scanned at 2006/11/30 05:19:36 EST
+classpath API scanned at 2006/11/30 06:51:17 EST
-javax.swing.plaf.basic: 99.78% good, 0.05% bad, 0.15% missing
+javax.swing.plaf.basic: 99.81% good, 0.05% bad, 0.12% missing
-Interfaces: 1 minor, 30 bad, 18 missing.
+Interfaces: 1 minor, 30 bad, 17 missing.
-interface javax.swing.plaf.basic.DragRecognitionSupport.BeforeDrag: missing in 
classpath


Japi diff jdk6 vs classpath:
Full results:
http://www.kaffe.org/~stuart/japi/htmlout/h-jdk6-classpath.html

Changes since last run:

-Comparison run at Wed Nov 29 12:14:06 2006 GMT
-jdk6 API scanned at 2006/11/29 05:32:29 EST
-classpath API scanned at 2006/11/29 06:50:28 EST
+Comparison run at Thu Nov 30 12:14:41 2006 GMT
+jdk6 API scanned at 2006/11/30 05:31:54 EST
+classpath API scanned at 2006/11/30 06:51:17 EST
-java.awt: 95.58% good, 0.01% minor, 0.3% bad, 4.08% missing
+java.awt: 95.78% good, 0.01% minor, 0.3% bad, 3.88% missing
-javax.swing.plaf.basic: 99.55% good, 0.05% bad, 0.38% missing
+javax.swing.plaf.basic: 99.57% good, 0.05% bad, 0.36% missing
-Total: 85.91% good, 0.08% minor, 0.85% bad, 13.13% missing
+Total: 85.93% good, 0.08% minor, 0.85% bad, 13.12% missing
-Interfaces: 1 minor, 41 bad, 34 missing.
-Enums: 31 missing.
+Interfaces: 1 minor, 41 bad, 33 missing.
+Enums: 30 missing.
-enum java.awt.EventFilter.FilterAction: missing in classpath
-interface javax.swing.plaf.basic.DragRecognitionSupport.BeforeDrag: missing in 
classpath


Japi diff jdk7 vs classpath:
Full results:
http://www.kaffe.org/~stuart/japi/htmlout/h-jdk7-classpath.html

Changes since last run:

-Comparison run at Wed Nov 29 12:20:14 2006 GMT
-jdk7 API scanned at 2006/11/29 05:45:04 EST
-classpath API scanned at 2006/11/29 06:50:28 EST
+Comparison run at Thu Nov 30 12:20:24 2006 GMT
+jdk7 API scanned at 2006/11/30 05:44:56 EST
+classpath API scanned at 2006/11/30 06:51:17 EST
-java.awt: 95.58% good, 0.01% minor, 0.3% bad, 4.08% missing
+java.awt: 95.78% good, 0.01% minor, 0.3% bad, 3.88% missing
-javax.swing.plaf.basic: 99.55% good, 0.05% bad, 0.38% missing
+javax.swing.plaf.basic: 99.57% good, 0.05% bad, 0.36% missing
-Total: 85.91% good, 0.08% minor, 0.85% bad, 13.13% missing
+Total: 85.93% good, 0.08% minor, 0.85% bad, 13.12% missing
-Interfaces: 1 minor, 41 bad, 34 missing.
-Enums: 31 missing.
+Interfaces: 1 minor, 41 bad, 33 missing.
+Enums: 30 missing.
-enum java.awt.EventFilter.FilterAction: missing in classpath
-interface javax.swing.plaf.basic.DragRecognitionSupport.BeforeDrag: missing in 
classpath




___
Classpath-testresults mailing list
Classpath-testresults@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath-testresults


[cp-testresults] Japi diffs for classpath-generics

2006-11-30 Thread Stuart Ballard
Japi diff jdk12 vs classpath-generics:
Full results:
http://www.kaffe.org/~stuart/japi/htmlout/h-jdk12-classpath-generics.html

Changes since last run:

-Comparison run at Wed Nov 29 12:34:15 2006 GMT
-jdk12 API scanned at 2006/11/29 05:01:23 EST
-classpath-generics API scanned at 2006/11/29 07:23:29 EST
+Comparison run at Thu Nov 30 12:34:28 2006 GMT
+jdk12 API scanned at 2006/11/30 05:01:11 EST
+classpath-generics API scanned at 2006/11/30 07:23:39 EST
-java.awt.dnd: 99.55% good, 0.44% missing
+java.awt.dnd: 100% good
-java.awt.font: 93.15% good, 3.31% missing
+java.awt.font: 100% good
-java.beans.beancontext: 94.61% good, 5.38% missing
+java.beans.beancontext: 98.87% good, 1.12% missing
-Total: 99.74% good, 0.06% missing
+Total: 99.81% good, 0.01% missing
-Methods: 48 missing.
+Methods: 8 missing.
-java.awt.dnd:
-Missing
-method 
java.awt.dnd.DropTarget.DropTargetAutoScroller.actionPerformed(java.awt.event.ActionEvent):
 not implemented in classpath-generics
-method java.awt.dnd.DropTarget.DropTargetAutoScroller.stop(): not implemented 
in classpath-generics
-
-java.awt.font:
-Missing
-method java.awt.font.TextLayout.getCaretInfo(java.awt.font.TextHitInfo, 
java.awt.geom.Rectangle2D): not implemented in classpath-generics
-method java.awt.font.TextLayout.getCaretShape(java.awt.font.TextHitInfo, 
java.awt.geom.Rectangle2D): not implemented in classpath-generics
-method java.awt.font.TextLayout.getCaretShapes(int, 
java.awt.geom.Rectangle2D): not implemented in classpath-generics
-method java.awt.font.TextLayout.getCaretShapes(int, java.awt.geom.Rectangle2D, 
java.awt.font.TextLayout.CaretPolicy): missing in classpath-generics
-method 
java.awt.font.TextLayout.getLogicalRangesForVisualSelection(java.awt.font.TextHitInfo,
 java.awt.font.TextHitInfo): not implemented in classpath-generics
-method java.awt.font.TextLayout.getNextLeftHit(int): not implemented in 
classpath-generics
-method java.awt.font.TextLayout.getNextLeftHit(int, 
java.awt.font.TextLayout.CaretPolicy): missing in classpath-generics
-method java.awt.font.TextLayout.getNextLeftHit(java.awt.font.TextHitInfo): not 
implemented in classpath-generics
-method java.awt.font.TextLayout.getNextRightHit(int): not implemented in 
classpath-generics
-method java.awt.font.TextLayout.getNextRightHit(int, 
java.awt.font.TextLayout.CaretPolicy): missing in classpath-generics
-method java.awt.font.TextLayout.getNextRightHit(java.awt.font.TextHitInfo): 
not implemented in classpath-generics
-method 
java.awt.font.TextLayout.getVisualHighlightShape(java.awt.font.TextHitInfo, 
java.awt.font.TextHitInfo, java.awt.geom.Rectangle2D): not implemented in 
classpath-generics
-method java.awt.font.TextLayout.getVisualOtherHit(java.awt.font.TextHitInfo): 
not implemented in classpath-generics
-method java.awt.font.TextLayout.hashCode(): not implemented in 
classpath-generics
-method java.awt.font.TextLayout.hitTestChar(float, float, 
java.awt.geom.Rectangle2D): not implemented in classpath-generics
-method 
java.awt.font.TextLayout.CaretPolicy.getStrongCaret(java.awt.font.TextHitInfo, 
java.awt.font.TextHitInfo, java.awt.font.TextLayout): not implemented in 
classpath-generics
-
-method 
java.beans.beancontext.BeanContextServicesSupport.childJustRemovedHook(java.lang.Object,
 java.beans.beancontext.BeanContextSupport.BCSChild): not implemented in 
classpath-generics
-method 
java.beans.beancontext.BeanContextServicesSupport.createBCSSServiceProvider(java.lang.Class,
 java.beans.beancontext.BeanContextServiceProvider): not implemented in 
classpath-generics
-method 
java.beans.beancontext.BeanContextServicesSupport.getBeanContextServicesPeer(): 
not implemented in classpath-generics
-method 
java.beans.beancontext.BeanContextServicesSupport.getChildBeanContextServicesListener(java.lang.Object):
 not implemented in classpath-generics
-method 
java.beans.beancontext.BeanContextServicesSupport.getService(java.beans.beancontext.BeanContextChild,
 java.lang.Object, java.lang.Class, java.lang.Object, 
java.beans.beancontext.BeanContextServiceRevokedListener): not implemented in 
classpath-generics
-method 
java.beans.beancontext.BeanContextServicesSupport.releaseService(java.beans.beancontext.BeanContextChild,
 java.lang.Object, java.lang.Object): not implemented in classpath-generics
-method 
java.beans.beancontext.BeanContextServicesSupport.revokeService(java.lang.Class,
 java.beans.beancontext.BeanContextServiceProvider, boolean): not implemented 
in classpath-generics
-method java.beans.beancontext.BeanContextSupport.avoidingGui(): not 
implemented in classpath-generics
-method 
java.beans.beancontext.BeanContextSupport.bcsPreDeserializationHook(java.io.ObjectInputStream):
 not implemented in classpath-generics
-method 
java.beans.beancontext.BeanContextSupport.bcsPreSerializationHook(java.io.ObjectOutputStream):
 not implemented in classpath-generics
-method 
java.beans.beancontext.BeanContextSupport.childDeserializedHook(java.lang.Object,
 

[cp-testresults] FAIL: regressions for mauve-jamvm on Thu Nov 30 18:56:56 UTC 2006

2006-11-30 Thread cpdev
Baseline from: Sat Nov 25 16:55:44 UTC 2006

Regressions:
FAIL: java.awt.Graphics.TestPaintGraphics
FAIL: java.awt.TextField.PaintTest
FAIL: java.lang.Thread.sleep
FAIL: java.lang.ThreadGroup.insecurity
FAIL: java.net.InetAddress.InetAddressTest
FAIL: java.text.MessageFormat.parse
FAIL: java.text.NumberFormat.UK
FAIL: java.text.SimpleDateFormat.regress
FAIL: locales.LocaleTest

Improvements:
PASS: gnu.javax.crypto.sasl.srp.TestOfSRPPasswordFile
PASS: java.text.DecimalFormat.MaximumAndMinimumDigits
PASS: java.text.DecimalFormat.PR23996
PASS: java.text.DecimalFormat.applyPattern
PASS: java.text.DecimalFormat.constructors
PASS: java.text.DecimalFormat.equals
PASS: java.text.DecimalFormat.format
PASS: java.text.DecimalFormat.formatToCharacterIterator
PASS: java.text.DecimalFormat.toPattern14
PASS: java.util.Vector.AcuniaVectorTest
PASS: javax.swing.JLabel.setText
PASS: javax.swing.JToolTip.setTipText
PASS: javax.swing.border.TitledBorder.getBorderInsets

New fails:

Totals:
PASS: 2901
XPASS: 0
FAIL: 193
XFAIL: 0


___
Classpath-testresults mailing list
Classpath-testresults@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath-testresults


[cp-testresults] FAIL: regressions for mauve-cacao on Thu Nov 30 19:24:04 UTC 2006

2006-11-30 Thread cpdev
Baseline from: Sat Nov 25 17:18:39 UTC 2006

Regressions:
FAIL: gnu.javax.crypto.key.srp6.TestOfSRPKeyGeneration
FAIL: java.awt.Component.keyPressTest
FAIL: java.awt.Graphics.TestPaintGraphics
FAIL: java.awt.TextField.PaintTest
FAIL: java.text.MessageFormat.parse
FAIL: java.text.NumberFormat.UK
FAIL: java.text.SimpleDateFormat.regress
FAIL: locales.LocaleTest

Improvements:
PASS: java.text.DecimalFormat.MaximumAndMinimumDigits
PASS: java.text.DecimalFormat.PR23996
PASS: java.text.DecimalFormat.applyPattern
PASS: java.text.DecimalFormat.constructors
PASS: java.text.DecimalFormat.equals
PASS: java.text.DecimalFormat.format
PASS: java.text.DecimalFormat.formatToCharacterIterator
PASS: java.text.DecimalFormat.toPattern14
PASS: java.util.Vector.AcuniaVectorTest
PASS: javax.swing.JLabel.setText
PASS: javax.swing.JToolTip.setTipText
PASS: javax.swing.border.TitledBorder.getBorderInsets

New fails:

Totals:
PASS: 2896
XPASS: 0
FAIL: 198
XFAIL: 0


___
Classpath-testresults mailing list
Classpath-testresults@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath-testresults


Migration to generics opens up exciting optimization opportunities from annotations

2006-11-30 Thread Ian Rogers

Hi,

I believe there are some interesting optimization opportunities that 
flow from the move to generics that enables the proper use of 
annotations. For example a code sequence such as:


static final int specialValue = 123;
void foo() {
  Integer bar1 = Integer.valueOf(specialValue);
  
  invoke some methods
  ...
  Integer bar2 = Integer.valueOf(specialValue);
  ...
}

could be optimized to:

static final int specialValue = 123;
void foo() {
  Integer bar1 = Integer.valueOf(specialValue);
  
  invoke some methods
  ...
  Integer bar2 = bar1;
  ...
}

if we knew that the intCache were holding an immutable value. Actually 
there are more exciting optimizations discussed in this paper by Igor 
Pechtchanski and Vivek Sarkar, in particular because of the immutability 
of Strings:


http://citeseer.ist.psu.edu/pechtchanski02immutability.html

I'm interested in adding these optimization to the Jikes RVM, but 
clearly the annotations need adding to Classpath. I was wondering what 
kind of response this would get? I can imagine a gnu.pragma or 
gnu.compilerhint package containing such annotations. It could also 
contain similar compiler hints to those found in GCC attributes. The 
Jikes RVM uses a package called org.vmmagic.pragma for some other 
compiler tricks.


Interested in your responses, thanks,

Ian Rogers
--
http://www.cs.man.ac.uk/~irogers



RE: Migration to generics opens up exciting optimization opportunities from annotations

2006-11-30 Thread Jeroen Frijters
Ian Rogers wrote:
 I'm interested in adding these optimization to the Jikes RVM, but 
 clearly the annotations need adding to Classpath. I was 
 wondering what kind of response this would get?

I've been thinking about using annotations for similar things and one of
the things that I think makes this very viable is that it is easy to
ignore the annotations by changing their RetentionPolicy. So if
someone doesn't want to bloat their class files with a particular
annotation, simply change that annotation's RetentionPolicy to SOURCE.

One thing that this does suggest is that might be a good idea to keep
all these annotations in the same package (or tree of sub packages).

Regards,
Jeroen



Re: Migration to generics opens up exciting optimization opportunities from annotations

2006-11-30 Thread Tom Tromey
 Ian == Ian Rogers [EMAIL PROTECTED] writes:

Ian I'm interested in adding these optimization to the Jikes RVM, but
Ian clearly the annotations need adding to Classpath. I was wondering what
Ian kind of response this would get?

I think it would be fine.  My only concerns are the usual boring
maintenance ones -- clear documentation for the annotations, how
classpath hackers can avoid breaking things (without too much
overhead), etc.

Tom



[commit-cp] classpath gnu/java/awt/peer/gtk/CairoGraphics2D...

2006-11-30 Thread Francis Kung
CVSROOT:/cvsroot/classpath
Module name:classpath
Changes by: Francis Kung fkung06/11/30 18:44:45

Modified files:
gnu/java/awt/peer/gtk: CairoGraphics2D.java 
   BufferedImageGraphics.java 
.  : ChangeLog 

Log message:
2006-11-30  Francis Kung  [EMAIL PROTECTED]

* gnu/java/awt/peer/gtk/BufferedImageGraphics.java
(draw): Set transform in buffered composite.
(drawComposite): Do not transform bounds; round bounds.
(drawGlyphVector):  Set transform in buffered composite.
(drawRenderedImage):  Set transform in buffered composite.
(fill):  Set transform in buffered composite.
(updateBufferedImage): Fix scanline  height calculations.
* gnu/java/awt/peer/gtk/CairoGraphics2D.java
(createPath): Simplify width  height calculation.
(drawImage): Also transform width  height.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/classpath/gnu/java/awt/peer/gtk/CairoGraphics2D.java?cvsroot=classpathr1=1.55r2=1.56
http://cvs.savannah.gnu.org/viewcvs/classpath/gnu/java/awt/peer/gtk/BufferedImageGraphics.java?cvsroot=classpathr1=1.19r2=1.20
http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpathr1=1.8886r2=1.8887




[commit-cp] classpath javax/swing/text/ElementIterator.java...

2006-11-30 Thread Roman Kennke
CVSROOT:/cvsroot/classpath
Module name:classpath
Changes by: Roman Kennke rabbit78 06/11/30 19:05:25

Modified files:
javax/swing/text: ElementIterator.java 
.  : ChangeLog 

Log message:
2006-11-30  Roman Kennke  [EMAIL PROTECTED]

* javax/swing/text/ElementIterator.java
(ElementRef): New inner class.
(currentDepth): Removed.
(currentElement): Removed.
(previousItem): Removed.
(stack): New field. Holds the iteration stack.
(state): Removed.
(ElementIterator(Document)): Removed init of removed fields.
(ElementIterator(Element)): Removed init of removed fields.
(current): Changed to stack based algorithm.
(deepestLeaf): New helper method.
(depth): Changed to stack based algorithm.
(first): Changed to stack based algorithm.
(next): Changed to stack based algorithm.
(previous): Changed to stack based algorithm.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/classpath/javax/swing/text/ElementIterator.java?cvsroot=classpathr1=1.2r2=1.3
http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpathr1=1.r2=1.8889




[commit-cp] classpath ChangeLog javax/swing/text/html/FormV...

2006-11-30 Thread Roman Kennke
CVSROOT:/cvsroot/classpath
Module name:classpath
Changes by: Roman Kennke rabbit78 06/11/30 19:38:05

Modified files:
.  : ChangeLog 
javax/swing/text/html: FormView.java FrameView.java 
   HTMLDocument.java HTMLEditorKit.java 
Added files:
javax/swing/text/html: FormSubmitEvent.java 

Log message:
2006-11-30  Roman Kennke  [EMAIL PROTECTED]

* javax/swing/text/html/FormSubmitEvent.java: New class.
* javax/swing/text/html/FormView.java
(SubmitThread): New class for submitting data in a separate 
thread.
(actionPerformed): Fetch the actual for data.
(addData): New helper method.
(getElementFormData): New helper method.
(getFormData): New helper method.
(getInputFormData): New helper method.
(submitData): Implemented.
* javax/swing/text/html/FrameView.java
(createComponent): Add this as hyperlink listener.
Set the target document as frame document.
(getTopEditorPane): New helper method.
(hyperlinkUpdate): Implementation of the HyperlinkListener 
interface.
(handleHyperlinkEvent): New helper method.
(handleFormSubmitEvent): New helper method.
* javax/swing/text/html/HTMLDocument.java
(HTMLReader.BaseAction.start): Track the base target.
(HTMLReader.BaseAction.end): Removed.
(baseTarget): New field.
(frameDocument): New field.
(getBaseTarget): New property accessor.
(isFrameDocument): New property accessor.
(processHTMLFrameHyperlinkEvent): Implemented.
(setFrameDocument): New property accessor.
(updateFrame): New helper method.
(updateFrameSet): New helper method.
* javax/swing/text/html/HTMLEditorKit.java
(LinkController.createHyperlinkEvent): Handle frame documents.
(autoFormSubmission): New field.
(HTMLEditorKit): Set autoFormSubmission to true.
(isAutoFormSubmission): New property accessor.
(setAutoFormSubmission): New property accessor.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpathr1=1.8889r2=1.8890
http://cvs.savannah.gnu.org/viewcvs/classpath/javax/swing/text/html/FormView.java?cvsroot=classpathr1=1.5r2=1.6
http://cvs.savannah.gnu.org/viewcvs/classpath/javax/swing/text/html/FrameView.java?cvsroot=classpathr1=1.1r2=1.2
http://cvs.savannah.gnu.org/viewcvs/classpath/javax/swing/text/html/HTMLDocument.java?cvsroot=classpathr1=1.53r2=1.54
http://cvs.savannah.gnu.org/viewcvs/classpath/javax/swing/text/html/HTMLEditorKit.java?cvsroot=classpathr1=1.43r2=1.44
http://cvs.savannah.gnu.org/viewcvs/classpath/javax/swing/text/html/FormSubmitEvent.java?cvsroot=classpathrev=1.1