# Class DisplaySchemesProcessor

java.lang.Object
jspecview.application.DisplaySchemesProcessor

public class DisplaySchemesProcessor extends Object
`DisplaySchemesProcessor` loads and saves the display schemes of Jspecview. The Schemes are loaded from an XML file and saved in a TreeMap. Also saves the schemes out to XML file after modification

Author:
  Debbie-Ann Facey, Khari A. Bryan, Prof Robert J. Lancashire

## Constructor Summary

Constructors
Constructor
Description
`DisplaySchemesProcessor()`
Initialises the `DisplaySchemesProcessor`

## Method Summary

Modifier and Type
Method
Description
`ColorParameters`
`getDefaultScheme()`
`TreeMap<String, ColorParameters>`
`getDisplaySchemes()`
Returns the list of `DisplayScheme`s that were loaded
`boolean`
`load(BufferedReader br)`
Loads the display schemes into memory and stores them in a `Vector`
`boolean`
`load(String dispSchemeFileName)`
Loads the display schemes into memory and stores them in a `Vector`
`ColorParameters`
`loadDefault()`
Load a default DisplayScheme if xml file not found
`boolean`
`loadDefaultXML()`
`void`
`serializeDisplaySchemes(Writer writer)`
Serializes the display schemes to the given writer
`void`
`store()`
Saves the display schemes to file in XML format

### Methods inherited from class Object

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

## Constructor Details

### DisplaySchemesProcessor

public DisplaySchemesProcessor()
Initialises the `DisplaySchemesProcessor`

## Method Details

### loadDefault

public ColorParameters loadDefault()
Load a default DisplayScheme if xml file not found

Returns:
  boolean

### getDefaultScheme

public ColorParameters getDefaultScheme()

### store

public void store() throws Exception
Saves the display schemes to file in XML format

Throws:
  `Exception`

### getDisplaySchemes

public TreeMap<String, ColorParameters> getDisplaySchemes()
Returns the list of `DisplayScheme`s that were loaded

Returns:
  the list of `DisplayScheme`s that were loaded

### load

public boolean load(String dispSchemeFileName)
Loads the display schemes into memory and stores them in a `Vector`

Parameters:
  `dispSchemeFileName` - the name of the file to load
Returns:
  true if loaded successfully

### load

public boolean load(BufferedReader br) throws Exception
Loads the display schemes into memory and stores them in a `Vector`

Parameters:
  `br` -
Returns:
  true if loaded successfully
Throws:
  `Exception`

### serializeDisplaySchemes

public void serializeDisplaySchemes(Writer writer) throws Exception
Serializes the display schemes to the given writer

Parameters:
  `writer` - the writer for the output
Throws:
  `Exception`

### loadDefaultXML

public boolean loadDefaultXML()