Class Handle.Builder<B extends Handle.Builder<B>>

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

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

      public B setBaseUri(String baseUri)
      Base URI, to be used to resolve relative references for resources. See the section "Security and locations of referenced files" for details.
      Parameters:
      baseUri - the value for the base-uri property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setDpiX

      public B setDpiX(double dpiX)

      Horizontal resolution in dots per inch.

      The default is 90. Note that current CSS assumes a default of 96, so you may want to set it to 96.0 before rendering the handle.

      Parameters:
      dpiX - the value for the dpi-x property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setDpiY

      public B setDpiY(double dpiY)

      Horizontal resolution in dots per inch.

      The default is 90. Note that current CSS assumes a default of 96, so you may want to set it to 96.0 before rendering the handle.

      Parameters:
      dpiY - the value for the dpi-y property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setFlags

      public B setFlags(Set<HandleFlags> flags)
      Flags from Rsvg.HandleFlags.
      Parameters:
      flags - the value for the flags property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      2.36
    • setFlags

      public B setFlags(HandleFlags... flags)
      Flags from Rsvg.HandleFlags.
      Parameters:
      flags - the value for the flags property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      2.36