You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Alexei Zakharov (JIRA)" <ji...@apache.org> on 2007/06/09 15:39:26 UTC

[jira] Assigned: (HARMONY-4085) [classlib][awt][compatibility] BorderLayout does not invoke Component.setSize(int, int) of its components

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

Alexei Zakharov reassigned HARMONY-4085:
----------------------------------------

    Assignee: Alexei Zakharov

> [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
>            Assignee: Alexei Zakharov
>         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.