Class semper.preferences.PrefGroup
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 Streamable
This class represents a preferences group object. A group is
a collection of fields. This class offered services for
fields manipulation.
- Version:
- $Revision: 1.15 $ $Date: 1997/01/17 19:53:12 $
- Author:
- Louis Salvail (CWI)
- See Also:
- PrefField
-
groupName
-
-
PrefGroup()
- preferences constructor used by newInstance().
-
PrefGroup(String, String)
- preferences constructor.
-
cancel()
- Cancel user's modifications by setting each field back to their intial value.
-
delField(String)
- Delete a particular field of the current group.
-
fieldsList()
- Returns every field's name in this group.
-
get(String)
- Gets a particular field of this group.
-
getLabel()
- Gives the label for that group.
-
getName()
- Gives the name of that group.
-
isModified()
- Returns true if a field has been modified since last update.
-
myStreamSize()
- Returns the size of the stream that would hold the externalized form of the object.
-
numberOfFields()
- Return the number of Fields in the group.
-
put(PrefField)
- Adds a field to this group.
-
readObject(StreamInputInterface)
- Internalizes this group.
-
showme(PrefFrame)
- This method adds to a frame the components of the group.
-
update()
- Apply the modification when the changes in a group are done.
-
writeObject(StreamOutputInterface)
- Externalizes this group object.
groupName
public String groupName
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.
PrefGroup
public PrefGroup()
- preferences constructor used by newInstance(). This make nothing.
- Returns:
- empty object
getName
public String getName()
- Gives the name of that group.
- Returns:
- the stringname.
getLabel
public String getLabel()
- Gives the label for that group.
- Returns:
- the string representing the label.
numberOfFields
public int numberOfFields()
- Return the number of Fields in the group.
- Returns:
- the number of fields in this group.
fieldsList
public Enumeration fieldsList()
- Returns every field's name in this group.
- Returns:
- Enumeration of fields.
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.
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.
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.
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.
isModified
public boolean isModified()
- Returns true if a field has been modified since last update.
- Returns:
- true iff there exists a field modified.
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
cancel
public void cancel()
- Cancel user's modifications by setting each field back to their intial value.
- Returns:
- none.
myStreamSize
public int myStreamSize() throws StreamIOException
- Returns the size of the stream that would hold the externalized form of the object.
- Returns:
- the size of the stream in bytes
- See Also:
- Streamable
readObject
public void readObject(StreamInputInterface stream) throws StreamIOException
- Internalizes this group.
- Parameters:
- stream - is the stream of data the object state is retrieved from
- Returns:
- none.
- See Also:
- Streamable
writeObject
public void writeObject(StreamOutputInterface stream) throws StreamIOException
- Externalizes this group object.
- Parameters:
- stream - is the stream of data the object state is recorded in
- Returns:
- none
- See Also:
- Streamable
All Packages Class Hierarchy This Package Previous Next Index