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

Type Parameters:
V - the kind of object this callback has access to

public interface PreferenceEditorCallback<V>

A callback is an object that has access to some value and can either read or store it.

Author:
Benjamin Sigg

Method Summary
 V get()
          Gets the value to which this callback has access to.
 void set(V value)
          Sets the value of this callback.
 void setOperation(PreferenceOperation operation, boolean enabled)
          Tells this callback that the editor using it can perform some action.
 

Method Detail

get

V get()
Gets the value to which this callback has access to.

Returns:
the value, might be null

set

void set(V value)
Sets the value of this callback. An editor should call this method whenever its value changes.

Parameters:
value - the value, might be null

setOperation

void setOperation(PreferenceOperation operation,
                  boolean enabled)
Tells this callback that the editor using it can perform some action. This method can be called more than once if enabled changes it value.

Parameters:
operation - the key of the action
enabled - whether the operation is available right now