public class

FormatTabNumberTransform

extends AbstractFormatTabTransform
implements LayoutTransform
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
Known Direct Subclasses

Class Overview

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 its TabManagerBean will take care of rendering the required HTML & Javascript allowing users to switch between different formatting TabBean instances.

The output of this transform is divided into two sections:

  • Number Category
  • Number Settings
    Each one of these sections has its own render method. Furthermore each section generates individual settings which might be divided into their own render method.

    This Transform implements LayoutTransform, 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   |
         |                       |                           |
         |                       |                           |
         |                       |                           |
         |                       |                           |
         -----------------------------------------------------
     

  • Summary

    Constants
    String FP_DATE_PICKER_NAME Constant specifying the name of the formal parameter for defining the picker name that provides the date formatting options.
    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.
    String FP_FRACTION_PICKER_NAME Constant specifying the name of the formal parameter for defining the picker name that provides the fraction formatting options.
    String FP_TIME_PICKER_NAME Constant specifying the name of the formal parameter for defining the picker name that provides the time formatting options.
    String PROPERTY_NAME_CATEGORY
    String PROPERTY_NAME_CURRENCY_POSITION
    String PROPERTY_NAME_CURRENCY_SYMBOL
    String PROPERTY_NAME_DECIMAL_PLACES
    String PROPERTY_NAME_FORMAT
    String PROPERTY_NAME_NEGATIVE_NUMBERS
    String PROPERTY_NAME_THOUSAND_SEPARATOR
    [Expand]
    Inherited Constants
    From class com.microstrategy.web.app.transforms.AbstractFormatTabTransform
    From class com.microstrategy.web.app.transforms.AbstractTabTransform
    From class com.microstrategy.web.app.transforms.AbstractAppTransform
    Fields
    protected boolean _isCrossTab
    protected boolean _isUserMetric
    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.
    protected String defaultCurrency
    protected String defaultDecimalPlaces
    public FormalParameter filteredCategories Indicates the list of categories to include as options in the editor.
    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.
    protected int nCatValue
    protected String nCurrSymPosValue
    protected String nCurrSymValue
    protected String nCustomValue
    protected String nDecPlValue
    protected String nNegNumValue
    protected String nThSepValue
    protected String numberDateLocale
    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.
    [Expand]
    Inherited Fields
    From class com.microstrategy.web.app.transforms.AbstractFormatTabTransform
    From class com.microstrategy.web.app.transforms.AbstractTabTransform
    From class com.microstrategy.web.app.transforms.AbstractAppTransform
    Public Constructors
    FormatTabNumberTransform()
    Default no-argument constructor.
    Public Methods
    ShortcutList getDatePicker()
    Returns the date picker.
    String getDescription()
    Returns the textual description of the transform
    ShortcutList getFractionPicker()
    Returns the fraction picker.
    Class getSupportedBeanType()
    Returns the supported bean type.
    ShortcutList 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.
    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).
    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.

    Protected Methods
    String getCategoryDescriptor(int category)
    JsonGenerator getTabJSONProperties()
    Set all number tab bone properties here
    void initializeSettings()
    void renderComboBoxes(MarkupOutput out)
    [Expand]
    Inherited Methods
    From class com.microstrategy.web.app.transforms.AbstractTabTransform
    From class com.microstrategy.web.app.transforms.AbstractAppTransform
    From class com.microstrategy.web.transform.AbstractLayoutTransform
    From class com.microstrategy.web.transform.AbstractTransform
    From class java.lang.Object
    From interface com.microstrategy.web.app.transforms.AppTransform
    From interface com.microstrategy.web.transform.LayoutTransform
    From interface com.microstrategy.web.transform.Transform

    Constants

    public static final 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.

    Constant Value: "datePickerName"

    public static final 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.

    Constant Value: "filteredCategories"

    public static final 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.

    Constant Value: "fractionPickerName"

    public static final 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.

    Constant Value: "timePickerName"

    protected static final String PROPERTY_NAME_CATEGORY

    Constant Value: "Category"

    protected static final String PROPERTY_NAME_CURRENCY_POSITION

    Constant Value: "CurrencyPosition"

    protected static final String PROPERTY_NAME_CURRENCY_SYMBOL

    Constant Value: "CurrencySymbol"

    protected static final String PROPERTY_NAME_DECIMAL_PLACES

    Constant Value: "DecimalPlaces"

    protected static final String PROPERTY_NAME_FORMAT

    Constant Value: "Format"

    protected static final String PROPERTY_NAME_NEGATIVE_NUMBERS

    Constant Value: "NegativeNumbers"

    protected static final String PROPERTY_NAME_THOUSAND_SEPARATOR

    Constant Value: "ThousandSeparator"

    Fields

    protected boolean _isCrossTab

    protected boolean _isUserMetric

    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.

    protected String defaultCurrency

    protected String defaultDecimalPlaces

    public FormalParameter filteredCategories

    Indicates the list of categories to include as options in the editor.

    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.

    protected int nCatValue

    protected String nCurrSymPosValue

    protected String nCurrSymValue

    protected String nCustomValue

    protected String nDecPlValue

    protected String nNegNumValue

    protected String nThSepValue

    protected String numberDateLocale

    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.

    Public Constructors

    public FormatTabNumberTransform ()

    Default no-argument constructor. Initializes formal parameters.

    Public Methods

    public ShortcutList getDatePicker ()

    Returns the date picker. If a non-null instance have been registered through the setDatePicker method, it will return that one, otherwise, it will search for a system picker with the name specified in FP_DATE_PICKER_NAME.

    Returns
    • ShortcutList to use for the date picker.

    public String getDescription ()

    Returns the textual description of the transform

    Returns
    • the description of the transform

    public ShortcutList getFractionPicker ()

    Returns the fraction picker. If a non-null instance have been registered through the setFractionPicker method, it will return that one, otherwise, it will search for a system picker with the name specified in FP_FRACTION_PICKER_NAME.

    Returns
    • ShortcutList to use for the date picker.

    public Class getSupportedBeanType ()

    Returns the supported bean type. This transform supports any of the FormatNumberTabBean instances

    Returns
    • the class of the bean supported by this transform.

    public ShortcutList getTimePicker ()

    Returns the time picker. If a non-null instance have been registered through the setTimePicker method, it will return that one, otherwise, it will search for a system picker with the name specified in FP_TIME_PICKER_NAME.

    Returns
    • ShortcutList to use for the date picker.

    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.

    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 as styFrame, tyFrame and scriptClassFrame.

    public void initializeTransform (Transformable data)

    This method initialize the private and protected fields of the transform.

    Parameters
    data Transformable instance to be transformed.

    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.

    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()

    Parameters
    out MarkupOutput instance where the HTML contents to render will be saved.

    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.

    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.

    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.

    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.

    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.

    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.

    Parameters
    out MarkupOutput instance where the HTML generated will be saved.

    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. Calls renderFixedSettingsSection(), renderCurrencySettingsSection(), renderDateSettingsSection(), renderTimeSettingsSection(), renderPercentageSettingsSection(), renderFractionSettingsSection(), renderScientificSettingsSection() and renderCustomSettingsSection().

    Parameters
    out MarkupOutput instance where the HTML contents to render will be saved.

    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.

    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.

    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.

    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.

    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.

    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.

    Protected Methods

    protected String getCategoryDescriptor (int category)

    protected JsonGenerator getTabJSONProperties ()

    Set all number tab bone properties here

    protected void initializeSettings ()

    protected void renderComboBoxes (MarkupOutput out)