Class ProgressBar.Builder<B extends ProgressBar.Builder<B>>
- Type Parameters:
B
- the type of the Builder that is returned
- All Implemented Interfaces:
BuilderInterface
,Accessible.Builder<B>
,Orientable.Builder<B>
- Enclosing class:
ProgressBar
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Finish building theProgressBar
object.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, 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
-
Constructor Details
-
Builder
protected Builder()Default constructor for aBuilder
object.
-
-
Method Details
-
build
Finish building theProgressBar
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 toProgressBar
.- Overrides:
build
in classWidget.Builder<B extends ProgressBar.Builder<B>>
- Returns:
- a new instance of
ProgressBar
with 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.NONE
has 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 theellipsize
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setFraction
The fraction of total work that has been completed.- Parameters:
fraction
- the value for thefraction
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setInverted
Invert the direction in which the progress bar grows.- Parameters:
inverted
- the value for theinverted
property- Returns:
- the
Builder
instance 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-step
property- Returns:
- the
Builder
instance 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:text
property or, if that isnull
, theGtk.ProgressBar:fraction
value, 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-text
totrue
andGtk.ProgressBar:text
to the empty string (notnull
).- Parameters:
showText
- the value for theshow-text
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setText
-