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

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

?? displayrenderer.java

?? 源碼為Eclipse開源開發平臺桌面開發工具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.custom;import org.eclipse.swt.SWT;import org.eclipse.swt.graphics.*;/** * A DisplayRenderer renders the content of a StyledText widget on  * a display device. */class DisplayRenderer extends StyledTextRenderer {	private StyledText parent;			// used to get content and styles during rendering	private int topIndex = -1;	private TextLayout[] layouts;	/** * Creates an instance of <class>DisplayRenderer</class>. * </p> * @param device Device to render on * @param regularFont Font to use for regular (non-bold) text * @param isBidi true=bidi platform, false=no bidi platform * @param leftMargin margin to the left of the text * @param parent <class>StyledText</class> widget to render * @param tabLength length in characters of a tab character */DisplayRenderer(Device device, Font regularFont, StyledText parent, int tabLength) {	super(device, regularFont);	this.parent = parent;	calculateLineHeight();	setTabLength(tabLength);}void dispose() {	super.dispose();	if (layouts != null) {		for (int i = 0; i < layouts.length; i++) {			TextLayout layout = layouts[i];			if (layout != null) super.disposeTextLayout(layout);		}		topIndex = -1;		layouts = null;	}}/** * Dispose the specified GC. * </p> * @param gc GC to dispose. */protected void disposeGC(GC gc) {	gc.dispose();}/**  * Draws the line delimiter selection if the selection extends beyond the given line. * </p> * * @param line the line to draw * @param lineOffset offset of the first character in the line. * 	Relative to the start of the document. * @param styles line styles * @param paintY y location to draw at * @param gc GC to draw on */protected void drawLineBreakSelection(String line, int lineOffset, int paintX, int paintY, GC gc) {	Point selection = parent.internalGetSelection();	int lineLength = line.length();	int selectionStart = Math.max(0, selection.x - lineOffset);	int selectionEnd = selection.y - lineOffset;	int lineEndSpaceWidth = getLineEndSpaceWidth();	int lineHeight = getLineHeight();		if (selectionEnd == selectionStart || selectionEnd < 0 || selectionStart > lineLength || selectionEnd <= lineLength) {		return;	}		gc.setBackground(parent.getSelectionBackground());	gc.setForeground(parent.getSelectionForeground());	if ((parent.getStyle() & SWT.FULL_SELECTION) != 0) {		Rectangle rect = getClientArea();		gc.fillRectangle(paintX, paintY, rect.width - paintX, lineHeight);	} else {		boolean isWrappedLine = false;		if (parent.internalGetWordWrap()) {			StyledTextContent content = getContent();			int lineEnd = lineOffset + lineLength;			int lineIndex = content.getLineAtOffset(lineEnd);			// is the start offset of the next line the same as the end 			// offset of this line?			if (lineIndex < content.getLineCount() - 1 &&				content.getOffsetAtLine(lineIndex + 1) == lineEnd) {				isWrappedLine = true;			}		}		if (isWrappedLine == false) {			// render the line break selection			gc.fillRectangle(paintX, paintY, lineEndSpaceWidth, lineHeight);		}	}	}/** * Returns the text segments that should be treated as if they  * had a different direction than the surrounding text. * </p> * * @param lineOffset offset of the first character in the line.  * 	0 based from the beginning of the document. * @param line text of the line to specify bidi segments for * @return text segments that should be treated as if they had a * 	different direction than the surrounding text. Only the start  * 	index of a segment is specified, relative to the start of the  * 	line. Always starts with 0 and ends with the line length.  * @exception IllegalArgumentException <ul> *    <li>ERROR_INVALID_ARGUMENT - if the segment indices returned  * 		by the listener do not start with 0, are not in ascending order, * 		exceed the line length or have duplicates</li> * </ul> */protected int[] getBidiSegments(int lineOffset, String lineText) {	if (!parent.isBidi()) return null;	return parent.getBidiSegments(lineOffset, lineText);}/** * Returns the visible client area that can be used for rendering. * </p> * @return the visible client area that can be used for rendering. */protected Rectangle getClientArea() {	return parent.getClientArea();}/** * Returns the <class>StyledTextContent</class> to use for line offset * calculations. * </p> * @return the <class>StyledTextContent</class> to use for line offset * calculations. */protected StyledTextContent getContent() {	return parent.internalGetContent();}/** * Returns a new GC to use for rendering and measuring. * When the GC is no longer used it needs to be disposed by  * calling disposeGC. * </p> * @return the GC to use for rendering and measuring. * @see disposeGC */protected GC getGC() {	return new GC(parent);}/** * Returns the horizontal scroll position. * </p> * @return the horizontal scroll position. */protected int getHorizontalPixel() {	return parent.internalGetHorizontalPixel();}protected int getLeftMargin() {	return parent.leftMargin;}/** * @see StyledTextRenderer#getLineBackgroundData */protected StyledTextEvent getLineBackgroundData(int lineOffset, String line) {	return parent.getLineBackgroundData(lineOffset, line);}/** * @see StyledTextRenderer#getLineStyleData */protected StyledTextEvent getLineStyleData(int lineOffset, String line) {	StyledTextEvent logicalLineEvent = parent.getLineStyleData(lineOffset, line);	if (logicalLineEvent != null) {		logicalLineEvent = getLineStyleData(logicalLineEvent, lineOffset, line);	}	return logicalLineEvent;}protected  int getOrientation () {	return parent.getOrientation();}protected int getRightMargin() {	return parent.rightMargin;}protected Color getSelectionBackground() {	return parent.getSelectionBackground();}protected Color getSelectionForeground() {	return parent.getSelectionForeground();}/** * @see StyledTextRenderer#getSelection */protected Point getSelection() {	return parent.internalGetSelection();}/** * @see StyledTextRenderer#getWordWrap */protected boolean getWordWrap() {	return parent.getWordWrap();}/** * @see StyledTextRenderer#isFullLineSelection */protected boolean isFullLineSelection() {	return (parent.getStyle() & SWT.FULL_SELECTION) != 0;}TextLayout createTextLayout(int lineOffset) {	if (!parent.internalGetWordWrap()) {		int lineIndex = getContent().getLineAtOffset(lineOffset);		updateTopIndex();		if (layouts != null) {			int layoutIndex = lineIndex - topIndex;			if (0 <= layoutIndex && layoutIndex < layouts.length) {				TextLayout layout = layouts[layoutIndex];				if (layout != null) return layout;				return layouts[layoutIndex] = super.createTextLayout(lineIndex); 			}		}	}	return super.createTextLayout(lineOffset);}void disposeTextLayout (TextLayout layout) {	if (layouts != null) {		for (int i=0; i<layouts.length; i++) {			if (layouts[i] == layout) return;		}	}	super.disposeTextLayout(layout);}void updateTopIndex() {	int verticalIncrement = parent.getVerticalIncrement();	int topIndex = verticalIncrement == 0 ? 0 : parent.verticalScrollOffset / verticalIncrement;	int newLength = Math.max(1 , parent.getPartialBottomIndex() - topIndex + 1);	if (layouts == null || topIndex != this.topIndex || newLength != layouts.length) {		TextLayout[] newLayouts = new TextLayout[newLength];		if (layouts != null) {			for(int i=0; i<layouts.length; i++) {				TextLayout layout = layouts[i];				if (layout != null) {					int layoutIndex = (i + this.topIndex) - topIndex;					if (0 <= layoutIndex && layoutIndex < newLayouts.length) {						newLayouts[layoutIndex] = layout;					} else {						super.disposeTextLayout(layout);					}				}			}		}		this.topIndex = topIndex;		layouts = newLayouts;	}}}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产在线视频不卡二| 久久久久久免费毛片精品| 26uuu精品一区二区| 国产一区二区在线影院| 国产嫩草影院久久久久| 一本大道久久精品懂色aⅴ| 亚洲午夜精品在线| 欧美va日韩va| 99re在线精品| 免费在线看一区| 中文字幕精品三区| 欧美日韩在线电影| 国产在线播精品第三| 国产福利一区二区三区视频| 一区二区三区免费看视频| 538在线一区二区精品国产| 奇米在线7777在线精品 | 国产亚洲一区二区三区四区| 99国产麻豆精品| 欧美专区亚洲专区| 成人avav影音| 激情亚洲综合在线| 丁香啪啪综合成人亚洲小说 | 日韩一二三四区| 99国产精品视频免费观看| 欧美中文字幕一二三区视频| 51精品国自产在线| 2023国产精品| 亚洲日本成人在线观看| 欧美va亚洲va| 亚洲乱码中文字幕| 国产精品麻豆视频| 欧美成人福利视频| 亚洲乱码精品一二三四区日韩在线| 亚洲成av人影院| 亚洲综合丝袜美腿| 亚洲女人****多毛耸耸8| 亚洲视频一二三| 日本不卡一区二区| 亚洲国产精品一区二区久久 | 色老综合老女人久久久| 成人免费不卡视频| 91精品国产一区二区三区| 3d动漫精品啪啪一区二区竹菊| 久久综合久久鬼色中文字| 国产精品白丝在线| 亚洲六月丁香色婷婷综合久久| 免费成人结看片| 色呦呦一区二区三区| 久久久影视传媒| 日韩电影在线一区二区| 一本到不卡免费一区二区| 久久久久久99久久久精品网站| 亚洲一区在线观看网站| caoporm超碰国产精品| 99麻豆久久久国产精品免费| 日韩精品中午字幕| 国产视频一区二区在线| 麻豆视频观看网址久久| 美国十次了思思久久精品导航| 91网站黄www| 欧美日韩国产精品成人| 日韩三级视频中文字幕| 亚洲午夜久久久| 99re这里都是精品| 国产精品久久看| 国产69精品久久久久777| 日韩欧美综合一区| 美日韩一区二区三区| 欧美另类变人与禽xxxxx| 精品久久人人做人人爰| 老司机精品视频在线| 99re66热这里只有精品3直播| 国产欧美日韩精品a在线观看| 精品制服美女久久| 在线精品视频小说1| 亚洲男人的天堂一区二区| 99re视频精品| 亚洲欧美日本在线| 欧美影院午夜播放| 欧美韩国日本不卡| 成人av片在线观看| 亚洲欧洲综合另类在线| 色94色欧美sute亚洲13| 一区二区三区四区在线免费观看 | 国产亚洲精品bt天堂精选| 免费久久精品视频| 精品剧情v国产在线观看在线| 99视频精品免费视频| 精品国产乱码久久久久久久久| 中文字幕高清不卡| 成人av午夜影院| 亚洲精品你懂的| 欧美久久一二区| 国产乱色国产精品免费视频| 欧美日韩国产欧美日美国产精品| 天天操天天色综合| 色综合久久久久网| 亚洲电影第三页| 国产高清亚洲一区| 亚洲天堂av老司机| 国产日韩精品一区二区三区| 欧美一卡2卡3卡4卡| 欧美日韩一级黄| 欧美日韩在线综合| 欧美日韩国产一区| 欧美中文一区二区三区| 91福利在线导航| 97se亚洲国产综合在线| 不卡一区二区三区四区| 成人一区二区三区| 成人精品高清在线| 国产成人8x视频一区二区| 色综合天天视频在线观看| 国产成人免费av在线| 国产成人精品免费一区二区| 国产成人午夜电影网| 懂色av中文字幕一区二区三区 | 亚洲一区二区三区国产| 亚洲国产精品影院| 亚洲国产一区视频| 人人狠狠综合久久亚洲| 久久成人av少妇免费| 国产高清一区日本| 99久久国产综合精品色伊| 一本久久精品一区二区| 欧美无乱码久久久免费午夜一区 | 99麻豆久久久国产精品免费| av不卡一区二区三区| 欧美亚洲国产一区在线观看网站| 欧美日韩在线不卡| 日韩一区二区视频在线观看| 欧美成人精精品一区二区频| 久久精品一区二区三区不卡| 国产精品美女久久久久久久久久久| 综合激情成人伊人| 五月天一区二区三区| 国产综合一区二区| 成人动漫av在线| 欧美久久婷婷综合色| 久久夜色精品国产欧美乱极品| 国产精品午夜免费| 性做久久久久久| 看电视剧不卡顿的网站| 成人综合婷婷国产精品久久| 91精彩视频在线观看| 欧美成人综合网站| 亚洲男女一区二区三区| 青草av.久久免费一区| 成人看片黄a免费看在线| 欧美日本国产视频| 久久久久久久久久久电影| 亚洲一区视频在线观看视频| 黄色日韩网站视频| 在线视频欧美精品| 国产午夜一区二区三区| 亚洲第一成人在线| 国产成人精品一区二| 欧美片在线播放| 中文字幕一区免费在线观看| 欧美mv和日韩mv国产网站| 亚洲人吸女人奶水| 麻豆国产欧美日韩综合精品二区| av成人免费在线观看| 555夜色666亚洲国产免| 成人欧美一区二区三区黑人麻豆 | 日韩理论片一区二区| 黄网站免费久久| 欧美久久一二三四区| 亚洲欧洲日本在线| 国产一区二区三区在线观看精品 | 日韩中文字幕一区二区三区| 日日欢夜夜爽一区| 91免费在线看| 久久久91精品国产一区二区三区| 丝袜诱惑亚洲看片| 欧美性xxxxx极品少妇| 中文字幕在线播放不卡一区| 国产精品一级在线| 日韩精品一区二区三区四区视频| 亚洲国产美女搞黄色| 91啪亚洲精品| 国产精品毛片a∨一区二区三区 | 精品国产成人在线影院| 免费成人你懂的| 91精品午夜视频| 爽好多水快深点欧美视频| 欧美三级欧美一级| 亚洲精品久久久久久国产精华液| 成人sese在线| 一区在线播放视频| 成人综合婷婷国产精品久久蜜臀 | 日韩视频在线观看一区二区| 婷婷综合久久一区二区三区| 欧美午夜精品免费| 亚洲一区二区三区在线| 欧美性猛交一区二区三区精品| 一区二区三区美女| 欧美日韩精品福利| 日韩在线观看一区二区|