⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cmshtmlwidgetoption.java

📁 一个cms内容管理平台
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
     */
    public String getEditorHeight() {

        return m_editorHeight;
    }

    /**
     * Returns the styles XML VFS path to use in the widget area.<p>
     *
     * @return the styles XML VFS path to use in the widget area
     */
    public String getStylesXmlPath() {

        return m_stylesXmlPath;
    }

    /**
     * Sets the css style sheet VFS path to use in the widget area.<p>
     *
     * @param cssPath the css style sheet VFS path to use in the widget area
     */
    public void setCssPath(String cssPath) {

        m_cssPath = cssPath;
    }

    /**
     * Sets the displayed gallery names.<p>
     * 
     * @param displayGalleries the displayed gallery names
     */
    public void setDisplayGalleries(List displayGalleries) {

        m_displayGalleries = displayGalleries;
    }

    /**
     * Sets the widget editor height.<p>
     * 
     * @param editorHeight the widget editor height
     */
    public void setEditorHeight(String editorHeight) {

        m_editorHeight = editorHeight;
    }

    /**
     * Sets if the anchor dialog button should be available.<p>
     * 
     * @param showAnchorDialog true if the anchor dialog button should be available, otherwise false
     */
    public void setShowAnchorDialog(boolean showAnchorDialog) {

        m_showAnchorDialog = showAnchorDialog;
    }

    /**
     * Sets if the format selector should be available.<p>
     * 
     * @param showFormatSelect true if the format selector should be available, otherwise false
     */
    public void setShowFormatSelect(boolean showFormatSelect) {

        m_showFormatSelect = showFormatSelect;
    }

    /**
     * Sets if the image dialog button should be available.<p>
     *
     * @param showImageDialog true if the image dialog button should be available, otherwise false
     */
    public void setShowImageDialog(boolean showImageDialog) {

        m_showImageDialog = showImageDialog;
    }

    /**
     * Sets if the link dialog button should be available.<p>
     * 
     * @param showLinkDialog true if the link dialog button should be available, otherwise false
     */
    public void setShowLinkDialog(boolean showLinkDialog) {

        m_showLinkDialog = showLinkDialog;
    }

    /**
     * Sets if the source code button should be available.<p>
     * 
     * @param showSourceEditor true if the source code button should be available, otherwise false
     */
    public void setShowSourceEditor(boolean showSourceEditor) {

        m_showSourceEditor = showSourceEditor;
    }

    /**
     * Sets if the table dialog button should be available.<p>
     *
     * @param showTableDialog true if the table dialog button should be available, otherwise false
     */
    public void setShowTableDialog(boolean showTableDialog) {

        m_showTableDialog = showTableDialog;
    }

    /**
     * Sets the styles XML VFS path to use in the widget area.<p>
     *
     * @param stylesXmlPath the styles XML VFS path to use in the widget area
     */
    public void setStylesXmlPath(String stylesXmlPath) {

        m_stylesXmlPath = stylesXmlPath;
    }

    /**
     * Returns true if the anchor dialog button should be available.<p>
     * 
     * @return if the anchor dialog button should be available
     */
    public boolean showAnchorDialog() {

        return m_showAnchorDialog;
    }

    /**
     * Returns true if the format selector should be available.<p>
     * 
     * @return if the format selector should be available
     */
    public boolean showFormatSelect() {

        return m_showFormatSelect;
    }

    /**
     * Returns true if the specified gallery type dialog button is shown.<p>
     * 
     * @param galleryType the gallery type to check
     * @return true if the specified gallery type dialog button is shown, otherwise false
     */
    public boolean showGalleryDialog(String galleryType) {

        return getDisplayGalleries().contains(galleryType);
    }

    /**
     * Returns true if the image dialog button should be available.<p>
     *
     * @return if the image dialog button should be available
     */
    public boolean showImageDialog() {

        return m_showImageDialog;
    }

    /**
     * Returns true if the link dialog button should be available.<p>
     * 
     * @return if the link dialog button should be available
     */
    public boolean showLinkDialog() {

        return m_showLinkDialog;
    }

    /**
     * Returns true if the source code button should be available.<p>
     * 
     * @return if the source code button should be available
     */
    public boolean showSourceEditor() {

        return m_showSourceEditor;
    }

    /**
     * Returns true if the styles selector should be available.<p>
     *
     * @return if the styles selector should be available
     */
    public boolean showStylesXml() {

        return CmsStringUtil.isNotEmpty(getStylesXmlPath());
    }

    /**
     * Returns true if the table dialog button should be available.<p>
     *
     * @return if the table dialog button should be available
     */
    public boolean showTableDialog() {

        return m_showTableDialog;
    }

    /**
     * Returns true if the widget editor should use a defined CSS style sheet.<p>
     * 
     * @return if the widget editor should use a defined CSS style sheet
     */
    public boolean useCss() {

        return CmsStringUtil.isNotEmpty(getCssPath());
    }

    /**
     * Parses the given configuration String.<p>
     * 
     * @param configuration the configuration String to parse
     */
    protected void parseOptions(String configuration) {

        if (CmsStringUtil.isNotEmpty(configuration)) {
            List options = CmsStringUtil.splitAsList(configuration, OPTION_DELIMITER, true);
            Iterator i = options.iterator();
            while (i.hasNext()) {
                String option = (String)i.next();
                if (OPTION_LINK.equals(option)) {
                    // show link dialog
                    setShowLinkDialog(true);
                } else if (OPTION_ANCHOR.equals(option)) {
                    // show anchor dialog
                    setShowAnchorDialog(true);
                } else if (OPTION_SOURCE.equals(option)) {
                    // show source button
                    setShowSourceEditor(true);
                } else if (OPTION_FORMATSELECT.equals(option)) {
                    // show format selector
                    setShowFormatSelect(true);
                } else if (OPTION_IMAGE.equals(option)) {
                    // show image dialog
                    setShowImageDialog(true);
                } else if (OPTION_TABLE.equals(option)) {
                    // show table dialog
                    setShowTableDialog(true);
                } else if (option.startsWith(OPTION_HEIGHT)) {
                    // the editor height
                    option = option.substring(OPTION_HEIGHT.length());
                    if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(option)) {
                        setEditorHeight(option);
                    }
                } else if (option.startsWith(OPTION_CSS)) {
                    // the editor CSS
                    option = option.substring(OPTION_CSS.length());
                    setCssPath(option);
                } else if (option.startsWith(OPTION_STYLES)) {
                    // the editor styles XML path
                    option = option.substring(OPTION_STYLES.length());
                    setStylesXmlPath(option);
                } else {
                    // check if option describes a gallery
                    if (OpenCms.getWorkplaceManager().getGalleries().get(option) != null) {
                        // add the option to the displayed galleries
                        m_displayGalleries.add(option);
                    }
                }
            }
        }
    }

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -