Ontimize 5.2071EN

com.ontimize.gui.preferences
Class AbstractApplicationPreferences

java.lang.Object
  extended bycom.ontimize.gui.preferences.AbstractApplicationPreferences
All Implemented Interfaces:
ApplicationPreferences
Direct Known Subclasses:
BasicApplicationPreferences

public abstract class AbstractApplicationPreferences
extends java.lang.Object
implements ApplicationPreferences

Basic implementation of the application preferences. This is an abstract class.

Version:
1.0
See Also:
BasicApplicationPreferences

Field Summary
protected  java.util.Properties defaultUserProps
           
protected  java.util.Vector listeners
           
protected  java.util.Properties props
          Preferences store
protected  char separator
          Character used to separate the user name and the preference name in the preference key
protected  java.util.Properties userProps
           
 
Constructor Summary
AbstractApplicationPreferences()
           
 
Method Summary
 void addApplicationPreferencesListener(ApplicationPreferencesListener l)
          Adds an ApplicationPreferencesListener.
protected  void fireApplicationPreferencesChanged(java.lang.String user, java.lang.String pref, java.lang.String value)
          Notifies all listeners that have registered interest for notification on changes in preference values.
protected  java.lang.String getKeyPreference(java.lang.String user, java.lang.String name)
          Gets the key used to search a preference
 java.util.Properties getProperties()
           
 void removeApplicationPreferencesListener(ApplicationPreferencesListener l)
          Removes an ApplicationPreferencesListener.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.ontimize.gui.preferences.ApplicationPreferences
getPreference, getRemoteApplicationPreferences, loadPreferences, savePreferences, setPreference, setRemoteApplicationPreferences, showPreferencesDialog
 

Field Detail

listeners

protected java.util.Vector listeners

props

protected java.util.Properties props
Preferences store


userProps

protected java.util.Properties userProps

defaultUserProps

protected java.util.Properties defaultUserProps

separator

protected char separator
Character used to separate the user name and the preference name in the preference key

Constructor Detail

AbstractApplicationPreferences

public AbstractApplicationPreferences()
Method Detail

getProperties

public java.util.Properties getProperties()

getKeyPreference

protected java.lang.String getKeyPreference(java.lang.String user,
                                            java.lang.String name)
Gets the key used to search a preference

Parameters:
user - Name of the user who searches the preference. This parameter can be null
name - Preference name
Returns:
Key that must be used to search the preference

addApplicationPreferencesListener

public void addApplicationPreferencesListener(ApplicationPreferencesListener l)
Description copied from interface: ApplicationPreferences
Adds an ApplicationPreferencesListener.

Specified by:
addApplicationPreferencesListener in interface ApplicationPreferences
Parameters:
l -

removeApplicationPreferencesListener

public void removeApplicationPreferencesListener(ApplicationPreferencesListener l)
Description copied from interface: ApplicationPreferences
Removes an ApplicationPreferencesListener.

Specified by:
removeApplicationPreferencesListener in interface ApplicationPreferences
Parameters:
l -

fireApplicationPreferencesChanged

protected void fireApplicationPreferencesChanged(java.lang.String user,
                                                 java.lang.String pref,
                                                 java.lang.String value)
Notifies all listeners that have registered interest for notification on changes in preference values. The fire event include information about the user, the preference key and the new value for this preference.

Parameters:
user - Name of the user
pref - Preference name
value - New preference value

Ontimize