Uploaded image for project: 'NetBeans'
  1. NetBeans
  2. NETBEANS-5756

Wheel Scrolling broken from 8.2

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 12.4
    • None
    • ide - UI
    • None

    Description

      In 8.2, the UI was using BasicScrollPaneUI
      the handler of mouse wheel was returning if viewport was null

      JViewport vp = scrollpane.getViewport();
      if (vp == null) { return; }

      In later versions, you introduced SmoothScrollPaneUI
      the handler of mouse wheel was returning if viewport is null
      but also if the instance is not Scrollable:

      JViewport viewport = this.scrollpane.getViewport();
      if (viewport != null && viewport.getView() instanceof Scrollable) {

      As a result, the wheel stop to function on non scrollable components
      Whereas it used to work in the past, as if component was not scrollable it went to

      else {
      // Viewport's view is not a Scrollable, or fast wheel
      // scrolling is not enabled.
      BasicScrollBarUI.scrollByUnits(toScroll, direction,
      units, limitScroll);
      }

      To avoid this regression, Netbeans code should mimic default swing behavior which is to scroll even if viewport's view is not a Scrollable.

       

      Attachments

        Activity

          People

            Unassigned Unassigned
            Ngx472 Nicolas Gouteux
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: