Class ScrolledWindow.Builder<B extends ScrolledWindow.Builder<B>>
- Type Parameters:
B- the type of the Builder that is returned
- All Implemented Interfaces:
Accessible.Builder<B>,BuilderInterface
- Enclosing class:
ScrolledWindow
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Finish building theScrolledWindowobject.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) TheGtkAdjustmentfor 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) TheGtkAdjustmentfor 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, setLimitEvents, setMarginBottom, setMarginEnd, setMarginStart, setMarginTop, setName, setOpacity, setOverflow, setReceivesDefault, setSensitive, setTooltipMarkup, setTooltipText, setValign, setVexpand, setVexpandSet, setVisible, setWidthRequestMethods inherited from class org.gnome.gobject.GObject.Builder
onNotifyMethods inherited from class org.javagi.gobject.Builder
addBuilderProperty, connect, connect, connectSignals, getArena, getNames, getValuesMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.gnome.gtk.Accessible.Builder
setAccessibleRoleMethods inherited from interface org.javagi.gobject.BuilderInterface
addBuilderProperty, connect, connect, getArena
-
Constructor Details
-
Builder
protected Builder()Default constructor for aBuilderobject.
-
-
Method Details
-
build
Finish building theScrolledWindowobject. 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:
buildin classWidget.Builder<B extends ScrolledWindow.Builder<B>>- Returns:
- a new instance of
ScrolledWindowwith 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 aViewportand then set the viewport as the child.- Parameters:
child- the value for thechildproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
setHadjustment
TheGtkAdjustmentfor the horizontal position.- Parameters:
hadjustment- the value for thehadjustmentproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
setHasFrame
Whether to draw a frame around the contents.- Parameters:
hasFrame- the value for thehas-frameproperty- Returns:
- the
Builderinstance 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-policyproperty- Returns:
- the
Builderinstance 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-scrollingproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
setMaxContentHeight
The maximum content height ofscrolledWindow.- Parameters:
maxContentHeight- the value for themax-content-heightproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
setMaxContentWidth
The maximum content width ofscrolledWindow.- Parameters:
maxContentWidth- the value for themax-content-widthproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
setMinContentHeight
The minimum content height ofscrolledWindow.- Parameters:
minContentHeight- the value for themin-content-heightproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
setMinContentWidth
The minimum content width ofscrolledWindow.- Parameters:
minContentWidth- the value for themin-content-widthproperty- Returns:
- the
Builderinstance 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-scrollingsetting.- Parameters:
overlayScrolling- the value for theoverlay-scrollingproperty- Returns:
- the
Builderinstance 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-heightproperty- Returns:
- the
Builderinstance 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-widthproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
setVadjustment
TheGtkAdjustmentfor the vertical position.- Parameters:
vadjustment- the value for thevadjustmentproperty- Returns:
- the
Builderinstance 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-policyproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
setWindowPlacement
Where the contents are located with respect to the scrollbars.- Parameters:
windowPlacement- the value for thewindow-placementproperty- Returns:
- the
Builderinstance 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-reachedsignal.Note: The
posargument 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
Builderinstance 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-overshotsignal.Note: The
posargument 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
Builderinstance 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+Tabto move forward andCtrl+Shift+Tab` to move backward.- Parameters:
handler- the signal handler- Returns:
- the
Builderinstance 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
Builderinstance is returned, to allow method chaining - See Also:
-