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

4.2. Client Area

The client area of a Composite, List, or Text control[3] is a rectangle that describes the area within which content may be drawn. In this context, the term client refers to you, the programmer, viewed as a client of services offered by the control, so the client area is the area that you “own.” Essentially, it is the area that is not covered by those parts of the control bounds that are considered to be “trimmings” such as borders, scroll bars, and the menu bar.[4] Areas outside of the client area are off limits. Figure 4.2 shows the bounds and client area of a group box.

[3] As of R3.0, client area is defined only for Composite, List, and Text controls but the concept is general enough to be applied to all Control subclasses. It is possible that future versions of SWT will address this issue by moving the client area API to class Control, which is why we are discussing it here.

[4] Both the need for a client area concept and the fact that the menu bar is considered part of the trimmings come from constraints imposed by Microsoft Windows. Modeling them explicitly in SWT was the only effective way to deal with them.

Figure 4.2. The bounds and client area of a group box.



PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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