Package com.luciad.view.lightspeed.style
Class TLspStrokedLineStyle.Builder<B extends TLspStrokedLineStyle.Builder<B>>
java.lang.Object
com.luciad.view.lightspeed.style.ALspStyle.Builder<B>
com.luciad.view.lightspeed.style.TLspStrokedLineStyle.Builder<B>
- Enclosing class:
TLspStrokedLineStyle
public static class TLspStrokedLineStyle.Builder<B extends TLspStrokedLineStyle.Builder<B>>
extends ALspStyle.Builder<B>
Builder for stroked line styles. This builder can be used to create
sequences of
glyphs
, which together form a stroke. Each of
the various glyph()
methods appends a particular type of glyph to
the resulting pattern.- Since:
- 2012.0
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionSets all parameters on the builder based on the given style.build()
Builds the style with the set parameters.Appends the specified icon as a glyph.image
(BufferedImage aImage) Appends the specified image as a glyph.image
(BufferedImage aImage, Color aModulationColor) Appends the specified image as a glyph and assigns it the given modulation color.Appends a glyph consisting of a simple colored rectangle.Appends aShape
as a glyph.Appends aShape
with a configurable halo style.space
(int aWidth) Appends a blank glyph to the pattern.Appends a text string as a glyph.Appends a text string as a glyph.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
-
Builder
public Builder()
-
-
Method Details
-
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 TLspStrokedLineStyle.Builder<B>>
- Parameters:
aStyle
- 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 TLspStrokedLineStyle.Builder<B>>
- Returns:
- the resulting style
-
rect
Appends a glyph consisting of a simple colored rectangle.- Parameters:
aWidth
- the width of the rectangleaHeight
- the height of the rectangleaColor
- the fill color of the rectangle- Returns:
- this builder
-
image
Appends the specified image as a glyph.- Parameters:
aImage
- the image to be appended to the stroke pattern- Returns:
- this builder
-
image
Appends the specified image as a glyph and assigns it the given modulation color.- Parameters:
aImage
- the image to be appended to the stroke patternaModulationColor
- the color with which the image will be multiplied while rendering the glyph- Returns:
- this builder
-
icon
Appends the specified icon as a glyph. Icons are internally converted into images.- Parameters:
aIcon
- the icon to be appended to the stroke pattern- Returns:
- this builder
-
text
Appends a text string as a glyph. Text strings are internally converted into images. The whole string is treated as a single glyph, which implies that it should never be broken up when being positioned in a view. If you want to add a long string, consider breaking it up into individual words, character groups or characters and appending these as separate glyphs. This will give painters more room when positioning the glyphs and can avoid large gaps in the painted result.- Parameters:
aText
- the string to be appended to the stroke patternaColor
- the color of the text- Returns:
- this builder
-
text
Appends a text string as a glyph. Text strings are internally converted into images. The whole string is treated as a single glyph, which implies that it should never be broken up when being positioned in a view. If you want to add a long string, consider breaking it up into individual words, character groups or characters and appending these as separate glyphs. This will give painters more room when positioning the glyphs and can avoid large gaps in the painted result.- Parameters:
aText
- the string to be appended to the stroke patternaColor
- the color of the textaFont
- the font- Returns:
- this builder
-
shape
Appends aShape
as a glyph. The shape is given a black halo by default. To change the halo style, useshape(java.awt.Shape, java.awt.Color, java.awt.Color, int)
.- Parameters:
aShape
- the shape to be appended to the stroke patternaColor
- the fill color of the shape- Returns:
- this builder
-
shape
Appends aShape
with a configurable halo style. To disable the halo, set the thickness to zero and/or the halo color tonull
.- Parameters:
aShape
- the shape to be appended to the stroke patternaColor
- the fill color of the shapeaHaloColor
- the halo color of the shape (passing null disables the halo)aHaloThickness
- the halo thickness of the shape (passing zero disables the halo)- Returns:
- this builder
-
space
Appends a blank glyph to the pattern.- Parameters:
aWidth
- the width of the empty space that should be added- Returns:
- this builder
-
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
-