harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexei Zakharov (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HARMONY-4655) [classlib][swing]Setting null as margin to button don't cause to use the default margin
Date Thu, 06 Sep 2007 09:20:31 GMT

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

Alexei Zakharov commented on HARMONY-4655:
------------------------------------------

Dmitry, since from my point of view this issue is not very important and this specific case
isn't directly mentioned in the spec let's just be compatible and comment out the tests.

> [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
>            Assignee: Alexei Zakharov
>            Priority: Minor
>         Attachments: H4655-AbstractButton.patch, 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