<Swing Dev> code review request: 7049024: DnD fails with JTextArea and JTextField
Pavel Porvatov
pavel.porvatov at oracle.com
Fri Oct 14 09:30:43 UTC 2011
Hi Sean,
I saw your fix and it looks good. Now I'm discussing copyright details:
if we can add IBM copyright or not...
Regards, Pavel
> Hi all,
>
> The case is about how to handle system selection when
> DefaultCaret.moveDot is invoked.
> In current implementation, the text component (like JTextField)
> related to the DefaultCaret
> instance will change the system selection because caret moves (as
> perform a "select"
> operation). However, there is an action in DnD that only the view
> needs to be restored in a
> selected status while the system selection should not be restored
> because it is not a
> "select" operation.
>
> The fix checks if the component related to the DefaultCaret
> instance owns the focus,
> if it does, the action is treated as user selection and update "system
> selection"; else, the
> action is thought to restore the visual status of the component only
> and does not update
> "system selection".
>
> And, there is a regression testcase in the patch as well. The
> testcase is put in directory
> JTextArea because the bug is reported to it.
>
> Webrev is here :
> http://cr.openjdk.java.net/~ngmr/7049024/webrev.02/
> <http://cr.openjdk.java.net/%7Engmr/7049024/webrev.02/>
>
> I have tested it on linux.
> Windows is not affected by this bug and the regression test case
> does not affect it as well.
>
> --
> Best Regards,
> Sean Chou
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/swing-dev/attachments/20111014/45c5a3a0/attachment.html>
More information about the swing-dev
mailing list