Class ProgressBar.Builder<B extends ProgressBar.Builder<B>>
- Type Parameters:
B- the type of the Builder that is returned
- All Implemented Interfaces:
Accessible.Builder<B>,Orientable.Builder<B>,BuilderInterface
- Enclosing class:
ProgressBar
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Finish building theProgressBarobject.setEllipsize(EllipsizeMode ellipsize) The preferred place to ellipsize the string.setFraction(double fraction) The fraction of total work that has been completed.setInverted(boolean inverted) Invert the direction in which the progress bar grows.setPulseStep(double pulseStep) The fraction of total progress to move the bounding block when pulsed.setShowText(boolean showText) Sets whether the progress bar will show a text in addition to the bar itself.Text to be displayed in the progress bar.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
setOrientation
-
Constructor Details
-
Builder
protected Builder()Default constructor for aBuilderobject.
-
-
Method Details
-
build
Finish building theProgressBarobject. 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 toProgressBar.- Overrides:
buildin classWidget.Builder<B extends ProgressBar.Builder<B>>- Returns:
- a new instance of
ProgressBarwith the properties that were set in the Builder object.
-
setEllipsize
The preferred place to ellipsize the string.The text will be ellipsized if the progress bar does not have enough room to display the entire string, specified as a
PangoEllipsizeMode.Note that setting this property to a value other than
EllipsizeMode.NONEhas the side-effect that the progress bar requests only enough space to display the ellipsis ("..."). Another means to set a progress bar's width isWidget.setSizeRequest(int, int).- Parameters:
ellipsize- the value for theellipsizeproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
setFraction
The fraction of total work that has been completed.- Parameters:
fraction- the value for thefractionproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
setInverted
Invert the direction in which the progress bar grows.- Parameters:
inverted- the value for theinvertedproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
setPulseStep
The fraction of total progress to move the bounding block when pulsed.- Parameters:
pulseStep- the value for thepulse-stepproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
setShowText
Sets whether the progress bar will show a text in addition to the bar itself.The shown text is either the value of the
Gtk.ProgressBar:textproperty or, if that isnull, theGtk.ProgressBar:fractionvalue, as a percentage.To make a progress bar that is styled and sized suitably for showing text (even if the actual text is blank), set
Gtk.ProgressBar:show-texttotrueandGtk.ProgressBar:textto the empty string (notnull).- Parameters:
showText- the value for theshow-textproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
setText
-