|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.interview.PropertiesQuestion.ValueConstraints
com.sun.interview.PropertiesQuestion.FloatConstraints
public static class PropertiesQuestion.FloatConstraints
Constraints specifying a floating point type.
Field Summary | |
---|---|
protected boolean |
custom
Is the user allowed to supply their own value or are they required to use one of the suggestions? |
protected float[] |
suggestions
Current value set for the suggested response values. |
Constructor Summary | |
---|---|
PropertiesQuestion.FloatConstraints()
|
|
PropertiesQuestion.FloatConstraints(float[] suggestions)
Construct with suggestions for the user. |
|
PropertiesQuestion.FloatConstraints(float min,
float max)
|
|
PropertiesQuestion.FloatConstraints(float min,
float max,
float[] suggestions)
Construct with both min, max and suggested values. |
Method Summary | |
---|---|
float |
getLowerBound()
Get the lower bound which specifies the minimum possible value to be considered a valid response from the user. |
float |
getResolution()
Get the resolution for responses to this question. |
float[] |
getSuggestions()
Get the suggested values. |
float |
getUpperBound()
Get the upper bound which specifies the maximum possible value to be considered a valid response from the user. |
boolean |
isCustomValuesAllowed()
Are custom user values allowed? |
java.lang.String |
isValid(float v)
Is the given value valid for this field? |
java.lang.String |
isValid(java.lang.String v)
Is the given value valid for this field? The basic check for validity is to see if the given string can be parsed as an floating point value in the current locale. |
void |
setBounds(float min,
float max)
Set the max/min possible value that should be considered valid. |
void |
setCustomValuesAllowed(boolean state)
Are user specified values allowed? If not, there must be suggestions present. |
void |
setResolution(float resolution)
Set the resolution for responses to this question. |
void |
setSuggestions(float[] sugs)
Supply some possible values that the user may want to select from. |
Methods inherited from class com.sun.interview.PropertiesQuestion.ValueConstraints |
---|
isReadOnly, isUnsetAllowed, isVisible, setReadOnly, setUnsetAllowed, setVisible |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected float[] suggestions
setSuggestions(float[])
,
getSuggestions()
protected boolean custom
Constructor Detail |
---|
public PropertiesQuestion.FloatConstraints()
public PropertiesQuestion.FloatConstraints(float min, float max)
min
- Minimum valid response value.max
- Maximum valid response valuesetBounds(float, float)
public PropertiesQuestion.FloatConstraints(float[] suggestions)
suggestions
- Values to suggest to the user. Array should be
of length greater than zero.public PropertiesQuestion.FloatConstraints(float min, float max, float[] suggestions)
min
- Minimum valid response value.max
- Maximum valid response valuesuggestions
- Values to suggest to the user. Array should be
of length greater than zero.getSuggestions()
Method Detail |
---|
public void setBounds(float min, float max)
min
- Minimum valid response value.max
- Maximum valid response value.public float getLowerBound()
public float getUpperBound()
public float[] getSuggestions()
setSuggestions(float[])
public void setCustomValuesAllowed(boolean state)
java.lang.IllegalStateException
- If no suggestions have been
provided.setSuggestions(float[])
public boolean isCustomValuesAllowed()
setCustomValuesAllowed(boolean)
,
setSuggestions(float[])
public void setSuggestions(float[] sugs)
sugs
- Suggested values to present the user for this question.
Should be an array of length greater than zero.getSuggestions()
public void setResolution(float resolution)
resolution
- the resolution for responses to this questiongetResolution()
,
PropertiesQuestion.setValue(java.lang.String)
public float getResolution()
setResolution(float)
,
PropertiesQuestion.setValue(java.lang.String)
public java.lang.String isValid(java.lang.String v)
isValid
in class PropertiesQuestion.ValueConstraints
v
- The value to check.
PropertiesQuestion.getInvalidKeys()
public java.lang.String isValid(float v)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |