Re: Multi-byte locales

2005-10-18 Thread Michael Koch
On Tue, Oct 18, 2005 at 12:11:30AM +0200, Florian Weimer wrote:
 It seems that with Sun's JDK, some files are unaccessible if you run
 in a multi-byte locale (something which uses UTF-8, for example)
 because it's not possible to specify an UTF-16 string which is encoded
 to the name of the file you are interested, provided that the file has
 a name which is not a valid character sequence in the current locale.
 (This is not a big deal on UCS-2/UTF-16 platforms, but I'm not really
 sure what the designers thought when they tried to fit this model on
 UNIX.)
 
 Is there some GNU extension which can work around this issue?  On a
 related note, is it possible to access the command line as an array of
 byte arrays?

There is no GNU extension (yet) that van work around this that I'm aware
of. For the other problem use the following untested pseudo-code.

You get the arguments as String[] args:

byte[][] data = new byte[args.length][];
for (int i = 0; i  args.length; i++) {
  data[i][] = args[i].getBytes();
}


Cheers,
Michael
-- 
Escape the Java Trap with GNU Classpath!
http://www.gnu.org/philosophy/java-trap.html

Join the community at http://planet.classpath.org/


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


Re: Multi-byte locales

2005-10-18 Thread Florian Weimer
* Michael Koch:

 There is no GNU extension (yet) that van work around this that I'm aware
 of.

Do you think this (i.e. non-accessible files) is a problem at all?

 You get the arguments as String[] args:

 byte[][] data = new byte[args.length][];
 for (int i = 0; i  args.length; i++) {
   data[i][] = args[i].getBytes();
 }

