本文整理汇总了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("");
}
示例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);
}
}
示例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);
}
}
示例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$
}