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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? iwindowbutton.java

?? ibm的窗體
?? JAVA
字號:

package com.ibm.iwt.window;

import java.awt.Dimension;
import java.awt.Graphics;

import javax.swing.JButton;

/**
 * The IWindowButton provides the user the exact same 3 functions that
 * are provided in the standard Windows OS window.  These functions
 * are the minimize button, the restore button, and the close button.  
 * <p>The IWindowButton will also paint the same icons that appear in Windows 2000
 * by default and allow the user to set the foreground and background colors 
 * for some variety.
 * <p>For more complex window buttons, this class should be subclassed and the 
 * appropriate paint method overridden.
 * <p>To add more functionality to a window that is not provided by one of the 3
 * default IWindowButton settings, this class should be subclassed.
 * @author MAbernethy
 */
public class IWindowButton extends JButton
{
	/** Constant for the close button */
	public static final int CLOSE = 3;
	/** Constant for the minimize button */
	public static final int MINIMIZE = 0;
	/** Constant for the restore to max size button */
	public static final int RESTORE_MAX = 1;
	/** Constant for the restore to min size button */
	public static final int RESTORE_MIN = 2;

	private int buttonType = MINIMIZE;

	/**
	 * Creates an IWindowButton with the minimize settings.
	 */
	public IWindowButton()
	{	
		this(MINIMIZE);
	}
	
	/**
	 * Creates an IWindowButton with the specified button type.  By default
	 * the possible button types are MINIMIZE, RESTORE_MAX, RESTORE_MIN,
	 * and CLOSE but by subclassing this class, more values are possible.
	 * @param buttonType the button type
	 */
	public IWindowButton(int buttonType)
	{
		super();
		this.buttonType = buttonType;
		initialize();	
	}

	/**
	 * Returns the button type.
	 * @return the button type
	 */
	public int getButtonType()
	{
		return buttonType;
	}
	
	private void initialize()
	{
		this.setPreferredSize(new Dimension(16, 14));
	}

	/**
	 * Paints the IWindowButton.  Subclasses of this class
	 * that wish to change the way the button is painted should
	 * override this method.
	 * @param g the Graphics instance
	 */
	protected void paintComponent(Graphics g)
	{
		super.paintComponent(g);
		switch (buttonType)
		{
			case MINIMIZE:
			{
				paintMinButton(g);
				return;
			}
			case RESTORE_MAX:
			{
				paintRestoreMinButton(g);
				return;
			}
			case RESTORE_MIN:
			{
				paintRestoreMaxButton(g);
				return;
			}
			case CLOSE:
			{
				paintCloseButton(g);
				return;
			}
		}
	}
	
	/**
	 * Paints the close button.  Subclasses should override
	 * this method if they wish to change the appearance of the close
	 * button.
	 * @param g the Graphics instance
	 */
	protected void paintCloseButton(Graphics g)
	{
		int w = getWidth();
		int h = getHeight();
		g.setColor(getBackground());
		g.fillRect(0, 0, w, h);
		g.setColor(getForeground());
		g.drawLine((int)(w/4), (int)(h/3), w-(int)(w/4)-2, h-(int)(h/3));
		g.drawLine((int)(w/4)+1, (int)(h/3), w-(int)(w/4) -1, h-(int)(h/3));
		g.drawLine((int)(w/4)+2, (int)(h/3), w-(int)(w/4), h-(int)(h/3));
		g.drawLine(w-(int)(w/4)-2, (int)(h/3), (int)(w/4), h-(int)(h/3));
		g.drawLine(w-(int)(w/4)-1, (int)(h/3), (int)(w/4)+1, h-(int)(h/3));
		g.drawLine(w-(int)(w/4), (int)(h/3), (int)(w/4)+2, h-(int)(h/3));

	}
	
	/**
	 * Paints the minimize button.  Subclasses should override
	 * this method if they wish to change the appearance of the minimize
	 * button.
	 * @param g the Graphics instance
	 */
	protected void paintMinButton(Graphics g)
	{
		int w = getWidth();
		int h = getHeight();
		g.setColor(getBackground());
		g.fillRect(0, 0, w, h);
		g.setColor(getForeground());
		g.fillRect((int)(w*.25), h-6, (int)(w*.4)+1, (h/5)+1);
	}
	
	/**
	 * Paints the restore max button.  Subclasses should override
	 * this method if they wish to change the appearance of the restore max
	 * button.
	 * @param g the Graphics instance
	 */
	protected void paintRestoreMaxButton(Graphics g)
	{
		int w = getWidth();
		int h = getHeight();
		g.setColor(getBackground());
		g.fillRect(0, 0, w, h);
		g.setColor(getForeground());
		g.fillRect((int)(.4*w), (int)(.2*h), (int)(.4*w), 2);
		g.drawLine((int)(.4*w), (int)(.3*h), (int)(.4*w), (int)(.3*h));
		g.drawLine((int)(.75*w)-1, (int)(.3*h), (int)(.75*w)-1, (int)(.5*h));
		g.drawLine((int)(.75*w)-2, (int)(.5*h), (int)(.75*w)-2, (int)(.5*h));
		g.drawRect((int)(.25*w), (int)(.4*w), (int)(.25*w)+2, (int)(h/3));
		g.fillRect((int)(.25*w), (int)(.4*w), (int)(.25*w)+2, (int)(.1*h));
	}

	/**
	 * Paints the restore min button.  Subclasses should override
	 * this method if they wish to change the appearance of the restore min
	 * button.
	 * @param g the Graphics instance
	 */
	protected void paintRestoreMinButton(Graphics g)
	{		
		int w = getWidth();
		int h = getHeight();
		g.setColor(getBackground());
		g.fillRect(0, 0, w, h);
		g.setColor(getForeground());
		g.drawRect((int)(w*.25), (int)(h*.25), (int)w/2, (int)h/2);
		g.fillRect((int)(w*.25), (int)(h*.25), (int)w/2, (h/5)+1);
	}

