Package org.gnome.adw
Class Toggle.Builder<B extends Toggle.Builder<B>>
java.lang.Object
io.github.jwharm.javagi.gobject.Builder<B>
org.gnome.gobject.GObject.Builder<B>
org.gnome.adw.Toggle.Builder<B>
- Type Parameters:
B
- the type of the Builder that is returned
- All Implemented Interfaces:
BuilderInterface
- Enclosing class:
Toggle
Inner class implementing a builder pattern to construct a GObject with
properties.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Finish building theToggle
object.The toggle child.setEnabled
(boolean enabled) Whether this toggle is enabled.setIconName
(String iconName) The toggle icon name.The toggle label.The toggle name.setTooltip
(String tooltip) The tooltip of the toggle.setUseUnderline
(boolean useUnderline) Whether an embedded underline in the label indicates a mnemonic.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
-
Constructor Details
-
Builder
protected Builder()Default constructor for aBuilder
object.
-
-
Method Details
-
build
Finish building theToggle
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 toToggle
.- Overrides:
build
in classGObject.Builder<B extends Toggle.Builder<B>>
- Returns:
- a new instance of
Toggle
with the properties that were set in the Builder object.
-
setChild
The toggle child.When the child is set, icon and label are not displayed.
It's recommended to still set the label, as it can still be used by the screen reader.
- Parameters:
child
- the value for thechild
property- Returns:
- the
Builder
instance is returned, to allow method chaining - Since:
- 1.7
-
setEnabled
Whether this toggle is enabled.- Parameters:
enabled
- the value for theenabled
property- Returns:
- the
Builder
instance is returned, to allow method chaining - Since:
- 1.7
-
setIconName
-
setLabel
The toggle label.The label will be displayed alone or next to the icon, unless
Toggle:child
is set, but will still be read out by the screen reader.- Parameters:
label
- the value for thelabel
property- Returns:
- the
Builder
instance is returned, to allow method chaining - Since:
- 1.7
-
setName
-
setTooltip
-
setUseUnderline
Whether an embedded underline in the label indicates a mnemonic.See
Toggle:label
.- Parameters:
useUnderline
- the value for theuse-underline
property- Returns:
- the
Builder
instance is returned, to allow method chaining - Since:
- 1.7
-