-
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 left-hand side of the homepage. This sidebar will be used for navigation.
Define the method getLeftSidebar:
public ContentPanel getLeftSideBar()
{
ContentPanel leftSidebarPanel = new ContentPanel();
leftSidebarPanel.setHeading("Left Sidebar");
return leftSidebarPanel;
}
Call the add method of class ContentPanel in the constructor to add the sidebar in the content panel:
add(getLeftSideBar(), leftSidebarLayoutData);
The method getLeftSideBar creates a content panel instance and sets a heading Left Sidebar. This heading will be modified later.
The left-hand sidebar created by this method is added in the west region of the main content panel by invoking add(getLeftSideBar(), leftSidebarLayoutData) in the constructor.
The Creating the home page layout class recipe
The Adding the banner recipe
The Adding menus recipe
The Creating the right-hand sidebar recipe
The...
Change the font size
Change margin width
Change background colour