classpath-patches
[Top][All Lists]
Advanced

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

[cp-patches] Fixed and cleaned up JViewport


From: Roman Kennke
Subject: [cp-patches] Fixed and cleaned up JViewport
Date: Thu, 22 Sep 2005 16:40:09 +0200 (CEST)
User-agent: SquirrelMail/1.4.4

Here comes my JViewport fixup:

1. All the painting code is moved from BasicViewportUI to JViewport as
specified.
2. The backingstore painting is implemented correctly and set as default
method. This should give great performance improvement when scrolling
(given that the scrolled componenent is reasonably clever, which all the
text components are not unfortunatly)
3. The missing field and method in JViewport are added/implemented.
4. The blitting method in JViewport is not implemented. The reason is
described in the source code. However, AFAICS the backingstore method as
implemented by should be comparable fast and is therefore used as a
fallback.

I very much hope that this solves the ugly clipping problems that have
been seen in scrollpanes and such. After all my tests it does, if not,
please ping me.

2005-09-22  Roman Kennke  <address@hidden>

        * javax/swing/JViewport.java
        (JViewport): Initialize cached fields for blitting.
        (setViewPosition): Repaint viewport.
        (revalidate): Set damaged flag. Used for blitting.
        (reshape): Likewise.
        (paint): New method. Decide which paint method to use.
        (computeBlit): New method. Computes the parameters for blitting.
        (paintSimple): New method. Performs painting in simple mode.
        (paintBackingStore): New method. Performs painting in backingstore
        mode.
        (paintBlit): New method. Performs painting in blit mode. For
        now this falls back to backing store mode.
        * javax/swing/plaf/basic/BasicViewportUI.java
        (ChangeListener): Removed inner class.
        (installDefaults): Load default for background color. Changed
        signature to protected.
        (installListeners): Removed method.
        (uninstallDefaults): Changed signature to protected.
        (installUI): Call installDefaults().
        (uninstallUI): Call uninstallDefaults().
        (getPreferredSize): Removed.
        (paint): Removed.
        (paintSimple): Removed.
        (paintBackingStore): Removed.

/Roman

Attachment: Viewport.diff
Description: Text Data


reply via email to

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