SlideShare une entreprise Scribd logo
1  sur  32
Télécharger pour lire hors ligne
Wednesday, November 2, 11
LAYOUTS
                            Sven Brunken



             sven@sencha.com               @svenbrunken




Wednesday, November 2, 11
Overview
                            Why did we change it?
                              What changed?
                              GXT 2 to GXT 3
                              Usage examples
                                 Questions




Wednesday, November 2, 11
Why Did We Change It?




Wednesday, November 2, 11
Why Did We Change It?

      Steep learning curve of the layout system in GXT 2
      Hard to use and maintain
      UiBinder support not possible
      No clean separation of logic between container and layout




Wednesday, November 2, 11
What’s New Or
                             Different?




Wednesday, November 2, 11
What’s New Or Different?

      UiBinder support including layout data
      Typed API
      Clearer inheritance structure
      DOM structure building
      GWT interface based
      GWT Widget class supported natively without wrapping




Wednesday, November 2, 11
UiBinder Support
       GWT does not allow custom parsers to be registered
       Uses the @UiChild annotation
       Requires a typed API




      <ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder'...>

         <container:CenterLayoutContainer>
           <gxt:ContentPanel bodyStyle="padding: 6px" headingText="CenterLayout" width="200">
             <g:Label text="I should be centered" />
           </gxt:ContentPanel>
         </container:CenterLayoutContainer>

      </ui:UiBinder>




Wednesday, November 2, 11
Typed API
       Easy to learn
       Code completion and code assist from your favorite IDE
       Only correct LayoutData can be used, IDE code checks



                            BorderLayoutContainer con = new BorderLayoutContainer();
                            con.setBorders(true);

                            con.setNorthWidget(north, northData);
                            con.setWestWidget(west, westData);
                            con.setCenterWidget(center, centerData);
                            con.setEastWidget(east, eastData);
                            con.setSouthWidget(south, southData);




Wednesday, November 2, 11
Inheritance Chain




Wednesday, November 2, 11
Layouts
                                2.0                3.0
                            BorderLayout   BorderLayoutContainer

           Container        CenterLayout   CenterLayoutContainer

                            FlowLayout     FlowLayoutContainer




Wednesday, November 2, 11
Component


                                           Container



    AbstractHtmlLayout           Insert                      Resize


           HtmlLayout          FlowLayout


                                           InsertResize                 Simple



                   BoxLayout                CardLayout                  Viewport

                                          CssFloatLayout              ContentPanel

                  HBoxLayout              HorizontalLayout            BorderLayout

                  VBoxLayout               VerticalLayout


Wednesday, November 2, 11
DOM Structure Building

       2.0
       Child widget’s DOM not connected to container when inserted
       Only occurs after layout executed, element by element



       3.0
       Element is inserted into its parent directly after insertion into container
       Insert your Viewport with all child elements in one chunk




Wednesday, November 2, 11
GWT Interface Based
       Supports for HasWidgets, IndexPanel, InsertPanel, HasOneWidget,
       RequiresResize and ProvidesResize
       Based on the IsWidget interface

   public abstract class Container extends Component implements HasWidgets.ForIsWidget,
   IndexedPanel.ForIsWidget

   public abstract class ResizeContainer extends Container implements ProvidesResize

   public class SimpleContainer extends ResizeContainer implements HasOneWidget

   public void add(IsWidget child) {
     this.add(asWidgetOrNull(child));
   }

   public void insert(IsWidget w, int beforeIndex) {
     insert(asWidgetOrNull(w), beforeIndex);
   }


Wednesday, November 2, 11
Native Widget Support

       2.0
       Widgets wrapped in WidgetComponent


       3.0
       Direct support of Widgets, no wrapping
       Parent <-> Child relationship as expected
       Support for the GWT LayoutPanel classes




Wednesday, November 2, 11
GWT / GXT
                            Interoperability
                                Example




Wednesday, November 2, 11
LayoutPanel Integration
       Example shows LayoutPanels and Containers used together
       VerticalLayoutContainer -> DockPanel -> ContentPanel




Wednesday, November 2, 11
LayoutPanel Integration
                  VerticalLayoutContainer con = new VerticalLayoutContainer();
                  con.setPixelSize(400, 300);
                  ToolBar t = new ToolBar();
                  ...
                  con.add(t, new VerticalLayoutData(1, -1));

                  ContentPanel cp1 = new ContentPanel();
                  cp1.setHeadingText("North");
                  ContentPanel cp2 = new ContentPanel();
                  cp2.setHeadingText("Center");
                  ContentPanel cp3 = new ContentPanel();
                  cp3.setHeadingText("East");

                  DockLayoutPanel dock = new DockLayoutPanel(Unit.PCT);
                  dock.addNorth(cp1, 20);
                  dock.addEast(cp3, 10);
                  dock.add(cp2);

                  con.add(dock, new VerticalLayoutData(1, 1));

Wednesday, November 2, 11
Demonstration




Wednesday, November 2, 11
Important
                            LayoutContainers




Wednesday, November 2, 11
Container

      Holds the base container logic
      Implements the HasWidget interface
      Does not do any resizing of its children




Wednesday, November 2, 11
ResizeContainer

      Extends Container
      Implements the ProvidesResize and RequiresResize interfaces
      Sizes its children
      forceLayout bubbles to children of ResizeContainer at any level




Wednesday, November 2, 11
InsertContainer

      Extends Container
      Implements the InsertPanel interface
      Adds Widget and IsWidget insert support to Container




Wednesday, November 2, 11
InsertResizeContainer

      Extends ResizeContainer
      Implements the InsertPanel interface
      Adds Widget and IsWidget insert support to ResizeContainer




Wednesday, November 2, 11
GXT 2 To GXT 3




Wednesday, November 2, 11
BorderLayout in Explorer Demo

Wednesday, November 2, 11
GXT 2 BorderLayout
               LayoutContainer con = new LayoutContainer();
               con.setLayout(new BorderLayout());
               con.setBorders(true);

               ContentPanel west = new ContentPanel();
               ContentPanel center = new ContentPanel();
               center.setHeading("BorderLayout Example");

               BorderLayoutData westData = new BorderLayoutData(LayoutRegion.WEST, 150);
               westData.setCollapsible(true);
               westData.setSplit(true);
               westData.setMargins(new Margins(0, 5, 0, 5));

               BorderLayoutData centerData = new BorderLayoutData(LayoutRegion.CENTER);

               con.add(west, westData);
               con.add(center, centerData);




Wednesday, November 2, 11
GXT 3 BorderLayout
               BorderLayoutContainer con = new BorderLayoutContainer();

               con.setBorders(true);

               ContentPanel west = new ContentPanel();
               ContentPanel center = new ContentPanel();
               center.setHeadingText("BorderLayout Example");

               BorderLayoutData westData = new BorderLayoutData(150);
               westData.setCollapsible(true);
               westData.setSplit(true);
               westData.setMargins(new Margins(0, 5, 0, 5));

               MarginData centerData = new MarginData();

               con.setWestWidget(west, westData);
               con.setCenterWidget(center, centerData);




Wednesday, November 2, 11
Usage Examples




Wednesday, November 2, 11
Demonstration




Wednesday, November 2, 11
Questions




Wednesday, November 2, 11
Thank You!




Wednesday, November 2, 11

Contenu connexe

Tendances

Windows 8 Training Fundamental - 1
Windows 8 Training Fundamental - 1Windows 8 Training Fundamental - 1
Windows 8 Training Fundamental - 1
Kevin Octavian
 
ZendCon2010 Doctrine MongoDB ODM
ZendCon2010 Doctrine MongoDB ODMZendCon2010 Doctrine MongoDB ODM
ZendCon2010 Doctrine MongoDB ODM
Jonathan Wage
 
Ext GWT 3.0 Advanced Templates
Ext GWT 3.0 Advanced TemplatesExt GWT 3.0 Advanced Templates
Ext GWT 3.0 Advanced Templates
Sencha
 
Symfony Day 2010 Doctrine MongoDB ODM
Symfony Day 2010 Doctrine MongoDB ODMSymfony Day 2010 Doctrine MongoDB ODM
Symfony Day 2010 Doctrine MongoDB ODM
Jonathan Wage
 
Special Events: Beyond Custom Events
Special Events: Beyond Custom EventsSpecial Events: Beyond Custom Events
Special Events: Beyond Custom Events
Brandon Aaron
 

Tendances (20)

Windows 8 Training Fundamental - 1
Windows 8 Training Fundamental - 1Windows 8 Training Fundamental - 1
Windows 8 Training Fundamental - 1
 
FRP: What does "declarative" mean
FRP: What does "declarative" meanFRP: What does "declarative" mean
FRP: What does "declarative" mean
 
Data binding в массы! (1.2)
Data binding в массы! (1.2)Data binding в массы! (1.2)
Data binding в массы! (1.2)
 
Programmers, communicate your intentions
Programmers, communicate your intentionsProgrammers, communicate your intentions
Programmers, communicate your intentions
 
Symfony2 from the Trenches
Symfony2 from the TrenchesSymfony2 from the Trenches
Symfony2 from the Trenches
 
ZendCon2010 Doctrine MongoDB ODM
ZendCon2010 Doctrine MongoDB ODMZendCon2010 Doctrine MongoDB ODM
ZendCon2010 Doctrine MongoDB ODM
 
Ext GWT 3.0 Advanced Templates
Ext GWT 3.0 Advanced TemplatesExt GWT 3.0 Advanced Templates
Ext GWT 3.0 Advanced Templates
 
Doctrine MongoDB Object Document Mapper
Doctrine MongoDB Object Document MapperDoctrine MongoDB Object Document Mapper
Doctrine MongoDB Object Document Mapper
 
Anton Minashkin Dagger 2 light
Anton Minashkin Dagger 2 lightAnton Minashkin Dagger 2 light
Anton Minashkin Dagger 2 light
 
Event handling using jQuery
Event handling using jQueryEvent handling using jQuery
Event handling using jQuery
 
Vaadin 8 - Data Binding with Binder
Vaadin 8 - Data Binding with BinderVaadin 8 - Data Binding with Binder
Vaadin 8 - Data Binding with Binder
 
What Would You Do? With John Quinones
What Would You Do? With John QuinonesWhat Would You Do? With John Quinones
What Would You Do? With John Quinones
 
Symfony Day 2010 Doctrine MongoDB ODM
Symfony Day 2010 Doctrine MongoDB ODMSymfony Day 2010 Doctrine MongoDB ODM
Symfony Day 2010 Doctrine MongoDB ODM
 
BVJS
BVJSBVJS
BVJS
 
Special Events: Beyond Custom Events
Special Events: Beyond Custom EventsSpecial Events: Beyond Custom Events
Special Events: Beyond Custom Events
 
Lenguaje de programación jn
Lenguaje de programación jnLenguaje de programación jn
Lenguaje de programación jn
 
What Would You Do? With John Quinones
What Would You Do? With John QuinonesWhat Would You Do? With John Quinones
What Would You Do? With John Quinones
 
Functionality Focused Code Organization
Functionality Focused Code OrganizationFunctionality Focused Code Organization
Functionality Focused Code Organization
 
Михаил Анохин "Data binding 2.0"
Михаил Анохин "Data binding 2.0"Михаил Анохин "Data binding 2.0"
Михаил Анохин "Data binding 2.0"
 
Politics News and U.S. Elections Coverage
Politics News and U.S. Elections CoveragePolitics News and U.S. Elections Coverage
Politics News and U.S. Elections Coverage
 

Similaire à Ext GWT 3.0 Layouts

On a cell phone form factor, ONLY the list fragment shows, or the .pdf
On a cell phone form factor, ONLY the list fragment shows, or the .pdfOn a cell phone form factor, ONLY the list fragment shows, or the .pdf
On a cell phone form factor, ONLY the list fragment shows, or the .pdf
mukeshkumawat551
 
Js info vis_toolkit
Js info vis_toolkitJs info vis_toolkit
Js info vis_toolkit
nikhilyagnic
 

