com.tensegrity.generic.util.prefs
Interface PreferenceDialogProvider

All Known Implementing Classes:
DocumentSettingsProvider

public interface PreferenceDialogProvider

This interface defines the methods needed by the PreferenceDialog to be able to display and work on the settings.

Version:
$Id: PreferenceDialogProvider.java,v 1.4 2004/06/28 10:38:01 AndreasEbbert Exp $
Author:
Andreas Ebbert

Method Summary
 void applyChanges()
          After an user has made changes in the PreferencesDialog this method is called to make the values the application can retrieve by calling getValue valid.
 void cancelChanges()
          Cancels all changes made since the last call to applyChanges().
 void flush()
          Saves the preferences-file.
 AttributeList getAttributeList()
          Returns the AttributeList holding the preference settings.
 PreferenceEvent[] getChangedPreferences()
          Returns an array of PreferencesEvents.
 AttributeSet getDefaultAttributeSet(java.lang.String name)
          Returns the top level set with the given name from the default list.
 boolean isRestorable()
          Indicates whether this preference instance is restorable.
 

Method Detail

applyChanges

public void applyChanges()
After an user has made changes in the PreferencesDialog this method is called to make the values the application can retrieve by calling getValue valid.


cancelChanges

public void cancelChanges()
Cancels all changes made since the last call to applyChanges().


flush

public void flush()
           throws java.io.IOException
Saves the preferences-file. The default name of this file is preferences.xml and it is located in the user.dir.

Throws:
java.io.IOException - if the preference-file could not be saved.

getAttributeList

public AttributeList getAttributeList()
Returns the AttributeList holding the preference settings.

Returns:
the AttributeList holding the preference settings.

getDefaultAttributeSet

public AttributeSet getDefaultAttributeSet(java.lang.String name)
Returns the top level set with the given name from the default list.

Parameters:
name - the name of the set to retrieve.
Returns:
the found AttributeSet; null otherwise.

getChangedPreferences

public PreferenceEvent[] getChangedPreferences()
Returns an array of PreferencesEvents. Every listed entry reflects a change made to the preferences.

Returns:
an array of PreferencesEvents reflecting the changes made to the preferences.

isRestorable

public boolean isRestorable()
Indicates whether this preference instance is restorable.

Returns:
true, if this preference instance is restorable.


Copyright © 2005 Tensegrity Software GmbH. All Rights Reserved. Date of creation: 09.06.2006.