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

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

?? smartpopuptabletool.java

?? JAVA開源LDAP瀏覽器jxplorer的源碼!
?? JAVA
字號:
package com.ca.directory.jxplorer.viewer.tableviewer;

import com.ca.commons.cbutil.*;
import com.ca.commons.naming.DN;
import com.ca.commons.naming.RDN;

import javax.swing.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.logging.Logger;
import java.util.logging.Level;

    /**
     *    This is the small popup menu that appears when a manager right-clicks
     *    (or system-dependant-whatever-s) on the attribute editing table, allowing them
     *    to cut/copy/paste/delete/rename tree elements
     */
     
public class SmartPopupTableTool extends JPopupMenu 
    implements ActionListener
{

    JMenuItem delete, newValue, makeNaming, removeNaming;  // displayable menu options for user input

    JTable table;                      // the table displaying the data - NOT CURRENTLY USED

    AttributeTableModel model;         // the data model - used to insert values into

    String attributeName = null;       // the currently selected attribute class name 
    
    int currentRow;                    // the currently selected row.

    AttributeValue currentValue;       // type of currently selected table row
    
    AttributeType currentType;         // value of currently selected table row
        
    DN currentDN = null;               // used by the cache system?
    //RDN currentRDN = null;             // used for naming attribute magic.

    AttributeValueCellEditor cellEditor = null;     //TE: to stop cell editing.

        private static Logger log = Logger.getLogger(SmartPopupTableTool.class.getName());

    /**
     *    Constructor initialises the drop down menu and menu items, 
     *    and registers 'this'
     *    component as being the listener for all the menu items.
     */

    public SmartPopupTableTool(JTable t, AttributeTableModel m)
    {
        table = t;
        model = m;
        add(newValue = new JMenuItem(CBIntText.get("Add Another Value")));
        add(delete = new JMenuItem(CBIntText.get("Delete Value")));
        add(makeNaming = new JMenuItem(CBIntText.get("Make Naming Value")));
        add(removeNaming = new JMenuItem(CBIntText.get("Remove Naming Value")));
        
        removeNaming.setVisible(false);
        
        newValue.addActionListener(this);
        delete.addActionListener(this);
        makeNaming.addActionListener(this);
        removeNaming.addActionListener(this);
        
        setVisible(false);
    }

    /**
     *    Set the name of the attribute being operated with.
     *    That is, for new Value creation.
     */
     
    public void registerCurrentRow(AttributeType type, AttributeValue value, int row, RDN currentRDN)
    {
        currentType = type;
        currentValue = value;
        currentRow = row;
        
        if (currentType.toString().equalsIgnoreCase("objectclass"))
        {
            newValue.setEnabled(false);        
            delete.setEnabled(false);
        }
        else
        {
            newValue.setEnabled(true);        
            delete.setEnabled(true);
        }
        
        if (value.isNaming())
        {
            
            if (currentRDN != null)  // which it never should
            {
                if (currentRDN.size() > 1)
                    removeNaming.setVisible(true);
                else
                    removeNaming.setVisible(false);
            }
            makeNaming.setVisible(false);
        }
        else
        {
            if (currentRDN != null)
            {
                if (currentRDN.toString().indexOf(type.toString() + "=") > -1) // i.e. if we already have a naming att of this type...
                    makeNaming.setVisible(false);   // don't let the user add another one.
                else if (currentType.isMandatory())     
                    makeNaming.setVisible(true);
                else               
                    makeNaming.setVisible(false);
            }
            removeNaming.setVisible(false);
        }
        
    }

    /**
     *  This handles the menu item actions.  They rely on   
     *  the attributeName String being set prior to this method being called
     *  (usually by setAttributeName() above).  Most of the action
     *  handling is simply tossing arguments to JTable,
     *
     *  @param ev the active event, i.e. the menu item selected
     */
     
    public void actionPerformed(ActionEvent ev)
    { 
        setVisible(false);
    
        Object eventSource = ev.getSource();
        if (eventSource == newValue)
        {
            cellEditor.stopCellEditing();   //TE: bug fix 3107
            newValue();
        }    
        else if (eventSource == delete)
        {
            delete();
        }
        else if (eventSource == removeNaming)
        {
            removeRDNComponent();
        }
        else if (eventSource == makeNaming)
        {
            addRDNComponent();
        }
        else  // should never happen...
            log.log(Level.WARNING, "Unknown event in popup menu:\n", ev);
        
        repaint();            
    }    


    public void newValue()
    {
        int type = currentType.isMandatory()?AttributeType.MANDATORY:AttributeType.NORMAL;
        String attName = currentType.getValue();
        AttributeValue newVal; 
        if (currentValue.isBinary())
        {
            newVal = new AttributeValue(attName, null);
            newVal.setBinary(true);
        }    
        else            
            newVal = new AttributeValue(attName, "");

        model.addAttribute(attName, newVal, type, currentRow+1);
        model.fireChange();
    }

    public void delete()
    {
        model.deleteAttribute(currentType.getValue(), currentRow);
        if (currentValue.isBinary())
            currentValue.setValue(null);
        model.fireChange();
        
        if((currentType.getValue()).equalsIgnoreCase("jpegPhoto"))    //TE: deletes the temporary files associated with the current entry.
            CBCache.cleanCache(currentDN.toString());
    }
    

    public void removeRDNComponent()
    {
        if (model.getRDNSize() == 1)
            CBUtility.error(CBIntText.get("Cannot remove the last naming component!"));
        else
            model.removeNamingComponent(currentType, currentValue);
    }
    
    public void addRDNComponent()
    {
        if (currentValue.isBinary())
            CBUtility.error(CBIntText.get("Binary naming components are not supported."));    
        else if (currentValue.isEmpty())
            CBUtility.error(CBIntText.get("A Naming Component must have an actual value."));
        else
            model.addNamingComponent(currentType, currentValue);            
    }

    
    public void setDN(DN dn)
    {
        currentDN = dn;
        //currentRDN = dn.getLowestRDN();
    }


    /**
     * registers the cell editor.  TE: for bug fix 3107.
     * @param myEditor the cell editor.
     */

    public void registerCellEditor(AttributeValueCellEditor myEditor)
    {
        cellEditor = myEditor;
    }
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日本视频中文字幕一区二区三区| 99国产精品一区| 国产精品一卡二卡在线观看| jizzjizzjizz欧美| 日韩三区在线观看| 国产精品网站导航| 中文字幕精品综合| 麻豆91精品视频| 成人免费视频一区| 精品嫩草影院久久| 亚洲精品videosex极品| 日本欧美韩国一区三区| 91亚洲精华国产精华精华液| 精品日韩一区二区| 日韩福利视频导航| 91视频一区二区三区| 欧美大白屁股肥臀xxxxxx| 亚洲欧洲美洲综合色网| 久久激五月天综合精品| 欧美日韩在线精品一区二区三区激情 | 日本三级亚洲精品| 一本色道久久综合狠狠躁的推荐| 欧美成人午夜电影| 欧美一级专区免费大片| 五月婷婷激情综合| 91美女精品福利| 国产精品久久久久久久久免费樱桃| 秋霞午夜av一区二区三区| 日本精品一级二级| 亚洲精品欧美综合四区| 成人性生交大片免费看中文| 久久久久国产成人精品亚洲午夜| 免费人成黄页网站在线一区二区| 91麻豆精东视频| 亚洲麻豆国产自偷在线| 成人av网站免费| 欧美电影一区二区| 喷白浆一区二区| 欧美日韩久久久| 奇米精品一区二区三区在线观看| 欧美亚洲一区二区三区四区| 国产精品电影院| 97精品国产露脸对白| 国产精品视频一区二区三区不卡| 成人免费看片app下载| 国产肉丝袜一区二区| 韩国三级在线一区| 国产精品国产三级国产aⅴ无密码| 国产一区二区中文字幕| 日韩欧美在线不卡| 国产一区二区三区最好精华液| 日韩一区二区三区在线视频| 九九国产精品视频| 2021久久国产精品不只是精品| 日韩国产成人精品| 国产日产欧美一区二区视频| 国产成人午夜视频| 国产精品成人午夜| 在线观看av不卡| 亚洲福利视频一区二区| 精品福利在线导航| 国产乱码一区二区三区| 欧美丝袜第三区| 国产精品综合网| 国产日韩欧美高清| 色94色欧美sute亚洲线路二| 亚洲一区二区三区四区在线观看| 色视频一区二区| 精品一二三四在线| 国产精品久线在线观看| 日韩一区二区三区视频| 国产在线精品一区二区不卡了| 久久天天做天天爱综合色| 99久久国产综合色|国产精品| 亚洲私人影院在线观看| 精品三级av在线| 成人福利视频在线看| 亚洲一区二区av电影| 国产婷婷一区二区| 91网站最新地址| 麻豆精品一区二区综合av| 国产欧美精品区一区二区三区 | 亚洲桃色在线一区| 欧美日韩一区二区三区免费看| 国产一区二区三区四区在线观看| 欧美高清在线一区二区| voyeur盗摄精品| 久久国内精品自在自线400部| 国产精品久久毛片| 26uuu亚洲综合色| 99re这里只有精品6| 日韩福利视频导航| 亚洲已满18点击进入久久| 久久久噜噜噜久久中文字幕色伊伊 | 成人少妇影院yyyy| 经典三级一区二区| 亚洲精品成人精品456| 欧美xxxx老人做受| 欧美一级高清片| 91福利资源站| 99久久精品国产导航| 久久69国产一区二区蜜臀| 一级女性全黄久久生活片免费| 国产清纯白嫩初高生在线观看91 | 亚洲精品久久嫩草网站秘色| 久久久久久久性| 久久综合狠狠综合久久综合88 | 中文字幕精品—区二区四季| 欧美一区二区三区在线观看 | 欧美日韩欧美一区二区| 成人av电影在线播放| 国产麻豆成人传媒免费观看| 一区二区免费看| 国产精品剧情在线亚洲| 欧美精品一区二区三区蜜桃| 欧美亚洲愉拍一区二区| 91论坛在线播放| 99久久久精品| 91免费国产视频网站| 成人午夜精品在线| 国产精品一区2区| 国产·精品毛片| 国产激情视频一区二区三区欧美 | 久久午夜羞羞影院免费观看| 欧美一区二区三区免费在线看| 色婷婷久久99综合精品jk白丝| 91一区一区三区| 成人av在线资源网站| 91精品福利在线一区二区三区| 欧美剧情片在线观看| 欧美三级欧美一级| 欧美色成人综合| 欧美日本一区二区三区| 欧美性三三影院| 日韩欧美国产1| 久久综合九色综合欧美98| 国产精品美日韩| 国产精品超碰97尤物18| 亚洲美女区一区| 人人狠狠综合久久亚洲| 久久av中文字幕片| 本田岬高潮一区二区三区| av男人天堂一区| 91尤物视频在线观看| 91麻豆精品国产91| 日韩欧美一区在线| 国产精品视频线看| 成人免费在线观看入口| 午夜精品一区二区三区电影天堂| 日韩二区三区在线观看| 韩国在线一区二区| 在线免费观看成人短视频| 欧美精品v国产精品v日韩精品| 久久精品亚洲乱码伦伦中文| 国产精品嫩草99a| 亚洲精品视频免费看| 精品制服美女丁香| 成人深夜福利app| 日韩写真欧美这视频| 久久久天堂av| 日欧美一区二区| 国产美女久久久久| 91蝌蚪国产九色| 日本一区二区三区国色天香 | 色综合天天综合狠狠| 日韩一区二区三区电影在线观看 | 欧美日韩国产不卡| 2欧美一区二区三区在线观看视频| 国产精品看片你懂得| 蜜臀av性久久久久蜜臀aⅴ流畅 | 三级久久三级久久| 成人一区二区视频| 欧美三区在线观看| 国产欧美综合在线| 看片的网站亚洲| 91在线看国产| 国产日韩欧美亚洲| 天天综合色天天| 国产精品影视在线| 成人白浆超碰人人人人| 欧美成人精品福利| 亚洲线精品一区二区三区八戒| 国产一区二区视频在线播放| 欧美天堂亚洲电影院在线播放| 日韩一区二区影院| 亚洲最大色网站| 国产大片一区二区| 欧美一区二区网站| 日韩激情一区二区| 91久久精品一区二区三区| 国产日韩v精品一区二区| 日本不卡视频在线| 欧美网站大全在线观看| 一区二区成人在线| 成人午夜私人影院| 国产精品丝袜久久久久久app| 久久99精品久久久久久动态图 | 成人精品小蝌蚪| 91麻豆精品国产无毒不卡在线观看| 亚洲午夜三级在线|