de.sciss.app
Interface PreferenceEntrySync

All Known Implementing Classes:
BasicPathField, BooleanPrefsMenuAction, IntPrefsMenuAction, KeyStrokeTextField, PrefCheckBox, PrefComboBox, PrefMenuAction, PrefNumberField, PrefParamField, PrefPathField, PrefRecentItemsCombo, PrefTextField

public interface PreferenceEntrySync

Objects implementing this interface state that they will store their serialized representation in a given preference entry

Version:
0.27, 25-Sep-05
Author:
Hanns Holger Rutz

Method Summary
 java.lang.String getPreferenceKey()
          Gets the recently set preference key
 java.util.prefs.Preferences getPreferenceNode()
          Gets the recently set preference node
 boolean getReadPrefs()
           
 boolean getWritePrefs()
           
 void readPrefs()
           
 void setPreferenceKey(java.lang.String key)
           
 void setPreferenceNode(java.util.prefs.Preferences prefs)
           
 void setPreferences(java.util.prefs.Preferences prefs, java.lang.String key)
          Enables Preferences synchronization.
 void setReadPrefs(boolean b)
           
 void setWritePrefs(boolean b)
           
 void writePrefs()
           
 

Method Detail

setPreferences

void setPreferences(java.util.prefs.Preferences prefs,
                    java.lang.String key)
Enables Preferences synchronization. This method is not thread safe and must be called from the event thread. When a preference change is received, the GUI is updated and dispatches an event to registered listeners. Likewise, if the user adjusts the GUI value, the preference will be updated. The same is true, if you call one of the value changing methods.

Parameters:
prefs - the preferences node in which the value is stored, or null to disable prefs sync.
key - the key used to store and recall prefs. the value is converted into a string.

setPreferenceNode

void setPreferenceNode(java.util.prefs.Preferences prefs)

setPreferenceKey

void setPreferenceKey(java.lang.String key)

getPreferenceNode

java.util.prefs.Preferences getPreferenceNode()
Gets the recently set preference node

Returns:
the node set with setPreferences or null if no prefs were set

getPreferenceKey

java.lang.String getPreferenceKey()
Gets the recently set preference key

Returns:
the key set with setPreferences or null if no prefs were set

setReadPrefs

void setReadPrefs(boolean b)

setWritePrefs

void setWritePrefs(boolean b)

getReadPrefs

boolean getReadPrefs()

getWritePrefs

boolean getWritePrefs()

readPrefs

void readPrefs()

writePrefs

void writePrefs()