You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "spark shen (JIRA)" <ji...@apache.org> on 2007/07/31 09:55:53 UTC

[jira] Created: (HARMONY-4578) [classlib][beans] o.a.h.b.editors.ColorEditor & FontEditor do not have correct behaviors

[classlib][beans] o.a.h.b.editors.ColorEditor & FontEditor do not have correct behaviors
----------------------------------------------------------------------------------------

                 Key: HARMONY-4578
                 URL: https://issues.apache.org/jira/browse/HARMONY-4578
             Project: Harmony
          Issue Type: Bug
          Components: Classlib
            Reporter: spark shen


The behavior of o.a.h.b.editors.ColorEditor was not correctly implemented. Neither does FontEditor.
The following test case will give a hint.

public void testFontEditor() throws Exception{
        PropertyEditor e2 = PropertyEditorManager.findEditor(Font.class);
        Font font = new Font("Helvetica", Font.PLAIN, 12);
        e2.setValue(font);
        assertNull(e2.getAsText());
        assertNull(e2.getTags());
        assertSame(font, e2.getValue());
        assertTrue(e2.isPaintable());
        Component c = e2.getCustomEditor();
        assertSame(c, e2);
        e2.addPropertyChangeListener(new ExceptionPropertyChangeListener());

        try {
            e2.setValue(null);
            fail("Should throw an error");
        } catch (MockError e) {
            // expected
            assertNull(e2.getValue());
        }
        
        try {
            e2.setValue(new Font("Arial", Font.BOLD, 10));
            fail("Should throw an error");
        } catch (MockError e) {
            // expected
        }
    }

I will give a patch to amend the behavior of the 2 editors.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (HARMONY-4578) [classlib][beans] o.a.h.b.editors.ColorEditor & FontEditor do not have correct behaviors

Posted by "Tim Ellison (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-4578?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tim Ellison reassigned HARMONY-4578:
------------------------------------

    Assignee: Tim Ellison

> [classlib][beans] o.a.h.b.editors.ColorEditor & FontEditor do not have correct behaviors
> ----------------------------------------------------------------------------------------
>
>                 Key: HARMONY-4578
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4578
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: spark shen
>            Assignee: Tim Ellison
>         Attachments: HY-4578.patch
>
>
> The behavior of o.a.h.b.editors.ColorEditor was not correctly implemented. Neither does FontEditor.
> The following test case will give a hint.
> public void testFontEditor() throws Exception{
>         PropertyEditor e2 = PropertyEditorManager.findEditor(Font.class);
>         Font font = new Font("Helvetica", Font.PLAIN, 12);
>         e2.setValue(font);
>         assertNull(e2.getAsText());
>         assertNull(e2.getTags());
>         assertSame(font, e2.getValue());
>         assertTrue(e2.isPaintable());
>         Component c = e2.getCustomEditor();
>         assertSame(c, e2);
>         e2.addPropertyChangeListener(new ExceptionPropertyChangeListener());
>         try {
>             e2.setValue(null);
>             fail("Should throw an error");
>         } catch (MockError e) {
>             // expected
>             assertNull(e2.getValue());
>         }
>         
>         try {
>             e2.setValue(new Font("Arial", Font.BOLD, 10));
>             fail("Should throw an error");
>         } catch (MockError e) {
>             // expected
>         }
>     }
> I will give a patch to amend the behavior of the 2 editors.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (HARMONY-4578) [classlib][beans] o.a.h.b.editors.ColorEditor & FontEditor do not have correct behaviors

Posted by "Tim Ellison (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-4578?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tim Ellison closed HARMONY-4578.
--------------------------------


No response, assuming it is ok.