	/**
	 * Sets the button type and repaints the button.
	 * @param i the button type
	 */
	public void setButtonType(int buttonType)
	{
		this.buttonType = buttonType;
		repaint();
	}

}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
精品国产乱码久久久久久老虎| jizz一区二区| 91精品国产aⅴ一区二区| 亚洲国产精品久久久久婷婷884 | 日韩av一区二区在线影视| 欧美亚洲国产怡红院影院| 一区二区三区日韩在线观看| 欧美日韩视频第一区| 日本网站在线观看一区二区三区| 欧美电影免费观看高清完整版| 美女视频黄 久久| 国产亚洲视频系列| www.亚洲激情.com| 亚洲高清免费观看 | 欧美性xxxxx极品少妇| 一区二区三区久久| 欧美一级专区免费大片| 国产综合成人久久大片91| 国产精品网站在线观看| 日本国产一区二区| 日韩专区在线视频| 欧美国产日韩亚洲一区| 91久久线看在观草草青青| 日韩激情视频在线观看| 国产亚洲人成网站| 欧美日韩视频在线观看一区二区三区| 免费看黄色91| 亚洲欧美自拍偷拍| 日韩欧美一区在线| 99久久精品一区| 久久99精品国产.久久久久久| 日本一区二区三区电影| 欧美午夜在线观看| 国产盗摄女厕一区二区三区| 夜夜精品浪潮av一区二区三区| 欧美一卡二卡在线观看| 色综合av在线| 国产一区二区剧情av在线| 一区二区三区国产豹纹内裤在线| 欧美大片拔萝卜| 色噜噜偷拍精品综合在线| 国产精品一区一区三区| 天堂一区二区在线免费观看| 欧美激情在线一区二区| 91精品国产综合久久久久久漫画 | 男人的j进女人的j一区| 亚洲色图在线看| 久久久久国产精品免费免费搜索| 欧美日本韩国一区| youjizz国产精品| 韩国v欧美v日本v亚洲v| 亚洲风情在线资源站| 国产精品久久久久影院| 欧美成人一区二区| 欧美日韩一区小说| 91看片淫黄大片一级| 国产成人免费视频网站高清观看视频| 日韩精品一卡二卡三卡四卡无卡| 综合色天天鬼久久鬼色| 日本一区二区三区免费乱视频 | 26uuuu精品一区二区| 欧美女孩性生活视频| 色视频成人在线观看免| www.亚洲在线| 不卡一二三区首页| 国产91高潮流白浆在线麻豆| 伦理电影国产精品| 青青草国产精品亚洲专区无| 无吗不卡中文字幕| 亚洲综合视频网| 亚洲最大成人综合| 亚洲日韩欧美一区二区在线| 中文字幕av不卡| 久久久综合网站| 国产午夜精品一区二区三区嫩草| 久久青草欧美一区二区三区| 精品噜噜噜噜久久久久久久久试看| 91精品欧美一区二区三区综合在 | 天涯成人国产亚洲精品一区av| 亚洲欧美激情一区二区| 亚洲人成精品久久久久久| 中文字幕中文字幕在线一区 | 欧美日韩国产精品成人| 欧美亚日韩国产aⅴ精品中极品| 91美女在线观看| 色综合久久天天| 欧美性猛片aaaaaaa做受| 欧美午夜精品电影| 日韩免费视频一区| 久久一区二区三区四区| 国产午夜精品一区二区三区嫩草 | 国产精品视频第一区| 亚洲欧洲精品一区二区精品久久久| 久久久国产精品不卡| 国产人成亚洲第一网站在线播放| 国产清纯白嫩初高生在线观看91| 中国av一区二区三区| 亚洲欧美日韩国产一区二区三区 | 欧美一区二区三区四区高清| 精品少妇一区二区三区| 日本一区二区三区dvd视频在线| 国产精品成人一区二区三区夜夜夜| 国产精品入口麻豆原神| 亚洲精品中文在线影院| 天天av天天翘天天综合网| 精品一区中文字幕| 不卡视频一二三四| 欧美日韩国产一级片| 久久看人人爽人人| 亚洲综合免费观看高清完整版在线| 亚洲第一狼人社区| 国产精品一区在线观看你懂的| 成人h动漫精品| 欧美视频在线观看一区二区| 久久免费偷拍视频| 亚洲一区在线观看视频| 麻豆精品一区二区综合av| 成人永久aaa| 欧美亚洲免费在线一区| 精品电影一区二区| 洋洋av久久久久久久一区| 日本不卡视频一二三区| 97精品久久久午夜一区二区三区 | 日本aⅴ免费视频一区二区三区| 国产高清在线观看免费不卡| 在线观看www91| 欧美精品一区二区三区蜜桃 | 欧美精品一卡两卡| 欧美激情一区不卡| 美女免费视频一区二区| 色综合久久久久久久| 精品国产一区二区三区久久影院 | 亚洲精品欧美综合四区| 久久成人18免费观看| 欧美一a一片一级一片| 久久久99久久| 日本三级亚洲精品| 欧美在线free| 国产精品国产自产拍在线| 美国毛片一区二区| 欧美午夜在线一二页| 国产精品卡一卡二卡三| 国产酒店精品激情| 日韩三级免费观看| 亚洲午夜电影在线| 99re视频精品| 日本一区二区三区四区在线视频 | 国产亚洲美州欧州综合国| 视频一区在线视频| 欧美性猛片aaaaaaa做受| 亚洲欧洲一区二区三区| 国产成人在线观看| 欧美精品一区二区三区很污很色的 | 色一情一乱一乱一91av| 欧美精彩视频一区二区三区| 开心九九激情九九欧美日韩精美视频电影| 欧美性一区二区| 亚洲精选在线视频| 色婷婷av一区二区三区gif | 在线成人高清不卡| 亚洲一区二区在线免费看| 色婷婷久久久综合中文字幕| 亚洲国产高清aⅴ视频| 国产成人免费av在线| 精品精品欲导航| 韩国一区二区三区| 欧美精品一区二区三区四区| 久久99精品国产.久久久久| 欧美va亚洲va| 国产老女人精品毛片久久| 欧美精品一区二区三区四区| 国产一区二区三区精品视频| 久久综合色之久久综合| 国产一区二区电影| 中文文精品字幕一区二区| 成人一级视频在线观看| 国产精品免费丝袜| 91福利资源站| 丝袜a∨在线一区二区三区不卡| 欧美日本精品一区二区三区| 日韩成人一区二区三区在线观看| 日韩一级片网站| 国产自产视频一区二区三区| 亚洲成a人片在线不卡一二三区| 欧美性猛交xxxx乱大交退制版| 五月激情综合网| 精品区一区二区| 国产精品资源站在线| 欧美国产精品专区| 91成人国产精品| 久久精品国产999大香线蕉| 久久免费的精品国产v∧| 99精品一区二区| 亚洲成人1区2区| 精品对白一区国产伦| 99re成人精品视频| 日韩中文字幕麻豆| 久久久99精品久久| 欧美综合欧美视频| 狠狠色狠狠色综合日日91app|