Package org.gnome.gtk
Class FontButton.Builder<B extends FontButton.Builder<B>>
java.lang.Object
org.javagi.gobject.Builder<B>
org.gnome.gobject.GObject.Builder<B>
org.gnome.gobject.InitiallyUnowned.Builder<B>
org.gnome.gtk.Widget.Builder<B>
org.gnome.gtk.FontButton.Builder<B>
- Type Parameters:
B- the type of the Builder that is returned
- All Implemented Interfaces:
Accessible.Builder<B>,FontChooser.Builder<B>,BuilderInterface
- Enclosing class:
FontButton
public static class FontButton.Builder<B extends FontButton.Builder<B>>
extends Widget.Builder<B>
implements Accessible.Builder<B>, FontChooser.Builder<B>
Inner class implementing a builder pattern to construct a GObject with
properties.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Finish building theFontButtonobject.onActivate(FontButton.ActivateCallback handler) Emitted to when the font button is activated.onFontSet(FontButton.FontSetCallback handler) Emitted when the user selects a font.setModal(boolean modal) Whether the font chooser dialog should be modal.The title of the font chooser dialog.setUseFont(boolean useFont) Whether the buttons label will be drawn in the selected font.setUseSize(boolean useSize) Whether the buttons label will use the selected font size.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.FontChooser.Builder
setFont, setFontDesc, setLanguage, setLevel, setLevel, setPreviewText, setShowPreviewEntry
-
Constructor Details
-
Builder
protected Builder()Default constructor for aBuilderobject.
-
-
Method Details
-
build
Finish building theFontButtonobject. 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 toFontButton.- Overrides:
buildin classWidget.Builder<B extends FontButton.Builder<B>>- Returns:
- a new instance of
FontButtonwith the properties that were set in the Builder object.
-
setModal
Whether the font chooser dialog should be modal.- Parameters:
modal- the value for themodalproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
setTitle
-
setUseFont
Whether the buttons label will be drawn in the selected font.- Parameters:
useFont- the value for theuse-fontproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
setUseSize
Whether the buttons label will use the selected font size.- Parameters:
useSize- the value for theuse-sizeproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
onActivate
Emitted to when the font button is activated.The
::activatesignal onGtkFontButtonis an action signal and emitting it causes the button to present its dialog.- Parameters:
handler- the signal handler- Returns:
- the
Builderinstance is returned, to allow method chaining - Since:
- 4.4
- See Also:
-
onFontSet
Emitted when the user selects a font.When handling this signal, use
FontChooser.getFont()to find out which font was just selected.Note that this signal is only emitted when the user changes the font. If you need to react to programmatic font changes as well, use the notify::font signal.
- Parameters:
handler- the signal handler- Returns:
- the
Builderinstance is returned, to allow method chaining - See Also:
-