类型扩展机制是一种能将任意一种类型的功能和职责动态地添加到指定类型的机制,通过使用该机制,系统将富有极大的弹性和扩展性。在Eclipse中,类型扩展机制的核心是IAdaptable接口,如果一个类型实现了这个接口,它便可以获取到任何存在于系统中的其他类型的实例,通过操纵这些实例从而间接扩展了原类型。IAdaptable接口配合工厂方法,注册管理机制,平台对象形成了Eclipse 独有的强大而易用的类型扩展机制。
- 19:42
- 浏览 (80)
- 评论 (0)
GC gc = new GC(Display.getDefault());
org.eclipse.swt.graphics.Point size = gc.stringExtent("TableHeader");
gc.dispose();
- 17:29
- 浏览 (79)
- 评论 (0)
public class BaseReportFigure extends Figure {
//这个方法表示这个figure上的孩子将使用相对坐标
protected boolean useLocalCoordinates() {
return true;
}
}
public Command getCommand(Request request) {
Command command = super.getCommand(request);
if (command!=null &&
request.getType().equals(R ...
- 11:50
- 浏览 (110)
- 评论 (0)
1 英吋(in) = 2.54 公分 = 0.083 英尺
1 inch (in) = 2.54 centimeters = 0.083 foot
- 14:22
- 浏览 (95)
- 评论 (0)
[转自http://www.blogjava.net/Hexise/archive/2006/12/29/90703.html]
通过图像的相对路径创建org.eclipse.swt.graphics.Image,我通常使用下面两种途径:
1.使用Image(Device device, InputStream stream)构造函数,示例代码如下, path为图像相对路径:
private Image getImage(String path){
return new Image(Display.getCurrent(), getClass().getResourceAsStre ...
- 13:37
- 浏览 (139)
- 评论 (0)







评论排行榜