> [classlib][beans] o.a.h.b.editors.ColorEditor & FontEditor do not have correct behaviors
> ----------------------------------------------------------------------------------------
>
>                 Key: HARMONY-4578
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4578
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: spark shen
>            Assignee: Tim Ellison
>         Attachments: HY-4578.patch
>
>
> The behavior of o.a.h.b.editors.ColorEditor was not correctly implemented. Neither does FontEditor.
> The following test case will give a hint.
> public void testFontEditor() throws Exception{
>         PropertyEditor e2 = PropertyEditorManager.findEditor(Font.class);
>         Font font = new Font("Helvetica", Font.PLAIN, 12);
>         e2.setValue(font);
>         assertNull(e2.getAsText());
>         assertNull(e2.getTags());
>         assertSame(font, e2.getValue());
>         assertTrue(e2.isPaintable());
>         Component c = e2.getCustomEditor();
>         assertSame(c, e2);
>         e2.addPropertyChangeListener(new ExceptionPropertyChangeListener());
>         try {
>             e2.setValue(null);
>             fail("Should throw an error");
>         } catch (MockError e) {
>             // expected
>             assertNull(e2.getValue());
>         }
>         
>         try {
>             e2.setValue(new Font("Arial", Font.BOLD, 10));
>             fail("Should throw an error");
>         } catch (MockError e) {
>             // expected
>         }
>     }
> I will give a patch to amend the behavior of the 2 editors.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-4578) [classlib][beans] o.a.h.b.editors.ColorEditor & FontEditor do not have correct behaviors

Posted by "spark shen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-4578?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

spark shen updated HARMONY-4578:
--------------------------------

    Attachment: HY-4578.patch

Would you try this patch?

> [classlib][beans] o.a.h.b.editors.ColorEditor & FontEditor do not have correct behaviors
> ----------------------------------------------------------------------------------------
>
>                 Key: HARMONY-4578
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4578
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: spark shen
>         Attachments: HY-4578.patch
>
>
> The behavior of o.a.h.b.editors.ColorEditor was not correctly implemented. Neither does FontEditor.
> The following test case will give a hint.
> public void testFontEditor() throws Exception{
>         PropertyEditor e2 = PropertyEditorManager.findEditor(Font.class);
>         Font font = new Font("Helvetica", Font.PLAIN, 12);
>         e2.setValue(font);
>         assertNull(e2.getAsText());
>         assertNull(e2.getTags());
>         assertSame(font, e2.getValue());
>         assertTrue(e2.isPaintable());
>         Component c = e2.getCustomEditor();
>         assertSame(c, e2);
>         e2.addPropertyChangeListener(new ExceptionPropertyChangeListener());
>         try {
>             e2.setValue(null);
>             fail("Should throw an error");
>         } catch (MockError e) {
>             // expected
>             assertNull(e2.getValue());
>         }
>         
>         try {
>             e2.setValue(new Font("Arial", Font.BOLD, 10));
>             fail("Should throw an error");
>         } catch (MockError e) {
>             // expected
>         }
>     }
> I will give a patch to amend the behavior of the 2 editors.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (HARMONY-4578) [classlib][beans] o.a.h.b.editors.ColorEditor & FontEditor do not have correct behaviors

Posted by "Tim Ellison (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-4578?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tim Ellison resolved HARMONY-4578.
----------------------------------

    Resolution: Fixed

Thanks Spark.

Patch applied to BEANS module at repo revision r561769.

Please check it was applied as you expected.


> [classlib][beans] o.a.h.b.editors.ColorEditor & FontEditor do not have correct behaviors
> ----------------------------------------------------------------------------------------
>
>                 Key: HARMONY-4578
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4578
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: spark shen
>            Assignee: Tim Ellison
>         Attachments: HY-4578.patch
>
>
> The behavior of o.a.h.b.editors.ColorEditor was not correctly implemented. Neither does FontEditor.
> The following test case will give a hint.
> public void testFontEditor() throws Exception{
>         PropertyEditor e2 = PropertyEditorManager.findEditor(Font.class);
>         Font font = new Font("Helvetica", Font.PLAIN, 12);
>         e2.setValue(font);
>         assertNull(e2.getAsText());
>         assertNull(e2.getTags());
>         assertSame(font, e2.getValue());
>         assertTrue(e2.isPaintable());
>         Component c = e2.getCustomEditor();
>         assertSame(c, e2);
>         e2.addPropertyChangeListener(new ExceptionPropertyChangeListener());
>         try {
>             e2.setValue(null);
>             fail("Should throw an error");
>         } catch (MockError e) {
>             // expected
>             assertNull(e2.getValue());
>         }
>         
>         try {
>             e2.setValue(new Font("Arial", Font.BOLD, 10));
>             fail("Should throw an error");
>         } catch (MockError e) {
>             // expected
>         }
>     }
> I will give a patch to amend the behavior of the 2 editors.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.