|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.servlet.tbeans.dataselectors.calculations.percent.html.PercentCalculationsSelectorPanel
public class PercentCalculationsSelectorPanel
The PercentCalculationsSelectorPanel is a TransformationBean that generates the appropriate HTML 4.0 and JavaScript to provide a user interface for adding and removing FractionOfTotal dataitems.
The PercentCalculationsSelectorPanel is one of several TransformationBeans that rely on a set of style classes that are used by default when generating the resulting markup language. For more information on style sheets and the default style classes that apply to this TransformationBean, refer to the AppDev Studio Developer Site. You'll find a useful reference document entitled Cascading Style Sheets, Images, and TransformationBeans as well as the TransformationBeans Style Sheet Reference.
The PercentCalculationsSelectorPanel is one of several TransformationBeans that rely on JavaScript to provide some of its functionality. These JavaScript files are including automatically by the tbean. See JavaScriptIncludeHandler for more information about how these files are included and how to customize this behavior. The PercentCalculationsSelectorPanel uses the following JavaScript files:
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
For More Information:
Note: A snapshot of the AppDev Studio Developers Site is installed on your local Web server when you install AppDev Studio. To access the site from webAF, select Help -> Developer Site .
Field Summary | |
---|---|
static java.lang.String |
DEFAULT_TEMPLATE_FILE_NAME
The default file name for the template for this panel. |
protected static java.lang.String |
JAVASCRIPT_ACTIVATE_ADD_FUNCTION
The name of the JavaScript function which removes items from the summary box. |
protected static java.lang.String |
JAVASCRIPT_ADD_FUNCTION
The name of the JavaScript function which adds items to the summary box. |
protected static java.lang.String |
JAVASCRIPT_IGNORE_ENTER_FUNCTION
The name of the JavaScript function which traps and throws away the enter key event. |
protected static java.lang.String |
JAVASCRIPT_PANEL_CLASS
The root portion of any JavaScript function names for this selector panel. |
protected static java.lang.String |
JAVASCRIPT_REMOVE_FUNCTION
The name of the JavaScript function which removes items from the summary box. |
static java.lang.String |
RB_KEY
|
Fields inherited from class com.sas.servlet.tbeans.dataselectors.BaseSelectorPanel |
---|
imageLocation, SELECTOR_EXPAND, SELECTOR_EXTERNAL |
Fields inherited from interface com.sas.servlet.tbeans.dataselectors.calculations.percent.html.PercentCalculationsSelectorKeysInterface |
---|
PCS_ADD_BUTTON, PCS_BUTTON_ROW_ID, PCS_LABEL, PCS_LABEL_LABEL, PCS_MEASURE_CHOICE, PCS_MEASURE_LABEL, PCS_PERCENT_CHOICE, PCS_PERCENT_CHOICE_CONDITIONAL, PCS_PERCENT_CHOICE_LABEL, PCS_PERCENT_LABEL, PCS_REMOVE_BUTTON, PCS_SUMMARY_BOX |
Fields inherited from interface com.sas.servlet.tbeans.dataselectors.calculations.percent.html.PercentCalculationsSelectorStyleKeysInterface |
---|
PCS_BUTTON_STYLE, PCS_CHOICE_LABEL_STYLE, PCS_CHOICE_STYLE, PCS_LABEL_ENTRY_STYLE, PCS_LABEL_STYLE, PCS_SUMMARY_STYLE |
Constructor Summary | |
---|---|
PercentCalculationsSelectorPanel()
Default constructor. |
|
PercentCalculationsSelectorPanel(java.lang.String name)
Constructor using the given name. |
Method Summary | |
---|---|
protected void |
addComponents()
Creates the components and adds them to the selector's template dictionary. |
void |
cancel()
Cancels the command. |
void |
cleanUpResources()
This method releases all of the necessary resources that were needed by the transformation bean to render itself. |
protected BaseButton |
newAddButtonInstance()
Returns a new Button for Add field. |
protected BaseLabel |
newLabelLabelInstance()
Returns a new default label for the Label field. |
protected TextEntry |
newLabelTextEntryInstance()
Returns a new default TextEntry for the Label specification field. |
protected BaseChoiceBox |
newMeasureComboInstance()
Returns a new default ChoiceBox for the Measure specification field. |
protected BaseLabel |
newMeasureLabelInstance()
Returns a new default label for the For Measure field. |
protected BaseLabel |
newPercentChoiceLabelInstance()
Returns a new default choice label for the Percent specification field. |
protected BaseChoiceBox |
newPercentComboInstance()
Returns a new default ChoiceBox for the the Percent specification field. |
protected BaseLabel |
newPercentLabelInstance()
Returns a new default label for the For Percent field. |
protected BaseButton |
newRemoveButtonInstance()
Returns a new Button for Remove field. |
protected PercentCalculationsSelectorListBoxView |
newSummaryBoxInstance()
Returns a new PercentCalculationsSelectorListBoxView for the summary field. |
protected void |
populateMeasureChoiceBox()
Sets write-time properties for the measure choicebox, including the combobox model for the choicebox and the selectedIndex. |
protected void |
populatePercentChoiceBox()
Sets write-time properties for the Percent choicebox, including the combobox model for the choicebox and the selectedIndex. |
protected void |
populateSummaryListBox()
Sets write-time properties for the summary listbox including its model |
protected javax.swing.DefaultListModel |
populateSummaryListBoxModel(PercentCalculationsSelectorListBoxView listBox,
javax.swing.DefaultListModel listModel,
PercentCalculationsSelectorInterface adapter)
Populates the summary listbox model. |
protected void |
setComponentValues()
Populates the Measure ChoiceBox, the Percent ChoiceBox and the Summary ListBox. |
protected void |
setLocaleDependentProperties(java.util.Locale locale)
Sets the locale dependent properties. |
void |
setSelectorModel(java.lang.Object selectormodel)
Sets the selector's data model |
protected void |
setupTemplateDictionary()
Updates the values associated with the following keys in the template dictionary: PCS_BUTTON_ROW_ID PCS_PERCENT_CHOICE_CONDITIONAL |
void |
write(java.io.PrintWriter out)
Writes the custom attributes of the object. |
protected void |
writeActionProviderFields(java.io.PrintWriter out)
Writes the fields needed to identify the ActionProvider, the CMDID and the selector's MODE. |
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 interface com.sas.actionprovider.HttpActionProviderInterface |
---|
getRequest |
Field Detail |
---|
public static final java.lang.String RB_KEY
public static final java.lang.String DEFAULT_TEMPLATE_FILE_NAME
protected static final java.lang.String JAVASCRIPT_PANEL_CLASS
protected static final java.lang.String JAVASCRIPT_ADD_FUNCTION
protected static final java.lang.String JAVASCRIPT_REMOVE_FUNCTION
protected static final java.lang.String JAVASCRIPT_ACTIVATE_ADD_FUNCTION
protected static final java.lang.String JAVASCRIPT_IGNORE_ENTER_FUNCTION
Constructor Detail |
---|
public PercentCalculationsSelectorPanel()
public PercentCalculationsSelectorPanel(java.lang.String name)
name
- String to set the nameMethod Detail |
---|
protected void setLocaleDependentProperties(java.util.Locale locale)
BaseTransformation
setLocaleDependentProperties
in class BaseTransformation
public void setSelectorModel(java.lang.Object selectormodel)
setSelectorModel
in class BaseSelectorPanel
selectormodel
- The selector's data modelpublic void write(java.io.PrintWriter out)
BaseCompositeTransformation
write
in interface TransformationInterface
write
in interface com.sas.util.WriteToPrintWriterInterface
write
in class BaseCompositeTransformation
out
- The output streamprotected void writeActionProviderFields(java.io.PrintWriter out)
out
- The PrintWriter to which the fields should be written.protected void setupTemplateDictionary()
Updates the values associated with the following keys in the template dictionary:
protected void addComponents()
protected BaseLabel newMeasureLabelInstance()
protected BaseLabel newPercentLabelInstance()
protected BaseLabel newLabelLabelInstance()
protected BaseLabel newPercentChoiceLabelInstance()
This component is written only when the selector is attached to the relational version of the adaper
protected BaseChoiceBox newMeasureComboInstance()
protected BaseChoiceBox newPercentComboInstance()
This component is written only when the selector is attached to the olap version of the adaper.
protected TextEntry newLabelTextEntryInstance()
protected BaseButton newAddButtonInstance()
protected BaseButton newRemoveButtonInstance()
protected PercentCalculationsSelectorListBoxView newSummaryBoxInstance()
protected void setComponentValues()
public void cancel()
CancelInterface
Common things done in this method:
cancel
in interface CancelInterface
protected void populateSummaryListBox()
java.io.IOException
- thrown if some type of I/O error occursprotected javax.swing.DefaultListModel populateSummaryListBoxModel(PercentCalculationsSelectorListBoxView listBox, javax.swing.DefaultListModel listModel, PercentCalculationsSelectorInterface adapter)
listBox
- the PercentCalculationsSelectorListBoxView to which the model will be attached.listModel
- the model to populate.adapter
- this panel's selectorModel.
java.io.IOException
- thrown if some type of I/O error occursprotected void populateMeasureChoiceBox()
java.io.IOException
- thrown if some type of I/O error occursprotected void populatePercentChoiceBox()
java.io.IOException
- thrown if some type of I/O error occurspublic void cleanUpResources()
BaseTransformation
request
and response
. This method
calls the setRequest and setResponse methods with a null value.
cleanUpResources
in class BaseTransformation
|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |