Package com.luciad.layers.styles
Class PinStyle.Builder
java.lang.Object
com.luciad.layers.styles.PinStyle.Builder
- All Implemented Interfaces:
AutoCloseable
- Enclosing class:
PinStyle
A builder class for creating pin styles that can be set up to labels, see
FeatureCanvas.LabelDrawCommand#pinStyle
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Returns a newly created pin style, based on the properties set on this builder.void
close()
endPosition
(PinStyle.EndPosition endPosition) The pin's end position defines where the pin connects to the label.protected void
finalize()
Sets the line style used to paint the pin line.visibilityThreshold
(double visibilityThreshold) Sets the number of pixels that determine the visibility of a pin line.
-
Constructor Details
-
Method Details
-
finalize
protected void finalize() -
close
public void close()- Specified by:
close
in interfaceAutoCloseable
-
build
Returns a newly created pin style, based on the properties set on this builder.- Returns:
- a newly created pin style.
-
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 thatPoint
.This property is optional. The default value is MiddleOfBoundsOnEdge.
- Parameters:
endPosition
- the position where the pin connects to the label- Returns:
- this builder
-
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
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
-