亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? htmltemplatedisplay.java

?? JAVA開源LDAP瀏覽器jxplorer的源碼!
?? JAVA
?? 第 1 頁 / 共 5 頁
字號:

            if (templateName.length() > prefixSize)
            {
                String templateRelativeFileName = CBParse.replaceAllChar(new StringBuffer(templateName), '/', File.separator);

                File pluginTemplateFile = new File(pluginDirectory + File.separator + templateRelativeFileName);

                try
                {
                    // See if we need to unpack this template file because it doesn't already exist, or is newer than
                    // the cached version.
                    if ((pluginTemplateFile.exists() == false) ||
                            (pluginTemplateFile.lastModified() < resourceLoader.getLastModified(templateName)))
                    {
                        if (templateRelativeFileName.endsWith(File.separator)) // it's a directory - just make it!
                        {
                            pluginTemplateFile.mkdirs();
                        }
                        else
                        {
                            if (!pluginTemplateFile.getParentFile().exists())
                                pluginTemplateFile.getParentFile().mkdirs();

                            byte[] b = resourceLoader.getResource(templateName);	//TE: read the resource into a byte array.

                            try
                            {
                                FileOutputStream output = new FileOutputStream(pluginTemplateFile);
                                output.write(b);
                                output.close();
                            }
                            catch (java.io.IOException e)
                            {
                                CBUtility.error("Problem writing unpacked plugin template file: " + pluginTemplateFile + " to disk \n  ", e);
                            }
                        }
                    }
                }
                catch (ZipException e)
                {
                    CBUtility.error("Problem accessing plugin zip file: " + e);
                }
            }
        }
