Hi Tania,
In Sun's API specification for Component.setComponentOrientation() it says:
"To set the orientation of a single component, use this method. To set
the orientation of an entire component hierarchy, use
|applyComponentOrientation|
<http://java.sun.com/j2se/1.4.2/docs/api/java/awt/Component.html#applyComponentOrientation%28java.awt.ComponentOrientation%29>."
So I think this method should do more than just call
setComponentOrientation(). I recommend that you write some Mauve tests
to determine exactly how it behaves...
Regards,
Dave
Tania Bento wrote:
Hey,
The applyComponentOrientation method needs to actually set the
ComponentOrientation property of the container and it doesn't need to
check if the value of the ComponentOrientation passed to it is null as
the setComponentOrientation method already does this. This change is
based on the results of Harmony's WindowTest. Could someone please
approve this patch so that I can commit it. Thanks.
Here's the changelog entry:
2006-06-22 Tania Bento <[EMAIL PROTECTED]>
* java/awt/Container.java:
(applyComponentOrientation): Set the ComponentOrientation
property by calling the setComponentOrientation method.
(applyComponentOrientation): Do not need to check if
ComponentOrientation passed as an argument is null as
setComponentOrienation already does that.
Cheers,
Tania
------------------------------------------------------------------------
Index: java/awt/Container.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/awt/Container.java,v
retrieving revision 1.93
diff -u -r1.93 Container.java
--- java/awt/Container.java 30 May 2006 18:03:35 -0000 1.93
+++ java/awt/Container.java 22 Jun 2006 18:50:26 -0000
@@ -1592,9 +1592,8 @@
* @since 1.4
*/
public void applyComponentOrientation (ComponentOrientation orientation)
- {
- if (orientation == null)
- throw new NullPointerException ();
+ {
+ setComponentOrientation(orientation);
}
public void addPropertyChangeListener (PropertyChangeListener listener)