|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.servlet.tbeans.html.AppliedFilters
public class AppliedFilters
The AppliedFilters is a TransformationBean that generates the appropriate HTML 4.0 to represent the filters applied to the given model.
Note that the toString() method on this class calls the write
method, which may have undesirable side effects. See BaseTransformation.toString() for more information. Debuggers often use toString() to show the value of a variable, and this may cause unexpected behavior while debugging
Field Summary | |
---|---|
static boolean |
IGNORE_ANCESTOR_STEP_FILTERS
Indicates if step filters parents of the specified model should be reported. |
static java.lang.String |
RB_KEY
|
static int |
TITLE_ALWAYS
|
static int |
TITLE_NEVER
|
static int |
TITLE_WHEN_FILTERS
|
Fields inherited from interface com.sas.servlet.tbeans.html.AppliedFiltersStyleKeysInterface |
---|
APPLIEDFILTERS_DIV, APPLIEDFILTERS_FILTER_EXPRESSION, APPLIEDFILTERS_LABEL, APPLIEDFILTERS_LOGICAL_OPERATOR, APPLIEDFILTERS_TITLE |
Constructor Summary | |
---|---|
AppliedFilters()
Constructs a new AppliedFilter Transformation Bean |
|
AppliedFilters(java.lang.String id)
Constructs a new AppliedFilter Transformation Bean with the specified id. |
Method Summary | |
---|---|
java.lang.String |
getAppliedFilters(java.lang.Object filterModel)
Returns a String representation of the filters applied to the model. |
java.lang.String |
getConditionFormatType()
Returns AppliedFiltersUtil.CONDITION_FORMAT_SYMBOL if conditions should be written out as symbols, or AppliedFiltersUtil.CONDITION_FORMAT_TEXT if conditions should be written out as words. |
java.util.Map |
getCustomFormatMap()
Returns a Map containing custom formats used to format filter expressions. |
java.lang.String |
getLabelSeparator()
|
java.lang.Object |
getModel()
Return the model for the AppliedFilters. |
java.lang.String |
getNoAppliedFiltersText()
Returns the text that is displayed if no filters are applied to the model and noFilterTextDisplayed is true. |
com.sas.util.transforms.TransformInterface |
getRelationalFilterTextTransform()
Returns the TransformInterface object used to transform text returned from AppliedFiltersUtil.getRelationalFilters method. |
java.text.Format |
getRelationalFilterValueFormatter()
Returns the Format object used to format relational filter values. |
java.util.Map |
getStyleMap()
Returns the component styles used for this component. |
java.lang.String |
getTitle()
Returns the title. |
int |
getTitleDisplayed()
Determines if the title should be written out. |
boolean |
isNoFilterTextDisplayed()
Indicates if the value of noFilterText is displayed when no filters have been applied to the model. |
boolean |
isParentFiltersDisplayed()
Returns true if the filters of the parent model should be displayed, false otherwise. |
boolean |
isTextWrapped()
Returns true if relational filters should be written out concatenated together with the text wrapped or false if they should be written out indented and formatted to represent the grouping of the filters. |
void |
setConditionFormatType(java.lang.String conditionFormatType)
If conditions should be written out as symbols then conditionFormatType should be set to AppliedFiltersUtil.CONDITION_FORMAT_SYMBOL. |
void |
setCustomFormatMap(java.util.Map customFormats)
Sets a Map that contains custom string formats to format filter expressions. |
void |
setLabelSeparator(java.lang.String labelSeparator)
|
protected void |
setLocaleDependentProperties(java.util.Locale locale)
Sets the locale dependent properties. |
void |
setModel(java.lang.Object model)
Sets the model for the AppliedFilter. |
void |
setNoAppliedFiltersText(java.lang.String noFilterText)
Sets the text that is displayed if no filters are applied to the model and noFilterTextDisplayed is true. |
void |
setNoFilterTextDisplayed(boolean isNoFilterTextDisplayed)
Indicates if the value of noFilterText is displayed when no filters have been applied to the model. |
void |
setParentFiltersDisplayed(boolean parentFiltersDisplayed)
Determines if the filters from the model's parents are displayed. |
void |
setRelationalFilterTextTransform(com.sas.util.transforms.TransformInterface transform)
Specifies the TransformInterface object used to transform text returned from AppliedFiltersUtil.getRelationalFilters method. |
void |
setRelationalFilterValueFormatter(java.text.Format formatter)
Specifies the Format object to use to format relational filter values. |
void |
setTextWrapped(boolean textWrapped)
Determines if relational filters should be written out concatenated together with the text wrapped or if they should be indented and formatted to represent the grouping of the filters. |
void |
setTitle(java.lang.String title)
Sets the title. |
void |
setTitleDisplayed(int isTitleDisplayed)
If true then the title is written out prior to the applied filters. |
void |
write(java.io.PrintWriter out)
Writes the transformed representation of the AppliedFilters object. |
Field Detail |
---|
public static final java.lang.String RB_KEY
public static final int TITLE_ALWAYS
public static final int TITLE_NEVER
public static final int TITLE_WHEN_FILTERS
public static boolean IGNORE_ANCESTOR_STEP_FILTERS
Constructor Detail |
---|
public AppliedFilters()
public AppliedFilters(java.lang.String id)
Method Detail |
---|
public java.lang.Object getModel()
public void setModel(java.lang.Object model)
The AppliedFilters component will write out filters applied to a com.sas.iquery.metadata.business.DataSelection or a com.sas.iquery.intelligentquery.BusinessQueryProviderInterface.
model
- the model for the AppliedFilter componentpublic void setTitle(java.lang.String title)
titleDisplayed
property is true.
title
- the String to be written out prior to the filters when the titleDisplayed
property is truegetTitle()
,
setTitleDisplayed(int)
public java.lang.String getTitle()
titleDisplayed
property is true.
setTitle(java.lang.String)
public void setTitleDisplayed(int isTitleDisplayed)
isTitleDisplayed
- true if the title should be written out, false otherwise#isTitleDiplayed
,
setTitle(java.lang.String)
public int getTitleDisplayed()
setTitleDisplayed(int)
,
getTitle()
public void setNoAppliedFiltersText(java.lang.String noFilterText)
noFilterTextDisplayed
is true. The
default value is "None".
noFilterText
- the text that is displayed if no filters are applied to the model and noFilterTextDisplayed
is truegetNoAppliedFiltersText()
public java.lang.String getNoAppliedFiltersText()
noFilterTextDisplayed
is true. The
default value is "None".
noFilterTextDisplayed
is true.setNoAppliedFiltersText(java.lang.String)
public void setNoFilterTextDisplayed(boolean isNoFilterTextDisplayed)
noFilterText
is displayed when no filters have been applied to the model. No text is
displayed if isNoFilterTextDisplayed
is false. If set to true, the the value of noFilterText
is displayed.
isNoFilterTextDisplayed
,
setNoAppliedFiltersText(java.lang.String)
public boolean isNoFilterTextDisplayed()
noFilterText
is displayed when no filters have been applied to the model. No text is
displayed is the value is false. If true, value of noFilterText
is displayed.
noFilterText
is displayed when no filters have been applied, false if no text is displayed.setNoFilterTextDisplayed(boolean)
public void setTextWrapped(boolean textWrapped)
textWrapped
- true if relational filters should be written out wrapped, false if they should be formatted to represent groupingsisTextWrapped()
public boolean isTextWrapped()
setTextWrapped(boolean)
public void setParentFiltersDisplayed(boolean parentFiltersDisplayed)
parentFiltersDisplayed
- true if the filters of the parent model should be displayed, false otherwiseisParentFiltersDisplayed()
public boolean isParentFiltersDisplayed()
setParentFiltersDisplayed(boolean)
public void setConditionFormatType(java.lang.String conditionFormatType)
conditionFormatType
should be set to AppliedFiltersUtil.CONDITION_FORMAT_SYMBOL.
If conditions should be written out as words then conditionFormatType
should be set to AppliedFiltersUtil.CONDITION_FORMAT_TEXT.
Valid values are AppliedFiltersUtil.CONDITION_FORMAT_SYMBOL or AppliedFiltersUtil.CONDITION_FORMAT_TEXT. An IllegalArgumentException is
thrown if conditionFormatType
is not one of these values.
conditionFormatType
- a String constant indicating if filter condtions should be written out as symbols or wordsgetConditionFormatType()
public java.lang.String getConditionFormatType()
setConditionFormatType(java.lang.String)
public void setLabelSeparator(java.lang.String labelSeparator)
public java.lang.String getLabelSeparator()
public void setCustomFormatMap(java.util.Map customFormats)
customFormats
Map should be one of the format keys found in com.sas.swing.models.AppliedFiltersUtil. The values
to these keys should be String formats that will be used to format the filter expression using the java.text.MessageFormat class.
The default formats used are dependant on the value of the conditionFormatType property.
customFormats
- Map containing custom formats used to format filter expressionsgetCustomFormatMap()
public java.util.Map getCustomFormatMap()
setCustomFormatMap(java.util.Map)
public java.text.Format getRelationalFilterValueFormatter()
setRelationalFilterValueFormatter(java.text.Format)
public void setRelationalFilterValueFormatter(java.text.Format formatter)
formatter
- the Format object used to format relational filter valuesgetRelationalFilterValueFormatter()
,
FilterValueFormatter.getInstance(Locale, boolean)
public com.sas.util.transforms.TransformInterface getRelationalFilterTextTransform()
setRelationalFilterTextTransform(com.sas.util.transforms.TransformInterface)
public void setRelationalFilterTextTransform(com.sas.util.transforms.TransformInterface transform)
transform
- the TransformInterface object used to transform relational filter textgetRelationalFilterTextTransform()
public void write(java.io.PrintWriter out) throws java.io.IOException
write
in interface TransformationInterface
write
in interface com.sas.util.WriteToPrintWriterInterface
write
in class BaseTransformation
out
- The output stream
java.io.IOException
- Thrown if some type of I/O error occurspublic java.lang.String getAppliedFilters(java.lang.Object filterModel)
protected void setLocaleDependentProperties(java.util.Locale locale)
BaseTransformation
setLocaleDependentProperties
in class BaseTransformation
public java.util.Map getStyleMap()
getStyleMap
in interface ComplexStyleInterface
|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |