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

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

?? textlayout.java

?? 源碼為Eclipse開源開發平臺桌面開發工具SWT的源代碼,
?? JAVA
?? 第 1 頁 / 共 5 頁
字號:
			return untranslateOffset(lastRun.start);		} else {			if (trailing != null) trailing[0] = 1;			return untranslateOffset(lastRun.start + lastRun.length - 1);		}	}		int width = 0;	for (int i = 0; i < lineRuns.length; i++) {		StyleItem run = lineRuns[i];		if (run.lineBreak && !run.softBreak) return untranslateOffset(run.start);		if (width + run.width > x) {			if (run.tab) {				if (trailing != null) trailing[0] = x < (width + run.width / 2) ? 0 : 1;				return untranslateOffset(run.start);			}			int cChars = run.length;			int cGlyphs = run.glyphCount;			int xRun = x - width;			int[] piCP = new int[1];			int[] piTrailing = new int[1];			if ((orientation & SWT.RIGHT_TO_LEFT) != 0) {				xRun = run.width - xRun;			}			OS.ScriptXtoCP(xRun, cChars, cGlyphs, run.clusters, run.visAttrs, run.advances, run.analysis, piCP, piTrailing);			if (trailing != null) trailing[0] = piTrailing[0];			return untranslateOffset(run.start + piCP[0]);		}		width += run.width;	}	if (trailing != null) trailing[0] = 0;	return untranslateOffset(lineOffset[line + 1]);}/** * Returns the orientation of the receiver. * * @return the orientation style *  * @exception SWTException <ul> *    <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * </ul> */public int getOrientation () {	checkLayout();	return orientation;}/** * Returns the previous 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 previous 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 #getNextOffset(int, int) */public int getPreviousOffset (int offset, int movement) {	checkLayout();	return _getOffset (offset, movement, false);}/** * Returns the text segments offsets of the receiver. * * @return the text segments offsets * * @exception SWTException <ul> *    <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * </ul> */public int[] getSegments () {	checkLayout();	return segments;}String getSegmentsText() {	if (segments == null) return text;	int nSegments = segments.length;	if (nSegments <= 1) return text;	int length = text.length();	if (length == 0) return text;	if (nSegments == 2) {		if (segments[0] == 0 && segments[1] == length) return text;	}	char[] oldChars = new char[length];	text.getChars(0, length, oldChars, 0);	char[] newChars = new char[length + nSegments];	int charCount = 0, segmentCount = 0;	char separator = orientation == SWT.RIGHT_TO_LEFT ? RTL_MARK : LTR_MARK;	while (charCount < length) {		if (segmentCount < nSegments && charCount == segments[segmentCount]) {			newChars[charCount + segmentCount++] = separator;		} else {			newChars[charCount + segmentCount] = oldChars[charCount++];		}	}	if (segmentCount < nSegments) {		segments[segmentCount] = charCount;		newChars[charCount + segmentCount++] = separator;	}	return new String(newChars, 0, Math.min(charCount + segmentCount, newChars.length));}/** * Returns the line spacing of the receiver. * * @return the line spacing * * @exception SWTException <ul> *    <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * </ul> */public int getSpacing () {	checkLayout();		return lineSpacing;}/** * Gets the style of the receiver at the specified character offset. * * @param offset the text offset * @return the style or <code>null</code> if not set * * @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 TextStyle getStyle (int offset) {	checkLayout();	int length = text.length();	if (!(0 <= offset && offset < length)) SWT.error(SWT.ERROR_INVALID_RANGE);	for (int i=1; i<styles.length; i++) {		if (styles[i].start > offset) {			return styles[i - 1].style;		}	}	return null;}/** * Returns the tab list of the receiver. * * @return the tab list * * @exception SWTException <ul> *    <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * </ul> */public int[] getTabs () {	checkLayout();	return tabs;}/** * Gets the receiver's text, which will be an empty * string if it has never been set. * * @return the receiver's text * * @exception SWTException <ul> *    <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * </ul> */public String getText () {	checkLayout();	return text;}/** * Returns the width of the receiver. * * @return the width * * @exception SWTException <ul> *    <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * </ul> */public int getWidth () {	checkLayout();	return wrapWidth;}/** * Returns <code>true</code> if the text layout has been disposed, * and <code>false</code> otherwise. * <p> * This method gets the dispose state for the text layout. * When a text layout has been disposed, it is an error to * invoke any other method using the text layout. * * @return <code>true</code> when the text layout is disposed and <code>false</code> otherwise */public boolean isDisposed () {	return device == null;}/* *  Itemize the receiver text */StyleItem[] itemize () {	segmentsText = getSegmentsText();	int length = segmentsText.length();	SCRIPT_CONTROL scriptControl = new SCRIPT_CONTROL();	SCRIPT_STATE scriptState = new SCRIPT_STATE();	final int MAX_ITEM = length + 1;		if ((orientation & SWT.RIGHT_TO_LEFT) != 0) {		scriptState.uBidiLevel = 1;		scriptState.fArabicNumContext = true;	}		int hHeap = OS.GetProcessHeap();	int pItems = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, MAX_ITEM * SCRIPT_ITEM.sizeof);	int[] pcItems = new int[1];		char[] chars = new char[length];	segmentsText.getChars(0, length, chars, 0); 	OS.ScriptItemize(chars, length, MAX_ITEM, scriptControl, scriptState, pItems, pcItems);//	if (hr == E_OUTOFMEMORY) //TODO handle it		StyleItem[] runs = merge(pItems, pcItems[0]);	OS.HeapFree(hHeap, 0, pItems);	return runs;}/*  *  Merge styles ranges and script items  */StyleItem[] merge (int items, int itemCount) {	int count = 0, start = 0, end = segmentsText.length(), itemIndex = 0, styleIndex = 0;	StyleItem[] runs = new StyleItem[itemCount + styles.length];	SCRIPT_ITEM scriptItem = new SCRIPT_ITEM();	while (start < end) {		StyleItem item = new StyleItem();		item.start = start;		item.style = styles[styleIndex].style;		runs[count++] = item;		OS.MoveMemory(scriptItem, items + itemIndex * SCRIPT_ITEM.sizeof, SCRIPT_ITEM.sizeof);		item.analysis = scriptItem.a;		scriptItem.a = new SCRIPT_ANALYSIS();		OS.MoveMemory(scriptItem, items + (itemIndex + 1) * SCRIPT_ITEM.sizeof, SCRIPT_ITEM.sizeof);		int itemLimit = scriptItem.iCharPos;		int styleLimit = translateOffset(styles[styleIndex + 1].start);		if (styleLimit <= itemLimit) {			styleIndex++;			start = styleLimit;		}		if (itemLimit <= styleLimit) {			itemIndex++;			start = itemLimit;		}		item.length = start - item.start;	}	StyleItem item = new StyleItem();	item.start = end;	OS.MoveMemory(scriptItem, items + itemCount * SCRIPT_ITEM.sizeof, SCRIPT_ITEM.sizeof);	item.analysis = scriptItem.a;	runs[count++] = item;	if (runs.length != count) {		StyleItem[] result = new StyleItem[count];		System.arraycopy(runs, 0, result, 0, count);		return result;	}	return runs;}/*  *  Reorder the run  */StyleItem[] reorder (StyleItem[] runs) {	byte[] bidiLevels = new byte[runs.length];	for (int i=0; i<runs.length; i++) {		bidiLevels[i] = (byte)(runs[i].analysis.s.uBidiLevel & 0x1F);	}	int[] log2vis = new int[runs.length];	OS.ScriptLayout(runs.length, bidiLevels, null, log2vis);	StyleItem[] result = new StyleItem[runs.length];	for (int i=0; i<runs.length; i++) {		result[log2vis[i]] = runs[i];	}		if ((orientation & SWT.RIGHT_TO_LEFT) != 0) {		for (int i = 0; i < (result.length - 1) / 2 ; i++) {			StyleItem tmp = result[i];			result[i] = result[result.length - i - 2];			result[result.length - i - 2] = tmp;		}	}	return result;}/** * Sets the text alignment for the receiver. The alignment controls * how a line of text is positioned horizontally. The argument should * be one of <code>SWT.LEFT</code>, <code>SWT.RIGHT</code> or <code>SWT.CENTER</code>. * <p> * The default alignment is <code>SWT.LEFT</code>.  Note that the receiver's * width must be set in order to use <code>SWT.RIGHT</code> or <code>SWT.CENTER</code> * alignment. *</p> * * @param alignment the new alignment  * * @exception SWTException <ul> *    <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * </ul> *  * @see #setWidth(int) */public void setAlignment (int alignment) {	checkLayout();	int mask = SWT.LEFT | SWT.CENTER | SWT.RIGHT;	alignment &= mask;	if (alignment == 0) return;	if ((alignment & SWT.LEFT) != 0) alignment = SWT.LEFT;	if ((alignment & SWT.RIGHT) != 0) alignment = SWT.RIGHT;	this.alignment = alignment;}/** * Sets the ascent of the receiver. The ascent is distance in pixels * from the baseline to the top of the line and it is applied to all * lines. The default value is <code>-1</code> which means that the * ascent is calculated from the line fonts. * * @param ascent the new ascent * * @exception IllegalArgumentException <ul> *    <li>ERROR_INVALID_ARGUMENT - if the ascent is less than <code>-1</code></li> * </ul> * @exception SWTException <ul> *    <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * </ul> *  * @see #setDescent(int) * @see #getLineMetrics() */public void setAscent(int ascent) {	checkLayout();	if (ascent < -1) SWT.error(SWT.ERROR_INVALID_ARGUMENT);	if (this.ascent == ascent) return;	freeRuns();	this.ascent = ascent;}/** * Sets the descent of the receiver. The descent is distance in pixels * from the baseline to the bottom of the line and it is applied to all * lines. The default value is <code>-1</code> which means that the * descent is calculated from the line fonts. * * @param descent the new descent * * @exception IllegalArgumentException <ul> *    <li>ERROR_INVALID_ARGUMENT - if the descent is less than <code>-1</code></li> * </ul> * @exception SWTException <ul> *    <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> * </ul> *  * @see #setAscent(int) * @see #getLineMetrics() */public void setDescent(int descent) {	checkLayout();	if (descent < -1) SWT.error(SWT.ERROR_INVALID_ARGUMENT);	if (this.descent == descent) return;	freeRuns();	this.descent = descent;}/**  * Sets the default font which will be used by the receiver * to draw and measure text. If the * argument is null, then a default font appropriate * for the platform will be used instead. Note that a text * style can override the default font. * * @param font the new font for the receiver, or null to indicate a default font * * @exception IllegalArgumentException <ul> *    <li>ERROR_INVALID_ARGUMENT - if the font has been disposed</li> * </ul> * @exception SWTException <ul>

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91免费在线视频观看| 亚洲男同1069视频| 日韩一区二区三区在线视频| 欧美三片在线视频观看| 在线观看视频91| 色欧美日韩亚洲| 色婷婷av一区二区三区gif| 91成人在线观看喷潮| 欧美视频在线观看一区| 欧美日韩国产精品成人| 欧美日韩精品福利| 日韩一级黄色片| 26uuu亚洲| 国产精品少妇自拍| 亚洲免费毛片网站| 亚洲国产一二三| 首页综合国产亚洲丝袜| 蜜臀精品一区二区三区在线观看| 黄色日韩三级电影| 高清在线不卡av| 色狠狠一区二区| 欧美日韩国产精品成人| 欧美成人性战久久| 久久精品亚洲乱码伦伦中文 | 亚洲免费三区一区二区| 亚洲成人午夜电影| 久久精品国产精品亚洲综合| 国产精品 欧美精品| 97精品视频在线观看自产线路二| 色女孩综合影院| 91精品一区二区三区在线观看| 欧美日韩成人综合天天影院| 精品入口麻豆88视频| 国产日韩亚洲欧美综合| 亚洲免费在线观看视频| 麻豆久久久久久| 丰满亚洲少妇av| 91国偷自产一区二区开放时间| 538在线一区二区精品国产| 精品第一国产综合精品aⅴ| 国产精品久久久久久久久免费相片 | 专区另类欧美日韩| 午夜精品久久久久久| 激情综合五月婷婷| 972aa.com艺术欧美| 欧美人动与zoxxxx乱| 久久无码av三级| 亚洲一区二区在线视频| 国产一区在线不卡| 99久久精品免费看国产| 制服丝袜日韩国产| 中文字幕高清不卡| 日韩精品国产欧美| 国产.精品.日韩.另类.中文.在线.播放| 色视频成人在线观看免| 久久伊人蜜桃av一区二区| 亚洲曰韩产成在线| 国产精品白丝jk黑袜喷水| 欧美日韩免费电影| 日本一区二区成人在线| 日本美女一区二区三区视频| 成人免费av在线| 91精品国产综合久久小美女| 中文字幕色av一区二区三区| 精品一区二区三区不卡| 在线视频一区二区三| 国产精品视频yy9299一区| 奇米亚洲午夜久久精品| 欧美性受xxxx黑人xyx| 国产欧美日韩不卡| 久久精品国产一区二区三| 91九色最新地址| 国产精品理伦片| 激情久久五月天| 欧美一区二区在线视频| 亚洲另类中文字| 成人va在线观看| 久久九九国产精品| 蜜乳av一区二区| 欧美精品1区2区3区| 亚洲在线观看免费| 91蜜桃网址入口| 国产农村妇女毛片精品久久麻豆 | 亚洲国产高清在线| 琪琪久久久久日韩精品| 欧美在线观看一二区| 国产精品美女久久久久av爽李琼| 国内成+人亚洲+欧美+综合在线| 欧美日韩亚洲不卡| 一区二区三区四区五区视频在线观看| 国产成人免费视频精品含羞草妖精| 欧美一区二区高清| 日本vs亚洲vs韩国一区三区二区 | 亚洲欧美电影院| 波多野结衣在线一区| 欧美经典一区二区三区| 国产一区二区久久| 久久亚洲综合色一区二区三区| 蜜臀av一区二区在线免费观看 | 一区二区免费在线| 日本道精品一区二区三区| 成人免费在线观看入口| 成人97人人超碰人人99| 国产蜜臀av在线一区二区三区| 国产一区二区三区久久悠悠色av| 精品对白一区国产伦| 国产一区二区三区美女| 欧美激情一区二区| 成人教育av在线| 亚洲精品视频一区| 欧美在线观看一区二区| 午夜欧美视频在线观看| 日韩色视频在线观看| 久久精品国产99国产精品| 欧美成人高清电影在线| 国产一区二区三区日韩| 国产精品私人影院| 91视频国产资源| 亚洲成人av免费| 日韩手机在线导航| 国产凹凸在线观看一区二区 | 丁香六月综合激情| 亚洲图片另类小说| 欧美日韩高清一区二区三区| 免费日本视频一区| 久久精品人人爽人人爽| 成人av网站在线观看免费| 亚洲一区在线观看免费观看电影高清| 欧美日韩1区2区| 国模娜娜一区二区三区| 国产精品免费久久久久| 欧美亚洲综合久久| 九色综合狠狠综合久久| 国产欧美日韩在线视频| 91成人在线精品| 久久爱另类一区二区小说| 国产精品素人视频| 欧美日韩一区在线观看| 精品亚洲porn| 亚洲色图色小说| 欧美一级高清片在线观看| 国产传媒久久文化传媒| 亚洲国产精品天堂| 亚洲精品一区二区三区影院| 91丝袜高跟美女视频| 日韩不卡一二三区| 国产精品欧美久久久久一区二区| 欧美在线不卡视频| 国产一区美女在线| 亚洲在线中文字幕| 久久综合成人精品亚洲另类欧美| 色综合天天综合在线视频| 另类小说色综合网站| 亚洲欧美乱综合| 精品国产网站在线观看| 91亚洲午夜精品久久久久久| 久久草av在线| 亚洲在线免费播放| 欧美经典一区二区| 91精选在线观看| 色综合色狠狠综合色| 国产一区二区福利| 亚洲大尺度视频在线观看| 国产嫩草影院久久久久| 日韩欧美专区在线| 欧美羞羞免费网站| www.日本不卡| 国产一区二区在线视频| 视频一区欧美精品| 亚洲人成在线观看一区二区| 欧美精品一区二区不卡| 欧美精品18+| 91高清视频在线| 成人精品免费看| 极品美女销魂一区二区三区 | 日韩国产精品久久| 亚洲少妇中出一区| 国产网站一区二区| 日韩精品一区二区三区在线观看| 欧美在线观看视频一区二区三区| 成人avav影音| 国产精品亚洲成人| 欧美aaa在线| 视频一区中文字幕国产| 亚洲一区二区视频| 亚洲视频小说图片| 欧美国产精品专区| 26uuu色噜噜精品一区| 日韩女优毛片在线| 91精品国产高清一区二区三区 | www.日本不卡| 国产999精品久久| 国产精品一区不卡| 国产一区在线精品| 国产麻豆视频一区二区| 精品综合久久久久久8888| 蜜臀精品一区二区三区在线观看 | 欧美亚州韩日在线看免费版国语版 | 欧美三区在线观看| 欧美网站大全在线观看|