swingx
  1. swingx
  2. SWINGX-1398

Safegaurd JXPanel painting against improper subclassing

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.6.2
    • Fix Version/s: 1.6.3
    • Component/s: None
    • Labels:
      None

      Description

      We assume that JXPanel is a container and has no foreground. Some people incorrectly subclass J(X)Panel to create custom components with UI delegates. In such cases, those users could be painting a foreground in the UI delegate. Our background painter would actually paint over their foreground painting.

      Even though I would consider it an implementation bug on the users' part to do such a thing, we cannot prevent against such stupidity, but we can safe guard against it. We can call getUI().paint after we paint the background painter. This extra call will do nothing in core UI delegates (other than add the overhead of an unnecessary call), but it will show foreground in these poorly-designed components.

        Activity

        Karl Schaefer created issue -
        Karl Schaefer made changes -
        Field Original Value New Value
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Karl Schaefer made changes -
        Assignee Karl Schaefer [ kschaefe ]

          People

          • Assignee:
            Karl Schaefer
            Reporter:
            Karl Schaefer
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: