Class ShortcutsShortcut.Builder<B extends ShortcutsShortcut.Builder<B>>
- Type Parameters:
B
- the type of the Builder that is returned
- All Implemented Interfaces:
BuilderInterface
,Accessible.Builder<B>
- Enclosing class:
ShortcutsShortcut
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Finish building theShortcutsShortcut
object.setAccelerator
(String accelerator) Deprecated.setAccelSizeGroup
(SizeGroup accelSizeGroup) Deprecated.setActionName
(String actionName) Deprecated.setDirection
(TextDirection direction) Deprecated.Deprecated.setIconSet
(boolean iconSet) Deprecated.setShortcutType
(ShortcutType shortcutType) Deprecated.setSubtitle
(String subtitle) Deprecated.setSubtitleSet
(boolean subtitleSet) Deprecated.Deprecated.setTitleSizeGroup
(SizeGroup titleSizeGroup) Deprecated.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, 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
-
Constructor Details
-
Builder
protected Builder()Default constructor for aBuilder
object.
-
-
Method Details
-
build
Finish building theShortcutsShortcut
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 toShortcutsShortcut
.- Overrides:
build
in classWidget.Builder<B extends ShortcutsShortcut.Builder<B>>
- Returns:
- a new instance of
ShortcutsShortcut
with the properties that were set in the Builder object.
-
setAccelSizeGroup
Deprecated.The size group for the accelerator portion of this shortcut.This is used internally by GTK, and must not be modified by applications.
- Parameters:
accelSizeGroup
- the value for theaccel-size-group
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setAccelerator
Deprecated.The accelerator(s) represented by this object.This property is used if
Gtk.ShortcutsShortcut:shortcut-type
is set toShortcutType.ACCELERATOR
.The syntax of this property is (an extension of) the syntax understood by
Gtk.acceleratorParse(java.lang.String, io.github.jwharm.javagi.base.Out<java.lang.Integer>, io.github.jwharm.javagi.base.Out<java.util.Set<org.gnome.gdk.ModifierType>>)
. Multiple accelerators can be specified by separating them with a space, but keep in mind that the available width is limited.It is also possible to specify ranges of shortcuts, using
...
between the keys. Sequences of keys can be specified using a+
or&
between the keys.Examples:
- A single shortcut:
<ctl><alt>delete
- Two alternative shortcuts:
<shift>a Home
- A range of shortcuts:
<alt>1...<alt>9
- Several keys pressed together:
Control_L&Control_R
- A sequence of shortcuts or keys:
<ctl>c+<ctl>x
Use "+" instead of "&" when the keys may (or have to be) pressed sequentially (e.g use "t+t" for 'press the t key twice').
Note that
<
,>
and&
need to be escaped as<
,>
; and&
; when used in .ui files.- Parameters:
accelerator
- the value for theaccelerator
property- Returns:
- the
Builder
instance is returned, to allow method chaining
- A single shortcut:
-
setActionName
Deprecated.A detailed action name.If this is set for a shortcut of type
ShortcutType.ACCELERATOR
, then GTK will use the accelerators that are associated with the action viaApplication.setAccelsForAction(java.lang.String, java.lang.String[])
, and settingGtk.ShortcutsShortcut:accelerator
is not necessary.- Parameters:
actionName
- the value for theaction-name
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setDirection
Deprecated.The text direction for which this shortcut is active.If the shortcut is used regardless of the text direction, set this property to
TextDirection.NONE
.- Parameters:
direction
- the value for thedirection
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setIcon
Deprecated.An icon to represent the shortcut or gesture.This property is used if
Gtk.ShortcutsShortcut:shortcut-type
is set toShortcutType.GESTURE
.For the other predefined gesture types, GTK provides an icon on its own.
- Parameters:
icon
- the value for theicon
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setIconSet
Deprecated.true
if an icon has been set.- Parameters:
iconSet
- the value for theicon-set
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setShortcutType
Deprecated.The type of shortcut that is represented.- Parameters:
shortcutType
- the value for theshortcut-type
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setSubtitle
Deprecated.The subtitle for the shortcut or gesture.This is typically used for gestures and should be a short, one-line text that describes the gesture itself. For the predefined gesture types, GTK provides a subtitle on its own.
- Parameters:
subtitle
- the value for thesubtitle
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setSubtitleSet
Deprecated.true
if a subtitle has been set.- Parameters:
subtitleSet
- the value for thesubtitle-set
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setTitle
Deprecated.The textual description for the shortcut or gesture represented by this object.This should be a short string that can fit in a single line.
- Parameters:
title
- the value for thetitle
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setTitleSizeGroup
Deprecated.The size group for the textual portion of this shortcut.This is used internally by GTK, and must not be modified by applications.
- Parameters:
titleSizeGroup
- the value for thetitle-size-group
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-