• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java IItemColorProvider类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了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;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java StanfordPosTagger类代码示例发布时间:2022-05-22
下一篇:
Java IdUserGroup类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap