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

Chapter 5. Display > Application Data

5.15. Application Data

Displays support setting and getting both named and unnamed data in the same manner as widgets, using the getData() and setData() methods (see the Application Data section of the Widget Fundamentals chapter). For a typical application, these methods are less useful than their equivalent widget counterparts. Because there is only one display, the extra information that needs to be remembered can be stored anywhere. However, in large applications, where a framework of information about the display is created by one component and accessed by several others, it may make sense to use these methods to annotate the display.

5.15.1. Dismissal Alignment

On some platforms, such as Windows, in a dialog that contains both OK and Cancel buttons, the user interface guidelines specify that the OK button should be on the left. On other platforms, such as GTK and Mac OS X, the OK button is supposed to be on the right.[11] For native dialogs on these platforms, the implementations enforce the rules. For user-created dialogs, you would have to either write platform-specific code or have SWT provide a hint to indicate what the right order is in order to follow the guidelines.

[11] For bidirectional locales, where the dialog layouts are flipped left to right, the buttons also switch positions, as you would expect.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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