|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object bibliothek.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 worksMethod Detail |
---|
public void addPreferenceModelListener(PreferenceModelListener listener)
PreferenceModel
addPreferenceModelListener
in interface PreferenceModel
addPreferenceModelListener
in class AbstractPreferenceModel
listener
- the new listenerpublic void removePreferenceModelListener(PreferenceModelListener listener)
PreferenceModel
removePreferenceModelListener
in interface PreferenceModel
removePreferenceModelListener
in class AbstractPreferenceModel
listener
- the listener to remove.public void write()
PreferenceModel
write
in interface PreferenceModel
write
in class AbstractPreferenceModel
public void read()
PreferenceModel
read
in interface PreferenceModel
read
in class AbstractPreferenceModel
public ButtonContent getContent()
ButtonContent
.
null
public void setContent(ButtonContent content)
content
- the property, can be null
public String getLabel(int index)
PreferenceModel
index
'th object.
index
- the number the preference
public Path getPath(int index)
PreferenceModel
index
'th preference of
this model.
index
- the index of the preference
public int getSize()
PreferenceModel
public Path getTypePath(int index)
PreferenceModel
index
'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)
PreferenceModel
index
'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)
PreferenceModel
index
'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
availablepublic void setValue(int index, Object value)
PreferenceModel
index
'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 |