Similaire à Ext GWT 3.0 Layouts (17)

Best Practices in Ext GWT
Best Practices in Ext GWTBest Practices in Ext GWT
Best Practices in Ext GWT
 
Migrating from Touch 1.x to 2.0
Migrating from Touch 1.x to 2.0Migrating from Touch 1.x to 2.0
Migrating from Touch 1.x to 2.0
 
[Flutter] Flutter Provider 看似簡單卻又不簡單的狀態管理工具 @ Devfest Kaohsiung 2023
[Flutter] Flutter Provider 看似簡單卻又不簡單的狀態管理工具 @ Devfest Kaohsiung 2023[Flutter] Flutter Provider 看似簡單卻又不簡單的狀態管理工具 @ Devfest Kaohsiung 2023
[Flutter] Flutter Provider 看似簡單卻又不簡單的狀態管理工具 @ Devfest Kaohsiung 2023
 
java swing
java swingjava swing
java swing
 
layout-manager-tutorial.pdf
layout-manager-tutorial.pdflayout-manager-tutorial.pdf
layout-manager-tutorial.pdf
 
Qt Workshop
Qt WorkshopQt Workshop
Qt Workshop
 
Es04
Es04Es04
Es04
 
Draw2D
Draw2DDraw2D
Draw2D
 
GWT 2 Is Smarter Than You
GWT 2 Is Smarter Than YouGWT 2 Is Smarter Than You
GWT 2 Is Smarter Than You
 
Cassandra v3.0 at Rakuten meet-up on 12/2/2015
Cassandra v3.0 at Rakuten meet-up on 12/2/2015Cassandra v3.0 at Rakuten meet-up on 12/2/2015
Cassandra v3.0 at Rakuten meet-up on 12/2/2015
 
Model-Driven Software Development - Context-Sensitive Transformation
Model-Driven Software Development - Context-Sensitive TransformationModel-Driven Software Development - Context-Sensitive Transformation
Model-Driven Software Development - Context-Sensitive Transformation
 
On a cell phone form factor, ONLY the list fragment shows, or the .pdf
On a cell phone form factor, ONLY the list fragment shows, or the .pdfOn a cell phone form factor, ONLY the list fragment shows, or the .pdf
On a cell phone form factor, ONLY the list fragment shows, or the .pdf
 
Creating Ext GWT Extensions and Components
Creating Ext GWT Extensions and ComponentsCreating Ext GWT Extensions and Components
Creating Ext GWT Extensions and Components
 
Android data binding
Android data bindingAndroid data binding
Android data binding
 
Js info vis_toolkit
Js info vis_toolkitJs info vis_toolkit
Js info vis_toolkit
 
Flutter State Management Using GetX.pdf
Flutter State Management Using GetX.pdfFlutter State Management Using GetX.pdf
Flutter State Management Using GetX.pdf
 
TY.BSc.IT Java QB U1
TY.BSc.IT Java QB U1TY.BSc.IT Java QB U1
TY.BSc.IT Java QB U1
 

Plus de Sencha

Plus de Sencha (20)

Breathe New Life into Your Existing JavaScript Applications with Web Components
Breathe New Life into Your Existing JavaScript Applications with Web ComponentsBreathe New Life into Your Existing JavaScript Applications with Web Components
Breathe New Life into Your Existing JavaScript Applications with Web Components
 
Ext JS 6.6 Highlights
Ext JS 6.6 HighlightsExt JS 6.6 Highlights
Ext JS 6.6 Highlights
 
Sencha Roadshow 2017: BufferedStore Internals featuring eyeworkers interactiv...
Sencha Roadshow 2017: BufferedStore Internals featuring eyeworkers interactiv...Sencha Roadshow 2017: BufferedStore Internals featuring eyeworkers interactiv...
Sencha Roadshow 2017: BufferedStore Internals featuring eyeworkers interactiv...
 
Sencha Roadshow 2017: Build Progressive Web Apps with Ext JS and Cmd
Sencha Roadshow 2017: Build Progressive Web Apps with Ext JS and Cmd Sencha Roadshow 2017: Build Progressive Web Apps with Ext JS and Cmd
Sencha Roadshow 2017: Build Progressive Web Apps with Ext JS and Cmd
 
Sencha Roadshow 2017: Best Practices for Implementing Continuous Web App Testing
Sencha Roadshow 2017: Best Practices for Implementing Continuous Web App TestingSencha Roadshow 2017: Best Practices for Implementing Continuous Web App Testing
Sencha Roadshow 2017: Best Practices for Implementing Continuous Web App Testing
 
Sencha Roadshow 2017: What's New in Sencha Test
Sencha Roadshow 2017: What's New in Sencha TestSencha Roadshow 2017: What's New in Sencha Test
Sencha Roadshow 2017: What's New in Sencha Test
 
Sencha Roadshow 2017: Sencha Upgrades - The Good. The Bad. The Ugly - Eva Luc...
Sencha Roadshow 2017: Sencha Upgrades - The Good. The Bad. The Ugly - Eva Luc...Sencha Roadshow 2017: Sencha Upgrades - The Good. The Bad. The Ugly - Eva Luc...
Sencha Roadshow 2017: Sencha Upgrades - The Good. The Bad. The Ugly - Eva Luc...
 
Sencha Roadshow 2017: Modernizing the Ext JS Class System and Tooling
Sencha Roadshow 2017: Modernizing the Ext JS Class System and ToolingSencha Roadshow 2017: Modernizing the Ext JS Class System and Tooling
Sencha Roadshow 2017: Modernizing the Ext JS Class System and Tooling
 
Sencha Roadshow 2017: Sencha Best Practices: Coworkee App
Sencha Roadshow 2017: Sencha Best Practices: Coworkee App Sencha Roadshow 2017: Sencha Best Practices: Coworkee App
Sencha Roadshow 2017: Sencha Best Practices: Coworkee App
 
Sencha Roadshow 2017: Mobile First or Desktop First
Sencha Roadshow 2017: Mobile First or Desktop FirstSencha Roadshow 2017: Mobile First or Desktop First
Sencha Roadshow 2017: Mobile First or Desktop First
 
Sencha Roadshow 2017: Innovations in Ext JS 6.5 and Beyond
Sencha Roadshow 2017: Innovations in Ext JS 6.5 and BeyondSencha Roadshow 2017: Innovations in Ext JS 6.5 and Beyond
Sencha Roadshow 2017: Innovations in Ext JS 6.5 and Beyond
 
Leveraging React and GraphQL to Create a Performant, Scalable Data Grid
Leveraging React and GraphQL to Create a Performant, Scalable Data GridLeveraging React and GraphQL to Create a Performant, Scalable Data Grid
Leveraging React and GraphQL to Create a Performant, Scalable Data Grid
 
Learn Key Insights from The State of Web Application Testing Research Report
Learn Key Insights from The State of Web Application Testing Research ReportLearn Key Insights from The State of Web Application Testing Research Report
Learn Key Insights from The State of Web Application Testing Research Report
 
Introducing ExtReact: Adding Powerful Sencha Components to React Apps
Introducing ExtReact: Adding Powerful Sencha Components to React AppsIntroducing ExtReact: Adding Powerful Sencha Components to React Apps
Introducing ExtReact: Adding Powerful Sencha Components to React Apps
 
SenchaCon 2016: Keynote Presentation - Art Landro, Gautam Agrawal, Mark Brocato
SenchaCon 2016: Keynote Presentation - Art Landro, Gautam Agrawal, Mark BrocatoSenchaCon 2016: Keynote Presentation - Art Landro, Gautam Agrawal, Mark Brocato
SenchaCon 2016: Keynote Presentation - Art Landro, Gautam Agrawal, Mark Brocato
 
SenchaCon 2016: Add Magic to Your Ext JS Apps with D3 Visualizations - Vitaly...
SenchaCon 2016: Add Magic to Your Ext JS Apps with D3 Visualizations - Vitaly...SenchaCon 2016: Add Magic to Your Ext JS Apps with D3 Visualizations - Vitaly...
SenchaCon 2016: Add Magic to Your Ext JS Apps with D3 Visualizations - Vitaly...
 
