Class ClampLayout.Builder<B extends ClampLayout.Builder<B>>
- Type Parameters:
B- the type of the Builder that is returned
- All Implemented Interfaces:
Orientable.Builder<B>,BuilderInterface
- Enclosing class:
ClampLayout
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Finish building theClampLayoutobject.setMaximumSize(int maximumSize) The maximum size to allocate to the children.setTighteningThreshold(int tighteningThreshold) The size above which the children are clamped.setUnit(LengthUnit unit) The length unit for maximum size and tightening threshold.Methods 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.javagi.gobject.BuilderInterface
addBuilderProperty, connect, connect, getArenaMethods inherited from interface org.gnome.gtk.Orientable.Builder
setOrientation
-
Constructor Details
-
Builder
protected Builder()Default constructor for aBuilderobject.
-
-
Method Details
-
build
Finish building theClampLayoutobject. 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 toClampLayout.- Overrides:
buildin classLayoutManager.Builder<B extends ClampLayout.Builder<B>>- Returns:
- a new instance of
ClampLayoutwith the properties that were set in the Builder object.
-
setMaximumSize
The maximum size to allocate to the children.It is the width if the layout 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 children are clamped.Starting from this size, the layout will tighten its grip on the children, slowly allocating less and less of the available size up to the maximum allocated size. Below that threshold and below the maximum size, the children will be allocated all the available size.
If the threshold is greater than the maximum size to allocate to the children, they will be allocated the whole size up to the maximum. If the threshold is lower than the minimum size to allocate to the children, that size will be used as the tightening threshold.
Effectively, tightening the grip on a 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
-