Class SingleLayerMapContent


  • public class SingleLayerMapContent
    extends MapContent
    Used by DefaultRenderingExecutor to hold a single Layer that is being passed to a renderer. Calling the dispose method of this class does not dispose of the layer unlike MapContent.dispose(). It does not permit subsequent changes to its layer list.
    Since:
    8.0
    Author:
    Michael Bedward
    • Constructor Detail

      • SingleLayerMapContent

        public SingleLayerMapContent​(Layer layer)
        Creates a new instance to hold the given layer.
        Parameters:
        layer - the layer
        Throws:
        IllegalArgumentException - if layer is null
    • Method Detail

      • addLayer

        public boolean addLayer​(Layer layer)
        Throws an UnsupportedOperationException if called.
        Overrides:
        addLayer in class MapContent
        Returns:
        true if the layer was added
      • moveLayer

        public void moveLayer​(int sourcePosition,
                              int destPosition)
        Throws an UnsupportedOperationException if called.
        Overrides:
        moveLayer in class MapContent
        Parameters:
        sourcePosition - existing position of the layer
        destPosition - new position of the layer
      • removeLayer

        public boolean removeLayer​(Layer layer)
        Throws an UnsupportedOperationException if called.
        Overrides:
        removeLayer in class MapContent
        Parameters:
        layer - the layer to be removed
        Returns:
        true if the layer was removed
      • dispose

        public void dispose()
        Does nothing.
        Overrides:
        dispose in class MapContent
      • finalize

        protected void finalize()
                         throws Throwable
        Does nothing.
        Overrides:
        finalize in class MapContent
        Throws:
        Throwable