United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6608456 RFE: need API to define RepaintManager per components hierarchy
JDK-6608456 : RFE: need API to define RepaintManager per components hierarchy

Details
Type:
Enhancement
Submit Date:
2007-09-24
Status:
Resolved
Updated Date:
2010-04-02
Project Name:
JDK
Resolved Date:
2008-10-15
Component:
client-libs
OS:
generic
Sub-Component:
javax.swing
CPU:
generic
Priority:
P2
Resolution:
Fixed
Affected Versions:
7
Fixed Versions:

Related Reports
Backport:

Sub Tasks

Description
Currently only global RepaintManager can be defined for a swing
application. There are cases when better granularity is required. 
We need a way to define RepaintManager for components hierarchy.

                                    

Comments
EVALUATION

Developers are using custom RepaintManagers to add custom rendering to
their applications. Because of that we can not simply change
RepaintManager.currentManager(Component) to return registered per component
hierarchy repaint manager. These custom RepaintManagers usually rely
on the supper implementation. We want javax.swing.RepaintManager to
delegate execution to the registered per component heiarchy
RepaintManagers. This way we will not break these custom
RepaintManagers. 

Note: in reality it might be more complicated than just one custom repaint manager:
RepaintManager                  JPanel
                                  ^
                                  |
FXRepaintManager                FXPanel
                                  ^
                                  |
RepaintManagerX                 JXPanel
                                  ^
                                  |
ReflectionRepaintManager        ReflectionPanel

Custom repaint managers should rely not on the super class
implementation but on the RepaintManager defined for super component.
For RefectionPanel RefectionRepaintManager should rely on
RepaintManagerX which should rely on FXRepaintManager which should
rely on RepaintManager.

This more complex case is not covered by this RFE.

For this RFE I suggest to store delegate RepaintManager in component clientProperty and use it from RepaintManager implementation.
                                     
2007-09-24



Hardware and Software, Engineered to Work Together