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

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

?? wrappedcontent.java

?? 源碼為Eclipse開源開發平臺桌面開發工具SWT的源代碼,
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
/******************************************************************************* * 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.custom;import org.eclipse.swt.*;import org.eclipse.swt.graphics.*;/** * An instance of class <code>WrappedContent</code> is used by  * StyledText to display wrapped lines. Lines are wrapped at word  * breaks which are marked by a space character. Trailing space  * behind words is kept on the current line. * If the last remaining word on a line can not be fully displayed  * the line is wrapped character by character. * WrappedContent wraps a StyledTextContent which provides the line * data. The start offset and length of wrapped lines is calculated * and updated based on recalculation requests and text changes. * <p> * All public methods in this class implement the  * <code>StyledTextContent</code> interface. Package visible  * methods are internal API for use by <code>StyledText</code>. * </p> */class WrappedContent implements StyledTextContent {    final static int LINE_OFFSET = 0; 	// index of line offset in visualLines array    final static int LINE_LENGTH = 1; 	// index of line lenght in visualLines array	        StyledTextRenderer renderer;	StyledTextContent logicalContent;	int[][] visualLines; 				 // start and length of each visual line	int visualLineCount = 0;/** * Create a new instance. *  * @param renderer <class>StyledTextRenderer</class> that renders  * 	the lines wrapped by the new instance. * @param logicalContent StyledTextContent that provides the line  * 	data. */WrappedContent(StyledTextRenderer renderer, StyledTextContent logicalContent) {    this.renderer = renderer;    this.logicalContent = logicalContent;}/** * @see StyledTextContent#addTextChangeListener(TextChangeListener) */public void addTextChangeListener(TextChangeListener listener) {    logicalContent.addTextChangeListener(listener);}/** * Grow the lines array to at least the specified size. * <p> *  * @param numLines number of elements that the array should have * 	at a minimum */private void ensureSize(int numLines) {	int size = visualLines.length;	if (size >= numLines) {		return;	}	int[][] newLines = new int[Math.max(size * 2, numLines)][2];	System.arraycopy(visualLines, 0, newLines, 0, size);	visualLines = newLines;	resetVisualLines(size, visualLines.length - size);	}/** * @see StyledTextContent#getCharCount() */public int getCharCount() {    return logicalContent.getCharCount();}/** * @return the visual (wrapped) line at the specified index * @see StyledTextContent#getLine(int) */public String getLine(int lineIndex) {	String line;		// redirect call to logical content if there are no wrapped lines	if (visualLineCount == 0) {		line = logicalContent.getLine(lineIndex);	}	else {		if (lineIndex >= visualLineCount || lineIndex < 0) {			SWT.error(SWT.ERROR_INVALID_ARGUMENT);		}				line = logicalContent.getTextRange(visualLines[lineIndex][LINE_OFFSET], visualLines[lineIndex][LINE_LENGTH]);	}    return line;}/** * Returns the visual (wrapped) line at given offset. * <p> * The offset is ambiguous if it identifies the end of a visual line and  * there is another visual line below. In this case the end of the visual * line has the same offset as the beginning of the next visual line  * since the visual line break is not represented by any character in the * logical line. * In this ambiguous case the offset is assumed to represent the end of a * visual line and the index of the first visual line is returned. * </p> *  * @param offset offset of the desired line.  * @return the index of the visual (wrapped) line at the specified offset * @see StyledTextContent#getLineAtOffset(int) */public int getLineAtOffset(int offset) {	int lastLine = visualLineCount - 1;	int lastChar;	// redirect call to logical content if there are no wrapped lines	if (visualLineCount == 0) {		return logicalContent.getLineAtOffset(offset);	}	// can't use getCharCount to get the number of characters since this	// method is called in textChanged, when the logicalContent used by	// getCharCount has already changed. at that point the visual lines	// have not been updated yet and we thus need to use the old character	// count which is only available in the visual content.	lastChar = visualLines[lastLine][LINE_OFFSET] + visualLines[lastLine][LINE_LENGTH];	if (offset < 0 || (offset > 0 && offset > lastChar)) {	    SWT.error(SWT.ERROR_INVALID_ARGUMENT);	}	// if last line and the line is not empty you can ask for 	// a position that doesn't exist (the one to the right of the 	// last character) - for inserting	if (offset == lastChar) {		return lastLine;	}	int high = visualLineCount;	int low = -1;	int index = visualLineCount;	while (high - low > 1) {		index = (high + low) / 2;		int lineStart = visualLines[index][LINE_OFFSET];		if (offset >= lineStart) {			int lineEnd = lineStart + visualLines[index][LINE_LENGTH];		    low = index;					    if (offset <= lineEnd) {		    	break;		    }		} 		else {			high = index;		}	}	if (low > 0 && offset == visualLines[low - 1][LINE_OFFSET] + visualLines[low - 1][LINE_LENGTH]) {		// end of a visual line/beginning of next visual line is ambiguous 		// (they have the same offset). always return the first visual line		low--;	}	return low;}/** * @return the number of visual (wrapped) lines * @see StyledTextContent#getLineCount() */public int getLineCount() {	int lineCount = visualLineCount;		// redirect call to logical content if there are no wrapped lines	if (visualLineCount == 0) {		lineCount = logicalContent.getLineCount();	}    return lineCount;}/** * @see StyledTextContent#getLineDelimiter() */public String getLineDelimiter() {    return logicalContent.getLineDelimiter();}/** * @return the start offset of the visual (wrapped) line at the given  * 	index * @see StyledTextContent#getOffsetAtLine(int) */public int getOffsetAtLine(int lineIndex) {	int offset;		// redirect call to logical content if there are no wrapped lines	if (visualLineCount == 0) {		offset = logicalContent.getOffsetAtLine(lineIndex);	}	else {		if (lineIndex >= visualLineCount || lineIndex < 0) {			SWT.error(SWT.ERROR_INVALID_ARGUMENT);		}		offset = visualLines[lineIndex][LINE_OFFSET];	}    return offset;}/** * @see StyledTextContent#getTextRange(int, int) */public String getTextRange(int start, int length) {    return logicalContent.getTextRange(start, length);}/** * Returns the number of visual (wrapped) lines. *  * @return the number of visual (wrapped) lines */int getVisualLineCount() {	return visualLineCount;	}/** * @see StyledTextContent#removeTextChangeListener(TextChangeListener) */public void removeTextChangeListener(TextChangeListener listener) {    logicalContent.removeTextChangeListener(listener);}/** * Reset the visual (wrapped) lines in the specified range. * If the range specifies partial logical lines (e.g., startLine is * the second of two visual lines) it is extended to reset all visual  * lines of a logical line. * Following the reset the logical lines in the reset visual range are  * rewrapped. * <p> *  * @param startLine index of the first visual line  * @param lineCount number of visual lines */void reset(int startLine, int lineCount) {    if (lineCount <= 0 || visualLineCount == 0) {        return;	}       

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久综合色8888| 成人免费观看视频| 亚洲伦理在线精品| 国产精品美女久久久久aⅴ国产馆| 精品噜噜噜噜久久久久久久久试看 | 欧美日韩精品久久久| 94-欧美-setu| 91久久精品一区二区三区| 在线一区二区三区四区| 色婷婷久久久亚洲一区二区三区| 91麻豆精东视频| 91精品福利视频| 在线观看一区二区视频| 91精品中文字幕一区二区三区| 欧美日韩五月天| 日韩欧美国产精品一区| 欧美电影免费观看高清完整版在线 | 国产调教视频一区| 精品国产一区二区三区久久影院 | 久久久国产精品麻豆| 日本一区二区视频在线观看| 中日韩av电影| 一区二区三区中文字幕| 日韩成人一级片| 国产精品一二三区在线| 成人免费观看男女羞羞视频| 色美美综合视频| 日韩欧美在线网站| 国产精品女同互慰在线看| 日韩理论片中文av| 日韩电影在线免费| 不卡在线视频中文字幕| 在线免费av一区| 久久只精品国产| 亚洲另类一区二区| 韩日av一区二区| 色婷婷综合五月| 欧美成人精品3d动漫h| 国产午夜亚洲精品羞羞网站| 亚洲精品你懂的| 国产一本一道久久香蕉| 91精彩视频在线观看| 久久婷婷国产综合精品青草| 亚洲精品写真福利| 国产在线播放一区| 欧美二区乱c少妇| 国产精品素人视频| 美女视频网站久久| 在线国产亚洲欧美| 日本一区二区高清| 久久99精品久久久久婷婷| 99国产精品一区| 久久久www成人免费无遮挡大片| 亚洲激情校园春色| 成人a免费在线看| 精品国产乱码久久久久久老虎 | 午夜电影一区二区三区| kk眼镜猥琐国模调教系列一区二区| 欧美日韩在线免费视频| 亚洲欧洲韩国日本视频| 国产一区二区三区日韩| 5858s免费视频成人| 亚洲精品国产品国语在线app| 国内外精品视频| 欧美一区二区久久| 亚洲福利一区二区| www.99精品| 中文字幕在线免费不卡| 国产成人av自拍| 欧美激情在线一区二区三区| 久久er精品视频| 日韩欧美一区在线观看| 日韩影院在线观看| 这里只有精品视频在线观看| 亚洲一二三四在线| 欧美四级电影在线观看| 亚洲自拍偷拍麻豆| 欧美乱妇一区二区三区不卡视频| 洋洋成人永久网站入口| 在线欧美日韩精品| 丝袜亚洲另类欧美| 91精品国产综合久久香蕉麻豆| 亚洲成人动漫精品| 欧美疯狂做受xxxx富婆| 久久疯狂做爰流白浆xx| 精品成人一区二区| 狠狠色伊人亚洲综合成人| 久久亚洲综合av| 国产东北露脸精品视频| 国产精品色一区二区三区| 91视视频在线直接观看在线看网页在线看| 国产精品欧美综合在线| 99久久精品免费看| 亚洲成人资源在线| 欧美电影免费观看完整版| 国产在线一区观看| 国产精品热久久久久夜色精品三区| 成人性生交大片免费看中文网站| 国产精品短视频| 欧美系列亚洲系列| 免费高清视频精品| 国产日韩av一区| 91成人网在线| 国产一区二区调教| 成人免费在线观看入口| 欧美日韩精品一二三区| 国内外成人在线| 亚洲男帅同性gay1069| 777a∨成人精品桃花网| 国内欧美视频一区二区 | 亚洲品质自拍视频| 欧美日韩一区高清| 国产精选一区二区三区| 亚洲乱码国产乱码精品精98午夜| 欧美亚洲动漫制服丝袜| 国产乱码精品一区二区三区av| 国产精品久久久久aaaa| 这里是久久伊人| jlzzjlzz亚洲日本少妇| 久久狠狠亚洲综合| 一区二区三区中文字幕电影| 久久精品男人的天堂| 欧美美女视频在线观看| 成a人片国产精品| 国产自产高清不卡| 亚洲成人免费影院| 国产精品成人一区二区艾草| 日韩一区二区三免费高清| 高清成人在线观看| 免费观看在线色综合| 一级特黄大欧美久久久| 国产精品女人毛片| 国产欧美一区二区精品性| 这里只有精品电影| 欧美影院午夜播放| 91原创在线视频| 床上的激情91.| 国产精品一区二区果冻传媒| 青青草97国产精品免费观看无弹窗版| 综合欧美一区二区三区| 亚洲国产岛国毛片在线| 欧美变态口味重另类| 91精品国产综合久久精品图片| 成人av网站免费| 国产盗摄一区二区三区| 国产一区二区调教| 国产麻豆午夜三级精品| 蜜桃视频在线观看一区| 日本aⅴ免费视频一区二区三区 | 久久久久久久性| 精品国产污网站| 日韩精品一区二区三区四区视频| 欧美日韩一区二区三区高清| 91久久精品一区二区| 一本久久a久久精品亚洲| 99国产麻豆精品| 91视频免费播放| 91久久奴性调教| 欧美日韩国产精品成人| 欧美性感一区二区三区| 在线电影一区二区三区| 在线成人av网站| 日韩欧美成人一区二区| 日韩欧美成人一区| 久久女同互慰一区二区三区| 日本一区二区三区视频视频| 国产精品美女www爽爽爽| 亚洲视频每日更新| 夜夜操天天操亚洲| 蜜臀久久99精品久久久久久9| 日韩av一区二| 国产乱码字幕精品高清av| 国产精品1区二区.| 91麻豆免费在线观看| 欧美日韩一区二区三区四区| 日韩一区国产二区欧美三区| 久久综合色综合88| 国产精品久久久久影院老司| 一级日本不卡的影视| 免费成人结看片| 国产成人综合在线播放| 91国在线观看| 日韩欧美123| 中文在线免费一区三区高中清不卡| 亚洲色图欧美激情| 蜜臀av性久久久久蜜臀aⅴ| 国产高清在线观看免费不卡| 在线观看日韩一区| 精品国产一区二区三区忘忧草| 中文字幕人成不卡一区| 日韩综合小视频| 成人av在线资源网| 欧美电影在哪看比较好| 中文字幕在线一区免费| 日韩电影在线一区| 色婷婷激情综合| 国产视频一区二区三区在线观看| 亚洲午夜一区二区| 成人av先锋影音| 欧美电影免费提供在线观看|