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

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

?? icontentpane.java

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

package com.ibm.iwt.window;

import java.awt.Cursor;
import java.awt.Insets;
import java.awt.event.MouseEvent;

import com.ibm.iwt.event.WindowChangeEvent;
import com.ibm.iwt.util.IWTUtilities;

/**
 * The IContentPane adds to the functionality of a normal content pane
 * by handling mouse events.  The mouse events are relayed
 * from the parent window's rootpane and it is up to the IContentPane
 * to handle the mouse events itself.
 * <p>Like the content pane, all components should be added to the IContentPane and
 * it has a default BorderLayout.
 * <p>For default application windows, the IContentPane handles all mouse events 
 * based on a rectangular application window.  
 * <p>For more complex application windows
 * that are not rectangular but still maintain
 * a mostly rectangular shape and will not need
 * to change Cursor types, they should subclass IContentPane and override the 
 * <code>isMouseOnBorder</code> function.
 * <p>For extremely complex application window shapes that require different cursors
 * than would be provided by the default implementation, the <code>isMouseOnBorder</code>
 * as well as the <code>handleDirections</code> functions should be overridden in the 
 * subclass.
 * @author MAbernethy
 */
public class IContentPane extends IBorderComponent
{
	
	/** the border around the content pane */
	protected Insets borderSize = new Insets(3,3,3,3);
	private int direction;
	
	/**
	 * Returns the border size around the content pane in pixels.
	 * @return the border size
	 */
	public Insets getBorderSize()
	{
		return borderSize;
	}
	
	/**
	 * Returns the insets that are used by the IContentPane to draw the border.  This
	 * prevents the IContentPane from painting over the border with its children.
	 * @return the insets where the border is drawn
	 */
	public Insets getInsets()
	{
		return borderSize;
	}
	
	/**
	 * Based on the coordinates contained in the MouseEvent, computes whether
	 * the mouse is over the border and draw the appropriate cursor.  It also
	 * determines the direction which is used for window resizing events.
	 * @param e the MouseEvent from the window's rootpane
	 * @param changeDirection if the direction should change
	 */
	protected void handleDirections(MouseEvent e, boolean changeDirection)
	{		
		// left border
		if (e.getX() < borderSize.left && e.getY() < IWTUtilities.DIAGONAL_RESIZE_SIZE)
		{
			if (changeDirection)
				direction = WindowChangeEvent.RESIZE_NORTH_WEST;
			setCursor(new Cursor(Cursor.NW_RESIZE_CURSOR));
		}
		else if (e.getX() < borderSize.left && e.getY() > getHeight()-IWTUtilities.DIAGONAL_RESIZE_SIZE)
		{
			if (changeDirection)
				direction = WindowChangeEvent.RESIZE_SOUTH_WEST;
			setCursor(new Cursor(Cursor.SW_RESIZE_CURSOR));
		}
		else if (e.getX() < borderSize.left)
		{
			if (changeDirection)	
				direction = WindowChangeEvent.RESIZE_WEST;
			setCursor(new Cursor(Cursor.W_RESIZE_CURSOR));
		}
		
		// bottom border
		if (e.getY() > getHeight()-borderSize.bottom && e.getX() < IWTUtilities.DIAGONAL_RESIZE_SIZE)
		{
			if (changeDirection)
				direction = WindowChangeEvent.RESIZE_SOUTH_WEST;
			setCursor(new Cursor(Cursor.SW_RESIZE_CURSOR));
		}
		else if (e.getY() > getHeight()-borderSize.bottom && e.getX() > getWidth()-IWTUtilities.DIAGONAL_RESIZE_SIZE)
		{
			if (changeDirection)
				direction = WindowChangeEvent.RESIZE_SOUTH_EAST;
			setCursor(new Cursor(Cursor.SE_RESIZE_CURSOR));
		}
		else if (e.getY() > getHeight()-borderSize.bottom)
		{
			if (changeDirection)
				direction = WindowChangeEvent.RESIZE_SOUTH;
			setCursor(new Cursor(Cursor.S_RESIZE_CURSOR));
		}
		// right border
		if (e.getX() > getWidth()-borderSize.right && e.getY() > getHeight()-IWTUtilities.DIAGONAL_RESIZE_SIZE)
		{
			if (changeDirection)
				direction = WindowChangeEvent.RESIZE_SOUTH_EAST;
			setCursor(new Cursor(Cursor.SE_RESIZE_CURSOR));
		}
		else if (e.getX() > getWidth()-borderSize.right && e.getY() < IWTUtilities.DIAGONAL_RESIZE_SIZE)
		{
			if (changeDirection)
				direction = WindowChangeEvent.RESIZE_NORTH_EAST;
			setCursor(new Cursor(Cursor.NE_RESIZE_CURSOR));
		}
		else if (e.getX() > getWidth()-borderSize.right)
		{
			if (changeDirection)
				direction = WindowChangeEvent.RESIZE_EAST;
			setCursor(new Cursor(Cursor.E_RESIZE_CURSOR));
		}
		
		if (e.getX() > borderSize.left && e.getX() < getWidth()-borderSize.right &&
			e.getY() > borderSize.top && e.getY() < getHeight()-borderSize.bottom)
			{
				if (changeDirection)
					direction = WindowChangeEvent.RESIZE_NONE;
				setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
			}
	}
	
