All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class semper.preferences.PrefGroup

java.lang.Object
   |
   +----semper.preferences.PrefGroup

public class PrefGroup
extends Object
implements Serializable
This class represents a preferences group object. A group is a collection of fields. This class offered services for fields manipulation.

Version:
$Revision: 1.19 $ $Date: 1997/09/26 16:29:36 $
Author:
Louis Salvail (CWI)
See Also:
PrefField

Variable Index

 o groupName

Constructor Index

 o PrefGroup()
preferences constructor used by newInstance().
 o PrefGroup(String, String)
preferences constructor.

Method Index

 o cancel()
Cancel user's modifications by setting each field back to their intial value.
 o delField(String)
Delete a particular field of the current group.
 o fieldsList()
Returns every field's name in this group.
 o get(String)
Gets a particular field of this group.
 o getLabel()
Gives the label for that group.
 o getName()
Gives the name of that group.
 o isModified()
Returns true if a field has been modified since last update.
 o numberOfFields()
Return the number of Fields in the group.
 o put(PrefField)
Adds a field to this group.
 o showme(PrefFrame)
This method adds to a frame the components of the group.
 o update()
Apply the modification when the changes in a group are done.

Variables

 o groupName
 public String groupName

Constructors

 o PrefGroup
 public PrefGroup(String groupname,
                  String withlabel)
preferences constructor.

Parameters:
name - is the reference name of that group with respect to the preferences manager interface.
withlabel - is the label appearing on display to refer to that group.
Returns:
The new empty group with the wanted name and label.
 o PrefGroup
 public PrefGroup()
preferences constructor used by newInstance(). This make nothing.

Returns:
empty object

Methods

 o getName
 public String getName()
Gives the name of that group.

Returns:
the stringname.
 o getLabel
 public String getLabel()
Gives the label for that group.

Returns:
the string representing the label.
 o numberOfFields
 public int numberOfFields()
Return the number of Fields in the group.

Returns:
the number of fields in this group.
 o fieldsList
 public Enumeration fieldsList()
Returns every field's name in this group.

Returns:
Enumeration of fields.
 o put
 public PrefField put(PrefField field)
Adds a field to this group.

Parameters:
field - is the PrefField object to be added.
Returns:
Null if that fieldname is new, return the previous field otherwise.
 o get
 public PrefField get(String fieldName)
Gets a particular field of this group.

Parameters:
fieldName - is the name of the field to get.
Returns:
the field if exists and null otherwise.
 o delField
 public PrefField delField(String fieldName)
Delete a particular field of the current group.

Parameters:
fieldName - is the name of the field to delete.
Returns:
the field object if exists and null otherwise.
 o showme
 public void showme(PrefFrame p)
This method adds to a frame the components of the group.

Parameters:
p - is the frame on which the components are added.
Returns:
none.
 o isModified
 public boolean isModified()
Returns true if a field has been modified since last update.

Returns:
true iff there exists a field modified.
 o update
 public boolean update()
Apply the modification when the changes in a group are done. The modification are performed only for field having a isOk = true value. Each newly modified field is notified to each of its resgistered peer.

Returns:
true if all fields have a correct value, false otherwise.
See Also:
PrefField, PrefNotify
 o cancel
 public void cancel()
Cancel user's modifications by setting each field back to their intial value.

Returns:
none.

All Packages  Class Hierarchy  This Package  Previous  Next  Index