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

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

?? basiccomboboxui.java

?? JAVA的一些源碼 JAVA2 STANDARD EDITION DEVELOPMENT KIT 5.0
?? JAVA
?? 第 1 頁 / 共 4 頁
字號:
    }    public Dimension getMaximumSize( JComponent c ) {	return new Dimension(Short.MAX_VALUE, Short.MAX_VALUE);    }    // This is currently hacky...    public int getAccessibleChildrenCount(JComponent c) {        if ( comboBox.isEditable() ) {            return 2;        }        else {            return 1;        }    }    // This is currently hacky...    public Accessible getAccessibleChild(JComponent c, int i) {        // 0 = the popup        // 1 = the editor        switch ( i ) {        case 0:            if ( popup instanceof Accessible ) {                AccessibleContext ac = ((Accessible) popup).getAccessibleContext();                ac.setAccessibleParent(comboBox);                return(Accessible) popup;            }            break;        case 1:            if ( comboBox.isEditable()                  && (editor instanceof Accessible) ) {                AccessibleContext ac = ((Accessible) editor).getAccessibleContext();                ac.setAccessibleParent(comboBox);                return(Accessible) editor;            }            break;        }        return null;    }    //    // end ComponentUI Implementation    //===============================    //======================    // begin Utility Methods    //    /**     * Returns whether or not the supplied keyCode maps to a key that is used for     * navigation.  This is used for optimizing key input by only passing non-     * navigation keys to the type-ahead mechanism.  Subclasses should override this     * if they change the navigation keys.     */    protected boolean isNavigationKey( int keyCode ) {        return keyCode == KeyEvent.VK_UP || keyCode == KeyEvent.VK_DOWN ||               keyCode == KeyEvent.VK_KP_UP || keyCode == KeyEvent.VK_KP_DOWN;    }      private boolean isNavigationKey(int keyCode, int modifiers) { 	InputMap inputMap = comboBox.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT); 	KeyStroke key = KeyStroke.getKeyStroke(keyCode, modifiers);	 	if (inputMap != null && inputMap.get(key) != null) { 	    return true; 	} 	return false;    }    /**     * Selects the next item in the list.  It won't change the selection if the     * currently selected item is already the last item.     */    protected void selectNextPossibleValue() {        int si;        if ( isTableCellEditor ) {            si = listBox.getSelectedIndex();        }        else {            si = comboBox.getSelectedIndex();        }        if ( si < comboBox.getModel().getSize() - 1 ) {            if ( isTableCellEditor ) {                listBox.setSelectedIndex( si + 1 );                listBox.ensureIndexIsVisible( si + 1 );            }            else {                comboBox.setSelectedIndex(si+1);            }            comboBox.repaint();        }    }    /**     * Selects the previous item in the list.  It won't change the selection if the     * currently selected item is already the first item.     */    protected void selectPreviousPossibleValue() {        int si;        if ( isTableCellEditor ) {            si = listBox.getSelectedIndex();        }        else {            si = comboBox.getSelectedIndex();        }        if ( si > 0 ) {            if ( isTableCellEditor ) {                listBox.setSelectedIndex( si - 1 );                listBox.ensureIndexIsVisible( si - 1 );            }            else {                comboBox.setSelectedIndex(si-1);            }            comboBox.repaint();        }    }    /**     * Hides the popup if it is showing and shows the popup if it is hidden.     */    protected void toggleOpenClose() {        setPopupVisible(comboBox, !isPopupVisible(comboBox));    }    /**     * Returns the area that is reserved for drawing the currently selected item.     */    protected Rectangle rectangleForCurrentValue() {        int width = comboBox.getWidth();        int height = comboBox.getHeight();        Insets insets = getInsets();        int buttonSize = height - (insets.top + insets.bottom);	if ( arrowButton != null ) {            buttonSize = arrowButton.getWidth();	}	if(BasicGraphicsUtils.isLeftToRight(comboBox)) {	    return new Rectangle(insets.left, insets.top,			     width - (insets.left + insets.right + buttonSize),                             height - (insets.top + insets.bottom));	}	else {	    return new Rectangle(insets.left + buttonSize, insets.top,			     width - (insets.left + insets.right + buttonSize),                             height - (insets.top + insets.bottom));	}    }    /**     * Gets the insets from the JComboBox.     */    protected Insets getInsets() {        return comboBox.getInsets();    }    //    // end Utility Methods    //====================    //===============================    // begin Painting Utility Methods    //    /**     * Paints the currently selected item.     */    public void paintCurrentValue(Graphics g,Rectangle bounds,boolean hasFocus) {        ListCellRenderer renderer = comboBox.getRenderer();        Component c;        if ( hasFocus && !isPopupVisible(comboBox) ) {            c = renderer.getListCellRendererComponent( listBox,                                                       comboBox.getSelectedItem(),                                                       -1,                                                       true,                                                       false );        }        else {            c = renderer.getListCellRendererComponent( listBox,                                                       comboBox.getSelectedItem(),                                                       -1,                                                       false,                                                       false );            c.setBackground(UIManager.getColor("ComboBox.background"));        }        c.setFont(comboBox.getFont());        if ( hasFocus && !isPopupVisible(comboBox) ) {            c.setForeground(listBox.getSelectionForeground());            c.setBackground(listBox.getSelectionBackground());        }        else {            if ( comboBox.isEnabled() ) {                c.setForeground(comboBox.getForeground());                c.setBackground(comboBox.getBackground());            }            else {                c.setForeground(DefaultLookup.getColor(                         comboBox, this, "ComboBox.disabledForeground", null));                c.setBackground(DefaultLookup.getColor(                         comboBox, this, "ComboBox.disabledBackground", null));            }        }        // Fix for 4238829: should lay out the JPanel.        boolean shouldValidate = false;        if (c instanceof JPanel)  {            shouldValidate = true;        }        currentValuePane.paintComponent(g,c,comboBox,bounds.x,bounds.y,                                        bounds.width,bounds.height, shouldValidate);    }    /**     * Paints the background of the currently selected item.     */    public void paintCurrentValueBackground(Graphics g,Rectangle bounds,boolean hasFocus) {        Color t = g.getColor();        if ( comboBox.isEnabled() )            g.setColor(DefaultLookup.getColor(comboBox, this,                                              "ComboBox.background", null));        else            g.setColor(DefaultLookup.getColor(comboBox, this,                                     "ComboBox.disabledBackground", null));        g.fillRect(bounds.x,bounds.y,bounds.width,bounds.height);        g.setColor(t);    }    /**     * Repaint the currently selected item.     */    void repaintCurrentValue() {        Rectangle r = rectangleForCurrentValue();        comboBox.repaint(r.x,r.y,r.width,r.height);    }    //    // end Painting Utility Methods    //=============================    //===============================    // begin Size Utility Methods    //    /**      * Return the default size of an empty display area of the combo box using     * the current renderer and font.     *     * @return the size of an empty display area     * @see #getDisplaySize     */    protected Dimension getDefaultSize() {	// Calculates the height and width using the default text renderer	Dimension d = getSizeForComponent(getDefaultListCellRenderer().getListCellRendererComponent(listBox, " ", -1, false, false));        return new Dimension(d.width, d.height);    }    /**      * Returns the calculated size of the display area. The display area is the     * portion of the combo box in which the selected item is displayed. This      * method will use the prototype display value if it has been set.      * <p>     * For combo boxes with a non trivial number of items, it is recommended to     * use a prototype display value to significantly speed up the display      * size calculation.     *      * @return the size of the display area calculated from the combo box items     * @see javax.swing.JComboBox#setPrototypeDisplayValue     */    protected Dimension getDisplaySize() {        if (!isDisplaySizeDirty)  {            return new Dimension(cachedDisplaySize);        }	Dimension result = new Dimension();                ListCellRenderer renderer = comboBox.getRenderer();        if (renderer == null)  {            renderer = new DefaultListCellRenderer();        }        Object prototypeValue = comboBox.getPrototypeDisplayValue();        if (prototypeValue != null)  {            // Calculates the dimension based on the prototype value            result = getSizeForComponent(renderer.getListCellRendererComponent(listBox, 									       prototypeValue,									       -1, false, false));        } else {            // Calculate the dimension by iterating over all the elements in the combo            // box list.            ComboBoxModel model = comboBox.getModel();            int modelSize = model.getSize();	    Dimension d;            Component cpn;                        if (modelSize > 0 ) {                for (int i = 0; i < modelSize ; i++ ) {                    // Calculates the maximum height and width based on the largest                    // element                    d = getSizeForComponent(renderer.getListCellRendererComponent(listBox, 										  model.getElementAt(i),										  -1, false, false));                    result.width = Math.max(result.width,d.width);                    result.height = Math.max(result.height,d.height);                }            } else {		result = getDefaultSize();		if (comboBox.isEditable()) {		    result.width = 100;		}            }        }	if ( comboBox.isEditable() ) {	    Dimension d = editor.getPreferredSize();	    result.width = Math.max(result.width,d.width);	    result.height = Math.max(result.height,d.height);	}                // Set the cached value        cachedDisplaySize.setSize(result.width, result.height);        isDisplaySizeDirty = false;        return result;    }    /**     * This has been refactored out in hopes that it may be investigated and     * simplified for the next major release. adding/removing     * the component to the currentValuePane and changing the font may be      * redundant operations.     */    private Dimension getSizeForComponent(Component comp) {	currentValuePane.add(comp);	comp.setFont(comboBox.getFont());	Dimension d = comp.getPreferredSize();	currentValuePane.remove(comp);	return d;    }	    //    // end Size Utility Methods    //=============================    //=================================    // begin Keyboard Action Management    //    /**     * Adds keyboard actions to the JComboBox.  Actions on enter and esc are already     * supplied.  Add more actions as you need them.     */    protected void installKeyboardActions() {	InputMap km = getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);	SwingUtilities.replaceUIInputMap(comboBox, JComponent.			     WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, km);        LazyActionMap.installLazyActionMap(comboBox, BasicComboBoxUI.class,                                           "ComboBox.actionMap");    }    InputMap getInputMap(int condition) {	if (condition == JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT) {	    return (InputMap)DefaultLookup.get(comboBox, this,                                               "ComboBox.ancestorInputMap");	}	return null;    }    boolean isTableCellEditor() {	return isTableCellEditor;    }    /**     * Removes the focus InputMap and ActionMap.     */    protected void uninstallKeyboardActions() {	SwingUtilities.replaceUIInputMap(comboBox, JComponent.				 WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, null);	SwingUtilities.replaceUIActionMap(comboBox, null);    }    //    // Actions    //     private static class Actions extends UIAction {        private static final String HIDE = "hidePopup";        private static final String DOWN = "selectNext";        private static final String DOWN_2 = "selectNext2";        private static final String TOGGLE = "togglePopup";        private static final String TOGGLE_2 = "spacePopup";        private static final String UP = "selectPrevious";        private static final String UP_2 = "selectPrevious2";        private static final String ENTER = "enterPressed";        private static final String PAGE_DOWN = "pageDownPassThrough";        private static final String PAGE_UP = "pageUpPassThrough";        private static final String HOME = "homePassThrough";        private static final String END = "endPassThrough";        Actions(String name) {            super(name);        }	public void actionPerformed( ActionEvent e ) {            String key = getName();            JComboBox comboBox = (JComboBox)e.getSource();            BasicComboBoxUI ui = (BasicComboBoxUI)BasicLookAndFeel.getUIOfType(                                  comboBox.getUI(), BasicComboBoxUI.class);            if (key == HIDE) {                comboBox.firePopupMenuCanceled();                comboBox.setPopupVisible(false);            }            else if (key == PAGE_DOWN || key == PAGE_UP ||                     key == HOME || key == END) {                int index = getNextIndex(comboBox, key);                if (index >= 0 && index < comboBox.getItemCount()) {                    comboBox.setSelectedIndex(index);                }            }            else if (key == DOWN) {                if (comboBox.isShowing() ) {                    if ( comboBox.isPopupVisible() ) {                        if (ui != null) {                            ui.selectNextPossibleValue();

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美在线观看视频一区二区| 日日嗨av一区二区三区四区| 欧美一区二区三区四区久久| 色88888久久久久久影院野外| 菠萝蜜视频在线观看一区| 国内成人精品2018免费看| 日韩不卡免费视频| 日本成人在线不卡视频| a级精品国产片在线观看| 色综合久久综合网97色综合| 色网站国产精品| 国产欧美一区二区精品久导航 | 亚洲国产精品传媒在线观看| 日本一二三不卡| 另类欧美日韩国产在线| 国产成人啪午夜精品网站男同| 国产盗摄一区二区| 日韩一区二区电影网| 国产女主播视频一区二区| 日本不卡一二三区黄网| 成人黄色大片在线观看| 精品国产电影一区二区| 国产日产欧美一区二区三区| 精品在线播放午夜| 色综合av在线| 亚洲精品午夜久久久| 青青草国产成人av片免费| 欧美三区免费完整视频在线观看| 日韩视频国产视频| 天使萌一区二区三区免费观看| 91成人免费在线| 亚洲自拍偷拍图区| 国产一区二区中文字幕| 在线视频一区二区免费| 一区二区三区中文字幕在线观看| 蜜芽一区二区三区| 国产99久久久国产精品潘金| 欧美日本精品一区二区三区| 国产日韩三级在线| 成人综合在线观看| 欧美高清视频在线高清观看mv色露露十八| 久久精品人人做| 国产毛片精品国产一区二区三区| 日韩欧美国产一区二区三区| 精品国产乱码久久久久久闺蜜 | av一本久道久久综合久久鬼色| 欧美激情一区二区三区不卡 | 欧美日韩精品欧美日韩精品一综合| 亚洲激情欧美激情| 欧美日韩一区二区三区四区| 日韩电影免费一区| 日韩精品一区二| 国产成a人亚洲精| 亚洲欧美激情小说另类| 久久99在线观看| 久久久精品免费观看| 日本不卡一区二区三区| 精品三级在线看| 日本在线不卡一区| 久久亚洲精精品中文字幕早川悠里| 日韩福利电影在线| 久久久久九九视频| 在线一区二区三区四区五区| 日韩av一二三| 欧美高清在线视频| 欧美性videosxxxxx| 亚洲免费毛片网站| 日韩久久久久久| 99精品久久只有精品| 国产精品久久久久一区| 成人av资源网站| 无码av免费一区二区三区试看 | 不卡免费追剧大全电视剧网站| 亚洲精品大片www| 久久久久久久久蜜桃| 欧美午夜不卡在线观看免费| 国产老肥熟一区二区三区| 久久亚洲一级片| 欧美日韩日日骚| aaa欧美大片| 精品制服美女丁香| 亚洲午夜国产一区99re久久| 欧美日韩国产精品成人| 成人午夜免费电影| 日本中文字幕不卡| 一区二区三区蜜桃| 国产欧美日韩久久| 日韩一区二区在线免费观看| 91在线观看美女| 天天色天天操综合| 亚洲欧美日韩一区二区三区在线观看| 欧美刺激脚交jootjob| 在线观看欧美精品| 成人黄色电影在线| 国产成人aaaa| 国产麻豆午夜三级精品| 免费在线看成人av| 午夜激情一区二区三区| 亚洲黄一区二区三区| 国产精品美女久久久久久2018| 欧美亚男人的天堂| 91影视在线播放| 成人高清免费观看| 粉嫩aⅴ一区二区三区四区五区| 久久精品国产成人一区二区三区| 亚洲午夜激情网站| 亚洲午夜视频在线观看| 一区二区三区日韩精品| 亚洲欧洲日产国产综合网| 欧美日韩国产首页在线观看| 色丁香久综合在线久综合在线观看| 成人激情黄色小说| 成人高清伦理免费影院在线观看| 成人免费黄色大片| 成人性生交大片免费看视频在线| 粉嫩av一区二区三区| 成人h精品动漫一区二区三区| 成人伦理片在线| 99视频一区二区三区| 91美女片黄在线观看91美女| 91免费视频大全| 欧美专区日韩专区| 91精品久久久久久久91蜜桃| 成人午夜看片网址| 本田岬高潮一区二区三区| 99re视频这里只有精品| 91视频你懂的| 欧美天堂一区二区三区| 91麻豆精品国产无毒不卡在线观看| 欧美日韩久久久| 中文字幕的久久| 亚洲国产精品成人久久综合一区| 欧美激情在线看| 亚洲欧美日韩在线| 日韩二区三区四区| 国内不卡的二区三区中文字幕| 国产精品正在播放| 一本色道久久综合精品竹菊| 欧美日韩另类一区| 2020日本不卡一区二区视频| 国产精品久久午夜| 亚洲国产毛片aaaaa无费看| 蜜桃精品在线观看| 成人黄色av电影| 91精品国产美女浴室洗澡无遮挡| 精品国产一区久久| 亚洲欧美一区二区在线观看| 午夜精品久久久久久久99水蜜桃| 久久精品国产99国产精品| gogogo免费视频观看亚洲一| 欧美日韩一区二区三区不卡| 久久理论电影网| 亚洲免费视频成人| 韩国毛片一区二区三区| 日本丶国产丶欧美色综合| 日韩美一区二区三区| 一区二区在线观看免费| 美女在线视频一区| 日本精品裸体写真集在线观看| 日韩午夜av一区| 亚洲六月丁香色婷婷综合久久| 蜜臀a∨国产成人精品| 99re这里只有精品首页| 欧美成人午夜电影| 亚洲综合色丁香婷婷六月图片| 国产在线不卡一卡二卡三卡四卡| 91国偷自产一区二区开放时间 | 亚洲精品乱码久久久久久日本蜜臀| 奇米四色…亚洲| 在线观看免费视频综合| 国产蜜臀av在线一区二区三区| 日韩精品福利网| www.激情成人| 久久久久久久电影| 免费观看成人av| 欧美日韩亚州综合| 又紧又大又爽精品一区二区| 国产精品一区在线| 日韩精品一区二区在线观看| 亚洲国产裸拍裸体视频在线观看乱了 | 国产激情视频一区二区在线观看| 欧美日韩和欧美的一区二区| 一区二区视频在线看| 91丨九色丨蝌蚪丨老版| 国产午夜精品久久久久久免费视 | 日韩精品一区二区三区swag| 亚洲一区二区精品3399| 色综合天天在线| 欧美视频第二页| 亚洲特黄一级片| 日韩黄色一级片| 欧美日韩视频专区在线播放| 亚洲久草在线视频| av不卡一区二区三区| 国产精品入口麻豆原神| 国产99久久久国产精品潘金网站| 久久理论电影网| 国产成人精品影院| 国产色产综合色产在线视频| 国产成人综合在线播放|