Class FastJScrollPane

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

public class FastJScrollPane extends JScrollPane
A custom JScrollPane that automatically adjusts its scroll step size based on the current UI scale setting.

The scroll speed is set proportionally to the UI scale as provided by GUIPreferences. This ensures a consistent and user-friendly scrolling experience regardless of UI scaling.

See Also:
  • Constructor Details

    • FastJScrollPane

      public FastJScrollPane()
      Constructs a FastJScrollPane with no view component. The scroll increments are set based on the current UI scale.
    • FastJScrollPane

      public FastJScrollPane(Component view)
      Constructs a FastJScrollPane with the specified component as the view. The scroll increments are set based on the current UI scale.
      Parameters:
      view - the component to display in the scroll pane's viewport
    • FastJScrollPane

      public FastJScrollPane(Component view, int vsbPolicy, int hsbPolicy)
      Constructs a FastJScrollPane with the specified component as the view and with specified vertical and horizontal scroll bar policies. The scroll increments are set based on the current UI scale.
      Parameters:
      view - the component to display in the scroll pane's viewport
      vsbPolicy - an integer specifying the vertical scroll bar policy. Should be one of: ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, or #VERTICAL_SCROLLBAR_NEVER
      hsbPolicy - an integer specifying the horizontal scroll bar policy. Should be one of: ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED, or ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER