public class TLspWorldSizedLineStyle extends ALspStyle implements ILspWorldElevationStyle
Builder
design pattern mechanism.Modifier and Type | Class and Description |
---|---|
static class |
TLspWorldSizedLineStyle.Builder<B extends TLspWorldSizedLineStyle.Builder<B>>
Builder for world sized line styles.
|
ILspWorldElevationStyle.ElevationMode
Modifier | Constructor and Description |
---|---|
protected |
TLspWorldSizedLineStyle(TLspWorldSizedLineStyle.Builder aBuilder)
Creates a new style with the properties that are set on the builder
|
Modifier and Type | Method and Description |
---|---|
TLspWorldSizedLineStyle.Builder<?> |
asBuilder()
Creates a new builder initialized with all the properties of this style.
|
boolean |
equals(Object obj) |
Color |
getColor()
Gets the color.
|
ILspWorldElevationStyle.ElevationMode |
getElevationMode()
Returns the elevation mode of this style.
|
BufferedImage |
getTexture()
Returns the image to be used as a texture map.
|
double |
getWidth()
Gets the line width (meters).
|
int |
hashCode() |
boolean |
isTransparent()
Determines whether this style is transparent.
|
static TLspWorldSizedLineStyle.Builder<?> |
newBuilder()
Creates a new builder with the default values.
|
String |
toString() |
addStyleChangeListener, getZOrder, isCompatible, removeStyleChangeListener, style
protected TLspWorldSizedLineStyle(TLspWorldSizedLineStyle.Builder aBuilder)
aBuilder
- a builder which will be used to initialize this style.public static TLspWorldSizedLineStyle.Builder<?> newBuilder()
public TLspWorldSizedLineStyle.Builder<?> asBuilder()
public Color getColor()
public boolean isTransparent()
ALspStyle
isTransparent
in class ALspStyle
public double getWidth()
public BufferedImage getTexture()
BufferedImage image = new BufferedImage( 128,128, BufferedImage.TYPE_INT_ARGB );
Graphics g = image.getGraphics();
g.setColor( Color.GREEN );
g.fillRect( 0,0,128,128 );
g.setColor( Color.YELLOW );
g.fillRect( 0,0,128,20 );
g.setColor( Color.RED );
g.fillRect( 0,108,128,20 );
TLspWorldSizedLineStyle style = TLspWorldSizedLineStyle.newBuilder().texture( image).width( 30000 ).build();
Horizontally the texture is scaled to fit once in every line segment.public ILspWorldElevationStyle.ElevationMode getElevationMode()
ILspWorldElevationStyle
getElevationMode
in interface ILspWorldElevationStyle