Class StyleMapsImpl

    • Field Detail

      • ELEM_NAME_STYLEMAPS

        public static final java.lang.String ELEM_NAME_STYLEMAPS
        The name of the style maps element.
        See Also:
        Constant Field Values
    • Constructor Detail

      • StyleMapsImpl

        public StyleMapsImpl()
    • Method Detail

      • getStyleMap

        public StyleMap getStyleMap​(int index)
                             throws java.lang.IndexOutOfBoundsException
        Gets the StyleMap associated with supplied index. A valid index begins at 0 and continues to getCount() - 1.
        Specified by:
        getStyleMap in interface StyleMaps
        Parameters:
        index - The index of the StyleMap to return.
        Returns:
        The StyleMap at the supplied index.
        Throws:
        java.lang.IndexOutOfBoundsException - This exception is thown if the argument is outside the range of a valid index.
      • getStyleMap

        public StyleMap getStyleMap​(java.lang.String name)
                             throws java.lang.IllegalArgumentException
        Gets the StyleMap associated with a given style name.
        Specified by:
        getStyleMap in interface StyleMaps
        Parameters:
        name - The name of the style map object to return.
        Returns:
        The StyleMap object for the associated style.
        Throws:
        java.lang.IllegalArgumentException - This exception is thrown if the argument does not match one of the stored names.
      • newStyleMap

        public StyleMap newStyleMap​(java.lang.String styleName)
                             throws java.lang.IllegalArgumentException,
                                    java.lang.UnsupportedOperationException
        Creates a new style map object for the supplied style name.
        Specified by:
        newStyleMap in interface StyleMaps
        Parameters:
        styleName - The name of the style to create a map for.
        Returns:
        The new style map object.
        Throws:
        java.lang.IllegalArgumentException - This exception is thrown if the argument already matches one of the stored names.
        java.lang.UnsupportedOperationException - This exception is thrown if the Style Catalog is in "read only" mode.
      • mapStyle

        public java.lang.String mapStyle​(java.lang.String origStyleName,
                                         StyleRequestContext context)
        Map an incoming style ('origStyleName') to a new style, based on the definition of the maps and any contextual data.
        Specified by:
        mapStyle in interface StyleMaps
        Parameters:
        origStyleName - The original name of the style being requested.
        context - The StyleRequestContext that can be used to determine whether a mapping should be performed.
        Returns:
        The name of the mapped style.