[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cp-patches] FYI: PlainView implementations

From: Anthony Balkissoon
Subject: [cp-patches] FYI: PlainView implementations
Date: Wed, 05 Oct 2005 14:18:35 -0400

This implements insertUpdate and removeUpdate for PlainView.

I did this work in response to bug 24152:

Basically, this allows us to cache the length of the longest line (and
which line it is) so that calls to getPreferredSpan don't take a
ridiculously long time.  These 2 methods allow us to calculate the
length on the fly as text is inserted and deleted.

The test program in the bug report used to be unrunnable under classpath
because the delay was (much much much) too long, but it is runnable

However, the method getDemoText (in the test case attached to the bug
report) still runs orders of magnitude slower on classpath than on the
JDK.  The calls in the method are to Math.random and to
StringBuffer.append.  Someone may want to look into this.

2005-10-05  Anthony Balkissoon  <address@hidden>

        * javax/swing/text/
        (insertOrRemoveUpdate): New method.
        (insertUpdate): New method.
        (removeUpdate): New method.


Attachment: PlainViewInsertAndRemoveUpdate.diff
Description: Text Data

reply via email to

[Prev in Thread] Current Thread [Next in Thread]