Class FillStyle.Builder

java.lang.Object
com.luciad.layers.styles.FillStyle.Builder
All Implemented Interfaces:
AutoCloseable
Enclosing class:
FillStyle

public static final class FillStyle.Builder extends Object implements AutoCloseable
A builder class for creating fill styles.
  • Constructor Details

    • Builder

      public Builder(@NotNull FillStyle.Builder other)
      Copy constructor.
      Parameters:
      other - the builder to copy.
  • Method Details

    • finalize

      protected void finalize()
      Overrides:
      finalize in class Object
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
    • build

      @NotNull public FillStyle build()
      Returns a newly created fill style, based on the properties set on this builder.
      Returns:
      a newly created fill style.
    • color

      @NotNull public FillStyle.Builder color(@NotNull android.graphics.Color color)
      Sets the fill color.

      By default, the color is transparent yellow.

      Parameters:
      color - the fill color
      Returns:
      this builder.
    • image

      @NotNull public FillStyle.Builder image(@NotNull Image image) throws NullPointerException
      Sets the image to use as fill.

      By default, no image is used.

      It is advised to use non alpha-premultiplied images. Using alpha-premultiplied images may have a small performance cost.

      For the best performance, reuse the same Image instance when calling this function multiple times for different features.

      Parameters:
      image - the image to use as fill style
      Returns:
      this builder.
      Throws:
      NullPointerException - when the image is null.
    • icon

      @NotNull public FillStyle.Builder icon(@NotNull IIcon icon) throws NullPointerException
      Sets the icon to use as fill.

      By default, no icon is used.

      Parameters:
      icon - the icon to use as fill style
      Returns:
      this builder.
      Throws:
      NullPointerException - when the icon is null.