Class SolidStrokeSymbolLayer


public final class SolidStrokeSymbolLayer extends StrokeSymbolLayer
Represents a polyline geometry symbolized with a solid color.

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 Details

    • color

      public ObjectProperty<Color> 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.

      Since:
      200.0.0
      See Also:
  • Constructor Details

  • Method Details

    • colorProperty

      public ObjectProperty<Color> 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.

      Since:
      200.0.0
      See Also:
    • getColor

      public Color getColor()
      Gets the value of the property color.
      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.

      Since:
      200.0.0
    • setColor

      public void setColor(Color color)
      Sets the value of the property color.
      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.

      Since:
      200.0.0
    • setColor

      @Deprecated(since="200.0.0", forRemoval=true) public void setColor(int color)
      Deprecated, for removal: This API element is subject to removal in a future version.
      as of 200.0.0, replaced by setColor(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

      public List<GeometricEffect> 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