Gwt-ext Experience Tour, part 3rd: Experience layout and tree

Source: Internet
Author: User

Gwt-ext is a powerful Web development control library based on Google Web Toolkit (GWT) and ExtJs. It is ideal for fast development of rich Internet applications in the pure Java language. This series of articles will detail the basic structure and features of Gwt-ext, and demonstrate the implementation of the technology through code examples.

Layout Layout

(1) Horizontal layout

Horizontal layout causes all child objects in the parent container panel to be sorted sequentially along the same horizontal line.

The horizontal layout needs to implement the Com.gwtext.client.widgets.layout.HorizontalLayout class.

When the horizontal layout is set, the newly created child objects in the panel are displayed in the parent panel from left to right in the order in which they are added to the parent container. The following code Listing 1 produces the object layout as shown in Figure 1.

Listing 1. Horizontal layout

Panel.setlayout (New Horizontallayout (15));  
Panel.add (new panel ("Item 1", 100, 150));  
Panel.add (new panel ("Item 2", 75, 150));  
Panel.add (new panel ("Item 3", 100, 150));
Panel.add (new panel ("Item 4", 150, 150));

Figure 1. Horizontal layout

(2) Vertical layout

The vertical layout causes all child objects in the parent container panel to be arranged vertically, sequentially.

The vertical layout needs to implement the Com.gwtext.client.widgets.layout.VerticalLayout class.

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.