|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectbibliothek.extension.gui.dock.preference.AbstractPreferenceModel
bibliothek.extension.gui.dock.preference.model.ButtonContentPreferenceModel
public class ButtonContentPreferenceModel
This PreferenceModel allows the user to set up a ButtonContent using the static
conditions that are defined in ButtonContent.
| Constructor Summary | |
|---|---|
ButtonContentPreferenceModel(DockController controller)
Creates a new model |
|
| Method Summary | |
|---|---|
void |
addPreferenceModelListener(PreferenceModelListener listener)
Adds a listener to this model. |
ButtonContent |
getContent()
Gets the currently selected ButtonContent. |
String |
getLabel(int index)
Gets a short label that can be presented to the user for the index'th object. |
Path |
getPath(int index)
Gets the unique identifier of the index'th preference of
this model. |
int |
getSize()
Gets the number of preferences stored in this model. |
Path |
getTypePath(int index)
Tells what kind of type the index'th value is. |
Object |
getValue(int index)
Gets the index'th preference. |
Object |
getValueInfo(int index)
Gets information about how the index'th value can
be modified. |
void |
read()
Uses an unknown source to update this model and load all the preferences that are currently available. |
void |
removePreferenceModelListener(PreferenceModelListener listener)
Removes a listener from this model. |
void |
setContent(ButtonContent content)
Sets the property that should be shown. |
void |
setValue(int index,
Object value)
Sets the value of the index'th preference. |
void |
write()
Writes the current preferences to the location where they are used. |
| Methods inherited from class bibliothek.extension.gui.dock.preference.AbstractPreferenceModel |
|---|
doOperation, firePreferenceAdded, firePreferenceChanged, firePreferenceRemoved, getController, getDescription, getOperations, hasListeners, isEnabled, isNatural, listeners, setValueNatural |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ButtonContentPreferenceModel(DockController controller)
controller - the controller in whose realm this model works| Method Detail |
|---|
public void addPreferenceModelListener(PreferenceModelListener listener)
PreferenceModel
addPreferenceModelListener in interface PreferenceModeladdPreferenceModelListener in class AbstractPreferenceModellistener - the new listenerpublic void removePreferenceModelListener(PreferenceModelListener listener)
PreferenceModel
removePreferenceModelListener in interface PreferenceModelremovePreferenceModelListener in class AbstractPreferenceModellistener - the listener to remove.public void write()
PreferenceModel
write in interface PreferenceModelwrite in class AbstractPreferenceModelpublic void read()
PreferenceModel
read in interface PreferenceModelread in class AbstractPreferenceModelpublic ButtonContent getContent()
ButtonContent.
nullpublic void setContent(ButtonContent content)
content - the property, can be nullpublic String getLabel(int index)
PreferenceModelindex'th object.
index - the number the preference
public Path getPath(int index)
PreferenceModelindex'th preference of
this model.
index - the index of the preference
public int getSize()
PreferenceModel
public Path getTypePath(int index)
PreferenceModelindex'th value is. The type
is represented as a path. Most times the path would equal the name of
some class. Note: there is a set of standard paths defined in Path.
index - the number of the value
public Object getValue(int index)
PreferenceModelindex'th preference. The type path
determines how the value is to be presented on the screen.
index - the number of the preference
null, has to be immutablepublic Object getValueInfo(int index)
PreferenceModelindex'th value can
be modified. For an integer that might be its upper and lower boundaries.
The type of this objects depends on PreferenceModel.getTypePath(int).
index - the index of the info
null if no information is
available
public void setValue(int index,
Object value)
PreferenceModelindex'th preference.
index - the number of the preferencevalue - the new value, may be null
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||