Doesn't work, really, those strange bytes have already been dropped
by the startup code. 8-(


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


Re: Multi-byte locales

2005-10-18 Thread Michael Koch
On Tue, Oct 18, 2005 at 09:29:53AM +0200, Florian Weimer wrote:
 * Michael Koch:
 
  There is no GNU extension (yet) that van work around this that I'm aware
  of.
 
 Do you think this (i.e. non-accessible files) is a problem at all?

Does files really contain such filenames with weird characters in the wild
out there ? We should at least document well that this is not supported
yet. I dont think this a real problem for now. We can just tell them to
rename the files and it will work if needed.


Cheers,
Michael
-- 
Escape the Java Trap with GNU Classpath!
http://www.gnu.org/philosophy/java-trap.html

Join the community at http://planet.classpath.org/


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


Re: Multi-byte locales

2005-10-18 Thread Florian Weimer
* Michael Koch:

 On Tue, Oct 18, 2005 at 09:29:53AM +0200, Florian Weimer wrote:
 * Michael Koch:
 
  There is no GNU extension (yet) that van work around this that I'm aware
  of.
 
 Do you think this (i.e. non-accessible files) is a problem at all?

 Does files really contain such filenames with weird characters in the wild
 out there ?

It can easily happen if you have two users with different LC_CTYPE
settings.

Most users I know avoid non-ASCII characters in file names like hell,
but this is by no means a universal standard.

 I dont think this a real problem for now. We can just tell them to
 rename the files and it will work if needed.

This depends on what your application does. 8-/


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


[Bug classpath/24422] Proxy deserialization broken

2005-10-18 Thread cvs-commit at developer dot classpath dot org


--- Comment #2 from cvs-commit at developer dot classpath dot org  
2005-10-18 08:22 ---
Subject: Bug 24422

CVSROOT:/cvsroot/classpath
Module name:classpath
Branch: 
Changes by: Jeroen Frijters [EMAIL PROTECTED]05/10/18
08:03:31

Modified files:
.  : ChangeLog 
java/io: ObjectInputStream.java 

Log message:
2005-10-18  Jeroen Frijters  [EMAIL PROTECTED]

* java/io/ObjectInputStream.java
(parseContent): Removed bogus println and fixed bug #24422.

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.5254tr2=1.5255r1=textr2=text
http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/java/io/ObjectInputStream.java.diff?tr1=1.69tr2=1.70r1=textr2=text


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24422



___
Bug-classpath mailing list
Bug-classpath@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-classpath


[fedora-java] Re: JOnAS 4.3.3 on gcj: test results

2005-10-18 Thread Andrew Haley
http://people.redhat.com/~aph/current-jonas-on-gcj-conformance-test-results.html

Archit Shah pointed out that all the JMS tests were failing due to the
class org.objectweb.joram.client.jms.admin.ObjectFactory not being
installed.  Fixing that brings our total up to 96.79%, which as far as
I'm aware is as good as we're likely to get with 4.3.x jonas.

As far as I'm aware this is the first time that anyone has run a full
Java app server on a system using entirely free software, from the
operating system kernel all the way to the top of the stack.  Thanks
and congratulations to everyone who has been involved.

There's still plenty to do, in particular reducing memory consumption,
but this is a significant milestone.

We'll respin gcj and JOnAS in Fedora in a week or two, and after that
I'd like to set up regular testing of JOnAS on gcj to make sure we
don't break anything.

Andrew.

--
fedora-devel-java-list mailing list
[EMAIL PROTECTED]
https://www.redhat.com/mailman/listinfo/fedora-devel-java-list


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


Re: build failure - problems detecting freetype2 headers

2005-10-18 Thread Tom Tromey
 Twisti == Christian Thalinger [EMAIL PROTECTED] writes:

Twisti Nobody is listening to me:
Twisti http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22889

The updated patch looks good to me.  Write a ChangeLog entry and
email it and the patch to me, I'll check it in.

Tom


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


Re: Multi-byte locales

2005-10-18 Thread Tom Tromey
 Florian == Florian Weimer [EMAIL PROTECTED] writes:

Florian Is there some GNU extension which can work around this issue?

Nope.  You could do it some hacky way, e.g. exec a second VM with
different locale settings.  Eww...

Florian On a related note, is it possible to access the command line
Florian as an array of byte arrays?

Nope.

Tom


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


0.19 release meeting - Wed Oct 19 21:00 UTC

2005-10-18 Thread Mark Wielaard
Hi all,

We wanted to have a release the first week of November. So I thought it
would be a good idea to send a reminder that people should see what the
want to get in before that, and what they want to see tested so they
feel confident that 0.19 will be a great developer snapshot worthy of
incorporation into gcc and kaffe as soon as it is released early
November.

If people want we can discuss the open items tomorrow Wednesday October
19 at 21:00 UTC in #classpath on irc.gnu.org. That is 23:00 in
Amsterdam, 22:00 in Londen and 5:00 PM in Boston.
More times at:
http://www.timeanddate.com/worldclock/fixedtime.html?year=2005month=10day=19hour=21min=0sec=0

But feel free to just reply to this email with suggestions and ideas if
you cannot make it to the meeting. We will make sure to post a summary
of anything discussed to the list also.

Cheers,

Mark

-- 
Escape the Java Trap with GNU Classpath!
http://www.gnu.org/philosophy/java-trap.html

Join the community at http://planet.classpath.org/


signature.asc
Description: This is a digitally signed message part
___
Classpath mailing list
Classpath@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath


Re: 0.19 release meeting - Wed Oct 19 21:00 UTC

2005-10-18 Thread Martin Cordova
Hi think that it would be great if the graphics stuff gets enhanced
for the november release, in particular the libraries required to make
headless graphics work (for servlet based apps that use JFreeChart and
similar components). This is the only thing that is not working in my
test while porting Winstone servlet engine and demo webapp from IBM's
JDK to JamVM + Classpath. Most typical web tasks are working fine,
although I have not tested JSSE support yet.

I can't collaborate writing C code, but I can provide a test
environment, as I did to uncover some bugs in the java.net APIs a few
weeks ago, which by the way were solved very quickly, thank you and
congratulations!

Regards,
Martin Cordova


On 10/18/05, Mark Wielaard [EMAIL PROTECTED] wrote:
 Hi all,

 We wanted to have a release the first week of November. So I thought it
 would be a good idea to send a reminder that people should see what the
 want to get in before that, and what they want to see tested so they
 feel confident that 0.19 will be a great developer snapshot worthy of
 incorporation into gcc and kaffe as soon as it is released early
 November.

 If people want we can discuss the open items tomorrow Wednesday October
 19 at 21:00 UTC in #classpath on irc.gnu.org. That is 23:00 in
 Amsterdam, 22:00 in Londen and 5:00 PM in Boston.
 More times at:
 http://www.timeanddate.com/worldclock/fixedtime.html?year=2005month=10day=19hour=21min=0sec=0

 But feel free to just reply to this email with suggestions and ideas if
 you cannot make it to the meeting. We will make sure to post a summary
 of anything discussed to the list also.

 Cheers,

 Mark

 --
 Escape the Java Trap with GNU Classpath!
 http://www.gnu.org/philosophy/java-trap.html

 Join the community at http://planet.classpath.org/


 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.4.2 (GNU/Linux)

 iD8DBQBDVS1sxVhZCJWr9QwRArtWAJkBWUWHg+0lNEjo8MzlbYwRfqIV2ACdFMed
 YSkb8I2VWUJMC9V+Dch1HGI=
 =aqpq
 -END PGP SIGNATURE-


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





--
Dinamica - Open source J2EE framework
Free, easy and powerful
http://www.martincordova.com


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


Re: 0.19 release meeting - Wed Oct 19 21:00 UTC

2005-10-18 Thread Robert Schuster
Hi,
unfortunately I cannot attend the meeting because I am at our local public WLAN
meeting at this time.

If no one wants to make a summary send me the IRC log and I will make one.

cu
Robert

Mark Wielaard wrote:
 Hi all,
 
 We wanted to have a release the first week of November. So I thought it
 would be a good idea to send a reminder that people should see what the
 want to get in before that, and what they want to see tested so they
 feel confident that 0.19 will be a great developer snapshot worthy of
 incorporation into gcc and kaffe as soon as it is released early
 November.
 
 If people want we can discuss the open items tomorrow Wednesday October
 19 at 21:00 UTC in #classpath on irc.gnu.org. That is 23:00 in
 Amsterdam, 22:00 in Londen and 5:00 PM in Boston.
 More times at:
 http://www.timeanddate.com/worldclock/fixedtime.html?year=2005month=10day=19hour=21min=0sec=0
 
 But feel free to just reply to this email with suggestions and ideas if
 you cannot make it to the meeting. We will make sure to post a summary
 of anything discussed to the list also.
 
 Cheers,
 
 Mark
 
 
 
 
 
 ___
 Classpath mailing list
 Classpath@gnu.org
 http://lists.gnu.org/mailman/listinfo/classpath


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


[cp-patches] FYI: java/io/ObjectInputStream.java

2005-10-18 Thread Jeroen Frijters
Hi,

I committed the attached patch to fix proxy deserialization (bug 24422).

Regards,
Jeroen

2005-10-18  Jeroen Frijters  [EMAIL PROTECTED]

* java/io/ObjectInputStream.java
(parseContent): Removed bogus println and fixed bug #24422.
Index: java/io/ObjectInputStream.java
===
RCS file: /cvsroot/classpath/classpath/java/io/ObjectInputStream.java,v
retrieving revision 1.69
diff -u -r1.69 ObjectInputStream.java
--- java/io/ObjectInputStream.java  12 Oct 2005 19:41:42 -  1.69
+++ java/io/ObjectInputStream.java  18 Oct 2005 07:17:29 -
@@ -221,7 +221,6 @@
  for (int i = 0; i  n_intf; i++)
{
  intfs[i] = this.realInputStream.readUTF();
- System.out.println(intfs[i]);
}
  
  boolean oldmode = setBlockDataMode(true);
@@ -229,6 +228,21 @@
  setBlockDataMode(oldmode);
  
  ObjectStreamClass osc = lookupClass(cl);
+  if (osc.firstNonSerializableParentConstructor == null)
+{
+  osc.realClassIsSerializable = true;
+  osc.fields = osc.fieldMapping = new ObjectStreamField[0];
+  try
+{
+  osc.firstNonSerializableParentConstructor =
+Object.class.getConstructor(new Class[0]);
+}
+  catch (NoSuchMethodException x)
+{
+  throw (InternalError)
+new InternalError(Object ctor missing).initCause(x);
+}
+}
  assignNewHandle(osc);
  
  if (!is_consumed)
___
Classpath-patches mailing list
Classpath-patches@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath-patches


[cp-patches] FYI: ScrollPaneLayout fixes

2005-10-18 Thread Roman Kennke
Hi,

The following patch solves a small but significant layout problem with
JScrollPanes. The layout manager has to respect the insets of the
JScrollPane properly. This is checked in.

2005-10-18  Roman Kennke  [EMAIL PROTECTED]

* javax/swing/ScrollPaneLayout.java
(preferredLayoutSize): Removed check for JScrollPane argument.
Added code to respect the insets of the JScrollPane.
(minimumLayoutSize): Likewise.
(layoutContainer): Removed check for JScrollPane argument.

/Roman
Index: javax/swing/ScrollPaneLayout.java
===
RCS file: /cvsroot/classpath/classpath/javax/swing/ScrollPaneLayout.java,v
retrieving revision 1.18
diff -u -r1.18 ScrollPaneLayout.java
--- javax/swing/ScrollPaneLayout.java	13 Oct 2005 18:33:05 -	1.18
+++ javax/swing/ScrollPaneLayout.java	18 Oct 2005 09:46:24 -
@@ -43,12 +43,9 @@
 import java.awt.Dimension;
 import java.awt.Insets;
 import java.awt.LayoutManager;
-import java.awt.Point;
 import java.awt.Rectangle;
 import java.io.Serializable;
 
-import javax.swing.border.Border;
-
 /**
  * ScrollPaneLayout
  * @author	Andrew Selkirk
@@ -64,6 +61,7 @@
   {
 public UIResource()
 {
+  super();
 }
   }
 
@@ -79,8 +77,9 @@
   protected int vsbPolicy;
   protected int hsbPolicy;
 
-  public ScrollPaneLayout() {
-		
+  public ScrollPaneLayout()
+  {
+	// Nothing to do here.
   }
 
   public void syncWithScrollPane(JScrollPane scrollPane) {
@@ -255,46 +254,44 @@
 
   public Dimension preferredLayoutSize(Container parent) 
   {
-if (parent != null  parent instanceof JScrollPane)
-  {
-JScrollPane sc = (JScrollPane) parent;
-Dimension viewportSize = viewport.getPreferredSize();
-int width = viewportSize.width;
-int height = viewportSize.height;
-if (hsb != null  hsb.isVisible())
-  height += hsb.getPreferredSize().height;
-if (vsb != null  vsb.isVisible())
-  width += vsb.getPreferredSize().width;
-if (rowHead != null  rowHead.isVisible())
-  width += rowHead.getPreferredSize().width;
-if (colHead != null  colHead.isVisible())
-  height += colHead.getPreferredSize().height;
-return new Dimension(width, height);
-  }
-// TODO: Probably throw an exception here. Check this.
-return new Dimension(0, 0);
+// Sun's implementation simply throws a ClassCastException if
+// parent is no JScrollPane, so do we.
+JScrollPane sc = (JScrollPane) parent;
+Dimension viewportSize = viewport.getPreferredSize();
+int width = viewportSize.width;
+int height = viewportSize.height;
+if (hsb != null  hsb.isVisible())
+  height += hsb.getPreferredSize().height;
+if (vsb != null  vsb.isVisible())
+  width += vsb.getPreferredSize().width;
+if (rowHead != null  rowHead.isVisible())
+  width += rowHead.getPreferredSize().width;
+if (colHead != null  colHead.isVisible())
+  height += colHead.getPreferredSize().height;
+Insets i = sc.getInsets();
+return new Dimension(width + i.left + i.right,
+ height + i.left + i.right);
   }
 
   public Dimension minimumLayoutSize(Container parent)
   {
-if (parent != null  parent instanceof JScrollPane)
-  {
-JScrollPane sc = (JScrollPane) parent;
-Dimension viewportSize = viewport.getMinimumSize();
-int width = viewportSize.width;
-int height = viewportSize.height;
-if (hsb != null  hsb.isVisible())
-  height += hsb.getMinimumSize().height;
-if (vsb != null  vsb.isVisible())
-  width += vsb.getMinimumSize().width;
-if (rowHead != null  rowHead.isVisible())
-  width += rowHead.getMinimumSize().width;
-if (colHead != null  colHead.isVisible())
-  height += colHead.getMinimumSize().height;
-return new Dimension(width, height);
-  }
-// TODO: Probably throw an exception here. Check this.
-return new Dimension(0, 0);
+// Sun's implementation simply throws a ClassCastException if
+// parent is no JScrollPane, so do we.
+JScrollPane sc = (JScrollPane) parent;
+Dimension viewportSize = viewport.getMinimumSize();
+int width = viewportSize.width;
+int height = viewportSize.height;
+if (hsb != null  hsb.isVisible())
+  height += hsb.getMinimumSize().height;
+if (vsb != null  vsb.isVisible())
+  width += vsb.getMinimumSize().width;
+if (rowHead != null  rowHead.isVisible())
+  width += rowHead.getMinimumSize().width;
+if (colHead != null  colHead.isVisible())
+  height += colHead.getMinimumSize().height;
+Insets i = sc.getInsets();
+return new Dimension(width + i.left + i.right,
+ height + i.top + i.bottom);
   }
 
   /**
@@ -320,94 +317,91 @@
*/
   public void layoutContainer(Container parent)
   {
-if (parent instanceof JScrollPane)
-  {
-   

[cp-patches] FYI: Some JViewport fixes

2005-10-18 Thread Roman Kennke
Hi,

This fixes some issues with JViewport.

2005-10-18  Roman Kennke  [EMAIL PROTECTED]

* javax/swing/JViewport.java
(setView): Added repaint() call.
(revalidate): Removed unnecessary and unspecified method.
(reshape): Fire stateChanged if only the size changes. Do not fire
stateChanged if only the location changes.
(scrollRectToVisible): Reworked most of this method to correctly
determine the scroll offsets. Added validation of view as
specified.

/Roman
Index: javax/swing/JViewport.java
===
RCS file: /cvsroot/classpath/classpath/javax/swing/JViewport.java,v
retrieving revision 1.32
diff -u -r1.32 JViewport.java
--- javax/swing/JViewport.java	17 Oct 2005 19:08:22 -	1.32
+++ javax/swing/JViewport.java	18 Oct 2005 10:02:28 -
@@ -411,35 +411,24 @@
 fireStateChanged();
   }
 revalidate();
-  }
-
-  public void revalidate()
-  {
-damaged = true;
-fireStateChanged();
-super.revalidate();
+repaint();
   }
 
   public void reshape(int x, int y, int w, int h)
   {
-boolean changed = 
-  (x != getX()) 
-  || (y != getY()) 
-  || (w != getWidth())
-  || (h != getHeight());
 if (w != getWidth() || h != getHeight())
   sizeChanged = true;
 super.reshape(x, y, w, h);
-if (changed)
+if (sizeChanged)
   {
 damaged = true;
 fireStateChanged();
   }
   }
-
-  public final Insets getInsets() 
+
+  public final Insets getInsets()
   {
-return new Insets(0,0,0,0);
+return new Insets(0, 0, 0, 0);
   }
 
   public final Insets getInsets(Insets insets)
@@ -574,36 +563,26 @@
 Rectangle viewBounds = getView().getBounds();
 Rectangle portBounds = getBounds();
 
-// FIXME: should validate the view if it is not valid, however
-// this may cause excessive validation when the containment
-// hierarchy is being created.
-
-// Y-DIRECTION
-
-// if contentRect is larger than the portBounds, center the view
-if (contentRect.height  portBounds.height)
-  setViewPosition(new Point(pos.x, contentRect.y));
-
-if (contentRect.y  -viewBounds.y)
-  setViewPosition(new Point(pos.x, contentRect.y));
-else if (contentRect.y + contentRect.height  
- -viewBounds.y + portBounds.height) 
-  setViewPosition (new Point(pos.x, contentRect.y - 
- (portBounds.height - contentRect.height)));
-
-// X-DIRECTION
-pos = getViewPosition();
-
-//  if contentRect is larger than the portBounds, center the view
-if (contentRect.width portBounds.width)
-setViewPosition(new Point(contentRect.x, pos.y));
-
-if (contentRect.x  -viewBounds.x)
-  setViewPosition(new Point(contentRect.x, pos.y));
-else if (contentRect.x + contentRect.width  
- -viewBounds.x + portBounds.width)
-  setViewPosition (new Point(contentRect.x - 
- (portBounds.width - contentRect.width), pos.y));
+if (isShowing())
+  getView().validate();
+
+// If the bottom boundary of contentRect is below the port
+// boundaries, scroll up as necessary.
+if (contentRect.y + contentRect.height + viewBounds.y  portBounds.height)
+  pos.y = contentRect.y + contentRect.height - viewBounds.height;
+// If contentRect.y is above the port boundaries, scroll down to
+// contentRect.y.
+if (contentRect.y + viewBounds.y  0)
+  pos.y = contentRect.y;
+// If the right boundary of contentRect is right from the port
+// boundaries, scroll left as necessary.
+if (contentRect.x + contentRect.width + viewBounds.x  portBounds.width)
+  pos.x = contentRect.x + contentRect.width - viewBounds.width;
+// If contentRect.x is left from the port boundaries, scroll right to
+// contentRect.x.
+if (contentRect.x + viewBounds.x  0)
+  pos.x = contentRect.x;
+setViewPosition(pos);
   }
 
   /**
@@ -617,6 +596,25 @@
 if (accessibleContext == null)
   accessibleContext = new AccessibleJViewport();
 return accessibleContext;
+  }
+
+  /**
+   * Forward repaint to parent to make sure only one paint is performed by the
+   * RepaintManager.
+   *
+   * @param tm number of milliseconds to defer the repaint request
+   * @param x the X coordinate of the upper left corner of the dirty area
+   * @param y the Y coordinate of the upper left corner of the dirty area
+   * @param w the width of the dirty area
+   * @param h the height of the dirty area
+   */
+  public void repaint(long tm, int x, int y, int w, int h)
+  {
+Component parent = getParent();
+if (parent != null)
+  {
+parent.repaint(tm, x + getX(), y + getY(), w, h);
+  }
   }
 
   protected void addImpl(Component comp, Object constraints, int index)
