SWT Programming with Eclipse

8. Widgets

The SWT GUI objects derived from Widget and Control classes. The Widget object is the base class and defines methods common to all GUI classes. The Control class is the base class of all the windowed GUI classes, which means that the components derived from Control require a window or dialog to be displayed.

Menu objects also require a window to be displayed, but this requirement is indirectly satisfied. A Menu object requires a Control object.

8.1. Widget Events

Widget events are summarized in Table 3. For the sake of simplicity, the table contains only the event names. It is easy to figure out the name of an event class by using this <EventName>Event. Likewise, the name of the associated listener can be figured out by using <Listener Name>Listener. Each event does not have a matching adaptor class. For that reason, events having adaptors are marked in bold. The name of an adaptor can be figured out by using <EventName>Adaptor.Examples:Event Name is a Control, event class is a ControlEvent, listener class is a ControlListener, adaptor class is a ControlAdaptor.

Advertiser Disclosure:
Some of the products that appear on this site are from companies from which QuinStreet receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. QuinStreet does not include all companies or all types of products available in the marketplace.

Thanks for your registration, follow us on our social networks to keep up-to-date