Class ClampScrollable.Builder<B extends ClampScrollable.Builder<B>>
- Type Parameters:
B
- the type of the Builder that is returned
- All Implemented Interfaces:
BuilderInterface
,Accessible.Builder<B>
,Orientable.Builder<B>
,Scrollable.Builder<B>
- Enclosing class:
ClampScrollable
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Finish building theClampScrollable
object.The child widget of theAdwClampScrollable
.setMaximumSize
(int maximumSize) The maximum size allocated to the child.setTighteningThreshold
(int tighteningThreshold) The size above which the child is clamped.setUnit
(LengthUnit unit) The length unit for maximum size and tightening threshold.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
Methods inherited from interface org.gnome.gtk.Orientable.Builder
setOrientation
Methods inherited from interface org.gnome.gtk.Scrollable.Builder
setHadjustment, setHscrollPolicy, setVadjustment, setVscrollPolicy
-
Constructor Details
-
Builder
protected Builder()Default constructor for aBuilder
object.
-
-
Method Details
-
build
Finish building theClampScrollable
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 toClampScrollable
.- Overrides:
build
in classWidget.Builder<B extends ClampScrollable.Builder<B>>
- Returns:
- a new instance of
ClampScrollable
with the properties that were set in the Builder object.
-
setChild
-
setMaximumSize
The maximum size allocated to the child.It is the width if the clamp is horizontal, or the height if it is vertical.
- Parameters:
maximumSize
- the value for themaximum-size
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setTighteningThreshold
The size above which the child is clamped.Starting from this size, the clamp will tighten its grip on the child, slowly allocating less and less of the available size up to the maximum allocated size. Below that threshold and below the maximum width, the child will be allocated all the available size.
If the threshold is greater than the maximum size to allocate to the child, the child will be allocated all the width up to the maximum. If the threshold is lower than the minimum size to allocate to the child, that size will be used as the tightening threshold.
Effectively, tightening the grip on the child before it reaches its maximum size makes transitions to and from the maximum size smoother when resizing.
- Parameters:
tighteningThreshold
- the value for thetightening-threshold
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setUnit
The length unit for maximum size and tightening threshold.Allows the sizes to vary depending on the text scale factor.
- Parameters:
unit
- the value for theunit
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-