Package com.independentsoft.office.themes

# Class Theme

java.lang.Object
com.independentsoft.office.themes.Theme

public class Theme extends Object
The Class Theme.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Theme()`
  Instantiates a new theme.
  `Theme​(byte[] buffer, Relationship relationship)`
  Instantiates a new theme.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Theme`
  `clone()`
  `List<CustomColor>`
  `getCustomColors()`
  Gets the custom colors.
  `List<ExtraColorScheme>`
  `getExtraColorSchemes()`
  Gets the extra color schemes.
  `String`
  `getName()`
  Gets the name.
  `ObjectDefaults`
  `getObjectDefaults()`
  Gets the object defaults.
  `String`
  `getOriginalXml()`
  Gets the verbatim copy of the theme part as read from the input document, or `null` if this theme was not loaded from an existing part.
  `ThemeElements`
  `getThemeElements()`
  Gets the theme elements.
  `boolean`
  `isModified()`
  Indicates whether the in-memory theme model was modified since it was read.
  `void`
  `setModified​(boolean modified)`
  Sets whether the in-memory theme model is considered modified.
  `void`
  `setName​(String name)`
  Sets the name.
  `void`
  `setObjectDefaults​(ObjectDefaults objectDefaults)`
  Sets the object defaults.
  `void`
  `setOriginalXml​(String originalXml)`
  Sets the verbatim theme XML to re-emit on save.
  `void`
  `setThemeElements​(ThemeElements themeElements)`
  Sets the theme elements.
  `String`
  `toString()`

  ### Methods inherited from class java.lang.Object

  `equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### Theme

    public Theme()
    Instantiates a new theme.

  - ### Theme

    public Theme​(byte[] buffer, Relationship relationship) throws XMLStreamException
    Instantiates a new theme.
    Parameters:
      `buffer` - the buffer
      `relationship` - the relationship
    Throws:
      `XMLStreamException` - the xML stream exception

- ## Method Details

  - ### clone

    public Theme clone()
    Overrides:
      `clone` in class `Object`

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`

  - ### getCustomColors

    public List<CustomColor> getCustomColors()
    Gets the custom colors.
    Returns:
      the custom colors

  - ### getExtraColorSchemes

    public List<ExtraColorScheme> getExtraColorSchemes()
    Gets the extra color schemes.
    Returns:
      the extra color schemes

  - ### getObjectDefaults

    public ObjectDefaults getObjectDefaults()
    Gets the object defaults.
    Returns:
      the object defaults

  - ### setObjectDefaults

    public void setObjectDefaults​(ObjectDefaults objectDefaults)
    Sets the object defaults.
    Parameters:
      `objectDefaults` - the new object defaults

  - ### getThemeElements

    public ThemeElements getThemeElements()
    Gets the theme elements.
    Returns:
      the theme elements

  - ### setThemeElements

    public void setThemeElements​(ThemeElements themeElements)
    Sets the theme elements.
    Parameters:
      `themeElements` - the new theme elements

  - ### getName

    public String getName()
    Gets the name.
    Returns:
      the name

  - ### setName

    public void setName​(String name)
    Sets the name.
    Parameters:
      `name` - the new name

  - ### getOriginalXml

    public String getOriginalXml()
    Gets the verbatim copy of the theme part as read from the input document, or `null` if this theme was not loaded from an existing part.
    Returns:
      the original theme XML

  - ### setOriginalXml

    public void setOriginalXml​(String originalXml)
    Sets the verbatim theme XML to re-emit on save. Clears the modified flag so the supplied XML is written unchanged.
    Parameters:
      `originalXml` - the original theme XML

  - ### isModified

    public boolean isModified()
    Indicates whether the in-memory theme model was modified since it was read. When `true`, `toString()` serializes the object model instead of re-emitting `the original XML`.
    Returns:
      true if modified

  - ### setModified

    public void setModified​(boolean modified)
    Sets whether the in-memory theme model is considered modified.
    Parameters:
      `modified` - the new modified flag