-
Enhancement
-
Resolution: Unresolved
-
P4
-
None
-
1.4.2
-
Cause Known
-
x86
-
windows_xp
Name: rmT116609 Date: 06/04/2003
A DESCRIPTION OF THE PROBLEM :
The API docs in LayoutManager2 related to the getLayoutAlignmentX and getLayoutAlignmentY methods are unclear.
The documentation implies that the layout manager is responsible for determining the alignment of <i>some</i> component in some container (presumably the parameter <tt>target</tt>). The component that the documentation is referring to <b>is not specified</b>. This makes it nearly impossible to provide an implementation for this method.
The documentation also fails to specify what entity is responsible for aligning the components (or at least what entity is affected by change to a component's alignment state).
Finally, it would be helpful if the documentation provided a reasonable default alignment-value.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Returns the alignment [of ???] along the x axis. This specifies how the component [<i>what component?</i>] would like to be aligned relative to other components [in <tt>target</tt> (?)]. The value should be a number between 0 and 1 where 0 represents alignment along the origin, 1 is aligned the furthest away from the origin, 0.5 is centered, etc. [The default alignment of components is <tt>0.5</tt>. ]
ACTUAL -
Returns the alignment along the x axis. This specifies how the component would like to be aligned relative to other components. The value should be a number between 0 and 1 where 0 represents alignment along the origin, 1 is aligned the furthest away from the origin, 0.5 is centered, etc.
URL OF FAULTY DOCUMENTATION :
http://java.sun.com/j2se/1.4.2/docs/api/java/awt/LayoutManager2.html#getLayoutAlignmentX(java.awt.Container)
(Review ID: 187055)
======================================================================