	/**
	 * Returns whether the coordinates are on a border of the icontent pane.  By
	 * default, this returns true if the coordinates are within the border size
	 * defined by <code>borderSize</code> and is a rectangular shape.
	 * <br>More advanced subclasses will override this method to return true
	 * only when the coordinates lie on a border.
	 * @param x the x coordinates
	 * @param y the y coordinates
	 */
	protected void isMouseOnBorder(int x, int y)
	{
		if (y > getHeight() - borderSize.bottom)
			isMouseOnBorder = true;
		else if (x < borderSize.left)
			isMouseOnBorder = true;
		else if (x > getWidth() - borderSize.right)
			isMouseOnBorder = true;
		else
			isMouseOnBorder = false;
	}

	/**
	 * Does nothing.
	 * @param the MouseEvent from the window's rootpane
	 */
	public void mouseClicked(MouseEvent e){	}

	/**
	 * After computing the appropriate coordinates, it tells any listeners
	 * that the window should be resized.
	 * @param e the MouseEvent from the window's rootpane
	 */
	public void mouseDragged(MouseEvent e)
	{
		if (isWindowMaximized() || !isMouseOnBorder)
			return;
		WindowChangeEvent event = new WindowChangeEvent(this, e.getX(), e.getY(), e.getX()-X, e.getY()-Y, direction, true);
		fireWindowChangeEvent(WindowChangeEvent.WINDOW_RESIZED, event);	
	}
	
	/**
	 * Computes the coordinates where the mouse enters.  Only changes the cursor.
	 * @param e the MouseEvent from the window's rootpane
	 */
	public void mouseEntered(MouseEvent e)
	{
		if (isWindowMaximized())
			return;
		handleDirections(e, false);
	}
	
	/** 
	 * Computes the coordinates where the mouse exits.  Changes the cursor back
	 * to the default cursor.
	 * @param e the MouseEvent from the window's rootpane
	 */
	public void mouseExited(MouseEvent e)
	{
		setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
	}
	
	/**
	 * Computes the coordinates where the mouse moves.  Only changes the cursor.
	 * @param e the MouseEvent from the window's rootpane
	 */
	public void mouseMoved(MouseEvent e)
	{
		if (isWindowMaximized())
			return;
		handleDirections(e, false);
	}
	
