Chapter 4 Layout

Source: Internet
Author: User
Section 2 Layout)

Returned directory

 

The layout between the controls (controls in a composite) in composite and this composite provides them with a decoupling layer ). The layout is generally platform-independent, and the corresponding size (maintains relative sizing) is usually maintained when the parent form is changed ). You can use the setlayout () method of composite to set the composite layout.

All available layout classes are in org. Eclipse. SWT. Widgets. layout. It is an abstract class, and there is no implementation (so it is in the widgets package, not the layout package -- in this way, it is a composite control with it in the same package, you can call the protected method of the layout class ). The layout class does not have a public API. Therefore, the layout class is created and associated with a composite object, so that the SWT framework (SWT framework) can call necessary methods to use the layout.

Although a composite control can only have one layout, you can create multiple composite controls in a form, each with its own layout. In addition, composite controls can be nested in [1]. Because each composite control has a layout object independent of other composite controls, you can use any number of layout classes in the same form to achieve the overall layout you want.

[1]: the control in the composite control can be another composite control.

 

Returned directory

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.