com.sas.servlet.tbeans.dataselectors.filterandrank.html
Class FilterAndRankSelectorPanel

com.sas.servlet.tbeans.dataselectors.filterandrank.html.FilterAndRankSelectorPanel
All Implemented Interfaces:
HttpActionProviderInterface, com.sas.beans.PropertyChangeSource, com.sas.collection.ContentsChangedListener, com.sas.lang.ObjectDataInterface, com.sas.servlet.tbeans.AJAXControllerURLInterface, ComplexStyleInterface, CompositeComponentInterface, FilterAndRankSelectorKeysInterface, FilterAndRankSelectorStyleKeysInterface, FormViewInterface, RenderableInterface, TemplateInterface, com.sas.servlet.tbeans.TemplateKeyInterface, TransformationInterface, com.sas.util.WriteToPrintWriterInterface, java.beans.PropertyChangeListener, java.io.Serializable, java.util.EventListener

public class FilterAndRankSelectorPanel
implements FilterAndRankSelectorKeysInterface, FilterAndRankSelectorStyleKeysInterface, java.beans.PropertyChangeListener

The FilterAndRankSelectorPanel provides the construction and operation code for the "Filter and Rank" Selector. This selector allows users to construct both rankings and data-based filters for both columns and rows of an OLAP table.

See Also:
Serialized Form

Field Summary
protected  int browserType
           
static java.lang.String DEFAULT_FILTER_AND_RANK_SELECTOR_NAME
           
static java.lang.String DEFAULT_REMOTE_SCRIPT_URL
           
static java.lang.String DEFAULT_TEMPLATE_FILE_NAME
           
static java.lang.String RB_KEY
           
protected  Form remoteScriptForm
           
protected  java.lang.String remoteScriptURL
           
protected  FilterAndRankModelInterface selectorModel
           
 
Fields inherited from class com.sas.servlet.tbeans.dataselectors.BaseSelectorPanel
imageLocation, SELECTOR_EXPAND, SELECTOR_EXTERNAL
 
Fields inherited from interface com.sas.servlet.tbeans.dataselectors.filterandrank.html.FilterAndRankSelectorKeysInterface
FAR_BASED_ON, FAR_BASED_ON_LABEL, FAR_CLEAR_ALL_BUTTON, FAR_CLEAR_BUTTON, FAR_CURRENT_FILTERS, FAR_CURRENT_FILTERS_LABEL, FAR_FILTER_CONDITION, FAR_FILTER_CONDITION_LABEL, FAR_FILTER_ON, FAR_FILTER_ON_LABEL, FAR_FILTER_TYPE, FAR_FILTER_TYPE_LABEL, FAR_FILTER_VALUE, FAR_FILTER_VALUE_EDIT_BUTTON, FAR_FILTER_VALUE_LABEL, FAR_RANK_OPTION, FAR_RANK_ORDER, FAR_RANK_TYPE, FAR_RANK_VALUE
 
Fields inherited from interface com.sas.servlet.tbeans.dataselectors.filterandrank.html.FilterAndRankSelectorStyleKeysInterface
FILTERANDRANKSELECTOR_CHECKBOX, FILTERANDRANKSELECTOR_CHECKBOX_LABEL, FILTERANDRANKSELECTOR_CURRENT_FILTERS, FILTERANDRANKSELECTOR_FILTER_CONDITION_CHOICE, FILTERANDRANKSELECTOR_FILTER_VALUE_ENTRY, FILTERANDRANKSELECTOR_LABEL, FILTERANDRANKSELECTOR_LIST, FILTERANDRANKSELECTOR_RADIO, FILTERANDRANKSELECTOR_RADIO_LABEL, FILTERANDRANKSELECTOR_RANK_TYPE_CHOICE, FILTERANDRANKSELECTOR_RANK_VALUE_ENTRY, FILTERANDRANKSELECTOR_TEXT
 
Constructor Summary
FilterAndRankSelectorPanel()
          Constructs a new Filter and Rank selector panel.
