Class LineStyle.Builder

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

public static final class LineStyle.Builder extends Object implements AutoCloseable
A builder class for creating line styles.
  • Constructor Details Link icon

  • Method Details Link icon

    • finalize Link icon

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

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

      @NotNull public LineStyle build()
      Returns a newly created line style, based on the properties set on this builder.
      Returns:
      a newly created line style.
    • width Link icon

      @NotNull public LineStyle.Builder width(double width) throws IllegalArgumentException
      Sets the line width.

      By default, the width is 1.

      Parameters:
      width - The line width in device independent pixels. This value must be > 0.
      Returns:
      this builder.
      Throws:
      IllegalArgumentException - when width is <= 0.
    • color Link icon

      @NotNull public LineStyle.Builder color(@NotNull android.graphics.Color color)
      Sets the line color.

      By default, the color is white.

      Parameters:
      color - The line color
      Returns:
      this builder.
    • inMeters Link icon

      @NotNull public LineStyle.Builder inMeters()
      Interpret the line width as meters instead of pixels.

      This method is optional. By default, the line width is interpreted as device independent pixels.

      Returns:
      this builder