Class DrawContext.Builder<B extends DrawContext.Builder<B>>

Type Parameters:
B - the type of the Builder that is returned
All Implemented Interfaces:
BuilderInterface
Direct Known Subclasses:
CairoContext.Builder, GLContext.Builder, VulkanContext.Builder
Enclosing class:
DrawContext

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

      public B setDisplay(Display display)
      The GdkDisplay used to create the GdkDrawContext.
      Parameters:
      display - the value for the display property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setSurface

      public B setSurface(Surface surface)
      The GdkSurface the context is bound to.
      Parameters:
      surface - the value for the surface property
      Returns:
      the Builder instance is returned, to allow method chaining