harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dmitry Irlyanov (JIRA)" <j...@apache.org>
Subject [jira] Updated: (HARMONY-4655) [classlib][swing]Setting null as margin to button don't cause to use the default margin
Date Tue, 21 Aug 2007 11:03:30 GMT

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

Dmitry Irlyanov updated HARMONY-4655:
-------------------------------------

    Attachment: H4655-AbstractButtonTest.patch

Regression test patch added

> [classlib][swing]Setting null as margin to button don't cause to use the default margin
> ---------------------------------------------------------------------------------------
>
>                 Key: HARMONY-4655
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4655
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Dmitry Irlyanov
>            Priority: Minor
>         Attachments: H4655-AbstractButtonTest.patch
>
>
> According to spec, AbstractButton.setMargin(null) causes the button to use the default
margin (2,2,2,2) but Harmony doesn't obey this rule
> import java.awt.Insets;
> import javax.swing.JRadioButton;
> public class Test {
>     public static void main(String[] args) {
>         
>         JRadioButton rb = new JRadioButton();
>         System.err.println(rb.getMargin());
>         rb.setMargin(null);
>         System.err.println(rb.getMargin());
>         rb.setMargin(new Insets(10,10,10,10));
>         System.err.println(rb.getMargin());
>         rb.setMargin(null);
>         System.err.println(rb.getMargin());
>     }
> }
> Output(RI):
> javax.swing.plaf.InsetsUIResource[top=2,left=2,bottom=2,right=2]
> javax.swing.plaf.InsetsUIResource[top=2,left=2,bottom=2,right=2]
> java.awt.Insets[top=10,left=10,bottom=10,right=10]
> javax.swing.plaf.InsetsUIResource[top=2,left=2,bottom=2,right=2]
> Output(Harmony):
> javax.swing.plaf.InsetsUIResource[left=2,top=2,right=2,bottom=2]
> null
> java.awt.Insets[left=10,top=10,right=10,bottom=10]
> null

-- 
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