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

text.StyleContext.getBackground(AttributeSet) works wrong

XMLWordPrintable

    • beta
    • sparc
    • solaris_2.5.1



      Name: akC57697 Date: 04/09/99



       The method StyleContext.getBackground(AttributeSet) does not work
      correctly.
       The reason of failure in the 'copy-paste' mistake in
        StyleContext.java 1.57 98/11/17
        line 205
       --------------------------------8-<---------------------------------
          /**
           * Takes a set of attributes and turn it into a foreground color
           * specification. This might be used to specify things
           * like brighter, more hue, etc. By default it simply returns
           * the value specified by the StyleConstants.Foreground attribute.
           *
           * @param attr the set of attributes
           * @return the color
           */
          public Color getForeground(AttributeSet attr) {
      return StyleConstants.getForeground(attr);
          }

          /**
           * Takes a set of attributes and turn it into a background color
           * specification. This might be used to specify things
           * like brighter, more hue, etc. By default it simply returns
           * the value specified by the StyleConstants.Background attribute.
           *
           * @param attr the set of attributes
           * @return the color
           */
          public Color getBackground(AttributeSet attr) {
      return StyleConstants.getForeground(attr); <----!!!!!!
          }
       --------------------------------8-<---------------------------------
      java full version "JDK-1.2.2-M"

      ======================================================================

            tprinzing Tim Prinzing (Inactive)
            akuzminorcl Alexander Kuzmin (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: