Other classes are needed to help the three others:
Here
For more details on how to create groups see the PrefTestC.java file in the
Test directory.
To create a preferences environment, you just have to add group
in the Preferences class. If groupe1 and groupe2 have already been defined,
you can add them by doing:
In order to create a menu structure from which the user
selects the group he wants to edit, the following can be used. Assume
that group1,group2 and group3 have been defined and added to the preferences
manager like described above:
In order to retrieve the menu structure currently defined in the preferences manager
one should use:
To get the values for a particular field, you must first retrieve
the group which contains the field you are looking for:
Date: August, 1996 .
How to create a Group?
How to create a Preferences environment?
How to create subgroups?
By default when a new group is added to the preferences manager whithout specifiying
in which subgroup it will appear, the group will be put at the root level. That means
that the group will be accessible at the first level of the menu structure.
Do not confuse groups and subgroups, they are different things. A group is
a PrefGroup object while a subgroup is just a string. Subgroups are only
used to display the menu structure. For the preferences manager all
preferences groups are at the same level.
How to get the values?
Also available is the Test package where you
can learn how to use the Preferences manager by examples.