/*XXX NEEDED???
        if (zipTemplates!=null)
        {	//TE: add any templates to the combo box...
            for(int j=0;j<zipTemplates.length;j++)
            {
                if (zipTemplates[j].endsWith(".html") || zipTemplates[j].endsWith(".htm"))
                {
                    templateNames.add(zipTemplates[j].substring(10));	//TE: cut the prefix 'templates/' off the name of the HTML template for normal oc display handling.
                }
            }
        }
*/
    }

    /**
     * CONSTRUCTOR METHOD: Finds and sets up the start page displayed when JX first loads.  This can be localised.
     * XXX
     * XXX URL MAGIC: This will fail on pathalogical urls, since Sun's file URL Loader can't cope with special
     * XXX            characters in file names (e.g. '#', '@' etc).  We go to insane lengths to handle this in the
     * XXX            template stuff by loading the html text manually via a file reader, and then massaging the
     * XXX            html - but I can't be bothered doing it for this one special case.
     * XXX
     */
    private void setStartPage()
    {

        if (editor == null) editor = getNewEditor();


        String htmldocs = myProperties.getProperty("dir.htmldocs", JXplorer.localDir + "htmldocs" + File.separator);
        try
        {
            final String language = Locale.getDefault().getLanguage();
            File localeSpecificStartFile = new File(htmldocs + startFile + "_" + language + ".html");
            if (localeSpecificStartFile.exists() == false)
            {
                log.warning("unable to find locale specific start file: " + localeSpecificStartFile);
                localeSpecificStartFile = new File(htmldocs + startFile + ".html");
                if (localeSpecificStartFile.exists() == false)
                {
                    log.warning("unable to find locale specific start file: " + localeSpecificStartFile);
                    editor.setText("<html><head><title>JXplorer Start Screen</title></head>" +
                                   "<body><h2><font face=\"arial\">Welcome to JXplorer...</font></h2><p>" +
                                   "<font face=\"arial\">This panel will display the results of your directory browsing and searches.</font></p>" +
                                   "<p><font face=\"arial\">If you need any assistance, use the help option on the menu bar above.</font></p>" +
                                   "</body></html>");
                    validate(); // necessary?
                    return;
                }
            }
            openPage(localeSpecificStartFile.toURL());
            validate();  // necessary?
        }
        catch (IOException e)
        {
            log.warning("unable to open welcome page.  " + e);
        }
    }

    /**
     * <p>CONSTRUCTOR METHOD: Sets up the GUI components; the combo box and the display pane.</p>
     * @param owner the parent GUI to initialise from.
     */
    private void initGUI(Component owner)
    {
        setLayout(new BorderLayout());
        NODATA = "<html><head><title>" + CBIntText.get("No Data") + "</title></head><body><h2><font face=\"arial\">" + CBIntText.get("Select an entry to view data") + "</font></h2></body></html>";
        NOVALUEFOUND = "<i>" + CBIntText.get("No Value Found") + "</i>";
        viewport = new JViewport(); // was CBViewport
        scrollDisplay = new JScrollPane();
        initToolBar();
        add(toolBar, BorderLayout.NORTH);
        add(scrollDisplay);
        htmlEditorKit = new MyHTMLEditorKit(this);
        hyperlinkListener = new MyHyperlinkListener();
        editor = getNewEditor();
        viewport.setView(editor);
        scrollDisplay.setViewport(viewport);
        display = owner;
    }

    private void initMyProperties(Properties props)
    {
        if (props == null)
        {
            CBUtility.error("unable to find html templates", new Exception("Null properties list passed to HTML template display - unable to use templates..."));
            myProperties = new Properties();
        }
        else
            myProperties = props;
    }

    /**
     *	Checks whether a particular candidate string corresponds to the name of a template
     *  in the viewTemplates combo box.
     *  @return whether it exists.
     */

    protected boolean templateExists(String candidate)
    {
/*
    	if (candidate.endsWith(".htm"))									// trim .htm?
    		candidate = candidate.substring(0, candidate.length()-4);   // extension to match
    	else if(candidate.endsWith(".html"))						    // with template names
    		candidate = candidate.substring(0, candidate.length()-5);
*/


        for (int i = 0; i < viewTemplates.getItemCount(); i++)
        {
            String name = (String) viewTemplates.getItemAt(i);
            if (name.equalsIgnoreCase(candidate)) return true;          // CASE SENSITIVE CODE
        }
        return false;
    }

    /**
     *    Sets up the initial tool bar.  The toolbar should have different numbers of
     *    components visible, depending on the users privileges and whether
     *    or not they're actively editing the page...
     */

    public void initToolBar()
    {
        toolBar = new JToolBar();
        String[] errorMessage = {CBIntText.get("no templates found")};
        String[] templates = readTemplateNames(new String[]{});
        if (templates == null || templates.length == 0)
            templates = errorMessage;

        viewTemplates = new CBJComboBox(templates);
        viewTemplates.setEditable(false);
        viewTemplates.setAlignmentY(Component.TOP_ALIGNMENT);

        viewTemplates.setToolTipText(CBIntText.get("Select a template to view attributes with"));

        toolBar.add(viewTemplates);

        /*
         *    Add Action Listeners to the different Tool Bar Components
         */
        viewTemplates.addActionListener(new ActionListener()
        {
            public void actionPerformed(ActionEvent e)
            {
                if (settingUpTemplates == true) return;              // ignore 'changes' that are simply adding options to combo box.

                if ((e == null) || (e.getSource() == null)) return;     // sanity check
                if (viewTemplates.getSelectedItem() == null) return; // sanity check

                String templateName = viewTemplates.getSelectedItem().toString();
                if (templateName.equalsIgnoreCase(currentTemplateName)) return;   // nothing *really* happened  // CASE SENSITIVE CODE

                setNewTemplate(templateName);

                repaint();
            }
        });

    }


    public void setNewTemplate(String templateName)
    {
        String current = (String) viewTemplates.getSelectedItem();
        if (templateName.equalsIgnoreCase(current) == false)                       // CASE SENSITIVE CODE
        {
            viewTemplates.setSelectedItem(templateName);
        }
        currentTemplateName = templateName;

        openNewTemplate(templateName);
        displayEntry(currentEntry, currentDataSource);         // same old data, different template
    }


    /**
     *   Adds an array of files to the templateNames list (which eventually turns
     *   into the displayed combo box).
     */

    private void addFileListToTemplateNames(ArrayList templateNames, File[] fileList)
    {
        if (fileList == null)
        {
            return;
        }

        for (int i = 0; i < fileList.length; i++)
        {
            templateNames.add(fileList[i].toString());
        }
    }

    /**
     *  Creates the set of html template names corresponding to a given set of objectClassNames.
     */

    public String[] readTemplateNames(String[] objectClassNames)
    {
        //printTemplates();

        // This is the list of available templates that will be displayed in the combo box.
        ArrayList templateNames = new ArrayList();

        // Always add in the defaults...
        addFileListToTemplateNames(templateNames, (File[]) templates.get(DEFAULT));

        // Now find the templates for each known object class, and store those.
        for (int classNo = 0; classNo < objectClassNames.length; classNo++)
        {
            String className = objectClassNames[classNo].toLowerCase();
            addFileListToTemplateNames(templateNames, (File[]) templates.get(className));
        }

        // dump the stored names into a string array
        String[] templates = (String[]) templateNames.toArray(new String[templateNames.size()]);

        Arrays.sort(templates);

        return templates;
    }


    /**
     *    Try to open a new template.  Try both ".html" and ".htm"
     *    extensions if necessary.  Start in subdirectory (for object
     *    class specific templates) and then try the default template
     *    directory for general templates.
     */

    public boolean openNewTemplate(String templateName)
    {
        // Try to open the template file in the normal templates directory
        File templateFile = new File(baseTemplateDir, templateName);
        if (templateFile.exists() == false)
        {
            //... if that fails, try to find it in the plugin directory...
            templateFile = new File(pluginTemplateDirectory, templateName);
            if (templateFile.exists() == false)
                return CBUtility.error(display, CBIntText.get("Can't find html template! ") + templateName);
        }

        try
        {
            htmlText = new StringBuffer(CBUtility.readTextFile(templateFile));

            // parse file and set paths correctly
            htmlText = parseNewTemplate(htmlText, templateFile.toURI().toURL());
            baseText = htmlText.toString();  // set the base template text.
        }
        catch (IOException e)
        {
            return CBUtility.error(display, CBIntText.get("Can't read html template! ") + templateFile.getAbsolutePath());

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美日韩小视频| 亚洲精品一区二区三区四区高清 | 欧美性色欧美a在线播放| 麻豆91在线播放| 亚洲精品中文字幕在线观看| 日韩欧美中文字幕一区| 色伊人久久综合中文字幕| 狠狠色伊人亚洲综合成人| 亚洲一二三区视频在线观看| 久久综合九色综合97婷婷女人| 欧美中文一区二区三区| 成人一区在线看| 久久99国产精品久久99 | 蜜臀99久久精品久久久久久软件| 欧美国产精品久久| 欧美成人国产一区二区| 欧美亚洲动漫精品| 不卡视频免费播放| 国产传媒久久文化传媒| 日本不卡一二三| 亚洲成人综合在线| 国产精品国产自产拍高清av| 欧美成人aa大片| 在线播放国产精品二区一二区四区 | 欧美一区二区美女| 在线一区二区视频| 色综合久久中文字幕综合网| 国产盗摄视频一区二区三区| 国内偷窥港台综合视频在线播放| 麻豆91在线看| 日日夜夜免费精品视频| 亚洲综合色视频| 亚洲精品国产高清久久伦理二区| 国产精品嫩草久久久久| 国产网站一区二区三区| 26uuu国产一区二区三区 | 综合色天天鬼久久鬼色| 国产精品丝袜一区| 国产欧美日韩亚州综合| 国产喂奶挤奶一区二区三区| 久久久久久免费毛片精品| 久久一区二区视频| 久久久久久久久99精品| 久久久久久综合| 国产无一区二区| 日本一区二区三区免费乱视频| 欧美激情一区二区在线| 国产三级精品在线| 中文字幕av免费专区久久| 国产精品丝袜在线| 日韩美女视频一区二区| 亚洲男同1069视频| 亚洲国产精品久久久久婷婷884 | 综合久久久久综合| 亚洲欧美偷拍卡通变态| 亚洲综合免费观看高清完整版| 亚洲一区二区三区在线看| 亚洲一区二区三区四区五区中文| 亚洲一区二区三区在线播放| 亚洲高清久久久| 久久精品国产一区二区三区免费看| 美国十次了思思久久精品导航| 久久99久久99| 大白屁股一区二区视频| 99热99精品| 欧美日韩在线播放三区| 日韩精品一区二区三区视频| 久久久.com| 亚洲视频图片小说| 日本午夜一区二区| 国产精品亚洲专一区二区三区| av中文字幕亚洲| 欧美日韩在线电影| 久久亚洲精品小早川怜子| 国产精品福利在线播放| 午夜精品久久久| 国产传媒久久文化传媒| 色综合欧美在线视频区| 4438x成人网最大色成网站| 久久精品夜夜夜夜久久| 一区二区三区资源| 国内外成人在线视频| 91丨九色porny丨蝌蚪| 91精品在线麻豆| 欧美精彩视频一区二区三区| 亚洲高清视频的网址| 国产精品羞羞答答xxdd| 欧美自拍偷拍一区| 久久久不卡网国产精品一区| 亚洲图片欧美色图| 国产福利精品一区二区| 欧美日韩一卡二卡三卡| 中文字幕+乱码+中文字幕一区| 亚洲成人免费看| 成人av网站免费| 欧美一区二区三区系列电影| 中文字幕一区视频| 极品少妇xxxx偷拍精品少妇| 日韩三级视频中文字幕| 亚洲人午夜精品天堂一二香蕉| 另类专区欧美蜜桃臀第一页| 在线欧美小视频| 国产三级精品三级| 五月婷婷综合在线| 99久久免费视频.com| 久久亚洲欧美国产精品乐播| 日日夜夜一区二区| 在线亚洲一区二区| 国产精品色噜噜| 久久成人久久鬼色| 欧美日韩精品综合在线| 中文字幕一区日韩精品欧美| 国产最新精品免费| 日韩欧美123| 日韩精品五月天| 91福利精品视频| 中文字幕视频一区| 福利一区在线观看| 久久久亚洲综合| 精品一区二区久久| 日韩精品中文字幕一区二区三区| 亚洲一区二区欧美激情| 日本高清免费不卡视频| 中文字幕中文字幕中文字幕亚洲无线| 国内精品伊人久久久久av影院 | 国产一区二区毛片| 欧美一区二区三区免费在线看| 亚洲一区视频在线| 色视频成人在线观看免| 亚洲欧洲99久久| 99精品欧美一区二区三区小说 | 天天综合日日夜夜精品| 日本高清不卡aⅴ免费网站| 中文字幕佐山爱一区二区免费| 成人在线综合网| 国产精品丝袜在线| 成人av资源下载| 亚洲欧洲美洲综合色网| 99热99精品| 尤物在线观看一区| 在线免费不卡视频| 一个色妞综合视频在线观看| 91丝袜国产在线播放| 一区二区三区免费| 欧美三级在线播放| 日本午夜一本久久久综合| 日韩一区二区三区三四区视频在线观看| 日韩av一级电影| 精品人伦一区二区色婷婷| 国产精品自在欧美一区| 国产精品久久久久久久蜜臀| www.爱久久.com| 亚洲欧美激情插| 欧美日韩精品欧美日韩精品一| 亚洲a一区二区| 精品日韩一区二区三区| 国产剧情一区二区三区| 中文字幕中文字幕中文字幕亚洲无线| 93久久精品日日躁夜夜躁欧美| 亚洲免费看黄网站| 欧美精品99久久久**| 久久99久久精品欧美| 中文字幕免费在线观看视频一区| 99久久精品国产网站| 亚洲1区2区3区4区| 2021国产精品久久精品| 国v精品久久久网| 一区二区三区蜜桃| 日韩一级完整毛片| 成人中文字幕电影| 午夜一区二区三区在线观看| 精品国产一区二区精华| www..com久久爱| 丝袜国产日韩另类美女| 久久综合狠狠综合久久综合88 | 欧美人伦禁忌dvd放荡欲情| av日韩在线网站| 日本va欧美va精品发布| 国产日韩欧美a| 欧美日韩小视频| 粉嫩蜜臀av国产精品网站| 亚洲伊人色欲综合网| 精品国产一区二区三区av性色| 99视频超级精品| 久久草av在线| 亚洲区小说区图片区qvod| 欧美成人精品3d动漫h| 91美女在线观看| 精品一区二区三区的国产在线播放| 国产精品久久久久毛片软件| 日韩一区二区三区视频在线观看| av在线一区二区三区| 久久 天天综合| 亚洲电影中文字幕在线观看| 亚洲精品一区二区三区影院| 欧美三区免费完整视频在线观看| 国产福利视频一区二区三区| 丝瓜av网站精品一区二区| 国产精品久久久久久久久晋中 | 久久久99免费|