All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class semper.preferences.PrefFieldLabel

java.lang.Object
   |
   +----semper.preferences.PrefField
           |
           +----semper.preferences.PrefFieldLabel

public class PrefFieldLabel
extends PrefField
A label field is only a information string with _NO_ input/output facilities. This is used to put some information text in a preferences group.

Version:
$Revision: 1.14 $ $Date: 1997/09/26 16:29:30 $
Author:
Louis Salvail (CWI)
See Also:
PrefFieldString, PrefFieldChoice, PrefFieldNegotiable, PrefFieldCheckBox

Constructor Index

 o PrefFieldLabel()
Contructor used by newInstance for internalization.
 o PrefFieldLabel(String, String)
Constructor for strings fields with defaults constraints.
 o PrefFieldLabel(String, String, GridBagConstraints)
Constructor for strings fields.

Method Index

 o applyModification()
No user modification are possible on a label field.
 o cancel()
This method does nothing because the user cannot change a PrefFieldLabel, so no cancel is needed.
 o getValue()
this method returns the String for that label.
 o isModified()
A label field is never modified so this method return always false.
 o isOK()
A label is always ok because it is never modified by the user.
 o setAlignement(int)
This sets the font for that label.
 o setValue(Object)
Can be used to change the label.
 o showme(PrefFrame)
This adds the label to the given frame.

Constructors

 o PrefFieldLabel
 public PrefFieldLabel(String fieldname,
                       String theText,
                       GridBagConstraints constraint)
Constructor for strings fields. None of the input parameters should be null.

Parameters:
fieldname - is the string by which this component is accessed through the preferences manager.
theText - is the text for that label.
constraints - is the set of GridBagConstraints for that component. The internal constraints representation is a clone of the input.
Returns:
the new object.
See Also:
GridBagConstraints, Label
 o PrefFieldLabel
 public PrefFieldLabel(String fieldname,
                       String theText)
Constructor for strings fields with defaults constraints. None of the input paramaters should be null.

Parameters:
fieldname - is the string by which this component is accessed through the preferences manager.
theText - is the text for that label.
Returns:
the new object with the appropriate text.
See Also:
GridBagConstraints, Label
 o PrefFieldLabel
 public PrefFieldLabel()
Contructor used by newInstance for internalization.

Returns:
a new empty object.

Methods

 o showme
 public void showme(PrefFrame p)
This adds the label to the given frame.

Parameters:
p - is the frame in which the label is added.
Returns:
none.
Overrides:
showme in class PrefField
 o getValue
 public Object getValue()
this method returns the String for that label.

Returns:
the string.
Overrides:
getValue in class PrefField
 o setValue
 public void setValue(Object newval)
Can be used to change the label.

Parameters:
newval - is the new string. This should be a String object.
Returns:
none.
Overrides:
setValue in class PrefField
 o setAlignement
 public void setAlignement(int a)
This sets the font for that label.

Parameters:
f - is the font.
a - is the alignment.
Returns:
none. public void setFont(Font f){ appearance.setFont(f); } /** This to set the algnement. Not implemented yet.
See Also:
Label
 o isModified
 public boolean isModified()
A label field is never modified so this method return always false.

Returns:
false.
Overrides:
isModified in class PrefField
 o applyModification
 public boolean applyModification()
No user modification are possible on a label field.

Returns:
true because the no-modification is always accepted.
Overrides:
applyModification in class PrefField
 o cancel
 public void cancel()
This method does nothing because the user cannot change a PrefFieldLabel, so no cancel is needed.

Returns:
none.
Overrides:
cancel in class PrefField
 o isOK
 public boolean isOK()
A label is always ok because it is never modified by the user.

Returns:
true.
Overrides:
isOK in class PrefField

All Packages  Class Hierarchy  This Package  Previous  Next  Index