public interface

Styles

implements ConfigurationElement
com.microstrategy.web.transform.Styles
Known Indirect Subclasses

Class Overview

The Styles interface exposes a collection of Style objects.

Summary

Public Methods
abstract void addStyle(Style style)
Adds a style object to the collection.
abstract void clear()
Removes all of the Style objects from the collection
abstract void copyContents(Style styleSource, Style styleDest)
Copies the contents of a style into another style.
abstract int getCount()
Returns the number of Style objects in the collection.
abstract Style getStyle(int index)
Retrieves a specific Style object by its numeric index.
abstract Style getStyle(String name)
Retrieves a specific Style object by its name.
abstract Style newStyle(String styleName)
Creates a new Style object and adds it to the collection.
abstract void remove(int index)
Removes the Style object at the specified position in the collection.
abstract void remove(String name)
Removes the Style object with the specified name from the collection.
[Expand]
Inherited Methods
From interface com.microstrategy.utils.config.ConfigurationElement

Public Methods

public abstract 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.

public abstract void clear ()

Removes all of the Style objects from the collection

Throws
UnsupportedOperationException thrown if the collection is read-only.

public abstract 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.

public abstract int getCount ()

Returns the number of Style objects in the collection.

Returns
  • number of Style objects contained in the collection.
See Also

public abstract Style getStyle (int index)

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
IndexOutOfBoundsException thrown if the index is invalid.

public abstract Style getStyle (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.

public abstract Style newStyle (String styleName)

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
IllegalArgumentException thrown if the styleName is used by another Style object in the collection or if the style name is empty.
UnsupportedOperationException thrown if the collection is read-only.

public abstract void remove (int index)

Removes the Style object at the specified position in the collection.

Parameters
index the index of the Style object to remove.
Throws
thrown if the specified index is out of range.
UnsupportedOperationException thrown if the collection is read-only.
IndexOutOfBoundsException

public abstract void remove (String name)

Removes the Style object with the specified name from the collection.

Parameters
name the name of the Style object to remove.
Throws
IllegalArgumentException thrown if no style has the given name in the collection.
UnsupportedOperationException thrown if the collection is read-only.