From bc828c8fb6693760c153a75188f96b1c9d201c8a Mon Sep 17 00:00:00 2001 From: Prasanta Sadhukhan Date: Sun, 13 Jul 2025 11:02:19 +0000 Subject: [PATCH] 6955128: Spec for javax.swing.plaf.basic.BasicTextUI.getVisibleEditorRect contains inappropriate wording Reviewed-by: aivanov, prr, dnguyen, abhiscxk, tr --- .../classes/javax/swing/plaf/basic/BasicTextUI.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTextUI.java b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTextUI.java index 094f5be68c5..391cfdf0b65 100644 --- a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTextUI.java +++ b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTextUI.java @@ -1029,14 +1029,17 @@ public abstract class BasicTextUI extends TextUI implements ViewFactory { /** - * 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 (that is the allocated size) for the root view. + *

+ * The returned rectangle is unrelated to visibility. + * It is used to set the size of the root view. + *

* 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() { Rectangle alloc = editor.getBounds();