net.sourceforge.rssowl.dao
Class SettingsSaver

java.lang.Object
  extended bynet.sourceforge.rssowl.dao.SettingsSaver

public class SettingsSaver
extends Object

The SettingsSaver class is responsible to save all settings and favorites into the user.xml settings file.

Version:
1.1.3
Author:
Benjamin Pasero

Field Summary
private  org.jdom.Document document
           
private  org.jdom.Element root
           
private  GUI rssOwlGui
           
 
Constructor Summary
SettingsSaver(GUI rssOwlGui)
          Instantiate a new SettingsSaver
SettingsSaver(GUI rssOwlGui, org.jdom.Document document)
          Instantiate a new SettingsSaver and use the given Document to save settings and/or favorites.
 
Method Summary
private  void saveBoolean(String name, boolean state)
          Save a Boolean value to the user.xml
private  void saveColor(String elementName, org.eclipse.swt.graphics.RGB color)
          Save a color
(package private)  void saveFavoritesOrCategorys(Hashtable categorys, org.jdom.Element element)
          Save Categorys and Favorits to the XML.
private  void saveFont(String name, org.eclipse.swt.graphics.Font font)
          Save the selected font
private  void saveHotkeys()
          Save hotkeys
private  void saveProxySettings()
          Save Proxysettings
private  void saveRatings()
          Save all ratings that have not yet been submitted
private  void saveReopenFeeds(Vector feeds)
          Save the feeds that RSSOwl shall reopen after application start.
private  void saveSashWeights(Hashtable sashWeights)
          Save weights of the SashForms
private  void saveShellBounds(Hashtable shellBounds)
          Save Shell Bounds
private  void saveSortOrder(Vector sortOrderVector)
          Save the sort Order to apply to News
 void saveUserSettings()
          Save all Settings
private  void saveValue(String elementName, String value)
          Save a setting to the settings XML file
private  void saveValue(String elementName, String attribute, String value)
          Save a setting to the settings XML file
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

document

private org.jdom.Document document

root

private org.jdom.Element root

rssOwlGui

private GUI rssOwlGui
Constructor Detail

SettingsSaver

public SettingsSaver(GUI rssOwlGui)
Instantiate a new SettingsSaver

Parameters:
rssOwlGui - The Main Controller

SettingsSaver

public SettingsSaver(GUI rssOwlGui,
                     org.jdom.Document document)
Instantiate a new SettingsSaver and use the given Document to save settings and/or favorites.

Parameters:
rssOwlGui - The Main Controller
document - The file to save settings into
Method Detail

saveUserSettings

public void saveUserSettings()
Save all Settings


saveBoolean

private void saveBoolean(String name,
                         boolean state)
Save a Boolean value to the user.xml

Parameters:
name - Name of the element
state - TRUE or FALSE

saveColor

private void saveColor(String elementName,
                       org.eclipse.swt.graphics.RGB color)
Save a color

Parameters:
elementName - The name of the element
color - The color to save

saveFont

private void saveFont(String name,
                      org.eclipse.swt.graphics.Font font)
Save the selected font

Parameters:
name - Font name
font - The font to save

saveHotkeys

private void saveHotkeys()
Save hotkeys


saveProxySettings

private void saveProxySettings()
Save Proxysettings


saveRatings

private void saveRatings()
Save all ratings that have not yet been submitted


saveReopenFeeds

private void saveReopenFeeds(Vector feeds)
Save the feeds that RSSOwl shall reopen after application start.

Parameters:
feeds - Vector with URLs of the feeds

saveSashWeights

private void saveSashWeights(Hashtable sashWeights)
Save weights of the SashForms

Parameters:
sashWeights - The sash weights

saveShellBounds

private void saveShellBounds(Hashtable shellBounds)
Save Shell Bounds

Parameters:
shellBounds - The bounds of the shell

saveSortOrder

private void saveSortOrder(Vector sortOrderVector)
Save the sort Order to apply to News

Parameters:
sortOrderVector - The sort order

saveValue

private void saveValue(String elementName,
                       String value)
Save a setting to the settings XML file

Parameters:
elementName - Name of the element
value - Value of the element

saveValue

private void saveValue(String elementName,
                       String attribute,
                       String value)
Save a setting to the settings XML file

Parameters:
elementName - Name of the element
attribute - Attribute name of the element
value - Attribute value of the element

saveFavoritesOrCategorys

void saveFavoritesOrCategorys(Hashtable categorys,
                              org.jdom.Element element)
Save Categorys and Favorits to the XML. This method is called recursivly to support nesting of categorys. Blogroll are saved via URL / Path to the XML of the blogroll.

Parameters:
categorys - Current working Categorys
element - Current working Element


RSSOwl - RSS / RDF / Atom Newsreader

SourceForge.net Logo