be.lassi.preferences
Class DefaultPreferences
java.lang.Object
com.jgoodies.binding.beans.Model
be.lassi.preferences.DefaultPreferences
- All Implemented Interfaces:
- Preferences, com.jgoodies.binding.beans.Observable, java.io.Serializable
- Direct Known Subclasses:
- ArtNetPreferences, ConnectionPreferences, DisplayPreferences, MidiPreferences, MonitorPreferences, PatchPreferences, SheetPreferences, ShowParameters
public abstract class DefaultPreferences
- extends com.jgoodies.binding.beans.Model
- implements Preferences
Default implementation of the Preferences
interface.
- See Also:
- Serialized Form
Constructor Summary |
protected |
DefaultPreferences(java.lang.String name,
java.lang.String description)
|
Method Summary |
protected void |
add(java.lang.String key,
java.lang.Object value)
|
java.lang.Object |
get(java.lang.String key)
Gets the value of the preference with give name. |
boolean |
getBoolean(java.lang.String key)
|
java.lang.String |
getDescription()
Gets a textual description of of the purpose of this preferences collection. |
float |
getFloat(java.lang.String key)
|
int |
getInt(java.lang.String key)
|
java.util.List<java.lang.String> |
getKeys()
Gets the preference keys. |
java.lang.String |
getName()
Gets the name of this preferences collection. |
java.lang.String |
getString(java.lang.String key)
|
void |
set(Preferences preferences)
Copies given preferences to this preferences. |
void |
set(java.lang.String key,
java.lang.Object value)
Sets the value of the preference with given name. |
Methods inherited from class com.jgoodies.binding.beans.Model |
addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, addVetoableChangeListener, equals, fireIndexedPropertyChange, fireIndexedPropertyChange, fireIndexedPropertyChange, fireMultiplePropertiesChanged, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, getPropertyChangeListeners, getPropertyChangeListeners, getVetoableChangeListeners, getVetoableChangeListeners, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, removeVetoableChangeListener |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultPreferences
protected DefaultPreferences(java.lang.String name,
java.lang.String description)
add
protected void add(java.lang.String key,
java.lang.Object value)
get
public java.lang.Object get(java.lang.String key)
- Description copied from interface:
Preferences
- Gets the value of the preference with give name.
- Specified by:
get
in interface Preferences
- Parameters:
key
- the preference name
- Returns:
- the preference value
getBoolean
public boolean getBoolean(java.lang.String key)
getDescription
public java.lang.String getDescription()
- Gets a textual description of of the purpose of this preferences collection.
- Specified by:
getDescription
in interface Preferences
- Returns:
- textual description of preferences
getFloat
public float getFloat(java.lang.String key)
getInt
public int getInt(java.lang.String key)
getKeys
public java.util.List<java.lang.String> getKeys()
- Description copied from interface:
Preferences
- Gets the preference keys.
- Specified by:
getKeys
in interface Preferences
- Returns:
- the preference keys
getName
public java.lang.String getName()
- Description copied from interface:
Preferences
- Gets the name of this preferences collection.
- Specified by:
getName
in interface Preferences
- Returns:
- the preferences collection name
getString
public java.lang.String getString(java.lang.String key)
set
public void set(Preferences preferences)
- Description copied from interface:
Preferences
- Copies given preferences to this preferences.
- Specified by:
set
in interface Preferences
- Parameters:
preferences
- preferences to be copied to this preferences
set
public void set(java.lang.String key,
java.lang.Object value)
- Description copied from interface:
Preferences
- Sets the value of the preference with given name.
- Specified by:
set
in interface Preferences
- Parameters:
key
- the preference namevalue
- the preference value