You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Andrey Pavlenko (JIRA)" <ji...@apache.org> on 2007/06/07 08:41:25 UTC
[jira] Created: (HARMONY-4085) [classlib][awt][compatibility]
BorderLayout does not invoke Component.setSize(int, int) of its components
[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.
[jira] Updated: (HARMONY-4085) [classlib][awt][compatibility]
BorderLayout does not invoke Component.setSize(int, int) of its components
Posted by "Andrey Pavlenko (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-4085?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andrey Pavlenko updated HARMONY-4085:
-------------------------------------
Attachment: HARMONY-4085-BorderLayoutRTest.patch
HARMONY-4085-BorderLayout.patch
I've modified the method BorderLayout.setBounds() to invoke the package protected method Component.setBounds() followed by the Component.setSize() method. The method Component.setBounds() is invoked with NativeWindow.BOUNDS_NOSIZE argument, so it does not perform component resizing, the resizing is performed by the invocation of the Component.setSize() method.
> [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.
[jira] Updated: (HARMONY-4085) [classlib][awt][compatibility]
BorderLayout does not invoke Component.setSize(int, int) of its components
Posted by "Andrey Pavlenko (JIRA)" <ji...@apache.org>.
[ 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-BorderLayoutRTest.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.
[jira] Updated: (HARMONY-4085) [classlib][awt][compatibility]
BorderLayout does not invoke Component.setSize(int, int) of its components
Posted by "Andrey Pavlenko (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-4085?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andrey Pavlenko updated HARMONY-4085:
-------------------------------------
Attachment: HARMONY-4085-BorderLayoutRTest.patch
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.
[jira] Updated: (HARMONY-4085) [classlib][awt][compatibility]
BorderLayout does not invoke Component.setSize(int, int) of its components
Posted by "Andrey Pavlenko (JIRA)" <ji...@apache.org>.
[ 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.
[jira] Assigned: (HARMONY-4085) [classlib][awt][compatibility]
BorderLayout does not invoke Component.setSize(int, int) of its components
Posted by "Alexei Zakharov (JIRA)" <ji...@apache.org>.
[ 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.
[jira] Resolved: (HARMONY-4085) [classlib][awt][compatibility]
BorderLayout does not invoke Component.setSize(int, int) of its components
Posted by "Alexei Zakharov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-4085?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alexei Zakharov resolved HARMONY-4085.
--------------------------------------
Resolution: Fixed
Andrey, I applied your patch at the revision 555691. Please check.
p.s. Thanks!
> [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.