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

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

?? fontdialog.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.widgets;import org.eclipse.swt.internal.win32.*;import org.eclipse.swt.*;import org.eclipse.swt.graphics.*;import org.eclipse.swt.internal.Compatibility;/** * Instances of this class allow the user to select a font * from all available fonts in the system. * <dl> * <dt><b>Styles:</b></dt> * <dd>(none)</dd> * <dt><b>Events:</b></dt> * <dd>(none)</dd> * </dl> * <p> * IMPORTANT: This class is intended to be subclassed <em>only</em> * within the SWT implementation. * </p> */public class FontDialog extends Dialog {	FontData fontData;	RGB rgb;	/** * Constructs a new instance of this class given only its parent. * * @param parent a shell which will be the parent of the new instance * * @exception IllegalArgumentException <ul> *    <li>ERROR_NULL_ARGUMENT - if the parent is null</li> * </ul> * @exception SWTException <ul> *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the parent</li> *    <li>ERROR_INVALID_SUBCLASS - if this class is not an allowed subclass</li> * </ul> */public FontDialog (Shell parent) {	this (parent, SWT.PRIMARY_MODAL);}/** * Constructs a new instance of this class given its parent * and a style value describing its behavior and appearance. * <p> * The style value is either one of the style constants defined in * class <code>SWT</code> which is applicable to instances of this * class, or must be built by <em>bitwise OR</em>'ing together  * (that is, using the <code>int</code> "|" operator) two or more * of those <code>SWT</code> style constants. The class description * lists the style constants that are applicable to the class. * Style bits are also inherited from superclasses. * </p> * * @param parent a shell which will be the parent of the new instance * @param style the style of dialog to construct * * @exception IllegalArgumentException <ul> *    <li>ERROR_NULL_ARGUMENT - if the parent is null</li> * </ul> * @exception SWTException <ul> *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the parent</li> *    <li>ERROR_INVALID_SUBCLASS - if this class is not an allowed subclass</li> * </ul> */public FontDialog (Shell parent, int style) {	super (parent, style);	checkSubclass ();}/** * Returns a FontData object describing the font that was * selected in the dialog, or null if none is available. *  * @return the FontData for the selected font, or null * @deprecated use #getFontList () */public FontData getFontData () {	return fontData;}/** * Returns a FontData set describing the font that was * selected in the dialog, or null if none is available. *  * @return the FontData for the selected font, or null * @since 2.1.1 */public FontData [] getFontList () {	if (fontData == null) return null;	FontData [] result = new FontData [1];	result [0] = fontData;	return result;}/** * Returns the currently selected color in the receiver. * * @return the RGB value for the selected color, may be null * * @see PaletteData#getRGBs *  * @since 2.1 */public RGB getRGB () {	return rgb;}/** * Makes the dialog visible and brings it to the front * of the display. * * @return a FontData object describing the font that was selected, *         or null if the dialog was cancelled or an error occurred * * @exception SWTException <ul> *    <li>ERROR_WIDGET_DISPOSED - if the dialog has been disposed</li> *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the dialog</li> * </ul> */public FontData open () {	if (OS.IsWinCE) SWT.error (SWT.ERROR_NOT_IMPLEMENTED);		/* Get the owner HWND for the dialog */	int hwndOwner = 0;	if (parent != null) hwndOwner = parent.handle;	/* Open the dialog */	int hHeap = OS.GetProcessHeap ();	CHOOSEFONT lpcf = new CHOOSEFONT ();	lpcf.lStructSize = CHOOSEFONT.sizeof;	lpcf.hwndOwner = hwndOwner;	lpcf.Flags = OS.CF_SCREENFONTS | OS.CF_EFFECTS;	int lpLogFont = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, LOGFONT.sizeof);	if (fontData != null && fontData.data != null) {		LOGFONT logFont = fontData.data;		int lfHeight = logFont.lfHeight;		int hDC = OS.GetDC (0);		int pixels = -Compatibility.round (fontData.height * OS.GetDeviceCaps(hDC, OS.LOGPIXELSY), 72);		OS.ReleaseDC (0, hDC);		logFont.lfHeight = pixels;		lpcf.Flags |= OS.CF_INITTOLOGFONTSTRUCT;		OS.MoveMemory (lpLogFont, logFont, LOGFONT.sizeof);		logFont.lfHeight = lfHeight;	}	lpcf.lpLogFont = lpLogFont;	if (rgb != null) {		int red = rgb.red & 0xFF;		int green = (rgb.green << 8) & 0xFF00;		int blue = (rgb.blue << 16) & 0xFF0000;		lpcf.rgbColors = red | green | blue;	}		/* Make the parent shell be temporary modal */	Shell oldModal = null;	Display display = null;	if ((style & (SWT.APPLICATION_MODAL | SWT.SYSTEM_MODAL)) != 0) {		display = parent.getDisplay ();		oldModal = display.getModalDialogShell ();		display.setModalDialogShell (parent);	}	/* Open the dialog */	boolean success = OS.ChooseFont (lpcf);		/* Clear the temporary dialog modal parent */	if ((style & (SWT.APPLICATION_MODAL | SWT.SYSTEM_MODAL)) != 0) {		display.setModalDialogShell (oldModal);	}		/* Compute the result */	if (success) {		LOGFONT logFont = OS.IsUnicode ? (LOGFONT) new LOGFONTW () : new LOGFONTA ();		OS.MoveMemory (logFont, lpLogFont, LOGFONT.sizeof);		/*		 * This will not work on multiple screens or		 * for printing. Should use DC for the proper device.		 */		int hDC = OS.GetDC(0);		int logPixelsY = OS.GetDeviceCaps(hDC, OS.LOGPIXELSY);		int pixels = 0; 		if (logFont.lfHeight > 0) {			/*			 * Feature in Windows. If the lfHeight of the LOGFONT structure			 * is positive, the lfHeight measures the height of the entire			 * cell, including internal leading, in logical units. Since the			 * height of a font in points does not include the internal leading,			 * we must subtract the internal leading, which requires a TEXTMETRIC,			 * which in turn requires font creation.			 */			int hFont = OS.CreateFontIndirect(logFont);			int oldFont = OS.SelectObject(hDC, hFont);			TEXTMETRIC lptm = OS.IsUnicode ? (TEXTMETRIC) new TEXTMETRICW () : new TEXTMETRICA ();			OS.GetTextMetrics(hDC, lptm);			OS.SelectObject(hDC, oldFont);			OS.DeleteObject(hFont);			pixels = logFont.lfHeight - lptm.tmInternalLeading;		} else {			pixels = -logFont.lfHeight;		}		OS.ReleaseDC(0, hDC);		int points = Compatibility.round(pixels * 72, logPixelsY);		fontData = FontData.win32_new (logFont, points);		int red = lpcf.rgbColors & 0xFF;		int green = (lpcf.rgbColors >> 8) & 0xFF;		int blue = (lpcf.rgbColors >> 16) & 0xFF;		rgb = new RGB (red, green, blue);	}			/* Free the OS memory */	if (lpLogFont != 0) OS.HeapFree (hHeap, 0, lpLogFont);	/*	* This code is intentionally commented.  On some	* platforms, the owner window is repainted right	* away when a dialog window exits.  This behavior	* is currently unspecified.	*///	if (hwndOwner != 0) OS.UpdateWindow (hwndOwner);		if (!success) return null;	return fontData;}/** * Sets a FontData object describing the font to be * selected by default in the dialog, or null to let * the platform choose one. *  * @param fontData the FontData to use initially, or null * @deprecated use #setFontList (FontData []) */public void setFontData (FontData fontData) {	this.fontData = fontData;}/** * Sets a set of FontData objects describing the font to * be selected by default in the dialog, or null to let * the platform choose one. *  * @param fontData the set of FontData objects to use initially, or null * @since 2.1.1 */public void setFontList (FontData [] fontData) {	if (fontData != null && fontData.length > 0) {		this.fontData = fontData [0];	} else {		this.fontData = null;	}}/** * Sets the receiver's selected color to be the argument. * * @param rgb the new RGB value for the selected color, may be *        null to let the platform to select a default when *        open() is called * * @see PaletteData#getRGBs *  * @since 2.1 */public void setRGB (RGB rgb) {	this.rgb = rgb;}}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品的网站| 久久夜色精品国产欧美乱极品| 中文子幕无线码一区tr| 激情综合五月婷婷| 国产日韩在线不卡| 成人夜色视频网站在线观看| 中文字幕精品一区二区精品绿巨人 | 视频在线在亚洲| 欧美片在线播放| 另类的小说在线视频另类成人小视频在线 | 午夜精品123| 欧美日本在线看| 美女在线视频一区| 国产亚洲视频系列| 色综合久久久久| 天堂影院一区二区| 国产婷婷一区二区| 在线一区二区视频| 美女精品一区二区| 中文字幕一区视频| 制服丝袜一区二区三区| 久久国产综合精品| 国产精品传媒入口麻豆| 欧美日本一道本| 国产美女av一区二区三区| 亚洲人成人一区二区在线观看| 欧美日本韩国一区| 国产电影精品久久禁18| 一区二区三区不卡在线观看 | 成人一区二区三区视频在线观看| 亚洲美女视频一区| 精品日韩欧美一区二区| av一区二区三区在线| 日韩中文字幕一区二区三区| 精品对白一区国产伦| 日本高清不卡在线观看| 国内一区二区视频| 亚洲国产一区在线观看| 性做久久久久久免费观看| 日韩欧美在线1卡| eeuss鲁片一区二区三区在线观看| 亚洲mv在线观看| 中文字幕一区二区三区在线观看| 欧美一区午夜视频在线观看| 岛国精品在线观看| 麻豆91精品视频| 亚洲一卡二卡三卡四卡无卡久久| 337p日本欧洲亚洲大胆精品| 欧美日韩二区三区| 99精品视频一区二区三区| 久久精工是国产品牌吗| 亚洲成人免费观看| 亚洲人成精品久久久久| 久久综合中文字幕| 日韩一区国产二区欧美三区| 一本在线高清不卡dvd| 国产成人久久精品77777最新版本| 亚洲永久免费视频| 国产精品久久久久久久蜜臀| 26uuu亚洲综合色| 日韩一区二区三区在线视频| 91成人免费电影| 一本一道久久a久久精品| 成人app网站| 成人免费不卡视频| 国产一区二区调教| 国产一区视频网站| 狠狠色2019综合网| 久久成人免费日本黄色| 日本中文字幕不卡| 青青草国产精品97视觉盛宴| 午夜电影网一区| 亚洲成a人片在线不卡一二三区| 亚洲久草在线视频| 日韩理论片网站| 国产精品初高中害羞小美女文| 国产婷婷色一区二区三区四区| 久久亚洲精品小早川怜子| 欧美videossexotv100| 久久众筹精品私拍模特| 欧美mv日韩mv国产网站app| 日韩亚洲欧美在线| 2024国产精品视频| 日本一区二区免费在线| 欧美国产一区视频在线观看| 国产精品网站在线观看| 国产精品动漫网站| 午夜一区二区三区在线观看| 久久精品亚洲国产奇米99| 91视频在线观看免费| 日本色综合中文字幕| 国产女人水真多18毛片18精品视频| 国产精品你懂的在线| 亚洲三级电影网站| 91福利在线播放| 裸体健美xxxx欧美裸体表演| 国产亚洲欧美在线| 国产伦精品一区二区三区视频青涩| 成人在线视频一区| 欧美精品日韩精品| 国产视频一区在线观看| 欧美日韩国产高清一区二区三区| 制服丝袜成人动漫| 美女网站色91| 欧美日韩高清一区| 一本大道久久a久久精品综合| 久久精品国产**网站演员| 国产一二三精品| av一区二区三区| 激情综合亚洲精品| 成人久久久精品乱码一区二区三区| 亚洲色图另类专区| 亚洲激情欧美激情| 久久久久久9999| 亚洲伊人色欲综合网| 性做久久久久久久免费看| 久久国产剧场电影| 麻豆国产欧美一区二区三区| av高清不卡在线| 精品国产乱码久久久久久1区2区| 国产精品嫩草99a| 久久精品国产亚洲5555| 91一区二区三区在线观看| 555夜色666亚洲国产免| 精品国免费一区二区三区| 一区二区激情视频| 国产成人综合在线| 欧美蜜桃一区二区三区| 日韩欧美视频一区| 久久精品无码一区二区三区| 亚洲精品久久7777| 白白色 亚洲乱淫| 欧美视频第二页| 日韩一区二区三区av| 久久久综合九色合综国产精品| 日本一区免费视频| 亚洲一区二三区| 国产乱子伦视频一区二区三区 | 久久中文娱乐网| 免费人成在线不卡| 欧美日精品一区视频| 亚洲图片激情小说| 国产精品亚洲成人| 日韩视频一区二区三区在线播放 | 欧美成人激情免费网| 亚洲自拍欧美精品| 韩国成人在线视频| 欧美酷刑日本凌虐凌虐| 国产精品高潮呻吟久久| 一区二区三区免费网站| 久久99国产精品尤物| 2021国产精品久久精品| 国产精品一区二区在线播放 | 国产精品白丝av| 欧美日本在线观看| 亚洲精品水蜜桃| 国产成人在线观看| 久久伊人中文字幕| 精品影院一区二区久久久| 91 com成人网| 日日摸夜夜添夜夜添精品视频 | 国产精品国产三级国产普通话99| 免费看日韩精品| 538prom精品视频线放| 天天综合色天天| 欧美人体做爰大胆视频| 天天射综合影视| 欧美三级韩国三级日本三斤 | 国产精品美女视频| 成人午夜av在线| 欧美国产97人人爽人人喊| 国产麻豆精品theporn| 久久精品欧美日韩| 从欧美一区二区三区| 国产精品美女久久久久久久久 | 极品少妇xxxx偷拍精品少妇| 日韩一级片网站| 韩日欧美一区二区三区| 精品99999| 国产91精品一区二区麻豆网站 | 色婷婷综合久久久中文一区二区| 国产精品美女视频| 91福利国产成人精品照片| 亚洲国产精品嫩草影院| 在线综合+亚洲+欧美中文字幕| 天堂在线亚洲视频| 精品国产一区二区三区久久久蜜月 | 高清av一区二区| 亚洲青青青在线视频| 欧美婷婷六月丁香综合色| 亚洲电影中文字幕在线观看| 欧美日韩1234| 国内精品自线一区二区三区视频| 久久先锋影音av鲁色资源网| 成人91在线观看| 亚洲444eee在线观看| 亚洲精品在线三区| 91在线你懂得| 三级成人在线视频| 国产午夜亚洲精品午夜鲁丝片|