Interface ScrollPaneBuilder

All Superinterfaces:
ComponentBuilder<JScrollPane,ScrollPaneBuilder>, Supplier<JScrollPane>

public interface ScrollPaneBuilder extends ComponentBuilder<JScrollPane,ScrollPaneBuilder>
A builder for JScrollPane
  • Method Details

    • view

      Parameters:
      view - the view component
      Returns:
      this builder instance
    • view

      ScrollPaneBuilder view(Supplier<? extends JComponent> view)
      Parameters:
      view - the view component
      Returns:
      this builder instance
    • verticalScrollBarPolicy

      ScrollPaneBuilder verticalScrollBarPolicy(int verticalScrollBarPolicy)
      Parameters:
      verticalScrollBarPolicy - the vertical scroll bar policy
      Returns:
      this builder instance
      See Also:
    • horizontalScrollBarPolicy

      ScrollPaneBuilder horizontalScrollBarPolicy(int horizontalScrollBarPolicy)
      Parameters:
      horizontalScrollBarPolicy - the horizontal scroll bar policy
      Returns:
      this builder instance
      See Also:
    • verticalUnitIncrement

      ScrollPaneBuilder verticalUnitIncrement(int verticalUnitIncrement)
      Parameters:
      verticalUnitIncrement - the unit increment for the vertical scrollbar
      Returns:
      this builder instance
      See Also:
    • horizontalUnitIncrement

      ScrollPaneBuilder horizontalUnitIncrement(int horizontalUnitIncrement)
      Parameters:
      horizontalUnitIncrement - the unit increment for the horizontal scrollbar
      Returns:
      this builder instance
      See Also:
    • verticalBlockIncrement

      ScrollPaneBuilder verticalBlockIncrement(int verticalBlockIncrement)
      Parameters:
      verticalBlockIncrement - the block increment for the vertical scrollbar
      Returns:
      this builder instance
      See Also:
    • horizontalBlockIncrement

      ScrollPaneBuilder horizontalBlockIncrement(int horizontalBlockIncrement)
      Parameters:
      horizontalBlockIncrement - the block increment for the horizontal scrollbar
      Returns:
      this builder instance
      See Also:
    • wheelScrollingEnable

      ScrollPaneBuilder wheelScrollingEnable(boolean wheelScrollingEnabled)
      Parameters:
      wheelScrollingEnabled - wheel scrolling enabled
      Returns:
      this builder instance
    • layout

      Parameters:
      layout - the layout manager
      Returns:
      this builder instance
      See Also:
    • followHorizontal

      ScrollPaneBuilder followHorizontal(@Nullable JScrollPane scrollPane)
      The resulting scroll pane follows the horizontal scrolling of the given one, the way a filter or summary panel follows the columns of a table, typically without scroll bars of its own, see ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER.

      Note that:

      • The following is one way, the given scroll pane leads. Scrolling the follower directly, such as via JComponent.scrollRectToVisible(java.awt.Rectangle) from within its view, is not reflected in the leader, the two ending up misaligned until the leader is next scrolled, so scroll the leader instead.
      • The view of the follower must be as wide as the view of the leader, plus the width of the vertical scroll bar of the leader, in case it is displayed, the follower being that much wider than the leader's viewport, the two otherwise ending up misaligned when scrolled to the end.
      • The leader holds on to the follower, the two are expected to share a lifetime.
      Parameters:
      scrollPane - the scroll pane which horizontal scrolling to follow, null for none
      Returns:
      this builder instance
    • builder

      static ScrollPaneBuilder builder()
      Returns:
      a new ScrollPaneBuilder instance