public static final class PinStyle.Builder extends Object implements AutoCloseable
FeatureCanvas.LabelDrawCommand#pinStyle
.Constructor and Description |
---|
Builder(PinStyle.Builder other) |
Modifier and Type | Method and Description |
---|---|
PinStyle |
build()
Returns a newly created pin style, based on the properties set on this builder.
|
void |
close() |
PinStyle.Builder |
endPosition(PinStyle.EndPosition endPosition)
The pin's end position defines where the pin connects to the label.
|
protected void |
finalize() |
PinStyle.Builder |
lineStyle(LineStyle lineStyle)
Sets the line style used to paint the pin line.
|
PinStyle.Builder |
visibilityThreshold(double visibilityThreshold)
Sets the number of pixels that determine the visibility of a pin line.
|
public Builder(@NotNull PinStyle.Builder other)
public void close()
close
in interface AutoCloseable
@NotNull public PinStyle build()
@NotNull public PinStyle.Builder endPosition(@NotNull PinStyle.EndPosition endPosition)
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.
endPosition
- the position where the pin connects to the label@NotNull public PinStyle.Builder visibilityThreshold(double visibilityThreshold)
If the pin line length is smaller than this value, it will be discarded.
This property is optional. The default value is 3 pixels.
visibilityThreshold
- The number of pixels that determine the visibility of a pin line, in device independent pixels@NotNull public PinStyle.Builder lineStyle(@NotNull LineStyle lineStyle)
This property is optional. By default, pins use a line style of black color and a width of 1.
lineStyle
- a line style