如何关闭一个view
来源:互联网 发布:手机号收集软件 编辑:程序博客网 时间:2024/06/05 17:27
Thiago
If you are as new to RCP as a newborn butt I advise you to take it slowly but with firm step.
RCP is very powerful, you can achieve very good apps but it is very complicated.
So, if you are really decided to learn RCP you should do a small investment and by some books.
I firmly recommend:
1. Designing Coding and Packaging Java Applications by Jeff McAffer - Jean Michel Lemieux.
This book teaches you a lot of stuff and gets you going on.
2. If you are new to SWT and JFace, this book is as a bible:
The Definitive Guide to SWT and JFace by Rob Warner - Robert Harris.
Now, comming back to your question, there are several situations and ways for closing a view:
1. Just use the 'X' in the vies tab.
2. Closing it from inside the view:
getViewSite().getPage().hideView(MyView.this);
where MyView is your views class name.
3. From outside the view.
3.1 If your view does not allow multiple instances:
IWorkbenchPage wbp = PlatformUI.getWorkbench()
getActiveWorkbenchWindow().getActivePage();
wbp.hideView(wbp.findView("myViewId"));
where myViewId is the id you assigned to the view.
3.2 If your view allows multiple instances:
IWorkbenchPage wbp = PlatformUI.getWorkbench()
getActiveWorkbenchWindow().getActivePage();
wbp.hideView(wbp.findViewReference("myViewId", "mySecondaryViewId"));
where myViewId is the id you assigned to the view and mySecondaryViewId is the secondary id assigned to the view when opened.
I hope this helps you.
AG
- 如何关闭一个view
- wpf mvvm ViewModel如何关闭view窗口
- 双核CPU如何关闭一个
- java如何关闭一个线程
- 如何关闭一个swingworker线程?
- Android如何平移一个View
- Linux命令如何关闭一个进程,如何关闭端口号
- 如何判断一个view 是否在另外一个view 范围内?
- WPF学习笔记:MVVM模式下,ViewModel如何关闭View?
- 如何关闭一个调出的程序
- 如何优雅地关闭一个socket
- 如何优雅地关闭一个socket
- 如何优雅地关闭一个socket
- 2.12--如何编程来关闭一个文档?
- 3.5如何编程来关闭一个视图?
- 3.7如何防止用户关闭一个视图?
- 如何优雅地关闭一个socket
- 如何优雅地关闭一个socket
- 开发Spring MVC应用程序(3-2)
- 筛法的应用
- 开发Spring MVC应用程序(3-3)
- 音序检索汉字之我见
- “英文简历常用词汇”大全(精)
- 如何关闭一个view
- 如何用C#做一个类似于桌面插件的程序
- Tomcat5 配置Servlet
- ASP.NET中如何调用存储过程
- JDBC学习笔记-----jdbc性能优化
- We Did It!
- 一步一步尝试在MFC下开发基于winpcap的数据包捕获和分析软件.(之一)
- Lucene,搜索领域的新贵族
- 深入浅出Win32多线程程序设计之基本概念