harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vasily Zakharov (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HARMONY-2647) [classlib][swing] javax.swing.text.JTextComponent focusAcceleratorKey property has invalid name
Date Wed, 10 Jan 2007 15:30:28 GMT

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

Vasily Zakharov commented on HARMONY-2647:
------------------------------------------

I'll look into this issue.


> [classlib][swing] javax.swing.text.JTextComponent focusAcceleratorKey property has invalid
name
> -----------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-2647
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2647
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Anton Ivanov
>
> See http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4177283
> Since javax.swing.text.JTextComponent has methods getFocusAccelerator(), setFocusAccelerator(),
the corresponding property name should be "focusAccelerator".
> The test to reproduce the problem:
> ----------------------------------------------------------------------------------
> import java.beans.*;
> import javax.swing.text.*;
> import javax.swing.event.*;
> public class FocusAcceleratorKeyTest {
>     JTextComponent jtc;
>     SimplePropertyChangeListener pChListener;
>     class SimplePropertyChangeListener implements PropertyChangeListener {
>         PropertyChangeEvent event;
>         public void propertyChange(final PropertyChangeEvent e) {
>             if (e.getPropertyName() != "ancestor") {
>                 event = e;
>             }
>         }
>     }
>     public static void main(String argv[]) {
>         new FocusAcceleratorKeyTest().test();            
>     }
>     public void test() {
>        pChListener = new SimplePropertyChangeListener();
>        jtc = new JTextArea();
>        jtc.addPropertyChangeListener(pChListener);
>        jtc.setFocusAccelerator('b');
>        System.out.println(pChListener.event.getPropertyName());
>        System.out.println(JTextComponent.FOCUS_ACCELERATOR_KEY);
>     }
> }
> ----------------------------------------------------------------------------------
> RI returns the right name for the property: "focusAccelerator" while Harmony returns
"focusAcceleratorKey".
> Specification says that JTextComponent.FOCUS_ACCELERATOR_KEY is the "bound property name
for the focus accelerator"
> it is defined as "focusAcceleratorKey" in specification. It seems to be a misprint.
> JTextComponent.FOCUS_ACCELERATOR_KEY should be "focusAccelerator" and PropertyChangeEvent.getPropertyName
should return a right property name.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message