Java 类org.eclipse.emf.edit.provider.IItemColorProvider 实例源码

项目:OpenSPIFe    文件:DictionaryLabelProvider.java   
@Override
public Image getImage(Object object) {
    // Get the adapters from the factory.
    //
    IItemLabelProvider itemLabelProvider = (IItemLabelProvider) adapterFactory.adapt(object, IItemLabelProvider.class);
    IItemColorProvider itemColorProvider = (IItemColorProvider) adapterFactory.adapt(object, IItemColorProvider.class);

    Image image = itemLabelProvider != null ? getImageFromObject(itemLabelProvider.getImage(object)) : getDefaultImage(object);

    if (itemColorProvider != null) {
        RGB rgb = (RGB) itemColorProvider.getBackground(object);
        if (rgb != null) {
            return getImageOverlay(image, rgb);
        }
    }
    return image;
}
项目:OpenSPIFe    文件:EPlanElementLabelProvider.java   
/**
 * Return the background RGB value for the given object.
 * @param object
 * @return an RGB color descriptor
 */
private RGB getBackgroundRGB(Object object) {
    try {
        if (MissionExtender.hasMissionSpecificClass(ItemColorProvider.class)) {
            ItemColorProvider provider = MissionExtender.construct(ItemColorProvider.class);
            RGB background = (RGB) provider.getBackground(object);
            if (background != null) {
                return background;
            }
        }
    } catch (ConstructionException e) {
        LogUtil.error(e);
    }
    IItemColorProvider itemColorProvider = getAdapter(object, IItemColorProvider.class);
    RGB backgroundColor = (itemColorProvider != null)
        ? (RGB)itemColorProvider.getBackground(object) : null;
    return backgroundColor;
}
项目:bts    文件:BtsviewmodelItemProviderAdapterFactory.java   
/**
 * This constructs an instance.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public BtsviewmodelItemProviderAdapterFactory()
{
    supportedTypes.add(IEditingDomainItemProvider.class);
    supportedTypes.add(IStructuredItemContentProvider.class);
    supportedTypes.add(ITreeItemContentProvider.class);
    supportedTypes.add(IItemLabelProvider.class);
    supportedTypes.add(IItemPropertySource.class);
    supportedTypes.add(ITableItemLabelProvider.class);
    supportedTypes.add(ITableItemColorProvider.class);
    supportedTypes.add(ITableItemFontProvider.class);
    supportedTypes.add(IItemColorProvider.class);
    supportedTypes.add(IItemFontProvider.class);
    supportedTypes.add(IItemStyledLabelProvider.class);
}
项目:bts    文件:BtsmodelItemProviderAdapterFactory.java   
/**
 * This constructs an instance.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public BtsmodelItemProviderAdapterFactory() {
    supportedTypes.add(IEditingDomainItemProvider.class);
    supportedTypes.add(IStructuredItemContentProvider.class);
    supportedTypes.add(ITreeItemContentProvider.class);
    supportedTypes.add(IItemLabelProvider.class);
    supportedTypes.add(IItemPropertySource.class);
    supportedTypes.add(ITableItemLabelProvider.class);
    supportedTypes.add(ITableItemColorProvider.class);
    supportedTypes.add(ITableItemFontProvider.class);
    supportedTypes.add(IItemColorProvider.class);
    supportedTypes.add(IItemFontProvider.class);
    supportedTypes.add(IItemStyledLabelProvider.class);
}
项目:bts    文件:BtsCorpusModelItemProviderAdapterFactory.java   
/**
 * This constructs an instance.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public BtsCorpusModelItemProviderAdapterFactory() {
    supportedTypes.add(IEditingDomainItemProvider.class);
    supportedTypes.add(IStructuredItemContentProvider.class);
    supportedTypes.add(ITreeItemContentProvider.class);
    supportedTypes.add(IItemLabelProvider.class);
    supportedTypes.add(IItemPropertySource.class);
    supportedTypes.add(ITableItemLabelProvider.class);
    supportedTypes.add(ITableItemColorProvider.class);
    supportedTypes.add(ITableItemFontProvider.class);
    supportedTypes.add(IItemColorProvider.class);
    supportedTypes.add(IItemFontProvider.class);
    supportedTypes.add(IItemStyledLabelProvider.class);
}
项目:OpenSPIFe    文件:EMFTimelineNodeEditPart.java   
@Override
protected IFigure createFigure() {
    BarFigure figure = (BarFigure) super.createFigure();
    IItemColorProvider provider = EMFUtils.adapt(getModel(), IItemColorProvider.class);
    if (provider != null) {
        Color bg = (Color) provider.getBackground(getModel());
        if (bg != null) {
            figure.setNormalColorPalette(bg);
        }
    }
    return figure;
}
项目:OpenSPIFe    文件:PlanItemProviderAdapterFactory.java   
/**
 * This constructs an instance.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public PlanItemProviderAdapterFactory() {
    supportedTypes.add(IEditingDomainItemProvider.class);
    supportedTypes.add(IStructuredItemContentProvider.class);
    supportedTypes.add(ITreeItemContentProvider.class);
    supportedTypes.add(IItemLabelProvider.class);
    supportedTypes.add(IItemPropertySource.class);
    supportedTypes.add(ITableItemLabelProvider.class);
    supportedTypes.add(ITableItemColorProvider.class);
    supportedTypes.add(ITableItemFontProvider.class);
    supportedTypes.add(IItemColorProvider.class);
    supportedTypes.add(IItemFontProvider.class);
}
项目:clickwatch    文件:ClickWatchModelItemProviderAdapterFactory.java   
/**
 * This constructs an instance.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated NOT
 */
