Source Code Cross Referenced for ComplexSample.java in  » Ajax » gwtext-2.01 » com » gwtext » sample » showcase2 » client » layout » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Ajax » gwtext 2.01 » com.gwtext.sample.showcase2.client.layout 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * GWT-Ext Widget Library
003:         * Copyright(c) 2007-2008, GWT-Ext.
004:         * licensing@gwt-ext.com
005:         * 
006:         * http://www.gwt-ext.com/license
007:         */
008:        package com.gwtext.sample.showcase2.client.layout;
009:
010:        import com.google.gwt.user.client.ui.HTML;
011:        import com.gwtext.client.core.Margins;
012:        import com.gwtext.client.core.RegionPosition;
013:        import com.gwtext.client.widgets.BoxComponent;
014:        import com.gwtext.client.widgets.HTMLPanel;
015:        import com.gwtext.client.widgets.Panel;
016:        import com.gwtext.client.widgets.TabPanel;
017:        import com.gwtext.client.widgets.grid.PropertyGridPanel;
018:        import com.gwtext.client.widgets.layout.AccordionLayout;
019:        import com.gwtext.client.widgets.layout.BorderLayout;
020:        import com.gwtext.client.widgets.layout.BorderLayoutData;
021:        import com.gwtext.client.widgets.layout.FitLayout;
022:        import com.gwtext.sample.showcase2.client.ShowcasePanel;
023:
024:        import java.util.Date;
025:        import java.util.HashMap;
026:        import java.util.Map;
027:
028:        public class ComplexSample extends ShowcasePanel {
029:
030:            public String getSourceUrl() {
031:                return "source/layout/ComplexSample.java.html";
032:            }
033:
034:            public Panel getViewPanel() {
035:                if (panel == null) {
036:
037:                    panel = new Panel();
038:                    panel.setLayout(new FitLayout());
039:
040:                    Panel borderPanel = new Panel();
041:                    borderPanel.setLayout(new BorderLayout());
042:
043:                    //add north panel
044:                    //raw html
045:                    BoxComponent northPanel = new BoxComponent();
046:                    northPanel
047:                            .setEl(new HTML(
048:                                    "<p>north - generally for menus, toolbars and/or advertisements</p>")
049:                                    .getElement());
050:                    northPanel.setHeight(32);
051:                    borderPanel.add(northPanel, new BorderLayoutData(
052:                            RegionPosition.NORTH));
053:
054:                    //add south panel
055:                    Panel southPanel = new HTMLPanel(
056:                            "<p>south - generally for informational stuff, also could be for status bar</p>");
057:                    southPanel.setHeight(100);
058:                    southPanel.setCollapsible(true);
059:                    southPanel.setTitle("South");
060:
061:                    BorderLayoutData southData = new BorderLayoutData(
062:                            RegionPosition.SOUTH);
063:                    southData.setMinSize(100);
064:                    southData.setMaxSize(200);
065:                    southData.setMargins(new Margins(0, 0, 0, 0));
066:                    southData.setSplit(true);
067:                    borderPanel.add(southPanel, southData);
068:
069:                    //add east panel
070:                    Panel eastPanel = new Panel();
071:                    eastPanel.setTitle("East Side");
072:                    eastPanel.setCollapsible(true);
073:                    eastPanel.setWidth(225);
074:                    eastPanel.setLayout(new FitLayout());
075:
076:                    BorderLayoutData eastData = new BorderLayoutData(
077:                            RegionPosition.EAST);
078:                    eastData.setSplit(true);
079:                    eastData.setMinSize(175);
080:                    eastData.setMaxSize(400);
081:                    eastData.setMargins(new Margins(0, 0, 5, 0));
082:
083:                    borderPanel.add(eastPanel, eastData);
084:
085:                    TabPanel tabPanel = new TabPanel();
086:                    tabPanel.setBorder(false);
087:                    tabPanel.setActiveTab(1);
088:
089:                    Panel tabOne = new Panel();
090:                    tabOne
091:                            .setHtml("<p>A TabPanel component can be a region.</p>");
092:                    tabOne.setTitle("A Tab");
093:                    tabOne.setAutoScroll(true);
094:                    tabPanel.add(tabOne);
095:
096:                    PropertyGridPanel propertyGrid = new PropertyGridPanel();
097:                    propertyGrid.setTitle("Property Grid");
098:
099:                    Map source = new HashMap();
100:                    source.put("(name)", "Properties Grid");
101:                    source.put("grouping", Boolean.FALSE);
102:                    source.put("autoFitColumns", Boolean.TRUE);
103:                    source.put("productionQuality", Boolean.FALSE);
104:                    source.put("created", new Date());
105:                    source.put("tested", Boolean.FALSE);
106:                    source.put("version", new Float(0.1f));
107:                    source.put("borderWidth", new Integer(1));
108:
109:                    propertyGrid.setSource(source);
110:
111:                    tabPanel.add(propertyGrid);
112:                    eastPanel.add(tabPanel);
113:
114:                    final AccordionLayout accordion = new AccordionLayout(true);
115:
116:                    Panel westPanel = new Panel();
117:                    westPanel.setTitle("West");
118:                    westPanel.setCollapsible(true);
119:                    westPanel.setWidth(200);
120:                    westPanel.setLayout(accordion);
121:
122:                    Panel navPanel = new Panel();
123:                    navPanel.setHtml("<p>Hi. I'm the west panel.</p>");
124:                    navPanel.setTitle("Navigation");
125:                    navPanel.setBorder(false);
126:                    navPanel.setIconCls("forlder-icon");
127:                    westPanel.add(navPanel);
128:
129:                    Panel settingsPanel = new Panel();
130:                    settingsPanel.setHtml("<p>Some settings in here.</p>");
131:                    settingsPanel.setTitle("Settings");
132:                    settingsPanel.setBorder(false);
133:                    settingsPanel.setIconCls("settings-icon");
134:                    westPanel.add(settingsPanel);
135:
136:                    BorderLayoutData westData = new BorderLayoutData(
137:                            RegionPosition.WEST);
138:                    westData.setSplit(true);
139:                    westData.setMinSize(175);
140:                    westData.setMaxSize(400);
141:                    westData.setMargins(new Margins(0, 5, 0, 0));
142:
143:                    borderPanel.add(westPanel, westData);
144:
145:                    TabPanel centerPanel = new TabPanel();
146:                    centerPanel.setDeferredRender(false);
147:                    centerPanel.setActiveTab(0);
148:
149:                    Panel centerPanelOne = new HTMLPanel();
150:                    centerPanelOne
151:                            .setHtml("<p><b>Done reading me? Close me by clicking the X in the top right corner.</b></p>\n"
152:                                    + "        <p>Vestibulum semper. Nullam non odio. Aliquam quam. Mauris eu lectus non nunc auctor ullamcorper. Sed tincidunt molestie enim. Phasellus lobortis justo sit amet quam. Duis nulla erat, varius a, cursus in, tempor sollicitudin, mauris. Aliquam mi velit, consectetuer mattis, consequat tristique, pulvinar ac, nisl. Aliquam mattis vehicula elit. Proin quis leo sed tellus scelerisque molestie. Quisque luctus. Integer mattis. Donec id augue sed leo aliquam egestas. Quisque in sem. Donec dictum enim in dolor. Praesent non erat. Nulla ultrices vestibulum quam.</p>\n"
153:                                    + "        <p>Duis hendrerit, est vel lobortis sagittis, tortor erat scelerisque tortor, sed pellentesque sem enim id metus. Maecenas at pede. Nulla velit libero, dictum at, mattis quis, sagittis vel, ante. Phasellus faucibus rutrum dui. Cras mauris elit, bibendum at, feugiat non, porta id, neque. Nulla et felis nec odio mollis vehicula. Donec elementum tincidunt mauris. Duis vel dui. Fusce iaculis enim ac nulla. In risus.</p>\n"
154:                                    + "        <p>Donec gravida. Donec et enim. Morbi sollicitudin, lacus a facilisis pulvinar, odio turpis dapibus elit, in tincidunt turpis felis nec libero. Nam vestibulum tempus ipsum. In hac habitasse platea dictumst. Nulla facilisi. Donec semper ligula. Donec commodo tortor in quam. Etiam massa. Ut tempus ligula eget tellus. Curabitur id velit ut velit varius commodo. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Nulla facilisi. Fusce ornare pellentesque libero. Nunc rhoncus. Suspendisse potenti. Ut consequat, leo eu accumsan vehicula, justo sem lobortis elit, ac sollicitudin ipsum neque nec ante.</p>\n"
155:                                    + "        <p>Aliquam elementum mauris id sem. Vivamus varius, est ut nonummy consectetuer, nulla quam bibendum velit, ac gravida nisi felis sit amet urna. Aliquam nec risus. Maecenas lacinia purus ut velit. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Suspendisse sit amet dui vitae lacus fermentum sodales. Donec varius dapibus nisl. Praesent at velit id risus convallis bibendum. Aliquam felis nibh, rutrum nec, blandit non, mattis sit amet, magna. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Etiam varius dignissim nibh. Quisque id orci ac ante hendrerit molestie. Aliquam malesuada enim non neque.</p>");
156:                    centerPanelOne.setTitle("Close Me");
157:                    centerPanelOne.setAutoScroll(true);
158:                    centerPanelOne.setClosable(true);
159:
160:                    centerPanel.add(centerPanelOne);
161:
162:                    Panel centerPanelTwo = new HTMLPanel();
163:                    centerPanelTwo
164:                            .setHtml("            <p>\n"
165:                                    + "            My closable attribute is set to false so you can't close me. The other center panels can be closed.</p>\n"
166:                                    + "        <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"
167:                                    + "        <hr>\n"
168:                                    + "        <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed metus nibh, sodales a, porta at, vulputate eget, dui. Pellentesque ut nisl. Maecenas tortor turpis, interdum non, sodales non, iaculis ac, lacus. Vestibulum auctor, tortor quis iaculis malesuada, libero lectus bibendum purus, sit amet tincidunt quam turpis vel lacus. In pellentesque nisl non sem. Suspendisse nunc sem, pretium eget, cursus a, fringilla vel, urna. Aliquam commodo ullamcorper erat. Nullam vel justo in neque porttitor laoreet. Aenean lacus dui, consequat eu, adipiscing eget, nonummy non, nisi. Morbi nunc est, dignissim non, ornare sed, luctus eu, massa. Vivamus eget quam. Vivamus tincidunt diam nec urna. Curabitur velit. Quisque dolor magna, ornare sed, elementum porta, luctus in, leo.</p>\n"
169:                                    + "        <p>Donec quis dui. Sed imperdiet. Nunc consequat, est eu sollicitudin gravida, mauris ligula lacinia mauris, eu porta dui nisl in velit. Nam congue, odio id auctor nonummy, augue lectus euismod nunc, in tristique turpis dolor sed urna. Donec sit amet quam eget diam fermentum pharetra. Integer tincidunt arcu ut purus. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nulla blandit malesuada odio. Nam augue. Aenean molestie sapien in mi. Suspendisse tincidunt. Pellentesque tempus dui vitae sapien. Donec aliquam ipsum sit amet pede. Sed scelerisque mi a erat. Curabitur rutrum ullamcorper risus. Maecenas et lorem ut felis dictum viverra. Fusce sem. Donec pharetra nibh sit amet sapien.</p>\n"
170:                                    + "        <p>Aenean ut orci sed ligula consectetuer pretium. Aliquam odio. Nam pellentesque enim. Nam tincidunt condimentum nisi. Maecenas convallis luctus ligula. Donec accumsan ornare risus. Vestibulum id magna a nunc posuere laoreet. Integer iaculis leo vitae nibh. Nam vulputate, mauris vitae luctus pharetra, pede neque bibendum tellus, facilisis commodo diam nisi eget lacus. Duis consectetuer pulvinar nisi. Cras interdum ultricies sem. Nullam tristique. Suspendisse elementum purus eu nisl. Nulla facilisi. Phasellus ultricies ullamcorper lorem. Sed euismod ante vitae lacus. Nam nunc leo, congue vehicula, luctus ac, tempus non, ante. Morbi suscipit purus a nulla. Sed eu diam.</p>\n"
171:                                    + "        <p>Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Cras imperdiet felis id velit. Ut non quam at sem dictum ullamcorper. Vestibulum pharetra purus sed pede. Aliquam ultrices, nunc in varius mattis, felis justo pretium magna, eget laoreet justo eros id eros. Aliquam elementum diam fringilla nulla. Praesent laoreet sapien vel metus. Cras tempus, sapien condimentum dictum dapibus, lorem augue fringilla orci, ut tincidunt eros nisi eget turpis. Nullam nunc nunc, eleifend et, dictum et, pharetra a, neque. Ut feugiat. Aliquam erat volutpat. Donec pretium odio nec felis. Phasellus sagittis lacus eget sapien. Donec est. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae;</p>\n"
172:                                    + "        <p>Vestibulum semper. Nullam non odio. Aliquam quam. Mauris eu lectus non nunc auctor ullamcorper. Sed tincidunt molestie enim. Phasellus lobortis justo sit amet quam. Duis nulla erat, varius a, cursus in, tempor sollicitudin, mauris. Aliquam mi velit, consectetuer mattis, consequat tristique, pulvinar ac, nisl. Aliquam mattis vehicula elit. Proin quis leo sed tellus scelerisque molestie. Quisque luctus. Integer mattis. Donec id augue sed leo aliquam egestas. Quisque in sem. Donec dictum enim in dolor. Praesent non erat. Nulla ultrices vestibulum quam.</p>\n"
173:                                    + "        <p>Duis hendrerit, est vel lobortis sagittis, tortor erat scelerisque tortor, sed pellentesque sem enim id metus. Maecenas at pede. Nulla velit libero, dictum at, mattis quis, sagittis vel, ante. Phasellus faucibus rutrum dui. Cras mauris elit, bibendum at, feugiat non, porta id, neque. Nulla et felis nec odio mollis vehicula. Donec elementum tincidunt mauris. Duis vel dui. Fusce iaculis enim ac nulla. In risus.</p>\n"
174:                                    + "        <p>Donec gravida. Donec et enim. Morbi sollicitudin, lacus a facilisis pulvinar, odio turpis dapibus elit, in tincidunt turpis felis nec libero. Nam vestibulum tempus ipsum. In hac habitasse platea dictumst. Nulla facilisi. Donec semper ligula. Donec commodo tortor in quam. Etiam massa. Ut tempus ligula eget tellus. Curabitur id velit ut velit varius commodo. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Nulla facilisi. Fusce ornare pellentesque libero. Nunc rhoncus. Suspendisse potenti. Ut consequat, leo eu accumsan vehicula, justo sem lobortis elit, ac sollicitudin ipsum neque nec ante.</p>\n"
175:                                    + "        <p>Aliquam elementum mauris id sem. Vivamus varius, est ut nonummy consectetuer, nulla quam bibendum velit, ac gravida nisi felis sit amet urna. Aliquam nec risus. Maecenas lacinia purus ut velit. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Suspendisse sit amet dui vitae lacus fermentum sodales. Donec varius dapibus nisl. Praesent at velit id risus convallis bibendum. Aliquam felis nibh, rutrum nec, blandit non, mattis sit amet, magna. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Etiam varius dignissim nibh. Quisque id orci ac ante hendrerit molestie. Aliquam malesuada enim non neque.</p>");
176:                    centerPanelTwo.setTitle("Center Panel");
177:                    centerPanelTwo.setAutoScroll(true);
178:
179:                    centerPanel.add(centerPanelTwo);
180:                    borderPanel.add(centerPanel, new BorderLayoutData(
181:                            RegionPosition.CENTER));
182:
183:                    panel.add(borderPanel);
184:                }
185:                return panel;
186:            }
187:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.