You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Tim Ellison (JIRA)" <ji...@apache.org> on 2007/08/01 13:44:53 UTC
[jira] Assigned: (HARMONY-4578) [classlib][beans]
o.a.h.b.editors.ColorEditor & FontEditor do not have correct behaviors
[ 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.