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

JList getScrollableUnitIncrement return 0

XMLWordPrintable

    • Icon: CSR CSR
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • client-libs
    • None
    • behavioral
    • minimal
    • Existing behaviour of JList.getScrollableUnitIncrement is clarified to mention what value it can return
    • Java API
    • SE

      Summary

      Clarify JList.getScrollableUnitIncrement can return a non-negative value that is, a positive value including 0, instead of mentioning it will always return a positive number.

      Problem

      JList.getScrollableUnitIncrement specifies that it always returns positive number, which in certain cases is not correct, as it can return 0.

      Solution

      Update JList.getScrollableUnitIncrement to mention it will return a non-negative number comprising of either 0 or any positive number

      Specification

      javax.swing.JList

           * @return the "unit" increment for scrolling in the specified direction;
      -     *         always positive
      +     *         returns a non-negative value
      +     *
            * @see #getScrollableBlockIncrement
      public int getScrollableUnitIncrement(Rectangle visibleRect, int orientation, int direction)

            psadhukhan Prasanta Sadhukhan
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated: