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

BasicTextUI: installDefaults method are contrary to the documentation

XMLWordPrintable

    • Icon: CSR CSR
    • Resolution: Withdrawn
    • Icon: P5 P5
    • None
    • client-libs
    • None
    • behavioral
    • minimal
    • No behavior change - javadoc comment only so minimal risk
    • Java API
    • SE

      Summary

      BasicTextUI: installDefaults javadoc specifies only font, foreground and background properties are set if their current value is either null or a UIResource and other properties are set if the current value is null but in reality all properties such as font, foreground, background, caret color, selection color, selected text color, disabled text color, border and margin are set if their current value is either null or a UIResource.

      Problem

      BasicTextUI: installDefaults javadoc specifies only font, foreground and background properties are set if their current value is either null or a UIResource and other properties are set if the current value is null but in reality all properties such as font, foreground, background, caret color, selection color, selected text color, disabled text color, border and margin are set if their current value is either null or a UIResource.

      Solution

      Rectified javadoc to specify that each of the properties ie, font, foreground, background, caret color, selection color, selected text color, disabled text color, border and margin is set if their current value is either null or a UIResource

      Specification

          /**
            * Initializes component properties, such as font, foreground,
            * background, caret color, selection color, selected text color,
      -     * disabled text color, and border color.  The font, foreground, and
      -     * background properties are only set if their current value is either null
      -     * or a UIResource, other properties are set if the current
      -     * value is null.
      +     * disabled text color, border, and margin. Each property is set
      +     * if its current value is either null or a UIResource.
            *
            * @see #uninstallDefaults
            * @see #installUI
            */
           protected void installDefaults()

            psadhukhan Prasanta Sadhukhan
            ndcosta Nelson Dcosta (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: