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

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

?? xpprogressbarui.java

?? Swing Windows XP 外觀和感覺 BeanSoft 修改版, 2003年 原始的作者: XP 外觀和感覺 by Stefan Krause - http://www.stefan
?? JAVA
字號:
// Beta
/* * ** * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*	XP Look and Feel														   *
*															                   *
*  (C) Copyright 2002, by Stefan Krause, Taufik Romdhane and Contributors      *
*                                                                              *
*                                                                              *
* The XP Look and Feel started as as extension to the Metouia Look and Feel.   *
* The original header of this file was:                                        *
** * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
** * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*        Metouia Look And Feel: a free pluggable look and feel for java        *
*                         http://mlf.sourceforge.net                           *
*          (C) Copyright 2002, by Taoufik Romdhane and Contributors.           *
*                                                                              *
*   This library is free software; you can redistribute it and/or modify it    *
*   under the terms of the GNU Lesser General Public License as published by   *
*   the Free Software Foundation; either version 2.1 of the License, or (at    *
*   your option) any later version.                                            *
*                                                                              *
*   This library is distributed in the hope that it will be useful,            *
*   but WITHOUT ANY WARRANTY; without even the implied warranty of             *
*   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.                       *
*   See the GNU Lesser General Public License for more details.                *
*                                                                              *
*   You should have received a copy of the GNU General Public License along    *
*   with this program; if not, write to the Free Software Foundation, Inc.,    *
*   59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.                    *
*                                                                              *
*   Original Author:  Taoufik Romdhane                                         *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */


package com.stefankrause.xplookandfeel;

import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Insets;
import java.awt.Rectangle;
import java.awt.TexturePaint;
import java.awt.geom.Rectangle2D;
import java.awt.image.BufferedImage;

import javax.swing.JComponent;
import javax.swing.JProgressBar;
import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.basic.BasicProgressBarUI;

import com.stefankrause.xplookandfeel.skin.Skin;
import com.stefankrause.xplookandfeel.skin.SkinImageCache;

/**
 * This class represents the UI delegate for the JProgressBar component.
 *
 * @author Taoufik Romdhane
 */
public class XPProgressBarUI extends BasicProgressBarUI {
	/**
	 * The skin that paint the progress bar if it's a horizontal one
	 */
	static Skin skinHorizontal;
	/**
	 * The skin that paint the progress bar if it's a vertical one
	 */
	static Skin skinVertical;
	
	/*
	 * The offset of the filled bar. This amount of space will be added on the left and right of the progress bar
	 * to its borders.
	 */
	int offset=4;

	/**
	 * Creates the UI delegate for the given component.
	 *
	 * @param c The component to create its UI delegate.
	 * @return The UI delegate for the given component.
	 */
	public static ComponentUI createUI(JComponent c) {
		return new XPProgressBarUI();
	}

