本文整理汇总了Java中org.eclipse.emf.edit.provider.IItemColorProvider类的典型用法代码示例。如果您正苦于以下问题:Java IItemColorProvider类的具体用法?Java IItemColorProvider怎么用?Java IItemColorProvider使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IItemColorProvider类属于org.eclipse.emf.edit.provider包,在下文中一共展示了IItemColorProvider类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: getImage
import org.eclipse.emf.edit.provider.IItemColorProvider; //导入依赖的package包/类
@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;
}
开发者ID:nasa,项目名称:OpenSPIFe,代码行数:18,代码来源:DictionaryLabelProvider.java
示例2: getBackgroundRGB
import org.eclipse.emf.edit.provider.IItemColorProvider; //导入依赖的package包/类
/**
* 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;
}
开发者ID:nasa,项目名称:OpenSPIFe,代码行数:23,代码来源:EPlanElementLabelProvider.java
示例3: BtsviewmodelItemProviderAdapterFactory
import org.eclipse.emf.edit.provider.IItemColorProvider; //导入依赖的package包/类
/**
* 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);
}
开发者ID:cplutte,项目名称:bts,代码行数:21,代码来源:BtsviewmodelItemProviderAdapterFactory.java
示例4: BtsmodelItemProviderAdapterFactory
import org.eclipse.emf.edit.provider.IItemColorProvider; //导入依赖的package包/类
/**
* 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);
}
开发者ID:cplutte,项目名称:bts,代码行数:20,代码来源:BtsmodelItemProviderAdapterFactory.java
示例5: BtsCorpusModelItemProviderAdapterFactory
import org.eclipse.emf.edit.provider.IItemColorProvider; //导入依赖的package包/类
/**
* 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);
}
开发者ID:cplutte,项目名称:bts,代码行数:20,代码来源:BtsCorpusModelItemProviderAdapterFactory.java
示例6: createFigure
import org.eclipse.emf.edit.provider.IItemColorProvider; //导入依赖的package包/类
@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;
}
开发者ID:nasa,项目名称:OpenSPIFe,代码行数:13,代码来源:EMFTimelineNodeEditPart.java
示例7: PlanItemProviderAdapterFactory
import org.eclipse.emf.edit.provider.IItemColorProvider; //导入依赖的package包/类
/**
* 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);
}
开发者ID:nasa,项目名称:OpenSPIFe,代码行数:19,代码来源:PlanItemProviderAdapterFactory.java
示例8: ClickWatchModelItemProviderAdapterFactory
import org.eclipse.emf.edit.provider.IItemColorProvider; //导入依赖的package包/类
/**
* 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);
}
开发者ID:markus1978,项目名称:clickwatch,代码行数:15,代码来源:ClickWatchModelItemProviderAdapterFactory.java
示例9: EmfFragItemProviderAdapterFactory
import org.eclipse.emf.edit.provider.IItemColorProvider; //导入依赖的package包/类
/**
* 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);
}
开发者ID:markus1978,项目名称:emf-fragments,代码行数:15,代码来源:EmfFragItemProviderAdapterFactory.java
示例10: WaqtSalatItemProviderAdapterFactory
import org.eclipse.emf.edit.provider.IItemColorProvider; //导入依赖的package包/类
/**
* 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);
}
开发者ID:paissad,项目名称:waqtsalat-eclipse-plugin,代码行数:18,代码来源:WaqtSalatItemProviderAdapterFactory.java
示例11: LocationsProviderItemProviderAdapterFactory
import org.eclipse.emf.edit.provider.IItemColorProvider; //导入依赖的package包/类
/**
* 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);
}
开发者ID:paissad,项目名称:waqtsalat-eclipse-plugin,代码行数:18,代码来源:LocationsProviderItemProviderAdapterFactory.java
注:本文中的org.eclipse.emf.edit.provider.IItemColorProvider类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论