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

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

?? attributedisplay.java

?? JAVA開源LDAP瀏覽器jxplorer的源碼!
?? JAVA
?? 第 1 頁 / 共 3 頁
字號:
                            newEdSet = true;
                        }
                    }    
                }
            }
    
            // search for non-structural editors
            try
            {
                Attribute allOCs = entry.getAllObjectClasses();
                if (allOCs != null)
                {
                    Enumeration vals = allOCs.getAll();
                    while (vals.hasMoreElements())
                    {
                        Object oc = vals.nextElement();
                        if (oc != null)
                        {
                            String ocName = oc.toString();
                            if (ocs.contains(ocName) == false) // don't bother with struct objectclasses dealt with above
                            {
                                PluggableEditor ed = getEditor(ocName);
    
                                if (ed != null)
                                {
                                    addEditor(ed);
    
                                    if (ed.isUnique())           // a special service to users...
                                        log.warning("WARNING: Illegal unique editor defined for oc: " + ocName + " not allowed - (oc not in primary structural inheritance chain)");
                                }
                            }
                        }
                    }
                }
            }
            catch (NamingException e) 
            {
                log.log(Level.WARNING, "WARNING: non-fatal exception getting object classes for plugin editors. ", e);
            }       
    
            addEditor(templateDisplay);        // and always add old faithfulls...
//XXX            
            if (entry.getStatus() != DXEntry.NEW)   // well, almost always...
                addEditor(tableDisplay);
        }            
        catch (Exception e)
        {
            log.warning("Unexpected Exception in AttributeDisplay\n" + e);
            e.printStackTrace();
        }
    }

    /**
     *    Removes all extra editors, leaves only the default html editor...
     */

//TODO: figure this out...
    public void clearEditors()
    {
        removeAll();
        activeEditors.removeAllElements();
        templateDisplay.setToDefault();
        addEditor(templateDisplay);
        tableDisplay.displayEntry(null, null);
        addEditor(tableDisplay);
    }


    /**
     *    Removes all transient editors, and ensures that the table editor
     *    and the html editor are available.
     */

    void clearPluggableEditors()
    {
        ignoreChangeEvents = true;
    
        for (int i=activeEditors.size()-1; i>=0; i--)
        {
            PluggableEditor ed = (PluggableEditor)activeEditors.get(i);
            if ( (ed != templateDisplay) && (ed != tableDisplay) )
            {
                remove(i);
            }                
        }

        if (activeEditors.contains(templateDisplay)==false)
        {
            addEditor(templateDisplay);
        }    

        if (activeEditors.contains(tableDisplay)==false)
        {
            addEditor(tableDisplay);
        }
        
        if (currentEditor != tableDisplay && currentEditor != templateDisplay)
        {
            suggestHTMLEditor();
        }                    



        ignoreChangeEvents = false;

    }


    /**
     *    This looks through a list of object classes in an attribute
     *    until it finds a unique editor corresponding to a particular
     *    value.  If no editor is found 'null' is returned.  Note that
     *    If multiple unique editors exist, which one is returned is
     *    undefined.<p>
     *
     *    @param oc the objectClass attribute; a list of object classes
     *    @return the unique pluggable editor corresponding to one particular
     *             object class value, or null if none is found.
     *
     */

    public PluggableEditor getUniqueEditor(Attribute oc)
    {
        try
        {
            Enumeration values = oc.getAll();
            while (values.hasMoreElements())
            {
                String objectClassName = (String)values.nextElement();

                PluggableEditor editor = getEditor(objectClassName);
                if (editor != null)
                {
                    if (editor.isUnique())
                        return editor;
                }
            }
            return null;
        }
        catch (Exception e)
        {
            log.log(Level.FINE, "Unable to find unique pluggable editor: ", e);
            return null;
        }
    }

    /**
     *    Gets a pluggable editor for a particular object class name.
     *    @param ocName the object class name to look up
     *    @return a corresponding editor, or null if none exists.
     */

    PluggableEditor getEditor(String ocName)
    {
        ocName = ocName.toLowerCase();

        Object editorFromHash = editors.get(PACKAGEPREFIX + ocName);

        if (editorFromHash != null)
            return castToPluggableEditor(editorFromHash, ocName);  // get it from storage

        return loadEditorFromDisk(PACKAGEPREFIX + ocName ); // may be null
    }

    /**
     *   Try to cast the object to a PluggableEditor, or return null if it is a placeholder.
     *  @param rawEditor the editor to cast (or a 'NONE' object placeholder)
     *  @param ocName the name of the editor (for error print out)
     */

    private PluggableEditor castToPluggableEditor(Object rawEditor, String ocName)
    {
        if (rawEditor == NONE)       // we have no editor for this entry, and we've already looked.
            return null;

        if (rawEditor instanceof PluggableEditor)   // already have an editor for that oc
        {
            return (PluggableEditor)rawEditor;
        }
        else
        {
            log.warning("Unexpected Class Cast Error loading plugin editor '"+PACKAGEPREFIX + ocName + "' from hashtable");
            return null;
        }
    }


    /**
     *    Look on disk for an editor with the class name 'ocName'.
     */

    PluggableEditor loadEditorFromDisk(String ocName)
    {
        // if here, we need to look on disk for a pluggable editor class...
        log.finer("looking for ocName: " + ocName);
        try
        {
            Class c = myLoader.loadClass(ocName);
            Constructor constructor = c.getConstructor(new Class[0]);
            
            
            // XXX If the pluggable editor has an error in the constructor, under some 
            // XXX circumstances it can fail so badly that this call never returns, and
            // XXX the thread hangs!  It doesn't even get to the exception handler below...
            // XXX but sometimes if the constructor fails everything works as expected.  Wierd.
            PluggableEditor editor = (PluggableEditor) constructor.newInstance(new Object[0]);
            
            editors.put(ocName, editor);         // add the new editor to our list
            return editor;
        }
        catch (Exception e)            // expected condition - just means no pluggable editor available
        {
			if (e instanceof InvocationTargetException) // rare exception - an error was encountered in the plugin's constructor.
			{
                log.warning("unable to load special editor for: '" + ocName + "' " + e);
                if (JXplorer.debugLevel >= 1)
                {
                    log.warning("Error loading plugin class: ");
				    ((InvocationTargetException)e).getTargetException().printStackTrace();
                }   
			}	
            
            log.log(Level.FINEST, "'Expected' Error loading " + ocName, e);
            editors.put(ocName, NONE);  // add a blank place holder - we can't load
                                          // an editor for this, and there's no point looking again. (change if want dynamic loading, i.e. look *every* time)
        }
        return null;  // only here if an error has occured.
    }


    /**
     *    This can be used to register Swing components that may be
     *    used by sub editors to affect the outside environment.
     */

    public void registerComponents(JMenuBar menu, JToolBar buttons, JTree tree, JPopupMenu treeMenu, JFrame jxplorer)
    {
        registerMenu     = menu;
        registerButtons  = buttons;
        registerTree     = tree;
        registerTreeMenu = treeMenu;
        registerJX       = jxplorer;
        
        // reset the sub editors as well.
        
        for (int i=0; i<activeEditors.size(); i++)
        {
            ((PluggableEditor)activeEditors.get(i)).registerComponents(menu, buttons, tree, treeMenu, jxplorer);
        }
    }


    /**
     *    Adds an editor to the current collection of active editors,
     *    and makes it a tab pane.
     */
     
    void addEditor(PluggableEditor ed)
    {
        if (activeEditors.contains(ed) == false)  // don't add editors twice!
        {
            add(ed);
            ed.registerComponents(registerMenu, registerButtons, registerTree, registerTreeMenu, registerJX);
        }
    }

    /**
     *    Adds a particular editor to the tab pane and collection of
     *    active editors, while removing all others.
     */

    void addUniqueEditor(PluggableEditor ed)
    {
        ignoreChangeEvents = true;   // don't bother the change listener until we've settled everything

        removeAll();
        addEditor(ed);
        setCurrentEditor(ed);

        ignoreChangeEvents = false;  // start the change listener listening again.
    }


	/**
	*   Refreshes the currently visible editor with new info.
	*	.
	*/
	 
	public void refreshEditors()
	{
		//TE: This method is in response to bug 367 re the fields in the
		//	HTML templates disappearing when the look and feel changes.
		//	Forcing a refresh of the page seems to solve the problem.
		//	Currently is is only being used by AdvancedOptions (yea...a bit
		//	of a lame fix).	

		if(dataSource != null)
			refreshEditors(entry, dataSource);
	}

    /**
     *    Refreshes the currently visible editor with new info.
     */

    public void refreshEditors(DXEntry entry, DataSource ds)
    {
        if (currentEditor != null)
        {
        	this.entry = entry;	//TE: make sure everything is in sink.
			dataSource = ds;
			
            currentEditor.getDataSink().displayEntry(entry, ds);

            // check that the editor hasn't changed display component
            JComponent display = currentEditor.getDisplayComponent();


            // XXX hack alert - some editor writers change their display component
            // XXX mid-flight, and expect JX to magically notice, and change the
            // XXX the display.  This code attempts to do this.
            
            if (indexOfComponent(display) == -1) // we have a problem - the display component has changed
            {
                String title = currentEditor.getName();
                ImageIcon icon = currentEditor.getIcon();
                String toolTip = currentEditor.getToolTip();

                int index = getSelectedIndex();  // find the index of the editor (XXX - this relies on the activeEditor vector tracking the inherent tab pane order)
                
                super.remove(index);
                super.insertTab(title, icon, display, toolTip, index);
                super.setSelectedIndex(index);
            }
        }
        else
            log.warning("internal error - no editor available in AttributeDisplay");

    }

     /**
      *    Return the thingumy that should be printed.
      */
    public Component getPrintComponent()
    {
        return currentEditor.getPrintComponent();
    }

    public boolean canCreateEntry() { return true; }

    public void add(PluggableEditor ed)
    {
        add(ed, getTabCount());
    }
    
    public void add(PluggableEditor ed, int index)
    {
        //add(ed.getName(), ed.getDisplayComponent()); // wierd array bounds error thrown here?
        insertTab(ed.getName(), ed.getIcon(), ed.getDisplayComponent(), ed.getToolTip(), index);
        activeEditors.add(index, ed);
    }

    public void remove(int index)
    {
        if (activeEditors.size() == 0) return;  // it can get a bit excitable about removing element 0 ...

        PluggableEditor ed = (PluggableEditor) activeEditors.remove(index);
        ed.unload();
        super.remove(index);
    }

    public void removeAll()
    {
        int size = activeEditors.size();
        for (int i=size-1; i>=0; i--)
            remove(i);

        super.removeAll();  // XXX this really shouldn't be necessary.
    }
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91在线观看成人| 精品一区二区三区免费毛片爱| 在线91免费看| 99视频精品在线| 看国产成人h片视频| 亚洲伊人色欲综合网| 国产视频一区在线播放| 91麻豆精品国产91| 色丁香久综合在线久综合在线观看| 国产一区二区三区免费在线观看| 亚洲影院在线观看| 亚洲欧美日韩国产成人精品影院| 欧美电影免费观看高清完整版在线观看| 91影院在线观看| 国产91精品欧美| 国产一区二区在线影院| 香蕉久久夜色精品国产使用方法| 中文字幕乱码日本亚洲一区二区| 欧美大片在线观看一区| 欧美日韩欧美一区二区| 一本久道中文字幕精品亚洲嫩| 国产一区二区美女诱惑| 免播放器亚洲一区| 秋霞国产午夜精品免费视频| 亚洲高清免费在线| 一区二区三区日韩精品视频| 国产精品久久久爽爽爽麻豆色哟哟 | 欧美日韩午夜精品| 91麻豆国产福利精品| 丁香一区二区三区| 国产精品一区二区x88av| 狠狠色综合播放一区二区| 日本欧美一区二区三区乱码| 亚洲一区二区三区视频在线播放| 亚洲欧美视频一区| 亚洲女厕所小便bbb| 国产精品免费aⅴ片在线观看| 久久久久亚洲综合| 国产欧美精品日韩区二区麻豆天美| 日韩欧美三级在线| 久久亚洲精品国产精品紫薇| 精品99久久久久久| 久久久久久久一区| 国产午夜精品一区二区三区嫩草 | 欧美性猛片xxxx免费看久爱| 色婷婷国产精品久久包臀 | 精品欧美乱码久久久久久1区2区| 51精品秘密在线观看| 91精品国产综合久久婷婷香蕉 | 国产精品免费视频网站| 亚洲人一二三区| 一区二区三区在线看| 亚洲午夜免费电影| 日韩成人精品在线| 国产精品综合二区| 成人黄色777网| 日本乱人伦一区| 制服丝袜日韩国产| 精品国产自在久精品国产| 国产无一区二区| 1024国产精品| 亚洲高清免费视频| 精品一区二区三区免费播放| 大陆成人av片| 91在线播放网址| 欧美一区二区精品在线| 国产亚洲一区二区三区四区| 亚洲欧美在线另类| 午夜精品久久久| 国产精品亚洲一区二区三区在线| av激情亚洲男人天堂| 欧美日韩精品欧美日韩精品| www精品美女久久久tv| 亚洲色图都市小说| 美女视频一区二区三区| 成人午夜碰碰视频| 欧美人伦禁忌dvd放荡欲情| 337p粉嫩大胆噜噜噜噜噜91av | 中文字幕一区二区三区不卡在线| 一级特黄大欧美久久久| 免费看欧美美女黄的网站| 国产91清纯白嫩初高中在线观看| 欧美性猛交一区二区三区精品| 欧美一级黄色录像| 日韩久久一区二区| 免费看欧美美女黄的网站| 99久久精品99国产精品| 精品久久国产字幕高潮| 亚洲精品国产精华液| 国产精品原创巨作av| 欧美日韩免费电影| 欧美国产亚洲另类动漫| 日韩黄色免费电影| 色悠久久久久综合欧美99| 欧美电影免费观看完整版| 亚洲综合色自拍一区| 国产a级毛片一区| 日韩欧美国产三级| 亚洲一区二区影院| 成人av资源站| 久久精品亚洲精品国产欧美| 日韩综合一区二区| 99re视频精品| 国产精品美女久久久久aⅴ国产馆| 日本91福利区| 欧美视频一区二区三区在线观看| 国产免费观看久久| 国产在线不卡视频| 91精品久久久久久久91蜜桃| 亚洲一区中文日韩| 91麻豆免费在线观看| 中文一区一区三区高中清不卡| 蜜臀久久99精品久久久久久9| 欧美偷拍一区二区| 亚洲精品高清在线观看| 99久久精品免费看国产| 亚洲国产精华液网站w| 国产剧情一区二区| 精品日韩在线观看| 蜜桃久久精品一区二区| 91精品在线免费观看| 日韩一区欧美二区| 欧美日韩三级一区| 午夜欧美在线一二页| 欧美日韩国产一二三| 亚洲国产色一区| 日本二三区不卡| 国产成人超碰人人澡人人澡| 精品福利一区二区三区| 欧美一区二区三区在线观看视频| 夜夜精品浪潮av一区二区三区| a美女胸又www黄视频久久| 中文字幕av一区二区三区高 | 色天天综合色天天久久| 17c精品麻豆一区二区免费| 99热这里都是精品| 亚洲欧美电影一区二区| 91麻豆精品视频| 一区二区免费看| 欧美日韩国产综合久久| 日韩电影在线观看网站| 日韩精品一区二区三区老鸭窝| 久久国产麻豆精品| 国产免费观看久久| 91在线观看污| 亚洲一区二区三区中文字幕在线| 在线观看视频欧美| 日欧美一区二区| 精品粉嫩超白一线天av| 国产乱码一区二区三区| 国产精品久久久久一区| 91福利国产成人精品照片| 午夜亚洲福利老司机| 精品视频一区二区三区免费| 日本少妇一区二区| 久久美女高清视频| 一本色道**综合亚洲精品蜜桃冫 | 亚洲综合视频在线观看| 91麻豆精品国产| 国产成人免费高清| 一区二区视频在线| 欧美精品久久久久久久多人混战 | 中文字幕电影一区| 在线观看亚洲一区| 极品瑜伽女神91| 自拍偷拍亚洲综合| 7777精品伊人久久久大香线蕉超级流畅 | 国产精品每日更新| 欧美日本韩国一区二区三区视频| 美女一区二区视频| 中文字幕一区二区三区视频| 欧美伦理影视网| 国产精品资源在线观看| 亚洲最新视频在线播放| 欧美成人aa大片| 色婷婷久久99综合精品jk白丝| 男女男精品视频网| 中文字幕中文字幕中文字幕亚洲无线 | a在线播放不卡| 日韩高清在线不卡| 亚洲欧美综合在线精品| 日韩一区二区麻豆国产| 岛国精品在线观看| 男人操女人的视频在线观看欧美 | 国产精品高潮呻吟| 日韩美女主播在线视频一区二区三区| 成人激情av网| 久久爱www久久做| 亚洲福利视频一区| 国产精品福利一区二区三区| 欧美一区二区三区精品| 99久久精品久久久久久清纯| 久久er精品视频| 亚洲成av人片在线观看无码| 国产欧美久久久精品影院| 制服丝袜国产精品| 欧美亚洲日本一区| av中文字幕亚洲| 国产精品99久久不卡二区| 视频一区在线播放|