<AWT Dev>  Review request for 7124213 and 7160627
Sergey.Bylokhov at oracle.com
Wed Sep 12 06:42:19 PDT 2012
See comments inline.
12.09.2012 16:50, Anthony Petrov wrote
> Hi Sergey,
>> 880 * empty. In the XPeers or WPeers we use some magic
>> constants, but here we
>> 881 * try to use something more useful,
> Why can't we use "some magic constants" here, and the constant 1 in
> particular? This choice may be relevant to components that display
> some text, but e.g. for a container component using text-based metrics
> doesn't look right.
Containers uses getP/getM methods from the LWCanvasPeer. Default
implementation in LWComponentPeer is applicable for usual components only.
> Also, I see that "w" was used previously, and you're changing this to
> "0". Perhaps "W" might work best?
Just because it is used in the XToolkit and
>> 43 abstract class LWContainerPeer<T extends Container, D extends
>> 44 extends LWCanvasPeer<T, D>
> A Canvas peer implementation may be "heavier" since it can pull some
> graphics-related code which is unnecessary for simple containers.
Most of the graphics code will be in the CGLGraphicsConfig.
> best regards,
> On 9/11/2012 9:38 PM, Sergey Bylokhov wrote:
>> Hi Everyone,
>> Please review the fix for:
>> 7124213 [macosx] pack() does ignore size of a component; doesn't on
>> the other platforms.
>> 7160627 [macosx] TextArea has wrong initial size
>> Description of main changes:
>> All our components were split into 3 groups:
>> - Uses getPreferedSize()/getMinimumSise from swing delegetes.
>> - Uses its own size as a preferedSize/minimumSize.
>> - Uses its own implementation.
>> LWContainerPeer is subclass of LWCanvasPeer now. We can share buffers
>> methods in LWCanvasPeer and LWWindowPeer.
>> All magic/system constants were removed. Now we relies on default
>> look and feel as much as possible.
>> Bugs: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7160627
>> ** Webrev can be found at:
>> Best regards, Sergey.
Best regards, Sergey.
More information about the awt-dev