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

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專(zhuān)輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? textlayout.java

?? 源碼為Eclipse開(kāi)源開(kāi)發(fā)平臺(tái)桌面開(kāi)發(fā)工具SWT的源代碼,
?? JAVA
?? 第 1 頁(yè) / 共 5 頁(yè)
字號(hào):
 */public int getLevel (int offset) {	checkLayout();	computeRuns(null);	int length = text.length();	if (!(0 <= offset && offset <= length)) SWT.error(SWT.ERROR_INVALID_RANGE);	offset = translateOffset(offset);	for (int i=1; i<allRuns.length; i++) {		if (allRuns[i].start > offset) {			return allRuns[i - 1].analysis.s.uBidiLevel;		}	}	return (orientation & SWT.RIGHT_TO_LEFT) != 0 ? 1 : 0;}/** * Returns the bounds of the line for the specified line index. *  * @param lineIndex the line index * @return the line bounds  *  * @exception IllegalArgumentException <ul> *    <li>ERROR_INVALID_ARGUMENT - if the line index is out of range</li> * </ul> * @exception SWTException <ul> *    <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * </ul> */public Rectangle getLineBounds(int lineIndex) {	checkLayout();	computeRuns(null);	if (!(0 <= lineIndex && lineIndex < runs.length)) SWT.error(SWT.ERROR_INVALID_RANGE);	int x = 0, y = lineY[lineIndex];		int width = lineWidth[lineIndex], height = lineY[lineIndex + 1] - y; 	if (wrapWidth != -1) {		switch (alignment) {			case SWT.CENTER: x = (wrapWidth - width) / 2; break;			case SWT.RIGHT: x = wrapWidth - width; break;		}	}	return new Rectangle (x, y, width, height);}/** * Returns the receiver's line count. This includes lines caused * by wrapping. * * @return the line count *  * @exception SWTException <ul> *    <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * </ul> */public int getLineCount () {	checkLayout();	computeRuns(null);	return runs.length;}/** * Returns the index of the line that contains the specified * character offset. *  * @param offset the character offset * @return the line index *  * @exception IllegalArgumentException <ul> *    <li>ERROR_INVALID_ARGUMENT - if the character offset is out of range</li> * </ul> * @exception SWTException <ul> *    <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * </ul> */public int getLineIndex (int offset) {	checkLayout();	computeRuns(null);	int length = text.length();	if (!(0 <= offset && offset <= length)) SWT.error(SWT.ERROR_INVALID_RANGE);	offset = translateOffset(offset);	for (int line=0; line<runs.length; line++) {		if (lineOffset[line + 1] > offset) {			return line;		}	}	return runs.length - 1;}/** * Returns the font metrics for the specified line index. *  * @param lineIndex the line index * @return the font metrics  *  * @exception IllegalArgumentException <ul> *    <li>ERROR_INVALID_ARGUMENT - if the line index is out of range</li> * </ul> * @exception SWTException <ul> *    <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * </ul> */public FontMetrics getLineMetrics (int lineIndex) {	checkLayout();	computeRuns(null);	if (!(0 <= lineIndex && lineIndex < runs.length)) SWT.error(SWT.ERROR_INVALID_RANGE);	int hDC = device.internal_new_GC(null);	int srcHdc = OS.CreateCompatibleDC(hDC);	TEXTMETRIC lptm = OS.IsUnicode ? (TEXTMETRIC)new TEXTMETRICW() : new TEXTMETRICA();	if (text.length() == 0) {		Font font = this.font != null ? this.font : device.getSystemFont();		OS.SelectObject(srcHdc, font.handle);		OS.GetTextMetrics(srcHdc, lptm);		lptm.tmAscent = Math.max(lptm.tmAscent, this.ascent);		lptm.tmDescent = Math.max(lptm.tmDescent, this.descent);			} else {		int ascent = this.ascent, descent = this.descent, leading = 0, aveCharWidth = 0, height = 0;		StyleItem[] lineRuns = runs[lineIndex];		for (int i = 0; i<lineRuns.length; i++) {			StyleItem run = lineRuns[i];			OS.SelectObject(srcHdc, getItemFont(run));			OS.GetTextMetrics(srcHdc, lptm);			ascent = Math.max (ascent, lptm.tmAscent);			descent = Math.max (descent, lptm.tmDescent);			height = Math.max (height, lptm.tmHeight);			leading = Math.max (leading, lptm.tmInternalLeading);			aveCharWidth += lptm.tmAveCharWidth;		}		lptm.tmAscent = ascent;		lptm.tmDescent = descent;		lptm.tmHeight = height;		lptm.tmInternalLeading = leading;		lptm.tmAveCharWidth = aveCharWidth / lineRuns.length;	}	if (srcHdc != 0) OS.DeleteDC(srcHdc);	device.internal_dispose_GC(hDC, null);	return FontMetrics.win32_new(lptm);}/** * Returns the line offsets.  Each value in the array is the * offset for the first character in a line except for the last * value, which contains the length of the text. *  * @return the line offsets *   * @exception SWTException <ul> *    <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * </ul> */public int[] getLineOffsets () {	checkLayout();	computeRuns(null);	int[] offsets = new int[lineOffset.length];	for (int i = 0; i < offsets.length; i++) {		offsets[i] = untranslateOffset(lineOffset[i]);	}	return offsets;}/** * Returns the location for the specified character offset. The * <code>trailing</code> argument indicates whether the offset * corresponds to the leading or trailing edge of the cluster. *  * @param offset the character offset * @param trailing the trailing flag * @return the location of the character offset *   * @exception SWTException <ul> *    <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * </ul> *  * @see #getOffset(Point, int[]) * @see #getOffset(int, int, int[]) */public Point getLocation (int offset, boolean trailing) {	checkLayout();	computeRuns(null);	int length = text.length();	if (!(0 <= offset && offset <= length)) SWT.error(SWT.ERROR_INVALID_RANGE);	length = segmentsText.length();	offset = translateOffset(offset);	int line;	for (line=0; line<runs.length; line++) {		if (lineOffset[line + 1] > offset) break;	}	line = Math.min(line, runs.length - 1);	StyleItem[] lineRuns = runs[line];	Point result = null;	if (offset == length) {		result = new Point(lineWidth[line], lineY[line]);	} else {		int width = 0;		for (int i=0; i<lineRuns.length; i++) {			StyleItem run = lineRuns[i];			int end = run.start + run.length;			if (run.start <= offset && offset < end) {				if (run.tab) {					if (trailing || (offset == length)) width += run.width;					result = new Point(width, lineY[line]);				} else {					int runOffset = offset - run.start;					int cChars = run.length;					int gGlyphs = run.glyphCount;					int[] piX = new int[1];					OS.ScriptCPtoX(runOffset, trailing, cChars, gGlyphs, run.clusters, run.visAttrs, run.advances, run.analysis, piX);					if ((orientation & SWT.RIGHT_TO_LEFT) != 0) {						result = new Point(width + (run.width - piX[0]), lineY[line]);					} else {						result = new Point(width + piX[0], lineY[line]);					}				}				break;			}			width += run.width;		}	}	if (result == null) result = new Point(0, 0);	if (wrapWidth != -1) {		switch (alignment) {			case SWT.CENTER: result.x += (wrapWidth - lineWidth[line]) / 2; break;			case SWT.RIGHT: result.x += wrapWidth - lineWidth[line]; break;		}	}	return result;}/** * Returns the next offset for the specified offset and movement * type.  The movement is one of <code>SWT.MOVEMENT_CHAR</code>,  * <code>SWT.MOVEMENT_CLUSTER</code> or <code>SWT.MOVEMENT_WORD</code>. *  * @param offset the start offset * @param movement the movement type  * @return the next offset * * @exception IllegalArgumentException <ul> *    <li>ERROR_INVALID_ARGUMENT - if the offset is out of range</li> * </ul> * @exception SWTException <ul> *    <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * </ul> *  * @see #getPreviousOffset(int, int) */public int getNextOffset (int offset, int movement) {	checkLayout();	return _getOffset (offset, movement, true);}int _getOffset(int offset, int movement, boolean forward) {	computeRuns(null);	int length = text.length();	if (!(0 <= offset && offset <= length)) SWT.error(SWT.ERROR_INVALID_RANGE);	if (forward && offset == length) return length;	if (!forward && offset == 0) return 0;	int step = forward ? 1 : -1;	if ((movement & SWT.MOVEMENT_CHAR) != 0) return offset + step;	length = segmentsText.length();	offset = translateOffset(offset);	SCRIPT_LOGATTR logAttr = new SCRIPT_LOGATTR();	SCRIPT_PROPERTIES properties = new  SCRIPT_PROPERTIES();	int i = forward ? 0 : allRuns.length - 1;	offset = validadeOffset(offset, step);	do {		StyleItem run = allRuns[i];		if (run.start <= offset && offset < run.start + run.length) {			if (run.lineBreak && !run.softBreak) return untranslateOffset(run.start);			if (run.tab) return untranslateOffset(run.start);			OS.MoveMemory(properties, device.scripts[run.analysis.eScript], SCRIPT_PROPERTIES.sizeof);			boolean isComplex = properties.fNeedsCaretInfo || properties.fNeedsWordBreaking;			if (isComplex) breakRun(run);			while (run.start <= offset && offset < run.start + run.length) {				if (isComplex) {					OS.MoveMemory(logAttr, run.psla + ((offset - run.start) * SCRIPT_LOGATTR.sizeof), SCRIPT_LOGATTR.sizeof);				}				switch (movement) {					case SWT.MOVEMENT_CLUSTER: {						if (properties.fNeedsCaretInfo) {							if (!logAttr.fInvalid && logAttr.fCharStop) return untranslateOffset(offset);						} else {							return untranslateOffset(offset);						}						break;					}					case SWT.MOVEMENT_WORD: {						if (properties.fNeedsWordBreaking) {							if (!logAttr.fInvalid && logAttr.fWordStop) return untranslateOffset(offset);						} else {							if (offset > 0) {								boolean letterOrDigit = Compatibility.isLetterOrDigit(segmentsText.charAt(offset));								boolean previousLetterOrDigit = Compatibility.isLetterOrDigit(segmentsText.charAt(offset - 1));								if (letterOrDigit != previousLetterOrDigit || !letterOrDigit) {									if (!Compatibility.isWhitespace(segmentsText.charAt(offset))) {										return untranslateOffset(offset);									}								}							}						}						break;					}				}				offset = validadeOffset(offset, step);			}		}		i += step;	} while (0 <= i && i < allRuns.length - 1 && 0 <= offset && offset < length);	return forward ? text.length() : 0;}/** * Returns the character offset for the specified point.   * For a typical character, the trailing argument will be filled in to  * indicate whether the point is closer to the leading edge (0) or * the trailing edge (1).  When the point is over a cluster composed  * of multiple characters, the trailing argument will be filled with the  * position of the character in the cluster that is closest to * the point. *  * @param point the point * @param trailing the trailing buffer * @return the character offset *   * @exception IllegalArgumentException <ul> *    <li>ERROR_INVALID_ARGUMENT - if the trailing length is less than <code>1</code></li> * </ul> * @exception SWTException <ul> *    <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * </ul> *  * @see #getLocation(int, boolean) */public int getOffset (Point point, int[] trailing) {	checkLayout();	if (point == null) SWT.error (SWT.ERROR_NULL_ARGUMENT);	return getOffset (point.x, point.y, trailing) ;}/** * Returns the character offset for the specified point.   * For a typical character, the trailing argument will be filled in to  * indicate whether the point is closer to the leading edge (0) or * the trailing edge (1).  When the point is over a cluster composed  * of multiple characters, the trailing argument will be filled with the  * position of the character in the cluster that is closest to * the point. *  * @param x the x coordinate of the point * @param y the y coordinate of the point * @param trailing the trailing buffer * @return the character offset *   * @exception IllegalArgumentException <ul> *    <li>ERROR_INVALID_ARGUMENT - if the trailing length is less than <code>1</code></li> * </ul> * @exception SWTException <ul> *    <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * </ul> *  * @see #getLocation(int, boolean) */public int getOffset (int x, int y, int[] trailing) {	checkLayout();	computeRuns(null);	if (trailing != null && trailing.length < 1) SWT.error(SWT.ERROR_INVALID_ARGUMENT);	int line;	int lineCount = runs.length;	for (line=0; line<lineCount; line++) {		if (lineY[line + 1] > y) break;	}	line = Math.min(line, runs.length - 1);	if (wrapWidth != -1) {		switch (alignment) {			case SWT.CENTER: x -= (wrapWidth - lineWidth[line]) / 2; break;			case SWT.RIGHT: x -= wrapWidth - lineWidth[line]; break;		}	}	StyleItem[] lineRuns = runs[line];		boolean isRTL = (orientation & SWT.RIGHT_TO_LEFT) != 0; 	if (x < 0) {		StyleItem firstRun = lineRuns[0];		if (firstRun.analysis.fRTL ^ isRTL) {			if (trailing != null) trailing[0] = 1;			return untranslateOffset(firstRun.start + firstRun.length - 1);		} else {			if (trailing != null) trailing[0] = 0; 			return untranslateOffset(firstRun.start);		}	}	if (x > lineWidth[line]) {		int index = lineRuns.length - 1;		if (line == lineCount - 1 && lineRuns.length > 1) index--;		StyleItem lastRun = lineRuns[index];		if (lastRun.analysis.fRTL ^ isRTL) {			if (trailing != null) trailing[0] = 0; 

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲欧美日韩国产成人精品影院 | 国产精品一区专区| 亚洲成人www| 天堂蜜桃91精品| 亚洲午夜国产一区99re久久| 国产精品视频一区二区三区不卡| 久久精品免视看| 国产欧美日韩久久| 国产精品久久一级| 亚洲久本草在线中文字幕| 亚洲视频你懂的| 一卡二卡欧美日韩| 日韩黄色在线观看| 久久精品国产一区二区| 国产精品一级片在线观看| 丰满亚洲少妇av| 色婷婷狠狠综合| 欧美三级电影在线观看| 精品久久久久99| 国产三级精品视频| 一区二区高清在线| 美女爽到高潮91| 国产jizzjizz一区二区| 一本色道**综合亚洲精品蜜桃冫 | 欧美日韩一区二区三区四区五区| 欧美这里有精品| 欧美mv和日韩mv国产网站| 久久久久国产成人精品亚洲午夜| ...av二区三区久久精品| 亚洲午夜激情网站| 国产一区二区精品在线观看| 成人性视频免费网站| 欧美日韩国产另类不卡| 337p粉嫩大胆噜噜噜噜噜91av | 欧美性做爰猛烈叫床潮| 日韩免费在线观看| 亚洲人妖av一区二区| 天天操天天综合网| 99精品在线免费| 欧美tk丨vk视频| 一区二区三区在线视频观看58 | 亚洲国产成人porn| 国模一区二区三区白浆| 欧美色老头old∨ideo| 精品国产一二三| 亚洲成a人v欧美综合天堂| 成人免费高清视频在线观看| 欧美日韩高清在线| 亚洲婷婷国产精品电影人久久| 免播放器亚洲一区| 欧美性大战久久久久久久蜜臀 | 亚洲综合激情网| 成人在线综合网| 日韩欧美一区二区在线视频| 亚洲欧美另类综合偷拍| 国产成人av电影| 精品国产乱码久久久久久老虎| 亚洲图片欧美一区| 91国偷自产一区二区使用方法| 国产日韩欧美一区二区三区乱码| 久久精品免费观看| 欧美成人精品二区三区99精品| 午夜精品国产更新| 欧美日韩在线观看一区二区| 亚洲免费成人av| 一本久久综合亚洲鲁鲁五月天| 国产精品色哟哟| 国产成人三级在线观看| 久久蜜臀中文字幕| 国产成人免费网站| 国产欧美在线观看一区| 福利一区福利二区| 欧美激情在线一区二区三区| 国精品**一区二区三区在线蜜桃| 日韩一区二区三区视频在线| 日本视频一区二区| 日韩免费视频一区| 精品一区二区在线播放| 久久美女艺术照精彩视频福利播放| 麻豆成人免费电影| 精品久久久久一区二区国产| 国产一区二区精品久久91| 欧美精品一区二区久久婷婷| 国产毛片精品一区| 国产精品久久精品日日| 91碰在线视频| 亚洲午夜久久久久久久久电影网| 欧美人与z0zoxxxx视频| 日本一不卡视频| 久久久亚洲高清| 99久久免费视频.com| 一区二区日韩av| 日韩一二三四区| 国产一区二区主播在线| 国产精品久久久久影院色老大| 色综合久久六月婷婷中文字幕| 亚洲午夜久久久久| 精品sm在线观看| av毛片久久久久**hd| 亚洲小说春色综合另类电影| 欧美va日韩va| 色欧美乱欧美15图片| 日韩电影一二三区| 国产农村妇女毛片精品久久麻豆 | 99re6这里只有精品视频在线观看| 亚洲男人的天堂在线观看| 日韩一区二区三| 不卡一区在线观看| 日韩精品午夜视频| 国产精品高潮呻吟| 日韩一级免费观看| 91视频在线观看免费| 另类综合日韩欧美亚洲| 中文字幕在线不卡国产视频| 日韩一区二区三区在线视频| 99视频精品免费视频| 久久精品国产99国产精品| 亚洲美女屁股眼交| 精品播放一区二区| 91.xcao| 99久精品国产| 国产综合一区二区| 五月激情丁香一区二区三区| 日本一区二区三区视频视频| 日韩免费高清电影| 在线成人小视频| 色偷偷久久人人79超碰人人澡| 精品在线亚洲视频| 免费黄网站欧美| 亚洲一二三区在线观看| **欧美大码日韩| 亚洲国产高清不卡| 精品av久久707| 91精品国产综合久久久久| 欧美怡红院视频| 日本乱人伦一区| 91丝袜美腿高跟国产极品老师| 丰满亚洲少妇av| 国产九色精品成人porny| 奇米色一区二区三区四区| 亚洲动漫第一页| 亚洲不卡av一区二区三区| 一区二区三区四区激情| 亚洲三级电影网站| 国产精品乱人伦中文| 欧美高清在线视频| 欧美激情一区在线| 国产精品久久久久久久久图文区| 久久在线免费观看| 国产欧美日韩在线观看| 久久精品一二三| 日本一区二区三区电影| 国产欧美精品在线观看| 国产片一区二区三区| 中文字幕第一区第二区| 欧美激情综合在线| 中文字幕中文字幕中文字幕亚洲无线| 国产精品网曝门| 中文字幕在线不卡国产视频| 亚洲三级在线免费观看| 亚洲一区中文日韩| 一个色综合av| 日韩福利电影在线| 九九九久久久精品| 国产毛片精品视频| 色综合久久久久网| 欧美日韩视频在线第一区 | 亚洲黄色片在线观看| 亚洲美女屁股眼交3| 天堂影院一区二区| 国产麻豆精品theporn| fc2成人免费人成在线观看播放| 91丨porny丨首页| 91麻豆精品国产91久久久资源速度| 欧美一区二区三区四区视频| 久久综合九色综合欧美就去吻 | 亚洲福利一区二区三区| 日本不卡一区二区三区 | 亚洲综合久久久久| 蜜臀av国产精品久久久久| 国产精品综合一区二区| 一本大道av一区二区在线播放| 欧美性生交片4| 久久精子c满五个校花| 亚洲一区二区五区| 国产麻豆精品视频| 欧美猛男gaygay网站| 久久嫩草精品久久久久| 一区二区三区色| 国产成人免费视频一区| 欧美乱妇一区二区三区不卡视频| 久久色成人在线| 亚洲午夜激情av| 成人午夜在线视频| 欧美精品欧美精品系列| 国产精品全国免费观看高清| 午夜精品福利视频网站| 99久久亚洲一区二区三区青草| 日韩精品一区二区三区在线播放| 亚洲蜜臀av乱码久久精品|