|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
V - the kind of value this editor editspublic interface PreferenceEditor<V>
An editor configures a Component which is used to edit some value. How
exactly this component is configured depends on the meta-information
extracted from the preference which is edited.
An editor communicates with its surroundings through a callback. The
editor can ask its parent to show some buttons which represent operations this editor can execute. For
example an editor could ask its parent to show a "reset value to default"-button. The editor manages these buttons
by calling PreferenceEditorCallback.setOperation(PreferenceOperation, boolean) and by implementing
doOperation(PreferenceOperation).
| Method Summary | |
|---|---|
void |
doOperation(PreferenceOperation operation)
Executes the operation that matches operation or does
nothing if operation is unknown. |
java.awt.Component |
getComponent()
Gets a component which displays the contents of this editor. |
V |
getValue()
Gets the value of this editor. |
void |
setCallback(PreferenceEditorCallback<V> callback)
Sets a callback, a callback can be used to read the value that has to be edited or to store the edited value. |
void |
setValue(V value)
Sets the current value of this editor. |
void |
setValueInfo(java.lang.Object information)
Sets information about the value that is shown. |
| Method Detail |
|---|
java.awt.Component getComponent()
nullvoid setCallback(PreferenceEditorCallback<V> callback)
PreferenceEditorCallback.set(Object)
whenever this editor shows a new valid value.
callback - the callback, might be nullvoid setValueInfo(java.lang.Object information)
setValue(Object). This method might be called with
a null argument when the editor is no longer needed.
information - the information, may be nullvoid setValue(V value)
value - the value, might be nullV getValue()
PreferenceEditorCallback.set(Object)
when their value got edited by the user. An editor should not expect
a call to this method.
nullvoid doOperation(PreferenceOperation operation)
operation or does
nothing if operation is unknown.
operation - the operation that was triggered
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||