一、model 与 Adapter 关联
EMF 的 LabelProvider 为 new AdapterFactoryContentProvider(ComposedAdapterFactory adapterFactory)
1. 当LabelProvider getText(Object object) 时
会调用 adapterFactory.adapt(object, IItemLabelProviderClass) 取得 实际的LabelProvider text
2. 调用 ComposeAdapaterFActory 的 adap(Notifier target, Object type, boolean isNew)
3. 调用XXXItemProviderAdapterFactory 的 adapt(Nodtifier notifier, Object type)
4. 调用AdatperFactoryImpl.adapt(Nodtifier target, Object type) type为: ShopItemProviderAdapterFactory
4.1 由ShopItemProviderAdapterFactory 分派到指定的XXXItemProvider
4.2 将创建的Adatper(相当于监听器) 注入到 target
二、 更改model property, 通知对应的查看器发生变化.
1. IPropertySource 调用 setPropertyValue(Object propertyId, Object value)
1.1 IitemPropertySource.getPropertyDescriptor(object, propertyId) 得到 IItemPropertyDescriptor
2. 调用 IItemPropertyDescriptor.setPropertyValue(Object object, Object value)
2.1 调用SetCommmand.create(), 创建SetCommand
2.2 EditingDomain editingDomain = getEditingDomain(object);
2.3 CommandStack commandStatck = getCommandStack();
2.4 commmandStack.execute(setcommand): 保存历史记录, 并能够撤销,
3. 调用Model.setXXX()
3.1 将对应的属性改变
3.2 通知对应的查看器(就是一部分注册的监听器) 做出改变
分享到:
相关推荐
EMF学习完整教程,EMF: Eclipse Modeling Framework Second Edition
EMF 自学笔记
分析EMF文件结构的工具,包含源代码。对于EMF文件的编码操作有很高的知道作用
emf文件是windows的一种打印格式,该资源可以对emf文件进行文本提取和推送打印机打印以及转换成图像
EMF读取XML
包含3个文件: 微软emf文件格式详解.pdf emf.hlp (Enhanced Metafiles in Win32) emfexplorer_src.zip
emf和wmf文件的互转,有源码,供大家学习,交流!
emf转bmpemf
矢量格式转换程序,基于JAVA实现的SVG转EMF的的示例代码,下载后导入到eclipse即可运行。
This is the API specification of the FreeHEP VectorGraphics package for converting emf to svg.
EMF图片转为JPG/PNG 需安装GraphicsMagick 提供实例代码
基于Eclipse的模型框架 它是Eclipse MDA(Model Driven Architecture)的一个重要组成部分 是Eclipse中许多项目的基础 e g GEF EMF可以将模型转换成高效的 正确的 和易于定制的Java代码
文件格式 EMF (Enhanced MetaFile) ——是在印刷工业中应用与Windows操作系统的文件格式。实际上EMF是原始WMF(Windows metafile)格式的32位版本。EMF格式的产生是为了解决WMF在印刷行业中的不足。EMF是设备独立性...
使用freehep将EMF转换为png,项目下载导入eclipse即可运行。
eclipse插件, EMF api 文档,eclipse插件, EMF api 文档
EMF和BMP文件格式的相互转换:BOOL CConvertEMFToBMP::ConvertBMPToEMF(const char*pszBMPFile,const char* pszEMFFile)
\EMF,用于eclipse实现可视化 的插件
EMF图片转PNG图片
遍历emf 文件里面的位图,并进行抗锯齿处理
微软的EMF specification,研究EMF文件格式必读。