EVALUATION
Name: sdR10048 Date: 09/24/2003
As it turned out GridBadLayout.addLayoutComponent(String name, Component comp)
has no implementaion. See GridBagLayout.java:
/**
* Adds the specified component with the specified name to the layout.
* @param name the name of the component
* @param comp the component to be added
*/
public void addLayoutComponent(String name, Component comp) {
}
So I reassign it to JDK bug.
======================================================================
Name: agR10216 Date: 09/26/2003
The method GridBadLayout.addLayoutComponent(String name, Component
comp) does nothing indeed. The javadoc for this method should say
that it is "not used by this class" as in
FlowLayout.addLayoutComponent(String name, Component comp).
But the test calls directly GridBadLayout.addLayoutComponent(String
name, Component comp). Such a use isn't supposed. One should call
Container.add(String name, Component comp) instead. The test should be
revised. For example see the test
api/java_awt/GridLayout/index.html#AddLayoutComponent and note that
GridLayout.addLayoutComponent(String name, Component comp) does
nothing (and it isn't explicitly specified) either.
###@###.### 2003-09-26
======================================================================
Name: agR10216 Date: 10/08/2003
The following CCC request was approved:
4890577 : JCK1.5-runtime api/java_awt/GridBagLayout/index.html#AddLayoutComponent failed
Release: Tiger
Type: bug-fix
Manager: Jeff.Dinkins
Engineer: ###@###.###
Problem
The JCK1.5 test
api/java_awt/GridBagLayout/index.html#AddLayoutComponent fails because
it verifies the method
java.awt.GridBadLayout.addLayoutComponent(String name, Component comp),
which does nothing but the specification says that this method "Adds
the specified component with the specified name to the layout."
This method inherited from the interface java.awt.LayoutManager. The
specification of LayoutManager.addLayoutComponent(String name, Component comp)
says: "If the layout manager uses a per-component string, adds the
component comp to the layout, associating it with the string specified
by name."
GridBagLayout does not use a per-component string, so it should be
specified that this method has no effect (as in
javax.swing.SpringLayout, javax.swing.BoxLayout and
java.awt.FlowLayout). This change affects only documentation.
Requestors
Java AWT team
Solution
According to the implementation, specify that the method
java.awt.GridBadLayout.addLayoutComponent(String name, Component comp)
has no effect.
Interface summary
exported external method java.awt.GridBadLayout.addLayoutComponent(String name, Component comp)
Specification
java.awt.GridBadLayout:
/**
! * Has no effect, since this layout manager does not use a per-component string.
*/
public void addLayoutComponent(String name, Component comp) {
}
Compatibility risk: minimal
Engineering commitments
Request will be finalized by: date-of-submission (FAST-TRACK request)
Change will be integrated by: 2003-10-17
Request reviewed by: ###@###.###
###@###.### 2003-10-08
======================================================================
|