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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? attributevaluecelleditor.java

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

        if (att.isEmpty())
        {
            label.setText(" ");
        }
        else
        {
            label.setText(att.getStringValue());    //TE: sets the table label to reflect the changes.
        }

        editorComponent = label;
    }

   /**
    *   Sets the postal address editor in the table cell whose attribute is
    *   a postalAddress ["1.3.6.1.4.1.1466.115.121.1.7"].
    *   @param att the attribute value to be set in the editor.
    */
    private void setBooleanEditor(AttributeValue att)
    {                              
        booleaneditor booleanEditor = new booleaneditor(owner, att);
        specialStringEditor = true;
        CBUtility.center(booleanEditor, owner);    	//TE: centres the attribute editor.
        booleanEditor.setStringValue(att);
        booleanEditor.setVisible(true);

        if (att.isEmpty())
        {
            label.setText(" ");
        }
        else
        {
            label.setText(att.getStringValue());    //TE: sets the table label to reflect the changes.
        }

        editorComponent = label;
    }

   /**
    *	Returns the syntax of the attribute value that is supplied
    *	@param att the attribute value for example 'Fred' from 'cn=Fred'.
	*	@return the syntax of the attribute for example for postalAddress the return string would be:
	*		'SYNTAX: 1.3.6.1.4.1.1466.115.121.1.41'.  If it fails to find the schema, it returns
    *       '1.3.6.1.4.1.1466.115.121.1.15' (DirectoryString) as a default.
	*/
	public String getAttributeSyntax(AttributeValue att)
	{
		String attID = att.getID();
        return getAttributeSyntaxFromName(attID);
    }

    /**
     *   This looks up the attribute syntax using the name of the attribute.
     * If none is found, it also checks to see if it is a 'SUP' of another
     * attribute, and tries to recursively get the schema from that.
     *  @param attID the name of the attribute to look up; e.g. 'cn'
     *  @return the syntax of the attribute (usually an OID, e.g. "1.3.6.1.4.1.1466.115.121.1.15")
     */
    private String getAttributeSyntaxFromName(String attID)
    {
        if (attID.indexOf(';') > 0)
            attID = attID.substring(0, attID.indexOf(';'));									//TE: for example: userCertificate;binary.

        try
        {
            if (datasource == null)
                throw new NamingException("No datasource!");

            SchemaOps schema = datasource.getSchemaOps();
            if (schema == null)
                throw new NamingException("No schema!");
                                               //TE: gets the schema.
            Attributes attSchema = schema.getAttributes("AttributeDefinition/" + attID);    //TE: gets the attribute definition.

            if (attSchema == null)
                throw new NamingException("No schema for AttributeDefinition/"+attID);

            Attribute attSyntax = attSchema.get("SYNTAX");                                  //TE: gets the Syntax of the attribute .

            if (attSyntax == null)                                              // maybe it's a 'SUP' entry...
            {
                Attribute supSchema = attSchema.get("SUP");
                if (supSchema == null)
                    throw new NamingException("Error processing attribute definition for " + attID + " no schema and no sup entry found");

                if (supSchema.get().toString().equals(attID))                   // 'SUP' is always single valued
                    throw new NamingException("recursive schema definition: " + attID + " sup of itself");

                return getAttributeSyntaxFromName(supSchema.get().toString());  // recursively find the syntax of the sup entry
            }
            else
            {
                String syntax = attSyntax.toString();
                if (syntax.startsWith("SYNTAX: "))
                    syntax = syntax.substring(8);
                return syntax;
            }
        }
        catch (NamingException e)
        {
            log.log(Level.WARNING, "Problem processing attribute definition: ", e);
            return "1.3.6.1.4.1.1466.115.121.1.15";  // default to 'DirectoryString'
        }
    }

   /**
    *    Does a quick check to make the binary handling sane (if necessary)
    *    before calling the super class stopCellEditing.
    */
     // Enough casts to fill a hindu temple.
    public boolean stopCellEditing()
    {
        if (binaryEditFlag)
        {
            return super.stopCellEditing();
        }
        else if (specialStringEditor)
        {
            return super.stopCellEditing();
        }

        Object o = getCellEditorValue();
        if (o == null) return true;  // not actually editing - redundant call.

        if (o instanceof AttributeValue)
        {
            AttributeValue v = (AttributeValue)o;

            if (editorComponent instanceof JTextField)
            {
                String userData = ((JTextField)editorComponent).getText();
                // Bug 4891 - limit the user to entering only a single space.
                int len = userData.length();
                if (len > 0)
                {
                    userData.trim();
                    if (userData.length() == 0)
                        userData = " ";  // multiple spaces are shortened to a single space. Technically we should

                    if (userData.length() != len)
                        ((JTextField)editorComponent).setText(userData);
                }
                v.update(userData);
            }
            else if (editorComponent instanceof CBJComboBox)
                v.update(((CBJComboBox)editorComponent).getSelectedItem());
            else
                log.warning("unknown editorComponent = " + editorComponent.getClass());
        }
        else
            log.warning("(AttValCellEdit) Not an Att Val: is " + o.getClass());

        setCellEditorValue(o);

        return super.stopCellEditing();
    }

   /**
    *    Checks if the user has clicked sufficient times to make the cell
    *    editable.
    */
    public boolean isCellEditable(EventObject e)
    {
        boolean editable = true;
        if (e instanceof MouseEvent)
        {
            editable = ((MouseEvent)e).getClickCount() >= clickCountToStart;
        }
        return editable;
    }

   /**
    *    Kicks of a separate binary editor by looking for a Java class with
    *    name of the attribute, plus the word 'Editor', and starting that
    *    up if it can be found.  (Otherwise it uses the default editor).
    */
    public void startBinaryEditor(AttributeValue att)
    {
        if (abstractEditor != null &&
            (abstractEditor instanceof Component) &&
            ((Component)abstractEditor).isVisible() )        //TE: checks if an editor is already open (i.e. if multiple clicks on a value in the table editor).
        {
            return;                                          //TE: do nothing...there is already an editor open.
        }

        if (att.isBinary()==false)  // should never happen!
            {log.warning("Error: non binary value passed to binary editor!"); return; }

        String attName = att.getID();
        int trim = attName.indexOf(";binary");
        if (trim>0)
            attName = attName.substring(0,trim);

        String className = "com.ca.directory.jxplorer.editor." + attName + "editor";

        try
        {
            Class c = null;
            if (myLoader == null)
            {
                System.out.println("using default loader for "+className );
                c = Class.forName(className);
            }
            else
            {
                System.out.println("looking for: " + className.toLowerCase());
                c = myLoader.loadClass(className.toLowerCase());
            }
            if (abstractbinaryeditor.class.isAssignableFrom(c))
            {
                Constructor constructor;
                if (owner instanceof Frame)
                {
                    constructor = c.getConstructor(new Class[] {java.awt.Frame.class});
                    abstractEditor = (abstractbinaryeditor) constructor.newInstance(new Object[] {owner});
                }
                else
                {
                    constructor = c.getConstructor(new Class[0]);
                    abstractEditor = (abstractbinaryeditor) constructor.newInstance(new Object[0]);
                }

                abstractEditor.setValue(att);
				if(abstractEditor instanceof basicbinaryeditor)		//TE: set the current DN in the editor.
					((basicbinaryeditor)abstractEditor).setDN(currentDN);
                else if(abstractEditor instanceof defaultbinaryeditor)		//TE: set the current DN in the editor.
                    ((defaultbinaryeditor)abstractEditor).setDN(currentDN);

                if (abstractEditor instanceof defaultbinaryeditor)
                {
                    ((defaultbinaryeditor)abstractEditor).showDialog(); //todo: TE:seems that the abstractEditor doesn't get set to null after it is closed...
                    abstractEditor = null;                              //todo: TE: so this is a hack to kill the dialog so that it opens the next time a user clicks on that attribute value.  It would be nice to fix this!
                }
                else if (abstractEditor instanceof Component)
                {
                    ((Component)abstractEditor).setVisible(true);
                }

                fireEditingStopped();  // everything is now being done by the separate binary editor window...
                return;  // ...and don't load default editor (below)
            }
            else
            {
                log.warning("error: can't load editor class " + className + " since it is not inherited from AbstractBinaryEditor\n");
            }

        }
        catch (NoSuchMethodException e)
        {
            log.log(Level.WARNING, "coding error in editor " + className+ " - using default binary editor instead.", e);
        }
        catch (ClassNotFoundException e)
        {
            log.info("(expected) can not find editor " + className + "\n" + e.toString()); // 'expected' error
            try
            {
                defaultbinaryeditor dbe = new defaultbinaryeditor(owner);  // kick off the default editor (creates an option dialog)
                dbe.setDN(currentDN);
                CBUtility.center(dbe, owner);    //TE: centers the window.
                dbe.setValue(att);
                dbe.showDialog();
            }
            catch (Exception e2)
            {
                log.log(Level.WARNING, "unable to start backup editor",  e2);
                e2.printStackTrace();
            }
        }
        catch (Exception e3)
        {
            log.log(Level.WARNING, "error loading editor " + className, e3);
            e3.printStackTrace();
        }
    }

   /**
    * Optionally register a new class loader for atribute value viewers to use.
    */
    public void registerClassLoader(ClassLoader loader)
    {
        myLoader = loader;
    }

   /**
    *   Returns the datasource.
    *   @param ds the datasource.
    */
    public void setDataSource(DataSource ds)
    {
        datasource = ds;
    }

   /**
    *   Sets the dn of the entry being modified.
    *   @param dn the DN of the entry being modified.
    */
    public void setDN(DN dn)
    {
        currentDN = dn;
    }

   /**
    *    Sets the the abstract editor (display editor for binary data - e.g. the audio player, or photo viewer), to null.
    */
    public void cleanupEditor()
    {
         abstractEditor = null;
    }
}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲一区二区在线免费观看视频| 亚洲精品在线电影| 韩国中文字幕2020精品| 日本 国产 欧美色综合| 欧美精品一区二区在线观看| 91麻豆高清视频| 国模无码大尺度一区二区三区| 亚洲精品免费电影| 精品国产sm最大网站免费看| 日本韩国欧美一区二区三区| 国产精品一二三区在线| 婷婷综合五月天| 亚洲女女做受ⅹxx高潮| 久久久久99精品国产片| 欧美一区二区久久久| 日本精品一区二区三区四区的功能| 精久久久久久久久久久| 日韩av一级片| 亚洲成a人在线观看| 亚洲欧美电影一区二区| 国产精品毛片久久久久久| 精品国产乱码久久久久久夜甘婷婷 | 欧美精品精品一区| 在线观看91视频| 91在线观看污| 成人av在线资源网| 岛国精品在线观看| 国产一区二区毛片| 玖玖九九国产精品| 国产精品亚洲视频| 亚洲日本成人在线观看| 国产欧美久久久精品影院| 欧美成人精品1314www| 欧美剧在线免费观看网站| 91久久精品一区二区| 成人av免费在线观看| 国产一区999| 国产一区啦啦啦在线观看| 九一九一国产精品| 在线视频综合导航| 色噜噜偷拍精品综合在线| 99riav久久精品riav| 成人18视频日本| 91在线国产观看| 日本精品一级二级| 欧美性生活影院| 欧美男人的天堂一二区| 制服视频三区第一页精品| 欧美精品久久99久久在免费线| 51精品秘密在线观看| 日韩一级精品视频在线观看| 日韩美女视频在线| 国产色产综合色产在线视频 | 中文字幕中文字幕在线一区| 精品视频免费看| 9191久久久久久久久久久| 欧美精品第一页| 精品99一区二区| 精品va天堂亚洲国产| 欧美va天堂va视频va在线| 日韩一级二级三级精品视频| 97久久精品人人做人人爽50路| 国内精品写真在线观看| 九九在线精品视频| 国产精华液一区二区三区| 国产经典欧美精品| 成人国产精品视频| 色综合视频在线观看| 91国产免费观看| 7777精品伊人久久久大香线蕉| 欧美三片在线视频观看| 欧美日韩久久久久久| 欧美一区二区三区喷汁尤物| 欧美一卡二卡三卡四卡| 国产欧美精品一区二区三区四区| 欧美激情一区在线观看| 中文字幕亚洲不卡| 欧美在线观看视频一区二区三区| 欧美视频一区二区在线观看| 欧美丰满一区二区免费视频| 日韩欧美一级片| 国产欧美1区2区3区| 亚洲欧洲日韩av| 亚洲最新视频在线观看| 青青草国产成人99久久| 国产在线精品不卡| 国产在线精品不卡| 欧美日韩情趣电影| 精品国产乱码久久久久久夜甘婷婷 | 欧美一区二区三区免费视频| 亚洲精品在线免费播放| 欧美精品一区男女天堂| 亚洲综合免费观看高清完整版在线 | 91福利国产成人精品照片| 欧美绝品在线观看成人午夜影视| 日韩一二三区不卡| 国产精品久久久久久久久快鸭 | 日韩一二在线观看| 中文字幕免费在线观看视频一区| 亚洲一区二区三区四区在线观看| 美女国产一区二区| 99精品视频在线免费观看| 日本道色综合久久| 欧美草草影院在线视频| 18欧美亚洲精品| 久久国产乱子精品免费女| 91视频在线看| 欧美精品一区二区三区蜜臀| 中文字幕亚洲成人| 久草精品在线观看| 欧美日韩另类一区| 国产精品第一页第二页第三页| 五月综合激情网| 国产制服丝袜一区| 日韩欧美色综合| 一区二区视频免费在线观看| 国产乱码精品一区二区三区忘忧草 | 欧美美女一区二区在线观看| 国产校园另类小说区| 国产v日产∨综合v精品视频| 色视频成人在线观看免| 国产欧美日韩一区二区三区在线观看 | 在线亚洲人成电影网站色www| 久久奇米777| 午夜精品福利在线| 在线视频你懂得一区| 久久精品日韩一区二区三区| 日韩av中文字幕一区二区| 国产福利91精品| 91麻豆精品国产自产在线观看一区| 久久久亚洲欧洲日产国码αv| 视频一区欧美日韩| 欧美做爰猛烈大尺度电影无法无天| 国产日产欧美一区| 国产一区二区三区国产| 制服丝袜亚洲精品中文字幕| 亚洲黄色小视频| eeuss国产一区二区三区| 26uuu亚洲综合色| 麻豆成人综合网| 6080yy午夜一二三区久久| 亚洲国产日韩a在线播放| 色综合久久中文字幕| 欧美电影免费观看高清完整版 | 国产日韩精品视频一区| 欧美色视频在线| 在线一区二区三区做爰视频网站| 一级女性全黄久久生活片免费| www.久久精品| 欧美日韩免费高清一区色橹橹| 日韩精品一二三四| 精品国产伦理网| 色综合夜色一区| 亚洲免费资源在线播放| 欧美日韩高清影院| 激情图片小说一区| 中文子幕无线码一区tr| 日本高清视频一区二区| 秋霞影院一区二区| 国产精品久久久久三级| 欧美在线观看视频一区二区| 美女性感视频久久| 国产精品传媒在线| 日本精品免费观看高清观看| 一区二区视频在线| 精品国产123| 91丨九色丨国产丨porny| 日本不卡不码高清免费观看| 韩国欧美一区二区| 久久丝袜美腿综合| 91麻豆国产精品久久| 久久99久久99精品免视看婷婷 | 亚洲欧美综合另类在线卡通| 欧美精品成人一区二区三区四区| 国产成人av电影免费在线观看| 亚洲一区二区在线免费看| 国产调教视频一区| 在线成人高清不卡| a美女胸又www黄视频久久| 青娱乐精品在线视频| 日本一区二区三区在线不卡| 欧美一二三四区在线| 色老综合老女人久久久| 国产在线一区二区| 亚洲国产精品影院| 中文字幕在线观看一区| 91精品国产综合久久国产大片| jlzzjlzz亚洲女人18| 国产在线一区二区| 日韩电影一区二区三区四区| 国产精品久久久久久福利一牛影视| 欧美一区二区在线不卡| 91丝袜国产在线播放| 国产电影精品久久禁18| 色综合激情久久| 成人av资源在线观看| 久久精品久久精品| 日本中文在线一区| 亚洲色欲色欲www在线观看| 日韩精品一区二区三区四区|