SenchaCon 2016: LinkRest - Modern RESTful API Framework for Ext JS Apps - Rou...
SenchaCon 2016: LinkRest - Modern RESTful API Framework for Ext JS Apps - Rou...SenchaCon 2016: LinkRest - Modern RESTful API Framework for Ext JS Apps - Rou...
SenchaCon 2016: LinkRest - Modern RESTful API Framework for Ext JS Apps - Rou...
 
SenchaCon 2016: Expect the Unexpected - Dealing with Errors in Web Apps
SenchaCon 2016: Expect the Unexpected - Dealing with Errors in Web AppsSenchaCon 2016: Expect the Unexpected - Dealing with Errors in Web Apps
SenchaCon 2016: Expect the Unexpected - Dealing with Errors in Web Apps
 
Ext JS Architecture Best Practices - Mitchell Simeons
Ext JS Architecture Best Practices - Mitchell SimeonsExt JS Architecture Best Practices - Mitchell Simeons
Ext JS Architecture Best Practices - Mitchell Simeons
 
SenchaCon 2016: Mobile First? Desktop First? Or Should you Think Universal Ap...
SenchaCon 2016: Mobile First? Desktop First? Or Should you Think Universal Ap...SenchaCon 2016: Mobile First? Desktop First? Or Should you Think Universal Ap...
SenchaCon 2016: Mobile First? Desktop First? Or Should you Think Universal Ap...
 

Dernier

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Dernier (20)

Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 

Ext GWT 3.0 Layouts

  • 2. LAYOUTS Sven Brunken sven@sencha.com @svenbrunken Wednesday, November 2, 11
  • 3. Overview Why did we change it? What changed? GXT 2 to GXT 3 Usage examples Questions Wednesday, November 2, 11
  • 4. Why Did We Change It? Wednesday, November 2, 11
  • 5. Why Did We Change It? Steep learning curve of the layout system in GXT 2 Hard to use and maintain UiBinder support not possible No clean separation of logic between container and layout Wednesday, November 2, 11
  • 6. What’s New Or Different? Wednesday, November 2, 11
  • 7. What’s New Or Different? UiBinder support including layout data Typed API Clearer inheritance structure DOM structure building GWT interface based GWT Widget class supported natively without wrapping Wednesday, November 2, 11
  • 8. UiBinder Support GWT does not allow custom parsers to be registered Uses the @UiChild annotation Requires a typed API <ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder'...> <container:CenterLayoutContainer> <gxt:ContentPanel bodyStyle="padding: 6px" headingText="CenterLayout" width="200"> <g:Label text="I should be centered" /> </gxt:ContentPanel> </container:CenterLayoutContainer> </ui:UiBinder> Wednesday, November 2, 11
  • 9. Typed API Easy to learn Code completion and code assist from your favorite IDE Only correct LayoutData can be used, IDE code checks BorderLayoutContainer con = new BorderLayoutContainer(); con.setBorders(true); con.setNorthWidget(north, northData); con.setWestWidget(west, westData); con.setCenterWidget(center, centerData); con.setEastWidget(east, eastData); con.setSouthWidget(south, southData); Wednesday, November 2, 11
  • 11. Layouts 2.0 3.0 BorderLayout BorderLayoutContainer Container CenterLayout CenterLayoutContainer FlowLayout FlowLayoutContainer Wednesday, November 2, 11
  • 12. Component Container AbstractHtmlLayout Insert Resize HtmlLayout FlowLayout InsertResize Simple BoxLayout CardLayout Viewport CssFloatLayout ContentPanel HBoxLayout HorizontalLayout BorderLayout VBoxLayout VerticalLayout Wednesday, November 2, 11
  • 13. DOM Structure Building 2.0 Child widget’s DOM not connected to container when inserted Only occurs after layout executed, element by element 3.0 Element is inserted into its parent directly after insertion into container Insert your Viewport with all child elements in one chunk Wednesday, November 2, 11
  • 14. GWT Interface Based Supports for HasWidgets, IndexPanel, InsertPanel, HasOneWidget, RequiresResize and ProvidesResize Based on the IsWidget interface public abstract class Container extends Component implements HasWidgets.ForIsWidget, IndexedPanel.ForIsWidget public abstract class ResizeContainer extends Container implements ProvidesResize public class SimpleContainer extends ResizeContainer implements HasOneWidget public void add(IsWidget child) { this.add(asWidgetOrNull(child)); } public void insert(IsWidget w, int beforeIndex) { insert(asWidgetOrNull(w), beforeIndex); } Wednesday, November 2, 11
  • 15. Native Widget Support 2.0 Widgets wrapped in WidgetComponent 3.0 Direct support of Widgets, no wrapping Parent <-> Child relationship as expected Support for the GWT LayoutPanel classes Wednesday, November 2, 11
  • 16. GWT / GXT Interoperability Example Wednesday, November 2, 11
  • 17. LayoutPanel Integration Example shows LayoutPanels and Containers used together VerticalLayoutContainer -> DockPanel -> ContentPanel Wednesday, November 2, 11
  • 18. LayoutPanel Integration VerticalLayoutContainer con = new VerticalLayoutContainer(); con.setPixelSize(400, 300); ToolBar t = new ToolBar(); ... con.add(t, new VerticalLayoutData(1, -1)); ContentPanel cp1 = new ContentPanel(); cp1.setHeadingText("North"); ContentPanel cp2 = new ContentPanel(); cp2.setHeadingText("Center"); ContentPanel cp3 = new ContentPanel(); cp3.setHeadingText("East"); DockLayoutPanel dock = new DockLayoutPanel(Unit.PCT); dock.addNorth(cp1, 20); dock.addEast(cp3, 10); dock.add(cp2); con.add(dock, new VerticalLayoutData(1, 1)); Wednesday, November 2, 11
  • 20. Important LayoutContainers Wednesday, November 2, 11
  • 21. Container Holds the base container logic Implements the HasWidget interface Does not do any resizing of its children Wednesday, November 2, 11
  • 22. ResizeContainer Extends Container Implements the ProvidesResize and RequiresResize interfaces Sizes its children forceLayout bubbles to children of ResizeContainer at any level Wednesday, November 2, 11
  • 23. InsertContainer Extends Container Implements the InsertPanel interface Adds Widget and IsWidget insert support to Container Wednesday, November 2, 11
  • 24. InsertResizeContainer Extends ResizeContainer Implements the InsertPanel interface Adds Widget and IsWidget insert support to ResizeContainer Wednesday, November 2, 11
  • 25. GXT 2 To GXT 3 Wednesday, November 2, 11
  • 26. BorderLayout in Explorer Demo Wednesday, November 2, 11
  • 27. GXT 2 BorderLayout LayoutContainer con = new LayoutContainer(); con.setLayout(new BorderLayout()); con.setBorders(true); ContentPanel west = new ContentPanel(); ContentPanel center = new ContentPanel(); center.setHeading("BorderLayout Example"); BorderLayoutData westData = new BorderLayoutData(LayoutRegion.WEST, 150); westData.setCollapsible(true); westData.setSplit(true); westData.setMargins(new Margins(0, 5, 0, 5)); BorderLayoutData centerData = new BorderLayoutData(LayoutRegion.CENTER); con.add(west, westData); con.add(center, centerData); Wednesday, November 2, 11
  • 28. GXT 3 BorderLayout BorderLayoutContainer con = new BorderLayoutContainer(); con.setBorders(true); ContentPanel west = new ContentPanel(); ContentPanel center = new ContentPanel(); center.setHeadingText("BorderLayout Example"); BorderLayoutData westData = new BorderLayoutData(150); westData.setCollapsible(true); westData.setSplit(true); westData.setMargins(new Margins(0, 5, 0, 5)); MarginData centerData = new MarginData(); con.setWestWidget(west, westData); con.setCenterWidget(center, centerData); Wednesday, November 2, 11