public interface JScrollBarsToolkitComponent extends ScrollingToolkitComponent
ScrollingToolkitComponent
) can implement this
interface, if they provide scrolling functionality using a horizontal and a vertical JScrollBar
,
e.g. with JScrollBar
s. It contains default method implementations that delegate the scrolling methods
of ScrollingToolkitComponent
to methods of the two JScrollBar
s.
Implementations of this interface must call
SwingComponentTools.registerScrollEventForwarders(JScrollBarsToolkitComponent)
in their
constructor to ensure the associated ScrollingTICComponent
fires correct scroll events.
Note that the default methods of this interface assume that value and extend of the models are given in pixels. If there is e.g. a linear factor between the values of the models and pixel coordinate system of the scrolled component, this interface cannot be used.
ScrollingToolkitComponent
,
JScrollPaneToolkitComponent
Modifier and Type | Method and Description |
---|---|
javax.swing.JScrollBar |
getHorizontalScrollBar() |
javax.swing.JScrollBar |
getVerticalScrollBar() |
default java.awt.Rectangle |
getVisibleRectangle() |
default void |
setScrollOffset(int x,
int y) |
getIndependentComponent
assignSize, getLocationInParent, getTargetToolkit, getToolkitSize, isFocusOwner, repaint, requestFocus
javax.swing.JScrollBar getHorizontalScrollBar()
javax.swing.JScrollBar getVerticalScrollBar()
default void setScrollOffset(int x, int y)
setScrollOffset
in interface ScrollingToolkitComponent
default java.awt.Rectangle getVisibleRectangle()
getVisibleRectangle
in interface ScrollingToolkitComponent