	protected void paintDeterminate(Graphics g, JComponent c) {
		if (!(g instanceof Graphics2D)) {
			return;
		}

		Insets b = progressBar.getInsets(); // area for border
		int barRectWidth = progressBar.getWidth() - (b.right + b.left);
		int barRectHeight = progressBar.getHeight() - (b.top + b.bottom);

		int cellLength = getCellLength();
		int cellSpacing = getCellSpacing();
		// amount of progress to draw

		Graphics2D g2 = (Graphics2D) g; 
		//		g2.setColor(progressBar.getForeground());

		if (progressBar.getOrientation() == JProgressBar.HORIZONTAL) {
			int amountFull = getAmountFull(b, barRectWidth - 2 * offset, barRectHeight);

			getSkinHorizontal().draw(g, 0, barRectWidth, barRectHeight);
			g.translate(offset,0);
			BufferedImage img=SkinImageCache.getInstance().getBufferedImage("XPProgressIndicatorHoriz.res");
			amountFull = (amountFull /img.getWidth() ) * img.getWidth();
			TexturePaint tp=new TexturePaint(img,new Rectangle2D.Float(0.0f,0.0f,img.getWidth(),barRectHeight-1) );
			g2.setPaint(tp);
			g2.fillRect(0,0,amountFull,barRectHeight);
			g.translate(-offset,0);
			// Deal with possible text painting
			if (progressBar.isStringPainted()) {
				paintString(g, b.left, b.top, barRectWidth, barRectHeight, amountFull, b);
			}

		} else { // VERTICAL
			int amountFull = getAmountFull(b, barRectWidth, barRectHeight- 2 * offset);
			
			getSkinVertical().draw(g, 0, barRectWidth, barRectHeight);
			BufferedImage img=SkinImageCache.getInstance().getBufferedImage("XPProgressIndicatorVert.res");
			amountFull = (amountFull /img.getHeight() ) * img.getHeight();
			TexturePaint tp=new TexturePaint(img,new Rectangle2D.Float(0.0f,0.0f /*barRectHeight-offset+offset*/, barRectWidth-1, img.getHeight() ) );
			g.translate(0,barRectHeight-offset);
			g2.setPaint(tp);
			g2.fillRect(0,-amountFull,barRectWidth, amountFull);
			g.translate(0,-(barRectHeight-offset) );
			// Deal with possible text painting
			if (progressBar.isStringPainted()) {
				paintString(g, b.left, b.top, barRectWidth, barRectHeight, amountFull, b);
			}
		}
	}
	
    protected void paintIndeterminate(Graphics g, JComponent c) {
        if (!(g instanceof Graphics2D)) {
            return;
        }
		Graphics2D g2 = (Graphics2D) g;

		Insets b = progressBar.getInsets(); // area for border
		int barRectWidth = progressBar.getWidth() - (b.right + b.left);
		int barRectHeight = progressBar.getHeight() - (b.top + b.bottom);

        Rectangle boxRect = getBox(null);
		if (progressBar.getOrientation() == JProgressBar.HORIZONTAL) {

			getSkinHorizontal().draw(g, 0, barRectWidth, barRectHeight);
			g.translate(boxRect.x,boxRect.y);
			BufferedImage img=SkinImageCache.getInstance().getBufferedImage("XPProgressIndicatorHoriz.res");
			TexturePaint tp=new TexturePaint(img,new Rectangle2D.Float(0.0f,0.0f,img.getWidth(),barRectHeight-1) );
			g2.setPaint(tp);
			int w=boxRect.width / img.getWidth() * img.getWidth();
			g2.fillRect(0,0,w,boxRect.height);
			g.translate(-offset,0);
						
		} else {
			getSkinVertical().draw(g, 0, barRectWidth, barRectHeight);


			g.translate(boxRect.x,boxRect.y);
			BufferedImage img=SkinImageCache.getInstance().getBufferedImage("XPProgressIndicatorVert.res");
			TexturePaint tp=new TexturePaint(img,new Rectangle2D.Float(0.0f,0.0f, barRectWidth-1, img.getHeight() ) );
			g2.setPaint(tp);
			int h=boxRect.height / img.getHeight() * img.getHeight();
			g2.fillRect(0,0,boxRect.width,h);
			g.translate(-boxRect.x,-boxRect.y );			
		}

//        // Paint the bouncing box.
//        if (boxRect != null) {
//            g2.setColor(progressBar.getForeground());
//            g2.fillRect(boxRect.x, boxRect.y,
//                       boxRect.width, boxRect.height);
//        } 
    }	
	
	/**
	 * @see javax.swing.plaf.ComponentUI#update(java.awt.Graphics, javax.swing.JComponent)
	 */
	public void update(Graphics g, JComponent c) {
		paint(g, c);
	}
    protected void installDefaults() {
    }
	/**
	 * Returns the skinHorizontal.
	 * @return SkinGenericButton
	 */
	public static Skin getSkinHorizontal() {
		if (skinHorizontal == null) {
			skinHorizontal = new Skin("XPProgressBorderHoriz.res", 1,   4, 0, 4, 0);

		}

		return skinHorizontal;
	}

