com.sun.interview
Class PropertiesQuestion.StringConstraints

java.lang.Object
  extended by com.sun.interview.PropertiesQuestion.ValueConstraints
      extended by com.sun.interview.PropertiesQuestion.StringConstraints
Enclosing class:
PropertiesQuestion

public static class PropertiesQuestion.StringConstraints
extends PropertiesQuestion.ValueConstraints


Field Summary
protected  boolean custom
           
protected  int nominalMaxLength
          The nominal maximum length for the string.
protected  java.lang.String[] suggestions
           
 
Constructor Summary
PropertiesQuestion.StringConstraints()
           
PropertiesQuestion.StringConstraints(int maxLen)
           
PropertiesQuestion.StringConstraints(java.lang.String[] suggestions)
           
PropertiesQuestion.StringConstraints(java.lang.String[] suggestions, int maxLen)
           
 
Method Summary
 int getNominalMaxLength()
          Get the nominal maximum length for the string.
 java.lang.String[] getSuggestions()
           
 boolean isCustomValuesAllowed()
          Are custom user values allowed?
 void setCustomValuesAllowed(boolean state)
          Are user specified values allowed? If not, there must be suggestions present.
 void setNominalMaxLength(int nominalMaxLength)
          Set the expected maximum length for the string.
 void setSuggestions(java.lang.String[] sugs)
          Supply some possible values that the user may want to select from.
 
Methods inherited from class com.sun.interview.PropertiesQuestion.ValueConstraints
isReadOnly, isUnsetAllowed, isValid, isVisible, setReadOnly, setUnsetAllowed, setVisible
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

suggestions

protected java.lang.String[] suggestions

custom

protected boolean custom

nominalMaxLength

protected int nominalMaxLength
The nominal maximum length for the string.

Constructor Detail

PropertiesQuestion.StringConstraints

public PropertiesQuestion.StringConstraints()

PropertiesQuestion.StringConstraints

public PropertiesQuestion.StringConstraints(java.lang.String[] suggestions)

PropertiesQuestion.StringConstraints

public PropertiesQuestion.StringConstraints(int maxLen)

PropertiesQuestion.StringConstraints

public PropertiesQuestion.StringConstraints(java.lang.String[] suggestions,
                                            int maxLen)
Method Detail

setSuggestions

public void setSuggestions(java.lang.String[] sugs)
Supply some possible values that the user may want to select from.


getSuggestions

public java.lang.String[] getSuggestions()

setCustomValuesAllowed

public void setCustomValuesAllowed(boolean state)
Are user specified values allowed? If not, there must be suggestions present.

Throws:
java.lang.IllegalStateException - If no suggestions have been provided.
See Also:
#setSuggestion

isCustomValuesAllowed

public boolean isCustomValuesAllowed()
Are custom user values allowed?

See Also:
setCustomValuesAllowed(boolean), setSuggestions(java.lang.String[])

getNominalMaxLength

public int getNominalMaxLength()
Get the nominal maximum length for the string.

Returns:
the nominal maximum length for the string.
See Also:
setNominalMaxLength(int)

setNominalMaxLength

public void setNominalMaxLength(int nominalMaxLength)
Set the expected maximum length for the string.

Parameters:
nominalMaxLength - the nominal maximum length for the string.
See Also:
getNominalMaxLength()


Copyright 1996-2008 Sun Microsystems, Inc. All Rights Reserved.