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

SystemColor.createContext(..) - is it correct? is it needed?

XMLWordPrintable

    • b02
    • sparc
    • solaris_9
    • Verified

        SystemColor.createContext(..) currently overrides the same method in java.awt.Color
        by removing caching of the PaintContext instance. This breaks the subclassing contract
        and most likely is a mistake: originally, there was no caching in java.awt.Color either;
        at some point it was added, but not propagated to SystemColor.

        Also, both Color and SystemColor use 'new ColorPaintContext(value, cm)'. However, 'value'
        is the RGB value for Color, and an *index* into the array of RGB values for SystemColor.
        This doesn't look right.

              dav Andrei Dmitriev (Inactive)
              savzan Stanislav Avzan (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: