* @param theme theme to save.
* @param stream where to write the theme to.
* @throws IOException thrown if any IO related error occurs.
*/
public static void write(ThemeData theme, OutputStream stream) throws IOException {
XmlWriter out;
out = new XmlWriter(stream);
out.startElement(ELEMENT_ROOT);
out.println();
// - File table description ------------------------------------------------------
// -------------------------------------------------------------------------------
out.startElement(ELEMENT_TABLE);
out.println();
// Global values.
if(theme.isColorSet(Theme.FILE_TABLE_BORDER_COLOR))
out.writeStandAloneElement(ELEMENT_BORDER, getColorAttributes(theme.getColor(Theme.FILE_TABLE_BORDER_COLOR)));
if(theme.isColorSet(Theme.FILE_TABLE_INACTIVE_BORDER_COLOR))
out.writeStandAloneElement(ELEMENT_INACTIVE_BORDER, getColorAttributes(theme.getColor(Theme.FILE_TABLE_INACTIVE_BORDER_COLOR)));
if(theme.isColorSet(Theme.FILE_TABLE_SELECTED_OUTLINE_COLOR))
out.writeStandAloneElement(ELEMENT_OUTLINE, getColorAttributes(theme.getColor(Theme.FILE_TABLE_SELECTED_OUTLINE_COLOR)));
if(theme.isColorSet(Theme.FILE_TABLE_INACTIVE_SELECTED_OUTLINE_COLOR))
out.writeStandAloneElement(ELEMENT_INACTIVE_OUTLINE, getColorAttributes(theme.getColor(Theme.FILE_TABLE_INACTIVE_SELECTED_OUTLINE_COLOR)));
if(theme.isFontSet(Theme.FILE_TABLE_FONT))
out.writeStandAloneElement(ELEMENT_FONT, getFontAttributes(theme.getFont(Theme.FILE_TABLE_FONT)));
// Normal background colors.
out.startElement(ELEMENT_NORMAL);
out.println();
if(theme.isColorSet(Theme.FILE_TABLE_BACKGROUND_COLOR))
out.writeStandAloneElement(ELEMENT_BACKGROUND, getColorAttributes(theme.getColor(Theme.FILE_TABLE_BACKGROUND_COLOR)));
if(theme.isColorSet(Theme.FILE_TABLE_INACTIVE_BACKGROUND_COLOR))
out.writeStandAloneElement(ELEMENT_INACTIVE_BACKGROUND, getColorAttributes(theme.getColor(Theme.FILE_TABLE_INACTIVE_BACKGROUND_COLOR)));
out.endElement(ELEMENT_NORMAL);
// Selected background colors.
out.startElement(ELEMENT_SELECTED);
out.println();
if(theme.isColorSet(Theme.FILE_TABLE_SELECTED_BACKGROUND_COLOR))
out.writeStandAloneElement(ELEMENT_BACKGROUND, getColorAttributes(theme.getColor(Theme.FILE_TABLE_SELECTED_BACKGROUND_COLOR)));
if(theme.isColorSet(Theme.FILE_TABLE_INACTIVE_SELECTED_BACKGROUND_COLOR))
out.writeStandAloneElement(ELEMENT_INACTIVE_BACKGROUND, getColorAttributes(theme.getColor(Theme.FILE_TABLE_INACTIVE_SELECTED_BACKGROUND_COLOR)));
if(theme.isColorSet(Theme.FILE_TABLE_INACTIVE_SELECTED_SECONDARY_BACKGROUND_COLOR))
out.writeStandAloneElement(ELEMENT_INACTIVE_SECONDARY_BACKGROUND, getColorAttributes(theme.getColor(Theme.FILE_TABLE_INACTIVE_SELECTED_SECONDARY_BACKGROUND_COLOR)));
if(theme.isColorSet(Theme.FILE_TABLE_SELECTED_SECONDARY_BACKGROUND_COLOR))
out.writeStandAloneElement(ELEMENT_SECONDARY_BACKGROUND, getColorAttributes(theme.getColor(Theme.FILE_TABLE_SELECTED_SECONDARY_BACKGROUND_COLOR)));
out.endElement(ELEMENT_SELECTED);
// Alternate background colors.
out.startElement(ELEMENT_ALTERNATE);
out.println();
if(theme.isColorSet(Theme.FILE_TABLE_ALTERNATE_BACKGROUND_COLOR))
out.writeStandAloneElement(ELEMENT_BACKGROUND, getColorAttributes(theme.getColor(Theme.FILE_TABLE_ALTERNATE_BACKGROUND_COLOR)));
if(theme.isColorSet(Theme.FILE_TABLE_INACTIVE_ALTERNATE_BACKGROUND_COLOR))
out.writeStandAloneElement(ELEMENT_INACTIVE_BACKGROUND, getColorAttributes(theme.getColor(Theme.FILE_TABLE_INACTIVE_ALTERNATE_BACKGROUND_COLOR)));
out.endElement(ELEMENT_ALTERNATE);
// Unmatched colors.
out.startElement(ELEMENT_UNMATCHED);
out.println();
if(theme.isColorSet(Theme.FILE_TABLE_UNMATCHED_BACKGROUND_COLOR))
out.writeStandAloneElement(ELEMENT_BACKGROUND, getColorAttributes(theme.getColor(Theme.FILE_TABLE_UNMATCHED_BACKGROUND_COLOR)));
if(theme.isColorSet(Theme.FILE_TABLE_UNMATCHED_FOREGROUND_COLOR))
out.writeStandAloneElement(ELEMENT_FOREGROUND, getColorAttributes(theme.getColor(Theme.FILE_TABLE_UNMATCHED_FOREGROUND_COLOR)));
out.endElement(ELEMENT_UNMATCHED);
// Hidden files.
out.startElement(ELEMENT_HIDDEN);
out.println();
out.startElement(ELEMENT_NORMAL);
out.println();
if(theme.isColorSet(Theme.HIDDEN_FILE_FOREGROUND_COLOR))
out.writeStandAloneElement(ELEMENT_FOREGROUND, getColorAttributes(theme.getColor(Theme.HIDDEN_FILE_FOREGROUND_COLOR)));
if(theme.isColorSet(Theme.HIDDEN_FILE_INACTIVE_FOREGROUND_COLOR))
out.writeStandAloneElement(ELEMENT_INACTIVE_FOREGROUND, getColorAttributes(theme.getColor(Theme.HIDDEN_FILE_INACTIVE_FOREGROUND_COLOR)));
out.endElement(ELEMENT_NORMAL);
out.startElement(ELEMENT_SELECTED);
out.println();
if(theme.isColorSet(Theme.HIDDEN_FILE_SELECTED_FOREGROUND_COLOR))
out.writeStandAloneElement(ELEMENT_FOREGROUND, getColorAttributes(theme.getColor(Theme.HIDDEN_FILE_SELECTED_FOREGROUND_COLOR)));
if(theme.isColorSet(Theme.HIDDEN_FILE_INACTIVE_SELECTED_FOREGROUND_COLOR))
out.writeStandAloneElement(ELEMENT_INACTIVE_FOREGROUND, getColorAttributes(theme.getColor(Theme.HIDDEN_FILE_INACTIVE_SELECTED_FOREGROUND_COLOR)));
out.endElement(ELEMENT_SELECTED);
out.endElement(ELEMENT_HIDDEN);
// Folders.
out.startElement(ELEMENT_FOLDER);
out.println();
out.startElement(ELEMENT_NORMAL);
out.println();
if(theme.isColorSet(Theme.FOLDER_INACTIVE_FOREGROUND_COLOR))
out.writeStandAloneElement(ELEMENT_INACTIVE_FOREGROUND, getColorAttributes(theme.getColor(Theme.FOLDER_INACTIVE_FOREGROUND_COLOR)));
if(theme.isColorSet(Theme.FOLDER_FOREGROUND_COLOR))
out.writeStandAloneElement(ELEMENT_FOREGROUND, getColorAttributes(theme.getColor(Theme.FOLDER_FOREGROUND_COLOR)));
out.endElement(ELEMENT_NORMAL);
out.startElement(ELEMENT_SELECTED);
out.println();
if(theme.isColorSet(Theme.FOLDER_INACTIVE_SELECTED_FOREGROUND_COLOR))
out.writeStandAloneElement(ELEMENT_INACTIVE_FOREGROUND, getColorAttributes(theme.getColor(Theme.FOLDER_INACTIVE_SELECTED_FOREGROUND_COLOR)));
if(theme.isColorSet(Theme.FOLDER_SELECTED_FOREGROUND_COLOR))
out.writeStandAloneElement(ELEMENT_FOREGROUND, getColorAttributes(theme.getColor(Theme.FOLDER_SELECTED_FOREGROUND_COLOR)));
out.endElement(ELEMENT_SELECTED);
out.endElement(ELEMENT_FOLDER);
// Archives.
out.startElement(ELEMENT_ARCHIVE);
out.println();
out.startElement(ELEMENT_NORMAL);
out.println();
if(theme.isColorSet(Theme.ARCHIVE_INACTIVE_FOREGROUND_COLOR))
out.writeStandAloneElement(ELEMENT_INACTIVE_FOREGROUND, getColorAttributes(theme.getColor(Theme.ARCHIVE_INACTIVE_FOREGROUND_COLOR)));
if(theme.isColorSet(Theme.ARCHIVE_FOREGROUND_COLOR))
out.writeStandAloneElement(ELEMENT_FOREGROUND, getColorAttributes(theme.getColor(Theme.ARCHIVE_FOREGROUND_COLOR)));
out.endElement(ELEMENT_NORMAL);
out.startElement(ELEMENT_SELECTED);
out.println();
if(theme.isColorSet(Theme.ARCHIVE_INACTIVE_SELECTED_FOREGROUND_COLOR))
out.writeStandAloneElement(ELEMENT_INACTIVE_FOREGROUND, getColorAttributes(theme.getColor(Theme.ARCHIVE_INACTIVE_SELECTED_FOREGROUND_COLOR)));
if(theme.isColorSet(Theme.ARCHIVE_SELECTED_FOREGROUND_COLOR))
out.writeStandAloneElement(ELEMENT_FOREGROUND, getColorAttributes(theme.getColor(Theme.ARCHIVE_SELECTED_FOREGROUND_COLOR)));
out.endElement(ELEMENT_SELECTED);
out.endElement(ELEMENT_ARCHIVE);
// Symlink.
out.startElement(ELEMENT_SYMLINK);
out.println();
out.startElement(ELEMENT_NORMAL);
out.println();
if(theme.isColorSet(Theme.SYMLINK_FOREGROUND_COLOR))
out.writeStandAloneElement(ELEMENT_INACTIVE_FOREGROUND, getColorAttributes(theme.getColor(Theme.SYMLINK_INACTIVE_FOREGROUND_COLOR)));
if(theme.isColorSet(Theme.SYMLINK_FOREGROUND_COLOR))
out.writeStandAloneElement(ELEMENT_FOREGROUND, getColorAttributes(theme.getColor(Theme.SYMLINK_FOREGROUND_COLOR)));
out.endElement(ELEMENT_NORMAL);
out.startElement(ELEMENT_SELECTED);
out.println();
if(theme.isColorSet(Theme.SYMLINK_INACTIVE_SELECTED_FOREGROUND_COLOR))
out.writeStandAloneElement(ELEMENT_INACTIVE_FOREGROUND, getColorAttributes(theme.getColor(Theme.SYMLINK_INACTIVE_SELECTED_FOREGROUND_COLOR)));
if(theme.isColorSet(Theme.SYMLINK_SELECTED_FOREGROUND_COLOR))
out.writeStandAloneElement(ELEMENT_FOREGROUND, getColorAttributes(theme.getColor(Theme.SYMLINK_SELECTED_FOREGROUND_COLOR)));
out.endElement(ELEMENT_SELECTED);
out.endElement(ELEMENT_SYMLINK);
// Marked files.
out.startElement(ELEMENT_MARKED);
out.println();
out.startElement(ELEMENT_NORMAL);
out.println();
if(theme.isColorSet(Theme.MARKED_FOREGROUND_COLOR))
out.writeStandAloneElement(ELEMENT_INACTIVE_FOREGROUND, getColorAttributes(theme.getColor(Theme.MARKED_INACTIVE_FOREGROUND_COLOR)));
if(theme.isColorSet(Theme.MARKED_FOREGROUND_COLOR))
out.writeStandAloneElement(ELEMENT_FOREGROUND, getColorAttributes(theme.getColor(Theme.MARKED_FOREGROUND_COLOR)));
out.endElement(ELEMENT_NORMAL);
out.startElement(ELEMENT_SELECTED);
out.println();
if(theme.isColorSet(Theme.MARKED_INACTIVE_SELECTED_FOREGROUND_COLOR))
out.writeStandAloneElement(ELEMENT_INACTIVE_FOREGROUND, getColorAttributes(theme.getColor(Theme.MARKED_INACTIVE_SELECTED_FOREGROUND_COLOR)));
if(theme.isColorSet(Theme.MARKED_SELECTED_FOREGROUND_COLOR))
out.writeStandAloneElement(ELEMENT_FOREGROUND, getColorAttributes(theme.getColor(Theme.MARKED_SELECTED_FOREGROUND_COLOR)));
out.endElement(ELEMENT_SELECTED);
out.endElement(ELEMENT_MARKED);
// Plain files.
out.startElement(ELEMENT_FILE);
out.println();
out.startElement(ELEMENT_NORMAL);
out.println();
if(theme.isColorSet(Theme.FILE_INACTIVE_FOREGROUND_COLOR))
out.writeStandAloneElement(ELEMENT_INACTIVE_FOREGROUND, getColorAttributes(theme.getColor(Theme.FILE_INACTIVE_FOREGROUND_COLOR)));
if(theme.isColorSet(Theme.FILE_FOREGROUND_COLOR))
out.writeStandAloneElement(ELEMENT_FOREGROUND, getColorAttributes(theme.getColor(Theme.FILE_FOREGROUND_COLOR)));
out.endElement(ELEMENT_NORMAL);
out.startElement(ELEMENT_SELECTED);
out.println();
if(theme.isColorSet(Theme.FILE_INACTIVE_SELECTED_FOREGROUND_COLOR))
out.writeStandAloneElement(ELEMENT_INACTIVE_FOREGROUND, getColorAttributes(theme.getColor(Theme.FILE_INACTIVE_SELECTED_FOREGROUND_COLOR)));
if(theme.isColorSet(Theme.FILE_SELECTED_FOREGROUND_COLOR))
out.writeStandAloneElement(ELEMENT_FOREGROUND, getColorAttributes(theme.getColor(Theme.FILE_SELECTED_FOREGROUND_COLOR)));
out.endElement(ELEMENT_SELECTED);
out.endElement(ELEMENT_FILE);
out.endElement(ELEMENT_TABLE);
// - Shell description ----------------------------------------------------------
// -------------------------------------------------------------------------------
out.startElement(ELEMENT_SHELL);
out.println();
if(theme.isFontSet(Theme.SHELL_FONT))
out.writeStandAloneElement(ELEMENT_FONT, getFontAttributes(theme.getFont(Theme.SHELL_FONT)));
// Normal colors.
out.startElement(ELEMENT_NORMAL);
out.println();
if(theme.isColorSet(Theme.SHELL_BACKGROUND_COLOR))
out.writeStandAloneElement(ELEMENT_BACKGROUND, getColorAttributes(theme.getColor(Theme.SHELL_BACKGROUND_COLOR)));
if(theme.isColorSet(Theme.SHELL_FOREGROUND_COLOR))
out.writeStandAloneElement(ELEMENT_FOREGROUND, getColorAttributes(theme.getColor(Theme.SHELL_FOREGROUND_COLOR)));
out.endElement(ELEMENT_NORMAL);
// Selected colors.
out.startElement(ELEMENT_SELECTED);
out.println();
if(theme.isColorSet(Theme.SHELL_SELECTED_BACKGROUND_COLOR))
out.writeStandAloneElement(ELEMENT_BACKGROUND, getColorAttributes(theme.getColor(Theme.SHELL_SELECTED_BACKGROUND_COLOR)));
if(theme.isColorSet(Theme.SHELL_SELECTED_FOREGROUND_COLOR))
out.writeStandAloneElement(ELEMENT_FOREGROUND, getColorAttributes(theme.getColor(Theme.SHELL_SELECTED_FOREGROUND_COLOR)));
out.endElement(ELEMENT_SELECTED);
out.endElement(ELEMENT_SHELL);
// - Shell history description ---------------------------------------------------
// -------------------------------------------------------------------------------
out.startElement(ELEMENT_SHELL_HISTORY);
out.println();
if(theme.isFontSet(Theme.SHELL_HISTORY_FONT))
out.writeStandAloneElement(ELEMENT_FONT, getFontAttributes(theme.getFont(Theme.SHELL_HISTORY_FONT)));
// Normal colors.
out.startElement(ELEMENT_NORMAL);
out.println();
if(theme.isColorSet(Theme.SHELL_HISTORY_BACKGROUND_COLOR))
out.writeStandAloneElement(ELEMENT_BACKGROUND, getColorAttributes(theme.getColor(Theme.SHELL_HISTORY_BACKGROUND_COLOR)));
if(theme.isColorSet(Theme.SHELL_HISTORY_FOREGROUND_COLOR))
out.writeStandAloneElement(ELEMENT_FOREGROUND, getColorAttributes(theme.getColor(Theme.SHELL_HISTORY_FOREGROUND_COLOR)));
out.endElement(ELEMENT_NORMAL);
// Selected colors.
out.startElement(ELEMENT_SELECTED);
out.println();
if(theme.isColorSet(Theme.SHELL_HISTORY_SELECTED_BACKGROUND_COLOR))
out.writeStandAloneElement(ELEMENT_BACKGROUND, getColorAttributes(theme.getColor(Theme.SHELL_HISTORY_SELECTED_BACKGROUND_COLOR)));
if(theme.isColorSet(Theme.SHELL_HISTORY_SELECTED_FOREGROUND_COLOR))
out.writeStandAloneElement(ELEMENT_FOREGROUND, getColorAttributes(theme.getColor(Theme.SHELL_HISTORY_SELECTED_FOREGROUND_COLOR)));
out.endElement(ELEMENT_SELECTED);
out.endElement(ELEMENT_SHELL_HISTORY);
// - Editor description ----------------------------------------------------------
// -------------------------------------------------------------------------------
out.startElement(ELEMENT_EDITOR);
out.println();
if(theme.isFontSet(Theme.EDITOR_FONT))
out.writeStandAloneElement(ELEMENT_FONT, getFontAttributes(theme.getFont(Theme.EDITOR_FONT)));
// Normal colors.
out.startElement(ELEMENT_NORMAL);
out.println();
if(theme.isColorSet(Theme.EDITOR_BACKGROUND_COLOR))
out.writeStandAloneElement(ELEMENT_BACKGROUND, getColorAttributes(theme.getColor(Theme.EDITOR_BACKGROUND_COLOR)));
if(theme.isColorSet(Theme.EDITOR_FOREGROUND_COLOR))
out.writeStandAloneElement(ELEMENT_FOREGROUND, getColorAttributes(theme.getColor(Theme.EDITOR_FOREGROUND_COLOR)));
out.endElement(ELEMENT_NORMAL);
// Selected colors.
out.startElement(ELEMENT_SELECTED);
out.println();
if(theme.isColorSet(Theme.EDITOR_SELECTED_BACKGROUND_COLOR))
out.writeStandAloneElement(ELEMENT_BACKGROUND, getColorAttributes(theme.getColor(Theme.EDITOR_SELECTED_BACKGROUND_COLOR)));
if(theme.isColorSet(Theme.EDITOR_SELECTED_FOREGROUND_COLOR))
out.writeStandAloneElement(ELEMENT_FOREGROUND, getColorAttributes(theme.getColor(Theme.EDITOR_SELECTED_FOREGROUND_COLOR)));
out.endElement(ELEMENT_SELECTED);
out.endElement(ELEMENT_EDITOR);
// - Location bar description ----------------------------------------------------
// -------------------------------------------------------------------------------
out.startElement(ELEMENT_LOCATION_BAR);
out.println();
if(theme.isFontSet(Theme.LOCATION_BAR_FONT))
out.writeStandAloneElement(ELEMENT_FONT, getFontAttributes(theme.getFont(Theme.LOCATION_BAR_FONT)));
if(theme.isColorSet(Theme.LOCATION_BAR_PROGRESS_COLOR))
out.writeStandAloneElement(ELEMENT_PROGRESS, getColorAttributes(theme.getColor(Theme.LOCATION_BAR_PROGRESS_COLOR)));
// Normal colors.
out.startElement(ELEMENT_NORMAL);
out.println();
if(theme.isColorSet(Theme.LOCATION_BAR_BACKGROUND_COLOR))
out.writeStandAloneElement(ELEMENT_BACKGROUND, getColorAttributes(theme.getColor(Theme.LOCATION_BAR_BACKGROUND_COLOR)));
if(theme.isColorSet(Theme.LOCATION_BAR_FOREGROUND_COLOR))
out.writeStandAloneElement(ELEMENT_FOREGROUND, getColorAttributes(theme.getColor(Theme.LOCATION_BAR_FOREGROUND_COLOR)));
out.endElement(ELEMENT_NORMAL);
// Selected colors.
out.startElement(ELEMENT_SELECTED);
out.println();
if(theme.isColorSet(Theme.LOCATION_BAR_SELECTED_BACKGROUND_COLOR))
out.writeStandAloneElement(ELEMENT_BACKGROUND, getColorAttributes(theme.getColor(Theme.LOCATION_BAR_SELECTED_BACKGROUND_COLOR)));
if(theme.isColorSet(Theme.LOCATION_BAR_SELECTED_FOREGROUND_COLOR))
out.writeStandAloneElement(ELEMENT_FOREGROUND, getColorAttributes(theme.getColor(Theme.LOCATION_BAR_SELECTED_FOREGROUND_COLOR)));
out.endElement(ELEMENT_SELECTED);
out.endElement(ELEMENT_LOCATION_BAR);
// - Volume label description ----------------------------------------------------
// -------------------------------------------------------------------------------
out.startElement(ELEMENT_STATUS_BAR);
out.println();
// Font.
if(theme.isFontSet(Theme.STATUS_BAR_FONT))
out.writeStandAloneElement(ELEMENT_FONT, getFontAttributes(theme.getFont(Theme.STATUS_BAR_FONT)));
// Colors.
if(theme.isColorSet(Theme.STATUS_BAR_BACKGROUND_COLOR))
out.writeStandAloneElement(ELEMENT_BACKGROUND, getColorAttributes(theme.getColor(Theme.STATUS_BAR_BACKGROUND_COLOR)));
if(theme.isColorSet(Theme.STATUS_BAR_FOREGROUND_COLOR))
out.writeStandAloneElement(ELEMENT_FOREGROUND, getColorAttributes(theme.getColor(Theme.STATUS_BAR_FOREGROUND_COLOR)));
if(theme.isColorSet(Theme.STATUS_BAR_BORDER_COLOR))
out.writeStandAloneElement(ELEMENT_BORDER, getColorAttributes(theme.getColor(Theme.STATUS_BAR_BORDER_COLOR)));
if(theme.isColorSet(Theme.STATUS_BAR_OK_COLOR))
out.writeStandAloneElement(ELEMENT_OK, getColorAttributes(theme.getColor(Theme.STATUS_BAR_OK_COLOR)));
if(theme.isColorSet(Theme.STATUS_BAR_WARNING_COLOR))
out.writeStandAloneElement(ELEMENT_WARNING, getColorAttributes(theme.getColor(Theme.STATUS_BAR_WARNING_COLOR)));
if(theme.isColorSet(Theme.STATUS_BAR_CRITICAL_COLOR))
out.writeStandAloneElement(ELEMENT_CRITICAL, getColorAttributes(theme.getColor(Theme.STATUS_BAR_CRITICAL_COLOR)));
out.endElement(ELEMENT_STATUS_BAR);
// - Quick list label description ----------------------------------------------------
// -------------------------------------------------------------------------------
out.startElement(ELEMENT_QUICK_LIST);
out.println();
// Quick list header
out.startElement(ELEMENT_HEADER);
out.println();
// Font.
if(theme.isFontSet(Theme.QUICK_LIST_HEADER_FONT))
out.writeStandAloneElement(ELEMENT_FONT, getFontAttributes(theme.getFont(Theme.QUICK_LIST_HEADER_FONT)));
// Colors.
if(theme.isColorSet(Theme.QUICK_LIST_HEADER_FOREGROUND_COLOR))
out.writeStandAloneElement(ELEMENT_FOREGROUND, getColorAttributes(theme.getColor(Theme.QUICK_LIST_HEADER_FOREGROUND_COLOR)));
if(theme.isColorSet(Theme.QUICK_LIST_HEADER_BACKGROUND_COLOR))
out.writeStandAloneElement(ELEMENT_BACKGROUND, getColorAttributes(theme.getColor(Theme.QUICK_LIST_HEADER_BACKGROUND_COLOR)));
if(theme.isColorSet(Theme.QUICK_LIST_HEADER_SECONDARY_BACKGROUND_COLOR))
out.writeStandAloneElement(ELEMENT_SECONDARY_BACKGROUND, getColorAttributes(theme.getColor(Theme.QUICK_LIST_HEADER_SECONDARY_BACKGROUND_COLOR)));
out.endElement(ELEMENT_HEADER);
// Quick list item
out.startElement(ELEMENT_ITEM);
out.println();
// Font.
if(theme.isFontSet(Theme.QUICK_LIST_ITEM_FONT))
out.writeStandAloneElement(ELEMENT_FONT, getFontAttributes(theme.getFont(Theme.QUICK_LIST_ITEM_FONT)));
// Colors.
// Normal colors.
out.startElement(ELEMENT_NORMAL);
out.println();
if(theme.isColorSet(Theme.QUICK_LIST_ITEM_FOREGROUND_COLOR))
out.writeStandAloneElement(ELEMENT_FOREGROUND, getColorAttributes(theme.getColor(Theme.QUICK_LIST_ITEM_FOREGROUND_COLOR)));
if(theme.isColorSet(Theme.QUICK_LIST_ITEM_BACKGROUND_COLOR))
out.writeStandAloneElement(ELEMENT_BACKGROUND, getColorAttributes(theme.getColor(Theme.QUICK_LIST_ITEM_BACKGROUND_COLOR)));
out.endElement(ELEMENT_NORMAL);
// Selected colors.
out.startElement(ELEMENT_SELECTED);
out.println();
if(theme.isColorSet(Theme.QUICK_LIST_SELECTED_ITEM_FOREGROUND_COLOR))
out.writeStandAloneElement(ELEMENT_FOREGROUND, getColorAttributes(theme.getColor(Theme.QUICK_LIST_SELECTED_ITEM_FOREGROUND_COLOR)));
if(theme.isColorSet(Theme.QUICK_LIST_SELECTED_ITEM_BACKGROUND_COLOR))
out.writeStandAloneElement(ELEMENT_BACKGROUND, getColorAttributes(theme.getColor(Theme.QUICK_LIST_SELECTED_ITEM_BACKGROUND_COLOR)));
out.endElement(ELEMENT_SELECTED);
out.endElement(ELEMENT_ITEM);
out.endElement(ELEMENT_QUICK_LIST);
out.endElement(ELEMENT_ROOT);
}