Class SymbolLayer

  • Direct Known Subclasses:
    FillSymbolLayer, MarkerSymbolLayer, StrokeSymbolLayer

    public class SymbolLayer
    extends Object
    Represents a SymbolLayer within a MultilayerPointSymbol, MultilayerPolygonSymbol, or MultilayerPolylineSymbol. The available symbol layer types correspond to the primitive geometry they are designed to render: marker layers for point, stroke layers for line, and fill layers for area. Layer types, however, are not applied exclusively to the corresponding geometry type. A marker symbol layer, for example, could be applied to a polyline feature to render its vertices. A symbol can contain one or several symbol layers of the same or different type.

    A symbol used to render polygons, for example, might contain a fill symbol layer to render the polygon interior, a stroke symbol layer for rendering the polygon outline, and a marker symbol layer to render polygon vertices. A symbol to render a polyline might contain several stroke layers of varying widths.

    If a symbol contains a layer that cannot render the type of geometry to which it is applied, that symbol layer is ignored when rendering.

    Since:
    100.5.0
    • Method Detail

      • isColorLocked

        public boolean isColorLocked()
        Gets whether the SymbolLayer is color-locked. If a SymbolLayer is color-locked its color will not be changed if the color is changed on the MultilayerSymbol that contains the SymbolLayer. Changes to the color on the SymbolLayer itself will be respected regardless of if the SymbolLayer is color-locked.
        Returns:
        true if the SymbolLayer is color-locked, false otherwise. Default is false.
        Since:
        100.5.0
      • setColorLocked

        public void setColorLocked​(boolean colorLocked)
        Sets if the SymbolLayer is color-locked. If a SymbolLayer is color-locked its color will not be changed if the color is changed on the MultilayerSymbol that contains the SymbolLayer. Changes to the color on the SymbolLayer itself will be respected regardless of if the SymbolLayer is color-locked.
        Parameters:
        colorLocked - true to lock the color, false to unlock
        Since:
        100.5.0
      • isEnabled

        public boolean isEnabled()
        Gets whether the SymbolLayer is enabled and will be rendered. If the SymbolLayer is not enabled it won't be rendered.
        Returns:
        true if the SymbolLayer is enabled, false otherwise. Default is true.
        Since:
        100.5.0
      • setEnabled

        public void setEnabled​(boolean enabled)
        Sets if this SymbolLayer is enabled, if it's not enabled it will not be rendered.
        Parameters:
        enabled - true to enable SymbolLayer, false to disable
        Since:
        100.5.0