直接通过反射让组建监听所有的SWT.xxx
Class userClass;
try {
userClass = Class.forName(SWT.class.getName());
//加载类
Field[] fields = userClass.getDeclaredFields();//获得对象方法集合
String fdname = null;
for (final Field field : fields) {// 遍历该数组
field.setAccessible(true);
fdname = field.getName();
if (true) {
try {
Integer value = (Integer) field.get(userClass);
this.addListener(value, new Listener() {
@Override
public void handleEvent(Event event) {
System.err.println("group---->>" + field.getName());
}
});
}
catch (Exception e) {
System.out.println(fdname + " is char");
}
}
}
}
catch (ClassNotFoundException e1) {
e1.printStackTrace();
}
catch (IllegalArgumentException e) {
e.printStackTrace();
}
分享到:
相关推荐
sqlexplorer_rcp-3.6.1.win32.win32.x86.zip
rcp org.eclipse.ui.newWizards扩展点例子,模仿新建java项目
SWT对用户操作的响应,比如鼠标或键盘事件,也是采用了AWT和SWING中的Observer模式,在*.event包中可以找到事件监听的Listener接口和相应的事件对象,例如常用的鼠标事件监听接口MouseListener,MouseMoveListener和...
[基于Eclipse.RCP的复合应用开发].扈晓炜等.pdf .
用于 eclipse 的JFace编程,解压它,然后对它eclipse/plugins下的所有文件构造路径
[基于Eclipse.RCP的复合应用开发].扈晓炜等.扫描版
索尼 sony rcp 1500 中文操作手册,非常好,是中文的,希望大家多多下载 谢谢谢谢,让我多赚些积分
[Eclipse.RCP深入浅出].Jeff.McAffer等.扫描版.pdf 还有其他两本在我的资源分享页面.
The.Definitive.Guide.to.SWT.and.JFace.eBook-LiB [SWT/JFace开发指南]
从零开始让你学会如何创建RCP富客户插件.
org.eclipse.equinox.p2.examples.rcp.prestartupdate.rarorg.eclipse.equinox.p2.examples.rcp.prestartupdate.rarorg.eclipse.equinox.p2.examples.rcp.prestartupdate.rar org.eclipse.equinox.p2.examples.rcp....
Eclipse IDE for RCP and RAP Developers(eclipse-rcp-2022-06-R-linux-gtk-x86_64.tar.gz) 适用于Linux x86_64: A complete set of tools for developers who want to create Eclipse plug-ins, Rich Client ...
IAI RCP4系列机械手手册pdf,IAI RCP4系列机械手手册
JAVA CS SWT RCP 在线升级 自动更新 源码.rar 解压就能看见源码 然后直接用eclipse 导入 就OK啦!
Eclipse+RCP框架分析和应用研究
CAC_RCP1-1969.REV4-2003_食品卫生通用规范[1][参照].pdf
SWT RCP 界面--如何编写一个漂亮的 SWT RCP 界面
org.eclipse.equinox.p2.examples.rcp.cloud.rarorg.eclipse.equinox.p2.examples.rcp.cloud.rarorg.eclipse.equinox.p2.examples.rcp.cloud.rar
IAI 防尘防滴对应型-RCP2W电缸手册pdf,IAI 防尘防滴对应型-RCP2W电缸手册