Package org.gnome.gtksourceview
Class Buffer.Builder<B extends Buffer.Builder<B>>
java.lang.Object
org.javagi.gobject.Builder<B>
org.gnome.gobject.GObject.Builder<B>
org.gnome.gtk.TextBuffer.Builder<B>
org.gnome.gtksourceview.Buffer.Builder<B>
- Type Parameters:
B- the type of the Builder that is returned
- All Implemented Interfaces:
BuilderInterface
- Enclosing class:
Buffer
Inner class implementing a builder pattern to construct a GObject with
properties.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Finish building theBufferobject.iteris set to a valid iterator pointing to the matching bracket ifstateisBracketMatchType.FOUND.onCursorMoved(Buffer.CursorMovedCallback handler) The "cursor-moved" signal is emitted when then insertion mark has moved.The ::highlight-updated signal is emitted when the syntax highlighting and context classes are updated in a certain region of thebuffer.The ::source-mark-updated signal is emitted each time a mark is added to, moved or removed from thebuffer.setHighlightMatchingBrackets(boolean highlightMatchingBrackets) Whether to highlight matching brackets in the buffer.setHighlightSyntax(boolean highlightSyntax) Whether to highlight syntax in the buffer.setImplicitTrailingNewline(boolean implicitTrailingNewline) Whether the buffer has an implicit trailing newline.setLanguage(Language language) setStyleScheme(StyleScheme styleScheme) Style scheme.Methods inherited from class org.gnome.gtk.TextBuffer.Builder
onApplyTag, onBeginUserAction, onChanged, onDeleteRange, onEndUserAction, onInsertChildAnchor, onInsertPaintable, onInsertText, onMarkDeleted, onMarkSet, onModifiedChanged, onPasteDone, onRedo, onRemoveTag, onUndo, setEnableUndo, setTagTable, setTextMethods inherited from class org.gnome.gobject.GObject.Builder
onNotifyMethods inherited from class org.javagi.gobject.Builder
addBuilderProperty, connect, connect, connectSignals, getArena, getNames, getValues
-
Constructor Details
-
Builder
protected Builder()Default constructor for aBuilderobject.
-
-
Method Details
-
build
Finish building theBufferobject. 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 toBuffer.- Overrides:
buildin classTextBuffer.Builder<B extends Buffer.Builder<B>>- Returns:
- a new instance of
Bufferwith the properties that were set in the Builder object.
-
setHighlightMatchingBrackets
Whether to highlight matching brackets in the buffer.- Parameters:
highlightMatchingBrackets- the value for thehighlight-matching-bracketsproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
setHighlightSyntax
Whether to highlight syntax in the buffer.- Parameters:
highlightSyntax- the value for thehighlight-syntaxproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
setImplicitTrailingNewline
Whether the buffer has an implicit trailing newline. SeeBuffer.setImplicitTrailingNewline(boolean).- Parameters:
implicitTrailingNewline- the value for theimplicit-trailing-newlineproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
setLanguage
-
setStyleScheme
Style scheme. It contains styles for syntax highlighting, optionally foreground, background, cursor color, current line color, and matching brackets style.- Parameters:
styleScheme- the value for thestyle-schemeproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
onBracketMatched
iteris set to a valid iterator pointing to the matching bracket ifstateisBracketMatchType.FOUND. Otherwiseiteris meaningless.The signal is emitted only when the
statechanges, typically when the cursor moves.A use-case for this signal is to show messages in a
Statusbar.- Parameters:
handler- the signal handler- Returns:
- the
Builderinstance is returned, to allow method chaining - See Also:
-
onCursorMoved
The "cursor-moved" signal is emitted when then insertion mark has moved.- Parameters:
handler- the signal handler- Returns:
- the
Builderinstance is returned, to allow method chaining - See Also:
-
onHighlightUpdated
The ::highlight-updated signal is emitted when the syntax highlighting and context classes are updated in a certain region of thebuffer.- Parameters:
handler- the signal handler- Returns:
- the
Builderinstance is returned, to allow method chaining - See Also:
-
onSourceMarkUpdated
The ::source-mark-updated signal is emitted each time a mark is added to, moved or removed from thebuffer.- Parameters:
handler- the signal handler- Returns:
- the
Builderinstance is returned, to allow method chaining - See Also:
-