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] Created: (HARMONY-4085) [classlib][awt][compatibility] BorderLayout does not invoke Component.setSize(int, int) of its components
Date Thu, 07 Jun 2007 06:41:25 GMT
[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


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