Class StyleContext.Builder<B extends StyleContext.Builder<B>>

Type Parameters:
B - the type of the Builder that is returned
All Implemented Interfaces:
BuilderInterface
Enclosing class:
StyleContext

public static class StyleContext.Builder<B extends StyleContext.Builder<B>> extends GObject.Builder<B>
Inner class implementing a builder pattern to construct a GObject with properties.
  • Constructor Details

    • Builder

      protected Builder()
      Default constructor for a Builder object.
  • Method Details

    • build

      public StyleContext build()
      Finish building the StyleContext object. This will call GObject.withProperties(Type, String[], Value[]) to create a new GObject instance, which is then cast to StyleContext.
      Overrides:
      build in class GObject.Builder<B extends StyleContext.Builder<B>>
      Returns:
      a new instance of StyleContext with the properties that were set in the Builder object.
    • setDisplay

      public B setDisplay(Display display)
      The display of the style context.
      Parameters:
      display - the value for the display property
      Returns:
      the Builder instance is returned, to allow method chaining