Interface Styles

  • All Superinterfaces:
    java.lang.Cloneable, ConfigurationElement
    All Known Implementing Classes:
    StylesImpl

    public interface Styles
    extends ConfigurationElement
    The Styles interface exposes a collection of Style objects.
    Since:
    MicroStrategy Web 7.3.1 or earlier
    • Method Detail

      • getCount

        int getCount()
        Returns the number of Style objects in the collection.
        Returns:
        number of Style objects contained in the collection.
        See Also:
        Style
      • getStyle

        Style getStyle​(int index)
                throws java.lang.IndexOutOfBoundsException
        Retrieves a specific Style object by its numeric index.
        Parameters:
        index - the index of the Style object in collection.
        Returns:
        the Style object in the collection with the given index.
        Throws:
        java.lang.IndexOutOfBoundsException - thrown if the index is invalid.
      • getStyle

        Style getStyle​(java.lang.String name)
        Retrieves a specific Style object by its name.
        Returns null if no style exists with the given name in the style catalog.
        Parameters:
        name - the name of the Style object.
        Returns:
        the Style object in the collection with the given name.
      • clear

        void clear()
            throws java.lang.UnsupportedOperationException
        Removes all of the Style objects from the collection
        Throws:
        java.lang.UnsupportedOperationException - thrown if the collection is read-only.
      • remove

        void remove​(int index)
             throws java.lang.IndexOutOfBoundsException,
                    java.lang.UnsupportedOperationException
        Removes the Style object at the specified position in the collection.
        Parameters:
        index - the index of the Style object to remove.
        Throws:
        IndexOutOfBoundException - thrown if the specified index is out of range.
        java.lang.UnsupportedOperationException - thrown if the collection is read-only.
        java.lang.IndexOutOfBoundsException
      • remove

        void remove​(java.lang.String name)
             throws java.lang.IllegalArgumentException,
                    java.lang.UnsupportedOperationException
        Removes the Style object with the specified name from the collection.
        Parameters:
        name - the name of the Style object to remove.
        Throws:
        java.lang.IllegalArgumentException - thrown if no style has the given name in the collection.
        java.lang.UnsupportedOperationException - thrown if the collection is read-only.
      • newStyle

        Style newStyle​(java.lang.String styleName)
                throws java.lang.IllegalArgumentException,
                       java.lang.UnsupportedOperationException
        Creates a new Style object and adds it to the collection.
        Parameters:
        styleName - the name of the new Style object.
        Returns:
        the Style object just created.
        Throws:
        java.lang.IllegalArgumentException - thrown if the styleName is used by another Style object in the collection or if the style name is empty.
        java.lang.UnsupportedOperationException - thrown if the collection is read-only.
      • addStyle

        void addStyle​(Style style)
        Adds a style object to the collection. If the style already exists, it is overwritten.
        Parameters:
        style - The style object to be added to the collection.
        Since:
        MicroStrategy Web 9.0.0
      • copyContents

        void copyContents​(Style styleSource,
                          Style styleDest)
        Copies the contents of a style into another style.
        Parameters:
        styleSource - the source style to copy the contents from.
        styleDest - the destination style to copy the contents to.
        Since:
        MicroStrategy Web 9.0.0