net.sourceforge.geeboss.model.settings
Class Settings

java.lang.Object
  extended by net.sourceforge.geeboss.model.settings.Settings
All Implemented Interfaces:
ConfigurationSupport, LoadConfigurationSupport, SaveConfigurationSupport

public class Settings
extends java.lang.Object
implements ConfigurationSupport

The settings of the application

Author:
Frederic BORRY

Constructor Summary
Settings(org.apache.avalon.framework.configuration.Configuration configuration, GeebossContainer container)
          Construct a new settings instance from a configuration object
Settings(GeebossContainer container)
          Construct a new empty settings instance
 
Method Summary
 GuiSettings getGuiSettings()
          Getter for GuiSettings
 java.util.Locale getLocale()
          Getter for current locale
 MidiSettings getMidiSettings()
          Getter for MidiSettings
 void loadConfiguration(org.apache.avalon.framework.configuration.Configuration configuration, GeebossContainer container)
          Load the configuration of this object
static Settings loadFromFile(GeebossContainer container, java.io.File file)
          Create a new settings object from a file
 org.apache.avalon.framework.configuration.Configuration saveConfiguration()
          Create a configuration object representing this object
 void saveToFile(java.io.File file)
          Save the settings to a file
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Settings

public Settings(GeebossContainer container)
Construct a new empty settings instance

Parameters:
container - the geeboss container

Settings

public Settings(org.apache.avalon.framework.configuration.Configuration configuration,
                GeebossContainer container)
         throws org.apache.avalon.framework.configuration.ConfigurationException
Construct a new settings instance from a configuration object

Parameters:
configuration - the configuration to load
container - the geeboss container
Throws:
org.apache.avalon.framework.configuration.ConfigurationException
Method Detail

getMidiSettings

public MidiSettings getMidiSettings()
Getter for MidiSettings

Returns:
the MidiSettings

getGuiSettings

public GuiSettings getGuiSettings()
Getter for GuiSettings

Returns:
the GuiSettings

getLocale

public java.util.Locale getLocale()
Getter for current locale

Returns:
the current locale

saveConfiguration

public org.apache.avalon.framework.configuration.Configuration saveConfiguration()
Create a configuration object representing this object

Specified by:
saveConfiguration in interface SaveConfigurationSupport
Returns:
a configuration object representing this object

loadConfiguration

public void loadConfiguration(org.apache.avalon.framework.configuration.Configuration configuration,
                              GeebossContainer container)
                       throws org.apache.avalon.framework.configuration.ConfigurationException
Load the configuration of this object

Specified by:
loadConfiguration in interface LoadConfigurationSupport
Parameters:
configuration - this object's configuration
container - a reference to the GeebossContainer
Throws:
org.apache.avalon.framework.configuration.ConfigurationException

loadFromFile

public static Settings loadFromFile(GeebossContainer container,
                                    java.io.File file)
Create a new settings object from a file

Parameters:
container - the geeboss container
file - the file or null
Returns:
the new settings instance

saveToFile

public void saveToFile(java.io.File file)
Save the settings to a file

Parameters:
file - the file to save the settings to


Copyright (c) 2005 The Geeboss team (http://geeboss.sourceforge.net). All Rights Reserved.