<AWT Dev>  Review request for 7124213 and 7160627
anthony.petrov at oracle.com
Wed Sep 12 05:50:18 PDT 2012
> 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. Also, I see that "w" was used previously, and you're
changing this to "0". Perhaps "W" might work best?
> 43 abstract class LWContainerPeer<T extends Container, D extends JComponent>
> 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. Do we
really have to inherit from LWCanvasPeer here? Could we extract common
code in a separate class and make container and canvas peers extend it
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.
More information about the awt-dev