kawigi.properties
Class ChainedPrefs

java.lang.Object
  extended by kawigi.properties.AbstractPrefs
      extended by kawigi.properties.ChainedPrefs
All Implemented Interfaces:
PrefProxy

public class ChainedPrefs
extends AbstractPrefs

This class is used by the settings dialog. The idea is to temporarily store changed values of settings and then commit them all at once (or not commit them if the dialog is cancelled).


Constructor Summary
ChainedPrefs(PrefProxy chainPrefs)
          Constructs a new ChainedPrefs to proxy the given PrefProxy.
 
Method Summary
 void commit()
          Saves the values of properties previously set on this PrefProxy, and causes the chained PrefProxy to also commit.
 java.lang.String getProperty(java.lang.String property)
          Gets the current value of a property.
 void setProperty(java.lang.String property, java.lang.String value)
          Locally sets the value of a property.
 
Methods inherited from class kawigi.properties.AbstractPrefs
getBoolean, getBoolean, getColor, getColor, getDouble, getDouble, getFont, getFont, getInt, getInt, getProperty, getWorkingDirectory, setBoolean, setColor, setDouble, setFont, setInt, setWorkingDirectory
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChainedPrefs

public ChainedPrefs(PrefProxy chainPrefs)
Constructs a new ChainedPrefs to proxy the given PrefProxy.

Method Detail

getProperty

public java.lang.String getProperty(java.lang.String property)
Gets the current value of a property. If the property has been set on this object, it returns the value that it was set to, otherwise it returns the value of the property in the chained PrefProxy.


setProperty

public void setProperty(java.lang.String property,
                        java.lang.String value)
Locally sets the value of a property. This value isn't immediately committed to the chained PrefProxy.


commit

public void commit()
Saves the values of properties previously set on this PrefProxy, and causes the chained PrefProxy to also commit.