<Swing Dev> RFR: 8265528: Specification of BasicSplitPaneDivider::getMinimumSize, getPreferredSize doesn't match with its behavior.

Sergey Bylokhov serb at openjdk.java.net
Wed May 5 20:30:50 UTC 2021


On Wed, 5 May 2021 07:01:34 GMT, Prasanta Sadhukhan <psadhukhan at openjdk.org> wrote:

> The current specification of these 2 methods
> api/java.desktop/javax/swing/plaf/basic/BasicSplitPaneDivider.html#getPreferredSize().
> and
> api/java.desktop/javax/swing/plaf/basic/BasicSplitPaneDivider.html#getMinimumSize()
> does not specify correct return values. Also, the spec is not very intuitive and clear.
> 
> Rectified the spec to specify correct behaviour.

src/java.desktop/share/classes/javax/swing/plaf/basic/BasicSplitPaneDivider.java line 309:

> 307:      *
> 308:      * @return a {@code Dimension} object containing the preferred size of
> 309:      *         {@code BasicSplitPaneDivider}

I wonder how we usually specify the getPref/getMin methods. Do we really describe how it is implemented or just mention something like "Returns the minimum size for the XXX".

-------------

PR: https://git.openjdk.java.net/jdk/pull/3870


More information about the swing-dev mailing list