当前位置: 首页>>代码示例>>Java>>正文


Java JFaceResources.DIALOG_FONT属性代码示例

本文整理汇总了Java中org.eclipse.jface.resource.JFaceResources.DIALOG_FONT属性的典型用法代码示例。如果您正苦于以下问题:Java JFaceResources.DIALOG_FONT属性的具体用法?Java JFaceResources.DIALOG_FONT怎么用?Java JFaceResources.DIALOG_FONT使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在org.eclipse.jface.resource.JFaceResources的用法示例。


在下文中一共展示了JFaceResources.DIALOG_FONT属性的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createTextLayout

/**
 * <p>
 * Creates and initializes the text layout used to compute the size hint.
 * </p>
 * 
 * @since 3.2
 */
private void createTextLayout() {
	fTextLayout= new TextLayout(fBrowser.getDisplay());
	
	// Initialize fonts
	String symbolicFontName= fSymbolicFontName == null ? JFaceResources.DIALOG_FONT : fSymbolicFontName;
	Font font = JFaceResources.getFont(symbolicFontName);
	fTextLayout.setFont(font);
	fTextLayout.setWidth(-1);
	font = JFaceResources.getFontRegistry().getBold(symbolicFontName);
	fBoldStyle = new TextStyle(font, null, null);
	
	// Compute and set tab width
	fTextLayout.setText("    ");
	int tabWidth = fTextLayout.getBounds().width;
	fTextLayout.setTabs(new int[] {tabWidth});
	
	fTextLayout.setText("");
}
 
开发者ID:DarwinSPL,项目名称:DarwinSPL,代码行数:25,代码来源:DwprofileBrowserInformationControl.java

示例2: doCreateInformationControl

@Override
public IInformationControl doCreateInformationControl(Shell parent) {
	String tooltipAffordanceString = "Press F2 for focus";
	if (BrowserInformationControl.isAvailable(parent)) {
		String font = JFaceResources.DIALOG_FONT;
		BrowserInformationControl iControl = new BrowserInformationControl(
				parent, font, tooltipAffordanceString) {
			/*
			 * @see org.eclipse.jface.text.IInformationControlExtension5#
			 * getInformationPresenterControlCreator()
			 */
			@Override
			public IInformationControlCreator getInformationPresenterControlCreator() {
				return fInformationPresenterControlCreator;
			}
		};
		addLinkListener(iControl);
		return iControl;
	} else {
		return new DefaultInformationControl(parent,
				tooltipAffordanceString);
	}
}
 
开发者ID:angelozerr,项目名称:typescript.java,代码行数:23,代码来源:HoverControlCreator.java

示例3: doCreateInformationControl

@Override
public IInformationControl doCreateInformationControl(Shell parent) {
	String tooltipAffordanceString = "Press F2 for focus";
	if (BrowserInformationControl.isAvailable(parent)) {
		String font = JFaceResources.DIALOG_FONT;
		BrowserInformationControl iControl = new BrowserInformationControl(
				parent, font, tooltipAffordanceString) {
			/*
			 * @see org.eclipse.jface.text.IInformationControlExtension5#
			 * getInformationPresenterControlCreator()
			 */
			@Override
			public IInformationControlCreator getInformationPresenterControlCreator() {
				return fInformationPresenterControlCreator;
			}
		};
		// addLinkListener(iControl);
		return iControl;
	} else {
		return new DefaultInformationControl(parent,
				tooltipAffordanceString);
	}
}
 
开发者ID:angelozerr,项目名称:eclipse-wtp-json,代码行数:23,代码来源:JSONHoverControlCreator.java

示例4: createTextLayout

/**
 * Creates and initializes the text layout used to compute the size hint.
 * 
 * @since 3.2
 */
private void createTextLayout()
{
	fTextLayout = new TextLayout(fBrowser.getDisplay());

	// Initialize fonts
	String symbolicFontName = fSymbolicFontName == null ? JFaceResources.DIALOG_FONT : fSymbolicFontName;
	Font font = JFaceResources.getFont(symbolicFontName);
	fTextLayout.setFont(font);
	fTextLayout.setWidth(-1);
	font = JFaceResources.getFontRegistry().getBold(symbolicFontName);
	fBoldStyle = new TextStyle(font, null, null);

	// Compute and set tab width
	fTextLayout.setText("    "); //$NON-NLS-1$
	int tabWidth = fTextLayout.getBounds().width;
	fTextLayout.setTabs(new int[] { tabWidth });
	fTextLayout.setText(""); //$NON-NLS-1$
}
 
开发者ID:apicloudcom,项目名称:APICloud-Studio,代码行数:23,代码来源:CustomBrowserInformationControl.java


注:本文中的org.eclipse.jface.resource.JFaceResources.DIALOG_FONT属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。