GEF企业应用开发之--基本原理一
2011-04-23 11:46
246 查看
Before getting start, you must learn something about Draw2d and GEF.
如果有SWT/JFace开发经验,那么可以把Draw2d 和SWT/JFace看成等同的图形显示的实现方式。Draw2d其实很简单,就是一个java的图形显示。
上图就是用Draw2d绘制的GEF显示图形,利用Draw2d提供的布局方式(与SWT的布局方式类似)和组件,可以构建出更加复杂的界面组件。
1. [/b]Facilitate the display of any model graphically using draw2d figures[/b]
2. [/b]Support interactions from mouse, keyboard, or the Workbench[/b]
3. [/b]Provide common components related to the above[/b]
The diagram below shows a high-level view of GEF. GEF can be loosely defined as the region in the middle. The framework provides the link between an application's model and view. It also provides input handlers, such as tools and actions, that turn events into requests. Requests and Commands are used to encapsulate interactions and their effects on the model.
GEF是个基于MVC的图形编辑框架。GEF负责处理用户请求并把处理结果以图形化的方式返回给用户。So, 就这么简单。
从上图中可以看出,要构建一个GEF应用,须构建Model,Controller,View三部分。本文的以下部分将结合泊位管理的需求,阐述MVC各部分的开发。
1.1.1 What is Draw2d
Draw2d is a lightweight toolkit of graphical components called figures. Lightweight means that a figure is simply a java object, with no corresponding resource in the operating system. Figures can be composed via a parent-child relationship. Every figure has a rectangular bounds inside which it, and its children, paint.如果有SWT/JFace开发经验,那么可以把Draw2d 和SWT/JFace看成等同的图形显示的实现方式。Draw2d其实很简单,就是一个java的图形显示。
上图就是用Draw2d绘制的GEF显示图形,利用Draw2d提供的布局方式(与SWT的布局方式类似)和组件,可以构建出更加复杂的界面组件。
1.1.2 What is GEF
Draw2d focuses on efficient painting and layout of figures. The GEF plug-in adds editing on top of Draw2d. The purpose of this framework is to:1. [/b]Facilitate the display of any model graphically using draw2d figures[/b]
2. [/b]Support interactions from mouse, keyboard, or the Workbench[/b]
3. [/b]Provide common components related to the above[/b]
The diagram below shows a high-level view of GEF. GEF can be loosely defined as the region in the middle. The framework provides the link between an application's model and view. It also provides input handlers, such as tools and actions, that turn events into requests. Requests and Commands are used to encapsulate interactions and their effects on the model.
GEF是个基于MVC的图形编辑框架。GEF负责处理用户请求并把处理结果以图形化的方式返回给用户。So, 就这么简单。
从上图中可以看出,要构建一个GEF应用,须构建Model,Controller,View三部分。本文的以下部分将结合泊位管理的需求,阐述MVC各部分的开发。
相关文章推荐
- GEF企业应用开发之--基本原理二
- GEF企业应用开发之--Introducing
- GEF企业应用开发之--Getting Start
- GEF企业应用开发之--辅助功能
- GEF企业应用开发之--企业应用支持
- GEF企业应用开发之--Summary
- 精通Spring 2.x —— 企业应用开发详解
- Node.js企业开发: 二应用开发
- 《精通Spring4.X企业应用开发实战》读后感第七章(创建增强类)
- 企业应用开发平台-GAP平台
- 学习《spring 3.x企业应用开发实战》之Spring容器高级主题
- 微软企业应用开发三大方向:跨平台、开放/开源与DevOps
- OSGI企业应用开发(十一)Bundle资源获取途径
- 《精通Spring4.X企业应用开发实战》读后感第五章(方法注入)
- 《精通Spring4.X企业应用开发实战》读后感第五章(FactoryBean)
- 企业应用开发面临的问题以及思考
- 消费应用开发难赚钱?做个企业app store吧
- WPF 基础到企业应用系列3——WPF开发漫谈
- Spring 2企业应用开发
- Flex企业应用开发实践学习笔记(八)——Flex on Java企业应用架构