|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.prompts.definitions.DoubleRangeDefinition
public class DoubleRangeDefinition
DoubleRangeDefinition is a prompt type which allows the specification of a range of double values by specifying minimum and maximum values for the range.
Field Summary | |
---|---|
static java.lang.String |
RB_KEY
|
Constructor Summary | |
---|---|
DoubleRangeDefinition()
Constructor |
|
DoubleRangeDefinition(java.lang.String promptName)
Constructor |
Method Summary | |
---|---|
void |
configureAttributes(java.util.Map options,
java.util.Map context)
|
java.util.List |
getAttributeDescriptors(java.util.Locale locale)
|
protected java.util.Map<java.lang.String,java.lang.String> |
getConstraints(java.util.Locale locale)
|
protected java.lang.String |
getDefaultMaxLabel(java.util.Locale locale)
Returns the default label for the maximum field when one is not set by the user. |
protected java.lang.String |
getDefaultMinLabel(java.util.Locale locale)
Returns the default label for the minimum field when one is not set by the user. |
double |
getMaximum()
Returns the maximum allowed value for the prompt. |
int |
getMaximumDecimalPlaces()
Returns the maximum number of decimal places the user can enter for the prompt value |
double |
getMinimum()
Returns the minimum allowed value for the prompt. |
int |
getMinimumDecimalPlaces()
Returns the minimum number of decimal places presented to he user when the value of the prompt is displayed. |
com.sas.datatypes.DataTypeInterface |
getPromptDataType()
Returns an instance of com.sas.datatypes.DoubleRangeType that can be used to process values for this prompt. |
java.util.Collection<ValidationEntry> |
getPromptValueValidationErrors(java.lang.Object value,
java.util.Locale locale)
Returns a Collection containing the set of ValidationEntry objects or an empty
collection if no errors were found. |
boolean |
isPromptValueValid(java.lang.Object value,
java.util.Locale locale)
Returns whether the specified value meets the constraints on the prompt definition. |
void |
setMaximum(double maximum)
Sets the maximum allowed value for the prompt. |
void |
setMaximumDecimalPlaces(int maxDecimalPlaces)
Sets the maximum number of decimal places the user can enter for the prompt value |
void |
setMinimum(double minimum)
Sets the minimum allowed value for the prompt. |
void |
setMinimumDecimalPlaces(int minDecimalPlaces)
Sets the minimum number of decimal places presented to he user when the value of the prompt is displayed. |
java.util.Collection<ValidationEntry> |
validateDefinition(java.util.Locale locale)
This method is used to validate that the various attributes of the definition all contain valid values. |
Methods inherited from class com.sas.prompts.definitions.BaseDefinitionRange |
---|
getMaxLabel, getMaxLabels, getMinLabel, getMinLabels, isRequired, populateErrorsForMinMax, populateMapWithErrorsForValue, setMaxLabel, setMaxLabels, setMinLabel, setMinLabels, setRequired |
Methods inherited from interface com.sas.prompts.definitions.PromptDefinitionInterface |
---|
clearDefaultValue, getDefaultValue, getPromptDescription, getPromptDescriptions, getPromptLabel, getPromptLabels, getPromptName, getUserInfo, isDefaultValueSet, isFixed, isHidden, isPromptValueValid |
Methods inherited from interface com.sas.prompts.definitions.MutableRequiredDefinitionInterface |
---|
setRequired |
Field Detail |
---|
public static final java.lang.String RB_KEY
Constructor Detail |
---|
public DoubleRangeDefinition()
public DoubleRangeDefinition(java.lang.String promptName)
Method Detail |
---|
protected java.lang.String getDefaultMaxLabel(java.util.Locale locale)
getDefaultMaxLabel
in class BaseDefinitionRange
locale
- The locale the retrieve the label for
protected java.lang.String getDefaultMinLabel(java.util.Locale locale)
getDefaultMinLabel
in class BaseDefinitionRange
locale
- The locale the retrieve the label for
public double getMinimum()
getMinimum
in interface com.sas.prompts.definitions.DoubleRangeDefinitionInterface
public void setMinimum(double minimum)
setMinimum
in interface com.sas.prompts.definitions.MutableDoubleRangeDefinitionInterface
minimum
- the minimum allowed value for the prompt.public double getMaximum()
getMaximum
in interface com.sas.prompts.definitions.DoubleRangeDefinitionInterface
public void setMaximum(double maximum)
setMaximum
in interface com.sas.prompts.definitions.MutableDoubleRangeDefinitionInterface
maximum
- the minimum allowed value for the prompt.public void setMinimumDecimalPlaces(int minDecimalPlaces)
setMinimumDecimalPlaces
in interface com.sas.prompts.definitions.MutableDoubleRangeDefinitionInterface
minimumDecimalPlaces
- the minimum number of decimal places presented to he userpublic void setMaximumDecimalPlaces(int maxDecimalPlaces)
setMaximumDecimalPlaces
in interface com.sas.prompts.definitions.MutableDoubleRangeDefinitionInterface
maximumDecimalPlaces
- the maximum number of decimal places the user can enterpublic int getMinimumDecimalPlaces()
getMinimumDecimalPlaces
in interface com.sas.prompts.definitions.DoubleRangeDefinitionInterface
getMinimumDecimalPlaces
in interface com.sas.util.macrovar.MacroVariableDecimalValueOptionInterface
public int getMaximumDecimalPlaces()
getMaximumDecimalPlaces
in interface com.sas.prompts.definitions.DoubleRangeDefinitionInterface
public boolean isPromptValueValid(java.lang.Object value, java.util.Locale locale)
isPromptValueValid
in interface com.sas.prompts.definitions.PromptDefinitionV2Interface
isPromptValueValid
in class PromptDefinition
value
- The value to check for validity.
PromptDefinitionInterface.isPromptValueValid(Object)
public java.util.Collection<ValidationEntry> getPromptValueValidationErrors(java.lang.Object value, java.util.Locale locale)
ValidationEntry
objects or an empty
collection if no errors were found.
getPromptValueValidationErrors
in interface PromptDefinitionInterface
getPromptValueValidationErrors
in class PromptDefinition
value
- The value to check for errorslocale
- The locale to return the error messages in
ValidationEntry
objects or an empty
collection if no errors were found.PromptDefinitionInterface.getPromptValueValidationErrors(Object, Locale)
public java.util.Collection<ValidationEntry> validateDefinition(java.util.Locale locale)
ValidationEntry
objects
for each error. This method should be called before the definition is to be used.
Subclasses should override this method to return the appropriate validation errors.
validateDefinition
in interface PromptDefinitionInterface
validateDefinition
in class PromptDefinition
locale
- The locale to return the error messages in
ValidationEntry
objects or an empty
collection if no errors were found.PromptDefinitionInterface.validateDefinition(Locale)
public com.sas.datatypes.DataTypeInterface getPromptDataType()
getPromptDataType
in interface PromptDefinitionInterface
getPromptDataType
in class PromptDefinition
PromptDefinitionInterface.getPromptDataType()
public java.util.List getAttributeDescriptors(java.util.Locale locale)
getAttributeDescriptors
in interface com.sas.util.AttributeDescription
getAttributeDescriptors
in class BaseDefinitionRange
public void configureAttributes(java.util.Map options, java.util.Map context)
configureAttributes
in interface com.sas.util.AttributeConfigurationInterface
configureAttributes
in class BaseDefinitionRange
protected java.util.Map<java.lang.String,java.lang.String> getConstraints(java.util.Locale locale)
getConstraints
in class PromptDefinition
|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |