zul.wgt.Caption=zk.$extends(zul.LabelImageWidget,{$define:{},domDependent_:!0,rerender:function(){var a=this.parent;a&&a.clearCache();this.$supers("rerender",arguments)},domContent_:function(){var a=this.getLabel(),b=this.getImage(),c=this.parent?this.parent._title:"",e=this.domIcon_();c&&(a=a?c+" - "+a:c);a=zUtl.encodeXML(a);if(!b&&!e)return a;b=b?'<img id="'+this.uuid+'-img" src="'+b+'" class="'+this.$s("image")+'" />'+(e?" "+e:""):e;return a?b+' <span class="'+this.$s("label")+'">'+a+"</span>":
b},updateDomContent_:function(){var a=this.domContent_(),b=this.$n("cave");if(b){var c;this.firstChild&&(c=this.firstChild.$n());for(var e=b.firstChild,d;e&&e!==c;e=d)d=e.nextSibling,jq(e).remove();this.clearCache();jq(b).prepend(a?a:"&nbsp;")}},domClass_:function(a){var b=this.$supers("domClass_",arguments),c=this.parent;return c.$instanceof(zul.wgt.Groupbox)?b+(c._closable?"":" "+this.$s("readonly")):b},doClick_:function(){this.parent.$instanceof(zul.wgt.Groupbox)&&this.parent.isClosable()&&this.parent.setOpen(!this.parent.isOpen());
this.$supers("doClick_",arguments)},_getBlank:function(){return"&nbsp;"},_isCollapsibleVisible:function(){var a=this.parent;return a.isCollapsible&&a.getCollapseOpenIconClass_&&a.isCollapsible()},_isCloseVisible:function(){var a=this.parent;return a.isClosable&&a.getClosableIconClass_&&a.isClosable()},_isMinimizeVisible:function(){var a=this.parent;return a.isMinimizable&&a.getMinimizableIconClass_&&a.isMinimizable()},_isMaximizeVisible:function(){var a=this.parent;return a.isMaximizable&&a.getMaximizableIconClass_&&
a.isMaximizable()},beforeMinFlex_:function(a){"w"==a&&(this.$n().width="")},setFlexSizeW_:function(a,b,c,e){if(e){if(this._isCloseVisible()){var d=this.parent.$n("close");c+=d.offsetWidth+zk(d).marginWidth()}this._isMaximizeVisible()&&(d=this.parent.$n("max"),c+=d.offsetWidth+zk(d).marginWidth());this._isMinimizeVisible()&&(d=this.parent.$n("min"),c+=d.offsetWidth+zk(d).marginWidth());this._isCollapsibleVisible()&&(d=this.parent.$n("exp"),c+=d.offsetWidth+zk(d).marginWidth())}this.$supers("setFlexSizeW_",
arguments)},getImageNode:function(){if(!this._eimg&&this._image){var a=this.$n("img");a&&(this._eimg=a)}return this._eimg}});
