Hi all. After Roman did this* change the NavigationFilter demo did not work anymore.
I fixed the problem in WrappedPlainView.
Another small change corrects the argument of the BadLocationException.
2006-08-16 Robert Schuster <[EMAIL PROTECTED]>
* javax/swing/text/WrappedPlainView.java:
(WrappedLine.modelToView): Provide variable pos as argument and not a
fixed value.
(calculateBreakPosition): Add p0 to return value.
cya
Robert
* -> this one:
Roman Kennke wrote:
> This fixes view to model mapping in javax.swing.text according to
> Intel's testsuite.
>
> 2006-08-14 Roman Kennke <[EMAIL PROTECTED]>
>
> PR 28028
> * javax/swing/text/Utilities.java
> (getTabbedTextOffset): Don't add p0 here.
>
> /Roman
>
>
> ------------------------------------------------------------------------
Index: javax/swing/text/WrappedPlainView.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/text/WrappedPlainView.java,v
retrieving revision 1.22
diff -u -r1.22 WrappedPlainView.java
--- javax/swing/text/WrappedPlainView.java 8 Aug 2006 10:36:34 -0000 1.22
+++ javax/swing/text/WrappedPlainView.java 15 Aug 2006 23:35:09 -0000
@@ -300,8 +300,8 @@
}
if (wordWrap)
- return Utilities.getBreakLocation(lineBuffer, metrics, alloc.x,
- alloc.x + alloc.width, this, p0);
+ return p0 + Utilities.getBreakLocation(lineBuffer, metrics, alloc.x,
+ alloc.x + alloc.width, this, 0);
else
return p0 + Utilities.getTabbedTextOffset(lineBuffer, metrics, alloc.x,
alloc.x + alloc.width, this, 0,
@@ -571,7 +571,7 @@
// Throwing a BadLocationException is an observed behavior of the RI.
if (rect.isEmpty())
throw new BadLocationException("Unable to calculate view coordinates "
- + "when allocation area is empty.", 5);
+ + "when allocation area is empty.", pos);
Segment s = getLineBuffer();
int lineHeight = metrics.getHeight();
signature.asc
Description: OpenPGP digital signature
