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

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

?? officexputilities.java

?? JAVA swing 的office xp 和 office2003 風格。
?? JAVA
字號:
/* ====================================================================
 * 
 * Office Look and Feels License
 * http://sourceforge.net/projects/officelnfs
 *
 * Copyright (c) 2003-2005 Robert Futrell.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer. 
 *
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in
 *    the documentation and/or other materials provided with the
 *    distribution.
 *
 * 3. The names "Office Look And Feels" and "OfficeLnFs" must not
 *    be used to endorse or promote products derived from this software
 *    without prior written permission. For written permission, please
 *    contact robert_futrell@users.sourceforge.net.
 *
 * 4. Products derived from this software may not be called "OfficeLnFs"
 *    nor may "OfficeLnFs" appear in their names without prior written
 *    permission.
 *
 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 * DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
 * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
 * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 * ====================================================================
 */ 
package org.fife.plaf.OfficeXP;

import java.awt.*;
import javax.swing.AbstractButton;
import javax.swing.BorderFactory;
import javax.swing.ButtonModel;
import javax.swing.Icon;
import javax.swing.JMenu;
import javax.swing.JMenuItem;
import javax.swing.UIManager;
import javax.swing.border.Border;
import javax.swing.border.TitledBorder;


/**
 * Utility routines for the OfficeXP Look and Feel.
 *
 * @author Robert Futrell
 * @version 1.0
 */
public class OfficeXPUtilities {

	/**
	 * Size of the specially-colored area on the left-hand side of menu items.
	 */
	public static final int LEFT_EDGE_WIDTH			= 24;

