Class BackgroundStyle.Builder

java.lang.Object
com.luciad.drawing.BackgroundStyle.Builder
All Implemented Interfaces:
AutoCloseable
Enclosing class:
BackgroundStyle

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

  • Method Details

    • finalize

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

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

      @NotNull public BackgroundStyle build()
      Returns a newly created background style, based on the properties set on this builder.
      Returns:
      a newly created background style.
    • padding

      @NotNull public BackgroundStyle.Builder padding(double padding)
      Sets the padding that is added around the content to determine the size of the background.

      This property is optional. By default, the padding is 2.

      Parameters:
      padding - the padding in device independent pixels.
      Returns:
      this builder
    • backgroundColor

      @NotNull public BackgroundStyle.Builder backgroundColor(@NotNull android.graphics.Color color)
      Sets the background color.

      This property is optional. The default is a semi-transparent white color.

      Parameters:
      color - the background color.
      Returns:
      this builder.
    • frameWidth

      @NotNull public BackgroundStyle.Builder frameWidth(double width)
      Sets the width of the frame that is painted.

      If 0, no frame is painted.

      This property is optional. By default, the frame width is 1.

      Parameters:
      width - the width of the frame in device independent pixels.
      Returns:
      this builder
    • frameColor

      @NotNull public BackgroundStyle.Builder frameColor(@NotNull android.graphics.Color color)
      Sets the color of the frame that is painted.

      This property is optional. By default, the frame color is black.

      Parameters:
      color - the frame color.
      Returns:
      this builder.