Package org.gnome.adw
Class Toggle.Builder<B extends Toggle.Builder<B>>
java.lang.Object
org.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 theToggleobject.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
onNotifyMethods inherited from class org.javagi.gobject.Builder
addBuilderProperty, connect, connect, connectSignals, getArena, getNames, getValues
-
Constructor Details
-
Builder
protected Builder()Default constructor for aBuilderobject.
-
-
Method Details
-
build
Finish building theToggleobject. 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:
buildin classGObject.Builder<B extends Toggle.Builder<B>>- Returns:
- a new instance of
Togglewith 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 thechildproperty- Returns:
- the
Builderinstance is returned, to allow method chaining - Since:
- 1.7
-
setEnabled
Whether this toggle is enabled.- Parameters:
enabled- the value for theenabledproperty- Returns:
- the
Builderinstance 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:childis set, but will still be read out by the screen reader.- Parameters:
label- the value for thelabelproperty- Returns:
- the
Builderinstance 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-underlineproperty- Returns:
- the
Builderinstance is returned, to allow method chaining - Since:
- 1.7
-