AdfRichUIPeer.createPeerClass(AdfRichUIPeer,"AdfDhtmlProgressIndicatorPeer",!1);AdfDhtmlProgressIndicatorPeer.InitSubclass=function(){this._PROGRESS_BAR_ID="_afrProgressBarID";this._CONTENT_ID="content";this._PROCESS_COMPLETED="_afrProcessCompleted";this._ARIA_VALUETEXT_DETERMINATE_STRING="af_progressIndicator.ARIA_VALUETEXT_DETERMINATE";this._DETERMINATE_STRING="af_progressIndicator.TIP_DETERMINATE"};
AdfDhtmlProgressIndicatorPeer.prototype.InitDomElement=function(a,b){AdfDhtmlProgressIndicatorPeer.superclass.InitDomElement.call(this,a,b);var d=AdfAgent.getAgent(),e=AdfRichUIPeer.CreateSubId(a.getClientId(),AdfDhtmlProgressIndicatorPeer._PROGRESS_BAR_ID);(e=d.getElementById(e))?(d=d.getAttribute(e,"aria-valuenow"),this._updateProgressIndicator(e,d,!1)):AdfFocusUtils.isConnectedAndVisible(b)&&(d=AdfDomUtils.getChildElementByAttributeValue(b,"role","progressbar","td"))&&d.getAttribute("aria-valuetext")&&
page.announceToAssistiveTechnology(d.getAttribute("aria-valuetext"),!0)};AdfDhtmlProgressIndicatorPeer.prototype.UpdateProgressIndicator=function(a){var b=this.getComponent(),d=AdfAgent.getAgent(),b=AdfRichUIPeer.CreateSubId(b.getClientId(),AdfDhtmlProgressIndicatorPeer._PROGRESS_BAR_ID),d=d.getElementById(b);this._updateProgressIndicator(d,a,!0)};
AdfDhtmlProgressIndicatorPeer.prototype.getPercentComplete=function(a,b){var d=AdfAgent.getAgent(),e,f=AdfRichUIPeer.CreateSubId(a.getClientId(),AdfDhtmlProgressIndicatorPeer._PROGRESS_BAR_ID);(f=d.getElementById(f))&&(e=d.getAttribute(f,"aria-valuenow"));return e};
AdfDhtmlProgressIndicatorPeer.prototype._updateProgressIndicator=function(a,b,d){var e=AdfAgent.getAgent(),f=AdfPage.PAGE,g=f.getLookAndFeel();if(a){var h=0,k=0,l=e.getComputedStyle(a),m=e.getStyleProperty(l,"width"),l=e.getStyleProperty(l,"height");null!=m&&(h=AdfAgent.getCSSLengthAsInt(m));null!=l&&(k=AdfAgent.getCSSLengthAsInt(l));l=e.getComputedStyle(a.firstChild);m=this._getBorderWidth(l);l=this._getBorderHeight(l);f.getLocaleContext().isRightToLeft()?(a.firstChild.style.width=h*(100-b)/100+
"px",a.lastChild.style.width=h*b/100+"px"):(a.firstChild.style.width=h*b/100+"px",a.lastChild.style.width=h*(100-b)/100+"px");var n=e.getComputedStyle(a.lastChild),q=this._getBorderWidth(n),n=this._getBorderHeight(n),r=0;l>=n?(r=l,a.lastChild.style.height=k+(r-n)+"px"):(r=n,a.firstChild.style.height=k+(r-l)+"px");a.style.width=h+m+q+"px";a.style.height=k+r+"px";h=TrFastMessageFormatUtils.format(g.getTranslatedString(AdfDhtmlProgressIndicatorPeer._DETERMINATE_STRING),b);d&&(d=AdfRichUIPeer.CreateSubId(this.getComponent().getClientId(),
AdfDhtmlProgressIndicatorPeer._CONTENT_ID),(d=e.getElementById(d))&&e.setAttribute(d,"title",h),g=TrFastMessageFormatUtils.format(g.getTranslatedString(AdfDhtmlProgressIndicatorPeer._ARIA_VALUETEXT_DETERMINATE_STRING),b),e.setAttribute(a,"aria-valuetext",g),e.setAttribute(a,"aria-valuenow",b));f.announceToAssistiveTechnology(h,!0)}};
AdfDhtmlProgressIndicatorPeer.prototype._getBorderWidth=function(a){if(null!=a){var b=a.borderLeftWidth;a=a.borderRightWidth;var d=0,e=0;null!=b&&(d=AdfAgent.getCSSLengthAsInt(b));null!=a&&(e=AdfAgent.getCSSLengthAsInt(a));return d+e}return 0};AdfDhtmlProgressIndicatorPeer.prototype._getBorderHeight=function(a){if(null!=a){var b=a.borderTopWidth;a=a.borderBottomWidth;var d=0,e=0;null!=b&&(d=AdfAgent.getCSSLengthAsInt(b));null!=a&&(e=AdfAgent.getCSSLengthAsInt(a));return d+e}return 0};