org.eclipse.jface.viewers.IFontProvider Java Examples

The following examples show how to use org.eclipse.jface.viewers.IFontProvider. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ThemedDelegatingLabelProvider.java    From APICloud-Studio with GNU General Public License v3.0 6 votes vote down vote up
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;
}
 
Example #2
Source File: FilteredItemsSelectionDialog.java    From tlaplus with MIT License 5 votes vote down vote up
private Font getFont(Object element) {
	if (element instanceof ItemsListSeparator) {
		return null;
	}
	if (provider instanceof IFontProvider) {
		return ((IFontProvider) provider).getFont(element);
	}
	return null;
}