	/**
	 * Computes the coordinates where the mouse is first pressed.  Uses these
	 * coordinates as a basis for all mouse movements.
	 * @param e the MouseEvent from the window's rootpane
	 */
	public void mousePressed(MouseEvent e)
	{
		if (isWindowMaximized())
			return;
		X = e.getX();
		Y = e.getY();
		isMouseOnBorder(X, Y);
		handleDirections(e, true);
	}
	
	/**
	 * Computes the coordinates where the mouse is released and tells any listeners
	 * that the window should stop resizing.
	 * @param e the MouseEvent from the window's rootpane
	 */
	public void mouseReleased(MouseEvent e)
	{	
		if (isWindowMaximized() || !isMouseOnBorder)
			return;
		WindowChangeEvent event = new WindowChangeEvent(this, e.getX(), e.getY(), e.getX()-X, e.getY()-Y, direction, false);
		fireWindowChangeEvent(WindowChangeEvent.WINDOW_RESIZED, event);	
	}
	
	/**
	 * Sets the border size around the content pane in pixels.
	 * @param borderSize the border size
	 */
	public void setBorderSize(Insets borderSize)
	{
		this.borderSize = borderSize;
	}

}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产宾馆实践打屁股91| 国产一区在线观看麻豆| 日韩福利电影在线| 成人性生交大合| 日韩欧美中文字幕公布| 一区二区三区在线看| 韩国在线一区二区| 7777精品伊人久久久大香线蕉的| 国产精品麻豆久久久| 秋霞午夜av一区二区三区| 91麻豆123| 国产精品免费视频一区| 麻豆精品新av中文字幕| 欧美日韩一区二区三区四区五区| 亚洲日本va午夜在线影院| 国产精品夜夜嗨| 精品1区2区在线观看| 日本欧美肥老太交大片| 欧美久久久久久久久久| 日韩美女精品在线| www.av亚洲| 国产精品久久久久一区二区三区| 国产在线播放一区三区四| 日韩欧美高清一区| 日本一不卡视频| 欧美一区二区三区系列电影| 亚洲成国产人片在线观看| 色欧美片视频在线观看在线视频| 欧美国产一区二区在线观看 | 亚洲国产欧美在线| 99国产精品国产精品久久| 中文字幕乱码日本亚洲一区二区| 国产麻豆欧美日韩一区| 日韩欧美专区在线| 国产一区亚洲一区| 久久久精品黄色| 国产91精品精华液一区二区三区| 日本一区二区三区在线观看| 白白色 亚洲乱淫| 中文字幕综合网| 欧美日韩精品是欧美日韩精品| 亚洲电影一级黄| 日韩欧美的一区二区| 国产制服丝袜一区| 国产精品久久久久久久久免费樱桃 | 26uuu亚洲婷婷狠狠天堂| 麻豆精品在线视频| 国产欧美精品一区aⅴ影院| jiyouzz国产精品久久| 亚洲一区在线免费观看| 91麻豆精品国产91久久久资源速度 | 亚洲三级在线观看| 欧美在线综合视频| 久久精品久久久精品美女| 精品国产制服丝袜高跟| 国产91精品免费| 亚洲一区二区av电影| 欧美一区二区三区四区久久| 国产精品1区2区3区| 亚洲欧美日韩电影| 日韩精品一区二区在线| 99久久精品免费看国产| 日本中文字幕不卡| 国产精品污www在线观看| 欧美三级蜜桃2在线观看| 麻豆91免费看| 亚洲另类色综合网站| 日韩免费观看高清完整版在线观看| 国产精品亚洲成人| 午夜精品久久久久久久久久| 久久久精品欧美丰满| 欧美日本在线一区| 欧美三级视频在线| 日韩欧美国产一区二区在线播放| 青青草原综合久久大伊人精品 | 色屁屁一区二区| 精品一区二区三区在线视频| 最新国产成人在线观看| 日韩亚洲欧美在线| 色婷婷综合在线| 国产毛片精品视频| 日韩国产一区二| 亚洲免费观看视频| 久久久久久久av麻豆果冻| 色视频一区二区| 成人一区二区三区视频在线观看 | 不卡一区二区中文字幕| 亚洲美女电影在线| 91精品国产综合久久婷婷香蕉| 欧美久久高跟鞋激| 不卡的电视剧免费网站有什么| 美脚の诱脚舐め脚责91 | 欧美性感一区二区三区| 国产精品一区在线观看你懂的| 日韩avvvv在线播放| 亚洲伊人色欲综合网| 亚洲激情校园春色| 国产精品视频在线看| 久久日一线二线三线suv| 欧美一级精品在线| 制服丝袜一区二区三区| 欧美另类高清zo欧美| 精品视频在线免费观看| 色天使久久综合网天天| 91色在线porny| 91免费观看在线| 99国产精品国产精品毛片| 东方aⅴ免费观看久久av| 狠狠色丁香婷综合久久| 伦理电影国产精品| 免费在线一区观看| 久久电影网站中文字幕 | 亚洲国产成人91porn| 综合电影一区二区三区| 最近中文字幕一区二区三区| 最新国产精品久久精品| 有码一区二区三区| 亚洲成人手机在线| 日精品一区二区| 美女性感视频久久| 久久精品72免费观看| 激情综合色播激情啊| 国产乱码精品一品二品| 成人精品国产一区二区4080| 成人永久免费视频| 99天天综合性| 欧美午夜不卡视频| 欧美一级日韩一级| 久久久另类综合| 亚洲欧美一区二区三区国产精品| 亚洲欧美欧美一区二区三区| 亚洲成人精品在线观看| 麻豆成人免费电影| 大胆欧美人体老妇| 欧美午夜影院一区| 日韩精品最新网址| 国产精品成人在线观看| 亚洲精品高清视频在线观看| 天堂成人国产精品一区| 国产在线播放一区| 91在线视频官网| 91精品国产一区二区人妖| 久久久国际精品| 夜夜揉揉日日人人青青一国产精品| 亚洲午夜激情av| 国产精品1区2区3区在线观看| 色偷偷一区二区三区| 日韩午夜三级在线| 国产精品不卡在线观看| 天堂蜜桃一区二区三区| 成人一区二区三区视频 | 国产精品免费视频一区| 亚洲h精品动漫在线观看| 激情另类小说区图片区视频区| 成人激情动漫在线观看| 欧美日韩欧美一区二区| 国产日韩精品视频一区| 日韩电影在线一区二区| 成人网男人的天堂| 欧美一区二区三区在| 最新国产精品久久精品| 国内精品第一页| 欧美日韩在线三区| 国产精品私人影院| 精品一二线国产| 欧美日本一区二区在线观看| 国产精品久久99| 国产乱码一区二区三区| 91精品国产综合久久精品图片| 中文字幕中文乱码欧美一区二区 | 亚洲国产一区视频| 国产传媒欧美日韩成人| 日韩三级免费观看| 亚洲第一狼人社区| 在线观看精品一区| 中文字幕在线一区免费| 国产麻豆成人精品| 日韩欧美电影一二三| 午夜婷婷国产麻豆精品| 日本高清不卡在线观看| 中文字幕一区在线| 国产精品香蕉一区二区三区| 精品蜜桃在线看| 美女www一区二区| 欧美一区二区精品久久911| 亚洲图片欧美一区| 色一情一乱一乱一91av| 综合久久给合久久狠狠狠97色| 国产成人av一区二区三区在线观看| 欧美电视剧免费观看| 久久国产日韩欧美精品| 欧美一级国产精品| 男男成人高潮片免费网站| 欧美一级高清片| 麻豆精品国产91久久久久久| 日韩精品在线网站| 国产乱子伦一区二区三区国色天香| 日韩美女视频一区二区在线观看| 久久99精品久久久| 久久综合九色综合欧美98|