Class PinStyle.Builder

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

public static final class PinStyle.Builder extends Object implements AutoCloseable
A builder class for creating pin styles that can be set up to labels, see FeatureCanvas.LabelDrawCommand#pinStyle.
  • 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 PinStyle build()
      Returns a newly created pin style, based on the properties set on this builder.
      Returns:
      a newly created pin style.
    • endPosition Link icon

      @NotNull public PinStyle.Builder endPosition(@NotNull PinStyle.EndPosition endPosition)
      The pin's end position defines where the pin connects to the label.

      Note that the start position is a position that is chosen on the label's anchor geometry. For example, when a label is attached to a Point geometry the start position is that Point.

      This property is optional. The default value is MiddleOfBoundsOnEdge.

      Parameters:
      endPosition - the position where the pin connects to the label
      Returns:
      this builder
    • visibilityThreshold Link icon

      @NotNull public PinStyle.Builder visibilityThreshold(double visibilityThreshold)
      Sets the number of pixels that determine the visibility of a pin line.

      If the pin line length is smaller than this value, it will be discarded.

      This property is optional. The default value is 3 pixels.

      Parameters:
      visibilityThreshold - The number of pixels that determine the visibility of a pin line, in device independent pixels
      Returns:
      this builder
    • lineStyle Link icon

      @NotNull public PinStyle.Builder lineStyle(@NotNull LineStyle lineStyle)
      Sets the line style used to paint the pin line.

      This property is optional. By default, pins use a line style of black color and a width of 1.

      Parameters:
      lineStyle - a line style
      Returns:
      this builder