Class semper.preferences.PrefFieldChoice
All Packages Class Hierarchy This Package Previous Next Index
Class semper.preferences.PrefFieldChoice
java.lang.Object
|
+----semper.preferences.PrefField
|
+----semper.preferences.PrefFieldChoice
- public class PrefFieldChoice
- extends PrefField
-
PrefFieldChoice()
-
-
PrefFieldChoice(String, String)
- Constructor for an empty choice with defaults constraints.
-
PrefFieldChoice(String, String, GridBagConstraints)
- Constructor for an empty choice.
-
addChoice(String)
- This allows to add a new string for the possible choices.
-
applyModification()
- Applies the modification by loading the new value in the current value.
-
cancel()
- the appearance of that field returns to it's initial value.
-
getSelectedItem()
- This returns the string corresponding to the selected index.
-
getValue()
- Return the actual value for that field.
-
isModified()
- Indicates if the field has been changed by the user during interactive edition.
-
isOK()
- Returns whether the value selected by the user is valid.
-
myStreamSize()
- Returns the size of the stream that would hold the externalized form of this field.
-
readObject(StreamInputInterface)
- Internalizes this field.
-
setValue(int)
-
-
setValue(Integer)
-
-
setValue(Object)
- Allows to set the value for that field.
-
showme(PrefFrame)
- This adds the approriate choice to a frame.
-
writeObject(StreamOutputInterface)
- Externalizes this field.
PrefFieldChoice
public PrefFieldChoice(String fieldname,
String chLabel,
GridBagConstraints constraints)
- Constructor for an empty choice.
- Parameters:
- fieldname - is the string by which this component is accessed through the preferences manager.
- chLabel - is the string appearing at the right of the choice component.
- constraints - is the set of GridBagConstraints for that component.
- Returns:
- the new empty object.
- See Also:
- GridBagConstraints
PrefFieldChoice
public PrefFieldChoice(String fieldname,
String chLabel)
- Constructor for an empty choice with defaults constraints.
- Parameters:
- fieldname - is the string by which this component is accessed through the preferences manager.
- chLabel - is the string appearing at the right of the choice component.
- Returns:
- the new empty object.
- See Also:
- GridBagConstraints
PrefFieldChoice
public PrefFieldChoice()
addChoice
public void addChoice(String item)
- This allows to add a new string for the possible choices.
- Parameters:
- item - is the string describing this choice
- Returns:
- none.
showme
public void showme(PrefFrame p)
- This adds the approriate choice to a frame.
- Parameters:
- p - is the frame where the object will be shown.
- Returns:
- none.
- Overrides:
- showme in class PrefField
getValue
public Object getValue()
- Return the actual value for that field.
- Overrides:
- getValue in class PrefField
getSelectedItem
public String getSelectedItem()
- This returns the string corresponding to the selected index.
- Returns:
- none.
- See Also:
- Choice
setValue
public void setValue(Object newval)
- Allows to set the value for that field.
- Overrides:
- setValue in class PrefField
setValue
public void setValue(int newval)
setValue
public void setValue(Integer newval)
isModified
public boolean isModified()
- Indicates if the field has been changed by the user during interactive edition.
- Overrides:
- isModified in class PrefField
applyModification
public boolean applyModification()
- Applies the modification by loading the new value in the current value.
- Overrides:
- applyModification in class PrefField
isOK
public boolean isOK()
- Returns whether the value selected by the user is valid.
- Overrides:
- isOK in class PrefField
cancel
public void cancel()
- the appearance of that field returns to it's initial value.
- Overrides:
- cancel in class PrefField
myStreamSize
public int myStreamSize() throws StreamIOException
- Returns the size of the stream that would hold the externalized form of this field.
- Returns:
- the size of the stream in bytes
- Overrides:
- myStreamSize in class PrefField
- See Also:
- Streamable
readObject
public void readObject(StreamInputInterface stream) throws StreamIOException
- Internalizes this field.
- Parameters:
- stream - is the stream of data the object state is retrieved from
- Returns:
- none.
- Overrides:
- readObject in class PrefField
- See Also:
- Streamable
writeObject
public void writeObject(StreamOutputInterface stream) throws StreamIOException
- Externalizes this field.
- Parameters:
- stream - is the stream of data the object state is recorded in
- Returns:
- none
- Overrides:
- writeObject in class PrefField
- See Also:
- Streamable
All Packages Class Hierarchy This Package Previous Next Index