Class BottomSheet.Builder<B extends BottomSheet.Builder<B>>
- Type Parameters:
B- the type of the Builder that is returned
- All Implemented Interfaces:
Accessible.Builder<B>,BuilderInterface
- Enclosing class:
BottomSheet
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Finish building theBottomSheetobject.Emitted when the close button or shortcut is used whileDialog:can-closeis set toFALSE.setAlign(float align) Horizontal alignment of the bottom sheet.setBottomBar(Widget bottomBar) The bottom bar widget.setCanClose(boolean canClose) Whether the bottom sheet can be closed by user.setCanOpen(boolean canOpen) Whether the bottom sheet can be opened by user.setContent(Widget content) The content widget.setFullWidth(boolean fullWidth) Whether the bottom sheet takes the full width.setModal(boolean modal) Whether the bottom sheet is modal.setOpen(boolean open) Whether the bottom sheet is open.setRevealBottomBar(boolean revealBottomBar) Whether to reveal the bottom bar.The bottom sheet widget.setShowDragHandle(boolean showDragHandle) Whether to overlay a drag handle in the bottom sheet.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, getArena
-
Constructor Details
-
Builder
protected Builder()Default constructor for aBuilderobject.
-
-
Method Details
-
build
Finish building theBottomSheetobject. 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 toBottomSheet.- Overrides:
buildin classWidget.Builder<B extends BottomSheet.Builder<B>>- Returns:
- a new instance of
BottomSheetwith the properties that were set in the Builder object.
-
setAlign
Horizontal alignment of the bottom sheet.0 means the bottom sheet is flush with the start edge, 1 means it's flush with the end edge. 0.5 means it's centered.
Only used when
BottomSheet:full-widthis set toFALSE.- Parameters:
align- the value for thealignproperty- Returns:
- the
Builderinstance is returned, to allow method chaining - Since:
- 1.6
-
setBottomBar
The bottom bar widget.Shown when
BottomSheet:openisFALSE. When open, morphs into theBottomSheet:sheet.Bottom bar can be temporarily hidden using the
BottomSheet:reveal-bottom-barproperty.- Parameters:
bottomBar- the value for thebottom-barproperty- Returns:
- the
Builderinstance is returned, to allow method chaining - Since:
- 1.6
-
setCanClose
Whether the bottom sheet can be closed by user.It can be closed via the close button, swiping down, pressing
Escapeor clicking the content dimming (when modal).Bottom sheet can still be closed using
BottomSheet:open.- Parameters:
canClose- the value for thecan-closeproperty- Returns:
- the
Builderinstance is returned, to allow method chaining - Since:
- 1.6
-
setCanOpen
Whether the bottom sheet can be opened by user.It can be opened via clicking or swiping up from the bottom bar.
Does nothing if
BottomSheet:bottom-baris not set.Bottom sheet can still be opened using
BottomSheet:open.- Parameters:
canOpen- the value for thecan-openproperty- Returns:
- the
Builderinstance is returned, to allow method chaining - Since:
- 1.6
-
setContent
-
setFullWidth
Whether the bottom sheet takes the full width.When full width,
BottomSheet:alignis ignored.- Parameters:
fullWidth- the value for thefull-widthproperty- Returns:
- the
Builderinstance is returned, to allow method chaining - Since:
- 1.6
-
setModal
Whether the bottom sheet is modal.When modal,
BottomSheet:contentwill be dimmed when the bottom sheet is open, and clicking it will close the bottom sheet. It also cannot be focused with keyboard.Otherwise, the content is accessible even when the bottom sheet is open.
- Parameters:
modal- the value for themodalproperty- Returns:
- the
Builderinstance is returned, to allow method chaining - Since:
- 1.6
-
setOpen
Whether the bottom sheet is open.- Parameters:
open- the value for theopenproperty- Returns:
- the
Builderinstance is returned, to allow method chaining - Since:
- 1.6
-
setRevealBottomBar
Whether to reveal the bottom bar.The transition will be animated.
See
BottomSheet:bottom-barandBottomSheet:bottom-bar-height.- Parameters:
revealBottomBar- the value for thereveal-bottom-barproperty- Returns:
- the
Builderinstance is returned, to allow method chaining - Since:
- 1.7
-
setSheet
-
setShowDragHandle
Whether to overlay a drag handle in the bottom sheet.The handle will be overlaid over
BottomSheet:sheet.When the handle is shown,
HeaderBarwill hide its default title, andToolbarViewwill reserve space if there are no top bars.Showing drag handle also allows to swipe the bottom sheet down (and to swipe the bottom bar up) with a pointer, instead of just touchscreen.
- Parameters:
showDragHandle- the value for theshow-drag-handleproperty- Returns:
- the
Builderinstance is returned, to allow method chaining - Since:
- 1.6
-
onCloseAttempt
Emitted when the close button or shortcut is used whileDialog:can-closeis set toFALSE.- Parameters:
handler- the signal handler- Returns:
- the
Builderinstance is returned, to allow method chaining - Since:
- 1.6
- See Also:
-