public static class TLspStrokedLineStyle.Builder<B extends TLspStrokedLineStyle.Builder<B>> extends ALspStyle.Builder<B>
glyphs
, which together form a stroke. Each of
the various glyph()
methods appends a particular type of glyph to
the resulting pattern.Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
B |
all(ALspStyle aStyle)
Sets all parameters on the builder based on the given style.
|
TLspStrokedLineStyle |
build()
Builds the style with the set parameters.
|
B |
icon(ILcdIcon aIcon)
Appends the specified icon as a glyph.
|
B |
image(BufferedImage aImage)
Appends the specified image as a glyph.
|
B |
image(BufferedImage aImage,
Color aModulationColor)
Appends the specified image as a glyph and assigns it the given modulation color.
|
B |
rect(int aWidth,
int aHeight,
Color aColor)
Appends a glyph consisting of a simple colored rectangle.
|
B |
shape(Shape aShape,
Color aColor)
Appends a
Shape as a glyph. |
B |
shape(Shape aShape,
Color aColor,
Color aHaloColor,
int aHaloThickness)
Appends a
Shape with a configurable halo style. |
B |
space(int aWidth)
Appends a blank glyph to the pattern.
|
B |
text(String aText,
Color aColor)
Appends a text string as a glyph.
|
B |
text(String aText,
Color aColor,
Font aFont)
Appends a text string as a glyph.
|
B |
zOrder(int aZOrder)
Sets the Z-order of this style.
|
equals, hashCode
public B all(ALspStyle aStyle)
ALspStyle.Builder
all
in class ALspStyle.Builder<B extends TLspStrokedLineStyle.Builder<B>>
aStyle
- the style to copythis
public TLspStrokedLineStyle build()
ALspStyle.Builder
build
in class ALspStyle.Builder<B extends TLspStrokedLineStyle.Builder<B>>
public B rect(int aWidth, int aHeight, Color aColor)
aWidth
- the width of the rectangleaHeight
- the height of the rectangleaColor
- the fill color of the rectanglepublic B image(BufferedImage aImage)
aImage
- the image to be appended to the stroke patternpublic B image(BufferedImage aImage, Color aModulationColor)
aImage
- the image to be appended to the stroke patternaModulationColor
- the color with which the image will be multiplied while rendering the glyphpublic B icon(ILcdIcon aIcon)
aIcon
- the icon to be appended to the stroke patternpublic B text(String aText, Color aColor)
aText
- the string to be appended to the stroke patternaColor
- the color of the textpublic B text(String aText, Color aColor, Font aFont)
aText
- the string to be appended to the stroke patternaColor
- the color of the textaFont
- the fontpublic B shape(Shape aShape, Color aColor)
Shape
as a glyph. The shape is given a black halo by default. To
change the halo style, use shape(java.awt.Shape, java.awt.Color, java.awt.Color, int)
.aShape
- the shape to be appended to the stroke patternaColor
- the fill color of the shapepublic B shape(Shape aShape, Color aColor, Color aHaloColor, int aHaloThickness)
Shape
with a configurable halo style. To disable the
halo, set the thickness to zero and/or the halo color to null
.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)public B space(int aWidth)
aWidth
- the width of the empty space that should be addedpublic B zOrder(int aZOrder)
aZOrder
- the z orderthis