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

Specification of BasicSplitPaneDivider::getMinimumSize,getPreferredSize doesn't match with its behavior.

    XMLWordPrintable

    Details

    • Subcomponent:
    • Introduced In Version:
      9
    • Resolved In Build:
      b23

      Description

      As per spec of getPreferredSize() and getMinimumSize():
      https://docs.oracle.com/en/java/javase/16/docs/api/java.desktop/javax/swing/plaf/basic/BasicSplitPaneDivider.html#getPreferredSize()
      https://docs.oracle.com/en/java/javase/16/docs/api/java.desktop/javax/swing/plaf/basic/BasicSplitPaneDivider.html#getMinimumSize()

      "Returns dividerSize x dividerSize"
      It is not perfectly clear that dividerSize x dividerSize returns (expected to return) an instance of Dimension with height = dividerSize and width = dividerSize.

      Also JDK implementation of getPreferredSize() and getMinimumSize() methods do not return new Dimension(getDividerSize(), getDividerSize()), rather returns instance of Dimension depending upon HORIZONTAL_SPLIT and VERTICAL_SPLIT.
      Implementation snap:
      if (orientation == JSplitPane.HORIZONTAL_SPLIT) {
          return new Dimension(getDividerSize(), 1);
      }
      return new Dimension(1, getDividerSize());

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              psadhukhan Prasanta Sadhukhan
              Reporter:
              amadgundi Asha Madgundi
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: