org.xnap.commons.settings
Class CompletionModeSetting
java.lang.Object
org.xnap.commons.settings.AbstractSetting<String>
org.xnap.commons.settings.StringSetting
org.xnap.commons.settings.CompletionModeSetting
- All Implemented Interfaces:
- CompletionModeListener, Setting<String>
public class CompletionModeSetting
- extends StringSetting
- implements CompletionModeListener
This class manages the serialization of the active completion mode for a
Completion
object.
A CompletionModeSetting can be used as follows:
JTextField jtf = new JTextField();
Completion comp = new Completion(jtf);
CompletionModeSetting cms =
new CompletionModeSetting("prefsKey",
ManualCompletionMode.class.getName(), comp);
- Author:
- Felix Berger
Method Summary |
void |
modeChanged(Class oldMode,
Class newMode)
Invoked when a completion mode change took place. |
void |
revert()
Reverts the completion mode setting to the default mode and sets it
for the completion object. |
Methods inherited from class org.xnap.commons.settings.AbstractSetting |
addPropertyChangeListener, areObjectsEqual, areObjectsEqual, getDefaultValue, getKey, getProperties, getValidator, getValue, removePropertyChangeListener, setDefaultValue, setProperties, setValidator, setValue |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CompletionModeSetting
public CompletionModeSetting(SettingResource backend,
String key,
Class defaultMode,
Completion comp)
- Creates a CompletionModeSetting for a completion object.
- Parameters:
key
- the settings key for the properties filedefaultMode
- the mode which is initially set for the completion
objectcomp
-
revert
public void revert()
- Reverts the completion mode setting to the default mode and sets it
for the completion object.
- Specified by:
revert
in interface Setting<String>
- Overrides:
revert
in class AbstractSetting<String>
modeChanged
public void modeChanged(Class oldMode,
Class newMode)
- Description copied from interface:
CompletionModeListener
- Invoked when a completion mode change took place.
- Specified by:
modeChanged
in interface CompletionModeListener
- Parameters:
oldMode
- the old completion modenewMode
- the new completion mode
Copyright © 2004-2007 XNap Commons Team. All Rights Reserved.