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

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

?? attributedisplay.java

?? JAVA開(kāi)源LDAP瀏覽器jxplorer的源碼!
?? JAVA
?? 第 1 頁(yè) / 共 3 頁(yè)
字號(hào):
package com.ca.directory.jxplorer.viewer;

import javax.swing.*;
import java.lang.reflect.*;

import java.awt.*;
import java.awt.print.*;
import java.util.*;
import java.util.logging.Logger;
import java.util.logging.Level;
import java.io.*;

import com.ca.directory.jxplorer.*;
import com.ca.commons.cbutil.*;
import com.ca.commons.naming.*;

import javax.naming.directory.*;
import javax.naming.NamingException;
import javax.swing.event.ChangeListener;
import javax.swing.event.ChangeEvent;

/**
 *    <p>AttributeDisplay holds a variety of display and editing
 *    classes, as well as a simple toolbar to allow switching
 *    between these.  The main one is an HTML template displaying
 *    class, but there are (will be) also attribute editing and
 *    template editing classes...</p>
 *
 *    <p>Note that this class is *not* thread safe.</p>
 */

public class AttributeDisplay extends JTabbedPane
    implements DataSink, Printable
{
    /**
     *    The HTML editor is always in position 1 (if present)
     */
     
    public static final int HTMLRENDERER = 1;
    
    /**
     *    The Table editor is always in position 2 (if present)
     */
    
    public static final int EDITOR = 2;

    /**
     *   The scroll pane that holds the main view object
     */
      
    protected JScrollPane  viewHolder;
    
    /**
     *  The main view panel.  This is what holds the various editors.
     */
     
    protected JPanel       view;
    
    
    //protected JToolBar     toolBar;

    /**
     *    the source of directory data for all editors
     */
     
    protected DataSource           dataSource;        
    
    /**
     *    the currently viewed entry (may be null)
     */
     
    protected DXEntry              entry = null;                   

    /**
     *    The editor currently being displayed to the user.
     *    This is updated every time the user tabs to a new
     *    editor, or a different editor is loaded.
     */
     
    protected PluggableEditor      currentEditor;

    /**
     *    The default html editor, that is usually available, and which
     *    displays html template files
     */
     
    protected HTMLTemplateDisplay  templateDisplay;                
    
    /**
     *    The default table editor, that is usually available, and displays
     *    entry data as a grid of strings.  Binary data may be edited using
     *    special 'attribute editors'.
     */
     
    protected TableAttributeEditor tableDisplay;                   

    /**
     *    A convenience link to schema.
     */
     
//XXX?    protected DirContext schemaInfo;                               // used to discover schema

    /**
     *    A convenience link to the global JX properties list.
     */
     
    protected Properties myProperties;

    /**
     *    The printing preferences used to print the currently visible entry editor.
     */

    private Properties printprefs = new Properties();    

    /**
     *    A hashtable of all the editors that have ever been used to display an
     *    entry in the current JX session.  When an entry is loaded, these are 
     *    checked first to determine whether an editor already exists, and if it
     *    does, it is re-used.
     */
     
    protected Hashtable editors = new Hashtable();
    
    /**
     *    a list containing the currently displayed editors
     */

    protected Vector activeEditors = new Vector(8);  

    /**
     *    the parent frame displaying this object
     */
     
    protected JFrame owner;                          


    protected String oldOCSig = null;                // a concatenation of the last used object classes.

    /** A local copy of the JX component, to pass on to pluggable editors */

    private JMenuBar registerMenu = null;

    /** A local copy of the JX component, to pass on to pluggable editors */

    private JToolBar registerButtons = null;

    /** A local copy of the JX component, to pass on to pluggable editors */

    private JTree registerTree = null;

    /** A local copy of the JX component, to pass on to pluggable editors */

    private JPopupMenu registerTreeMenu = null;

    /** A local copy of the JX component, to pass on to pluggable editors */

    private JFrame registerJX = null;

    /**
     *  A local copy of the special class loader used to load the plugable
     *  editors.
     */
     
    protected ClassLoader myLoader = null;            // the class loader used for reading pluggable editors from zip/jar files.

    /**
     *  A local copy of the special resource loader used to load the plugable
     *  editors and their associated resource files.
     */
     
    protected CBResourceLoader resourceLoader = null; // the resource loader used for reading HTML templates from zip/jar files.

    /**
     *    All Plugins must have this package prefix.  Usually it is com.ca.directory.jxplorer.viewer,
     *    but it <i>can</i> be reset in the configuration.
     */
     
    public static String PACKAGEPREFIX = "com.ca.directory.jxplorer.viewer.";

    public static void setPackagePrefix(String prefix) { PACKAGEPREFIX = prefix; }

    public static String getPackagePrefix() { return PACKAGEPREFIX; }

    // Do we need an alternative 'BASESPREFIX' variable for when PACKAGEPREFIX is changed?
    // public static String BASEPREFIX = "com.ca.directory.jxplorer.viewer.";

    /**
     *     A utility constant - this is used in the editor hashtable to indicate
     *     that no pluggable editor has been found, and that there is no need
     *     to use the resource loader to look again.
     */
     
    protected static final String NONE = "none";

    /**
     *    A temporary copy of a component that is to be printed, used by the
     *    print thread mechanism to pass an editor image around.
     */
     
    private Component printComponent = null;

    /**
     *    Every time a tab is added or deleted, or a new tab is selected, a
     *    change event is triggered.  Sometimes we'd like to ignore these
     *    while we're getting our tabs sorted out (i.e. when we're adding
     *    and deleting large numbers of tabs) and this flags that such
     *    changes should be ignored.
     *
     */
     
    protected boolean ignoreChangeEvents = false;

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

    /**
     *    The constructor for AttributeDisplay requires information
     *    about default file directories and urls.  These are passed
     *    in via a Properties object, that should contain values for
     *    'dir.templates', 'dir.htmldocs', and 'dir.local'.
     *    @param props list of defaults for file and url locations.
     *    @param owner the parent frame, used for gui sanity and L&F propogation
     *    @param resourceLoader the resource loader used to load HTML templates from zip/jar files
     */

    public AttributeDisplay(Properties props, JFrame owner, CBResourceLoader resourceLoader) 
    {
        super();


        myProperties = props;

        if (myProperties.containsKey("plugins.package"))
        {
            setPackagePrefix(myProperties.getProperty("plugins.package"));
            log.fine("SETTING PLUGIN PREFIX TO: " + PACKAGEPREFIX);
        }
        else
            log.fine("PLUGIN PREFIX UNCHANGED: " + PACKAGEPREFIX);

        this.resourceLoader = resourceLoader;

        this.owner = owner;

            initHTMLEditor();
            initTableEditor();
            addEditor(templateDisplay);

            /**
             *  This change listener is *intended* to listen for user initiated tab
             *  changes, rather than programmatic changes to the editor tabs (which
             *  are expected to look after themselves)
             */

            addChangeListener( new ChangeListener()
            {
                public void stateChanged(ChangeEvent e)
                {
                    if (ignoreChangeEvents)   // sometimes when we're messing around we can fire heaps of
                        return;          // change events - and there's no point paying attention to 'em.

                    int index = getSelectedIndex();

                    if (index >= 0 && activeEditors.size() > index && activeEditors.get(index) != null)
                    {
                        setCurrentEditor((PluggableEditor)activeEditors.get(index));
                    }
                    else    // should never happen (ROTFL)
                    {
                        log.warning("internal error - unable to find editor # " + index + " in Attribute Display");
                    }
                }
            });
    }

    /**
     *    This specifies the class loader used to load plugin editors.
     *    (This may not be known when an AttributeDisplay object is first 
     *    created, at which time only the default system class loader is used).
     */
     
    public void registerClassLoader(ClassLoader loader)
    {
        myLoader = loader;
        if (tableDisplay == null)
        	initTableEditor();
        	
        tableDisplay.registerClassLoader(loader);
    }

    /**
     * delay initialising the html editor until we need it, or it is loaded by
     * a background thread.
     */

    protected synchronized void initHTMLEditor()
    {
        if (templateDisplay != null) return;

        templateDisplay = new HTMLTemplateDisplay(this, myProperties, resourceLoader);
        
        /*
         *    HTML editor is placed in the hashtable associated with the object
         *    class "top".  Since *all* directory entries must have object class
         *    "top", this is the equivalent of saying the editor may be used for
         *    all object classes.
         */
         
        //editors.put("top", templateDisplay);        
        
        // Set the html editor to be the current default editor.
        
        currentEditor = templateDisplay;
    }

    /**
     * delay initialising the table editor until we need it, or it is loaded by
     * a background thread.
     */

    protected synchronized void initTableEditor()
    {
        if (tableDisplay != null) return;

        tableDisplay = new TableAttributeEditor(owner);
        
        /*
         *    HTML editor is placed in the hashtable associated with the object
         *    class "top".  Since *all* directory entries must have object class
         *    "top", this is the equivalent of saying the editor may be used for
         *    all object classes.
         */
         
        //editors.put("top", tableDisplay);           // can be used for all entries
    }

   /**
    * The method @print@ must be implemented for @Printable@ interface.
    * Parameters are supplied by system.
    *
    */
    //(Magic Irina Spell...!)
    
    public int print(Graphics g, PageFormat pf, int pageIndex) throws PrinterException
    {
        //Component printMe = getPrintComponent();

        Graphics2D g2 = (Graphics2D)g;
        g2.setColor(Color.black);    //set default foreground color to black

        //for faster printing, turn off double buffering
        //RepaintManager.currentManager(this).setDoubleBufferingEnabled(false);

        Dimension d = printComponent.getSize();    //get size of document
        double panelWidth  = d.width;    //width in pixels
        double panelHeight = d.height;   //height in pixels
        double pageHeight = pf.getImageableHeight();   //height of printer page
        double pageWidth  = pf.getImageableWidth();    //width of printer page
        double scale = pageWidth/panelWidth;
        int totalNumPages = (int)Math.ceil(scale * panelHeight / pageHeight);

        //make sure we don't print empty pages
        if(pageIndex >= totalNumPages)
        {
            return Printable.NO_SUCH_PAGE;
        }

        //shift Graphic to line up with beginning of print-imageable region
        g2.translate(pf.getImageableX(), pf.getImageableY());
        
        //shift Graphic to line up with beginning of next page to print
        g2.translate(0f, -pageIndex*pageHeight);
        
        //scale the page so the width fits...
        g2.scale(scale, scale);
        
        // PRINT IT!
        printComponent.paint(g2);
        
        return Printable.PAGE_EXISTS;
    }

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩精品中文字幕在线不卡尤物 | 成人免费视频一区| 国产精品一区二区男女羞羞无遮挡| 国产在线精品免费| 在线观看视频一区| 国产亚洲精品超碰| 亚洲午夜久久久久久久久电影网| 亚洲精品一二三| 处破女av一区二区| 日韩一区二区三区视频| 亚洲色图.com| 精品一区二区在线看| 国产精品久久777777| 久久91精品久久久久久秒播| 国产69精品久久99不卡| 日韩一区二区三区视频| 久久精品一二三| 国模套图日韩精品一区二区| 91色九色蝌蚪| 亚洲色图.com| 99国产欧美久久久精品| 成人av网站在线观看免费| 精品久久久三级丝袜| 日韩电影免费在线观看网站| 日本丶国产丶欧美色综合| 日韩色视频在线观看| 全国精品久久少妇| 亚洲成人免费视| 午夜精品久久久久影视| 91.xcao| 国产精品久久久久久久久晋中 | 久久综合久久综合久久| 日本韩国视频一区二区| 国产精品一区二区免费不卡 | 蜜臀av国产精品久久久久| 综合分类小说区另类春色亚洲小说欧美| 欧美日韩国产综合视频在线观看| 国产麻豆精品在线观看| 久久精品国产第一区二区三区| 亚洲午夜在线观看视频在线| 国产精品乱人伦| 国产女主播在线一区二区| 欧美大度的电影原声| 欧美一卡二卡在线观看| 欧美视频一二三区| 欧美高清性hdvideosex| 欧美日韩一区二区在线视频| 91麻豆免费看| 欧美在线一二三| 欧美二区在线观看| 91精品国产色综合久久ai换脸| 欧美日韩国产高清一区| 欧美精品1区2区| 久久综合色婷婷| 欧美国产亚洲另类动漫| 中文字幕一区二区三区四区不卡| 国产日韩欧美不卡| **网站欧美大片在线观看| 亚洲伊人色欲综合网| 亚洲电影在线播放| 精油按摩中文字幕久久| 亚洲成av人片www| 亚洲精品高清在线观看| 国产精品久久久久婷婷| 久久精品欧美日韩精品| 欧美一区二区三区色| 日韩女同互慰一区二区| 在线免费观看日本一区| 日韩免费一区二区| 亚洲精品成人悠悠色影视| 亚洲国产精品麻豆| 国产精品亚洲一区二区三区在线| 91麻豆成人久久精品二区三区| 欧美色综合网站| 国产精品久久免费看| 日韩av一二三| 91福利精品视频| 中文字幕中文字幕一区二区| 日韩精彩视频在线观看| 色拍拍在线精品视频8848| 2023国产精品视频| 香蕉加勒比综合久久| 国产成人一级电影| 日韩一区二区三区视频| 午夜久久福利影院| 欧美主播一区二区三区美女| 中文字幕久久午夜不卡| 国产美女在线观看一区| 91精品国产91久久久久久最新毛片 | 韩日av一区二区| 欧美久久久影院| 亚洲精品免费在线播放| 国产999精品久久| 国产高清精品在线| 色老头久久综合| 亚洲欧美二区三区| 91视频精品在这里| 亚洲综合无码一区二区| 91美女蜜桃在线| 亚洲另类在线视频| 在线观看三级视频欧美| 亚洲欧美另类综合偷拍| 色欲综合视频天天天| 一区二区三区国产豹纹内裤在线| 91免费在线视频观看| 亚洲一区二区中文在线| 91精品国产综合久久久蜜臀粉嫩 | 一区二区三区在线观看动漫| 色婷婷精品大视频在线蜜桃视频| 综合久久久久久| 这里只有精品电影| 国产精品亚洲专一区二区三区| 综合欧美亚洲日本| 91麻豆精品国产91久久久 | 亚洲一二三区视频在线观看| 欧美一区在线视频| 国产高清视频一区| 一区二区三区在线免费观看| 日韩一区二区三区视频| 99久久久免费精品国产一区二区| 亚洲一区免费观看| 国产色91在线| 69精品人人人人| 成人av网站大全| 久久狠狠亚洲综合| 亚洲高清视频中文字幕| 久久精品在线免费观看| 欧美一区二区久久久| 色综合久久综合中文综合网| 蜜桃av噜噜一区二区三区小说| 中文字幕一区二区不卡| 精品国产区一区| 在线91免费看| 在线欧美一区二区| 97精品电影院| 91亚洲资源网| 91年精品国产| 在线亚洲高清视频| 一本大道久久a久久综合| 成人一级视频在线观看| 国产一区二区看久久| 国内精品久久久久影院薰衣草 | 捆绑紧缚一区二区三区视频| 亚洲品质自拍视频网站| 欧美喷潮久久久xxxxx| 国产精品影音先锋| 一区二区三区中文免费| 久久久久久久久久久99999| 国产精品一区二区黑丝| 国产毛片精品视频| 国产精品香蕉一区二区三区| 国产高清成人在线| 不卡免费追剧大全电视剧网站| 91在线丨porny丨国产| 欧美视频中文字幕| 日韩亚洲欧美在线观看| 久久夜色精品国产欧美乱极品| 精品国产不卡一区二区三区| 国产欧美日韩精品a在线观看| 亚洲精品国产a久久久久久| 国产精品福利一区二区三区| 亚洲色图欧洲色图| 伊人色综合久久天天人手人婷| 日日摸夜夜添夜夜添精品视频| 久久精品国产澳门| 一本色道久久综合亚洲91| 欧美日韩亚洲丝袜制服| 国产亚洲精品7777| 亚洲黄网站在线观看| 国产一区不卡在线| 欧美精品一二三| 欧美国产精品一区二区三区| 日本中文一区二区三区| 国产成人免费视频一区| 欧美丰满嫩嫩电影| 日韩美女精品在线| 国产又粗又猛又爽又黄91精品| 91成人在线免费观看| 久久久99免费| 男女激情视频一区| 欧美日韩视频一区二区| 日韩伦理av电影| 成人一区二区在线观看| 欧美成人精品高清在线播放| 亚洲午夜在线视频| 在线免费观看不卡av| ...xxx性欧美| 99久久婷婷国产综合精品| 欧美激情一区在线| 久久91精品久久久久久秒播| 日韩一区二区三区观看| 蜜桃一区二区三区在线观看| 欧美视频在线观看一区| 亚洲综合色丁香婷婷六月图片| 成人黄色一级视频| 国产精品乱码妇女bbbb| 丰满亚洲少妇av| 国产精品免费网站在线观看| 美国十次综合导航| 欧美一区二区三区免费观看视频|