FilterAndRankSelectorPanel(java.lang.String name)
          Constructs a new Filter and Rank selector panel with the given name.
 
Method Summary
protected  java.lang.String getBasedOn()
          Returns the text for the 'Based On' field.
protected  java.lang.String getConstructionJavaScript()
           
 java.util.Map getDefaultComponentMap()
          Constructs and returns the default component map for this selector.
 java.util.Map getDefaultStyleMap()
          Provides a mapping of style keys to the default values to be used by the components in this selector.
 java.util.HashMap getDefaultTemplateDictionary()
          Returns a map of additional template entries created/required by this selector.
protected  FilterAxisEnum getFilterAxis()
          Returns the filter axis currently set on the model.
 java.lang.String getRemoteScriptURL()
          Returns the URL used for processing the remote script form
 FilterTypeEnum getSelectedFilterType()
          Returns the filter type currently selected on the 'filter type' component.
 RankOrderEnum getSelectedRankOrder()
          Returns the rank order currently selected on the 'rank order' component.
 void propertyChange(java.beans.PropertyChangeEvent pce)
           
protected  boolean setButtonLabel(java.lang.String componentKey, java.lang.String propertyKey, java.util.Locale locale)
          Convenience method for applying text from a resource as the label for a button in the component map.
protected  boolean setCheckBoxModel(java.lang.String componentKey, Item model)
          Sets the model on the component at the given key.
protected  boolean setChoiceBoxModel(java.lang.String componentKey, javax.swing.ComboBoxModel model)
          Sets the model on the component at the given key.
protected  void setComponentValues()
          Sets the name and ID properties on select components.
protected  boolean setLabelText(java.lang.String componentKey, java.lang.String text)
          Convenience method for applying text from a resource to a label in the component map.
protected  boolean setLabelText(java.lang.String componentKey, java.lang.String propertyKey, java.util.Locale locale)
          Convenience method for applying text from a resource to a label in the component map.
protected  boolean setListBoxModel(java.lang.String componentKey, javax.swing.ListModel model)
          Sets the model on the component at the given key.
protected  void setLocaleDependentProperties(java.util.Locale locale)
          Sets the locale dependent properties.
protected  boolean setRadioModel(java.lang.String componentKey, javax.swing.ListModel model)
          Sets the model on the component at the given key.
 void setRemoteScriptURL(java.lang.String value)
          Sets the URL used for processing the remote script form
 void setSelectorModel(java.lang.Object selectormodel)
          Sets the selector's data model
 void write(java.io.PrintWriter out)
          Writes the custom attributes of the object.
protected  void writeSelectorForm(java.io.PrintWriter out, Form form)
           
 
Methods inherited from class com.sas.servlet.tbeans.dataselectors.html.SelectorPanel
close, getAdditionalParameters, getDefaultFormObject, getFormObject, getIframeName, isFormEnabled, setAdditionalParameter, setAdditionalParameters, setFormEnabled, setFormObject, setIframeName, writeRemoteScriptCommands, writeRemoteScriptFrame, writeSelectorPanelFooter, writeSelectorPanelHeader
 
Methods inherited from class com.sas.servlet.tbeans.dataselectors.BaseSelectorPanel
contentsChanged, getActionProvider, getCommandId, getImageLocation, getSelector, getSelectorModel, setActionProvider, setCommandId, setImageLocation, setSelector
 
Methods inherited from class com.sas.servlet.tbeans.BaseCompositeTransformation
applyTemplate, applyTemplate, getComponent, getComponents, getDefaultTemplate, getStyleInfo, getStyleMap, getTemplate, getTemplateDictionary, getTemplateFileName, getTemplateLocation, getVisibleComponents, isFlushEnabled, removeComponent, setCleanUpResourcesOn, setComponent, setFlushEnabled, setId, setLocale, setRequest, setResponse, setStyleInfo, setTemplate, setTemplate, setTemplateDictionary, setTemplateFileName, setTemplateLocation, writeTemplate
 
