Package com.luciad.layers.styles
Class LineStyle.Builder
java.lang.Object
com.luciad.layers.styles.LineStyle.Builder
- All Implemented Interfaces:
AutoCloseable
- Enclosing class:
LineStyle
A builder class for creating line styles.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Returns a newly created line style, based on the properties set on this builder.voidclose()color(android.graphics.Color color) Sets the line color.protected voidfinalize()inMeters()Interpret theline widthas meters instead of pixels.width(double width) Sets the line width.
-
Constructor Details
-
Builder
-
-
Method Details
-
finalize
protected void finalize() -
close
public void close()- Specified by:
closein interfaceAutoCloseable
-
build
Returns a newly created line style, based on the properties set on this builder.- Returns:
- a newly created line style.
-
width
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
Sets the line color.By default, the color is white.
- Parameters:
color- The line color- Returns:
- this builder.
-
inMeters
Interpret theline widthas meters instead of pixels.This method is optional. By default, the line width is interpreted as device independent pixels.
- Returns:
- this builder
-