JDK-6608456 : RFE: need API to define RepaintManager per components hierarchy
  • Type: Enhancement
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 7
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2007-09-24
  • Updated: 2010-04-02
  • Resolved: 2008-10-15
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
6u10Fixed 7 b38Fixed
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.

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.