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

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

?? officexputilities.java

?? java lookandfeel office pack
?? 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.LineBorder;
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一区二区三区免费野_久草精品视频
美女任你摸久久 | 日本一区二区三区久久久久久久久不| 精品国产一区二区三区av性色| 国产精品久久久一本精品| 亚洲成人免费看| 丰满放荡岳乱妇91ww| 欧美中文字幕一区二区三区 | 欧美激情在线一区二区| 婷婷久久综合九色综合绿巨人| 国产精品影视天天线| 欧美日韩国产三级| 亚洲男同1069视频| 成人免费av在线| 久久先锋资源网| 日本三级韩国三级欧美三级| 一本色道久久综合狠狠躁的推荐| 精品精品欲导航| 日韩精品亚洲专区| 欧美自拍偷拍一区| 亚洲精品亚洲人成人网在线播放| 国产精品一区二区男女羞羞无遮挡 | 麻豆国产精品官网| 欧美日本一道本在线视频| 亚洲免费观看高清| 日本精品视频一区二区三区| 中文字幕av一区二区三区高| 国产成人综合网| 国产日韩v精品一区二区| 国产久卡久卡久卡久卡视频精品| 日韩一级欧美一级| 麻豆成人91精品二区三区| 欧美精品日韩综合在线| 日韩精品欧美成人高清一区二区| 在线视频欧美精品| 亚洲超碰精品一区二区| 欧美三级视频在线| 亚洲超碰97人人做人人爱| 欧美久久久久久蜜桃| 日韩 欧美一区二区三区| 91麻豆精品国产91久久久更新时间| 午夜精品久久久久影视| 欧美一区二区三区电影| 久久精品999| 国产午夜三级一区二区三| 国v精品久久久网| 综合久久国产九一剧情麻豆| 在线欧美一区二区| 污片在线观看一区二区| 日韩精品一区二区三区四区视频 | 99久久精品免费看国产免费软件| 国产精品久久久久婷婷| 色天使色偷偷av一区二区| 午夜精品一区二区三区电影天堂| 日韩美女在线视频| 国产精品综合视频| 一区二区三区不卡在线观看 | 欧美人妇做爰xxxⅹ性高电影| 日韩激情一二三区| 国产三级精品三级| 91高清视频免费看| 国产乱人伦精品一区二区在线观看| 国产午夜精品在线观看| 在线免费一区三区| 国精产品一区一区三区mba桃花 | 久久国产婷婷国产香蕉| 国产欧美精品一区二区三区四区| 一本色道久久综合亚洲aⅴ蜜桃| 天涯成人国产亚洲精品一区av| 精品国产一区二区三区av性色| 白白色 亚洲乱淫| 蜜臀久久99精品久久久久久9| 国产精品污污网站在线观看| 欧美日韩一区 二区 三区 久久精品| 精品一区二区三区免费播放| 亚洲精品一二三| 精品福利一区二区三区免费视频| 一本到不卡免费一区二区| 久久av中文字幕片| 一区二区三区在线高清| 久久久www成人免费毛片麻豆| 在线看日本不卡| 国产成人综合网站| 蜜桃av一区二区| 亚洲综合视频在线| 欧美国产欧美综合| 日韩你懂的在线观看| 日本二三区不卡| 国产mv日韩mv欧美| 日本成人在线视频网站| 亚洲激情六月丁香| 国产亚洲欧洲一区高清在线观看| 欧美日韩电影在线播放| 成人精品一区二区三区中文字幕| 蜜臀av性久久久久蜜臀aⅴ四虎| 亚洲欧美综合另类在线卡通| 久久亚区不卡日本| 日韩欧美成人午夜| 欧美一区二区免费视频| 精品视频一区二区不卡| 一本一本久久a久久精品综合麻豆| 国产一区二区三区国产| 久久精品国产精品亚洲综合| 午夜婷婷国产麻豆精品| 亚洲午夜视频在线观看| 亚洲欧美视频在线观看| 亚洲欧洲日韩综合一区二区| 国产日本欧美一区二区| 久久久精品欧美丰满| 精品国产麻豆免费人成网站| 日韩视频在线你懂得| 欧美精品乱人伦久久久久久| 欧美性猛交xxxx乱大交退制版 | 亚洲免费大片在线观看| 国产精品另类一区| 国产精品国产精品国产专区不蜜| 国产亚洲综合在线| 国产精品蜜臀av| 国产精品女主播av| 亚洲视频狠狠干| 亚洲欧美日韩国产综合| 一区二区三区在线不卡| 亚洲综合色自拍一区| 午夜精品久久久| 日韩成人av影视| 久久av老司机精品网站导航| 精品一区二区三区蜜桃| 国产成人欧美日韩在线电影| 成人午夜看片网址| av不卡在线播放| 欧美三级电影一区| 欧美一级片在线| 久久日一线二线三线suv| 久久久久久久电影| 玉足女爽爽91| 日韩成人一级大片| 国产精品小仙女| 色播五月激情综合网| 在线观看91av| 久久久不卡网国产精品二区| 亚洲欧美经典视频| 水野朝阳av一区二区三区| 久久精品国产一区二区| 国产成人免费高清| 欧美探花视频资源| 久久综合九色综合97_久久久 | 99精品视频中文字幕| 91天堂素人约啪| 欧美理论电影在线| 国产亚洲综合av| 亚洲成人午夜影院| 国产精品香蕉一区二区三区| 色综合久久88色综合天天免费| 91精品国产全国免费观看| 国产免费久久精品| 亚洲国产一区二区三区青草影视 | 91福利社在线观看| 欧美岛国在线观看| 亚洲精品自拍动漫在线| 久久精品免费观看| 欧美色图12p| 中文字幕av在线一区二区三区| 五月天中文字幕一区二区| 国产精品一区二区在线看| 欧美亚洲免费在线一区| 国产精品天干天干在线综合| 天天综合色天天| 色综合久久久久久久| 久久综合av免费| 日韩高清欧美激情| 91丨porny丨首页| 国产日韩成人精品| 久久精品国产精品亚洲综合| 欧美色图在线观看| 国产精品国产a| 国产精品77777竹菊影视小说| 51午夜精品国产| 亚洲影视在线播放| 成人国产精品视频| 久久影院午夜片一区| 免费在线看一区| 欧美在线免费观看视频| 日韩理论片网站| 成人免费的视频| 中文字幕第一页久久| 国产精品一二三在| 日韩欧美亚洲国产精品字幕久久久| 亚洲国产精品久久人人爱| 成人伦理片在线| 国产精品第13页| 99综合影院在线| 综合久久久久综合| 91丝袜呻吟高潮美腿白嫩在线观看| 久久精品视频在线免费观看| 国内国产精品久久| 日韩欧美电影在线| 激情综合一区二区三区| 精品裸体舞一区二区三区| 久久不见久久见免费视频7| 26uuu亚洲婷婷狠狠天堂| 久久精品国产成人一区二区三区 |