SlideShare uma empresa Scribd logo
1 de 47
Baixar para ler offline
Wednesday, November 2, 2011
THEMING & APPEARANCES
                              Darrell Meyer, Sencha



             darrell@sencha.com                  @darrellmeyer




Wednesday, November 2, 2011
Overview
                                 2.0 Theming
                               GWT ClientBundle
                              Appearance Pattern
                                 3.0 Themes
                                  Examples




Wednesday, November 2, 2011
2.0 Themes




Wednesday, November 2, 2011
2.0 Themes
       Single monolithic CSS file (gxt-all.css)
       Static images referenced by CSS
       Manual image spriting
       CSS contains all browser specific styles




Wednesday, November 2, 2011
Wednesday, November 2, 2011
Wednesday, November 2, 2011
Wednesday, November 2, 2011
Wednesday, November 2, 2011
Wednesday, November 2, 2011
Wednesday, November 2, 2011
Wednesday, November 2, 2011
Wednesday, November 2, 2011
A Better Approach




Wednesday, November 2, 2011
GWT ClientBundle




Wednesday, November 2, 2011
ClientBundle
       Ensures resources are cached
       Removes unneeded roundtrips to server
       Data URLs
       JSON Bundles
       Image inlining

       Relevant resource types
       ImageResource
       CssResource




Wednesday, November 2, 2011
ImageResource
       Compile time image processing
       Efficient access to image data at runtime
       Automatic image spriting with ClientBundle

       Image options
       RTL
       Repeat style
       Prevent inlining




Wednesday, November 2, 2011
ImageResource Code
     public interface TextFieldResources extends ClientBundle {

         @ImageOptions(repeatStyle = RepeatStyle.Horizontal)
         ImageResource textBackground();

         @Source("doubleright2.gif")
         @ImageOptions(repeatStyle = RepeatStyle.None, preventInlining = true)
         ImageResource allRight();
     }

     // create via deferred binding
     TextFieldResources r = GWT.create(TextFieldResources.class);




Wednesday, November 2, 2011
CssResource
       Selected key features
       Constants
       Runtime substitution
       Conditional CSS
       ImageSprites

       See the link below for detailed information on all features




Wednesday, November 2, 2011
CssResource Constants
            @def tabMargin 2px;
            @def tabMinWidth 30px;
            @def tabWidth 120px;

            .tabItem {
               width: tabMinWidth;
             }



             public       interface TabPanelBaseStyle extends CssResource {
                int       tabMargin();
                int       tabMinWidth();
                int       tabWidth();
              }




Wednesday, November 2, 2011
CssResource
       Runtime Substitution
       Evaluate static methods when styles injected




     @eval SPLIT package.ImageHelper.createModuleBasedUrl("images/split.gif");
     .split {
       background-image: SPLIT;
     }




Wednesday, November 2, 2011
CssResource Conditionals
       Good for browser quirks
       Unused styles pruned



                       @if user.agent ie6 ie8 {
                         .proxy {
                           filter: literal("alpha(opacity=50)");
                         }
                       } @else {
                         .proxy {
                           opacity: 0.5;
                         }
                       }



Wednesday, November 2, 2011
CssResource Sprites
       Automatic image spriting with ImageResource
       @sprite in CSS




                              @sprite .split {
                                gwt-image: 'split';
                              }




Wednesday, November 2, 2011
Appearance Pattern




Wednesday, November 2, 2011
Appearance Pattern
       Renders the “view” via a SafeHtml string
       Responsible for HTML structure and styles
       Responds to state changes
       Appearance pattern applied to both widgets and cells
       Two ways of using custom appearances
       Pass to constructor of widget or cell
       Use module rule

                                                     ClientBundle


                Widget        Appearance             CssResource


                                                      XTemplate


Wednesday, November 2, 2011
Appearance Interaction
                                 Widget                Cell




                                          Appearance
                                           Interface




                              Sencha Base                 Custom




               Blue              Gray              Custom