Methods inherited from class com.sas.servlet.tbeans.BaseTransformation
addPropertyChangeListener, addPropertyChangeListener, cleanUpResources, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getCustomAttributes, getDescription, getId, getInputTransform, getLocale, getName, getObjectData, getObjectDataProperty, getOutputTransform, getRequest, getResponse, getTagEpilog, getTagProlog, hasListeners, isCleanUpResourcesOn, isVisible, removePropertyChangeListener, removePropertyChangeListener, setCustomAttributes, setInputTransform, setName, setObjectData, setObjectDataProperty, setOutputTransform, setTagEpilog, setTagProlog, setVisible, toString, write, write, write
 
Methods inherited from interface com.sas.actionprovider.HttpActionProviderInterface
getRequest
 

Field Detail

RB_KEY

public static final java.lang.String RB_KEY
See Also:
Constant Field Values

DEFAULT_FILTER_AND_RANK_SELECTOR_NAME

public static final java.lang.String DEFAULT_FILTER_AND_RANK_SELECTOR_NAME
See Also:
Constant Field Values

DEFAULT_TEMPLATE_FILE_NAME

public static final java.lang.String DEFAULT_TEMPLATE_FILE_NAME
See Also:
Constant Field Values

DEFAULT_REMOTE_SCRIPT_URL

public static final java.lang.String DEFAULT_REMOTE_SCRIPT_URL
See Also:
Constant Field Values

remoteScriptForm

protected Form remoteScriptForm

remoteScriptURL

protected java.lang.String remoteScriptURL

browserType

protected int browserType

selectorModel

protected FilterAndRankModelInterface selectorModel
Constructor Detail

FilterAndRankSelectorPanel

public FilterAndRankSelectorPanel()
Constructs a new Filter and Rank selector panel. A unique name will be created for the new instance and the default components will be instantiated.


FilterAndRankSelectorPanel

public FilterAndRankSelectorPanel(java.lang.String name)
Constructs a new Filter and Rank selector panel with the given name. This constructor will be created the new instance and the default components will be instantiated.

Parameters:
name - the new name of the panel
Method Detail

getRemoteScriptURL

public java.lang.String getRemoteScriptURL()
Returns the URL used for processing the remote script form

Returns:
url of the remote script form

setRemoteScriptURL

public void setRemoteScriptURL(java.lang.String value)
Sets the URL used for processing the remote script form

Parameters:
value - the new url for the remote script form action

getDefaultComponentMap

public java.util.Map getDefaultComponentMap()
Constructs and returns the default component map for this selector. The default versions of all components required by this selector will be constructed at this time. Styles, names, and other customizations are applied.

Returns:
the map of all the default components

setLocaleDependentProperties

protected void setLocaleDependentProperties(java.util.Locale locale)
Description copied from class: BaseTransformation
Sets the locale dependent properties. Not operational at this level.

Overrides:
setLocaleDependentProperties in class BaseTransformation

getFilterAxis

protected FilterAxisEnum getFilterAxis()
Returns the filter axis currently set on the model.

Returns:
the filter axis or null if one has not been set

getBasedOn

protected java.lang.String getBasedOn()
Returns the text for the 'Based On' field.

Returns:
the text for the 'Based On' field

setRadioModel

protected boolean setRadioModel(java.lang.String componentKey,
                                javax.swing.ListModel model)
Sets the model on the component at the given key. The component must be a BaseRadio instance for the method to succeed.

Parameters:
componentKey - the component key of the desired component
model - the model to assign to the component
Returns:
true if the model was successfully assigned to the component, false otherwise

setChoiceBoxModel

protected boolean setChoiceBoxModel(java.lang.String componentKey,
                                    javax.swing.ComboBoxModel model)
Sets the model on the component at the given key. The component must be a BaseChoiceBox instance for the method to succeed.

Parameters:
componentKey - the component key of the desired component
model - the model to assign to the component
Returns:
true if the model was successfully assigned to the component, false otherwise

setListBoxModel

protected boolean setListBoxModel(java.lang.String componentKey,
                                  javax.swing.ListModel model)
