• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 2. SWT Shells > Working with Shell Styles

2.3. Working with Shell Styles

Windows come in all types, shapes, and sizes. Some have titlebars, some don't. Some have minimize, maximize, and close buttons, and some don't. You need some way to control the appearance of windows, and with the SWT Shell class, you do that by using a second constructor that enables you to pass a style— an integer value the class uses to determine what attributes to show or hide.

2.3.1. How do I do that?

To specify a style for a shell, the SWT provides us with a set of enumerated values encapsulated in another class called SWT. The SWT class is located in the org.eclipse.swt package. For shells, the enumerated values are BORDER , CLOSE, MIN, MAX, NO_TRIM, RESIZE, and TITLE. Also, two convenience values—SHELL_TRIM and DIALOG_TRIMcombine several of the style attributes to create two common looks for windows.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint