Package com.luciad.view.lightspeed.style
Class TLspWorldSizedLineStyle
java.lang.Object
com.luciad.view.lightspeed.style.ALspStyle
com.luciad.view.lightspeed.style.TLspWorldSizedLineStyle
- All Implemented Interfaces:
ILspWorldElevationStyle
,ILspStyler
Style that defines a shape's outline as a line with a width in meters.
Construction of world sized line style is done through the
Builder
design pattern mechanism.- Since:
- 2012.0
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Builder for world sized line styles.Nested classes/interfaces inherited from interface com.luciad.view.lightspeed.style.ILspWorldElevationStyle
ILspWorldElevationStyle.ElevationMode
-
Constructor Summary
ModifierConstructorDescriptionprotected
Creates a new style with the properties that are set on the builder -
Method Summary
Modifier and TypeMethodDescriptionCreates a new builder initialized with all the properties of this style.boolean
getColor()
Gets the color.Returns the elevation mode of this style.Returns the image to be used as a texture map.double
getWidth()
Gets the line width (meters).int
hashCode()
boolean
Determines whether this style is transparent.static TLspWorldSizedLineStyle.Builder
<?> Creates a new builder with the default values.toString()
Methods inherited from class com.luciad.view.lightspeed.style.ALspStyle
addStyleChangeListener, getZOrder, isCompatible, removeStyleChangeListener, style
-
Constructor Details
-
TLspWorldSizedLineStyle
Creates a new style with the properties that are set on the builder- Parameters:
aBuilder
- a builder which will be used to initialize this style.
-
-
Method Details
-
newBuilder
Creates a new builder with the default values.- Returns:
- the new builder.
-
asBuilder
Creates a new builder initialized with all the properties of this style. -
getColor
Gets the color.- Returns:
- the color
-
isTransparent
public boolean isTransparent()Description copied from class:ALspStyle
Determines whether this style is transparent. Shapes that are transparent can be painted in a different paint phase than shapes that are not transparent.- Specified by:
isTransparent
in classALspStyle
- Returns:
- whether or not this style is transparent
-
getWidth
public double getWidth()Gets the line width (meters). The returned value is always strictly positive.- Returns:
- the line width
-
getTexture
Returns the image to be used as a texture map. The texture is used as a vertical profile with which to paint world-sized lines. For example the following code creates a green world-sized line with a red border on the right and a yellow border on the left when traversing the line in order: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();
- Returns:
- the image to be used as a texture map
-
getElevationMode
Description copied from interface:ILspWorldElevationStyle
Returns the elevation mode of this style.- Specified by:
getElevationMode
in interfaceILspWorldElevationStyle
- Returns:
- The elevation mode.
-
hashCode
public int hashCode() -
equals
-
toString
-