|
||||||||||
| 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>
bibliothek.extension.gui.dock.preference.DefaultPreference<V>
V - the kind of value this preference holdspublic abstract class DefaultPreference<V>
A generic Preference that can hold any value. This preference does not implement
the Preference.read() or Preference.write() method. If a default-value
is set, then this preference activates the operation PreferenceOperation.DEFAULT, otherwise
it shows no operations.
This preference is set to be an artificial preference, subclasses may call
setNatural(boolean) to change the behavior.
| Constructor Summary | |
|---|---|
DefaultPreference(Path type,
Path path)
Creates a new preference. |
|
DefaultPreference(String label,
Path type,
Path path)
Creates a new preference. |
|
| Method Summary | |
|---|---|
void |
doOperation(PreferenceOperation operation)
Executes the enabled operation operation. |
V |
getDefaultValue()
Gets the default value of this preference |
String |
getDescription()
Gets a long human readable description of this preference. |
String |
getLabel()
Gets a short human readable string that is used as name for this preference. |
PreferenceOperation[] |
getOperations()
Gets a list of operations which can be executed by this preference. |
Path |
getPath()
Gets the unique path of this resource. |
Path |
getTypePath()
Gets the type of the value that this preferences uses. |
V |
getValue()
Gets the value of this preference. |
Object |
getValueInfo()
Information about how the value of this preference can be modified. |
boolean |
isEnabled(PreferenceOperation operation)
Tells whether operation is enabled and thus Preference.doOperation(PreferenceOperation)
can be called. |
boolean |
isNatural()
Tells whether this preference is natural or artificial. |
void |
setDefaultValue(V defaultValue)
Sets the default value of this preference |
void |
setDescription(String description)
Sets a description of this preference. |
void |
setLabel(String label)
Sets a short human readable label for this preference. |
void |
setNatural(boolean natural)
Sets whether this preference is natural or artificial. |
void |
setValue(V value)
Sets the value of this preference. |
void |
setValueInfo(Object valueInfo)
Sets information about this preferences value. |
| Methods inherited from class bibliothek.extension.gui.dock.preference.AbstractPreference |
|---|
addPreferenceListener, fireChanged, listeners, removePreferenceListener |
| 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 |
|---|
read, write |
| Constructor Detail |
|---|
public DefaultPreference(Path type,
Path path)
type - the type of value this preference usespath - a unique path for this preference, all paths starting with
"dock" are reserved for this framework
public DefaultPreference(String label,
Path type,
Path path)
label - a short human readable label for this preferencetype - the type of value this preference usespath - a unique path for this preference, all paths starting with
"dock" are reserved for this framework| Method Detail |
|---|
public String getLabel()
Preference
public void setLabel(String label)
label - the new labelpublic String getDescription()
Preference
null, may be formated
in HTMLpublic void setDescription(String description)
description - a human readable string, can be null and
can be formated in HTMLpublic Path getTypePath()
PreferencePath
public void setValueInfo(Object valueInfo)
getTypePath().
valueInfo - the new information or nullpublic Object getValueInfo()
PreferencePreferenceModel.getValueInfo(int).
nullpublic V getValue()
Preference
nullpublic void setValue(V value)
Preference
value - the value, might be null (depends on the
editor used for this preference)public void setDefaultValue(V defaultValue)
defaultValue - the new default valuepublic V getDefaultValue()
nullpublic Path getPath()
Preference
public void setNatural(boolean natural)
natural - true if natural, false
if artificialisNatural(),
PreferenceModel.isNatural(int)public boolean isNatural()
Preference
true if natural, false
if artificialPreferenceModel.isNatural(int)public PreferenceOperation[] getOperations()
Preference
getOperations in interface Preference<V>getOperations in class AbstractPreference<V>public boolean isEnabled(PreferenceOperation operation)
Preferenceoperation is enabled and thus Preference.doOperation(PreferenceOperation)
can be called.
isEnabled in interface Preference<V>isEnabled in class AbstractPreference<V>operation - some operation of Preference.getOperations()
true if the operation can be executedpublic void doOperation(PreferenceOperation operation)
Preferenceoperation. This method should not
be called if operation is disabled.
doOperation in interface Preference<V>doOperation in class AbstractPreference<V>operation - the key of the operation
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||