classpath-patches
[Top][All Lists]
Advanced

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

[cp-patches] FYI: JComponent painting reworked


From: Roman Kennke
Subject: [cp-patches] FYI: JComponent painting reworked
Date: Thu, 22 Sep 2005 16:13:35 +0200 (CEST)
User-agent: SquirrelMail/1.4.4

Hi,

while working on JViewport I did some restructuring and cleanup in the
JComponent painting code. This changes boil down to this:

1. paintChildren does not call into AWT painting anymore. This allows for
some optimizations.
2. The double buffering is not performed in paint(). This must be decided
before paint is called. When paint() is called, the Graphics object should
already paint on the back buffer. This also allows us to handle the
isDoubleBuffered() property like the JDK: this should be turned on for all
components.
3. Reimplemented the paintImmediatly. Turn on double buffering there and
add some more structure to the code.
3. Implement two accessibility methods. In fact I have implemented them
already some time ago, but now they can go in with the rest.

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

        * javax/swing/JComponent.java
        (AccessibleJComponent.addPropertyChangeListener): Partly omplemented.
        (AccessibleJComponent.getAccessibleStateSet): Partly implemented.
        (doubleBuffered): Default value of this field is true.
        (paint): Moved double buffer painting stuff to separate method.
        (paintChildren): Don't call into AWT painting code here. This allows
        for a small optimization.
        (paintImmediately): Don't go up to the parent window, try to start
        painting on the nearest JRootPane if possible.
        (paintImmediately2): New method. Actually performs repainting
        on the repaint root.
        (paintDoubleBuffered): New method. Performs painting using
        a double buffer.
        (paintSimple): New method. Performs painting without buffer.

/Roman

Attachment: JComponent.diff
Description: Text Data


reply via email to

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