public ClickWatchModelItemProviderAdapterFactory() {
    supportedTypes.add(IEditingDomainItemProvider.class);
    supportedTypes.add(IStructuredItemContentProvider.class);
    supportedTypes.add(ITreeItemContentProvider.class);
    supportedTypes.add(IItemLabelProvider.class);
    supportedTypes.add(IItemColorProvider.class);
    supportedTypes.add(IItemPropertySource.class);
}
项目:emf-fragments    文件:EmfFragItemProviderAdapterFactory.java   
/**
 * This constructs an instance.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public EmfFragItemProviderAdapterFactory() {
    supportedTypes.add(IEditingDomainItemProvider.class);
    supportedTypes.add(IStructuredItemContentProvider.class);
    supportedTypes.add(ITreeItemContentProvider.class);
    supportedTypes.add(IItemLabelProvider.class);
    supportedTypes.add(IItemPropertySource.class);
    supportedTypes.add(IItemColorProvider.class);
}
项目:waqtsalat-eclipse-plugin    文件:WaqtSalatItemProviderAdapterFactory.java   
/**
 * This constructs an instance. <!-- begin-user-doc --> <!-- end-user-doc -->
 * 
 * @generated
 */
public WaqtSalatItemProviderAdapterFactory() {
    supportedTypes.add(IEditingDomainItemProvider.class);
    supportedTypes.add(IStructuredItemContentProvider.class);
    supportedTypes.add(ITreeItemContentProvider.class);
    supportedTypes.add(IItemLabelProvider.class);
    supportedTypes.add(IItemPropertySource.class);
    supportedTypes.add(ITableItemLabelProvider.class);
    supportedTypes.add(ITableItemColorProvider.class);
    supportedTypes.add(ITableItemFontProvider.class);
    supportedTypes.add(IItemColorProvider.class);
    supportedTypes.add(IItemFontProvider.class);
}
项目:waqtsalat-eclipse-plugin    文件:LocationsProviderItemProviderAdapterFactory.java   
/**
 * This constructs an instance. <!-- begin-user-doc --> <!-- end-user-doc -->
 * 
 * @generated
 */
public LocationsProviderItemProviderAdapterFactory() {
    supportedTypes.add(IEditingDomainItemProvider.class);
    supportedTypes.add(IStructuredItemContentProvider.class);
    supportedTypes.add(ITreeItemContentProvider.class);
    supportedTypes.add(IItemLabelProvider.class);
    supportedTypes.add(IItemPropertySource.class);
    supportedTypes.add(ITableItemLabelProvider.class);
    supportedTypes.add(ITableItemColorProvider.class);
    supportedTypes.add(ITableItemFontProvider.class);
    supportedTypes.add(IItemColorProvider.class);
    supportedTypes.add(IItemFontProvider.class);
}