|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object frysk.gui.prefs.PreferenceGroup
public class PreferenceGroup
A preference group is a collection of preferences that all belong to the same category.
Constructor Summary | |
---|---|
PreferenceGroup(String name,
int tabNum)
Create a new Preference Group. |
Method Summary | |
---|---|
void |
addPreference(FryskPreference preference)
Adds a new preference to this group |
void |
addSubgroup(PreferenceGroup subgroup)
Adds a new subgroup to this group |
boolean |
contains(FryskPreference preference)
Checks to see if a preference is in this group |
String |
getName()
|
FryskPreference |
getPreference(String name)
|
Iterator |
getPreferences()
|
PreferenceGroup |
getSubgroup(String name)
|
Iterator |
getSubgroups()
|
int |
getTabNum()
|
void |
load(Preferences prefs)
Replaces the current value of all preferences in the group with the values in the underlying preferences model. |
void |
removePreference(FryskPreference preference)
Removes the preference from the group. |
void |
removePreference(String prefName)
Same as removePreference(FryskPreference) , except
removes the preference by name |
void |
removeSubgroup(PreferenceGroup group)
Removes the provided subgroup. |
void |
removeSubgroup(String name)
Removes the subgroup with the given name |
void |
revertAll()
Reverts all the preferences in this group back to the values in the model |
void |
save(Preferences prefs)
Saves the values of the preferences into the preference model. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PreferenceGroup(String name, int tabNum)
name
- The name of the group.Method Detail |
---|
public Iterator getPreferences()
public FryskPreference getPreference(String name)
name
- The name of the preference to look up
public String getName()
public void addPreference(FryskPreference preference)
preference
- The preference to addpublic void removePreference(FryskPreference preference)
preference
- The preference to remvoepublic void removePreference(String prefName)
removePreference(FryskPreference)
, except
removes the preference by name
prefName
- The name of the preference to removepublic void save(Preferences prefs)
save
in interface Saveable
public void load(Preferences prefs)
load
in interface Saveable
public boolean contains(FryskPreference preference)
preference
- The preference to look for
public void revertAll()
public void addSubgroup(PreferenceGroup subgroup)
subgroup
- The subgrouppublic PreferenceGroup getSubgroup(String name)
name
- The name of the subgroup to fetch
public Iterator getSubgroups()
public void removeSubgroup(String name)
name
- public void removeSubgroup(PreferenceGroup group)
group
- The subgroup to removepublic int getTabNum()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |