harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrey Pavlenko (JIRA)" <j...@apache.org>
Subject [jira] Updated: (HARMONY-4085) [classlib][awt][compatibility] BorderLayout does not invoke Component.setSize(int, int) of its components
Date Thu, 07 Jun 2007 07:34:26 GMT

     [ https://issues.apache.org/jira/browse/HARMONY-4085?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Andrey Pavlenko updated HARMONY-4085:
-------------------------------------

    Attachment:     (was: HARMONY-4085-BorderLayout.patch)

> [classlib][awt][compatibility] BorderLayout does not invoke Component.setSize(int, int)
of its components
> ---------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-4085
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4085
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Andrey Pavlenko
>         Attachments: HARMONY-4085-BorderLayout.patch, HARMONY-4085-BorderLayoutRTest.patch
>
>
> BorderLayout does not invoke the method Component.setSize(int, int) of its components
while resizing, but RI does. Because of this compatibility issue some buttons on Java DjVu
Viewer are not displayed. The following test reproduces the issue:
>     public final void test() {
>         final Frame f = new Frame();
>         final boolean[] isInvoked = new boolean[4];
>         f.add(new Component() {
>             @Override
>             public void setSize(int width, int height) {
>                 isInvoked[0] = true;
>                 super.setSize(width, height);
>             }
>         }, BorderLayout.EAST);
>         f.add(new Component() {
>             @Override
>             public void setSize(int width, int height) {
>                 isInvoked[1] = true;
>                 super.setSize(width, height);
>             }
>         }, BorderLayout.WEST);
>         f.add(new Component() {
>             @Override
>             public void setSize(int width, int height) {
>                 isInvoked[2] = true;
>                 super.setSize(width, height);
>             }
>         }, BorderLayout.NORTH);
>         f.add(new Component() {
>             @Override
>             public void setSize(int width, int height) {
>                 isInvoked[3] = true;
>                 super.setSize(width, height);
>             }
>         }, BorderLayout.SOUTH);
>         f.setSize(100, 100);
>         f.setVisible(true);
>         f.dispose();
>         assertTrue(isInvoked[0]);
>         assertTrue(isInvoked[1]);
>         assertTrue(isInvoked[2]);
>         assertTrue(isInvoked[3]);
>     }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message