Class TLspWorldSizedLineStyle.Builder<B extends TLspWorldSizedLineStyle.Builder<B>>
- All Implemented Interfaces:
ILspWorldElevationStyle.Builder
- Enclosing class:
TLspWorldSizedLineStyle
ILspWorldElevationStyle.ElevationMode.ON_TERRAIN
.
Example usage:
To create a 10 meter wide red line style for shapes that are painted on the
terrain:
TLspWorldSizedLineStyle redTenMetersOnTerrain = TLspWorldSizedLineStyle.newBuilder().color(Color.red).lineWidth(10f).elevationMode(ElevationMode.ON_TERRAIN).build();
- Since:
- 2012.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionSets all parameters on the builder based on the given style.build()
Builds the style with the set parameters.Sets the color.elevationMode
(ILspWorldElevationStyle.ElevationMode aElevationMode) Specifies the elevation mode.opacity
(float aOpacity) Sets the opacity (alpha) value for the color.texture
(BufferedImage aTexture) Sets a texture with which the world sized line should be visualized.toString()
width
(double aLineWidth) Sets the line width (meters).zOrder
(int aZOrder) Sets the Z-order of this style.Methods inherited from class com.luciad.view.lightspeed.style.ALspStyle.Builder
equals, hashCode
-
Constructor Details
-
Method Details
-
color
Sets the color. Should not benull
.- Parameters:
aColor
- the color- Returns:
this
- Throws:
IllegalArgumentException
-if aColor==null
-
opacity
Sets the opacity (alpha) value for the color.This is a convenience method: One could equally well use the
color(...)
method. However, this method leaves the RGB values intact and only modifies the alpha value. Note that, the other way around, thecolor(...)
method does override the set alpha value.- Parameters:
aOpacity
- the alpha value. Must be contained in the [0,1] interval (0 is fully transparent, 1 is fully opaque).- Returns:
this
-
elevationMode
Specifies the elevation mode. By default, this is set toILspWorldElevationStyle.ElevationMode.ON_TERRAIN
.Currently only 'ON_TERRAIN' and 'ABOVE_ELLIPSOID' are supported for this style.
- Specified by:
elevationMode
in interfaceILspWorldElevationStyle.Builder
- Parameters:
aElevationMode
- The elevation mode- Returns:
this
-
zOrder
Sets the Z-order of this style. Styles should be painted from lowest to highest Z-order.Increasing the number of different Z-orders can negatively impact painting performance. By default, it is set to 0.
- Parameters:
aZOrder
- the z order- Returns:
this
-
width
Sets the line width (meters). Should be greater than 0.- Parameters:
aLineWidth
- the line width- Returns:
this
-
texture
Sets a texture with which the world sized line should be visualized.- Parameters:
aTexture
- the texture's image- Returns:
this
-
all
Description copied from class:ALspStyle.Builder
Sets all parameters on the builder based on the given style.This is useful for example to create a new style that has almost all properties equal to another style.
- Specified by:
all
in classALspStyle.Builder<B extends TLspWorldSizedLineStyle.Builder<B>>
- Parameters:
aColorStyle
- the style to copy- Returns:
this
-
build
Description copied from class:ALspStyle.Builder
Builds the style with the set parameters.- Specified by:
build
in classALspStyle.Builder<B extends TLspWorldSizedLineStyle.Builder<B>>
- Returns:
- the resulting style
-
toString
-