org.xnap.commons.settings
Class DefaultCompletionModeSetting

java.lang.Object
  extended by org.xnap.commons.settings.AbstractSetting<String>
      extended by org.xnap.commons.settings.StringSetting
          extended by org.xnap.commons.settings.DefaultCompletionModeSetting
All Implemented Interfaces:
Setting<String>

public class DefaultCompletionModeSetting
extends StringSetting

A setting that store the default completion mode. When the setting changes the GlobalDefaultCompletionMode is updated accordingly.

This class should only be instaciated once.

Note: When a SettingResource is loaded a PropertyChangeEvent is not triggered, therefore updateMode() needs to be invoked once after the settings have been loaded.

Author:
Steffen Pingel

Field Summary
 
Fields inherited from class org.xnap.commons.settings.AbstractSetting
ARRAY_SEPARATOR, backstore
 
Constructor Summary
DefaultCompletionModeSetting(SettingResource backend, String key, String className)
          Creates a CompletionModeSetting for all instances of GlobalDefaultCompletionMode.
 
Method Summary
 void updateMode()
          Updates the global default completion mode.
 
Methods inherited from class org.xnap.commons.settings.StringSetting
fromString, toString
 
Methods inherited from class org.xnap.commons.settings.AbstractSetting
addPropertyChangeListener, areObjectsEqual, areObjectsEqual, getDefaultValue, getKey, getProperties, getValidator, getValue, removePropertyChangeListener, revert, setDefaultValue, setProperties, setValidator, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultCompletionModeSetting

public DefaultCompletionModeSetting(SettingResource backend,
                                    String key,
                                    String className)
Creates a CompletionModeSetting for all instances of GlobalDefaultCompletionMode.

Parameters:
key - the settings key for the properties file
className - the mode which is initially set for the completion object
Throws:
NullPointerException - if className is null
Method Detail

updateMode

public void updateMode()
Updates the global default completion mode.

See Also:
GlobalDefaultCompletionMode.setCompletionMode(String)


Copyright © 2004-2007 XNap Commons Team. All Rights Reserved.