/**
* This implements {@link ITableColorProvider}.getBackground by forwarding it to an object that implements
* {@link ITableItemColorProvider#getBackground ITableItemColorProvider.getBackground}
* or failing that, an object that implements
* {@link IItemColorProvider#getBackground IItemColorProvider.getBackground}
* where the columnIndex is ignored.
*/
/**
* This implements {@link ITableColorProvider}.getForeground by forwarding it to an object that implements
* {@link ITableItemColorProvider#getForeground ITableItemColorProvider.getForeground}
* or failing that, an object that implements
* {@link IItemColorProvider#getForeground IItemColorProvider.getForeground}
* where the columnIndex is ignored.
*/
public Color [[#variable1725c1a0]](Object object, int columnIndex) {
// Get the adapter from the factory.
//
ITableItemColorProvider tableItemColorProvider = (ITableItemColorProvider) adapterFactory.adapt(object, ITableItemColorProviderClass);
// No color is a good default.
//
Color result = null;
// Now we could check that the adapter implements interface ITableItemColorProvider.
//
if (tableItemColorProvider != null) {
// And delegate the call.
//
result = getColorFromObject(tableItemColorProvider. [[#variable1725c1a0]](object, columnIndex));
}
// Otherwise, we could check that the adapter implements interface IItemColorProvider.
//
else {
IItemColorProvider itemColorProvider = (IItemColorProvider) adapterFactory.adapt(object, IItemColorProviderClass);
if (itemColorProvider != null) {
// And delegate the call.
//
result = getColorFromObject(itemColorProvider. [[#variable1725c1a0]](object));
}
}
return result;
}
|