use of org.eclipse.ui.model.IWorkbenchAdapter2 in project translationstudio8 by heartsome.
the class WorkbenchLabelProvider method getColor.
private Color getColor(Object element, boolean forground) {
IWorkbenchAdapter2 adapter = getAdapter2(element);
if (adapter == null) {
return null;
}
RGB descriptor = forground ? adapter.getForeground(element) : adapter.getBackground(element);
if (descriptor == null) {
return null;
}
return (Color) getResourceManager().get(ColorDescriptor.createFrom(descriptor));
}
use of org.eclipse.ui.model.IWorkbenchAdapter2 in project translationstudio8 by heartsome.
the class WorkbenchLabelProvider method getFont.
/*
* (non-Javadoc)
*
* @see org.eclipse.jface.viewers.IFontProvider#getFont(java.lang.Object)
*/
public Font getFont(Object element) {
IWorkbenchAdapter2 adapter = getAdapter2(element);
if (adapter == null) {
return null;
}
FontData descriptor = adapter.getFont(element);
if (descriptor == null) {
return null;
}
return (Font) getResourceManager().get(FontDescriptor.createFrom(descriptor));
}
Aggregations