-
Notifications
You must be signed in to change notification settings - Fork 5
Shell Tutorial
Shell在前面的章节中已经经常出现,想你也不太陌生了,它就是用来创建窗口的。在这里主要讲讲Shell的不同类型的style。
1. SWT.NO_TRIM:没有任何装饰的窗口,如标题栏,边框等。

2. SWT.CLOSE:有标题栏和边框的窗口,并且在右上角有一个关闭按钮。

3. SWT.TITLE:有标题栏和边框的窗口,能设置标题。

4. SWT.MIN:有标题栏和边框的窗口,有最小化,最大化(不可用)和关闭的按钮。

5. SWT.MAX:有标题栏和边框的窗口,有最小化(不可用),最大化和关闭的按钮。

6. SWT.BORDER:有普通边框的窗口。

7. SWT.RESIZE:有边框的窗口,窗口可以调整大小。

8. SWT.ON_TOP:窗口在所有窗口的最上面,且任务栏上没有图标,与Menu类似。

9. SWT.TOOL:有普通边框(各边的线宽为1个像素)的窗口。

10. SWT.SHEET:标题栏,边框都有的完整的窗口。

11. SWT.SHELL_TRIM:相当于SWT.CLOSE | SWT.TITLE | SWT.MIN | SWT.MAX | SWT.RESIZE。

12. SWT.DIALOG_TRIM:相当于SWT.TITLE | SWT.CLOSE | SWT.BORDER。

-
SWT.MODELESS:
相对自由的窗口,所有的Shell之间不会锁死。默认为此。 -
SWT.PRIMARY_MODAL:
当前创建的Shell会把父Shell中创建的所有Shell锁死,只有当前的Shell关闭之后,其它的才能用。 -
SWT.APPLICATION_MODAL:
当前的Shell会把当前Display上所有的Shell都锁死。 -
SWT.SYSTEM_MODAL:
当前的Shell会把所有Display上的Shell都锁死。
注意:Modality Style的级别从上往下一个比一个高,但是不是所有的系统都支持这些特性。
参考资料:
上一篇:Components Tutorial 下一篇:Display Tutorial
Soyatec Eclipse Plug-in and RCP Tutorials, wrote by Jin Liu (jin.liu@soyatec.com).
Eclipse Plug-in Development Tutorial
-
Standard Widget Toolkit Tutorial
-
Widgets Tutorial
- Label Tutorial
- Button Tutorial
- Text Tutorial
- Combo Tutorial
- List Tutorial
- Scale Tutorial
- Slider Tutorial
- Spinner Tutorial
- DateTime Tutorial
- Table Tutorial
- Tree Tutorial
- ToolBar Tutorial
- CoolBar Tutorial
- ProgressBar Tutorial
- ScrollBar Tutorial
- TaskBar Tutorial
- ExpandBar Tutorial
- Menu Tutorial
- Sash Tutorial
- ToolTip Tutorial
- Tray Tutorial
- Link Tutorial
- Browser Tutorial
- Dialog Tutorial
- Common Properties Tutorial
- Components Tutorial
- Shell Tutorial
- Display Tutorial
- SWT Custom Widgets Tutorial
- Drag and Drop Tutorial
- Layouts Tutorial
- Resource Management Tutorial
-
Widgets Tutorial
-
[JFace Tutorial] (https://github.com/ecsoya/eclipse.tutorial/wiki/JFace-Tutorial)
- [JFace Viewers Tutorial] (https://github.com/ecsoya/eclipse.tutorial/wiki/JFace-Viewers-Tutorial)
- [TableViewer Tutorial] (https://github.com/ecsoya/eclipse.tutorial/wiki/TableViewer-Tutorial)
- [TreeViewer Tutorial] (https://github.com/ecsoya/eclipse.tutorial/wiki/TreeViewer-Tutorial)
- [ListViewer Tutorial] (https://github.com/ecsoya/eclipse.tutorial/wiki/ListViewer-Tutorial)
- [ComboViewer Tutorial] (https://github.com/ecsoya/eclipse.tutorial/wiki/ComboViewer-Tutorial)
- [JFace Dialogs Tutorial] (https://github.com/ecsoya/eclipse.tutorial/wiki/JFace-Dialogs-Tutorial)
- [JFace DataBinding Tutorial] (https://github.com/ecsoya/eclipse.tutorial/wiki/JFace-DataBinding-Tutorial)
- [JFace Viewers Tutorial] (https://github.com/ecsoya/eclipse.tutorial/wiki/JFace-Viewers-Tutorial)
-
[Plug-in Development Tutorial] (https://github.com/ecsoya/eclipse.tutorial/wiki/Plug-in-Development-Tutorial)
- [Views Tutorial] (https://github.com/ecsoya/eclipse.tutorial/wiki/Views-Tutorial)
- [Editors Tutorial] (https://github.com/ecsoya/eclipse.tutorial/wiki/Editors-Tutorial)
- [Action and Menus Tutorial] (https://github.com/ecsoya/eclipse.tutorial/wiki/Action-and-Menus-Tutorial)
- [Preferences Tutorial] (https://github.com/ecsoya/eclipse.tutorial/wiki/Preferences-Tutorial)
- [ExtensionPoint Tutorial] (https://github.com/ecsoya/eclipse.tutorial/wiki/ExtensionPoint-Tutorial)
- [Publish Tutorial] (https://github.com/ecsoya/eclipse.tutorial/wiki/Publish-Tutorial)
- [Feature Project Tutorial] (https://github.com/ecsoya/eclipse.tutorial/wiki/Feature-Project-Tutorial)
- [UpdateSite Project Tutorial] (https://github.com/ecsoya/eclipse.tutorial/wiki/UpdateSite-Project-Tutorial)
- [Fragment Project Tutorial] (https://github.com/ecsoya/eclipse.tutorial/wiki/Fragment-Project-Tutorial)
-
[Eclipse 3.x RCP Tutorial] (https://github.com/ecsoya/eclipse.tutorial/wiki/Eclipse-3.x-RCP-Tutorial)
- [Branding Tutorial] (https://github.com/ecsoya/eclipse.tutorial/wiki/Branding-Tutorial)
- [Publish RCP Tutorial] (https://github.com/ecsoya/eclipse.tutorial/wiki/Publish-RCP-Tutorial)
-
[Graphical Editing Framework Tutorial] (https://github.com/ecsoya/eclipse.tutorial/wiki/GEF-Tutorial)