Class FormatTabNumberTransform
- java.lang.Object
-
- com.microstrategy.web.transform.AbstractTransform
-
- com.microstrategy.web.transform.AbstractLayoutTransform
-
- com.microstrategy.web.app.transforms.AbstractAppTransform
-
- com.microstrategy.web.app.transforms.AbstractTabTransform
-
- com.microstrategy.web.app.transforms.AbstractFormatTabTransform
-
- com.microstrategy.web.app.transforms.FormatTabNumberTransform
-
- All Implemented Interfaces:
AppTransform
,LayoutTransform
,Transform
- Direct Known Subclasses:
FormatPromptNumberTransform
,TabGraphNumberTransform
public class FormatTabNumberTransform extends AbstractFormatTabTransform implements LayoutTransform
This class transforms a
FormatNumberTabBean
allowing users to modify the number formatting of a control (in case the control displays numeric values). As with other TabTransforms, this one assumes itsTabManagerBean
will take care of rendering the required HTML & Javascript allowing users to switch between different formattingTabBean
instances.The output of this transform is divided into two sections:
- Number Category
- Number Settings
Each one of these sections has its ownrender
method. Furthermore each section generates individual settings which might be divided into their own render method. This Transform implementsLayoutTransform
, therefore its render methods can be invoked using a custom layout-xml. When this is the case, the layout-xml specified in the style-catalog controls which methods are called and in which order. Otherwise, the default output of this transform is divided as follows:
Contents / ContentsBody ----------------------------------------------------- | | | | | | | | | | CategoriesSection | NumberSettingsSection | | | | | | | | | | | | | -----------------------------------------------------
- Since:
- MicroStrategy Web 8.0.0
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.microstrategy.web.app.transforms.AbstractAppTransform
AbstractAppTransform.Context
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
_isCrossTab
protected boolean
_isUserMetric
FormalParameter
datePickerName
Indicates the name of the picker that contains the date format options that shall be displayed to the user for number formatting.protected java.lang.String
defaultCurrency
protected java.lang.String
defaultDecimalPlaces
FormalParameter
filteredCategories
Indicates the list of categories to include as options in the editor.static java.lang.String
FP_DATE_PICKER_NAME
Constant specifying the name of the formal parameter for defining the picker name that provides the date formatting options.static java.lang.String
FP_FILTERED_CATEGORIES
Constant specifying the name of the formal parameter for defining the list of categories to include as options in the editor.static java.lang.String
FP_FRACTION_PICKER_NAME
Constant specifying the name of the formal parameter for defining the picker name that provides the fraction formatting options.static java.lang.String
FP_TIME_PICKER_NAME
Constant specifying the name of the formal parameter for defining the picker name that provides the time formatting options.FormalParameter
fractionPickerName
Indicates the name of the picker that contains the fraction format options that shall be displayed to the user for number formatting.protected int
nCatValue
protected java.lang.String
nCurrSymPosValue
protected java.lang.String
nCurrSymValue
protected java.lang.String
nCustomValue
protected java.lang.String
nDecPlValue
protected java.lang.String
nNegNumValue
protected java.lang.String
nThSepValue
protected java.lang.String
numberDateLocale
protected static java.lang.String
PROPERTY_NAME_CATEGORY
protected static java.lang.String
PROPERTY_NAME_CURRENCY_POSITION
protected static java.lang.String
PROPERTY_NAME_CURRENCY_SYMBOL
protected static java.lang.String
PROPERTY_NAME_DECIMAL_PLACES
protected static java.lang.String
PROPERTY_NAME_FORMAT
protected static java.lang.String
PROPERTY_NAME_NEGATIVE_NUMBERS
protected static java.lang.String
PROPERTY_NAME_THOUSAND_SEPARATOR
FormalParameter
timePickerName
Indicates the name of the picker that contains the time format options that shall be displayed to the user for number formatting.-
Fields inherited from class com.microstrategy.web.app.transforms.AbstractFormatTabTransform
formatTarget, FP_FORMAT_TARGET
-
Fields inherited from class com.microstrategy.web.app.transforms.AbstractTabTransform
cssBody, cssFrame, cssPicker, cssPickers, FP_TAB_HEIGHT, scriptClassBody, scriptClassFrame, styBody, styFrame, tabHeight, tyBody, tyFrame
-
Fields inherited from class com.microstrategy.web.app.transforms.AbstractAppTransform
_bean, _componentBlock, _cssPrefix, _imgBlank, _imgWait, _selfOutput, _subOutput, appliesTo, CLASS_INPUT, CLASS_MESSAGE, contextMenus, cssFile, cssPrefix, debugErrorFlags, debugFlags, dragMode, extraInput, extraUrl, FP_APPLIES_TO, FP_CONTEXT_MENUS, FP_CSS_ERROR_MESSAGE, FP_CSS_ERROR_TITLE, FP_CSS_FILE, FP_CSS_PREFIX, FP_DEBUG_ERROR_FLAGS, FP_DEBUG_FLAGS, FP_DRAG_MODE, FP_EXTRA_INPUT, FP_EXTRA_URL, FP_HEIGHT, FP_IFRAME_ENABLED, FP_IMG_WAIT, FP_INITIAL_INDENT, FP_ORIENTATION, FP_ORIENTATIONS_ALLOWED, FP_PARTIAL_IFRAME_UPDATE, FP_PROCESSING_BUTTONS_FLAGS, FP_PROCESSING_INFO_FLAGS, FP_RESIZE_LEVEL, FP_SCRIPT_CLASS, FP_TYPE, FP_USE_DHTML, FP_WIDTH, globalCssErrorMessage, globalCssErrorTitle, height, iframeEnabled, imgWait, indent, initialIndent, isDHTML, orientation, orientationsAllowed, partialIframeUpdate, PROCESSING_BUTTONS_ALL, PROCESSING_BUTTONS_CANCEL, PROCESSING_BUTTONS_HISTORY_LIST, PROCESSING_BUTTONS_REFRESH, PROCESSING_BUTTONS_VIEW_DETAILS, PROCESSING_INFO_ALL, PROCESSING_INFO_DESCRIPTION, PROCESSING_INFO_LAST_UPDATE, PROCESSING_INFO_NAME, PROCESSING_INFO_NONE, PROCESSING_INFO_STATUS, processingButtonsFlags, processingInfoFlags, RESIZE_ALL, RESIZE_HORIZONTAL, RESIZE_NONE, RESIZE_VERTICAL, resizeLevel, scriptClass, scriptEndTagEncoder, type, useDHTML, width
-
-
Constructor Summary
Constructors Constructor Description FormatTabNumberTransform()
Default no-argument constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.String
getCategoryDescriptor(int category)
ShortcutList
getDatePicker()
Returns the date picker.java.lang.String
getDescription()
Returns the textual description of the transformShortcutList
getFractionPicker()
Returns the fraction picker.java.lang.Class
getSupportedBeanType()
Returns the supported bean type.protected JsonGenerator
getTabJSONProperties()
Set all number tab bone properties hereShortcutList
getTimePicker()
Returns the time picker.void
initializeCss()
Initializes the Css Classes to use.void
initializeJavaScriptAttributes()
For JavaScript, certain properties are required to be added to the HTML tags to generate for its integration with the code generated for the feature to work in DHTML environments.protected void
initializeSettings()
void
initializeTransform(Transformable data)
This method initialize the private and protected fields of the transform.void
renderCategoriesSection(MarkupOutput out)
Generates the HTML output for the Categories section on this tab instance, that allows users to select the number category to use for formatting the currently selected target(s).protected void
renderComboBoxes(MarkupOutput out)
void
renderContentsBody(MarkupOutput out)
This is the entry point for the Tranform, and generates the body of the Tab.void
renderCurrencySettingsSection(MarkupOutput out)
Generates the HTML output for the settings to show to the user when the number category Currency has been selected.void
renderCustomSettingsSection(MarkupOutput out)
Generates the HTML output for the settings to show to the user when the number category Custom has been selected.void
renderDateSettingsSection(MarkupOutput out)
Generates the HTML output for the settings to show to the user when the number category Date has been selected.void
renderFixedSettingsSection(MarkupOutput out)
Generates the HTML output for the settings to show to the user when the number category Fixed has been selected.void
renderFractionSettingsSection(MarkupOutput out)
Generates the HTML output for the settings to show to the user when the number category Fraction has been selected.void
renderJavascriptLinks(MarkupOutput out)
Extends the parent method by adding the JavaScript file this transform needs for its correct behavior on the client side.void
renderNumberSettingsSection(MarkupOutput out)
Generates the HTML output for the Number Settings section on this tab instance, that allows users to select specific settings to use for formatting the currently selected target(s), depending on the number category selected.void
renderPercentageSettingsSection(MarkupOutput out)
Generates the HTML output for the settings to show to the user when the number category Percentage has been selected.void
renderScientificSettingsSection(MarkupOutput out)
Generates the HTML output for the settings to show to the user when the number category Scientific has been selected.void
renderTimeSettingsSection(MarkupOutput out)
Generates the HTML output for the settings to show to the user when the number category Time has been selected.void
setDatePicker(ShortcutList datePicker)
Register the date picker.void
setFractionPicker(ShortcutList fractionPicker)
Register the fractions picker.void
setTimePicker(ShortcutList timePicker)
Register the time picker.-
Methods inherited from class com.microstrategy.web.app.transforms.AbstractTabTransform
addJSValidationInfo, AddJSValidationInfo, addPicker, getArgumentName, getAttributesBody, getAttributesFrame, getDropDownTag, getFieldSetTag, getLabelTag, getPickerId, getTabBean, getTabManagerBean, isCurrentTab, isIFrameEnabled, renderColorDropdown, renderContents, renderDropdown, renderFlashWarning, renderPickers, renderSingleOption, renderSingleOption, renderTabFrame, renderTabSectionTitle, transformForRequestSuccessful
-
Methods inherited from class com.microstrategy.web.app.transforms.AbstractAppTransform
addContactInfo, addDynamicScriptClass, addDynamicScriptFile, addFormalParameter, checkLevel, checkProcessingButtonsFlag, checkProcessingInfoFlag, checkStatus, displayError, displayError, displayError, emptyCell, excludeStaticTags, generateAnchor, generateAnchorForExport, generateHiddenInputsForEvent, generateIFrameTag, getAppContext, getAttributesShellDiv, getBeanPath, getBoneId, getCancelEvent, getClientSideHelper, getContainerServices, getContext, getContextMenu, getContextMenuManager, getContextMenuManagerName, getContextMenusDefinition, getCssPrefix, getDateFormat, getDebugOut, getDescriptor, getDescriptor, getDescriptor, getDescriptor, getDisplayMode, getDisplayName, getErrorMessage, getErrorMessage, getErrorTitle, getErrorTitle, getEventManager, getFirstDayOfWeek, getFloatValue, getHelpPath, getID, getIntValue, getJSNameSpace, getLayoutContext, getLocale, getLocale, getPreferenceValue, getProjectID, getRefreshEvent, getRequestKeys, getResourcesFolder, getScriptClass, getStringValue, getStyleRequestContext, getStyleShellDiv, getTagsFactory, getTimeFormat, getUnitsLabel, getWebBeanErrorInfo, hasSubBlock, initHeightAndWidthFromPreferences, initializeImages, initializeWebComponent, is508, isBlockMode, isContextMenusEnabled, isDhtml, isDialog, isDormant, isFeatureAvailable, isIFrameDisplayMode, isIFrameRequest, isJobExpired, isModal, isOpen, isPortlet, isTrue, localIsIFrameDisplayMode, newContext, newHiddenInputBuilder, newNamespaceEncoder, newURIBuilder, redirectToDisplayError, renderBean, renderBean, renderBean, renderBean, renderCancelButton, renderContextMenus, renderCssLink, renderDescriptor, renderDescriptor, renderErrorButton, renderHiddenInputFromRequest, renderImage, renderLayout, renderProcessingButton, renderProcessingButton, renderProcessingButton, renderProcessingButtonForGet, renderProcessingButtonForGet, renderProcessingButtons, renderProcessingInfo, renderProcessingInfoData, renderProcessingInfoImage, renderProcessingInfoSubtitle, renderProcessingInfoTitle, renderProcessingObjectName, renderRefreshButton, renderRegisterBone, renderSelf, renderShell, renderSubBlock, renderUserHelpAnchor, setBoneProperties, setDisplayMode, setHasSubBlock, setHeight, setIFrameDisplayMode, setIsDormant, setRenderSubBlock, setShellAttributeOnClosedComponent, setWidth, shouldDisplay, transform, transformForRequestCanceled, transformForRequestInError, transformForRequestNotInited, transformForRequestProcessing, transformForRequestWaitingForUserInput
-
Methods inherited from class com.microstrategy.web.transform.AbstractLayoutTransform
getLayoutDefinition, setLayoutDefinition, transformUsingLayout
-
Methods inherited from class com.microstrategy.web.transform.AbstractTransform
addFormalParam, canTransform, getEvents, getFormalParams, getPreview, isPreviewAvailable, isResolved, removeFormalParam, setAnnotation, setDeprecated, supports, supports
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.microstrategy.web.transform.LayoutTransform
getLayoutDefinition, setLayoutDefinition
-
Methods inherited from interface com.microstrategy.web.transform.Transform
canTransform, getFormalParams, getID, getPreview, isPreviewAvailable, isResolved, supports, supports, transform
-
-
-
-
Field Detail
-
PROPERTY_NAME_DECIMAL_PLACES
protected static final java.lang.String PROPERTY_NAME_DECIMAL_PLACES
- See Also:
- Constant Field Values
-
PROPERTY_NAME_NEGATIVE_NUMBERS
protected static final java.lang.String PROPERTY_NAME_NEGATIVE_NUMBERS
- See Also:
- Constant Field Values
-
PROPERTY_NAME_CATEGORY
protected static final java.lang.String PROPERTY_NAME_CATEGORY
- See Also:
- Constant Field Values
-
PROPERTY_NAME_CURRENCY_SYMBOL
protected static final java.lang.String PROPERTY_NAME_CURRENCY_SYMBOL
- See Also:
- Constant Field Values
-
PROPERTY_NAME_CURRENCY_POSITION
protected static final java.lang.String PROPERTY_NAME_CURRENCY_POSITION
- See Also:
- Constant Field Values
-
PROPERTY_NAME_FORMAT
protected static final java.lang.String PROPERTY_NAME_FORMAT
- See Also:
- Constant Field Values
-
PROPERTY_NAME_THOUSAND_SEPARATOR
protected static final java.lang.String PROPERTY_NAME_THOUSAND_SEPARATOR
- See Also:
- Constant Field Values
-
_isCrossTab
protected boolean _isCrossTab
-
_isUserMetric
protected boolean _isUserMetric
-
nDecPlValue
protected java.lang.String nDecPlValue
-
nNegNumValue
protected java.lang.String nNegNumValue
-
nCurrSymValue
protected java.lang.String nCurrSymValue
-
nCurrSymPosValue
protected java.lang.String nCurrSymPosValue
-
nCustomValue
protected java.lang.String nCustomValue
-
nThSepValue
protected java.lang.String nThSepValue
-
numberDateLocale
protected java.lang.String numberDateLocale
-
defaultCurrency
protected java.lang.String defaultCurrency
-
defaultDecimalPlaces
protected java.lang.String defaultDecimalPlaces
-
nCatValue
protected int nCatValue
-
datePickerName
public FormalParameter datePickerName
Indicates the name of the picker that contains the date format options that shall be displayed to the user for number formatting.
-
timePickerName
public FormalParameter timePickerName
Indicates the name of the picker that contains the time format options that shall be displayed to the user for number formatting.
-
fractionPickerName
public FormalParameter fractionPickerName
Indicates the name of the picker that contains the fraction format options that shall be displayed to the user for number formatting.
-
filteredCategories
public FormalParameter filteredCategories
Indicates the list of categories to include as options in the editor.
-
FP_DATE_PICKER_NAME
public static final java.lang.String FP_DATE_PICKER_NAME
Constant specifying the name of the formal parameter for defining the picker name that provides the date formatting options. Value is datePickerName.- See Also:
- Constant Field Values
-
FP_TIME_PICKER_NAME
public static final java.lang.String FP_TIME_PICKER_NAME
Constant specifying the name of the formal parameter for defining the picker name that provides the time formatting options. Value is timePickerName.- See Also:
- Constant Field Values
-
FP_FRACTION_PICKER_NAME
public static final java.lang.String FP_FRACTION_PICKER_NAME
Constant specifying the name of the formal parameter for defining the picker name that provides the fraction formatting options. Value is fractionPickerName.- See Also:
- Constant Field Values
-
FP_FILTERED_CATEGORIES
public static final java.lang.String FP_FILTERED_CATEGORIES
Constant specifying the name of the formal parameter for defining the list of categories to include as options in the editor.- See Also:
- Constant Field Values
-
-
Method Detail
-
renderContentsBody
public void renderContentsBody(MarkupOutput out)
This is the entry point for the Tranform, and generates the body of the Tab.
If a layout-xml is specified, this method will delegate the output generation to the Layout parser, otherwise it calls
renderCategoriesSection()
and renderNumberSettingsSection()- Specified by:
renderContentsBody
in classAbstractTabTransform
- Parameters:
out
-MarkupOutput
instance where the HTML contents to render will be saved.
-
renderComboBoxes
protected void renderComboBoxes(MarkupOutput out)
- Since:
- MicroStrategy Web 9.0.0
-
getCategoryDescriptor
protected java.lang.String getCategoryDescriptor(int category)
-
renderCategoriesSection
public void renderCategoriesSection(MarkupOutput out)
Generates the HTML output for the Categories section on this tab instance, that allows users to select the number category to use for formatting the currently selected target(s).- Parameters:
out
-MarkupOutput
instance where the HTML contents to render will be saved.
-
renderNumberSettingsSection
public void renderNumberSettingsSection(MarkupOutput out)
Generates the HTML output for the Number Settings section on this tab instance, that allows users to select specific settings to use for formatting the currently selected target(s), depending on the number category selected. This method will render all the possible combinations of settings, assuming JavaScript is supported for switching the set of options whenever the user changes the number category selected. CallsrenderFixedSettingsSection()
,renderCurrencySettingsSection()
,renderDateSettingsSection()
,renderTimeSettingsSection()
,renderPercentageSettingsSection()
,renderFractionSettingsSection()
,renderScientificSettingsSection()
andrenderCustomSettingsSection()
.- Parameters:
out
-MarkupOutput
instance where the HTML contents to render will be saved.
-
renderFixedSettingsSection
public void renderFixedSettingsSection(MarkupOutput out)
Generates the HTML output for the settings to show to the user when the number category Fixed has been selected.- Parameters:
out
-MarkupOutput
instance where the HTML contents to render will be saved.
-
renderCurrencySettingsSection
public void renderCurrencySettingsSection(MarkupOutput out)
Generates the HTML output for the settings to show to the user when the number category Currency has been selected.- Parameters:
out
-MarkupOutput
instance where the HTML contents to render will be saved.
-
renderDateSettingsSection
public void renderDateSettingsSection(MarkupOutput out)
Generates the HTML output for the settings to show to the user when the number category Date has been selected.- Parameters:
out
-MarkupOutput
instance where the HTML contents to render will be saved.
-
renderTimeSettingsSection
public void renderTimeSettingsSection(MarkupOutput out)
Generates the HTML output for the settings to show to the user when the number category Time has been selected.- Parameters:
out
-MarkupOutput
instance where the HTML contents to render will be saved.
-
renderPercentageSettingsSection
public void renderPercentageSettingsSection(MarkupOutput out)
Generates the HTML output for the settings to show to the user when the number category Percentage has been selected.- Parameters:
out
-MarkupOutput
instance where the HTML contents to render will be saved.
-
renderFractionSettingsSection
public void renderFractionSettingsSection(MarkupOutput out)
Generates the HTML output for the settings to show to the user when the number category Fraction has been selected.- Parameters:
out
-MarkupOutput
instance where the HTML contents to render will be saved.
-
renderScientificSettingsSection
public void renderScientificSettingsSection(MarkupOutput out)
Generates the HTML output for the settings to show to the user when the number category Scientific has been selected.- Parameters:
out
-MarkupOutput
instance where the HTML contents to render will be saved.
-
renderCustomSettingsSection
public void renderCustomSettingsSection(MarkupOutput out)
Generates the HTML output for the settings to show to the user when the number category Custom has been selected.- Parameters:
out
-MarkupOutput
instance where the HTML contents to render will be saved.
-
renderJavascriptLinks
public void renderJavascriptLinks(MarkupOutput out)
Extends the parent method by adding the JavaScript file this transform needs for its correct behavior on the client side.- Overrides:
renderJavascriptLinks
in classAbstractTabTransform
- Parameters:
out
-MarkupOutput
instance where the HTML generated will be saved.- See Also:
AbstractTabTransform.renderJavascriptLinks(com.microstrategy.web.beans.MarkupOutput)
-
getTabJSONProperties
protected JsonGenerator getTabJSONProperties()
Set all number tab bone properties here- Since:
- MicroStrategy Web 9.0.0
-
getSupportedBeanType
public java.lang.Class getSupportedBeanType()
Returns the supported bean type. This transform supports any of theFormatNumberTabBean
instances- Specified by:
getSupportedBeanType
in interfaceTransform
- Overrides:
getSupportedBeanType
in classAbstractTabTransform
- Returns:
- the class of the bean supported by this transform.
-
getDescription
public java.lang.String getDescription()
Returns the textual description of the transform- Specified by:
getDescription
in interfaceTransform
- Overrides:
getDescription
in classAbstractTabTransform
- Returns:
- the description of the transform
-
initializeTransform
public void initializeTransform(Transformable data)
This method initialize the private and protected fields of the transform.- Specified by:
initializeTransform
in interfaceAppTransform
- Overrides:
initializeTransform
in classAbstractTabTransform
- Parameters:
data
-Transformable
instance to be transformed.
-
initializeSettings
protected void initializeSettings()
- Since:
- MicroStrategy Web 9.0.0
-
initializeCss
public void initializeCss()
Initializes the Css Classes to use. For each one of the css classes to use, the prefix indicated on the formal parameter is added to the name of the class to use.- Overrides:
initializeCss
in classAbstractTabTransform
-
initializeJavaScriptAttributes
public void initializeJavaScriptAttributes()
For JavaScript, certain properties are required to be added to the HTML tags to generate for its integration with the code generated for the feature to work in DHTML environments. This method assigns values to these attributes, so they can be displayed together with the tags they represent. If a value is set to be null, it won't be included on the HTML tag definition. By default, it includes the definition of values for properties such asstyFrame
,tyFrame
andscriptClassFrame
.- Overrides:
initializeJavaScriptAttributes
in classAbstractTabTransform
-
setDatePicker
public void setDatePicker(ShortcutList datePicker)
Register the date picker. This allows the transform to use a ShortcutList that is not defined inside the pageConfig.
- Parameters:
datePicker
- The datePicker to set.
-
getDatePicker
public ShortcutList getDatePicker()
Returns the date picker. If a non-null instance have been registered through thesetDatePicker
method, it will return that one, otherwise, it will search for a system picker with the name specified inFP_DATE_PICKER_NAME
.- Returns:
- ShortcutList to use for the date picker.
-
setFractionPicker
public void setFractionPicker(ShortcutList fractionPicker)
Register the fractions picker. This allows the transform to use a ShortcutList that is not defined inside the pageConfig.
- Parameters:
fractionPicker
- The fractionPicker to set.
-
getFractionPicker
public ShortcutList getFractionPicker()
Returns the fraction picker. If a non-null instance have been registered through thesetFractionPicker
method, it will return that one, otherwise, it will search for a system picker with the name specified inFP_FRACTION_PICKER_NAME
.- Returns:
- ShortcutList to use for the date picker.
-
setTimePicker
public void setTimePicker(ShortcutList timePicker)
Register the time picker. This allows the transform to use a ShortcutList that is not defined inside the pageConfig.
- Parameters:
timePicker
- The timePicker to set.
-
getTimePicker
public ShortcutList getTimePicker()
Returns the time picker. If a non-null instance have been registered through thesetTimePicker
method, it will return that one, otherwise, it will search for a system picker with the name specified inFP_TIME_PICKER_NAME
.- Returns:
- ShortcutList to use for the date picker.
-
-