Class ScrolledWindow.Builder<B extends ScrolledWindow.Builder<B>>
- Type Parameters:
B
- the type of the Builder that is returned
- All Implemented Interfaces:
BuilderInterface
,Accessible.Builder<B>
- Enclosing class:
ScrolledWindow
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Finish building theScrolledWindow
object.Emitted whenever user initiated scrolling makes the scrolled window firmly surpass the limits defined by the adjustment in that orientation.Emitted whenever user-initiated scrolling makes the scrolled window exactly reach the lower or upper limits defined by the adjustment in that orientation.Emitted when focus is moved away from the scrolled window by a keybinding.Emitted when a keybinding that scrolls is pressed.The child widget.setHadjustment
(Adjustment hadjustment) TheGtkAdjustment
for the horizontal position.setHasFrame
(boolean hasFrame) Whether to draw a frame around the contents.setHscrollbarPolicy
(PolicyType hscrollbarPolicy) When the horizontal scrollbar is displayed.setKineticScrolling
(boolean kineticScrolling) Whether kinetic scrolling is enabled or not.setMaxContentHeight
(int maxContentHeight) The maximum content height ofscrolledWindow
.setMaxContentWidth
(int maxContentWidth) The maximum content width ofscrolledWindow
.setMinContentHeight
(int minContentHeight) The minimum content height ofscrolledWindow
.setMinContentWidth
(int minContentWidth) The minimum content width ofscrolledWindow
.setOverlayScrolling
(boolean overlayScrolling) Whether overlay scrolling is enabled or not.setPropagateNaturalHeight
(boolean propagateNaturalHeight) Whether the natural height of the child should be calculated and propagated through the scrolled window’s requested natural height.setPropagateNaturalWidth
(boolean propagateNaturalWidth) Whether the natural width of the child should be calculated and propagated through the scrolled window’s requested natural width.setVadjustment
(Adjustment vadjustment) TheGtkAdjustment
for the vertical position.setVscrollbarPolicy
(PolicyType vscrollbarPolicy) When the vertical scrollbar is displayed.setWindowPlacement
(CornerType windowPlacement) Where the contents are located with respect to the scrollbars.Methods inherited from class org.gnome.gtk.Widget.Builder
onDestroy, onDirectionChanged, onHide, onKeynavFailed, onMap, onMnemonicActivate, onMoveFocus, onQueryTooltip, onRealize, onShow, onStateFlagsChanged, onUnmap, onUnrealize, setCanFocus, setCanTarget, setCssClasses, setCssName, setCursor, setFocusable, setFocusOnClick, setHalign, setHasTooltip, setHeightRequest, setHexpand, setHexpandSet, setLayoutManager, setMarginBottom, setMarginEnd, setMarginStart, setMarginTop, setName, setOpacity, setOverflow, setReceivesDefault, setSensitive, setTooltipMarkup, setTooltipText, setValign, setVexpand, setVexpandSet, setVisible, setWidthRequest
Methods inherited from class org.gnome.gobject.GObject.Builder
onNotify
Methods inherited from class io.github.jwharm.javagi.gobject.Builder
addBuilderProperty, connect, connect, connectSignals, getArena, getNames, getValues
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.gnome.gtk.Accessible.Builder
setAccessibleRole
Methods inherited from interface io.github.jwharm.javagi.gobject.BuilderInterface
addBuilderProperty, connect, connect, getArena
-
Constructor Details
-
Builder
protected Builder()Default constructor for aBuilder
object.
-
-
Method Details
-
build
Finish building theScrolledWindow
object. This will callGObject.withProperties(org.gnome.glib.Type, java.lang.String[], org.gnome.gobject.Value[])
to create a new GObject instance, which is then cast toScrolledWindow
.- Overrides:
build
in classWidget.Builder<B extends ScrolledWindow.Builder<B>>
- Returns:
- a new instance of
ScrolledWindow
with the properties that were set in the Builder object.
-
setChild
The child widget.When setting this property, if the child widget does not implement
Scrollable
, the scrolled window will add the child to aViewport
and then set the viewport as the child.- Parameters:
child
- the value for thechild
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setHadjustment
TheGtkAdjustment
for the horizontal position.- Parameters:
hadjustment
- the value for thehadjustment
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setHasFrame
Whether to draw a frame around the contents.- Parameters:
hasFrame
- the value for thehas-frame
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setHscrollbarPolicy
When the horizontal scrollbar is displayed.Use
ScrolledWindow.setPolicy(org.gnome.gtk.PolicyType, org.gnome.gtk.PolicyType)
to set this property.- Parameters:
hscrollbarPolicy
- the value for thehscrollbar-policy
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setKineticScrolling
Whether kinetic scrolling is enabled or not.Kinetic scrolling only applies to devices with source
InputSource.TOUCHSCREEN
.- Parameters:
kineticScrolling
- the value for thekinetic-scrolling
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setMaxContentHeight
The maximum content height ofscrolledWindow
.- Parameters:
maxContentHeight
- the value for themax-content-height
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setMaxContentWidth
The maximum content width ofscrolledWindow
.- Parameters:
maxContentWidth
- the value for themax-content-width
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setMinContentHeight
The minimum content height ofscrolledWindow
.- Parameters:
minContentHeight
- the value for themin-content-height
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setMinContentWidth
The minimum content width ofscrolledWindow
.- Parameters:
minContentWidth
- the value for themin-content-width
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setOverlayScrolling
Whether overlay scrolling is enabled or not.If it is, the scrollbars are only added as traditional widgets when a mouse is present. Otherwise, they are overlaid on top of the content, as narrow indicators.
Note that overlay scrolling can also be globally disabled, with the
Gtk.Settings:gtk-overlay-scrolling
setting.- Parameters:
overlayScrolling
- the value for theoverlay-scrolling
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setPropagateNaturalHeight
Whether the natural height of the child should be calculated and propagated through the scrolled window’s requested natural height.This is useful in cases where an attempt should be made to allocate exactly enough space for the natural size of the child.
- Parameters:
propagateNaturalHeight
- the value for thepropagate-natural-height
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setPropagateNaturalWidth
Whether the natural width of the child should be calculated and propagated through the scrolled window’s requested natural width.This is useful in cases where an attempt should be made to allocate exactly enough space for the natural size of the child.
- Parameters:
propagateNaturalWidth
- the value for thepropagate-natural-width
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setVadjustment
TheGtkAdjustment
for the vertical position.- Parameters:
vadjustment
- the value for thevadjustment
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setVscrollbarPolicy
When the vertical scrollbar is displayed.Use
ScrolledWindow.setPolicy(org.gnome.gtk.PolicyType, org.gnome.gtk.PolicyType)
to set this property.- Parameters:
vscrollbarPolicy
- the value for thevscrollbar-policy
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setWindowPlacement
Where the contents are located with respect to the scrollbars.- Parameters:
windowPlacement
- the value for thewindow-placement
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
onEdgeOvershot
Emitted whenever user initiated scrolling makes the scrolled window firmly surpass the limits defined by the adjustment in that orientation.A similar behavior without edge resistance is provided by the
Gtk.ScrolledWindow::edge-reached
signal.Note: The
pos
argument is LTR/RTL aware, so callers should be aware too if intending to provide behavior on horizontal edges.- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-
onEdgeReached
Emitted whenever user-initiated scrolling makes the scrolled window exactly reach the lower or upper limits defined by the adjustment in that orientation.A similar behavior with edge resistance is provided by the
Gtk.ScrolledWindow::edge-overshot
signal.Note: The
pos
argument is LTR/RTL aware, so callers should be aware too if intending to provide behavior on horizontal edges.- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-
onMoveFocusOut
Emitted when focus is moved away from the scrolled window by a keybinding.This is a keybinding signal.
The default bindings for this signal are
Ctrl
+Tab
to move forward andCtrl
+Shift
+Tab
` to move backward.- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-
onScrollChild
Emitted when a keybinding that scrolls is pressed.This is a keybinding signal.
The horizontal or vertical adjustment is updated which triggers a signal that the scrolled window’s child may listen to and scroll itself.
- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-