/* * Smart GWT (GWT for SmartClient) * Copyright 2008 and beyond, Isomorphic Software, Inc. * * Smart GWT 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. Smart GWT 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. */ import com.smartgwt.client.types.Alignment; import com.smartgwt.client.types.Overflow; import com.smartgwt.client.widgets.Canvas; import com.smartgwt.client.widgets.Label; import com.smartgwt.client.widgets.layout.HLayout; import com.smartgwt.client.widgets.layout.VLayout; import com.google.gwt.core.client.EntryPoint; public class NestingSample implements EntryPoint { public void onModuleLoad() { 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); 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); Label detailsLabel = new Label(); detailsLabel.setContents("Details"); detailsLabel.setAlign(Alignment.CENTER); detailsLabel.setOverflow(Overflow.HIDDEN); detailsLabel.setHeight("70%"); vLayout.addMember(listingLabel); vLayout.addMember(detailsLabel); mainLayout.addMember(vLayout); mainLayout.draw(); } // match topology of SmartClient FE Sample @Override protected boolean shouldWrapViewPanel() { return true; } }