|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.ocl.common.internal.preferences.Preference<T>
T - the type of the option's valuepublic abstract class Preference<T>
Abstract implementation of a configurable preference option. Derived classes support specific types.
BooleanPreference,
ClassPreference,
EnumerationPreference,
IntegerPreference| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.eclipse.ocl.common.preferences.PreferenceableOption |
|---|
PreferenceableOption.Listener, PreferenceableOption.PreferenceableOption2<T> |
| Field Summary | |
|---|---|
T |
defaultValue
|
java.lang.String |
key
|
java.lang.String |
pluginId
|
| Constructor Summary | |
|---|---|
Preference(java.lang.String pluginId,
java.lang.String key,
T defaultValue)
|
|
| Method Summary | |
|---|---|
void |
addListener(PreferenceableOption.Listener listener)
Add a listener to be notified of changes. |
void |
fireChanged(java.lang.String key,
java.lang.Object oldValue,
java.lang.Object newValue)
Call-back notification that the Eclipse preference identified by a key, has changed from oldValue to new Value. |
T |
getDefaultValue()
Obtains the option's default value. |
java.lang.String |
getKey()
Obtains my string key, which may be used for persistence in a preference store. |
java.lang.String |
getPluginId()
Returns the plugin qualifier for the key. |
T |
getPreferredValue()
Get the preferred value of this option. |
void |
removeListener(PreferenceableOption.Listener listener)
Remove a listener to be notified of changes. |
void |
setDefaultValue(T defaultValue)
|
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.eclipse.ocl.common.preferences.PreferenceableOption |
|---|
getValueOf |
| Field Detail |
|---|
public final java.lang.String pluginId
public final java.lang.String key
public T defaultValue
| Constructor Detail |
|---|
public Preference(@NonNull
java.lang.String pluginId,
@NonNull
java.lang.String key,
@Nullable
T defaultValue)
| Method Detail |
|---|
public void addListener(@NonNull
PreferenceableOption.Listener listener)
PreferenceableOption.PreferenceableOption2
addListener in interface PreferenceableOption.PreferenceableOption2<T>
public void fireChanged(java.lang.String key,
java.lang.Object oldValue,
java.lang.Object newValue)
PreferenceableOption.PreferenceableOption2
fireChanged in interface PreferenceableOption.PreferenceableOption2<T>@NonNull public java.lang.String getKey()
getKey in interface PreferenceableOption<T>null@NonNull public java.lang.String getPluginId()
PreferenceableOption
getPluginId in interface PreferenceableOption<T>@Nullable public T getDefaultValue()
getDefaultValue in interface PreferenceableOption<T>null@Nullable public T getPreferredValue()
getPreferredValue in interface PreferenceableOption.PreferenceableOption2<T>
public void removeListener(@NonNull
PreferenceableOption.Listener listener)
PreferenceableOption.PreferenceableOption2
removeListener in interface PreferenceableOption.PreferenceableOption2<T>
public void setDefaultValue(@Nullable
T defaultValue)
public java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||