-
CSR
-
Resolution: Approved
-
P2
-
None
-
behavioral
-
minimal
-
No behavior change - specification only so minimal risk
-
Java API
-
SE
Summary
The current specification of
api/java.desktop/javax/swing/plaf/basic/BasicSplitPaneDivider.html#getPreferredSize().
and
api/java.desktop/javax/swing/plaf/basic/BasicSplitPaneDivider.html#getMinimumSize()
does not match with the current implementation.
Problem
api/java.desktop/javax/swing/plaf/basic/BasicSplitPaneDivider.html#getPreferredSize()
and
api/java.desktop/javax/swing/plaf/basic/BasicSplitPaneDivider.html#getMinimumSize() specifies that these methods returns dividerSize x dividerSize value but in reality it returns dividerSize x 1 or 1 x dividerSize depending on the splitpanedivider's orientation
Solution
Rectified the specification of these methods to specify correct returned values.
Specification
/**
- * Returns dividerSize x dividerSize
+ * Returns the preferred size of the divider.
+ * @implNote In current implementation,
+ * if the splitpane is HORIZONTAL_SPLIT, the preferred size is obtained from
+ * width of {@code getDividerSize} pixels and height of 1 pixel
+ * If the splitpane is VERTICAL_SPLIT, the preferred size is obtained from
+ * height of {@code getDividerSize} pixels and width of 1 pixel
+ *
+ * @return a {@code Dimension} object containing the preferred size of
+ * {@code BasicSplitPaneDivider}
*/
public Dimension getPreferredSize() {
/**
- * Returns dividerSize x dividerSize
+ * Returns the minimum size of the divider.
+ * @implNote In current implementation,
+ * if the splitpane is HORIZONTAL_SPLIT, the minimum size is obtained from
+ * width of {@code getDividerSize} pixels and height of 1 pixel
+ * If the splitpane is VERTICAL_SPLIT, the minimum size is obtained from
+ * height of {@code getDividerSize} pixels and width of 1 pixel
+ *
+ * @return a {@code Dimension} object containing the minimum size of
+ * {@code BasicSplitPaneDivider}
*/
public Dimension getMinimumSize() {
- csr of
-
JDK-8265528 Specification of BasicSplitPaneDivider::getMinimumSize,getPreferredSize doesn't match with its behavior.
-
- Resolved
-