本文整理汇总了Java中org.eclipse.jface.resource.FontRegistry.getBold方法的典型用法代码示例。如果您正苦于以下问题:Java FontRegistry.getBold方法的具体用法?Java FontRegistry.getBold怎么用?Java FontRegistry.getBold使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.jface.resource.FontRegistry
的用法示例。
在下文中一共展示了FontRegistry.getBold方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: populateTree
import org.eclipse.jface.resource.FontRegistry; //导入方法依赖的package包/类
protected void populateTree(Map<String, List<UpgradeConflict>> upgradeConflicts) {
TreeSet<String> sortedComponentTypes = new TreeSet<>();
sortedComponentTypes.addAll(upgradeConflicts.keySet());
// loop thru sorted list creating upgrade component tree
for (String componentType : sortedComponentTypes) {
// create root component type node
TreeItem componentTypeTreeItem = new TreeItem(getTreeComponentConflicts(), SWT.NONE);
componentTypeTreeItem.setText(componentType);
FontRegistry registry = new FontRegistry();
Font boldFont = registry.getBold(Display.getCurrent().getSystemFont().getFontData()[0].getName());
componentTypeTreeItem.setFont(boldFont);
componentTypeTreeItem.setExpanded(true);
// loop thru each component instance and create named node
List<UpgradeConflict> upgradeComponents = upgradeConflicts.get(componentType);
for (UpgradeConflict upgradeConflict : upgradeComponents) {
TreeItem componentTreeItem = new TreeItem(componentTypeTreeItem, SWT.NONE);
componentTreeItem.setText(upgradeConflict.getLocalComponent().getFileName());
componentTreeItem.setForeground(Display.getCurrent().getSystemColor(SWT.COLOR_BLUE));
componentTreeItem.setData("local", upgradeConflict.getLocalComponent());
componentTreeItem.setData("remote", upgradeConflict.getRemoteComponent());
componentTreeItem.setExpanded(true);
}
}
}
示例2: updateSummaryLabel
import org.eclipse.jface.resource.FontRegistry; //导入方法依赖的package包/类
public void updateSummaryLabel(int candidateCnt, String orgUserName) {
if (lblSummary != null) {
lblSummary.setText("Found " + candidateCnt + " deployment candidates");
FontRegistry registry = new FontRegistry();
Font boldFont = registry.getBold(Display.getCurrent().getSystemFont().getFontData()[0].getName());
lblSummary.setFont(boldFont);
lblSummary.update();
}
}
示例3: initFonts
import org.eclipse.jface.resource.FontRegistry; //导入方法依赖的package包/类
private void initFonts()
{
FontData[] fontData = Display.getCurrent().getSystemFont().getFontData();
String fontName = fontData[0].getName();
FontRegistry registry = JFaceResources.getFontRegistry();
boldFont = registry.getBold(fontName);
}
示例4: getBoldFont
import org.eclipse.jface.resource.FontRegistry; //导入方法依赖的package包/类
protected Font getBoldFont() {
final FontRegistry reg = JFaceResources.getFontRegistry();
return reg.getBold(JFaceResources.DEFAULT_FONT);
}