Class SolidFillSymbolLayer


public final class SolidFillSymbolLayer extends FillSymbolLayer
Represents a symbol layer used to fill a polygon geometry with a solid color. If it is the only symbol layer in a MultilayerPolygonSymbol, it will fill the geometry with the specified color. It can have transparency applied.

A SolidFillSymbolLayer is like a SimpleFillSymbol with a solid style. Unlike SimpleFillSymbol, which includes hatch fill styles, SolidFillSymbolLayer is used to symbolize a solid fill exclusively and therefore only exposes a color property. To use a hatch fill style, use HatchFillSymbolLayer.

Since:
100.5.0
  • Property Details

    • color

      public ObjectProperty<Color> colorProperty
      The color of the fill. If a color is not explicitly set, the default will be Color.BLACK.

      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

    • SolidFillSymbolLayer

      public SolidFillSymbolLayer()
      Creates a SolidFillSymbolLayer. The color of the created layer will be fully opaque black - 0xFF000000.
      Since:
      100.5.0
    • SolidFillSymbolLayer

      @Deprecated(since="200.0.0", forRemoval=true) public SolidFillSymbolLayer(int color)
      Deprecated, for removal: This API element is subject to removal in a future version.
      since 200.0.0, replaced by SolidFillSymbolLayer(Color)
      Creates a SolidFillSymbolLayer with the given color.
      Parameters:
      color - the color of the fill in the format 0xAARRGGBB
      Since:
      100.5.0
    • SolidFillSymbolLayer

      public SolidFillSymbolLayer(Color color)
      Creates a SolidFillSymbolLayer with the given color.
      Parameters:
      color - the color of the solid fill symbol layer
      Throws:
      IllegalArgumentException - if color is null
      Since:
      200.0.0
  • Method Details

    • colorProperty

      public ObjectProperty<Color> colorProperty()
      The color of the fill. If a color is not explicitly set, the default will be Color.BLACK.

      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

      public Color getColor()
      Gets the value of the color property.
      Property description:
      The color of the fill. If a color is not explicitly set, the default will be Color.BLACK.

      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

      public void setColor(Color color)
      Sets the value of the color property.
      Property description:
      The color of the fill. If a color is not explicitly set, the default will be Color.BLACK.

      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 the color property
      Since:
      200.0.0
      See Also:
    • 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 the fill. If a color is not explicitly set, the default will be fully opaque black - 0xFF000000.

      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 fill in the format 0xAARRGGBB
      Since:
      100.5.0