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

BasicTextAreaUI:create incompletely documents the possible returned View types

    XMLWordPrintable

Details

    • CSR
    • Resolution: Approved
    • P4
    • 20
    • client-libs
    • None
    • behavioral
    • minimal
    • None. This change just updates the specification.
    • Java API
    • SE

    Description

      Summary

      Update the API specification for the create methods of BasicTextAreaUI and BasicTextFieldUI to be more correct about the returned View type.

      Problem

      API specification of BasicTextAreaUI.create says "Returns a WrappedPlainView or PlainView" which is incorrect as it can also return internal non-API View sub-types if bidi text is handled. So the existing documentation is both not comprehensive and too specific.

      Solution

      Update the specification to remove any mention of a specific View class that can be returned.

      Specification

      javax.swing.plaf.basic.BasicTextAreaUI.create

           /**
      -     * Creates the view for an element.  Returns a WrappedPlainView or
      -     * PlainView.
      +     * Creates a view for an element.
            *
            * @param elem the element
      -     * @return the view
      +     * @return the view for the element
            */
           public View create(Element elem) {

      javax.swing.plaf.basic.BasicTextFieldUI.create

           /**
      -     * Creates a view (FieldView) based on an element.
      +     * Creates a view for an element.
            *
            * @param elem the element
      -     * @return the view
      +     * @return the view for the element
            */
           public View create(Element elem) {

      Attachments

        Issue Links

          Activity

            People

              psadhukhan Prasanta Sadhukhan
              jssunw Jitender S (Inactive)
              Alexey Ivanov, Philip Race
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: