Package generic.theme

# Class ThemeWriter

java.lang.Object
generic.theme.ThemeWriter

public class ThemeWriter extends Object
Writes a theme to a file either as a single theme file or as a zip file that contains the theme file and any external (from the file system, not the classpath) icons used by the theme.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected GTheme`
  `theme`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ThemeWriter(GTheme theme)`
  Constructor

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `writeTheme(File file, boolean asZip)`
  Writes the theme to the given file with the option to output as a zip file.
  `void`
  `writeThemeToFile(File file)`
  Writes the theme to the given file.
  `void`
  `writeThemeToZipFile(File file)`
  Writes the theme to the given file in a zip format.
  `protected void`
  `writeThemeValues(BufferedWriter writer)`

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

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

- ## Field Details

  - ### theme

    protected GTheme theme

- ## Constructor Details

  - ### ThemeWriter

    public ThemeWriter(GTheme theme)
    Constructor
    Parameters:
      `theme` - the theme to be written to a file

- ## Method Details

  - ### writeTheme

    public void writeTheme(File file, boolean asZip) throws IOException
    Writes the theme to the given file with the option to output as a zip file.
    Parameters:
      `file` - the file to write to
      `asZip` - if true, outputs in zip format
    Throws:
      `FileNotFoundException` - i
      `IOException` - if an I/O error occurs trying to write the file

  - ### writeThemeToFile

    public void writeThemeToFile(File file) throws IOException
    Writes the theme to the given file.
    Parameters:
      `file` - the file to write to
    Throws:
      `FileNotFoundException` - i
      `IOException` - if an I/O error occurs trying to write the file

  - ### writeThemeToZipFile

    public void writeThemeToZipFile(File file) throws IOException
    Writes the theme to the given file in a zip format.
    Parameters:
      `file` - the file to write to
    Throws:
      `IOException` - if an I/O error occurs trying to write the file

  - ### writeThemeValues

    protected void writeThemeValues(BufferedWriter writer) throws IOException
    Throws:
      `IOException`