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

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

?? basiccombopopup.java

?? java1.6眾多例子參考
?? JAVA
?? 第 1 頁 / 共 3 頁
字號:
     * Creates a <code>PropertyChangeListener</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>PropertyChangeListener</code> or null     */    protected PropertyChangeListener createPropertyChangeListener() {        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 getHandler();    }    private Handler getHandler() {        if (handler == null) {            handler = new Handler();        }        return handler;    }    /**     * Creates the JList used in the popup to display      * the items in the combo box model. This method is called when the UI class     * is created.     *     * @return a <code>JList</code> used to display the combo box items     */    protected JList createList() {	return new JList( comboBox.getModel() ) {            public void processMouseEvent(MouseEvent e)  {                if (e.isControlDown())  {                    // Fix for 4234053. Filter out the Control Key from the list.                     // ie., don't allow CTRL key deselection.                    e = new MouseEvent((Component)e.getSource(), e.getID(), e.getWhen(),                                        e.getModifiers() ^ InputEvent.CTRL_MASK,                                       e.getX(), e.getY(),                                       e.getXOnScreen(), e.getYOnScreen(),                                       e.getClickCount(),                                       e.isPopupTrigger(),                                       MouseEvent.NOBUTTON);                }                super.processMouseEvent(e);            }        };    }    /**     * Configures the list which is used to hold the combo box items in the     * popup. This method is called when the UI class     * is created.     *     * @see #createList     */    protected void configureList() {        list.setFont( comboBox.getFont() );        list.setForeground( comboBox.getForeground() );        list.setBackground( comboBox.getBackground() );        list.setSelectionForeground( UIManager.getColor( "ComboBox.selectionForeground" ) );        list.setSelectionBackground( UIManager.getColor( "ComboBox.selectionBackground" ) );        list.setBorder( null );        list.setCellRenderer( comboBox.getRenderer() );        list.setFocusable( false );        list.setSelectionMode( ListSelectionModel.SINGLE_SELECTION );        setListSelection( comboBox.getSelectedIndex() );        installListListeners();    }    /**     * Adds the listeners to the list control.     */    protected void installListListeners() {        if ((listMouseListener = createListMouseListener()) != null) {	    list.addMouseListener( listMouseListener );	}	if ((listMouseMotionListener = createListMouseMotionListener()) != null) {	    list.addMouseMotionListener( listMouseMotionListener );	}	if ((listSelectionListener = createListSelectionListener()) != null) {	    list.addListSelectionListener( listSelectionListener );	}    }    void uninstallListListeners() {	if (listMouseListener != null) {	    list.removeMouseListener(listMouseListener);	    listMouseListener = null;	}	if (listMouseMotionListener != null) {	    list.removeMouseMotionListener(listMouseMotionListener);	    listMouseMotionListener = null;	}	if (listSelectionListener != null) {	    list.removeListSelectionListener(listSelectionListener);	    listSelectionListener = null;	}        handler = null;    }    /**     * Creates the scroll pane which houses the scrollable list.     */    protected JScrollPane createScroller() {        JScrollPane sp = new JScrollPane( list, 				ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED,				ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER );        sp.setHorizontalScrollBar(null);        return sp;    }    /**     * Configures the scrollable portion which holds the list within      * the combo box popup. This method is called when the UI class     * is created.     */    protected void configureScroller() {        scroller.setFocusable( false );        scroller.getVerticalScrollBar().setFocusable( false );        scroller.setBorder( null );    }    /**     * Configures the popup portion of the combo box. This method is called     * when the UI class is created.     */    protected void configurePopup() {        setLayout( new BoxLayout( this, BoxLayout.Y_AXIS ) );        setBorderPainted( true );        setBorder(LIST_BORDER);        setOpaque( false );        add( scroller );        setDoubleBuffered( true );        setFocusable( false );    }    /**     * This method adds the necessary listeners to the JComboBox.     */    protected void installComboBoxListeners() {        if ((propertyChangeListener = createPropertyChangeListener()) != null) {	    comboBox.addPropertyChangeListener(propertyChangeListener);	}	if ((itemListener = createItemListener()) != null) {	    comboBox.addItemListener(itemListener);	}	installComboBoxModelListeners(comboBox.getModel());    }    /**      * Installs the listeners on the combo box model. Any listeners installed     * on the combo box model should be removed in      * <code>uninstallComboBoxModelListeners</code>.     *     * @param model The combo box model to install listeners     * @see #uninstallComboBoxModelListeners     */    protected void installComboBoxModelListeners( ComboBoxModel model ) {	if (model != null && (listDataListener = createListDataListener()) != null) {	    model.addListDataListener(listDataListener);	}    }    protected void installKeyboardActions() {                /* XXX - shouldn't call this method. take it out for testing.        ActionListener action = new ActionListener() {            public void actionPerformed(ActionEvent e){            }        };        comboBox.registerKeyboardAction( action,                                         KeyStroke.getKeyStroke( KeyEvent.VK_ENTER, 0 ),                                         JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT ); */            }    //    // end Initialization routines    //=================================================================    //===================================================================    // begin Event Listenters    //    /**     * A listener to be registered upon the combo box     * (<em>not</em> its popup menu)     * to handle mouse events     * that affect the state of the popup menu.     * The main purpose of this listener is to make the popup menu     * appear and disappear.     * This listener also helps     * with click-and-drag scenarios by setting the selection if the mouse was     * released over the list during a drag.     *     * <p>     * <strong>Warning:</strong>     * We recommend that you <em>not</em>      * create subclasses of this class.     * If you absolutely must create a subclass,     * be sure to invoke the superclass     * version of each method.     *     * @see BasicComboPopup#createMouseListener     */    protected class InvocationMouseHandler extends MouseAdapter {	/**	 * Responds to mouse-pressed events on the combo box.	 *	 * @param e the mouse-press event to be handled	 */        public void mousePressed( MouseEvent e ) {            getHandler().mousePressed(e);        }	/**	 * Responds to the user terminating	 * a click or drag that began on the combo box.	 *	 * @param e the mouse-release event to be handled	 */        public void mouseReleased( MouseEvent e ) {            getHandler().mouseReleased(e);        }    }    /**     * This listener watches for dragging and updates the current selection in the     * list if it is dragging over the list.     */    protected class InvocationMouseMotionHandler extends MouseMotionAdapter {        public void mouseDragged( MouseEvent e ) {            getHandler().mouseDragged(e);        }    }    /**     * As of Java 2 platform v 1.4, this class is now obsolete and is only included for     * backwards API compatibility. Do not instantiate or subclass.     * <p>     * All the functionality of this class has been included in      * BasicComboBoxUI ActionMap/InputMap methods.     */    public class InvocationKeyHandler extends KeyAdapter {	public void keyReleased( KeyEvent e ) {}    }        /**     * As of Java 2 platform v 1.4, this class is now obsolete, doesn't do anything, and     * is only included for backwards API compatibility. Do not call or      * override.     */    protected class ListSelectionHandler implements ListSelectionListener {        public void valueChanged( ListSelectionEvent e ) {}    }    /**     * As of 1.4, this class is now obsolete, doesn't do anything, and     * is only included for backwards API compatibility. Do not call or      * override.      * <p>     * The functionality has been migrated into <code>ItemHandler</code>.     *     * @see #createItemListener     */    public class ListDataHandler implements ListDataListener {        public void contentsChanged( ListDataEvent e ) {}        public void intervalAdded( ListDataEvent e ) {        }        public void intervalRemoved( ListDataEvent e ) {        }    }    /**     * This listener hides the popup when the mouse is released in the list.     */    protected class ListMouseHandler extends MouseAdapter {        public void mousePressed( MouseEvent e ) {        }        public void mouseReleased(MouseEvent anEvent) {            getHandler().mouseReleased(anEvent);        }    }    /**     * This listener changes the selected item as you move the mouse over the list.     * The selection change is not committed to the model, this is for user feedback only.     */    protected class ListMouseMotionHandler extends MouseMotionAdapter {        public void mouseMoved( MouseEvent anEvent ) {            getHandler().mouseMoved(anEvent);        }    }    /**     * This listener watches for changes to the selection in the      * combo box.     */    protected class ItemHandler implements ItemListener {        public void itemStateChanged( ItemEvent e ) {            getHandler().itemStateChanged(e);	}    }    /**     * This listener watches for bound properties that have changed in the     * combo box.      * <p>     * Subclasses which wish to listen to combo box property changes should     * call the superclass methods to ensure that the combo popup correctly      * handles property changes.     *      * @see #createPropertyChangeListener     */    protected class PropertyChangeHandler implements PropertyChangeListener {        public void propertyChange( PropertyChangeEvent e ) {            getHandler().propertyChange(e);        }    }    private class AutoScrollActionHandler implements ActionListener {        private int direction;        AutoScrollActionHandler(int direction) {            this.direction = direction;        }        public void actionPerformed(ActionEvent e) {            if (direction == SCROLL_UP) {                autoScrollUp();            }            else {                autoScrollDown();            }        }    }    private class Handler implements ItemListener, MouseListener,                          MouseMotionListener, PropertyChangeListener,                          Serializable {        //        // MouseListener        // NOTE: this is added to both the JList and JComboBox        //        public void mouseClicked(MouseEvent e) {        }        public void mousePressed(MouseEvent e) {            if (e.getSource() == list) {                return;            }            if (!SwingUtilities.isLeftMouseButton(e) || !comboBox.isEnabled())                return;	    if ( comboBox.isEditable() ) {                Component comp = comboBox.getEditor().getEditorComponent();                if ((!(comp instanceof JComponent)) || ((JComponent)comp).isRequestFocusEnabled()) {		    comp.requestFocus();                }	    }	    else if (comboBox.isRequestFocusEnabled()) {		comboBox.requestFocus();	    }	    togglePopup();        }        public void mouseReleased(MouseEvent e) {            if (e.getSource() == list) {                if (list.getModel().getSize() > 0) {                    // JList mouse listener                    if (comboBox.getSelectedIndex() == list.getSelectedIndex()) {                        comboBox.getEditor().setItem(list.getSelectedValue());                    }                    comboBox.setSelectedIndex(list.getSelectedIndex());                }                comboBox.setPopupVisible(false);                // workaround for cancelling an edited item (bug 4530953)                if (comboBox.isEditable() && comboBox.getEditor() != null) {                    comboBox.configureEditor(comboBox.getEditor(),                                              comboBox.getSelectedItem());                 }                return;            }            // JComboBox mouse listener	    Component source = (Component)e.getSource();            Dimension size = source.getSize();            Rectangle bounds = new Rectangle( 0, 0, size.width - 1, size.height - 1 );            if ( !bounds.contains( e.getPoint() ) ) {                MouseEvent newEvent = convertMouseEvent( e );                Point location = newEvent.getPoint();                Rectangle r = new Rectangle();		list.computeVisibleRect( r );		if ( r.contains( location ) ) {                    if (comboBox.getSelectedIndex() == list.getSelectedIndex()) {                        comboBox.getEditor().setItem(list.getSelectedValue());                    }                    comboBox.setSelectedIndex(list.getSelectedIndex());                }		comboBox.setPopupVisible(false);            }            hasEntered = false;            stopAutoScrolling();        }        public void mouseEntered(MouseEvent e) {        }        public void mouseExited(MouseEvent e) {        }        //        // MouseMotionListener:

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲欧美日韩精品久久久久| 经典一区二区三区| 中国av一区二区三区| wwwwww.欧美系列| 精品国产乱码久久久久久浪潮 | 欧美日韩三级在线| 欧美这里有精品| 欧美日韩一级片在线观看| 色丁香久综合在线久综合在线观看| 91视频91自| 欧洲av在线精品| 欧美日韩一区二区三区在线看| 在线观看视频一区| 欧美日韩性生活| 在线播放国产精品二区一二区四区| 欧美高清你懂得| 日韩视频中午一区| 久久综合成人精品亚洲另类欧美 | 538在线一区二区精品国产| 欧美日韩不卡在线| 精品国产乱码久久久久久影片| 久久久精品蜜桃| 国产精品天干天干在线综合| 日韩理论片一区二区| 亚洲国产日韩av| 美女尤物国产一区| 国产精品18久久久久久久久久久久| 福利视频网站一区二区三区| 91在线高清观看| 欧美丰满一区二区免费视频| 欧美精品一区二区精品网| 国产无人区一区二区三区| 亚洲精品免费在线播放| 天天操天天干天天综合网| 精品一区二区三区香蕉蜜桃| 国产91精品在线观看| 在线视频一区二区三| 欧美一区二区精品在线| 欧美高清在线一区| 一区二区三区资源| 六月丁香综合在线视频| 99精品欧美一区二区三区综合在线| 欧美性猛交xxxx黑人交| 精品欧美黑人一区二区三区| 中文字幕在线视频一区| 性久久久久久久久| 国产成人高清视频| 欧美日韩在线不卡| 国产免费观看久久| 亚洲一区二区不卡免费| 久久99精品久久久久久| 91久久奴性调教| 精品国产在天天线2019| 亚洲精品大片www| 狠狠色伊人亚洲综合成人| 日本精品免费观看高清观看| 亚洲精品一区二区三区四区高清| 亚洲另类中文字| 精品无人码麻豆乱码1区2区| 日本韩国一区二区三区| 国产色爱av资源综合区| 亚洲成年人影院| www.欧美日韩| 欧美精品一区二区三区蜜臀| 亚洲午夜免费电影| 国产91在线观看| 日韩欧美激情一区| 亚洲一区二区三区视频在线播放| 国产一区二区三区蝌蚪| 欧美日免费三级在线| 国产精品网站导航| 久久99国产精品免费| 欧美中文字幕一区二区三区| 中文字幕欧美日本乱码一线二线| 天堂一区二区在线| 91美女福利视频| 中文字幕免费不卡| 精品一区二区三区在线观看| 在线播放中文字幕一区| 日韩理论在线观看| 成人夜色视频网站在线观看| 精品三级av在线| 日本女优在线视频一区二区| 91精品1区2区| 亚洲情趣在线观看| 波多野结衣中文字幕一区| 精品av久久707| 美女视频网站黄色亚洲| 9191国产精品| 石原莉奈一区二区三区在线观看 | 久久久影视传媒| 美女网站在线免费欧美精品| 67194成人在线观看| 婷婷丁香久久五月婷婷| 精品视频免费在线| 亚洲资源中文字幕| 欧美色窝79yyyycom| 亚洲黄色免费网站| 色婷婷久久久久swag精品| 国产精品久久久久国产精品日日| 国产精品1024| 国产亚洲欧洲997久久综合 | 中文字幕欧美国产| 国产一区二区按摩在线观看| 水野朝阳av一区二区三区| 91精品欧美久久久久久动漫| 国产精品人成在线观看免费| 日本高清成人免费播放| 亚洲人成7777| 国产网站一区二区| 91久久精品一区二区三区| 精品亚洲国产成人av制服丝袜| 天天综合天天综合色| 久久成人免费电影| 日韩欧美国产一区在线观看| 美国毛片一区二区| 久久亚洲综合色一区二区三区| 国产美女精品一区二区三区| 欧美国产精品中文字幕| av在线不卡网| 一区二区久久久久| 51久久夜色精品国产麻豆| 美腿丝袜一区二区三区| 精品剧情在线观看| 高清在线不卡av| 日韩毛片在线免费观看| 欧亚洲嫩模精品一区三区| 日日夜夜精品视频天天综合网| 欧美一级黄色片| 国产精品一区专区| 亚洲欧美综合色| 欧美午夜不卡视频| 精品午夜久久福利影院| 国产精品久久久久永久免费观看 | 久久久电影一区二区三区| 国产精品中文欧美| 中文字幕中文乱码欧美一区二区| 欧美综合欧美视频| 男女男精品视频| 欧美国产精品久久| 欧美日韩国产精选| 久久精品国产秦先生| 国产精品久久久久精k8| 欧美三级欧美一级| 国产在线不卡一区| 亚洲欧洲av一区二区三区久久| 欧美性极品少妇| 国产成人在线视频免费播放| 亚洲最新在线观看| 精品国产亚洲一区二区三区在线观看| 丁香桃色午夜亚洲一区二区三区| 亚洲一区二区视频| 久久久久久久久99精品| 一本到不卡精品视频在线观看| 蜜臀av一区二区在线免费观看 | 成人午夜免费视频| 亚洲妇熟xx妇色黄| 国产亚洲精品中文字幕| 欧美日韩一区二区三区在线| 国产福利不卡视频| 亚洲一区二区三区在线| 欧美韩国日本一区| 91精品婷婷国产综合久久性色| bt欧美亚洲午夜电影天堂| 免费在线欧美视频| 亚洲黄色小说网站| 国产欧美一区二区精品性色 | 国产亚洲成aⅴ人片在线观看| 欧洲精品一区二区三区在线观看| 国产精品一区二区久久不卡 | 97se狠狠狠综合亚洲狠狠| 老司机午夜精品| 亚洲高清免费视频| 国产精品家庭影院| 精品国产一区a| 欧美一区二区三区性视频| av成人动漫在线观看| 经典三级一区二区| 日韩一区精品字幕| 亚洲欧美欧美一区二区三区| 国产视频亚洲色图| 精品国产一区二区在线观看| 91麻豆精品国产自产在线观看一区| 成人激情视频网站| 国产精品一区二区在线播放| 久久99精品国产.久久久久久| 亚洲成人自拍网| 一级中文字幕一区二区| 中文字幕中文字幕在线一区 | 久久这里都是精品| 欧美日韩国产经典色站一区二区三区| 9l国产精品久久久久麻豆| 国产在线一区观看| 麻豆极品一区二区三区| 日本vs亚洲vs韩国一区三区二区 | 波多野结衣亚洲一区| 成人污视频在线观看| 国产一区久久久| 国产在线视频精品一区| 九一久久久久久|