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

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

?? officexpmenuui.java

?? JAVA swing 的office xp 和 office2003 風格。
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
		// Otherwise, this is a top-level menu.
		else {
			paintTopLevelMenuBackground(g, menu);
		}
    }


	protected void paintIcon(Graphics g, JMenuItem menuItem) {
		OfficeXPUtilities.paintMenuItemIcon(g, menuItem, iconRect);
	}


	protected void paintMenuItem(Graphics g, JComponent c,
                                     Icon checkIcon, Icon arrowIcon,
                                     Color background, Color foreground,
                                     int defaultTextIconGap) {

		JMenu menu = (JMenu)c;

		// For a top-level menu item, paint regularly (could be optimized...).
		if (menu.isTopLevelMenu())
			super.paintMenuItem(g, c, checkIcon, arrowIcon, background,
							foreground, defaultTextIconGap);

		// Otherwise, it must be painted like an OfficeXPMenuItem
		// (but optimized a tad).
		else {

			JMenuItem b = (JMenuItem) c;
			//ButtonModel model = b.getModel();

			//   Dimension size = b.getSize();
			int menuWidth = b.getWidth();
			int menuHeight = b.getHeight();

			resetRects();

			viewRect.setBounds( 0, 0, menuWidth, menuHeight );

			Font holdf = g.getFont();
			Font f = c.getFont();
			g.setFont( f );
			FontMetrics fm = c.getFontMetrics( f );

			// layout the text and icon
			String text = layoutMenuItem(
				fm, b.getText(), b.getIcon(),
				arrowIcon, viewRect, iconRect, textRect, arrowIconRect,
				b.getText() == null ? 0 : defaultTextIconGap,
				defaultTextIconGap
			);

			// Paint background
			paintBackground(g, b, background);

			Color holdc = g.getColor();

			// Paint the Icon
			paintIcon(g, menuItem);

			// Draw the Text
	 		if(text != null) {
	 			View v = (View) c.getClientProperty(BasicHTML.propertyKey);
	 			if (v != null)
	 				v.paint(g, textRect);
				else
					paintText(g, b, textRect, text);

			}

			// Paint the Arrow
			if (arrowIcon != null) {
				arrowIcon.paintIcon(c, g, arrowIconRect.x, arrowIconRect.y);
			}

			g.setColor(holdc);
			g.setFont(holdf);

		}

	}


	/*
	 * (non-Javadoc) NOTE:  This is NOT the same as
	 * OfficeXPMenuItemUI.paintBackground() - see "if (model.isSelected())"
	 * line...
	 */
	protected void paintSubmenuBackground(Graphics g, JMenu menu) {

		ButtonModel model = menu.getModel();
		Color oldColor = g.getColor();
		int menuWidth = menu.getWidth();
		int menuHeight = menu.getHeight();

		paintUnarmedBackground(g, menu);

		//if (model.isArmed() || model.isSelected()) {
		if (model.isSelected()) {

			int width = menuWidth - 3;
			int height = menuHeight - 2;

			g.setColor(UIManager.getColor("OfficeLnF.HighlightBorderColor"));
			g.drawRect(1,0, width,height);
			g.setColor(UIManager.getColor("OfficeLnF.HighlightColor"));
			g.fillRect(2,1, width-1,height-1);
			g.setColor(oldColor);

		}
		else {
			// Do nothing; the background has already been painted above.
		}

		// Add the white line to the bottom item.  Note that this CANNOT be added as
		// a part of the popup menu's border because of Office XP's menu item design;
		// there's an empty line between each menu item, but the top and bottom empty
		// lines are pure background color (no "khaki" on the left).  If you can think
		// of a simpler way to do it, then by all means, go ahead.
		Component parent = menu.getParent();
		if (parent instanceof JPopupMenu) {
			JPopupMenu popupMenu = (JPopupMenu)parent;
			if (popupMenu.getComponentIndex(menu) ==
					popupMenu.getComponentCount()-1) {
				g.setColor(menu.getBackground());
				int y = menuHeight - 1;
				// Do whole line to cover both LTR and RTL.
				g.drawLine(0,y, menuWidth-1,y);
			}
		}

		g.setColor(oldColor);

	}


    /**
     * Method which renders the text of the current menu item.
     *
     * @param g Graphics context
     * @param menuItem Current menu item to render
     * @param textRect Bounding rectangle to render the text.
     * @param text String to render
     */
    protected void paintText(Graphics g, JMenuItem menuItem,
    							Rectangle textRect, String text) {

		ButtonModel model = menuItem.getModel();

		if(!model.isEnabled()) {
		    OfficeXPGraphicsUtils.paintText(g, menuItem, textRect, text, 0);
		}
		else {
		    FontMetrics fm = menuItem.getFontMetrics(g.getFont());
		    int mnemonicIndex = menuItem.getDisplayedMnemonicIndex();
	 	    OfficeXPGraphicsUtils.drawStringUnderlineCharAt(g, fm, text,
					mnemonicIndex, textRect.x, textRect.y+fm.getAscent());
		}

    }


	protected void paintTopLevelMenuBackground(Graphics g, JMenu menu) {

		ButtonModel model = menu.getModel();
		Color oldColor = g.getColor();
		int menuWidth = menu.getWidth();
		int menuHeight = menu.getHeight();

		if (model.isArmed() || model.isSelected()) {

			// Fill-in with color.
			g.setColor(UIManager.getColor("OfficeXPLnF.ChosenMenuColor"));
			g.fillRect(0,0, menuWidth,menuHeight);

			// Draw the "border."
			JPopupMenu popupMenu = menu.getPopupMenu();
			JMenuBar menuBar = (JMenuBar)menu.getParent();
			Point menuLocation = menu.getLocation();
			Point popupMenuLocation = SwingUtilities.convertPoint(popupMenu,
									popupMenu.getLocation(), menuBar);
			//int newX = menuLocation.x - popupMenuLocation.x + 1;
			g.setColor(UIManager.getDefaults().getColor("OfficeLnF.MenuBorderColor"));
			// If the popup menu is below the menu bar or the popup isn't visible
			// (happens if the user presses "Alt" to activate the menus).
			if (menuLocation.y<popupMenuLocation.y || !menu.isPopupMenuVisible()) {

				g.drawLine(0,2, 0,menuHeight-1);
				g.drawLine(0,2, menuWidth-5,2);
				g.drawLine(menuWidth-5,2, menuWidth-5,menuHeight-1);
/*
				// Shadow - NOT ACCURATE!!
				g.setColor(new Color(225,225,225));
				g.fillRect(menuWidth-4,6,  4,menuHeight);
				g.setColor(new Color(210,210,210));
				g.fillRect(menuWidth-4,8,  3,menuHeight);
				g.setColor(new Color(180,180,180));
				g.drawLine(menuWidth-4,10,  menuWidth-4,menuHeight);
				g.setColor(new Color(195,195,195));
				g.drawLine(menuWidth-3,10, menuWidth-3,menuHeight);
*/
			}
			// If the popup menu is above the menu bar.
			else {

				g.drawLine(0,0, 0,menuHeight-2);
				g.drawLine(0,menuHeight-2, menuWidth-5,menuHeight-2);
				g.drawLine(menuWidth-5,0, menuWidth-5,menuHeight-2);

				// Shadow ... ???

			}

		}

		else {

			// Needed by both items below.
			g.setColor(menu.getBackground());
			g.fillRect(0,0, menuWidth, menuHeight);

			if (isMouseOver() && model.isEnabled()) {
				g.setColor(UIManager.getColor("OfficeLnF.HighlightBorderColor"));
				g.drawRect(0,2, menuWidth-5,menuHeight-3);
				g.setColor(UIManager.getColor("OfficeLnF.HighlightColor"));
				g.fillRect(1,3, menuWidth-6,menuHeight-4);
			}

			else {
				// Background filled in above.
			}

		}

		g.setColor(oldColor);

	}


	protected void paintUnarmedBackground(Graphics g, JMenuItem menuItem) {
		OfficeXPUtilities.paintMenuItemBackground(g, menuItem);
	}


    protected void resetRects() {
        iconRect.setBounds(zeroRect);
        textRect.setBounds(zeroRect);
        arrowIconRect.setBounds(zeroRect);
        viewRect.setBounds(0,0,Short.MAX_VALUE, Short.MAX_VALUE);
    }


    /**
     * Set the temporary flag to indicate if the mouse has entered the menu.
     */
    private void setMouseOver(boolean over) {
		isMouseOver = over;
    }


    /**
     * Overrides the handler in WindowsMenuUI for some GUI changes.
     */
    protected class MouseInputHandler extends WindowsMenuUI.MouseInputHandler {

		public void mouseEntered(MouseEvent e) {
			super.mouseEntered(e);
			if (!OfficeXPLookAndFeel.isClassicWindows()) {
				setMouseOver(true);
				menuItem.repaint();
			}
		}

		public void mouseExited(MouseEvent e) {
			super.mouseExited(e);
			if (!OfficeXPLookAndFeel.isClassicWindows()) {
				setMouseOver(false);
				menuItem.repaint();
			}
		}

    }


}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
有坂深雪av一区二区精品| 毛片不卡一区二区| 麻豆91小视频| 91天堂素人约啪| 久久久久久久久伊人| 亚洲一区二区三区爽爽爽爽爽| 国产一区二区不卡| 欧美一区欧美二区| 一区二区三区欧美在线观看| 国产成人午夜99999| 欧美一区二区在线不卡| 亚洲宅男天堂在线观看无病毒| 国产.欧美.日韩| 精品少妇一区二区| 热久久一区二区| 在线视频一区二区三| 国产精品色婷婷| 国产麻豆成人传媒免费观看| 91精品在线免费| 亚洲大片一区二区三区| 在线欧美日韩精品| 亚洲蜜臀av乱码久久精品蜜桃| 高清beeg欧美| 久久精品一区八戒影视| 精品一区二区日韩| 日韩亚洲欧美中文三级| 奇米四色…亚洲| 91精品国产综合久久香蕉麻豆| 亚洲国产精品欧美一二99| 欧美专区在线观看一区| 一区二区国产视频| 色猫猫国产区一区二在线视频| 国产精品美女久久福利网站| 懂色中文一区二区在线播放| 国产欧美日韩另类视频免费观看| 国产精品18久久久久久久网站| 精品国产凹凸成av人网站| 久久er精品视频| 精品日韩欧美一区二区| 91麻豆国产福利精品| 中文字幕五月欧美| 99国产精品久| 亚洲一区二区三区视频在线 | 一本一道波多野结衣一区二区| 国产精品污网站| 99re这里只有精品首页| 一区二区三区四区激情| 欧美日韩国产在线观看| 日本特黄久久久高潮| 日韩精品一区二区三区在线| 国产原创一区二区| 国产精品成人一区二区三区夜夜夜| 99精品久久只有精品| 亚洲一区在线播放| 欧美成人免费网站| 成人免费视频国产在线观看| 亚洲摸摸操操av| 91精品国产色综合久久不卡蜜臀 | 91亚洲永久精品| 亚洲一二三专区| 欧美成人a视频| 99久久久久久| 日本在线不卡一区| 中文字幕第一页久久| 在线观看日韩精品| 国产一区二区三区不卡在线观看| 亚洲欧洲美洲综合色网| 欧美日本在线播放| 国产高清一区日本| 丝瓜av网站精品一区二区 | 日韩一区二区在线观看视频播放| 国产在线不卡一卡二卡三卡四卡| 综合网在线视频| 日韩免费福利电影在线观看| 99精品欧美一区二区三区综合在线| 日韩精品一卡二卡三卡四卡无卡| 久久久久久一二三区| 色94色欧美sute亚洲线路二| 精品写真视频在线观看| 一区二区三区美女视频| 久久久久久影视| 91精品一区二区三区久久久久久 | 久久精品亚洲精品国产欧美| 欧美丝袜丝交足nylons图片| 国产精品资源网站| 日韩vs国产vs欧美| 亚洲男人的天堂网| 国产欧美日韩激情| 日韩欧美国产精品一区| 在线精品视频小说1| 国产酒店精品激情| 蜜臀av性久久久久蜜臀aⅴ四虎 | 国产亚洲精品aa午夜观看| 欧美日韩国产天堂| 色爱区综合激月婷婷| 在线播放欧美女士性生活| 成人免费视频一区| 国产成人在线观看免费网站| 久色婷婷小香蕉久久| 性久久久久久久久久久久| 亚洲精品国产一区二区精华液| 国产欧美日韩三级| 国产午夜亚洲精品羞羞网站| 日韩欧美国产综合一区| 欧美日本精品一区二区三区| 一本久久综合亚洲鲁鲁五月天 | 免费久久精品视频| 亚洲成人av资源| 亚洲国产精品一区二区久久恐怖片 | 精品国内片67194| 欧美成人激情免费网| 这里只有精品免费| 欧美一区二视频| 91精品久久久久久久99蜜桃| 欧美巨大另类极品videosbest| 91黄色免费网站| 欧美午夜电影网| 欧美另类videos死尸| 欧美人妖巨大在线| 91精品免费在线| 日韩免费成人网| 久久精品一区二区三区不卡牛牛 | 狠狠色狠狠色综合日日91app| 狠狠狠色丁香婷婷综合激情| 韩国三级中文字幕hd久久精品| 美女视频一区在线观看| 捆绑调教一区二区三区| 久久99国产精品麻豆| 国产成人在线观看免费网站| 成人高清在线视频| 91小宝寻花一区二区三区| 色偷偷88欧美精品久久久| 精品视频免费看| 26uuu久久天堂性欧美| 国产亚洲一区二区三区| 中文字幕在线一区| 亚洲主播在线播放| 蜜臀av性久久久久蜜臀aⅴ流畅 | 精品国产免费视频| 国产精品情趣视频| 一区二区欧美在线观看| 青草av.久久免费一区| 国产ts人妖一区二区| 日本高清成人免费播放| 日韩片之四级片| 中文一区二区在线观看| 亚洲一区二区三区爽爽爽爽爽 | 亚洲自拍偷拍网站| 捆绑调教一区二区三区| 波多野结衣中文字幕一区 | 亚洲国产精品一区二区久久恐怖片 | 国精产品一区一区三区mba桃花| 波多野结衣亚洲| 在线播放视频一区| 国产欧美一区二区在线观看| 亚洲电影一级片| 国产91清纯白嫩初高中在线观看| 欧美色视频一区| 国产欧美日韩在线看| 日韩电影在线看| 99久久精品免费看国产免费软件| 91精品欧美综合在线观看最新| 国产精品乱码一区二区三区软件| 午夜激情久久久| 99久久99久久免费精品蜜臀| 日韩亚洲电影在线| 亚洲区小说区图片区qvod| 精品写真视频在线观看| 欧美三级日韩在线| 亚洲婷婷国产精品电影人久久| 麻豆国产精品一区二区三区 | 免费在线一区观看| 色欧美88888久久久久久影院| 久久欧美中文字幕| 日韩av一区二区三区| 色综合天天综合色综合av| 亚洲在线观看免费| 精品午夜久久福利影院| 欧美日韩一级大片网址| 亚洲欧美一区二区三区国产精品| 激情综合色播五月| 日韩一区二区三| 亚洲不卡一区二区三区| 色综合久久综合网97色综合| 久久九九全国免费| 国产一区二区按摩在线观看| 日韩一级视频免费观看在线| 亚洲第一狼人社区| 欧美自拍丝袜亚洲| 亚洲精品亚洲人成人网在线播放| 成人精品国产免费网站| 国产欧美一区二区精品久导航 | 国产麻豆成人传媒免费观看| 欧美成人一区二区三区| 日韩电影在线观看网站| 欧美久久久久久久久久| 天天爽夜夜爽夜夜爽精品视频| 精品视频123区在线观看| 亚洲影院在线观看| 欧美色图12p|