5c5e7b398a988b942fd3e7396f3060859f1ac8ab.svn-base 734 B

1234567891011121314151617181920212223242526272829
  1. /*
  2. * Ext JS Library 2.0 Copyright(c) 2006-2007, Ext JS, LLC. licensing@extjs.com
  3. *
  4. * http://extjs.com/license
  5. */
  6. Ext.layout.CardLayout = Ext.extend(Ext.layout.FitLayout, {
  7. deferredRender : false,
  8. renderHidden : true,
  9. setActiveItem : function(A) {
  10. A = this.container.getComponent(A);
  11. if (this.activeItem != A) {
  12. if (this.activeItem) {
  13. this.activeItem.hide()
  14. }
  15. this.activeItem = A;
  16. A.show();
  17. this.layout()
  18. }
  19. },
  20. renderAll : function(A, B) {
  21. if (this.deferredRender) {
  22. this.renderItem(this.activeItem, undefined, B)
  23. } else {
  24. Ext.layout.CardLayout.superclass.renderAll.call(this, A, B)
  25. }
  26. }
  27. });
  28. Ext.Container.LAYOUTS["card"] = Ext.layout.CardLayout;