Class ClampScrollable.Builder<B extends ClampScrollable.Builder<B>>
- Type Parameters:
B- the type of the Builder that is returned
- All Implemented Interfaces:
Accessible.Builder<B>,Orientable.Builder<B>,Scrollable.Builder<B>,BuilderInterface
- Enclosing class:
ClampScrollable
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Finish building theClampScrollableobject.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, 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, getArenaMethods inherited from interface org.gnome.gtk.Orientable.Builder
setOrientationMethods inherited from interface org.gnome.gtk.Scrollable.Builder
setHadjustment, setHscrollPolicy, setVadjustment, setVscrollPolicy
-
Constructor Details
-
Builder
protected Builder()Default constructor for aBuilderobject.
-
-
Method Details
-
build
Finish building theClampScrollableobject. 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:
buildin classWidget.Builder<B extends ClampScrollable.Builder<B>>- Returns:
- a new instance of
ClampScrollablewith 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-sizeproperty- Returns:
- the
Builderinstance 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-thresholdproperty- Returns:
- the
Builderinstance 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 theunitproperty- Returns:
- the
Builderinstance is returned, to allow method chaining - Since:
- 1.4
-