|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.dataselectors.filters.FilterValueFormatter
public class FilterValueFormatter
Method Summary | |
---|---|
java.lang.StringBuffer |
format(java.lang.Object obj,
java.lang.StringBuffer toAppendTo,
java.text.FieldPosition pos)
|
static FilterValueFormatter |
getInstance()
Returns a FilterValueFormatter that doesn't show unformatted values for the default locale. |
static FilterValueFormatter |
getInstance(java.util.Locale inLocale)
Returns a FilterValueFormatter that doesn't show unformatted values for the specified locale. |
static FilterValueFormatter |
getInstance(java.util.Locale inLocale,
boolean showUnformattedValues)
Returns a FilterValueFormatter for the specified locale. |
java.lang.String |
getNullValueText()
|
static java.lang.String |
getPromptDescription(com.sas.iquery.metadata.business.Prompt prompt,
com.sas.iquery.metadata.business.BusinessQuery businessQuery,
java.lang.String formatString,
java.util.Locale locale)
Returns the description of the specified prompt using the specified format string. |
java.lang.String |
getPromptFormatString()
|
protected java.lang.String |
getPromptValues(com.sas.iquery.metadata.business.Prompt promptValue)
Deprecated. use FilterValueFormatter.getPromptValues(prompt, businessQuery, locale) instead |
java.lang.String |
getUnformattedValueFormatString()
Returns the format string to use when both the formatted and unformatted values are shown. |
boolean |
isUnformattedValuesShown()
Returns true if unformatted filter values are shown (when available), false if not shown. |
java.lang.Object |
parseObject(java.lang.String source,
java.text.ParsePosition pos)
|
void |
setBusinessQuery(com.sas.iquery.metadata.business.BusinessQuery businessQuery)
|
void |
setNullValueText(java.lang.String nullValueText)
Sets the string to show for null filter values. |
void |
setPromptFormatString(java.lang.String promptFormatString)
|
void |
setShowUnformattedValues(boolean showUnformattedValues)
If set to true then unformatted values will be shown along with formatted values when these values differ. |
void |
setUnformattedValueFormatString(java.lang.String unformattedValuesShownFormatString)
Sets the format string to use when showUnformattedValues is true and the formatted and unformatted values are different. |
Method Detail |
---|
public static FilterValueFormatter getInstance()
public static FilterValueFormatter getInstance(java.util.Locale inLocale)
inLocale
- the given locale
public static FilterValueFormatter getInstance(java.util.Locale inLocale, boolean showUnformattedValues)
showUnformattedValues
is false, then the
FilterValueFormatter will not show unformatted filter values, unless there is no formatted value available and the unformatted
value is the only available value. If showUnformattedValues
is true, then unformatted filter values are shown.
If both the formatted and unformatted values are the same, then only one value is shown.
inLocale
- the given localeshowUnformattedValues
- specifies whether this FilterValueFormatter will display unformatted filter values
public void setShowUnformattedValues(boolean showUnformattedValues)
If false, then unformatted values are not shown unless there is no formatted value.
showUnformattedValues
- indicates if unformatted values should be shown along with the formatted valuespublic void setNullValueText(java.lang.String nullValueText)
nullValueText
- the string to show for null filter valuespublic java.lang.String getNullValueText()
public void setPromptFormatString(java.lang.String promptFormatString)
public java.lang.String getPromptFormatString()
public void setUnformattedValueFormatString(java.lang.String unformattedValuesShownFormatString)
unformattedValuesShownFormatString
- public java.lang.String getUnformattedValueFormatString()
public boolean isUnformattedValuesShown()
public void setBusinessQuery(com.sas.iquery.metadata.business.BusinessQuery businessQuery)
public java.lang.StringBuffer format(java.lang.Object obj, java.lang.StringBuffer toAppendTo, java.text.FieldPosition pos)
format
in class java.text.Format
public java.lang.Object parseObject(java.lang.String source, java.text.ParsePosition pos)
parseObject
in class java.text.Format
public static java.lang.String getPromptDescription(com.sas.iquery.metadata.business.Prompt prompt, com.sas.iquery.metadata.business.BusinessQuery businessQuery, java.lang.String formatString, java.util.Locale locale)
formatString
specifies the format used to describe the prompt. The following parameters
may be used in the format string:
formatString
of "{2}" will be used if a null value is passed in. This will result in only the
prompt values being used in the description and not the prompt name or label.
prompt
- the prompt to return the description forbusinessQuery
- the BusinessQuery containing the promptformatString
- the format string used to describe the promptlocale
- the Locale to use when describing the prompt
protected java.lang.String getPromptValues(com.sas.iquery.metadata.business.Prompt promptValue)
promptValue
- the prompt to return the current prompt values for
|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |