没有合适的资源?快使用搜索试试~ 我知道了~
Rich Client Tutorial Part 2
需积分: 3 20 下载量 120 浏览量
2007-11-19
09:43:54
上传
评论
收藏 149KB PDF 举报
温馨提示
试读
10页
The Rich Client Platform (RCP) is an exciting new way to build Java applications that can compete with<br>native applications on any platform. This tutorial is designed to get you started building RCP applications<br>quickly. It has been updated for Eclipse 3.1.2
资源推荐
资源详情
资源评论
Copyright © 2004-2006 Ed Burnette.
Rich Client Tutorial Part 2
The Rich Client Platform (RCP) allows you to build Java applications that can compete with native
applications on any platform. Part 1 of the tutorial introduced you to the platform and the steps used to build
the smallest possible RCP program. In part 2 we'll look at what we did in more detail and introduce some of
the configuration classes that let you take control of much of the layout and functionality of an RCP
application. This part has been updated for Eclipse 3.1.2
By Ed Burnette, SAS
August 9, 2004
Updated for 3.1.2:
February 6, 2006
Introduction
In early versions of Eclipse, many functions of the IDE were hard-wired into the code. These included the
name and location of the File menu, the title of the Workbench Window, and the existence of the status bar.
This was fine for the IDE but when people started to use Eclipse as a basis for non-IDE programs,
sometimes these things didn't make sense. Although all the source code was provided, it was inconvenient
to find the right places that had to be changed.
So, beginning in Eclipse 3.0, the designers refactored the API to make these and other hard-wired aspects
of the user interface controllable through public API. Subsequent releases have fine tuned that API and
provided tooling in the Plug-in Development Environment (PDE) to lower the barriers to getting started using
it. However, you'll eventually need to look behind the PDE wizards and editors to really understand what is
going on.
In this part we'll examine the code and configuration files created in Part 1 of the tutorial. To keep the parts
separate I've recreated the examples for each part under a different name. All the sample code for Part 2
may be found in the part2.zip archive file
.
If you're following along with this tutorial in Eclipse and you're thinking of just renaming your old
project, I don't recommend it. In Eclipse 3.1, Refactor > Rename does not work well on plug-in projects due
to all the internal references in XML files and strings that don't participate. Hopefully this will be fixed in a
future release.
Before we go any further let's clear up some possible confusion about the relationship between
Applications, Workbenches, and Workbench Windows.
Applications, Workbenches, and Workbench Windows
The Application is a class you create that acts as your RCP program's main routine. You can think of it as
the controller for the program. Just like the controller in a Model2 architecture, it is short and sweet and
doesn't change significantly for different projects. All it does is create a Workbench and attach another class
called a Workbench Advisor to it (Workbench Advisors will be covered more later).
The Workbench is declared and maintained for you as part of the RCP framework. There is only one
Workbench but it can have more than one visible top-level Workbench Window. For example, in the Eclipse
Eclipse Article
页码,1/10Rich Client Platform
2004-10-24http://www.eclipse.org/articles/Article-RCP-2/tutorial2.html
资源评论
cellcomcn
- 粉丝: 0
- 资源: 15
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功