public class

FormatTabFontTransform

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.FormatTabFontTransform

Class Overview

This class transforms a FormatTabBean allowing users to modify the corresponding font properties displayed for the text of a control. 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 several sections, such as:

  • Font Name
  • Font Style
  • Font Size
  • Effects
  • Font Color
  • Sample
    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
         -----------------------------------------------------
         |                  |                |               |
         |                  |                |               |
         |   FontSection    |  StyleSection  |  SizeSection  |
         |                  |                |               |
         |                  |                |               |
         -----------------------------------------------------
         |                  |                                |
         |  EffectsSection  |  ColorSection                  |
         |                  |                                |
         |                  |--------------------------------|
         |                  |                                |
         |                  |  SampleSection                 |
         |                  |                                |
         -----------------------------------------------------
     

  • Summary

    Constants
    String FP_COLOR_PICKER_NAME Constant specifying the name of the formal parameter for defining the id of a system picker that contains the possible color options.
    String FP_FONT_NAME_PICKER_NAME Constant specifying the name of the formal parameter for defining the name of the system picker that provides the font name options.
    String FP_FONT_SIZE_PICKER_NAME Constant specifying the name of the formal parameter for defining the name of the system picker that provides the font size options.
    String FP_FONT_STYLE_PICKER_NAME Constant specifying the name of the formal parameter for defining the name of the system picker that provides the font style options.
    String FP_FORMAT_TARGET Constant specifying the name of the formal paramter for determining the formatting target, e.g., grid, rw, thresholds, etc.
    [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 FormalParameter colorPickerName Indicates the id of a system picker that contains the possible color options
    protected FormalParameter fontNamePickerName Indicates the name of the system picker that contains the font names that shall be displayed to the user as possible options for font formatting.
    protected FormalParameter fontSizePickerName Indicates the name of the system picker that contains the font sizes that shall be displayed to the user as possible options for font formatting.
    protected FormalParameter fontStylePickerName Indicates the name of the system picker that contains the font styles that shall be displayed to the user as possible options for font 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
    FormatTabFontTransform()
    Default no-argument constructor.
    Public Methods
    ShortcutList getColorPicker()
    Returns the color picker.
    String getDescription()
    Returns the textual description of the transform
    ShortcutList getFontNamePicker()
    Returns the font name picker.
    ShortcutList getFontSizePicker()
    Returns the font size picker.
    ShortcutList getFontStylePicker()
    Returns the font style picker.
    Class getSupportedBeanType()
    Returns the supported bean type.
    void initializeCss()
    Initializes the Css Classes to use.
    void initializeImages()
    Initializes the name of the images to use on this transform's output.
    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 renderColorSection(MarkupOutput out)
    Generates the HTML output for the Color section on this tab instance, that allows users to select the font color 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 renderEffectsSection(MarkupOutput out)
    Generates the HTML output for the Effects section on this tab instance, that allows users to select the font effects (underline, strikeout) to use for formatting the currently selected target(s).
    void renderFontSection(MarkupOutput out)
    Generates the HTML output for the Font section on this tab instance, that allows users to select the font name to use for formatting the currently selected target(s).
    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 renderSampleSection(MarkupOutput out)
    Generates the HTML output for the Sample section on this tab instance, that allows users to preview how the formatting changes will update the selected target(s).
    void renderSizeSection(MarkupOutput out)
    Generates the HTML output for the Size section on this tab instance, that allows users to select the font size to use for formatting the currently selected target(s).
    void renderStyleSection(MarkupOutput out)
    Generates the HTML output for the Style section on this tab instance, that allows users to select the font style to use for formatting the currently selected target(s).
    void setColorPicker(ShortcutList picker)

    Register the color picker.

    void setFontNamePicker(ShortcutList fontNamePicker)

    Register the font name picker.

    void setFontSizePicker(ShortcutList picker)

    Register the font size picker.

    void setFontStylePicker(ShortcutList picker)

    Register the font style picker.

    Protected Methods
    FormatTabBean getFormatTabBean()
    Obtain the FormatTabBean instance currently being transformed.
    [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_COLOR_PICKER_NAME

    Constant specifying the name of the formal parameter for defining the id of a system picker that contains the possible color options. Value is colorPickerName.

    Constant Value: "colorPickerName"

    public static final String FP_FONT_NAME_PICKER_NAME

    Constant specifying the name of the formal parameter for defining the name of the system picker that provides the font name options. Value is fontNamePickerName.

    Constant Value: "fontNamePickerName"

    public static final String FP_FONT_SIZE_PICKER_NAME

    Constant specifying the name of the formal parameter for defining the name of the system picker that provides the font size options. Value is fontSizePickerName.

    Constant Value: "fontSizePickerName"

    public static final String FP_FONT_STYLE_PICKER_NAME

    Constant specifying the name of the formal parameter for defining the name of the system picker that provides the font style options. Value is fontStylePickerName.

    Constant Value: "fontStylePickerName"

    public static final String FP_FORMAT_TARGET

    Constant specifying the name of the formal paramter for determining the formatting target, e.g., grid, rw, thresholds, etc.

    Constant Value: "formatTarget"

    Fields

    protected FormalParameter colorPickerName

    Indicates the id of a system picker that contains the possible color options

    protected FormalParameter fontNamePickerName

    Indicates the name of the system picker that contains the font names that shall be displayed to the user as possible options for font formatting.

    protected FormalParameter fontSizePickerName

    Indicates the name of the system picker that contains the font sizes that shall be displayed to the user as possible options for font formatting.

    protected FormalParameter fontStylePickerName

    Indicates the name of the system picker that contains the font styles that shall be displayed to the user as possible options for font formatting.

    Public Constructors

    public FormatTabFontTransform ()

    Default no-argument constructor. Initializes formal parameters.

    Public Methods

    public ShortcutList getColorPicker ()

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

    Returns
    • ShortcutList to use for the color-picker.

    public String getDescription ()

    Returns the textual description of the transform

    Returns
    • the description of the transform

    public ShortcutList getFontNamePicker ()

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

    Returns
    • ShortcutList to use for the font-name picker.

    public ShortcutList getFontSizePicker ()

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

    Returns
    • ShortcutList to use for the font-size picker.

    public ShortcutList getFontStylePicker ()

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

    Returns
    • ShortcutList to use for the font-style picker.

    public Class getSupportedBeanType ()

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

    Returns

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

    Initializes the name of the images to use on this transform's output. For each one of the images defined to be displayed, the resource folder information is added to its path and file name as specified on the formal parameters for the images.

    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 renderColorSection (MarkupOutput out)

    Generates the HTML output for the Color section on this tab instance, that allows users to select the font color 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 renderFontSection(), renderStyleSection(), renderSizeSection(), renderEffectsSection(), renderColorSection() and renderSampleSection()

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

    public void renderEffectsSection (MarkupOutput out)

    Generates the HTML output for the Effects section on this tab instance, that allows users to select the font effects (underline, strikeout) to use for formatting the currently selected target(s).

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

    public void renderFontSection (MarkupOutput out)

    Generates the HTML output for the Font section on this tab instance, that allows users to select the font name to use for formatting the currently selected target(s).

    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 renderSampleSection (MarkupOutput out)

    Generates the HTML output for the Sample section on this tab instance, that allows users to preview how the formatting changes will update the selected target(s).

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

    public void renderSizeSection (MarkupOutput out)

    Generates the HTML output for the Size section on this tab instance, that allows users to select the font size to use for formatting the currently selected target(s).

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

    public void renderStyleSection (MarkupOutput out)

    Generates the HTML output for the Style section on this tab instance, that allows users to select the font style to use for formatting the currently selected target(s).

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

    public void setColorPicker (ShortcutList picker)

    Register the color picker. This allows the transform to use a ShortcutList that is not defined inside the pageConfig.

    Parameters
    picker The colorPicker to set.

    public void setFontNamePicker (ShortcutList fontNamePicker)

    Register the font name picker. This allows the transform to use a ShortcutList that is not defined inside the pageConfig.

    Parameters
    fontNamePicker The fontNamePicker to set.

    public void setFontSizePicker (ShortcutList picker)

    Register the font size picker. This allows the transform to use a ShortcutList that is not defined inside the pageConfig.

    Parameters
    picker The fontSizePicker to set.

    public void setFontStylePicker (ShortcutList picker)

    Register the font style picker. This allows the transform to use a ShortcutList that is not defined inside the pageConfig.

    Parameters
    picker The fontStylePicker to set.

    Protected Methods

    protected FormatTabBean getFormatTabBean ()

    Obtain the FormatTabBean instance currently being transformed.

    Returns