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

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

?? basicmenuitemui.java

?? java1.6眾多例子參考
?? JAVA
?? 第 1 頁 / 共 4 頁
字號:
	    windowInputMap.clear();	}	if (accelerator != null) {	    if (windowInputMap == null) {		windowInputMap = createInputMap(JComponent.						WHEN_IN_FOCUSED_WINDOW);		SwingUtilities.replaceUIInputMap(menuItem,			   JComponent.WHEN_IN_FOCUSED_WINDOW, windowInputMap);	    }	    windowInputMap.put(accelerator, "doClick");	}    }    public Dimension getMinimumSize(JComponent c) {	Dimension d = null; 	View v = (View) c.getClientProperty(BasicHTML.propertyKey); 	if (v != null) {	    d = getPreferredSize(c); 	    d.width -= v.getPreferredSpan(View.X_AXIS) - v.getMinimumSpan(View.X_AXIS); 	} 	return d;	    }    public Dimension getPreferredSize(JComponent c) {        return getPreferredMenuItemSize(c,                                        checkIcon,                                         arrowIcon,                                         defaultTextIconGap);    }    public Dimension getMaximumSize(JComponent c) {	Dimension d = null; 	View v = (View) c.getClientProperty(BasicHTML.propertyKey); 	if (v != null) {	    d = getPreferredSize(c); 	    d.width += v.getMaximumSpan(View.X_AXIS) - v.getPreferredSpan(View.X_AXIS); 	} 	return d;    }    // these rects are used for painting and preferredsize calculations.    // they used to be regenerated constantly.  Now they are reused.    static Rectangle zeroRect = new Rectangle(0,0,0,0);    static Rectangle iconRect = new Rectangle();    static Rectangle textRect = new Rectangle();    static Rectangle acceleratorRect = new Rectangle();    static Rectangle checkIconRect = new Rectangle();    static Rectangle arrowIconRect = new Rectangle();    static Rectangle viewRect = new Rectangle(Short.MAX_VALUE, Short.MAX_VALUE);    static Rectangle r = new Rectangle();    private void resetRects() {        iconRect.setBounds(zeroRect);        textRect.setBounds(zeroRect);        acceleratorRect.setBounds(zeroRect);        checkIconRect.setBounds(zeroRect);        arrowIconRect.setBounds(zeroRect);        viewRect.setBounds(0,0,Short.MAX_VALUE, Short.MAX_VALUE);        r.setBounds(zeroRect);    }    // Returns parent of this component if it is not a top-level menu    // Otherwise returns null    private JComponent getMenuItemParent(JMenuItem mi) {        Container parent = mi.getParent();        if ((parent instanceof JComponent) &&             (!(mi instanceof JMenu) ||               !((JMenu)mi).isTopLevelMenu())) {            return (JComponent) parent;        } else {            return null;        }    }    protected Dimension getPreferredMenuItemSize(JComponent c,                                                     Icon checkIcon,                                                     Icon arrowIcon,                                                     int defaultTextIconGap) {        JMenuItem b = (JMenuItem) c;                Icon icon = null;        /*          * in case .checkIconFactory is defined for this UI and the icon is          * compatible with it then the icon is handled by the checkIcon.         * That is if useCheckAndArrow() is true.         */        MenuItemCheckIconFactory iconFactory =             (MenuItemCheckIconFactory) UIManager.get(getPropertyPrefix()                 + ".checkIconFactory");        if (! useCheckAndArrow()                 || iconFactory == null                || ! iconFactory.isCompatible(checkIcon, getPropertyPrefix())) {           icon = b.getIcon();          }        String text = b.getText();        KeyStroke accelerator =  b.getAccelerator();        String acceleratorText = "";        if (accelerator != null) {            int modifiers = accelerator.getModifiers();            if (modifiers > 0) {                acceleratorText = KeyEvent.getKeyModifiersText(modifiers);                //acceleratorText += "-";                acceleratorText += acceleratorDelimiter;          }            int keyCode = accelerator.getKeyCode();            if (keyCode != 0) {                acceleratorText += KeyEvent.getKeyText(keyCode);            } else {                acceleratorText += accelerator.getKeyChar();            }        }        Font font = b.getFont();        FontMetrics fm = b.getFontMetrics(font);        FontMetrics fmAccel = b.getFontMetrics( acceleratorFont );        resetRects();                layoutMenuItem(                  fm, text, fmAccel, acceleratorText, icon, checkIcon, arrowIcon,                  b.getVerticalAlignment(), b.getHorizontalAlignment(),                  b.getVerticalTextPosition(), b.getHorizontalTextPosition(),                  viewRect, iconRect, textRect, acceleratorRect, checkIconRect, arrowIconRect,                  text == null ? 0 : defaultTextIconGap,                  defaultTextIconGap                  );        // labelRect contains size of text and label           Rectangle labelRect = iconRect.union(textRect);        // Find the result height        r.height = max(labelRect.height, checkIconRect.height,                       arrowIconRect.height, acceleratorRect.height);                // Find the result width        // Add the leading gap,         // the closing one will be added by the latest addMaxWidth() call          r.width = defaultTextIconGap;        // To determine the width of the parent popup menu (through DefaultMenuLayout)         // and to make accelerator texts appear in a column,         // find the widest icon, text, check icon, arrow icon and accelerator text.        // For the latest menu item we will know them exactly.        // It will be the widest menu item and it will determine         // the width of the parent popup menu.        JComponent p = getMenuItemParent(menuItem);        addMaxWidth(p, BasicMenuItemUI.MAX_ICON_WIDTH, iconRect.width,                 defaultTextIconGap, false);        addMaxWidth(p, BasicMenuItemUI.MAX_TEXT_WIDTH, textRect.width,                 defaultTextIconGap, false);        addMaxWidth(p, BasicMenuItemUI.MAX_ACC_WIDTH, acceleratorRect.width,                 defaultTextIconGap, false);	if( useCheckAndArrow() ) {            // Force gap for the check icon to avoid absence of the gap between             // the text and arrow icon because of the layoutMenuItem() features            addMaxWidth(p, BasicMenuItemUI.MAX_CHECK_ICON_WIDTH,                         checkIconRect.width, defaultTextIconGap, true);            addMaxWidth(p, BasicMenuItemUI.MAX_ARROW_ICON_WIDTH,                         arrowIconRect.width, defaultTextIconGap, false);        }	        Insets insets = b.getInsets();        if(insets != null) {            r.width += insets.left + insets.right;            r.height += insets.top + insets.bottom;        }        // if the width is even, bump it up one. This is critical        // for the focus dash line to draw properly        if(r.width%2 == 0) {            r.width++;        }        // if the height is even, bump it up one. This is critical        // for the text to center properly        if(r.height%2 == 0                 && Boolean.TRUE !=                     UIManager.get(getPropertyPrefix() + ".evenHeight")) {            r.height++;        }/*	if(!(b instanceof JMenu && ((JMenu) b).isTopLevelMenu()) ) {	    	    // Container parent = menuItem.getParent();	    JComponent p = (JComponent) parent;	    	    System.out.println("MaxText: "+p.getClientProperty(BasicMenuItemUI.MAX_TEXT_WIDTH));	    System.out.println("MaxACC"+p.getClientProperty(BasicMenuItemUI.MAX_ACC_WIDTH));	    	    System.out.println("returning pref.width: " + r.width);	    System.out.println("Current getSize: " + b.getSize() + "\n");        }*/	return r.getSize();    }    private int max(int... values) {        int maxValue = Integer.MIN_VALUE;        for (int i : values) {            if (i > maxValue) {                maxValue = i;            }        }        return maxValue;    }        // Calculates maximal width through specified parent component client property    // and adds it to the width of rectangle r     private void addMaxWidth(JComponent parent,                              String propertyName,                              int curWidth,                             int defaultTextIconGap,                             boolean forceGap) {        // Get maximal width from parent client property        Integer maxWidth = null;        if (parent != null) {            maxWidth = (Integer) parent.getClientProperty(propertyName);        }            if (maxWidth == null) {            maxWidth = 0;        }                // Store new maximal width in parent client property         if (curWidth > maxWidth) {            maxWidth = curWidth;            if (parent != null) {                parent.putClientProperty(propertyName, maxWidth);            }        }        // Add calculated maximal width and gap        if (maxWidth > 0) {            r.width += defaultTextIconGap;            r.width += maxWidth;        } else {            if (forceGap) {                r.width += defaultTextIconGap;            }        }    }    /**     * We draw the background in paintMenuItem()     * so override update (which fills the background of opaque     * components by default) to just call paint().     *     */    public void update(Graphics g, JComponent c) {        paint(g, c);    }    public void paint(Graphics g, JComponent c) {        paintMenuItem(g, c, checkIcon, arrowIcon,                      selectionBackground, selectionForeground,                      defaultTextIconGap);    }    protected void paintMenuItem(Graphics g, JComponent c,                                     Icon checkIcon, Icon arrowIcon,                                     Color background, Color foreground,                                     int defaultTextIconGap) {        JMenuItem b = (JMenuItem) c;        ButtonModel model = b.getModel();        //   Dimension size = b.getSize();        int menuWidth = b.getWidth();        int menuHeight = b.getHeight();        Insets i = c.getInsets();	        resetRects();        viewRect.setBounds( 0, 0, menuWidth, menuHeight );        viewRect.x += i.left;        viewRect.y += i.top;        viewRect.width -= (i.right + viewRect.x);        viewRect.height -= (i.bottom + viewRect.y);        Font holdf = g.getFont();        Font f = c.getFont();        g.setFont( f );        FontMetrics fm = SwingUtilities2.getFontMetrics(c, g, f);        FontMetrics fmAccel = SwingUtilities2.getFontMetrics(                                   c, g, acceleratorFont);        // get Accelerator text        KeyStroke accelerator =  b.getAccelerator();        String acceleratorText = "";        if (accelerator != null) {            int modifiers = accelerator.getModifiers();            if (modifiers > 0) {                acceleratorText = KeyEvent.getKeyModifiersText(modifiers);                //acceleratorText += "-";                acceleratorText += acceleratorDelimiter;	    }            int keyCode = accelerator.getKeyCode();            if (keyCode != 0) {                acceleratorText += KeyEvent.getKeyText(keyCode);            } else {                acceleratorText += accelerator.getKeyChar();            }        }        Icon icon = null;        /*          * in case .checkIconFactory is defined for this UI and the icon is          * compatible with it then the icon is handled by the checkIcon.         * That is if useCheckAndArrow() is true.         */        MenuItemCheckIconFactory iconFactory =             (MenuItemCheckIconFactory) UIManager.get(getPropertyPrefix()                 + ".checkIconFactory");        if (! useCheckAndArrow()                 || iconFactory == null                || ! iconFactory.isCompatible(checkIcon, getPropertyPrefix())) {           icon = b.getIcon();          }        // layout the text and icon        String text = layoutMenuItem(            fm, b.getText(), fmAccel, acceleratorText, icon,            checkIcon, arrowIcon,            b.getVerticalAlignment(), b.getHorizontalAlignment(),            b.getVerticalTextPosition(), b.getHorizontalTextPosition(),            viewRect, iconRect, textRect, acceleratorRect,             checkIconRect, arrowIconRect,            b.getText() == null ? 0 : defaultTextIconGap,            defaultTextIconGap        );         // Paint background	paintBackground(g, b, background);        Color holdc = g.getColor();        // Paint the Check        if (checkIcon != null) {            if(model.isArmed() || (c instanceof JMenu && model.isSelected())) {                g.setColor(foreground);

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
五月天一区二区| 欧美韩日一区二区三区| 黄页视频在线91| 亚洲精品欧美激情| 2欧美一区二区三区在线观看视频| 国产suv一区二区三区88区| 亚洲一区二区三区四区的| 久久久午夜电影| 欧美日韩一区视频| 国产夫妻精品视频| 日本成人中文字幕在线视频 | 2024国产精品| 欧美色偷偷大香| 成人app下载| 国内精品嫩模私拍在线| 天堂蜜桃91精品| 亚洲男人都懂的| 色噜噜狠狠一区二区三区果冻| 午夜av一区二区| 国产精品乱人伦中文| 欧美电视剧免费全集观看| 91福利国产精品| 成人av资源站| 国产成人99久久亚洲综合精品| 日韩精品一二三区| 亚洲黄色片在线观看| 亚洲国产精品v| 久久蜜桃香蕉精品一区二区三区| 欧美电影影音先锋| 欧美三级在线播放| 色八戒一区二区三区| 99久久综合国产精品| 国产成人午夜精品5599| 九九视频精品免费| 日本在线不卡一区| 奇米综合一区二区三区精品视频| 夜夜嗨av一区二区三区四季av| 国产精品卡一卡二卡三| 中文字幕乱码久久午夜不卡| 久久久久国产一区二区三区四区| 美女尤物国产一区| 一区二区三区欧美视频| 亚洲欧洲无码一区二区三区| 欧美国产日韩一二三区| 日韩高清一级片| 亚洲午夜私人影院| 26uuu亚洲综合色| 中文av字幕一区| 色综合久久88色综合天天免费| 激情小说亚洲一区| 91天堂素人约啪| av一本久道久久综合久久鬼色| 日本亚洲最大的色成网站www| 欧美成人一区二区三区| 成人精品国产一区二区4080| 国产成人av自拍| 91传媒视频在线播放| 欧美日韩精品久久久| 亚洲宅男天堂在线观看无病毒| 玉足女爽爽91| 亚洲精选视频在线| 亚洲日本在线天堂| 亚洲免费三区一区二区| 国产精品免费久久久久| 久久免费看少妇高潮| 欧美成人aa大片| 欧美一级理论性理论a| 欧美欧美欧美欧美| 欧美视频一二三区| 色婷婷综合久久久久中文| 国产91高潮流白浆在线麻豆| 狠狠色丁香婷综合久久| 国产一级精品在线| 国产成人免费在线视频| aaa欧美日韩| 欧美日韩午夜影院| 日韩视频在线观看一区二区| 精品欧美一区二区在线观看| 日本一区二区电影| 婷婷中文字幕一区三区| 麻豆精品视频在线观看| 97久久人人超碰| 成人av片在线观看| 色婷婷激情综合| 欧美成人vps| 在线不卡中文字幕| 欧美人与z0zoxxxx视频| 91精品国产乱| 综合久久一区二区三区| 成人免费av网站| 丁香啪啪综合成人亚洲小说| 欧亚洲嫩模精品一区三区| 欧美一区在线视频| 国产精品丝袜91| 天天色天天爱天天射综合| 91精品一区二区三区久久久久久 | 欧美日韩一区二区三区不卡| 精品精品国产高清一毛片一天堂| 在线亚洲欧美专区二区| 日韩精品最新网址| 亚洲欧美日韩一区二区| 久久99久国产精品黄毛片色诱| 99v久久综合狠狠综合久久| 欧美性xxxxxxxx| 亚洲欧洲日韩女同| 99久久综合精品| 有坂深雪av一区二区精品| a亚洲天堂av| 丝袜脚交一区二区| 亚洲人成在线播放网站岛国 | 五月天网站亚洲| 欧美午夜片在线看| 亚洲精选免费视频| 91啪亚洲精品| 亚洲蜜臀av乱码久久精品蜜桃| 国产一区欧美二区| 久久品道一品道久久精品| 5566中文字幕一区二区电影| 欧美色图天堂网| 国产精品国产三级国产三级人妇| 青娱乐精品视频在线| 色视频欧美一区二区三区| 国产视频一区二区在线观看| 日本欧美一区二区三区| 欧美亚洲尤物久久| 久久精品夜夜夜夜久久| 老司机精品视频在线| 欧美巨大另类极品videosbest | 成人免费视频在线观看| 国产成人免费9x9x人网站视频| 日韩精品中午字幕| 日本欧美一区二区| 4438x成人网最大色成网站| 亚洲精品视频一区| 91免费小视频| 亚洲男人电影天堂| 日本韩国欧美在线| 亚洲日本电影在线| 99亚偷拍自图区亚洲| 国产精品国产自产拍高清av| 成人午夜激情影院| 亚洲国产成人在线| a级精品国产片在线观看| 中文字幕不卡在线播放| 丰满白嫩尤物一区二区| 日本一区二区成人在线| 成人美女视频在线观看18| 国产欧美日韩另类一区| 国产成人午夜精品5599| 国产精品免费免费| 91麻豆精品在线观看| 一区二区日韩av| 欧美日韩激情在线| 免费看日韩a级影片| 26uuu久久综合| 国产成人免费视频一区| 中文幕一区二区三区久久蜜桃| av成人免费在线| 一区二区激情小说| 欧美精品久久一区| 看电影不卡的网站| 日本一二三不卡| 91精品福利视频| 日本美女一区二区三区| 久久久久久夜精品精品免费| 岛国精品在线观看| 亚洲激情中文1区| 在线电影国产精品| 国产毛片精品国产一区二区三区| 欧美激情资源网| 色噜噜夜夜夜综合网| 日韩av网站在线观看| 久久精品亚洲国产奇米99| 91网站最新地址| 天天av天天翘天天综合网色鬼国产 | 欧美日本国产一区| 蜜臀av一区二区在线观看| 国产欧美va欧美不卡在线| 日本高清不卡在线观看| 久久精品国产99国产| 亚洲欧洲精品一区二区精品久久久 | 一本一本大道香蕉久在线精品| 亚洲国产综合色| 久久中文娱乐网| 色婷婷国产精品综合在线观看| 美脚の诱脚舐め脚责91| 亚洲天堂成人在线观看| 精品国产青草久久久久福利| 色视频成人在线观看免| 国产精品一区一区| 日韩精彩视频在线观看| 亚洲国产精品成人久久综合一区| 欧美狂野另类xxxxoooo| jizzjizzjizz欧美| 久草热8精品视频在线观看| 一区二区国产盗摄色噜噜| 亚洲国产高清在线| 日韩一区二区视频| 日本道色综合久久| 成人在线视频一区二区|