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

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

?? rectangle.java

?? 源碼為Eclipse開源開發(fā)平臺桌面開發(fā)工具SWT的源代碼,
?? JAVA
字號:
/******************************************************************************* * Copyright (c) 2000, 2004 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Common Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/cpl-v10.html *  * Contributors: *     IBM Corporation - initial API and implementation *******************************************************************************/package org.eclipse.swt.graphics;import org.eclipse.swt.internal.SerializableCompatibility;import org.eclipse.swt.*;/** * Instances of this class represent rectangular areas in an * (x, y) coordinate system. The top left corner of the rectangle * is specified by its x and y values, and the extent of the * rectangle is specified by its width and height. * <p> * The coordinate space for rectangles and points is considered * to have increasing values downward and to the right from its * origin making this the normal, computer graphics oriented notion * of (x, y) coordinates rather than the strict mathematical one. * </p> * <p> * The hashCode() method in this class uses the values of the public * fields to compute the hash value. When storing instances of the * class in hashed collections, do not modify these fields after the * object has been inserted.   * </p> * <p> * Application code does <em>not</em> need to explicitly release the * resources managed by each instance when those instances are no longer * required, and thus no <code>dispose()</code> method is provided. * </p> * * @see Point */public final class Rectangle implements SerializableCompatibility {		/**	 * the x coordinate of the rectangle	 */	public int x;		/**	 * the y coordinate of the rectangle	 */	public int y;		/**	 * the width of the rectangle	 */	public int width;		/**	 * the height of the rectangle	 */	public int height;/** * Construct a new instance of this class given the  * x, y, width and height values. * * @param x the x coordinate of the origin of the rectangle * @param y the y coordinate of the origin of the rectangle * @param width the width of the rectangle * @param height the height of the rectangle */public Rectangle (int x, int y, int width, int height) {	this.x = x;	this.y = y;	this.width = width;	this.height = height;}/** * Destructively replaces the x, y, width and height values * in the receiver with ones which represent the union of the * rectangles specified by the receiver and the given rectangle. * <p> * The union of two rectangles is the smallest single rectangle * that completely covers both of the areas covered by the two * given rectangles. * </p> * * @param rect the rectangle to merge with the receiver * * @exception IllegalArgumentException <ul> *    <li>ERROR_NULL_ARGUMENT - if the argument is null</li> * </ul> */public void add (Rectangle rect) {	if (rect == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);	int left = x < rect.x ? x : rect.x;	int top = y < rect.y ? y : rect.y;	int lhs = x + width;	int rhs = rect.x + rect.width;	int right = lhs > rhs ? lhs : rhs;	lhs = y + height;	rhs = rect.y + rect.height;	int bottom = lhs > rhs ? lhs : rhs;	x = left;  y = top;  width = right - left;  height = bottom - top;}/** * Returns <code>true</code> if the point specified by the * arguments is inside the area specified by the receiver, * and <code>false</code> otherwise. * * @param x the x coordinate of the point to test for containment * @param y the y coordinate of the point to test for containment * @return <code>true</code> if the rectangle contains the point and <code>false</code> otherwise */public boolean contains (int x, int y) {	return (x >= this.x) && (y >= this.y) && ((x - this.x) < width) && ((y - this.y) < height);}/** * Returns <code>true</code> if the given point is inside the * area specified by the receiver, and <code>false</code> * otherwise. * * @param pt the point to test for containment * @return <code>true</code> if the rectangle contains the point and <code>false</code> otherwise * * @exception IllegalArgumentException <ul> *    <li>ERROR_NULL_ARGUMENT - if the argument is null</li> * </ul> */public boolean contains (Point pt) {	if (pt == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);	return contains(pt.x, pt.y);}/** * Compares the argument to the receiver, and returns true * if they represent the <em>same</em> object using a class * specific comparison. * * @param object the object to compare with this object * @return <code>true</code> if the object is the same as this object and <code>false</code> otherwise * * @see #hashCode() */public boolean equals (Object object) {	if (object == this) return true;	if (!(object instanceof Rectangle)) return false;	Rectangle r = (Rectangle)object;	return (r.x == this.x) && (r.y == this.y) && (r.width == this.width) && (r.height == this.height);}/** * Returns an integer hash code for the receiver. Any two  * objects which return <code>true</code> when passed to  * <code>equals</code> must return the same value for this * method. * * @return the receiver's hash * * @see #equals(Object) */public int hashCode () {	return x ^ y ^ width ^ height;}/** * Destructively replaces the x, y, width and height values * in the receiver with ones which represent the intersection of the * rectangles specified by the receiver and the given rectangle. * * @param rect the rectangle to intersect with the receiver * * @exception IllegalArgumentException <ul> *    <li>ERROR_NULL_ARGUMENT - if the argument is null</li> * </ul> *  * since 3.0 */public void intersect (Rectangle rect) {	if (rect == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);	if (this == rect) return;	int left = x > rect.x ? x : rect.x;	int top = y > rect.y ? y : rect.y;	int lhs = x + width;	int rhs = rect.x + rect.width;	int right = lhs < rhs ? lhs : rhs;	lhs = y + height;	rhs = rect.y + rect.height;	int bottom = lhs < rhs ? lhs : rhs;	x = right < left ? 0 : left;	y = bottom < top ? 0 : top;	width = right < left ? 0 : right - left;	height = bottom < top ? 0 : bottom - top;}/** * Returns a new rectangle which represents the intersection * of the receiver and the given rectangle.  * <p> * The intersection of two rectangles is the rectangle that * covers the area which is contained within both rectangles. * </p> * * @param rect the rectangle to intersect with the receiver * @return the intersection of the receiver and the argument * * @exception IllegalArgumentException <ul> *    <li>ERROR_NULL_ARGUMENT - if the argument is null</li> * </ul> */public Rectangle intersection (Rectangle rect) {	if (rect == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);	if (this == rect) return new Rectangle (x, y, width, height);	int left = x > rect.x ? x : rect.x;	int top = y > rect.y ? y : rect.y;	int lhs = x + width;	int rhs = rect.x + rect.width;	int right = lhs < rhs ? lhs : rhs;	lhs = y + height;	rhs = rect.y + rect.height;	int bottom = lhs < rhs ? lhs : rhs;	return new Rectangle (		right < left ? 0 : left,		bottom < top ? 0 : top,		right < left ? 0 : right - left,		bottom < top ? 0 : bottom - top);}/** * Returns <code>true</code> if the rectangle described by the * arguments intersects with the receiver and <code>false</code> * otherwise. * <p> * Two rectangles intersect if the area of the rectangle * representing their intersection is not empty. * </p> * * @param x the x coordinate of the origin of the rectangle * @param y the y coordinate of the origin of the rectangle * @param width the width of the rectangle * @param height the height of the rectangle * @return <code>true</code> if the rectangle intersects with the receiver, and <code>false</code> otherwise * * @exception IllegalArgumentException <ul> *    <li>ERROR_NULL_ARGUMENT - if the argument is null</li> * </ul> * * @see #intersection(Rectangle) * @see #isEmpty() *  * @since 3.0 */public boolean intersects (int x, int y, int width, int height) {	return (x < this.x + this.width) && (y < this.y + this.height) &&		(x + width > this.x) && (y + height > this.y);}/** * Returns <code>true</code> if the given rectangle intersects * with the receiver and <code>false</code> otherwise. * <p> * Two rectangles intersect if the area of the rectangle * representing their intersection is not empty. * </p> * * @param rect the rectangle to test for intersection * @return <code>true</code> if the rectangle intersects with the receiver, and <code>false</code> otherwise * * @exception IllegalArgumentException <ul> *    <li>ERROR_NULL_ARGUMENT - if the argument is null</li> * </ul> * * @see #intersection(Rectangle) * @see #isEmpty() */public boolean intersects (Rectangle rect) {	if (rect == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);	return rect == this || intersects (rect.x, rect.y, rect.width, rect.height);}		/** * Returns <code>true</code> if the receiver does not cover any * area in the (x, y) coordinate plane, and <code>false</code> if * the receiver does cover some area in the plane. * <p> * A rectangle is considered to <em>cover area</em> in the  * (x, y) coordinate plane if both its width and height are  * non-zero. * </p> * * @return <code>true</code> if the receiver is empty, and <code>false</code> otherwise */public boolean isEmpty () {	return (width <= 0) || (height <= 0);}/** * Returns a string containing a concise, human-readable * description of the receiver. * * @return a string representation of the rectangle */public String toString () {	return "Rectangle {" + x + ", " + y + ", " + width + ", " + height + "}"; //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$}/** * Returns a new rectangle which represents the union of * the receiver and the given rectangle. * <p> * The union of two rectangles is the smallest single rectangle * that completely covers both of the areas covered by the two * given rectangles. * </p> * * @param rect the rectangle to perform union with * @return the union of the receiver and the argument * * @exception IllegalArgumentException <ul> *    <li>ERROR_NULL_ARGUMENT - if the argument is null</li> * </ul> * * @see #add(Rectangle) */public Rectangle union (Rectangle rect) {	if (rect == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);	int left = x < rect.x ? x : rect.x;	int top = y < rect.y ? y : rect.y;	int lhs = x + width;	int rhs = rect.x + rect.width;	int right = lhs > rhs ? lhs : rhs;	lhs = y + height;	rhs = rect.y + rect.height;	int bottom = lhs > rhs ? lhs : rhs;	return new Rectangle (left, top, right - left, bottom - top);}}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
丝袜美腿亚洲一区二区图片| 国产精品毛片无遮挡高清| 亚洲第一主播视频| 欧美艳星brazzers| 日韩高清不卡在线| 日韩一区二区免费视频| 久久99蜜桃精品| 久久久夜色精品亚洲| 东方aⅴ免费观看久久av| 国产精品久久久久久久久动漫| 成人精品电影在线观看| 一区二区三区在线免费视频| 欧美色窝79yyyycom| 日本在线观看不卡视频| 26uuu国产日韩综合| av电影在线观看一区| 一区二区高清免费观看影视大全| 5858s免费视频成人| 国产在线播放一区二区三区| 中文幕一区二区三区久久蜜桃| 97精品国产露脸对白| 五月婷婷久久综合| 亚洲国产另类精品专区| 日韩精品在线一区| 99九九99九九九视频精品| 亚洲一区二区视频在线观看| 精品少妇一区二区三区在线播放 | 亚洲柠檬福利资源导航| 欧美日韩一区二区三区高清 | 国产在线日韩欧美| 一个色妞综合视频在线观看| 日韩免费福利电影在线观看| 99久久99久久久精品齐齐| 天使萌一区二区三区免费观看| 久久免费看少妇高潮| 色婷婷精品久久二区二区蜜臀av| 精品影院一区二区久久久| 国产精品久久久久久久久久久免费看 | 岛国精品在线播放| 午夜精品久久久久久久久久| 久久久精品免费网站| 欧美无砖专区一中文字| 国产91丝袜在线18| 美腿丝袜亚洲一区| 亚洲综合成人网| 国产视频视频一区| 51久久夜色精品国产麻豆| 91免费看片在线观看| 国产一区二区0| 日本不卡高清视频| 亚洲一区二区三区中文字幕在线| 国产午夜精品久久久久久免费视| 制服丝袜亚洲网站| 色久优优欧美色久优优| 成人一区二区在线观看| 狠狠久久亚洲欧美| 五月天网站亚洲| 有码一区二区三区| 国产精品久久一级| 久久精品在这里| 日韩欧美一级在线播放| 在线成人免费观看| 在线观看欧美日本| 一本色道综合亚洲| 91麻豆国产香蕉久久精品| 丁香婷婷深情五月亚洲| 国产精品一区二区黑丝| 精品综合免费视频观看| 日韩电影一区二区三区| 五月婷婷另类国产| 视频一区视频二区中文| 午夜婷婷国产麻豆精品| 亚洲国产精品自拍| 三级久久三级久久| 五月天激情综合| 午夜精品久久久久久久 | 麻豆一区二区三| 青青草国产精品亚洲专区无| 香蕉影视欧美成人| 亚洲国产日韩精品| 亚洲第一会所有码转帖| 日韩专区一卡二卡| 人人超碰91尤物精品国产| 蜜桃一区二区三区在线| 老色鬼精品视频在线观看播放| 天堂午夜影视日韩欧美一区二区| 视频一区二区三区在线| 日本午夜一本久久久综合| 日韩影院免费视频| 免费三级欧美电影| 精品一区二区三区久久久| 国产一区二区在线视频| 国产成人亚洲综合色影视| 成人高清免费在线播放| 在线观看视频一区二区欧美日韩| 欧美丝袜丝交足nylons| 欧美一级理论片| 久久久久久久国产精品影院| 一区二区中文视频| 亚洲国产综合色| 精品综合久久久久久8888| 激情文学综合插| www.色综合.com| 在线观看一区不卡| 精品播放一区二区| 国产精品福利av| 天堂久久一区二区三区| 久久91精品久久久久久秒播| av在线综合网| 欧美日本一区二区三区四区| 亚洲精品一区二区三区影院| 中文字幕在线观看不卡| 午夜久久久久久久久| 国产美女精品在线| 色哦色哦哦色天天综合| 精品国产一区二区三区久久影院 | 亚洲精品一二三| 手机精品视频在线观看| 高清国产一区二区三区| 欧美视频一区在线| 国产欧美日韩三区| 五月婷婷另类国产| 成人一区二区在线观看| 777亚洲妇女| 亚洲色图丝袜美腿| 激情小说欧美图片| 在线观看免费视频综合| 久久久久久久久久电影| 石原莉奈在线亚洲三区| 99久久精品国产一区二区三区| 日韩视频一区二区在线观看| 亚洲麻豆国产自偷在线| 国产在线一区二区| 欧美高清精品3d| 亚洲欧美激情在线| 国产大陆a不卡| 日韩一区二区三区在线观看| 亚洲情趣在线观看| 国产精品996| 日韩精品中文字幕在线不卡尤物| 怡红院av一区二区三区| 国产成人精品免费网站| 欧美一级爆毛片| 洋洋av久久久久久久一区| 床上的激情91.| 久久综合色鬼综合色| 日韩精品福利网| 欧美视频精品在线观看| 日韩一区日韩二区| 成人高清免费在线播放| 2020国产成人综合网| 免费一区二区视频| 91精品国产一区二区三区香蕉| 亚洲影视在线播放| 色国产综合视频| 亚洲精品精品亚洲| 99re这里只有精品6| 亚洲国产精品99久久久久久久久 | 免费观看成人av| 欧美日韩国产综合久久 | 免费精品视频在线| 欧美日韩电影一区| 香蕉久久一区二区不卡无毒影院| 91国偷自产一区二区三区观看 | 26uuu欧美日本| 久久黄色级2电影| 欧美变态凌虐bdsm| 久久国产尿小便嘘嘘| 精品久久久影院| 国产伦精品一区二区三区视频青涩| 日韩欧美在线影院| 久久国产免费看| www国产成人免费观看视频 深夜成人网 | 99久免费精品视频在线观看| 国产精品美女一区二区三区| 成人性生交大片免费看在线播放| 欧美国产成人在线| 99久久久久久99| 亚洲欧美日韩国产手机在线 | 午夜久久福利影院| 欧美精品在线一区二区| 日韩精品欧美成人高清一区二区| 欧美精品乱码久久久久久按摩| 性久久久久久久久久久久| 日韩一区二区精品| 国产高清成人在线| 国产精品你懂的在线欣赏| 97se亚洲国产综合自在线不卡| 一区二区三区色| 欧美一级一区二区| 国产精品一区二区三区乱码| 国产精品色婷婷久久58| 在线精品视频小说1| 看片网站欧美日韩| 国产精品乱码一区二区三区软件 | 91丨porny丨国产入口| 亚洲成人免费av| 久久精品亚洲一区二区三区浴池| 97精品国产97久久久久久久久久久久| 亚洲国产日日夜夜|