This symbol layer, if it is the sole symbol layer in a MultilayerSymbol, colors the geometry of the line with the
specified solid color. The class also allows setting a collection of GeometricEffect
which modify the stroke
in various ways.
It is also used to represent the Web Scene specification's LineSymbol3DLayer and PathSymbol3DLayer.
LineSymbol3DLayer is represented by StrokeSymbolLayer.LineStyle3D.STRIP
, and PathSymbol3DLayer
is represented by StrokeSymbolLayer.LineStyle3D.TUBE
.
The SolidStrokeSymbolLayer provides a similar user experience to the SimpleLineSymbolHandle, but,
since it is a symbol layer, can be used in a MultilayerSymbol. The simple line styles of the SimpleLineSymbol
are represented here by DashGeometricEffect
, but all dash patterns are custom.
A SolidStrokeSymbolLayer in a MultilayerPolygonSymbol will act as the outline of the fill.
- Since:
- 100.5.0
-
Property Summary
-
Nested Class Summary
Nested classes/interfaces inherited from class com.esri.arcgisruntime.symbology.StrokeSymbolLayer
StrokeSymbolLayer.CapStyle, StrokeSymbolLayer.LineStyle3D
-
Constructor Summary
ConstructorDescriptionCreates a solid stroke symbol layer with no parameters.SolidStrokeSymbolLayer
(double width, int color, Iterable<GeometricEffect> geometricEffects) Deprecated, for removal: This API element is subject to removal in a future version.SolidStrokeSymbolLayer
(double width, int color, Iterable<GeometricEffect> geometricEffects, StrokeSymbolLayer.LineStyle3D lineStyle3D) Deprecated, for removal: This API element is subject to removal in a future version.as of 200.0.0, replaced bySolidStrokeSymbolLayer(double, Color, Iterable, LineStyle3D)
SolidStrokeSymbolLayer
(double width, Color color, Iterable<GeometricEffect> geometricEffects) Creates a solid stroke symbol layer with the given width, color, and geometric effects.SolidStrokeSymbolLayer
(double width, Color color, Iterable<GeometricEffect> geometricEffects, StrokeSymbolLayer.LineStyle3D lineStyle3D) Creates a solid stroke symbol layer with the given width, color, geometric effects and 3D line style. -
Method Summary
Modifier and TypeMethodDescriptionThe color of a solid stroke symbol layer.getColor()
Gets the value of thecolor
property.Gets a list of the geometric effects.void
setColor
(int color) Deprecated, for removal: This API element is subject to removal in a future version.as of 200.0.0, replaced bysetColor(Color)
void
Sets the value of thecolor
property.Methods inherited from class com.esri.arcgisruntime.symbology.StrokeSymbolLayer
getCapStyle, getLineStyle3D, getWidth, setCapStyle, setLineStyle3D, setWidth
Methods inherited from class com.esri.arcgisruntime.symbology.SymbolLayer
isColorLocked, isEnabled, setColorLocked, setEnabled
-
Property Details
-
color
The color of a solid stroke symbol layer. The default color is opaque black,Color.BLACK
.The solid color of the
SolidStrokeSymbolLayer
. The stroke will render with the specified color. When getting the color from a symbol, the consensus value (for all layers) is reported. If there is no consensus (one or more layers have different colors), a null value is reported for the color. Likewise, setting a value for color on a symbol will apply that color to all layers the symbol contains.If you don't want changes to the symbol color to propagate to some of the symbol layers it contains, you can lock the color for those layers. If a symbol layer is color-locked, changes to the parent symbol will not affect the symbol layer. This also means that the layer will not be considered when determining a consensus color for the symbol as a whole.
Attempting to set the color to null will throw a NullPointerException exception.
- Since:
- 200.0.0
- See Also:
-
-
Constructor Details
-
SolidStrokeSymbolLayer
public SolidStrokeSymbolLayer()Creates a solid stroke symbol layer with no parameters. The default line will have the following default properties: width 5.333 dp,Color.BLACK
,StrokeSymbolLayer.CapStyle.ROUND
,StrokeSymbolLayer.LineStyle3D.STRIP
, and no geometric effects.Note:
width
is defined in dp (density-independent pixels) for all line styles exceptStrokeSymbolLayer.LineStyle3D.TUBE
, which is defined in meters.- Since:
- 100.5.0
-
SolidStrokeSymbolLayer
@Deprecated(since="200.0.0", forRemoval=true) public SolidStrokeSymbolLayer(double width, int color, Iterable<GeometricEffect> geometricEffects) Deprecated, for removal: This API element is subject to removal in a future version.as of 200.0.0, replaced bySolidStrokeSymbolLayer(double, Color, Iterable)
Creates a solid stroke symbol layer with the given width, color, and geometric effects. The other properties are defaulted as follows: cap style isStrokeSymbolLayer.CapStyle.ROUND
, and the 3D line style isStrokeSymbolLayer.LineStyle3D.STRIP
.- Parameters:
width
- the width of the stroke in dp (density-independent pixels) for all line styles exceptStrokeSymbolLayer.LineStyle3D.TUBE
, which is defined in meters.color
- the color of the stroke in the format 0xAARRGGBBgeometricEffects
- the geometric effects of the stroke- Throws:
IllegalArgumentException
- if geometricEffects is null- Since:
- 100.5.0
-
SolidStrokeSymbolLayer
public SolidStrokeSymbolLayer(double width, Color color, Iterable<GeometricEffect> geometricEffects) Creates a solid stroke symbol layer with the given width, color, and geometric effects. The other properties are defaulted as follows: cap style isStrokeSymbolLayer.CapStyle.ROUND
, and the 3D line style isStrokeSymbolLayer.LineStyle3D.STRIP
.- Parameters:
width
- the width of the stroke in dp (density-independent pixels) for all line styles exceptStrokeSymbolLayer.LineStyle3D.TUBE
, which is defined in meters.color
- the color of the strokegeometricEffects
- the geometric effects of the stroke- Throws:
IllegalArgumentException
- if color is nullIllegalArgumentException
- if geometricEffects is null- Since:
- 200.0.0
-
SolidStrokeSymbolLayer
@Deprecated(since="200.0.0", forRemoval=true) public SolidStrokeSymbolLayer(double width, int color, Iterable<GeometricEffect> geometricEffects, StrokeSymbolLayer.LineStyle3D lineStyle3D) Deprecated, for removal: This API element is subject to removal in a future version.as of 200.0.0, replaced bySolidStrokeSymbolLayer(double, Color, Iterable, LineStyle3D)
Creates a solid stroke symbol layer with the given width, color, geometric effects and 3D line style. Cap style is defaulted toStrokeSymbolLayer.CapStyle.ROUND
.- Parameters:
width
- the width of the stroke in dp (density-independent pixels) for all line styles exceptStrokeSymbolLayer.LineStyle3D.TUBE
, which is defined in meters.color
- the color of the stroke in the format 0xAARRGGBBgeometricEffects
- the geometric effects of the strokelineStyle3D
- the 3D line style of the stroke- Throws:
IllegalArgumentException
- if geometricEffects or lineStyle3D are null- Since:
- 100.5.0
-
SolidStrokeSymbolLayer
public SolidStrokeSymbolLayer(double width, Color color, Iterable<GeometricEffect> geometricEffects, StrokeSymbolLayer.LineStyle3D lineStyle3D) Creates a solid stroke symbol layer with the given width, color, geometric effects and 3D line style. Cap style is defaulted toStrokeSymbolLayer.CapStyle.ROUND
.- Parameters:
width
- the width of the stroke in dp (density-independent pixels) for all line styles exceptStrokeSymbolLayer.LineStyle3D.TUBE
, which is defined in meters.color
- the color of the strokegeometricEffects
- the geometric effects of the strokelineStyle3D
- the 3D line style of the stroke- Throws:
IllegalArgumentException
- if color is nullIllegalArgumentException
- if geometricEffects or lineStyle3D are null- Since:
- 200.0.0
-
-
Method Details
-
colorProperty
The color of a solid stroke symbol layer. The default color is opaque black,Color.BLACK
.The solid color of the
SolidStrokeSymbolLayer
. The stroke will render with the specified color. When getting the color from a symbol, the consensus value (for all layers) is reported. If there is no consensus (one or more layers have different colors), a null value is reported for the color. Likewise, setting a value for color on a symbol will apply that color to all layers the symbol contains.If you don't want changes to the symbol color to propagate to some of the symbol layers it contains, you can lock the color for those layers. If a symbol layer is color-locked, changes to the parent symbol will not affect the symbol layer. This also means that the layer will not be considered when determining a consensus color for the symbol as a whole.
Attempting to set the color to null will throw a NullPointerException exception.
- Returns:
- the
color
property - Since:
- 200.0.0
- See Also:
-
getColor
Gets the value of thecolor
property.- Property description:
- The color of a solid stroke symbol layer. The default color is opaque black,
Color.BLACK
.The solid color of the
SolidStrokeSymbolLayer
. The stroke will render with the specified color. When getting the color from a symbol, the consensus value (for all layers) is reported. If there is no consensus (one or more layers have different colors), a null value is reported for the color. Likewise, setting a value for color on a symbol will apply that color to all layers the symbol contains.If you don't want changes to the symbol color to propagate to some of the symbol layers it contains, you can lock the color for those layers. If a symbol layer is color-locked, changes to the parent symbol will not affect the symbol layer. This also means that the layer will not be considered when determining a consensus color for the symbol as a whole.
Attempting to set the color to null will throw a NullPointerException exception.
- Returns:
- the value of the
color
property - Since:
- 200.0.0
- See Also:
-
setColor
Sets the value of thecolor
property.- Property description:
- The color of a solid stroke symbol layer. The default color is opaque black,
Color.BLACK
.The solid color of the
SolidStrokeSymbolLayer
. The stroke will render with the specified color. When getting the color from a symbol, the consensus value (for all layers) is reported. If there is no consensus (one or more layers have different colors), a null value is reported for the color. Likewise, setting a value for color on a symbol will apply that color to all layers the symbol contains.If you don't want changes to the symbol color to propagate to some of the symbol layers it contains, you can lock the color for those layers. If a symbol layer is color-locked, changes to the parent symbol will not affect the symbol layer. This also means that the layer will not be considered when determining a consensus color for the symbol as a whole.
Attempting to set the color to null will throw a NullPointerException exception.
- Parameters:
color
- the value for thecolor
property- Since:
- 200.0.0
- See Also:
-
setColor
Deprecated, for removal: This API element is subject to removal in a future version.as of 200.0.0, replaced bysetColor(Color)
Sets the color of a solid stroke symbol layer. The default color is opaque black, 0xff000000.The solid color of the
SolidStrokeSymbolLayer
. The stroke will render with the specified color. When getting the color from a symbol, the consensus value (for all layers) is reported. If there is no consensus (one or more layers have different colors), a null value is reported for the color. Likewise, setting a value for color on a symbol will apply that color to all layers the symbol contains.If you don't want changes to the symbol color to propagate to some of the symbol layers it contains, you can lock the color for those layers. If a symbol layer is color-locked, changes to the parent symbol will not affect the symbol layer. This also means that the layer will not be considered when determining a consensus color for the symbol as a whole.
- Parameters:
color
- the color of the stroke in the format 0xAARRGGBB- Since:
- 100.5.0
-
getGeometricEffects
Gets a list of the geometric effects. The list is modifiable and effects can be added or removed.- Returns:
- the collection of geometric effects
- Since:
- 100.5.0
-
SolidStrokeSymbolLayer(double, Color, Iterable)