8/14
setBounds
setBounds(int x,int y,int width,int height);
用于设置窗口尺寸和位置;
(1)x, y 参数分别对应窗口的x, y 坐标,可改变值选择显示在屏幕上的位置;
(2)width, height 参数分别对应窗口的宽度和高度;
事件的e.doit属性
e.doit:是否执行该事件
API中的定义:
boolean doit
depending on the event, a flag indicating whether the operation should be allowed.
doit依赖于event(事件),是一个指示操作是否被允许的标志。
当doit值为true时为允许,反之则不被允许。在上面的代码中,doit为true的时候,就被允许执行
text.addKeyListener(new KeyListener() {
public void keyReleased(KeyEvent e) {
// TODO Auto-generated method stub
}
public void keyPressed(KeyEvent e) {
if(e.keyCode == SWT.CR){
//让按键原有的功能失效
e.doit = false;
//执行你自己的事件
MessageBox box = new MessageBox(new Shell(), SWT.ICON_INFORMATION | SWT.OK);
box.setText("Hello!");
box.setMessage("按回车键了");
box.open();
}
}
});
原文链接:https://blog.csdn.net/cuser_online/article/details/6180116
#8/15
EMF
https://blog.csdn.net/hbzyaxiu520/article/details/7369756
https://www.cnblogs.com/jpcflyer/archive/2012/05/29/2517678.html
https://blog.csdn.net/kevingao/article/details/458994
https://jingyan.baidu.com/article/e3c78d642b5e527c4c85f5ca.html
view 视图的ID
https://niweiwei.iteye.com/blog/1327857
https://niweiwei.iteye.com/blog/1319389
https://zhidao.baidu.com/question/937253851338862412.html
https://www.helplib.com/Java_API_Classes/article_71995
http://www.docjar.com/html/api/org/eclipse/jdt/internal/ui/javaeditor/EditorUtility.java.html
8/16
EMF书籍下载
https://pan.baidu.com/s/1pJ44LeV?errno=0&errmsg=Auth%20Login%20Sucess&&bduss=&ssnerror=0&traceid=
https://download.csdn.net/download/qq_22111013/10434482