bibliothek.extension.gui.dock.preference
Interface PreferenceEditor<V>

Type Parameters:
V - the kind of value this editor edits
All Known Implementing Classes:
ChoiceEditor, KeyStrokeEditor, ModifierMaskEditor

public interface PreferenceEditor<V>

An editor for some value.

Author:
Benjamin Sigg

Method Summary
 void doOperation(PreferenceOperation operation)
          Executes the operation that matches operation or does nothing if operation is unknown.
 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(Object information)
          Sets information about the value that is shown.
 

Method Detail

getComponent

Component getComponent()
Gets a component which displays the contents of this editor.

Returns:
the component, not null

setCallback

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

Parameters:
callback - the callback, might be null

setValueInfo

void setValueInfo(Object information)
Sets information about the value that is shown. This method is called before setValue(Object). This method might be called with a null argument when the editor is no longer needed.

Parameters:
information - the information, may be null

setValue

void setValue(V value)
Sets the current value of this editor

Parameters:
value - the value, might be null

getValue

V getValue()
Gets the value of this editor.

Returns:
the value, might be null

doOperation

void doOperation(PreferenceOperation operation)
Executes the operation that matches operation or does nothing if operation is unknown.

Parameters:
operation - the operation that was triggered