-
Book Overview & Buying
-
Table Of Contents
Google Web Toolkit 2 Application Development Cookbook
By :
In this recipe, we are going to create a sidebar to be placed on the right-hand side. This sidebar will be used for some dynamic contents based on the main contents at the center.
Define the method getRightSidebar:
public ContentPanel getRightSideBar()
{
ContentPanel rightSidebarPanel = new ContentPanel();
rightSidebarPanel.setHeading("Right" Sidebar");
return rightSidebarPanel;
}
Call the add method of class ContentPanel in the constructor to add the sidebar in the content panel:
add(getRightSideBar(), rightSidebarLayoutData);
The method getRightSideBar creates a content panel instance, and sets a heading Right Sidebar. This heading will be modified later.
The right-hand sidebar created by this method is added in the east region of the main content panel by invoking add(getRightSideBar(), rightSidebarLayoutData) in the constructor.
The Creating the home page layout class recipe
The Adding the banner recipe
The Adding menus...
Change the font size
Change margin width
Change background colour