Class TextBuffer.Builder<B extends TextBuffer.Builder<B>>
- Type Parameters:
B
- the type of the Builder that is returned
- All Implemented Interfaces:
BuilderInterface
- Direct Known Subclasses:
Buffer.Builder
- Enclosing class:
TextBuffer
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Finish building theTextBuffer
object.onApplyTag
(TextBuffer.ApplyTagCallback handler) Emitted to apply a tag to a range of text in aGtkTextBuffer
.Emitted at the beginning of a single user-visible operation on aGtkTextBuffer
.onChanged
(TextBuffer.ChangedCallback handler) Emitted when the content of aGtkTextBuffer
has changed.Emitted to delete a range from aGtkTextBuffer
.Emitted at the end of a single user-visible operation on theGtkTextBuffer
.Emitted to insert aGtkTextChildAnchor
in aGtkTextBuffer
.Emitted to insert aGdkPaintable
in aGtkTextBuffer
.Emitted to insert text in aGtkTextBuffer
.Emitted as notification after aGtkTextMark
is deleted.onMarkSet
(TextBuffer.MarkSetCallback handler) Emitted as notification after aGtkTextMark
is set.Emitted when the modified bit of aGtkTextBuffer
flips.onPasteDone
(TextBuffer.PasteDoneCallback handler) Emitted after paste operation has been completed.onRedo
(TextBuffer.RedoCallback handler) Emitted when a request has been made to redo the previously undone operation.onRemoveTag
(TextBuffer.RemoveTagCallback handler) Emitted to remove all occurrences oftag
from a range of text in aGtkTextBuffer
.onUndo
(TextBuffer.UndoCallback handler) Emitted when a request has been made to undo the previous operation or set of operations that have been grouped together.setEnableUndo
(boolean enableUndo) Denotes if support for undoing and redoing changes to the buffer is allowed.setTagTable
(TextTagTable tagTable) The GtkTextTagTable for the buffer.The text content of the buffer.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
-
Constructor Details
-
Builder
protected Builder()Default constructor for aBuilder
object.
-
-
Method Details
-
build
Finish building theTextBuffer
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 toTextBuffer
.- Overrides:
build
in classGObject.Builder<B extends TextBuffer.Builder<B>>
- Returns:
- a new instance of
TextBuffer
with the properties that were set in the Builder object.
-
setEnableUndo
Denotes if support for undoing and redoing changes to the buffer is allowed.- Parameters:
enableUndo
- the value for theenable-undo
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setTagTable
The GtkTextTagTable for the buffer.- Parameters:
tagTable
- the value for thetag-table
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setText
The text content of the buffer.Without child widgets and images, see
TextBuffer.getText(org.gnome.gtk.TextIter, org.gnome.gtk.TextIter, boolean)
for more information.- Parameters:
text
- the value for thetext
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
onApplyTag
Emitted to apply a tag to a range of text in aGtkTextBuffer
.Applying actually occurs in the default handler.
Note that if your handler runs before the default handler it must not invalidate the
start
andend
iters (or has to revalidate them).See also:
TextBuffer.applyTag(org.gnome.gtk.TextTag, org.gnome.gtk.TextIter, org.gnome.gtk.TextIter)
,TextBuffer.insertWithTags(org.gnome.gtk.TextIter, java.lang.String, int, org.gnome.gtk.TextTag, java.lang.Object...)
,TextBuffer.insertRange(org.gnome.gtk.TextIter, org.gnome.gtk.TextIter, org.gnome.gtk.TextIter)
.- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-
onBeginUserAction
Emitted at the beginning of a single user-visible operation on aGtkTextBuffer
.See also:
TextBuffer.beginUserAction()
,TextBuffer.insertInteractive(org.gnome.gtk.TextIter, java.lang.String, int, boolean)
,TextBuffer.insertRangeInteractive(org.gnome.gtk.TextIter, org.gnome.gtk.TextIter, org.gnome.gtk.TextIter, boolean)
,TextBuffer.deleteInteractive(org.gnome.gtk.TextIter, org.gnome.gtk.TextIter, boolean)
,TextBuffer.backspace(org.gnome.gtk.TextIter, boolean, boolean)
,TextBuffer.deleteSelection(boolean, boolean)
.- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-
onChanged
Emitted when the content of aGtkTextBuffer
has changed.- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-
onDeleteRange
Emitted to delete a range from aGtkTextBuffer
.Note that if your handler runs before the default handler it must not invalidate the
start
andend
iters (or has to revalidate them). The default signal handler revalidates thestart
andend
iters to both point to the location where text was deleted. Handlers which run after the default handler (see g_signal_connect_after()) do not have access to the deleted text.See also:
TextBuffer.delete(org.gnome.gtk.TextIter, org.gnome.gtk.TextIter)
.- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-
onEndUserAction
Emitted at the end of a single user-visible operation on theGtkTextBuffer
.See also:
TextBuffer.endUserAction()
,TextBuffer.insertInteractive(org.gnome.gtk.TextIter, java.lang.String, int, boolean)
,TextBuffer.insertRangeInteractive(org.gnome.gtk.TextIter, org.gnome.gtk.TextIter, org.gnome.gtk.TextIter, boolean)
,TextBuffer.deleteInteractive(org.gnome.gtk.TextIter, org.gnome.gtk.TextIter, boolean)
,TextBuffer.backspace(org.gnome.gtk.TextIter, boolean, boolean)
,TextBuffer.deleteSelection(boolean, boolean)
,TextBuffer.backspace(org.gnome.gtk.TextIter, boolean, boolean)
.- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-
onInsertChildAnchor
Emitted to insert aGtkTextChildAnchor
in aGtkTextBuffer
.Insertion actually occurs in the default handler.
Note that if your handler runs before the default handler it must not invalidate the
location
iter (or has to revalidate it). The default signal handler revalidates it to be placed after the insertedanchor
.See also:
TextBuffer.insertChildAnchor(org.gnome.gtk.TextIter, org.gnome.gtk.TextChildAnchor)
.- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-
onInsertPaintable
Emitted to insert aGdkPaintable
in aGtkTextBuffer
.Insertion actually occurs in the default handler.
Note that if your handler runs before the default handler it must not invalidate the
location
iter (or has to revalidate it). The default signal handler revalidates it to be placed after the insertedpaintable
.See also:
TextBuffer.insertPaintable(org.gnome.gtk.TextIter, org.gnome.gdk.Paintable)
.- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-
onInsertText
Emitted to insert text in aGtkTextBuffer
.Insertion actually occurs in the default handler.
Note that if your handler runs before the default handler it must not invalidate the
location
iter (or has to revalidate it). The default signal handler revalidates it to point to the end of the inserted text.See also:
TextBuffer.insert(org.gnome.gtk.TextIter, java.lang.String, int)
,TextBuffer.insertRange(org.gnome.gtk.TextIter, org.gnome.gtk.TextIter, org.gnome.gtk.TextIter)
.- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-
onMarkDeleted
Emitted as notification after aGtkTextMark
is deleted.- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-
onMarkSet
Emitted as notification after aGtkTextMark
is set.See also:
TextBuffer.createMark(java.lang.String, org.gnome.gtk.TextIter, boolean)
,TextBuffer.moveMark(org.gnome.gtk.TextMark, org.gnome.gtk.TextIter)
.- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-
onModifiedChanged
Emitted when the modified bit of aGtkTextBuffer
flips.See also:
TextBuffer.setModified(boolean)
.- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-
onPasteDone
Emitted after paste operation has been completed.This is useful to properly scroll the view to the end of the pasted text. See
TextBuffer.pasteClipboard(org.gnome.gdk.Clipboard, org.gnome.gtk.TextIter, boolean)
for more details.- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-
onRedo
Emitted when a request has been made to redo the previously undone operation.- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-
onRemoveTag
Emitted to remove all occurrences oftag
from a range of text in aGtkTextBuffer
.Removal actually occurs in the default handler.
Note that if your handler runs before the default handler it must not invalidate the
start
andend
iters (or has to revalidate them).See also:
TextBuffer.removeTag(org.gnome.gtk.TextTag, org.gnome.gtk.TextIter, org.gnome.gtk.TextIter)
.- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-
onUndo
Emitted when a request has been made to undo the previous operation or set of operations that have been grouped together.- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-