	/**
	 * Returns the skinVerticale.
	 * @return Skin
	 */
	public static Skin getSkinVertical() {
		if (skinVertical == null) {
			skinVertical = new Skin("XPProgressBorderVert.res", 1,   0, 4, 0, 4);

		}

		return skinVertical;
	}

//	/**
//	 * Returns the fillTextureHorizontal.
//	 * @return TexturePaint
//	 */
//	public static TexturePaint getFillTextureHorizontal() {
//		if (fillTextureHorizontal == null) {
//			fillTextureHorizontal = new TexturePaint(SkinImageCache.getInstance().getBufferedImage("XPProgressIndicatorHoriz.res") arguments,);
//			
//		}
//
//		return fillTextureHorizontal;
//	}
//
//	/**
//	 * Returns the fillTextureVertical.
//	 * @return TexturePaint
//	 */
//	public static TexturePaint getFillTextureVertical() {
//		if (fillTextureVertical == null) {
//			fillTextureVertical = new type(arguments);
//			
//		}
//
//		return fillTextureVertical;
//	}

}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
中文字幕永久在线不卡| 国产91精品露脸国语对白| 国产一区 二区| 欧美视频一区二| 国产精品无码永久免费888| 天堂在线一区二区| 99精品欧美一区二区三区小说| 日韩欧美在线观看一区二区三区| 中文字幕综合网| 国产九色精品成人porny| 欧美日韩国产首页| 亚洲男人电影天堂| 91小视频在线免费看| 久久夜色精品国产欧美乱极品| 亚洲成av人影院在线观看网| 91在线精品一区二区| 国产亚洲va综合人人澡精品| 免费精品视频最新在线| 欧美手机在线视频| 一区二区三区资源| 99re这里都是精品| 中文字幕亚洲一区二区av在线| 国产一区二区美女诱惑| 26uuu色噜噜精品一区二区| 日本特黄久久久高潮| 91精品欧美福利在线观看| 亚洲一二三四久久| 欧美在线免费观看亚洲| 洋洋av久久久久久久一区| 91麻豆自制传媒国产之光| 欧美国产视频在线| 成人午夜私人影院| 国产偷v国产偷v亚洲高清| 国产成人亚洲综合a∨婷婷图片| xf在线a精品一区二区视频网站| 久久99国产精品尤物| 精品国产三级a在线观看| 狠狠色2019综合网| 久久久亚洲国产美女国产盗摄| 国产精品白丝jk黑袜喷水| 日本一区二区在线不卡| 91麻豆自制传媒国产之光| 亚洲综合一区在线| 欧美夫妻性生活| 久久成人免费日本黄色| 欧美激情一区二区三区全黄| 成年人网站91| 一区二区久久久| 91精品一区二区三区久久久久久 | 欧美酷刑日本凌虐凌虐| 午夜日韩在线电影| 精品国产乱码久久久久久闺蜜| 国产毛片一区二区| 亚洲精品第一国产综合野| 欧美日韩精品系列| 国产91精品精华液一区二区三区| 国产午夜精品在线观看| 91亚洲国产成人精品一区二三| 丝袜美腿亚洲一区二区图片| 精品国产伦理网| 99re这里只有精品首页| 丝袜亚洲另类欧美| 国产午夜精品福利| 精品视频999| 国产成人av电影| 亚洲国产成人高清精品| 久久夜色精品国产噜噜av| 在线视频国内一区二区| 国内国产精品久久| 亚洲福利一区二区三区| 久久精品男人的天堂| 欧美丝袜丝交足nylons| 国产精品123| 日本欧美一区二区| 中文字幕一区在线观看视频| 91精品国产手机| 99精品视频一区二区| 激情国产一区二区| 亚洲超碰97人人做人人爱| 国产欧美一区二区精品仙草咪| 欧美网站大全在线观看| 国产**成人网毛片九色| 三级一区在线视频先锋 | www国产精品av| 欧洲亚洲国产日韩| 成人影视亚洲图片在线| 青青草国产精品97视觉盛宴| 中文字幕在线观看不卡视频| 精品国产sm最大网站| 欧美制服丝袜第一页| 大胆亚洲人体视频| 久久超碰97人人做人人爱| 亚洲成人一区在线| 一区二区三区加勒比av| 日本一二三四高清不卡| 久久综合国产精品| 欧美成人a视频| 制服丝袜激情欧洲亚洲| 欧美少妇一区二区| 欧美在线你懂的| 日本高清不卡一区| 99久久婷婷国产综合精品| 国产成人免费在线视频| 激情综合网激情| 久久69国产一区二区蜜臀| 免费在线看一区| 人人精品人人爱| 日韩在线观看一区二区| 午夜精品久久久久久| 亚洲影视在线播放| 亚洲国产视频在线| 亚洲一区二区三区四区在线| 亚洲一卡二卡三卡四卡| 亚洲国产视频在线| 石原莉奈在线亚洲二区| 蜜臀久久99精品久久久久宅男| 偷拍自拍另类欧美| 日本视频中文字幕一区二区三区| 亚洲成人黄色小说| 午夜精品福利一区二区三区av| 婷婷综合五月天| 日韩经典一区二区| 麻豆国产一区二区| 国产精品性做久久久久久| 成人一区二区三区视频在线观看 | 久久久久久久久久久久电影| 日韩午夜激情电影| 日韩欧美国产一区二区三区| 精品美女在线播放| 日本一区免费视频| 一区二区三区国产豹纹内裤在线| 午夜私人影院久久久久| 毛片av中文字幕一区二区| 国产精品中文字幕日韩精品| 成人丝袜高跟foot| 91久久久免费一区二区| 欧美一区二区三区白人| 久久精品网站免费观看| 最新高清无码专区| 日韩成人免费看| 成人免费看的视频| 欧美日韩国产高清一区二区三区 | 亚洲成a人片综合在线| 美腿丝袜一区二区三区| 丰满亚洲少妇av| 欧美自拍丝袜亚洲| 久久综合九色综合97婷婷 | 麻豆一区二区99久久久久| 国产成都精品91一区二区三| 色av一区二区| 日韩精品一区二区在线观看| 国产精品久久国产精麻豆99网站| 亚洲电影视频在线| 国产精品一区久久久久| 欧美在线观看禁18| 国产片一区二区三区| 五月天欧美精品| 高潮精品一区videoshd| 欧美精品色一区二区三区| 国产欧美视频一区二区三区| 亚洲观看高清完整版在线观看| 国产自产2019最新不卡| 欧美人狂配大交3d怪物一区| 中文字幕成人av| 琪琪久久久久日韩精品| 91久久久免费一区二区| 久久久不卡网国产精品二区| 日韩精品亚洲一区二区三区免费| 99在线精品视频| 久久综合视频网| 日韩av不卡在线观看| 欧美亚洲国产怡红院影院| 亚洲国产精品v| 国产美女视频一区| 日韩欧美你懂的| 亚洲成国产人片在线观看| 91免费版在线看| 国产婷婷色一区二区三区四区 | 亚洲自拍偷拍综合| 成人小视频在线观看| 久久综合色之久久综合| 久久国产免费看| 欧美一区二区三区四区五区| 亚洲18女电影在线观看| 91久久精品一区二区三区| 亚洲人xxxx| 色婷婷综合中文久久一本| ...中文天堂在线一区| av一二三不卡影片| 国产精品色一区二区三区| 成人一区二区三区| 中文av字幕一区| 欧美在线视频日韩| 亚洲一区二区欧美激情| 欧美伊人精品成人久久综合97 | 欧美日韩久久不卡| 亚洲va欧美va人人爽| 欧美夫妻性生活| 美女国产一区二区| 久久久久久久久一|