Class StyleLayer

  • Direct Known Subclasses:
    FeatureLayer, RasterLayer

    public abstract class StyleLayer
    extends Layer
    Layer responsible for rendering under control of a user supplied Style object.

    The StyleLayer is expected to be subclassed; and is responsible for:

    • style: Style
    Please note that a StyleLayerDescriptor (defined by SLD) document is usually used to describe the rendering requirements for an entire Map; while a Style (defined by SE) is focused on a single layer of content
    Since:
    8.0
    • Field Detail

      • style

        protected Style style
        Style used for rendering
    • Constructor Detail

      • StyleLayer

        public StyleLayer​(Style style)
        Creates a new instance of StyleLayer
        Parameters:
        style - the style used to control drawing of this layer
      • StyleLayer

        public StyleLayer​(Style style,
                          String title)
    • Method Detail

      • dispose

        public void dispose()
        Description copied from class: Layer
        Allows a Layer to clean up any listeners, or internal caches or resources it has added during use.
        Overrides:
        dispose in class Layer
      • getStyle

        public Style getStyle()
        Get the style for this layer.

        If style has not been set, then null is returned.

        Overrides:
        getStyle in class Layer
        Returns:
        The style (SLD).
      • setStyle

        public void setStyle​(Style style)
        Sets the style for this layer.
        Parameters:
        style - The new style