Class JScrollBar

All Implemented Interfaces:
Adjustable, ImageObserver, MenuContainer, Serializable, Accessible

public class JScrollBar extends JComponent implements Adjustable, Accessible
Emulator for JScrollBar. Per D_viewport_scrollbar_shadows, a shadow JDK component: emulator-only, no surrogate counterpart. Vaadin's Scroller web component owns scrollbar rendering internally — there is no separate Vaadin "scrollbar" object server-side. JScrollBar here exists to give migrated code that calls scrollPane.getVerticalScrollBar().setUnitIncrement(16) a non-null object that round-trips its own state without NPE — a common pattern in L&F-aware migrated code.

Full BoundedRangeModel bookkeeping

The JDK contract treats JScrollBar as a model object with value / minimum / maximum / extent + unitIncrement / blockIncrement. The emulator stores all of these so user code's setters round-trip through their getters.

Listeners stored but never fire

addAdjustmentListener(AdjustmentListener) stores the listener; no Vaadin source fires AdjustmentEvents for scroll position without a custom DOM listener stack (R_match_swing_errors sub-bucket (a) — graduate when a migration target asks).
See Also:
  • Field Details

    • orientation

      protected int orientation
    • model

      protected BoundedRangeModel model
    • unitIncrement

      protected int unitIncrement
    • blockIncrement

      protected int blockIncrement
  • Constructor Details

    • JScrollBar

      public JScrollBar()
    • JScrollBar

      public JScrollBar(int orientation)
    • JScrollBar

      public JScrollBar(int orientation, int value, int extent, int min, int max)
  • Method Details