Package org.gnome.gtk
Class FontButton.Builder<B extends FontButton.Builder<B>>
java.lang.Object
io.github.jwharm.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:
BuilderInterface
,Accessible.Builder<B>
,FontChooser.Builder<B>
- 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
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Finish building theFontButton
object.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, 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.FontChooser.Builder
setFont, setFontDesc, setLanguage, setLevel, setLevel, setPreviewText, setShowPreviewEntry
-
Constructor Details
-
Builder
protected Builder()Default constructor for aBuilder
object.
-
-
Method Details
-
build
Finish building theFontButton
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 toFontButton
.- Overrides:
build
in classWidget.Builder<B extends FontButton.Builder<B>>
- Returns:
- a new instance of
FontButton
with the properties that were set in the Builder object.
-
setModal
Whether the font chooser dialog should be modal.- Parameters:
modal
- the value for themodal
property- Returns:
- the
Builder
instance 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-font
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setUseSize
Whether the buttons label will use the selected font size.- Parameters:
useSize
- the value for theuse-size
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
onActivate
Emitted to when the font button is activated.The
::activate
signal onGtkFontButton
is an action signal and emitting it causes the button to present its dialog.- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - 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
Builder
instance is returned, to allow method chaining - See Also:
-