本文整理汇总了Java中org.eclipse.jface.viewers.IFontProvider类的典型用法代码示例。如果您正苦于以下问题:Java IFontProvider类的具体用法?Java IFontProvider怎么用?Java IFontProvider使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
IFontProvider类属于org.eclipse.jface.viewers包,在下文中一共展示了IFontProvider类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: DecoratingColumLabelProvider
import org.eclipse.jface.viewers.IFontProvider; //导入依赖的package包/类
/**
* Constructor.
*
* @param labelProvider
* the {@link ILabelProvider} to decorate
* @param labelDecorator
* the {@link ILabelDecorator} adding decoration
*/
public DecoratingColumLabelProvider(ILabelProvider labelProvider, ILabelDecorator labelDecorator) {
this.labelProvider = labelProvider;
if (labelProvider instanceof IFontProvider) {
this.fontProvider = (IFontProvider)labelProvider;
} else {
this.fontProvider = null;
}
if (labelProvider instanceof IColorProvider) {
this.colorProvider = (IColorProvider)labelProvider;
} else {
this.colorProvider = null;
}
this.labelDecorator = labelDecorator;
if (labelDecorator instanceof CellLabelProvider) {
this.cellLabelProvider = (CellLabelProvider)labelDecorator;
} else {
this.cellLabelProvider = null;
}
}
示例2: getFont
import org.eclipse.jface.viewers.IFontProvider; //导入依赖的package包/类
public Font getFont(Object element)
{
if (disabled)
{
if (wrapped instanceof IFontProvider)
{
return ((IFontProvider) wrapped).getFont(element);
}
return null;
}
if (!useEditorFont())
{
return null;
}
Font font = JFaceResources.getFont(IThemeManager.VIEW_FONT_NAME);
if (font == null)
{
font = JFaceResources.getTextFont();
}
return font;
}
示例3: getFont
import org.eclipse.jface.viewers.IFontProvider; //导入依赖的package包/类
public Font getFont(Object element) {
ILabelDecorator fontProvider = getLabelDecorator();
if (fontProvider instanceof IFontProvider) {
return ((IFontProvider) fontProvider).getFont(element);
}
// Default
return null;
}
示例4: getFont
import org.eclipse.jface.viewers.IFontProvider; //导入依赖的package包/类
private Font getFont(Object element) {
if (element instanceof ItemsListSeparator) {
return null;
}
if (provider instanceof IFontProvider) {
return ((IFontProvider) provider).getFont(element);
}
return null;
}
示例5: getFont
import org.eclipse.jface.viewers.IFontProvider; //导入依赖的package包/类
@Override
public Font getFont(Object element) {
if (wrappedLabelProvider instanceof IFontProvider) {
return ((IFontProvider) wrappedLabelProvider).getFont(element);
}
return null;
}