___
Classpath-patches mailing list

[cp-patches] FYI: BasicComboBoxUI fixlets

2005-10-18 Thread David Gilbert
I committed this patch to fix a couple of very minor issues in the BasicComboBoxUI 
class: the button colors are now fetched from the UIDefaults, and the createEditor() 
method returns an editor that implements UIResource:


2005-10-18  David Gilbert  [EMAIL PROTECTED]

* javax/swing/plaf/basic/BasicComboBoxUI.java
(buttonBackground): new field,
(shadow): renamed buttonShadow,
(darkShadow): renamed buttonDarkShadow,
(highlight): renamed buttonHighlight,
(installDefaults): initialise buttonBackground, plus updates for
renamed fields,
(uninstallDefaults): clear buttonBackground, plus updates for renamed
fields,
(createEditor): return subclass that implements UIResource,
(createArrowButton): use constructor that accepts colors,
(getMaximumSize): fix API doc error,
* javax/swing/plaf/basic/BasicLookAndFeel.java
(initComponentDefaults): correct 'ComboBox.buttonDarkShadow' default.

Regards,

Dave
Index: javax/swing/plaf/basic/BasicComboBoxUI.java
===
RCS file: 
/cvsroot/classpath/classpath/javax/swing/plaf/basic/BasicComboBoxUI.java,v
retrieving revision 1.23
diff -u -r1.23 BasicComboBoxUI.java
--- javax/swing/plaf/basic/BasicComboBoxUI.java 17 Oct 2005 16:17:45 -  
1.23
+++ javax/swing/plaf/basic/BasicComboBoxUI.java 18 Oct 2005 11:03:31 -
@@ -157,12 +157,29 @@
*/
   protected PropertyChangeListener propertyChangeListener;
 
+  /** 
+   * The button background. 
+   * @see #installDefaults()
+   */
+  private Color buttonBackground;
+  
+  /** 
+   * The button shadow. 
+   * @see #installDefaults()
+   */
+  private Color buttonShadow;
+  
   /**
-   * Colors that are used to render selected item in the combo box.
+   * The button dark shadow.
+   * @see #installDefaults()
*/
-  private Color shadow;
-  private Color darkShadow;
-  private Color highlight;
+  private Color buttonDarkShadow;
+
+  /**
+   * The button highlight.
+   * @see #installDefaults()
+   */
+  private Color buttonHighlight;
 
   /* Size of the largest item in the comboBox
* This is package-private to avoid an accessor method.
@@ -244,10 +261,12 @@
   {
 LookAndFeel.installColorsAndFont(comboBox, ComboBox.background,
  ComboBox.foreground, ComboBox.font);
+
 // fetch the button color scheme
-shadow = UIManager.getColor(ComboBox.buttonShadow);
-darkShadow = UIManager.getColor(ComboBox.buttonDarkShadow);
-highlight = UIManager.getColor(ComboBox.buttonHighlight);
+buttonBackground = UIManager.getColor(ComboBox.buttonBackground);
+buttonShadow = UIManager.getColor(ComboBox.buttonShadow);
+buttonDarkShadow = UIManager.getColor(ComboBox.buttonDarkShadow);
+buttonHighlight = UIManager.getColor(ComboBox.buttonHighlight);
   }
 
   /**
@@ -295,9 +314,10 @@
 if (comboBox.getBackground() instanceof UIResource)
   comboBox.setBackground(null);
 
-shadow = null;
-darkShadow = null;
-highlight = null;
+buttonBackground = null;
+buttonShadow = null;
+buttonDarkShadow = null;
+buttonHighlight = null;
   }
 
   /**
@@ -432,7 +452,7 @@
*/
   protected ComboBoxEditor createEditor()
   {
-return new BasicComboBoxEditor();
+return new BasicComboBoxEditor.UIResource();
   }
 
   /**
@@ -551,7 +571,8 @@
*/
   protected JButton createArrowButton()
   {
-return new BasicArrowButton(BasicArrowButton.SOUTH);
+return new BasicArrowButton(BasicArrowButton.SOUTH, buttonBackground, 
+buttonShadow, buttonDarkShadow, buttonHighlight);
   }
 
   /**
@@ -649,7 +670,7 @@
*
* @param c The [EMAIL PROTECTED] JComponent} to find the maximum size for
*
-   * @return The dimensions of the minimum size.
+   * @return The maximum size (codeDimension(32767, 32767)/code).
*/
   public Dimension getMaximumSize(JComponent c)
   {
Index: javax/swing/plaf/basic/BasicLookAndFeel.java
===
RCS file: 
/cvsroot/classpath/classpath/javax/swing/plaf/basic/BasicLookAndFeel.java,v
retrieving revision 1.61
diff -u -r1.61 BasicLookAndFeel.java
--- javax/swing/plaf/basic/BasicLookAndFeel.java17 Oct 2005 19:08:23 
-  1.61
+++ javax/swing/plaf/basic/BasicLookAndFeel.java18 Oct 2005 11:03:34 
-
@@ -364,7 +364,7 @@
   }),
   ComboBox.background, new ColorUIResource(Color.white),
   ComboBox.buttonBackground, new ColorUIResource(light),
-  ComboBox.buttonDarkShadow, new ColorUIResource(shadow),
+  ComboBox.buttonDarkShadow, new ColorUIResource(darkShadow),
   ComboBox.buttonHighlight, new ColorUIResource(highLight),
   ComboBox.buttonShadow, new ColorUIResource(shadow),
   ComboBox.disabledBackground, new ColorUIResource(light),
___
Classpath-patches mailing list

[cp-patches] FYI: AbstractButton fixlet

2005-10-18 Thread Roman Kennke
This prevents setEnabled() from getting active, if the actual value does
not change.

2005-10-18  Roman Kennke  [EMAIL PROTECTED]

* javax/swing/AbstractButton.java
Filled empty blocks with comments.
(ButtonChangeListener.stateChanged): Moved implementation from
inner class in createChangeListener to this protected class.
(setEnabled): Do nothing if actual state does not change.
(createChangeListener): Return instance of ButtonChangeListener
here.

/Roman
Index: javax/swing/AbstractButton.java
===
RCS file: /cvsroot/classpath/classpath/javax/swing/AbstractButton.java,v
retrieving revision 1.47
diff -u -r1.47 AbstractButton.java
--- javax/swing/AbstractButton.java	12 Oct 2005 13:27:32 -	1.47
+++ javax/swing/AbstractButton.java	18 Oct 2005 13:35:55 -
@@ -165,6 +165,8 @@
  */
 public void stateChanged(ChangeEvent ev)
 {
+  AbstractButton.this.fireStateChanged();
+  repaint();
 }
   }
 
@@ -375,6 +377,7 @@
 
 protected AccessibleAbstractButton()
 {
+  // Nothing to do here yet.
 }
 
 public AccessibleStateSet getAccessibleStateSet()
@@ -519,7 +522,7 @@
* The [EMAIL PROTECTED] #init(String, Icon)} method is not called automatically by this
* constructor.
*
-   * @see [EMAIL PROTECTED] #init(String, Icon)}
+   * @see #init(String, Icon)
*/
   public AbstractButton()
   {
@@ -949,6 +952,9 @@
*/
   public void setEnabled(boolean b)
   {
+// Do nothing if state does not change.
+if (b == isEnabled())
+  return;
 super.setEnabled(b);
 ButtonModel mod = getModel();
 if (mod != null)
@@ -1630,16 +1636,9 @@
*
* @return The new ChangeListener
*/
-  protected  ChangeListener createChangeListener()
+  protected ChangeListener createChangeListener()
   {
-return new ChangeListener()
-  {
-public void stateChanged(ChangeEvent e)
-{
-  AbstractButton.this.fireStateChanged();
-  AbstractButton.this.repaint();  
-}
-  };
+return new ButtonChangeListener();
   }
 
   /**
@@ -2005,6 +2004,7 @@
*/
   public void updateUI()
   {
+// TODO: What to do here?
   }
 
   /**
___
Classpath-patches mailing list
Classpath-patches@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath-patches


[cp-patches] Patch: JTree scrollPathToVisible fix

2005-10-18 Thread Lillian Angel
Fixes bug #24218

2005-10-18  Lillian Angel  [EMAIL PROTECTED]

* javax/swing/JTree.java
(scrollPathToVisible): Reimplemented to make the path visible 
if its parent is not expanded.
* javax/swing/plaf/basic/BasicTreeUI.java
(installDefaults): Initialized row height for the tree.
(updateCurrentVisiblePath): Updated the visible row count.
* javax/swing/plaf/metal/MetalTreeUI.java
(installUI): Initialized row height for the tree.

Index: javax/swing/JTree.java
===
RCS file: /cvsroot/classpath/classpath/javax/swing/JTree.java,v
retrieving revision 1.47
diff -u -r1.47 JTree.java
--- javax/swing/JTree.java	14 Oct 2005 17:30:31 -	1.47
+++ javax/swing/JTree.java	18 Oct 2005 14:58:46 -
@@ -2046,13 +2046,26 @@
   {
 if (path == null)
   return;
-
+
+Object[] oPath = path.getPath();
+TreePath temp = new TreePath(oPath[0]);
+boolean stop = false;
+int i = 1;
+while (!stop)
+  {
+while (isVisible(temp))
+  if (i  oPath.length)
+temp = temp.pathByAddingChild(oPath[i++]);
+  else
+{
+  stop = true;
+  break;
+}
+makeVisible(temp);
+  }
 Rectangle rect = getPathBounds(path);
-
-if (rect == null)
-  return;
-
 scrollRectToVisible(rect);
+setSelectionPath(temp);
   }
 
   public void scrollRowToVisible(int row)
Index: javax/swing/plaf/basic/BasicTreeUI.java
===
RCS file: /cvsroot/classpath/classpath/javax/swing/plaf/basic/BasicTreeUI.java,v
retrieving revision 1.100
diff -u -r1.100 BasicTreeUI.java
--- javax/swing/plaf/basic/BasicTreeUI.java	17 Oct 2005 18:47:17 -	1.100
+++ javax/swing/plaf/basic/BasicTreeUI.java	18 Oct 2005 14:58:46 -
@@ -1230,6 +1230,7 @@
 rightChildIndent = UIManager.getInt(Tree.rightChildIndent);
 leftChildIndent = UIManager.getInt(Tree.leftChildIndent);
 setRowHeight(UIManager.getInt(Tree.rowHeight));
+tree.setRowHeight(UIManager.getInt(Tree.rowHeight));
 tree.requestFocusInWindow(false);
 tree.setScrollsOnExpand(UIManager.getBoolean(Tree.scrollsOnExpand));
 setExpandedIcon(UIManager.getIcon(Tree.openIcon));
@@ -3778,6 +3779,7 @@
 !tree.isVisible(new TreePath(getPathToRoot(next, 0;
   }
 currentVisiblePath = current;
+tree.setVisibleRowCount(getRowCount(tree));
   }
   
   /**
Index: javax/swing/plaf/metal/MetalTreeUI.java
===
RCS file: /cvsroot/classpath/classpath/javax/swing/plaf/metal/MetalTreeUI.java,v
retrieving revision 1.10
diff -u -r1.10 MetalTreeUI.java
--- javax/swing/plaf/metal/MetalTreeUI.java	17 Oct 2005 18:47:17 -	1.10
+++ javax/swing/plaf/metal/MetalTreeUI.java	18 Oct 2005 14:58:46 -
@@ -140,6 +140,7 @@
 rightChildIndent = defaults.getInt(Tree.rightChildIndent);
 leftChildIndent = defaults.getInt(Tree.leftChildIndent);
 setRowHeight(defaults.getInt(Tree.rowHeight));
+tree.setRowHeight(defaults.getInt(Tree.rowHeight));
 tree.requestFocusInWindow(false);
 
 setExpandedIcon(defaults.getIcon(Tree.openIcon));
___
Classpath-patches mailing list
Classpath-patches@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath-patches


[cp-patches] Patch: BasicTextUI fix

2005-10-18 Thread Lillian Angel
Fixes bug #24338

2005-10-18  Lillian Angel  [EMAIL PROTECTED]

* javax/swing/plaf/basic/BasicTextUI.java
(installDefaults): Set the selected text color for the
text component.


Index: javax/swing/plaf/basic/BasicTextUI.java
===
RCS file: /cvsroot/classpath/classpath/javax/swing/plaf/basic/BasicTextUI.java,v
retrieving revision 1.46
diff -u -r1.46 BasicTextUI.java
--- javax/swing/plaf/basic/BasicTextUI.java	13 Oct 2005 12:51:00 -	1.46
+++ javax/swing/plaf/basic/BasicTextUI.java	18 Oct 2005 15:13:37 -
@@ -523,6 +523,7 @@
 inactiveBackground = UIManager.getColor(prefix + .inactiveBackground);
 textComponent.setDisabledTextColor
  (UIManager.getColor(prefix + .inactiveForeground));
+textComponent.setSelectedTextColor(UIManager.getColor(prefix + .selectionForeground));
   }
 
   /**
___
Classpath-patches mailing list
Classpath-patches@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath-patches


[cp-patches] FYI: BasicComboBoxUI fixlet

2005-10-18 Thread David Gilbert

I commited this patch to fix a failing Mauve test:

2005-10-18  David Gilbert  [EMAIL PROTECTED]

* javax/swing/plaf/basic/BasicComboBoxUI.java
(installComponents): only set default editor if the current editor is
null or implements UIResource,
(uninstallComponents): only clear editor if it implements UIResource.

Regards,

Dave
Index: javax/swing/plaf/basic/BasicComboBoxUI.java
===
RCS file: 
/cvsroot/classpath/classpath/javax/swing/plaf/basic/BasicComboBoxUI.java,v
retrieving revision 1.24
diff -u -r1.24 BasicComboBoxUI.java
--- javax/swing/plaf/basic/BasicComboBoxUI.java 18 Oct 2005 11:05:10 -  
1.24
+++ javax/swing/plaf/basic/BasicComboBoxUI.java 18 Oct 2005 15:12:59 -
@@ -476,8 +476,12 @@
 configureArrowButton();
 comboBox.add(arrowButton);
 
-comboBox.setEditor(createEditor());
-editor = comboBox.getEditor().getEditorComponent();
+ComboBoxEditor currentEditor = comboBox.getEditor();
+if (currentEditor == null || currentEditor instanceof UIResource)
+  {
+comboBox.setEditor(createEditor());
+editor = comboBox.getEditor().getEditorComponent();
+  }
 
 comboBox.revalidate();
   }
@@ -499,8 +503,14 @@
 
 comboBox.setRenderer(null);
 
-comboBox.setEditor(null);
-editor = null;
+// if the editor is not an instanceof UIResource, it was not set by the
+// UI delegate, so don't clear it...
+ComboBoxEditor currentEditor = comboBox.getEditor();
+if (currentEditor instanceof UIResource)
+  {
+comboBox.setEditor(null);
+editor = null;
+  }
   }
 
   /**
___
Classpath-patches mailing list
Classpath-patches@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath-patches


[cp-patches] FYI: JComboBox fixes

2005-10-18 Thread David Gilbert

This patch fixes some failing Mauve tests:

2005-10-18  David Gilbert  [EMAIL PROTECTED]

* javax/swing/JComboBox.java
(setModel): update the selectedItemReminder field,
(selectedItemChanged): only send ItemEvent.SELECTED event if the new
selection is non-null.

Regards,

Dave
Index: javax/swing/JComboBox.java
===
RCS file: /cvsroot/classpath/classpath/javax/swing/JComboBox.java,v
retrieving revision 1.21
diff -u -r1.21 JComboBox.java
--- javax/swing/JComboBox.java  12 Oct 2005 12:38:20 -  1.21
+++ javax/swing/JComboBox.java  18 Oct 2005 16:36:35 -
@@ -311,7 +311,8 @@
 // Stores old data model for event notification.
 ComboBoxModel oldDataModel = dataModel;
 dataModel = newDataModel;
-
+selectedItemReminder = newDataModel.getSelectedItem();
+
 // Notifies the listeners of the model change.
 firePropertyChange(model, oldDataModel, dataModel);
   }
@@ -901,8 +902,9 @@
 
 // Fire ItemEvent to indicate that new item is selected
 Object newSelection = getSelectedItem();
-fireItemStateChanged(new ItemEvent(this, ItemEvent.ITEM_STATE_CHANGED,
-   newSelection, ItemEvent.SELECTED));
+if (newSelection != null)
+  fireItemStateChanged(new ItemEvent(this, ItemEvent.ITEM_STATE_CHANGED,
+ newSelection, ItemEvent.SELECTED));
 
 // Fire Action Event to JComboBox's registered listeners   
 
 fireActionEvent();
___
Classpath-patches mailing list
Classpath-patches@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath-patches


Re: [cp-patches] FYI: BasicTreeUI fix

2005-10-18 Thread Lillian Angel
Noticed the expanded and collapsed icon defaults were set to the wrong
icons. Fixed this and reworked mousePressed to work with these changes.


2005-10-18  Lillian Angel  [EMAIL PROTECTED]

* javax/swing/plaf/basic/BasicTreeUI.java:
Removed leafIcon field.
(BasicTreeUI): Removed leafIcon initialization.
(installDefaults): Icon defaults were wrong, fixed.
(isLocationInExpandControl): Fixed to incorporated gap.
(mousePressed): Fixed to include correct icon widths. Sometimes
the labels icon is different from what the tree's default icon 
is set to. Added a check for this.
(getCellBounds): No need to include gap here.
(getCurrentControlIcon): Fixed to use expandedIcon and 
collapsedIcon.
(paintRow): No need paint beyond preferred width of tree here.
(updateCurrentVisiblePath): If nothing is selected, the root 
should be selected without focus.
* javax/swing/plaf/metal/MetalTreeUI.java
(installDefaults): Fixed defaults for the expanded/collapsed 
icons.


On Mon, 2005-10-17 at 14:46 -0400, Lillian Angel wrote:
 Now this is completely fixed.
 
 2005-10-17  Lillian Angel  [EMAIL PROTECTED]
 
 * javax/swing/plaf/basic/BasicTreeUI.java
 (installUI): Moved call to installKeyboardActions and Listeners
 to before expansion of root.
 (paint): Added check to make sure the cached visible path is 
   updated.
 (treeExpanded): Added call to update visible path.
 (treeCollapsed): Likewise.
 (treeNodesChanged): Likewise.
 (treeNodesInserted): Likewise.
 (treeNodesRemoved): Likewise.
 (treeStructureChanged): Likewise.
 (paintRecursive): Moved code to paintRow.
 (paintControlIcons): Fixed to paint custom control icons 
   properly.
 (paintExpandControl): Removed unneeded parameter.
 (paintRow): Added code to paint the row with the correct width.
 * javax/swing/plaf/metal/MetalTreeUI.java
 (installUI): Moved code to expand the root after all the 
   listeners have been initialized.
 
 On Fri, 2005-10-14 at 17:42 -0400, Lillian Angel wrote:
  After testing some new apps, I noticed that there was a slight problem
  with some custom icons. I almost have it fixed completely.
  
  2005-10-14  Lillian Angel  [EMAIL PROTECTED]
  
  * javax/swing/LookAndFeel.java
  (makeIcon): Implemented.
  * javax/swing/plaf/basic/BasicTreeUI.java
  (updateCachedPreferredSize): Should only add with of control
  icon if
  not a leaf.
  (mousePressed): Fixed to use new gap field.
  (paintRecursive): Likewise.
  (paintRow): Likewise.
  (updateCurrentVisiblePath): Shouldn't include root if it is
  not of a valid size to be painted.
  
  ___
  Classpath-patches mailing list
  Classpath-patches@gnu.org
  http://lists.gnu.org/mailman/listinfo/classpath-patches
 ___
 Classpath-patches mailing list
 Classpath-patches@gnu.org
 http://lists.gnu.org/mailman/listinfo/classpath-patches
Index: javax/swing/plaf/basic/BasicTreeUI.java
===
RCS file: /cvsroot/classpath/classpath/javax/swing/plaf/basic/BasicTreeUI.java,v
retrieving revision 1.101
diff -u -r1.101 BasicTreeUI.java
--- javax/swing/plaf/basic/BasicTreeUI.java	18 Oct 2005 15:02:42 -	1.101
+++ javax/swing/plaf/basic/BasicTreeUI.java	18 Oct 2005 17:38:54 -
@@ -225,9 +225,6 @@
 
   /** Set to true if the editor has a different size than the renderer. */
   protected boolean editorHasDifferentSize;
-
-  /** Leaf icon for the tree. */
-  Icon leafIcon;
   
   /** The action listener for the editor's Timer. */
   Timer editorTimer = new EditorUpdateTimer();
@@ -285,7 +282,6 @@
 
 editingRow = -1;
 lastSelectedRow = -1;
-leafIcon = UIManager.getIcon(Tree.leafIcon);
   }
 
   /**
@@ -1233,8 +1229,8 @@
 tree.setRowHeight(UIManager.getInt(Tree.rowHeight));
 tree.requestFocusInWindow(false);
 tree.setScrollsOnExpand(UIManager.getBoolean(Tree.scrollsOnExpand));
-setExpandedIcon(UIManager.getIcon(Tree.openIcon));
-setCollapsedIcon(UIManager.getIcon(Tree.closedIcon));
+setExpandedIcon(UIManager.getIcon(Tree.expandedIcon));
+setCollapsedIcon(UIManager.getIcon(Tree.collapsedIcon));
   }
 
   /**
@@ -1673,11 +1669,10 @@
 
 if (!isLeaf(row))
   {
-if (bounds == null)
-  bounds = getPathBounds(tree, path);
+bounds = getPathBounds(tree, path);
 
 if (hasControlIcons()  (mouseX  bounds.x) 
- (mouseX  (bounds.x - getCurrentControlIcon(path).getIconWidth(
+ (mouseX  (bounds.x - getCurrentControlIcon(path).getIconWidth() - gap)))
   cntlClick = true;
   }
 return cntlClick;
@@ -2310,13 +2305,29 @@
 

Re: [cp-patches] FYI: BasicScrollBarUI fixlet

2005-10-18 Thread Robert Schuster
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi Roman,

 For all Swing hackers: As a general rule, do not put repaint and
 revalidate calls in event handlers. When a property change must trigger
 a repaint and/or revalidate, then this should happen in the
 corresponding setter method. This makes the code more clear and avoids
 ugly eventqueue loops.

Would you mind putting such findings in the Wiki[0]?

Maybe you could open a new page and just put all hints and infos in it. I will
come to clean it up later. That way I think we could preserve such useful
information for future hackers in a better way.

cu
Robert

[0] - developer.classpath.org/mediation
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFDVUxaG9cfwmwwEtoRAv0bAJ9/2Iy9ko8Tqs6AB3fK0iNwrZgMwwCbB1a4
1WPiNw80xwCIWfJrVJdQyzs=
=gLhP
-END PGP SIGNATURE-


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


[cp-patches] Patch: JTable fixlet

2005-10-18 Thread Lillian Angel
After running some apps that work fine with Sun and IBM, I got several
NPEs with JTable.

2005-10-18  Lillian Angel  [EMAIL PROTECTED]

* javax/swing/JTable.java
(JTable): Moved code around so all models are set before
any other function is called. Prevents all NPEs with
models.

Index: javax/swing/JTable.java
===
RCS file: /cvsroot/classpath/classpath/javax/swing/JTable.java,v
retrieving revision 1.52
diff -u -r1.52 JTable.java
--- javax/swing/JTable.java	12 Oct 2005 19:57:28 -	1.52
+++ javax/swing/JTable.java	18 Oct 2005 19:21:37 -
@@ -671,19 +671,17 @@
*/
   public JTable (TableModel dm, TableColumnModel cm, ListSelectionModel sm)
   {
-setModel(dm == null ? createDefaultDataModel() : dm);
-setSelectionModel(sm == null ? createDefaultSelectionModel() : sm);
-
+boolean autoCreate = false;
 if (cm != null)
-  {
 setColumnModel(cm);
-setAutoCreateColumnsFromModel(false);
-  }
 else 
   {
 setColumnModel(createDefaultColumnModel());
-setAutoCreateColumnsFromModel(true);
+autoCreate = true;
   }
+setModel(dm == null ? createDefaultDataModel() : dm);
+setSelectionModel(sm == null ? createDefaultSelectionModel() : sm);
+setAutoCreateColumnsFromModel(autoCreate);
 initializeLocalVars();
 // The next two lines are for compliance with the JDK which starts
 // the JLists associated with a JTable  with both lead selection 
___
Classpath-patches mailing list
Classpath-patches@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath-patches


[cp-patches] Patch: GridBagLayout fixlet

2005-10-18 Thread Lillian Angel
Fixed a NullPointerException

2005-10-18  Lillian Angel  [EMAIL PROTECTED]

* java/awt/GridBagLayout.java
(GetLayoutInfo): Added a null check for lastComponent. Prevents
NPE.

Index: java/awt/GridBagLayout.java
===
RCS file: /cvsroot/classpath/classpath/java/awt/GridBagLayout.java,v
retrieving revision 1.21
diff -u -r1.21 GridBagLayout.java
--- java/awt/GridBagLayout.java	5 Aug 2005 17:16:52 -	1.21
+++ java/awt/GridBagLayout.java	18 Oct 2005 20:02:35 -
@@ -705,17 +705,20 @@
   if (lastInCol.containsKey(new Integer(x)))
 {
   Component lastComponent = (Component) lastInRow.get(new Integer(x));
-  GridBagConstraints lastConstraints = lookupInternalConstraints(lastComponent);
-
-  if (lastConstraints.gridheight == GridBagConstraints.RELATIVE)
+  if (lastComponent != null)
 {
-  constraints.gridy = max_y - 1;
-  break;
-}
-  else
-{
-  constraints.gridy = Math.max (constraints.gridy,
-lastConstraints.gridy + Math.max (1, lastConstraints.gridheight));
+  GridBagConstraints lastConstraints = lookupInternalConstraints(lastComponent);
+
+  if (lastConstraints.gridheight == GridBagConstraints.RELATIVE)
+{
+  constraints.gridy = max_y - 1;
+  break;
+}
+  else
+{
+  constraints.gridy = Math.max (constraints.gridy,
+lastConstraints.gridy + Math.max (1, lastConstraints.gridheight));
+}
 }
 }
 }
___
Classpath-patches mailing list
Classpath-patches@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath-patches


[cp-patches] FYI: filled empty blocks in javax.swing.colorchooser

2005-10-18 Thread Roman Kennke
I filled empty blocks (like method bodies) in javax.swing.colorchoosers
with comments either stating that this does nothing or needs to be
implemented.

2005-10-18  Roman Kennke  [EMAIL PROTECTED]

* javax/swing/colorchooser/AbstractColorChooserPanel.java:
* javax/swing/colorchooser/ColorChooserComponentFactory.java:
* javax/swing/colorchooser/DefaultSwatchChooserPanel.java:
Filled empty blocks with comments.


/Roman
Index: javax/swing/colorchooser/AbstractColorChooserPanel.java
===
RCS file: /cvsroot/classpath/classpath/javax/swing/colorchooser/AbstractColorChooserPanel.java,v
retrieving revision 1.6
diff -u -r1.6 AbstractColorChooserPanel.java
--- javax/swing/colorchooser/AbstractColorChooserPanel.java	2 Jul 2005 20:32:49 -	1.6
+++ javax/swing/colorchooser/AbstractColorChooserPanel.java	18 Oct 2005 20:28:28 -
@@ -64,7 +64,8 @@
*/
   public AbstractColorChooserPanel()
   {
-  } // AbstractColorChooserPanel()
+// Nothing to do here.
+  }
 
   /**
* This method returns the name displayed in the tab for this chooser panel.
Index: javax/swing/colorchooser/ColorChooserComponentFactory.java
===
RCS file: /cvsroot/classpath/classpath/javax/swing/colorchooser/ColorChooserComponentFactory.java,v
retrieving revision 1.4
diff -u -r1.4 ColorChooserComponentFactory.java
--- javax/swing/colorchooser/ColorChooserComponentFactory.java	2 Jul 2005 20:32:49 -	1.4
+++ javax/swing/colorchooser/ColorChooserComponentFactory.java	18 Oct 2005 20:28:28 -
@@ -53,7 +53,8 @@
*/
   private ColorChooserComponentFactory()
   {
-  } // ColorChooserComponentFactory()
+// Nothing to do here.
+  }
 
   /**
* This method returns the three default chooser panels to be used in
Index: javax/swing/colorchooser/DefaultSwatchChooserPanel.java
===
RCS file: /cvsroot/classpath/classpath/javax/swing/colorchooser/DefaultSwatchChooserPanel.java,v
retrieving revision 1.5
diff -u -r1.5 DefaultSwatchChooserPanel.java
--- javax/swing/colorchooser/DefaultSwatchChooserPanel.java	2 Jul 2005 20:32:49 -	1.5
+++ javax/swing/colorchooser/DefaultSwatchChooserPanel.java	18 Oct 2005 20:28:28 -
@@ -587,6 +587,7 @@
  */
 public void addLayoutComponent(String name, Component comp)
 {
+  // Nothing to do here.
 }
 
 /**
@@ -634,6 +635,7 @@
  */
 public void removeLayoutComponent(Component comp)
 {
+  // Nothing to do here.
 }
 
 /**
@@ -786,6 +788,7 @@
*/
   public void updateChooser()
   {
+// Nothing to do here yet.
   }
 
   /**
___
Classpath-patches mailing list
Classpath-patches@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath-patches


[cp-patches] FYI: javax.swing.filechooser empty blocks

2005-10-18 Thread Roman Kennke
I filled two empty blocks in javax.swing.filechooser.

2005-10-18  Roman Kennke  [EMAIL PROTECTED]

* javax/swing/filechooser/FileFilter.java:
* javax/swing/filechooser/FileView.java:
Filled empty blocks with comments.

/Roman
Index: javax/swing/filechooser/FileFilter.java
===
RCS file: /cvsroot/classpath/classpath/javax/swing/filechooser/FileFilter.java,v
retrieving revision 1.4
diff -u -r1.4 FileFilter.java
--- javax/swing/filechooser/FileFilter.java	22 Sep 2005 13:15:38 -	1.4
+++ javax/swing/filechooser/FileFilter.java	18 Oct 2005 20:40:57 -
@@ -56,7 +56,9 @@
   /**
* Default constructor.
*/
-  public FileFilter() {
+  public FileFilter()
+  {
+// Nothing to do here.
   }
 
   /**
Index: javax/swing/filechooser/FileView.java
===
RCS file: /cvsroot/classpath/classpath/javax/swing/filechooser/FileView.java,v
retrieving revision 1.5
diff -u -r1.5 FileView.java
--- javax/swing/filechooser/FileView.java	19 Sep 2005 20:11:37 -	1.5
+++ javax/swing/filechooser/FileView.java	18 Oct 2005 20:40:57 -
@@ -56,6 +56,7 @@
*/
   public FileView() 
   {
+// Nothing to do here.
   } 
 
   /**
___
Classpath-patches mailing list
Classpath-patches@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath-patches


Re: [cp-patches] FYI: filled empty blocks in javax.swing.colorchooser

2005-10-18 Thread Robert Schuster
Hi Roman,

 Index: javax/swing/colorchooser/DefaultSwatchChooserPanel.java
 ===
 RCS file: 
 /cvsroot/classpath/classpath/javax/swing/colorchooser/DefaultSwatchChooserPanel.java,v
 retrieving revision 1.5
 diff -u -r1.5 DefaultSwatchChooserPanel.java
 --- javax/swing/colorchooser/DefaultSwatchChooserPanel.java   2 Jul 2005 
 20:32:49 -   1.5
 +++ javax/swing/colorchooser/DefaultSwatchChooserPanel.java   18 Oct 2005 
 20:28:28 -
 @@ -587,6 +587,7 @@
   */
  public void addLayoutComponent(String name, Component comp)
  {
 +  // Nothing to do here.
  }
  
  /**
 @@ -634,6 +635,7 @@
   */
  public void removeLayoutComponent(Component comp)
  {
 +  // Nothing to do here.
  }
  
  /**
 @@ -786,6 +788,7 @@
 */
public void updateChooser()
{
 +// Nothing to do here yet.
}
  
I dont understand this. Does this mean

// TODO: implement this

or not?

If so, it would be nice to have a PR about them.

Regards
Robert


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


[commit-cp] classpath ./ChangeLog javax/swing/AbstractButto...

2005-10-18 Thread Roman Kennke
CVSROOT:/cvsroot/classpath
Module name:classpath
Branch: 
Changes by: Roman Kennke [EMAIL PROTECTED]05/10/18 13:42:55

Modified files:
.  : ChangeLog 
javax/swing: AbstractButton.java 

Log message:
2005-10-18  Roman Kennke  [EMAIL PROTECTED]

* javax/swing/AbstractButton.java
Filled empty blocks with comments.
(ButtonChangeListener.stateChanged): Moved implementation from
inner class in createChangeListener to this protected class.
(setEnabled): Do nothing if actual state does not change.
(createChangeListener): Return instance of ButtonChangeListener
here.

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.5258tr2=1.5259r1=textr2=text
http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/javax/swing/AbstractButton.java.diff?tr1=1.47tr2=1.48r1=textr2=text





[commit-cp] classpath ./ChangeLog javax/swing/plaf/metal/Me...

2005-10-18 Thread David Gilbert
CVSROOT:/cvsroot/classpath
Module name:classpath
Branch: 
Changes by: David Gilbert [EMAIL PROTECTED]   05/10/18 14:11:26

Modified files:
.  : ChangeLog 
javax/swing/plaf/metal: MetalComboBoxUI.java 

Log message:
2005-10-18  David Gilbert  [EMAIL PROTECTED]

* javax/swing/plaf/metal/MetalComboBoxUI.java
(editablePropertyChanged): handle null selected item.

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.5260tr2=1.5261r1=textr2=text
http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/javax/swing/plaf/metal/MetalComboBoxUI.java.diff?tr1=1.4tr2=1.5r1=textr2=text





[commit-cp] classpath ./ChangeLog javax/swing/plaf/basic/Ba...

2005-10-18 Thread Lillian Angel
CVSROOT:/cvsroot/classpath
Module name:classpath
Branch: 
Changes by: Lillian Angel [EMAIL PROTECTED]   05/10/18 15:02:43

Modified files:
.  : ChangeLog 
javax/swing/plaf/basic: BasicTreeUI.java 
javax/swing: JTree.java 
javax/swing/plaf/metal: MetalTreeUI.java 

Log message:
2005-10-18  Lillian Angel  [EMAIL PROTECTED]

* javax/swing/JTree.java
(scrollPathToVisible): Reimplemented to make the path visible if its
parent is not expanded.
* javax/swing/plaf/basic/BasicTreeUI.java
(installDefaults): Initialized row height for the tree.
(updateCurrentVisiblePath): Updated the visible row count.
* javax/swing/plaf/metal/MetalTreeUI.java
(installUI): Initialized row height for the tree.

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.5261tr2=1.5262r1=textr2=text
http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/javax/swing/plaf/basic/BasicTreeUI.java.diff?tr1=1.100tr2=1.101r1=textr2=text
http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/javax/swing/JTree.java.diff?tr1=1.47tr2=1.48r1=textr2=text
http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/javax/swing/plaf/metal/MetalTreeUI.java.diff?tr1=1.10tr2=1.11r1=textr2=text





[commit-cp] classpath ./ChangeLog javax/swing/plaf/basic/Ba...

2005-10-18 Thread Lillian Angel
CVSROOT:/cvsroot/classpath
Module name:classpath
Branch: 
Changes by: Lillian Angel [EMAIL PROTECTED]   05/10/18 15:15:48

Modified files:
.  : ChangeLog 
javax/swing/plaf/basic: BasicTextUI.java 

Log message:
2005-10-18  Lillian Angel  [EMAIL PROTECTED]

* javax/swing/plaf/basic/BasicTextUI.java
(installDefaults): Set the selected text color for the
text component.

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.5262tr2=1.5263r1=textr2=text
http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/javax/swing/plaf/basic/BasicTextUI.java.diff?tr1=1.46tr2=1.47r1=textr2=text





[commit-cp] classpath ./ChangeLog javax/swing/plaf/basic/Ba...

2005-10-18 Thread David Gilbert
CVSROOT:/cvsroot/classpath
Module name:classpath
Branch: 
Changes by: David Gilbert [EMAIL PROTECTED]   05/10/18 15:27:55

Modified files:
.  : ChangeLog 
javax/swing/plaf/basic: BasicComboBoxUI.java 

Log message:
2005-10-18  David Gilbert  [EMAIL PROTECTED]

* javax/swing/plaf/basic/BasicComboBoxUI.java
(installComponents): only set default editor if the current editor is
null or implements UIResource,
(uninstallComponents): only clear editor if it implements UIResource.
--

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.5263tr2=1.5264r1=textr2=text
http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/javax/swing/plaf/basic/BasicComboBoxUI.java.diff?tr1=1.24tr2=1.25r1=textr2=text





[commit-cp] classpath ./ChangeLog javax/swing/plaf/basic/Ba...

2005-10-18 Thread Lillian Angel
CVSROOT:/cvsroot/classpath
Module name:classpath
Branch: 
Changes by: Lillian Angel [EMAIL PROTECTED]   05/10/18 17:46:38

Modified files:
.  : ChangeLog 
javax/swing/plaf/basic: BasicTreeUI.java 
javax/swing/plaf/metal: MetalTreeUI.java 

Log message:
2005-10-18  Lillian Angel  [EMAIL PROTECTED]

* javax/swing/plaf/basic/BasicTreeUI.java:
Removed leafIcon field.
(BasicTreeUI): Removed leafIcon initialization.
(installDefaults): Icon defaults were wrong, fixed.
(isLocationInExpandControl): Fixed to incorporated gap.
(mousePressed): Fixed to include correct icon widths. Sometimes
the labels icon is different from what the tree's default icon is
set to. Added a check for this.
(getCellBounds): No need to include gap here.
(getCurrentControlIcon): Fixed to use expandedIcon and collapsedIcon.
(paintRow): No need paint beyond preferred width of tree here.
(updateCurrentVisiblePath): If nothing is selected, the root should
be selected without focus.
* javax/swing/plaf/metal/MetalTreeUI.java
(installDefaults): Fixed defaults for the expanded/collapsed icons.

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.5265tr2=1.5266r1=textr2=text
http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/javax/swing/plaf/basic/BasicTreeUI.java.diff?tr1=1.101tr2=1.102r1=textr2=text
http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/javax/swing/plaf/metal/MetalTreeUI.java.diff?tr1=1.11tr2=1.12r1=textr2=text





[commit-cp] classpath ./ChangeLog java/awt/GridBagLayout.java

2005-10-18 Thread Lillian Angel
CVSROOT:/cvsroot/classpath
Module name:classpath
Branch: 
Changes by: Lillian Angel [EMAIL PROTECTED]   05/10/18 20:06:15

Modified files:
.  : ChangeLog 
java/awt   : GridBagLayout.java 

Log message:
2005-10-18  Lillian Angel  [EMAIL PROTECTED]

* java/awt/GridBagLayout.java
(GetLayoutInfo): Added a null check for lastComponent. Prevents
NPE.

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.5268tr2=1.5269r1=textr2=text
http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/java/awt/GridBagLayout.java.diff?tr1=1.21tr2=1.22r1=textr2=text





[commit-cp] classpath ./ChangeLog javax/swing/event/EventLi...

2005-10-18 Thread Roman Kennke
CVSROOT:/cvsroot/classpath
Module name:classpath
Branch: 
Changes by: Roman Kennke [EMAIL PROTECTED]05/10/18 20:38:06

Modified files:
.  : ChangeLog 
javax/swing/event: EventListenerList.java 
   InternalFrameAdapter.java 
   MouseInputListener.java 

Log message:
2005-10-18  Roman Kennke  [EMAIL PROTECTED]

* javax/swing/event/EventListenerList.java:
* javax/swing/event/InternalFrameAdapter.java:
* javax/swing/event/MouseInputListener.java:
Reformatted slightly. Filled emtpy blocks with comments. Fixed some
slight API doc errors

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.5271tr2=1.5272r1=textr2=text
http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/javax/swing/event/EventListenerList.java.diff?tr1=1.12tr2=1.13r1=textr2=text
http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/javax/swing/event/InternalFrameAdapter.java.diff?tr1=1.3tr2=1.4r1=textr2=text
http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/javax/swing/event/MouseInputListener.java.diff?tr1=1.3tr2=1.4r1=textr2=text





[commit-cp] classpath ./ChangeLog javax/swing/filechooser/F...

2005-10-18 Thread Roman Kennke
CVSROOT:/cvsroot/classpath
Module name:classpath
Branch: 
Changes by: Roman Kennke [EMAIL PROTECTED]05/10/18 20:42:03

Modified files:
.  : ChangeLog 
javax/swing/filechooser: FileFilter.java FileView.java 

Log message:
2005-10-18  Roman Kennke  [EMAIL PROTECTED]

* javax/swing/filechooser/FileFilter.java:
* javax/swing/filechooser/FileView.java:
Filled empty blocks with comments.

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.5272tr2=1.5273r1=textr2=text
http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/javax/swing/filechooser/FileFilter.java.diff?tr1=1.4tr2=1.5r1=textr2=text
http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/javax/swing/filechooser/FileView.java.diff?tr1=1.5tr2=1.6r1=textr2=text





[commit-cp] classpath ./ChangeLog javax/swing/plaf/basic/Ba...

2005-10-18 Thread Roman Kennke
CVSROOT:/cvsroot/classpath
Module name:classpath
Branch: 
Changes by: Roman Kennke [EMAIL PROTECTED]05/10/18 22:10:33

Modified files:
.  : ChangeLog 
javax/swing/plaf/basic: BasicBorders.java 
BasicButtonListener.java 
BasicCheckBoxMenuItemUI.java 
BasicComboBoxEditor.java 
BasicComboBoxRenderer.java 
BasicDesktopIconUI.java 
BasicDesktopPaneUI.java 
BasicFileChooserUI.java 
BasicFormattedTextFieldUI.java 
BasicGraphicsUtils.java 
BasicInternalFrameTitlePane.java 
BasicInternalFrameUI.java 
BasicLabelUI.java BasicListUI.java 
BasicMenuBarUI.java BasicMenuItemUI.java 
BasicMenuUI.java BasicOptionPaneUI.java 
BasicPasswordFieldUI.java 
BasicRadioButtonMenuItemUI.java 
BasicRootPaneUI.java 
BasicScrollPaneUI.java 
BasicSplitPaneDivider.java 
BasicSplitPaneUI.java 
BasicTabbedPaneUI.java 
BasicTableHeaderUI.java 
BasicTableUI.java BasicTextAreaUI.java 
BasicTextUI.java BasicToolBarUI.java 
BasicToolTipUI.java BasicTreeUI.java 
BasicViewportUI.java 

Log message:
2005-10-19  Roman Kennke  [EMAIL PROTECTED]

* javax/swing/plaf/basic/BasicBorders.java
* javax/swing/plaf/basic/BasicButtonListener.java
* javax/swing/plaf/basic/BasicCheckBoxMenuItemUI.java
* javax/swing/plaf/basic/BasicComboBoxEditor.java
* javax/swing/plaf/basic/BasicComboBoxRenderer.java
* javax/swing/plaf/basic/BasicDesktopIconUI.java
* javax/swing/plaf/basic/BasicDesktopPaneUI.java
* javax/swing/plaf/basic/BasicFileChooserUI.java
* javax/swing/plaf/basic/BasicFormattedTextFieldUI.java
* javax/swing/plaf/basic/BasicGraphicsUtils.java
* javax/swing/plaf/basic/BasicInternalFrameTitlePane.java
* javax/swing/plaf/basic/BasicInternalFrameUI.java
* javax/swing/plaf/basic/BasicLabelUI.java
* javax/swing/plaf/basic/BasicListUI.java
* javax/swing/plaf/basic/BasicMenuBarUI.java
* javax/swing/plaf/basic/BasicMenuItemUI.java
* javax/swing/plaf/basic/BasicMenuUI.java
* javax/swing/plaf/basic/BasicOptionPaneUI.java
* javax/swing/plaf/basic/BasicPasswordFieldUI.java
* javax/swing/plaf/basic/BasicRadioButtonMenuItemUI.java
* javax/swing/plaf/basic/BasicRootPaneUI.java
* javax/swing/plaf/basic/BasicScrollPaneUI.java
* javax/swing/plaf/basic/BasicSplitPaneDivider.java
* javax/swing/plaf/basic/BasicSplitPaneUI.java
* javax/swing/plaf/basic/BasicTabbedPaneUI.java
* javax/swing/plaf/basic/BasicTableHeaderUI.java
* javax/swing/plaf/basic/BasicTableUI.java
* javax/swing/plaf/basic/BasicTextAreaUI.java
* javax/swing/plaf/basic/BasicTextUI.java
* javax/swing/plaf/basic/BasicToolBarUI.java
* javax/swing/plaf/basic/BasicToolTipUI.java
* javax/swing/plaf/basic/BasicTreeUI.java
* javax/swing/plaf/basic/BasicViewportUI.java:
Reformatted slightly. Filled emtpy blocks with comments. Fixed some
slight API doc errors

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.5273tr2=1.5274r1=textr2=text
http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/javax/swing/plaf/basic/BasicBorders.java.diff?tr1=1.16tr2=1.17r1=textr2=text
http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/javax/swing/plaf/basic/BasicButtonListener.java.diff?tr1=1.11tr2=1.12r1=textr2=text
http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/javax/swing/plaf/basic/BasicCheckBoxMenuItemUI.java.diff?tr1=1.10tr2=1.11r1=textr2=text
http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/javax/swing/plaf/basic/BasicComboBoxEditor.java.diff?tr1=1.6tr2=1.7r1=textr2=text
http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/javax/swing/plaf/basic/BasicComboBoxRenderer.java.diff?tr1=1.7tr2=1.8r1=textr2=text
http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/javax/swing/plaf/basic/BasicDesktopIconUI.java.diff?tr1=1.4tr2=1.5r1=textr2=text