Full client area nested layout (Smart GWT)
/*
* SmartGWT (GWT for SmartClient)
* Copyright 2008 and beyond, Isomorphic Software, Inc.
*
* SmartGWT is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License version 3
* as published by the Free Software Foundation. SmartGWT is also
* available under typical commercial license terms - see
* http://smartclient.com/license
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*/
package com.smartgwt.sample.showcase.client;
import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.user.client.ui.RootPanel;
import com.smartgwt.client.types.Alignment;
import com.smartgwt.client.types.DragAppearance;
import com.smartgwt.client.types.Overflow;
import com.smartgwt.client.widgets.Canvas;
import com.smartgwt.client.widgets.IButton;
import com.smartgwt.client.widgets.Label;
import com.smartgwt.client.widgets.events.ClickEvent;
import com.smartgwt.client.widgets.events.ClickHandler;
import com.smartgwt.client.widgets.layout.HLayout;
import com.smartgwt.client.widgets.layout.VLayout;
public class Showcase implements EntryPoint {
public void onModuleLoad() {
RootPanel.get().add(getViewPanel());
}
public Canvas getViewPanel() {
HLayout mainLayout = new HLayout();
mainLayout.setWidth100();
mainLayout.setHeight100();
Label navigationLabel = new Label();
navigationLabel.setContents("Navigation");
navigationLabel.setAlign(Alignment.CENTER);
navigationLabel.setOverflow(Overflow.HIDDEN);
navigationLabel.setWidth("30%");
navigationLabel.setShowResizeBar(true);
navigationLabel.setBorder("1px solid blue");
mainLayout.addMember(navigationLabel);
VLayout vLayout = new VLayout();
vLayout.setWidth("70%");
Label listingLabel = new Label();
listingLabel.setContents("Listing");
listingLabel.setAlign(Alignment.CENTER);
listingLabel.setOverflow(Overflow.HIDDEN);
listingLabel.setHeight("30%");
listingLabel.setShowResizeBar(true);
listingLabel.setBorder("1px solid blue");
Label detailsLabel = new Label();
detailsLabel.setContents("Details");
detailsLabel.setAlign(Alignment.CENTER);
detailsLabel.setOverflow(Overflow.HIDDEN);
detailsLabel.setHeight("70%");
detailsLabel.setBorder("1px solid blue");
vLayout.addMember(listingLabel);
vLayout.addMember(detailsLabel);
mainLayout.addMember(vLayout);
return mainLayout;
}
}
SmartGWT.zip( 9,880 k)Related examples in the same category