Interface Editor

  • All Superinterfaces:
    GuiElement
    All Known Implementing Classes:
    EditorImpl

    public interface Editor
    extends GuiElement

    Title: Editor.

    Description: interface for the editor components in Microstrategy Web. The Editor GUI Element is responsible for producing a dialog like interface used by all the editors in the application. Its properties and methods allow the user to quiclky generate a dialog that follows the look and feel standards of Microstrategy Web. Instances of this interface are used by the AbstractEditorTransform to generate the application dialogs, but its usage is not limited to transform as any object capable of handling a MarkupOutput can use this component. Instances to this component must be obtained through the GuiElementFactory.

    Since:
    MicroStrategy Web 7.3.1 or earlier
    • Field Detail

      • APPLY_BUTTON

        static final int APPLY_BUTTON
        The property value of the Apply button
        Since:
        MicroStrategy Web 8.0.1
        See Also:
        Constant Field Values
      • OK_BUTTON

        static final int OK_BUTTON
        The property value of the OK button
        Since:
        MicroStrategy Web 8.0.1
        See Also:
        Constant Field Values
      • CANCEL_BUTTON

        static final int CANCEL_BUTTON
        The property value of the Cancel button
        Since:
        MicroStrategy Web 8.0.1
        See Also:
        Constant Field Values
    • Method Detail

      • setTitle

        void setTitle​(java.lang.String title)
        set the title of the editor
        Parameters:
        title - the title of the editor
      • getTitle

        java.lang.String getTitle()
        get the title of the editor
        Returns:
        the title of the editor
      • setActionButtonsBar

        void setActionButtonsBar​(Tag ab)
        Sets the TR tag that will be used to render the action buttons bar
        Since:
        MicroStrategy Web 9.0.0
      • getActionButtonsBar

        Tag getActionButtonsBar()
        Returns the TR tag that will be used to render the action buttons bar
        Since:
        MicroStrategy Web 9.0.0
      • setHideFocus

        void setHideFocus​(boolean value)
        set the hide focus property of the buttons in the editor
        Parameters:
        value - the value of the hide focus property
        Since:
        MicroStrategy Web 8.1.0
      • isHideFocus

        boolean isHideFocus()
        gets the hide focus property of the buttons in the editor
        Returns:
        the value of the hide focus property
        Since:
        MicroStrategy Web 8.1.0
      • setHelpToolTip

        void setHelpToolTip​(java.lang.String title)
        set the tooltip of the editor
        Parameters:
        title - the tooltip of the editor
        Since:
        MicroStrategy Web 8.0.0
      • getHelpToolTip

        java.lang.String getHelpToolTip()
        get the tooltip of the editor
        Returns:
        the tooltip of the editor
        Since:
        MicroStrategy Web 8.0.0
      • setDisplayFlags

        void setDisplayFlags​(int flags)
        set the display flag for the editor
        Parameters:
        flags - the display flag
      • getDisplayFlags

        int getDisplayFlags()
        get the display flag for the editor
        Returns:
        the display flag
      • appendDisplayFlag

        void appendDisplayFlag​(int flag)
        append some display flag
        Parameters:
        flag - the flag to append
      • setHelpEvent

        @Deprecated
        void setHelpEvent​(WebEvent event)
        Deprecated.
        set the help event for the editor
        Parameters:
        event - the help event
      • getHelpEvent

        @Deprecated
        WebEvent getHelpEvent()
        Deprecated.
        get the help event for the editor
        Returns:
        the help event
      • setHelpTopic

        void setHelpTopic​(java.lang.String topic)
        set the help topic of the editor
        Parameters:
        topic - the help topic
      • setCloseEvent

        void setCloseEvent​(WebEvent event)
        set the close event for the editor
        Parameters:
        event - the close event
      • getCloseEvent

        WebEvent getCloseEvent()
        get the close event for the editor
        Returns:
        the close event
      • setApplyEvent

        void setApplyEvent​(WebEvent event)
        set the apply event for the editor
        Parameters:
        event - the apply event
      • getApplyEvent

        WebEvent getApplyEvent()
        get the apply event for the editor
        Returns:
        the apply event
      • setOkEvent

        void setOkEvent​(WebEvent event)
        set the ok event for the editor
        Parameters:
        event - the ook event
      • getOkEvent

        WebEvent getOkEvent()
        get the ok event for the editor
        Returns:
        the ok event
      • setCancelEvent

        void setCancelEvent​(WebEvent event)
        set the cancel event for the editor
        Parameters:
        event - the cancel event
      • getCancelEvent

        WebEvent getCancelEvent()
        get the cancel event for the editor
        Returns:
        the cancel event
      • setHelpLabel

        void setHelpLabel​(java.lang.String helpLabel)
        set the help label, which is displayed as the tooltip of the help icon
        Parameters:
        helpLabel - the help label
      • setCloseLabel

        void setCloseLabel​(java.lang.String closeLabel)
        set the close label, which is displayed as the tooltip of the close icon
        Parameters:
        closeLabel - the close label
      • setApplyLabel

        void setApplyLabel​(java.lang.String applyLabel)
        set the apply label, which is displayed as the text of the apply button
        Parameters:
        applyLabel - the apply label
      • setOKLabel

        void setOKLabel​(java.lang.String OKLabel)
        set the ok label, which is displayed as the text of the ok button
        Parameters:
        OKLabel - the ok label
      • setCancelLabel

        void setCancelLabel​(java.lang.String cancelLabel)
        set the cancel label, which is displayed as the text of the cancel button
        Parameters:
        cancelLabel - the cancel label
      • setApplyTooltip

        void setApplyTooltip​(java.lang.String applyTooltip)
        set the apply tooltip, which is displayed as the text of the apply button
        Parameters:
        applyTooltip - the apply tooltip
        Since:
        MicroStrategy Web 8.1.0
      • setOKTooltip

        void setOKTooltip​(java.lang.String OKLabel)
        set the ok tooltip, which is displayed as the text of the ok button
        Parameters:
        OKLabel - the ok label
        Since:
        MicroStrategy Web 8.1.0
      • setCancelTooltip

        void setCancelTooltip​(java.lang.String cancelLabel)
        set the cancel tooltip, which is displayed as the text of the cancel button
        Parameters:
        cancelLabel - the cancel label
        Since:
        MicroStrategy Web 8.1.0
      • setButtonDisabled

        void setButtonDisabled​(int button,
                               boolean disableValue)
        Set the disabled property of the specified button. The button which needs to be disabled is one of APPLY_BUTTON, OK_BUTTON or CANCEL_BUTTON
        Parameters:
        button - The actual button whose disabled property needs to be changed.
        disableValue - boolean value set to true to disable the apply button.
        Since:
        MicroStrategy Web 8.0.1
      • setForm

        void setForm​(java.lang.String action,
                     java.lang.String method,
                     java.lang.String formName)
        set the form information for the editor
        Parameters:
        action - the action attribute of the form
        method - the method attribute of the form
        formName - the name attribute of the form
      • setForm

        void setForm​(java.lang.String action,
                     java.lang.String method,
                     java.lang.String formName,
                     java.lang.String extraAttributes)
        set the form information for the editor
        Parameters:
        action - the action attribute of the form
        method - the method attribute of the form
        formName - the name attribute of the form
        extraAttributes - extra attributes in the form definition
      • setForm

        void setForm​(java.lang.String action,
                     java.lang.String method,
                     java.lang.String formName,
                     java.lang.String extraAttributes,
                     java.lang.String onSubmitInfo)
        set the form information for the editor
        Parameters:
        action - the action attribute of the form
        method - the method attribute of the form
        formName - the name attribute of the form
        extraAttributes - extra attributes in the form definition
        onSubmitInfo - the onSubmit attribute of the form
      • setContents

        @Deprecated
        void setContents​(MarkupOutput out)
        Deprecated.
        Don't create a MarkupOutput and create it, instead call getContents and populate this instance.

        Registers the content of the editor. This is the body section. Users can provide their own populated MarkupOutput which will be appended to the editor's output in the body section.

        Is not recommeneded to use this method (in fact, it has been deprecated). Users should instead call the getContents method which returns a MarkupOutput and populate this object.
        Parameters:
        out - the content as a MarkupOutput object
      • getContents

        MarkupOutput getContents()
        Returns the content of the editor. This is the MarkupOutput clients users should manipulate to generate the body of the editor.
        Returns:
        the content as a MarkupOutput object used for the body section
      • setPostButtonContents

        void setPostButtonContents​(MarkupOutput out)
        set the content after the apply/ok/cancel buttons
        Parameters:
        out - the content as a MarkupOutput object
      • getPostButtonContents

        MarkupOutput getPostButtonContents()
        get the content after the apply/ok/cancel buttons
        Returns:
        the content as a MarkupOutput object
      • setTitleElements

        void setTitleElements​(MarkupOutput out)
        set the title elements of the editor
        Parameters:
        out - the title elements as a MarkupOutput object
      • getTitleElements

        MarkupOutput getTitleElements()
        get the title elements of the editor
        Returns:
        the title elements as a MarkupOutput object
      • setGlobalCss

        void setGlobalCss​(java.lang.String css)
        set the global css class name for the editor
        Parameters:
        css - the css class name
      • setGlobalContentCss

        void setGlobalContentCss​(java.lang.String css)
        set the global content css class name for the editor
        Parameters:
        css - the css class name
      • setContentsCss

        void setContentsCss​(java.lang.String css)
        set the content css class name for the editor
        Parameters:
        css - the css class name
      • setButtonsCss

        void setButtonsCss​(java.lang.String css)
        set the button css class name for the editor
        Parameters:
        css - the css class name
      • setTitleCss

        void setTitleCss​(java.lang.String css)
        set the title css class name for the editor
        Parameters:
        css - the css class name
      • setTitleElementsCss

        void setTitleElementsCss​(java.lang.String css)
        set the title elements' css class name for the editor
        Parameters:
        css - the css class name
      • setImageBasePath

        void setImageBasePath​(java.lang.String path)
        Set the folder path to be used as base for all the images to use while displaying menus
        Parameters:
        path - the folder path
      • setExtraProperties

        @Deprecated
        void setExtraProperties​(MarkupOutput mo)
        Deprecated.
        Set extra information to the whole editor. We use it for setting the drag and drop properties.
        Parameters:
        mo - the MarkupOutput object
      • setAttribute

        void setAttribute​(java.lang.String attributeName,
                          java.lang.String value,
                          int location)
        Set attributes on the location specified (EnumEditorSectionTypes.EditorMainDiv, EnumEditorSectionTypes.EditorTitleDiv, EnumEditorSectionTypes.EditorBodyDiv). We use it for setting the bone properties.
        Parameters:
        attributeName - the name of the attribute to be set
        value - the value to be set for the named attribute
        location - the location to add the attribute as EnumEditorSectionTypes
        Since:
        MicroStrategy Web 8.0.0
      • setUseDHTMLForEditorClose

        void setUseDHTMLForEditorClose​(boolean value)
        Set to true if we want to use DHTML code to close the editor
        Parameters:
        value - The boolean value set to true if we want to use DHTML code to close the editor
      • getUseDHTMLForEditorClose

        boolean getUseDHTMLForEditorClose()
        Returns true if we want to use DHTML code to close the editor
        Returns:
        true if we want to use DHTML code to close the editor
      • hasSpaceAfterEditor

        boolean hasSpaceAfterEditor()
        whethere display a blank space underneath the editor
        Returns:
        whethere display a blank space underneath the editor
      • setSpaceAfterEditor

        void setSpaceAfterEditor​(boolean spaceAfterEditor)
        Set whethere display a blank space underneath the editor
        Parameters:
        spaceAfterEditor - whethere display a blank space underneath the editor
      • setEditorDefinitionLayout

        void setEditorDefinitionLayout​(java.lang.String fileName)
        Sets the definition layout for the editor. The definition layout indicates what section of the editor to display i.e. the buttons to include in the footer.
        Parameters:
        fileName - the definition of the editor
        Since:
        MicroStrategy Web 8.0.0
      • setApplyJS

        void setApplyJS​(java.lang.String value)
        Specifies JavaScript function to be invoked when applying changes for Editor in DHTML mode only.
        Parameters:
        value - String Array consisted of function name and parameters.
        Since:
        MicroStrategy Web 8.0.0
      • setOkJS

        void setOkJS​(java.lang.String value)
        Specifies JavaScript function to be invoked when pressing Editor's 'OK' button in DHTML mode only.
        Parameters:
        value - String Array consisted of function name and parameters.
        Since:
        MicroStrategy Web 8.0.0
      • setCancelJS

        void setCancelJS​(java.lang.String value)
        Specifies JavaScript function to be invoked when canceling Editor in DHTML mode only.
        Parameters:
        value - String Array consisted of function name and parameters.
        Since:
        MicroStrategy Web 8.0.0
      • setCloseJS

        void setCloseJS​(java.lang.String value)
        Specifies JavaScript function to be invoked when closing Editor in DHTML mode only.
        Parameters:
        value - String Array consisted of function name and parameters.
        Since:
        MicroStrategy Web 8.0.0
      • getApplyJS

        java.lang.String getApplyJS()
        Indicates JavaScript to be executed when applying changes current Editor.
        Returns:
        String JS function
        Since:
        MicroStrategy Web 8.0.0
      • getOkJS

        java.lang.String getOkJS()
        Indicates JavaScript to be executed when clicking 'OK' button in current Editor.
        Returns:
        String JS function
        Since:
        MicroStrategy Web 8.0.0
      • getCancelJS

        java.lang.String getCancelJS()
        Indicates JavaScript to be executed when canceling current Editor.
        Returns:
        String JS function
        Since:
        MicroStrategy Web 8.0.0
      • getCloseJS

        java.lang.String getCloseJS()
        Indicates JavaScript to be executed when closing current Editor.
        Returns:
        String JS function
        Since:
        MicroStrategy Web 8.0.0
      • setCanAutoSize

        void setCanAutoSize​(boolean value)
        Set to true if the editor can auto size to show its contents
        Parameters:
        value - The boolean value set to true if if the editor can auto size to show its contents
        Since:
        MicroStrategy Web 8.0.0
      • getCanAutoSize

        boolean getCanAutoSize()
        Returns true if the editor can auto size to show its contents
        Returns:
        true if the editor can auto size to show its contents
        Since:
        MicroStrategy Web 8.0.0
      • setCssPrefix

        void setCssPrefix​(java.lang.String value)
        Set the cssPrefix for the editor container
        Parameters:
        value - The String that is to be used for the cssPrefix for the editor container
        Since:
        MicroStrategy Web 8.0.0
      • renderHelpButton

        void renderHelpButton​(MarkupOutput out)
        Renders the help button for an editor.
        Parameters:
        out - MarkupOutput where the help will be generated
        Since:
        MicroStrategy Web 9.0.0
      • renderHelpButton

        @Deprecated
        void renderHelpButton​(MarkupOutput out,
                              WebEvent helpEvent,
                              java.lang.String helpTopic)
        Renders the help button for an editor.
        Parameters:
        out - MarkupOutput where the help will be generated
        helpEvent - WebEvent the help event to use
        helpTopic - String the associated help topic with this editor.
        Since:
        MicroStrategy Web 8.0.0
      • renderCloseButton

        void renderCloseButton​(MarkupOutput out,
                               WebEvent closeEvent,
                               java.lang.String closeJS)
        Renders the close button for an editor
        Parameters:
        out - MarkupOutput where the button will be generated
        closeEvent - WebEvent the event to use to close the editor
        closeJS - an optional String, if not empty it would be used as the value of the onclick if DHTML is enabled.
        Since:
        MicroStrategy Web 8.0.0
      • setFormId

        void setFormId​(java.lang.String value)
        Set the if of the form to use in XHR partial update
        Parameters:
        value - String the value+"_form" forms the actual id of the form that should be submitted
        Since:
        MicroStrategy Web 9.0.1
      • renderElement

        MarkupOutput renderElement​(java.lang.String cssClass)
        render the gui element in a MarkupOutput object
        Parameters:
        cssClass - the css class of target object
        Returns:
        the MarkupOutput object