classpath-patches
[Top][All Lists]
Advanced

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

[cp-patches] FYI: PlainView addition


From: Roman Kennke
Subject: [cp-patches] FYI: PlainView addition
Date: Thu, 13 Oct 2005 13:35:07 +0000

Here comes a small optimization to PlainView: I added the protected
method getLineBuffer() which provides access to a shared instance of
Segment, which can be reused everytime when something must be fetched
from the document. This should take some load from the allocator and
garbage collector.

2005-10-13  Roman Kennke  <address@hidden>

        * javax/swing/text/PlainView.java
        (lineBuffer): New field used as buffer to fetch text from a
        document.
        (getLineBuffer): New method, provides access to the new field
        above.
        (modelToView): Use new lineBuffer.
        (drawSelectedText): Likewise.
        (drawUnselectedText): Likewise.
        (determineMaxLineLength): Likewise.
        (viewToModel): Likewise.
        (updateDamage): Likewise.


/Roman

Attachment: PlainView.diff
Description: Text Data


reply via email to

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