Wednesday, November 2, 2011
Appearance Details
       Appearances are stateless and reused
       Render method receives passed SafeHtmlBuilder
       Must pass parent element to methods for context




     public interface ProgressBarAppearance {

          void render(SafeHtmlBuilder sb, double value, int width);

          void updateText(XElement parent, String text);

     }




Wednesday, November 2, 2011
Ext GWT 3 Themes




Wednesday, November 2, 2011
3.0 Themes
       Themes are module based
       Theme module defines what appearances are used
       May override individual rules as needed
       Themes can’t be switched at runtime



          <!-- Default theme is Blue -->
          <inherits name="com.sencha.gxt.theme.blue.Blue" />




Wednesday, November 2, 2011
Appearance Selection
      Module Rules


     <replace-with class="com.sencha.gxt.theme.blue.client.BlueWindowAppearance">
       <when-type-is class="com.sencha.gxt.widget.core.client.WindowAppearance" />
     </replace-with>




Wednesday, November 2, 2011
Appearance Selection
      Constructor


               MyAppearance custom = GWT.create(MyAppearance.class);
               Window window = new Window(custom);




Wednesday, November 2, 2011
Example




Wednesday, November 2, 2011
ProgressBarCell

          public ProgressBarCell() {
            this(GWT.<ProgressBarAppearance> create(ProgressBarAppearance.class));
          }

          public ProgressBarCell(ProgressBarAppearance appearance) {
            this.appearance = appearance;
          }




Wednesday, November 2, 2011
public static interface ProgressBarAppearance {

              void render(SafeHtmlBuilder sb, Double value, int width);

              void updateText(XElement parent, String text);

          }




Wednesday, November 2, 2011
@Override
         public void render(Context context, Double value, SafeHtmlBuilder sb) {
           appearance.render(sb, value, getWidth());
         }




