当前位置: 首页>>代码示例>>Java>>正文


Java CenterLayoutContainer类代码示例

本文整理汇总了Java中com.sencha.gxt.widget.core.client.container.CenterLayoutContainer的典型用法代码示例。如果您正苦于以下问题:Java CenterLayoutContainer类的具体用法?Java CenterLayoutContainer怎么用?Java CenterLayoutContainer使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


CenterLayoutContainer类属于com.sencha.gxt.widget.core.client.container包,在下文中一共展示了CenterLayoutContainer类的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: onModuleLoad

import com.sencha.gxt.widget.core.client.container.CenterLayoutContainer; //导入依赖的package包/类
@Override
public void onModuleLoad() {

	Viewport viewport = new Viewport();
	viewport.addStyleName("x-viewport");

	BorderLayoutContainer borderLayoutContainer = new BorderLayoutContainer();
       borderLayoutContainer.setBorders(true);
       
       VerticalLayoutContainer north = new VerticalLayoutContainer();
       north.add(new HTML("<div class=\"olms-title\">Open License Management Server</div>"));
       
       BorderLayoutContainer.BorderLayoutData northData = new BorderLayoutContainer.BorderLayoutData(150);
       northData.setCollapsible(false);
       northData.setSplit(false);
       northData.setCollapseMini(false);
       northData.setMargins(new Margins(0, 5, 0, 5));
       northData.setSize(50);
       
       ContentPanel west = new ContentPanel();
       west.add(new HTML("This is west panel"));
       
       BorderLayoutContainer.BorderLayoutData westData = new BorderLayoutContainer.BorderLayoutData(250);
       westData.setCollapsible(true);
       westData.setSplit(true);
       westData.setCollapseMini(true);
       westData.setMargins(new Margins(0, 5, 0, 5));

	CenterLayoutContainer centerLayoutContainer = new CenterLayoutContainer();
	TextButton textButton = new TextButton("Click Me!");
	textButton.addSelectHandler(new SelectHandler() {
		@Override
		public void onSelect(SelectEvent event) {
			Window basicWindow = new Window();
			basicWindow.setHeadingHtml("GXT CookBook | Recipe One");
			basicWindow.setClosable(true);
			basicWindow.setSize("250px", "50px");
			// prepare content to show
			VerticalLayoutContainer textPanel = new VerticalLayoutContainer();
			textPanel.addStyleName("text-panel");
			//setStyleAttribute("padding", "15px");
			textPanel.add(new HTML("<div>This is our first recipe from GXT Cookbook, how are we doing so far ...</div>"));
			// place content on the window
			// and display it.
			basicWindow.add(textPanel);
			basicWindow.show();		
		}
	});
	centerLayoutContainer.add(textButton);

       MarginData centerData = new MarginData();

       borderLayoutContainer.setNorthWidget(north, northData);
       borderLayoutContainer.setWestWidget(west, westData);
    borderLayoutContainer.setCenterWidget(centerLayoutContainer, centerData);

	viewport.add(borderLayoutContainer);
	RootPanel.get().add(viewport);		
}
 
开发者ID:izaynutdinov,项目名称:open-license-management-server,代码行数:60,代码来源:Main.java


注:本文中的com.sencha.gxt.widget.core.client.container.CenterLayoutContainer类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。