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

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

?? basiccomboboxui.java

?? JAVA的一些源碼 JAVA2 STANDARD EDITION DEVELOPMENT KIT 5.0
?? JAVA
?? 第 1 頁 / 共 4 頁
字號:
/* * @(#)BasicComboBoxUI.java	1.172 06/04/20 * * Copyright 2004 Sun Microsystems, Inc. All rights reserved. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */package javax.swing.plaf.basic;import java.awt.*;import java.awt.event.*;import javax.swing.*;import javax.accessibility.*;import javax.swing.FocusManager;import javax.swing.plaf.*;import javax.swing.border.*;import javax.swing.text.*;import javax.swing.event.*;import java.beans.PropertyChangeListener;import java.beans.PropertyChangeEvent;import sun.awt.AppContext;import sun.swing.DefaultLookup;import sun.swing.UIAction;/** * Basic UI implementation for JComboBox.  * <p> * The combo box is a compound component which means that it is an agregate of * many simpler components. This class creates and manages the listeners * on the combo box and the combo box model. These listeners update the user  * interface in response to changes in the properties and state of the combo box. * <p> * All event handling is handled by listener classes created with the  * <code>createxxxListener()</code> methods and internal classes. * You can change the behavior of this class by overriding the * <code>createxxxListener()</code> methods and supplying your own * event listeners or subclassing from the ones supplied in this class. * <p> * For adding specific actions,  * overide <code>installKeyboardActions</code> to add actions in response to * KeyStroke bindings. See the article <a href="http://java.sun.com/products/jfc/tsc/special_report/kestrel/keybindings.html">Keyboard Bindings in Swing</a> * at <a href="http://java.sun.com/products/jfc/tsc"><em>The Swing Connection</em></a>. * * @version 1.172 04/20/06 * @author Arnaud Weber * @author Tom Santos * @author Mark Davidson */public class BasicComboBoxUI extends ComboBoxUI {    protected JComboBox comboBox;    /**     * This protected field is implementation specific. Do not access directly     * or override.      */    protected boolean   hasFocus = false;    // Control the selection behavior of the JComboBox when it is used    // in the JTable DefaultCellEditor.     private boolean isTableCellEditor = false;    private static final String IS_TABLE_CELL_EDITOR = "JComboBox.isTableCellEditor";    // This list is for drawing the current item in the combo box.    protected JList   listBox;    // Used to render the currently selected item in the combo box.    // It doesn't have anything to do with the popup's rendering.    protected CellRendererPane currentValuePane = new CellRendererPane();    // The implementation of ComboPopup that is used to show the popup.    protected ComboPopup popup;    // The Component that the ComboBoxEditor uses for editing    protected Component editor;    // The arrow button that invokes the popup.    protected JButton   arrowButton;    // Listeners that are attached to the JComboBox    /**     * This protected field is implementation specific. Do not access directly     * or override. Override the listener construction method instead.     *     * @see #createKeyListener     */    protected KeyListener keyListener;    /**     * This protected field is implementation specific. Do not access directly     * or override. Override the listener construction method instead.     *     * @see #createFocusListener     */    protected FocusListener focusListener;    /**     * This protected field is implementation specific. Do not access directly     * or override. Override the listener construction method instead.     *     * @see #createPropertyChangeListener     */    protected PropertyChangeListener propertyChangeListener;    /**     * This protected field is implementation specific. Do not access directly     * or override. Override the listener construction method instead.     *     * @see #createItemListener     */    protected ItemListener itemListener;    // Listeners that the ComboPopup produces.    protected MouseListener popupMouseListener;    protected MouseMotionListener popupMouseMotionListener;    protected KeyListener popupKeyListener;    // This is used for knowing when to cache the minimum preferred size.    // If the data in the list changes, the cached value get marked for recalc.    // Added to the current JComboBox model    /**     * This protected field is implementation specific. Do not access directly     * or override. Override the listener construction method instead.     *     * @see #createListDataListener     */    protected ListDataListener listDataListener;    /**     * Implements all the Listeners needed by this class, all existing     * listeners redirect to it.     */    private Handler handler;    /**     * The time factor to treate the series of typed alphanumeric key     * as prefix for first letter navigation.     */    private long timeFactor = 1000L;    /**     * This is tricky, this variables is needed for DefaultKeySelectionManager     * to take into account time factor.     */    private long lastTime = 0L;    private long time = 0L;		    /**     * The default key selection manager     */    JComboBox.KeySelectionManager keySelectionManager;    // Flag for recalculating the minimum preferred size.    protected boolean isMinimumSizeDirty = true;    // Cached minimum preferred size.    protected Dimension cachedMinimumSize = new Dimension( 0, 0 );    // Flag for calculating the display size    private boolean isDisplaySizeDirty = true;        // Cached the size that the display needs to render the largest item    private Dimension cachedDisplaySize = new Dimension( 0, 0 );    // Key used for lookup of the DefaultListCellRenderer in the AppContext.    private static final Object COMBO_UI_LIST_CELL_RENDERER_KEY =                        new StringBuffer("DefaultListCellRendererKey");    static final StringBuffer HIDE_POPUP_KEY                  = new StringBuffer("HidePopupKey");    // Used for calculating the default size.    private static ListCellRenderer getDefaultListCellRenderer() {        ListCellRenderer renderer = (ListCellRenderer)AppContext.                         getAppContext().get(COMBO_UI_LIST_CELL_RENDERER_KEY);        if (renderer == null) {            renderer = new DefaultListCellRenderer();            AppContext.getAppContext().put(COMBO_UI_LIST_CELL_RENDERER_KEY,                                           new DefaultListCellRenderer());        }        return renderer;    }    /**     * Populates ComboBox's actions.     */    static void loadActionMap(LazyActionMap map) {	map.put(new Actions(Actions.HIDE));	map.put(new Actions(Actions.PAGE_DOWN));	map.put(new Actions(Actions.PAGE_UP));	map.put(new Actions(Actions.HOME));	map.put(new Actions(Actions.END));	map.put(new Actions(Actions.DOWN));	map.put(new Actions(Actions.DOWN_2));	map.put(new Actions(Actions.TOGGLE));	map.put(new Actions(Actions.TOGGLE_2));	map.put(new Actions(Actions.UP));	map.put(new Actions(Actions.UP_2));	map.put(new Actions(Actions.ENTER));    }    //========================    // begin UI Initialization    //    public static ComponentUI createUI(JComponent c) {        return new BasicComboBoxUI();    }    public void installUI( JComponent c ) {        isMinimumSizeDirty = true;        comboBox = (JComboBox)c;        installDefaults();        popup = createPopup();        listBox = popup.getList();	// Is this combo box a cell editor?        Boolean inTable = (Boolean)c.getClientProperty(IS_TABLE_CELL_EDITOR );	if (inTable != null) {	    isTableCellEditor = inTable.equals(Boolean.TRUE) ? true : false;	}        if ( comboBox.getRenderer() == null || comboBox.getRenderer() instanceof UIResource ) {            comboBox.setRenderer( createRenderer() );        }        if ( comboBox.getEditor() == null || comboBox.getEditor() instanceof UIResource ) {            comboBox.setEditor( createEditor() );        }        installListeners();        installComponents();        comboBox.setLayout( createLayoutManager() );        comboBox.setRequestFocusEnabled( true );	installKeyboardActions();        comboBox.putClientProperty("doNotCancelPopup", HIDE_POPUP_KEY);        if (keySelectionManager == null || keySelectionManager instanceof UIResource) {            keySelectionManager = new DefaultKeySelectionManager();	}	comboBox.setKeySelectionManager(keySelectionManager);    }    public void uninstallUI( JComponent c ) {        setPopupVisible( comboBox, false);        popup.uninstallingUI();        uninstallKeyboardActions();        comboBox.setLayout( null );        uninstallComponents();        uninstallListeners();        uninstallDefaults();        if ( comboBox.getRenderer() == null || comboBox.getRenderer() instanceof UIResource ) {            comboBox.setRenderer( null );        }        if ( comboBox.getEditor() == null || comboBox.getEditor() instanceof UIResource ) {            if(comboBox.getEditor().getEditorComponent().hasFocus()) {                // Leave focus in JComboBox.                comboBox.requestFocusInWindow();            }            comboBox.setEditor( null );        }        if (keySelectionManager instanceof UIResource) {	    comboBox.setKeySelectionManager(null);	}        handler = null;        keyListener = null;        focusListener = null;        listDataListener = null;        propertyChangeListener = null;        popup = null;        listBox = null;        comboBox = null;    }    /**     * Installs the default colors, default font, default renderer, and default     * editor into the JComboBox.     */    protected void installDefaults() {        LookAndFeel.installColorsAndFont( comboBox,                                          "ComboBox.background",                                          "ComboBox.foreground",                                          "ComboBox.font" );        LookAndFeel.installBorder( comboBox, "ComboBox.border" );        LookAndFeel.installProperty( comboBox, "opaque", Boolean.TRUE); 	Long l = (Long)UIManager.get("ComboBox.timeFactor"); 	timeFactor = (l!=null) ? l.longValue() : 1000L;    }    /**     * Create and install the listeners for the combo box and its model.     * This method is called when the UI is installed.     */    protected void installListeners() {	if ( (itemListener = createItemListener()) != null) {	    comboBox.addItemListener( itemListener );	}        if ( (propertyChangeListener = createPropertyChangeListener()) != null ) {            comboBox.addPropertyChangeListener( propertyChangeListener );        }        if ( (keyListener = createKeyListener()) != null ) {            comboBox.addKeyListener( keyListener );        }        if ( (focusListener = createFocusListener()) != null ) {            comboBox.addFocusListener( focusListener );        }	if ((popupMouseListener = popup.getMouseListener()) != null) {	    comboBox.addMouseListener( popupMouseListener );	}	if ((popupMouseMotionListener = popup.getMouseMotionListener()) != null) {	    comboBox.addMouseMotionListener( popupMouseMotionListener );	}	if ((popupKeyListener = popup.getKeyListener()) != null) {	    comboBox.addKeyListener(popupKeyListener);	}        if ( comboBox.getModel() != null ) {            if ( (listDataListener = createListDataListener()) != null ) {                comboBox.getModel().addListDataListener( listDataListener );            }        }    }    /**     * Uninstalls the default colors, default font, default renderer, and default     * editor into the JComboBox.     */    protected void uninstallDefaults() {        LookAndFeel.installColorsAndFont( comboBox,                                          "ComboBox.background",                                          "ComboBox.foreground",                                          "ComboBox.font" );        LookAndFeel.uninstallBorder( comboBox );    }    /**     * Remove the installed listeners from the combo box and its model.     * The number and types of listeners removed and in this method should be     * the same that was added in <code>installListeners</code>     */    protected void uninstallListeners() {        if ( keyListener != null ) {            comboBox.removeKeyListener( keyListener );        }	if ( itemListener != null) {	    comboBox.removeItemListener( itemListener );	}        if ( propertyChangeListener != null ) {            comboBox.removePropertyChangeListener( propertyChangeListener );        }        if ( focusListener != null) {            comboBox.removeFocusListener( focusListener );        }	if ( popupMouseListener != null) {	    comboBox.removeMouseListener( popupMouseListener );	}	if ( popupMouseMotionListener != null) {	    comboBox.removeMouseMotionListener( popupMouseMotionListener );	}	if (popupKeyListener != null) {	    comboBox.removeKeyListener(popupKeyListener);	}        if ( comboBox.getModel() != null ) {            if ( listDataListener != null ) {                comboBox.getModel().removeListDataListener( listDataListener );            }        }    }    /**     * Creates the popup portion of the combo box.     *     * @return an instance of <code>ComboPopup</code>     * @see ComboPopup     */    protected ComboPopup createPopup() {        return new BasicComboPopup( comboBox );    }    /**     * Creates a <code>KeyListener</code> which will be added to the     * combo box. If this method returns null then it will not be added     * to the combo box.     *      * @return an instance <code>KeyListener</code> or null     */    protected KeyListener createKeyListener() {        return getHandler();    }     /**     * Creates a <code>FocusListener</code> which will be added to the combo box.     * If this method returns null then it will not be added to the combo box.     *     * @return an instance of a <code>FocusListener</code> or null     */    protected FocusListener createFocusListener() {        return getHandler();    }    /**     * Creates a list data listener which will be added to the     * <code>ComboBoxModel</code>. If this method returns null then     * it will not be added to the combo box model.     *     * @return an instance of a <code>ListDataListener</code> or null     */    protected ListDataListener createListDataListener() {        return getHandler();    }    /**     * Creates an <code>ItemListener</code> which will be added to the      * combo box. If this method returns null then it will not      * be added to the combo box.     * <p>     * Subclasses may override this method to return instances of their own     * ItemEvent handlers.     *     * @return an instance of an <code>ItemListener</code> or null     */    protected ItemListener createItemListener() {        return null;    }    /**     * Creates a <code>PropertyChangeListener</code> which will be added to     * the combo box. If this method returns null then it will not

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产成人精品影院| 一区二区三区精品视频在线| 中文字幕五月欧美| 国产福利91精品一区二区三区| 天天色综合成人网| 欧美精品一区二区在线播放| 韩国一区二区视频| 国产精品每日更新| 在线一区二区三区四区| 婷婷中文字幕综合| 亚洲成av人**亚洲成av**| 欧美一级在线视频| 懂色av噜噜一区二区三区av| 一级精品视频在线观看宜春院| 综合激情成人伊人| 日韩免费成人网| 91麻豆免费视频| 久久精品国产精品亚洲精品| 日韩一区在线播放| 亚洲第四色夜色| 石原莉奈在线亚洲三区| 亚洲日韩欧美一区二区在线| 亚洲精品亚洲人成人网| 国产亚洲精品7777| 欧美视频完全免费看| 国产91精品欧美| 91亚洲国产成人精品一区二三| 欧洲生活片亚洲生活在线观看| 韩国成人福利片在线播放| 国产a精品视频| 欧美在线视频日韩| 精品理论电影在线观看| 3d动漫精品啪啪1区2区免费| av一区二区三区四区| 国产麻豆9l精品三级站| 天天综合色天天综合色h| 久久精品国产一区二区三| 成人午夜在线播放| 国产高清精品在线| 欧美午夜一区二区三区| 精品国产一区二区精华| 国产精品萝li| 美女国产一区二区三区| 图片区小说区国产精品视频| 国产制服丝袜一区| 欧美亚洲愉拍一区二区| 国产午夜久久久久| 免费视频一区二区| 久久se精品一区二区| 日本电影欧美片| 久久精品视频网| 美国毛片一区二区三区| 欧美二区三区的天堂| 欧美视频在线一区二区三区 | 成人免费观看男女羞羞视频| 欧美无人高清视频在线观看| 国产日韩欧美精品在线| 欧美激情一二三区| 国产精品免费aⅴ片在线观看| 首页国产欧美久久| 91香蕉国产在线观看软件| 久久嫩草精品久久久久| 国产精品国产馆在线真实露脸| 中文在线资源观看网站视频免费不卡| 日韩高清国产一区在线| 乱中年女人伦av一区二区| 色欧美88888久久久久久影院| 色婷婷久久久久swag精品| 精品电影一区二区三区| 日韩不卡一二三区| 在线观看欧美日本| 一区二区三区 在线观看视频| 成人18精品视频| 欧美福利视频导航| 亚洲午夜久久久久久久久电影网 | 国产精品一二三| 色综合天天综合网天天狠天天| 色老汉av一区二区三区| 自拍偷拍国产精品| jizzjizzjizz欧美| 国产精品妹子av| 丁香啪啪综合成人亚洲小说| 国产午夜精品一区二区三区四区| 国产在线精品不卡| 久久综合久久综合久久| 亚洲综合区在线| 国产精品综合二区| 精品福利一二区| 国产激情精品久久久第一区二区 | 69堂精品视频| 免费看日韩a级影片| 日韩三级精品电影久久久| 国产精品夫妻自拍| 99久精品国产| 欧美va亚洲va| 国产呦精品一区二区三区网站 | 国产成人在线免费| 国产精品久久久久久久蜜臀| 成a人片国产精品| 一区二区高清免费观看影视大全| 欧美日韩精品高清| 亚洲欧美影音先锋| 欧美在线观看一区| 理论片日本一区| 久久精品夜夜夜夜久久| 91一区二区三区在线播放| 亚洲第一搞黄网站| 久久蜜桃一区二区| 日韩欧美第一区| 国产精品影视网| 亚洲日本一区二区| 日韩精品资源二区在线| jlzzjlzz国产精品久久| 欧美a一区二区| 国产精品久久久久国产精品日日| 欧美熟乱第一页| 成人综合在线观看| 三级一区在线视频先锋| 国产精品人成在线观看免费| 在线电影国产精品| 99热99精品| 激情深爱一区二区| 亚洲午夜精品久久久久久久久| 精品理论电影在线| 欧美午夜精品一区二区三区| 国产成a人无v码亚洲福利| 日韩黄色免费电影| 亚洲欧美国产高清| 91丨国产丨九色丨pron| 久久狠狠亚洲综合| 午夜激情一区二区三区| 亚洲日本在线看| 国产视频视频一区| 日韩欧美国产一区二区在线播放 | 寂寞少妇一区二区三区| 久久久午夜电影| 欧美日韩精品系列| 一本色道亚洲精品aⅴ| 国产v日产∨综合v精品视频| 热久久免费视频| 亚洲成人资源在线| 一级女性全黄久久生活片免费| 中文字幕成人av| 日本一区二区三区四区| 精品日韩成人av| 欧美一个色资源| 在线不卡一区二区| 51精品国自产在线| 在线播放亚洲一区| 欧美日韩国产三级| 91麻豆精品国产91久久久更新时间| 91色在线porny| 99精品视频一区二区| av激情亚洲男人天堂| 99久久国产综合精品麻豆| 成人一区二区三区视频| jizzjizzjizz欧美| av电影天堂一区二区在线观看| 成人av小说网| 99re这里只有精品首页| 99re视频精品| 色88888久久久久久影院按摩 | 2017欧美狠狠色| 精品国精品国产| 久久综合久久鬼色| 国产亚洲精品久| 国产精品青草综合久久久久99| 国产精品国产三级国产普通话蜜臀 | av一区二区三区黑人| 色综合久久久网| 欧美日韩一区二区三区高清| 国产一区二区三区四区五区入口 | 中文字幕第一区二区| 亚洲欧洲精品成人久久奇米网| 日韩一区在线播放| 亚洲高清免费在线| 免费欧美在线视频| 国产一区二区三区综合| 成人动漫在线一区| 在线看一区二区| 91精品国产综合久久久久 | 国产一区二区三区不卡在线观看 | 国产美女视频一区| av电影在线观看完整版一区二区| 在线亚洲高清视频| 69精品人人人人| 久久久久9999亚洲精品| 成人免费小视频| 蜜桃av一区二区| 国产91丝袜在线观看| 欧美性做爰猛烈叫床潮| 26uuu亚洲综合色欧美| 亚洲美女视频在线| 国产一区二区三区观看| 91论坛在线播放| 精品国产伦一区二区三区观看体验| 中文字幕一区免费在线观看| 日韩av网站免费在线| av色综合久久天堂av综合| 欧美一区二区三区日韩|