Module is.codion.swing.common.ui
Interface ScrollPaneBuilder
- All Superinterfaces:
ComponentBuilder<JScrollPane,,ScrollPaneBuilder> Supplier<JScrollPane>
A builder for JScrollPane
-
Method Summary
Modifier and TypeMethodDescriptionstatic ScrollPaneBuilderbuilder()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, seeScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER.horizontalBlockIncrement(int horizontalBlockIncrement) horizontalScrollBarPolicy(int horizontalScrollBarPolicy) horizontalUnitIncrement(int horizontalUnitIncrement) layout(@Nullable LayoutManager layout) verticalBlockIncrement(int verticalBlockIncrement) verticalScrollBarPolicy(int verticalScrollBarPolicy) verticalUnitIncrement(int verticalUnitIncrement) view(Supplier<? extends JComponent> view) view(JComponent view) wheelScrollingEnable(boolean wheelScrollingEnabled) Methods inherited from interface is.codion.swing.common.ui.component.builder.ComponentBuilder
ancestorListener, background, border, build, build, clientProperty, componentListener, componentOrientation, enabled, enabled, focusable, focusable, focusCycleRoot, focusListener, font, font, foreground, get, hierarchyListener, keyEvent, keyListener, label, label, label, maximumHeight, maximumSize, maximumWidth, minimumHeight, minimumSize, minimumWidth, mouseListener, mouseMotionListener, mouseWheelListener, name, onBuild, onSetVisible, opaque, popupControl, popupControls, popupControls, popupMenu, preferredHeight, preferredSize, preferredWidth, propertyChangeListener, propertyChangeListener, scrollPane, toolTipText, toolTipText, transferFocusOnEnter, transferFocusOnEnter, transferHandler, visible, visible
-
Method Details
-
view
- Parameters:
view- the view component- Returns:
- this builder instance
-
view
- Parameters:
view- the view component- Returns:
- this builder instance
-
verticalScrollBarPolicy
- Parameters:
verticalScrollBarPolicy- the vertical scroll bar policy- Returns:
- this builder instance
- See Also:
-
horizontalScrollBarPolicy
- Parameters:
horizontalScrollBarPolicy- the horizontal scroll bar policy- Returns:
- this builder instance
- See Also:
-
verticalUnitIncrement
- Parameters:
verticalUnitIncrement- the unit increment for the vertical scrollbar- Returns:
- this builder instance
- See Also:
-
horizontalUnitIncrement
- Parameters:
horizontalUnitIncrement- the unit increment for the horizontal scrollbar- Returns:
- this builder instance
- See Also:
-
verticalBlockIncrement
- Parameters:
verticalBlockIncrement- the block increment for the vertical scrollbar- Returns:
- this builder instance
- See Also:
-
horizontalBlockIncrement
- Parameters:
horizontalBlockIncrement- the block increment for the horizontal scrollbar- Returns:
- this builder instance
- See Also:
-
wheelScrollingEnable
- Parameters:
wheelScrollingEnabled- wheel scrolling enabled- Returns:
- this builder instance
-
layout
- Parameters:
layout- the layout manager- Returns:
- this builder instance
- See Also:
-
followHorizontal
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, seeScrollPaneConstants.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
- The following is one way, the given scroll pane leads. Scrolling the follower directly, such as via
-
builder
- Returns:
- a new
ScrollPaneBuilderinstance
-