Sets the model on the component at the given key. The component must be a BaseListBox instance for the method to succeed.

Parameters:
componentKey - the component key of the desired component
model - the model to assign to the component
Returns:
true if the model was successfully assigned to the component, false otherwise

setCheckBoxModel

protected boolean setCheckBoxModel(java.lang.String componentKey,
                                   Item model)
Sets the model on the component at the given key. The component must be a BaseCheckBox instance for the method to succeed.

Parameters:
componentKey - the component key of the desired component
model - the model to assign to the component
Returns:
true if the model was successfully assigned to the component, false otherwise

setLabelText

protected boolean setLabelText(java.lang.String componentKey,
                               java.lang.String propertyKey,
                               java.util.Locale locale)
Convenience method for applying text from a resource to a label in the component map.

Parameters:
componentKey - the key in the component map for the component to modify
propertyKey - the key for the resource to use
locale - the locale to use when getting the resource
Returns:
true if the label text was successfully updated, false otherwise

setLabelText

protected boolean setLabelText(java.lang.String componentKey,
                               java.lang.String text)
Convenience method for applying text from a resource to a label in the component map.

Parameters:
componentKey - the key in the component map for the component to modify
text - the pre-localized text for the label
Returns:
true if the label text was successfully updated, false otherwise

setButtonLabel

protected boolean setButtonLabel(java.lang.String componentKey,
                                 java.lang.String propertyKey,
                                 java.util.Locale locale)
Convenience method for applying text from a resource as the label for a button in the component map.

Parameters:
componentKey - the key in the component map for the component to modify
propertyKey - the key for the resource to use
locale - the locale to use when getting the resource
Returns:
true if the label text was successfully updated, false otherwise

getDefaultStyleMap

public java.util.Map getDefaultStyleMap()
Provides a mapping of style keys to the default values to be used by the components in this selector.

Returns:
a Map of StyleInfo objects

getSelectedFilterType

public FilterTypeEnum getSelectedFilterType()
Returns the filter type currently selected on the 'filter type' component.

Returns:
the currently selected filter type or null if none has been set

getSelectedRankOrder

public RankOrderEnum getSelectedRankOrder()
Returns the rank order currently selected on the 'rank order' component.

Returns:
the currently selected rank order or null if none has been set

getDefaultTemplateDictionary

public java.util.HashMap getDefaultTemplateDictionary()
Returns a map of additional template entries created/required by this selector.

Returns:
the default map of template entries for this selector

setComponentValues

protected void setComponentValues()
Sets the name and ID properties on select components. The proper name and ID are required for full compatibility with the ActionProvider framework and also any JavaScript that would be associated with these components. Changes to the selector name or the action provider would require another execution of this method to re-synch the components.


write

public void write(java.io.PrintWriter out)
           throws java.io.IOException
Description copied from class: BaseCompositeTransformation
Writes the custom attributes of the object. All transformation beans should override this method and call SUPER.

Specified by:
write in interface TransformationInterface
Specified by:
write in interface com.sas.util.WriteToPrintWriterInterface
Overrides:
write in class BaseCompositeTransformation
Parameters:
out - The output stream
Throws:
java.io.IOException - Thrown if some type of I/O error occurs

getConstructionJavaScript

protected java.lang.String getConstructionJavaScript()

writeSelectorForm

protected void writeSelectorForm(java.io.PrintWriter out,
                                 Form form)
                          throws java.io.IOException
Throws:
java.io.IOException

setSelectorModel

public void setSelectorModel(java.lang.Object selectormodel)
Description copied from class: BaseSelectorPanel
Sets the selector's data model

Overrides:
setSelectorModel in class BaseSelectorPanel
Parameters:
selectormodel - The selector's data model

propertyChange

public void propertyChange(java.beans.PropertyChangeEvent pce)
Specified by:
propertyChange in interface java.beans.PropertyChangeListener
Overrides:
propertyChange in class BaseCompositeTransformation



Copyright © 2009 SAS Institute Inc. All Rights Reserved.