/**
* This does the same thing as ITableColorProvider.getBackground.
*/
/**
* This does the same thing as ITableColorProvider.getForeground.
*/
public Object [[#variable172661c0]](Object object, int columnIndex) {
// Get the adapter from the factory.
//
ITableItemColorProvider tableItemColorProvider = (ITableItemColorProvider) adapterFactory.adapt(object, ITableItemColorProvider.class );
// No color is a good default.
//
Object result = null;
// Now we could check that the adapter implements interface ITableItemColorProvider.
//
if (tableItemColorProvider != null) {
// And delegate the call.
//
result = tableItemColorProvider. [[#variable172661c0]](object, columnIndex);
}
// Otherwise, we could check that the adapter implements interface IItemColorProvider.
//
else {
IItemColorProvider itemColorProvider = (IItemColorProvider) adapterFactory.adapt(object, IItemColorProvider.class );
if (itemColorProvider != null) {
// And delegate the call.
//
result = itemColorProvider. [[#variable172661c0]](object);
}
}
return result;
}
|