`

Layouts_ComplexSample

 
阅读更多
<?xml version="1.0" encoding="UTF-8"?>

<page id="Layouts">
    <main>
         <process id="receiverProcess">
         	<tablePopup id="complexSample" title="Layouts_ComplexSample"  
     process="receiverProcess.new" enableType="none" containId="false" 
     pageId="complexSample">
                <enableExpression/>
            </tablePopup>
         </process>
    </main>
    <detail/>
</page>

 complexSample.xml

<?xml version="1.0" encoding="UTF-8"?>
<pages>
   <customPage id="complexSample" title="Layouts_ComplexSample"  
	className="com.vtradex.tms.client.layouts.HorizontalLayout.ComplexSample" 
	onClose="refreshParent" width="900" height="550" />
</pages>

 ComplexSample.java

package com.vtradex.tms.client.layouts.HorizontalLayout;

import java.util.Date;
import java.util.HashMap;
import java.util.Map;

import com.google.gwt.user.client.rpc.IsSerializable;
import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.VerticalPanel;
import com.gwtext.client.core.Margins;
import com.gwtext.client.core.RegionPosition;
import com.gwtext.client.widgets.BoxComponent;
import com.gwtext.client.widgets.HTMLPanel;
import com.gwtext.client.widgets.Panel;
import com.gwtext.client.widgets.TabPanel;
import com.gwtext.client.widgets.grid.PropertyGridPanel;
import com.gwtext.client.widgets.layout.AccordionLayout;
import com.gwtext.client.widgets.layout.BorderLayout;
import com.gwtext.client.widgets.layout.BorderLayoutData;
import com.gwtext.client.widgets.layout.FitLayout;
import com.vtradex.thorn.client.template.BaseCustomPopupTemplate;
/**
 * @Author :      yc.min         
 * ComplexSample     
 */
public class ComplexSample extends BaseCustomPopupTemplate 
	implements IsSerializable {
	private transient int  height = 500;
    private transient int  width = 900;
    public void draw(final VerticalPanel content){
    	Panel panel = new Panel();  
        panel.setBorder(false);  
        panel.setPaddings(15);  
        panel.setLayout(new FitLayout());  
        //add
        panel.setWidth(width+"px");
        panel.setHeight(height+"px");
        panel.setTitle("i am panel 1");
        
        Panel borderPanel = new Panel();  
        borderPanel.setLayout(new BorderLayout());  
        
        //add north panel  
        //raw html  
        BoxComponent northPanel = new BoxComponent();  
        northPanel.setEl(new HTML("<p>north - generally for menus, toolbars" +  
                " and/or advertisements</p>").getElement());  
        northPanel.setHeight(32);  
        borderPanel.add(northPanel, new BorderLayoutData(RegionPosition.NORTH));  
        
        //add south panel  
        Panel southPanel = new HTMLPanel
		("<p>south - generally for informational stuff," +  
                " also could be for status bar</p>");  
        southPanel.setHeight(100);  
        southPanel.setCollapsible(true);  
        southPanel.setTitle("South");  
  
        BorderLayoutData southData = 
			new BorderLayoutData(RegionPosition.SOUTH);  
        southData.setMinSize(100);  
        southData.setMaxSize(200);  
        southData.setMargins(new Margins(0, 0, 0, 0));  
        southData.setSplit(true);  
        borderPanel.add(southPanel, southData);  
        
      //add east panel  
        Panel eastPanel = new Panel();  
        eastPanel.setTitle("East Side");  
        eastPanel.setCollapsible(true);  
        eastPanel.setWidth(225);  
        eastPanel.setLayout(new FitLayout());  
  
        BorderLayoutData eastData = 
			new BorderLayoutData(RegionPosition.EAST);  
        eastData.setSplit(true);  
        eastData.setMinSize(175);  
        eastData.setMaxSize(400);  
        eastData.setMargins(new Margins(0, 0, 5, 0));  
  
        borderPanel.add(eastPanel, eastData);  
        
        TabPanel tabPanel = new TabPanel();  
        tabPanel.setBorder(false);  
        tabPanel.setActiveTab(1);  
  
        Panel tabOne = new Panel();  
        tabOne.setHtml
		("<p>A TabPanel component can be a region.</p>");  
        tabOne.setTitle("A Tab");  
        tabOne.setAutoScroll(true);  
        tabPanel.add(tabOne);  
  
        PropertyGridPanel propertyGrid = 
			new PropertyGridPanel();  
        propertyGrid.setTitle("Property Grid");  
        
        Map source = new HashMap();  
        source.put("(name)", "Properties Grid");  
        source.put("grouping", Boolean.FALSE);  
        source.put("autoFitColumns", Boolean.TRUE);  
        source.put("productionQuality", Boolean.FALSE);  
        source.put("created", new Date());  
        source.put("tested", Boolean.FALSE);  
        source.put("version", new Float(0.1f));  
        source.put("borderWidth", new Integer(1));  
  
        propertyGrid.setSource(source);  
  
        tabPanel.add(propertyGrid);  
        eastPanel.add(tabPanel);  
        
        final AccordionLayout accordion = 
			new AccordionLayout(true);  
        
        Panel westPanel = new Panel();  
        westPanel.setTitle("West");  
        westPanel.setCollapsible(true);  
        westPanel.setWidth(200);  
        westPanel.setLayout(accordion);  
  
        Panel navPanel = new Panel();  
        navPanel.setHtml
			("<p>Hi. I'm the west panel.</p>");  
        navPanel.setTitle("Navigation");  
        navPanel.setBorder(false);  
        navPanel.setIconCls("forlder-icon");  
        westPanel.add(navPanel);  
  
        Panel settingsPanel = new Panel();  
        settingsPanel.setHtml
			("<p>Some settings in here.</p>");  
        settingsPanel.setTitle("Settings");  
        settingsPanel.setBorder(false);  
        settingsPanel.setIconCls("settings-icon");  
        westPanel.add(settingsPanel);  
  
        BorderLayoutData westData = 
			new BorderLayoutData(RegionPosition.WEST);  
        westData.setSplit(true);  
        westData.setMinSize(175);  
        westData.setMaxSize(400);  
        westData.setMargins(new Margins(0, 5, 0, 0));  
  
        borderPanel.add(westPanel, westData);  
  
        TabPanel centerPanel = new TabPanel();  
        centerPanel.setDeferredRender(false);  
        centerPanel.setActiveTab(0);  
  
        Panel centerPanelOne = new HTMLPanel();  
        centerPanelOne.setHtml(  
                "<p><b>Done reading me? Close me by clicking the X in "
                		+ "the top right corner.</b></p>\n" +  
                        "<p>" + getShortBogusMarkup() + "</p>\n" +  
                        "<p>" + getShortBogusMarkup() + "</p>\n" +  
                        "<p>" + getShortBogusMarkup() + "</p>\n"  
        );  
        centerPanelOne.setTitle("Close Me");  
        centerPanelOne.setAutoScroll(true);  
        centerPanelOne.setClosable(true);  
  
        centerPanel.add(centerPanelOne);  
  
        Panel centerPanelTwo = new HTMLPanel();  
        centerPanelTwo.setHtml(  
                "<p>My closable attribute is set to false so you can't close me."
                       + " The other center panels " +  
                        "can be closed.</p>\n" +  
                        "<p>The center panel automatically grows to fit the "
                        + "remaining space in the container " +  
                        "that isn't taken up by the border regions.</p>\n" +  
                        "<hr>\n" +  
                        "<p>" + getShortBogusMarkup() + "</p>\n" +  
                        "<p>" + getShortBogusMarkup() + "</p>\n" +  
                        "<p>" + getShortBogusMarkup() + "</p>\n" +  
                        "<p>" + getShortBogusMarkup() + "</p>\n");  
        centerPanelTwo.setTitle("Center Panel");  
        centerPanelTwo.setAutoScroll(true);  
  
        centerPanel.add(centerPanelTwo);  
        borderPanel.add(centerPanel, 
			new BorderLayoutData(RegionPosition.CENTER));  
  
        panel.add(borderPanel);  
//        new Viewport(panel);  
        content.add(panel);
    }
    private static String getShortBogusMarkup() {  
         return 
        "<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. " +  
        "Sed metus nibh, sodales a, porta at, vulputate eget, dui.  " +  
        "In pellentesque nisl non sem. Suspendisse nunc sem, pretium eget, " +  
        "cursus a, fringilla vel, urna.";  
    }
}

 效果预览:

 

  • 大小: 46.9 KB
分享到:
评论

相关推荐

    OA1500_Layouts_original_.pcb_

    标题中的"OA1500_Layouts_original_.pcb_"暗示了这是一个关于OA1500设备的原始布局设计文件,其中".pcb"是印刷电路板(Printed Circuit Board)的文件扩展名,通常用于表示电子产品的电路板设计。PCB设计是电子工程...

    Exploring_The_Maze_Of_Memory_Layouts_Towards_Exploits.pdf

    Motivation Example Our Solution——Maze Demo 开发生成的障碍之一是内存布局操作。大量内存损坏漏洞(例如堆溢出和UAF)只能在特定的内存布局中使用。在实践中,它需要人工操作内存布局。因此,自动内存布局操作是...

    layouts_微信面板demo_DEMO_

    微信面板程序的界面布局demo,来源于网络,很漂亮

    moss自定义登陆页面(技術文檔)

    完成上述步骤后,您现在可以安全地修改这个新`\_layouts_custom`文件夹中的`login.aspx`页面和其他相关文件,以实现自定义登录界面。确保在修改过程中遵循SharePoint开发的最佳实践,包括使用样式表(CSS)进行界面...

    Keyboard_Layouts:我的键盘布局的集合

    标题中的“Keyboard_Layouts”指的是键盘布局,这通常是指计算机键盘上键位的排列方式。不同的语言和用户需求会有不同的键盘布局,例如QWERTY、DVORAK、COLEMAK等。这个集合可能包含了多种键盘布局的设计或者配置...

    thymeleaf Examples: Layouts

    Thymeleaf Examples: Layouts This is an example project containing code used in the "Thymeleaf Layouts" tutorial. The project was created using Spring MVC 4 Quickstart Maven archetype: ...

    Android-Layouts

    ### Android Layouts详解 在Android应用开发中,布局(Layout)是组织用户界面的重要组成部分,它决定了应用界面的外观和结构。布局管理器用于控制视图(View)和视图组(ViewGroup)如何被放置在屏幕上。通过合理...

    android 窗口布局 layouts 下的各种控件

    在Android开发中,窗口布局(layouts)是构建用户界面的核心元素。它们决定了应用程序屏幕上元素的排列方式和相互关系。本篇文章将深入探讨Android布局中的三种主要控件:RelativeLayout、GridLayout和LinearLayout...

    bootstrap商城订单统计管理后台.zip

    - layouts_menu_side_mini.html:侧边栏迷你模式,节省空间,适用于窄屏设备或需要更多工作区的情况。 - layouts_menu_side_full.html:全宽侧边栏布局,提供更多导航选项和更详细的分类。 这些布局文件展示了如何...

    Android Layouts

    在安卓平台上构建复杂布局是移动应用开发的一个重要组成部分,它直接影响到应用的可用性和用户体验。安卓提供了多种布局方式,开发者可以根据需要选择和组合这些布局,以创建复杂的图形结构。以下是对安卓布局系统...

    SharePoint 2013 页面访问,Url中间多一段_layouts15start#.pdf

    在SharePoint 2013中,当启用MDS后,页面URL会在访问时出现额外的一段路径“_layouts/15/start.aspx#”。这个现象之所以让用户感到疑惑或不适,是因为它导致了URL看起来似乎不正确。但实际上,这是一个由MDS功能产生...

    java_FX-Intro-and-Layouts-.rar_java fx

    这是一个ppt给我们介绍了一下java FX的layout

    Nuxt pages下不同的页面对应layout下的页面布局操作

    layouts 根目录下的所有文件都属于个性化布局文件,可以在页面组件中利用 layout 属性来引用。 pages文件下组件的layout属性值为layout文件下的所对应的布局组件的名称 请确保在布局文件里面增加 &lt;nuxt&gt; 组件用于...

    heroku-buildpack-jekyll:用于部署Jekyll站点的buildpack

    _config.yml css index.html _layouts _posts λ heroku create --buildpack git://github.com/bacongobbler/heroku-buildpack-jekyll.git Git remote heroku added λ git push heroku master ----- &gt; Fetching ...

    krogius2019-Flexible Layouts for Fiducial Tags.pdf

    这篇标题为“krogius2019-Flexible Layouts for Fiducial Tags.pdf”的文档主要讨论了在计算机视觉领域中,通过使用柔性布局提高fiducial tags(基准标签)的性能。文档的标题和描述中提到了几个关键概念,包括...

    pom editor 插件

    - 将解压得到的jar文件(如org.eclipse.zest.core_1.3.0.v20110221-2050.jar和org.eclipse.zest.layouts_1.1.0.v20110425-2050.jar)复制到`plugins`目录。 - 重启Eclipse,插件就会自动安装并启用。 - 在Eclipse...

    elf:Elf是一个简单而神奇的Eleventy入门套件,可帮助您使用webpack,Babel和Sass等标准技术创建项目,同时还要考虑易用性,性能和浏览器兼容性

    使用的技术 ……显然作为模板语言编写CSS 用于转储和填充JavaScript 的供应商前缀CSS 用于编译Sass和JavaScript资产和项目结构src/ _components/ All UI partials _data/ Eleventy data files _layouts/ Base page ...

    Visual Studio Csharp 开发Android 之Tabbed Layouts

    在Android应用开发中,Tabbed Layouts是一种常见的用户界面设计,它允许用户通过标签页来切换不同的内容区域。本教程将聚焦于如何使用Microsoft的Visual Studio集成开发环境(IDE)和C#语言来构建Android应用中的...

    asfrom30.github.io

    路由器cf)书(book.router.md) 查看router-provider文件夹外部链接cf)露营地点为了发展템플릿 경로_layouts _layouts/atomics/root.html JAVA최상위对象곳이최상위이템플릿이된다。 。이。레이아웃을있다。 선언...

    _layouts:jekyll模板

    标题“_layouts:jekyll模板”指的是 Jekyll 中的 `_layouts` 文件夹,这个文件夹存放着网站的整体布局和设计模板。每个布局模板定义了页面的基本结构,例如页头、主要内容区域和页脚。在 Jekyll 中,你可以创建多个...

Global site tag (gtag.js) - Google Analytics