	/**
	 * Composite used to create disabled icons that show their background's
	 * color through.
	 */
	public static final AlphaComposite ICON_COMPOSITE =
				AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 0.55f);


	/**
	 * Creates a dark gray, rounded-edge border with a blue title.
	 *
	 * @param title The title for the border.
	 * @return The border.
	 */
	public static Border createWindowsXPBorder(String title) {
		return createWindowsXPBorder(title, new Color(140,140,140));
	}


	/**
	 * Creates a rounded-edge border with a blue title.
	 *
	 * @param title The title for the border.
	 * @param borderColor The color to use for the border.
	 * @return The border.
	 */
	public static Border createWindowsXPBorder(String title,
										Color borderColor) {
		if (title.charAt(title.length()-1) != ':')
			title += ":";
		return BorderFactory.createTitledBorder(
								//new LineBorder(borderColor, 1, true),
								new RoundedLineBorder(borderColor, 1),
								title,
								TitledBorder.DEFAULT_JUSTIFICATION,
								TitledBorder.DEFAULT_POSITION,
								null,
								Color.BLUE.brighter()
							);
	}


	/**
	 * Paints the "disabled" icon for a given button (toolbar button, menu
	 * item, etc.) with an alpha composite so the background shows through a
	 * little bit.
	 *
	 * @param g The graphics context with which to paint.
	 * @param b The button whose disabled button we should paint.  If it has
	 *        no disabled icon, nothing is painted.
	 * @param iconRect The bounds in which to paint the icon.
	 */
	public static void paintDisabledButtonIcon(Graphics g, AbstractButton b,
									Rectangle iconRect) {
		Icon icon = (Icon)b.getDisabledIcon();
		// Necessary as some icons (like JInternalFrame's) don't have
		// disabled icons.
		if (icon!=null) {
			Graphics2D g2d = (Graphics2D)g;
			g2d.setComposite(OfficeXPUtilities.ICON_COMPOSITE);
			icon.paintIcon(b, g2d, iconRect.x, iconRect.y);
			g2d = null;
		}
	}


	/**
	 * Paints the background for a menu item (or a menu or separator in a
	 * menu).
	 *
	 * @param g The graphics context.
	 * @param c The menu item.
	 */
	public static void paintMenuItemBackground(Graphics g, Component c) {
		Graphics2D g2d = (Graphics2D) g;
		Paint menuItemBGPaint = (Paint)UIManager.get(
								"OfficeLnF.MenuItemIconAreaPaint");
		g2d.setPaint(menuItemBGPaint);
		int width = c.getWidth();
		int mainWidth = width - LEFT_EDGE_WIDTH;
		int height = c.getHeight();
		if (c.getComponentOrientation().isLeftToRight()) {
			g.fillRect(0,0,  LEFT_EDGE_WIDTH,height);
			g.setColor(c.getBackground());
			g.fillRect(LEFT_EDGE_WIDTH,0, mainWidth,height);
		}
		else {
			// Hack - translate so cached GradientPaints paint correctly.
			g2d.translate(width, height);
			g2d.rotate(Math.PI);
			g2d.fillRect(0,0,  LEFT_EDGE_WIDTH,height);
			g2d.rotate(Math.PI);//-Math.PI);
			g2d.translate(-width, -height);
			g2d.setColor(c.getBackground());
			g2d.fillRect(0,0, mainWidth,height);
		}
	}


	/**
	 * Paints the icon for a menu item (or a submenu in a menu).
	 *
	 * @param g The graphics context.
	 * @param menuItem The menu item.
	 * @param iconRect The rectangle in which to paint the icon.
	 */
	public static void paintMenuItemIcon(Graphics g, JMenuItem menuItem,
									Rectangle iconRect) {

		Icon icon;
		ButtonModel model = menuItem.getModel();

		if(!model.isEnabled()) {
			OfficeXPUtilities.paintDisabledButtonIcon(g, menuItem, iconRect);
		}

		else if(model.isPressed() && model.isArmed()) {
			icon = (Icon) menuItem.getPressedIcon();
			if(icon == null) {
				// Use default icon
				icon = (Icon) menuItem.getIcon();
			}
			if (icon!=null)
				icon.paintIcon(menuItem,g, iconRect.x,iconRect.y);
		}

		else {
			icon = (Icon) menuItem.getIcon();
			if (icon!=null) {
				if (model.isArmed()|| (menuItem instanceof JMenu && model.isSelected())) {
					Icon disabledIcon = (Icon)menuItem.getDisabledIcon();
					// Sometimes this is null.  This will result in no
					// shadow under the "raised up" icon, but oh well...
					if (disabledIcon!=null)
						disabledIcon.paintIcon(menuItem,g, iconRect.x,iconRect.y);
					icon.paintIcon(menuItem,g, iconRect.x-2,iconRect.y-2);
				}
				else
					icon.paintIcon(menuItem,g, iconRect.x,iconRect.y);
			}
		}

	}


	/**
	 * A line border with rounded edges.
	 */
	static class RoundedLineBorder implements Border {

		private Color borderColor;
		private int thickness;


		/**
		 * Creates a new <code>RoundedLineBorder</code> with default color
		 * border.
		 *
		 * @param thickness The thickness of the border.
		 */
		public RoundedLineBorder(int thickness) {
			this(new Color(140,140,140), thickness);
		}

		/**
		 * Creates a new <code>RoundedLineBorder</code>.
		 *
		 * @param borderColor The color you'd like to use for the border.
		 * @param thickness The thickness of the border.
		 */
		public RoundedLineBorder(Color borderColor, int thickness) {
			this.borderColor = borderColor;
			this.thickness = thickness;
		}

		/**
		 * Returns the insets of the border.
		 *
		 * @param c The component for which this border insets value applies.
		 * @return The insets of the border (i.e., the "size" of the border).
		 */
		public Insets getBorderInsets (Component c) {
			return new Insets(thickness, thickness, thickness, thickness);
		}

	    /**
     	* Returns whether or not the border is opaque.
	     */
	    public boolean isBorderOpaque() {
     	   return false; 	// Muse "see through" the rounded edges.
	    }

		/**
		 * Paints the border to <code>g</code>.
		 */
		public void paintBorder(Component c, Graphics g, int x, int y,
							int width, int height) {
			Color oldColor = g.getColor();
			g.setColor(borderColor);
			for(int i = 0; i < thickness; i++)
				g.drawRoundRect(x+i,y+i, width-i-i-1,height-i-i-1,
								thickness+7, thickness+7);
			g.setColor(oldColor);
		}

	}


}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久超碰97中文字幕| 亚洲精品成人悠悠色影视| 91黄色激情网站| 欧美日韩卡一卡二| 欧美日韩电影一区| 欧美日韩精品一区二区三区| 欧美亚洲国产怡红院影院| 欧美日韩视频专区在线播放| 欧美日韩免费观看一区三区| 在线播放日韩导航| 精品电影一区二区| 欧美国产一区二区| 一区二区三区四区在线| 艳妇臀荡乳欲伦亚洲一区| 午夜视频在线观看一区二区| 日韩和欧美的一区| 国产一区二区电影| 懂色av一区二区三区蜜臀| www.久久精品| 欧美精品一二三| 精品国产电影一区二区| 中文一区在线播放| 性久久久久久久久久久久| 捆绑变态av一区二区三区| 国产一区美女在线| 91免费观看视频| 91精品国产乱码| 国产精品乱码一区二三区小蝌蚪| 专区另类欧美日韩| 久久电影网站中文字幕| 成人av在线网站| 51精品国自产在线| 国产精品污www在线观看| 亚洲一二三区在线观看| 久国产精品韩国三级视频| av在线播放不卡| 日韩一区二区三区观看| 国产精品国产三级国产aⅴ原创 | 日韩国产在线观看一区| 国内精品伊人久久久久av一坑 | 91欧美一区二区| 91精品国产综合久久精品| 国产精品视频一区二区三区不卡 | 欧美一级艳片视频免费观看| 国产精品欧美经典| 日本午夜一区二区| 在线观看视频一区二区 | 97久久久精品综合88久久| 久久精品人人爽人人爽| 亚洲午夜免费视频| 91原创在线视频| 26uuu久久综合| 天堂蜜桃一区二区三区| 99久久精品情趣| 久久久久国色av免费看影院| 午夜亚洲福利老司机| 91丝袜呻吟高潮美腿白嫩在线观看| 欧美一级二级三级蜜桃| 亚洲电影一级片| 91一区二区在线| 亚洲欧洲精品一区二区三区| 精品一区二区久久| 日韩女优制服丝袜电影| 日日夜夜一区二区| 欧美日韩一区二区不卡| 亚洲精品五月天| 97久久精品人人做人人爽50路| 久久久久久亚洲综合影院红桃| 日韩电影免费在线观看网站| 欧美色图片你懂的| 亚洲成av人片| 欧美精选一区二区| 首页国产欧美久久| 91精品久久久久久久99蜜桃| 午夜久久电影网| 欧美日本在线观看| 日韩中文欧美在线| 日韩三级免费观看| 久久99国产精品麻豆| 久久久久国产一区二区三区四区| 国内精品嫩模私拍在线| 久久久久久久久久看片| 国产成人av自拍| 国产精品视频观看| 色欧美片视频在线观看在线视频| 自拍偷拍亚洲激情| 欧美色精品天天在线观看视频| 亚洲精品菠萝久久久久久久| 欧美天天综合网| 日韩在线卡一卡二| 久久久国产午夜精品| 成人a免费在线看| 亚洲国产婷婷综合在线精品| 91精品福利在线一区二区三区| 蜜臀av性久久久久蜜臀aⅴ流畅 | 国产精品一区二区在线看| 久久综合av免费| 成人激情免费视频| 亚洲午夜激情网站| 精品sm在线观看| 91原创在线视频| 日韩电影免费一区| 国产精品亲子伦对白| 欧美最猛性xxxxx直播| 久久99日本精品| 亚洲欧洲av在线| 欧美一级视频精品观看| av在线不卡电影| 日本怡春院一区二区| 国产精品女主播av| 在线电影国产精品| 成人国产精品免费网站| 亚洲国产精品欧美一二99| 久久精品在这里| 欧美网站一区二区| 成人性生交大片免费看在线播放 | 91精品国产色综合久久不卡蜜臀 | 中文字幕一区二区三中文字幕| 欧美亚日韩国产aⅴ精品中极品| 国产永久精品大片wwwapp| 亚洲国产精品综合小说图片区| 2020国产精品自拍| 欧美精品乱码久久久久久 | 亚洲男同性视频| 日韩免费观看2025年上映的电影| www.av亚洲| 国产久卡久卡久卡久卡视频精品| 亚洲高清免费在线| 中文字幕在线不卡一区| 久久色视频免费观看| 91精品国产一区二区三区香蕉| 91精品1区2区| 91看片淫黄大片一级在线观看| 国产一区在线不卡| 久久精品二区亚洲w码| 天天综合网 天天综合色| 亚洲精品久久久久久国产精华液 | 色综合一区二区| 丰满少妇在线播放bd日韩电影| 日韩成人午夜电影| 一区二区三区中文字幕精品精品| 日本一区二区三区电影| 精品国产伦一区二区三区观看体验| 欧美日韩国产精选| 欧美性猛片aaaaaaa做受| 97久久超碰国产精品| 成av人片一区二区| 成人黄色av电影| 成人动漫中文字幕| 99视频精品全部免费在线| 成人在线综合网| 不卡av免费在线观看| 成人夜色视频网站在线观看| 国产成人精品免费| 成人av小说网| 色综合av在线| 久久免费美女视频| 久久午夜老司机| 久久午夜国产精品| 久久先锋影音av鲁色资源| 精品国产乱码久久久久久图片 | 91精品综合久久久久久| 欧美男女性生活在线直播观看| 欧美综合一区二区三区| 欧美性猛交xxxx乱大交退制版| 欧美午夜在线观看| 日韩欧美色电影| 亚洲精品在线观| 国产精品久久久久久久久免费相片 | 欧美日韩高清一区二区不卡| 欧美浪妇xxxx高跟鞋交| 欧美日韩一卡二卡| 精品少妇一区二区三区免费观看| 精品日韩在线观看| 国产精品网友自拍| 一二三四社区欧美黄| 午夜激情久久久| 蜜臀久久99精品久久久画质超高清| 久久精品国产亚洲a| 国产成人8x视频一区二区| 色婷婷av久久久久久久| 在线观看91视频| 欧美电视剧免费全集观看| 国产亚洲精品免费| 一区二区三区在线观看动漫| 91美女在线观看| 91麻豆精品久久久久蜜臀| 欧美精品一区二区三区蜜桃| 欧美国产精品劲爆| 日日夜夜精品视频免费| 国产成人在线视频免费播放| 91香蕉视频污| 精品99一区二区三区| 一个色妞综合视频在线观看| 国产一区二区三区精品欧美日韩一区二区三区| 成人亚洲一区二区一| 欧美一区二区黄| 亚洲美女电影在线| 国产成人综合在线播放| 91精品国产综合久久久久久|