[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[cp-patches] Fixing the selection handling in JTextComponent: path witho
From: |
Meskauskas Audrius |
Subject: |
[cp-patches] Fixing the selection handling in JTextComponent: path without tab alterations |
Date: |
Sun, 27 Feb 2005 20:56:26 +0100 |
Fixing the selection handling in JTextComponent.
The Mauve test have indicated wrong work of the
JTextComponent.getSelectedText(). For example, if the text is 0123456789 and
the selection covers the interval 2..5, the expected value is '234' and the
returned value is '01234'.
Another test indicated that setSelectionStart(int) and setSelectionEnd(int)
can set the 'dot' of the component carret ahead the 'mark' of this carret,
something that should never happen unless moveCaretPosition(int) is called.
This indicated that might be go wrong in the first test.
Fixing this problem required to rewrite several selection-related methods
in JTextComponent. The suggested path is attached. With this path, the
selection handling seems operating as expected.
This case is covered by the two tests,
gnu.testlet.javax.swing.JTextArea.text and additionally written
gnu.testlet.javax.swing.JTextArea gettingText.
Audrius Meskauskas.
JTextComponent.java.diff
Description: Binary data
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [cp-patches] Fixing the selection handling in JTextComponent: path without tab alterations,
Meskauskas Audrius <=