|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectbibliothek.extension.gui.dock.preference.AbstractPreference<V>
V - the kind of value this preference usespublic abstract class AbstractPreference<V>
An abstract implementation of Preference that offers support
for PreferenceListeners.
| Constructor Summary | |
|---|---|
AbstractPreference()
|
|
| Method Summary | |
|---|---|
void |
addPreferenceListener(PreferenceListener<V> listener)
Adds a listener to this preference. |
void |
doOperation(PreferenceOperation operation)
Executes the enabled operation operation. |
protected void |
fireChanged()
Informs all listeners that the value of this preference has changed. |
PreferenceOperation[] |
getOperations()
Gets a list of operations which can be executed by this preference. |
protected boolean |
hasListeners()
Tells whether this preference currently has listeners. |
boolean |
isEnabled(PreferenceOperation operation)
Tells whether operation is enabled and thus Preference.doOperation(PreferenceOperation)
can be called. |
protected PreferenceListener<V>[] |
listeners()
Gets all the listeners of this preference. |
void |
removePreferenceListener(PreferenceListener<V> listener)
Removes a listener from this preference. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface bibliothek.extension.gui.dock.preference.Preference |
|---|
getDescription, getLabel, getPath, getTypePath, getValue, getValueInfo, isNatural, read, setModel, setValue, write |
| Constructor Detail |
|---|
public AbstractPreference()
| Method Detail |
|---|
public void addPreferenceListener(PreferenceListener<V> listener)
Preference
addPreferenceListener in interface Preference<V>listener - the new listenerpublic void removePreferenceListener(PreferenceListener<V> listener)
Preference
removePreferenceListener in interface Preference<V>listener - the listener to removeprotected boolean hasListeners()
true if there are any listenersprotected PreferenceListener<V>[] listeners()
protected void fireChanged()
public boolean isEnabled(PreferenceOperation operation)
Preferenceoperation is enabled and thus Preference.doOperation(PreferenceOperation)
can be called.
isEnabled in interface Preference<V>operation - some operation of Preference.getOperations()
true if the operation can be executedpublic PreferenceOperation[] getOperations()
Preference
getOperations in interface Preference<V>public void doOperation(PreferenceOperation operation)
Preferenceoperation. This method should not
be called if operation is disabled.
doOperation in interface Preference<V>operation - the key of the operation
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||