TextArea, RowCanvas
Henk Blik
hjblik at dds.nl
Thu Jan 28 05:56:03 PST 1999
L.S.
I am using kaffe-1.0.b3 on a NCR mp-ras system an ran into some problems
using the TextArea.
1. Missing newline after an insert of a line, I fixedit using a mail
from the archive
2. setCaretPosition after determing the position by searching in the
text placed the caret at a wrong postion because the (virtual) newlines
were not counted in TextArea. Visa Versa give te getCaretPosition a
wrong offset in the text string
3. It is possible a non editable TextArea to insert tabs and newlines
and to delete characters.
4. Vertical scrolling the text in a TextArea using the scrollbar, the
page-up/down or cursor-up/down keys caused overwritting of area outside
the text area, this was caused by the rgr.copyArea in RowCanvas
I fixed all these problems for myself and send you de diff -e output for
TextArea.java and RowCanvas.java. I hope these fixes will be of some use
in the further development of kaffe. If there are any questions or if
you need othe diff output don't hesitate to concact me.
regards
Henk Blik
-------------- next part --------------
881c
if ( i0 <= n ){
.
432a
if ( ! isEditable)
break;
.
426a
if ( ! isEditable)
break;
.
423a
if ( ! isEditable)
break;
.
420a
if ( ! isEditable) // hjb 01-27-1999: do nothing for TAB,
break; // ENTER, DEL and BS if not editable
.
273a
pos --; // hjb 01-27-1999: substract 1 for the virtual newline
.
254a
xt ++; // hjb 01-27-1999: count the virtual newline
.
-------------- next part --------------
248a
// hjb, 01-28-1999: only move the area that will fall in
// pane after the copy.
// otherwise text is displayed above or under the pane
// obscuring the scrollbar and/or other fields
if (rows < 0)
rgr.copyArea( d, d + rows * rowHeight, width- 2*d, height- 2*d,
0, rows * rowHeight );
else
rgr.copyArea( d, d, width- 2*d, height- 2*d - rows * rowHeight,
0, rows * rowHeight );
.
247d
More information about the kaffe
mailing list