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

DOC: Unclear spec for BevelBorder constructor and BorderFactory factory method (colors switching)

XMLWordPrintable

    • b130
    • generic
    • generic
    • Verified

      Constructor for BevelBorder class contains the following note

          /**
           * ...
           * Note: The shadow inner and outer colors are switched for a lowered bevel border.
           *
           **/
          public BevelBorder(int bevelType, Color highlightOuterColor,
                             Color highlightInnerColor, Color shadowOuterColor,
                             Color shadowInnerColor) {

      1. It's unclear when exactly the colors are switched - when the instance is created or when the border is painted.
      2. SoftBevelBorder constructor which calls super constructor shown above doesn't say anything about this switching, however it is supposed to happen
      3. Method BorderFactory.createSoftBevelBorder(int type, Color highlightOuter, Color highlightInner, Color shadowOuter, Color shadowInner) contains the same note which is even less clear assuming that factory doesn't do any color switching.

            malenkov Sergey Malenkov (Inactive)
            dbessono Dmitry Bessonov
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: