[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[cp-patches] FYI: Fixlet for Container, LayoutManager.addLayourComponent
From: |
Mark Wielaard |
Subject: |
[cp-patches] FYI: Fixlet for Container, LayoutManager.addLayourComponent |
Date: |
Sun, 22 Jan 2006 21:21:13 +0100 |
Hi,
This fixes an issue reported by James and for which he wrote a mauve
test:
2006-01-22 Mark Wielaard <address@hidden>
Fixes bug #25903,
reported by James Damour <address@hidden>
* java/awt/Container.java (addImpl): Use empty string as name when
null constraints for LayoutManager.addLayoutComponent().
Committed,
Mark
Index: java/awt/Container.java
===================================================================
RCS file: /sources/classpath/classpath/java/awt/Container.java,v
retrieving revision 1.75
diff -u -r1.75 Container.java
--- java/awt/Container.java 9 Jan 2006 16:19:46 -0000 1.75
+++ java/awt/Container.java 22 Jan 2006 20:21:12 -0000
@@ -1,5 +1,6 @@
/* Container.java -- parent container class in AWT
- Copyright (C) 1999, 2000, 2002, 2003, 2004, 2005 Free Software Foundation
+ Copyright (C) 1999, 2000, 2002, 2003, 2004, 2005, 2006
+ Free Software Foundation
This file is part of GNU Classpath.
@@ -385,6 +386,8 @@
// Notify the layout manager.
if (layoutMgr != null)
{
+ // If we have a LayoutManager2 the constraints are "real",
+ // otherwise they are the "name" of the Component to add.
if (layoutMgr instanceof LayoutManager2)
{
LayoutManager2 lm2 = (LayoutManager2) layoutMgr;
@@ -393,7 +396,7 @@
else if (constraints instanceof String)
layoutMgr.addLayoutComponent((String) constraints, comp);
else
- layoutMgr.addLayoutComponent(null, comp);
+ layoutMgr.addLayoutComponent("", comp);
}
// We previously only sent an event when this container is showing.
signature.asc
Description: This is a digitally signed message part
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [cp-patches] FYI: Fixlet for Container, LayoutManager.addLayourComponent,
Mark Wielaard <=