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

Spec for javax.swing.plaf.basic.BasicTextUI.getVisibleEditorRect contains inappropriate wording

XMLWordPrintable

    • Icon: CSR CSR
    • Resolution: Unresolved
    • Icon: P4 P4
    • 26
    • client-libs
    • None
    • behavioral
    • minimal
    • No risk, the description of the BasicTextUI#getVisibleEditorRect method is rephrased and clarified.
    • Java API
    • JDK

      Summary

      Remove non-technical wording from BasicTextUI#getVisibleEditorRect()

      Problem

      The specification for BasicTextUI#getVisibleEditorRect() contains the following statement:

      … Due to an unfortunate set of historical events this method is inappropriately named. The Rectangle returned has nothing to do with visibility.

      The current wording is informal, it should be revised.

      Solution

      Clarify the purpose of the method, follow neutral and technical style.

      Specification

      javax.swing.plaf.basic.BasicTextUI

           /**
      -     * Gets the allocation to give the root View.  Due
      -     * to an unfortunate set of historical events this
      -     * method is inappropriately named.  The Rectangle
      -     * returned has nothing to do with visibility.
      +     * Gets the allocation (i.e. the allocated size) for the root view.
      +     * <p>
      +     * The returned rectangle is unrelated to visibility.
      +     * It is used to set the size of the root view.
      +     * <p>
            * The component must have a non-zero positive size for
            * this translation to be computed.
            *
            * @return the bounding box for the root view
      +     * @see View#paint
      +     * @see View#setSize
            */
           protected Rectangle getVisibleEditorRect() {

            psadhukhan Prasanta Sadhukhan
            dbessono Dmitry Bessonov
            Alexey Ivanov
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: