|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object frysk.gui.prefs.FryskPreference frysk.gui.prefs.ColorPreference
public class ColorPreference
ColorPreference models a color-values preference for Frysk
Nested Class Summary | |
---|---|
static interface |
ColorPreference.ColorPreferenceListener
|
Field Summary | |
---|---|
protected org.gnu.gdk.Color |
currentColor
|
protected org.gnu.gdk.Color |
fallback
|
protected LinkedList |
listeners
|
Fields inherited from class frysk.gui.prefs.FryskPreference |
---|
model, name |
Constructor Summary | |
---|---|
ColorPreference(String name,
org.gnu.gdk.Color fallback)
Creates a new ColorPreference |
Method Summary | |
---|---|
void |
addListener(ColorPreference.ColorPreferenceListener listener)
Adds a listener to this preference that will get notified whenever the value of this preference changes |
org.gnu.gdk.Color |
getCurrentColor()
|
void |
load(Preferences prefs)
Sets the preference to use the provided model and loads the values from it. |
void |
revert()
Restores the current value of this preference from the model. |
void |
save(Preferences prefs)
Saves the value of this preference into the preference model and notify all attached listeners |
void |
setCurrentColor(org.gnu.gdk.Color currentColor)
Sets the current color for this preference. |
Methods inherited from class frysk.gui.prefs.FryskPreference |
---|
getName |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected org.gnu.gdk.Color currentColor
protected org.gnu.gdk.Color fallback
protected LinkedList listeners
Constructor Detail |
---|
public ColorPreference(String name, org.gnu.gdk.Color fallback)
name
- The name of the preferencefallback
- The default color to useMethod Detail |
---|
public void setCurrentColor(org.gnu.gdk.Color currentColor)
save(Preferences)
is called.
currentColor
- The new colorpublic org.gnu.gdk.Color getCurrentColor()
public void save(Preferences prefs)
public void load(Preferences prefs)
public void addListener(ColorPreference.ColorPreferenceListener listener)
listener
- The object to notify when the preference changes.public void revert()
revert
in class FryskPreference
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |