Package org.gnome.gtk
Class CssProvider.Builder<B extends CssProvider.Builder<B>>
java.lang.Object
io.github.jwharm.javagi.gobject.Builder<B>
org.gnome.gobject.GObject.Builder<B>
org.gnome.gtk.CssProvider.Builder<B>
- Type Parameters:
B
- the type of the Builder that is returned
- All Implemented Interfaces:
BuilderInterface
- Enclosing class:
CssProvider
public static class CssProvider.Builder<B extends CssProvider.Builder<B>>
extends GObject.Builder<B>
Inner class implementing a builder pattern to construct a GObject with
properties.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Finish building theCssProvider
object.Signals that a parsing error occurred.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 theCssProvider
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 toCssProvider
.- Overrides:
build
in classGObject.Builder<B extends CssProvider.Builder<B>>
- Returns:
- a new instance of
CssProvider
with the properties that were set in the Builder object.
-
onParsingError
Signals that a parsing error occurred.The expected error values are in the
Gtk.CssParserError
andGtk.CssParserWarning
enumerations.The
path
,line
andposition
describe the actual location of the error as accurately as possible.Parsing errors are never fatal, so the parsing will resume after the error. Errors may however cause parts of the given data or even all of it to not be parsed at all. So it is a useful idea to check that the parsing succeeds by connecting to this signal.
Errors in the
Gtk.CssParserWarning
enumeration should not be treated as fatal errors.Note that this signal may be emitted at any time as the css provider may opt to defer parsing parts or all of the input to a later time than when a loading function was called.
- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-