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

📄 htmltoolbox.java

📁 java 写的一个新闻发布系统
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
    // drawCopyTreeLauncher    /**     * operation if null, set to CopyTree_Engine.CHOOSE_OPERATION.     * With the engineLauncherName you can control where the engine is launched,     * this value is stored in the engineMap as the session attribute :     * CopyTree_Engine.ENGINE_LAUNCHER_NAME     *     * @param String operation     * @param String unique name of the launcher of this engine     * @param int initialSourcePage, the initial page to be selected.     * @see CopyTree_Engine.COPY_OPERATION     * @see CopyTree_Engine.MOVE_OPERATION     * @see CopyTree_Engine.LINK_OPERATION     * @see CopyTree_Engine.CHOOSE_OPERATION     */    public String drawCopyTreeLauncher(String operation,String engineLauncherName, int initialSourcePage)        throws JahiaException {            String op = operation;            if ( op == null )                op = CopyTree_Engine.CHOOSE_OPERATION;            StringBuffer name = new StringBuffer("copyTree_");            name.append(cleanSessionID(jParams.getSessionID()));            return (gui.drawCopyTreeUrl(op,engineLauncherName,initialSourcePage).equals("")) ? "" : "OpenJahiaScrollableWindow('" + gui.drawCopyTreeUrl(op,engineLauncherName,initialSourcePage) + "','" + name.toString() + "'," + JS_WINDOW_WIDTH + "," + JS_WINDOW_HEIGHT +")";    }    // drawSearchLauncher    public String drawSearchLauncher()        throws JahiaException {            //return drawLauncher(            return gui.drawSearchUrl();    }    // drawAdministrationLauncher    // MJ 21.03.2001    public String drawAdministrationLauncher()        throws JahiaException   {            return gui.drawAdministrationLauncher();    }    // drawSiteMapLauncher    public String drawSiteMapLauncher()        throws JahiaException {            //return drawLauncher(            return gui.drawSiteMapUrl();    }    // drawLoginButton    public String drawLoginButton()        throws JahiaException { return drawButton( drawLoginLauncher(), "login" ); }    public String drawLoginButton( int destinationPageID )        throws JahiaException { return drawButton( drawLoginLauncher( destinationPageID ), "login" ); }    // drawLogoutButton    public String drawLogoutButton()        throws JahiaException { return drawLinkButton( gui.drawLogoutUrl(), "logout" ); }    public String drawLogoutButton( int destinationPageID )        throws JahiaException { return drawLinkButton( gui.drawLogoutUrl(), "logout" ); }    // drawUpdateFieldButton    public String drawUpdateFieldButton( JahiaField theField )        throws JahiaException { return drawButton( drawUpdateFieldLauncher(theField), "update" ); }    // drawAddContainerButton    public String drawAddContainerButton( JahiaContainerList theContainerList )        throws JahiaException { return drawButton( drawAddContainerLauncher(theContainerList), "add" ); }    // drawUpdateContainerButton    public String drawUpdateContainerButton( JahiaContainer theContainer )        throws JahiaException { return drawButton( drawUpdateContainerLauncher(theContainer), "update" ); }    // drawDeleteContainerButton    public String drawDeleteContainerButton( JahiaContainer theContainer )        throws JahiaException { return drawButton( drawDeleteContainerLauncher(theContainer), "delete" ); }    // drawContainerListPropertiesButton    public String drawContainerListPropertiesButton( JahiaContainerList theContainerList )        throws JahiaException { return drawButton( drawContainerListPropertiesLauncher( theContainerList ), "list properties" ); }    // drawPagePropertiesButton    public String drawPagePropertiesButton()        throws JahiaException { return drawButton( drawPagePropertiesLauncher(), "page properties" ); }    // drawUpdateTemplateButton    public String drawUpdateTemplateButton( JahiaPageDefinition theTemplate )        throws JahiaException { return drawButton( drawUpdateTemplateLauncher(theTemplate), "template" ); }    // drawSearchButton    // DJ 03.01.2001    public String drawSearchButton ()        throws JahiaException {            String html = "";            String theUrl="";//    	        theUrl += "OpenJahiaWindow('";                theUrl += drawSearchLauncher();//    	        theUrl += "','search!'," + JS_WINDOW_WIDTH + "," + JS_WINDOW_HEIGHT + ")";            html += "<form method=\"POST\" action=\"" + theUrl + "\">\n";            html += "<input type=\"text\" name=\"search\" size=15 value=\"\">\n";            html += "<input type=submit value=\"Search\">";//            html += "<input type="Button"            html += "</form>";//            return drawButton( drawSearchLauncher(), html ) ;            return html;        }    // drawSiteMapButton    public String drawSiteMapButton()        throws JahiaException { return drawButton( drawSiteMapLauncher(), "site map" ); }   /***    * drawLauncher    * EV    15.12.2000    *    */    private String drawLauncher( String url, String windowName )    throws JahiaException    {        String html = "";        // if url = "", this means that the engine didn't grant authorisation to render        if (!url.equals("")) {            html += "OpenJahiaWindow('";            html += url;            html += "','" + windowName + "'," + JS_WINDOW_WIDTH + "," + JS_WINDOW_HEIGHT + ")";        }        return html;    } // end drawLauncher    /***        * drawButton        * EV    15.12.2000        *        */    private String drawButton( String launcher, String buttonLabel )    throws JahiaException    {        String html = "";        // if launcher = "", this means that the engine didn't grant authorisation to render        if (!launcher.equals("")) {            html += "<a href=\"javascript:";            html += launcher;            html += "\">" + buttonLabel + "</a>";        }        return html;    } // end drawButton    /***        * drawLinkButton - Draw a link but without javascript!        *        */    private String drawLinkButton( String launcher, String buttonLabel )    throws JahiaException    {        String html = "";        // if launcher = "", this means that the engine didn't grant authorisation to render        if (!launcher.equals("")) {            html += "<a href=\"";            html += launcher;            html += "\">" + buttonLabel + "</a>";        }        return html;    } // end drawButton    /**     * Generate an html anchor composed by the fieldID     *     * @author NK     */    public String drawAnchor(JahiaField theField){        if ( theField == null ){            return "";        }        StringBuffer anchor = new StringBuffer("<A NAME=");        anchor.append("field_");        anchor.append(theField.getID());        anchor.append("></A>");        return anchor.toString();    }    /**     * Generate an html anchor composed by the container list ID     *     * @author NK     */    public String drawAnchor(JahiaContainerList cList){        if ( cList == null ){            return "";        }        StringBuffer anchor = new StringBuffer("<A NAME=");        anchor.append("cList_");        anchor.append(cList.getID());        anchor.append("></A>");        return anchor.toString();    }    /**     * Generate an html anchor composed by all the container ID     *     * @author NK     */    public String drawAnchor(JahiaContainer container){        if ( container == null ){            return "";        }        StringBuffer anchor = new StringBuffer("<A NAME=");        anchor.append("container_");        anchor.append(container.getID());        anchor.append("></A>");        return anchor.toString();    }    /**     * Generate an html anchor composed by the page ID     *     * @author NK     */    public String drawAnchor(JahiaPage page){        if ( page == null ){            return "";        }        StringBuffer anchor = new StringBuffer("<A NAME=");        anchor.append("page_");        anchor.append(page.getID());        anchor.append("></A>");        return anchor.toString();    }} // end HTMLToolBox

⌨️ 快捷键说明

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