public class

FormatTabColorLinesTransform

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

Class Overview

This class transforms a FormatColorLinesTabBean allowing users to modify the corresponding color lines properties of a control, such as borders, color, etc. 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 three sections:

  • Fill
  • Borders
  • Line and Shape Settings
    Each one of these sections has its own render method. Furthermore each section generates individual settings which are 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
         -------------------------------------
         |                                    |
         |  FillSection                       |
         |     -- FillColorSection            |
         |                                    |
         -------------------------------------
         |                                    |
         |  BordersSection                    |
         |    -- BorderSettingsSection        |
         |      - AllBorderSettingsSection    |
         |      - CustomBorderSettingsSection |
         |        - LeftBorderSection         |
         |        - RightBorderSection        |
         |        - TopBorderSection          |
         |        - BottomBorderSection       |
         |                                    |
         -------------------------------------
         |                                    |
         |  LineSettingsSection               |
         |    -- LineSettingsStyleSection     |
         |    -- LineSettingsColorSection     |
         |    -- LineSettingsWeightSection    |
         |                                    |
         -------------------------------------
     

  • Summary

    Constants
    String FP_ALL_BORDER_STYLE_PICKER_NAME Constant specifying the name of the formal parameter for defining the id of a system picker that contains the list of all-borders options.
    String FP_BORDER_COLOR_PICKER_NAME Constant specifying the name of the formal parameter for defining the id of a system picker that contains the possible border color options.
    String FP_BORDER_STYLE_PICKER_NAME Constant specifying the name of the formal parameter for defining the id of a system picker that contains the list of border options.
    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 background/fill color options.
    String FP_IS_DOC_PROPS Constant specifying the name of the formal parameter that determines whether we are showing the tab for the Document Properties Editor.
    String FP_LINE_STYLE_PICKER_NAME Constant specifying the name of the formal parameter for defining the id of a system picker that contains the list of line options.
    String FP_Line_COLOR_PICKER_NAME Constant specifying the name of the formal parameter for defining the id of a system picker that contains the possible line color options.
    [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
    public FormalParameter allBorderStylePickerName Indicates the id of a system picker that contains the possible all border style options
    public FormalParameter borderColorPickerName Indicates the id of a system picker that contains the possible color options for borders
    public FormalParameter borderStylePickerName Indicates the id of a system picker that contains the possible border style options
    public FormalParameter colorPickerName Indicates the id of a system picker that contains the possible color options for fill colors
    public FormalParameter isDocumentProperties Indicates whether we are showing the tab for the Document Properties Editor.
    public FormalParameter lineColorPickerName Indicates the id of a system picker that contains the possible color options for lines
    public FormalParameter lineStylePickerName Indicates the id of a system picker that contains the possible line style options
    [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
    FormatTabColorLinesTransform()
    Default no-argument constructor.
    Public Methods
    ShortcutList getAllBorderPicker()
    Returns the all-borders-style picker.
    ShortcutList getBorderColorPicker()
    Returns the border color picker.
    ShortcutList getBorderPicker()
    Returns the border picker.
    ShortcutList getColorPicker()
    Returns the background color picker.
    String getDescription()
    Returns the textual description of the transform
    ShortcutList getLineColorPicker()
    Returns the line color picker.
    ShortcutList getLineStylePicker()
    Returns the line 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 renderAllBorderSettingsSection(MarkupOutput out)
    Displays the interface for allowing the user to modify the border settings on the currently selected target object(s), when the border level selected is All.
    void renderBorderLevelsSection(MarkupOutput out)
    Displays the interface for allowing the user to modify the level of border formatting setting on the currently selected target object(s).
    void renderBorderSettingsSection(MarkupOutput out)
    Displays the interface for allowing the user to customize the border settings on the currently selected target object(s).
    void renderBordersSection(MarkupOutput out)
    Generates the HTML output for the Borders section on this format tab instance.
    void renderBottomBorderSection(MarkupOutput out)
    Displays the interface for allowing the user to modify the bottom border formatting setting on the currently selected target object(s).
    void renderContentsBody(MarkupOutput out)

    This is the entry point for the Tranform, and generates the body of the Tab.

    void renderCustomBorderSettingsSection(MarkupOutput out)
    Displays the interface for allowing the user to modify the border settings on the currently selected target object(s), when the border level selected is Custom.
    void renderFillColorSection(MarkupOutput out)
    Displays the interface for allowing the user to modify the fill color setting on the currently selected target object(s).
    void renderFillSection(MarkupOutput out)

    Generates the HTML output for the Fill section on this format tab instance.

    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 renderLeftBorderSection(MarkupOutput out)
    Displays the interface for allowing the user to modify the left border formatting setting on the currently selected target object(s).
    void renderLineSettingsColorSection(MarkupOutput out)

    Generates the HTML output for the line color setting options.

    void renderLineSettingsSection(MarkupOutput out)

    Generates the HTML output for the line settings section on this format tab instance.

    void renderLineSettingsStyleSection(MarkupOutput out)

    Generates the HTML output for the line style setting options.

    void renderLineSettingsWeightSection(MarkupOutput out)

    Generates the HTML output for the line weight setting options.

    void renderRightBorderSection(MarkupOutput out)
    Displays the interface for allowing the user to modify the right border formatting setting on the currently selected target object(s).
    void renderTopBorderSection(MarkupOutput out)
    Displays the interface for allowing the user to modify the top border formatting setting on the currently selected target object(s).
    void setAllBorderPicker(ShortcutList picker)

    Register the all borders picker.

    void setBorderColorPicker(ShortcutList picker)

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

    void setBorderPicker(ShortcutList picker)

    Register the regular borders picker.

    void setColorPicker(ShortcutList picker)

    Register the color picker for background, i.e.

    void setLineColorPicker(ShortcutList picker)

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

    void setLineStylePicker(ShortcutList picker)

    Register the line style picker.

    Protected Methods
    Map getAttributesFrame()
    This method return a Map (name/value pairs) of attributes to use for the div enclosing the content of the Tab.
    boolean isGridBordersFormattingSelected()
    Returns true if the grid borders are enabled for this bean.
    void renderSingleBorderLevel(MarkupOutput out, String name, String label, String value, String image, boolean selected)
    Convenience method, for rendering a border level setting, consisting of a radio button, an image and a legend.
    void renderSingleBorderSection(MarkupOutput out, String currentColor, String currentStyle, String nameColor, String nameStyle, String label, boolean includeHiddenInput)
    Convenience method, for rendering the settings that can be modified for an individual border, consisting on a label (optional), a combo box with border styles, and a color picker
    void renderSingleBorderSection(MarkupOutput out, String currentColor, String currentStyle, String nameColor, String nameStyle, String label, boolean includeHiddenInput, ShortcutList picker)
    Convenience method, for rendering the settings that can be modified for an individual border, consisting on a label (optional), a combo box with border styles, and a color picker
    [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_ALL_BORDER_STYLE_PICKER_NAME

    Constant specifying the name of the formal parameter for defining the id of a system picker that contains the list of all-borders options. Value is allBorderStylePickerName.

    Constant Value: "allBorderStylePickerName"

    public static final String FP_BORDER_COLOR_PICKER_NAME

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

    Constant Value: "borderColorPickerName"

    public static final String FP_BORDER_STYLE_PICKER_NAME

    Constant specifying the name of the formal parameter for defining the id of a system picker that contains the list of border options. Value is borderStylePickerName.

    Constant Value: "borderStylePickerName"

    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 background/fill color options. Value is colorPickerId.

    Constant Value: "colorPickerName"

    public static final String FP_IS_DOC_PROPS

    Constant specifying the name of the formal parameter that determines whether we are showing the tab for the Document Properties Editor.

    Constant Value: "isDocumentProperties"

    public static final String FP_LINE_STYLE_PICKER_NAME

    Constant specifying the name of the formal parameter for defining the id of a system picker that contains the list of line options. Value is lineStylePickerName.

    Constant Value: "lineStylePickerName"

    public static final String FP_Line_COLOR_PICKER_NAME

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

    Constant Value: "lineColorPickerName"

    Fields

    public FormalParameter allBorderStylePickerName

    Indicates the id of a system picker that contains the possible all border style options

    public FormalParameter borderColorPickerName

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

    public FormalParameter borderStylePickerName

    Indicates the id of a system picker that contains the possible border style options

    public FormalParameter colorPickerName

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

    public FormalParameter isDocumentProperties

    Indicates whether we are showing the tab for the Document Properties Editor.

    public FormalParameter lineColorPickerName

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

    public FormalParameter lineStylePickerName

    Indicates the id of a system picker that contains the possible line style options

    Public Constructors

    public FormatTabColorLinesTransform ()

    Default no-argument constructor. Initializes formal parameters.

    Public Methods

    public ShortcutList getAllBorderPicker ()

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

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

    public ShortcutList getBorderColorPicker ()

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

    Returns
    • ShortcutList to use for the border color-picker.

    public ShortcutList getBorderPicker ()

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

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

    public ShortcutList getColorPicker ()

    Returns the background 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 getLineColorPicker ()

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

    Returns
    • ShortcutList to use for the line-color-picker.

    public ShortcutList getLineStylePicker ()

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

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

    public Class getSupportedBeanType ()

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

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

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

    Displays the interface for allowing the user to modify the border settings on the currently selected target object(s), when the border level selected is All.

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

    public void renderBorderLevelsSection (MarkupOutput out)

    Displays the interface for allowing the user to modify the level of border formatting setting on the currently selected target object(s).

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

    public void renderBorderSettingsSection (MarkupOutput out)

    Displays the interface for allowing the user to customize the border settings on the currently selected target object(s). It assumes a DHTML environment since the different settings for each one of the border levels available will be included as part of the HTML to send to the user, but they will be hidden if their corresponding border level setting is not selected. Calls renderAllBorderSettingsSection() and renderCustomBorderSettingsSection(). There's no method for the border level of none since nothing is displayed in that case.

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

    public void renderBordersSection (MarkupOutput out)

    Generates the HTML output for the Borders section on this format tab instance. Calls renderColorLinesSectionTitle(), renderBorderLevelsSection() and renderBorderSettingsSection.

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

    public void renderBottomBorderSection (MarkupOutput out)

    Displays the interface for allowing the user to modify the bottom border formatting setting on the currently selected target object(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 renderFillSection(), renderBordersSection() and renderLineSettingsSection.

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

    public void renderCustomBorderSettingsSection (MarkupOutput out)

    Displays the interface for allowing the user to modify the border settings on the currently selected target object(s), when the border level selected is Custom. Calls renderLeftBorderSection(), renderRightBorderSection(), renderTopBorderSection() and renderBottomBorderSection()

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

    public void renderFillColorSection (MarkupOutput out)

    Displays the interface for allowing the user to modify the fill color setting on the currently selected target object(s).

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

    public void renderFillSection (MarkupOutput out)

    Generates the HTML output for the Fill section on this format tab instance. Calls renderColorLinesSectionTitle() and renderFillColorSection.

    This method will not generate any content if the isGridBordersFormattingSelected returns true.

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

    Displays the interface for allowing the user to modify the left border formatting setting on the currently selected target object(s).

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

    public void renderLineSettingsColorSection (MarkupOutput out)

    Generates the HTML output for the line color setting options.

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

    public void renderLineSettingsSection (MarkupOutput out)

    Generates the HTML output for the line settings section on this format tab instance. Calls renderLineSettingsStyleSection(), renderLineSettingsColorSection and renderLineSettingsWeightSection.

    This method will not generate any content if the isGridBordersFormattingSelected returns true.

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

    public void renderLineSettingsStyleSection (MarkupOutput out)

    Generates the HTML output for the line style setting options.

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

    public void renderLineSettingsWeightSection (MarkupOutput out)

    Generates the HTML output for the line weight setting options.

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

    public void renderRightBorderSection (MarkupOutput out)

    Displays the interface for allowing the user to modify the right border formatting setting on the currently selected target object(s).

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

    public void renderTopBorderSection (MarkupOutput out)

    Displays the interface for allowing the user to modify the top border formatting setting on the currently selected target object(s).

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

    public void setAllBorderPicker (ShortcutList picker)

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

    Parameters
    picker The allBorderPicker to set.

    public void setBorderColorPicker (ShortcutList picker)

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

    Parameters
    picker The borderColorPicker to set.

    public void setBorderPicker (ShortcutList picker)

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

    Parameters
    picker The borderPicker to set.

    public void setColorPicker (ShortcutList picker)

    Register the color picker for background, i.e. Fill color This allows the transform to use a ShortcutList that is not defined inside the pageConfig.

    Parameters
    picker The colorPicker to set.

    public void setLineColorPicker (ShortcutList picker)

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

    Parameters
    picker The lineColorPicker to set.

    public void setLineStylePicker (ShortcutList picker)

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

    Parameters
    picker The lineStylePicker to set.

    Protected Methods

    protected Map getAttributesFrame ()

    This method return a Map (name/value pairs) of attributes to use for the div enclosing the content of the Tab. These attributes include those required for javascript and formatting (for example, "sty", "ty" and "scriptclass"). Extends the parent method by yet adding one more property that indicates if the current object being targetted is a Document.

    Returns
    • Map with HTML attributes for the body div.

    protected boolean isGridBordersFormattingSelected ()

    Returns true if the grid borders are enabled for this bean. This might affect the sections rendered, for example, if the grid borders are enabled, the fill section is not be displayed.

    Returns
    • boolean true if the grid borders are enabled.

    protected void renderSingleBorderLevel (MarkupOutput out, String name, String label, String value, String image, boolean selected)

    Convenience method, for rendering a border level setting, consisting of a radio button, an image and a legend.

    Parameters
    out MarkupOutput instance where the HTML generated will be saved
    name String with the name of the control to generate
    label String with the text of the label to display next to the control
    value String with the value the control will have if selected
    image String with the location of the image to display next to the option generated.
    selected boolean

    protected void renderSingleBorderSection (MarkupOutput out, String currentColor, String currentStyle, String nameColor, String nameStyle, String label, boolean includeHiddenInput)

    Convenience method, for rendering the settings that can be modified for an individual border, consisting on a label (optional), a combo box with border styles, and a color picker

    Parameters
    out MarkupOutput instance where the HTML generated will be saved.
    currentColor String with the value of the current color selected
    currentStyle String with the value of the current style selected
    nameColor String with the name the color control will have
    nameStyle String with the name the style control will have
    label String with the text to be displayed next to the control
    includeHiddenInput boolean value indicating if hidden inputs will be added to the final contents or not.

    protected void renderSingleBorderSection (MarkupOutput out, String currentColor, String currentStyle, String nameColor, String nameStyle, String label, boolean includeHiddenInput, ShortcutList picker)

    Convenience method, for rendering the settings that can be modified for an individual border, consisting on a label (optional), a combo box with border styles, and a color picker

    Parameters
    out MarkupOutput instance where the HTML generated will be saved.
    currentColor String with the value of the current color selected
    currentStyle String with the value of the current style selected
    nameColor String with the name the color control will have
    nameStyle String with the name the style control will have
    label String with the text to be displayed next to the control
    includeHiddenInput boolean value indicating if hidden inputs will be added to the
    picker ShortcutList instance with the different options to be displayed for style. Color picker options will come from the getColorPicker() method.