Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6608456

RFE: need API to define RepaintManager per components hierarchy

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P2
    • Resolution: Fixed
    • Affects Version/s: 7
    • Fix Version/s: 7
    • Component/s: client-libs
    • Labels:
      None
    • Subcomponent:
    • Resolved In Build:
      b38
    • CPU:
      generic
    • OS:
      generic

      Backports

        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.

          Activity

          Hide
          idk Igor Kushnirskiy (Inactive) added a comment -
          BT2: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.
          Show
          idk Igor Kushnirskiy (Inactive) added a comment - BT2: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.

            People

            • Assignee:
              idk Igor Kushnirskiy (Inactive)
              Reporter:
              idk Igor Kushnirskiy (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported:
                Indexed: