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

5.18. Summary

In this chapter, you learned about the class Display. This class has a rather large API devoted to many different operating system tasks. Two very complex and interrelated topics, the event loop and threading, were discussed in detail. The key point to remember from this discussion is that SWT is apartment-threaded, serializing access to the user interface through the methods syncExec() and asyncExec(). Runnables, queued by these two methods, are executed in the event loop when the user interface thread is idle. Timers were also introduced as another mechanism to queue work.

Much of the rest of the chapter dealt with miscellaneous API whose general theme was “one per application.” For example, there is one list of monitors, one primary monitor, one list of Shells, one active Shell, one focus control, one cursor location, and so on. By studying dismissal alignment and coordinate mapping and mirroring, then using the code patterns described in those sections, your application will behave properly on platforms that are sensitive to these issues.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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