Wednesday, November 2, 2011
public class ProgressBarDefaultAppearance implements
         ProgressBarAppearance {

             public interface ProgressBarResources {

                 ImageResource bar();

                 ProgressBarStyle style();
             }

             public interface ProgressBarStyle extends CssResource {

                 String progressBar();

                 String progressInner();

                 .....

             }




Wednesday, November 2, 2011
public interface BlueProgressBarResources extends ProgressBarResources,
   ClientBundle {

           @Source("progress-bg.gif")
           @Override
           @ImageOptions(repeatStyle = RepeatStyle.Horizontal)
           ImageResource bar();
       }




                         @sprite .progressBar {
                           background-color:#9cbfee;
                           gwt-image: 'bar';
                           background-repeat: repeat-x;
                           background-position: left center;
                           height: 18px;
                           border-top-color:#d1e4fd;
                           border-bottom-color:#7fa9e4;
                           border-right-color:#7fa9e4;
                         }


Wednesday, November 2, 2011
@Override
      public void render(SafeHtmlBuilder sb, Double value, int width) {
        value = value == null ? 0D : value;
        value = value * width;

          sb.appendHtmlConstant("<div class=" + style.progressWrap() + ">");
          sb.appendHtmlConstant("<div class=" + style.progressInner() + ">");

      sb.appendHtmlConstant("<div class='" + style.progressBar() + "' style='width: " +
  value + "px'>");
      sb.appendHtmlConstant("<div class=" + style.progressText() + " style='width: " +
  (value - 8) + "px'>");
      sb.appendHtmlConstant("<div style='width:" + width + "px'>&#160;</div>");
      sb.appendHtmlConstant("</div>");

      sb.appendHtmlConstant("<div class='" + style.progressText() + " " +
  style.progressTextBack() + "'>");
      sb.appendHtmlConstant("<div style='width:" + width + "px'>&#160;</div>");
      sb.appendHtmlConstant("</div>");

          sb.appendHtmlConstant("</div>");
          sb.appendHtmlConstant("</div>");
      }




Wednesday, November 2, 2011
@Override
     public void updateText(XElement parent, String text) {
       getTopElem(parent).getFirstChildElement().setInnerHTML(Util.isEmptyString
   (text) ? "&#160;" : text);
       getBackElem(parent).getFirstChildElement().setInnerHTML(Util.isEmptyString
   (text) ? "&#160;" : text);
     }

       protected XElement getBackElem(XElement parent) {
         return parent.selectNode("." + style.progressTextBack());
       }

       protected XElement getTopElem(XElement parent) {
         return parent.selectNode("." + style.progressText());
       }




Wednesday, November 2, 2011
<replace-with
    class="com.sencha.gxt.theme.blue.client.progress.BlueProgressBarAppearance">
        <when-type-is
    class="com.sencha.gxt.cell.core.client.ProgressBarCell.ProgressBarAppearance" />
      </replace-with>




Wednesday, November 2, 2011
Wednesday, November 2, 2011
Wednesday, November 2, 2011
Wednesday, November 2, 2011
Wednesday, November 2, 2011
Wednesday, November 2, 2011
Wednesday, November 2, 2011
Questions




Wednesday, November 2, 2011

Mais conteúdo relacionado

Mais procurados

Writing Maintainable JavaScript
Writing Maintainable JavaScriptWriting Maintainable JavaScript
Writing Maintainable JavaScriptAndrew Dupont
 
Event handling using jQuery
Event handling using jQueryEvent handling using jQuery
Event handling using jQueryIban Martinez
 
Using Templates to Achieve Awesomer Architecture
Using Templates to Achieve Awesomer ArchitectureUsing Templates to Achieve Awesomer Architecture
Using Templates to Achieve Awesomer ArchitectureGarann Means
 
JQuery New Evolution
JQuery New EvolutionJQuery New Evolution
JQuery New EvolutionAllan Huang
 
Annihilate test smells by refactoring to patterns
Annihilate test smells by refactoring to patternsAnnihilate test smells by refactoring to patterns
Annihilate test smells by refactoring to patternscenny2
 
First java-server-faces-tutorial-en
First java-server-faces-tutorial-enFirst java-server-faces-tutorial-en
First java-server-faces-tutorial-entechbed
 
Scalable JavaScript
Scalable JavaScriptScalable JavaScript
Scalable JavaScriptYnon Perek
 
Organizing Code with JavascriptMVC
Organizing Code with JavascriptMVCOrganizing Code with JavascriptMVC
Organizing Code with JavascriptMVCThomas Reynolds
 
Symfony2 from the Trenches
Symfony2 from the TrenchesSymfony2 from the Trenches
Symfony2 from the TrenchesJonathan Wage
 
Command-Oriented Architecture
Command-Oriented ArchitectureCommand-Oriented Architecture
Command-Oriented ArchitectureLuiz Messias
 
Database madness with_mongoengine_and_sql_alchemy
Database madness with_mongoengine_and_sql_alchemyDatabase madness with_mongoengine_and_sql_alchemy
Database madness with_mongoengine_and_sql_alchemyJaime Buelta
 
jQuery Fundamentals
jQuery FundamentalsjQuery Fundamentals
jQuery FundamentalsGil Fink
 
Windows 8 Training Fundamental - 1
Windows 8 Training Fundamental - 1Windows 8 Training Fundamental - 1
Windows 8 Training Fundamental - 1Kevin Octavian
 

Mais procurados (20)

Amp Up Your Admin
Amp Up Your AdminAmp Up Your Admin
Amp Up Your Admin
 
Writing Maintainable JavaScript
Writing Maintainable JavaScriptWriting Maintainable JavaScript
Writing Maintainable JavaScript
 
Event handling using jQuery
Event handling using jQueryEvent handling using jQuery
Event handling using jQuery
 
Django - sql alchemy - jquery
Django - sql alchemy - jqueryDjango - sql alchemy - jquery
Django - sql alchemy - jquery
 
Using Templates to Achieve Awesomer Architecture
Using Templates to Achieve Awesomer ArchitectureUsing Templates to Achieve Awesomer Architecture
Using Templates to Achieve Awesomer Architecture
 
Functions
FunctionsFunctions
Functions
 
JQuery New Evolution
JQuery New EvolutionJQuery New Evolution
JQuery New Evolution
 
Annihilate test smells by refactoring to patterns
Annihilate test smells by refactoring to patternsAnnihilate test smells by refactoring to patterns
Annihilate test smells by refactoring to patterns
 
First java-server-faces-tutorial-en
First java-server-faces-tutorial-enFirst java-server-faces-tutorial-en
First java-server-faces-tutorial-en
 
Scalable JavaScript
Scalable JavaScriptScalable JavaScript
Scalable JavaScript
 
jQuery, CSS3 and ColdFusion
jQuery, CSS3 and ColdFusionjQuery, CSS3 and ColdFusion
jQuery, CSS3 and ColdFusion
 
Your Entity, Your Code
Your Entity, Your CodeYour Entity, Your Code
Your Entity, Your Code
 
Organizing Code with JavascriptMVC
Organizing Code with JavascriptMVCOrganizing Code with JavascriptMVC
Organizing Code with JavascriptMVC
 
Symfony2 from the Trenches
Symfony2 from the TrenchesSymfony2 from the Trenches
Symfony2 from the Trenches
 
BVJS
BVJSBVJS
BVJS
 
Command-Oriented Architecture
Command-Oriented ArchitectureCommand-Oriented Architecture
Command-Oriented Architecture
 
Terrific Frontends
Terrific FrontendsTerrific Frontends
Terrific Frontends
 
Database madness with_mongoengine_and_sql_alchemy
Database madness with_mongoengine_and_sql_alchemyDatabase madness with_mongoengine_and_sql_alchemy
Database madness with_mongoengine_and_sql_alchemy
 
jQuery Fundamentals
jQuery FundamentalsjQuery Fundamentals
jQuery Fundamentals
 
Windows 8 Training Fundamental - 1
Windows 8 Training Fundamental - 1Windows 8 Training Fundamental - 1
Windows 8 Training Fundamental - 1
 

Semelhante a Sencha GXT Theming and Appearances Presentation

Ext GWT 3.0 Advanced Templates
Ext GWT 3.0 Advanced TemplatesExt GWT 3.0 Advanced Templates
Ext GWT 3.0 Advanced TemplatesSencha
 
Community Code: Xero
Community Code: XeroCommunity Code: Xero
Community Code: XeroSencha
 
Best Practices in Ext GWT
Best Practices in Ext GWTBest Practices in Ext GWT
Best Practices in Ext GWTSencha
 
HTML5: Building for a Faster Web
HTML5: Building for a Faster WebHTML5: Building for a Faster Web
HTML5: Building for a Faster WebEric Bidelman
 
Charting & Data Visualization in Ext GWT 3.0
Charting & Data Visualization in Ext GWT 3.0Charting & Data Visualization in Ext GWT 3.0
Charting & Data Visualization in Ext GWT 3.0Sencha
 
Using object dependencies in sql server 2008 tech republic
Using object dependencies in sql server 2008   tech republicUsing object dependencies in sql server 2008   tech republic
Using object dependencies in sql server 2008 tech republicKaing Menglieng
 
How to Extend Axure's Animation Capability
How to Extend Axure's Animation CapabilityHow to Extend Axure's Animation Capability
How to Extend Axure's Animation CapabilitySvetlin Denkov
 
Mapnik2 Performance, September 2011
Mapnik2 Performance, September 2011Mapnik2 Performance, September 2011
Mapnik2 Performance, September 2011Development Seed
 
HTML5: Building the Next Generation of Web Applications
HTML5: Building the Next Generation of Web ApplicationsHTML5: Building the Next Generation of Web Applications
HTML5: Building the Next Generation of Web ApplicationsChrome Developer Relations
 
Introduction to XAML and its features
Introduction to XAML and its featuresIntroduction to XAML and its features
Introduction to XAML and its featuresAbhishek Sur
 
Building mobile web apps with Mobello
Building mobile web apps with MobelloBuilding mobile web apps with Mobello
Building mobile web apps with MobelloJeong-Geun Kim
 
5 x HTML5 worth using in APEX (5)
5 x HTML5 worth using in APEX (5)5 x HTML5 worth using in APEX (5)
5 x HTML5 worth using in APEX (5)Christian Rokitta
 
OR Mapping- nhibernate Presentation
OR Mapping- nhibernate PresentationOR Mapping- nhibernate Presentation
OR Mapping- nhibernate PresentationShahzad
 
Ejb3 Struts Tutorial En
Ejb3 Struts Tutorial EnEjb3 Struts Tutorial En
Ejb3 Struts Tutorial EnAnkur Dongre
 

Semelhante a Sencha GXT Theming and Appearances Presentation (20)

Ext GWT 3.0 Advanced Templates
Ext GWT 3.0 Advanced TemplatesExt GWT 3.0 Advanced Templates
Ext GWT 3.0 Advanced Templates
 
Community Code: Xero
Community Code: XeroCommunity Code: Xero
Community Code: Xero
 
Stephanie Rewis - css-startech
Stephanie Rewis -  css-startechStephanie Rewis -  css-startech
Stephanie Rewis - css-startech
 
Best Practices in Ext GWT
Best Practices in Ext GWTBest Practices in Ext GWT
Best Practices in Ext GWT
 
HTML5: Building for a Faster Web
HTML5: Building for a Faster WebHTML5: Building for a Faster Web
HTML5: Building for a Faster Web
 
Charting & Data Visualization in Ext GWT 3.0
Charting & Data Visualization in Ext GWT 3.0Charting & Data Visualization in Ext GWT 3.0
Charting & Data Visualization in Ext GWT 3.0
 
Using object dependencies in sql server 2008 tech republic
Using object dependencies in sql server 2008   tech republicUsing object dependencies in sql server 2008   tech republic
Using object dependencies in sql server 2008 tech republic
 
Greg rewis move-itsession
Greg rewis move-itsessionGreg rewis move-itsession
Greg rewis move-itsession
 
How to Extend Axure's Animation Capability
How to Extend Axure's Animation CapabilityHow to Extend Axure's Animation Capability
How to Extend Axure's Animation Capability
 
Mapnik2 Performance, September 2011
Mapnik2 Performance, September 2011Mapnik2 Performance, September 2011
Mapnik2 Performance, September 2011
 
HTML5: Building the Next Generation of Web Applications
HTML5: Building the Next Generation of Web ApplicationsHTML5: Building the Next Generation of Web Applications
HTML5: Building the Next Generation of Web Applications
 
Introduction to XAML and its features
Introduction to XAML and its featuresIntroduction to XAML and its features
Introduction to XAML and its features
 
Building mobile web apps with Mobello
Building mobile web apps with MobelloBuilding mobile web apps with Mobello
Building mobile web apps with Mobello
 
Struts2.x
Struts2.xStruts2.x
Struts2.x
 
Lobos Introduction
Lobos IntroductionLobos Introduction
Lobos Introduction
 
Mpeg 7 Service Oriented System by Florian
Mpeg 7 Service Oriented System   by  FlorianMpeg 7 Service Oriented System   by  Florian
Mpeg 7 Service Oriented System by Florian
 
5 x HTML5 worth using in APEX (5)
5 x HTML5 worth using in APEX (5)5 x HTML5 worth using in APEX (5)
5 x HTML5 worth using in APEX (5)
 
OR Mapping- nhibernate Presentation
OR Mapping- nhibernate PresentationOR Mapping- nhibernate Presentation
OR Mapping- nhibernate Presentation
 
CSS 3
CSS 3CSS 3
CSS 3
 
Ejb3 Struts Tutorial En
Ejb3 Struts Tutorial EnEjb3 Struts Tutorial En
Ejb3 Struts Tutorial En
 

Mais de Sencha

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 ComponentsSencha
 
Ext JS 6.6 Highlights
Ext JS 6.6 HighlightsExt JS 6.6 Highlights
Ext JS 6.6 HighlightsSencha
 
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
 
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
 
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 TestingSencha
 
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 TestSencha
 
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
 
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 ToolingSencha
 
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
 
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 FirstSencha
 
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 BeyondSencha
 
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 GridSencha
 
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 ReportSencha
 
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 AppsSencha
 
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 BrocatoSencha
 
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...Sencha
 
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...Sencha
 
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 AppsSencha
 
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 SimeonsSencha
 
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...Sencha
 

Mais 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...
 

Último

UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPathCommunity
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI AgeCprime
 
React Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkReact Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkPixlogix Infotech
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfpanagenda
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsRavi Sanghani
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Alkin Tezuysal
 
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesMuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesManik S Magar
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Nikki Chapple
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Kaya Weers
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 
Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024TopCSSGallery
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfIngrid Airi González
 

Último (20)

UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to Hero
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI Age
 
React Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkReact Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App Framework
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesMuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 
Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdf
 

Sencha GXT Theming and Appearances Presentation

  • 2. THEMING & APPEARANCES Darrell Meyer, Sencha darrell@sencha.com @darrellmeyer Wednesday, November 2, 2011
  • 3. Overview 2.0 Theming GWT ClientBundle Appearance Pattern 3.0 Themes Examples Wednesday, November 2, 2011
  • 5. 2.0 Themes Single monolithic CSS file (gxt-all.css) Static images referenced by CSS Manual image spriting CSS contains all browser specific styles Wednesday, November 2, 2011
  • 14. A Better Approach Wednesday, November 2, 2011
  • 16. ClientBundle Ensures resources are cached Removes unneeded roundtrips to server Data URLs JSON Bundles Image inlining Relevant resource types ImageResource CssResource Wednesday, November 2, 2011
  • 17. ImageResource Compile time image processing Efficient access to image data at runtime Automatic image spriting with ClientBundle Image options RTL Repeat style Prevent inlining Wednesday, November 2, 2011
  • 18. ImageResource Code public interface TextFieldResources extends ClientBundle { @ImageOptions(repeatStyle = RepeatStyle.Horizontal) ImageResource textBackground(); @Source("doubleright2.gif") @ImageOptions(repeatStyle = RepeatStyle.None, preventInlining = true) ImageResource allRight(); } // create via deferred binding TextFieldResources r = GWT.create(TextFieldResources.class); Wednesday, November 2, 2011
  • 19. CssResource Selected key features Constants Runtime substitution Conditional CSS ImageSprites See the link below for detailed information on all features Wednesday, November 2, 2011
  • 20. CssResource Constants @def tabMargin 2px; @def tabMinWidth 30px; @def tabWidth 120px; .tabItem { width: tabMinWidth; } public interface TabPanelBaseStyle extends CssResource { int tabMargin(); int tabMinWidth(); int tabWidth(); } Wednesday, November 2, 2011
  • 21. CssResource Runtime Substitution Evaluate static methods when styles injected @eval SPLIT package.ImageHelper.createModuleBasedUrl("images/split.gif"); .split { background-image: SPLIT; } Wednesday, November 2, 2011
  • 22. CssResource Conditionals Good for browser quirks Unused styles pruned @if user.agent ie6 ie8 { .proxy { filter: literal("alpha(opacity=50)"); } } @else { .proxy { opacity: 0.5; } } Wednesday, November 2, 2011
  • 23. CssResource Sprites Automatic image spriting with ImageResource @sprite in CSS @sprite .split { gwt-image: 'split'; } Wednesday, November 2, 2011
  • 25. Appearance Pattern Renders the “view” via a SafeHtml string Responsible for HTML structure and styles Responds to state changes Appearance pattern applied to both widgets and cells Two ways of using custom appearances Pass to constructor of widget or cell Use module rule ClientBundle Widget Appearance CssResource XTemplate Wednesday, November 2, 2011
  • 26. Appearance Interaction Widget Cell Appearance Interface Sencha Base Custom Blue Gray Custom Wednesday, November 2, 2011
  • 27. Appearance Details Appearances are stateless and reused Render method receives passed SafeHtmlBuilder Must pass parent element to methods for context public interface ProgressBarAppearance { void render(SafeHtmlBuilder sb, double value, int width); void updateText(XElement parent, String text); } Wednesday, November 2, 2011
  • 28. Ext GWT 3 Themes Wednesday, November 2, 2011
  • 29. 3.0 Themes Themes are module based Theme module defines what appearances are used May override individual rules as needed Themes can’t be switched at runtime <!-- Default theme is Blue --> <inherits name="com.sencha.gxt.theme.blue.Blue" /> Wednesday, November 2, 2011
  • 30. Appearance Selection Module Rules <replace-with class="com.sencha.gxt.theme.blue.client.BlueWindowAppearance"> <when-type-is class="com.sencha.gxt.widget.core.client.WindowAppearance" /> </replace-with> Wednesday, November 2, 2011
  • 31. Appearance Selection Constructor MyAppearance custom = GWT.create(MyAppearance.class); Window window = new Window(custom); Wednesday, November 2, 2011
  • 33. ProgressBarCell public ProgressBarCell() { this(GWT.<ProgressBarAppearance> create(ProgressBarAppearance.class)); } public ProgressBarCell(ProgressBarAppearance appearance) { this.appearance = appearance; } Wednesday, November 2, 2011
  • 34. public static interface ProgressBarAppearance { void render(SafeHtmlBuilder sb, Double value, int width); void updateText(XElement parent, String text); } Wednesday, November 2, 2011
  • 35. @Override public void render(Context context, Double value, SafeHtmlBuilder sb) { appearance.render(sb, value, getWidth()); } Wednesday, November 2, 2011
  • 36. public class ProgressBarDefaultAppearance implements ProgressBarAppearance { public interface ProgressBarResources { ImageResource bar(); ProgressBarStyle style(); } public interface ProgressBarStyle extends CssResource { String progressBar(); String progressInner(); ..... } Wednesday, November 2, 2011
  • 37. public interface BlueProgressBarResources extends ProgressBarResources, ClientBundle { @Source("progress-bg.gif") @Override @ImageOptions(repeatStyle = RepeatStyle.Horizontal) ImageResource bar(); } @sprite .progressBar { background-color:#9cbfee; gwt-image: 'bar'; background-repeat: repeat-x; background-position: left center; height: 18px; border-top-color:#d1e4fd; border-bottom-color:#7fa9e4; border-right-color:#7fa9e4; } Wednesday, November 2, 2011
  • 38. @Override public void render(SafeHtmlBuilder sb, Double value, int width) { value = value == null ? 0D : value; value = value * width; sb.appendHtmlConstant("<div class=" + style.progressWrap() + ">"); sb.appendHtmlConstant("<div class=" + style.progressInner() + ">"); sb.appendHtmlConstant("<div class='" + style.progressBar() + "' style='width: " + value + "px'>"); sb.appendHtmlConstant("<div class=" + style.progressText() + " style='width: " + (value - 8) + "px'>"); sb.appendHtmlConstant("<div style='width:" + width + "px'>&#160;</div>"); sb.appendHtmlConstant("</div>"); sb.appendHtmlConstant("<div class='" + style.progressText() + " " + style.progressTextBack() + "'>"); sb.appendHtmlConstant("<div style='width:" + width + "px'>&#160;</div>"); sb.appendHtmlConstant("</div>"); sb.appendHtmlConstant("</div>"); sb.appendHtmlConstant("</div>"); } Wednesday, November 2, 2011
  • 39. @Override public void updateText(XElement parent, String text) { getTopElem(parent).getFirstChildElement().setInnerHTML(Util.isEmptyString (text) ? "&#160;" : text); getBackElem(parent).getFirstChildElement().setInnerHTML(Util.isEmptyString (text) ? "&#160;" : text); } protected XElement getBackElem(XElement parent) { return parent.selectNode("." + style.progressTextBack()); } protected XElement getTopElem(XElement parent) { return parent.selectNode("." + style.progressText()); } Wednesday, November 2, 2011
  • 40. <replace-with class="com.sencha.gxt.theme.blue.client.progress.BlueProgressBarAppearance"> <when-type-is class="com.sencha.gxt.cell.core.client.ProgressBarCell.ProgressBarAppearance" /> </replace-with> Wednesday, November 2, 2011