/*!
* UI development toolkit for HTML5 (OpenUI5)
* (c) Copyright 2009-2018 SAP SE or an SAP affiliate company.
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
*/
sap.ui.define(['jquery.sap.global','./Panel','./library'],function(q,P,l){"use strict";var T=P.extend("sap.ui.commons.Tab",{metadata:{library:"sap.ui.commons",properties:{verticalScrolling:{type:"sap.ui.core.Scrolling",group:"Behavior",defaultValue:sap.ui.core.Scrolling.None},horizontalScrolling:{type:"sap.ui.core.Scrolling",group:"Behavior",defaultValue:sap.ui.core.Scrolling.None},closable:{type:"boolean",group:"Misc",defaultValue:false},selected:{type:"boolean",group:"Behavior",defaultValue:false,deprecated:true}}}});T.prototype.init=function(){this.oScrollDomRef=null;};T.prototype.rerender=function(){var p=this.getParent();if(p){p.rerender();}};T.prototype.invalidate=function(){var p=this.getParent();if(p){p.invalidate();}};T.prototype.onAfterRendering=function(){this.oScrollDomRef=this.getDomRef("panel");if(this.oScrollDomRef){var s=this.getProperty("scrollTop")||0;this.oScrollDomRef.scrollTop=s;var a=this.getProperty("scrollLeft")||0;this.oScrollDomRef.scrollLeft=a;}};T.prototype.getScrollLeft=function(){var s=0;if(this.oScrollDomRef){s=this.oScrollDomRef.scrollLeft;this.setProperty("scrollLeft",s,true);}return s;};T.prototype.setScrollLeft=function(p){this.setProperty("scrollLeft",p,true);if(this.oScrollDomRef){this.bIgnoreScrollEvent=true;this.oScrollDomRef.scrollLeft=p;}return this;};T.prototype.getScrollTop=function(){var s=0;if(this.oScrollDomRef){s=this.oScrollDomRef.scrollTop;this.setProperty("scrollTop",s,true);}return s;};T.prototype.setScrollTop=function(p){this.setProperty("scrollTop",p,true);if(this.oScrollDomRef){this.bIgnoreScrollEvent=true;this.oScrollDomRef.scrollTop=p;}return this;};T.prototype.setEnabled=function(e){if(e==this.getEnabled()){return this;}var d=this.getDomRef();var p=this.getParent();if(!d||(!e&&q(this.getDomRef()).hasClass("sapUiTabSel"))||(e&&p&&p.getSelectedIndex&&p.getSelectedIndex()<0)){this.setProperty("enabled",e,false);if(p&&p._getActualSelectedIndex){var i=p._getActualSelectedIndex();p.setProperty('selectedIndex',i,true);}}else{this.setProperty("enabled",e,true);q(this.getDomRef()).toggleClass("sapUiTab",e).toggleClass("sapUiTabDsbl",!e).attr("aria-disabled",!e);}return this;};T.prototype.setWidth=function(w){this.setProperty("width",w,true);return this;};T.prototype.setApplyContentPadding=function(p){this.setProperty("applyContentPadding",p,true);return this;};T.prototype._handleTrigger=function(e){};return T;},true);