[GWT] The Layouts
first step in creating a GWT application, the user interface.
In GWT, we use the Layouts (Patron, MasterPage).
Basically we created the architecture for creating a layout in general.
Always with the famous bookstore GXT (see previous tutorial), we will succeed in making a super trick very quickly.
Two things to know:
1) There are many types of layouts. We will use the type of layout used in the example of Sencha showcase BorderLayoutExample because it is very efficient, fast enough to implement and already stylish and broad parameters, it's probably when I speak more Powerful layout of GWT.
2) To resize automatically resizes when our layout browser, use the object VIEWPORT
Viewport To integrate our BorderLayout example, we will import Viewport and instantiate it. It must always be considered as the ViewPort overview.
I renamed the example in BorderLayoutExample GeneralLayout. I removed the
layoutContainer superclass of the class declaration, the purpose of inheriting ViewPort layoutContainer
I will not go on examples of Sencha is explicit enough, I show you only what is changing in the file GeneralLayout at the end, when you add content to an area of the layout:
There is one thing to do now, use viewport as seen in the overall onModuleLoad ()
Thus, one can now resize your browser, the layout will resize instantly.
pretty cool huh?
0 comments:
Post a Comment