/* ********************************************************************
   
   qooxdoo - the new era of web interface development
   
   copyright 2004-2005 by schlund + partner ag, germany
   licensed under lgpl (http://www.gnu.org/copyleft/lesser.html)
   all rights reserved
   
   internet:
   * http://qooxdoo.sourceforge.net
   * http://freshmeat.net/projects/qooxdoo
   
   authors: 
   * sebastian werner <sebastian dot werner at 1und1 dot de>
   * andreas ecker <andreas dot ecker at 1und1 dot de>
   
******************************************************************** */

var QxMain= {version:"0.5.1",loadStart:(new Date).valueOf(),classes:{},propertyNumber:0,setter:{},getter:{},resetter:{},values:{}};var QxDefaultSettings= {enableDebug:false,enableWidgetDebug:false,enableDisposerDebug:false,applicationLayout:true,imageCorePath : "../../images",imageIconPath : "../../themes/icons",imageWidgetPath : "../../themes/widgets" };if(typeof QxSettings==="undefined"){var QxSettings={};};QxSettings._merge=function(){for(var vKey in QxDefaultSettings){if(typeof QxSettings[vKey]==="undefined"){QxSettings[vKey]=QxDefaultSettings[vKey];};};};QxSettings._merge();delete QxSettings._merge;var QxConst= {CORE_EMPTY:"",CORE_SPACE:" ",CORE_SLASH:"/",CORE_DOT:".",CORE_ZERO:"0",CORE_AUTO:"auto",CORE_FLEX:"1*",CORE_PIXEL:"px",CORE_MILLISECONDS:"ms",CORE_PERCENT:"%",CORE_QUOTE:"\"",CORE_NEWLINE:"\n",CORE_SINGLEQUOTE:"'",CORE_HUNDREDPERCENT:"100%",CORE_STAR:"*",CORE_PLUS:"+",CORE_MINUS:"-",CORE_COMMA:",",CORE_DASH:"-",CORE_UNDERLINE:"_",CORE_SEMICOLON:";",CORE_COLON:":",CORE_EQUAL:"=",CORE_AMPERSAND:"&",CORE_HASH:"#",CORE_SMALLER:"<",CORE_BIGGER:">",CORE_DEFAULT:"default",CORE_NONE:"none",CORE_HIDDEN:"hidden",CORE_0PIXEL:"0px",CORE_ABSOLUTE:"absolute",CORE_RELATIVE:"relative",CORE_STATIC:"static",CORE_FIXED:"fixed",CORE_DIV:"div",CORE_DISABLED:"disabled",CORE_EVENTPREFIX:"evt",CORE_YES:"yes",CORE_NO:"no",HTML_AMPERSAND:"&amp;",HTML_SMALLER:"&lt;",HTML_BIGGER:"&gt;",HTML_QUOTE:"&quot;",HTML_SPACE:"&nbsp;",PROTOCOL_HTTP:"http",PROTOCOL_HTTPS:"https",PROTOCOL_FTP:"ftp",PROTOCOL_FILE:"file",URI_HTTP : "http:/" + "/",URI_HTTPS : "https:/" + "/",URI_FTP : "ftp:/" + "/",URI_FILE : "file:/" + "/",METHOD_GET:"GET",METHOD_POST:"POST",METHOD_PUT:"PUT",METHOD_HEAD:"HEAD",METHOD_DELETE:"DELETE",TYPEOF_UNDEFINED:"undefined",TYPEOF_NUMBER:"number",TYPEOF_STRING:"string",TYPEOF_BOOLEAN:"boolean",TYPEOF_FUNCTION:"function",TYPEOF_OBJECT:"object",INTERNAL_SET:"set",INTERNAL_GET:"get",INTERNAL_APPLY:"apply",INTERNAL_RESET:"reset",INTERNAL_FORCE:"force",INTERNAL_TOGGLE:"toggle",INTERNAL_CHANGE:"change",INTERNAL_STORE:"store",INTERNAL_RETRIEVE:"retrieve",INTERNAL_PRIVATECHANGE:"_change",INTERNAL_INVALIDATE:"_invalidate",INTERNAL_INVALIDATED:"_invalidated",INTERNAL_RECOMPUTE:"_recompute",INTERNAL_CACHED:"_cached",INTERNAL_COMPUTE:"_compute",INTERNAL_COMPUTED:"_computed",INTERNAL_UNITDETECTION:"_unitDetection",INTERNAL_GLOBALPROPERTYREF:"PROPERTY_",INTERNAL_UNIT_VALUE:"Value",INTERNAL_UNIT_PARSED:"Parsed",INTERNAL_UNIT_TYPE:"Type",INTERNAL_UNIT_TYPE_NULL:"TypeNull",INTERNAL_UNIT_TYPE_PIXEL:"TypePixel",INTERNAL_UNIT_TYPE_PERCENT:"TypePercent",INTERNAL_UNIT_TYPE_AUTO:"TypeAuto",INTERNAL_UNIT_TYPE_FLEX:"TypeFlex",INTERNAL_GETDEFAULT:"getDefault",INTERNAL_SETDEFAULT:"setDefault",INTERNAL_RETRIEVEDEFAULT:"retrieveDefault",INTERNAL_STOREDEFAULT:"storeDefault",INTERNAL_VALUE:"_value",INTERNAL_NULL:"_null",INTERNAL_EVAL:"_eval",INTERNAL_CHECK:"_check",INTERNAL_MODIFY:"_modify",INTERNAL_BACKCOMPAT:"BackCompat",PROPERTY_CLASSNAME:"className",PROPERTY_FILTER:"filter",PROPERTY_BORDERX:"borderX",PROPERTY_BORDERWIDTHX:"borderWidthX",PROPERTY_BORDERY:"borderY",PROPERTY_BORDERWIDTHY:"borderWidthY",PROPERTY_DISPLAY:"display",PROPERTY_POSITION:"position",PROPERTY_VISIBILITY:"visibility",PROPERTY_DISABLED:"disabled",PROPERTY_LINEHEIGHT:"lineHeight",PROPERTY_TEXTALIGN:"textAlign",PROPERTY_WHITESPACE:"whiteSpace",PROPERTY_PADDING:"padding",PROPERTY_PARENT_PADDINGLEFT:"parentPaddingLeft",PROPERTY_PARENT_PADDINGRIGHT:"parentPaddingRight",PROPERTY_PARENT_PADDINGTOP:"parentPaddingTop",PROPERTY_PARENT_PADDINGBOTTOM:"parentPaddingBottom",PROPERTY_OVERFLOW_BOTH:"overflow",PROPERTY_OVERFLOW_TEXT:"textOverflow",PROPERTY_OVERFLOW_HORIZONTAL:"overflowX",PROPERTY_OVERFLOW_VERTICAL:"overflowY",JOB_INITIAL:"initial",JOB_VISIBLE:"visible",JOB_LOCATION:"location",JOB_LOCATIONX:"locationX",JOB_LOCATIONY:"locationY",JOB_ADDCHILD:"addChild",JOB_REMOVECHILD:"removeChild",JOB_FRAMEWIDTH:"frameWidth",JOB_FRAMEHEIGHT:"frameHeight",JOB_PREFERREDINNERWIDTH:"preferredInnerWidth",JOB_PREFERREDINNERHEIGHT:"preferredInnerHeight",ORIENTATION_HORIZONTAL:"horizontal",ORIENTATION_VERTICAL:"vertical",ALIGN_LEFT:"left",ALIGN_LEFT_REVERSED:"left-reversed",ALIGN_CENTER:"center",ALIGN_CENTER_REVERSED:"center-reversed",ALIGN_RIGHT:"right",ALIGN_RIGHT_REVERSED:"right-reversed",ALIGN_TOP:"top",ALIGN_TOP_REVERSED:"top-reversed",ALIGN_MIDDLE:"middle",ALIGN_MIDDLE_REVERSED:"middle-reversed",ALIGN_BOTTOM:"bottom",ALIGN_BOTTOM_REVERSED:"bottom-reversed",BORDER_STYLE_GROOVE:"groove",BORDER_STYLE_RIDGE:"ridge",BORDER_STYLE_INSET:"inset",BORDER_STYLE_OUTSET:"outset",BORDER_STYLE_SOLID:"solid",BORDER_STYLE_DOTTED:"dotted",BORDER_STYLE_DASHED:"dashed",BORDER_STYLE_DOUBLE:"double",BORDER_STYLE_NONE:"none",FONT_STYLE_BOLD:"bold",FONT_STYLE_NORMAL:"normal",FONT_STYLE_ITALIC:"italic",FONT_STYLE_UNDERLINE:"underline",FONT_STYLE_STRIKEOUT:"strikeout",FOCUS_OUTLINE:"1px dotted invert",DISPLAY_BLOCK:"block",DISPLAY_NONE:"none",CURSOR_WAIT:"wait",CURSOR_PROGRESS:"progress",CURSOR_DEFAULT:"default",EVENT_TYPE_MOUSEOVER:"mouseover",EVENT_TYPE_MOUSEMOVE:"mousemove",EVENT_TYPE_MOUSEOUT:"mouseout",EVENT_TYPE_MOUSEDOWN:"mousedown",EVENT_TYPE_MOUSEUP:"mouseup",EVENT_TYPE_MOUSEWHEEL:"mousewheel",EVENT_TYPE_CLICK:"click",EVENT_TYPE_DBLCLICK:"dblclick",EVENT_TYPE_CONTEXTMENU:"contextmenu",EVENT_TYPE_KEYDOWN:"keydown",EVENT_TYPE_KEYPRESS:"keypress",EVENT_TYPE_KEYUP:"keyup",EVENT_TYPE_DRAGDROP:"dragdrop",EVENT_TYPE_DRAGENTER:"dragenter",EVENT_TYPE_DRAGEXIT:"dragexit",EVENT_TYPE_DRAGGESTURE:"draggesture",EVENT_TYPE_DRAGOVER:"dragover",EVENT_TYPE_DRAGOUT:"dragout",EVENT_TYPE_DRAGSTART:"dragstart",EVENT_TYPE_DRAGEND:"dragend",EVENT_TYPE_DRAGMOVE:"dragmove",EVENT_TYPE_DRAGLEAVE:"dragleave",EVENT_TYPE_DRAG:"drag",EVENT_TYPE_BLUR:"blur",EVENT_TYPE_FOCUS:"focus",EVENT_TYPE_FOCUSIN:"focusin",EVENT_TYPE_FOCUSOUT:"focusout",EVENT_TYPE_SELECT:"select",EVENT_TYPE_SCROLL:"scroll",EVENT_TYPE_INPUT:"input",EVENT_TYPE_LOAD:"load",EVENT_TYPE_UNLOAD:"unload",EVENT_TYPE_BEFOREUNLOAD:"beforeunload",EVENT_TYPE_PROPERTYCHANGE:"propertychange",EVENT_TYPE_LOSECAPTURE:"losecapture",EVENT_TYPE_OVERFLOW:"overflow",EVENT_TYPE_OVERFLOWCHANGED:"overflowchanged",EVENT_TYPE_UNDERFLOW:"underflow",EVENT_TYPE_DOMMOUSESCROLL:"DOMMouseScroll",EVENT_TYPE_DOMFOCUSIN:"DOMFocusIn",EVENT_TYPE_DOMFOCUSOUT:"DOMFocusOut",EVENT_TYPE_DOMACTIVATE:"DOMActivate",EVENT_TYPE_MOUSEENTER:"mouseenter",EVENT_TYPE_MOUSELEAVE:"mouseleave",EVENT_TYPE_ERROR:"error",EVENT_TYPE_RESIZE:"resize",EVENT_TYPE_INTERVAL:"interval",EVENT_TYPE_EXECUTE:"execute",EVENT_TYPE_CREATE:"create",EVENT_TYPE_PRE:"pre",EVENT_TYPE_MAIN:"main",EVENT_TYPE_CACHE:"cache",EVENT_TYPE_POST:"post",EVENT_TYPE_BEFOREAPPEAR:"beforeAppear",EVENT_TYPE_APPEAR:"appear",EVENT_TYPE_BEFOREDISAPPEAR:"beforeDisappear",EVENT_TYPE_DISAPPEAR:"disappear",EVENT_TYPE_BEFOREINSERTDOM:"beforeInsertDom",EVENT_TYPE_INSERTDOM:"insertDom",EVENT_TYPE_BEFOREREMOVEDOM:"beforeRemoveDom",EVENT_TYPE_REMOVEDOM:"removeDom",EVENT_TYPE_CREATED:"created",EVENT_TYPE_CONFIGURED:"configured",EVENT_TYPE_QUEUED:"queued",EVENT_TYPE_SENDING:"sending",EVENT_TYPE_RECEIVING:"receiving",EVENT_TYPE_COMPLETED:"completed",REQUEST_STATE_CREATED:"created",REQUEST_STATE_CONFIGURED:"configured",REQUEST_STATE_QUEUED:"queued",REQUEST_STATE_SENDING:"sending",REQUEST_STATE_RECEIVING:"receiving",REQUEST_STATE_COMPLETED:"completed",BUTTON_LEFT:"left",BUTTON_MIDDLE:"middle",BUTTON_RIGHT:"right",BUTTON_NONE:"none",KEY_CTRL:"ctrl",KEY_SHIFT:"shift",KEY_ALT:"alt",KEY_CONTROL:"control",STATE_OVER:"over",STATE_FOCUSED:"focused",STATE_DISABLED:"disabled",STATE_ACTIVE:"active",STATE_CHECKED:"checked",STATE_PRESSED:"pressed",STATE_ABANDONED:"abandoned",STATE_SELECTED:"selected",STATE_ANCHOR:"anchor",STATE_LEAD:"lead",STATE_MAXIMIZED:"maximized",OVERFLOW_VALUE_AUTO:"auto",OVERFLOW_VALUE_HIDDEN:"hidden",OVERFLOW_VALUE_BOTH:"scroll",OVERFLOW_VALUE_HORIZONTAL:"scrollX",OVERFLOW_VALUE_VERTICAL:"scrollY",OVERFLOW_VALUE_ELLIPSIS:"ellipsis",OVERFLOW_VALUE_MOZ_NONE:"-moz-scrollbars-none",OVERFLOW_VALUE_MOZ_HORIZONTAL:"-moz-scrollbars-horizontal",OVERFLOW_VALUE_MOZ_VERTICAL:"-moz-scrollbars-vertical",SORT_ASCENDING:"ascending",SORT_DESCENDING:"descending",IMAGE_BLANK:"core/blank.gif",NODE_ELEMENT:1,NODE_ATTRIBUTE:2,NODE_TEXT:3,NODE_CDATA_SECTION:4,NODE_ENTITY_REFERENCE:5,NODE_ENTITY:6,NODE_PROCESSING_INSTRUCTION:7,NODE_COMMENT:8,NODE_DOCUMENT:9,NODE_DOCUMENT_TYPE:10,NODE_DOCUMENT_FRAGMENT:11,NODE_NOTATION:12,NAMESPACE_SVG : "http:/" + "/www.w3.org/2000/svg",NAMESPACE_SMIL : "http:/" + "/www.w3.org/2001/SMIL20/",NAMESPACE_MML : "http:/" + "/www.w3.org/1998/Math/MathML",NAMESPACE_CML : "http:/" + "/www.xml-cml.org",NAMESPACE_XLINK : "http:/" + "/www.w3.org/1999/xlink",NAMESPACE_XHTML : "http:/" + "/www.w3.org/1999/xhtml",NAMESPACE_XUL : "http:/" + "/www.mozilla.org/keymaster/gatekeeper/there.is.only.xul",NAMESPACE_XBL : "http:/" + "/www.mozilla.org/xbl",NAMESPACE_FO : "http:/" + "/www.w3.org/1999/XSL/Format",NAMESPACE_XSL : "http:/" + "/www.w3.org/1999/XSL/Transform",NAMESPACE_XSLT : "http:/" + "/www.w3.org/1999/XSL/Transform",NAMESPACE_XI : "http:/" + "/www.w3.org/2001/XInclude",NAMESPACE_XFORMS : "http:/" + "/www.w3.org/2002/01/xforms",NAMESPACE_SAXON : "http:/" + "/icl.com/saxon",NAMESPACE_XALAN : "http:/" + "/xml.apache.org/xslt",NAMESPACE_XSD : "http:/" + "/www.w3.org/2001/XMLSchema",NAMESPACE_DT: "http:/" + "/www.w3.org/2001/XMLSchema-datatypes",NAMESPACE_XSI : "http:/" + "/www.w3.org/2001/XMLSchema-instance",NAMESPACE_RDF : "http:/" + "/www.w3.org/1999/02/22-rdf-syntax-ns#",NAMESPACE_RDFS : "http:/" + "/www.w3.org/2000/01/rdf-schema#",NAMESPACE_DC : "http:/" + "/purl.org/dc/elements/1.1/",NAMESPACE_DCQ: "http:/" + "/purl.org/dc/qualifiers/1.0",NAMESPACE_SOAPENV : "http:/" + "/schemas.xmlsoap.org/soap/envelope/",NAMESPACE_WSDL : "http:/" + "/schemas.xmlsoap.org/wsdl/",NAMESPACE_ADOBESVGEXTENSIONS : "http:/" + "/ns.adobe.com/AdobeSVGViewerExtensions/3.0/" };Function.prototype.extend=function(vSuper,vClassName){if(typeof vSuper!==QxConst.TYPEOF_FUNCTION){throw new Error("Extend:Function/Constructor to extend from is not a function:"+vSuper);};if(typeof vClassName!==QxConst.TYPEOF_STRING){throw new Error("Extend:Missing or malformed className:"+vClassName);};var f=new Function;f.prototype=vSuper.prototype;proto=this.prototype=new f;this.superclass=vSuper;proto.classname=this.classname=vClassName;proto.constructor=this;QxMain.classes[vClassName]=this;return proto;};Function.prototype.addFastProperty=function(vConfig){var vName=vConfig.name;var vUpName=vName.toFirstUp();var vStorageField=QxConst.INTERNAL_VALUE+vUpName;var vGetterName=QxConst.INTERNAL_GET+vUpName;var vSetterName=QxConst.INTERNAL_SET+vUpName;var vComputerName=QxConst.INTERNAL_COMPUTE+vUpName;proto[vStorageField]=typeof vConfig.defaultValue!==QxConst.TYPEOF_UNDEFINED?vConfig.defaultValue:null;if(vConfig.noCompute){proto[vGetterName]=function(){return this[vStorageField];};}else {proto[vGetterName]=function(){return this[vStorageField]==null?this[vStorageField]=this[vComputerName]():this[vStorageField];};};if(vConfig.setOnlyOnce){proto[vSetterName]=function(vValue){this[vStorageField]=vValue;this[vSetterName]=null;return vValue;};}else {proto[vSetterName]=function(vValue){return this[vStorageField]=vValue;};};if(!vConfig.noCompute){proto[vComputerName]=function(){return null;};};};Function.prototype.addCachedProperty=function(p){var vName=p.name;var vUpName=vName.toFirstUp();var vStorageField=QxConst.INTERNAL_CACHED+vUpName;var vComputerName=QxConst.INTERNAL_COMPUTE+vUpName;var vChangeName=QxConst.INTERNAL_PRIVATECHANGE+vUpName;if(typeof p.defaultValue!==QxConst.TYPEOF_UNDEFINED){proto[vStorageField]=p.defaultValue;};proto[QxConst.INTERNAL_GET+vUpName]=function(){if(this[vStorageField]==null){this[vStorageField]=this[vComputerName]();};return this[vStorageField];};proto[QxConst.INTERNAL_INVALIDATE+vUpName]=function(){if(this[vStorageField]!=null){this[vStorageField]=null;if(p.addToQueueRuntime){this.addToQueueRuntime(p.name);};};};proto[QxConst.INTERNAL_RECOMPUTE+vUpName]=function(){var vOld=this[vStorageField];var vNew=this[vComputerName]();if(vNew!=vOld){this[vStorageField]=vNew;this[vChangeName](vNew,vOld);return true;};return false;};proto[vChangeName]=function(vNew,vOld){};proto[vComputerName]=function(){return null;};};Function.prototype.addPropertyGroup=function(p){if(typeof p!==QxConst.TYPEOF_OBJECT){throw new Error("Param should be an object!");};if(QxUtil.isInvalid(p.name)){throw new Error("Malformed input parameters:name needed!");};if(QxUtil.isInvalid(p.members)){throw new Error("Malformed input parameters:members needed!");};p.method=p.name.toFirstUp();p.getter=[];p.setter=[];for(var i=0,l=p.members.length;i<l;i++){p.setter.push(QxConst.INTERNAL_SET+p.members[i].toFirstUp());};for(var i=0,l=p.members.length;i<l;i++){p.getter.push(QxConst.INTERNAL_GET+p.members[i].toFirstUp());};this.prototype[QxConst.INTERNAL_GET+p.method]=function(){var a=[];var g=p.getter;for(var i=0,l=g.length;i<l;i++){a.push(this[g[i]]());};return a;};switch(p.mode){case "shorthand":this.prototype[QxConst.INTERNAL_SET+p.method]=function(){if(arguments.length>4||arguments.length==0){throw new Error("Invalid number of arguments for property "+p.name+":"+arguments);};try{var ret=QxUtil.convertShortHandToArray(arguments);}catch(ex){throw new Error("Invalid shorthand values for property "+p.name+":"+arguments+":"+ex);};var s=p.setter;var l=s.length;for(var i=0;i<l;i++){this[s[i]](ret[i]);};};break;default:this.prototype[QxConst.INTERNAL_SET+p.method]=function(){var s=p.setter;var l=s.length;if(arguments.length!=l){throw new Error("Invalid number of arguments(needs:"+l+",is:"+arguments.length+")for property "+p.name+":"+QxUtil.convertArgumentsToArray(arguments).toString());};for(var i=0;i<l;i++){this[s[i]](arguments[i]);};};};};Function.prototype.removeProperty=function(p){if(typeof this.prototype._properties!==QxConst.TYPEOF_STRING){throw new Error("Has no properties!");};if(typeof p!==QxConst.TYPEOF_OBJECT){throw new Error("Param should be an object!");};if(QxUtil.isInvalid(p.name)){throw new Error("Malformed input parameters:name needed!");};var pp=this.prototype;p.method=p.name.toFirstUp();p.implMethod=p.impl?p.impl.toFirstUp():p.method;var valueKey=QxConst.INTERNAL_VALUE+p.method;pp._properties=pp._properties.remove(p.name);pp[valueKey]=null;pp[QxConst.INTERNAL_GET+p.method]=null;pp[QxConst.INTERNAL_SET+p.method]=null;pp[QxConst.INTERNAL_RESET+p.method]=null;pp[QxConst.INTERNAL_APPLY+p.method]=null;pp[QxConst.INTERNAL_FORCE+p.method]=null;pp[QxConst.INTERNAL_GETDEFAULT+p.method]=null;pp[QxConst.INTERNAL_SETDEFAULT+p.method]=null;};Function.prototype._createProperty=function(p){if(typeof p!==QxConst.TYPEOF_OBJECT){throw new Error("AddProperty:Param should be an object!");};if(QxUtil.isInvalid(p.name)){throw new Error("AddProperty:Malformed input parameters:name needed!");};var pp=this.prototype;p.method=p.name.toFirstUp();p.implMethod=p.impl?p.impl.toFirstUp():p.method;if(QxUtil.isInvalid(p.defaultValue)){p.defaultValue=null;};if(QxUtil.isInvalidBoolean(p.allowNull)){p.allowNull=true;};if(QxUtil.isInvalidBoolean(p.allowMultipleArguments)){p.allowMultipleArguments=false;};if(typeof p.type===QxConst.TYPEOF_STRING){p.hasType=true;}else if(typeof p.type!==QxConst.TYPEOF_UNDEFINED){throw new Error("AddProperty:Invalid type definition for property "+p.name+":"+p.type);}else{p.hasType=false;};if(typeof p.instance===QxConst.TYPEOF_STRING){p.hasInstance=true;}else if(typeof p.instance!==QxConst.TYPEOF_UNDEFINED){throw new Error("AddProperty:Invalid instance definition for property "+p.name+":"+p.instance);}else{p.hasInstance=false;};if(typeof p.classname===QxConst.TYPEOF_STRING){p.hasClassName=true;}else if(typeof p.classname!==QxConst.TYPEOF_UNDEFINED){throw new Error("AddProperty:Invalid classname definition for property "+p.name+":"+p.classname);}else{p.hasClassName=false;};p.hasConvert=QxUtil.isValidFunction(p.convert);p.hasPossibleValues=QxUtil.isValidArray(p.possibleValues);p.hasUnitDetection=QxUtil.isValidString(p.unitDetection);p.addToQueue=p.addToQueue||false;p.addToQueueRuntime=p.addToQueueRuntime||false;p.up=p.name.toUpperCase();QxConst[QxConst.INTERNAL_GLOBALPROPERTYREF+p.up]=p.name;var valueKey=QxConst.INTERNAL_VALUE+p.method;var evalKey=QxConst.INTERNAL_EVAL+p.method;var changeKey=QxConst.INTERNAL_CHANGE+p.method;var modifyKey=QxConst.INTERNAL_MODIFY+p.implMethod;var checkKey=QxConst.INTERNAL_CHECK+p.implMethod;if(!QxMain.setter[p.name]){QxMain.setter[p.name]=QxConst.INTERNAL_SET+p.method;QxMain.getter[p.name]=QxConst.INTERNAL_GET+p.method;QxMain.resetter[p.name]=QxConst.INTERNAL_RESET+p.method;QxMain.values[p.name]=valueKey;};if(p.hasUnitDetection){var cu=QxConst.INTERNAL_COMPUTED+p.method;pp[cu+QxConst.INTERNAL_UNIT_VALUE]=null;pp[cu+QxConst.INTERNAL_UNIT_PARSED]=null;pp[cu+QxConst.INTERNAL_UNIT_TYPE]=null;pp[cu+QxConst.INTERNAL_UNIT_TYPE_NULL]=true;pp[cu+QxConst.INTERNAL_UNIT_TYPE_PIXEL]=false;pp[cu+QxConst.INTERNAL_UNIT_TYPE_PERCENT]=false;pp[cu+QxConst.INTERNAL_UNIT_TYPE_AUTO]=false;pp[cu+QxConst.INTERNAL_UNIT_TYPE_FLEX]=false;var unitDetectionKey=QxConst.INTERNAL_UNITDETECTION+p.unitDetection.toFirstUp();};pp[valueKey]=p.defaultValue;pp[QxConst.INTERNAL_GET+p.method]=function(){return this[valueKey];};pp[QxConst.INTERNAL_FORCE+p.method]=function(newValue){return this[valueKey]=newValue;};pp[QxConst.INTERNAL_RESET+p.method]=function(){return this[QxConst.INTERNAL_SET+p.method](p.defaultValue);};if(p.type===QxConst.TYPEOF_BOOLEAN){pp[QxConst.INTERNAL_TOGGLE+p.method]=function(newValue){return this[QxConst.INTERNAL_SET+p.method](!this[valueKey]);};};if(p.allowMultipleArguments||p.hasConvert||p.hasInstance||p.hasClassName||p.hasPossibleValues||p.hasUnitDetection||p.addToQueue||p.addToQueueRuntime||p.addToStateQueue){pp[QxConst.INTERNAL_SET+p.method]=function(newValue){if(p.allowMultipleArguments&&arguments.length>1){newValue=QxUtil.convertArgumentsToArray(arguments);};if(p.hasConvert){try{newValue=p.convert.call(this,newValue,p);}catch(ex){throw new Error("Attention! Could not convert new value for "+p.name+":"+newValue+":"+ex);};};var oldValue=this[valueKey];if(newValue===oldValue){return newValue;};if(!(p.allowNull&&newValue==null)){if(p.hasType&&typeof newValue!==p.type){return this.error("Attention! The value \""+newValue+"\" is an invalid value for the property \""+p.name+"\" which must be typeof \""+p.type+"\" but is typeof \""+typeof newValue+"\"!",QxConst.INTERNAL_SET+p.method);};if(p.hasInstance&&!(newValue instanceof QxMain.classes[p.instance])){return this.error("Attention! The value \""+newValue+"\" is an invalid value for the property \""+p.name+"\" which must be an instance of \""+p.instance+"\"!",QxConst.INTERNAL_SET+p.method);};if(p.hasClassName&&newValue.classname!=p.classname){return this.error("Attention! The value \""+newValue+"\" is an invalid value for the property \""+p.name+"\" which must be an object with the classname \""+p.classname+"\"!",QxConst.INTERNAL_SET+p.method);};if(p.hasPossibleValues&&newValue!=null&&!p.possibleValues.contains(newValue)){return this.error("Failed to save value for "+p.name+". '"+newValue+"' is not a possible value!",QxConst.INTERNAL_SET+p.method);};};if(this[checkKey]){try{newValue=this[checkKey](newValue,p);if(newValue===oldValue){return newValue;};}catch(ex){return this.error("Failed to check property "+p.name+":"+ex,checkKey);};};this[valueKey]=newValue;if(this[modifyKey]){try{var r=this[modifyKey](newValue,oldValue,p);if(!r){return this.error("Modification of property \""+p.name+"\" failed without exception("+r+")",modifyKey);};}catch(ex){return this.error("Modification of property \""+p.name+"\" failed with exception("+ex+")",modifyKey);};};if(p.hasUnitDetection){this[unitDetectionKey](p,newValue);};if(p.addToQueue){this.addToQueue(p.name);}else if(p.addToQueueRuntime){this.addToQueueRuntime(p.name);};if(p.addToStateQueue){this.addToStateQueue();};if(this.hasEventListeners&&this.hasEventListeners(changeKey)){try{this.createDispatchDataEvent(changeKey,newValue);}catch(ex){throw new Error("Property "+p.name+" modified:Failed to dispatch change event:"+ex);};};return newValue;};}else {pp[QxConst.INTERNAL_SET+p.method]=function(newValue){var oldValue=this[valueKey];if(newValue===oldValue){return newValue;};if(!(p.allowNull&&newValue==null)){if(p.hasType&&typeof newValue!==p.type){return this.error("Attention! The value \""+newValue+"\" is an invalid value for the property \""+p.name+"\" which must be typeof \""+p.type+"\" but is typeof \""+typeof newValue+"\"!",QxConst.INTERNAL_SET+p.method);};};if(this[checkKey]){try{newValue=this[checkKey](newValue,p);if(newValue===oldValue){return newValue;};}catch(ex){return this.error("Failed to check property "+p.name+":"+ex,checkKey);};};this[valueKey]=newValue;if(this[modifyKey]){try{var r=this[modifyKey](newValue,oldValue,p);if(!r){return this.error("Modification of property \""+p.name+"\" failed without exception("+r+")",modifyKey);};}catch(ex){return this.error("Modification of property \""+p.name+"\" failed with exception("+ex+")",modifyKey);};};if(this.hasEventListeners&&this.hasEventListeners(changeKey)){var vEvent=new QxDataEvent(changeKey,newValue,oldValue,false);vEvent.setTarget(this);try{this.dispatchEvent(vEvent,true);}catch(ex){throw new Error("Property "+p.name+" modified:Failed to dispatch change event:"+ex);};};return newValue;};};if(typeof p.getAlias===QxConst.TYPEOF_STRING){pp[p.getAlias]=pp[QxConst.INTERNAL_GET+p.method];};if(typeof p.setAlias===QxConst.TYPEOF_STRING){pp[p.setAlias]=pp[QxConst.INTERNAL_SET+p.method];};};Function.prototype.changeProperty=Function.prototype._createProperty;Function.prototype.addProperty=function(p){QxMain.propertyNumber++;this._createProperty(p);if(typeof this.prototype._properties!==QxConst.TYPEOF_STRING){this.prototype._properties=p.name;}else{this.prototype._properties+=QxConst.CORE_COMMA+p.name;};switch(p.type){case QxConst.TYPEOF_OBJECT:case QxConst.TYPEOF_FUNCTION:case QxConst.TYPEOF_UNDEFINED:if(typeof this.prototype._objectproperties!==QxConst.TYPEOF_STRING){this.prototype._objectproperties=p.name;}else{this.prototype._objectproperties+=QxConst.CORE_COMMA+p.name;};};};Number.prototype.limit=function(vmin,vmax){if(vmax!=null&&typeof vmax===QxConst.TYPEOF_NUMBER&&this>vmax){return vmax;}else if(vmin!=null&&typeof vmin===QxConst.TYPEOF_NUMBER&&this<vmin){return vmin;}else {return Number(this);};};Number.prototype.inRange=function(vmin,vmax){return this>=vmin&&this<=vmax;};Number.prototype.betweenRange=function(vmin,vmax){return this>vmin&&this<vmax;};if(!Array.prototype.indexOf){Array.prototype.indexOf=function(obj,fromIndex){if(fromIndex==null){fromIndex=0;}else if(fromIndex<0){fromIndex=Math.max(0,this.length+fromIndex);};for(var i=fromIndex;i<this.length;i++){if(this[i]===obj){return i;};};return-1;};};if(!Array.prototype.lastIndexOf){Array.prototype.lastIndexOf=function(obj,fromIndex){if(fromIndex==null){fromIndex=this.length-1;}else if(fromIndex<0){fromIndex=Math.max(0,this.length+fromIndex);};for(var i=fromIndex;i>=0;i--){if(this[i]===obj){return i;};};return-1;};};if(!Array.prototype.forEach){Array.prototype.forEach=function(f,obj){for(var i=0,l=this.length;i<l;i++){f.call(obj,this[i],i,this);};};};if(!Array.prototype.forEachObject){Array.prototype.forEachObject=function(f){for(var i=0,l=this.length;i<l;i++){f.call(this[i],this,i)};};};if(!Array.prototype.filter){Array.prototype.filter=function(f,obj){var l=this.length;var res=[];for(var i=0;i<l;i++){if(f.call(obj,this[i],i,this)){res.push(this[i]);};};return res;};};if(!Array.prototype.map){Array.prototype.map=function(f,obj){var l=this.length;var res=[];for(var i=0;i<l;i++){res.push(f.call(obj,this[i],i,this));};return res;};};if(!Array.prototype.some){Array.prototype.some=function(f,obj){var l=this.length;for(var i=0;i<l;i++){if(f.call(obj,this[i],i,this)){return true;};};return false;};};if(!Array.prototype.every){Array.prototype.every=function(f,obj){var l=this.length;for(var i=0;i<l;i++){if(!f.call(obj,this[i],i,this)){return false;};};return true;};};Array.prototype.contains=function(obj){return this.indexOf(obj)!=-1;};Array.prototype.copy=function(obj){return this.concat();};Array.prototype.clone=function(obj){return this.concat();};Array.prototype.append=function(a){Array.prototype.push.apply(this,a);};Array.prototype.insertAt=function(obj,i){this.splice(i,0,obj);};Array.prototype.insertBefore=function(obj,obj2){var i=this.indexOf(obj2);if(i==-1){this.push(obj);}else {this.splice(i,0,obj);};};Array.prototype.insertAfter=function(o,o2){var i=this.indexOf(o2);if(i==-1||i==(this.length-1)){this.push(o);}else {this.splice(i+1,0,o);};};Array.prototype.removeAt=function(i){return this.splice(i,1);};Array.prototype.remove=function(obj){var i=this.indexOf(obj);if(i!=-1){return this.splice(i,1);};};Array.prototype.removeAll=function(){return this.splice(0,this.length);};Array.prototype.getLast=function(){return this[this.length-1];};Array.prototype.getFirst=function(){return this[0];};String.prototype.contains=function(s){return this.indexOf(s)!=-1;};String.prototype.toFirstUp=function(){return this.charAt(0).toUpperCase()+this.substr(1);};String.prototype.toCamelCase=function(){var vArr=this.split(QxConst.CORE_DASH),vLength=vArr.length;if(vLength==1){return vArr[0];};var vNew=this.indexOf(QxConst.CORE_DASH)==0?vArr[0].charAt(0).toUpperCase()+vArr[0].substring(1):vArr[0];for(var vPart,i=1;i<vLength;i++){vPart=vArr[i];vNew+=vPart.charAt(0).toUpperCase()+vPart.substring(1);};return vNew;};String.prototype.trimLeft=function(){return this.replace(/^\\s+/, QxConst.CORE_EMPTY);};String.prototype.trimRight=function(){return this.replace(/\\s+$/, QxConst.CORE_EMPTY);};String.prototype.trim=function(){return this.replace(/^\\s+|\\s+$/g, QxConst.CORE_EMPTY);};String.prototype.add=function(v,sep){if(this==v){return this;}else if(this==QxConst.CORE_EMPTY){return v;}else {if(QxUtil.isInvalid(sep)){sep=QxConst.CORE_COMMA;};var a=this.split(sep);if(a.indexOf(v)==-1){a.push(v);return a.join(sep);}else {return this;};};};String.prototype.remove=function(v,sep){if(this==v||this==QxConst.CORE_EMPTY){return QxConst.CORE_EMPTY;}else {if(QxUtil.isInvalid(sep)){sep=QxConst.CORE_COMMA;};var a=this.split(sep);var p=a.indexOf(v);if(p==-1){return this;};do{a.splice(p,1);}while((p=a.indexOf(v))!=-1);return a.join(sep);};};String.prototype.stripTags=function(){return this.replace(/<\/?[^>]+>/gi, QxConst.CORE_EMPTY);};String.prototype.normalizeUmlautsLong=function(){return QxUtil.normalizeUmlautsLong(this);};String.prototype.normalizeUmlautsShort=function(){return QxUtil.normalizeUmlautsShort(this);};String.prototype.startsWith=function(str){return !this.indexOf(str);};String.prototype.endsWith=function(str){return this.lastIndexOf(str)===this.length-str.length;};Function.prototype.closure=function(obj){if(!window.__objs){window.__objs=[];window.__funs=[];};var fun=this;var objId=obj.__objId;if(!objId){__objs[objId=obj.__objId=__objs.length]=obj;};var funId=fun.__funId;if(!funId){__funs[funId=fun.__funId=__funs.length]=fun;};if(!obj.__closures){obj.__closures=[];};var closure=obj.__closures[funId];if(closure){return closure;};obj=null;fun=null;return __objs[objId].__closures[funId]=function(){return __funs[funId].apply(__objs[objId],arguments);};};if(!Function.prototype.apply){Function.prototype.apply=function(oScope,args){var sarg=[];var rtrn,call;if(!oScope){oScope=window;};if(!args){args=[];};for(var i=0;i<args.length;i++){sarg[i]="args["+i+"]";};call="oScope._applyTemp_("+sarg.join(QxConst.CORE_COMMA)+");";oScope._applyTemp_=this;rtrn=eval(call);delete oScope._applyTemp_;return rtrn;};};Error.prototype.toString=function(){return this.message;};QxUtil={};QxUtil.returnTrue=function(){return true;};QxUtil.returnFalse=function(){return false;};QxUtil.returnNull=function(){return null;};QxUtil.returnThis=function(){return this;};QxUtil.returnZero=function(){return 0;};QxUtil.returnNegativeIndex=function(){return-1;};QxUtil.isObjectEmpty=function(h){for(var s in h){return false;};return true;};QxUtil.isObjectMinLength=function(h,j){var i=0;for(var s in h){if((++i)>=j){return true;};};return false;};QxUtil.getObjectLength=function(h){var i=0;for(var s in h){i++;};return i;};QxUtil.convertObjectKeysToArray=function(h){var r=[];for(var s in h){r.push(s);};return r;};QxUtil.convertObjectKeysToString=function(h){return QxUtil.convertObjectKeysToArray(h).join(",");};QxUtil.convertObjectValuesToArray=function(h){var r=[];for(var s in h){r.push(h[s]);};return r;};QxUtil.convertArgumentsToArray=function(a){var b=[];for(var i=0,l=a.length;i<l;i++){b.push(a[i]);};return b;};QxUtil.convertShortHandToArray=function(params){var l=params.length;if(l>4){throw new Error("Invalid number of arguments!");};var v;var list=[];for(var i=0;i<l;i++){v=params[i];if(QxUtil.isValidNumber(v)){list.push(v);}else if(QxUtil.isInvalidString(v)){list.push(null);}else {throw new Error("Invalid shorthand value:"+v);};};switch(l){case 1:list[1]=list[2]=list[3]=list[0];break;case 2:list[2]=list[0];case 3:list[3]=list[1];};return list;};QxUtil.mergeObjectWith=function(vObjectA,vObjectB){for(var vKey in vObjectB){vObjectA[vKey]=vObjectB[vKey];};return vObjectA;};QxUtil.mergeObjects=function(vObjectA){var vLength=arguments.length;for(var i=1;i<vLength;i++){QxUtil.mergeObjectWith(vObjectA,arguments[i]);};return vObjectA;};QxUtil.copyObject=function(vObject){return QxUtil.mergeObjectWith({},vObject);};QxUtil.isValid=function(v){switch(typeof v){case QxConst.TYPEOF_UNDEFINED:return false;case QxConst.TYPEOF_OBJECT:return v!==null;case QxConst.TYPEOF_STRING:return v!==QxConst.CORE_EMPTY;case QxConst.TYPEOF_NUMBER:return !isNaN(v);case QxConst.TYPEOF_FUNCTION:case QxConst.TYPEOF_BOOLEAN:return true;};return false;};QxUtil.isInvalid=function(v){switch(typeof v){case QxConst.TYPEOF_UNDEFINED:return true;case QxConst.TYPEOF_OBJECT:return v===null;case QxConst.TYPEOF_STRING:return v===QxConst.CORE_EMPTY;case QxConst.TYPEOF_NUMBER:return isNaN(v);case QxConst.TYPEOF_FUNCTION:case QxConst.TYPEOF_BOOLEAN:return false;};return true;};QxUtil.isValidNumber=function(v){return typeof v===QxConst.TYPEOF_NUMBER&&!isNaN(v);};QxUtil.isInvalidNumber=function(v){return typeof v!==QxConst.TYPEOF_NUMBER||isNaN(v);};QxUtil.isValidString=function(v){return typeof v===QxConst.TYPEOF_STRING&&v!==QxConst.CORE_EMPTY;};QxUtil.isInvalidString=function(v){return typeof v!==QxConst.TYPEOF_STRING||v===QxConst.CORE_EMPTY;};QxUtil.isValidArray=function(v){return typeof v===QxConst.TYPEOF_OBJECT&&v!==null&&v instanceof Array;};QxUtil.isInvalidArray=function(v){return typeof v!==QxConst.TYPEOF_OBJECT||v===null||!(v instanceof Array);};QxUtil.isValidObject=function(v){return typeof v===QxConst.TYPEOF_OBJECT&&v!==null&&!(v instanceof Array);};QxUtil.isInvalidObject=function(v){return typeof v!==QxConst.TYPEOF_OBJECT||v===null||v instanceof Array;};QxUtil.isValidNode=function(v){return typeof v===QxConst.TYPEOF_OBJECT&&v!==null;};QxUtil.isInvalidNode=function(v){return typeof v!==QxConst.TYPEOF_OBJECT||v===null;};QxUtil.isValidElement=function(v){return typeof v===QxConst.TYPEOF_OBJECT&&v!==null||v.nodeType!==1;};QxUtil.isInvalidElement=function(v){return typeof v!==QxConst.TYPEOF_OBJECT||v===null||v.nodeType!==1;};QxUtil.isValidFunction=function(v){return typeof v===QxConst.TYPEOF_FUNCTION;};QxUtil.isInvalidFunction=function(v){return typeof v!==QxConst.TYPEOF_FUNCTION;};QxUtil.isValidBoolean=function(v){return typeof v===QxConst.TYPEOF_BOOLEAN;};QxUtil.isInvalidBoolean=function(v){return typeof v!==QxConst.TYPEOF_BOOLEAN;};QxUtil.isValidStringOrNumber=function(v){switch(typeof v){case QxConst.TYPEOF_STRING:return v!==QxConst.CORE_EMPTY;case QxConst.TYPEOF_NUMBER:return !isNaN(v);};return false;};QxUtil.isInvalidStringOrNumber=function(v){switch(typeof v){case QxConst.TYPEOF_STRING:return v===QxConst.CORE_EMPTY;case QxConst.TYPEOF_NUMBER:return isNaN(v);};return false;};QxUtil._normalizeUmlautsRegExp = /[\xE4\xF6\xFC\xDF\xC4\xD6\xDC]/g;QxUtil._normalizeUmlautsShortData={"\xC4":"A","\xD6":"O","\xDC":"U","\xE4":"a","\xF6":"o","\xFC":"u","\xDF":"s"};QxUtil._normalizeUmlautsShort=function(vChar){return QxUtil._normalizeUmlautsShortData[vChar];};QxUtil.normalizeUmlautsShort=function(vString){return vString.replace(QxUtil._normalizeUmlautsRegExp,QxUtil._normalizeUmlautsShort);};QxUtil._normalizeUmlautsLongData={"\xC4":"Ae","\xD6":"Oe","\xDC":"Ue","\xE4":"ae","\xF6":"oe","\xFC":"ue","\xDF":"ss"};QxUtil._normalizeUmlautsLong=function(vChar){return QxUtil._normalizeUmlautsLongData[vChar];};QxUtil.normalizeUmlautsLong=function(vString){return vString.replace(QxUtil._normalizeUmlautsRegExp,QxUtil._normalizeUmlautsLong);};var QxCompare={};QxCompare.byString=function(a,b){return a==b?0:a>b?1:-1;};QxCompare.byStringCaseInsensitive=function(a,b){return QxCompare.byString(a.toLowerCase(),b.toLowerCase());};QxCompare.byStringUmlautsShort=function(a,b){return QxCompare.byString(a.normalizeUmlauts(),b.normalizeUmlautsShort());};QxCompare.byStringUmlautsShortCaseInsensitive=function(a,b){return QxCompare.byString(a.normalizeUmlauts().toLowerCase(),b.normalizeUmlautsShort().toLowerCase());};QxCompare.byStringUmlautsLong=function(a,b){return QxCompare.byString(a.normalizeUmlautsLong(),b.normalizeUmlautsLong());};QxCompare.byStringUmlautsLongCaseInsensitive=function(a,b){return QxCompare.byString(a.normalizeUmlautsLong().toLowerCase(),b.normalizeUmlautsLong().toLowerCase());};QxCompare.byFloat=function(a,b){return a-b;};QxCompare.byInteger=QxCompare.byNumber=QxCompare.byFloat;QxCompare.byIntegerString=function(a,b){return parseInt(a)-parseInt(b);};QxCompare.byFloatString=function(a,b){return parseFloat(a)-parseFloat(b);};QxCompare.byNumberString=QxCompare.byFloatString;QxCompare.byIPv4=function(a,b){var ipa=a.split(QxConst.CORE_DOT,4);var ipb=b.split(QxConst.CORE_DOT,4);for(var i=0;i<3;i++){a=parseInt(ipa[i]);b=parseInt(ipb[i]);if(a!=b){return a-b;};};return parseInt(ipa[3])-parseInt(ipb[3]);};QxCompare.byZIndex=function(a,b){return a.getZIndex()-b.getZIndex();};function QxObject(vAutoDispose){this._hashCode=QxObjectCounter++;if(vAutoDispose!==false){QxObjectDataBase.push(this);};};QxObject.extend(Object,"QxObject");proto.toString=function(){if(this.classname){return "[object "+this.classname+"]";};return "[object Object]";};proto.toHashCode=function(){return this._hashCode;};proto.getDisposed=function(){return this._disposed;};proto.isDisposed=function(){return this._disposed;};proto.debug=function(m,c){QxDebug(this.classname+QxObject.DEBUG_MSG_BEFORE+this._hashCode+QxObject.DEBUG_MSG_AFTER,m,c);};proto.info=function(m,c){this.debug(m,"info");};proto.warn=function(m,c){this.debug(m,"warning");};proto.error=function(m,f){if(QxUtil.isValidString(f)){this.debug(QxObject.DEBUG_FUNCERRORPRE+f+QxObject.DEBUG_FUNCERRORPOST+m,QxConst.EVENT_TYPE_ERROR);}else {this.debug(m,QxConst.EVENT_TYPE_ERROR);};};proto.set=function(propertyValues){if(typeof propertyValues!==QxConst.TYPEOF_OBJECT){throw new Error("Please use a valid hash of property key-values pairs.");};for(var prop in propertyValues){try{this[QxMain.setter[prop]](propertyValues[prop]);}catch(ex){this.error("Setter of property "+prop+" returned with an error:"+ex,"set");};};return this;};proto.get=function(propertyNames,outputHint){switch(typeof propertyNames){case QxConst.TYPEOF_STRING:return this[QxConst.INTERNAL_GET+propertyNames.toFirstUp()]();case QxConst.TYPEOF_OBJECT:if(typeof propertyNames.length===QxConst.TYPEOF_NUMBER){if(outputHint=="hash"){var h={};propertyLength=propertyNames.length;for(var i=0;i<propertyLength;i++){try{h[propertyNames[i]]=this[QxConst.INTERNAL_GET+propertyNames[i].toFirstUp()]();}catch(ex){throw new Error("Could not get a valid value from property:"+propertyNames[i]+"! Is the property existing?("+ex+")");};};return h;}else {propertyLength=propertyNames.length;for(var i=0;i<propertyLength;i++){try{propertyNames[i]=this[QxConst.INTERNAL_GET+propertyNames[i].toFirstUp()]();}catch(ex){throw new Error("Could not get a valid value from property:"+propertyNames[i]+"! Is the property existing?("+ex+")");};};return propertyNames;};}else {for(var i in propertyNames){propertyNames[i]=this[QxConst.INTERNAL_GET+i.toFirstUp()]();};return propertyNames;};default:throw new Error("Please use a valid array,hash or string as parameter!");};};proto.setUserData=function(vKey,vValue){if(!this._userData){this._userData={};};this._userData[vKey]=vValue;};proto.getUserData=function(vKey){if(!this._userData){return null;};return this._userData[vKey];};proto._disposed=false;proto.dispose=function(){if(this.getDisposed()){return;};if(this._userData){for(var vKey in this._userData){this._userData[vKey]=null;};this._userData=null;};if(this._objectproperties){var a=this._objectproperties.split(QxConst.CORE_COMMA);for(var i=0,l=a.length;i<l;i++){delete this[QxMain.values[a[i]]];};delete this._objectproperties;};if(QxSettings.enableDisposerDebug){for(var vKey in this){if(this[vKey]!==null&&typeof this[vKey]===QxConst.TYPEOF_OBJECT){this.debug("Missing class implementation to dispose:"+vKey);delete this[vKey];};};};QxObjectDataBase[this._hashCode]=null;delete QxObjectDataBase[this._hashCode];this._disposed=true;};var QxObjectCounter=0;var QxObjectDataBase=[];QxObject.toHashCode=function(o){if(o._hashCode!=null){return o._hashCode;};return o._hashCode=QxObjectCounter++;};QxObject.dispose=function(){var vStart=(new Date).valueOf();var vObject;for(var i=QxObjectDataBase.length-1;i>=0;i--){vObject=QxObjectDataBase[i];if(vObject!=null){vObject.dispose();QxObjectDataBase[i]=null;};};};QxObject.addProperty({name:"enabled",type:QxConst.TYPEOF_BOOLEAN,defaultValue:true,getAlias:"isEnabled"});QxObject.DEBUG_MSG_BEFORE="[HASHCODE:";QxObject.DEBUG_MSG_AFTER="]";QxObject.DEBUG_FUNCERRORPRE="Failed to execute \"";QxObject.DEBUG_FUNCERRORPOST="()\":";function QxClient(){var vBrowserUserAgent=navigator.userAgent;var vBrowserVendor=navigator.vendor;var vBrowserProduct=navigator.product;var vBrowserPlatform=navigator.platform;var vBrowserModeHta=false;var vEngine=null;var vEngineVersion=null;var vEngineVersionMajor=0;var vEngineVersionMinor=0;var vEngineVersionRevision=0;var vEngineVersionBuild=0;var vEngineEmulation=null;var vVersionHelper;if (window.opera && /Opera[\s\/]([0-9\.]*)/.test(vBrowserUserAgent)){vEngine="opera";vEngineVersion=RegExp.$1;vEngineVersion=vEngineVersion.substring(0,3)+"."+vEngineVersion.substring(3);vEngineEmulation=vBrowserUserAgent.indexOf("MSIE")!==-1?"mshtml":vBrowserUserAgent.indexOf("Mozilla")!==-1?"gecko":null;}else if(typeof vBrowserVendor==="string"&&vBrowserVendor==="KDE"){vEngine="khtml";}else if (window.controllers && typeof vBrowserProduct==="string" && vBrowserProduct==="Gecko" && /rv\:([^\);]+)(\)|;)/.test(vBrowserUserAgent)){vEngine="gecko";vEngineVersion=RegExp.$1;}else if (/MSIE\s+([^\);]+)(\)|;)/.test(vBrowserUserAgent)){vEngine="mshtml";vEngineVersion=RegExp.$1;vBrowserModeHta=!window.external;};if(vEngineVersion){vVersionHelper=vEngineVersion.split(".");vEngineVersionMajor=vVersionHelper[0]||0;vEngineVersionMinor=vVersionHelper[1]||0;vEngineVersionRevision=vVersionHelper[2]||0;vEngineVersionBuild=vVersionHelper[3]||0;};this._engineName=vEngine;this._engineNameMshtml=vEngine==="mshtml";this._engineNameGecko=vEngine==="gecko";this._engineNameOpera=vEngine==="opera";this._engineNameKhtml=vEngine==="khtml";this._engineVersion=parseFloat(vEngineVersion);this._engineVersionMajor=parseInt(vEngineVersionMajor);this._engineVersionMinor=parseInt(vEngineVersionMinor);this._engineVersionRevision=parseInt(vEngineVersionRevision);this._engineVersionBuild=parseInt(vEngineVersionBuild);this._engineQuirksMode=document.compatMode!=="CSS1Compat";this._engineEmulation=vEngineEmulation;this._browserPlatform=vBrowserPlatform;this._browserModeHta=vBrowserModeHta;};QxClient.extend(QxObject,"QxClient");proto.getEngine=function(){return this._engineName;};proto.getVersion=function(){return this._engineVersion;};proto.getMajor=function(){return this._engineVersionMajor;};proto.getMinor=function(){return this._engineVersionMinor;};proto.getRevision=function(){return this._engineVersionRevision;};proto.getBuild=function(){return this._engineVersionBuild;};proto.getEmulation=function(){return this._engineEmulation;};proto.isMshtml=function(){return this._engineNameMshtml;};proto.isGecko=function(){return this._engineNameGecko;};proto.isOpera=function(){return this._engineNameOpera;};proto.isKhtml=function(){return this._engineNameKhtml;};proto.isInQuirksMode=function(){return this._engineQuirksMode;};QxClient=new QxClient;var QxDom= {STR_ON:"on",STR_FIXED:QxConst.CORE_FIXED,STR_ABSOLUTE:QxConst.CORE_ABSOLUTE };QxDom.getComputedOuterWidth=function(el){return QxDom.getComputedBoxWidth(el)+QxDom.getComputedMarginLeft(el)+QxDom.getComputedMarginRight(el);};QxDom.getComputedOuterHeight=function(el){return QxDom.getComputedBoxHeight(el)+QxDom.getComputedMarginTop(el)+QxDom.getComputedMarginBottom(el);};QxDom.getComputedBoxWidth=function(el){var h=el.offsetHeight;if(h==0){var o=el.style.height;el.style.height="1px";};var v=el.offsetWidth;if(h==0){el.style.height=o;};return v;};QxDom.getComputedBoxHeight=function(el){var w=el.offsetWidth;if(w==0){var o=el.style.width;el.style.width="1px";};var v=el.offsetHeight;if(w==0){el.style.width=o;};return v;};if(QxClient.isGecko()){QxDom.getComputedAreaWidth=function(el){if(el.clientWidth!=0&&el.clientWidth!=(QxDom.getComputedBorderLeft(el)+QxDom.getComputedBorderRight(el))){return el.clientWidth;}else {return QxDom.getComputedBoxWidth(el)-QxDom.getComputedInsetLeft(el)-QxDom.getComputedInsetRight(el);};};QxDom.getComputedAreaHeight=function(el){if(el.clientHeight!=0&&el.clientHeight!=(QxDom.getComputedBorderTop(el)+QxDom.getComputedBorderBottom(el))){return el.clientHeight;}else {return QxDom.getComputedBoxHeight(el)-QxDom.getComputedInsetTop(el)-QxDom.getComputedInsetBottom(el)};};}else {QxDom.getComputedAreaWidth=function(el){return el.clientWidth!=0?el.clientWidth:(QxDom.getComputedBoxWidth(el)-QxDom.getComputedInsetLeft(el)-QxDom.getComputedInsetRight(el));};QxDom.getComputedAreaHeight=function(el){return el.clientHeight!=0?el.clientHeight:(QxDom.getComputedBoxHeight(el)-QxDom.getComputedInsetTop(el)-QxDom.getComputedInsetBottom(el));};};QxDom.getComputedInnerWidth=function(el){return QxDom.getComputedAreaWidth(el)-QxDom.getComputedPaddingLeft(el)-QxDom.getComputedPaddingRight(el);};QxDom.getComputedInnerHeight=function(el){return QxDom.getComputedAreaHeight(el)-QxDom.getComputedPaddingTop(el)-QxDom.getComputedPaddingBottom(el);};if(QxClient.isMshtml()){QxDom.getComputedInsetLeft=function(el){return el.clientLeft;};QxDom.getComputedInsetTop=function(el){return el.clientTop;};QxDom.getComputedInsetRight=function(el){if(QxDom.getComputedStyleProperty(el,"overflowY")==QxConst.CORE_HIDDEN||el.clientWidth==0){return QxDom.getComputedBorderRight(el);};return Math.max(0,el.offsetWidth-el.clientLeft-el.clientWidth);};QxDom.getComputedInsetBottom=function(el){if(QxDom.getComputedStyleProperty(el,"overflowX")==QxConst.CORE_HIDDEN||el.clientHeight==0){return QxDom.getComputedBorderBottom(el);};return Math.max(0,el.offsetHeight-el.clientTop-el.clientHeight);};}else {QxDom.getComputedInsetLeft=function(el){return QxDom.getComputedBorderLeft(el);};QxDom.getComputedInsetTop=function(el){return QxDom.getComputedBorderTop(el);};QxDom.getComputedInsetRight=function(el){if(el.clientWidth==0){var ov=QxDom.getComputedStyleProperty(el,QxConst.EVENT_TYPE_OVERFLOW);var sbv=ov=="scroll"||ov=="-moz-scrollbars-vertical"?16:0;return Math.max(0,QxDom.getComputedBorderRight(el)+sbv);};return Math.max(0,el.offsetWidth-el.clientWidth-QxDom.getComputedBorderLeft(el));};QxDom.getComputedInsetBottom=function(el){if(el.clientHeight==0){var ov=QxDom.getComputedStyleProperty(el,QxConst.EVENT_TYPE_OVERFLOW);var sbv=ov=="scroll"||ov=="-moz-scrollbars-horizontal"?16:0;return Math.max(0,QxDom.getComputedBorderBottom(el)+sbv);};return Math.max(0,el.offsetHeight-el.clientHeight-QxDom.getComputedBorderTop(el));};};QxDom.getComputedScrollBarSizeLeft=function(el){return 0;};QxDom.getComputedScrollBarSizeTop=function(el){return 0;};QxDom.getComputedScrollBarSizeRight=function(el){return QxDom.getComputedInsetRight(el)-QxDom.getComputedBorderRight(el);};QxDom.getComputedScrollBarSizeBottom=function(el){return QxDom.getComputedInsetBottom(el)-QxDom.getComputedBorderBottom(el);};QxDom.getComputedScrollBarVisibleX=function(el){return QxDom.getComputedScrollBarSizeRight(el)>0;};QxDom.getComputedScrollBarVisibleY=function(el){return QxDom.getComputedScrollBarSizeBottom(el)>0;};QxDom.getElementFromPoint=function(x,y){return QxDom.getElementFromPointHandler(document.body,x,y);};QxDom.getElementFromPointHandler=function(node,x,y,recursive){var ch=node.childNodes;var chl=ch.length-1;if(chl<0){return null;};var chc,subres,ret;do {chc=ch[chl];ret=QxDom.getElementFromPointChecker(chc,x,y);if(ret){if(typeof recursive===QxConst.TYPEOF_BOOLEAN&&recursive==false){return chc;}else {subres=QxDom.getElementFromPointHandler(chc,x-ret[0]-QxDom.getComputedBorderLeft(chc),y-ret[2]-QxDom.getComputedBorderTop(chc));return subres?subres:chc;};};}while(chl--);return null;};QxDom.getElementFromPointChecker=function(chc,x,y){var xstart,ystart,xstop,ystop;if(chc.nodeType!=1){return false;};xstart=QxDom.getOffsetLeft(chc);if(x>xstart){ystart=QxDom.getOffsetTop(chc);if(y>ystart){xstop=xstart+chc.offsetWidth;if(xstop==xstart&&chc.className=="QxLabel"){xstop=xstart+chc._QxWidget.getAnyWidth();};if(x<xstop){ystop=ystart+chc.offsetHeight;if(y<ystop){return[xstart,xstop,ystart,ystop];};};};};return false;};QxDom.getElementAbsolutePointChecker=function(chc,x,y){var xstart,ystart,xstop,ystop;if(!chc||chc.nodeType!=1){return false;};xstart=QxDom.getComputedPageBoxLeft(chc);if(x>xstart){ystart=QxDom.getComputedPageBoxTop(chc);if(y>ystart){xstop=xstart+chc.offsetWidth;if(xstop==xstart&&chc.className=="QxLabel"){xstop=xstart+chc._QxWidget.getAnyWidth();};if(x<xstop){ystop=ystart+chc.offsetHeight;if(y<ystop){return[xstart,xstop,ystart,ystop];};};};};return false;};if(QxClient.isMshtml()){QxDom.addEventListener=function(vElement,vType,vFunction){vElement.attachEvent(QxDom.STR_ON+vType,vFunction);};QxDom.removeEventListener=function(vElement,vType,vFunction){vElement.detachEvent(QxDom.STR_ON+vType,vFunction);};}else {QxDom.addEventListener=function(vElement,vType,vFunction){vElement.addEventListener(vType,vFunction,false);};QxDom.removeEventListener=function(vElement,vType,vFunction){vElement.removeEventListener(vType,vFunction,false);};};QxDom.getComputedPageOuterLeft=function(el){return QxDom.getComputedPageBoxLeft(el)-QxDom.getComputedMarginLeft(el);};QxDom.getComputedPageOuterTop=function(el){return QxDom.getComputedPageBoxTop(el)-QxDom.getComputedMarginTop(el);};QxDom.getComputedPageOuterRight=function(el){return QxDom.getComputedPageBoxRight(el)+QxDom.getComputedMarginRight(el);};QxDom.getComputedPageOuterBottom=function(el){return QxDom.getComputedPageBoxBottom(el)+QxDom.getComputedMarginBottom(el);};QxDom.getComputedClientOuterLeft=function(el){return QxDom.getComputedClientBoxLeft(el)-QxDom.getComputedMarginLeft(el);};QxDom.getComputedClientOuterTop=function(el){return QxDom.getComputedClientBoxTop(el)-QxDom.getComputedMarginTop(el);};QxDom.getComputedClientOuterRight=function(el){return QxDom.getComputedClientBoxRight(el)+QxDom.getComputedMarginRight(el);};QxDom.getComputedClientOuterBottom=function(el){return QxDom.getComputedClientBoxBottom(el)+QxDom.getComputedMarginBottom(el);};if(QxClient.isMshtml()){QxDom.getComputedClientBoxLeft=function(el){return el.getBoundingClientRect().left;};QxDom.getComputedClientBoxTop=function(el){return el.getBoundingClientRect().top;};QxDom.getComputedPageBoxLeft=function(el){return QxDom.getComputedClientBoxLeft(el)+QxDom.getScrollLeftSum(el);};QxDom.getComputedPageBoxTop=function(el){return QxDom.getComputedClientBoxTop(el)+QxDom.getScrollTopSum(el);};}else if(QxClient.isGecko()){QxDom.getComputedClientBoxLeft=function(el){return QxDom.getComputedClientAreaLeft(el)-QxDom.getComputedBorderLeft(el);};QxDom.getComputedClientBoxTop=function(el){return QxDom.getComputedClientAreaTop(el)-QxDom.getComputedBorderTop(el);};QxDom.getComputedPageBoxLeft=function(el){return QxDom.getComputedPageAreaLeft(el)-QxDom.getComputedBorderLeft(el);};QxDom.getComputedPageBoxTop=function(el){return QxDom.getComputedPageAreaTop(el)-QxDom.getComputedBorderTop(el);};}else {QxDom.getComputedPageBoxLeft=function(el){var sum=el.offsetLeft;while(el.tagName!="BODY"){el=el.offsetParent;sum+=el.offsetLeft;};return sum;};QxDom.getComputedPageBoxTop=function(el){var sum=el.offsetTop;while(el.tagName!="BODY"){el=el.offsetParent;sum+=el.offsetTop;};return sum;};QxDom.getComputedClientBoxLeft=function(el){var sum=el.offsetLeft;while(el.tagName!="BODY"){el=el.offsetParent;sum+=el.offsetLeft-el.scrollLeft;};return sum;};QxDom.getComputedClientBoxTop=function(el){var sum=el.offsetTop;while(el.tagName!="BODY"){el=el.offsetParent;sum+=el.offsetTop-el.scrollTop;};return sum;};};if(QxClient.isMshtml()){QxDom.getComputedClientBoxRight=function(el){return el.getBoundingClientRect().right;};QxDom.getComputedClientBoxBottom=function(el){return el.getBoundingClientRect().bottom;};QxDom.getComputedPageBoxRight=function(el){return QxDom.getComputedClientBoxRight(el)+QxDom.getScrollLeftSum(el);};QxDom.getComputedPageBoxBottom=function(el){return QxDom.getComputedClientBoxBottom(el)+QxDom.getScrollTopSum(el);};}else {QxDom.getComputedClientBoxRight=function(el){return QxDom.getComputedClientBoxLeft(el)+QxDom.getComputedBoxWidth(el);};QxDom.getComputedClientBoxBottom=function(el){return QxDom.getComputedClientBoxTop(el)+QxDom.getComputedBoxHeight(el);};QxDom.getComputedPageBoxRight=function(el){return QxDom.getComputedPageBoxLeft(el)+QxDom.getComputedBoxWidth(el);};QxDom.getComputedPageBoxBottom=function(el){return QxDom.getComputedPageBoxTop(el)+QxDom.getComputedBoxHeight(el);};};if(QxClient.isGecko()){QxDom.getComputedPageAreaLeft=function(el){return el.ownerDocument.getBoxObjectFor(el).x;};QxDom.getComputedPageAreaTop=function(el){return el.ownerDocument.getBoxObjectFor(el).y;};QxDom.getComputedClientAreaLeft=function(el){return QxDom.getComputedPageAreaLeft(el)-QxDom.getScrollLeftSum(el);};QxDom.getComputedClientAreaTop=function(el){return QxDom.getComputedPageAreaTop(el)-QxDom.getScrollTopSum(el);};}else {QxDom.getComputedClientAreaLeft=function(el){return QxDom.getComputedClientBoxLeft(el)+QxDom.getComputedBorderLeft(el);};QxDom.getComputedClientAreaTop=function(el){return QxDom.getComputedClientBoxTop(el)+QxDom.getComputedBorderTop(el);};QxDom.getComputedPageAreaLeft=function(el){return QxDom.getComputedPageBoxLeft(el)+QxDom.getComputedBorderLeft(el);};QxDom.getComputedPageAreaTop=function(el){return QxDom.getComputedPageBoxTop(el)+QxDom.getComputedBorderTop(el);};};QxDom.getComputedClientAreaRight=function(el){return QxDom.getComputedClientAreaLeft(el)+QxDom.getComputedAreaWidth(el);};QxDom.getComputedClientAreaBottom=function(el){return QxDom.getComputedClientAreaTop(el)+QxDom.getComputedAreaHeight(el);};QxDom.getComputedPageAreaRight=function(el){return QxDom.getComputedPageAreaLeft(el)+QxDom.getComputedAreaWidth(el);};QxDom.getComputedPageAreaBottom=function(el){return QxDom.getComputedPageAreaTop(el)+QxDom.getComputedAreaHeight(el);};QxDom.getComputedClientInnerLeft=function(el){return QxDom.getComputedClientAreaLeft(el)+QxDom.getComputedPaddingLeft(el);};QxDom.getComputedClientInnerTop=function(el){return QxDom.getComputedClientAreaTop(el)+QxDom.getComputedPaddingTop(el);};QxDom.getComputedClientInnerRight=function(el){return QxDom.getComputedClientInnerLeft(el)+QxDom.getComputedInnerWidth(el);};QxDom.getComputedClientInnerBottom=function(el){return QxDom.getComputedClientInnerTop(el)+QxDom.getComputedInnerHeight(el);};QxDom.getComputedPageInnerLeft=function(el){return QxDom.getComputedPageAreaLeft(el)+QxDom.getComputedPaddingLeft(el);};QxDom.getComputedPageInnerTop=function(el){return QxDom.getComputedPageAreaTop(el)+QxDom.getComputedPaddingTop(el);};QxDom.getComputedPageInnerRight=function(el){return QxDom.getComputedPageInnerLeft(el)+QxDom.getComputedInnerWidth(el);};QxDom.getComputedPageInnerBottom=function(el){return QxDom.getComputedPageInnerTop(el)+QxDom.getComputedInnerHeight(el);};if(QxClient.isGecko()){QxDom.getComputedScreenBoxLeft=function(el){var sum=0;var p=el.parentNode;while(p.nodeType==1){sum+=p.scrollLeft;p=p.parentNode;};return el.ownerDocument.getBoxObjectFor(el).screenX-sum;};QxDom.getComputedScreenBoxTop=function(el){var sum=0;var p=el.parentNode;while(p.nodeType==1){sum+=p.scrollTop;p=p.parentNode;};return el.ownerDocument.getBoxObjectFor(el).screenY-sum;};}else {QxDom.getComputedScreenBoxLeft=function(el){return QxDom.getComputedScreenDocumentLeft(el)+QxDom.getComputedPageBoxLeft(el);};QxDom.getComputedScreenBoxTop=function(el){return QxDom.getComputedScreenDocumentTop(el)+QxDom.getComputedPageBoxTop(el);};};QxDom.getComputedScreenBoxRight=function(el){return QxDom.getComputedScreenBoxLeft(el)+QxDom.getComputedBoxWidth(el);};QxDom.getComputedScreenBoxBottom=function(el){return QxDom.getComputedScreenBoxTop(el)+QxDom.getComputedBoxHeight(el);};QxDom.getComputedScreenOuterLeft=function(el){return QxDom.getComputedScreenBoxLeft(el)-QxDom.getComputedMarginLeft(el);};QxDom.getComputedScreenOuterTop=function(el){return QxDom.getComputedScreenBoxTop(el)-QxDom.getComputedMarginTop(el);};QxDom.getComputedScreenOuterRight=function(el){return QxDom.getComputedScreenBoxRight(el)+QxDom.getComputedMarginRight(el);};QxDom.getComputedScreenOuterBottom=function(el){return QxDom.getComputedScreenBoxBottom(el)+QxDom.getComputedMarginBottom(el);};QxDom.getComputedScreenAreaLeft=function(el){return QxDom.getComputedScreenBoxLeft(el)+QxDom.getComputedInsetLeft(el);};QxDom.getComputedScreenAreaTop=function(el){return QxDom.getComputedScreenBoxTop(el)+QxDom.getComputedInsetTop(el);};QxDom.getComputedScreenAreaRight=function(el){return QxDom.getComputedScreenBoxRight(el)-QxDom.getComputedInsetRight(el);};QxDom.getComputedScreenAreaBottom=function(el){return QxDom.getComputedScreenBoxBottom(el)-QxDom.getComputedInsetBottom(el);};QxDom.getComputedScreenInnerLeft=function(el){return QxDom.getComputedScreenAreaLeft(el)+QxDom.getComputedPaddingLeft(el);};QxDom.getComputedScreenInnerTop=function(el){return QxDom.getComputedScreenAreaTop(el)+QxDom.getComputedPaddingTop(el);};QxDom.getComputedScreenInnerRight=function(el){return QxDom.getComputedScreenAreaRight(el)-QxDom.getComputedPaddingRight(el);};QxDom.getComputedScreenInnerBottom=function(el){return QxDom.getComputedScreenAreaBottom(el)-QxDom.getComputedPaddingBottom(el);};if(QxClient.isGecko()){QxDom.getComputedScreenDocumentLeft=function(el){return QxDom.getComputedScreenOuterLeft(el.ownerDocument.body);};QxDom.getComputedScreenDocumentTop=function(el){return QxDom.getComputedScreenOuterTop(el.ownerDocument.body);};QxDom.getComputedScreenDocumentRight=function(el){return QxDom.getComputedScreenOuterRight(el.ownerDocument.body);};QxDom.getComputedScreenDocumentBottom=function(el){return QxDom.getComputedScreenOuterBottom(el.ownerDocument.body);};}else {QxDom.getComputedScreenDocumentLeft=function(el){return el.document.parentWindow.screenLeft;};QxDom.getComputedScreenDocumentTop=function(el){return el.document.parentWindow.screenTop;};QxDom.getComputedScreenDocumentRight=function(el){};QxDom.getComputedScreenDocumentBottom=function(el){};};if(QxClient.isGecko()){QxDom.getOffsetLeft=function(el){var val=el.offsetLeft;var pa=el.parentNode;var pose=QxDom.getComputedStyleProperty(el,"position");var posp=QxDom.getComputedStyleProperty(pa,"position");if(pose!=QxDom.STR_ABSOLUTE&&pose!=QxDom.STR_FIXED){val-=QxDom.getComputedBorderLeft(pa);};if(posp!=QxDom.STR_ABSOLUTE&&posp!=QxDom.STR_FIXED){while(pa){pa=pa.parentNode;if(!pa||QxUtil.isInvalidString(pa.tagName)){break;};var posi=QxDom.getComputedStyleProperty(pa,"position");if(posi==QxDom.STR_ABSOLUTE||posi==QxDom.STR_FIXED){val-=QxDom.getComputedBorderLeft(pa)+QxDom.getComputedPaddingLeft(pa);break;};};};return val;};QxDom.getOffsetTop=function(el){var val=el.offsetTop;var pa=el.parentNode;var pose=QxDom.getComputedStyleProperty(el,"position");var posp=QxDom.getComputedStyleProperty(pa,"position");if(pose!=QxDom.STR_ABSOLUTE&&pose!=QxDom.STR_FIXED){val-=QxDom.getComputedBorderTop(pa);};if(posp!=QxDom.STR_ABSOLUTE&&posp!=QxDom.STR_FIXED){while(pa){pa=pa.parentNode;if(!pa||QxUtil.isInvalidString(pa.tagName)){break;};var posi=QxDom.getComputedStyleProperty(pa,"position");if(posi==QxDom.STR_ABSOLUTE||posi==QxDom.STR_FIXED){val-=QxDom.getComputedBorderTop(pa)+QxDom.getComputedPaddingTop(pa);break;};};};return val;};}else {QxDom.getOffsetLeft=function(el){return el.offsetLeft;};QxDom.getOffsetTop=function(el){return el.offsetTop;};};QxDom.getScrollLeftSum=function(el){var sum=0;var p=el.parentNode;while(p.nodeType==1){sum+=p.scrollLeft;p=p.parentNode;};return sum;};QxDom.getScrollTopSum=function(el){var sum=0;var p=el.parentNode;while(p.nodeType==1){sum+=p.scrollTop;p=p.parentNode;};return sum;};QxDom.BODY_TAG_NAME="BODY";QxDom.scrollIntoViewX=function(vElement,vAlignLeft){var vParentWidth,vParentScrollLeft,vWidth,vHasScroll;var vParent=vElement.parentNode;var vOffset=vElement.offsetLeft;var vWidth=vElement.offsetWidth;while(vParent){switch(QxDom.getComputedStyleProperty(vParent,QxConst.PROPERTY_OVERFLOW_BOTH)){case QxConst.OVERFLOW_VALUE_BOTH:case QxConst.OVERFLOW_VALUE_AUTO:case QxConst.OVERFLOW_VALUE_MOZ_HORIZONTAL:vHasScroll=true;break;default:switch(QxDom.getComputedStyleProperty(vParent,QxConst.PROPERTY_OVERFLOW_HORIZONTAL)){case QxConst.OVERFLOW_VALUE_BOTH:case QxConst.OVERFLOW_VALUE_AUTO:vHasScroll=true;break;default:vHasScroll=false;};};if(vHasScroll){vParentWidth=vParent.clientWidth;vParentScrollLeft=vParent.scrollLeft;if(vAlignLeft){vParent.scrollLeft=vOffset;}else if(vAlignLeft==false){vParent.scrollLeft=vOffset+vWidth-vParentWidth;}else if(vWidth>vParentWidth||vOffset<vParentScrollLeft){vParent.scrollLeft=vOffset;}else if((vOffset+vWidth)>(vParentScrollLeft+vParentWidth)){vParent.scrollLeft=vOffset+vWidth-vParentWidth;};vOffset=vParent.offsetLeft;vWidth=vParent.offsetWidth;}else {vOffset+=vParent.offsetLeft;};if(vParent.tagName==QxDom.BODY_TAG_NAME){break;};vParent=vParent.parentNode;};return true;};QxDom.scrollIntoViewY=function(vElement,vAlignTop){var vParentHeight,vParentScrollTop,vHeight,vHasScroll;var vParent=vElement.parentNode;var vOffset=vElement.offsetTop;var vHeight=vElement.offsetHeight;while(vParent){switch(QxDom.getComputedStyleProperty(vParent,QxConst.PROPERTY_OVERFLOW_BOTH)){case QxConst.OVERFLOW_VALUE_BOTH:case QxConst.OVERFLOW_VALUE_AUTO:case QxConst.OVERFLOW_VALUE_MOZ_VERTICAL:vHasScroll=true;break;default:switch(QxDom.getComputedStyleProperty(vParent,QxConst.PROPERTY_OVERFLOW_VERTICAL)){case QxConst.OVERFLOW_VALUE_BOTH:case QxConst.OVERFLOW_VALUE_AUTO:vHasScroll=true;break;default:vHasScroll=false;};};if(vHasScroll){vParentHeight=vParent.clientHeight;vParentScrollTop=vParent.scrollTop;if(vAlignTop){vParent.scrollTop=vOffset;}else if(vAlignTop==false){vParent.scrollTop=vOffset+vHeight-vParentHeight;}else if(vHeight>vParentHeight||vOffset<vParentScrollTop){vParent.scrollTop=vOffset;}else if((vOffset+vHeight)>(vParentScrollTop+vParentHeight)){vParent.scrollTop=vOffset+vHeight-vParentHeight;};vOffset=vParent.offsetTop;vHeight=vParent.offsetHeight;}else {vOffset+=vParent.offsetTop;};if(vParent.tagName==QxDom.BODY_TAG_NAME){break;};vParent=vParent.parentNode;};return true;};if(Boolean(document.defaultView)&&Boolean(document.defaultView.getComputedStyle)){QxDom.getComputedStylePropertySure=function(el,prop){return !el?null:el.ownerDocument?el.ownerDocument.defaultView.getComputedStyle(el,QxConst.CORE_EMPTY)[prop]:el.style[prop];};QxDom.getComputedStyleProperty=function(el,prop){try{return el.ownerDocument.defaultView.getComputedStyle(el,QxConst.CORE_EMPTY)[prop];}catch(ex){throw new Error("Could not evaluate computed style:"+el+"["+prop+"]:"+ex);};};}else if(QxClient.isMshtml()){QxDom.getComputedStyleProperty=function(el,prop){try{return el.currentStyle[prop];}catch(ex){throw new Error("Could not evaluate computed style:"+el+"["+prop+"]:"+ex);};};QxDom.getComputedStylePropertySure=function(el,prop){try{if(!el){return null;};if(el.parentNode&&el.currentStyle){return el.currentStyle[prop];}else {var v1=el.runtimeStyle[prop];if(v1!=null&&typeof v1!=QxConst.TYPEOF_UNDEFINED&&v1!=QxConst.CORE_EMPTY){return v1;};return el.style[prop];};}catch(ex){throw new Error("Could not evaluate computed style:"+el+"["+prop+"]:"+ex);};};}else {QxDom.getComputedStylePropertySure=function(el,prop){return !el?null:el.style[prop];};QxDom.getComputedStyleProperty=function(el,prop){try{return el.style[prop];}catch(ex){throw new Error("Could not evaluate computed style:"+el+"["+prop+"]");};};};QxDom.getComputedStyleSize=function(el,prop){return parseInt(QxDom.getComputedStyleProperty(el,prop))||0;};QxDom.getComputedMarginLeft=function(el){return QxDom.getComputedStyleSize(el,QxConst.PROPERTY_MARGINLEFT);};QxDom.getComputedMarginTop=function(el){return QxDom.getComputedStyleSize(el,QxConst.PROPERTY_MARGINTOP);};QxDom.getComputedMarginRight=function(el){return QxDom.getComputedStyleSize(el,QxConst.PROPERTY_MARGINRIGHT);};QxDom.getComputedMarginBottom=function(el){return QxDom.getComputedStyleSize(el,QxConst.PROPERTY_MARGINBOTTOM);};QxDom.getComputedPaddingLeft=function(el){return QxDom.getComputedStyleSize(el,QxConst.PROPERTY_PADDINGLEFT);};QxDom.getComputedPaddingTop=function(el){return QxDom.getComputedStyleSize(el,QxConst.PROPERTY_PADDINGTOP);};QxDom.getComputedPaddingRight=function(el){return QxDom.getComputedStyleSize(el,QxConst.PROPERTY_PADDINGRIGHT);};QxDom.getComputedPaddingBottom=function(el){return QxDom.getComputedStyleSize(el,QxConst.PROPERTY_PADDINGBOTTOM);};QxDom.getComputedBorderLeft=function(el){return QxDom.getComputedStyleProperty(el,"borderLeftStyle")==QxConst.CORE_NONE?0:QxDom.getComputedStyleSize(el,"borderLeftWidth");};QxDom.getComputedBorderTop=function(el){return QxDom.getComputedStyleProperty(el,"borderTopStyle")==QxConst.CORE_NONE?0:QxDom.getComputedStyleSize(el,"borderTopWidth");};QxDom.getComputedBorderRight=function(el){return QxDom.getComputedStyleProperty(el,"borderRightStyle")==QxConst.CORE_NONE?0:QxDom.getComputedStyleSize(el,"borderRightWidth");};QxDom.getComputedBorderBottom=function(el){return QxDom.getComputedStyleProperty(el,"borderBottomStyle")==QxConst.CORE_NONE?0:QxDom.getComputedStyleSize(el,"borderBottomWidth");};if(QxClient.isMshtml()){QxDom.createStyleElement=function(vCssText){var vSheet=document.createStyleSheet();if(vCssText){vSheet.cssText=vCssText;};return vSheet;};QxDom.addCssRule=function(vSheet,vSelector,vStyle){vSheet.addRule(vSelector,vStyle);};QxDom.removeCssRule=function(vSheet,vSelector){vRules=vSheet.rules;vLength=vRules.length;for(i=vLength-1;i>=0;i--){if(vRules[i].selectorText==vSelector){vSheet.removeRule(i);};};};QxDom.removeAllCssRules=function(vSheet){vRules=vSheet.rules;vLength=vRules.length;for(i=vLength-1;i>=0;i--){vSheet.removeRule(i);};};}else {QxDom.createStyleElement=function(vCssText){vElement=document.createElement("STYLE");vElement.type="text/css";if(vCssText){vElement.appendChild(document.createTextNode(vCssText));};document.getElementsByTagName("HEAD")[0].appendChild(vElement);return vElement.sheet;};QxDom.addCssRule=function(vSheet,vSelector,vStyle){vSheet.insertRule(vSelector+"{"+vStyle+"}",vSheet.cssRules.length);};QxDom.removeCssRule=function(vSheet,vSelector){vRules=vSheet.cssRules;vLength=vRules.length;for(i=vLength-1;i>=0;i--){if(vRules[i].selectorText==vSelector){vSheet.deleteRule(i);};};};QxDom.removeAllCssRules=function(vSheet){vRules=vSheet.cssRules;vLength=vRules.length;for(i=vLength-1;i>=0;i--){vSheet.deleteRule(i);};};};if(QxClient.isMshtml()){QxDom.getWindowInnerWidth=function(w){if(w.document.documentElement&&w.document.documentElement.clientWidth){return w.document.documentElement.clientWidth;}else if(w.document.body){return w.document.body.clientWidth;};return 0;};QxDom.getWindowInnerHeight=function(w){if(w.document.documentElement&&w.document.documentElement.clientHeight){return w.document.documentElement.clientHeight;}else if(w.document.body){return w.document.body.clientHeight;};return 0;};QxDom.getClientScrollLeft=function(w){if(w.document.documentElement&&w.document.documentElement.scrollLeft){return w.document.documentElement.scrollLeft;}else if(w.document.body){return w.document.body.scrollTop;};return 0;};QxDom.getClientScrollTop=function(w){if(w.document.documentElement&&w.document.documentElement.scrollTop){return w.document.documentElement.scrollTop;}else if(w.document.body){return w.document.body.scrollTop;};return 0;};}else {QxDom.getWindowInnerWidth=function(w){return w.innerWidth;};QxDom.getWindowInnerHeight=function(w){return w.innerHeight;};QxDom.getClientScrollLeft=function(w){return w.document.body.scrollLeft;};QxDom.getClientScrollTop=function(w){return w.document.body.scrollTop;};};function QxDebug(group,message,classname){var t=String((new Date).valueOf()-QxMain.loadStart);while(t.length<6)t=QxConst.CORE_ZERO+t;t+=QxDebug.divider;if(!QxDebug._head){QxDebug._head=document.createElement(QxConst.CORE_DIV);QxDebug._head.className="head";QxDebug._log=document.createElement(QxConst.CORE_DIV);QxDebug._log.className="log";QxDebug._btnClear=document.createElement("button");QxDebug._btnClear.appendChild(document.createTextNode("clear"));QxDebug._head.appendChild(QxDebug._btnClear);QxDebug._btnClear.onclick=function(e){QxDebug._log.innerHTML="";QxDebug.lastgroup=null;};QxDebug._btnHide=document.createElement("button");QxDebug._btnHide.appendChild(document.createTextNode("hide"));QxDebug._head.appendChild(QxDebug._btnHide);QxDebug._btnHide.onclick=function(e){QxDebug._log.style.display=QxConst.CORE_NONE;document.getElementById("demoHead").style.display=QxConst.CORE_NONE;document.getElementById("demoFoot").style.display=QxConst.CORE_NONE;document.getElementById("demoDescription").style.display=QxConst.CORE_NONE;document.getElementById("demoFiles").style.display=QxConst.CORE_NONE;document.getElementById("demoFrame").style.display=QxConst.CORE_NONE;document.getElementById("demoDebug").style.visibility=QxConst.CORE_HIDDEN;};QxDebug._btnShow=document.createElement("button");QxDebug._btnShow.appendChild(document.createTextNode("show"));QxDebug._head.appendChild(QxDebug._btnShow);QxDebug._btnShow.onclick=function(e){QxDebug._log.style.display="";document.getElementById("demoHead").style.display="";document.getElementById("demoFoot").style.display="";document.getElementById("demoDescription").style.display="";document.getElementById("demoFiles").style.display="";document.getElementById("demoFrame").style.display="";document.getElementById("demoDebug").style.visibility="";};QxDebug._btnDispose=document.createElement("button");QxDebug._btnDispose.appendChild(document.createTextNode("dispose"));QxDebug._head.appendChild(QxDebug._btnDispose);QxDebug._btnDispose.onclick=function(e){window.application.dispose();};};if(group!=QxDebug.lastgroup){var n=document.createElement(QxConst.CORE_DIV);n.className=QxDebug.groupClass;n.appendChild(document.createTextNode(group));QxDebug._log.appendChild(n);QxDebug.lastgroup=group;};if(QxUtil.isValid(message)){if(QxUtil.isInvalidString(classname)){classname=QxConst.CORE_DEFAULT;};var n=document.createElement(QxConst.CORE_DIV);n.className=QxDebug.messageClass+classname;n.appendChild(document.createTextNode(t+message));QxDebug._log.appendChild(n);};if(!QxDebug._head.parentNode||typeof QxDebug._head.parentNode.tagName===QxConst.TYPEOF_UNDEFINED){var d=document.getElementById(QxDebug.console);if(d){d.appendChild(QxDebug._head);d.appendChild(QxDebug._log);};};};QxDebug.console="demoDebug";QxDebug.lastgroup=null;QxDebug.divider=":";QxDebug.groupClass="group";QxDebug.messageClass="message message-";function QxTarget(vAutoDispose){QxObject.call(this,vAutoDispose);};QxTarget.extend(QxObject,"QxTarget");proto.addEventListener=function(vType,vFunction,vObject){if(this._disposed){return;};if(typeof vFunction!==QxConst.TYPEOF_FUNCTION){throw new Error("QxTarget:addEventListener("+vType+"):'"+vFunction+"' is not a function!");};if(typeof this._listeners===QxConst.TYPEOF_UNDEFINED){this._listeners={};this._listeners[vType]={};}else if(typeof this._listeners[vType]===QxConst.TYPEOF_UNDEFINED){this._listeners[vType]={};};var vKey=QxConst.CORE_EVENTPREFIX+QxObject.toHashCode(vFunction)+(vObject?QxConst.CORE_UNDERLINE+QxObject.toHashCode(vObject):QxConst.CORE_EMPTY);this._listeners[vType][vKey]= {handler:vFunction,object:vObject };};proto.removeEventListener=function(vType,vFunction,vObject){if(this._disposed){return;};var vListeners=this._listeners;if(!vListeners||typeof vListeners[vType]===QxConst.TYPEOF_UNDEFINED){return;};if(typeof vFunction!==QxConst.TYPEOF_FUNCTION){throw new Error("QxTarget:removeEventListener("+vType+"):'"+vFunction+"' is not a function!");};var vKey=QxConst.CORE_EVENTPREFIX+QxObject.toHashCode(vFunction)+(vObject?QxConst.CORE_UNDERLINE+QxObject.toHashCode(vObject):QxConst.CORE_EMPTY);delete this._listeners[vType][vKey];};proto.hasEventListeners=function(vType){return this._listeners&&typeof this._listeners[vType]!==QxConst.TYPEOF_UNDEFINED&&!QxUtil.isObjectEmpty(this._listeners[vType]);};proto.createDispatchEvent=function(vType){if(this.hasEventListeners(vType)){this.dispatchEvent(new QxEvent(vType),true);};};proto.createDispatchDataEvent=function(vType,vData){if(this.hasEventListeners(vType)){this.dispatchEvent(new QxDataEvent(vType,vData),true);};};proto.dispatchEvent=function(vEvent,vEnableDispose){if(this.getDisposed()){return;};if(vEvent.getTarget()==null){vEvent.setTarget(this);};if(vEvent.getCurrentTarget()==null){vEvent.setCurrentTarget(this);};this._dispatchEvent(vEvent,vEnableDispose);return !vEvent._defaultPrevented;};proto._dispatchEvent=function(vEvent,vEnableDispose){if(this.getDisposed()){return;};var vListeners=this._listeners;if(vListeners){vEvent.setCurrentTarget(this);var vTypeListeners=vListeners[vEvent.getType()];if(vTypeListeners){var vFunction,vObject;for(var vHashCode in vTypeListeners){vFunction=vTypeListeners[vHashCode].handler;vObject=vTypeListeners[vHashCode].object;try{if(typeof vFunction===QxConst.TYPEOF_FUNCTION){vFunction.call(QxUtil.isValid(vObject)?vObject:this,vEvent);};}catch(ex){this.error("Could not dispatch event of type \""+vEvent.getType()+"\":"+ex,"_dispatchEvent");};};};};var vParent=this.getParent();if(vEvent.getBubbles()&&!vEvent.getPropagationStopped()&&vParent&&!vParent.getDisposed()&&vParent.getEnabled()){vParent._dispatchEvent(vEvent,false);};vEnableDispose&&vEvent.dispose();};proto.getParent=function(){return null;};proto.dispose=function(){if(this.getDisposed()){return;};if(typeof this._listeners===QxConst.TYPEOF_OBJECT){for(var vType in this._listeners){for(var vKey in this._listeners[vType]){this._listeners[vType][vKey]=null;delete this._listeners[vType][vKey];};this._listeners[vType]=null;delete this._listeners[vType];};};this._listeners=null;delete this._listeners;return QxObject.prototype.dispose.call(this);};function QxManager(){QxTarget.call(this);this._objects={};};QxManager.extend(QxTarget,"QxManager");proto.add=function(vObject){if(this.getDisposed()){return;};this._objects[vObject.toHashCode()]=vObject;return true;};proto.remove=function(vObject){if(this.getDisposed()){return;};delete this._objects[vObject.toHashCode()];return true;};proto.has=function(vObject){return this._objects[vObject.toHashCode()]!=null;};proto.get=function(vObject){return this._objects[vObject.toHashCode()];};proto.getAll=function(){return this._objects;};proto.dispose=function(){if(this.getDisposed()){return;};if(this._objects){for(var i in this._objects){delete this._objects[i];};delete this._objects;};return QxTarget.prototype.dispose.call(this);};function QxApplicationInit(){if(window.application){window.application.init();};};function QxApplicationUnload(){if(window.application){window.application.dispose();};window.application=null;};function QxApplication(){QxTarget.call(this,false);if(QxClient.isGecko()){QxDom.addEventListener(window,"DOMContentLoaded",QxApplicationInit);}else{QxDom.addEventListener(window,"load",QxApplicationInit);};QxDom.addEventListener(window,QxConst.EVENT_TYPE_UNLOAD,QxApplicationUnload);};QxApplication.extend(QxTarget,"QxApplication");proto.pre=QxUtil.returnTrue;proto.main=QxUtil.returnTrue;proto.post=QxUtil.returnTrue;proto.init=function(){if(this._initDone){return;};this._initDone=true;this._runInitialization();this._runApplication();this._runPreload();};proto._runInitialization=function(){var s=(new Date).valueOf();this.info("Initialization phase");this._printVersion();try{this._printClassInfo();this._printPropertyInfo();this._printClientInfo();this.debug("Executing application pre");this.pre();this.createDispatchEvent(QxConst.EVENT_TYPE_PRE);this._clientWindow=new QxClientWindow();this._remappingChildTable=QxParent.prototype._remappingChildTable;QxParent.prototype.remapChildrenHandlingTo.call(this,this._clientWindow.getClientDocument());this._printInstanceInfo();}catch(ex){return this.error("...failed:"+ex);};this.debug("Done in:"+((new Date).valueOf()-s)+QxConst.CORE_MILLISECONDS);};proto._runApplication=function(){var s=(new Date).valueOf();this.info("Main phase");try{this.debug("Executing application main");this.main();this.createDispatchEvent(QxConst.EVENT_TYPE_MAIN);this._printInstanceInfo();}catch(ex){return this.error("...failed:"+ex);};this.debug("Done in:"+((new Date).valueOf()-s)+QxConst.CORE_MILLISECONDS);};proto._runPreload=function(){this._preloadStart=(new Date).valueOf();this.info("Preload phase");this.debug("Preloading images...");var vPreloaderSystem=new QxImagePreloaderSystem(QxImageManager.getPreloadImageList());vPreloaderSystem.addEventListener(QxConst.EVENT_TYPE_COMPLETED,this._runPreloadDone,this);vPreloaderSystem.start();};proto._runPreloadDone=function(){this.debug("Done in:"+((new Date).valueOf()-this._preloadStart)+QxConst.CORE_MILLISECONDS);this._runWidgets();};proto._runWidgets=function(){var s=(new Date).valueOf();this.info("Widget phase");this.debug("Rendering widgets");this._ready=true;QxWidget.flushGlobalQueues(true);this.debug("Done in:"+((new Date).valueOf()-s)+QxConst.CORE_MILLISECONDS);this._runPost();};proto._runPost=function(){var s=(new Date).valueOf();this.info("Post phase");try{this._printInstanceInfo();this.debug("Executing application post");this.post();this.createDispatchEvent(QxConst.EVENT_TYPE_POST);}catch(ex){return this.error("...failed:"+ex);};this.debug("Done in:"+((new Date).valueOf()-s)+QxConst.CORE_MILLISECONDS);};proto._runPostload=function(){this._postloadStart=(new Date).valueOf();this.info("Postload phase");this.debug("Preloading images...");var vPreloaderSystem=new QxImagePreloaderSystem(QxImageManager.getPostPreloadImageList());vPreloaderSystem.addEventListener(QxConst.EVENT_TYPE_COMPLETED,this._runPostloadDone,this);vPreloaderSystem.start();};proto._runPostloadDone=function(){this.debug("Done in:"+((new Date).valueOf()-this._postloadStart)+QxConst.CORE_MILLISECONDS);};proto._printInstanceInfo=function(){this.debug("Number of instances:"+QxObjectDataBase.length);};proto._printClassInfo=function(){this.debug("Number of classes:"+QxUtil.getObjectLength(QxMain.classes));};proto._printPropertyInfo=function(){this.debug("Number of properties:"+QxMain.propertyNumber);};proto._printClientInfo=function(){this.debug("Client:"+QxClient.getEngine()+QxConst.CORE_SPACE+QxClient.getVersion()+(QxUtil.isValidString(QxClient.getEmulation())?QxConst.CORE_SPACE+QxClient.getEmulation():QxConst.CORE_EMPTY));if(!QxClient.isInQuirksMode()&&QxClient.isMshtml()){this.warn("Document is not in Quirksmode! This is needed in Internet Explorer<=6 to let qooxdoo render correctly.");};};proto._printVersion=function(){this.debug("Version:"+QxMain.version);};proto._ready=false;proto.isReady=function(){return this._ready;};proto.getClientWindow=function(){return this._clientWindow;};proto.getEventManager=function(){return this.getClientWindow().getEventManager();};proto.getClientDocument=function(){return this.getClientWindow().getClientDocument();};proto.postLoad=function(){if(this._postLoadDone){return;};this._runPostload();this._postLoadDone=true;};proto.dispose=function(){if(this.getDisposed()){return;};QxDom.removeEventListener(window,QxConst.EVENT_TYPE_UNLOAD,QxApplicationUnload);if(QxClient.isGecko()){QxDom.removeEventListener(window,"DOMContentLoaded",QxApplicationInit);}else{QxDom.removeEventListener(window,"load",QxApplicationInit);};delete this._clientWindow;delete this._remappingChildTable;delete this._remappingChildTarget;QxTarget.prototype.dispose.call(this);QxObject.dispose();};window.application=new QxApplication;function QxClientWindow(){QxTarget.call(this);this._element=window;this._element._QxClientWindow=this;this._clientDocument=new QxClientDocument(this);this._eventManager=new QxEventManager(this);this._eventManager.setFocusRoot(this._clientDocument);};QxClientWindow.extend(QxTarget,"QxClientWindow");proto.getEventManager=function(){return this._eventManager;};proto.getClientDocument=function(){return this._clientDocument;};proto.getElement=function(){return this._element;};proto.dispose=function(){if(this.getDisposed()){return;};if(this._eventManager){this._eventManager.dispose();this._eventManager=null;};if(this._clientDocument){this._clientDocument.dispose();this._clientDocument=null;};if(this._element){this._element._QxClientWindow=null;this._element=null;};return QxTarget.prototype.dispose.call(this);};function QxEvent(vType){QxObject.call(this,false);this.setType(vType);};QxEvent.extend(QxObject,"QxEvent");QxEvent.addFastProperty({name:"type",setOnlyOnce:true});QxEvent.addFastProperty({name:"originalTarget",setOnlyOnce:true});QxEvent.addFastProperty({name:"target",setOnlyOnce:true});QxEvent.addFastProperty({name:"relatedTarget",setOnlyOnce:true});QxEvent.addFastProperty({name:"currentTarget"});QxEvent.addFastProperty({name:"bubbles",defaultValue:false,noCompute:true});QxEvent.addFastProperty({name:"propagationStopped",defaultValue:true,noCompute:true});QxEvent.addFastProperty({name:"defaultPrevented",defaultValue:false,noCompute:true});proto.preventDefault=function(){this.setDefaultPrevented(true);};proto.stopPropagation=function(){this.setPropagationStopped(true);};proto.dispose=function(){if(this.getDisposed()){return;};this._valueOriginalTarget=null;this._valueTarget=null;this._valueRelatedTarget=null;this._valueCurrentTarget=null;return QxObject.prototype.dispose.call(this);};function QxDomEvent(vType,vDomEvent,vDomTarget,vTarget,vOriginalTarget){QxEvent.call(this,vType);this.setDomEvent(vDomEvent);this.setDomTarget(vDomTarget);this.setTarget(vTarget);this.setOriginalTarget(vOriginalTarget);};QxDomEvent.extend(QxEvent,"QxDomEvent");QxDomEvent.addFastProperty({name:"bubbles",defaultValue:true,noCompute:true});QxDomEvent.addFastProperty({name:"propagationStopped",defaultValue:false,noCompute:true});QxDomEvent.addFastProperty({name:"domEvent",setOnlyOnce:true,noCompute:true});QxDomEvent.addFastProperty({name:"domTarget",setOnlyOnce:true,noCompute:true});proto.getCtrlKey=function(){return this.getDomEvent().ctrlKey;};proto.getShiftKey=function(){return this.getDomEvent().shiftKey;};proto.getAltKey=function(){return this.getDomEvent().altKey;};if(QxClient.isMshtml()){proto.setDefaultPrevented=function(vValue){if(!vValue){return this.error("It is not possible to set preventDefault to false if it was true before!","setDefaultPrevented");};this.getDomEvent().returnValue=false;QxEvent.prototype.setDefaultPrevented.call(this,vValue);};}else {proto.setDefaultPrevented=function(vValue){if(!vValue){return this.error("It is not possible to set preventDefault to false if it was true before!","setDefaultPrevented");};this.getDomEvent().preventDefault();this.getDomEvent().returnValue=false;QxEvent.prototype.setDefaultPrevented.call(this,vValue);};};proto.dispose=function(){if(this.getDisposed()){return;};this._valueDomEvent=null;this._valueDomTarget=null;return QxEvent.prototype.dispose.call(this);};function QxMouseEvent(vType,vDomEvent,vDomTarget,vTarget,vOriginalTarget,vRelatedTarget){QxDomEvent.call(this,vType,vDomEvent,vDomTarget,vTarget,vOriginalTarget);if(vRelatedTarget){this.setRelatedTarget(vRelatedTarget);};};QxMouseEvent.extend(QxDomEvent,"QxMouseEvent");proto.getScreenX=function(){return this.getDomEvent().screenX;};proto.getScreenY=function(){return this.getDomEvent().screenY;};if(QxClient.isMshtml()){QxMouseEvent.addFastProperty({name:"pageX",readOnly:true});QxMouseEvent.addFastProperty({name:"pageY",readOnly:true});if(QxUtil.isInvalid(document.compatMode)||document.compatMode==QxConst.INTERNAL_BACKCOMPAT){proto._computePageX=function(){return this.getDomEvent().clientX+document.documentElement.scrollLeft;};proto._computePageY=function(){return this.getDomEvent().clientY+document.documentElement.scrollTop;};}else {proto._computePageX=function(){return this.getDomEvent().clientX+document.body.scrollLeft;};proto._computePageY=function(){return this.getDomEvent().clientY+document.body.scrollTop;};};}else if(QxClient.isGecko()){proto.getPageX=function(){return this.getDomEvent().pageX;};proto.getPageY=function(){return this.getDomEvent().pageY;};}else {proto.getPageX=function(){return this.getDomEvent().clientX;};proto.getPageY=function(){return this.getDomEvent().clientY;};};if(QxClient.isMshtml()||QxClient.isGecko()){proto.getClientX=function(){return this.getDomEvent().clientX;};proto.getClientY=function(){return this.getDomEvent().clientY;};}else {QxMouseEvent.addFastProperty({name:"clientX",readOnly:true});QxMouseEvent.addFastProperty({name:"clientY",readOnly:true});proto._computeClientX=function(){return this.getDomEvent().clientX+(document.body&&document.body.scrollLeft!=null?document.body.scrollLeft:0);};proto._computeClientY=function(){return this.getDomEvent().clientY+(document.body&&document.body.scrollTop!=null?document.body.scrollTop:0);};};QxMouseEvent.addFastProperty({name:"button",readOnly:true});proto.isLeftButtonPressed=function(){return this.getButton()===QxConst.BUTTON_LEFT;};proto.isMiddleButtonPressed=function(){return this.getButton()===QxConst.BUTTON_MIDDLE;};proto.isRightButtonPressed=function(){return this.getButton()===QxConst.BUTTON_RIGHT;};if(QxClient.isMshtml()){proto._computeButton=function(){switch(this.getDomEvent().button){case 1:return QxConst.BUTTON_LEFT;case 2:return QxConst.BUTTON_RIGHT;case 4:return QxConst.BUTTON_MIDDLE;default:return QxConst.BUTTON_NONE;};};}else {proto._computeButton=function(){switch(this.getDomEvent().button){case 0:return QxConst.BUTTON_LEFT;case 1:return QxConst.BUTTON_MIDDLE;case 2:return QxConst.BUTTON_RIGHT;default:return QxConst.BUTTON_NONE;};};};QxMouseEvent.addFastProperty({name:"wheelDelta",readOnly:true});if(QxClient.isMshtml()){proto._computeWheelDelta=function(){return this.getDomEvent().wheelDelta?this.getDomEvent().wheelDelta/40:0;};}else {proto._computeWheelDelta=function(){return-(this.getDomEvent().detail||0);};};QxMouseEvent._screenX=QxMouseEvent._screenY=QxMouseEvent._clientX=QxMouseEvent._clientY=QxMouseEvent._pageX=QxMouseEvent._pageY=0;QxMouseEvent._button=null;QxMouseEvent._storeEventState=function(e){QxMouseEvent._screenX=e.getScreenX();QxMouseEvent._screenY=e.getScreenY();QxMouseEvent._clientX=e.getClientX();QxMouseEvent._clientY=e.getClientY();QxMouseEvent._pageX=e.getPageX();QxMouseEvent._pageY=e.getPageY();QxMouseEvent._button=e.getButton();};QxMouseEvent.getScreenX=function(){return QxMouseEvent._screenX;};QxMouseEvent.getScreenY=function(){return QxMouseEvent._screenY;};QxMouseEvent.getClientX=function(){return QxMouseEvent._clientX;};QxMouseEvent.getClientY=function(){return QxMouseEvent._clientY;};QxMouseEvent.getPageX=function(){return QxMouseEvent._pageX;};QxMouseEvent.getPageY=function(){return QxMouseEvent._pageY;};QxMouseEvent.getButton=function(){return QxMouseEvent._button;};if(QxClient.isMshtml()){QxMouseEvent.buttons={left:1,right:2,middle:4};}else {QxMouseEvent.buttons={left:0,right:2,middle:1};};function QxKeyEvent(vType,vDomEvent,vDomTarget,vTarget,vOriginalTarget,vKeyCode){QxDomEvent.call(this,vType,vDomEvent,vDomTarget,vTarget,vOriginalTarget);this.setKeyCode(vKeyCode);};QxKeyEvent.extend(QxDomEvent,"QxKeyEvent");QxKeyEvent.addFastProperty({name:"keyCode",setOnlyOnce:true,noCompute:true});QxKeyEvent.keys= {esc:27,enter:13,tab:9,space:32,up:38,down:40,left:37,right:39,shift:16,ctrl:17,alt:18,f1:112,f2:113,f3:114,f4:115,f5:116,f6:117,f7:118,f8:119,f9:120,f10:121,f11:122,f12:123,del:46,backspace:8,insert:45,home:36,end:35,pageup:33,pagedown:34,numlock:144,numpad_0:96,numpad_1:97,numpad_2:98,numpad_3:99,numpad_4:100,numpad_5:101,numpad_6:102,numpad_7:103,numpad_8:104,numpad_9:105,numpad_divide:111,numpad_multiply:106,numpad_minus:109,numpad_plus:107 };QxKeyEvent.codes={};for(var i in QxKeyEvent.keys){QxKeyEvent.codes[QxKeyEvent.keys[i]]=i;};function QxFocusEvent(vType,vTarget){QxEvent.call(this,vType);this.setTarget(vTarget);switch(vType){case QxConst.EVENT_TYPE_FOCUSIN:case QxConst.EVENT_TYPE_FOCUSOUT:this.setBubbles(true);this.setPropagationStopped(false);};};QxFocusEvent.extend(QxEvent,"QxFocusEvent");function QxDataEvent(vType,vData){QxEvent.call(this,vType);this.setData(vData);};QxDataEvent.extend(QxEvent,"QxDataEvent");QxDataEvent.addFastProperty({name:"propagationStopped",defaultValue:false});QxDataEvent.addFastProperty({name:"data"});proto.dispose=function(){if(this.getDisposed()){return;};this._valueData=null;return QxEvent.prototype.dispose.call(this);};function QxColorManager(){QxManager.call(this);this._themes={};this._dependentObjects={};};QxColorManager.extend(QxManager,"QxColorManager");QxColorManager.addProperty({name:"theme",type:QxConst.TYPEOF_STRING});proto.getThemeObject=function(){return this._themes[this.getTheme()];};proto.add=function(oObject){var vValue=oObject.getValue();this._objects[vValue]=oObject;if(oObject.isThemedColor()){this._dependentObjects[vValue]=oObject;};};proto.remove=function(oObject){var vValue=oObject.getValue();delete this._objects[vValue];delete this._dependentObjects[vValue];};proto.has=function(vValue){return this._objects[vValue]!=null;};proto.get=function(vValue){return this._objects[vValue];};proto.registerTheme=function(vTheme){var vId=vTheme.getId();if(this._themes[vId]){throw new Error("A theme with this ID is already known");};this._themes[vId]=vTheme;if(this.getTheme()==null){this.setTheme(vId);};};proto._modifyTheme=function(propValue,propOldValue,propData){var vTheme=this.getThemeObject();vTheme.compile();for(var i in this._dependentObjects){this._dependentObjects[i]._updateTheme(vTheme);};return true;};proto.createThemeList=function(vParent,xCor,yCor){var vButton;var vThemes=this._themes;var vIcon = "icons/16/colors.png";var vPrefix="Color Theme:";var vEvent=QxConst.EVENT_TYPE_EXECUTE;for(var vId in vThemes){var vButton=new QxButton(vPrefix+vThemes[vId].getTitle(),vIcon);vButton.setLocation(xCor,yCor);vButton.addEventListener(vEvent,new Function("QxColorManager.setTheme('"+vId+"')"));vParent.add(vButton);yCor+=30;};};proto.dispose=function(){if(this.getDisposed()){return;};for(var i in this._themes){delete this._themes[i];};delete this._themes;for(var i in this._dependentObjects){delete this._dependentObjects[i];};delete this._dependentObjects;return QxManager.prototype.dispose.call(this);};QxColorManager=new QxColorManager;function QxColorTheme(vId,vTitle,vColors){QxObject.call(this);if(QxUtil.isInvalidString(vId)){throw new Error("Each instance of QxColorTheme need an unique ID!");};this._definedColors=vColors;this._compiledColors={};this.setId(vId);this.setTitle(QxUtil.isValidString(vTitle)?vTitle:vId);try{QxColorManager.registerTheme(this);}catch(ex){throw new Error("Could not register Theme:"+ex);};};QxColorTheme.extend(QxObject,"QxColorTheme");QxColorTheme.addProperty({name:"id",type:QxConst.TYPEOF_STRING,allowNull:false});QxColorTheme.addProperty({name:"title",type:QxConst.TYPEOF_STRING,allowNull:false,defaultValue:QxConst.CORE_EMPTY});proto._needsCompilation=true;proto.getValueByName=function(vName){return this._definedColors[vName]||QxConst.CORE_EMPTY;};proto.getStyleByName=function(vName){return this._compiledColors[vName]||QxConst.CORE_EMPTY;};proto.compile=function(){if(!this._needsCompilation){return;};for(var vName in QxColor.themedNames){this._compileValue(vName);};this._needsCompilation=false;};proto._compileValue=function(vName){var v=this._definedColors[vName];this._compiledColors[vName]=v?QxColor.rgb2style.apply(this,this._definedColors[vName]):vName;};proto.dispose=function(){if(this.getDisposed()){return;};delete this._definedColors;delete this._compiledColors;QxObject.prototype.dispose.call(this);};function QxColor(vValue){if(QxUtil.isValid(vValue)){this.setValue(vValue);};QxObject.call(this);};QxColor.extend(QxObject,"QxColor");QxColor.fromString=function(vDefString){return new QxColor(vDefString);};QxColor.fromRandom=function(){return new QxColor([Math.round(255*Math.random()),Math.round(255*Math.random()),Math.round(255*Math.random())]);};proto._value=null;proto._style=null;proto._isRgbColor=false;proto._isHtmlColor=false;proto._isThemedColor=false;proto._red=null;proto._green=null;proto._blue=null;proto._hex=null;proto.add=QxUtil.returnTrue;proto.remove=QxUtil.returnTrue;proto.isRgbColor=function(){return this._isRgbColor;};proto.isHtmlColor=function(){return this._isHtmlColor;};proto.isThemedColor=function(){return this._isThemedColor;};proto.setValue=function(vValue){this._normalize(vValue);if(this._isThemedColor){throw new Error("Please use QxColorObject for themed colors!");};};proto.getValue=function(){return this._value||QxConst.CORE_EMPTY;};proto.getStyle=function(){if(this._style==null){this._evalStyle();};return this._style;};proto._evalStyle=function(){if(this._isRgbColor){this._style=QxColor.rgb2style(this._red,this._green,this._blue);}else if(this._isThemedColor){this._applyThemedValue();}else if(this._isHtmlColor){this._style=this._value;}else if(QxUtil.isValid(this._value)){throw new Error("_evalStyle could not handle non-rgb colors:"+this.getValue()+"!");};};proto.getHex=function(){if(this._hex==null){this._evalHex();};return this._hex;};proto._evalHex=function(){if(this._isRgbColor){var a=[QxConst.CORE_HASH];var r=this.getRed();a.push(QxColor.m_hex[Math.floor(r/16)]);a.push(QxColor.m_hex[Math.floor(r%16)]);var g=this.getGreen();a.push(QxColor.m_hex[Math.floor(g/16)]);a.push(QxColor.m_hex[Math.floor(g%16)]);var b=this.getBlue();a.push(QxColor.m_hex[Math.floor(b/16)]);a.push(QxColor.m_hex[Math.floor(b%16)]);this._hex=a.join(QxConst.CORE_EMPTY);}else {};};proto.getRed=function(){if(this._red==null){this._evalRgb();};return this._red;};proto.getGreen=function(){if(this._green==null){this._evalRgb();};return this._green;};proto.getBlue=function(){if(this._blue==null){this._evalRgb();};return this._blue;};proto._evalRgb=function(){if(this._isThemedColor){this._applyThemedValue();}else if(this._isHtmlColor){var a=QxColor.htmlNames[this._value];this._red=a[0];this._green=a[1];this._blue=a[2];}else {throw new Error("_evalRgb needs implementation!");};};proto._normalize=function(vInValue){this._isThemedColor=this._isRgbColor=this._isHtmlColor=false;this._hex=null;var invalid=new Error("Invalid color:"+vInValue);switch(typeof vInValue){case QxConst.TYPEOF_STRING:vInValue=vInValue.toLowerCase();if(QxColor.htmlNames[vInValue]){this._isHtmlColor=true;}else if(QxColor.themedNames[vInValue]){this._isThemedColor=true;}else if(QxColor.r_cssrgb.test(vInValue)){this._red=RegExp.$1;this._green=RegExp.$2;this._blue=RegExp.$3;this._isRgbColor=true;}else if(QxColor.r_hex3.test(vInValue)){this._hex=vInValue;this._red=(QxColor.m_rgb[RegExp.$1]*16)+QxColor.m_rgb[RegExp.$1];this._green=(QxColor.m_rgb[RegExp.$2]*16)+QxColor.m_rgb[RegExp.$2];this._blue=(QxColor.m_rgb[RegExp.$3]*16)+QxColor.m_rgb[RegExp.$3];this._isRgbColor=true;}else if(QxColor.r_hex6.test(vInValue)){this._hex=vInValue;this._red=(QxColor.m_rgb[RegExp.$1]*16)+QxColor.m_rgb[RegExp.$2];this._green=(QxColor.m_rgb[RegExp.$3]*16)+QxColor.m_rgb[RegExp.$4];this._blue=(QxColor.m_rgb[RegExp.$5]*16)+QxColor.m_rgb[RegExp.$6];this._isRgbColor=true;}else {throw invalid;};break;case QxConst.TYPEOF_NUMBER:if(vInValue>=0&&vInValue<=255){this._red=this._green=this._blue=vInValue;this._isRgbColor=true;}else {throw invalid;};break;case QxConst.TYPEOF_OBJECT:if(QxUtil.isValidArray(vInValue)&&vInValue.length==3){this._red=vInValue[0];this._green=vInValue[1];this._blue=vInValue[2];this._isRgbColor=true;break;};default:throw invalid };if(!this._isRgbColor){this._red=this._green=this._blue=null;this._style=this._isHtmlColor?vInValue:null;}else {this._style=null;if(!(this._red>=0&&this._red<=255&&this._green>=0&&this._green<=255&&this._blue>=0&&this._blue<=255)){throw invalid;};};return this._value=vInValue;};proto.dispose=function(){if(this.getDisposed()){return true;};delete this._value;delete this._style;delete this._red;delete this._green;delete this._blue;delete this._isRgbColor;delete this._isHtmlColor;delete this._isThemedColor;return QxObject.prototype.dispose.call(this);};function QxColorObject(vValue){this.setValue(vValue);if(QxColorManager.has(this._value)){return QxColorManager.get(this._value);};QxObject.call(this);QxColorManager.add(this);this._dependentObjects={};};QxColorObject.extend(QxColor,"QxColorObject");QxColorObject.fromString=function(vDefString){return new QxColorObject(vDefString);};proto._updateTheme=function(vTheme){if(!this._isThemedColor){throw new Error("Could not redefine themed value of non os colors!");};this._applyThemedValue();for(i in this._dependentObjects){this._dependentObjects[i]._updateColors(this,this._style);};};proto._applyThemedValue=function(){var vTheme=QxColorManager.getThemeObject();var vRgb=vTheme.getValueByName(this._value);if(vRgb){this._red=vRgb[0];this._green=vRgb[1];this._blue=vRgb[2];};this._style=vTheme.getStyleByName(this._value);this._hex=null;};proto.setValue=function(vValue){this._normalize(vValue);};proto.add=function(vObject){this._dependentObjects[vObject.toHashCode()]=vObject;};proto.remove=function(vObject){delete this._dependentObjects[vObject.toHashCode()];};proto.dispose=function(){if(this.getDisposed()){return true;};if(this._dependentObjects){for(var i in this._dependentObjects){delete this._dependentObjects[i];};delete this._dependentObjects;};return QxColor.prototype.dispose.call(this);};QxColor.rgb2style=function(r,g,b){return QxColor.RGBCSS_START+r+QxConst.CORE_COMMA+g+QxConst.CORE_COMMA+b+QxColor.RGBCSS_STOP;};QxColor.RGBCSS_START="rgb(";QxColor.RGBCSS_STOP=")";QxColor.m_hex=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];QxColor.m_rgb={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,b:11,c:12,d:13,e:14,f:15};QxColor.r_hex3 = /^#([0-9a-f]{1})([0-9a-f]{1})([0-9a-f]{1})$/;QxColor.r_hex6 = /^#([0-9a-f]{1})([0-9a-f]{1})([0-9a-f]{1})([0-9a-f]{1})([0-9a-f]{1})([0-9a-f]{1})$/;QxColor.r_cssrgb = /^rgb\(\s*([0-9]{1,3}\.{0,1}[0-9]*)\s*,\s*([0-9]{1,3}\.{0,1}[0-9]*)\s*,\s*([0-9]{1,3}\.{0,1}[0-9]*)\s*\)$/;QxColor.r_rgb = /^[0-9]{1,3},[0-9]{1,3},[0-9]{1,3}$/;QxColor.r_number = /^[0-9]{1,3}\.{0,1}[0-9]*$/;QxColor.r_percent = /^[0-9]{1,3}\.{0,1}[0-9]*%$/;QxColor.htmlNames= {maroon:[128,0,0],red:[255,0,0],orange:[255,165,0],yellow:[255,255,0],olive:[128,128,0],purple:[128,0,128],fuchsia:[255,0,255],white:[255,255,255],lime:[0,255,0],green:[0,128,0],navy:[0,0,128],blue:[0,0,255],aqua:[0,255,255],teal:[0,128,128],black:[0,0,0],silver:[192,192,192],gray:[128,128,128],transparent:[-1,-1,-1] };QxColor.themedNames= {activeborder:1,activecaption:1,appworkspace:1,background:1,buttonface:1,buttonhighlight:1,buttonshadow:1,buttontext:1,captiontext:1,graytext:1,highlight:1,highlighttext:1,inactiveborder:1,inactivecaption:1,inactivecaptiontext:1,infobackground:1,infotext:1,menu:1,menutext:1,scrollbar:1,threeddarkshadow:1,threedface:1,threedhighlight:1,threedlightshadow:1,threedshadow:1,window:1,windowframe:1,windowtext:1 };function QxColorCache(propValue,propData){var propKey;var propKeyAsStyle=false;switch(typeof propValue){case QxConst.TYPEOF_STRING:if(propValue!=QxConst.CORE_EMPTY){propValue=propKey=propValue.toLowerCase();break;};return propValue;case QxConst.TYPEOF_NUMBER:if(propValue>=0&&propValue<=255){propKey=propValue.toString();break;};return propValue;case QxConst.TYPEOF_OBJECT:if(propValue==null||propValue instanceof QxColor){return propValue;};if(typeof propValue.join===QxConst.TYPEOF_FUNCTION&&propValue.length==3){propKey=QxColor.RGBCSS_START+propValue.join(QxConst.CORE_COMMA)+QxColor.RGBCSS_STOP;propKeyAsStyle=true;break;};default:return propValue;};if(QxColorCache._data[propKey]){return QxColorCache._data[propKey];};var vColorObject=QxColorCache._data[propKey]=QxColor.themedNames[propValue]?new QxColorObject(propValue):new QxColor(propValue);if(propKeyAsStyle){vColorObject._style=propKey;};return vColorObject;};QxColorCache._data={};new QxColorTheme("windowsRoyale","Windows Royale",{activeborder:[212,208,200],activecaption:[51,94,168],appworkspace:[128,128,128],background:[0,0,64],buttonface:[235,233,237],buttonhighlight:[255,255,255],buttonshadow:[167,166,170],buttontext:[0,0,0],captiontext:[255,255,255],graytext:[167,166,170],highlight:[51,94,168],highlighttext:[255,255,255],inactiveborder:[212,208,200],inactivecaption:[111,161,217],inactivecaptiontext:[255,255,255],infobackground:[255,255,225],infotext:[0,0,0],menu:[255,255,255],menutext:[0,0,0],scrollbar:[212,208,200],threeddarkshadow:[133,135,140],threedface:[235,233,237],threedhighlight:[255,255,255],threedlightshadow:[220,223,228],threedshadow:[167,166,170],window:[255,255,255],windowframe:[0,0,0],windowtext:[0,0,0] });new QxColorTheme("operatingSystemDefault","Operating System Default",{});new QxColorTheme("windowsClassic","Windows Classic",{activeborder:[212,208,200],activecaption:[10,36,106],appworkspace:[128,128,128],background:[58,110,165],buttonface:[212,208,200],buttonhighlight:[255,255,255],buttonshadow:[128,128,128],buttontext:[0,0,0],captiontext:[255,255,255],graytext:[128,128,128],highlight:[10,36,106],highlighttext:[255,255,255],inactiveborder:[212,208,200],inactivecaption:[128,128,128],inactivecaptiontext:[212,208,200],infobackground:[255,255,225],infotext:[0,0,0],menu:[212,208,200],menutext:[0,0,0],scrollbar:[212,208,200],threeddarkshadow:[64,64,64],threedface:[212,208,200],threedhighlight:[255,255,255],threedlightshadow:[212,208,200],threedshadow:[128,128,128],window:[255,255,255],windowframe:[0,0,0],windowtext:[0,0,0] });new QxColorTheme("windowsLunaBlue","Windows Luna Blue",{activeborder:[212,208,200],activecaption:[0,84,227],appworkspace:[128,128,128],background:[0,78,152],buttonface:[236,233,216],buttonhighlight:[255,255,255],buttonshadow:[172,168,153],buttontext:[0,0,0],captiontext:[255,255,255],graytext:[172,168,153],highlight:[49,106,197],highlighttext:[255,255,255],inactiveborder:[212,208,200],inactivecaption:[122,150,223],inactivecaptiontext:[216,228,248],infobackground:[255,255,225],infotext:[0,0,0],menu:[255,255,255],menutext:[0,0,0],scrollbar:[212,208,200],threeddarkshadow:[113,111,100],threedface:[236,233,216],threedhighlight:[255,255,255],threedlightshadow:[241,239,226],threedshadow:[172,168,153],window:[255,255,255],windowframe:[0,0,0],windowtext:[0,0,0] });new QxColorTheme("windowsLunaGreen","Windows Luna Green",{activeborder:[212,208,200],activecaption:[139,161,105],appworkspace:[128,128,128],background:[157,172,189],buttonface:[236,233,216],buttonhighlight:[255,255,255],buttonshadow:[172,168,153],buttontext:[0,0,0],captiontext:[255,255,255],graytext:[172,168,153],highlight:[147,160,112],highlighttext:[255,255,255],inactiveborder:[212,208,200],inactivecaption:[212,214,186],inactivecaptiontext:[255,255,255],infobackground:[255,255,225],infotext:[0,0,0],menu:[255,255,255],menutext:[0,0,0],scrollbar:[212,208,200],threeddarkshadow:[113,111,100],threedface:[236,233,216],threedhighlight:[255,255,255],threedlightshadow:[241,239,226],threedshadow:[172,168,153],window:[255,255,255],windowframe:[0,0,0],windowtext:[0,0,0] });new QxColorTheme("windowsLunaSilver","Windows Luna Silver",{activeborder:[212,208,200],activecaption:[192,192,192],appworkspace:[128,128,128],background:[88,87,104],buttonface:[224,223,227],buttonhighlight:[255,255,255],buttonshadow:[157,157,161],buttontext:[0,0,0],captiontext:[14,16,16],graytext:[172,168,153],highlight:[178,180,191],highlighttext:[0,0,0],inactiveborder:[212,208,200],inactivecaption:[255,255,255],inactivecaptiontext:[162,161,161],infobackground:[255,255,225],infotext:[0,0,0],menu:[255,255,255],menutext:[0,0,0],scrollbar:[212,208,200],threeddarkshadow:[113,111,100],threedface:[224,223,227],threedhighlight:[255,255,255],threedlightshadow:[241,239,226],threedshadow:[157,157,161],window:[255,255,255],windowframe:[0,0,0],windowtext:[0,0,0] });function QxBorder(vWidth,vStyle,vColor){QxObject.call(this);this._themedEdges={};this._initCache();if(QxUtil.isValidNumber(vWidth)){this.setWidth(vWidth);if(QxUtil.isValidString(vStyle)){this.setStyle(vStyle);};if(QxUtil.isValid(vColor)){this.setColor(vColor);};};};QxBorder.extend(QxObject,"QxBorder");QxBorder.enhancedCrossBrowserMode=true;QxBorder.baseColor="threedlightshadow";QxBorder.stylePart="Style";QxBorder.colorPart="Color";proto._needsCompilationTop=true;proto._needsCompilationRight=true;proto._needsCompilationBottom=true;proto._needsCompilationLeft=true;QxBorder.addProperty({name:"topWidth",type:QxConst.TYPEOF_NUMBER,defaultValue:0,impl:"borderTopProperty"});QxBorder.addProperty({name:"rightWidth",type:QxConst.TYPEOF_NUMBER,defaultValue:0,impl:"borderRightProperty"});QxBorder.addProperty({name:"bottomWidth",type:QxConst.TYPEOF_NUMBER,defaultValue:0,impl:"borderBottomProperty"});QxBorder.addProperty({name:"leftWidth",type:QxConst.TYPEOF_NUMBER,defaultValue:0,impl:"borderLeftProperty"});QxBorder.addProperty({name:"topStyle",type:QxConst.TYPEOF_STRING,defaultValue:QxConst.CORE_NONE,impl:"borderTopProperty"});QxBorder.addProperty({name:"rightStyle",type:QxConst.TYPEOF_STRING,defaultValue:QxConst.CORE_NONE,impl:"borderRightProperty"});QxBorder.addProperty({name:"bottomStyle",type:QxConst.TYPEOF_STRING,defaultValue:QxConst.CORE_NONE,impl:"borderBottomProperty"});QxBorder.addProperty({name:"leftStyle",type:QxConst.TYPEOF_STRING,defaultValue:QxConst.CORE_NONE,impl:"borderLeftProperty"});QxBorder.addProperty({name:"topColor",impl:"borderTopProperty",type:QxConst.TYPEOF_OBJECT,instance:"QxColor",convert:QxColorCache});QxBorder.addProperty({name:"rightColor",impl:"borderRightProperty",type:QxConst.TYPEOF_OBJECT,instance:"QxColor",convert:QxColorCache});QxBorder.addProperty({name:"bottomColor",impl:"borderBottomProperty",type:QxConst.TYPEOF_OBJECT,instance:"QxColor",convert:QxColorCache});QxBorder.addProperty({name:"leftColor",impl:"borderLeftProperty",type:QxConst.TYPEOF_OBJECT,instance:"QxColor",convert:QxColorCache});QxBorder.fromString=function(vDefString){var vBorder=new QxBorder;var vAllParts = vDefString.split(/\s+/);var vPart,vTemp;for(var i=0;i<vAllParts.length;i++){switch(vPart=vAllParts[i]){case QxConst.BORDER_STYLE_GROOVE:case QxConst.BORDER_STYLE_RIDGE:case QxConst.BORDER_STYLE_INSET:case QxConst.BORDER_STYLE_OUTSET:case QxConst.BORDER_STYLE_SOLID:case QxConst.BORDER_STYLE_DOTTED:case QxConst.BORDER_STYLE_DASHED:case QxConst.BORDER_STYLE_DOUBLE:case QxConst.BORDER_STYLE_NONE:vBorder.setStyle(vPart);break;default:vTemp=parseFloat(vPart);if(vTemp==vPart||vPart.contains(QxConst.CORE_PIXEL)){vBorder.setWidth(vTemp);}else {vPart=vPart.toLowerCase();vBorder.setColor(new QxColor(vPart));};break;};};return vBorder;};proto.addListenerWidget=QxUtil.returnTrue;proto.removeListenerWidget=QxUtil.returnTrue;proto._sync=QxUtil.returnTrue;proto.setWidth=function(vWidth){this.setTopWidth(vWidth);this.setRightWidth(vWidth);this.setBottomWidth(vWidth);this.setLeftWidth(vWidth);return true;};proto.setStyle=function(vStyle){this.setTopStyle(vStyle);this.setRightStyle(vStyle);this.setBottomStyle(vStyle);this.setLeftStyle(vStyle);return true;};proto.setColor=function(vColor){this.setTopColor(vColor);this.setRightColor(vColor);this.setBottomColor(vColor);this.setLeftColor(vColor);return true;};proto.setTop=function(vWidth,vStyle,vColor){this.setTopWidth(vWidth);this.setTopStyle(vStyle);this.setTopColor(vColor);return true;};proto.setRight=function(vWidth,vStyle,vColor){this.setRightWidth(vWidth);this.setRightStyle(vStyle);this.setRightColor(vColor);return true;};proto.setBottom=function(vWidth,vStyle,vColor){this.setBottomWidth(vWidth);this.setBottomStyle(vStyle);this.setBottomColor(vColor);return true;};proto.setLeft=function(vWidth,vStyle,vColor){this.setLeftWidth(vWidth);this.setLeftStyle(vStyle);this.setLeftColor(vColor);return true;};if(QxClient.isGecko()){proto._initCache=function(){this._defsX= {borderLeft:QxConst.CORE_EMPTY,borderRight:QxConst.CORE_EMPTY,MozBorderLeftColors:QxConst.CORE_EMPTY,MozBorderRightColors:QxConst.CORE_EMPTY };this._defsY= {borderTop:QxConst.CORE_EMPTY,borderBottom:QxConst.CORE_EMPTY,MozBorderTopColors:QxConst.CORE_EMPTY,MozBorderBottomColors:QxConst.CORE_EMPTY };};}else {proto._initCache=function(){this._defsX= {borderLeft:QxConst.CORE_EMPTY,borderRight:QxConst.CORE_EMPTY };this._defsY= {borderTop:QxConst.CORE_EMPTY,borderBottom:QxConst.CORE_EMPTY };if(QxBorder.enhancedCrossBrowserMode){this._enhancedDefsX= {borderLeft:QxConst.CORE_EMPTY,borderRight:QxConst.CORE_EMPTY };this._enhancedDefsY= {borderTop:QxConst.CORE_EMPTY,borderBottom:QxConst.CORE_EMPTY };};};};if(QxClient.isGecko()||QxBorder.enhancedCrossBrowserMode){proto._addToThemed3DColors=function(vProp){var needRegistering=QxUtil.isObjectEmpty(this._themedEdges);this._themedEdges[vProp]=true;if(needRegistering){(new QxColorObject("ThreeDDarkShadow")).add(this);(new QxColorObject("ThreeDShadow")).add(this);(new QxColorObject("ThreeDLightShadow")).add(this);(new QxColorObject("ThreeDHighlight")).add(this);};};proto._removeFromThemed3DColors=function(vProp){delete this._themedEdges[vProp];if(QxUtil.isObjectEmpty(this._themedEdges)){(new QxColorObject("ThreeDDarkShadow")).remove(this);(new QxColorObject("ThreeDShadow")).remove(this);(new QxColorObject("ThreeDLightShadow")).remove(this);(new QxColorObject("ThreeDHighlight")).remove(this);};};}else {proto._addToThemed3DColors=function(vProp){var needRegistering=QxUtil.isObjectEmpty(this._themedEdges);this._themedEdges[vProp]=true;if(needRegistering){(new QxColorObject("ThreeDLightShadow")).add(this);};};proto._removeFromThemed3DColors=function(vProp){delete this._themedEdges[vProp];if(QxUtil.isObjectEmpty(this._themedEdges)){(new QxColorObject("ThreeDLightShadow")).remove(this);};};};QxBorder.data= {1:{outset:{top:["threedhighlight"],right:["threedshadow"],bottom:["threedshadow"],left:["threedhighlight"] },inset:{top:["threedshadow"],right:["threedhighlight"],bottom:["threedhighlight"],left:["threedshadow"] }},2:{outset:{top:["threedlightshadow","threedhighlight"],right:["threeddarkshadow","threedshadow"],bottom:["threeddarkshadow","threedshadow"],left:["threedlightshadow","threedhighlight"] },inset:{top:["threedshadow","threeddarkshadow"],right:["threedhighlight","threedlightshadow"],bottom:["threedhighlight","threedlightshadow"],left:["threedshadow","threeddarkshadow"] },ridge:{top:["threedhighlight","threedshadow"],right:["threedshadow","threedhighlight"],bottom:["threedshadow","threedhighlight"],left:["threedhighlight","threedshadow"] },groove:{top:["threedshadow","threedhighlight"],right:["threedhighlight","threedshadow"],bottom:["threedhighlight","threedshadow"],left:["threedshadow","threedhighlight"] }}};proto._generateDefString=function(vWidth,vStyle,vColor){if(typeof vWidth!==QxConst.TYPEOF_NUMBER||vWidth<0){return QxConst.CORE_EMPTY;};var vArr=[vWidth+QxConst.CORE_PIXEL];if(QxUtil.isValidString(vStyle)){vArr.push(vStyle);};if(QxUtil.isValidObject(vColor)&&vColor instanceof QxColor){vColor=vColor.getStyle();};if(QxUtil.isValidString(vColor)){vArr.push(vColor);};return vArr.join(QxConst.CORE_SPACE);};proto._updateColors=function(vColorObject,vNewValue){this._needsCompilationTop=true;this._needsCompilationRight=true;this._needsCompilationBottom=true;this._needsCompilationLeft=true;this._sync(QxConst.PROPERTY_TOP);this._sync(QxConst.PROPERTY_RIGHT);this._sync(QxConst.PROPERTY_BOTTOM);this._sync(QxConst.PROPERTY_LEFT);};proto._handleColorRegistration=function(propValue,propOldValue,propData){if(propData.name.contains(QxBorder.stylePart)){switch(propValue){case QxConst.BORDER_STYLE_OUTSET:case QxConst.BORDER_STYLE_INSET:case QxConst.BORDER_STYLE_GROOVE:case QxConst.BORDER_STYLE_RIDGE:this._addToThemed3DColors(propData.name);break;default:this._removeFromThemed3DColors(propData.name);};};if(propData.name.contains(QxBorder.colorPart)){if(propOldValue instanceof QxColorObject){switch(propOldValue){case this.getTopColor():case this.getRightColor():case this.getBottomColor():case this.getLeftColor():break;default:propOldValue.remove(this);};};if(propValue instanceof QxColorObject){propValue.add(this);};};};proto._modifyBorderTopProperty=function(propValue,propOldValue,propData){this._handleColorRegistration(propValue,propOldValue,propData);this._needsCompilationTop=true;this._useEnhancedCrossBrowserMode=null;this._sync("top");return true;};proto._modifyBorderRightProperty=function(propValue,propOldValue,propData){this._handleColorRegistration(propValue,propOldValue,propData);this._needsCompilationRight=true;this._useEnhancedCrossBrowserMode=null;this._sync("right");return true;};proto._modifyBorderBottomProperty=function(propValue,propOldValue,propData){this._handleColorRegistration(propValue,propOldValue,propData);this._needsCompilationBottom=true;this._useEnhancedCrossBrowserMode=null;this._sync("bottom");return true;};proto._modifyBorderLeftProperty=function(propValue,propOldValue,propData){this._handleColorRegistration(propValue,propOldValue,propData);this._needsCompilationLeft=true;this._useEnhancedCrossBrowserMode=null;this._sync("left");return true;};proto.getUseEnhancedCrossBrowserMode=function(){if(this._useEnhancedCrossBrowserMode==null){this._useEnhancedCrossBrowserMode=this._evalUseEnhancedCrossBrowserMode();};return this._useEnhancedCrossBrowserMode;};proto._evalUseEnhancedCrossBrowserMode=function(){if(this.getTopWidth()==2){switch(this.getTopStyle()){case QxConst.BORDER_STYLE_OUTSET:case QxConst.BORDER_STYLE_INSET:case QxConst.BORDER_STYLE_GROOVE:case QxConst.BORDER_STYLE_RIDGE:return true;};};if(this.getRightWidth()==2){switch(this.getRightStyle()){case QxConst.BORDER_STYLE_OUTSET:case QxConst.BORDER_STYLE_INSET:case QxConst.BORDER_STYLE_GROOVE:case QxConst.BORDER_STYLE_RIDGE:return true;};};if(this.getBottomWidth()==2){switch(this.getBottomStyle()){case QxConst.BORDER_STYLE_OUTSET:case QxConst.BORDER_STYLE_INSET:case QxConst.BORDER_STYLE_GROOVE:case QxConst.BORDER_STYLE_RIDGE:return true;};};if(this.getLeftWidth()==2){switch(this.getLeftStyle()){case QxConst.BORDER_STYLE_OUTSET:case QxConst.BORDER_STYLE_INSET:case QxConst.BORDER_STYLE_GROOVE:case QxConst.BORDER_STYLE_RIDGE:return true;};};return false;};proto._applyWidget=function(o){this._applyWidgetX(o);this._applyWidgetY(o);};proto._resetWidget=function(o){this._resetWidgetX(o);this._resetWidgetY(o);};proto._resetWidgetX=function(o){return QxBorder._resetBorderX(o);};proto._resetWidgetY=function(o){return QxBorder._resetBorderY(o);};proto._applyWidgetXCommon=function(vObject){if(this._needsCompilationLeft){this._compileLeft();};if(this._needsCompilationRight){this._compileRight();};for(i in this._defsX){vObject._style[i]=this._defsX[i];};if(!QxClient.isGecko()&&QxBorder.enhancedCrossBrowserMode){if(this.getUseEnhancedCrossBrowserMode()){vObject._createElementForEnhancedBorder();};if(vObject._borderStyle){for(i in this._enhancedDefsX){vObject._borderStyle[i]=this._enhancedDefsX[i];};};};};proto._applyWidgetYCommon=function(vObject){if(this._needsCompilationTop){this._compileTop();};if(this._needsCompilationBottom){this._compileBottom();};for(i in this._defsY){vObject._style[i]=this._defsY[i];};if(!QxClient.isGecko()&&QxBorder.enhancedCrossBrowserMode){if(this.getUseEnhancedCrossBrowserMode()){vObject._createElementForEnhancedBorder();};if(vObject._borderStyle){for(i in this._enhancedDefsY){vObject._borderStyle[i]=this._enhancedDefsY[i];};};};};if(QxClient.isGecko()){proto._applyWidgetX=proto._applyWidgetXCommon;proto._applyWidgetY=proto._applyWidgetYCommon;proto._generateMozColorDefString=function(vWidth,vStyle,vEdge){try{try{var a=QxBorder.data[vWidth][vStyle][vEdge];}catch(ex){};if(typeof a===QxConst.TYPEOF_OBJECT){for(var i=0,s=[],l=a.length;i<l;i++){s.push((new QxColorObject(a[i]).getStyle()));};return s.join(QxConst.CORE_SPACE);};}catch(ex){this.error("Failed to generate Mozilla Color Definition Strings:"+ex,"_generateMozColorDefString");};return QxConst.CORE_EMPTY;};proto._compileTop=function(){var w=this.getTopWidth(),s=this.getTopStyle(),d=this._defsY;d.borderTop=this._generateDefString(w,s,this.getTopColor());d.MozBorderTopColors=this._generateMozColorDefString(w,s,QxConst.PROPERTY_TOP);this._needsCompilationTop=false;};proto._compileRight=function(){var w=this.getRightWidth(),s=this.getRightStyle(),d=this._defsX;d.borderRight=this._generateDefString(w,s,this.getRightColor());d.MozBorderRightColors=this._generateMozColorDefString(w,s,QxConst.PROPERTY_RIGHT);this._needsCompilationRight=false;};proto._compileBottom=function(){var w=this.getBottomWidth(),s=this.getBottomStyle(),d=this._defsY;d.borderBottom=this._generateDefString(w,s,this.getBottomColor());d.MozBorderBottomColors=this._generateMozColorDefString(w,s,QxConst.PROPERTY_BOTTOM);this._needsCompilationBottom=false;};proto._compileLeft=function(){var w=this.getLeftWidth(),s=this.getLeftStyle(),d=this._defsX;d.borderLeft=this._generateDefString(w,s,this.getLeftColor());d.MozBorderLeftColors=this._generateMozColorDefString(w,s,QxConst.PROPERTY_LEFT);this._needsCompilationLeft=false;};QxBorder._resetBorderX=function(o){s=o._style;s.borderLeft=s.borderRight=s.MozBorderLeftColors=s.MozBorderRightColors=QxConst.CORE_EMPTY;};QxBorder._resetBorderY=function(o){s=o._style;s.borderTop=s.borderBottom=s.MozBorderTopColors=s.MozBorderBottomColors=QxConst.CORE_EMPTY;};}else {proto._applyWidgetX=function(vObject){this._applyWidgetXCommon(vObject);if(QxBorder.enhancedCrossBrowserMode){if(this.getUseEnhancedCrossBrowserMode()){vObject._createElementForEnhancedBorder();};if(vObject._borderStyle){for(i in this._enhancedDefsX){vObject._borderStyle[i]=this._enhancedDefsX[i];};};};};proto._applyWidgetY=function(vObject){this._applyWidgetYCommon(vObject);if(QxBorder.enhancedCrossBrowserMode){if(this.getUseEnhancedCrossBrowserMode()){vObject._createElementForEnhancedBorder();};if(vObject._borderStyle){for(i in this._enhancedDefsY){vObject._borderStyle[i]=this._enhancedDefsY[i];};};};};proto._compileTop=function(){var vTopWidth=this.getTopWidth();var vTopStyle=this.getTopStyle();var vTopColor=this.getTopColor();switch(vTopWidth){case 1:switch(vTopStyle){case QxConst.BORDER_STYLE_OUTSET:case QxConst.BORDER_STYLE_INSET:vTopColor=(new QxColorObject(QxBorder.data[vTopWidth][vTopStyle][QxConst.PROPERTY_TOP][0]));vTopStyle=QxConst.BORDER_STYLE_SOLID;};break;case 2:switch(vTopStyle){case QxConst.BORDER_STYLE_OUTSET:case QxConst.BORDER_STYLE_INSET:case QxConst.BORDER_STYLE_GROOVE:case QxConst.BORDER_STYLE_RIDGE:if(QxBorder.enhancedCrossBrowserMode){try{var c=QxBorder.data[vTopWidth][vTopStyle][QxConst.PROPERTY_TOP];if(typeof c===QxConst.TYPEOF_OBJECT){vTopStyle=QxConst.BORDER_STYLE_SOLID;vTopWidth=1;vTopColor=(new QxColorObject(c[1]));this._enhancedDefsY.borderTop=this._generateDefString(vTopWidth,vTopStyle,vTopColor);vTopColor=(new QxColorObject(c[0]));};}catch(ex){this.error("Failed to compile top border:"+ex,"_compileTop");this.warn("Details:Width="+vTopWidth+",Style="+vTopStyle);};}else {vTopColor=(new QxColorObject(QxBorder.baseColor));};};break;};this._defsY.borderTop=this._generateDefString(vTopWidth,vTopStyle,vTopColor);this._needsCompilationTop=false;};proto._compileRight=function(){var vRightWidth=this.getRightWidth();var vRightStyle=this.getRightStyle();var vRightColor=this.getRightColor();switch(vRightWidth){case 1:switch(vRightStyle){case QxConst.BORDER_STYLE_OUTSET:case QxConst.BORDER_STYLE_INSET:vRightColor=(new QxColorObject(QxBorder.data[vRightWidth][vRightStyle][QxConst.PROPERTY_RIGHT][0]));vRightStyle=QxConst.BORDER_STYLE_SOLID;};break;case 2:switch(vRightStyle){case QxConst.BORDER_STYLE_OUTSET:case QxConst.BORDER_STYLE_INSET:case QxConst.BORDER_STYLE_GROOVE:case QxConst.BORDER_STYLE_RIDGE:if(QxBorder.enhancedCrossBrowserMode){try{var c=QxBorder.data[vRightWidth][vRightStyle][QxConst.PROPERTY_RIGHT];if(typeof c===QxConst.TYPEOF_OBJECT){vRightStyle=QxConst.BORDER_STYLE_SOLID;vRightWidth=1;vRightColor=(new QxColorObject(c[1]));this._enhancedDefsX.borderRight=this._generateDefString(vRightWidth,vRightStyle,vRightColor);vRightColor=(new QxColorObject(c[0]));};}catch(ex){this.error("Failed to compile right border:"+ex,"_compileRight");this.warn("Details:Width="+vRightWidth+",Style="+vRightStyle);};}else {vRightColor=(new QxColorObject(QxBorder.baseColor));};};break;};this._defsX.borderRight=this._generateDefString(vRightWidth,vRightStyle,vRightColor);this._needsCompilationRight=false;};proto._compileBottom=function(){var vBottomWidth=this.getBottomWidth();var vBottomStyle=this.getBottomStyle();var vBottomColor=this.getBottomColor();switch(vBottomWidth){case 1:switch(vBottomStyle){case QxConst.BORDER_STYLE_OUTSET:case QxConst.BORDER_STYLE_INSET:vBottomColor=(new QxColorObject(QxBorder.data[vBottomWidth][vBottomStyle][QxConst.PROPERTY_BOTTOM][0]));vBottomStyle=QxConst.BORDER_STYLE_SOLID;};break;case 2:switch(vBottomStyle){case QxConst.BORDER_STYLE_OUTSET:case QxConst.BORDER_STYLE_INSET:case QxConst.BORDER_STYLE_GROOVE:case QxConst.BORDER_STYLE_RIDGE:if(QxBorder.enhancedCrossBrowserMode){try{var c=QxBorder.data[vBottomWidth][vBottomStyle][QxConst.PROPERTY_BOTTOM];if(typeof c===QxConst.TYPEOF_OBJECT){vBottomStyle=QxConst.BORDER_STYLE_SOLID;vBottomWidth=1;vBottomColor=(new QxColorObject(c[1]));this._enhancedDefsY.borderBottom=this._generateDefString(vBottomWidth,vBottomStyle,vBottomColor);vBottomColor=(new QxColorObject(c[0]));};}catch(ex){this.error("Failed to compile bottom border:"+ex,"_compileBottom");this.warn("Details:Width="+vBottomWidth+",Style="+vBottomStyle);};}else {vBottomColor=(new QxColorObject(QxBorder.baseColor));};};break;};this._defsY.borderBottom=this._generateDefString(vBottomWidth,vBottomStyle,vBottomColor);this._needsCompilationBottom=false;};proto._compileLeft=function(){var vLeftWidth=this.getLeftWidth();var vLeftStyle=this.getLeftStyle();var vLeftColor=this.getLeftColor();switch(vLeftWidth){case 1:switch(vLeftStyle){case QxConst.BORDER_STYLE_OUTSET:case QxConst.BORDER_STYLE_INSET:vLeftColor=(new QxColorObject(QxBorder.data[vLeftWidth][vLeftStyle][QxConst.PROPERTY_LEFT][0]));vLeftStyle=QxConst.BORDER_STYLE_SOLID;};break;case 2:switch(vLeftStyle){case QxConst.BORDER_STYLE_OUTSET:case QxConst.BORDER_STYLE_INSET:case QxConst.BORDER_STYLE_GROOVE:case QxConst.BORDER_STYLE_RIDGE:if(QxBorder.enhancedCrossBrowserMode){try{var c=QxBorder.data[vLeftWidth][vLeftStyle][QxConst.PROPERTY_LEFT];if(typeof c===QxConst.TYPEOF_OBJECT){vLeftStyle=QxConst.BORDER_STYLE_SOLID;vLeftWidth=1;vLeftColor=(new QxColorObject(c[1]));this._enhancedDefsX.borderLeft=this._generateDefString(vLeftWidth,vLeftStyle,vLeftColor);vLeftColor=(new QxColorObject(c[0]));};}catch(ex){this.error("Failed to compile left border:"+ex,"_compileLeft");this.warn("Details:Width="+vLeftWidth+",Style="+vLeftStyle);};}else {vLeftColor=(new QxColorObject(QxBorder.baseColor));};};break;};this._defsX.borderLeft=this._generateDefString(vLeftWidth,vLeftStyle,vLeftColor);this._needsCompilationLeft=false;};QxBorder._resetBorderX=function(o){s=o._style;s.borderLeft=s.borderRight=QxConst.CORE_EMPTY;if(QxBorder.enhancedCrossBrowserMode){s=o._borderStyle;if(s){s.borderLeft=s.borderRight=QxConst.CORE_EMPTY;};};};QxBorder._resetBorderY=function(o){s=o._style;s.borderTop=s.borderBottom=QxConst.CORE_EMPTY;if(QxBorder.enhancedCrossBrowserMode){s=o._borderStyle;if(s){s.borderTop=s.borderBottom=QxConst.CORE_EMPTY;};};};};proto.dispose=function(){if(this.getDisposed()){return;};if(typeof this._defsX===QxConst.TYPEOF_OBJECT){for(var i in this._defsX){delete this._defsX[i];};};delete this._defsX;if(typeof this._defsY===QxConst.TYPEOF_OBJECT){for(var i in this._defsY){delete this._defsY[i];};};delete this._defsY;if(QxBorder.enhancedCrossBrowserMode){if(typeof this._enhancedDefsX===QxConst.TYPEOF_OBJECT){for(var i in this._enhancedDefsX){delete this._enhancedDefsX[i];};};delete this._enhancedDefsX;if(typeof this._enhancedDefsY===QxConst.TYPEOF_OBJECT){for(var i in this._enhancedDefsY){delete this._enhancedDefsY[i];};};delete this._enhancedDefsY;};delete this._themedEdges;return QxObject.prototype.dispose.call(this);};function QxBorderObject(vWidth,vStyle,vColor){this._dependentObjects={};QxBorder.call(this,vWidth,vStyle,vColor);};QxBorderObject.extend(QxBorder,"QxBorderObject");QxBorderObject.fromString=function(vDefString){var vBorder=new QxBorderObject;var vAllParts = vDefString.split(/\s+/);var vPart,vTemp;for(var i=0;i<vAllParts.length;i++){vPart=vAllParts[i];switch(vPart){case QxConst.BORDER_STYLE_GROOVE:case QxConst.BORDER_STYLE_RIDGE:case QxConst.BORDER_STYLE_INSET:case QxConst.BORDER_STYLE_OUTSET:case QxConst.BORDER_STYLE_SOLID:case QxConst.BORDER_STYLE_DOTTED:case QxConst.BORDER_STYLE_DASHED:case QxConst.BORDER_STYLE_DOUBLE:case QxConst.BORDER_STYLE_NONE:vBorder.setStyle(vPart);break;default:vTemp=parseFloat(vPart);if(vTemp==vPart||vPart.contains(QxConst.CORE_PIXEL)){vBorder.setWidth(vTemp);}else {vPart=vPart.toLowerCase();vBorder.setColor(QxColor.themedNames[vPart]?new QxColorObject(vPart):new QxColor(vPart));};break;};};return vBorder;};proto.addListenerWidget=function(o){this._dependentObjects[o.toHashCode()]=o;};proto.removeListenerWidget=function(o){delete this._dependentObjects[o.toHashCode()];};proto._sync=function(vEdge){var vAll=this._dependentObjects;var vCurrent;for(vKey in vAll){vCurrent=vAll[vKey];if(vCurrent.isCreated()){vCurrent._updateBorder(vEdge);};};};proto.dispose=function(){if(this.getDisposed()){return;};if(typeof this._dependentObjects===QxConst.TYPEOF_OBJECT){var vAll=this._dependentObjects;for(vKey in vAll){delete vAll[vKey];};vAll=null;delete this._dependentObjects;};return QxBorder.prototype.dispose.call(this);};function QxBorderCache(propValue,propData){if(QxUtil.isValidArray(propValue)&&propValue.length>1){propString=QxConst.CORE_EMPTY;for(var i=0,l=propValue.length,p;i<l;i++){p=propValue[i];propString+=p;if(typeof p===QxConst.TYPEOF_NUMBER){propString+=QxConst.CORE_PIXEL;};if(i<(l-1)){propString+=QxConst.CORE_SPACE;};};propValue=propString;}else if(QxUtil.isInvalidString(propValue)){return propValue;};if(QxBorderCache._data[propValue]){return QxBorderCache._data[propValue];};return QxBorderCache._data[propValue]=QxBorderObject.fromString(propValue);};QxBorderCache._data={};QxBorder.init=function(){QxBorder.presets={black:new QxBorder(1,QxConst.BORDER_STYLE_SOLID,"black"),white:new QxBorder(1,QxConst.BORDER_STYLE_SOLID,"white"),none:new QxBorder(0,QxConst.BORDER_STYLE_NONE)};};QxBorder.init();QxBorderObject.init=function(){QxBorderObject.presets={inset:new QxBorderObject(2,QxConst.BORDER_STYLE_INSET),outset:new QxBorderObject(2,QxConst.BORDER_STYLE_OUTSET),groove:new QxBorderObject(2,QxConst.BORDER_STYLE_GROOVE),ridge:new QxBorderObject(2,QxConst.BORDER_STYLE_RIDGE),thinInset:new QxBorderObject(1,QxConst.BORDER_STYLE_INSET),thinOutset:new QxBorderObject(1,QxConst.BORDER_STYLE_OUTSET),verticalDivider:new QxBorderObject(1,QxConst.BORDER_STYLE_INSET),horizontalDivider:new QxBorderObject(1,QxConst.BORDER_STYLE_INSET),shadow:new QxBorderObject(1,QxConst.BORDER_STYLE_SOLID,"threedshadow"),lightShadow:new QxBorderObject(1,QxConst.BORDER_STYLE_SOLID,"threedlightshadow"),info:new QxBorderObject(1,QxConst.BORDER_STYLE_SOLID,"infotext")};QxBorderObject.presets.verticalDivider.setLeftWidth(0);QxBorderObject.presets.verticalDivider.setRightWidth(0);QxBorderObject.presets.horizontalDivider.setTopWidth(0);QxBorderObject.presets.horizontalDivider.setBottomWidth(0);};QxBorderObject.init();function QxFont(vSize,vName){QxObject.call(this);this._defs={};if(QxUtil.isValidNumber(vSize)){this.setSize(vSize);};if(QxUtil.isValidString(vName)){this.setName(vName);};};QxFont.extend(QxObject,"QxFont");QxFont.addProperty({name:"size",type:QxConst.TYPEOF_NUMBER,impl:"style"});QxFont.addProperty({name:"name",type:QxConst.TYPEOF_STRING,impl:"style"});QxFont.addProperty({name:"bold",type:QxConst.TYPEOF_BOOLEAN,defaultValue:false,impl:"style"});QxFont.addProperty({name:"italic",type:QxConst.TYPEOF_BOOLEAN,defaultValue:false,impl:"style"});QxFont.addProperty({name:"underline",type:QxConst.TYPEOF_BOOLEAN,defaultValue:false,impl:"style"});QxFont.addProperty({name:"strikeout",type:QxConst.TYPEOF_BOOLEAN,defaultValue:false,impl:"style"});proto._modifyStyle=function(propValue,propOldValue,propData){this._needsCompilation=true;return true;};QxFont.fromString=function(s){var vFont=new QxFont;var vAllParts = s.split(/\s+/);var vName=[];var vPart;for(var i=0;i<vAllParts.length;i++){switch(vPart=vAllParts[i]){case QxConst.FONT_STYLE_BOLD:vFont.setBold(true);break;case QxConst.FONT_STYLE_ITALIC:vFont.setItalic(true);break;case QxConst.FONT_STYLE_UNDERLINE:vFont.setUnderline(true);break;case QxConst.FONT_STYLE_STRIKEOUT:vFont.setStrikeout(true);break;default:var vTemp=parseFloat(vPart);if(vTemp==vPart||vPart.contains(QxConst.CORE_PIXEL)){vFont.setSize(vTemp);}else {vName.push(vPart);};break;};};if(vName.length>0){vFont.setName(vName.join(QxConst.CORE_SPACE));};return vFont;};QxFont.PROPERTY_FAMILY="fontFamily";QxFont.PROPERTY_SIZE="fontSize";QxFont.PROPERTY_WEIGHT="fontWeight";QxFont.PROPERTY_STYLE="fontStyle";QxFont.PROPERTY_DECORATION="textDecoration";proto._needsCompilation=true;proto._compile=function(){var vName=this.getName();var vSize=this.getSize();var vBold=this.getBold();var vItalic=this.getItalic();var vUnderline=this.getUnderline();var vStrikeout=this.getStrikeout();var vDecoration=QxConst.CORE_EMPTY;if(this.getUnderline()){vDecoration=QxConst.FONT_STYLE_UNDERLINE;};if(this.getStrikeout()){vDecoration+=QxConst.CORE_SPACE+QxConst.FONT_STYLE_STRIKEOUT;};this._defs.fontFamily=QxUtil.isValidString(vName)?vName:QxConst.CORE_EMPTY;this._defs.fontSize=QxUtil.isValidNumber(vSize)?vSize+QxConst.CORE_PIXEL:QxConst.CORE_EMPTY;this._defs.fontWeight=this.getBold()?QxConst.FONT_STYLE_BOLD:QxConst.FONT_STYLE_NORMAL;this._defs.fontStyle=this.getItalic()?QxConst.FONT_STYLE_ITALIC:QxConst.FONT_STYLE_NORMAL;this._defs.textDecoration=QxUtil.isValidString(vDecoration)?vDecoration:QxConst.CORE_EMPTY;this._needsCompilation=false;};proto.applyWidget=function(vWidget){if(this._needsCompilation){this._compile();};vWidget.setStyleProperty(QxFont.PROPERTY_FAMILY,this._defs.fontFamily);vWidget.setStyleProperty(QxFont.PROPERTY_SIZE,this._defs.fontSize);vWidget.setStyleProperty(QxFont.PROPERTY_WEIGHT,this._defs.fontWeight);vWidget.setStyleProperty(QxFont.PROPERTY_STYLE,this._defs.fontStyle);vWidget.setStyleProperty(QxFont.PROPERTY_DECORATION,this._defs.textDecoration);};proto.resetWidget=function(vWidget){vWidget.removeStyleProperty(QxFont.PROPERTY_FAMILY);vWidget.removeStyleProperty(QxFont.PROPERTY_SIZE);vWidget.removeStyleProperty(QxFont.PROPERTY_WEIGHT);vWidget.removeStyleProperty(QxFont.PROPERTY_STYLE);vWidget.removeStyleProperty(QxFont.PROPERTY_DECORATION);};proto.dispose=function(){if(this.getDisposed()){return true;};delete this._defs;return QxObject.prototype.dispose.call(this);};function QxFontObject(vSize,vName){this._dependentObjects={};QxFont.call(this,vSize,vName)};QxFontObject.extend(QxFont,"QxFontObject");proto.addListenerWidget=function(o){this._dependentObjects[o.toHashCode()]=o;};proto.removeListenerWidget=function(o){delete this._dependentObjects[o.toHashCode()];};proto._sync=function(vEdge){var vAll=this._dependentObjects;var vCurrent;for(vKey in vAll){vCurrent=vAll[vKey];if(vCurrent.isCreated()){vCurrent._updateFont(vEdge);};};};proto.dispose=function(){if(this.getDisposed()){return;};if(typeof this._dependentObjects===QxConst.TYPEOF_OBJECT){for(vKey in this._dependentObjects){delete this._dependentObjects[vKey];};delete this._dependentObjects;};return QxFont.prototype.dispose.call(this);};function QxFontCache(propValue,propData){var propKey;var propKeyAsStyle=false;switch(typeof propValue){case QxConst.TYPEOF_STRING:if(propValue!=QxConst.CORE_EMPTY){propValue=propKey=propValue.toLowerCase();break;};return propValue;case QxConst.TYPEOF_NUMBER:propKey=propValue.toString();break;case QxConst.TYPEOF_OBJECT:if(propValue==null||propValue instanceof QxFont){return propValue;};if(typeof propValue.join===QxConst.TYPEOF_FUNCTION){propKey=propValue.join(QxConst.CORE_SPACE).toLowerCase();break;};default:return propValue;};if(QxFontCache._data[propKey]){return QxFontCache._data[propKey];};return QxFontCache._data[propKey]=QxFont.fromString(propKey);};QxFontCache._data={};function QxWidget(){if(this.classname==QxWidget.OMIT_CLASS){throw new Error("Please omit the usage of QxWidget directly. Choose between QxParent and QxTerminator instead!");};QxTarget.call(this,true);this._styleProperties={position:QxConst.CORE_ABSOLUTE};this._layoutChanges={};this._states={};this._applyInitialAppearance();};QxWidget.extend(QxTarget,"QxWidget");QxWidget.CORE_CLASS="QxWidgetCore";QxWidget.OMIT_CLASS="QxWidget";QxWidget.SCROLLBAR_SIZE=16;QxWidget.addProperty({name:"parent",type:QxConst.TYPEOF_OBJECT,instance:"QxParent",defaultValue:null});QxWidget.addProperty({name:"element"});QxWidget.addProperty({name:"visibility",type:QxConst.TYPEOF_BOOLEAN,defaultValue:true});QxWidget.addProperty({name:"display",type:QxConst.TYPEOF_BOOLEAN,defaultValue:true});QxWidget.addProperty({name:"anonymous",type:QxConst.TYPEOF_BOOLEAN,defaultValue:false,getAlias:"isAnonymous"});QxWidget.addProperty({name:"tagName",type:QxConst.TYPEOF_STRING,defaultValue:QxConst.CORE_DIV});QxWidget.addProperty({name:"horizontalAlign",type:QxConst.TYPEOF_STRING});QxWidget.addProperty({name:"verticalAlign",type:QxConst.TYPEOF_STRING});QxWidget.addProperty({name:"allowStretchX",type:QxConst.TYPEOF_BOOLEAN,defaultValue:true});QxWidget.addProperty({name:"allowStretchY",type:QxConst.TYPEOF_BOOLEAN,defaultValue:true});QxWidget.addProperty({name:"zIndex",type:QxConst.TYPEOF_NUMBER});QxWidget.addProperty({name:"backgroundColor",type:QxConst.TYPEOF_OBJECT,instance:"QxColor",convert:QxColorCache,allowMultipleArguments:true});QxWidget.addProperty({name:"color",type:QxConst.TYPEOF_OBJECT,instance:"QxColor",convert:QxColorCache,allowMultipleArguments:true});QxWidget.addProperty({name:"border",type:QxConst.TYPEOF_OBJECT,instance:"QxBorder",convert:QxBorderCache,allowMultipleArguments:true});QxWidget.addProperty({name:"opacity",type:QxConst.TYPEOF_NUMBER});QxWidget.addProperty({name:"cursor",type:QxConst.TYPEOF_STRING});QxWidget.addProperty({name:"backgroundImage",type:QxConst.TYPEOF_STRING});QxWidget.addProperty({name:"overflow",type:QxConst.TYPEOF_STRING,addToQueue:true});QxWidget.addProperty({name:"clipLeft",type:QxConst.CORE_NUMBER,impl:"clip"});QxWidget.addProperty({name:"clipTop",type:QxConst.CORE_NUMBER,impl:"clip"});QxWidget.addProperty({name:"clipWidth",type:QxConst.CORE_NUMBER,impl:"clip"});QxWidget.addProperty({name:"clipHeight",type:QxConst.CORE_NUMBER,impl:"clip"});QxWidget.addProperty({name:"tabIndex",type:QxConst.TYPEOF_NUMBER,defaultValue:-1});QxWidget.addProperty({name:"hideFocus",type:QxConst.TYPEOF_BOOLEAN,defaultValue:false});QxWidget.addProperty({name:"enableElementFocus",type:QxConst.TYPEOF_BOOLEAN,defaultValue:true});QxWidget.addProperty({name:"focused",type:QxConst.TYPEOF_BOOLEAN,defaultValue:false});QxWidget.addProperty({name:"selectable",type:QxConst.TYPEOF_BOOLEAN,defaultValue:true,getAlias:"isSelectable"});QxWidget.addProperty({name:"toolTip",type:QxConst.TYPEOF_OBJECT,instance:"QxToolTip"});QxWidget.addProperty({name:"contextMenu",type:QxConst.TYPEOF_OBJECT,instance:"QxMenu"});QxWidget.addProperty({name:"capture",type:QxConst.TYPEOF_BOOLEAN,defaultValue:false});QxWidget.addProperty({name:"dropDataTypes"});QxWidget.addProperty({name:"command",type:QxConst.TYPEOF_OBJECT,instance:"QxCommand"});QxWidget.addProperty({name:"appearance",type:QxConst.TYPEOF_STRING});QxWidget.addProperty({name:"marginTop",type:QxConst.TYPEOF_NUMBER,addToQueue:true,impl:"marginY"});QxWidget.addProperty({name:"marginRight",type:QxConst.TYPEOF_NUMBER,addToQueue:true,impl:"marginX"});QxWidget.addProperty({name:"marginBottom",type:QxConst.TYPEOF_NUMBER,addToQueue:true,impl:"marginY"});QxWidget.addProperty({name:"marginLeft",type:QxConst.TYPEOF_NUMBER,addToQueue:true,impl:"marginX"});QxWidget.addProperty({name:"paddingTop",type:QxConst.TYPEOF_NUMBER,addToQueue:true,impl:"paddingY"});QxWidget.addProperty({name:"paddingRight",type:QxConst.TYPEOF_NUMBER,addToQueue:true,impl:"paddingX"});QxWidget.addProperty({name:"paddingBottom",type:QxConst.TYPEOF_NUMBER,addToQueue:true,impl:"paddingY"});QxWidget.addProperty({name:"paddingLeft",type:QxConst.TYPEOF_NUMBER,addToQueue:true,impl:"paddingX"});QxWidget.addProperty({name:"left",addToQueue:true,unitDetection:"pixelPercent"});QxWidget.addProperty({name:"right",addToQueue:true,unitDetection:"pixelPercent"});QxWidget.addProperty({name:"width",addToQueue:true,unitDetection:"pixelPercentAutoFlex"});QxWidget.addProperty({name:"minWidth",addToQueue:true,unitDetection:"pixelPercentAuto"});QxWidget.addProperty({name:"maxWidth",addToQueue:true,unitDetection:"pixelPercentAuto"});QxWidget.addProperty({name:"top",addToQueue:true,unitDetection:"pixelPercent"});QxWidget.addProperty({name:"bottom",addToQueue:true,unitDetection:"pixelPercent"});QxWidget.addProperty({name:"height",addToQueue:true,unitDetection:"pixelPercentAutoFlex"});QxWidget.addProperty({name:"minHeight",addToQueue:true,unitDetection:"pixelPercentAuto"});QxWidget.addProperty({name:"maxHeight",addToQueue:true,unitDetection:"pixelPercentAuto"});QxWidget.addPropertyGroup({name:"location",members:["left","top"]});QxWidget.addPropertyGroup({name:"dimension",members:["width","height"]});QxWidget.addPropertyGroup({name:"space",members:["left","width","top","height"]});QxWidget.addPropertyGroup({name:"edge",members:["top","right","bottom","left"],mode:"shorthand"});QxWidget.addPropertyGroup({name:"padding",members:["paddingTop","paddingRight","paddingBottom","paddingLeft"],mode:"shorthand"});QxWidget.addPropertyGroup({name:"margin",members:["marginTop","marginRight","marginBottom","marginLeft"],mode:"shorthand"});QxWidget.addPropertyGroup({name:"heights",members:["minHeight","height","maxHeight"]});QxWidget.addPropertyGroup({name:"widths",members:["minWidth","width","maxWidth"]});QxWidget.addPropertyGroup({name:"align",members:["horizontalAlign","verticalAlign"]});QxWidget.addPropertyGroup({name:"stretch",members:["stretchX","stretchY"]});QxWidget.addPropertyGroup({name:"clipLocation",members:["clipLeft","clipTop"]});QxWidget.addPropertyGroup({name:"clipDimension",members:["clipWidth","clipHeight"]});QxWidget.addPropertyGroup({name:"clip",members:["clipLeft","clipTop","clipWidth","clipHeight"]});proto.isMaterialized=function(){var el=this._element;return this._initialLayoutDone&&this._isDisplayable&&QxDom.getComputedStyleProperty(el,QxConst.PROPERTY_DISPLAY)!=QxConst.CORE_NONE&&QxDom.getComputedStyleProperty(el,QxConst.PROPERTY_VISIBILITY)!=QxConst.CORE_HIDDEN&&el.offsetWidth>0&&el.offsetHeight>0;};proto.pack=function(){this.setWidth(this.getPreferredBoxWidth());this.setHeight(this.getPreferredBoxHeight());};proto.auto=function(){this.setWidth(QxConst.CORE_AUTO);this.setHeight(QxConst.CORE_AUTO);};proto.getChildren=QxUtil.returnNull;proto.getChildrenLength=QxUtil.returnZero;proto.hasChildren=QxUtil.returnFalse;proto.isEmpty=QxUtil.returnTrue;proto.indexOf=QxUtil.returnNegativeIndex;proto.contains=QxUtil.returnFalse;proto.getVisibleChildren=QxUtil.returnNull;proto.getVisibleChildrenLength=QxUtil.returnZero;proto.hasVisibleChildren=QxUtil.returnFalse;proto.isVisibleEmpty=QxUtil.returnTrue;proto._hasParent=false;proto._isDisplayable=false;proto.isDisplayable=function(){return this._isDisplayable;};proto._checkParent=function(propValue,propOldValue,propData){if(this.contains(propValue)){throw new Error("Could not insert myself into a child "+propValue+"!");};return propValue;};proto._modifyParent=function(propValue,propOldValue,propData){if(propOldValue){var vOldIndex=propOldValue.getChildren().indexOf(this);this._computedWidthValue=this._computedMinWidthValue=this._computedMaxWidthValue=this._computedLeftValue=this._computedRightValue=null;this._computedHeightValue=this._computedMinHeightValue=this._computedMaxHeightValue=this._computedTopValue=this._computedBottomValue=null;this._cachedBoxWidth=this._cachedInnerWidth=this._cachedOuterWidth=null;this._cachedBoxHeight=this._cachedInnerHeight=this._cachedOuterHeight=null;propOldValue.getChildren().removeAt(vOldIndex);propOldValue._invalidateVisibleChildren();propOldValue._removeChildFromChildrenQueue(this);propOldValue.getLayoutImpl().updateChildrenOnRemoveChild(this,vOldIndex);propOldValue.addToJobQueue(QxConst.JOB_REMOVECHILD);propOldValue._invalidatePreferredInnerDimensions();this._oldParent=propOldValue;};if(propValue){this._hasParent=true;if(QxUtil.isValidNumber(this._insertIndex)){propValue.getChildren().insertAt(this,this._insertIndex);delete this._insertIndex;}else {propValue.getChildren().push(this);};}else {this._hasParent=false;};return this._handleDisplayable(QxConst.PROPERTY_PARENT);};proto._modifyDisplay=function(propValue,propOldValue,propData){return this._handleDisplayable(QxConst.PROPERTY_DISPLAY);};proto._handleDisplayable=function(vHint){var vDisplayable=this._computeDisplayable();if(this._isDisplayable==vDisplayable&&!(vDisplayable&&vHint==QxConst.PROPERTY_PARENT)){return true;};this._isDisplayable=vDisplayable;var vParent=this.getParent();if(vParent){vParent._invalidateVisibleChildren();vParent._invalidatePreferredInnerDimensions();};if(vHint&&this._oldParent&&this._oldParent._initialLayoutDone){if(this.getVisibility()){this._beforeDisappear();};this._beforeRemoveDom();this._oldParent._getTargetNode().removeChild(this.getElement());this._afterRemoveDom();if(this.getVisibility()){this._afterDisappear();};delete this._oldParent;};if(vDisplayable){if(vParent._initialLayoutDone){vParent.getLayoutImpl().updateChildrenOnAddChild(this,vParent.getChildren().indexOf(this));vParent.addToJobQueue(QxConst.JOB_ADDCHILD);};this.addToLayoutChanges(QxConst.JOB_INITIAL);this.addToCustomQueues(vHint);if(this.getVisibility()){this._beforeAppear();};if(!this._isCreated){QxWidget.addToGlobalElementQueue(this);};QxWidget.addToGlobalStateQueue(this);if(!QxUtil.isObjectEmpty(this._jobQueue)){QxWidget.addToGlobalJobQueue(this);};if(!QxUtil.isObjectEmpty(this._childrenQueue)){QxWidget.addToGlobalLayoutQueue(this);};}else {QxWidget.removeFromGlobalElementQueue(this);QxWidget.removeFromGlobalStateQueue(this);QxWidget.removeFromGlobalJobQueue(this);QxWidget.removeFromGlobalLayoutQueue(this);this.removeFromCustomQueues(vHint);if(vParent&&vHint){if(this.getVisibility()){this._beforeDisappear();};if(vParent._initialLayoutDone&&this._initialLayoutDone){vParent.getLayoutImpl().updateChildrenOnRemoveChild(this,vParent.getChildren().indexOf(this));vParent.addToJobQueue(QxConst.JOB_REMOVECHILD);this._beforeRemoveDom();vParent._getTargetNode().removeChild(this.getElement());this._afterRemoveDom();};vParent._removeChildFromChildrenQueue(this);if(this.getVisibility()){this._afterDisappear();};};};this._handleDisplayableCustom(vDisplayable,vParent,vHint);return true;};proto.addToCustomQueues=QxUtil.returnTrue;proto.removeFromCustomQueues=QxUtil.returnTrue;proto._handleDisplayableCustom=QxUtil.returnTrue;proto._computeDisplayable=function(){return this.getDisplay()&&this._hasParent&&this.getParent()._isDisplayable?true:false;};proto._beforeAppear=function(){this.createDispatchEvent(QxConst.EVENT_TYPE_BEFORERAPPEAR);};proto._afterAppear=function(){this._isSeeable=true;this.createDispatchEvent(QxConst.EVENT_TYPE_APPEAR);};proto._beforeDisappear=function(){this.removeState(QxConst.STATE_OVER);this.removeState(QxConst.STATE_PRESSED);this.removeState(QxConst.STATE_ABANDONED);this.createDispatchEvent(QxConst.EVENT_TYPE_BEFORERDISAPPEAR);};proto._afterDisappear=function(){this._isSeeable=false;this.createDispatchEvent(QxConst.EVENT_TYPE_DISAPPEAR);};proto._isSeeable=false;proto.isSeeable=function(){return this._isSeeable;};proto.isAppearRelevant=function(){return this.getVisibility()&&this._isDisplayable;};proto._beforeInsertDom=function(){this.createDispatchEvent(QxConst.EVENT_TYPE_BEFOREINSERTDOM);};proto._afterInsertDom=function(){this.createDispatchEvent(QxConst.EVENT_TYPE_INSERTDOM);};proto._beforeRemoveDom=function(){this.createDispatchEvent(QxConst.EVENT_TYPE_BEFOREREMOVEDOM);};proto._afterRemoveDom=function(){this.createDispatchEvent(QxConst.EVENT_TYPE_REMOVEDOM);};proto._modifyVisibility=function(propValue,propOldValue,propData){if(propValue){if(this._isDisplayable){this._beforeAppear();};this.removeStyleProperty(QxConst.PROPERTY_DISPLAY);if(this._isDisplayable){this._afterAppear();};}else {if(this._isDisplayable){this._beforeDisappear();};this.setStyleProperty(QxConst.PROPERTY_DISPLAY,QxConst.CORE_NONE);if(this._isDisplayable){this._afterDisappear();};};return true;};proto.show=function(){this.setVisibility(true);this.setDisplay(true);};proto.hide=function(){this.setVisibility(false);};proto.connect=function(){this.setDisplay(true);};proto.disconnect=function(){this.setDisplay(false);};if(QxClient.isGecko()){proto._createElementForEnhancedBorder=QxUtil.returnTrue;}else {proto._createElementForEnhancedBorder=function(){if(QxBorder.enhancedCrossBrowserMode&&this.getTagName()==QxConst.CORE_DIV&&!this._borderElement){var el=this.getElement();var cl=this._borderElement=document.createElement(QxConst.CORE_DIV);var es=el.style;var cs=this._borderStyle=cl.style;cs.width=cs.height=QxConst.CORE_HUNDREDPERCENT;cs.position=QxConst.CORE_ABSOLUTE;for(var i in this._styleProperties){switch(i){case QxConst.PROPERTY_POSITION:case QxConst.PROPERTY_ZINDEX:case QxConst.PROPERTY_FILTER:break;default:cs[i]=this._styleProperties[i];es[i]=QxConst.CORE_EMPTY;};};while(el.firstChild){cl.appendChild(el.firstChild);};el.appendChild(cl);};};};proto._isCreated=false;if(QxClient.isGecko()){proto._getTargetNode=function(){return this._element;};}else {proto._getTargetNode=function(){return this._borderElement||this._element;};};proto.isCreated=function(){return this._isCreated;};proto._createElementImpl=function(){this.setElement(this.getTopLevelWidget().getDocumentElement().createElement(this.getTagName()));};proto._modifyElement=function(propValue,propOldValue,propData){this._isCreated=QxUtil.isValidElement(propValue);if(propOldValue){propOldValue._QxWidget=null;this._removeInlineEvents(propOldValue);};if(propValue){propValue._QxWidget=this;this._element=propValue;this._style=propValue.style;this._applyStyleProperties(propValue);this._applyHtmlProperties(propValue);this._applyHtmlAttributes(propValue);this._applyElementData(propValue);this._addInlineEvents(propValue);this.createDispatchEvent(QxConst.EVENT_TYPE_CREATE);}else {this._element=this._style=null;};return true;};proto.addToJobQueue=function(p){if(this._hasParent){QxWidget.addToGlobalJobQueue(this);};if(!this._jobQueue){this._jobQueue={};};this._jobQueue[p]=true;return true;};proto._flushJobQueue=function(q){try{var vQueue=this._jobQueue;var vParent=this.getParent();if(!vParent||QxUtil.isObjectEmpty(vQueue)){return;};var vLayoutImpl=this instanceof QxParent?this.getLayoutImpl():null;if(vLayoutImpl){vLayoutImpl.updateSelfOnJobQueueFlush(vQueue);};}catch(ex){this.error("Flushing job queue(prechecks#1)failed:"+ex,"_flushJobQueue");};try{var vFlushParentJobQueue=false;var vRecomputeOuterWidth=vQueue.marginLeft||vQueue.marginRight;var vRecomputeOuterHeight=vQueue.marginTop||vQueue.marginBottom;var vRecomputeInnerWidth=vQueue.frameWidth;var vRecomputeInnerHeight=vQueue.frameHeight;var vRecomputeParentPreferredInnerWidth=(vQueue.frameWidth||vQueue.preferredInnerWidth)&&this._recomputePreferredBoxWidth();var vRecomputeParentPreferredInnerHeight=(vQueue.frameHeight||vQueue.preferredInnerHeight)&&this._recomputePreferredBoxHeight();if(vRecomputeParentPreferredInnerWidth){var vPref=this.getPreferredBoxWidth();if(this._computedWidthTypeAuto){this._computedWidthValue=vPref;vQueue.width=true;};if(this._computedMinWidthTypeAuto){this._computedMinWidthValue=vPref;vQueue.minWidth=true;};if(this._computedMaxWidthTypeAuto){this._computedMaxWidthValue=vPref;vQueue.maxWidth=true;};};if(vRecomputeParentPreferredInnerHeight){var vPref=this.getPreferredBoxHeight();if(this._computedHeightTypeAuto){this._computedHeightValue=vPref;vQueue.height=true;};if(this._computedMinHeightTypeAuto){this._computedMinHeightValue=vPref;vQueue.minHeight=true;};if(this._computedMaxHeightTypeAuto){this._computedMaxHeightValue=vPref;vQueue.maxHeight=true;};};if((vQueue.width||vQueue.minWidth||vQueue.maxWidth||vQueue.left||vQueue.right)&&this._recomputeBoxWidth()){vRecomputeOuterWidth=vRecomputeInnerWidth=true;};if((vQueue.height||vQueue.minHeight||vQueue.maxHeight||vQueue.top||vQueue.bottom)&&this._recomputeBoxHeight()){vRecomputeOuterHeight=vRecomputeInnerHeight=true;};}catch(ex){this.error("Flushing job queue(recompute#2)failed:"+ex,"_flushJobQueue");};try{if((vRecomputeOuterWidth&&this._recomputeOuterWidth())||vRecomputeParentPreferredInnerWidth){vParent._invalidatePreferredInnerWidth();vParent.getLayoutImpl().updateSelfOnChildOuterWidthChange(this);vFlushParentJobQueue=true;};if((vRecomputeOuterHeight&&this._recomputeOuterHeight())||vRecomputeParentPreferredInnerHeight){vParent._invalidatePreferredInnerHeight();vParent.getLayoutImpl().updateSelfOnChildOuterHeightChange(this);vFlushParentJobQueue=true;};if(vFlushParentJobQueue){vParent._flushJobQueue();};}catch(ex){this.error("Flushing job queue(parentsignals#3)failed:"+ex,"_flushJobQueue");};try{vParent._addChildToChildrenQueue(this);for(var i in vQueue){this._layoutChanges[i]=true;};}catch(ex){this.error("Flushing job queue(addjobs#4)failed:"+ex,"_flushJobQueue");};try{if(this instanceof QxParent&&(vQueue.paddingLeft||vQueue.paddingRight||vQueue.paddingTop||vQueue.paddingBottom)){var ch=this.getChildren(),chl=ch.length;if(vQueue.paddingLeft){for(var i=0;i<chl;i++){ch[i].addToLayoutChanges(QxConst.PROPERTY_PARENT_PADDINGLEFT);};};if(vQueue.paddingRight){for(var i=0;i<chl;i++){ch[i].addToLayoutChanges(QxConst.PROPERTY_PARENT_PADDINGRIGHT);};};if(vQueue.paddingTop){for(var i=0;i<chl;i++){ch[i].addToLayoutChanges(QxConst.PROPERTY_PARENT_PADDINGTOP);};};if(vQueue.paddingBottom){for(var i=0;i<chl;i++){ch[i].addToLayoutChanges(QxConst.PROPERTY_PARENT_PADDINGBOTTOM);};};};if(vRecomputeInnerWidth){this._recomputeInnerWidth();};if(vRecomputeInnerHeight){this._recomputeInnerHeight();};if(this._initialLayoutDone){if(vLayoutImpl){vLayoutImpl.updateChildrenOnJobQueueFlush(vQueue);};};}catch(ex){this.error("Flushing job queue(childrensignals#5)failed:"+ex,"_flushJobQueue");};delete this._jobQueue;};proto._isWidthEssential=QxUtil.returnTrue;proto._isHeightEssential=QxUtil.returnTrue;QxWidget.initApplyMethods=function(){var f="_applyRuntime",r="_resetRuntime",s="this._style.",e="=QxConst.CORE_EMPTY",v="=v+QxConst.CORE_PIXEL",vpar="v";var props=["left","right","top","bottom","width","height","minWidth","maxWidth","minHeight","maxHeight"];var propsup=["Left","Right","Top","Bottom","Width","Height","MinWidth","MaxWidth","MinHeight","MaxHeight"];for(var i=0,fn=f+"Margin",rn=r+"Margin",sp=s+"margin";i<4;i++){proto[fn+propsup[i]]=new Function(vpar,sp+propsup[i]+v);proto[rn+propsup[i]]=new Function(sp+propsup[i]+e);};var pad="padding",upad="Padding";if(QxClient.isGecko()){for(var i=0,fn=f+upad,rn=r+upad,sp=s+pad;i<4;i++){proto[fn+propsup[i]]=new Function(vpar,sp+propsup[i]+v);proto[rn+propsup[i]]=new Function(sp+propsup[i]+e);};}else {var s1="this.setStyleProperty('padding";var s2="',v+'px')";var s3="this.removeStyleProperty('padding";var s4="')";for(var i=0,fn=f+upad,rn=r+upad,sp=s+pad;i<4;i++){proto[fn+propsup[i]]=new Function(vpar,s1+propsup[i]+s2);proto[rn+propsup[i]]=new Function(s3+propsup[i]+s4);};};if(QxClient.isMshtml()){for(var i=0,tpos="pos",vset="=v";i<6;i++){proto[f+propsup[i]]=new Function(vpar,s+tpos+propsup[i]+vset);proto[r+propsup[i]]=new Function(s+props[i]+e);};}else {for(var i=0;i<10;i++){proto[f+propsup[i]]=new Function(vpar,s+props[i]+v);proto[r+propsup[i]]=new Function(s+props[i]+e);};};};QxWidget.initApplyMethods();QxWidget.addCachedProperty({name:"innerWidth",defaultValue:null});QxWidget.addCachedProperty({name:"innerHeight",defaultValue:null});QxWidget.addCachedProperty({name:"boxWidth",defaultValue:null});QxWidget.addCachedProperty({name:"boxHeight",defaultValue:null});QxWidget.addCachedProperty({name:"outerWidth",defaultValue:null});QxWidget.addCachedProperty({name:"outerHeight",defaultValue:null});proto._computeBoxWidthFallback=function(){return 0;};proto._computeBoxHeightFallback=function(){return 0;};proto._computeBoxWidth=function(){return Math.max(0,this.getParent().getLayoutImpl().computeChildBoxWidth(this).limit(this.getMinWidthValue(),this.getMaxWidthValue()));};proto._computeBoxHeight=function(){return Math.max(0,this.getParent().getLayoutImpl().computeChildBoxHeight(this).limit(this.getMinHeightValue(),this.getMaxHeightValue()));};proto._computeOuterWidth=function(){return Math.max(0,this.getMarginLeft()+this.getBoxWidth()+this.getMarginRight());};proto._computeOuterHeight=function(){return Math.max(0,this.getMarginTop()+this.getBoxHeight()+this.getMarginBottom());};proto._computeInnerWidth=function(){return Math.max(0,this.getBoxWidth()-this.getFrameWidth());};proto._computeInnerHeight=function(){return Math.max(0,this.getBoxHeight()-this.getFrameHeight());};proto.getNeededWidth=function(){return Math.max(0,this.getParent().getLayoutImpl().computeChildNeededWidth(this));};proto.getNeededHeight=function(){return Math.max(0,this.getParent().getLayoutImpl().computeChildNeededHeight(this));};proto._recomputeFlexX=function(){if(!this.getHasFlexX()){return false;};if(this._computedWidthTypeFlex){this._computedWidthValue=null;this.addToLayoutChanges(QxConst.PROPERTY_WIDTH);};return true;};proto._recomputeFlexY=function(){if(!this.getHasFlexY()){return false;};if(this._computedHeightTypeFlex){this._computedHeightValue=null;this.addToLayoutChanges(QxConst.PROPERTY_HEIGHT);};return true;};proto._recomputePercentX=function(){if(!this.getHasPercentX()){return false;};if(this._computedWidthTypePercent){this._computedWidthValue=null;this.addToLayoutChanges(QxConst.PROPERTY_WIDTH);};if(this._computedMinWidthTypePercent){this._computedMinWidthValue=null;this.addToLayoutChanges(QxConst.PROPERTY_MINWIDTH);};if(this._computedMaxWidthTypePercent){this._computedMaxWidthValue=null;this.addToLayoutChanges(QxConst.PROPERTY_MAXWIDTH);};if(this._computedLeftTypePercent){this._computedLeftValue=null;this.addToLayoutChanges(QxConst.PROPERTY_LEFT);};if(this._computedRightTypePercent){this._computedRightValue=null;this.addToLayoutChanges(QxConst.PROPERTY_RIGHT);};return true;};proto._recomputePercentY=function(){if(!this.getHasPercentY()){return false;};if(this._computedHeightTypePercent){this._computedHeightValue=null;this.addToLayoutChanges(QxConst.PROPERTY_HEIGHT);};if(this._computedMinHeightTypePercent){this._computedMinHeightValue=null;this.addToLayoutChanges(QxConst.PROPERTY_MINHEIGHT);};if(this._computedMaxHeightTypePercent){this._computedMaxHeightValue=null;this.addToLayoutChanges(QxConst.PROPERTY_MAXHEIGHT);};if(this._computedTopTypePercent){this._computedTopValue=null;this.addToLayoutChanges(QxConst.PROPERTY_TOP);};if(this._computedBottomTypePercent){this._computedBottomValue=null;this.addToLayoutChanges(QxConst.PROPERTY_BOTTOM);};return true;};if(QxClient.isMshtml()||QxClient.isOpera()){proto._recomputeRangeX=function(){if(this._computedLeftTypeNull||this._computedRightTypeNull){return false;};this.addToLayoutChanges(QxConst.PROPERTY_WIDTH);return true;};proto._recomputeRangeY=function(){if(this._computedTopTypeNull||this._computedBottomTypeNull){return false;};this.addToLayoutChanges(QxConst.PROPERTY_HEIGHT);return true;};}else {proto._recomputeRangeX=function(){return !(this._computedLeftTypeNull||this._computedRightTypeNull);};proto._recomputeRangeY=function(){return !(this._computedTopTypeNull||this._computedBottomTypeNull);};};if(QxClient.isMshtml()||QxClient.isOpera()){proto._recomputeStretchingX=function(){if(this.getAllowStretchX()&&this._computedWidthTypeNull){this._computedWidthValue=null;this.addToLayoutChanges(QxConst.PROPERTY_WIDTH);return true;};return false;};proto._recomputeStretchingY=function(){if(this.getAllowStretchY()&&this._computedHeightTypeNull){this._computedHeightValue=null;this.addToLayoutChanges(QxConst.PROPERTY_HEIGHT);return true;};return false;};}else {proto._recomputeStretchingX=function(){if(this.getAllowStretchX()&&this._computedWidthTypeNull){return true;};return false;};proto._recomputeStretchingY=function(){if(this.getAllowStretchY()&&this._computedHeightTypeNull){return true;};return false;};};proto._computeValuePixel=function(v){return Math.round(v);};proto._computeValuePixelLimit=function(v){return Math.max(0,this._computeValuePixel(v));};proto._computeValuePercentX=function(v){return Math.round(this.getParent().getInnerWidthForChild(this)*v*0.01);};proto._computeValuePercentXLimit=function(v){return Math.max(0,this._computeValuePercentX(v));};proto._computeValuePercentY=function(v){return Math.round(this.getParent().getInnerHeightForChild(this)*v*0.01);};proto._computeValuePercentYLimit=function(v){return Math.max(0,this._computeValuePercentY(v));};proto.getWidthValue=function(){if(this._computedWidthValue!=null){return this._computedWidthValue;};switch(this._computedWidthType){case QxWidget.TYPE_PIXEL:return this._computedWidthValue=this._computeValuePixelLimit(this._computedWidthParsed);case QxWidget.TYPE_PERCENT:return this._computedWidthValue=this._computeValuePercentXLimit(this._computedWidthParsed);case QxWidget.TYPE_AUTO:return this._computedWidthValue=this.getPreferredBoxWidth();case QxWidget.TYPE_FLEX:this.getParent().getLayoutImpl().computeChildrenFlexWidth();return this._computedWidthValue=this._computedWidthFlexValue;};return null;};proto.getMinWidthValue=function(){if(this._computedMinWidthValue!=null){return this._computedMinWidthValue;};switch(this._computedMinWidthType){case QxWidget.TYPE_PIXEL:return this._computedWidthValue=this._computeValuePixelLimit(this._computedMinWidthParsed);case QxWidget.TYPE_PERCENT:return this._computedWidthValue=this._computeValuePercentXLimit(this._computedMinWidthParsed);case QxWidget.TYPE_AUTO:return this._computedMinWidthValue=this.getPreferredBoxWidth();};return null;};proto.getMaxWidthValue=function(){if(this._computedMaxWidthValue!=null){return this._computedMaxWidthValue;};switch(this._computedMaxWidthType){case QxWidget.TYPE_PIXEL:return this._computedWidthValue=this._computeValuePixelLimit(this._computedMaxWidthParsed);case QxWidget.TYPE_PERCENT:return this._computedWidthValue=this._computeValuePercentXLimit(this._computedMaxWidthParsed);case QxWidget.TYPE_AUTO:return this._computedMaxWidthValue=this.getPreferredBoxWidth();};return null;};proto.getLeftValue=function(){if(this._computedLeftValue!=null){return this._computedLeftValue;};switch(this._computedLeftType){case QxWidget.TYPE_PIXEL:return this._computedLeftValue=this._computeValuePixel(this._computedLeftParsed);case QxWidget.TYPE_PERCENT:return this._computedLeftValue=this._computeValuePercentX(this._computedLeftParsed);};return null;};proto.getRightValue=function(){if(this._computedRightValue!=null){return this._computedRightValue;};switch(this._computedRightType){case QxWidget.TYPE_PIXEL:return this._computedRightValue=this._computeValuePixel(this._computedRightParsed);case QxWidget.TYPE_PERCENT:return this._computedRightValue=this._computeValuePercentX(this._computedRightParsed);};return null;};proto.getHeightValue=function(){if(this._computedHeightValue!=null){return this._computedHeightValue;};switch(this._computedHeightType){case QxWidget.TYPE_PIXEL:return this._computedHeightValue=this._computeValuePixelLimit(this._computedHeightParsed);case QxWidget.TYPE_PERCENT:return this._computedHeightValue=this._computeValuePercentYLimit(this._computedHeightParsed);case QxWidget.TYPE_AUTO:return this._computedHeightValue=this.getPreferredBoxHeight();case QxWidget.TYPE_FLEX:this.getParent().getLayoutImpl().computeChildrenFlexHeight();return this._computedHeightValue=this._computedHeightFlexValue;};return null;};proto.getMinHeightValue=function(){if(this._computedMinHeightValue!=null){return this._computedMinHeightValue;};switch(this._computedMinHeightType){case QxWidget.TYPE_PIXEL:return this._computedMinHeightValue=this._computeValuePixelLimit(this._computedMinHeightParsed);case QxWidget.TYPE_PERCENT:return this._computedMinHeightValue=this._computeValuePercentYLimit(this._computedMinHeightParsed);case QxWidget.TYPE_AUTO:return this._computedMinHeightValue=this.getPreferredBoxHeight();};return null;};proto.getMaxHeightValue=function(){if(this._computedMaxHeightValue!=null){return this._computedMaxHeightValue;};switch(this._computedMaxHeightType){case QxWidget.TYPE_PIXEL:return this._computedMaxHeightValue=this._computeValuePixelLimit(this._computedMaxHeightParsed);case QxWidget.TYPE_PERCENT:return this._computedMaxHeightValue=this._computeValuePercentYLimit(this._computedMaxHeightParsed);case QxWidget.TYPE_AUTO:return this._computedMaxHeightValue=this.getPreferredBoxHeight();};return null;};proto.getTopValue=function(){if(this._computedTopValue!=null){return this._computedTopValue;};switch(this._computedTopType){case QxWidget.TYPE_PIXEL:return this._computedTopValue=this._computeValuePixel(this._computedTopParsed);case QxWidget.TYPE_PERCENT:return this._computedTopValue=this._computeValuePercentY(this._computedTopParsed);};return null;};proto.getBottomValue=function(){if(this._computedBottomValue!=null){return this._computedBottomValue;};switch(this._computedBottomType){case QxWidget.TYPE_PIXEL:return this._computedBottomValue=this._computeValuePixel(this._computedBottomParsed);case QxWidget.TYPE_PERCENT:return this._computedBottomValue=this._computeValuePercentY(this._computedBottomParsed);};return null;};QxWidget.addCachedProperty({name:QxConst.JOB_FRAMEWIDTH,defaultValue:null,addToQueueRuntime:true});QxWidget.addCachedProperty({name:QxConst.JOB_FRAMEHEIGHT,defaultValue:null,addToQueueRuntime:true});proto._computeFrameWidth=function(){var fw=this._cachedBorderLeft+this.getPaddingLeft()+this.getPaddingRight()+this._cachedBorderRight;switch(this.getOverflow()){case QxWidget.SCROLL_VALUE_SCROLL:case QxWidget.SCROLL_VALUE_SCROLLY:fw+=QxWidget.SCROLLBAR_SIZE;break;case QxWidget.SCROLL_VALUE_AUTO:break;};return fw;};proto._computeFrameHeight=function(){var fh=this._cachedBorderTop+this.getPaddingTop()+this.getPaddingBottom()+this._cachedBorderBottom;switch(this.getOverflow()){case QxWidget.SCROLL_VALUE_SCROLL:case QxWidget.SCROLL_VALUE_SCROLLX:fh+=QxWidget.SCROLLBAR_SIZE;break;case QxWidget.SCROLL_VALUE_AUTO:break;};return fh;};proto._invalidateFrameDimensions=function(){this._invalidateFrameWidth();this._invalidateFrameHeight();};QxWidget.addCachedProperty({name:QxConst.JOB_PREFERREDINNERWIDTH,defaultValue:null,addToQueueRuntime:true});QxWidget.addCachedProperty({name:QxConst.JOB_PREFERREDINNERHEIGHT,defaultValue:null,addToQueueRuntime:true});proto._invalidatePreferredInnerDimensions=function(){this._invalidatePreferredInnerWidth();this._invalidatePreferredInnerHeight();};QxWidget.addCachedProperty({name:"preferredBoxWidth",defaultValue:null});QxWidget.addCachedProperty({name:"preferredBoxHeight",defaultValue:null});proto._computePreferredBoxWidth=function(){try{return Math.max(0,this.getPreferredInnerWidth()+this.getFrameWidth());}catch(ex){this.error(ex,"_computePreferredBoxWidth");};};proto._computePreferredBoxHeight=function(){try{return Math.max(0,this.getPreferredInnerHeight()+this.getFrameHeight());}catch(ex){this.error(ex,"_computePreferredBoxHeight");};};proto._initialLayoutDone=false;proto.addToLayoutChanges=function(p){if(this._isDisplayable){this.getParent()._addChildToChildrenQueue(this);};return this._layoutChanges[p]=true;};proto.addToQueue=function(p){this._initialLayoutDone?this.addToJobQueue(p):this.addToLayoutChanges(p);};proto.addToQueueRuntime=function(p){return !this._initialLayoutDone||this.addToJobQueue(p);};proto._applyBorderX=function(vChild,vChanges,vStyle){var vBorder=vChild.getBorder();vBorder?vBorder._applyWidgetX(vChild):QxBorder._resetBorderX(vChild);};proto._applyBorderY=function(vChild,vChanges,vStyle){var vBorder=vChild.getBorder();vBorder?vBorder._applyWidgetY(vChild):QxBorder._resetBorderY(vChild);};proto._applyPaddingX=QxUtil.returnTrue;proto._applyPaddingY=QxUtil.returnTrue;QxWidget.addCachedProperty({name:"hasPercentX",defaultValue:false});QxWidget.addCachedProperty({name:"hasPercentY",defaultValue:false});QxWidget.addCachedProperty({name:"hasAutoX",defaultValue:false});QxWidget.addCachedProperty({name:"hasAutoY",defaultValue:false});QxWidget.addCachedProperty({name:"hasFlexX",defaultValue:false});QxWidget.addCachedProperty({name:"hasFlexY",defaultValue:false});proto._computeHasPercentX=function(){return this._computedLeftTypePercent||this._computedWidthTypePercent||this._computedMinWidthTypePercent||this._computedMaxWidthTypePercent||this._computedRightTypePercent;};proto._computeHasPercentY=function(){return this._computedTopTypePercent||this._computedHeightTypePercent||this._computedMinHeightTypePercent||this._computedMaxHeightTypePercent||this._computedBottomTypePercent;};proto._computeHasAutoX=function(){return this._computedWidthTypeAuto||this._computedMinWidthTypeAuto||this._computedMaxWidthTypeAuto;};proto._computeHasAutoY=function(){return this._computedHeightTypeAuto||this._computedMinHeightTypeAuto||this._computedMaxHeightTypeAuto;};proto._computeHasFlexX=function(){return this._computedWidthTypeFlex;};proto._computeHasFlexY=function(){return this._computedHeightTypeFlex;};QxWidget.TYPE_NULL=0;QxWidget.TYPE_PIXEL=1;QxWidget.TYPE_PERCENT=2;QxWidget.TYPE_AUTO=3;QxWidget.TYPE_FLEX=4;proto._evalUnitsPixelPercentAutoFlex=function(propValue){switch(propValue){case QxConst.CORE_AUTO:return QxWidget.TYPE_AUTO;case Infinity:case-Infinity:return QxWidget.TYPE_NULL;};switch(typeof propValue){case QxConst.TYPEOF_NUMBER:return isNaN(propValue)?QxWidget.TYPE_NULL:QxWidget.TYPE_PIXEL;case QxConst.TYPEOF_STRING:return propValue.indexOf(QxConst.CORE_PERCENT)!=-1?QxWidget.TYPE_PERCENT:propValue.indexOf(QxConst.CORE_STAR)!=-1?QxWidget.TYPE_FLEX:QxWidget.TYPE_NULL;};return QxWidget.TYPE_NULL;};proto._evalUnitsPixelPercentAuto=function(propValue){switch(propValue){case QxConst.CORE_AUTO:return QxWidget.TYPE_AUTO;case Infinity:case-Infinity:return QxWidget.TYPE_NULL;};switch(typeof propValue){case QxConst.TYPEOF_NUMBER:return isNaN(propValue)?QxWidget.TYPE_NULL:QxWidget.TYPE_PIXEL;case QxConst.TYPEOF_STRING:return propValue.indexOf(QxConst.CORE_PERCENT)!=-1?QxWidget.TYPE_PERCENT:QxWidget.TYPE_NULL;};return QxWidget.TYPE_NULL;};proto._evalUnitsPixelPercent=function(propValue){switch(propValue){case Infinity:case-Infinity:return QxWidget.TYPE_NULL;};switch(typeof propValue){case QxConst.TYPEOF_NUMBER:return isNaN(propValue)?QxWidget.TYPE_NULL:QxWidget.TYPE_PIXEL;case QxConst.TYPEOF_STRING:return propValue.indexOf(QxConst.CORE_PERCENT)!=-1?QxWidget.TYPE_PERCENT:QxWidget.TYPE_NULL;};return QxWidget.TYPE_NULL;};QxWidget.layoutPropertyTypes={};QxWidget.initLayoutProperties=function(){var a=["width","height","minWidth","maxWidth","minHeight","maxHeight","left","right","top","bottom"];for(var i=0,l=a.length,p,b,t;i<l;i++){p=a[i];b=QxConst.INTERNAL_COMPUTED+p.toFirstUp();t=b+QxConst.INTERNAL_UNIT_TYPE;QxWidget.layoutPropertyTypes[p]= {dataType:t,dataParsed:b+QxConst.INTERNAL_UNIT_PARSED,dataValue:b+QxConst.INTERNAL_UNIT_VALUE,typePixel:t+"Pixel",typePercent:t+"Percent",typeAuto:t+"Auto",typeFlex:t+"Flex",typeNull:t+"Null" };};};QxWidget.initLayoutProperties();proto._unitDetectionPixelPercentAutoFlex=function(propData,propValue){var r=QxWidget.layoutPropertyTypes[propData.name];var s=r.dataType;var p=r.dataParsed;var v=r.dataValue;var s1=r.typePixel;var s2=r.typePercent;var s3=r.typeAuto;var s4=r.typeFlex;var s5=r.typeNull;var wasPercent=this[s2];var wasAuto=this[s3];var wasFlex=this[s4];switch(this[s]=this._evalUnitsPixelPercentAutoFlex(propValue)){case QxWidget.TYPE_PIXEL:this[s1]=true;this[s2]=this[s3]=this[s4]=this[s5]=false;this[p]=this[v]=Math.round(propValue);break;case QxWidget.TYPE_PERCENT:this[s2]=true;this[s1]=this[s3]=this[s4]=this[s5]=false;this[p]=parseFloat(propValue);this[v]=null;break;case QxWidget.TYPE_AUTO:this[s3]=true;this[s1]=this[s2]=this[s4]=this[s5]=false;this[p]=this[v]=null;break;case QxWidget.TYPE_FLEX:this[s4]=true;this[s1]=this[s2]=this[s3]=this[s5]=false;this[p]=parseFloat(propValue);this[v]=null;break;default:this[s5]=true;this[s1]=this[s2]=this[s3]=this[s4]=false;this[p]=this[v]=null;break;};if(wasPercent!=this[s2]){switch(propData.name){case QxConst.PROPERTY_MINWIDTH:case QxConst.PROPERTY_MAXWIDTH:case QxConst.PROPERTY_WIDTH:case QxConst.PROPERTY_LEFT:case QxConst.PROPERTY_RIGHT:this._invalidateHasPercentX();break;case QxConst.PROPERTY_MAXHEIGHT:case QxConst.PROPERTY_MINHEIGHT:case QxConst.PROPERTY_HEIGHT:case QxConst.PROPERTY_TOP:case QxConst.PROPERTY_BOTTOM:this._invalidateHasPercentY();break;};};if(wasAuto!=this[s3]){switch(propData.name){case QxConst.PROPERTY_MINWIDTH:case QxConst.PROPERTY_MAXWIDTH:case QxConst.PROPERTY_WIDTH:this._invalidateHasAutoX();break;case QxConst.PROPERTY_MINHEIGHT:case QxConst.PROPERTY_MAXHEIGHT:case QxConst.PROPERTY_HEIGHT:this._invalidateHasAutoY();break;};};if(wasFlex!=this[s4]){switch(propData.name){case QxConst.PROPERTY_WIDTH:this._invalidateHasFlexX();break;case QxConst.PROPERTY_HEIGHT:this._invalidateHasFlexY();break;};};};proto._unitDetectionPixelPercentAuto=function(propData,propValue){var r=QxWidget.layoutPropertyTypes[propData.name];var s=r.dataType;var p=r.dataParsed;var v=r.dataValue;var s1=r.typePixel;var s2=r.typePercent;var s3=r.typeAuto;var s4=r.typeNull;var wasPercent=this[s2];var wasAuto=this[s3];switch(this[s]=this._evalUnitsPixelPercentAuto(propValue)){case QxWidget.TYPE_PIXEL:this[s1]=true;this[s2]=this[s3]=this[s4]=false;this[p]=this[v]=Math.round(propValue);break;case QxWidget.TYPE_PERCENT:this[s2]=true;this[s1]=this[s3]=this[s4]=false;this[p]=parseFloat(propValue);this[v]=null;break;case QxWidget.TYPE_AUTO:this[s3]=true;this[s1]=this[s2]=this[s4]=false;this[p]=this[v]=null;break;default:this[s4]=true;this[s1]=this[s2]=this[s3]=false;this[p]=this[v]=null;break;};if(wasPercent!=this[s2]){switch(propData.name){case QxConst.PROPERTY_MINWIDTH:case QxConst.PROPERTY_MAXWIDTH:case QxConst.PROPERTY_WIDTH:case QxConst.PROPERTY_LEFT:case QxConst.PROPERTY_RIGHT:this._invalidateHasPercentX();break;case QxConst.PROPERTY_MINHEIGHT:case QxConst.PROPERTY_MAXHEIGHT:case QxConst.PROPERTY_HEIGHT:case QxConst.PROPERTY_TOP:case QxConst.PROPERTY_BOTTOM:this._invalidateHasPercentY();break;};};if(wasAuto!=this[s3]){switch(propData.name){case QxConst.PROPERTY_MINWIDTH:case QxConst.PROPERTY_MAXWIDTH:case QxConst.PROPERTY_WIDTH:this._invalidateHasAutoX();break;case QxConst.PROPERTY_MINHEIGHT:case QxConst.PROPERTY_MAXHEIGHT:case QxConst.PROPERTY_HEIGHT:this._invalidateHasAutoY();break;};};};proto._unitDetectionPixelPercent=function(propData,propValue){var r=QxWidget.layoutPropertyTypes[propData.name];var s=r.dataType;var p=r.dataParsed;var v=r.dataValue;var s1=r.typePixel;var s2=r.typePercent;var s3=r.typeNull;var wasPercent=this[s2];switch(this[s]=this._evalUnitsPixelPercent(propValue)){case QxWidget.TYPE_PIXEL:this[s1]=true;this[s2]=this[s3]=false;this[p]=this[v]=Math.round(propValue);break;case QxWidget.TYPE_PERCENT:this[s2]=true;this[s1]=this[s3]=false;this[p]=parseFloat(propValue);this[v]=null;break;default:this[s3]=true;this[s1]=this[s2]=false;this[p]=this[v]=null;break;};if(wasPercent!=this[s2]){switch(propData.name){case QxConst.PROPERTY_MINWIDTH:case QxConst.PROPERTY_MAXWIDTH:case QxConst.PROPERTY_WIDTH:case QxConst.PROPERTY_LEFT:case QxConst.PROPERTY_RIGHT:this._invalidateHasPercentX();break;case QxConst.PROPERTY_MINHEIGHT:case QxConst.PROPERTY_MAXHEIGHT:case QxConst.PROPERTY_HEIGHT:case QxConst.PROPERTY_TOP:case QxConst.PROPERTY_BOTTOM:this._invalidateHasPercentY();break;};};};if(QxClient.isMshtml()){QxWidget.inlineEventMap= {input:"onpropertychange",select:"onselect",scroll:"onscroll",focus:"onfocus",blur:"onblur" };proto.enableInlineEvent=function(vEventName){var vEventType=QxWidget.inlineEventMap[vEventName];if(!this._inlineEvents){this._inlineEvents=[vEventType];}else {this._inlineEvents.push(vEventType);};if(this._isCreated){this.getElement()[vEventType]=QxWidget.__oninlineevent;};};proto.disableInlineEvent=function(vEventName){var vEventType=QxWidget.inlineEventMap[vEventName];if(this._inlineEvents){this._inlineEvents.remove(vEventType);};if(this._isCreated){this.getElement()[vEventType]=null;};};proto._addInlineEvents=function(vElement){if(this._inlineEvents){for(var i=0,a=this._inlineEvents,l=a.length;i<l;i++){vElement[a[i]]=QxWidget.__oninlineevent;};};};proto._removeInlineEvents=function(vElement){if(this._inlineEvents){for(var i=0,a=this._inlineEvents,l=a.length;i<l;i++){vElement[a[i]]=null;};};};}else {proto.enableInlineEvent=function(vEventName){if(!this._inlineEvents){this._inlineEvents=[vEventName];}else {this._inlineEvents.push(vEventName);};if(this._isCreated){this.getElement().addEventListener(vEventName,QxWidget.__oninlineevent,false);};};proto.disableInlineEvent=function(vEventName){if(this._inlineEvents){this._inlineEvents.remove(vEventName);};if(this._isCreated){this.getElement().removeEventListener(vEventName,QxWidget.__oninlineevent,false);};};proto._addInlineEvents=function(vElement){if(this._inlineEvents){for(var i=0,a=this._inlineEvents,l=a.length;i<l;i++){vElement.addEventListener(a[i],QxWidget.__oninlineevent,false);};};};proto._removeInlineEvents=function(vElement){if(this._inlineEvents){for(var i=0,a=this._inlineEvents,l=a.length;i<l;i++){vElement.removeEventListener(a[i],QxWidget.__oninlineevent,false);};};};};QxWidget.__oninlineevent=function(e){if(!e){e=window.event;};if(this._QxWidget){return this._QxWidget._oninlineevent(e);};};proto._oninlineevent=function(e){if(QxWidget._inFlushGlobalQueues){return;};switch(e.type){case QxConst.EVENT_TYPE_PROPERTYCHANGE:this._oninlineproperty(e);break;case QxConst.EVENT_TYPE_INPUT:this._oninlineinput(e);break;default:this.createDispatchEvent(e.type);};};proto._oninlineinput=function(e){this.createDispatchDataEvent(QxConst.EVENT_TYPE_INPUT,this.getComputedValue());if(e.stopPropagation){e.stopPropagation();};e.returnValue=-1;};QxWidget.INLINE_EVENTTYPE_PROPERTY="value";proto._oninlineproperty=function(e){switch(e.propertyName){case QxWidget.INLINE_EVENTTYPE_PROPERTY:if(!this._inValueProperty){this._oninlineinput(e);};break;};};proto.getTopLevelWidget=function(){return this._hasParent?this.getParent().getTopLevelWidget():null;};proto.moveSelfBefore=function(vBefore){this.getParent().addBefore(this,vBefore);};proto.moveSelfAfter=function(vAfter){this.getParent().addAfter(this,vAfter);};proto.moveSelfToBegin=function(){this.getParent().addAtBegin(this);};proto.moveSelfToEnd=function(){this.getParent().addAtEnd(this);};proto.getPreviousSibling=function(){var p=this.getParent();if(p==null){return null;};var cs=p.getChildren();return cs[cs.indexOf(this)-1];};proto.getNextSibling=function(){var p=this.getParent();if(p==null){return null;};var cs=p.getChildren();return cs[cs.indexOf(this)+1];};proto.getPreviousVisibleSibling=function(){if(!this._hasParent){return null;};var vChildren=this.getParent().getVisibleChildren();return vChildren[vChildren.indexOf(this)-1];};proto.getNextVisibleSibling=function(){if(!this._hasParent){return null;};var vChildren=this.getParent().getVisibleChildren();return vChildren[vChildren.indexOf(this)+1];};proto.getPreviousActiveSibling=function(vIgnoreClasses){var vPrev=QxWidget.getActiveSiblingHelper(this,this.getParent(),-1,vIgnoreClasses,null);return vPrev?vPrev:this.getParent().getLastActiveChild();};proto.getNextActiveSibling=function(vIgnoreClasses){var vNext=QxWidget.getActiveSiblingHelper(this,this.getParent(),1,vIgnoreClasses,null);return vNext?vNext:this.getParent().getFirstActiveChild();};proto.isFirstChild=function(){return this._hasParent&&this.getParent().getFirstChild()==this;};proto.isLastChild=function(){return this._hasParent&&this.getParent().getLastChild()==this;};proto.isFirstVisibleChild=function(){return this._hasParent&&this.getParent().getFirstVisibleChild()==this;};proto.isLastVisibleChild=function(){return this._hasParent&&this.getParent().getLastVisibleChild()==this;};proto._modifyEnabled=function(propValue,propOldValue,propData){propValue?this.removeState(QxConst.STATE_DISABLED):this.addState(QxConst.STATE_DISABLED);return true;};proto.hasState=function(vState){return this._states[vState]?true:false;};proto.addState=function(vState){this._states[vState]=true;if(this._hasParent){QxWidget.addToGlobalStateQueue(this);};};proto.removeState=function(vState){delete this._states[vState];if(this._hasParent){QxWidget.addToGlobalStateQueue(this);};};proto._applyInitialAppearance=function(){var vAppearance=this.getAppearance();if(vAppearance){try{var r=QxAppearanceManager.getAppearanceThemeObject().initialFrom(this,vAppearance);if(r){this.set(r);};}catch(ex){this.error("Could not apply initial appearance:"+ex,"_applyInitialAppearance");};};};proto._applyStateAppearance=function(){this._applyStateStyleFocus(this._states);var vAppearance=this.getAppearance();if(vAppearance){try{var r=QxAppearanceManager.getAppearanceThemeObject().stateFrom(this,vAppearance);if(r){this.set(r);};}catch(ex){this.error("Could not apply state appearance:"+ex,"_applyStateAppearance");};};};proto._resetAppearanceThemeWrapper=function(vNewAppearanceTheme,vOldAppearanceTheme){var vAppearance=this.getAppearance();if(vAppearance){var vOldAppearanceThemeObject=QxAppearanceManager.getAppearanceThemeObjectById(vOldAppearanceTheme);var vNewAppearanceThemeObject=QxAppearanceManager.getAppearanceThemeObjectById(vNewAppearanceTheme);var vOldAppearanceProperties=QxUtil.mergeObjectWith(vOldAppearanceThemeObject.initialFrom(this,vAppearance),vOldAppearanceThemeObject.stateFrom(this,vAppearance));var vNewAppearanceProperties=QxUtil.mergeObjectWith(vNewAppearanceThemeObject.initialFrom(this,vAppearance),vNewAppearanceThemeObject.stateFrom(this,vAppearance));for(vProp in vOldAppearanceProperties){if(!(vProp in vNewAppearanceProperties)){this[QxMain.resetter[vProp]]();};};this.set(vNewAppearanceProperties);};};if(QxClient.isMshtml()){proto._applyStateStyleFocus=function(vStates){};}else if(QxClient.isGecko()){proto._applyStateStyleFocus=function(vStates){if(vStates.focused){if(!QxFocusManager.mouseFocus&&!this.getHideFocus()){this.setStyleProperty("MozOutline",QxConst.FOCUS_OUTLINE);};}else {this.removeStyleProperty("MozOutline");};};}else {proto._applyStateStyleFocus=function(vStates){if(vStates.focused){if(!QxFocusManager.mouseFocus&&!this.getHideFocus()){this.setStyleProperty("outline",QxConst.FOCUS_OUTLINE);};}else {this.removeStyleProperty("outline");};};};proto.addToStateQueue=function(){QxWidget.addToGlobalStateQueue(this);};proto.recursiveAddToStateQueue=function(){this.addToStateQueue();};proto._modifyAppearance=function(propValue,propOldValue,propData){var vAppearanceThemeObject=QxAppearanceManager.getAppearanceThemeObject();var vNewAppearanceProperties=QxUtil.mergeObjectWith(vAppearanceThemeObject.initialFrom(this,propValue),vAppearanceThemeObject.stateFrom(this,propValue));if(propOldValue){var vOldAppearanceProperties=QxUtil.mergeObjectWith(vAppearanceThemeObject.initialFrom(this,propOldValue),vAppearanceThemeObject.stateFrom(this,propOldValue));for(vProp in vOldAppearanceProperties){if(!(vProp in vNewAppearanceProperties)){this[QxMain.resetter[vProp]]();};};};this.set(vNewAppearanceProperties);return true;};proto._recursiveAppearanceThemeUpdate=function(vNewAppearanceTheme,vOldAppearanceTheme){try{this._resetAppearanceThemeWrapper(vNewAppearanceTheme,vOldAppearanceTheme);}catch(ex){this.error("Failed to update appearance theme:"+ex,"_recursiveAppearanceThemeUpdate");};};proto._applyElementData=function(el){};proto.setHtmlProperty=function(propName,propValue){if(!this._htmlProperties){this._htmlProperties={};};this._htmlProperties[propName]=propValue;if(this._isCreated){this.getElement()[propName]=propValue;};return true;};if(QxClient.isMshtml()){proto.removeHtmlProperty=function(propName){if(!this._htmlProperties){return;};delete this._htmlProperties[propName];if(this._isCreated){this.getElement().removeAttribute(propName);};return true;};}else {proto.removeHtmlProperty=function(propName){if(!this._htmlProperties){return;};delete this._htmlProperties[propName];if(this._isCreated){this.getElement().removeAttribute(propName);delete this.getElement()[propName];};return true;};};proto.getHtmlProperty=function(propName){if(!this._htmlProperties){return QxConst.CORE_EMPTY;};return this._htmlProperties[propName]||QxConst.CORE_EMPTY;};proto._applyHtmlProperties=function(vElement){var vProperties=this._htmlProperties;if(vProperties){var propName;for(propName in vProperties){vElement[propName]=vProperties[propName];};};};proto.setHtmlAttribute=function(propName,propValue){if(!this._htmlAttributes){this._htmlAttributes={};};this._htmlAttributes[propName]=propValue;if(this._isCreated){this.getElement().setAttribute(propName,propValue);};return true;};proto.removeHtmlAttribute=function(propName){if(!this._htmlAttributes){return;};delete this._htmlAttributes[propName];if(this._isCreated){this.getElement().removeAttribute(propName);};return true;};proto.getHtmlAttribute=function(propName){if(!this._htmlAttributes){return QxConst.CORE_EMPTY;};return this._htmlAttributes[propName]||QxConst.CORE_EMPTY;};proto._applyHtmlAttributes=function(vElement){var vAttributes=this._htmlAttributes;if(vAttributes){var propName;for(propName in vAttributes){vElement.setAttribute(propName,vAttributes[i]);};};};proto.getStyleProperty=function(propName){return this._styleProperties[propName]||QxConst.CORE_EMPTY;};proto.setStyleProperty=function(propName,propValue){this._styleProperties[propName]=propValue;if(this._isCreated){switch(propName){case QxConst.PROPERTY_ZINDEX:case QxConst.PROPERTY_FILTER:case QxConst.PROPERTY_DISPLAY:case QxConst.PROPERTY_VISIBILITY:var vElement=this.getElement();break;default:var vElement=this._getTargetNode();};if(vElement){vElement.style[propName]=propValue;};};return true;};proto.removeStyleProperty=function(propName){delete this._styleProperties[propName];if(this._isCreated){switch(propName){case QxConst.PROPERTY_ZINDEX:case QxConst.PROPERTY_FILTER:case QxConst.PROPERTY_DISPLAY:case QxConst.PROPERTY_VISIBILITY:var vElement=this.getElement();break;default:var vElement=this._getTargetNode();};if(vElement){vElement.style[propName]=QxConst.CORE_EMPTY;};};return true;};proto._applyStyleProperties=function(vElement){var vProperties=this._styleProperties;var propName;var vBaseElement=vElement;var vTargetElement=this._getTargetNode();for(propName in vProperties){switch(propName){case QxConst.PROPERTY_ZINDEX:case QxConst.PROPERTY_FILTER:vElement=vBaseElement;break;default:vElement=vTargetElement;};vElement.style[propName]=vProperties[propName];};};proto.isFocusable=function(){return this.isEnabled()&&this.isSeeable()&&this.getTabIndex()>=0;};proto.isFocusRoot=function(){return false;};proto.getFocusRoot=function(){if(this._hasParent){return this.getParent().getFocusRoot();};return null;};proto.getActiveChild=function(){var vRoot=this.getFocusRoot();if(vRoot){return vRoot.getActiveChild();};return null;};proto._ontabfocus=QxUtil.returnTrue;proto._modifyFocused=function(propValue,propOldValue,propData){if(!this.isCreated()){return true;};var vFocusRoot=this.getFocusRoot();if(propValue){vFocusRoot.setFocusedChild(this);this._visualizeFocus();}else {if(vFocusRoot.getFocusedChild()==this){vFocusRoot.setFocusedChild(null);};this._visualizeBlur();};return true;};proto._visualizeBlur=function(){if(this.getEnableElementFocus()){try{this.getElement().blur();}catch(ex){};};this.removeState(QxConst.STATE_FOCUSED);return true;};proto._visualizeFocus=function(){if(!QxFocusManager.mouseFocus&&this.getEnableElementFocus()){try{this.getElement().focus();}catch(ex){};};this.addState(QxConst.STATE_FOCUSED);return true;};proto.focus=function(){delete QxFocusManager.mouseFocus;this.setFocused(true);};proto.blur=function(){delete QxFocusManager.mouseFocus;this.setFocused(false);};proto._modifyCapture=function(propValue,propOldValue,propData){try{var ev=this.getTopLevelWidget().getEventManager();}catch(ex){throw new Error("Could not apply new capture value:event manager of top level widget is not available!");};if(propOldValue){ev.setCaptureWidget(null);}else if(propValue){ev.setCaptureWidget(this);};return true;};proto._modifyZIndex=function(propValue,propOldValue,propData){return this.setStyleProperty(propData.name,propValue);};QxWidget.TAB_PROPERTY_UNSELECTABLE="unselectable";QxWidget.TAB_PROPERTY_TABINDEX="tabIndex";QxWidget.TAB_PROPERTY_USERFOCUS="userFocus";QxWidget.TAB_PROPERTY_MOZUSERFOCUS="MozUserFocus";QxWidget.TAB_VALUE_IGNORE="ignore";QxWidget.TAB_VALUE_NORMAL="normal";QxWidget.TAB_VALUE_ON="on";if(QxClient.isMshtml()){proto._modifyTabIndex=function(propValue,propOldValue,propData){propValue<0||!this.getEnabled()?this.setHtmlProperty(QxWidget.TAB_PROPERTY_UNSELECTABLE,QxWidget.TAB_VALUE_ON):this.removeHtmlProperty(QxWidget.TAB_PROPERTY_UNSELECTABLE);this.setHtmlProperty(QxWidget.TAB_PROPERTY_TABINDEX,propValue<0?-1:1);return true;};}else if(QxClient.isGecko()){proto._modifyTabIndex=function(propValue,propOldValue,propData){this.setStyleProperty(QxWidget.TAB_PROPERTY_MOZUSERFOCUS,propValue<0?QxWidget.TAB_VALUE_IGNORE:QxWidget.TAB_VALUE_NORMAL);this.setStyleProperty(QxWidget.TAB_PROPERTY_USERFOCUS,propValue<0?QxWidget.TAB_VALUE_IGNORE:QxWidget.TAB_VALUE_NORMAL);return true;};}else {proto._modifyTabIndex=function(propValue,propOldValue,propData){this.setStyleProperty(QxWidget.TAB_PROPERTY_USERFOCUS,propValue<0?QxWidget.TAB_VALUE_IGNORE:QxWidget.TAB_VALUE_NORMAL);propValue<0||!this.getEnabled()?this.setHtmlProperty(QxWidget.TAB_PROPERTY_UNSELECTABLE,QxWidget.TAB_VALUE_ON):this.removeHtmlProperty(QxWidget.TAB_PROPERTY_UNSELECTABLE);this.setHtmlProperty(QxWidget.TAB_PROPERTY_TABINDEX,propValue<0?-1:1);return true;};};proto.setCssClassName=function(propValue){this.setHtmlProperty(QxConst.PROPERTY_CLASSNAME,propValue);};proto.getCssClassName=function(){return this.getHtmlProperty(QxConst.PROPERTY_CLASSNAME);};proto.getWidgetFromPoint=function(x,y){var ret=this.getWidgetFromPointHelper(x,y);return ret&&ret!=this?ret:null;};proto.getWidgetFromPointHelper=function(x,y){return this;};QxWidget.SEL_PROPERTY_UNSELECTABLE="unselectable";QxWidget.SEL_PROPERTY_USERSELECT="userSelect";QxWidget.SEL_PROPERTY_MOZUSERSELECT="MozUserSelect";QxWidget.SEL_VALUE_ON="on";if(QxClient.isMshtml()){proto._modifySelectable=function(propValue,propOldValue,propData){return propValue?this.removeHtmlProperty(QxWidget.SEL_PROPERTY_UNSELECTABLE):this.setHtmlProperty(QxWidget.SEL_PROPERTY_UNSELECTABLE,QxWidget.SEL_VALUE_ON);};}else if(QxClient.isGecko()){proto._modifySelectable=function(propValue,propOldValue,propData){if(propValue){this.removeStyleProperty(QxWidget.SEL_PROPERTY_MOZUSERSELECT);this.removeStyleProperty(QxWidget.SEL_PROPERTY_USERSELECT);}else {this.setStyleProperty(QxWidget.SEL_PROPERTY_MOZUSERSELECT,QxConst.CORE_NONE);this.setStyleProperty(QxWidget.SEL_PROPERTY_USERSELECT,QxConst.CORE_NONE);};return true;};}else if(QxClient.isOpera()){proto._modifySelectable=function(propValue,propOldValue,propData){return true;};}else {proto._modifySelectable=function(propValue,propOldValue,propData){return propValue?this.removeStyleProperty(QxWidget.SEL_PROPERTY_USERSELECT):this.setStyleProperty(QxWidget.SEL_PROPERTY_USERSELECT,QxConst.CORE_NONE);};};QxWidget.OPACITY_FILTER_START="Alpha(Opacity=";QxWidget.OPACITY_FILTER_STOP=")";QxWidget.OPACITY_FILTER_REGEXP = /Alpha\(Opacity=([0-9]{1,3})\)/;QxWidget.OPACITY_PROPERTY_CSS3="opacity";QxWidget.OPACITY_PROPERTY_MOZ="MozOpacity";QxWidget.OPACITY_PROPERTY_KHTML="KhtmlOpacity";if(QxClient.isMshtml()){proto._modifyOpacity=function(propValue,propOldValue,propData){if(propValue==null||propValue>=1||propValue<0){this.removeStyleProperty(QxConst.PROPERTY_FILTER);}else if(QxUtil.isValidNumber(propValue)){this.setStyleProperty(QxConst.PROPERTY_FILTER,QxWidget.OPACITY_FILTER_START+Math.round(propValue*100)+QxWidget.OPACITY_FILTER_STOP);}else {throw new Error("Unsupported opacity value:"+propValue);};return true;};}else {proto._modifyOpacity=function(propValue,propOldValue,propData){if(propValue==null||propValue>1){if(QxClient.isGecko()){this.removeStyleProperty(QxWidget.OPACITY_PROPERTY_MOZ);}else if(QxClient.isKhtml()){this.removeStyleProperty(QxWidget.OPACITY_PROPERTY_KHTML);};this.removeStyleProperty(QxWidget.OPACITY_PROPERTY_CSS3);}else if(QxUtil.isValidNumber(propValue)){propValue=propValue.limit(0,1);if(QxClient.isGecko()){this.setStyleProperty(QxWidget.OPACTIY_PROPERTY_MOZ,propValue);}else if(QxClient.isKhtml()){this.setStyleProperty(QxWidget.OPACITY_PROPERTY_KHTML,propValue);};this.setStyleProperty(QxWidget.OPACITY_PROPERTY_CSS3,propValue);};return true;};};QxWidget.CURSOR_PROPERTY="cursor";QxWidget.CURSOR_VALUE_POINTER="pointer";QxWidget.CURSOR_VALUE_HAND="hand";proto._modifyCursor=function(propValue,propOldValue,propData){if(propValue){this.setStyleProperty(QxWidget.CURSOR_PROPERTY,propValue==QxWidget.CURSOR_VALUE_POINTER&&QxClient.isMshtml()?QxWidget.CURSOR_VALUE_HAND:propValue);}else {this.removeStyleProperty(QxWidget.CURSOR_PROPERTY);};return true;};QxWidget.BACKGROUNDIMG_PROPERTY="backgroundImage";QxWidget.BACKGROUNDIMG_VALUE_START="url(";QxWidget.BACKGROUNDIMG_VALUE_STOP=")";QxWidget.BACKGROUNDIMG_REGEXP1 = /^url\(/i;QxWidget.BACKGROUNDIMG_REGEXP2 = /\)$/;proto._modifyBackgroundImage=function(propValue,propOldValue,propData){return QxUtil.isValidString(propValue)?this.setStyleProperty(QxWidget.BACKGROUNDIMG_PROPERTY,QxWidget.BACKGROUNDIMG_VALUE_START+QxImageManager.buildUri(propValue)+QxWidget.BACKGROUNDIMG_VALUE_STOP):this.removeStyleProperty(QxWidget.BACKGROUNDIMG_PROPERTY);};QxWidget.CLIP_PROPERTY="clip";QxWidget.CLIP_VALUE_START="rect(";QxWidget.CLIP_VALUE_STOP=")";proto._modifyClip=function(propValue,propOldValue,propData){return this._compileClipString();};proto._compileClipString=function(){var vLeft=this.getClipLeft();var vTop=this.getClipTop();var vWidth=this.getClipWidth();var vHeight=this.getClipHeight();var vRight,vBottom;if(vLeft==null){vRight=vWidth==null?QxConst.CORE_AUTO:vWidth+QxConst.CORE_PIXEL;vLeft=QxConst.CORE_AUTO;}else {vRight=vWidth==null?QxConst.CORE_AUTO:vLeft+vWidth+QxConst.CORE_PIXEL;vLeft=vLeft+QxConst.CORE_PIXEL;};if(vTop==null){vBottom=vHeight==null?QxConst.CORE_AUTO:vHeight+QxConst.CORE_PIXEL;vTop=QxConst.CORE_AUTO;}else {vBottom=vHeight==null?QxConst.CORE_AUTO:vTop+vHeight+QxConst.CORE_PIXEL;vTop=vTop+QxConst.CORE_PIXEL;};return this.setStyleProperty(QxWidget.CLIP_PROPERTY,QxWidget.CLIP_VALUE_START+vTop+QxConst.CORE_COMMA+vRight+QxConst.CORE_COMMA+vBottom+QxConst.CORE_COMMA+vLeft+QxWidget.CLIP_VALUE_STOP);};QxWidget.initOverflow=function(){var t=document.createElement(QxConst.CORE_DIV);var s=t.style;s.height=s.width="100px";s.overflow="scroll";document.body.appendChild(t);var c=QxDom.getComputedScrollBarSizeRight(t);if(c){QxWidget.SCROLLBAR_SIZE=c;};document.body.removeChild(t);};if(typeof window.application!=QxConst.TYPEOF_UNDEFINED){window.application.addEventListener(QxConst.EVENT_TYPE_PRE,QxWidget.initOverflow);};QxWidget.SCROLL_PROPERTY="overflow";QxWidget.SCROLL_PROPERTYX="overflowX";QxWidget.SCROLL_PROPERTYY="overflowY";QxWidget.SCROLL_VALUE_AUTO="auto";QxWidget.SCROLL_VALUE_HIDDEN="hidden";QxWidget.SCROLL_VALUE_SCROLL="scroll";QxWidget.SCROLL_VALUE_SCROLLX="scrollX";QxWidget.SCROLL_VALUE_SCROLLY="scrollY";QxWidget.SCROLL_VALUE_MOZNONE="-moz-scrollbars-none";QxWidget.SCROLL_VALUE_MOZSCROLLX="-moz-scrollbars-horizontal";QxWidget.SCROLL_VALUE_MOZSCROLLY="-moz-scrollbars-vertical";if(QxClient.isGecko()){proto._modifyOverflow=function(propValue,propOldValue,propData){var pv=propValue;var pn=propData.name;switch(pv){case QxWidget.SCROLL_VALUE_HIDDEN:pv=QxWidget.SCROLL_VALUE_MOZNONE;break;case QxWidget.SCROLL_VALUE_SCROLLX:pv=QxWidget.SCROLL_VALUE_MOZSCROLLX;break;case QxWidget.SCROLL_VALUE_SCROLLY:pv=QxWidget.SCROLL_VALUE_MOZSCROLLY;break;};return this._applyOverflow(pn,pv,propValue,propOldValue);};}else if(QxClient.isMshtml()){proto._modifyOverflow=function(propValue,propOldValue,propData){var pv=propValue;var pn=propData.name;switch(pv){case QxWidget.SCROLL_VALUE_SCROLLX:pn=QxWidget.SCROLL_PROPERTYX;pv=QxWidget.SCROLL_VALUE_SCROLL;break;case QxWidget.SCROLL_VALUE_SCROLLY:pn=QxWidget.SCROLL_PROPERTYY;pv=QxWidget.SCROLL_VALUE_SCROLL;break;};var a=[QxWidget.SCROLL_PROPERTY,QxWidget.SCROLL_PROPERTYX,QxWidget.SCROLL_PROPERTYY];for(var i=0;i<a.length;i++){if(a[i]!=pn){this.removeStyleProperty(a[i]);};};return this._applyOverflow(pn,pv,propValue,propOldValue);};}else {proto._modifyOverflow=function(propValue,propOldValue,propData){var pv=propValue;var pn=propData.name;switch(pv){case QxWidget.SCROLL_VALUE_SCROLLX:case QxWidget.SCROLL_VALUE_SCROLLY:pv=QxWidget.SCROLL_VALUE_SCROLL;break;};return this._applyOverflow(pn,pv,propValue,propOldValue);};};proto._applyOverflow=function(pn,pv,propValue,propOldValue){this.setStyleProperty(pn,pv);this._invalidateFrameWidth();this._invalidateFrameHeight();return true;};proto.getOverflowX=function(){var vOverflow=this.getOverflow();return vOverflow==QxWidget.SCROLL_VALUE_SCROLLY?QxWidget.SCROLL_VALUE_HIDDEN:vOverflow;};proto.getOverflowY=function(){var vOverflow=this.getOverflow();return vOverflow==QxWidget.SCROLL_VALUE_SCROLLX?QxWidget.SCROLL_VALUE_HIDDEN:vOverflow;};if(QxClient.isMshtml()){proto._modifyHideFocus=function(propValue,propOldValue,propData){this.setHtmlProperty(propData.name,propValue);return true;};};proto._modifyBackgroundColor=function(propValue,propOldValue,propData){if(propOldValue){propOldValue.remove(this);};if(propValue){this._applyBackgroundColor(propValue.getStyle());propValue.add(this);}else {this._resetBackgroundColor();};return true;};proto._modifyColor=function(propValue,propOldValue,propData){if(propOldValue){propOldValue.remove(this);};if(propValue){this._applyColor(propValue.getStyle());propValue.add(this);}else {this._resetColor();};return true;};proto._updateColors=function(vColor,vNewValue){if(this.getColor()==vColor){this._applyColor(vNewValue);};if(this.getBackgroundColor()==vColor){this._applyBackgroundColor(vNewValue);};};proto._applyColor=function(vNewValue){this.setStyleProperty(QxConst.PROPERTY_COLOR,vNewValue);};proto._applyBackgroundColor=function(vNewValue){this.setStyleProperty(QxConst.PROPERTY_BACKGROUNDCOLOR,vNewValue);};proto._resetColor=function(vNewValue){this.removeStyleProperty(QxConst.PROPERTY_COLOR);};proto._resetBackgroundColor=function(){this.removeStyleProperty(QxConst.PROPERTY_BACKGROUNDCOLOR);};proto._cachedBorderTop=0;proto._cachedBorderRight=0;proto._cachedBorderBottom=0;proto._cachedBorderLeft=0;proto._modifyBorder=function(propValue,propOldValue,propData){var vOldTop=this._cachedBorderTop;var vOldRight=this._cachedBorderRight;var vOldBottom=this._cachedBorderBottom;var vOldLeft=this._cachedBorderLeft;if(propOldValue){propOldValue.removeListenerWidget(this);};if(propValue){propValue.addListenerWidget(this);this._cachedBorderTop=propValue.getTopWidth();this._cachedBorderRight=propValue.getRightWidth();this._cachedBorderBottom=propValue.getBottomWidth();this._cachedBorderLeft=propValue.getLeftWidth();}else {this._cachedBorderTop=this._cachedBorderRight=this._cachedBorderBottom=this._cachedBorderLeft=0;};if((vOldLeft+vOldRight)!=(this._cachedBorderLeft+this._cachedBorderRight)){this._invalidateFrameWidth();};this.addToQueue(QxConst.PROPERTY_BORDERX);if((vOldTop+vOldBottom)!=(this._cachedBorderTop+this._cachedBorderBottom)){this._invalidateFrameHeight();};this.addToQueue(QxConst.PROPERTY_BORDERY);return true;};proto.getCachedBorderTop=function(){return this._cachedBorderTop;};proto.getCachedBorderRight=function(){return this._cachedBorderRight;};proto.getCachedBorderBottom=function(){return this._cachedBorderBottom;};proto.getCachedBorderLeft=function(){return this._cachedBorderLeft;};proto._updateBorder=function(vEdge){var vBorder=this.getBorder();var vEdgeUp=vEdge.toFirstUp();var vNewValue=vBorder[QxConst.INTERNAL_GET+vEdgeUp+"Width"]();var vCacheName="_cachedBorder"+vEdgeUp;var vWidthChanged=this[vCacheName]!=vNewValue;this[vCacheName]=vNewValue;switch(vEdge){case QxConst.PROPERTY_LEFT:case QxConst.PROPERTY_RIGHT:if(vWidthChanged){this.addToJobQueue(QxConst.PROPERTY_BORDERWIDTHX);};this.addToJobQueue(QxConst.PROPERTY_BORDERX);break;case QxConst.PROPERTY_TOP:case QxConst.PROPERTY_BOTTOM:if(vWidthChanged){this.addToJobQueue(QxConst.PROPERTY_BORDERWIDTHY);};this.addToJobQueue(QxConst.PROPERTY_BORDERY);break;};};proto._modifyPaddingX=function(propValue,propOldValue,propData){this._invalidateFrameWidth();return true;};proto._modifyPaddingY=function(propValue,propOldValue,propData){this._invalidateFrameHeight();return true;};proto._clonePropertyIgnoreList="parent,element,visible";proto.clone=function(cloneRecursive,customPropertyList){var cloneInstance=new this.constructor;var propertyName;var propertyList=[];var propertyIngoreList=this._clonePropertyIgnoreList.split(QxConst.CORE_COMMA);var sourcePropertyList=QxUtil.isValid(customPropertyList)?customPropertyList:this._properties.split(QxConst.CORE_COMMA);var sourcePropertyListLength=sourcePropertyList.length-1;do{propertyName=sourcePropertyList[sourcePropertyListLength];if(!propertyIngoreList.contains(propertyName)){propertyList.push(propertyName);};}while(sourcePropertyListLength--);propertyListLength=propertyList.length-1;do{propertyName=propertyList[propertyListLength].toFirstUp();cloneInstance[QxConst.INTERNAL_SET+propertyName](this[QxConst.INTERNAL_GET+propertyName]());}while(propertyListLength--);if(sourcePropertyList.contains("parent")){var myParent=this.getParent();if(myParent){cloneInstance.setParent(myParent);};};if(cloneRecursive){this._cloneRecursive(cloneInstance);};return cloneInstance;};proto._cloneRecursive=function(cloneInstance){};proto.execute=function(){var vCommand=this.getCommand();if(vCommand){vCommand.execute(this);};this.createDispatchEvent(QxConst.EVENT_TYPE_EXECUTE);};proto._visualPropertyCheck=function(){if(!this.isCreated()){throw new Error("Element must be created previously!");};};proto.setScrollLeft=function(nScrollLeft){this._visualPropertyCheck();this._getTargetNode().scrollLeft=nScrollLeft;};proto.setScrollTop=function(nScrollTop){this._visualPropertyCheck();this._getTargetNode().scrollTop=nScrollTop;};proto.getOffsetLeft=function(){this._visualPropertyCheck();return QxDom.getOffsetLeft(this.getElement());};proto.getOffsetTop=function(){this._visualPropertyCheck();return QxDom.getOffsetTop(this.getElement());};proto.getScrollLeft=function(){this._visualPropertyCheck();return this._getTargetNode().scrollLeft;};proto.getScrollTop=function(){this._visualPropertyCheck();return this._getTargetNode().scrollTop;};proto.getClientWidth=function(){this._visualPropertyCheck();return this._getTargetNode().clientWidth;};proto.getClientHeight=function(){this._visualPropertyCheck();return this._getTargetNode().clientHeight;};proto.getOffsetWidth=function(){this._visualPropertyCheck();return this.getElement().offsetWidth;};proto.getOffsetHeight=function(){this._visualPropertyCheck();return this.getElement().offsetHeight;};proto.getScrollWidth=function(){this._visualPropertyCheck();return this.getElement().scrollWidth;};proto.getScrollHeight=function(){this._visualPropertyCheck();return this.getElement().scrollHeight;};proto.scrollIntoView=function(vAlignTopLeft){this.scrollIntoViewX(vAlignTopLeft);this.scrollIntoViewY(vAlignTopLeft);};proto.scrollIntoViewX=function(vAlignLeft){if(!this._isCreated||!this._isDisplayable){return false;};return QxDom.scrollIntoViewX(this.getElement(),vAlignLeft);};proto.scrollIntoViewY=function(vAlignTop){if(!this._isCreated||!this._isDisplayable){return false;};return QxDom.scrollIntoViewY(this.getElement(),vAlignTop);};proto.supportsDrop=function(vDragCache){return true;};proto.dispose=function(){if(this.getDisposed()){return;};var vElement=this.getElement();if(vElement){this._removeInlineEvents(vElement);delete this._isCreated;vElement._QxWidget=null;this._element=null;this._style=null;};this._inlineEvents=null;this._element=null;this._style=null;this._borderElement=null;this._borderStyle=null;this._oldParent=null;delete this._styleProperties;delete this._htmlProperties;delete this._htmlAttributes;delete this._states;for(var i in this._jobQueue){delete this._jobQueue[i];};delete this._jobQueue;for(var i in this._layoutChanges){delete this._layoutChanges[i];};delete this._layoutChanges;return QxTarget.prototype.dispose.call(this);};if(QxSettings.enableWidgetDebug){QxWidget.flushGlobalQueues=function(){if(QxWidget._inFlushGlobalQueues||!window.application.isReady()){return;};if(!(QxWidget._globalWidgetQueue.length>0||QxWidget._globalElementQueue.length>0|| QxWidget._globalStateQueue.length>0||QxWidget._globalJobQueue.length>0|| QxWidget._globalLayoutQueue.length>0||QxWidget._fastGlobalDisplayQueue.length>0|| !QxUtil.isObjectEmpty(QxWidget._lazyGlobalDisplayQueue))){return;};QxWidget._inFlushGlobalQueues=true;var vStart;vStart=(new Date).valueOf();QxWidget.flushGlobalWidgetQueue();var vWidgetDuration=(new Date).valueOf()-vStart;vStart=(new Date).valueOf();QxWidget.flushGlobalStateQueue();var vStateDuration=(new Date).valueOf()-vStart;vStart=(new Date).valueOf();QxWidget.flushGlobalElementQueue();var vElementDuration=(new Date).valueOf()-vStart;vStart=(new Date).valueOf();QxWidget.flushGlobalJobQueue();var vJobDuration=(new Date).valueOf()-vStart;vStart=(new Date).valueOf();QxWidget.flushGlobalLayoutQueue();var vLayoutDuration=(new Date).valueOf()-vStart;vStart=(new Date).valueOf();QxWidget.flushGlobalDisplayQueue();var vDisplayDuration=(new Date).valueOf()-vStart;var vSum=vWidgetDuration+vStateDuration+vElementDuration+vJobDuration+vLayoutDuration+vDisplayDuration;if(vSum>0){QxDebug("QxWidgetCore","Flush Global Queues","info");QxDebug("QxWidgetCore","Widgets:"+vWidgetDuration+"ms");QxDebug("QxWidgetCore","State:"+vStateDuration+"ms");QxDebug("QxWidgetCore","Element:"+vElementDuration+"ms");QxDebug("QxWidgetCore","Job:"+vJobDuration+"ms");QxDebug("QxWidgetCore","Layout:"+vLayoutDuration+"ms");QxDebug("QxWidgetCore","Display:"+vDisplayDuration+"ms");window.status="Flush:Widget:"+vWidgetDuration+" State:"+vStateDuration+" Element:"+vElementDuration+" Job:"+vJobDuration+" Layout:"+vLayoutDuration+" Display:"+vDisplayDuration;};delete QxWidget._inFlushGlobalQueues;};}else {QxWidget.flushGlobalQueues=function(){if(QxWidget._inFlushGlobalQueues||!window.application.isReady()){return;};QxWidget._inFlushGlobalQueues=true;QxWidget.flushGlobalWidgetQueue();QxWidget.flushGlobalStateQueue();QxWidget.flushGlobalElementQueue();QxWidget.flushGlobalJobQueue();QxWidget.flushGlobalLayoutQueue();QxWidget.flushGlobalDisplayQueue();delete QxWidget._inFlushGlobalQueues;};};QxWidget._globalWidgetQueue=[];QxWidget.addToGlobalWidgetQueue=function(vWidget){if(!vWidget._isInGlobalWidgetQueue&&vWidget._isDisplayable){QxWidget._globalWidgetQueue.push(vWidget);vWidget._isInGlobalWidgetQueue=true;};};QxWidget.removeFromGlobalWidgetQueue=function(vWidget){if(vWidget._isInGlobalWidgetQueue){QxWidget._globalWidgetQueue.remove(vWidget);delete vWidget._isInGlobalWidgetQueue;};};QxWidget.flushGlobalWidgetQueue=function(){var vQueue=QxWidget._globalWidgetQueue,vLength,vWidget;while((vLength=vQueue.length)>0){for(var i=0;i<vLength;i++){vWidget=vQueue[i];vWidget.flushWidgetQueue();delete vWidget._isInGlobalWidgetQueue;};vQueue.splice(0,vLength);};};QxWidget._globalElementQueue=[];QxWidget.addToGlobalElementQueue=function(vWidget){if(!vWidget._isInGlobalElementQueue&&vWidget._isDisplayable){QxWidget._globalElementQueue.push(vWidget);vWidget._isInGlobalElementQueue=true;};};QxWidget.removeFromGlobalElementQueue=function(vWidget){if(vWidget._isInGlobalElementQueue){QxWidget._globalElementQueue.remove(vWidget);delete vWidget._isInGlobalElementQueue;};};QxWidget.flushGlobalElementQueue=function(){var vQueue=QxWidget._globalElementQueue,vLength,vWidget;while((vLength=vQueue.length)>0){for(var i=0;i<vLength;i++){vWidget=vQueue[i];vWidget._createElementImpl();delete vWidget._isInGlobalElementQueue;};vQueue.splice(0,vLength);};};QxWidget._globalStateQueue=[];QxWidget.addToGlobalStateQueue=function(vWidget){if(!vWidget._isInGlobalStateQueue&&vWidget._isDisplayable){QxWidget._globalStateQueue.push(vWidget);vWidget._isInGlobalStateQueue=true;};};QxWidget.removeFromGlobalStateQueue=function(vWidget){if(vWidget._isInGlobalStateQueue){QxWidget._globalStateQueue.remove(vWidget);delete vWidget._isInGlobalStateQueue;};};QxWidget.flushGlobalStateQueue=function(){var vQueue=QxWidget._globalStateQueue,vLength,vWidget;while((vLength=vQueue.length)>0){for(var i=0;i<vLength;i++){vWidget=vQueue[i];vWidget._applyStateAppearance();delete vWidget._isInGlobalStateQueue;};vQueue.splice(0,vLength);};};QxWidget._globalJobQueue=[];QxWidget.addToGlobalJobQueue=function(vWidget){if(!vWidget._isInGlobalJobQueue&&vWidget._isDisplayable){QxWidget._globalJobQueue.push(vWidget);vWidget._isInGlobalJobQueue=true;};};QxWidget.removeFromGlobalJobQueue=function(vWidget){if(vWidget._isInGlobalJobQueue){QxWidget._globalJobQueue.remove(vWidget);delete vWidget._isInGlobalJobQueue;};};QxWidget.flushGlobalJobQueue=function(){var vQueue=QxWidget._globalJobQueue,vLength,vWidget;while((vLength=vQueue.length)>0){for(var i=0;i<vLength;i++){vWidget=vQueue[i];vWidget._flushJobQueue(vWidget._jobQueue);delete vWidget._isInGlobalJobQueue;};vQueue.splice(0,vLength);};};QxWidget._globalLayoutQueue=[];QxWidget.addToGlobalLayoutQueue=function(vParent){if(!vParent._isInGlobalLayoutQueue&&vParent._isDisplayable){QxWidget._globalLayoutQueue.push(vParent);vParent._isInGlobalLayoutQueue=true;};};QxWidget.removeFromGlobalLayoutQueue=function(vParent){if(vParent._isInGlobalLayoutQueue){QxWidget._globalLayoutQueue.remove(vParent);delete vParent._isInGlobalLayoutQueue;};};QxWidget.flushGlobalLayoutQueue=function(){var vQueue=QxWidget._globalLayoutQueue,vLength,vParent;while((vLength=vQueue.length)>0){for(var i=0;i<vLength;i++){vParent=vQueue[i];vParent._flushChildrenQueue();delete vParent._isInGlobalLayoutQueue;};vQueue.splice(0,vLength);};};QxWidget._fastGlobalDisplayQueue=[];QxWidget._lazyGlobalDisplayQueues={};QxWidget.addToGlobalDisplayQueue=function(vWidget){if(!vWidget._isInGlobalDisplayQueue&&vWidget._isDisplayable){var vParent=vWidget.getParent();if(vParent.isSeeable()){var vKey=vParent.toHashCode();if(QxWidget._lazyGlobalDisplayQueues[vKey]){QxWidget._lazyGlobalDisplayQueues[vKey].push(vWidget)}else {QxWidget._lazyGlobalDisplayQueues[vKey]=[vWidget];};}else {QxWidget._fastGlobalDisplayQueue.push(vWidget);};vWidget._isInGlobalDisplayQueue=true;};};QxWidget.removeFromGlobalDisplayQueue=function(vWidget){};QxWidget.flushGlobalDisplayQueue=function(){var vKey,vLazyQueue,vWidget,vFragment;var vFastQueue=QxWidget._fastGlobalDisplayQueue;var vLazyQueues=QxWidget._lazyGlobalDisplayQueues;for(var i=0,l=vFastQueue.length;i<l;i++){vWidget=vFastQueue[i];vWidget.getParent()._getTargetNode().appendChild(vWidget.getElement());};for(vKey in vLazyQueues){vLazyQueue=vLazyQueues[vKey];for(var i=0;i<vLazyQueue.length;i++){vWidget=vLazyQueue[i];if(vWidget instanceof QxInline){vWidget._beforeInsertDom();try{document.getElementById(vWidget.getInlineNodeId()).appendChild(vWidget.getElement());}catch(ex){vWidget.debug("Could not append to inline id:"+vWidget.getInlineNodeId()+":"+ex);};vWidget._afterInsertDom();vWidget._afterAppear();vLazyQueue.remove(vWidget);i--;delete vWidget._isInGlobalDisplayQueue;};};};for(vKey in vLazyQueues){vLazyQueue=vLazyQueues[vKey];if(document.createDocumentFragment&&vLazyQueue.length>=3){vFragment=document.createDocumentFragment();for(var i=0,l=vLazyQueue.length;i<l;i++){vWidget=vLazyQueue[i];vWidget._beforeInsertDom();vFragment.appendChild(vWidget.getElement());};vLazyQueue[0].getParent()._getTargetNode().appendChild(vFragment);for(var i=0,l=vLazyQueue.length;i<l;i++){vWidget=vLazyQueue[i];vWidget._afterInsertDom();};}else {for(var i=0,l=vLazyQueue.length;i<l;i++){vWidget=vLazyQueue[i];vWidget._beforeInsertDom();vWidget.getParent()._getTargetNode().appendChild(vWidget.getElement());vWidget._afterInsertDom();};};};for(vKey in vLazyQueues){vLazyQueue=vLazyQueues[vKey];for(var i=0,l=vLazyQueue.length;i<l;i++){vWidget=vLazyQueue[i];if(vWidget.getVisibility()){vWidget._afterAppear();};delete vWidget._isInGlobalDisplayQueue;};delete vLazyQueues[vKey];};for(var i=0,l=vFastQueue.length;i<l;i++){delete vFastQueue[i]._isInGlobalDisplayQueue;};vFastQueue.removeAll();};QxWidget.getActiveSiblingHelperIgnore=function(vIgnoreClasses,vInstance){for(var j=0;j<vIgnoreClasses.length;j++){if(vInstance instanceof vIgnoreClasses[j]){return true;};};return false;};QxWidget.getActiveSiblingHelper=function(vObject,vParent,vCalc,vIgnoreClasses,vMode){if(!vIgnoreClasses){vIgnoreClasses=[];};var vChilds=vParent.getChildren();var vPosition=QxUtil.isInvalid(vMode)?vChilds.indexOf(vObject)+vCalc:vMode=="first"?0:vChilds.length-1;var vInstance=vChilds[vPosition];while(!vInstance.isEnabled()||QxWidget.getActiveSiblingHelperIgnore(vIgnoreClasses,vInstance)){vPosition+=vCalc;vInstance=vChilds[vPosition];if(!vInstance){return null;};};return vInstance;};function QxAppearanceManager(){QxManager.call(this);this._themes={};};QxAppearanceManager.extend(QxManager,"QxAppearanceManager");QxAppearanceManager.addProperty({name:"appearanceTheme",type:QxConst.TYPEOF_STRING,defaultValue:"default"});proto._modifyAppearanceTheme=function(propValue,propOldValue,propData){window.application.getClientWindow().getClientDocument()._recursiveAppearanceThemeUpdate(propValue,propOldValue);return true;};proto.registerTheme=function(vThemeObject){this._themes[vThemeObject.getId()]=vThemeObject;};proto.getAppearanceThemeObjectById=function(vThemeId){return this._themes[vThemeId];};proto.getAppearanceThemeObject=function(){return this.getAppearanceThemeObjectById(this.getAppearanceTheme());};proto.dispose=function(){if(this.getDisposed()){return;};if(this._themes){for(vTheme in this._themes){this._themes[vTheme].dispose();this._themes[vTheme]=null;};this._themes=null;};return QxManager.prototype.dispose.call(this);};QxAppearanceManager=new QxAppearanceManager;function QxAppearanceTheme(vId,vTitle){QxObject.call(this);this._appearances={};this.setId(vId);this.setTitle(QxUtil.isValidString(vTitle)?vTitle:vId);QxAppearanceManager.registerTheme(this);};QxAppearanceTheme.extend(QxObject,"QxAppearanceTheme");QxAppearanceTheme.addProperty({name:"id",type:QxConst.TYPEOF_STRING,allowNull:false});QxAppearanceTheme.addProperty({name:"title",type:QxConst.TYPEOF_STRING,allowNull:false,defaultValue:QxConst.CORE_EMPTY});proto.registerAppearance=function(vId,vData){this._appearances[vId]=vData;};proto.getAppearance=function(vId){return this._appearances[vId];};proto.setupAppearance=function(vAppearance){if(!vAppearance._setupDone){if(vAppearance.setup){vAppearance.setup();};vAppearance._setupDone=true;};};proto.initialFrom=function(vWidget,vId){var vAppearance=this.getAppearance(vId);if(vAppearance){this.setupAppearance(vAppearance);return vAppearance.initial?vAppearance.initial(vWidget,this):{};}else {return this.error("Missing appearance:"+vId,"initialStyleFrom");};};proto.stateFrom=function(vWidget,vId){var vAppearance=this.getAppearance(vId);if(vAppearance){this.setupAppearance(vAppearance);return vAppearance.state?vAppearance.state(vWidget,this,vWidget._states):{};}else {return this.error("Missing appearance:"+vId,"stateStyleFrom");};};proto.dispose=function(){if(this.getDisposed()){return;};this._appearances=null;return QxObject.prototype.dispose.call(this);};theme=new QxAppearanceTheme("default","qooxdoo default appearance");theme.registerAppearance("image",{initial:function(vWidget,vTheme){return{allowStretchX:false,allowStretchY:false };}});theme.registerAppearance("client-document",{setup:function(){this.bgcolor=new QxColorObject("threedface");this.color=new QxColorObject("windowtext");},initial:function(vWidget,vTheme){return{backgroundColor:this.bgcolor,color:this.color,hideFocus:true,enableElementFocus:false };}});theme.registerAppearance("blocker",{initial:function(vWidget,vTheme){return{cursor:QxConst.CORE_DEFAULT,backgroundImage:QxConst.IMAGE_BLANK };}});theme.registerAppearance("atom",{initial:function(vWidget,vTheme){return{cursor:QxConst.CORE_DEFAULT,spacing:4,width:QxConst.CORE_AUTO,height:QxConst.CORE_AUTO,horizontalChildrenAlign:QxConst.ALIGN_CENTER,verticalChildrenAlign:QxConst.ALIGN_MIDDLE,stretchChildrenOrthogonalAxis:false,allowStretchY:false,allowStretchX:false };}});theme.registerAppearance("label",{setup:function(){this.color_disabled=new QxColorObject("graytext");this.font=new QxFont(11,'"Segoe UI",Corbel,Calibri,Tahoma,"Lucida Sans Unicode",sans-serif');},initial:function(vWidget,vTheme){return{font:this.font,wrap:false };},state:function(vWidget,vTheme,vStates){return{color:vStates.disabled?this.color_disabled:null };}});theme.registerAppearance("htmlcontainer",{initial:function(vWidget,vTheme){return vTheme.initialFrom(vWidget,"label");},state:function(vWidget,vTheme,vStates){return vTheme.stateFrom(vWidget,"label");}});theme.registerAppearance("popup",{initial:function(vWidget,vTheme){return{width:QxConst.CORE_AUTO,height:QxConst.CORE_AUTO };}});theme.registerAppearance("tool-tip",{setup:function(){this.bgcolor=new QxColorObject("InfoBackground");this.color=new QxColorObject("InfoText");},initial:function(vWidget,vTheme){vWidget.setStyleProperty(QxConst.PROPERTY_FILTER,"progid:DXImageTransform.Microsoft.Shadow(color='Gray',Direction=135,Strength=4)");return QxUtil.mergeObjectWith(vTheme.initialFrom(vWidget,"popup"),{backgroundColor:this.bgcolor,color:this.color,border:QxBorderObject.presets.info,paddingTop:1,paddingRight:3,paddingBottom:2,paddingLeft:3 });}});theme.registerAppearance("iframe",{initial:function(vWidget,vTheme){return{border:QxBorderObject.presets.inset };}});theme.registerAppearance("button",{setup:function(){this.bgcolor_default=new QxColorObject("buttonface");this.bgcolor_over=new QxColor("#87BCE5");this.bgcolor_left=new QxColor("#FFF0C9");this.border_pressed=QxBorderObject.presets.inset;this.border_default=QxBorderObject.presets.outset;},initial:function(vWidget,vTheme){return vTheme.initialFrom(vWidget,"atom");},state:function(vWidget,vTheme,vStates){var vReturn={backgroundColor:vStates.abandoned?this.bgcolor_left:vStates.over?this.bgcolor_over:this.bgcolor_default,border:vStates.pressed||vStates.checked||vStates.abandoned?this.border_pressed:this.border_default };if(vStates.pressed||vStates.abandoned){vReturn.paddingTop=4;vReturn.paddingRight=3;vReturn.paddingBottom=2;vReturn.paddingLeft=5;}else {vReturn.paddingTop=vReturn.paddingBottom=3;vReturn.paddingRight=vReturn.paddingLeft=4;};return vReturn;}});theme.registerAppearance("toolbar",{setup:function(){this.bgcolor=new QxColorObject("threedface");},initial:function(vWidget,vTheme){return{border:QxBorderObject.presets.thinOutset,backgroundColor:this.bgcolor,height:QxConst.CORE_AUTO };}});theme.registerAppearance("toolbar-part",{initial:function(vWidget,vTheme){return{width:QxConst.CORE_AUTO };}});theme.registerAppearance("toolbar-part-handle",{initial:function(vWidget,vTheme){return{width:10 };}});theme.registerAppearance("toolbar-part-handle-line",{initial:function(vWidget,vTheme){return{top:2,left:3,bottom:2,width:4,border:QxBorderObject.presets.thinOutset };}});theme.registerAppearance("toolbar-separator",{initial:function(vWidget,vTheme){return{width:8 };}});theme.registerAppearance("toolbar-separator-line",{setup:function(){var b=this.border=new QxBorderObject;b.setLeftColor("threedshadow");b.setRightColor("threedhighlight");b.setLeftStyle(QxConst.BORDER_STYLE_SOLID);b.setRightStyle(QxConst.BORDER_STYLE_SOLID);b.setLeftWidth(1);b.setRightWidth(1);b.setTopWidth(0);b.setBottomWidth(0);},initial:function(vWidget,vTheme){return{top:2,left:2,width:2,bottom:2,border:this.border };}});theme.registerAppearance("toolbar-button",{setup:function(){this.bgcolor_default=new QxColorObject("buttonface");this.bgcolor_left=new QxColor("#FFF0C9");this.border_pressed=QxBorderObject.presets.thinInset;this.border_over=QxBorderObject.presets.thinOutset;this.border_default=null;this.checked_background="core/dotted_white.gif";},initial:function(vWidget,vTheme){return{cursor:QxConst.CORE_DEFAULT,spacing:4,width:QxConst.CORE_AUTO,verticalChildrenAlign:QxConst.ALIGN_MIDDLE };},state:function(vWidget,vTheme,vStates){var vReturn= {backgroundColor:vStates.abandoned?this.bgcolor_left:this.bgcolor_default,backgroundImage:vStates.checked&&!vStates.over?this.checked_background:null };if(vStates.pressed||vStates.checked||vStates.abandoned){vReturn.border=this.border_pressed;}else if(vStates.over){vReturn.border=this.border_over;}else{vReturn.border=this.border_default;};if(vStates.pressed||vStates.checked||vStates.abandoned){vReturn.paddingTop=3;vReturn.paddingRight=2;vReturn.paddingBottom=1;vReturn.paddingLeft=4;}else if(vStates.over){vReturn.paddingTop=vReturn.paddingBottom=2;vReturn.paddingLeft=vReturn.paddingRight=3;}else {vReturn.paddingTop=vReturn.paddingBottom=3;vReturn.paddingLeft=vReturn.paddingRight=4;};return vReturn;}});theme.registerAppearance("bar-view",{setup:function(){this.background=new QxColorObject("#FAFBFE");},initial:function(vWidget,vTheme){return{backgroundColor:this.background,border:QxBorderObject.presets.shadow };}});theme.registerAppearance("bar-view-pane",{state:function(vWidget,vTheme,vStates){switch(vWidget.getParent().getBarPosition()){case QxConst.ALIGN_TOP:case QxConst.ALIGN_BOTTOM:return{width:null,height:QxConst.CORE_FLEX };case QxConst.ALIGN_LEFT:case QxConst.ALIGN_RIGHT:return{width:QxConst.CORE_FLEX,height:null };};}});theme.registerAppearance("bar-view-page",{initial:function(vWidget,vTheme){return{left:10,right:10,top:10,bottom:10 };}});theme.registerAppearance("bar-view-bar",{setup:function(){this.background_color=new QxColorObject("#E1EEFF");this.border_color=new QxColorObject("threedshadow");this.border_top=new QxBorderObject;this.border_top.setBottom(1,QxConst.BORDER_STYLE_SOLID,this.border_color);this.border_bottom=new QxBorderObject;this.border_bottom.setTop(1,QxConst.BORDER_STYLE_SOLID,this.border_color);this.border_left=new QxBorderObject;this.border_left.setRight(1,QxConst.BORDER_STYLE_SOLID,this.border_color);this.border_right=new QxBorderObject;this.border_right.setLeft(1,QxConst.BORDER_STYLE_SOLID,this.border_color);},initial:function(vWidget,vTheme){return{backgroundColor:this.background_color };},state:function(vWidget,vTheme,vState){switch(vWidget.getParent().getBarPosition()){case QxConst.ALIGN_TOP:return{paddingTop:1,paddingRight:0,paddingBottom:1,paddingLeft:0,border:this.border_top,height:QxConst.CORE_AUTO,width:null,orientation:QxConst.ORIENTATION_HORIZONTAL };case QxConst.ALIGN_BOTTOM:return{paddingTop:1,paddingRight:0,paddingBottom:1,paddingLeft:0,border:this.border_bottom,height:QxConst.CORE_AUTO,width:null,orientation:QxConst.ORIENTATION_HORIZONTAL };case QxConst.ALIGN_LEFT:return{paddingTop:0,paddingRight:1,paddingBottom:0,paddingLeft:1,border:this.border_left,height:null,width:QxConst.CORE_AUTO,orientation:QxConst.ORIENTATION_VERTICAL };case QxConst.ALIGN_RIGHT:return{paddingTop:0,paddingRight:1,paddingBottom:0,paddingLeft:1,border:this.border_right,height:null,width:QxConst.CORE_AUTO,orientation:QxConst.ORIENTATION_VERTICAL };};}});theme.registerAppearance("bar-view-button",{setup:function(){this.background_color_normal=null;this.background_color_checked=new QxColorObject("#FAFBFE");this.border_color=new QxColorObject("threedshadow");this.border_color_checked=new QxColorObject("#FEC83C");this.border_top_checked=new QxBorder(1,QxConst.BORDER_STYLE_SOLID,this.border_color);this.border_top_checked.setBottom(3,QxConst.BORDER_STYLE_SOLID,this.border_color_checked);this.border_bottom_checked=new QxBorder(1,QxConst.BORDER_STYLE_SOLID,this.border_color);this.border_bottom_checked.setTop(3,QxConst.BORDER_STYLE_SOLID,this.border_color_checked);this.border_left_checked=new QxBorder(1,QxConst.BORDER_STYLE_SOLID,this.border_color);this.border_left_checked.setRight(3,QxConst.BORDER_STYLE_SOLID,this.border_color_checked);this.border_right_checked=new QxBorder(1,QxConst.BORDER_STYLE_SOLID,this.border_color);this.border_right_checked.setLeft(3,QxConst.BORDER_STYLE_SOLID,this.border_color_checked);},initial:function(vWidget,vTheme){return QxUtil.mergeObjectWith(vTheme.initialFrom(vWidget,"atom"),{iconPosition:QxConst.ALIGN_TOP });},state:function(vWidget,vTheme,vStates){var vBarPosition=vWidget.getView().getBarPosition();var vReturn= {backgroundColor:vStates.checked?this.background_color_checked:this.background_color_normal,allowStretchX:true,allowStretchY:true };if(vStates.checked||vStates.over){switch(vBarPosition){case QxConst.ALIGN_TOP:vReturn.border=this.border_top_checked;vReturn.paddingTop=3;vReturn.paddingRight=6;vReturn.paddingBottom=1;vReturn.paddingLeft=6;break;case QxConst.ALIGN_BOTTOM:vReturn.border=this.border_bottom_checked;vReturn.paddingTop=1;vReturn.paddingRight=6;vReturn.paddingBottom=3;vReturn.paddingLeft=6;break;case QxConst.ALIGN_LEFT:vReturn.border=this.border_left_checked;vReturn.paddingTop=3;vReturn.paddingRight=4;vReturn.paddingBottom=3;vReturn.paddingLeft=6;break;case QxConst.ALIGN_RIGHT:vReturn.border=this.border_right_checked;vReturn.paddingTop=3;vReturn.paddingRight=6;vReturn.paddingBottom=3;vReturn.paddingLeft=4;};}else {vReturn.border=null;vReturn.paddingTop=vReturn.paddingBottom=4;vReturn.paddingRight=vReturn.paddingLeft=7;};switch(vBarPosition){case QxConst.ALIGN_TOP:case QxConst.ALIGN_BOTTOM:vReturn.marginTop=vReturn.marginBottom=0;vReturn.marginRight=vReturn.marginLeft=1;vReturn.width=QxConst.CORE_AUTO;vReturn.height=null;break;case QxConst.ALIGN_LEFT:case QxConst.ALIGN_RIGHT:vReturn.marginTop=vReturn.marginBottom=1;vReturn.marginRight=vReturn.marginLeft=0;vReturn.height=QxConst.CORE_AUTO;vReturn.width=null;};return vReturn;}});theme.registerAppearance("window",{setup:function(){this.bgcolor=new QxColorObject("threedface");this.color=new QxColorObject("windowtext");},initial:function(vWidget,vTheme){return{backgroundColor:this.bgcolor,color:this.color,paddingTop:1,paddingRight:1,paddingBottom:1,paddingLeft:1 };},state:function(vWidget,vTheme,vStates){return{border:vStates.maximized?QxBorderObject.presets.none:QxBorderObject.presets.outset };}});theme.registerAppearance("window-captionbar",{setup:function(){this.bgcolor_active=new QxColorObject("activecaption");this.color_active=new QxColorObject("captiontext");this.bgcolor_inactive=new QxColorObject("inactivecaption");this.color_inactive=new QxColorObject("inactivecaptiontext");},initial:function(vWidget,vTheme){return{paddingTop:1,paddingRight:2,paddingBottom:2,paddingLeft:2,verticalChildrenAlign:QxConst.ALIGN_MIDDLE,height:QxConst.CORE_AUTO };},state:function(vWidget,vTheme,vStates){return{backgroundColor:vStates.active?this.bgcolor_active:this.bgcolor_inactive,color:vStates.active?this.color_active:this.color_inactive };}});theme.registerAppearance("window-resize-frame",{initial:function(vWidget,vTheme){return{border:QxBorderObject.presets.shadow };}});theme.registerAppearance("window-captionbar-icon",{initial:function(vWidget,vTheme){return{marginRight:2 };}});theme.registerAppearance("window-captionbar-title",{setup:function(){this.font=new QxFont(11,'"Segoe UI",Corbel,Calibri,Tahoma,"Lucida Sans Unicode",sans-serif');this.font.setBold(true);},initial:function(vWidget,vTheme){return{cursor:QxConst.CORE_DEFAULT,font:this.font,marginRight:2 };}});theme.registerAppearance("window-captionbar-button",{initial:function(vWidget,vTheme){return vTheme.initialFrom(vWidget,"button");},state:function(vWidget,vTheme,vStates){var vReturn=vTheme.stateFrom(vWidget,"button");if(vStates.pressed||vStates.abandoned){vReturn.paddingTop=2;vReturn.paddingRight=1;vReturn.paddingBottom=0;vReturn.paddingLeft=3;}else {vReturn.paddingTop=vReturn.paddingBottom=1;vReturn.paddingRight=vReturn.paddingLeft=2;};return vReturn;}});theme.registerAppearance("window-captionbar-minimize-button",{initial:function(vWidget,vTheme){return vTheme.initialFrom(vWidget,"window-captionbar-button");},state:function(vWidget,vTheme){return vTheme.stateFrom(vWidget,"window-captionbar-button");}});theme.registerAppearance("window-captionbar-restore-button",{initial:function(vWidget,vTheme){return vTheme.initialFrom(vWidget,"window-captionbar-button");},state:function(vWidget,vTheme){return vTheme.stateFrom(vWidget,"window-captionbar-button");}});theme.registerAppearance("window-captionbar-maximize-button",{initial:function(vWidget,vTheme){return vTheme.initialFrom(vWidget,"window-captionbar-button");},state:function(vWidget,vTheme){return vTheme.stateFrom(vWidget,"window-captionbar-button");}});theme.registerAppearance("window-captionbar-close-button",{initial:function(vWidget,vTheme){return QxUtil.mergeObjectWith(vTheme.initialFrom(vWidget,"window-captionbar-button"),{marginLeft:2 });},state:function(vWidget,vTheme){return vTheme.stateFrom(vWidget,"window-captionbar-button");}});theme.registerAppearance("window-statusbar",{initial:function(vWidget,vTheme){return{border:QxBorderObject.presets.thinInset,height:QxConst.CORE_AUTO };}});theme.registerAppearance("window-statusbar-text",{initial:function(vWidget,vTheme){return{paddingTop:1,paddingRight:4,paddingBottom:1,paddingLeft:4,cursor:QxConst.CORE_DEFAULT };}});theme.registerAppearance("menu",{setup:function(){this.bgcolor=new QxColorObject("menu");},initial:function(vWidget,vTheme){return{width:QxConst.CORE_AUTO,height:QxConst.CORE_AUTO,backgroundColor:this.bgcolor,border:QxBorderObject.presets.outset,paddingTop:1,paddingRight:1,paddingBottom:1,paddingLeft:1 };}});theme.registerAppearance("menu-layout",{initial:function(vWidget,vTheme){return{top:0,right:0,bottom:0,left:0 };}});theme.registerAppearance("menu-button",{setup:function(){this.BGCOLOR_OVER=new QxColorObject("highlight");this.BGCOLOR_OUT=null;this.COLOR_OVER=new QxColorObject("highlighttext");this.COLOR_OUT=null;},initial:function(vWidget,vTheme){return{minWidth:QxConst.CORE_AUTO,height:QxConst.CORE_AUTO,spacing:2,paddingTop:2,paddingRight:4,paddingBottom:2,paddingLeft:4,cursor:QxConst.CORE_DEFAULT,verticalChildrenAlign:QxConst.ALIGN_MIDDLE,allowStretchX:true };},state:function(vWidget,vTheme,vStates){return{backgroundColor:vStates.over?this.BGCOLOR_OVER:this.BGCOLOR_OUT,color:vStates.over?this.COLOR_OVER:this.COLOR_OUT };}});theme.registerAppearance("menu-check-box",{initial:function(vWidget,vTheme){return vTheme.initialFrom(vWidget,"menu-button");},state:function(vWidget,vTheme,vStates){return vTheme.stateFrom(vWidget,"menu-button");}});theme.registerAppearance("menu-check-box-icon",{initial:function(vWidget,vTheme){return vTheme.initialFrom(vWidget,"image");},state:function(vWidget,vTheme,vStates){return{source : vStates.checked ? "widgets/menu/checkbox.gif" : QxConst.IMAGE_BLANK };}});theme.registerAppearance("menu-radio-button",{initial:function(vWidget,vTheme){return vTheme.initialFrom(vWidget,"menu-button");},state:function(vWidget,vTheme,vStates){return vTheme.stateFrom(vWidget,"menu-button");}});theme.registerAppearance("menu-radio-button-icon",{initial:function(vWidget,vTheme){return vTheme.initialFrom(vWidget,"image");},state:function(vWidget,vTheme,vStates){return{source : vStates.checked ? "widgets/menu/radiobutton.gif" : QxConst.IMAGE_BLANK };}});theme.registerAppearance("menu-separator",{initial:function(vWidget,vTheme){return{height:QxConst.CORE_AUTO,marginTop:3,marginBottom:2,paddingLeft:3,paddingRight:3 };}});theme.registerAppearance("menu-separator-line",{initial:function(vWidget,vTheme){return{right:0,left:0,height:QxConst.CORE_AUTO,border:QxBorderObject.presets.verticalDivider };}});theme.registerAppearance("list",{setup:function(){this.bgcolor=new QxColor("white");},initial:function(vWidget,vTheme){return{overflow:QxConst.OVERFLOW_VALUE_HIDDEN,border:QxBorderObject.presets.thinInset,backgroundColor:this.bgcolor };}});theme.registerAppearance("list-item",{setup:function(){this.bgcolor_selected=new QxColorObject("highlight");this.color_selected=new QxColorObject("highlighttext");},initial:function(vWidget,vTheme){return{cursor:QxConst.CORE_DEFAULT,height:QxConst.CORE_AUTO,horizontalChildrenAlign:QxConst.ALIGN_LEFT,verticalChildrenAlign:QxConst.ALIGN_MIDDLE,spacing:4,paddingTop:3,paddingRight:5,paddingBottom:3,paddingLeft:5,minWidth:QxConst.CORE_AUTO };},state:function(vWidget,vTheme,vStates){if(vStates.lead){vWidget.setStyleProperty("MozOutline",QxConst.FOCUS_OUTLINE);vWidget.setStyleProperty("outline",QxConst.FOCUS_OUTLINE);}else {vWidget.removeStyleProperty("MozOutline");vWidget.removeStyleProperty("outline");};return{backgroundColor:vStates.selected?this.bgcolor_selected:null,color:vStates.selected?this.color_selected:null };}});theme.registerAppearance("text-field",{setup:function(){this.font=new QxFont(11,'"Segoe UI",Corbel,Calibri,Tahoma,"Lucida Sans Unicode",sans-serif');},initial:function(vWidget,vTheme){return{hideFocus:true,border:QxBorderObject.presets.thinInset,paddingTop:1,paddingRight:3,paddingBottom:1,paddingLeft:3,allowStretchY:false,allowStretchX:true,font:this.font,width:QxConst.CORE_AUTO,height:QxConst.CORE_AUTO };},state:function(vWidget,vTheme){return vTheme.stateFrom(vWidget,"label");}});theme.registerAppearance("text-area",{initial:function(vWidget,vTheme){return QxUtil.mergeObjectWith(vTheme.initialFrom(vWidget,"text-field"),{overflow:QxConst.CORE_AUTO });},state:function(vWidget,vTheme){return vTheme.stateFrom(vWidget,"text-field");}});theme.registerAppearance("combo-box",{setup:function(){this.bgcolor=new QxColor("white");},initial:function(vWidget,vTheme){return{minWidth:40,width:120,height:QxConst.CORE_AUTO,border:QxBorderObject.presets.inset,backgroundColor:this.bgcolor,allowStretchY:false };}});theme.registerAppearance("combo-box-list",{initial:function(vWidget,vTheme){return QxUtil.mergeObjectWith(vTheme.initialFrom(vWidget,"list"),{top:0,right:0,bottom:0,left:0,border:null,overflow:QxConst.OVERFLOW_VALUE_VERTICAL });}});theme.registerAppearance("combo-box-popup",{initial:function(vWidget,vTheme){return QxUtil.mergeObjectWith(vTheme.initialFrom(vWidget,"list"),{height:QxConst.CORE_AUTO,maxHeight:150,border:QxBorderObject.presets.shadow });}});theme.registerAppearance("combo-box-text-field",{setup:function(){this.bgcolor=new QxColor("transparent");},initial:function(vWidget,vTheme){return QxUtil.mergeObjectWith(vTheme.initialFrom(vWidget,"text-field"),{border:QxBorder.presets.none,width:QxConst.CORE_FLEX,backgroundColor:this.bgcolor });}});theme.registerAppearance("combo-box-button",{initial:function(vWidget,vTheme){return QxUtil.mergeObjectWith(vTheme.initialFrom(vWidget,"button"),{height:null,allowStretchY:true });},state:function(vWidget,vTheme){return QxUtil.mergeObjectWith(vTheme.stateFrom(vWidget,"button"),{paddingTop:0,paddingRight:3,paddingBottom:0,paddingLeft:2 });}});theme.registerAppearance("tree-element",{initial:function(vWidget,vTheme){return{height:16,verticalChildrenAlign:QxConst.ALIGN_MIDDLE };}});theme.registerAppearance("tree-element-icon",{initial:function(vWidget,vTheme){return{width:16,height:16 };},state:function(vWidget,vTheme,vStates){var vParent=vWidget.getParent();while(vParent&&!(vParent instanceof QxTreeElement)){vParent=vParent.getParent();};if(vParent.getIcon()){return{source:vStates.selected?vParent.getIconSelected()||vParent.getIcon():vParent.getIcon()};}else {return{source : "icons/16/file-new.png" };};}});theme.registerAppearance("tree-element-label",{setup:function(){this.bgcolor_selected=new QxColorObject("highlight");this.color_selected=new QxColorObject("highlighttext");},initial:function(vWidget,vTheme){return QxUtil.mergeObjectWith(vTheme.initialFrom(vWidget,"label"),{cursor:QxConst.CORE_DEFAULT,marginLeft:3,height:15,paddingTop:2,paddingRight:2,paddingBottom:2,paddingLeft:2,allowStretchY:false });},state:function(vWidget,vTheme,vStates){return QxUtil.mergeObjectWith(vTheme.stateFrom(vWidget,"label"),{backgroundColor:vStates.selected?this.bgcolor_selected:null,color:vStates.selected?this.color_selected:null });}});theme.registerAppearance("tree-folder",{initial:function(vWidget,vTheme){return vTheme.initialFrom(vWidget,"tree-element");},state:function(vWidget,vTheme,vStates){return vTheme.stateFrom(vWidget,"tree-element");}});theme.registerAppearance("tree-folder-icon",{initial:function(vWidget,vTheme){return{width:16,height:16 };},state:function(vWidget,vTheme,vStates){var vParent=vWidget.getParent();while(vParent&&!(vParent instanceof QxTreeElement)){vParent=vParent.getParent();};if(vParent.getIcon()){return{source:vStates.selected?vParent.getIconSelected()||vParent.getIcon():vParent.getIcon()};}else {return{source : vStates.selected ? "icons/16/folder-open.png" : "icons/16/folder.png" };};}});theme.registerAppearance("tree-folder-label",{initial:function(vWidget,vTheme){return vTheme.initialFrom(vWidget,"tree-element-label");},state:function(vWidget,vTheme,vStates){return vTheme.stateFrom(vWidget,"tree-element-label");}});theme.registerAppearance("tree",{initial:function(vWidget,vTheme){return vTheme.initialFrom(vWidget,"tree-folder");},state:function(vWidget,vTheme,vStates){return vTheme.stateFrom(vWidget,"tree-folder");}});theme.registerAppearance("tree-icon",{initial:function(vWidget,vTheme){return vTheme.initialFrom(vWidget,"tree-folder-icon");},state:function(vWidget,vTheme,vStates){return vTheme.stateFrom(vWidget,"tree-folder-icon");}});theme.registerAppearance("tree-label",{initial:function(vWidget,vTheme){return vTheme.initialFrom(vWidget,"tree-folder-label");},state:function(vWidget,vTheme,vStates){return vTheme.stateFrom(vWidget,"tree-folder-label");}});theme.registerAppearance("tree-container",{initial:function(vWidget,vTheme){return{verticalChildrenAlign:QxConst.ALIGN_TOP };}});theme.registerAppearance("tree-folder-container",{initial:function(vWidget,vTheme){return{height:QxConst.CORE_AUTO,verticalChildrenAlign:QxConst.ALIGN_TOP };}});theme.registerAppearance("list-view",{initial:function(vWidget,vTheme){return{cursor:QxConst.CORE_DEFAULT,overflow:QxConst.OVERFLOW_VALUE_HIDDEN };}});theme.registerAppearance("list-view-pane",{initial:function(vWidget,vTheme){return{width:QxConst.CORE_FLEX,horizontalSpacing:1,overflow:QxConst.OVERFLOW_VALUE_HIDDEN };}});theme.registerAppearance("list-view-header",{setup:function(){this.border=new QxBorder;this.border.setBottom(1,"solid","#e2e2e2");this.bgcolor=new QxColor("#f2f2f2");},initial:function(vWidget,vTheme){return{height:QxConst.CORE_AUTO,overflow:QxConst.OVERFLOW_VALUE_HIDDEN,border:this.border,backgroundColor:this.bgcolor };}});theme.registerAppearance("list-view-header-cell",{setup:function(){this.border_hover=new QxBorder,this.border_hover.setBottom(2,"solid","#F9B119");this.bgcolor_hover=new QxColor("white");},initial:function(vWidget,vTheme){vWidget.setStyleProperty(QxConst.PROPERTY_OVERFLOW_TEXT,QxConst.OVERFLOW_VALUE_ELLIPSIS);return{overflow:QxConst.OVERFLOW_VALUE_HIDDEN,paddingTop:2,paddingRight:6,paddingBottom:2,paddingLeft:6,spacing:4 };},state:function(vWidget,vTheme,vStates){if(vStates.over){return{backgroundColor:this.bgcolor_hover,paddingBottom:0,border:this.border_hover };}else {return{backgroundColor:null,paddingBottom:2,border:null };};}});theme.registerAppearance("list-view-header-separator",{setup:function(){this.bgcolor=new QxColor("#D6D5D9");},initial:function(vWidget,vTheme){return{backgroundColor:this.bgcolor,width:1,marginTop:1,marginBottom:1 };}});theme.registerAppearance("list-view-content-cell",{setup:function(){this.bgcolor_selected=new QxColorObject("highlight");this.color_selected=new QxColorObject("highlighttext");},state:function(vWidget,vTheme,vStates){return{backgroundColor:vStates.selected?this.bgcolor_selected:null,color:vStates.selected?this.color_selected:null };}});theme.registerAppearance("list-view-content-cell-image",{initial:function(vWidget,vTheme){return{paddingLeft:6,paddingRight:6 };},state:function(vWidget,vTheme,vStates){return vTheme.stateFrom(vWidget,"list-view-content-cell");}});theme.registerAppearance("list-view-content-cell-text",{initial:function(vWidget,vTheme){vWidget.setStyleProperty(QxConst.PROPERTY_WHITESPACE,"nowrap");vWidget.setStyleProperty(QxConst.PROPERTY_OVERFLOW_TEXT,QxConst.OVERFLOW_VALUE_ELLIPSIS);return QxUtil.mergeObjectWith(vTheme.initialFrom(vWidget,"htmlcontainer"),{overflow:QxConst.OVERFLOW_VALUE_HIDDEN,paddingLeft:6,paddingRight:6 });},state:function(vWidget,vTheme,vStates){return QxUtil.mergeObjectWith(vTheme.stateFrom(vWidget,"htmlcontainer"),vTheme.stateFrom(vWidget,"list-view-content-cell"));}});theme.registerAppearance("list-view-content-cell-html",{initial:function(vWidget,vTheme){return vTheme.initialFrom(vWidget,"list-view-content-cell-text");},state:function(vWidget,vTheme,vStates){return vTheme.stateFrom(vWidget,"list-view-content-cell-text");}});theme.registerAppearance("list-view-content-cell-icon-html",{initial:function(vWidget,vTheme){return vTheme.initialFrom(vWidget,"list-view-content-cell-text");},state:function(vWidget,vTheme,vStates){return vTheme.stateFrom(vWidget,"list-view-content-cell-text");}});theme.registerAppearance("list-view-content-cell-link",{initial:function(vWidget,vTheme){return vTheme.initialFrom(vWidget,"list-view-content-cell-text");},state:function(vWidget,vTheme,vStates){return vTheme.stateFrom(vWidget,"list-view-content-cell-text");}});theme.registerAppearance("tab-view",{initial:function(vWidget,vTheme){return{spacing:-1 };}});theme.registerAppearance("tab-view-bar",{initial:function(vWidget,vTheme){return{height:QxConst.CORE_AUTO };}});theme.registerAppearance("tab-view-pane",{setup:function(){this.border=new QxBorder(1,QxConst.BORDER_STYLE_SOLID,"#91A5BD");this.bgcolor=new QxColorObject("#FAFBFE");},initial:function(vWidget,vTheme){return{height:QxConst.CORE_FLEX,backgroundColor:this.bgcolor,border:this.border,paddingTop:10,paddingRight:10,paddingBottom:10,paddingLeft:10 };}});theme.registerAppearance("tab-view-page",{initial:function(vWidget,vTheme){return{top:0,right:0,bottom:0,left:0 };}});theme.registerAppearance("tab-view-button",{setup:function(){this.bgcolor_normal=new QxColorObject("#E1EEFF");this.bgcolor_checked=new QxColorObject("#FAFBFE");this.border_top_normal=new QxBorder(1,QxConst.BORDER_STYLE_SOLID,"#91A5BD");this.border_top_normal.setBottomWidth(0);this.border_top_checked=new QxBorder(1,QxConst.BORDER_STYLE_SOLID,"#91A5BD");this.border_top_checked.setBottomWidth(0);this.border_top_checked.setTop(3,QxConst.BORDER_STYLE_SOLID,"#FEC83C");this.border_bottom_normal=new QxBorder(1,QxConst.BORDER_STYLE_SOLID,"#91A5BD");this.border_bottom_normal.setTopWidth(0);this.border_bottom_checked=new QxBorder(1,QxConst.BORDER_STYLE_SOLID,"#91A5BD");this.border_bottom_checked.setTopWidth(0);this.border_bottom_checked.setBottom(3,QxConst.BORDER_STYLE_SOLID,"#FEC83C");},initial:function(vWidget,vTheme){return vTheme.initialFrom(vWidget,"atom");},state:function(vWidget,vTheme,vStates){var vFrame=vWidget.getView();var vAlignLeft=vFrame.getAlignTabsToLeft();var vBarTop=vFrame.getPlaceBarOnTop();var vReturn;if(vStates.checked){vReturn= {backgroundColor:this.bgcolor_checked,zIndex:1,paddingTop:2,paddingBottom:4,paddingLeft:7,paddingRight:8,border:vBarTop?this.border_top_checked:this.border_bottom_checked,marginTop:0,marginBottom:0,marginRight:-1,marginLeft:-2 };if(vAlignLeft){if(vWidget.getParent().getFirstVisibleChild()==vWidget){vReturn.paddingLeft=6;vReturn.paddingRight=7;vReturn.marginLeft=0;}}else {if(vWidget.getParent().getLastVisibleChild()==vWidget){vReturn.paddingLeft=8;vReturn.paddingRight=5;vReturn.marginRight=0;}};}else {vReturn= {backgroundColor:vStates.over?this.bgcolor_checked:this.bgcolor_normal,zIndex:0,paddingTop:2,paddingBottom:2,paddingLeft:5,paddingRight:6,marginRight:1,marginLeft:0 };if(vAlignLeft){if(vWidget.getParent().getFirstVisibleChild()==vWidget){vReturn.paddingLeft=6;vReturn.paddingRight=5;}}else {if(vWidget.getParent().getLastVisibleChild()==vWidget){vReturn.paddingLeft=6;vReturn.paddingRight=5;vReturn.marginRight=0;}};if(vBarTop){vReturn.border=this.border_top_normal;vReturn.marginTop=3;vReturn.marginBottom=1;}else {vReturn.border=this.border_bottom_normal;vReturn.marginTop=1;vReturn.marginBottom=3;};};return vReturn;}});theme.registerAppearance("field-set",{setup:function(){this.bgcolor=new QxColorObject("threedface");},initial:function(vWidget,vTheme){return{backgroundColor:this.bgcolor };}});theme.registerAppearance("field-set-legend",{setup:function(){this.bgcolor=new QxColorObject("threedface");},initial:function(vWidget,vTheme){return QxUtil.mergeObjectWith(vTheme.initialFrom(vWidget,"atom"),{top:1,left:10,backgroundColor:this.bgcolor,paddingRight:3,paddingLeft:4 });}});theme.registerAppearance("field-set-frame",{initial:function(vWidget,vTheme){return{top:8,left:2,right:2,bottom:2,paddingTop:12,paddingRight:9,paddingBottom:12,paddingLeft:9,border:QxBorderObject.presets.groove };}});theme.registerAppearance("check-box-field-set-legend",{setup:function(){this.bgcolor=new QxColorObject("threedface");},initial:function(vWidget,vTheme){return QxUtil.mergeObjectWith(vTheme.initialFrom(vWidget,"atom"),{top:1,left:10,backgroundColor:this.bgcolor,paddingRight:3 });}});theme.registerAppearance("radio-button-field-set-legend",{initial:function(vWidget,vTheme){return vTheme.initialFrom(vWidget,"check-box-field-set-legend");}});theme.registerAppearance("spinner",{setup:function(){this.bgcolor=new QxColor("white");},initial:function(vWidget,vTheme){return{width:60,height:22,border:QxBorderObject.presets.inset,backgroundColor:this.bgcolor };}});theme.registerAppearance("spinner-field",{initial:function(vWidget,vTheme){return QxUtil.mergeObjectWith(vTheme.initialFrom(vWidget,"text-field"),{width:QxConst.CORE_FLEX,border:QxBorder.presets.none });},state:function(vWidget,vTheme,vStates){return vTheme.stateFrom(vWidget,"text-field");}});theme.registerAppearance("spinner-button-up",{initial:function(vWidget,vTheme){return QxUtil.mergeObjectWith(vTheme.initialFrom(vWidget,"image"),{height:QxConst.CORE_FLEX,width:16,backgroundColor:new QxColorObject("threedface")});},state:function(vWidget,vTheme,vStates){return QxUtil.mergeObjectWith(vTheme.stateFrom(vWidget,"button"),{paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:3 });}});theme.registerAppearance("spinner-button-down",{initial:function(vWidget,vTheme){return QxUtil.mergeObjectWith(vTheme.initialFrom(vWidget,"image"),{height:QxConst.CORE_FLEX,width:16,backgroundColor:new QxColorObject("threedface")});},state:function(vWidget,vTheme,vStates){return QxUtil.mergeObjectWith(vTheme.stateFrom(vWidget,"button"),{paddingTop:1,paddingRight:0,paddingBottom:0,paddingLeft:3 });}});function QxLayoutImpl(vWidget){QxObject.call(this);this._widget=vWidget;};QxLayoutImpl.extend(QxObject,"QxLayoutImpl");proto.getWidget=function(){return this._widget;};proto.computeChildBoxWidth=function(vChild){return vChild.getWidthValue()||vChild._computeBoxWidthFallback();};proto.computeChildBoxHeight=function(vChild){return vChild.getHeightValue()||vChild._computeBoxHeightFallback();};proto.computeChildNeededWidth=function(vChild){var vMinBox=vChild._computedMinWidthTypePercent?null:vChild.getMinWidthValue();var vMaxBox=vChild._computedMaxWidthTypePercent?null:vChild.getMaxWidthValue();var vBox=(vChild._computedWidthTypePercent||vChild._computedWidthTypeFlex?null:vChild.getWidthValue())||vChild.getPreferredBoxWidth()||0;return vBox.limit(vMinBox,vMaxBox)+vChild.getMarginLeft()+vChild.getMarginRight();};proto.computeChildNeededHeight=function(vChild){var vMinBox=vChild._computedMinHeightTypePercent?null:vChild.getMinHeightValue();var vMaxBox=vChild._computedMaxHeightTypePercent?null:vChild.getMaxHeightValue();var vBox=(vChild._computedHeightTypePercent||vChild._computedHeightTypeFlex?null:vChild.getHeightValue())||vChild.getPreferredBoxHeight()||0;return vBox.limit(vMinBox,vMaxBox)+vChild.getMarginTop()+vChild.getMarginBottom();};proto.computeChildrenNeededWidth_max=function(){for(var i=0,ch=this.getWidget().getVisibleChildren(),chl=ch.length,maxv=0;i<chl;i++){maxv=Math.max(maxv,ch[i].getNeededWidth());};return maxv;};proto.computeChildrenNeededHeight_max=function(){for(var i=0,ch=this.getWidget().getVisibleChildren(),chl=ch.length,maxv=0;i<chl;i++){maxv=Math.max(maxv,ch[i].getNeededHeight());};return maxv;};proto.computeChildrenNeededWidth_sum=function(){for(var i=0,ch=this.getWidget().getVisibleChildren(),chl=ch.length,sumv=0;i<chl;i++){sumv+=ch[i].getNeededWidth();};return sumv;};proto.computeChildrenNeededHeight_sum=function(){for(var i=0,ch=this.getWidget().getVisibleChildren(),chl=ch.length,sumv=0;i<chl;i++){sumv+=ch[i].getNeededHeight();};return sumv;};proto.computeChildrenNeededWidth=proto.computeChildrenNeededWidth_max;proto.computeChildrenNeededHeight=proto.computeChildrenNeededHeight_max;proto.updateSelfOnChildOuterWidthChange=function(vChild){};proto.updateSelfOnChildOuterHeightChange=function(vChild){};proto.updateChildOnInnerWidthChange=function(vChild){};proto.updateChildOnInnerHeightChange=function(vChild){};proto.updateSelfOnJobQueueFlush=function(vJobQueue){};proto.updateChildrenOnJobQueueFlush=function(vQueue){};proto.updateChildrenOnAddChild=function(vChild,vIndex){};proto.updateChildrenOnRemoveChild=function(vChild,vIndex){};proto.updateChildrenOnMoveChild=function(vChild,vIndex,vOldIndex){};proto.flushChildrenQueue=function(vChildrenQueue){var vWidget=this.getWidget();for(var vHashCode in vChildrenQueue){vWidget._layoutChild(vChildrenQueue[vHashCode]);};};proto.layoutChild=function(vChild,vJobs){};if(QxClient.isMshtml()){proto.layoutChild_sizeLimitX=QxUtil.returnTrue;proto.layoutChild_sizeLimitY=QxUtil.returnTrue;}else {proto.layoutChild_sizeLimitX=function(vChild,vJobs){if(vJobs.minWidth){vChild._computedMinWidthTypeNull?vChild._resetRuntimeMinWidth():vChild._applyRuntimeMinWidth(vChild.getMinWidthValue());}else if(vJobs.initial&&!vChild._computedMinWidthTypeNull){vChild._applyRuntimeMinWidth(vChild.getMinWidthValue());};if(vJobs.maxWidth){vChild._computedMaxWidthTypeNull?vChild._resetRuntimeMaxWidth():vChild._applyRuntimeMaxWidth(vChild.getMaxWidthValue());}else if(vJobs.initial&&!vChild._computedMaxWidthTypeNull){vChild._applyRuntimeMaxWidth(vChild.getMaxWidthValue());};};proto.layoutChild_sizeLimitY=function(vChild,vJobs){if(vJobs.minHeight){vChild._computedMinHeightTypeNull?vChild._resetRuntimeMinHeight():vChild._applyRuntimeMinHeight(vChild.getMinHeightValue());}else if(vJobs.initial&&!vChild._computedMinHeightTypeNull){vChild._applyRuntimeMinHeight(vChild.getMinHeightValue());};if(vJobs.maxHeight){vChild._computedMaxHeightTypeNull?vChild._resetRuntimeMaxHeight():vChild._applyRuntimeMaxHeight(vChild.getMaxHeightValue());}else if(vJobs.initial&&!vChild._computedMaxHeightTypeNull){vChild._applyRuntimeMaxHeight(vChild.getMaxHeightValue());};};};proto.layoutChild_marginX=function(vChild,vJobs){if(vJobs.marginLeft||vJobs.initial){var vValueLeft=vChild.getMarginLeft();vValueLeft!=null?vChild._applyRuntimeMarginLeft(vValueLeft):vChild._resetRuntimeMarginLeft();};if(vJobs.marginRight||vJobs.initial){var vValueRight=vChild.getMarginRight();vValueRight!=null?vChild._applyRuntimeMarginRight(vValueRight):vChild._resetRuntimeMarginRight();};};proto.layoutChild_marginY=function(vChild,vJobs){if(vJobs.marginTop||vJobs.initial){var vValueTop=vChild.getMarginTop();vValueTop!=null?vChild._applyRuntimeMarginTop(vValueTop):vChild._resetRuntimeMarginTop();};if(vJobs.marginBottom||vJobs.initial){var vValueBottom=vChild.getMarginBottom();vValueBottom!=null?vChild._applyRuntimeMarginBottom(vValueBottom):vChild._resetRuntimeMarginBottom();};};proto.layoutChild_sizeX_essentialWrapper=function(vChild,vJobs){return vChild._isWidthEssential()?this.layoutChild_sizeX(vChild,vJobs):vChild._resetRuntimeWidth();};proto.layoutChild_sizeY_essentialWrapper=function(vChild,vJobs){return vChild._isHeightEssential()?this.layoutChild_sizeY(vChild,vJobs):vChild._resetRuntimeHeight();};proto.dispose=function(){if(this.getDisposed()){return true;};this._widget=null;QxObject.prototype.dispose.call(this);};function QxCanvasLayoutImpl(vWidget){QxLayoutImpl.call(this,vWidget);};QxCanvasLayoutImpl.extend(QxLayoutImpl,"QxCanvasLayoutImpl");proto.computeChildBoxWidth=function(vChild){var vValue=null;if(vChild._computedLeftTypeNull||vChild._computedRightTypeNull){vValue=vChild.getWidthValue();}else if(vChild._hasParent){vValue=this.getWidget().getInnerWidth()-vChild.getLeftValue()-vChild.getRightValue();};return vValue||vChild._computeBoxWidthFallback();};proto.computeChildBoxHeight=function(vChild){var vValue=null;if(vChild._computedTopTypeNull||vChild._computedBottomTypeNull){vValue=vChild.getHeightValue();}else if(vChild._hasParent){vValue=this.getWidget().getInnerHeight()-vChild.getTopValue()-vChild.getBottomValue();};return vValue||vChild._computeBoxHeightFallback();};proto.computeChildNeededWidth=function(vChild){var vLeft=vChild._computedLeftTypePercent?null:vChild.getLeftValue();var vRight=vChild._computedRightTypePercent?null:vChild.getRightValue();var vMinBox=vChild._computedMinWidthTypePercent?null:vChild.getMinWidthValue();var vMaxBox=vChild._computedMaxWidthTypePercent?null:vChild.getMaxWidthValue();if(vLeft!=null&&vRight!=null){var vBox=vChild.getPreferredBoxWidth()||0;}else {var vBox=(vChild._computedWidthTypePercent?null:vChild.getWidthValue())||vChild.getPreferredBoxWidth()||0;};return vBox.limit(vMinBox,vMaxBox)+vLeft+vRight+vChild.getMarginLeft()+vChild.getMarginRight();};proto.computeChildNeededHeight=function(vChild){var vTop=vChild._computedTopTypePercent?null:vChild.getTopValue();var vBottom=vChild._computedBottomTypePercent?null:vChild.getBottomValue();var vMinBox=vChild._computedMinHeightTypePercent?null:vChild.getMinHeightValue();var vMaxBox=vChild._computedMaxHeightTypePercent?null:vChild.getMaxHeightValue();if(vTop!=null&&vBottom!=null){var vBox=vChild.getPreferredBoxHeight()||0;}else {var vBox=(vChild._computedHeightTypePercent?null:vChild.getHeightValue())||vChild.getPreferredBoxHeight()||0;};return vBox.limit(vMinBox,vMaxBox)+vTop+vBottom+vChild.getMarginTop()+vChild.getMarginBottom();};proto.updateChildOnInnerWidthChange=function(vChild){var vUpdatePercent=vChild._recomputePercentX();var vUpdateRange=vChild._recomputeRangeX();return vUpdatePercent||vUpdateRange;};proto.updateChildOnInnerHeightChange=function(vChild){var vUpdatePercent=vChild._recomputePercentY();var vUpdateRange=vChild._recomputeRangeY();return vUpdatePercent||vUpdateRange;};proto.layoutChild=function(vChild,vJobs){this.layoutChild_sizeX_essentialWrapper(vChild,vJobs);this.layoutChild_sizeY_essentialWrapper(vChild,vJobs);this.layoutChild_sizeLimitX(vChild,vJobs);this.layoutChild_sizeLimitY(vChild,vJobs);this.layoutChild_locationX(vChild,vJobs);this.layoutChild_locationY(vChild,vJobs);this.layoutChild_marginX(vChild,vJobs);this.layoutChild_marginY(vChild,vJobs);};if(QxClient.isMshtml()||QxClient.isOpera()){proto.layoutChild_sizeX=function(vChild,vJobs){if(vJobs.initial||vJobs.width||vJobs.minWidth||vJobs.maxWidth||vJobs.left||vJobs.right){if(vChild._computedMinWidthTypeNull&&vChild._computedWidthTypeNull&&vChild._computedMaxWidthTypeNull&&!(!vChild._computedLeftTypeNull&&!vChild._computedRightTypeNull)){vChild._resetRuntimeWidth();}else {vChild._applyRuntimeWidth(vChild.getBoxWidth());};};};proto.layoutChild_sizeY=function(vChild,vJobs){if(vJobs.initial||vJobs.height||vJobs.minHeight||vJobs.maxHeight||vJobs.top||vJobs.bottom){if(vChild._computedMinHeightTypeNull&&vChild._computedHeightTypeNull&&vChild._computedMaxHeightTypeNull&&!(!vChild._computedTopTypeNull&&!vChild._computedBottomTypeNull)){vChild._resetRuntimeHeight();}else {vChild._applyRuntimeHeight(vChild.getBoxHeight());};};};}else {proto.layoutChild_sizeX=function(vChild,vJobs){if(vJobs.initial||vJobs.width){vChild._computedWidthTypeNull?vChild._resetRuntimeWidth():vChild._applyRuntimeWidth(vChild.getWidthValue());};};proto.layoutChild_sizeY=function(vChild,vJobs){if(vJobs.initial||vJobs.height){vChild._computedHeightTypeNull?vChild._resetRuntimeHeight():vChild._applyRuntimeHeight(vChild.getHeightValue());};};};proto.layoutChild_locationX=function(vChild,vJobs){var vWidget=this.getWidget();if(vJobs.initial||vJobs.left||vJobs.parentPaddingLeft){vChild._computedLeftTypeNull?vChild._computedRightTypeNull&&vWidget.getPaddingLeft()>0?vChild._applyRuntimeLeft(vWidget.getPaddingLeft()):vChild._resetRuntimeLeft():vChild._applyRuntimeLeft(vChild.getLeftValue()+vWidget.getPaddingLeft());};if(vJobs.initial||vJobs.right||vJobs.parentPaddingRight){vChild._computedRightTypeNull?vChild._computedLeftTypeNull&&vWidget.getPaddingRight()>0?vChild._applyRuntimeRight(vWidget.getPaddingRight()):vChild._resetRuntimeRight():vChild._applyRuntimeRight(vChild.getRightValue()+vWidget.getPaddingRight());};};proto.layoutChild_locationY=function(vChild,vJobs){var vWidget=this.getWidget();if(vJobs.initial||vJobs.top||vJobs.parentPaddingTop){vChild._computedTopTypeNull?vChild._computedBottomTypeNull&&vWidget.getPaddingTop()>0?vChild._applyRuntimeTop(vWidget.getPaddingTop()):vChild._resetRuntimeTop():vChild._applyRuntimeTop(vChild.getTopValue()+vWidget.getPaddingTop());};if(vJobs.initial||vJobs.bottom||vJobs.parentPaddingBottom){vChild._computedBottomTypeNull?vChild._computedTopTypeNull&&vWidget.getPaddingBottom()>0?vChild._applyRuntimeBottom(vWidget.getPaddingBottom()):vChild._resetRuntimeBottom():vChild._applyRuntimeBottom(vChild.getBottomValue()+vWidget.getPaddingBottom());};};function QxHorizontalBoxLayoutImpl(vWidget){QxLayoutImpl.call(this,vWidget);};QxHorizontalBoxLayoutImpl.extend(QxLayoutImpl,"QxHorizontalBoxLayoutImpl");QxHorizontalBoxLayoutImpl.addProperty({name:"enableFlexSupport",type:QxConst.TYPEOF_BOOLEAN,defaultValue:true});proto.computeChildBoxWidth=function(vChild){return vChild.getWidthValue()||vChild._computeBoxWidthFallback();};proto.computeChildBoxHeight=function(vChild){if(this.getWidget().getStretchChildrenOrthogonalAxis()&&vChild._computedHeightTypeNull&&vChild.getAllowStretchY()){return this.getWidget().getInnerHeight();};return vChild.getHeightValue()||vChild._computeBoxHeightFallback();};proto.computeChildrenFlexWidth=function(){if(this._childrenFlexWidthComputed||!this.getEnableFlexSupport()){return;};this._childrenFlexWidthComputed=true;var vWidget=this.getWidget();var vChildren=vWidget.getVisibleChildren();var vChildrenLength=vChildren.length;var vCurrentChild;var vFlexibleChildren=[];var vAvailWidth=vWidget.getInnerWidth();var vUsedWidth=vWidget.getSpacing()*(vChildrenLength-1);var vIterator;for(vIterator=0;vIterator<vChildrenLength;vIterator++){vCurrentChild=vChildren[vIterator];if(vCurrentChild._computedWidthTypeFlex){vFlexibleChildren.push(vCurrentChild);if(vWidget._computedWidthTypeAuto){vUsedWidth+=vCurrentChild.getPreferredBoxWidth();};}else {vUsedWidth+=vCurrentChild.getOuterWidth();};};var vRemainingWidth=vAvailWidth-vUsedWidth;var vFlexibleChildrenLength=vFlexibleChildren.length;var vPrioritySum=0;for(vIterator=0;vIterator<vFlexibleChildrenLength;vIterator++){vPrioritySum+=vFlexibleChildren[vIterator]._computedWidthParsed;};var vPartWidth=vRemainingWidth/vPrioritySum;if(!vWidget.getUseAdvancedFlexAllocation()){for(vIterator=0;vIterator<vFlexibleChildrenLength;vIterator++){vCurrentChild=vFlexibleChildren[vIterator];vCurrentChild._computedWidthFlexValue=Math.round(vCurrentChild._computedWidthParsed*vPartWidth);vUsedWidth+=vCurrentChild._computedWidthFlexValue;};}else {var vAllocationDiff=0;var vMinAllocationLoops,vFlexibleChildrenLength,vAdjust,vCurrentAllocationSum,vFactorSum,vComputedFlexibleWidth;for(vIterator=0;vIterator<vFlexibleChildrenLength;vIterator++){vCurrentChild=vFlexibleChildren[vIterator];vComputedFlexibleWidth=vCurrentChild._computedWidthFlexValue=vCurrentChild._computedWidthParsed*vPartWidth;vAllocationDiff+=vComputedFlexibleWidth-vComputedFlexibleWidth.limit(vCurrentChild.getMinWidthValue(),vCurrentChild.getMaxWidthValue());};vAllocationDiff=Math.round(vAllocationDiff);if(vAllocationDiff==0){for(vIterator=0;vIterator<vFlexibleChildrenLength;vIterator++){vCurrentChild=vFlexibleChildren[vIterator];vCurrentChild._computedWidthFlexValue=Math.round(vCurrentChild._computedWidthFlexValue);vUsedWidth+=vCurrentChild._computedWidthFlexValue;};}else {var vUp=vAllocationDiff>0;for(vIterator=vFlexibleChildrenLength-1;vIterator>=0;vIterator--){vCurrentChild=vFlexibleChildren[vIterator];if(vUp){vAdjust=(vCurrentChild.getMaxWidthValue()||Infinity)-vCurrentChild._computedWidthFlexValue;if(vAdjust>0){vCurrentChild._allocationLoops=Math.floor(vAdjust/vCurrentChild._computedWidthParsed);}else {vFlexibleChildren.removeAt(vIterator);vCurrentChild._computedWidthFlexValue=Math.round(vCurrentChild._computedWidthFlexValue);vUsedWidth+=Math.round(vCurrentChild._computedWidthFlexValue+vAdjust);};}else {vAdjust=QxUtil.isValidNumber(vCurrentChild.getMinWidthValue())?vCurrentChild._computedWidthFlexValue-vCurrentChild.getMinWidthValue():vCurrentChild._computedWidthFlexValue;if(vAdjust>0){vCurrentChild._allocationLoops=Math.floor(vAdjust/vCurrentChild._computedWidthParsed);}else {vFlexibleChildren.removeAt(vIterator);vCurrentChild._computedWidthFlexValue=Math.round(vCurrentChild._computedWidthFlexValue);vUsedWidth+=Math.round(vCurrentChild._computedWidthFlexValue-vAdjust);};};};while(vAllocationDiff!=0&&vFlexibleChildrenLength>0){vFlexibleChildrenLength=vFlexibleChildren.length;vMinAllocationLoops=Infinity;vFactorSum=0;for(vIterator=0;vIterator<vFlexibleChildrenLength;vIterator++){vMinAllocationLoops=Math.min(vMinAllocationLoops,vFlexibleChildren[vIterator]._allocationLoops);vFactorSum+=vFlexibleChildren[vIterator]._computedWidthParsed;};vCurrentAllocationSum=Math.min(vFactorSum*vMinAllocationLoops,vAllocationDiff);vAllocationDiff-=vCurrentAllocationSum;for(vIterator=vFlexibleChildrenLength-1;vIterator>=0;vIterator--){vCurrentChild=vFlexibleChildren[vIterator];vCurrentChild._computedWidthFlexValue+=vCurrentAllocationSum/vFactorSum*vCurrentChild._computedWidthParsed;if(vCurrentChild._allocationLoops==vMinAllocationLoops){vCurrentChild._computedWidthFlexValue=Math.round(vCurrentChild._computedWidthFlexValue);vUsedWidth+=vCurrentChild._computedWidthFlexValue;delete vCurrentChild._allocationLoops;vFlexibleChildren.removeAt(vIterator);}else {if(vAllocationDiff==0){vCurrentChild._computedWidthFlexValue=Math.round(vCurrentChild._computedWidthFlexValue);vUsedWidth+=vCurrentChild._computedWidthFlexValue;delete vCurrentChild._allocationLoops;}else {vCurrentChild._allocationLoops-=vMinAllocationLoops;};};};};};};vCurrentChild._computedWidthFlexValue+=vAvailWidth-vUsedWidth;};proto.invalidateChildrenFlexWidth=function(){delete this._childrenFlexWidthComputed;};proto.computeChildrenNeededWidth=function(){var w=this.getWidget();return QxLayoutImpl.prototype.computeChildrenNeededWidth_sum.call(this)+((w.getVisibleChildrenLength()-1)*w.getSpacing());};proto.updateSelfOnChildOuterWidthChange=function(vChild){this.getWidget()._invalidateAccumulatedChildrenOuterWidth();};proto.updateChildOnInnerWidthChange=function(vChild){if(this.getWidget().getHorizontalChildrenAlign()==QxConst.ALIGN_CENTER){vChild.addToLayoutChanges(QxConst.JOB_LOCATIONX);};var vUpdatePercent=vChild._recomputePercentX();var vUpdateFlex=vChild._recomputeFlexX();return vUpdatePercent||vUpdateFlex;};proto.updateChildOnInnerHeightChange=function(vChild){var vUpdatePercent=vChild._recomputePercentY();var vUpdateStretch=vChild._recomputeStretchingY();if((vChild.getVerticalAlign()||this.getWidget().getVerticalChildrenAlign())==QxConst.ALIGN_MIDDLE){vChild.addToLayoutChanges(QxConst.JOB_LOCATIONY);};return vUpdatePercent||vUpdateStretch;};proto.updateSelfOnJobQueueFlush=function(vJobQueue){if(vJobQueue.addChild||vJobQueue.removeChild){this.getWidget()._invalidateAccumulatedChildrenOuterWidth();};};proto.updateChildrenOnJobQueueFlush=function(vQueue){var vStretchX=false,vStretchY=false;var vWidget=this.getWidget();if(vQueue.orientation){vStretchX=vStretchY=true;};if(vQueue.spacing||vQueue.orientation||vQueue.reverseChildrenOrder||vQueue.horizontalChildrenAlign){vWidget._addChildrenToLayoutQueue(QxConst.JOB_LOCATIONX);};if(vQueue.verticalChildrenAlign){vWidget._addChildrenToLayoutQueue(QxConst.JOB_LOCATIONY);};if(vQueue.stretchChildrenOrthogonalAxis){vStretchY=true;};if(vStretchX){vWidget._recomputeChildrenStretchingX();vWidget._addChildrenToLayoutQueue(QxConst.PROPERTY_WIDTH);};if(vStretchY){vWidget._recomputeChildrenStretchingY();vWidget._addChildrenToLayoutQueue(QxConst.PROPERTY_HEIGHT);};return true;};proto.updateChildrenOnRemoveChild=function(vChild,vIndex){var w=this.getWidget(),ch=w.getVisibleChildren(),chl=ch.length,chc,i=-1;if(this.getEnableFlexSupport()){for(var i=0;i<chl;i++){chc=ch[i];if(chc.getHasFlexX()){vIndex=Math.min(vIndex,i);break;};};i=-1;};switch(w.getLayoutMode()){case QxConst.ALIGN_RIGHT:case QxConst.ALIGN_LEFT_REVERSED:while((chc=ch[++i])&&i<vIndex){chc.addToLayoutChanges(QxConst.JOB_LOCATIONX);};break;case QxConst.ALIGN_CENTER:case QxConst.ALIGN_CENTER_REVERSED:while(chc=ch[++i]){chc.addToLayoutChanges(QxConst.JOB_LOCATIONX);};break;default:i+=vIndex;while(chc=ch[++i]){chc.addToLayoutChanges(QxConst.JOB_LOCATIONX);};};};proto.updateChildrenOnMoveChild=function(vChild,vIndex,vOldIndex){var vChildren=this.getWidget().getVisibleChildren();var vStart=Math.min(vIndex,vOldIndex);var vStop=Math.max(vIndex,vOldIndex)+1;for(var i=vStart;i<vStop;i++){vChildren[i].addToLayoutChanges(QxConst.JOB_LOCATIONX);};};proto.flushChildrenQueue=function(vChildrenQueue){var w=this.getWidget(),ch=w.getVisibleChildren(),chl=ch.length,chc,i;if(this.getEnableFlexSupport()){this.invalidateChildrenFlexWidth();for(i=0;i<chl;i++){chc=ch[i];if(chc.getHasFlexX()){chc._computedWidthValue=null;if(chc._recomputeBoxWidth()){chc._recomputeOuterWidth();chc._recomputeInnerWidth();};vChildrenQueue[chc.toHashCode()]=chc;chc._layoutChanges.width=true;};};};switch(w.getLayoutMode()){case QxConst.ALIGN_RIGHT:case QxConst.ALIGN_LEFT_REVERSED:for(var i=chl-1;i>=0&&!vChildrenQueue[ch[i].toHashCode()];i--){};for(var j=0;j<=i;j++){w._layoutChild(chc=ch[j]);};break;case QxConst.ALIGN_CENTER:case QxConst.ALIGN_CENTER_REVERSED:i=-1;while(chc=ch[++i]){w._layoutChild(chc);};break;default:i=-1;var changed=false;while(chc=ch[++i]){if(changed||vChildrenQueue[chc.toHashCode()]){w._layoutChild(chc);changed=true;};};};};proto.layoutChild=function(vChild,vJobs){this.layoutChild_sizeX(vChild,vJobs);this.layoutChild_sizeY(vChild,vJobs);this.layoutChild_sizeLimitX(vChild,vJobs);this.layoutChild_sizeLimitY(vChild,vJobs);this.layoutChild_locationX(vChild,vJobs);this.layoutChild_locationY(vChild,vJobs);this.layoutChild_marginX(vChild,vJobs);this.layoutChild_marginY(vChild,vJobs);};if(QxClient.isMshtml()||QxClient.isOpera()){proto.layoutChild_sizeX=function(vChild,vJobs){if(vJobs.initial||vJobs.width||vJobs.minWidth||vJobs.maxWidth){if(vChild._isWidthEssential()&&(!vChild._computedWidthTypeNull||!vChild._computedMinWidthTypeNull||!vChild._computedMaxWidthTypeNull)){vChild._applyRuntimeWidth(vChild.getBoxWidth());}else {vChild._resetRuntimeWidth();};};};proto.layoutChild_sizeY=function(vChild,vJobs){if(vJobs.initial||vJobs.height||vJobs.minHeight||vJobs.maxHeight){if((vChild._isHeightEssential()&&(!vChild._computedHeightTypeNull||!vChild._computedMinHeightTypeNull||!vChild._computedMaxHeightTypeNull))||(vChild.getAllowStretchY()&&this.getWidget().getStretchChildrenOrthogonalAxis())){vChild._applyRuntimeHeight(vChild.getBoxHeight());}else {vChild._resetRuntimeHeight();};};};}else {proto.layoutChild_sizeX=function(vChild,vJobs){if(vJobs.initial||vJobs.width){if(vChild._isWidthEssential()&&!vChild._computedWidthTypeNull){vChild._applyRuntimeWidth(vChild.getWidthValue());}else {vChild._resetRuntimeWidth();};};};proto.layoutChild_sizeY=function(vChild,vJobs){if(vJobs.initial||vJobs.height){if(vChild._isHeightEssential()&&!vChild._computedHeightTypeNull){vChild._applyRuntimeHeight(vChild.getHeightValue())}else {vChild._resetRuntimeHeight();};};};};proto.layoutChild_locationX=function(vChild,vJobs){var vWidget=this.getWidget();if(vWidget.getFirstVisibleChild()==vChild){switch(vWidget.getLayoutMode()){case QxConst.ALIGN_RIGHT:case QxConst.ALIGN_LEFT_REVERSED:var vPos=vWidget.getPaddingRight()+vWidget.getAccumulatedChildrenOuterWidth()-vChild.getOuterWidth();break;case QxConst.ALIGN_CENTER:case QxConst.ALIGN_CENTER_REVERSED:var vPos=vWidget.getPaddingLeft()+Math.round((vWidget.getInnerWidth()-vWidget.getAccumulatedChildrenOuterWidth())/2);break;default:var vPos=vWidget.getPaddingLeft();};}else {var vPrev=vChild.getPreviousVisibleSibling();switch(vWidget.getLayoutMode()){case QxConst.ALIGN_RIGHT:case QxConst.ALIGN_LEFT_REVERSED:var vPos=vPrev._cachedLocationHorizontal-vChild.getOuterWidth()-vWidget.getSpacing();break;default:var vPos=vPrev._cachedLocationHorizontal+vPrev.getOuterWidth()+vWidget.getSpacing();};};vChild._cachedLocationHorizontal=vPos;switch(vWidget.getLayoutMode()){case QxConst.ALIGN_RIGHT:case QxConst.ALIGN_RIGHT_REVERSED:case QxConst.ALIGN_CENTER_REVERSED:vPos+=!vChild._computedRightTypeNull?vChild.getRightValue():!vChild._computedLeftTypeNull?-(vChild.getLeftValue()):0;vChild._resetRuntimeLeft();vChild._applyRuntimeRight(vPos);break;default:vPos+=!vChild._computedLeftTypeNull?vChild.getLeftValue():!vChild._computedRightTypeNull?-(vChild.getRightValue()):0;vChild._resetRuntimeRight();vChild._applyRuntimeLeft(vPos);};};proto.layoutChild_locationY=function(vChild,vJobs){var vWidget=this.getWidget();if(QxClient.isGecko()&&vChild.getAllowStretchY()&&vWidget.getStretchChildrenOrthogonalAxis()&&vChild._computedHeightTypeNull){vChild._applyRuntimeTop(vWidget.getPaddingTop()||0);vChild._applyRuntimeBottom(vWidget.getPaddingBottom()||0);return;};var vAlign=vChild.getVerticalAlign()||vWidget.getVerticalChildrenAlign();var vPos=vAlign==QxConst.ALIGN_MIDDLE?Math.round((vWidget.getInnerHeight()-vChild.getOuterHeight())/2):0;if(vAlign==QxConst.ALIGN_BOTTOM){vPos+=vWidget.getPaddingBottom();if(!vChild._computedBottomTypeNull){vPos+=vChild.getBottomValue();}else if(!vChild._computedTopTypeNull){vPos-=vChild.getTopValue();};vChild._resetRuntimeTop();vChild._applyRuntimeBottom(vPos);}else {vPos+=vWidget.getPaddingTop();if(!vChild._computedTopTypeNull){vPos+=vChild.getTopValue();}else if(!vChild._computedBottomTypeNull){vPos-=vChild.getBottomValue();};vChild._resetRuntimeBottom();vChild._applyRuntimeTop(vPos);};};function QxVerticalBoxLayoutImpl(vWidget){QxLayoutImpl.call(this,vWidget);};QxVerticalBoxLayoutImpl.extend(QxLayoutImpl,"QxVerticalBoxLayoutImpl");QxVerticalBoxLayoutImpl.addProperty({name:"enableFlexSupport",type:QxConst.TYPEOF_BOOLEAN,defaultValue:true});proto.computeChildBoxWidth=function(vChild){if(this.getWidget().getStretchChildrenOrthogonalAxis()&&vChild._computedWidthTypeNull&&vChild.getAllowStretchX()){return this.getWidget().getInnerWidth();};return vChild.getWidthValue()||vChild._computeBoxWidthFallback();};proto.computeChildBoxHeight=function(vChild){return vChild.getHeightValue()||vChild._computeBoxHeightFallback();};proto.computeChildrenFlexHeight=function(){if(this._childrenFlexHeightComputed||!this.getEnableFlexSupport()){return;};this._childrenFlexHeightComputed=true;var vWidget=this.getWidget();var vChildren=vWidget.getVisibleChildren();var vChildrenLength=vChildren.length;var vCurrentChild;var vFlexibleChildren=[];var vAvailHeight=vWidget.getInnerHeight();var vUsedHeight=vWidget.getSpacing()*(vChildrenLength-1);var vIterator;for(vIterator=0;vIterator<vChildrenLength;vIterator++){vCurrentChild=vChildren[vIterator];if(vCurrentChild._computedHeightTypeFlex){vFlexibleChildren.push(vCurrentChild);if(vWidget._computedHeightTypeAuto){vUsedHeight+=vCurrentChild.getPreferredBoxHeight();};}else {vUsedHeight+=vCurrentChild.getOuterHeight();};};var vRemainingHeight=vAvailHeight-vUsedHeight;var vFlexibleChildrenLength=vFlexibleChildren.length;var vPrioritySum=0;for(vIterator=0;vIterator<vFlexibleChildrenLength;vIterator++){vPrioritySum+=vFlexibleChildren[vIterator]._computedHeightParsed;};var vPartHeight=vRemainingHeight/vPrioritySum;if(!vWidget.getUseAdvancedFlexAllocation()){for(vIterator=0;vIterator<vFlexibleChildrenLength;vIterator++){vCurrentChild=vFlexibleChildren[vIterator];vCurrentChild._computedHeightFlexValue=Math.round(vCurrentChild._computedHeightParsed*vPartHeight);vUsedHeight+=vCurrentChild._computedHeightFlexValue;};}else {var vAllocationDiff=0;var vMinAllocationLoops,vFlexibleChildrenLength,vAdjust,vCurrentAllocationSum,vFactorSum,vComputedFlexibleHeight;for(vIterator=0;vIterator<vFlexibleChildrenLength;vIterator++){vCurrentChild=vFlexibleChildren[vIterator];vComputedFlexibleHeight=vCurrentChild._computedHeightFlexValue=vCurrentChild._computedHeightParsed*vPartHeight;vAllocationDiff+=vComputedFlexibleHeight-vComputedFlexibleHeight.limit(vCurrentChild.getMinHeightValue(),vCurrentChild.getMaxHeightValue());};vAllocationDiff=Math.round(vAllocationDiff);if(vAllocationDiff==0){for(vIterator=0;vIterator<vFlexibleChildrenLength;vIterator++){vCurrentChild=vFlexibleChildren[vIterator];vCurrentChild._computedHeightFlexValue=Math.round(vCurrentChild._computedHeightFlexValue);vUsedHeight+=vCurrentChild._computedHeightFlexValue;};}else {var vUp=vAllocationDiff>0;for(vIterator=vFlexibleChildrenLength-1;vIterator>=0;vIterator--){vCurrentChild=vFlexibleChildren[vIterator];if(vUp){vAdjust=(vCurrentChild.getMaxHeightValue()||Infinity)-vCurrentChild._computedHeightFlexValue;if(vAdjust>0){vCurrentChild._allocationLoops=Math.floor(vAdjust/vCurrentChild._computedHeightParsed);}else {vFlexibleChildren.removeAt(vIterator);vCurrentChild._computedHeightFlexValue=Math.round(vCurrentChild._computedHeightFlexValue);vUsedHeight+=Math.round(vCurrentChild._computedHeightFlexValue+vAdjust);};}else {vAdjust=QxUtil.isValidNumber(vCurrentChild.getMinHeightValue())?vCurrentChild._computedHeightFlexValue-vCurrentChild.getMinHeightValue():vCurrentChild._computedHeightFlexValue;if(vAdjust>0){vCurrentChild._allocationLoops=Math.floor(vAdjust/vCurrentChild._computedHeightParsed);}else {vFlexibleChildren.removeAt(vIterator);vCurrentChild._computedHeightFlexValue=Math.round(vCurrentChild._computedHeightFlexValue);vUsedHeight+=Math.round(vCurrentChild._computedHeightFlexValue-vAdjust);};};};while(vAllocationDiff!=0&&vFlexibleChildrenLength>0){vFlexibleChildrenLength=vFlexibleChildren.length;vMinAllocationLoops=Infinity;vFactorSum=0;for(vIterator=0;vIterator<vFlexibleChildrenLength;vIterator++){vMinAllocationLoops=Math.min(vMinAllocationLoops,vFlexibleChildren[vIterator]._allocationLoops);vFactorSum+=vFlexibleChildren[vIterator]._computedHeightParsed;};vCurrentAllocationSum=Math.min(vFactorSum*vMinAllocationLoops,vAllocationDiff);vAllocationDiff-=vCurrentAllocationSum;for(vIterator=vFlexibleChildrenLength-1;vIterator>=0;vIterator--){vCurrentChild=vFlexibleChildren[vIterator];vCurrentChild._computedHeightFlexValue+=vCurrentAllocationSum/vFactorSum*vCurrentChild._computedHeightParsed;if(vCurrentChild._allocationLoops==vMinAllocationLoops){vCurrentChild._computedHeightFlexValue=Math.round(vCurrentChild._computedHeightFlexValue);vUsedHeight+=vCurrentChild._computedHeightFlexValue;delete vCurrentChild._allocationLoops;vFlexibleChildren.removeAt(vIterator);}else {if(vAllocationDiff==0){vCurrentChild._computedHeightFlexValue=Math.round(vCurrentChild._computedHeightFlexValue);vUsedHeight+=vCurrentChild._computedHeightFlexValue;delete vCurrentChild._allocationLoops;}else {vCurrentChild._allocationLoops-=vMinAllocationLoops;};};};};};};vCurrentChild._computedHeightFlexValue+=vAvailHeight-vUsedHeight;};proto.invalidateChildrenFlexHeight=function(){delete this._childrenFlexHeightComputed;};proto.computeChildrenNeededHeight=function(){var w=this.getWidget();return QxLayoutImpl.prototype.computeChildrenNeededHeight_sum.call(this)+((w.getVisibleChildrenLength()-1)*w.getSpacing());};proto.updateSelfOnChildOuterHeightChange=function(vChild){this.getWidget()._invalidateAccumulatedChildrenOuterHeight();};proto.updateChildOnInnerWidthChange=function(vChild){var vUpdatePercent=vChild._recomputePercentX();var vUpdateStretch=vChild._recomputeStretchingX();if((vChild.getHorizontalAlign()||this.getWidget().getHorizontalChildrenAlign())==QxConst.ALIGN_CENTER){vChild.addToLayoutChanges(QxConst.JOB_LOCATIONX);};return vUpdatePercent||vUpdateStretch;};proto.updateChildOnInnerHeightChange=function(vChild){if(this.getWidget().getVerticalChildrenAlign()==QxConst.ALIGN_MIDDLE){vChild.addToLayoutChanges(QxConst.JOB_LOCATIONY);};var vUpdatePercent=vChild._recomputePercentY();var vUpdateFlex=vChild._recomputeFlexY();return vUpdatePercent||vUpdateFlex;};proto.updateSelfOnJobQueueFlush=function(vJobQueue){if(vJobQueue.addChild||vJobQueue.removeChild){this.getWidget()._invalidateAccumulatedChildrenOuterHeight();};};proto.updateChildrenOnJobQueueFlush=function(vQueue){var vStretchX=false,vStretchY=false;var vWidget=this.getWidget();if(vQueue.orientation){vStretchX=vStretchY=true;};if(vQueue.spacing||vQueue.orientation||vQueue.reverseChildrenOrder||vQueue.verticalChildrenAlign){vWidget._addChildrenToLayoutQueue(QxConst.JOB_LOCATIONY);};if(vQueue.horizontalChildrenAlign){vWidget._addChildrenToLayoutQueue(QxConst.JOB_LOCATIONX);};if(vQueue.stretchChildrenOrthogonalAxis){vStretchX=true;};if(vStretchX){vWidget._recomputeChildrenStretchingX();vWidget._addChildrenToLayoutQueue(QxConst.PROPERTY_WIDTH);};if(vStretchY){vWidget._recomputeChildrenStretchingY();vWidget._addChildrenToLayoutQueue(QxConst.PROPERTY_HEIGHT);};return true;};proto.updateChildrenOnRemoveChild=function(vChild,vIndex){var w=this.getWidget(),ch=w.getVisibleChildren(),chl=ch.length,chc,i=-1;if(this.getEnableFlexSupport()){for(var i=0;i<chl;i++){chc=ch[i];if(chc.getHasFlexY()){vIndex=Math.min(vIndex,i);break;};};i=-1;};switch(w.getLayoutMode()){case QxConst.ALIGN_BOTTOM:case QxConst.ALIGN_TOP_REVERSED:while((chc=ch[++i])&&i<vIndex){chc.addToLayoutChanges(QxConst.JOB_LOCATIONY);};break;case QxConst.ALIGN_MIDDLE:case QxConst.ALIGN_MIDDLE_REVERSED:while(chc=ch[++i]){chc.addToLayoutChanges(QxConst.JOB_LOCATIONY);};break;default:i+=vIndex;while(chc=ch[++i]){chc.addToLayoutChanges(QxConst.JOB_LOCATIONY);};};};proto.updateChildrenOnMoveChild=function(vChild,vIndex,vOldIndex){var vChildren=this.getWidget().getVisibleChildren();var vStart=Math.min(vIndex,vOldIndex);var vStop=Math.max(vIndex,vOldIndex)+1;for(var i=vStart;i<vStop;i++){vChildren[i].addToLayoutChanges(QxConst.JOB_LOCATIONY);};};proto.flushChildrenQueue=function(vChildrenQueue){var w=this.getWidget(),ch=w.getVisibleChildren(),chl=ch.length,chc,i;if(this.getEnableFlexSupport()){this.invalidateChildrenFlexHeight();for(i=0;i<chl;i++){chc=ch[i];if(chc.getHasFlexY()){chc._computedHeightValue=null;if(chc._recomputeBoxHeight()){chc._recomputeOuterHeight();chc._recomputeInnerHeight();};vChildrenQueue[chc.toHashCode()]=chc;chc._layoutChanges.height=true;};};};switch(w.getLayoutMode()){case QxConst.ALIGN_BOTTOM:case QxConst.ALIGN_TOP_REVERSED:for(var i=chl-1;i>=0&&!vChildrenQueue[ch[i].toHashCode()];i--){};for(var j=0;j<=i;j++){w._layoutChild(chc=ch[j]);};break;case QxConst.ALIGN_MIDDLE:case QxConst.ALIGN_MIDDLE_REVERSED:i=-1;while(chc=ch[++i]){w._layoutChild(chc);};break;default:i=-1;var changed=false;while(chc=ch[++i]){if(changed||vChildrenQueue[chc.toHashCode()]){w._layoutChild(chc);changed=true;};};};};proto.layoutChild=function(vChild,vJobs){this.layoutChild_sizeX(vChild,vJobs);this.layoutChild_sizeY(vChild,vJobs);this.layoutChild_sizeLimitX(vChild,vJobs);this.layoutChild_sizeLimitY(vChild,vJobs);this.layoutChild_locationX(vChild,vJobs);this.layoutChild_locationY(vChild,vJobs);this.layoutChild_marginX(vChild,vJobs);this.layoutChild_marginY(vChild,vJobs);};if(QxClient.isMshtml()||QxClient.isOpera()){proto.layoutChild_sizeX=function(vChild,vJobs){if(vJobs.initial||vJobs.width||vJobs.minWidth||vJobs.maxWidth){if((vChild._isWidthEssential()&&(!vChild._computedWidthTypeNull||!vChild._computedMinWidthTypeNull||!vChild._computedMaxWidthTypeNull))||(vChild.getAllowStretchX()&&this.getWidget().getStretchChildrenOrthogonalAxis())){vChild._applyRuntimeWidth(vChild.getBoxWidth());}else {vChild._resetRuntimeWidth();};};};proto.layoutChild_sizeY=function(vChild,vJobs){if(vJobs.initial||vJobs.height||vJobs.minHeight||vJobs.maxHeight){if(vChild._isHeightEssential()&&(!vChild._computedHeightTypeNull||!vChild._computedMinHeightTypeNull||!vChild._computedMaxHeightTypeNull)){vChild._applyRuntimeHeight(vChild.getBoxHeight());}else {vChild._resetRuntimeHeight();};};};}else {proto.layoutChild_sizeX=function(vChild,vJobs){if(vJobs.initial||vJobs.width){if(vChild._isWidthEssential()&&!vChild._computedWidthTypeNull){vChild._applyRuntimeWidth(vChild.getWidthValue());}else {vChild._resetRuntimeWidth();};};};proto.layoutChild_sizeY=function(vChild,vJobs){if(vJobs.initial||vJobs.height){if(vChild._isHeightEssential()&&!vChild._computedHeightTypeNull){vChild._applyRuntimeHeight(vChild.getHeightValue());}else {vChild._resetRuntimeHeight();};};};};proto.layoutChild_locationY=function(vChild,vJobs){var vWidget=this.getWidget();if(vWidget.getFirstVisibleChild()==vChild){switch(vWidget.getLayoutMode()){case QxConst.ALIGN_BOTTOM:case QxConst.ALIGN_TOP_REVERSED:var vPos=vWidget.getPaddingBottom()+vWidget.getAccumulatedChildrenOuterHeight()-vChild.getOuterHeight();break;case QxConst.ALIGN_MIDDLE:case QxConst.ALIGN_MIDDLE_REVERSED:var vPos=vWidget.getPaddingTop()+Math.round((vWidget.getInnerHeight()-vWidget.getAccumulatedChildrenOuterHeight())/2);break;default:var vPos=vWidget.getPaddingTop();};}else {var vPrev=vChild.getPreviousVisibleSibling();switch(vWidget.getLayoutMode()){case QxConst.ALIGN_BOTTOM:case QxConst.ALIGN_TOP_REVERSED:var vPos=vPrev._cachedLocationVertical-vChild.getOuterHeight()-vWidget.getSpacing();break;default:var vPos=vPrev._cachedLocationVertical+vPrev.getOuterHeight()+vWidget.getSpacing();};};vChild._cachedLocationVertical=vPos;switch(this.getWidget().getLayoutMode()){case QxConst.ALIGN_BOTTOM:case QxConst.ALIGN_BOTTOM_REVERSED:case QxConst.ALIGN_MIDDLE_REVERSED:vPos+=!vChild._computedBottomTypeNull?vChild.getBottomValue():!vChild._computedTopTypeNull?-(vChild.getTopValue()):0;vChild._resetRuntimeTop();vChild._applyRuntimeBottom(vPos);break;default:vPos+=!vChild._computedTopTypeNull?vChild.getTopValue():!vChild._computedBottomTypeNull?-(vChild.getBottomValue()):0;vChild._resetRuntimeBottom();vChild._applyRuntimeTop(vPos);};};proto.layoutChild_locationX=function(vChild,vJobs){var vWidget=this.getWidget();if(QxClient.isGecko()&&vChild.getAllowStretchX()&&vWidget.getStretchChildrenOrthogonalAxis()&&vChild._computedWidthTypeNull){vChild._applyRuntimeLeft(vWidget.getPaddingLeft()||0);vChild._applyRuntimeRight(vWidget.getPaddingRight()||0);return;};var vAlign=vChild.getHorizontalAlign()||vWidget.getHorizontalChildrenAlign();var vPos=vAlign==QxConst.ALIGN_CENTER?Math.round((vWidget.getInnerWidth()-vChild.getOuterWidth())/2):0;if(vAlign==QxConst.ALIGN_RIGHT){vPos+=vWidget.getPaddingRight();if(!vChild._computedRightTypeNull){vPos+=vChild.getRightValue();}else if(!vChild._computedLeftTypeNull){vPos-=vChild.getLeftValue();};vChild._resetRuntimeLeft();vChild._applyRuntimeRight(vPos);}else {vPos+=vWidget.getPaddingLeft();if(!vChild._computedLeftTypeNull){vPos+=vChild.getLeftValue();}else if(!vChild._computedRightTypeNull){vPos-=vChild.getRightValue();};vChild._resetRuntimeRight();vChild._applyRuntimeLeft(vPos);};};function QxFlowLayoutImpl(vWidget){QxLayoutImpl.call(this,vWidget);};QxFlowLayoutImpl.extend(QxLayoutImpl,"QxFlowLayoutImpl");QxFlowLayoutImpl.STR_FIRST="getFirstVisibleChild";QxFlowLayoutImpl.STR_LAST="getLastVisibleChild";QxFlowLayoutImpl.STR_NEXT="getNextSibling";QxFlowLayoutImpl.STR_PREVIOUS="getPreviousSibling";proto.computeChildrenNeededWidth=function(){var w=this.getWidget();return QxLayoutImpl.prototype.computeChildrenNeededWidth_sum.call(this)+((w.getVisibleChildrenLength()-1)*w.getHorizontalSpacing());};proto.computeChildrenNeededHeight=function(){var vWidget=this.getWidget();var vInnerWidth=vWidget.getInnerWidth();var vHorizontalSpacing=vWidget.getHorizontalSpacing();var vVerticalSpacing=vWidget.getVerticalSpacing();var vReversed=vWidget.getReverseChildrenOrder();var vRowWidth=0;var vRowHeight=0;var vRowHeightSum=0;for(var i=0,ch=vWidget.getVisibleChildren(),chl=ch.length,chc;i<chl;i++){chc=vReversed?ch[chl-1-i]:ch[i];vRowWidth+=chc.getNeededWidth();if(vRowWidth>vInnerWidth){vRowHeightSum+=vRowHeight+vVerticalSpacing;vRowWidth=chc.getNeededWidth();vRowHeight=chc.getNeededHeight();}else {vRowHeight=Math.max(vRowHeight,chc.getNeededHeight());};vRowWidth+=vHorizontalSpacing;};return vRowHeightSum+vRowHeight;};proto.updateSelfOnChildOuterWidthChange=function(vChild){this.getWidget()._invalidatePreferredInnerHeight();};proto.updateChildOnInnerWidthChange=function(vChild){vChild._recomputePercentX();vChild.addToLayoutChanges(QxConst.JOB_LOCATION);return true;};proto.updateChildOnInnerHeightChange=function(vChild){vChild._recomputePercentY();vChild.addToLayoutChanges(QxConst.JOB_LOCATION);return true;};proto.updateChildrenOnJobQueueFlush=function(vQueue){if(vQueue.horizontalSpacing||vQueue.verticalSpacing||vQueue.reverseChildrenOrder||vQueue.horizontalChildrenAlign||vQueue.verticalChildrenAlign){this.getWidget()._addChildrenToLayoutQueue(QxConst.JOB_LOCATION);};};proto.updateChildrenOnRemoveChild=function(vChild,vIndex){var w=this.getWidget(),ch=w.getVisibleChildren(),chl=ch.length,chc,i=-1;if(w.getReverseChildrenOrder()){while((chc=ch[++i])&&i<vIndex){chc.addToLayoutChanges(QxConst.JOB_LOCATION);};}else {i+=vIndex;while(chc=ch[++i]){chc.addToLayoutChanges(QxConst.JOB_LOCATION);};};};proto.updateChildrenOnMoveChild=function(vChild,vIndex,vOldIndex){for(var i=Math.min(vIndex,vOldIndex),ch=this.getWidget().getVisibleChildren(),l=ch.length;i<l;i++){ch[i].addToLayoutChanges(QxConst.JOB_LOCATION);};};proto.flushChildrenQueue=function(vChildrenQueue){var w=this.getWidget(),ch=w.getVisibleChildren(),chl=ch.length,chc,chh;if(w.getReverseChildrenOrder()){var i=chl,changed=false;while(chc=ch[--i]){chh=chc.toHashCode();if(changed||vChildrenQueue[chh]){w._layoutChild(chc);changed=true;};};}else {var i=-1,changed=false;while(chc=ch[++i]){chh=chc.toHashCode();if(changed||vChildrenQueue[chh]){w._layoutChild(chc);changed=true;};};};};proto.layoutChild=function(vChild,vJobs){this.layoutChild_sizeX_essentialWrapper(vChild,vJobs);this.layoutChild_sizeY_essentialWrapper(vChild,vJobs);this.layoutChild_sizeLimitX(vChild,vJobs);this.layoutChild_sizeLimitY(vChild,vJobs);this.layoutChild_marginX(vChild,vJobs);this.layoutChild_marginY(vChild,vJobs);this.layoutChild_location(vChild,vJobs);};if(QxClient.isMshtml()||QxClient.isOpera()){proto.layoutChild_sizeX=function(vChild,vJobs){if(vJobs.initial||vJobs.width||vJobs.minWidth||vJobs.maxWidth){vChild._computedWidthTypeNull&&vChild._computedMinWidthTypeNull&&vChild._computedMaxWidthTypeNull?vChild._resetRuntimeWidth():vChild._applyRuntimeWidth(vChild.getBoxWidth());};};proto.layoutChild_sizeY=function(vChild,vJobs){if(vJobs.initial||vJobs.height||vJobs.minHeight||vJobs.maxHeight){vChild._computedHeightTypeNull&&vChild._computedMinHeightTypeNull&&vChild._computedMaxHeightTypeNull?vChild._resetRuntimeHeight():vChild._applyRuntimeHeight(vChild.getBoxHeight());};};}else {proto.layoutChild_sizeX=function(vChild,vJobs){if(vJobs.initial||vJobs.width){vChild._computedWidthTypeNull?vChild._resetRuntimeWidth():vChild._applyRuntimeWidth(vChild.getWidthValue());};};proto.layoutChild_sizeY=function(vChild,vJobs){if(vJobs.initial||vJobs.height){vChild._computedHeightTypeNull?vChild._resetRuntimeHeight():vChild._applyRuntimeHeight(vChild.getHeightValue());};};};proto.layoutChild_location=function(vChild,vJobs){var vWidget=this.getWidget();var vReverse=vWidget.getReverseChildrenOrder();var vMethodBegin=vReverse?QxFlowLayoutImpl.STR_LAST:QxFlowLayoutImpl.STR_FIRST;var vMethodContinue=vReverse?QxFlowLayoutImpl.STR_NEXT:QxFlowLayoutImpl.STR_PREVIOUS;if(vChild==vWidget[vMethodBegin]()){vChild._cachedLocationHorizontal=vChild._cachedLocationVertical=vChild._cachedRow=0;}else {var vTempChild=vChild[vMethodContinue]();vChild._cachedLocationHorizontal=vTempChild._cachedLocationHorizontal+vTempChild.getOuterWidth()+vWidget.getHorizontalSpacing();vChild._cachedLocationVertical=vTempChild._cachedLocationVertical;vChild._cachedRow=vTempChild._cachedRow;if((vChild._cachedLocationHorizontal+vChild.getOuterWidth())>vWidget.getInnerWidth()){vRowMax=vTempChild.getOuterHeight();while((vTempChild=vTempChild[vMethodContinue]())&&vTempChild._cachedRow==vChild._cachedRow){vRowMax=Math.max(vRowMax,vTempChild.getOuterHeight());};vChild._cachedLocationHorizontal=0;vChild._cachedLocationVertical+=vWidget.getVerticalSpacing()+vRowMax;vChild._cachedRow++;};};if(vWidget.getHorizontalChildrenAlign()==QxConst.ALIGN_RIGHT){vChild._resetRuntimeLeft();vChild._applyRuntimeRight(vWidget.getPaddingRight()+vChild._cachedLocationHorizontal);}else {vChild._resetRuntimeRight();vChild._applyRuntimeLeft(vWidget.getPaddingLeft()+vChild._cachedLocationHorizontal);};if(vWidget.getVerticalChildrenAlign()==QxConst.ALIGN_BOTTOM){vChild._resetRuntimeTop();vChild._applyRuntimeBottom(vWidget.getPaddingBottom()+vChild._cachedLocationVertical);}else {vChild._resetRuntimeBottom();vChild._applyRuntimeTop(vWidget.getPaddingTop()+vChild._cachedLocationVertical);};};function QxDockLayoutImpl(vWidget){QxLayoutImpl.call(this,vWidget);};QxDockLayoutImpl.extend(QxLayoutImpl,"QxDockLayoutImpl");QxDockLayoutImpl.METHOD_LOCATION="layoutChild_location_";QxDockLayoutImpl._childRanking={vertical:function(c){return c.getVerticalAlign()?1e6:c.getHorizontalAlign()?2e6:3e6;},horizontal:function(c){return c.getHorizontalAlign()?1e6:c.getVerticalAlign()?2e6:3e6;},ordered:function(c){return c.getHorizontalAlign()||c.getVerticalAlign()?1e6:2e6;}};QxDockLayoutImpl._childCheck= {common:function(vChild){if(!(vChild._computedLeftTypeNull&&vChild._computedRightTypeNull&&vChild._computedTopTypeNull&&vChild._computedBottomTypeNull)){throw new Error("QxDockLayoutImpl:It is not allowed to define any location values for children:"+vChild+"!");};},horizontal:function(vChild){if(!(vChild._computedMinHeightTypeNull&&vChild._computedHeightTypeNull&&vChild._computedMaxHeightTypeNull)){throw new Error("QxDockLayoutImpl:It is not allowed to define any vertical dimension for 'horizontal' placed children:"+vChild+"!");};},vertical:function(vChild){if(!(vChild._computedMinWidthTypeNull&&vChild._computedWidthTypeNull&&vChild._computedMaxWidthTypeNull)){throw new Error("QxDockLayoutImpl:It is not allowed to define any horizontal dimension for 'vertical' placed children:"+vChild+"!");};},"default":function(vChild){QxDockLayoutImpl._childCheck.horizontal(vChild);QxDockLayoutImpl._childCheck.vertical(vChild);}};proto.computeChildBoxWidth=function(vChild){if(this.getChildAlignMode(vChild)==QxConst.ORIENTATION_HORIZONTAL){return vChild.getWidthValue()||vChild._computeBoxWidthFallback();};return this.getWidget().getInnerWidth()-this._lastLeft-this._lastRight;};proto.computeChildBoxHeight=function(vChild){if(this.getChildAlignMode(vChild)==QxConst.ORIENTATION_VERTICAL){return vChild.getHeightValue()||vChild._computeBoxHeightFallback();};return this.getWidget().getInnerHeight()-this._lastTop-this._lastBottom;};proto.updateChildOnInnerWidthChange=function(vChild){vChild._recomputePercentX();vChild.addToLayoutChanges(QxConst.JOB_LOCATION);return true;};proto.updateChildOnInnerHeightChange=function(vChild){vChild._recomputePercentY();vChild.addToLayoutChanges(QxConst.JOB_LOCATION);return true;};proto.updateSelfOnJobQueueFlush=QxUtil.returnFalse;proto.updateChildrenOnJobQueueFlush=function(vQueue){if(vQueue.mode||vQueue.addChild||vQueue.removeChild){this.getWidget()._addChildrenToLayoutQueue(QxConst.JOB_LOCATION);};};proto.flushChildrenQueue=function(vChildrenQueue){var vWidget=this.getWidget(),vChildren=vWidget.getVisibleChildren(),vChildrenLength=vChildren.length,vMode=vWidget.getMode();this._lastLeft=this._lastRight=this._lastTop=this._lastBottom=0;var vRankImpl=QxDockLayoutImpl._childRanking[vMode];var vOrderedChildren=vChildren.copy().sort(function(c1,c2){return(vRankImpl(c1)+vChildren.indexOf(c1))-(vRankImpl(c2)+vChildren.indexOf(c2));});for(var i=0;i<vChildrenLength;i++){vWidget._layoutChild(vOrderedChildren[i]);};};proto.getChildAlign=function(vChild){return vChild.getVerticalAlign()||vChild.getHorizontalAlign()||QxConst.CORE_DEFAULT;};proto.getChildAlignMode=function(vChild){return vChild.getVerticalAlign()?QxConst.ORIENTATION_VERTICAL:vChild.getHorizontalAlign()?QxConst.ORIENTATION_HORIZONTAL:QxConst.CORE_DEFAULT;};proto.layoutChild=function(vChild,vJobs){QxDockLayoutImpl._childCheck.common(vChild);QxDockLayoutImpl._childCheck[this.getChildAlignMode(vChild)](vChild);this.layoutChild_sizeX_essentialWrapper(vChild,vJobs);this.layoutChild_sizeY_essentialWrapper(vChild,vJobs);this.layoutChild_sizeLimitX(vChild,vJobs);this.layoutChild_sizeLimitY(vChild,vJobs);this[QxDockLayoutImpl.METHOD_LOCATION+this.getChildAlign(vChild)](vChild,vJobs);};proto.layoutChild_location_top=function(vChild,vJobs){vChild._applyRuntimeTop(this._lastTop);vChild._applyRuntimeLeft(this._lastLeft);this.layoutChild_location_horizontal(vChild);this._lastTop+=vChild.getBoxHeight();};proto.layoutChild_location_left=function(vChild,vJobs){vChild._applyRuntimeLeft(this._lastLeft);vChild._applyRuntimeTop(this._lastTop);this.layoutChild_location_vertical(vChild);this._lastLeft+=vChild.getBoxWidth();};if(QxClient.isMshtml()||QxClient.isOpera()){proto._applyComputedWidth=function(vChild){vChild._recomputeBoxWidth();vChild._recomputeOuterWidth();vChild._recomputeInnerWidth();vChild._applyRuntimeWidth(vChild.getBoxWidth());};proto._applyComputedHeight=function(vChild){vChild._recomputeBoxHeight();vChild._recomputeOuterHeight();vChild._recomputeInnerHeight();vChild._applyRuntimeHeight(vChild.getBoxHeight());};proto.layoutChild_sizeX=function(vChild,vJobs){if(vJobs.initial||vJobs.width||vJobs.minWidth||vJobs.maxWidth){vChild._computedWidthTypeNull&&vChild._computedMinWidthTypeNull&&vChild._computedMaxWidthTypeNull?vChild._resetRuntimeWidth():vChild._applyRuntimeWidth(vChild.getBoxWidth());};};proto.layoutChild_sizeY=function(vChild,vJobs){if(vJobs.initial||vJobs.height||vJobs.minHeight||vJobs.maxHeight){vChild._computedHeightTypeNull&&vChild._computedMinHeightTypeNull&&vChild._computedMaxHeightTypeNull?vChild._resetRuntimeHeight():vChild._applyRuntimeHeight(vChild.getBoxHeight());};};proto.layoutChild_location_horizontal=function(vChild){this._applyComputedWidth(vChild);};proto.layoutChild_location_vertical=function(vChild){this._applyComputedHeight(vChild);};proto.layoutChild_location_right=function(vChild,vJobs){vChild._applyRuntimeLeft(this.getWidget().getInnerWidth()-this._lastRight-vChild.getBoxWidth());vChild._applyRuntimeTop(this._lastTop);this.layoutChild_location_vertical(vChild);this._lastRight+=vChild.getBoxWidth();};proto.layoutChild_location_bottom=function(vChild,vJobs){vChild._applyRuntimeTop(this.getWidget().getInnerHeight()-this._lastBottom-vChild.getBoxHeight());vChild._applyRuntimeLeft(this._lastLeft);this.layoutChild_location_horizontal(vChild);this._lastBottom+=vChild.getBoxHeight();};proto.layoutChild_location_default=function(vChild,vJobs){var vWidget=this.getWidget();vChild._resetRuntimeRight();vChild._resetRuntimeBottom();vChild._applyRuntimeTop(this._lastTop);vChild._applyRuntimeLeft(this._lastLeft);this._applyComputedWidth(vChild);this._applyComputedHeight(vChild);};}else {proto._applyComputedWidth=function(vChild){vChild._recomputeBoxWidth();vChild._recomputeOuterWidth();vChild._recomputeInnerWidth();};proto._applyComputedHeight=function(vChild){vChild._recomputeBoxHeight();vChild._recomputeOuterHeight();vChild._recomputeInnerHeight();};proto.layoutChild_sizeX=function(vChild,vJobs){if(vJobs.initial||vJobs.width){vChild._computedWidthTypeNull?vChild._resetRuntimeWidth():vChild._applyRuntimeWidth(vChild.getWidthValue());};};proto.layoutChild_sizeY=function(vChild,vJobs){if(vJobs.initial||vJobs.height){vChild._computedHeightTypeNull?vChild._resetRuntimeHeight():vChild._applyRuntimeHeight(vChild.getHeightValue());};};proto.layoutChild_location_horizontal=function(vChild){this._applyComputedWidth(vChild);vChild._applyRuntimeRight(this._lastRight);};proto.layoutChild_location_vertical=function(vChild){this._applyComputedHeight(vChild);vChild._applyRuntimeBottom(this._lastBottom);};proto.layoutChild_location_right=function(vChild,vJobs){vChild._applyRuntimeRight(this._lastRight);vChild._applyRuntimeTop(this._lastTop);this.layoutChild_location_vertical(vChild);this._lastRight+=vChild.getBoxWidth();};proto.layoutChild_location_bottom=function(vChild,vJobs){vChild._applyRuntimeBottom(this._lastBottom);vChild._applyRuntimeLeft(this._lastLeft);this.layoutChild_location_horizontal(vChild);this._lastBottom+=vChild.getBoxHeight();};proto.layoutChild_location_default=function(vChild,vJobs){vChild._resetRuntimeWidth();vChild._resetRuntimeHeight();vChild._applyRuntimeTop(this._lastTop);vChild._applyRuntimeRight(this._lastRight);vChild._applyRuntimeBottom(this._lastBottom);vChild._applyRuntimeLeft(this._lastLeft);this._applyComputedWidth(vChild);this._applyComputedHeight(vChild);};};function QxGridLayoutImpl(vWidget){QxLayoutImpl.call(this,vWidget);};QxGridLayoutImpl.extend(QxLayoutImpl,"QxGridLayoutImpl");proto.computeChildBoxWidth=function(vChild){var vWidget=this.getWidget();var vColWidth=vWidget.getColumnInnerWidth(vChild._col,vChild._row);if(vWidget.isSpanStart(vChild._col,vChild._row)){var vEntry=vWidget.getSpanEntry(vChild._col,vChild._row);for(var i=1;i<vEntry.colLength;i++){vColWidth+=vWidget.getComputedCellPaddingRight(vChild._col+i-1,vChild._row);vColWidth+=vWidget.getComputedCellPaddingLeft(vChild._col+i,vChild._row);vColWidth+=vWidget.getHorizontalSpacing();vColWidth+=vWidget.getColumnInnerWidth(vChild._col+i,vChild._row);};};return vChild.getAllowStretchX()?vColWidth:Math.min(vChild.getWidthValue(),vColWidth);};proto.computeChildBoxHeight=function(vChild){var vWidget=this.getWidget();var vRowHeight=vWidget.getRowInnerHeight(vChild._col,vChild._row);if(vWidget.isSpanStart(vChild._col,vChild._row)){var vEntry=vWidget.getSpanEntry(vChild._col,vChild._row);for(var i=1;i<vEntry.rowLength;i++){vRowHeight+=vWidget.getComputedCellPaddingBottom(vChild._col,vChild._row+i-1);vRowHeight+=vWidget.getComputedCellPaddingTop(vChild._col,vChild._row+i);vRowHeight+=vWidget.getVerticalSpacing();vRowHeight+=vWidget.getRowInnerHeight(vChild._col,vChild._row+i);};};return vChild.getAllowStretchY()?vRowHeight:Math.min(vChild.getHeightValue(),vRowHeight);};proto.computeChildrenNeededWidth=function(){var vWidget=this.getWidget();var vSpacingX=vWidget.getHorizontalSpacing();var vSum=-vSpacingX;for(var i=0,l=vWidget.getColumnCount();i<l;i++){vSum+=vWidget.getColumnBoxWidth(i)+vSpacingX;};return vSum;};proto.computeChildrenNeededHeight=function(){var vWidget=this.getWidget();var vSpacingY=vWidget.getVerticalSpacing();var vSum=-vSpacingY;for(var i=0,l=vWidget.getRowCount();i<l;i++){vSum+=vWidget.getRowBoxHeight(i)+vSpacingY;};return vSum;};proto.updateChildOnInnerWidthChange=function(vChild){vChild._recomputePercentX();vChild.addToLayoutChanges(QxConst.JOB_LOCATIONX);return true;};proto.updateChildOnInnerHeightChange=function(vChild){vChild._recomputePercentY();vChild.addToLayoutChanges(QxConst.JOB_LOCATIONY);return true;};proto.layoutChild=function(vChild,vJobs){var vWidget=this.getWidget();this.layoutChild_sizeX(vChild,vJobs);this.layoutChild_sizeY(vChild,vJobs);this.layoutChild_sizeLimitX(vChild,vJobs);this.layoutChild_sizeLimitY(vChild,vJobs);this.layoutChild_marginX(vChild,vJobs);this.layoutChild_marginY(vChild,vJobs);this.layoutChild_locationX(vChild,vJobs);this.layoutChild_locationY(vChild,vJobs);};proto.layoutChild_sizeX=function(vChild,vJobs){vChild._applyRuntimeWidth(vChild.getBoxWidth());};proto.layoutChild_sizeY=function(vChild,vJobs){vChild._applyRuntimeHeight(vChild.getBoxHeight());};proto.layoutChild_locationX=function(vChild,vJobs){var vWidget=this.getWidget();var vSpacingX=vWidget.getHorizontalSpacing();var vLocSumX=vWidget.getPaddingLeft()+vWidget.getComputedCellPaddingLeft(vChild._col,vChild._row);for(var i=0;i<vChild._col;i++){vLocSumX+=vWidget.getColumnBoxWidth(i)+vSpacingX;};switch(vChild.getHorizontalAlign()||vWidget.getColumnHorizontalAlignment(vChild._col)||vWidget.getRowHorizontalAlignment(vChild._row)||vWidget.getHorizontalChildrenAlign()){case QxConst.ALIGN_CENTER:vLocSumX+=Math.round((vWidget.getColumnInnerWidth(vChild._col,vChild._row)-vChild.getBoxWidth())/2);break;case QxConst.ALIGN_RIGHT:vLocSumX+=vWidget.getColumnInnerWidth(vChild._col,vChild._row)-vChild.getBoxWidth();break;};vChild._applyRuntimeLeft(vLocSumX);};proto.layoutChild_locationY=function(vChild,vJobs){var vWidget=this.getWidget();var vSpacingY=vWidget.getVerticalSpacing();var vLocSumY=vWidget.getPaddingTop()+vWidget.getComputedCellPaddingTop(vChild._col,vChild._row);for(var i=0;i<vChild._row;i++){vLocSumY+=vWidget.getRowBoxHeight(i)+vSpacingY;};switch(vChild.getVerticalAlign()||vWidget.getRowVerticalAlignment(vChild._row)||vWidget.getColumnVerticalAlignment(vChild._col)||vWidget.getVerticalChildrenAlign()){case QxConst.ALIGN_MIDDLE:vLocSumY+=Math.round((vWidget.getRowInnerHeight(vChild._col,vChild._row)-vChild.getBoxHeight())/2);break;case QxConst.ALIGN_BOTTOM:vLocSumY+=vWidget.getRowInnerHeight(vChild._col,vChild._row)-vChild.getBoxHeight();break;};vChild._applyRuntimeTop(vLocSumY);};function QxParent(){if(this.classname==QxParent.OMIT_CLASS){throw new Error("Please omit the usage of QxParent directly. Choose between any widget which inherits from QxParent and so comes with a layout implementation!");};QxWidget.call(this);this._children=[];this._layoutImpl=this._createLayoutImpl();};QxParent.extend(QxWidget,"QxParent");QxParent.OMIT_CLASS="QxParent";QxParent.addProperty({name:"focusManager",type:QxConst.TYPEOF_OBJECT,instance:"QxFocusManager"});QxParent.addProperty({name:"activeChild",type:QxConst.TYPEOF_OBJECT,instance:"QxWidget"});QxParent.addProperty({name:"focusedChild",type:QxConst.TYPEOF_OBJECT,instance:"QxWidget"});QxParent.addCachedProperty({name:"visibleChildren",defaultValue:null});proto.isFocusRoot=function(){return this.getFocusManager()!=null;};proto.getFocusRoot=function(){if(this.isFocusRoot()){return this;};if(this._hasParent){return this.getParent().getFocusRoot();};return null;};proto.activateFocusRoot=function(){this.setFocusManager(new QxFocusManager(this));};proto._onfocuskeyevent=function(e){this.getFocusManager()._onkeyevent(this,e);};proto._modifyFocusManager=function(propValue,propOldValue,propData){if(propValue){this.addEventListener(QxConst.EVENT_TYPE_KEYDOWN,this._onfocuskeyevent);this.addEventListener(QxConst.EVENT_TYPE_KEYPRESS,this._onfocuskeyevent);if(this.getTabIndex()<1){this.setTabIndex(1);};this.setHideFocus(true);this.setActiveChild(this);}else {this.removeEventListener(QxConst.EVENT_TYPE_KEYDOWN,this._onfocuskeyevent);this.removeEventListener(QxConst.EVENT_TYPE_KEYPRESS,this._onfocuskeyevent);this.setTabIndex(-1);this.setHideFocus(false);};return true;};proto._modifyFocusedChild=function(propValue,propOldValue,propData){var vFocusValid=QxUtil.isValidObject(propValue);var vBlurValid=QxUtil.isValidObject(propOldValue);if(vFocusValid&&typeof QxPopupManager!==QxConst.TYPEOF_UNDEFINED){QxPopupManager.update(propValue);};if(vBlurValid){if(propOldValue.hasEventListeners(QxConst.EVENT_TYPE_FOCUSOUT)){var vEventObject=new QxFocusEvent(QxConst.EVENT_TYPE_FOCUSOUT,propOldValue);if(vFocusValid){vEventObject.setRelatedTarget(propValue);};propOldValue.dispatchEvent(vEventObject);vEventObject.dispose();};};if(vFocusValid){if(propValue.hasEventListeners(QxConst.EVENT_TYPE_FOCUSIN)){var vEventObject=new QxFocusEvent(QxConst.EVENT_TYPE_FOCUSIN,propValue);if(vBlurValid){vEventObject.setRelatedTarget(propOldValue);};propValue.dispatchEvent(vEventObject);vEventObject.dispose();};};if(vBlurValid){if(this.getActiveChild()==propOldValue){this.setActiveChild(null);};propOldValue.setFocused(false);var vEventObject=new QxFocusEvent(QxConst.EVENT_TYPE_BLUR,propOldValue);if(vFocusValid){vEventObject.setRelatedTarget(propValue);};propOldValue.dispatchEvent(vEventObject);QxToolTipManager.handleBlur(vEventObject);vEventObject.dispose();};if(vFocusValid){this.setActiveChild(propValue);propValue.setFocused(true);propValue.getTopLevelWidget().getEventManager().setFocusRoot(this);var vEventObject=new QxFocusEvent(QxConst.EVENT_TYPE_FOCUS,propValue);if(vBlurValid){vEventObject.setRelatedTarget(propOldValue);};propValue.dispatchEvent(vEventObject);QxToolTipManager.handleFocus(vEventObject);vEventObject.dispose();};return true;};proto._layoutImpl=null;proto._createLayoutImpl=function(){return null;};proto.getLayoutImpl=function(){return this._layoutImpl;};proto.getChildren=function(){return this._children;};proto.getChildrenLength=function(){return this.getChildren().length;};proto.hasChildren=function(){return this.getChildrenLength()>0;};proto.isEmpty=function(){return this.getChildrenLength()==0;};proto.indexOf=function(vChild){return this.getChildren().indexOf(vChild);};proto.contains=function(vWidget){switch(vWidget){case null:return false;case this:return true;default:return this.contains(vWidget.getParent());};};proto._computeVisibleChildren=function(){var vVisible=[];var vChildren=this.getChildren();var vLength=vChildren.length;for(var i=0;i<vLength;i++){var vChild=vChildren[i];if(vChild._isDisplayable){vVisible.push(vChild);};};return vVisible;};proto.getVisibleChildrenLength=function(){return this.getVisibleChildren().length;};proto.hasVisibleChildren=function(){return this.getVisibleChildrenLength()>0;};proto.isVisibleEmpty=function(){return this.getVisibleChildrenLength()==0;};proto.add=function(){var vWidget;for(var i=0,l=arguments.length;i<l;i++){vWidget=arguments[i];if(!(vWidget instanceof QxParent)&&!(vWidget instanceof QxTerminator)){throw new Error("Invalid Widget:"+vWidget);}else {vWidget.setParent(this);};};return this;};proto.addAt=function(vChild,vIndex){if(QxUtil.isInvalidNumber(vIndex)||vIndex==-1){throw new Error("Not a valid index for addAt():"+vIndex);};if(vChild.getParent()==this){var vChildren=this.getChildren();var vOldIndex=vChildren.indexOf(vChild);if(vOldIndex!=vIndex){if(vOldIndex!=-1){vChildren.removeAt(vOldIndex);};vChildren.insertAt(vChild,vIndex);this.getLayoutImpl().updateChildrenOnMoveChild(vChild,vIndex,vOldIndex);this._invalidateVisibleChildren();};}else {vChild._insertIndex=vIndex;vChild.setParent(this);};};proto.addAtBegin=function(vChild){return this.addAt(vChild,0);};proto.addAtEnd=function(vChild){var vLength=this.getChildrenLength();return this.addAt(vChild,vChild.getParent()==this?vLength-1:vLength);};proto.addBefore=function(vChild,vBefore){var vChildren=this.getChildren();var vTargetIndex=vChildren.indexOf(vBefore);if(vTargetIndex==-1){throw new Error("Child to add before:"+vBefore+" is not inside this parent.");};var vSourceIndex=vChildren.indexOf(vChild);if(vSourceIndex==-1||vSourceIndex>vTargetIndex){vTargetIndex++;};return this.addAt(vChild,Math.max(0,vTargetIndex-1));};proto.addAfter=function(vChild,vAfter){var vChildren=this.getChildren();var vTargetIndex=vChildren.indexOf(vAfter);if(vTargetIndex==-1){throw new Error("Child to add after:"+vAfter+" is not inside this parent.");};var vSourceIndex=vChildren.indexOf(vChild);if(vSourceIndex!=-1&&vSourceIndex<vTargetIndex){vTargetIndex--;};return this.addAt(vChild,Math.min(vChildren.length,vTargetIndex+1));};proto.remove=function(){var vWidget;for(var i=0,l=arguments.length;i<l;i++){vWidget=arguments[i];if(!(vWidget instanceof QxParent)&&!(vWidget instanceof QxTerminator)){throw new Error("Invalid Widget:"+vWidget);}else if(vWidget.getParent()==this){vWidget.setParent(null);};};};proto.removeAt=function(vIndex){var vChild=this.getChildren()[vIndex];if(vChild){delete o._insertIndex;vChild.setParent(null);};};proto.removeAll=function(){var cs=this.getChildren();var co=cs[0];while(co){this.remove(co);co=cs[0];};};proto.getFirstChild=function(){return this.getChildren().getFirst();};proto.getFirstVisibleChild=function(){return this.getVisibleChildren().getFirst();};proto.getFirstActiveChild=function(vIgnoreClasses){return QxWidget.getActiveSiblingHelper(null,this,1,vIgnoreClasses,"first");};proto.getLastChild=function(){return this.getChildren().getLast();};proto.getLastActiveChild=function(vIgnoreClasses){return QxWidget.getActiveSiblingHelper(null,this,-1,vIgnoreClasses,"last");};proto.getLastVisibleChild=function(){return this.getVisibleChildren().getLast();};proto.forEachChild=function(vFunc){var ch=this.getChildren(),chc,i=-1;while(chc=ch[++i]){vFunc.call(chc,i);};};proto.forEachVisibleChild=function(vFunc){var ch=this.getVisibleChildren(),chc,i=-1;while(chc=ch[++i]){vFunc.call(chc,i);};};proto._beforeAppear=function(){QxWidget.prototype._beforeAppear.call(this);this.forEachVisibleChild(function(){if(this.isAppearRelevant()){this._beforeAppear();};});};proto._afterAppear=function(){QxWidget.prototype._afterAppear.call(this);this.forEachVisibleChild(function(){if(this.isAppearRelevant()){this._afterAppear();};});};proto._beforeDisappear=function(){QxWidget.prototype._beforeDisappear.call(this);this.forEachVisibleChild(function(){if(this.isAppearRelevant()){this._beforeDisappear();};});};proto._afterDisappear=function(){QxWidget.prototype._afterDisappear.call(this);this.forEachVisibleChild(function(){if(this.isAppearRelevant()){this._afterDisappear();};});};proto._beforeInsertDom=function(){QxWidget.prototype._beforeInsertDom.call(this);this.forEachVisibleChild(function(){if(this.isAppearRelevant()){this._beforeInsertDom();};});};proto._afterInsertDom=function(){QxWidget.prototype._afterInsertDom.call(this);this.forEachVisibleChild(function(){if(this.isAppearRelevant()){this._afterInsertDom();};});};proto._beforeRemoveDom=function(){QxWidget.prototype._beforeRemoveDom.call(this);this.forEachVisibleChild(function(){if(this.isAppearRelevant()){this._beforeRemoveDom();};});};proto._afterRemoveDom=function(){QxWidget.prototype._afterRemoveDom.call(this);this.forEachVisibleChild(function(){if(this.isAppearRelevant()){this._afterRemoveDom();};});};proto._handleDisplayableCustom=function(vDisplayable,vParent,vHint){this.forEachChild(function(){this._handleDisplayable();});};proto._addChildrenToStateQueue=function(){this.forEachVisibleChild(function(){this.addToStateQueue();});};proto.recursiveAddToStateQueue=function(){this.addToStateQueue();this.forEachVisibleChild(function(){this.recursiveAddToStateQueue();});};proto._recursiveAppearanceThemeUpdate=function(vNewAppearanceTheme,vOldAppearanceTheme){QxWidget.prototype._recursiveAppearanceThemeUpdate.call(this,vNewAppearanceTheme,vOldAppearanceTheme);this.forEachVisibleChild(function(){this._recursiveAppearanceThemeUpdate(vNewAppearanceTheme,vOldAppearanceTheme);});};proto._addChildToChildrenQueue=function(vChild){if(!vChild._isInParentChildrenQueue&&!vChild._isDisplayable){this.warn("Ignoring invisible child:"+vChild);};if(!vChild._isInParentChildrenQueue&&vChild._isDisplayable){QxWidget.addToGlobalLayoutQueue(this);if(!this._childrenQueue){this._childrenQueue={};};this._childrenQueue[vChild.toHashCode()]=vChild;};};proto._removeChildFromChildrenQueue=function(vChild){if(this._childrenQueue&&vChild._isInParentChildrenQueue){delete this._childrenQueue[vChild.toHashCode()];if(QxUtil.isObjectEmpty(this._childrenQueue)){QxWidget.removeFromGlobalLayoutQueue(this);};};};proto._flushChildrenQueue=function(){if(!QxUtil.isObjectEmpty(this._childrenQueue)){this.getLayoutImpl().flushChildrenQueue(this._childrenQueue);delete this._childrenQueue;};};proto._addChildrenToLayoutQueue=function(p){this.forEachChild(function(){this.addToLayoutChanges(p);});};proto._layoutChild=function(vChild){if(!vChild._isDisplayable){this.warn("Want to render an invisible child:"+vChild+"->omitting!");return;};var vChanges=vChild._layoutChanges;try{if(vChanges.borderX){this._applyBorderX(vChild,vChanges);};if(vChanges.borderY){this._applyBorderY(vChild,vChanges);};}catch(ex){this.error("Could not apply border to child "+vChild+":"+ex,"_layoutChild");};try{if(vChanges.paddingLeft||vChanges.paddingRight){vChild._applyPaddingX(this,vChanges);};if(vChanges.paddingTop||vChanges.paddingBottom){vChild._applyPaddingY(this,vChanges);};}catch(ex){this.error("Could not apply padding to child "+vChild+":"+ex,"_layoutChild");};try{this.getLayoutImpl().layoutChild(vChild,vChanges);}catch(ex){this.error("Could not layout child "+vChild+" through layout handler:"+ex,"_layoutChild");};try{vChild._layoutPost(vChanges);}catch(ex){this.error("Could not post layout child "+vChild+":"+ex,"_layoutChild");};try{if(vChanges.initial){vChild._initialLayoutDone=true;QxWidget.addToGlobalDisplayQueue(vChild);};}catch(ex){this.error("Could not handle display updates from layout flush for child "+vChild+":"+ex,"_layoutChild");};vChild._layoutChanges={};delete vChild._isInParentLayoutQueue;delete this._childrenQueue[vChild.toHashCode()];};proto._layoutPost=QxUtil.returnTrue;if(QxClient.isOpera()){proto._layoutChildOrig=proto._layoutChild;proto._layoutChild=function(vChild){if(!vChild._initialLayoutDone||!vChild._layoutChanges.borderX||!vChild._layoutChanges.borderY){return this._layoutChildOrig(vChild);};var vStyle=vChild.getElement().style;var vOldDisplay=vStyle.display;vStyle.display=QxConst.CORE_NONE;var vRet=this._layoutChildOrig(vChild);vStyle.display=vOldDisplay;return vRet;};};proto._computePreferredInnerWidth=function(){return this.getLayoutImpl().computeChildrenNeededWidth();};proto._computePreferredInnerHeight=function(){return this.getLayoutImpl().computeChildrenNeededHeight();};proto._changeInnerWidth=function(vNew,vOld){var vLayout=this.getLayoutImpl();if(vLayout.invalidateChildrenFlexWidth){vLayout.invalidateChildrenFlexWidth();};this.forEachVisibleChild(function(){if(vLayout.updateChildOnInnerWidthChange(this)&&this._recomputeBoxWidth()){this._recomputeOuterWidth();this._recomputeInnerWidth();};});};proto._changeInnerHeight=function(vNew,vOld){var vLayout=this.getLayoutImpl();if(vLayout.invalidateChildrenFlexHeight){vLayout.invalidateChildrenFlexHeight();};this.forEachVisibleChild(function(){if(vLayout.updateChildOnInnerHeightChange(this)&&this._recomputeBoxHeight()){this._recomputeOuterHeight();this._recomputeInnerHeight();};});};proto.getInnerWidthForChild=function(vChild){return this.getInnerWidth();};proto.getInnerHeightForChild=function(vChild){return this.getInnerHeight();};proto.getWidgetFromPointHelper=function(x,y){var ch=this.getChildren();for(var chl=ch.length,i=0;i<chl;i++){if(QxDom.getElementAbsolutePointChecker(ch[i].getElement(),x,y)){return ch[i].getWidgetFromPointHelper(x,y);};};return this;};proto._cloneRecursive=function(cloneInstance){var ch=this.getChildren();var chl=ch.length;var cloneChild;for(var i=0;i<chl;i++){cloneChild=ch[i].clone(true);cloneInstance.add(cloneChild);};};proto._remappingChildTable=["add","remove","addAt","addAtBegin","addAtEnd","removeAt","addBefore","addAfter","removeAll"];proto._remapStart="return this._remappingChildTarget.";proto._remapStop=".apply(this._remappingChildTarget,arguments)";proto.remapChildrenHandlingTo=function(vTarget){var t=this._remappingChildTable;this._remappingChildTarget=vTarget;for(var i=0,l=t.length,s;i<l;i++){s=t[i];this[s]=new Function(QxParent.prototype._remapStart+s+QxParent.prototype._remapStop);};};proto.dispose=function(){if(this.getDisposed()){return;};if(this._layoutImpl){this._layoutImpl.dispose();this._layoutImpl=null;};for(var i in this._childrenQueue){delete this._childrenQueue[i];};this._childrenQueue=null;this._remappingChildTable=null;this._remappingChildTarget=null;if(this._children){var chl=this._children.length;for(var i=chl-1;i>=0;i--){this._children[i].dispose();this._children[i]=null;};this._children=null;};delete this._cachedVisibleChildren;if(this.getFocusManager()){this.removeEventListener(QxConst.EVENT_TYPE_KEYDOWN,this._onfocuskeyevent);this.removeEventListener(QxConst.EVENT_TYPE_KEYPRESS,this._onfocuskeyevent);this.forceFocusManager(null);};return QxWidget.prototype.dispose.call(this);};function QxTerminator(){QxWidget.call(this);};QxTerminator.extend(QxWidget,"QxTerminator");proto._applyPaddingX=function(vParent,vChanges,vStyle){if(vChanges.paddingLeft){this._applyRuntimePaddingLeft(this.getPaddingLeft());};if(vChanges.paddingRight){this._applyRuntimePaddingRight(this.getPaddingRight());};};proto._applyPaddingY=function(vParent,vChanges,vStyle){if(vChanges.paddingTop){this._applyRuntimePaddingTop(this.getPaddingTop());};if(vChanges.paddingBottom){this._applyRuntimePaddingBottom(this.getPaddingBottom());};};proto._applyContent=function(){if(this._computedWidthTypePixel){this._cachedPreferredInnerWidth=null;}else{this._invalidatePreferredInnerWidth();};if(this._computedHeightTypePixel){this._cachedPreferredInnerHeight=null;}else{this._invalidatePreferredInnerHeight();};if(this._initialLayoutDone){this.addToJobQueue(QxConst.EVENT_TYPE_LOAD);};};proto._layoutPost=function(vChanges){if(vChanges.initial||vChanges.load||vChanges.width||vChanges.height){this._postApply();};};proto._postApply=QxUtil.returnTrue;proto._computeBoxWidthFallback=proto.getPreferredBoxWidth;proto._computeBoxHeightFallback=proto.getPreferredBoxHeight;proto._computePreferredInnerWidth=QxUtil.returnZero;proto._computePreferredInnerHeight=QxUtil.returnZero;proto._isWidthEssential=function(){if(!this._computedLeftTypeNull&&!this._computedRightTypeNull){return true;};if(!this._computedWidthTypeNull&&!this._computedWidthTypeAuto){return true;};if(!this._computedMinWidthTypeNull&&!this._computedMinWidthTypeAuto){return true;};if(!this._computedMaxWidthTypeNull&&!this._computedMaxWidthTypeAuto){return true;};if(this._borderElement){return true;};return false;};proto._isHeightEssential=function(){if(!this._computedTopTypeNull&&!this._computedBottomTypeNull){return true;};if(!this._computedHeightTypeNull&&!this._computedHeightTypeAuto){return true;};if(!this._computedMinHeightTypeNull&&!this._computedMinHeightTypeAuto){return true;};if(!this._computedMaxHeightTypeNull&&!this._computedMaxHeightTypeAuto){return true;};if(this._borderElement){return true;};return false;};function QxCanvasLayout(){QxParent.call(this);};QxCanvasLayout.extend(QxParent,"QxCanvasLayout");proto._createLayoutImpl=function(){return new QxCanvasLayoutImpl(this);};function QxBlocker(){QxTerminator.call(this);this.setEdge(0);this.setDisplay(false);};QxBlocker.extend(QxTerminator,"QxBlocker");QxBlocker.changeProperty({name:"appearance",type:QxConst.TYPEOF_STRING,defaultValue:"blocker"});function QxClientDocument(vClientWindow){this._window=vClientWindow;this._document=this._window.getElement().document;this.setElement(this._document.body);this.addToStateQueue();QxCanvasLayout.call(this);this._styleProperties={};this.activateFocusRoot();this._cachedInnerWidth=this._document.body.offsetWidth;this._cachedInnerHeight=this._document.body.offsetHeight;this.addEventListener(QxConst.EVENT_TYPE_RESIZE,this._onresize);this._blocker=new QxBlocker;this._modalWidgets=[];this._modalNativeWindow=null;this._blocker.addEventListener(QxConst.EVENT_TYPE_MOUSEDOWN,this.blockHelper,this);this._blocker.addEventListener(QxConst.EVENT_TYPE_MOUSEUP,this.blockHelper,this);this.add(this._blocker);};QxClientDocument.extend(QxCanvasLayout,"QxClientDocument");QxClientDocument.addProperty({name:"globalCursor",type:QxConst.TYPEOF_STRING});QxClientDocument.changeProperty({name:"appearance",type:QxConst.TYPEOF_STRING,defaultValue:"client-document"});proto._modifyParent=QxUtil.returnTrue;proto._modifyVisible=QxUtil.returnTrue;proto._modifyElement=function(propValue,propOldValue,propData){this._isCreated=QxUtil.isValidElement(propValue);if(propOldValue){propOldValue._QxWidget=null;};if(propValue){propValue._QxWidget=this;this._element=propValue;this._style=propValue.style;}else {this._element=null;this._style=null;};return true;};proto.getWindow=function(){return this._window;};proto.getTopLevelWidget=QxUtil.returnThis;proto.getDocumentElement=function(){return this._document;};proto.getEventManager=function(){return this.getWindow().getEventManager();};proto.getParent=proto.getToolTip=QxUtil.returnNull;proto.isMaterialized=proto.isSeeable=QxUtil.returnTrue;proto._isDisplayable=true;proto._hasParent=false;proto._initialLayoutDone=true;proto.blockHelper=function(e){if(this._modalNativeWindow){try{this._modalNativeWindow._window.focus();}catch(ex){this.debug("Window seems to be closed already!=>Releasing Blocker:("+e.getType()+")");this.release(this._modalNativeWindow);};};};proto.block=function(vActiveChild){this._blocker.show();if(typeof QxWindow===QxConst.TYPEOF_FUNCTION&&vActiveChild instanceof QxWindow){this._modalWidgets.push(vActiveChild);var vOrigIndex=vActiveChild.getZIndex();this._blocker.setZIndex(vOrigIndex);vActiveChild.setZIndex(vOrigIndex+1);}else if(typeof QxNativeWindow===QxConst.TYPEOF_FUNCTION&&vActiveChild instanceof QxNativeWindow){this._modalNativeWindow=vActiveChild;this._blocker.setZIndex(1e7);};};proto.release=function(vActiveChild){if(vActiveChild){if(vActiveChild instanceof QxNativeWindow){this._modalNativeWindow=null;}else {this._modalWidgets.remove(vActiveChild);};};var l=this._modalWidgets.length;if(l==0){this._blocker.hide();}else {var oldActiveChild=this._modalWidgets[l-1];var o=oldActiveChild.getZIndex();this._blocker.setZIndex(o);oldActiveChild.setZIndex(o+1);};};proto.createStyleElement=function(vCssText){return QxDom.createStyleElement(vCssText);};proto.addCssRule=function(vSheet,vSelector,vStyle){return QxDom.addCssRule(vSheet,vSelector,vStyle);};proto.removeCssRule=function(vSheet,vSelector){return QxDom.removeCssRule(vSheet,vSelector);};proto.removeAllCssRules=function(vSheet){return QxDom.removeAllCssRules(vSheet);};QxDom.createStyleElement("html,body{margin:0;border:0;padding:0;}html{border:0 none;}*{box-sizing:border-box;-moz-box-sizing:border-box;}img{box-sizing:content-box;-moz-box-sizing:content-box;}");if(QxSettings.applicationLayout){QxDom.createStyleElement("html,body{width:100%;height:100%;overflow:hidden;}");};proto._modifyGlobalCursor=function(propValue,propOldValue,propData){if(!this._globalCursorStyleSheet){this._globalCursorStyleSheet=this.createStyleElement();};this.removeAllCssRules(this._globalCursorStyleSheet);if(propValue){this.addCssRule(this._globalCursorStyleSheet,QxConst.CORE_STAR,"cursor:"+propValue+" !important");};return true;};proto._onresize=function(e){if(typeof QxPopupManager!==QxConst.TYPEOF_UNDEFINED){QxPopupManager.update();};this._recomputeInnerWidth();this._recomputeInnerHeight();QxWidget.flushGlobalQueues();};proto._computeInnerWidth=function(){return this._document.body.offsetWidth;};proto._computeInnerHeight=function(){return this._document.body.offsetHeight;};proto.dispose=function(){if(this.getDisposed()){return;};delete this._window;delete this._document;delete this._modalWidgets;delete this._modalNativeWindow;this._globalCursorStyleSheet=null;if(this._blocker){this._blocker.removeEventListener(QxConst.EVENT_TYPE_MOUSEDOWN,this.blockHelper,this);this._blocker.removeEventListener(QxConst.EVENT_TYPE_MOUSEUP,this.blockHelper,this);this._blocker.dispose();this._blocker=null;};return QxCanvasLayout.prototype.dispose.call(this);};function QxInline(vId){QxCanvasLayout.call(this);this.setStyleProperty(QxConst.PROPERTY_POSITION,QxConst.CORE_RELATIVE);if(QxUtil.isValidString(vId)){this.setInlineNodeId(vId);};};QxInline.extend(QxCanvasLayout,"QxInline");QxInline.addProperty({name:"inlineNodeId",type:QxConst.TYPEOF_STRING});function QxHorizontalSpacer(){QxTerminator.call(this);this.setWidth(QxConst.CORE_FLEX);};QxHorizontalSpacer.extend(QxTerminator,"QxHorizontalSpacer");function QxVerticalSpacer(){QxTerminator.call(this);this.setHeight(QxConst.CORE_FLEX);};QxVerticalSpacer.extend(QxTerminator,"QxVerticalSpacer");function QxEventManager(vClientWindow){QxTarget.call(this);var o=this;this.__onmouseevent=function(e){return o._onmouseevent(e);};this.__onkeyevent=function(e){return o._onkeyevent(e);};this.__ondragevent=function(e){return o._ondragevent(e);};this.__onselectevent=function(e){return o._onselectevent(e);};this.__onwindowblur=function(e){return o._onwindowblur(e);};this.__onwindowfocus=function(e){return o._onwindowfocus(e);};this.__onwindowresize=function(e){return o._onwindowresize(e);};if(QxUtil.isValid(vClientWindow)){this.attachEvents(vClientWindow);};this._commands={};};QxEventManager.extend(QxManager,"QxEventManager");QxEventManager.mouseEventTypes=[QxConst.EVENT_TYPE_MOUSEOVER,QxConst.EVENT_TYPE_MOUSEMOVE,QxConst.EVENT_TYPE_MOUSEOUT,QxConst.EVENT_TYPE_MOUSEDOWN,QxConst.EVENT_TYPE_MOUSEUP,QxConst.EVENT_TYPE_CLICK,QxConst.EVENT_TYPE_DBLCLICK,QxConst.EVENT_TYPE_CONTEXTMENU,QxClient.isMshtml()?QxConst.EVENT_TYPE_MOUSEWHEEL:"DOMMouseScroll"];QxEventManager.keyEventTypes=[QxConst.EVENT_TYPE_KEYDOWN,QxConst.EVENT_TYPE_KEYPRESS,QxConst.EVENT_TYPE_KEYUP];if(QxClient.isGecko()){QxEventManager.dragEventTypes=[QxConst.EVENT_TYPE_DRAGDROP,QxConst.EVENT_TYPE_DRAGENTER,QxConst.EVENT_TYPE_DRAGEXIT,QxConst.EVENT_TYPE_DRAGGESTURE,QxConst.EVENT_TYPE_DRAGOVER];}else if(QxClient.isMshtml()){QxEventManager.dragEventTypes=[QxConst.EVENT_TYPE_DRAG,QxConst.EVENT_TYPE_DRAGEND,QxConst.EVENT_TYPE_DRAGENTER,QxConst.EVENT_TYPE_DRAGLEAVE,QxConst.EVENT_TYPE_DRAGOVER,QxConst.EVENT_TYPE_DRAGSTART];}else {QxEventManager.dragEventTypes=[QxConst.EVENT_TYPE_DRAG,QxConst.EVENT_TYPE_DRAGLEAVE,QxConst.EVENT_TYPE_DRAGSTART,QxConst.EVENT_TYPE_DRAGDROP,QxConst.EVENT_TYPE_DRAGENTER,QxConst.EVENT_TYPE_DRAGEXIT,QxConst.EVENT_TYPE_DRAGGESTURE,QxConst.EVENT_TYPE_DRAGOVER];};QxEventManager.addProperty({name:"allowClientContextMenu",type:QxConst.TYPEOF_BOOLEAN,defaultValue:false});QxEventManager.addProperty({name:"allowClientSelectAll",type:QxConst.TYPEOF_BOOLEAN,defaultValue:false});QxEventManager.addProperty({name:"captureWidget",type:QxConst.TYPEOF_OBJECT,instance:"QxWidget",allowNull:true});QxEventManager.addProperty({name:"focusRoot",type:QxConst.TYPEOF_OBJECT,instance:"QxParent",allowNull:true});proto._lastMouseEventType=null;proto._lastMouseDown=false;proto._lastMouseEventDate=0;proto._modifyCaptureWidget=function(propValue,propOldValue,propData){if(propOldValue){propOldValue.setCapture(false);};if(propValue){propValue.setCapture(true);};return true;};proto._modifyFocusRoot=function(propValue,propOldValue,propData){if(propOldValue){propOldValue.setFocusedChild(null);};if(propValue){if(propValue.getFocusedChild()==null){propValue.setFocusedChild(propValue);};};return true;};proto.addCommand=function(vCommand){this._commands[vCommand.toHashCode()]=vCommand;};proto.removeCommand=function(vCommand){delete this._commands[vCommand.toHashCode()];};proto._checkKeyEventMatch=function(e){var vCommand;for(var vHash in this._commands){vCommand=this._commands[vHash];if(vCommand.getEnabled()&&vCommand._matchesKeyEvent(e)){if(!vCommand.execute()){e.preventDefault();};break;};};};proto.attachEvents=function(wobj){if(this._attachedClientWindow){return false;};var wel=wobj.getElement();var del=wel.document;var bel=del.body;this._attachedClientWindow=wobj;this._attachedClientWindowElement=wel;this.attachEventTypes(QxEventManager.mouseEventTypes,this.__onmouseevent);this.attachEventTypes(QxEventManager.keyEventTypes,this.__onkeyevent);this.attachEventTypes(QxEventManager.dragEventTypes,this.__ondragevent);QxDom.addEventListener(wel,QxConst.EVENT_TYPE_BLUR,this.__onwindowblur);QxDom.addEventListener(wel,QxConst.EVENT_TYPE_FOCUS,this.__onwindowfocus);QxDom.addEventListener(wel,QxConst.EVENT_TYPE_RESIZE,this.__onwindowresize);bel.onselect=del.onselectstart=del.onselectionchange=this.__onselectevent;};proto.detachEvents=function(){if(!this._attachedClientWindow){return false;};var wel=this._attachedClientWindowElement;var del=wel.document;var bel=del.body;this.detachEventTypes(QxEventManager.mouseEventTypes,this.__onmouseevent);this.detachEventTypes(QxEventManager.keyEventTypes,this.__onkeyevent);this.detachEventTypes(QxEventManager.dragEventTypes,this.__ondragevent);QxDom.removeEventListener(wel,QxConst.EVENT_TYPE_BLUR,this.__onwindowblur);QxDom.removeEventListener(wel,QxConst.EVENT_TYPE_FOCUS,this.__onwindowfocus);QxDom.removeEventListener(wel,QxConst.EVENT_TYPE_RESIZE,this.__onwindowresize);bel.onselect=del.onselectstart=del.onselectionchange=null;this._attachedClientWindow=null;this._attachedClientWindowElement=null;};proto.attachEventTypes=function(vEventTypes,vFunctionPointer){try{if(QxClient.isGecko()){var d=this._attachedClientWindow.getElement();}else{var d=this._attachedClientWindow.getClientDocument().getElement();};for(var i=0,l=vEventTypes.length;i<l;i++){QxDom.addEventListener(d,vEventTypes[i],vFunctionPointer);};}catch(ex){throw new Error("QxEventManager:Failed to attach window event types:"+vEventTypes+":"+ex);};};proto.detachEventTypes=function(vEventTypes,vFunctionPointer){try{if(QxClient.isGecko()){var d=this._attachedClientWindow.getElement();}else{var d=this._attachedClientWindow.getClientDocument().getElement();};for(var i=0,l=vEventTypes.length;i<l;i++){QxDom.removeEventListener(d,vEventTypes[i],vFunctionPointer);};}catch(ex){throw new Error("QxEventManager:Failed to detach window event types:"+vEventTypes+":"+ex);};};QxEventManager.getOriginalTargetObject=function(vNode){if(vNode==document.documentElement){vNode=document.body;};while(vNode!=null&&vNode._QxWidget==null){try{vNode=vNode.parentNode;}catch(vDomEvent){vNode=null;};};return vNode?vNode._QxWidget:null;};QxEventManager.getOriginalTargetObjectFromEvent=function(vDomEvent,vWindow){var vNode=vDomEvent.target||vDomEvent.srcElement;if(vWindow){var vDocument=vWindow.document;if(vNode==vWindow||vNode==vDocument||vNode==vDocument.documentElement||vNode==vDocument.body){return vDocument.body._QxWidget;};};return QxEventManager.getOriginalTargetObject(vNode);};QxEventManager.getRelatedOriginalTargetObjectFromEvent=function(vDomEvent){return QxEventManager.getOriginalTargetObject(vDomEvent.relatedTarget||(vDomEvent.type==QxConst.EVENT_TYPE_MOUSEOVER?vDomEvent.fromElement:vDomEvent.toElement));};QxEventManager.getTargetObject=function(vNode,vObject){if(!vObject){var vObject=QxEventManager.getOriginalTargetObject(vNode);if(!vObject){return null;};};while(vObject){if(!vObject.getEnabled()){return null;};if(!vObject.getAnonymous()){break;};vObject=vObject.getParent();};return vObject;};QxEventManager.getTargetObjectFromEvent=function(vDomEvent){return QxEventManager.getTargetObject(vDomEvent.target||vDomEvent.srcElement);};QxEventManager.getRelatedTargetObjectFromEvent=function(vDomEvent){return QxEventManager.getTargetObject(vDomEvent.relatedTarget||(vDomEvent.type==QxConst.EVENT_TYPE_MOUSEOVER?vDomEvent.fromElement:vDomEvent.toElement));};if(QxClient.isMshtml()){QxEventManager.stopDomEvent=function(vDomEvent){vDomEvent.returnValue=false;};}else {QxEventManager.stopDomEvent=function(vDomEvent){vDomEvent.preventDefault();vDomEvent.returnValue=false;};};proto._onkeyevent=function(vDomEvent){if(this.getDisposed()||typeof QxKeyEvent!=QxConst.TYPEOF_FUNCTION||!window.application.isReady()){return;};if(!vDomEvent){vDomEvent=this._attachedClientWindow.getElement().event;};var vType=vDomEvent.type;var vDomTarget=vDomEvent.target||vDomEvent.srcElement;var vKeyCode=vDomEvent.keyCode||vDomEvent.charCode;switch(vKeyCode){case QxKeyEvent.keys.esc:case QxKeyEvent.keys.tab:if(typeof QxMenuManager!==QxConst.TYPEOF_UNDEFINED){QxMenuManager.update();};break;};var vTarget=this.getCaptureWidget()||this.getFocusRoot().getActiveChild();if(vTarget==null||!vTarget.getEnabled()){return false;};var vDomEventTarget=vTarget.getElement();if(!this.getAllowClientSelectAll()){if(vDomEvent.ctrlKey&&(vKeyCode==65||vKeyCode==97)){switch(vDomTarget.tagName){case "INPUT":case "TEXTAREA":case "IFRAME":break;default:QxEventManager.stopDomEvent(vDomEvent);};};};var vKeyEventObject=new QxKeyEvent(vType,vDomEvent,vDomTarget,vTarget,null,vKeyCode);if(vDomEvent.type==QxConst.EVENT_TYPE_KEYDOWN){this._checkKeyEventMatch(vKeyEventObject);};vTarget.dispatchEvent(vKeyEventObject);if(typeof QxDragAndDropManager!==QxConst.TYPEOF_UNDEFINED){QxDragAndDropManager.handleKeyEvent(vKeyEventObject);};vKeyEventObject.dispose();QxWidget.flushGlobalQueues();};if(QxClient.isMshtml()){proto._onmouseevent=function(vDomEvent){if(!window.application.isReady()){return;};window.application.postLoad();if(!vDomEvent){vDomEvent=this._attachedClientWindow.getElement().event;};var vDomTarget=vDomEvent.target||vDomEvent.srcElement;var vType=vDomEvent.type;if(vType==QxConst.EVENT_TYPE_MOUSEMOVE){if(this._mouseIsDown&&vDomEvent.button==0){this._onmouseevent_post(vDomEvent,QxConst.EVENT_TYPE_MOUSEUP);this._mouseIsDown=false;};}else {if(vType==QxConst.EVENT_TYPE_MOUSEDOWN){this._mouseIsDown=true;}else if(vType==QxConst.EVENT_TYPE_MOUSEUP){this._mouseIsDown=false;};if(vType==QxConst.EVENT_TYPE_MOUSEUP&&!this._lastMouseDown&&((new Date).valueOf()-this._lastMouseEventDate)<250){this._onmouseevent_post(vDomEvent,QxConst.EVENT_TYPE_MOUSEDOWN);}else if(vType==QxConst.EVENT_TYPE_DBLCLICK&&this._lastMouseEventType==QxConst.EVENT_TYPE_MOUSEUP&&((new Date).valueOf()-this._lastMouseEventDate)<250){this._onmouseevent_post(vDomEvent,QxConst.EVENT_TYPE_CLICK);};switch(vType){case QxConst.EVENT_TYPE_MOUSEDOWN:case QxConst.EVENT_TYPE_MOUSEUP:case QxConst.EVENT_TYPE_CLICK:case QxConst.EVENT_TYPE_DBLCLICK:case QxConst.EVENT_TYPE_CONTEXTMENU:this._lastMouseEventType=vType;this._lastMouseEventDate=(new Date).valueOf();this._lastMouseDown=vType==QxConst.EVENT_TYPE_MOUSEDOWN;};};this._onmouseevent_post(vDomEvent,vType,vDomTarget);};}else {proto._onmouseevent=function(vDomEvent){if(!window.application.isReady()){return;};window.application.postLoad();var vDomTarget=vDomEvent.target;var vType=vDomEvent.type;switch(vType){case QxConst.EVENT_TYPE_DOMMOUSESCROLL:vType=QxConst.EVENT_TYPE_MOUSEWHEEL;break;case QxConst.EVENT_TYPE_CLICK:case QxConst.EVENT_TYPE_DBLCLICK:if(vDomEvent.button!=QxMouseEvent.buttons.left){return;};case QxConst.EVENT_TYPE_MOUSEDOWN:if(vDomTarget&&vDomTarget.localName=="IMG"){QxEventManager.stopDomEvent(vDomEvent);};};this._onmouseevent_post(vDomEvent,vType,vDomTarget);};};proto._onmouseevent_post=function(vDomEvent,vType,vDomTarget){try{var vEventObject,vDispatchTarget,vTarget,vOriginalTarget,vRelatedTarget;vDispatchTarget=this.getCaptureWidget();vOriginalTarget=QxEventManager.getOriginalTargetObject(vDomTarget);if(!QxUtil.isValidObject(vDispatchTarget)){vDispatchTarget=vTarget=QxEventManager.getTargetObject(null,vOriginalTarget);}else {vTarget=QxEventManager.getTargetObject(null,vOriginalTarget);};if(!vTarget){return false;};switch(vType){case QxConst.EVENT_TYPE_CONTEXTMENU:if(!this.getAllowClientContextMenu()){QxEventManager.stopDomEvent(vDomEvent);};break;case QxConst.EVENT_TYPE_MOUSEDOWN:QxFocusManager.mouseFocus=true;var vRoot=vTarget.getFocusRoot();if(vRoot){this.setFocusRoot(vRoot);vRoot.setActiveChild(vTarget);vRoot.setFocusedChild(vTarget.isFocusable()?vTarget:vRoot);};this._ignoreBlur=true;break;};if((vTarget&&!vTarget.isSeeable())||(vDispatchTarget&&!vDispatchTarget.isSeeable())){return false;};var vDomEventTarget=vTarget.getElement();switch(vType){case QxConst.EVENT_TYPE_MOUSEOVER:case QxConst.EVENT_TYPE_MOUSEOUT:vRelatedTarget=QxEventManager.getRelatedTargetObjectFromEvent(vDomEvent);if(vRelatedTarget==vTarget){return;};};try{vEventObject=new QxMouseEvent(vType,vDomEvent,vDomTarget,vTarget,vOriginalTarget,vRelatedTarget);}catch(ex){return this.error("Failed to create mouse event:"+ex);};QxMouseEvent._storeEventState(vEventObject);try{var vReturnValue=vDispatchTarget?vDispatchTarget.dispatchEvent(vEventObject):true;}catch(ex){return this.error("Failed to dispatch mouse event:"+ex);};switch(vType){case QxConst.EVENT_TYPE_MOUSEDOWN:if(typeof QxPopupManager!==QxConst.TYPEOF_UNDEFINED){QxPopupManager.update(vTarget);};if(typeof QxMenuManager!==QxConst.TYPEOF_UNDEFINED){QxMenuManager.update(vTarget);};break;case QxConst.EVENT_TYPE_MOUSEOVER:if(typeof QxToolTipManager!==QxConst.TYPEOF_UNDEFINED){QxToolTipManager.handleMouseOver(vEventObject);};break;case QxConst.EVENT_TYPE_MOUSEOUT:if(typeof QxToolTipManager!==QxConst.TYPEOF_UNDEFINED){QxToolTipManager.handleMouseOut(vEventObject);};break;case QxConst.EVENT_TYPE_MOUSEWHEEL:vReturnValue?this._onmousewheel(vOriginalTarget||vDispatchTarget,vEventObject):QxEventManager.stopDomEvent(vDomEvent);break;};if(typeof QxDragAndDropManager!==QxConst.TYPEOF_UNDEFINED&&vTarget){QxDragAndDropManager.handleMouseEvent(vEventObject);};vEventObject.dispose();vEventObject=null;QxWidget.flushGlobalQueues();}catch(ex){return this.error("Failed to handle mouse event:"+ex);};};if(QxClient.isGecko()){proto._onmousewheel=function(vTarget,vEvent){if(vTarget==null){return;};if(vTarget.getOverflowY()==QxWidget.SCROLL_VALUE_HIDDEN){return this._onmousewheel(vTarget.getParent(),vEvent);};var vScrollTop=vTarget.getScrollTop();var vDelta=20*vEvent.getWheelDelta();if(vScrollTop==0&&vDelta>0){return this._onmousewheel(vTarget.getParent(),vEvent);};var vScrollHeight=vTarget.getScrollHeight();var vClientHeight=vTarget.getClientHeight();if(vScrollTop+vClientHeight>=vScrollHeight&&vDelta<0){return this._onmousewheel(vTarget.getParent(),vEvent);};vTarget.setScrollTop(vScrollTop-vDelta);vEvent.preventDefault();};}else {proto._onmousewheel=QxUtil.returnTrue;};proto._ondragevent=function(vEvent){if(!vEvent){vEvent=window.event;};QxEventManager.stopDomEvent(vEvent);};proto._onselectevent=function(e){if(!e){e=window.event;};var vTarget=QxEventManager.getOriginalTargetObjectFromEvent(e);if(vTarget&&!vTarget.getSelectable()){QxEventManager.stopDomEvent(e);};};proto._onwindowblur=function(e){if(!window.application.isReady()){return;};if(this._ignoreBlur){delete this._ignoreBlur;return;};this._allowFocus=true;this.setCaptureWidget(null);if(typeof QxPopupManager!==QxConst.TYPEOF_UNDEFINED){QxPopupManager.update();};if(typeof QxMenuManager!==QxConst.TYPEOF_UNDEFINED){QxMenuManager.update();};if(typeof QxDragAndDropManager!==QxConst.TYPEOF_UNDEFINED){QxDragAndDropManager.globalCancelDrag();};if(this._attachedClientWindow){this._attachedClientWindow.getClientDocument().createDispatchEvent(QxConst.EVENT_TYPE_BLUR);};};proto._onwindowfocus=function(e){if(!window.application.isReady()){return;};if(!this._allowFocus){return;};delete this._allowFocus;this.setCaptureWidget(null);if(this._attachedClientWindow){this._attachedClientWindow.getClientDocument().createDispatchEvent(QxConst.EVENT_TYPE_FOCUS);};};proto._onwindowresize=function(e){this._attachedClientWindow.getClientDocument().createDispatchEvent(QxConst.EVENT_TYPE_RESIZE);};proto.dispose=function(){if(this.getDisposed()){return;};this.detachEvents();delete this.__onmouseevent;delete this.__onkeyevent;delete this.__ondragevent;delete this.__onselectevent;delete this.__onwindowblur;delete this.__onwindowfocus;delete this.__onwindowresize;this._lastMouseEventType=null;this._lastMouseDown=null;this._lastMouseEventDate=null;if(this._commands){for(var vHash in this._commands){this._commands[vHash].dispose();delete this._commands[vHash];};this._commands=null;};QxObject.prototype.dispose.call(this);};function QxFocusManager(vWidget){QxTarget.call(this);if(QxUtil.isValidObject(vWidget)){this._attachedWidget=vWidget;};};QxFocusManager.extend(QxManager,"QxFocusManager");QxFocusManager.mouseFocus=false;proto.getAttachedWidget=function(){return this._attachedWidget;};QxFocusManager.tabEventType=QxClient.isMshtml()?QxConst.EVENT_TYPE_KEYDOWN:QxConst.EVENT_TYPE_KEYPRESS;proto._onkeyevent=function(vContainer,vEvent){if(vEvent.getKeyCode()!=QxKeyEvent.keys.tab||vEvent.getType()!=QxFocusManager.tabEventType){return;};QxFocusManager.mouseFocus=false;var vCurrent=this.getAttachedWidget().getFocusedChild();if(!vEvent.getShiftKey()){var vNext=vCurrent?this.getWidgetAfter(vContainer,vCurrent):this.getFirstWidget(vContainer);}else{var vNext=vCurrent?this.getWidgetBefore(vContainer,vCurrent):this.getLastWidget(vContainer);};if(vNext){vNext.setFocused(true);vNext._ontabfocus();};vEvent.stopPropagation();vEvent.preventDefault();};proto.compareTabOrder=function(c1,c2){if(c1==c2){return 0;};var t1=c1.getTabIndex();var t2=c2.getTabIndex();if(t1!=t2){return t1-t2;};var y1=QxDom.getComputedPageBoxTop(c1.getElement());var y2=QxDom.getComputedPageBoxTop(c2.getElement());if(y1!=y2){return y1-y2;};var x1=QxDom.getComputedPageBoxLeft(c1.getElement());var x2=QxDom.getComputedPageBoxLeft(c2.getElement());if(x1!=x2){return x1-x2;};var z1=c1.getZIndex();var z2=c2.getZIndex();if(z1!=z2){return z1-z2;};return 0;};proto.getFirstWidget=function(vParentContainer){return this._getFirst(vParentContainer,null);};proto.getLastWidget=function(vParentContainer){return this._getLast(vParentContainer,null);};proto.getWidgetAfter=function(vParentContainer,vWidget){if(vParentContainer==vWidget){return this.getFirstWidget(vParentContainer);};if(vWidget.getAnonymous()){vWidget=vWidget.getParent();};if(vWidget==null){return[];};var vAll=[];this._getAllAfter(vParentContainer,vWidget,vAll);vAll.sort(this.compareTabOrder);return vAll.length>0?vAll[0]:this.getFirstWidget(vParentContainer);};proto.getWidgetBefore=function(vParentContainer,vWidget){if(vParentContainer==vWidget){return this.getLastWidget(vParentContainer);};if(vWidget.getAnonymous()){vWidget=vWidget.getParent();};if(vWidget==null){return[];};var vAll=[];this._getAllBefore(vParentContainer,vWidget,vAll);vAll.sort(this.compareTabOrder);var vChildrenLength=vAll.length;return vChildrenLength>0?vAll[vChildrenLength-1]:this.getLastWidget(vParentContainer);};proto._getAllAfter=function(vParent,vWidget,vArray){var vChildren=vParent.getChildren();var vCurrentChild;var vChildrenLength=vChildren.length;for(var i=0;i<vChildrenLength;i++){vCurrentChild=vChildren[i];if(!(vCurrentChild instanceof QxParent)&&!(vCurrentChild instanceof QxTerminator)){continue;};if(vCurrentChild.isFocusable()&&vCurrentChild.getTabIndex()>0&&this.compareTabOrder(vWidget,vCurrentChild)<0){vArray.push(vChildren[i]);};if(!vCurrentChild.isFocusRoot()&&vCurrentChild instanceof QxParent){this._getAllAfter(vCurrentChild,vWidget,vArray);};};};proto._getAllBefore=function(vParent,vWidget,vArray){var vChildren=vParent.getChildren();var vCurrentChild;var vChildrenLength=vChildren.length;for(var i=0;i<vChildrenLength;i++){vCurrentChild=vChildren[i];if(!(vCurrentChild instanceof QxParent)&&!(vCurrentChild instanceof QxTerminator)){continue;};if(vCurrentChild.isFocusable()&&vCurrentChild.getTabIndex()>0&&this.compareTabOrder(vWidget,vCurrentChild)>0){vArray.push(vCurrentChild);};if(!vCurrentChild.isFocusRoot()&&vCurrentChild instanceof QxParent){this._getAllBefore(vCurrentChild,vWidget,vArray);};};};proto._getFirst=function(vParent,vFirstWidget){var vChildren=vParent.getChildren();var vCurrentChild;var vChildrenLength=vChildren.length;for(var i=0;i<vChildrenLength;i++){vCurrentChild=vChildren[i];if(!(vCurrentChild instanceof QxParent)&&!(vCurrentChild instanceof QxTerminator)){continue;};if(vCurrentChild.isFocusable()&&vCurrentChild.getTabIndex()>0){if(vFirstWidget==null||this.compareTabOrder(vCurrentChild,vFirstWidget)<0){vFirstWidget=vCurrentChild;};};if(!vCurrentChild.isFocusRoot()&&vCurrentChild instanceof QxParent){vFirstWidget=this._getFirst(vCurrentChild,vFirstWidget);};};return vFirstWidget;};proto._getLast=function(vParent,vLastWidget){var vChildren=vParent.getChildren();var vCurrentChild;var vChildrenLength=vChildren.length;for(var i=0;i<vChildrenLength;i++){vCurrentChild=vChildren[i];if(!(vCurrentChild instanceof QxParent)&&!(vCurrentChild instanceof QxTerminator)){continue;};if(vCurrentChild.isFocusable()&&vCurrentChild.getTabIndex()>0){if(vLastWidget==null||this.compareTabOrder(vCurrentChild,vLastWidget)>0){vLastWidget=vCurrentChild;};};if(!vCurrentChild.isFocusRoot()&&vCurrentChild instanceof QxParent){vLastWidget=this._getLast(vCurrentChild,vLastWidget);};};return vLastWidget;};proto.dispose=function(){if(this.getDisposed()){return;};this._attachedWidget=null;QxObject.prototype.dispose.call(this);};function QxTextile(s){var r=s;qtags=[ ["\\*","strong"],["\\?\\?","cite"],["\\+","ins"],["~","sub"],["\\^","sup"],["@","code"] ];for(var i=0;i<qtags.length;i++){ttag=qtags[i][0];htag=qtags[i][1];re=new RegExp(ttag+"\\b(.+?)\\b"+ttag,"g");r=r.replace(re,"<"+htag+">"+"$1"+"</"+htag+">");};re=new RegExp("\\b_(.+?)_\\b","g");r=r.replace(re,"<em>$1</em>");re=new RegExp("[\s\n]-(.+?)-[\s\n]","g");r=r.replace(re,"<del>$1</del>");re=new RegExp('"\\b(.+?)\\(\\b(.+?)\\b\\)":([^\\s]+)','g');r=r.replace(re,'<a href="$3" title="$2">$1</a>');re=new RegExp('"\\b(.+?)\\b":([^\\s]+)','g');r=r.replace(re,'<a href="$2">$1</a>');re=new RegExp("!\\b(.+?)\\(\\b(.+?)\\b\\)!","g");r=r.replace(re,'<img src="$1" alt="$2">');re=new RegExp("!\\b(.+?)\\b!","g");r=r.replace(re,'<img src="$1">');re=new RegExp("(.*)\n([^#\*\n].*)","g");r=r.replace(re,"$1<br/>$2");re=new RegExp("\n<br/>","g");r=r.replace(re,"\n");lines=r.split("\n");nr=QxConst.CORE_EMPTY;for(var i=0;i<lines.length;i++){line = lines[i].replace(/\s*$/,QxConst.CORE_EMPTY);changed=0;if (line.search(/^\s*bq\.\s+/) != -1){line = line.replace(/^\s*bq\.\s+/,"\t<blockquote>")+"</blockquote>";changed=1;};if (line.search(/^\s*h[1-6]\.\s+/) != -1){re=new RegExp("h([1-6])\.(.+)","g");line=line.replace(re,"<h$1>$2</h$1>");changed=1;};if (line.search(/^\s*\*\s+/) != -1){line = line.replace(/^\s*\*\s+/,"\t<liu>") + "</liu>";changed=1;};if (line.search(/^\s*#\s+/) != -1){line = line.replace(/^\s*#\s+/,"\t<lio>") + "</lio>";changed=1;};if (!changed && (line.replace(/\s/g,QxConst.CORE_EMPTY).length > 0)){line="<p>"+line+"</p>";};lines[i]=line+"\n";};inlist=0;listtype=QxConst.CORE_EMPTY;for(var i=0;i<lines.length;i++){line=lines[i];if (inlist && listtype == "ul" && !line.match(/^\t<liu/)){line="</ul>\n"+line;inlist=0;};if (inlist && listtype == "ol" && !line.match(/^\t<lio/)){line="</ol>\n"+line;inlist=0;};if (!inlist && line.match(/^\t<liu/)){line="<ul>"+line;inlist=1;listtype="ul";};if (!inlist && line.match(/^\t<lio/)){line="<ol>"+line;inlist=1;listtype="ol";};lines[i]=line;};r=lines.join("\n");r = r.replace(/li[o|u]>/g, "li>");return r;};function QxTextField(vValue){QxTerminator.call(this);if(typeof vValue===QxConst.TYPEOF_STRING){this.setValue(vValue);};this.setTagName("INPUT");this.setHtmlProperty("type","text");this.setHtmlAttribute("autocomplete","OFF");this.setTabIndex(1);this.setSelectable(true);this.enableInlineEvent(QxConst.EVENT_TYPE_INPUT);this.addEventListener(QxConst.EVENT_TYPE_BLUR,this._onblur);this.addEventListener(QxConst.EVENT_TYPE_FOCUS,this._onfocus);};QxTextField.extend(QxTerminator,"QxTextField");QxTextField.changeProperty({name:"appearance",type:QxConst.TYPEOF_STRING,defaultValue:"text-field"});QxTextField.addProperty({name:"value",type:QxConst.TYPEOF_STRING,defaultValue:QxConst.CORE_EMPTY});QxTextField.addProperty({name:"maxLength",type:QxConst.TYPEOF_NUMBER});QxTextField.addProperty({name:"readOnly",type:QxConst.TYPEOF_BOOLEAN});QxTextField.addProperty({name:"selectionStart",type:QxConst.TYPEOF_NUMBER});QxTextField.addProperty({name:"selectionLength",type:QxConst.TYPEOF_NUMBER});QxTextField.addProperty({name:"selectionText",type:QxConst.TYPEOF_STRING});QxTextField.addProperty({name:"validator",type:QxConst.TYPEOF_FUNCTION});QxTextField.addProperty({name:"font",type:QxConst.TYPEOF_OBJECT,instance:"QxFont",convert:QxFontCache,allowMultipleArguments:true});proto._clonePropertyIgnoreList+=",selectionStart,selectionLength,selectionText";proto._modifyEnabled=function(propValue,propOldValue,propData){propValue?this.removeHtmlAttribute(QxConst.CORE_DISABLED):this.setHtmlAttribute(QxConst.CORE_DISABLED,QxConst.CORE_DISABLED);return QxTerminator.prototype._modifyEnabled.call(this,propValue,propOldValue,propData);};proto._modifyValue=function(propValue,propOldValue,propData){this._inValueProperty=true;this.setHtmlProperty(propData.name,propValue==null?QxConst.CORE_EMPTY:propValue);delete this._inValueProperty;return true;};proto._modifyMaxLength=function(propValue,propOldValue,propData){return propValue?this.setHtmlProperty(propData.name,propValue):this.removeHtmlProperty(propData.name);};proto._modifyReadOnly=function(propValue,propOldValue,propData){return propValue?this.setHtmlProperty(propData.name,propData.name):this.removeHtmlProperty(propData.name);};proto._modifyFont=function(propValue,propOldValue,propData){this._invalidatePreferredInnerDimensions();if(propValue){propValue.applyWidget(this);}else if(propOldValue){propOldValue.resetWidget(this);};return true;};proto.getComputedValue=function(e){this._visualPropertyCheck();return this.getElement().value;};QxTextField.createRegExpValidator=function(vRegExp){return function(s){return vRegExp.test(s);};};proto.isValid=function(){var vValidator=this.getValidator();return !vValidator||vValidator(this.getValue());};proto.isComputedValid=function(){var vValidator=this.getValidator();return !vValidator||vValidator(this.getComputedValue());};proto._computePreferredInnerWidth=function(){return 120;};proto._computePreferredInnerHeight=function(){return 15;};proto._textOnFocus=null;proto._ontabfocus=function(e){this.selectAll();};proto._onfocus=function(e){this._textOnFocus=this.getComputedValue();};proto._onblur=function(e){var vValue=this.getComputedValue().toString();if(this._textOnFocus!=vValue){this.setValue(vValue);};this.setSelectionLength(0);};if(QxClient.isMshtml()){proto._getRange=function(){this._visualPropertyCheck();return this.getElement().createTextRange();};proto._getSelectionRange=function(){this._visualPropertyCheck();return this.getTopLevelWidget().getDocumentElement().selection.createRange();};proto.setSelectionStart=function(vStart){this._visualPropertyCheck();var vText=this.getElement().value;var i=0;while(i<vStart){i=vText.indexOf("\r\n",i);if(i==-1){break;};vStart--;i++;};var vRange=this._getRange();vRange.collapse();vRange.move("character",vStart);vRange.select();};proto.getSelectionStart=function(){this._visualPropertyCheck();var vSelectionRange=this._getSelectionRange();if(!this.getElement().contains(vSelectionRange.parentElement())){return-1;};var vRange=this._getRange();vRange.setEndPoint("EndToStart",vSelectionRange);return vRange.text.length;};proto.setSelectionLength=function(vLength){this._visualPropertyCheck();var vSelectionRange=this._getSelectionRange();if(!this.getElement().contains(vSelectionRange.parentElement())){return;};vSelectionRange.collapse();vSelectionRange.moveEnd("character",vLength);vSelectionRange.select();};proto.getSelectionLength=function(){this._visualPropertyCheck();var vSelectionRange=this._getSelectionRange();if(!this.getElement().contains(vSelectionRange.parentElement())){return 0;};return vSelectionRange.text.length;};proto.setSelectionText=function(vText){this._visualPropertyCheck();var vStart=this.getSelectionStart();var vSelectionRange=this._getSelectionRange();if(!this.getElement().contains(vSelectionRange.parentElement())){return;};vSelectionRange.text=vText;this.setValue(this.getElement().value);this.setSelectionStart(vStart);this.setSelectionLength(vText.length);return true;};proto.getSelectionText=function(){this._visualPropertyCheck();var vSelectionRange=this._getSelectionRange();if(!this.getElement().contains(vSelectionRange.parentElement())){return QxConst.CORE_EMPTY;};return vSelectionRange.text;};proto.selectAll=function(){this._visualPropertyCheck();if(this.getValue()!=null){this.setSelectionStart(0);this.setSelectionLength(this.getValue().length);};this.getElement().select();};proto.selectFromTo=function(vStart,vEnd){this._visualPropertyCheck();this.setSelectionStart(vStart);this.setSelectionLength(vEnd-vStart);};}else {proto.setSelectionStart=function(vStart){this._visualPropertyCheck();this.getElement().selectionStart=vStart;};proto.getSelectionStart=function(){this._visualPropertyCheck();return this.getElement().selectionStart;};proto.setSelectionLength=function(vLength){this._visualPropertyCheck();var el=this.getElement();if(QxUtil.isValidString(el.value)){el.selectionEnd=el.selectionStart+vLength;};};proto.getSelectionLength=function(){this._visualPropertyCheck();var el=this.getElement();return el.selectionEnd-el.selectionStart;};proto.setSelectionText=function(vText){this._visualPropertyCheck();var el=this.getElement();var vOldText=el.value;var vStart=el.selectionStart;var vOldTextBefore=vOldText.substr(0,vStart);var vOldTextAfter=vOldText.substr(el.selectionEnd);var vValue=el.value=vOldTextBefore+vText+vOldTextAfter;el.selectionStart=vStart;el.selectionEnd=vStart+vText.length;this.setValue(vValue);return true;};proto.getSelectionText=function(){this._visualPropertyCheck();return this.getElement().value.substr(this.getSelectionStart(),this.getSelectionLength());};proto.selectAll=function(){this._visualPropertyCheck();this.getElement().select();};proto.selectFromTo=function(vStart,vEnd){this._visualPropertyCheck();var el=this.getElement();el.selectionStart=vStart;el.selectionEnd=vEnd;};};proto.dispose=function(){if(this.getDisposed()){return;};this.removeEventListener(QxConst.EVENT_TYPE_BLUR,this._onblur);this.removeEventListener(QxConst.EVENT_TYPE_FOCUS,this._onfocus);QxTerminator.prototype.dispose.call(this);};function QxPasswordField(vText){QxTextField.call(this,vText);this.setHtmlProperty("type","password");};QxPasswordField.extend(QxTextField,"QxPasswordField");function QxTextArea(vValue){QxTextField.call(this,vValue);this.setTagName("textarea");this.removeHtmlProperty("type");};QxTextArea.extend(QxTextField,"QxTextArea");QxTextArea.changeProperty({name:"appearance",type:QxConst.TYPEOF_STRING,defaultValue:"text-area"});QxTextArea.addProperty({name:"wrap",type:QxConst.TYPEOF_BOOLEAN});if(QxClient.isMshtml()){proto._modifyWrap=function(propValue,propOldValue,propData){return this.setStyleProperty("whiteSpace",propValue?"normal":"nowrap");};}else {proto._modifyWrap=function(propValue,propOldValue,propData){return this.setHtmlProperty("wrap",propValue?"soft":"off");};};proto._computePreferredInnerHeight=function(){return 60;};function QxTimer(vInterval){QxTarget.call(this);this.setEnabled(false);if(QxUtil.isValidNumber(vInterval)){this.setInterval(vInterval);};var o=this;this.__oninterval=function(){o._oninterval();};};QxTimer.extend(QxTarget,"QxTimer");QxTimer.addProperty({name:"interval",type:QxConst.TYPEOF_NUMBER,defaultValue:1000});proto._intervalHandle=null;proto._modifyEnabled=function(propValue,propOldValue,propData){if(propOldValue){window.clearInterval(this._intervalHandle);this._intervalHandle=null;}else if(propValue){this._intervalHandle=window.setInterval(this.__oninterval,this.getInterval());};return true;};proto.start=function(){this.setEnabled(true);};proto.startWith=function(vInterval){this.setInterval(vInterval);this.start();};proto.stop=function(){this.setEnabled(false);};proto.restart=function(){this.stop();this.start();};proto.restartWith=function(vInterval){this.stop();this.startWith(vInterval);};proto._oninterval=function(){if(this.getEnabled()){this.createDispatchEvent(QxConst.EVENT_TYPE_INTERVAL);};};proto.dispose=function(){if(this.getDisposed()){return;};this.stop();if(this._intervalHandler){window.clearInterval(this._intervalHandle);this._intervalHandler=null;};this.__oninterval=null;return QxTarget.prototype.dispose.call(this);};QxTimer.once=function(vFunction,vObject,vTimeout){var vTimer=new QxTimer(vTimeout);vTimer.addEventListener(QxConst.EVENT_TYPE_INTERVAL,function(e){vFunction.call(vObject,e);vTimer.dispose();vObject=null;},vObject);vTimer.start();};if(QxClient.isMshtml()){function DOMParser(){};DOMParser.prototype= {toString:function(){return "[object DOMParser]" },parseFromString:function($str,$contentType){var $xmlDocument=new ActiveXObject("Microsoft.XMLDOM");$xmlDocument.loadXML($str);return $xmlDocument;},parseFromStream:new Function,baseURI:"" };function XMLSerializer(){};XMLSerializer.prototype= {toString:function(){return "[object XMLSerializer]" },serializeToString:function($root){return $root.xml||$root.outerHTML;},serializeToStream:new Function };};QxXmlExtras={};QxXmlExtras.createXmlDom=function(){if(document.implementation&&document.implementation.createDocument){return document.implementation.createDocument("","",null);};if(window.ActiveXObject){return new ActiveXObject("Microsoft.XMLDOM");};throw new Error("This browser does not support xml dom creation.");};if(window.XPathEvaluator){var xpe=new XPathEvaluator();if(!Element.prototype.selectSingleNode){Element.prototype.selectSingleNode=function(xpath){return xpe.evaluate(xpath,this,xpe.createNSResolver(this),XPathResult.FIRST_ORDERED_NODE_TYPE,null).singleNodeValue;};};if(!Element.prototype.selectNodes){Element.prototype.selectNodes=function(xpath){var result=xpe.evaluate(xpath,this,xpe.createNSResolver(this),XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null);var nodes=[];for(var i=0;i<result.snapshotLength;i++){nodes[i]=result.snapshotItem(i);};return nodes;};};if(!Document.prototype.selectSingleNode){Document.prototype.selectSingleNode=function(xpath){return xpe.evaluate(xpath,this,xpe.createNSResolver(this),XPathResult.FIRST_ORDERED_NODE_TYPE,null).singleNodeValue;};};if(!Document.prototype.selectNodes){Document.prototype.selectNodes=function(xpath){var result=xpe.evaluate(xpath,this,xpe.createNSResolver(this),XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null);var nodes=[];for(var i=0;i<result.snapshotLength;i++){nodes[i]=result.snapshotItem(i);};return nodes;};};Element.prototype.__defineGetter__('text',function(){var text="";for(var i=0;i<this.childNodes.length;i++){text+=this.childNodes[i].text!=null?this.childNodes[i].text:"";};return text;});Element.prototype.__lookupGetter__('text');Attr.prototype.__defineGetter__('text',function(){return this.nodeValue});Attr.prototype.__lookupGetter__('text');Text.prototype.__defineGetter__('text',function(){return this.nodeValue});Text.prototype.__lookupGetter__('text');};function QxXmlHttpLoader(){QxTarget.call(this);if(!QxXmlHttpLoader._ok){throw new Error("Your Browser does not support XML-HTTP!");};var o=this;this.__onreadystatechange=function(){o._onreadystatechange();};this.__onload=function(){o._onload();};this.__onreadystatefix=function(){o.req.readyState=4;o._onreadystatechange();};};QxXmlHttpLoader.extend(QxTarget,"QxXmlHttpLoader");QxXmlHttpLoader._http=window.XMLHttpRequest?true:false;QxXmlHttpLoader._activex=window.ActiveXObject&&!QxClient.isOpera()?true:false;QxXmlHttpLoader._activexobj=null;QxXmlHttpLoader._ok=QxXmlHttpLoader._http||QxXmlHttpLoader._activex;QxXmlHttpLoader.addProperty({name:"requestMethod",type:QxConst.TYPEOF_STRING,defaultValue:"GET"});if(QxXmlHttpLoader._activex){var servers=["MSXML2","Microsoft","MSXML","MSXML3"];for(var i=0;i<servers.length;i++){try{var o=new ActiveXObject(servers[i]+".XMLHTTP");QxXmlHttpLoader._activexobj=servers[i];o=null;}catch(ex){};};};QxXmlHttpLoader.addProperty({name:"xml"});proto._requestHeaders={};proto.removeRequestHeader=function(headerName){delete this._requestHeaders[headerName];return true;};proto.setRequestHeader=function(headerName,headerValue){this._requestHeaders[headerName]=headerValue;return true;};proto._applyHeaders=function(){if(!this.req)return;var vHeaders=this._requestHeaders;var headerName;for(headerName in vHeaders){this.req.setRequestHeader(headerName,vHeaders[headerName]);}};proto._requestProperties={};proto.removeRequestProperty=function(propName){delete this._requestProperties[propName];return true;};proto.setRequestProperty=function(propName,propValue){this._requestProperties[propName]=propValue;return true;};proto._applyRequestProperties=function(vUrl){var vProperties=this._requestProperties;var propName;if(vUrl!=null){vUrl+=(vUrl.indexOf("?")==-1)?"?":"&";}else vUrl="";for(propName in vProperties){vUrl+=propName+"="+encodeURIComponent(vProperties[propName])+"&";}return vUrl;};proto.load=function(url){try{this.req=QxXmlHttpLoader._activex?new ActiveXObject(QxXmlHttpLoader._activexobj+".XMLHTTP"):new XMLHttpRequest();if(typeof this.req.abort!=QxConst.TYPEOF_UNDEFINED){this.req.abort();};this.req.onreadystatechange=this.__onreadystatechange;if(this.req.readyState==null){this.req.readyState=1;req.addEventListener(QxConst.EVENT_TYPE_LOAD,this.__onreadystatefix,false);};var method=this.getRequestMethod();if(method=="GET")url=this._applyRequestProperties(url);this.req.open(method,url,true);this._applyHeaders();var data=null;if(method=="POST")data=this._applyRequestProperties();return QxXmlHttpLoader._activex?this.req.send(data):this.req.send(data);}catch(e){throw new Error("Your browser does not support XML-HTTP:\n"+e);};};proto._onload=function(){};proto._onreadystatechange=function(){switch(this.req.readyState){case 1:if(this.hasEventListeners("init")){this.dispatchEvent(new QxEvent("init"),true);};break;case 2:if(this.hasEventListeners("connect")){this.dispatchEvent(new QxEvent("connect"),true);};if(!QxXmlHttpLoader._activex)if(this.req.status!=200&&this.req.status!=0){if(typeof this.req.abort!=QxConst.TYPEOF_UNDEFINED)this.req.abort();throw new Error("File request failed:"+this.req.statusText+"["+this.req.status+"]");};break;case 3:if(this.hasEventListeners("download")){this.dispatchEvent(new QxEvent("download"),true);};try{var l=this.req.getResponseHeader("Content-Length");if(typeof l!=QxConst.TYPEOF_NUMBER){l=NaN;};}catch(ex){var l=NaN;};break;case 4:if(this.hasEventListeners("done")){this.dispatchEvent(new QxEvent("done"),true);};if(this.req.status!=200&&this.req.status!=0){if(this.req.abort){this.req.abort();};throw new Error("File request failed:"+this.req.statusText+"["+this.req.status+"]");};if(this.req.responseXML){if(!this.req.responseXML.documentElement){var s = String(this.req.responseText).replace(/<\?xml[^\?]*\?>/, QxConst.CORE_EMPTY);this.req.responseXML.loadXML(s);};if(!this.req.responseXML.documentElement){throw new Error("Missing Document Element!");};if(this.req.responseXML.documentElement.tagName=="parseerror"){throw new Error("XML-File is not well-formed!");};this.dispatchEvent(new QxDataEvent("complete",this.req.responseXML),true);}else {this.dispatchEvent(new QxDataEvent("complete",this.req.responseText),true);};};};proto.dispose=function(){if(this._disposed){return;};if(this.req){this.req=null;};this.__onreadystatechange=null;return QxTarget.prototype.dispose.call(this);};function QxData(c){QxTarget.call(this);this._requestQueue=[];this._storeQueue=[];this._cache={};this._interval=new QxTimer(25);this._processRequestQueue=false;var o=this;this._interval.addEventListener(QxConst.EVENT_TYPE_INTERVAL,function(){o.checkProcess();});};QxData.extend(QxTarget,"QxData");proto.loadData=function(dataKey){if(this.getDisposed()){return;};this._requestQueue.push(dataKey);if(!this._interval.getEnabled()){this._interval.start();};};proto.checkProcess=function(){if(this.getDisposed()){return;};if(this._processRequestQueue){return;};this._processRequestQueue=true;while(this._requestQueue.length>0){this.process(this._requestQueue.shift(),new QxXmlHttpLoader);};this._processRequestQueue=false;this._interval.stop();};proto.process=function(dataKey,loader){if(this.getDisposed()){return;};this._storeQueue.push(dataKey);var o=this;loader.addEventListener("complete",function(e){o.processComplete(e.getData());loader.dispose();});loader.load(this.makeRequest(dataKey));};proto.makeRequest=function(dataKey){var t=dataKey.indexOf("[");var p0=dataKey.substring(0,t);var p1=dataKey.substring(t+1,dataKey.length-1);return "data/" + p0 + "/" + p1 + ".xml" + "?r=" + Math.round(Math.random()^Math.random()*100000);};proto.processComplete=function(xmlData){var req=this.getRequest(xmlData);var res=this.parseData(req,xmlData);this.mergeCacheData(res);this.dispatchEvent(new QxDataEvent("update"+req.toFirstUp(),this),true);};proto.getRequest=function(xmlData){return xmlData.documentElement.getElementsByTagName("PfxRequest")[0].getElementsByTagName("PfxSoap")[0].getAttribute("reqname");};proto.getResultXml=function(xmlData){return xmlData.documentElement.getElementsByTagName("PfxResult")[0];};proto.mapXmlToObject=function(xmlFrag){var r={};var c=xmlFrag.childNodes;for(var i=0;i<c.length;i++){if(c[i].nodeType==1){r[c[i].tagName]=c[i].firstChild.nodeValue;};};return r;};proto.parseData=function(req,xmlData){var handler=this["_parseData_"+req];if(typeof handler!=QxConst.TYPEOF_FUNCTION){throw new Error("QxData:The Parser function is not defined:_parseData_"+req+"!");};return handler.call(this,xmlData);};proto.mergeCacheData=function(res){for(i in res){this._cache[i]=res[i];};};proto.dispose=function(){if(this._disposed){return;};QxObject.prototype.dispose.call(this);if(typeof this._requestQueue==QxConst.TYPEOF_OBJECT){for(var i=0;i<this._requestQueue.length;i++){delete this._requestQueue[i];};};delete this._requestQueue;if(typeof this._storeQueue==QxConst.TYPEOF_OBJECT){for(var i=0;i<this._storeQueue.length;i++){delete this._storeQueue[i];};};delete this._storeQueue;if(typeof this._cache==QxConst.TYPEOF_OBJECT){for(i in this._cache){delete this._cache[i];};};this._cache=null;if(this._interval){this._interval.dispose();};this._interval=null;this._processRequestQueue=null;};function QxImageManager(){QxManager.call(this);this._iconThemes={};this._widgetThemes={};this._sources={};this._uris={};this._aliases={};this.setCorePath(QxSettings.imageCorePath);this.setIconPath(QxSettings.imageIconPath);this.setWidgetPath(QxSettings.imageWidgetPath);};QxImageManager.extend(QxManager,"QxImageManager");QxImageManager.addProperty({name:"corePath",type:QxConst.TYPEOF_STRING,impl:"coreAlias"});QxImageManager.addProperty({name:"iconPath",type:QxConst.TYPEOF_STRING,impl:"iconAlias"});QxImageManager.addProperty({name:"iconTheme",type:QxConst.TYPEOF_STRING,impl:"iconAlias"});QxImageManager.addProperty({name:"widgetPath",type:QxConst.TYPEOF_STRING,impl:"widgetAlias"});QxImageManager.addProperty({name:"widgetTheme",type:QxConst.TYPEOF_STRING,impl:"widgetAlias"});proto._modifyCoreAlias=function(propValue,propOldValue,propData){this.defineAlias("core",propValue);return true;};proto._modifyIconAlias=function(propValue,propOldValue,propData){var vIconPath=this.getIconPath();var vIconTheme=this.getIconTheme();if(QxUtil.isValidString(vIconPath)&&QxUtil.isValidString(vIconTheme)){this.defineAlias("icons",vIconPath+QxConst.CORE_SLASH+vIconTheme);}else {this.removeAlias("icons");};return true;};proto._modifyWidgetAlias=function(propValue,propOldValue,propData){var vWidgetPath=this.getWidgetPath();var vWidgetTheme=this.getWidgetTheme();if(QxUtil.isValidString(vWidgetPath)&&QxUtil.isValidString(vWidgetTheme)){this.defineAlias("widgets",vWidgetPath+QxConst.CORE_SLASH+vWidgetTheme);}else {this.removeAlias("widgets");};return true;};proto.registerIconTheme=function(vTheme){var vId=vTheme.getId();if(this._iconThemes[vId]){throw new Error("A icon theme with this ID is already known");};this._iconThemes[vId]=vTheme;if(this.getIconTheme()==null){this.setIconTheme(vId);};};proto.registerWidgetTheme=function(vTheme){var vId=vTheme.getId();if(this._widgetThemes[vId]){throw new Error("A widget theme with this ID is already known");};this._widgetThemes[vId]=vTheme;if(this.getWidgetTheme()==null){this.setWidgetTheme(vId);};};proto.getPreloadImageList=function(){var vPreload={};for(var vSource in this._sources){if(this._sources[vSource]){vPreload[vSource]=true;};};return vPreload;};proto.getPostPreloadImageList=function(){var vPreload={};for(var vSource in this._sources){if(!this._sources[vSource]){vPreload[vSource]=true;};};return vPreload;};proto.buildUri=function(vPath,vForceUpdate){var vUri=this._uris[vPath];if(vForceUpdate||typeof vUri===QxConst.TYPEOF_UNDEFINED){vUri=this._uris[vPath]=this._buildUri(vPath);};return vUri;};proto.defineAlias=function(vPrefix,vPath){this._aliases[vPrefix]=vPath;this._updateImages();};proto.removeAlias=function(vPrefix){delete this._aliases[vPrefix];};proto._buildUri=function(vPath,vForce){switch(vPath.charAt(0)){case QxConst.CORE_SLASH:case QxConst.CORE_DOT:return vPath;default:if(vPath.startsWith(QxConst.URI_HTTP)||vPath.startsWith(QxConst.URI_HTTPS)||vPath.startsWith(QxConst.URI_FILE)){return vPath;};var vAlias=vPath.substring(0,vPath.indexOf(QxConst.CORE_SLASH));var vResolved=this._aliases[vAlias];if(QxUtil.isValidString(vResolved)){return vResolved+vPath.substring(vAlias.length);};return vPath;};};proto._updateImages=function(){var vAll=this.getAll();var vObject;for(var vHashCode in vAll){vObject=vAll[vHashCode];vObject.setPreloader(QxImagePreloaderManager.create(this.buildUri(vObject.getSource(),true)));};return true;};proto.createThemeList=function(vParent,xCor,yCor){var vButton;var vThemes=this._iconThemes;var vIcon = "icons/16/icons.png";var vPrefix="Icon Theme:";var vEvent=QxConst.EVENT_TYPE_EXECUTE;for(var vTheme in vThemes){var vButton=new QxButton(vPrefix+vThemes[vTheme].getTitle(),vIcon);vButton.setLocation(xCor,yCor);vButton.addEventListener(vEvent,new Function("QxImageManager.setIconTheme('"+vTheme+"')"));vParent.add(vButton);yCor+=30;};};proto.dispose=function(){if(this.getDisposed()){return;};this._iconThemes=null;this._widgetThemes=null;this._sources=null;this._uris=null;this._aliases=null;return QxManager.prototype.dispose.call(this);};QxImageManager=new QxImageManager;function QxImagePreloaderManager(){QxManager.call(this);};QxImagePreloaderManager.extend(QxManager,"QxImagePreloaderManager");proto.add=function(vObject){this._objects[vObject.getUri()]=vObject;};proto.remove=function(vObject){delete this._objects[vObject.getUri()];};proto.has=function(vSource){return this._objects[vSource]!=null;};proto.get=function(vSource){return this._objects[vSource];};proto.create=function(vSource){if(this._objects[vSource]){return this._objects[vSource];};return new QxImagePreloader(vSource);};QxImagePreloaderManager=new QxImagePreloaderManager;function QxImagePreloader(vSource){if(QxImagePreloaderManager.has(vSource)){this.debug("Reuse QxImagePreloader in old-style!");this.debug("Please use QxImagePreloaderManager.create(source)instead!");return QxImagePreloaderManager.get(vSource);};QxTarget.call(this);this._element=new Image;this._element._QxImagePreloader=this;this._element.onload=QxImagePreloader.__onload;this._element.onerror=QxImagePreloader.__onerror;this._source=vSource;this._element.src=vSource;if(QxClient.isMshtml()){this._isPng = /\.png$/i.test(this._element.nameProp);};QxImagePreloaderManager.add(this);};QxImagePreloader.extend(QxTarget,"QxImagePreloader");QxImagePreloader.get=function(vSource){};proto._source=null;proto._isLoaded=false;proto._isErroneous=false;proto.getUri=function(){return this._source;};proto.getSource=function(){return this._source;};proto.isLoaded=function(){return this._isLoaded;};proto.isErroneous=function(){return this._isErroneous;};proto._isPng=false;proto.getIsPng=function(){return this._isPng;};if(QxClient.isGecko()){proto.getWidth=function(){return this._element.naturalWidth;};proto.getHeight=function(){return this._element.naturalHeight;};}else {proto.getWidth=function(){return this._element.width;};proto.getHeight=function(){return this._element.height;};};QxImagePreloader.__onload=function(){this._QxImagePreloader._onload();};QxImagePreloader.__onerror=function(){this._QxImagePreloader._onerror();};proto._onload=function(){this._isLoaded=true;this._isErroneous=false;if(this.hasEventListeners(QxConst.EVENT_TYPE_LOAD)){this.dispatchEvent(new QxEvent(QxConst.EVENT_TYPE_LOAD),true);};};proto._onerror=function(){this.debug("Could not load:"+this._source);this._isLoaded=false;this._isErroneous=true;if(this.hasEventListeners(QxConst.EVENT_TYPE_ERROR)){this.dispatchEvent(new QxEvent(QxConst.EVENT_TYPE_ERROR),true);};};proto.dispose=function(){if(this.getDisposed()){return;};if(this._element){this._element.onload=this._element.onerror=null;this._element._QxImagePreloader=null;this._element=null;};this._isLoaded=this._isErroneous=this._isPng=false;return QxTarget.prototype.dispose.call(this);};function QxImagePreloaderSystem(vPreloadList){QxTarget.call(this);this._list=vPreloadList;};QxImagePreloaderSystem.extend(QxTarget,"QxImagePreloaderSystem");proto.start=function(){for(vSource in this._list){vPreloader=QxImagePreloaderManager.create(QxImageManager.buildUri(vSource));if(vPreloader.isErroneous()||vPreloader.isLoaded()){delete this._list[vSource];}else {vPreloader._origSource=vSource;vPreloader.addEventListener(QxConst.EVENT_TYPE_LOAD,this._onload,this);vPreloader.addEventListener(QxConst.EVENT_TYPE_ERROR,this._onerror,this);};};this._check();};proto._onload=function(e){delete this._list[e.getTarget()._origSource];this._check();};proto._onerror=function(e){delete this._list[e.getTarget()._origSource];this._check();};proto._check=function(){if(QxUtil.isObjectEmpty(this._list)){this.createDispatchEvent(QxConst.EVENT_TYPE_COMPLETED);};};proto.dispose=function(){if(this.getDisposed()){return true;};this._list=null;delete this._list;return QxTarget.prototype.dispose.call(this);};function QxImage(vSource,vWidth,vHeight){QxTerminator.call(this);this.setHtmlProperty(QxImage.ATTR_ALT,QxConst.CORE_EMPTY);this.setHtmlProperty(QxImage.ATTR_TITLE,QxConst.CORE_EMPTY);this.setSource(QxUtil.isValid(vSource)?vSource:QxImageManager.BLANK);this.setWidth(QxUtil.isValid(vWidth)?vWidth:QxConst.CORE_AUTO);this.setHeight(QxUtil.isValid(vHeight)?vHeight:QxConst.CORE_AUTO);this.setSelectable(false);};QxImage.extend(QxTerminator,"QxImage");QxImage.ATTR_ALT=QxConst.KEY_ALT;QxImage.ATTR_TITLE="title";QxImage.BORDER_NONE="0 none";QxImage.RESET_VALIGN="top";QxImage.addProperty({name:"source",type:QxConst.TYPEOF_STRING});QxImage.addProperty({name:"preloader",type:QxConst.TYPEOF_OBJECT});QxImage.addProperty({name:"loaded",type:QxConst.TYPEOF_BOOLEAN,defaultValue:false});QxImage.addProperty({name:"resizeToInner",type:QxConst.TYPEOF_BOOLEAN,defaultValue:false});QxImage.changeProperty({name:"appearance",type:QxConst.TYPEOF_STRING,defaultValue:"image"});proto._onload=function(){this.setLoaded(true);};proto._onerror=function(){this.debug("Could not load:"+this.getSource());this.setLoaded(false);if(this.hasEventListeners(QxConst.EVENT_TYPE_ERROR)){this.dispatchEvent(new QxEvent(QxConst.EVENT_TYPE_ERROR),true);};};proto._beforeAppear=function(){var vSource=this.getSource();if(QxUtil.isValidString(vSource)){QxImageManager._sources[vSource]++;};return QxTerminator.prototype._beforeAppear.call(this);};proto._beforeDisappear=function(){var vSource=this.getSource();if(QxUtil.isValidString(vSource)){if(QxImageManager._sources[vSource]==1){delete QxImageManager._sources[vSource];}else {QxImageManager._sources[vSource]--;};};return QxTerminator.prototype._beforeDisappear.call(this);};proto._modifySource=function(propValue,propOldValue,propData){if(propValue&&typeof QxImageManager._sources[propValue]===QxConst.TYPEOF_UNDEFINED){QxImageManager._sources[propValue]=0;};if(propOldValue){if(QxImageManager._sources[propValue]==1){delete QxImageManager._sources[propValue];}else {QxImageManager._sources[propValue]--;};};if(this.isCreated()){if(propValue){this.setPreloader(QxImagePreloaderManager.create(QxImageManager.buildUri(propValue)));}else if(propOldValue){this._resetContent();this.setPreloader(null);};};return true;};proto._modifyPreloader=function(propValue,propOldValue,propData){if(propOldValue){propOldValue.removeEventListener(QxConst.EVENT_TYPE_LOAD,this._onload,this);propOldValue.removeEventListener(QxConst.EVENT_TYPE_ERROR,this._onerror,this);};if(propValue){QxImageManager.add(this);this.forceLoaded(false);if(propValue.isErroneous()){this._onerror();}else if(propValue.isLoaded()){this.setLoaded(true);}else {propValue.addEventListener(QxConst.EVENT_TYPE_LOAD,this._onload,this);propValue.addEventListener(QxConst.EVENT_TYPE_ERROR,this._onerror,this);};}else {QxImageManager.remove(this);this.setLoaded(false);};return true;};proto._modifyLoaded=function(propValue,propOldValue,propData){if(propValue&&this.isCreated()){this._applyContent();}else if(!propValue){this._invalidatePreferredInnerWidth();this._invalidatePreferredInnerHeight();};return true;};proto._modifyElement=function(propValue,propOldValue,propData){if(propValue){if(!this._image){this._image=new Image;this._image.style.border=QxImage.BORDER_NONE;this._image.style.verticalAlign=QxImage.RESET_VALIGN;if(!QxClient.isMshtml()){this._applyEnabled();};};propValue.appendChild(this._image);};QxTerminator.prototype._modifyElement.call(this,propValue,propOldValue,propData);if(propValue){var vSource=this.getSource();if(QxUtil.isValidString(vSource)){this.setPreloader(QxImagePreloaderManager.create(QxImageManager.buildUri(vSource)));};};return true;};proto._postApply=function(){if(!this.getLoaded()){return;};this._postApplyDimensions();this._updateContent();};if(QxClient.isMshtml()){QxImage.IMGLOADER_START="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='";QxImage.IMGLOADER_STOP="',sizingMethod='scale')";QxImage.FILTER_GRAY="Gray()Alpha(Opacity=30)";proto._modifyEnabled=function(propValue,propOldValue,propData){if(this._image){this._applyEnabled();};return QxTerminator.prototype._modifyEnabled.call(this,propValue,propOldValue,propData);};proto._updateContent=function(vSource){var i=this._image;var pl=this.getPreloader();if(pl.getIsPng()&&this.getEnabled()){i.src=QxImageManager.buildUri(QxConst.IMAGE_BLANK);i.style.filter=QxImage.IMGLOADER_START+(vSource||pl.getSource())+QxImage.IMGLOADER_STOP;}else {i.src=vSource||pl.getSource();i.style.filter=this.getEnabled()?QxConst.CORE_EMPTY:QxImage.FILTER_GRAY;};};proto._resetContent=function(){var i=this._image;i.src=QxImageManager.buildUri(QxConst.IMAGE_BLANK);i.style.filter=QxConst.CORE_EMPTY;};proto._applyEnabled=proto._postApply;}else {proto._postApply=function(){if(!this.getLoaded()){return;};this._postApplyDimensions();this._updateContent();};proto._updateContent=function(vSource){this._image.src=vSource||this.getPreloader().getSource();};proto._resetContent=function(){this._image.src=QxImageManager.buildUri(QxConst.IMAGE_BLANK);};proto._applyEnabled=function(){if(this._image){var o=this.getEnabled()?QxConst.CORE_EMPTY:0.3;var s=this._image.style;s.opacity=s.KhtmlOpacity=s.MozOpacity=o;};};proto._modifyEnabled=function(propValue,propOldValue,propData){if(this._image){this._applyEnabled();};return QxTerminator.prototype._modifyEnabled.call(this,propValue,propOldValue,propData);};};proto._computePreferredInnerWidth=function(){if(this.getLoaded()){return this.getPreloader().getWidth();}else if(QxUtil.isValidString(this.getSource())){var vPreloader=QxImagePreloaderManager.get(QxImageManager.buildUri(this.getSource()));if(vPreloader&&vPreloader.isLoaded()){return vPreloader.getWidth();};};return 0;};proto._computePreferredInnerHeight=function(){if(this.getLoaded()){return this.getPreloader().getHeight();}else if(QxUtil.isValidString(this.getSource())){var vPreloader=QxImagePreloaderManager.get(QxImageManager.buildUri(this.getSource()));if(vPreloader&&vPreloader.isLoaded()){return vPreloader.getHeight();};};return 0;};proto._applyContent=function(){QxTerminator.prototype._applyContent.call(this);QxWidget.flushGlobalQueues();};if(QxClient.isMshtml()){proto._postApplyDimensions=function(){try{var vImageStyle=this._image.style;if(this.getResizeToInner()){vImageStyle.pixelWidth=this.getInnerWidth();vImageStyle.pixelHeight=this.getInnerHeight();}else {vImageStyle.pixelWidth=this.getPreferredInnerWidth();vImageStyle.pixelHeight=this.getPreferredInnerHeight();};}catch(ex){this.error(ex,"_postApplyDimensions");};};}else {proto._postApplyDimensions=function(){try{var vImageNode=this._image;if(this.getResizeToInner()){vImageNode.width=this.getInnerWidth();vImageNode.height=this.getInnerHeight();}else {vImageNode.width=this.getPreferredInnerWidth();vImageNode.height=this.getPreferredInnerHeight();};}catch(ex){this.error(ex,"_postApplyDimensions");};};};if(QxClient.isMshtml()){proto._changeInnerWidth=function(vNew,vOld){if(this.getResizeToInner()){this._image.style.pixelWidth=vNew;};};proto._changeInnerHeight=function(vNew,vOld){if(this.getResizeToInner()){this._image.style.pixelHeight=vNew;};};}else {proto._changeInnerWidth=function(vNew,vOld){if(this.getResizeToInner()){this._image.width=vNew;};};proto._changeInnerHeight=function(vNew,vOld){if(this.getResizeToInner()){this._image.height=vNew;};};};proto.dispose=function(){if(this.getDisposed()){return true;};var vPreloader=this.getPreloader();if(vPreloader){vPreloader.removeEventListener(QxConst.EVENT_TYPE_LOAD,this._onload,this);vPreloader.removeEventListener(QxConst.EVENT_TYPE_ERROR,this._onerror,this);this.forcePreloader(null);};if(this._image){this._image.style.filter=QxConst.CORE_EMPTY;this._image=null;};QxImageManager.remove(this);return QxTerminator.prototype.dispose.call(this);};function QxIconTheme(vId,vTitle){QxObject.call(this);if(QxUtil.isInvalidString(vId)){throw new Error("Each instance of QxIconTheme need an unique ID!");};this.setId(vId);this.setTitle(QxUtil.isValidString(vTitle)?vTitle:vId);try{QxImageManager.registerIconTheme(this);}catch(ex){throw new Error("Could not register Theme:"+ex);};};QxIconTheme.extend(QxObject,"QxColorTheme");QxIconTheme.addProperty({name:"id",type:QxConst.TYPEOF_STRING,allowNull:false});QxIconTheme.addProperty({name:"title",type:QxConst.TYPEOF_STRING,allowNull:false,defaultValue:QxConst.CORE_EMPTY});new QxIconTheme("crystalsvg","Crystal SVG");new QxIconTheme("nuvola","Nuvola");new QxIconTheme("kids","Kids");function QxWidgetTheme(vId,vTitle){QxObject.call(this);if(QxUtil.isInvalidString(vId)){throw new Error("Each instance of QxWidgetTheme need an unique ID!");};this.setId(vId);this.setTitle(QxUtil.isValidString(vTitle)?vTitle:vId);try{QxImageManager.registerWidgetTheme(this);}catch(ex){throw new Error("Could not register Theme:"+ex);};};QxWidgetTheme.extend(QxObject,"QxColorTheme");QxWidgetTheme.addProperty({name:"id",type:QxConst.TYPEOF_STRING,allowNull:false});QxWidgetTheme.addProperty({name:"title",type:QxConst.TYPEOF_STRING,allowNull:false,defaultValue:QxConst.CORE_EMPTY});new QxWidgetTheme("windows","Windows");function QxDragEvent(vType,vMouseEvent,vTarget,vRelatedTarget){this._mouseEvent=vMouseEvent;var vOriginalTarget=null;switch(vType){case QxConst.EVENT_TYPE_DRAGSTART:case QxConst.EVENT_TYPE_DRAGOVER:vOriginalTarget=vMouseEvent.getOriginalTarget();};QxMouseEvent.call(this,vType,vMouseEvent.getDomEvent(),vTarget.getElement(),vTarget,vOriginalTarget,vRelatedTarget);};QxDragEvent.extend(QxMouseEvent,"QxDragEvent");proto.getMouseEvent=function(){return this._mouseEvent;};proto.startDrag=function(){if(this.getType()!=QxConst.EVENT_TYPE_DRAGSTART){throw new Error("QxDragEvent startDrag can only be called during the dragstart event:"+this.getType());};this.stopPropagation();QxDragAndDropManager.startDrag();};proto.addData=function(sType,oData){QxDragAndDropManager.addData(sType,oData);};proto.getData=function(sType){return QxDragAndDropManager.getData(sType);};proto.clearData=function(){QxDragAndDropManager.clearData();};proto.getDropDataTypes=function(){return QxDragAndDropManager.getDropDataTypes();};proto.addAction=function(sAction){QxDragAndDropManager.addAction(sAction);};proto.removeAction=function(sAction){QxDragAndDropManager.removeAction(sAction);};proto.getAction=function(){return QxDragAndDropManager.getCurrentAction();};proto.clearActions=function(){QxDragAndDropManager.clearActions();};proto.dispose=function(){if(this.getDisposed()){return;};this._mouseEvent=null;return QxMouseEvent.prototype.dispose.call(this);};function QxDragAndDropManager(){QxTarget.call(this);this._data={};this._actions={};this._cursors={};};QxDragAndDropManager.extend(QxManager,"QxDragAndDropManager");QxDragAndDropManager.addProperty({name:"sourceWidget",type:QxConst.TYPEOF_OBJECT});QxDragAndDropManager.addProperty({name:"destinationWidget",type:QxConst.TYPEOF_OBJECT});QxDragAndDropManager.addProperty({name:"cursor",type:QxConst.TYPEOF_OBJECT});QxDragAndDropManager.addProperty({name:"currentAction",type:QxConst.TYPEOF_STRING});proto._actionNames= {move:"move",copy:"copy",alias:"alias",nodrop:"nodrop" };proto._cursorPath = "widgets/cursors/";proto._cursorFormat="gif";proto._lastDestinationEvent=null;proto.initCursors=function(){if(this._initCursorsDone){return;};var vCursor;for(var vAction in this._actionNames){vCursor=this._cursors[vAction]=new QxImage(this._cursorPath+vAction+QxConst.CORE_DOT+this._cursorFormat);vCursor.setZIndex(1e8);};this._initCursorsDone=true;};proto._getClientDocument=function(){return window.application.getClientWindow().getClientDocument();};proto._modifyDestinationWidget=function(propValue,propOldValue,propData){if(propValue){propValue.dispatchEvent(new QxDragEvent(QxConst.EVENT_TYPE_DRAGDROP,this._lastDestinationEvent,propValue,this.getSourceWidget()));this._lastDestinationEvent=null;};return true;};proto.addData=function(vMimeType,vData){this._data[vMimeType]=vData;};proto.getData=function(vMimeType){return this._data[vMimeType];};proto.clearData=function(){this._data={};};proto.getDropDataTypes=function(){var vDestination=this.getDestinationWidget();var vDropTypes=[];if(!vDestination){return vDropTypes;};var vDropDataTypes=vDestination.getDropDataTypes();for(var i=0,l=vDropDataTypes.length;i<l;i++){if(vDropDataTypes[i]in this._data){vDropTypes.push(vDropDataTypes[i]);};};return vDropTypes;};proto.startDrag=function(){if(!this._dragCache){throw new Error("Invalid usage of startDrag. Missing dragInfo!");};this._dragCache.dragHandlerActive=true;this.setSourceWidget(this._dragCache.sourceWidget);};proto._fireUserEvents=function(fromWidget,toWidget,e){if(fromWidget&&fromWidget!=toWidget&&fromWidget.hasEventListeners(QxConst.EVENT_TYPE_DRAGOUT)){fromWidget.dispatchEvent(new QxDragEvent(QxConst.EVENT_TYPE_DRAGOUT,e,fromWidget,toWidget),true);};if(toWidget){if(fromWidget!=toWidget&&toWidget.hasEventListeners(QxConst.EVENT_TYPE_DRAGOVER)){toWidget.dispatchEvent(new QxDragEvent(QxConst.EVENT_TYPE_DRAGOVER,e,toWidget,fromWidget),true);};if(toWidget.hasEventListeners(QxConst.EVENT_TYPE_DRAGMOVE)){toWidget.dispatchEvent(new QxDragEvent(QxConst.EVENT_TYPE_DRAGMOVE,e,toWidget,null),true);};};};proto.handleMouseEvent=function(e){switch(e.getType()){case QxConst.EVENT_TYPE_MOUSEDOWN:return this._handleMouseDown(e);case QxConst.EVENT_TYPE_MOUSEUP:return this._handleMouseUp(e);case QxConst.EVENT_TYPE_MOUSEMOVE:return this._handleMouseMove(e);};};proto._handleMouseDown=function(e){if(e.getDefaultPrevented()){return;};this._dragCache= {startScreenX:e.getScreenX(),startScreenY:e.getScreenY(),pageX:e.getPageX(),pageY:e.getPageY(),sourceWidget:e.getTarget(),sourceTopLevel:e.getTarget().getTopLevelWidget(),dragHandlerActive:false,hasFiredDragStart:false };};proto._handleMouseMove=function(e){if(!this._dragCache){return;};if(this._dragCache.dragHandlerActive){this._dragCache.pageX=e.getPageX();this._dragCache.pageY=e.getPageY();var currentDropTarget=this.getDropTarget(e);this.setCurrentAction(currentDropTarget?this._evalNewAction(e.getShiftKey(),e.getCtrlKey(),e.getAltKey()):null);this._fireUserEvents(this._dragCache.currentDropWidget,currentDropTarget,e);this._dragCache.currentDropWidget=currentDropTarget;this._renderCursor();}else if(!this._dragCache.hasFiredDragStart){if(Math.abs(e.getScreenX()-this._dragCache.startScreenX)>5||Math.abs(e.getScreenY()-this._dragCache.startScreenY)>5){this._dragCache.sourceWidget.dispatchEvent(new QxDragEvent(QxConst.EVENT_TYPE_DRAGSTART,e,this._dragCache.sourceWidget),true);this._dragCache.hasFiredDragStart=true;if(this._dragCache.dragHandlerActive){this._fireUserEvents(this._dragCache.currentDropWidget,this._dragCache.sourceWidget,e);this._dragCache.currentDropWidget=this._dragCache.sourceWidget;this._getClientDocument().setCapture(true);};};};};proto._handleMouseUp=function(e){if(!this._dragCache){return;};if(this._dragCache.dragHandlerActive){this._endDrag(this.getDropTarget(e),e);}else {this._dragCache=null;};};proto.handleKeyEvent=function(e){if(!this._dragCache){return;};switch(e.getType()){case QxConst.EVENT_TYPE_KEYDOWN:this._handleKeyDown(e);return;case QxConst.EVENT_TYPE_KEYUP:this._handleKeyUp(e);return;};};proto._handleKeyDown=function(e){if(e.getKeyCode()==QxKeyEvent.keys.esc){this.cancelDrag();}else if(this.getCurrentAction()!=null){switch(e.getKeyCode()){case QxKeyEvent.keys.shift:case QxKeyEvent.keys.ctrl:case QxKeyEvent.keys.alt:this.setAction(this._evalNewAction(e.getShiftKey(),e.getCtrlKey(),e.getAltKey()));this._renderCursor();e.preventDefault();};};};proto._handleKeyUp=function(e){var bShiftPressed=e.getKeyCode()==QxKeyEvent.keys.shift;var bCtrlPressed=e.getKeyCode()==QxKeyEvent.keys.strl;var bAltPressed=e.getKeyCode()==QxKeyEvent.keys.alt;if(bShiftPressed||bCtrlPressed||bAltPressed){if(this.getCurrentAction()!=null){this.setAction(this._evalNewAction(!bShiftPressed&&e.getShiftKey(),! bCtrlPressed&&e.getCtrlKey(),!bAltPressed&&e.getAltKey()));this._renderCursor();e.preventDefault();};};};proto.cancelDrag=function(e){this._endDrag(null,e);};proto.globalCancelDrag=function(){if(this._dragCache&&this._dragCache.dragHandlerActive){this._endDragCore();};};proto._endDrag=function(currentDestinationWidget,e){if(currentDestinationWidget){this._lastDestinationEvent=e;this.setDestinationWidget(currentDestinationWidget);};this.getSourceWidget().dispatchEvent(new QxDragEvent(QxConst.EVENT_TYPE_DRAGEND,e,this.getSourceWidget(),currentDestinationWidget),true);this._fireUserEvents(this._dragCache&&this._dragCache.currentDropWidget,null,e);this._endDragCore();};proto._endDragCore=function(){var oldCursor=this.getCursor();if(oldCursor){oldCursor._style.display=QxConst.DISPLAY_NONE;this.forceCursor(null);};if(this._dragCache){this._dragCache.currentDropWidget=null;this._dragCache=null;};this._getClientDocument().setCapture(false);this.clearData();this.clearActions();this.setSourceWidget(null);this.setDestinationWidget(null);};proto._renderCursor=function(){this.initCursors();var vNewCursor;var vOldCursor=this.getCursor();switch(this.getCurrentAction()){case this._actionNames.move:vNewCursor=this._cursors.move;break;case this._actionNames.copy:vNewCursor=this._cursors.copy;break;case this._actionNames.alias:vNewCursor=this._cursors.alias;break;default:vNewCursor=this._cursors.nodrop;};if(vNewCursor!=vOldCursor&&vOldCursor!=null){vOldCursor._style.display=QxConst.DISPLAY_NONE;};if(!vNewCursor._initialLayoutDone){this._getClientDocument().add(vNewCursor);QxWidget.flushGlobalQueues();};vNewCursor._applyRuntimeLeft(this._dragCache.pageX+5);vNewCursor._applyRuntimeTop(this._dragCache.pageY+15);if(vNewCursor!=vOldCursor){vNewCursor._style.display=QxConst.CORE_EMPTY;};this.forceCursor(vNewCursor);};proto.supportsDrop=function(vWidget){var vTypes=vWidget.getDropDataTypes();if(!vTypes){return false;};for(var i=0;i<vTypes.length;i++){if(vTypes[i]in this._data){return true;};};return false;};if(QxClient.isGecko()){proto.getDropTarget=function(e){var vCurrent=e.getTarget();if(vCurrent==this._dragCache.sourceWidget){vCurrent=this._dragCache.sourceTopLevel.getWidgetFromPoint(e.getPageX(),e.getPageY());}else {vCurrent=QxEventManager.getTargetObject(null,vCurrent);};while(vCurrent!=null&&vCurrent!=this._dragCache.sourceWidget){if(!vCurrent.supportsDrop(this._dragCache)){return null;};if(this.supportsDrop(vCurrent)){return vCurrent;};vCurrent=vCurrent.getParent();};return null;};}else {proto.getDropTarget=function(e){var vCurrent=e.getTarget();while(vCurrent!=null){if(!vCurrent.supportsDrop(this._dragCache)){return null;};if(this.supportsDrop(vCurrent)){return vCurrent;};vCurrent=vCurrent.getParent();};return null;};};proto.addAction=function(vAction,vForce){this._actions[vAction]=true;if(vForce||this.getCurrentAction()==null){this.setCurrentAction(vAction);};};proto.clearActions=function(){this._actions={};this.setCurrentAction(null);};proto.removeAction=function(vAction){delete this._actions[vAction];if(this.getCurrentAction()==vAction){this.setCurrentAction(null);};};proto.setAction=function(vAction){if(vAction!=null&&!(vAction in this._actions)){this.addAction(vAction,true);}else {this.setCurrentAction(vAction);};};proto._evalNewAction=function(vKeyShift,vKeyCtrl,vKeyAlt){if(vKeyShift&&vKeyCtrl&&this._actionNames.alias in this._actions){return this._actionNames.alias;}else if(vKeyShift&&vKeyAlt&&this._actionNames.copy in this._actions){return this._actionNames.copy;}else if(vKeyShift&&this._actionNames.move in this._actions){return this._actionNames.move;}else if(vKeyAlt&&this._actionNames.alias in this._actions){return this._actionNames.alias;}else if(vKeyCtrl&&this._actionNames.copy in this._actions){return this._actionNames.copy;}else {for(var vAction in this._actions){return vAction;};};return null;};proto.dispose=function(){if(this.getDisposed()){return;};if(this._dragCache){this._dragCache.currentDropWidget=null;this._dragCache=null;};this.clearData();this.clearActions();this._actions=null;this._actionNames=null;this._lastDestinationEvent=null;if(this._cursors){if(this._cursors.move){this._cursors.move.dispose();delete this._cursors.move;};if(this._cursors.copy){this._cursors.copy.dispose();delete this._cursors.copy;};if(this._cursors.alias){this._cursors.alias.dispose();delete this._cursors.alias;};if(this._cursors.nodrop){this._cursors.nodrop.dispose();delete this._cursors.nodrop;};this._cursors=null;};return QxManager.prototype.dispose.call(this);};QxDragAndDropManager=new QxDragAndDropManager;function QxBoxLayout(vOrientation){QxParent.call(this);if(QxUtil.isValidString(vOrientation)){this.setOrientation(vOrientation);};};QxBoxLayout.extend(QxParent,"QxBoxLayout");QxBoxLayout.STR_REVERSED="-reversed";QxBoxLayout.addProperty({name:"orientation",type:QxConst.TYPEOF_STRING,possibleValues:[QxConst.ORIENTATION_HORIZONTAL,QxConst.ORIENTATION_VERTICAL],addToQueueRuntime:true});QxBoxLayout.addProperty({name:"spacing",type:QxConst.TYPEOF_NUMBER,defaultValue:0,addToQueueRuntime:true,impl:"layout"});QxBoxLayout.addProperty({name:"horizontalChildrenAlign",type:QxConst.TYPEOF_STRING,defaultValue:"left",possibleValues:["left","center","right"],impl:"layoutOrder",addToQueueRuntime:true});QxBoxLayout.addProperty({name:"verticalChildrenAlign",type:QxConst.TYPEOF_STRING,defaultValue:"top",possibleValues:["top","middle","bottom"],impl:"layoutOrder",addToQueueRuntime:true});QxBoxLayout.addProperty({name:"reverseChildrenOrder",type:QxConst.TYPEOF_BOOLEAN,defaultValue:false,impl:"layoutOrder",addToQueueRuntime:true});QxBoxLayout.addProperty({name:"stretchChildrenOrthogonalAxis",type:QxConst.TYPEOF_BOOLEAN,defaultValue:true,addToQueueRuntime:true});QxBoxLayout.addProperty({name:"useAdvancedFlexAllocation",type:QxConst.TYPEOF_BOOLEAN,defaultValue:false,addToQueueRuntime:true});proto._createLayoutImpl=function(){return this.getOrientation()==QxConst.ORIENTATION_VERTICAL?new QxVerticalBoxLayoutImpl(this):new QxHorizontalBoxLayoutImpl(this);};proto._layoutHorizontal=false;proto._layoutVertical=false;proto._layoutMode="left";proto.isHorizontal=function(){return this._layoutHorizontal;};proto.isVertical=function(){return this._layoutVertical;};proto.getLayoutMode=function(){if(this._layoutMode==null){this._updateLayoutMode();};return this._layoutMode;};proto._updateLayoutMode=function(){this._layoutMode=this._layoutVertical?this.getVerticalChildrenAlign():this.getHorizontalChildrenAlign();if(this.getReverseChildrenOrder()){this._layoutMode+=QxBoxLayout.STR_REVERSED;};};proto._invalidateLayoutMode=function(){this._layoutMode=null;};proto._modifyOrientation=function(propValue,propOldValue,propData){this._layoutHorizontal=propValue==QxConst.ORIENTATION_HORIZONTAL;this._layoutVertical=propValue==QxConst.ORIENTATION_VERTICAL;if(this._layoutImpl){this._layoutImpl.dispose();this._layoutImpl=null;};if(QxUtil.isValidString(propValue)){this._layoutImpl=this._createLayoutImpl();};return this._modifyLayoutOrder();};proto._modifyLayoutOrder=function(propValue,propOldValue,propData){this._invalidateLayoutMode();return this._modifyLayout();};proto._modifyLayout=function(propValue,propOldValue,propData){this._invalidatePreferredInnerDimensions();this._invalidateAccumulatedChildrenOuterWidth();this._invalidateAccumulatedChildrenOuterHeight();return true;};QxWidget.addCachedProperty({name:"accumulatedChildrenOuterWidth",defaultValue:null});QxWidget.addCachedProperty({name:"accumulatedChildrenOuterHeight",defaultValue:null});proto._computeAccumulatedChildrenOuterWidth=function(){var ch=this.getVisibleChildren(),chc,i=-1,sp=this.getSpacing(),s=-sp;while(chc=ch[++i]){s+=chc.getOuterWidth()+sp;};return s;};proto._computeAccumulatedChildrenOuterHeight=function(){var ch=this.getVisibleChildren(),chc,i=-1,sp=this.getSpacing(),s=-sp;while(chc=ch[++i]){s+=chc.getOuterHeight()+sp;};return s;};proto._recomputeChildrenStretchingX=function(){var ch=this.getVisibleChildren(),chc,i=-1;while(chc=ch[++i]){if(chc._recomputeStretchingX()&&chc._recomputeBoxWidth()){chc._recomputeOuterWidth();};};};proto._recomputeChildrenStretchingY=function(){var ch=this.getVisibleChildren(),chc,i=-1;while(chc=ch[++i]){if(chc._recomputeStretchingY()&&chc._recomputeBoxHeight()){chc._recomputeOuterHeight();};};};function QxVerticalBoxLayout(){QxBoxLayout.call(this,QxConst.ORIENTATION_VERTICAL);};QxVerticalBoxLayout.extend(QxBoxLayout,"QxVerticalBoxLayout");function QxHorizontalBoxLayout(){QxBoxLayout.call(this,QxConst.ORIENTATION_HORIZONTAL);};QxHorizontalBoxLayout.extend(QxBoxLayout,"QxHorizontalBoxLayout");function QxFlowLayout(){QxParent.call(this);};QxFlowLayout.extend(QxParent,"QxFlowLayout");QxFlowLayout.addProperty({name:"horizontalSpacing",type:QxConst.TYPEOF_NUMBER,defaultValue:0,addToQueueRuntime:true,impl:"layout"});QxFlowLayout.addProperty({name:"verticalSpacing",type:QxConst.TYPEOF_NUMBER,defaultValue:0,addToQueueRuntime:true,impl:"layout"});QxFlowLayout.addProperty({name:"horizontalChildrenAlign",type:QxConst.TYPEOF_STRING,defaultValue:"left",possibleValues:["left","right"],addToQueueRuntime:true});QxFlowLayout.addProperty({name:"verticalChildrenAlign",type:QxConst.TYPEOF_STRING,defaultValue:"top",possibleValues:["top","bottom"],addToQueueRuntime:true});QxFlowLayout.addProperty({name:"reverseChildrenOrder",type:QxConst.TYPEOF_BOOLEAN,defaultValue:false,addToQueueRuntime:true,impl:"layout"});proto._createLayoutImpl=function(){return new QxFlowLayoutImpl(this);};proto._changeInnerWidth=function(vNew,vOld){QxParent.prototype._changeInnerWidth.call(this,vNew,vOld);this._invalidatePreferredInnerHeight();};proto._modifyLayout=function(propValue,propOldValue,propData){this._invalidatePreferredInnerDimensions();return true;};function QxDockLayout(){QxParent.call(this);};QxDockLayout.extend(QxParent,"QxDockLayout");QxDockLayout.addProperty({name:"mode",type:QxConst.TYPEOF_STRING,defaultValue:QxConst.ORIENTATION_VERTICAL,possibleValues:[QxConst.ORIENTATION_VERTICAL,QxConst.ORIENTATION_HORIZONTAL,"ordered"],addToQueueRuntime:true});QxDockLayout.changeProperty({name:"width",addToQueue:true,unitDetection:"pixelPercent"});QxDockLayout.changeProperty({name:"minWidth",defaultValue:-Infinity,addToQueue:true,unitDetection:"pixelPercent"});QxDockLayout.changeProperty({name:"minWidth",defaultValue:-Infinity,addToQueue:true,unitDetection:"pixelPercent"});QxDockLayout.changeProperty({name:"height",addToQueue:true,unitDetection:"pixelPercent"});QxDockLayout.changeProperty({name:"minHeight",defaultValue:-Infinity,addToQueue:true,unitDetection:"pixelPercent"});QxDockLayout.changeProperty({name:"minHeight",defaultValue:-Infinity,addToQueue:true,unitDetection:"pixelPercent"});proto._createLayoutImpl=function(){return new QxDockLayoutImpl(this);};proto.addLeft=function(){this._addAlignedHorizontal(QxConst.ALIGN_LEFT,arguments);};proto.addRight=function(){this._addAlignedHorizontal(QxConst.ALIGN_RIGHT,arguments);};proto.addTop=function(){this._addAlignedVertical(QxConst.ALIGN_TOP,arguments);};proto.addBottom=function(){this._addAlignedVertical(QxConst.ALIGN_BOTTOM,arguments);};proto._addAlignedVertical=function(vAlign,vArgs){for(var i=0,l=vArgs.length;i<l;i++){vArgs[i].setVerticalAlign(vAlign);};this.add.apply(this,vArgs);};proto._addAlignedHorizontal=function(vAlign,vArgs){for(var i=0,l=vArgs.length;i<l;i++){vArgs[i].setHorizontalAlign(vAlign);};this.add.apply(this,vArgs);};function QxGridLayout(){QxParent.call(this);this._columnData=[];this._rowData=[];this._spans=[];};QxGridLayout.extend(QxParent,"QxGridLayout");QxGridLayout.addProperty({name:"horizontalSpacing",type:QxConst.TYPEOF_NUMBER,defaultValue:0,addToQueueRuntime:true,impl:"layout"});QxGridLayout.addProperty({name:"verticalSpacing",type:QxConst.TYPEOF_NUMBER,defaultValue:0,addToQueueRuntime:true,impl:"layout"});QxGridLayout.addProperty({name:"horizontalChildrenAlign",type:QxConst.TYPEOF_STRING,defaultValue:"left",possibleValues:["left","center","right"],addToQueueRuntime:true});QxGridLayout.addProperty({name:"verticalChildrenAlign",type:QxConst.TYPEOF_STRING,defaultValue:"top",possibleValues:["top","middle","bottom"],addToQueueRuntime:true});QxGridLayout.addProperty({name:"cellPaddingTop",type:QxConst.TYPEOF_NUMBER});QxGridLayout.addProperty({name:"cellPaddingRight",type:QxConst.TYPEOF_NUMBER});QxGridLayout.addProperty({name:"cellPaddingBottom",type:QxConst.TYPEOF_NUMBER});QxGridLayout.addProperty({name:"cellPaddingLeft",type:QxConst.TYPEOF_NUMBER});proto._createLayoutImpl=function(){return new QxGridLayoutImpl(this);};proto.add=function(vChild,vCol,vRow){vChild._col=vCol;vChild._row=vRow;if(this.isFillCell(vCol,vRow)){throw new Error("Could not insert child "+vChild+" into a fill cell:"+vCol+"x"+vRow);};QxParent.prototype.add.call(this,vChild);};proto._modifyLayout=function(propValue,propOldValue,propData){this._invalidatePreferredInnerDimensions();return true;};proto._syncDataFields=function(vData,vOldLength,vNewLength){if(vNewLength>vOldLength){for(var i=vOldLength;i<vNewLength;i++){vData[i]={};};}else if(vOldLength>vNewLength){vData.splice(vNewLength,vOldLength-vNewLength);};};proto._columnCount=0;proto.setColumnCount=function(vCount){this._columnCount=vCount;this._syncColumnDataFields();};proto.getColumnCount=function(){return this._columnCount;};proto.addColumn=function(){this._columnCount++;this._syncColumnDataFields();};proto.removeColumn=function(){if(this._columnCount>0){this._columnCount--;this._syncColumnDataFields();};};proto._syncColumnDataFields=function(){var vData=this._columnData;var vOldLength=vData.length;var vNewLength=this._columnCount;this._syncDataFields(vData,vOldLength,vNewLength);};proto._rowCount=0;proto.setRowCount=function(vCount){this._rowCount=vCount;this._syncRowDataFields();};proto.getRowCount=function(){return this._rowCount;};proto.addRow=function(){this._rowCount++;this._syncRowDataFields();};proto.removeRow=function(){if(this._rowCount>0){this._rowCount--;this._syncRowDataFields();};};proto._syncRowDataFields=function(){var vData=this._rowData;var vOldLength=vData.length;var vNewLength=this._rowCount;this._syncDataFields(vData,vOldLength,vNewLength);};proto._getColumnProperty=function(vColumnIndex,vProperty){try{return this._columnData[vColumnIndex][vProperty]||null;}catch(ex){this.error("Error while getting column property("+vColumnIndex+"|"+vProperty+"):"+ex,"_getColumnProperty");return null;};};proto._setupColumnProperty=function(vColumnIndex,vProperty,vValue){this._columnData[vColumnIndex][vProperty]=vValue;this._invalidateColumnLayout();};proto._removeColumnProperty=function(vColumnIndex,vProperty,vValue){delete this._columnData[vColumnIndex][vProperty];this._invalidateColumnLayout();};proto._invalidateColumnLayout=function(){if(!this._initialLayoutDone||!this._isDisplayable){return;};this.forEachVisibleChild(function(){this.addToQueue(QxConst.PROPERTY_WIDTH);});};proto._getRowProperty=function(vRowIndex,vProperty){try{return this._rowData[vRowIndex][vProperty]||null;}catch(ex){this.error("Error while getting row property("+vRowIndex+"|"+vProperty+"):"+ex,"_getRowProperty");return null;};};proto._setupRowProperty=function(vRowIndex,vProperty,vValue){this._rowData[vRowIndex][vProperty]=vValue;this._invalidateRowLayout();};proto._removeRowProperty=function(vRowIndex,vProperty,vValue){delete this._rowData[vRowIndex][vProperty];this._invalidateRowLayout();};proto._invalidateRowLayout=function(){if(!this._initialLayoutDone||!this._isDisplayable){return;};this.forEachVisibleChild(function(){this.addToQueue(QxConst.PROPERTY_HEIGHT);});};proto.setColumnWidth=function(vIndex,vValue){this._setupColumnProperty(vIndex,"widthValue",vValue);var vType=QxWidget.prototype._evalUnitsPixelPercentAutoFlex(vValue);this._setupColumnProperty(vIndex,"widthType",vType);var vParsed,vComputed;switch(vType){case QxWidget.TYPE_PIXEL:vParsed=vComputed=Math.round(vValue);break;case QxWidget.TYPE_PERCENT:case QxWidget.TYPE_FLEX:vParsed=parseFloat(vValue);vComputed=null;break;case QxWidget.TYPE_AUTO:vParsed=vComputed=null;break;default:vParsed=vComputed=null;};this._setupColumnProperty(vIndex,"widthParsed",vParsed);this._setupColumnProperty(vIndex,"widthComputed",vComputed);};proto.setRowHeight=function(vIndex,vValue){this._setupRowProperty(vIndex,"heightValue",vValue);var vType=QxWidget.prototype._evalUnitsPixelPercentAutoFlex(vValue);this._setupRowProperty(vIndex,"heightType",vType);var vParsed,vComputed;switch(vType){case QxWidget.TYPE_PIXEL:vParsed=vComputed=Math.round(vValue);break;case QxWidget.TYPE_PERCENT:case QxWidget.TYPE_FLEX:vParsed=parseFloat(vValue);vComputed=null;break;case QxWidget.TYPE_AUTO:vParsed=vComputed=null;break;default:vParsed=vComputed=null;};this._setupRowProperty(vIndex,"heightParsed",vParsed);this._setupRowProperty(vIndex,"heightComputed",vComputed);};proto.getColumnBoxWidth=function(vIndex){var vComputed=this._getColumnProperty(vIndex,"widthComputed");if(vComputed!=null){return vComputed;};var vType=this._getColumnProperty(vIndex,"widthType");var vParsed=this._getColumnProperty(vIndex,"widthParsed");var vComputed=null;switch(vType){case QxWidget.TYPE_PIXEL:vComputed=Math.max(0,vParsed);break;case QxWidget.TYPE_PERCENT:vComputed=this.getInnerWidth()*Math.max(0,vParsed)*0.01;break;case QxWidget.TYPE_AUTO:vComputed=null;break;case QxWidget.TYPE_FLEX:vComputed=null;break;};this._setupColumnProperty(vIndex,"widthComputed",vComputed);return vComputed;};proto.getRowBoxHeight=function(vIndex){var vComputed=this._getRowProperty(vIndex,"heightComputed");if(vComputed!=null){return vComputed;};var vType=this._getRowProperty(vIndex,"heightType");var vParsed=this._getRowProperty(vIndex,"heightParsed");var vComputed=null;switch(vType){case QxWidget.TYPE_PIXEL:vComputed=Math.max(0,vParsed);break;case QxWidget.TYPE_PERCENT:vComputed=this.getInnerHeight()*Math.max(0,vParsed)*0.01;break;case QxWidget.TYPE_AUTO:vComputed=null;break;case QxWidget.TYPE_FLEX:vComputed=null;break;};this._setupRowProperty(vIndex,"heightComputed",vComputed);return vComputed;};proto.getComputedCellPaddingLeft=function(vCol,vRow){return this.getColumnPaddingLeft(vCol)||this.getRowPaddingLeft(vRow)||this.getCellPaddingLeft()||0;};proto.getComputedCellPaddingRight=function(vCol,vRow){return this.getColumnPaddingRight(vCol)||this.getRowPaddingRight(vRow)||this.getCellPaddingRight()||0;};proto.getComputedCellPaddingTop=function(vCol,vRow){return this.getRowPaddingTop(vRow)||this.getColumnPaddingTop(vCol)||this.getCellPaddingTop()||0;};proto.getComputedCellPaddingBottom=function(vCol,vRow){return this.getRowPaddingBottom(vRow)||this.getColumnPaddingBottom(vCol)||this.getCellPaddingBottom()||0;};proto.getColumnInnerWidth=function(vCol,vRow){return this.getColumnBoxWidth(vCol)-this.getComputedCellPaddingLeft(vCol,vRow)-this.getComputedCellPaddingRight(vCol,vRow);};proto.getRowInnerHeight=function(vCol,vRow){return this.getRowBoxHeight(vRow)-this.getComputedCellPaddingTop(vCol,vRow)-this.getComputedCellPaddingBottom(vCol,vRow);};proto.setColumnHorizontalAlignment=function(vIndex,vValue){this._setupColumnProperty(vIndex,"horizontalAlignment",vValue);};proto.setColumnVerticalAlignment=function(vIndex,vValue){this._setupColumnProperty(vIndex,"verticalAlignment",vValue);};proto.setRowHorizontalAlignment=function(vIndex,vValue){this._setupRowProperty(vIndex,"horizontalAlignment",vValue);};proto.setRowVerticalAlignment=function(vIndex,vValue){this._setupRowProperty(vIndex,"verticalAlignment",vValue);};proto.getColumnHorizontalAlignment=function(vIndex){return this._getColumnProperty(vIndex,"horizontalAlignment");};proto.getColumnVerticalAlignment=function(vIndex){return this._getColumnProperty(vIndex,"verticalAlignment");};proto.getRowHorizontalAlignment=function(vIndex){return this._getRowProperty(vIndex,"horizontalAlignment");};proto.getRowVerticalAlignment=function(vIndex){return this._getRowProperty(vIndex,"verticalAlignment");};proto.setColumnPaddingTop=function(vIndex,vValue){this._setupColumnProperty(vIndex,"paddingTop",vValue);};proto.setColumnPaddingRight=function(vIndex,vValue){this._setupColumnProperty(vIndex,"paddingRight",vValue);};proto.setColumnPaddingBottom=function(vIndex,vValue){this._setupColumnProperty(vIndex,"paddingBottom",vValue);};proto.setColumnPaddingLeft=function(vIndex,vValue){this._setupColumnProperty(vIndex,"paddingLeft",vValue);};proto.setRowPaddingTop=function(vIndex,vValue){this._setupRowProperty(vIndex,"paddingTop",vValue);};proto.setRowPaddingRight=function(vIndex,vValue){this._setupRowProperty(vIndex,"paddingRight",vValue);};proto.setRowPaddingBottom=function(vIndex,vValue){this._setupRowProperty(vIndex,"paddingBottom",vValue);};proto.setRowPaddingLeft=function(vIndex,vValue){this._setupRowProperty(vIndex,"paddingLeft",vValue);};proto.getColumnPaddingTop=function(vIndex){return this._getColumnProperty(vIndex,"paddingTop");};proto.getColumnPaddingRight=function(vIndex){return this._getColumnProperty(vIndex,"paddingRight");};proto.getColumnPaddingBottom=function(vIndex){return this._getColumnProperty(vIndex,"paddingBottom");};proto.getColumnPaddingLeft=function(vIndex){return this._getColumnProperty(vIndex,"paddingLeft");};proto.getRowPaddingTop=function(vIndex){return this._getRowProperty(vIndex,"paddingTop");};proto.getRowPaddingRight=function(vIndex){return this._getRowProperty(vIndex,"paddingRight");};proto.getRowPaddingBottom=function(vIndex){return this._getRowProperty(vIndex,"paddingBottom");};proto.getRowPaddingLeft=function(vIndex){return this._getRowProperty(vIndex,"paddingLeft");};proto._changeInnerWidth=function(vNew,vOld){for(var i=0,l=this.getColumnCount();i<l;i++){if(this._getColumnProperty(i,"widthType")==QxWidget.TYPE_PERCENT){this._setupColumnProperty(i,"widthComputed",null);};};QxParent.prototype._changeInnerWidth.call(this,vNew,vOld);};proto._changeInnerHeight=function(vNew,vOld){for(var i=0,l=this.getRowCount();i<l;i++){if(this._getRowProperty(i,"heightType")==QxWidget.TYPE_PERCENT){this._setupRowProperty(i,"heightComputed",null);};};QxParent.prototype._changeInnerHeight.call(this,vNew,vOld);};proto.getInnerWidthForChild=function(vChild){return this._getColumnProperty(vChild._col,"widthComputed");};proto.getInnerHeightForChild=function(vChild){return this._getRowProperty(vChild._row,"heightComputed");};proto.mergeCells=function(vStartCol,vStartRow,vColLength,vRowLength){var vSpans=this._spans;var vLength=vSpans.length;var vEndCol=vStartCol+vColLength-1;var vEndRow=vStartRow+vRowLength-1;if(this._collidesWithSpans(vStartCol,vStartRow,vEndCol,vEndRow)){this.debug("Span collision detected!");return false;};vSpans.push({startCol:vStartCol,startRow:vStartRow,endCol:vEndCol,endRow:vEndRow,colLength:vColLength,rowLength:vRowLength});return true;};proto.hasSpans=function(){return this._spans.length>0;};proto.getSpanEntry=function(vCol,vRow){for(var i=0,s=this._spans,l=s.length,c;i<l;i++){c=s[i];if(vCol>=c.startCol&&vCol<=c.endCol&&vRow>=c.startRow&&vRow<=c.endRow){return c;};};return null;};proto.isSpanStart=function(vCol,vRow){for(var i=0,s=this._spans,l=s.length,c;i<l;i++){c=s[i];if(c.startCol==vCol&&c.startRow==vRow){return true;};};return false;};proto.isSpanCell=function(vCol,vRow){for(var i=0,s=this._spans,l=s.length,c;i<l;i++){c=s[i];if(vCol>=c.startCol&&vCol<=c.endCol&&vRow>=c.startRow&&vRow<=c.endRow){return true;};};return false;};proto.isFillCell=function(vCol,vRow){for(var i=0,s=this._spans,l=s.length,c;i<l;i++){c=s[i];if(vCol>=c.startCol&&vCol<=c.endCol&&vRow>=c.startRow&&vRow<=c.endRow&&(vCol>c.startCol||vRow>c.startRow)){return true;};};return false;};proto._collidesWithSpans=function(vStartCol,vStartRow,vEndCol,vEndRow){for(var i=0,s=this._spans,l=s.length,c;i<l;i++){c=s[i];if(vEndCol>=c.startCol&&vStartCol<=c.endCol&&vEndRow>=c.startRow&&vStartRow<=c.endRow){return true;};};return false;};proto.dispose=function(){if(this.getDisposed()){return;};delete this._columnData;delete this._rowData;delete this._spans;return QxParent.prototype.dispose.call(this);};function QxText(vText){QxTerminator.call(this);if(QxUtil.isValidString(vText)){this.setText(vText);};};QxText.extend(QxTerminator,"QxText");QxText.addProperty({name:"text",type:QxConst.TYPEOF_STRING});QxText.addProperty({name:"font",type:QxConst.TYPEOF_OBJECT,instance:"QxFont",convert:QxFontCache,allowMultipleArguments:true});QxText.addProperty({name:"wrap",type:QxConst.TYPEOF_BOOLEAN,defaultValue:true});proto._modifyText=function(){if(this._isCreated){this._syncText();};return true;};proto._modifyFont=function(propValue,propOldValue,propData){if(propValue){propValue.applyWidget(this);}else if(propOldValue){propOldValue.resetWidget(this);};return true;};proto._modifyWrap=function(propValue,propOldValue,propData){this.setStyleProperty(QxConst.PROPERTY_WHITESPACE,propValue?"normal":"nowrap");return true;};proto._applyElementData=function(){this.getElement().appendChild(document.createTextNode(this.getText()));};proto._syncText=function(){this.getElement().firstChild.nodeValue=this.getText();};function QxHtml(vHtml){QxTerminator.call(this);if(QxUtil.isValidString(vHtml)){this.setHtml(vHtml);};};QxHtml.extend(QxTerminator,"QxHtml");QxHtml.addProperty({name:"html",type:QxConst.TYPEOF_STRING});QxHtml.addProperty({name:"font",type:QxConst.TYPEOF_OBJECT,instance:"QxFont",convert:QxFontCache,allowMultipleArguments:true});QxHtml.addProperty({name:"wrap",type:QxConst.TYPEOF_BOOLEAN,defaultValue:true});proto._modifyHtml=function(){if(this._isCreated){this._syncHtml();};return true;};proto._modifyFont=function(propValue,propOldValue,propData){if(propValue){propValue.applyWidget(this);}else if(propOldValue){propOldValue.resetWidget(this);};return true;};proto._modifyWrap=function(propValue,propOldValue,propData){this.setStyleProperty(QxConst.PROPERTY_WHITESPACE,propValue?"normal":"nowrap");return true;};proto._applyElementData=function(){this._syncHtml();};proto._syncHtml=function(){this.getElement().innerHTML=this.getHtml();};function QxLink(vHtml,vUri,vTarget){QxHtml.call(this,vHtml);if(typeof vUri!=QxConst.TYPEOF_UNDEFINED){this.setUri(vUri);};if(typeof vTarget!=QxConst.TYPEOF_UNDEFINED){this.setTarget(vTarget);};};QxLink.extend(QxHtml,"QxLink");QxLink.addProperty({name:"uri",type:QxConst.TYPEOF_STRING,defaultValue:"#",impl:"html"});QxLink.addProperty({name:"target",type:QxConst.TYPEOF_STRING,defaultValue:"_blank",impl:"html"});QxLink.LINK_START="<a target='";QxLink.HREF_START="' href='";QxLink.HREF_STOP="'>";QxLink.LINK_STOP="</a>";proto._syncHtml=function(){var vHtml=[];vHtml.push(QxLink.LINK_START);vHtml.push(this.getTarget());vHtml.push(QxLink.HREF_START);vHtml.push(this.getUri());vHtml.push(QxLink.HREF_STOP);vHtml.push(this.getHtml());vHtml.push(QxLink.LINK_STOP);this.getElement().innerHTML=vHtml.join(QxConst.CORE_EMPTY);};function QxIconHtml(vHtml,vIcon,vIconWidth,vIconHeight){QxHtml.call(this,vHtml);if(typeof vIcon!=QxConst.TYPEOF_UNDEFINED){this.setIcon(vIcon);if(typeof vIconWidth!=QxConst.TYPEOF_UNDEFINED){this.setIconWidth(vIconWidth);};if(typeof vIconHeight!=QxConst.TYPEOF_UNDEFINED){this.setIconHeight(vIconWidth);};};};QxIconHtml.extend(QxHtml,"QxIconHtml");QxIconHtml.addProperty({name:"icon",type:QxConst.TYPEOF_STRING,impl:"html"});QxIconHtml.addProperty({name:"iconWidth",type:QxConst.TYPEOF_NUMBER,impl:"html"});QxIconHtml.addProperty({name:"iconHeight",type:QxConst.TYPEOF_NUMBER,impl:"html"});QxIconHtml.addProperty({name:"spacing",type:QxConst.TYPEOF_NUMBER,defaultValue:4,impl:"html"});QxIconHtml.START_IMAGE="<img src=\"";QxIconHtml.START_STYLE="\" style=\"vertical-align:middle;";QxIconHtml.STYLE_MARGIN="margin-right:";QxIconHtml.STYLE_WIDTH="width:";QxIconHtml.STYLE_HEIGHT="height:";QxIconHtml.PIXEL_UNIT="px;";QxIconHtml.FILTER_START="filter:";QxIconHtml.STOP_IMAGE="\"/>";proto._mshtml=QxClient.isMshtml();proto._syncHtml=function(){var vHtml=[];vHtml.push(QxIconHtml.START_IMAGE);vHtml.push(QxImageManager.buildUri(this._mshtml?QxConst.IMAGE_BLANK:this.getIcon()));vHtml.push(QxIconHtml.START_STYLE);if(QxUtil.isValidNumber(this.getSpacing())){vHtml.push(QxIconHtml.STYLE_MARGIN);vHtml.push(this.getSpacing());vHtml.push(QxIconHtml.PIXEL_UNIT);};if(QxUtil.isValidNumber(this.getIconWidth())){vHtml.push(QxIconHtml.STYLE_WIDTH);vHtml.push(this.getIconWidth());vHtml.push(QxIconHtml.PIXEL_UNIT);};if(QxUtil.isValidNumber(this.getIconHeight())){vHtml.push(QxIconHtml.STYLE_HEIGHT);vHtml.push(this.getIconHeight());vHtml.push(QxIconHtml.PIXEL_UNIT);};if(this._mshtml){vHtml.push(QxIconHtml.FILTER_START);vHtml.push(QxImage.IMGLOADER_START);vHtml.push(QxImageManager.buildUri(this.getIcon()));vHtml.push(QxImage.IMGLOADER_STOP);vHtml.push(QxConst.CORE_SEMICOLON);};vHtml.push(QxIconHtml.STOP_IMAGE);vHtml.push(this.getHtml());this.getElement().innerHTML=vHtml.join(QxConst.CORE_EMPTY);};function QxNode(vId){QxTerminator.call(this);if(QxUtil.isValidString(vId)){this.setSourceNodeId(vId);};};QxNode.extend(QxTerminator,"QxNode");QxNode.addProperty({name:"sourceNodeId",type:QxConst.TYPEOF_STRING});proto._createElementImpl=function(){var vNode=document.getElementById(this.getSourceNodeId());if(!vNode){throw new Error("Could not find source node with ID:"+this.getSourceNodeId());};vNode.style.display=QxConst.CORE_EMPTY;return this.setElement(vNode);};function QxLabel(vHtml,vMnemonic){QxTerminator.call(this);if(QxUtil.isValidString(vHtml)){this.setHtml(vHtml);};if(QxUtil.isValidString(vMnemonic)){this.setMnemonic(vMnemonic);};this.setAllowStretchX(false);this.setAllowStretchY(false);this.auto();};QxLabel.extend(QxTerminator,"QxLabel");QxLabel.COPY_STYLEPROPERTY="styleproperty";QxLabel.COPY_COMPUTEDELEMENT="computedelement";QxLabel.COPY_LOCALELEMENT="localelement";QxLabel.changeProperty({name:"appearance",type:QxConst.TYPEOF_STRING,defaultValue:"label"});QxLabel.addProperty({name:"html",type:QxConst.TYPEOF_STRING});QxLabel.addProperty({name:"textAlign",type:QxConst.TYPEOF_STRING,defaultValue:"left",possibleValues:["left","center","right","justify"]});QxLabel.addProperty({name:"fontPropertiesProfile",type:QxConst.TYPEOF_STRING,defaultValue:QxConst.CORE_DEFAULT,possibleValues:[QxConst.CORE_NONE,QxConst.CORE_DEFAULT,"extended","multiline","extendedmultiline","all"]});QxLabel.addProperty({name:"mnemonic",type:QxConst.TYPEOF_STRING});QxLabel.addProperty({name:"font",type:QxConst.TYPEOF_OBJECT,instance:"QxFont",convert:QxFontCache,allowMultipleArguments:true});QxLabel.addProperty({name:"wrap",type:QxConst.TYPEOF_BOOLEAN,defaultValue:true});QxLabel.OVERFLOW_HIDDEN="hidden";QxLabel.OVERFLOW_ELLIPSIS="ellipsis";QxLabel.SYMBOL_ELLIPSIS=String.fromCharCode(8230);QxLabel.INNER_TEXT="innerText";QxLabel.INNER_HTML="innerHTML";QxLabel.SUPPORT_NATIVE_ELLIPSIS=QxClient.isMshtml();QxLabel.MNEMONIC_OUT_START="(<span style=\"text-decoration:underline\">";QxLabel.MNEMONIC_OUT_STOP="</span>)";QxLabel.MNEMONIC_IN_START="<span style=\"text-decoration:underline\">";QxLabel.MNEMONIC_IN_STOP="</span>";QxLabel.MNEMONIC_TEST1="^(((<([^>]|";QxLabel.MNEMONIC_TEST2=")+>)|(&([^;]|";QxLabel.MNEMONIC_TEST3=")+;)|[^&";QxLabel.MNEMONIC_TEST4="])*)(";QxLabel.MNEMONIC_TEST5=")";QxLabel.MNEMONIC_REGMODE="i";QxLabel._fontProperties= {"none":[],"default":["fontFamily","fontSize","fontStyle","fontWeight","textDecoration"],"extended":["fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","textDecoration","textTransform","whiteSpace","wordSpacing"],"multiline":["fontFamily","fontSize","fontStyle","fontWeight","textDecoration","lineHeight","wordWrap"],"extendedmultiline":["fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","textDecoration","textTransform","whiteSpace","wordSpacing","lineHeight","wordBreak","wordWrap","quotes"],"all":["fontFamily","fontSize","fontStyle","fontVariant","fontWeight","letterSpacing","lineBreak","lineHeight","quotes","textDecoration","textIndent","textShadow","textTransform","textUnderlinePosition","whiteSpace","wordBreak","wordSpacing","wordWrap"] };proto._htmlMode=false;proto._hasMnemonic=false;proto._mnemonicHtml=QxConst.CORE_EMPTY;proto._mnemonicTest=null;proto._modifyHtml=function(propValue,propOldValue,propData){this._htmlMode = QxUtil.isValidString(propValue) && propValue.match(/<.*>/) ? true : false;if(this._isCreated){this._applyContent();};return true;};proto._modifyTextAlign=function(propValue,propOldValue,propData){this.setStyleProperty("textAlign",propValue);return true;};proto._modifyFontPropertiesProfile=function(propValue,propOldValue,propData){if(!QxLabel._measureNodes[propValue]){QxLabel.createMeasureNode(propValue);};return true;};proto._modifyMnemonic=function(propValue,propOldValue,propData){this._hasMnemonic=QxUtil.isValidString(propValue)&&propValue.length==1;this._mnemonicHtml=this._hasMnemonic?QxLabel.MNEMONIC_OUT_START+propValue+QxLabel.MNEMONIC_OUT_STOP:QxConst.CORE_EMPTY;this._mnemonicTest=this._hasMnemonic?new RegExp(QxLabel.MNEMONIC_TEST1+propValue+QxLabel.MNEMONIC_TEST2+propValue+QxLabel.MNEMONIC_TEST3+propValue+QxLabel.MNEMONIC_TEST4+propValue+QxLabel.MNEMONIC_TEST5,QxLabel.MNEMONIC_REGMODE):null;return true;};proto._modifyFont=function(propValue,propOldValue,propData){this._invalidatePreferredInnerDimensions();if(propValue){propValue.applyWidget(this);}else if(propOldValue){propOldValue.resetWidget(this);};return true;};proto._modifyWrap=function(propValue,propOldValue,propData){this.setStyleProperty(QxConst.PROPERTY_WHITESPACE,propValue?"normal":"nowrap");return true;};proto._computeObjectNeededDimensions=function(){var vNode=this._copyStyles();var vHtml=this.getHtml();if(this._hasMnemonic&&!this._mnemonicTest.test(vHtml)){vHtml+=this._mnemonicHtml;};vNode.innerHTML=vHtml;this._cachedPreferredInnerWidth=vNode.scrollWidth;this._cachedPreferredInnerHeight=vNode.scrollHeight;};proto._copyStyles=function(){var vProps=this.getFontPropertiesProfile();var vNode=QxLabel._measureNodes[vProps];var vUseProperties=QxLabel._fontProperties[vProps];var vUsePropertiesLength=vUseProperties.length-1;var vProperty=vUseProperties[vUsePropertiesLength--];var vStyle=vNode.style;var vTemp;if(!vProperty){return vNode;};do{vStyle[vProperty]=QxUtil.isValid(vTemp=this.getStyleProperty([vProperty]))?vTemp:QxConst.CORE_EMPTY;}while(vProperty=vUseProperties[vUsePropertiesLength--]);return vNode;};proto._computePreferredInnerWidth=function(){this._computeObjectNeededDimensions();return this._cachedPreferredInnerWidth;};proto._computePreferredInnerHeight=function(){this._computeObjectNeededDimensions();return this._cachedPreferredInnerHeight;};proto._postApply=function(){var vHtml=this.getHtml();var vElement=this._getTargetNode();var vMnemonicMode=0;if(QxUtil.isInvalidString(vHtml)){vElement.innerHTML=QxConst.CORE_EMPTY;return;};if(this._hasMnemonic){vMnemonicMode=this._mnemonicTest.test(vHtml)?1:2;};if(!this._htmlMode){switch(this._computedWidthType){case QxWidget.TYPE_PIXEL:case QxWidget.TYPE_PERCENT:var vNeeded=this.getPreferredInnerWidth();var vInner=this.getInnerWidth();if(vInner<vNeeded){var vUseInnerText=true;try{vElement.innerText=QxConst.CORE_DEFAULT;}catch(ex){vUseInnerText=false;};vElement.style.overflow=QxLabel.OVERFLOW_HIDDEN;if(QxLabel.SUPPORT_NATIVE_ELLIPSIS){vElement.style.textOverflow=QxLabel.OVERFLOW_ELLIPSIS;vHtml+=this._mnemonicHtml;}else {var vMeasureNode=this._copyStyles();var vSplitString=vHtml.split(QxConst.CORE_SPACE);var vSplitLength=vSplitString.length;var vWordIterator=0;var vCharaterIterator=0;var vPost=QxLabel.SYMBOL_ELLIPSIS;if(vMnemonicMode==2){var vPost=this._mnemonicHtml+vPost;vUseInnerText=false;};if(vSplitLength>1){var vSplitTemp=[];for(vWordIterator=0;vWordIterator<vSplitLength;vWordIterator++){vSplitTemp.push(vSplitString[vWordIterator]);vMeasureNode[vUseInnerText?QxLabel.INNER_TEXT:QxLabel.INNER_HTML]=vSplitTemp.join(QxConst.CORE_SPACE)+vPost;if(vMeasureNode.scrollWidth>vInner){break;};};vSplitTemp.pop();vSplitTemp=[vSplitTemp.join(QxConst.CORE_SPACE)];vCharaterString=vHtml.replace(vSplitTemp[0],QxConst.CORE_EMPTY);}else {var vSplitTemp=[];vCharaterString=vHtml;};var vCharaterLength=vCharaterString.length;for(var vCharaterIterator=0;vCharaterIterator<vCharaterLength;vCharaterIterator++){vSplitTemp.push(vCharaterString.charAt(vCharaterIterator));vMeasureNode[vUseInnerText?QxLabel.INNER_TEXT:QxLabel.INNER_HTML]=vSplitTemp.join(QxConst.CORE_EMPTY)+vPost;if(vMeasureNode.scrollWidth>vInner){break;};};vSplitTemp.pop();vSplitTemp.push(vPost);vHtml=vSplitTemp.join(QxConst.CORE_EMPTY);};break;}else {vHtml+=this._mnemonicHtml;};default:vElement.style.overflow=QxConst.CORE_EMPTY;if(QxLabel.SUPPORT_NATIVE_ELLIPSIS){vElement.style.textOverflow=QxConst.CORE_EMPTY;};};};if(vMnemonicMode==1){this._mnemonicTest.test(vHtml);vHtml=RegExp.$1+QxLabel.MNEMONIC_IN_START+RegExp.$7+QxLabel.MNEMONIC_IN_STOP+RegExp.rightContext;};return this._postApplyHtml(vElement,vHtml,vMnemonicMode);};if(QxClient.isMshtml()||QxClient.isOpera()){proto._postApplyHtml=function(vElement,vHtml,vMnemonicMode){if(this._htmlMode||vMnemonicMode>0){vElement.innerHTML=vHtml;}else {try{vElement.textContent=vHtml;vElement.innerText=vHtml;}catch(ex){vElement.innerHTML=vHtml;};};};}else {proto._postApplyHtml=function(vElement,vHtml,vMnemonicMode){if(this._htmlMode||vMnemonicMode>0){vElement.innerHTML=vHtml;}else {try{vElement.textContent=vHtml;}catch(ex){vElement.innerHTML=vHtml;};};};};QxLabel.BR="<br/>";QxLabel.CODE1="&#x";QxLabel.CODE2="&#";QxLabel.TOSTRHELPER="0x";QxLabel.htmlToText=function(s){return String(s).replace(/\s+|<([^>])+>|&amp;|&lt;|&gt;|&quot;|&nbsp;|&#[0-9]+;|&#x[0-9a-fA-F];]/gi, QxLabel._htmlToText);};QxLabel._htmlToText=function(s){switch(s){case QxConst.HTML_AMPERSAND:return QxConst.CORE_AMPERSAND;case QxConst.HTML_SMALLER:return QxConst.CORE_SMALLER;case QxConst.HTML_BIGGER:return QxConst.CORE_BIGGER;case QxConst.HTML_QUOTE:return QxConst.CORE_QUOTE;case QxConst.HTML_SPACE:return String.fromCharCode(160);default:if(s.substring(0,3)==QxLabel.CODE1){return String.fromCharCode(parseInt(QxLabel.TOSTRHELPER+s.substring(3,s.length-1)));}else if(s.substring(0,2)==QxLabel.CODE2){return String.fromCharCode(s.substring(2,s.length-1));}else if (/\s+/.test(s)) {return QxConst.CORE_SPACE;}else if (/^<BR/gi.test(s)) {return QxConst.CORE_NEWLINE;};return QxConst.CORE_EMPTY;};};QxLabel.textToHtml=function(s){return String(s).replace(/&|<|>|\n|\u00A0/g, QxLabel._textToHtml);};QxLabel._textToHtml=function(s){switch(s){case QxConst.CORE_AMPERSAND:return QxConst.HTML_AMPERSAND;case QxConst.CORE_SMALLER:return QxConst.HTML_SMALLER;case QxConst.CORE_BIGGER:return QxConst.HTML_BIGGER;case QxConst.CORE_NEWLINE:return QxLabel.BR;default:return QxConst.CORE_SPACE;};};QxLabel.init=function(){QxLabel._measureNodes={};QxLabel.createMeasureNode(QxConst.CORE_DEFAULT);};QxLabel.createMeasureNode=function(vId){var vNode=QxLabel._measureNodes[vId]=document.createElement(QxConst.CORE_DIV);var vStyle=vNode.style;vStyle.width=vStyle.height=QxConst.CORE_AUTO;vStyle.visibility=QxConst.CORE_HIDDEN;vStyle.position=QxConst.CORE_ABSOLUTE;vStyle.zIndex="-1";document.body.appendChild(vNode);};if(typeof window.application!=QxConst.TYPEOF_UNDEFINED){window.application.addEventListener(QxConst.EVENT_TYPE_PRE,QxLabel.init);};function QxAtom(vLabel,vIcon,vIconWidth,vIconHeight,vFlash){QxBoxLayout.call(this);if(this.getOrientation()==null){this.setOrientation(QxConst.ORIENTATION_HORIZONTAL);};this.setSelectable(false);this.getLayoutImpl().setEnableFlexSupport(false);if(QxUtil.isValidString(vLabel)){this.setLabel(vLabel);};if(QxUtil.isValidString(vFlash)&&QxUtil.isValidNumber(vIconWidth)&&QxUtil.isValidNumber(vIconHeight)&&QxFlash&&QxFlash.getPlayerVersion().getMajor()>0){this._flashMode=true;this.setIcon(vFlash);this.setIconWidth(vIconWidth);this.setIconHeight(vIconHeight);}else if(QxUtil.isValidString(vIcon)){this.setIcon(vIcon);if(QxUtil.isValidNumber(vIconWidth)){this.setIconWidth(vIconWidth);};if(QxUtil.isValidNumber(vIconHeight)){this.setIconHeight(vIconHeight);};};};QxAtom.extend(QxBoxLayout,"QxAtom");QxAtom.SHOW_LABEL="label";QxAtom.SHOW_ICON="icon";QxAtom.SHOW_BOTH="both";QxAtom.addProperty({name:"label",type:QxConst.TYPEOF_STRING});QxAtom.addProperty({name:"icon",type:QxConst.TYPEOF_STRING});QxAtom.addProperty({name:"show",type:QxConst.TYPEOF_STRING,defaultValue:"both",possibleValues:["both","label","icon",QxConst.CORE_NONE,null]});QxAtom.addProperty({name:"iconPosition",type:QxConst.TYPEOF_STRING,defaultValue:"left",possibleValues:["top","right","bottom","left"]});QxAtom.addProperty({name:"iconWidth",type:QxConst.TYPEOF_NUMBER});QxAtom.addProperty({name:"iconHeight",type:QxConst.TYPEOF_NUMBER});QxAtom.changeProperty({name:"appearance",type:QxConst.TYPEOF_STRING,defaultValue:"atom"});proto._flashMode=false;proto._labelObject=null;proto._iconObject=null;proto._createLabel=function(){var l=this._labelObject=new QxLabel(this.getLabel());l.setAnonymous(true);l.setEnabled(this.getEnabled());l.setSelectable(false);this.addAt(l,this._iconObject?1:0);};proto._createIcon=function(){if(this._flashMode){var i=this._iconObject=new QxFlash(this.getIcon());}else {var i=this._iconObject=new QxImage(this.getIcon());};i.setAnonymous(true);i.setEnabled(this.getEnabled());this.addAt(i,0);};proto.getLabelObject=function(){return this._labelObject;};proto.getIconObject=function(){return this._iconObject;};proto._modifyEnabled=function(propValue,propOldValue,propData){if(this._iconObject){this._iconObject.setEnabled(propValue);};if(this._labelObject){this._labelObject.setEnabled(propValue);};return QxBoxLayout.prototype._modifyEnabled.call(this,propValue,propOldValue,propData);};proto._modifyIconPosition=function(propValue,propOldValue,propData){switch(propValue){case QxConst.ALIGN_TOP:case QxConst.ALIGN_BOTTOM:this.setOrientation(QxConst.ORIENTATION_VERTICAL);this.setReverseChildrenOrder(propValue==QxConst.ALIGN_BOTTOM);break;default:this.setOrientation(QxConst.ORIENTATION_HORIZONTAL);this.setReverseChildrenOrder(propValue==QxConst.ALIGN_RIGHT);break;};return true;};proto._modifyShow=function(propValue,propOldValue,propData){this._handleIcon();this._handleLabel();return true;};proto._modifyLabel=function(propValue,propOldValue,propData){if(this._labelObject){this._labelObject.setHtml(propValue);};this._handleLabel();return true;};proto._modifyIcon=function(propValue,propOldValue,propData){if(this._iconObject){this._iconObject.setSource(propValue);};this._handleIcon();return true;};proto._modifyIconWidth=function(propValue,propOldValue,propData){this._iconObject.setWidth(propValue);return true;};proto._modifyIconHeight=function(propValue,propOldValue,propData){this._iconObject.setHeight(propValue);return true;};proto._iconIsVisible=false;proto._labelIsVisible=false;proto._handleLabel=function(){switch(this.getShow()){case QxAtom.SHOW_LABEL:case QxAtom.SHOW_BOTH:this._labelIsVisible=QxUtil.isValidString(this.getLabel());break;default:this._labelIsVisible=false;};if(this._labelIsVisible){this._labelObject?this._labelObject.setDisplay(true):this._createLabel();}else if(this._labelObject){this._labelObject.setDisplay(false);};};proto._handleIcon=function(){switch(this.getShow()){case QxAtom.SHOW_ICON:case QxAtom.SHOW_BOTH:this._iconIsVisible=QxUtil.isValidString(this.getIcon());break;default:this._iconIsVisible=false;};if(this._iconIsVisible){this._iconObject?this._iconObject.setDisplay(true):this._createIcon();}else if(this._iconObject){this._iconObject.setDisplay(false);};};proto._cloneRecursive=QxUtil.returnTrue;proto.dispose=function(){if(this.getDisposed()){return true;};if(this._iconObject){this._iconObject.dispose();this._iconObject=null;};if(this._labelObject){this._labelObject.dispose();this._labelObject=null;};return QxBoxLayout.prototype.dispose.call(this);};function QxButton(vText,vIcon,vIconWidth,vIconHeight,vFlash){QxAtom.call(this,vText,vIcon,vIconWidth,vIconHeight,vFlash);this.setTabIndex(1);this.addEventListener(QxConst.EVENT_TYPE_MOUSEOVER,this._onmouseover);this.addEventListener(QxConst.EVENT_TYPE_MOUSEOUT,this._onmouseout);this.addEventListener(QxConst.EVENT_TYPE_MOUSEDOWN,this._onmousedown);this.addEventListener(QxConst.EVENT_TYPE_MOUSEUP,this._onmouseup);this.addEventListener(QxConst.EVENT_TYPE_KEYDOWN,this._onkeydown);this.addEventListener(QxConst.EVENT_TYPE_KEYUP,this._onkeyup);};QxButton.extend(QxAtom,"QxButton");QxButton.changeProperty({name:"appearance",type:QxConst.TYPEOF_STRING,defaultValue:"button"});proto._onmouseover=function(e){if(e.getTarget()!=this){return;};if(this.hasState(QxConst.STATE_ABANDONED)){this.removeState(QxConst.STATE_ABANDONED);this.addState(QxConst.STATE_PRESSED);};this.addState(QxConst.STATE_OVER);};proto._onmouseout=function(e){if(e.getTarget()!=this){return;};this.removeState(QxConst.STATE_OVER);if(this.hasState(QxConst.STATE_PRESSED)){this.setCapture(true);this.removeState(QxConst.STATE_PRESSED);this.addState(QxConst.STATE_ABANDONED);};};proto._onmousedown=function(e){if(e.getTarget()!=this||!e.isLeftButtonPressed()){return;};this.removeState(QxConst.STATE_ABANDONED);this.addState(QxConst.STATE_PRESSED);};proto._onmouseup=function(e){this.setCapture(false);if(!this.hasState(QxConst.STATE_ABANDONED)){this.addState(QxConst.STATE_OVER);if(this.hasState(QxConst.STATE_PRESSED)){this.execute();};};this.removeState(QxConst.STATE_ABANDONED);this.removeState(QxConst.STATE_PRESSED);};proto._onkeydown=function(e){switch(e.getKeyCode()){case QxKeyEvent.keys.enter:case QxKeyEvent.keys.space:this.removeState(QxConst.STATE_ABANDONED);this.addState(QxConst.STATE_PRESSED);};};proto._onkeyup=function(e){switch(e.getKeyCode()){case QxKeyEvent.keys.enter:case QxKeyEvent.keys.space:if(this.hasState(QxConst.STATE_PRESSED)){this.removeState(QxConst.STATE_ABANDONED);this.removeState(QxConst.STATE_PRESSED);this.execute();};};};proto.dispose=function(){if(this.getDisposed()){return;};this.removeEventListener(QxConst.EVENT_TYPE_MOUSEOVER,this._onmouseover,this);this.removeEventListener(QxConst.EVENT_TYPE_MOUSEOUT,this._onmouseout,this);this.removeEventListener(QxConst.EVENT_TYPE_MOUSEDOWN,this._onmousedown,this);this.removeEventListener(QxConst.EVENT_TYPE_MOUSEUP,this._onmouseup,this);this.removeEventListener(QxConst.EVENT_TYPE_KEYDOWN,this._onkeydown,this);this.removeEventListener(QxConst.EVENT_TYPE_KEYUP,this._onkeyup,this);return QxAtom.prototype.dispose.call(this);};function QxRepeatButton(vText,vIcon,vIconWidth,vIconHeight,vFlash){QxButton.call(this,vText,vIcon,vIconWidth,vIconHeight,vFlash);this._timer=new QxTimer;this._timer.setInterval(this.getInterval());this._timer.addEventListener("interval",this._oninterval,this);};QxRepeatButton.extend(QxButton,"QxRepeatButton");QxRepeatButton.addProperty({name:"interval",type:QxConst.TYPEOF_NUMBER,defaultValue:100});QxRepeatButton.addProperty({name:"firstInterval",type:QxConst.TYPEOF_NUMBER,defaultValue:500});proto._onmousedown=function(e){if(e.getTarget()!=this||!e.isLeftButtonPressed()){return;};this._executed=false;this._timer.setInterval(this.getFirstInterval());this._timer.start();this.removeState(QxConst.STATE_ABANDONED);this.addState(QxConst.STATE_PRESSED);};proto._onmouseup=function(e){this.setCapture(false);if(!this.hasState(QxConst.STATE_ABANDONED)){this.addState(QxConst.STATE_OVER);if(this.hasState(QxConst.STATE_PRESSED)&&!this._executed){this.execute();};};this._timer.stop();this.removeState(QxConst.STATE_ABANDONED);this.removeState(QxConst.STATE_PRESSED);};proto._oninterval=function(e){this._timer.stop();this._timer.setInterval(this.getInterval());this._timer.start();this._executed=true;this.createDispatchEvent(QxConst.EVENT_TYPE_EXECUTE);};proto.dispose=function(){if(this.getDisposed()){return true;};if(this._timer){this._timer.stop();this._timer.dispose();this._timer=null;};return QxButton.prototype.dispose.call(this);};function QxRadioManager(vName,vMembers){QxTarget.call(this);this._items=[];this.setName(QxUtil.isValidString(vName)?vName:QxRadioManager.AUTO_NAME_PREFIX+this._hashCode);if(QxUtil.isValidArray(vMembers)){QxRadioManager.prototype.add.apply(this,vMembers);};};QxRadioManager.extend(QxManager,"QxRadioManager");QxRadioManager.AUTO_NAME_PREFIX="QxRadio-";QxRadioManager.addProperty({name:"selected"});QxRadioManager.addProperty({name:"name",type:QxConst.TYPEOF_STRING});proto.getItems=function(){return this._items;};proto.handleItemChecked=function(vItem,vChecked){if(vChecked){this.setSelected(vItem);}else if(this.getSelected()==vItem){this.setSelected(null);};};proto.add=function(){var vItems=arguments;var vLength=vItems.length;var vLast=vItems[vLength-1];if(!(vLast instanceof QxParent)&&!(vLast instanceof QxTerminator)){vLength--;};var vItem;for(var i=0;i<vLength;i++){vItem=vItems[i];if(this._items.contains(vItem)){return;};this._items.push(vItem);vItem.setManager(this);if(vItem.getChecked()){this.setSelected(vItem);};vItem.setEnabled(this.getEnabled());vItem.setName(this.getName());};};proto.remove=function(vItem){this._items.remove(vItem);vItem.setManager(null);if(vItem.getChecked()){this.setSelected(null);};};proto._modifySelected=function(propValue,propOldValue,propData){if(propOldValue&&propOldValue.getChecked()){propOldValue.setChecked(false);};if(propValue&&!propValue.getChecked()){propValue.setChecked(true);};return true;};proto._modifyEnabled=function(propValue,propOldValue,propData){for(var i=0,vItems=this._items,vLength=vItems.length;i<vLength;i++){vItems[i].setEnabled(propValue);};return true;};proto._modifyName=function(propValue,propOldValue,propData){for(var i=0,vItems=this._items,vLength=vItems.length;i<vLength;i++){vItems[i].setName(propValue);};return true;};proto.selectNext=function(vItem){var vIndex=this._items.indexOf(vItem);if(vIndex==-1){return;};var i=0;var vLength=this._items.length;vIndex=(vIndex+1)% vLength;while(i<vLength&&!this._items[vIndex].getEnabled()){vIndex=(vIndex+1)% vLength;i++;};this._selectByIndex(vIndex);};proto.selectPrevious=function(vItem){var vIndex=this._items.indexOf(vItem);if(vIndex==-1){return;};var i=0;var vLength=this._items.length;vIndex=(vIndex-1+vLength)% vLength;while(i<vLength&&!this._items[vIndex].getEnabled()){vIndex=(vIndex-1+vLength)% vLength;i++;};this._selectByIndex(vIndex);};proto._selectByIndex=function(vIndex){if(this._items[vIndex].getEnabled()){this.setSelected(this._items[vIndex]);this._items[vIndex].setFocused(true);};};proto.dispose=function(){if(this.getDisposed()){return;};this.forceSelected(null);if(this._items){for(var i,vItems=this._items,vLength=vItems.length;i<vLength;i++){vItems[i].dispose();delete vItems[i];};vItems=null;delete this._items;};return QxTarget.prototype.dispose.call(this);};function QxInputCheckIcon(){QxTerminator.call(this);this.setTagName("INPUT");this.setSelectable(false);if(QxClient.isMshtml()){this.setWidth(13);this.setHeight(13);}else if(QxClient.isGecko()){this.setMargin(0);};this.forceTabIndex(1);this.setTabIndex(-1);};QxInputCheckIcon.extend(QxTerminator,"QxInputCheckIcon");QxInputCheckIcon.addProperty({name:"name",type:QxConst.TYPEOF_STRING,impl:"apply"});QxInputCheckIcon.addProperty({name:"value",impl:"apply"});QxInputCheckIcon.addProperty({name:"type",impl:"apply"});QxInputCheckIcon.addProperty({name:"checked",type:QxConst.TYPEOF_BOOLEAN,defaultValue:false,impl:"apply",getAlias:"isChecked"});proto._modifyApply=function(propValue,propOldValue,propData){return this.setHtmlProperty(propData.name,propValue);};proto.getPreferredBoxWidth=function(){return 13;};proto.getPreferredBoxHeight=function(){return 13;};proto.getBoxWidth=proto.getPreferredBoxWidth;proto.getBoxHeight=proto.getPreferredBoxHeight;proto.getInnerWidth=proto.getPreferredBoxWidth;proto.getInnerHeight=proto.getPreferredBoxHeight;if(QxClient.isMshtml()){proto._afterAppear=function(){QxTerminator.prototype._afterAppear.call(this);var vElement=this.getElement();vElement.checked=this.getChecked();if(!this.getEnabled()){vElement.disabled=true;};};};proto._modifyEnabled=function(propValue,propOldValue,propData){propValue?this.removeHtmlAttribute(QxConst.CORE_DISABLED):this.setHtmlAttribute(QxConst.CORE_DISABLED,QxConst.CORE_DISABLED);return QxTerminator.prototype._modifyEnabled.call(this,propValue,propOldValue,propData);};function QxCheckBox(vText,vValue,vName,vChecked){QxAtom.call(this,vText);this.setTabIndex(1);this.setPadding(2,3);this._createIcon();if(QxUtil.isValidString(vValue)){this.setValue(vValue);};if(QxUtil.isValidString(vName)){this.setName(vName);};if(QxUtil.isValidBoolean(vChecked)){this.setChecked(vChecked);};this.addEventListener(QxConst.EVENT_TYPE_CLICK,this._onclick);this.addEventListener(QxConst.EVENT_TYPE_KEYDOWN,this._onkeydown);this.addEventListener(QxConst.EVENT_TYPE_KEYUP,this._onkeyup);};QxCheckBox.extend(QxAtom,"QxCheckBox");QxCheckBox.removeProperty({name:"icon"});QxCheckBox.addProperty({name:"name",type:QxConst.TYPEOF_STRING});QxCheckBox.addProperty({name:"value",type:QxConst.TYPEOF_STRING});QxCheckBox.addProperty({name:"checked",type:QxConst.TYPEOF_BOOLEAN,defaultValue:false,getAlias:"isChecked"});proto.INPUT_TYPE="checkbox";proto._createIcon=function(){var i=this._iconObject=new QxInputCheckIcon;i.setType(this.INPUT_TYPE);i.setChecked(this.isChecked());i.setEnabled(this.isEnabled());i.setAnonymous(true);this.addAtBegin(i);};proto._modifyChecked=function(propValue,propOldValue,propData){if(this._iconObject){this._iconObject.setChecked(propValue);};return true;};proto._handleIcon=function(){switch(this.getShow()){case QxAtom.SHOW_ICON:case QxAtom.SHOW_BOTH:this._iconIsVisible=true;break;default:this._iconIsVisible=false;};if(this._iconIsVisible){this._iconObject?this._iconObject.setDisplay(true):this._createIcon();}else if(this._iconObject){this._iconObject.setDisplay(false);};};proto._onclick=function(e){this.toggleChecked();};proto._onkeydown=function(e){if(e.getKeyCode()==QxKeyEvent.keys.enter&&!e.getAltKey()){this.toggleChecked();};};proto._onkeyup=function(e){if(e.getKeyCode()==QxKeyEvent.keys.space){this.toggleChecked();};};proto.dispose=function(){if(this.getDisposed()){return;};this.removeEventListener(QxConst.EVENT_TYPE_CLICK,this._onclick);this.removeEventListener(QxConst.EVENT_TYPE_KEYDOWN,this._onkeydown);this.removeEventListener(QxConst.EVENT_TYPE_KEYUP,this._onkeyup);return QxAtom.prototype.dispose.call(this);};function QxRadioButton(vText,vValue,vName,vChecked){QxCheckBox.call(this,vText,vValue,vName,vChecked);};QxRadioButton.extend(QxCheckBox,"QxRadioButton");QxRadioButton.addProperty({name:"manager",type:QxConst.TYPEOF_OBJECT,instance:"QxRadioManager",allowNull:true});proto.INPUT_TYPE="radio";proto._modifyChecked=function(propValue,propOldValue,propData){if(this._iconObject){this._iconObject.setChecked(propValue);};var vManager=this.getManager();if(vManager){vManager.handleItemChecked(this,propValue);};return true;};proto._modifyManager=function(propValue,propOldValue,propData){if(propOldValue){propOldValue.remove(this);};if(propValue){propValue.add(this);};return true;};proto._modifyName=function(propValue,propOldValue,propData){if(this._iconObject){this._iconObject.setName(propValue);};if(this.getManager()){this.getManager().setName(propValue);};return true;};proto._modifyValue=function(propValue,propOldValue,propData){if(this.isCreated()&&this._iconObject){this._iconObject.setValue(propValue);};return true;};proto._onkeydown=function(e){switch(e.getKeyCode()){case QxKeyEvent.keys.enter:if(!e.getAltKey()){this.setChecked(true);};break;case QxKeyEvent.keys.left:case QxKeyEvent.keys.up:QxFocusManager.mouseFocus=false;QxFocusManager.mouseFocus=false;return this.getManager()?this.getManager().selectPrevious(this):true;case QxKeyEvent.keys.right:case QxKeyEvent.keys.down:QxFocusManager.mouseFocus=false;return this.getManager()?this.getManager().selectNext(this):true;};};proto._onclick=function(e){this.setChecked(true);};proto._onkeyup=function(e){if(e.getKeyCode()==QxKeyEvent.keys.space){this.setChecked(true);};};proto.dispose=function(){if(this.getDisposed()){return;};return QxCheckBox.prototype.dispose.call(this);};function QxPopupManager(){QxManager.call(this);};QxPopupManager.extend(QxManager,"QxPopupManager");proto.update=function(vTarget){if(!(vTarget instanceof QxWidget)){vTarget=null;};var vPopup,vHashCode;var vAll=this.getAll();for(vHashCode in vAll){vPopup=vAll[vHashCode];if(!vPopup.getAutoHide()||vTarget==vPopup||vPopup.contains(vTarget)){continue;};vPopup.hide();};};QxPopupManager=new QxPopupManager;function QxPopup(){QxCanvasLayout.call(this);this.setZIndex(this._minZIndex);};QxPopup.extend(QxCanvasLayout,"QxPopup");QxPopup.changeProperty({name:"appearance",type:QxConst.TYPEOF_STRING,defaultValue:"popup"});QxPopup.addProperty({name:"autoHide",type:QxConst.TYPEOF_BOOLEAN,defaultValue:true});QxPopup.changeProperty({name:"display",type:QxConst.TYPEOF_BOOLEAN,defaultValue:false});proto._showTimeStamp=(new Date(0)).valueOf();proto._hideTimeStamp=(new Date(0)).valueOf();proto._beforeAppear=function(){QxCanvasLayout.prototype._beforeAppear.call(this);QxPopupManager.add(this);QxPopupManager.update(this);this._showTimeStamp=(new Date).valueOf();this.bringToFront();};proto._beforeDisappear=function(){QxCanvasLayout.prototype._beforeDisappear.call(this);QxPopupManager.remove(this);this._hideTimeStamp=(new Date).valueOf();};proto._makeActive=function(){this.getFocusRoot().setActiveChild(this);};proto._makeInactive=function(){var vRoot=this.getFocusRoot();var vCurrent=vRoot.getActiveChild();if(vCurrent==this){vRoot.setActiveChild(vRoot);};};proto.isFocusable=function(){return false;};proto._minZIndex=1e6;proto.bringToFront=function(){this.forceZIndex(Infinity);this._sendTo();};proto.sendToBack=function(){this.forceZIndex(-Infinity);this._sendTo();};proto._sendTo=function(){var vPopups=QxUtil.convertObjectValuesToArray(QxPopupManager.getAll());var vMenus=QxUtil.convertObjectValuesToArray(QxMenuManager.getAll());var vAll=vPopups.concat(vMenus).sort(QxCompare.byZIndex);var vLength=vAll.length;var vIndex=this._minZIndex;for(var i=0;i<vLength;i++){vAll[i].setZIndex(vIndex++);};};proto.getShowTimeStamp=function(){return this._showTimeStamp;};proto.getHideTimeStamp=function(){return this._hideTimeStamp;};proto.dispose=function(){if(this.getDisposed()){return;};this._showTimeStamp=null;this._hideTimeStamp=null;return QxCanvasLayout.prototype.dispose.call(this);};function QxPopupAtom(vLabel,vIcon){QxPopup.call(this);this._atom=new QxAtom(vLabel,vIcon);this._atom.setParent(this);};QxPopupAtom.extend(QxPopup,"QxPopupAtom");proto.getAtom=function(){return this._atom;};proto.dispose=function(){if(this.getDisposed()){return;};if(this._atom){this._atom.dispose();this._atom=null;};return QxPopup.prototype.dispose.call(this);};function QxToolTipManager(){QxManager.call(this);};QxToolTipManager.extend(QxManager,"QxToolTipManager");QxToolTipManager.addProperty({name:"currentToolTip",type:QxConst.TYPEOF_OBJECT,instance:"QxToolTip"});proto._modifyCurrentToolTip=function(propValue,propOldValue,propData){if(propOldValue&&propOldValue.contains(propValue)){return;};if(propOldValue){propOldValue.hide();propOldValue._stopShowTimer();propOldValue._stopHideTimer();};if(propValue){propValue._startShowTimer();};return true;};proto.handleMouseOver=function(e){var vTarget=e.getTarget();var vToolTip;if(!(vTarget instanceof QxWidget)&&vTarget.nodeType==1){vTarget=QxEventManager.getTargetObject(vTarget);};while(vTarget!=null&&!(vToolTip=vTarget.getToolTip())){vTarget=vTarget.getParent();};if(vToolTip!=null){vToolTip.setBoundToWidget(vTarget);};this.setCurrentToolTip(vToolTip);};proto.handleMouseOut=function(e){var vTarget=e.getTarget();var vRelatedTarget=e.getRelatedTarget();var vToolTip=this.getCurrentToolTip();if(vToolTip&&(vRelatedTarget==vToolTip||vToolTip.contains(vRelatedTarget))){return;};if(vRelatedTarget&&vTarget&&vTarget.contains(vRelatedTarget)){return;};if(vToolTip&&!vRelatedTarget){this.setCurrentToolTip(null);};};proto.handleFocus=function(e){var vTarget=e.getTarget();var vToolTip=vTarget.getToolTip();if(vToolTip!=null){vToolTip.setBoundToWidget(vTarget);this.setCurrentToolTip(vToolTip);};};proto.handleBlur=function(e){var vTarget=e.getTarget();if(!vTarget){return;};var vToolTip=this.getCurrentToolTip();if(vToolTip&&vToolTip==vTarget.getToolTip()){this.setCurrentToolTip(null);};};QxToolTipManager=new QxToolTipManager;function QxToolTip(vLabel,vIcon){QxPopupAtom.call(this,vLabel,vIcon);this._showTimer=new QxTimer(this.getShowInterval());this._showTimer.addEventListener(QxConst.EVENT_TYPE_INTERVAL,this._onshowtimer,this);this._hideTimer=new QxTimer(this.getHideInterval());this._hideTimer.addEventListener(QxConst.EVENT_TYPE_INTERVAL,this._onhidetimer,this);this.addEventListener(QxConst.EVENT_TYPE_MOUSEOVER,this._onmouseover);this.addEventListener(QxConst.EVENT_TYPE_MOUSEOUT,this._onmouseover);};QxToolTip.extend(QxPopupAtom,"QxToolTip");proto._minZIndex=1e7;QxToolTip.changeProperty({name:"appearance",type:QxConst.TYPEOF_STRING,defaultValue:"tool-tip"});QxToolTip.addProperty({name:"hideOnHover",type:QxConst.TYPEOF_BOOLEAN,defaultValue:true});QxToolTip.addProperty({name:"mousePointerOffsetX",type:QxConst.TYPEOF_NUMBER,defaultValue:1});QxToolTip.addProperty({name:"mousePointerOffsetY",type:QxConst.TYPEOF_NUMBER,defaultValue:20});QxToolTip.addProperty({name:"showInterval",type:QxConst.TYPEOF_NUMBER,defaultValue:1000});QxToolTip.addProperty({name:"hideInterval",type:QxConst.TYPEOF_NUMBER,defaultValue:4000});QxToolTip.addProperty({name:"boundToWidget",type:QxConst.TYPEOF_OBJECT,instance:"QxWidget"});proto._modifyHideInterval=function(propValue,propOldValue,propData){this._hideTimer.setInterval(propValue);return true;};proto._modifyShowInterval=function(propValue,propOldValue,propData){this._showTimer.setInterval(propValue);return true;};proto._modifyBoundToWidget=function(propValue,propOldValue,propData){if(propValue){this.setParent(propValue.getTopLevelWidget());}else if(propOldValue){this.setParent(null);};return true;};proto._beforeAppear=function(){this._stopShowTimer();this._startHideTimer();};proto._beforeDisappear=function(){this._stopHideTimer();};proto._startShowTimer=function(){if(!this._showTimer.getEnabled()){this._showTimer.start();};};proto._startHideTimer=function(){if(!this._hideTimer.getEnabled()){this._hideTimer.start();};};proto._stopShowTimer=function(){if(this._showTimer.getEnabled()){this._showTimer.stop();};};proto._stopHideTimer=function(){if(this._hideTimer.getEnabled()){this._hideTimer.stop();};};proto._onmouseover=function(e){if(this.getHideOnHover()){this.hide();};};proto._onshowtimer=function(e){this.setLeft(QxMouseEvent.getPageX()+this.getMousePointerOffsetX());this.setTop(QxMouseEvent.getPageY()+this.getMousePointerOffsetY());this.show();QxWidget.flushGlobalQueues();return true;};proto._onhidetimer=function(e){return this.hide();};proto.dispose=function(){if(this.getDisposed()){return;};this.removeEventListener(QxConst.EVENT_TYPE_MOUSEOVER,this._onmouseover);this.removeEventListener(QxConst.EVENT_TYPE_MOUSEOUT,this._onmouseover);if(this._showTimer){this._showTimer.removeEventListener(QxConst.EVENT_TYPE_INTERVAL,this._onshowtimer,this);this._showTimer.dispose();this._showTimer=null;};if(this._hideTimer){this._hideTimer.removeEventListener(QxConst.EVENT_TYPE_INTERVAL,this._onhidetimer,this);this._hideTimer.dispose();this._hideTimer=null;};return QxPopupAtom.prototype.dispose.call(this);};function QxFieldSet(vLegend,vIcon){QxCanvasLayout.call(this);this._createFrameObject();this._createLegendObject();this.setLegend(vLegend);if(QxUtil.isValidString(vIcon)){this.setIcon(vIcon);};this.remapChildrenHandlingTo(this._frameObject);};QxFieldSet.extend(QxCanvasLayout,"QxFieldSet");QxFieldSet.changeProperty({name:"appearance",type:QxConst.TYPEOF_STRING,defaultValue:"field-set"});proto._createLegendObject=function(){this._legendObject=new QxAtom;this._legendObject.setAppearance("field-set-legend");this.add(this._legendObject);};proto._createFrameObject=function(){this._frameObject=new QxCanvasLayout;this._frameObject.setAppearance("field-set-frame");this.add(this._frameObject);};proto.getFrameObject=function(){return this._frameObject;};proto.getLegendObject=function(){return this._legendObject;};proto.setLegend=function(vLegend){this._legendObject.setLabel(vLegend);};proto.getLegend=function(){return this._legendObject.getLabel();};proto.setIcon=function(vIcon){this._legendObject.setIcon(vIcon);};proto.getIcon=function(){this._legendObject.getIcon();};proto.dispose=function(){if(this.getDisposed()){return true;};if(this._legendObject){this._legendObject.dispose();this._legendObject=null;};if(this._frameObject){this._frameObject.dispose();this._frameObject=null;};return QxCanvasLayout.prototype.dispose.call(this);};function QxCheckBoxFieldSet(vLegend){QxFieldSet.call(this,vLegend);};QxCheckBoxFieldSet.extend(QxFieldSet,"QxCheckBoxFieldSet");proto._createLegendObject=function(){this._legendObject=new QxCheckBox;this._legendObject.setAppearance("check-box-field-set-legend");this._legendObject.setChecked(true);this.add(this._legendObject);};proto.setIcon=proto.getIcon=null;function QxRadioButtonFieldSet(vLegend){QxFieldSet.call(this,vLegend);};QxRadioButtonFieldSet.extend(QxFieldSet,"QxRadioButtonFieldSet");proto._createLegendObject=function(){this._legendObject=new QxRadioButton;this._legendObject.setAppearance("radio-button-field-set-legend");this._legendObject.setChecked(true);this.add(this._legendObject);};proto.setIcon=proto.getIcon=null;function QxIframe(vSource){QxTerminator.call(this);QxIframe.init();this.setSelectable(false);this.setTabIndex(0);var o=this;this.__onreadystatechange=function(e){return o._onreadystatechange(e);};this.__onload=function(e){return o._onload(e);};if(QxUtil.isValid(vSource)){this.setSource(vSource);};};QxIframe.extend(QxTerminator,"QxIframe");QxIframe.changeProperty({name:"appearance",type:QxConst.TYPEOF_STRING,defaultValue:"iframe"});QxIframe.addProperty({name:"source",type:QxConst.TYPEOF_STRING});QxIframe.addProperty({name:"frameName",type:QxConst.TYPEOF_STRING});proto._iframeNode=null;proto.getIframeNode=function(){return this._iframeNode;};proto.setIframeNode=function(vIframeNode){return this._iframeNode=vIframeNode;};proto._modifyElement=function(propValue,propOldValue,propData){var iframeNode=this.getIframeNode();if(!iframeNode){iframeNode=this.setIframeNode(QxIframe._element.cloneNode(true));if(QxClient.isMshtml()){iframeNode.onreadystatechange=this.__onreadystatechange;}else{iframeNode.onload=this.__onload;};};this._applyFrameName();this._applySource();propValue.appendChild(iframeNode);QxTerminator.prototype._modifyElement.call(this,propValue,propOldValue,propData);return true;};proto._modifySource=function(propValue,propOldValue,propData){if(this.isCreated()){this._applySource();};return true;};proto._applySource=function(){var currentSource=this.getSource();if(QxUtil.isInvalidString(currentSource)){currentSource=QxImageManager.buildUri("core/blank.gif");};this._isLoaded=false;this.getIframeNode().src=currentSource;};proto._applyFrameName=function(){var vName=this.getFrameName();this.getIframeNode().name=QxUtil.isValidString(vName)?vName:QxConst.CORE_EMPTY;};proto._modifyFrameName=function(propValue,propOldValue,propName,uniqModIds){if(this.isCreated()){this._applyFrameName();};return true;};proto._onreadystatechange=function(){if(this.getIframeNode().readyState=="complete"){this.dispatchEvent(new QxEvent(QxConst.EVENT_TYPE_LOAD),true);};};proto._onload=function(){this._isLoaded=true;this.dispatchEvent(new QxEvent(QxConst.EVENT_TYPE_LOAD),true);};if(QxClient.isMshtml()){proto.getContentWindow=function(){if(this.isCreated()){try{return this.getIframe().contentWindow;}catch(ex){};};return null;};proto.getContentDocument=function(){var win=this.getContentWindow();if(win){try{return win.document;}catch(ex){};};return null;};}else {proto.getContentWindow=function(){var doc=this.getContentDocument();return doc?doc.defaultView:null;};proto.getContentDocument=function(){if(this.isCreated()){try{return this.getIframe().contentDocument;}catch(ex){};};return null;};};proto._isLoaded=false;if(QxClient.isMshtml()){proto.isLoaded=function(){var doc=this.getContentDocument();return doc?doc.readyState=="complete":false;};}else {proto.isLoaded=function(){return this._isLoaded;};};proto.dispose=function(){if(this.getDisposed()){return;};if(this._iframeNode){this._iframeNode.onreadystatechange=null;this._iframeNode.onload=null;this._iframeNode=null;};QxTerminator.prototype.dispose.call(this);};QxIframe.init=function(){if(QxIframe._element){return;};var f=QxIframe._element=document.createElement("iframe");f.frameBorder=QxConst.CORE_ZERO;f.frameSpacing=QxConst.CORE_ZERO;f.marginWidth=QxConst.CORE_ZERO;f.marginHeight=QxConst.CORE_ZERO;f.width=QxConst.CORE_HUNDREDPERCENT;f.height=QxConst.CORE_HUNDREDPERCENT;f.hspace=QxConst.CORE_ZERO;f.vspace=QxConst.CORE_ZERO;f.border=QxConst.CORE_ZERO;f.scrolling=QxConst.CORE_AUTO;f.unselectable="on";f.allowTransparency="true";};function QxMenuManager(){QxManager.call(this);};QxMenuManager.extend(QxManager,"QxMenuManager");proto.update=function(vTarget){var vMenu,vHashCode;var vAll=this.getAll();for(vHashCode in vAll){vMenu=vAll[vHashCode];if(!vMenu.getAutoHide()){continue;};if(!vTarget||vMenu.getOpener()!=vTarget){vMenu.hide();};};};QxMenuManager=new QxMenuManager;function QxMenuLayoutImpl(vWidget){QxVerticalBoxLayoutImpl.call(this,vWidget);this.setEnableFlexSupport(false);};QxMenuLayoutImpl.extend(QxVerticalBoxLayoutImpl,"QxMenuLayoutImpl");proto.updateChildrenOnJobQueueFlush=function(vQueue){var vWidget=this.getWidget();var ch,chc;if(vQueue.preferredInnerWidth){var ch=vWidget.getChildren(),chl=ch.length,chc;var sch,schl;for(var i=0;i<chl;i++){chc=ch[i];sch=chc.getChildren();schl=sch.length;for(var j=0;j<schl;j++){sch[j].addToLayoutChanges(QxConst.JOB_LOCATIONX);};};};return QxVerticalBoxLayoutImpl.prototype.updateChildrenOnJobQueueFlush.call(this,vQueue);};function QxMenuLayout(){QxVerticalBoxLayout.call(this);this.setAnonymous(true);};QxMenuLayout.extend(QxVerticalBoxLayout,"QxMenuLayout");QxMenuLayout.changeProperty({name:"appearance",type:QxConst.TYPEOF_STRING,defaultValue:"menu-layout"});proto._createLayoutImpl=function(){return new QxMenuLayoutImpl(this);};function QxMenu(){QxPopup.call(this);var l=this._layout=new QxMenuLayout;this.add(l);this._openTimer=new QxTimer(this.getOpenInterval());this._openTimer.addEventListener(QxConst.EVENT_TYPE_INTERVAL,this._onopentimer,this);this._closeTimer=new QxTimer(this.getCloseInterval());this._closeTimer.addEventListener(QxConst.EVENT_TYPE_INTERVAL,this._onclosetimer,this);this.addEventListener(QxConst.EVENT_TYPE_MOUSEOVER,this._onmouseover);this.addEventListener(QxConst.EVENT_TYPE_MOUSEMOVE,this._onmouseover);this.addEventListener(QxConst.EVENT_TYPE_MOUSEOUT,this._onmouseout);this.addEventListener(QxConst.EVENT_TYPE_KEYDOWN,this._onkeydown);this.remapChildrenHandlingTo(this._layout);};QxMenu.extend(QxPopup,"QxMenu");proto._remappingChildTable=["add","remove","addAt","addAtBegin","addAtEnd","removeAt","addBefore","addAfter","removeAll","getFirstChild","getFirstActiveChild","getLastChild","getLastActiveChild"];QxMenu.changeProperty({name:"appearance",type:QxConst.TYPEOF_STRING,defaultValue:"menu"});QxMenu.addProperty({name:"iconContentGap",type:QxConst.TYPEOF_NUMBER,defaultValue:4});QxMenu.addProperty({name:"labelShortcutGap",type:QxConst.TYPEOF_NUMBER,defaultValue:10});QxMenu.addProperty({name:"contentArrowGap",type:QxConst.TYPEOF_NUMBER,defaultValue:8});QxMenu.addProperty({name:"contentNonIconPadding",type:QxConst.TYPEOF_NUMBER,defaultValue:20});QxMenu.addProperty({name:"contentNonArrowPadding",type:QxConst.TYPEOF_NUMBER,defaultValue:8});QxMenu.addProperty({name:"hoverItem",type:QxConst.TYPEOF_OBJECT});QxMenu.addProperty({name:"openItem",type:QxConst.TYPEOF_OBJECT});QxMenu.addProperty({name:"opener",type:QxConst.TYPEOF_OBJECT});QxMenu.addProperty({name:"parentMenu",type:QxConst.TYPEOF_OBJECT});QxMenu.addProperty({name:"fastReopen",type:QxConst.TYPEOF_BOOLEAN,defaultValue:false});QxMenu.addProperty({name:"openInterval",type:QxConst.TYPEOF_NUMBER,defaultValue:250});QxMenu.addProperty({name:"closeInterval",type:QxConst.TYPEOF_NUMBER,defaultValue:250});QxMenu.addProperty({name:"subMenuHorizontalOffset",type:QxConst.TYPEOF_NUMBER,defaultValue:-3});QxMenu.addProperty({name:"subMenuVerticalOffset",type:QxConst.TYPEOF_NUMBER,defaultValue:-2});QxMenu.addProperty({name:"indentShortcuts",type:QxConst.TYPEOF_BOOLEAN,defaultValue:true});proto.getLayout=function(){return this._layout;};proto._beforeAppear=function(){QxCanvasLayout.prototype._beforeAppear.call(this);QxMenuManager.add(this);this.bringToFront();this._makeActive();};proto._beforeDisappear=function(){QxCanvasLayout.prototype._beforeDisappear.call(this);QxMenuManager.remove(this);this._makeInactive();this.setHoverItem(null);this.setOpenItem(null);var vOpener=this.getOpener();if(vOpener){vOpener.removeState(QxConst.STATE_PRESSED);};};proto._modifyHoverItem=function(propValue,propOldValue,propData){if(propOldValue){propOldValue.removeState(QxConst.STATE_OVER);};if(propValue){propValue.addState(QxConst.STATE_OVER);};return true;};proto._modifyOpenItem=function(propValue,propOldValue,propData){var vMakeActive=false;if(propOldValue){var vOldSub=propOldValue.getMenu();if(vOldSub){vOldSub.setParentMenu(null);vOldSub.setOpener(null);vOldSub.hide();};};if(propValue){var vSub=propValue.getMenu();if(vSub){vSub.setOpener(propValue);vSub.setParentMenu(this);var pl=propValue.getElement();var el=this.getElement();vSub.setTop(QxDom.getComputedPageBoxTop(pl)+this.getSubMenuVerticalOffset());vSub.setLeft(QxDom.getComputedPageBoxLeft(el)+QxDom.getComputedBoxWidth(el)+this.getSubMenuHorizontalOffset());vSub.show();QxWidget.flushGlobalQueues();};};return true;};QxMenu.addCachedProperty({name:"maxIconWidth"});QxMenu.addCachedProperty({name:"maxLabelWidth"});QxMenu.addCachedProperty({name:"maxLabelWidthIncShortcut"});QxMenu.addCachedProperty({name:"maxShortcutWidth"});QxMenu.addCachedProperty({name:"maxArrowWidth"});QxMenu.addCachedProperty({name:"maxContentWidth"});QxMenu.addCachedProperty({name:"iconPosition",defaultValue:0});QxMenu.addCachedProperty({name:"labelPosition"});QxMenu.addCachedProperty({name:"shortcutPosition"});QxMenu.addCachedProperty({name:"arrowPosition"});QxMenu.addCachedProperty({name:"menuButtonNeededWidth"});proto._computeMaxIconWidth=function(){var ch=this.getLayout().getChildren(),chl=ch.length,chc,m=0;for(var i=0;i<chl;i++){chc=ch[i];if(chc.hasIcon()){m=Math.max(m,chc.getIconObject().getPreferredBoxWidth());};};return m;};proto._computeMaxLabelWidth=function(){var ch=this.getLayout().getChildren(),chl=ch.length,chc,m=0;for(var i=0;i<chl;i++){chc=ch[i];if(chc.hasLabel()){m=Math.max(m,chc.getLabelObject().getPreferredBoxWidth());};};return m;};proto._computeMaxLabelWidthIncShortcut=function(){var ch=this.getLayout().getChildren(),chl=ch.length,chc,m=0;for(var i=0;i<chl;i++){chc=ch[i];if(chc.hasLabel()&&chc.hasShortcut()){m=Math.max(m,chc.getLabelObject().getPreferredBoxWidth());};};return m;};proto._computeMaxShortcutWidth=function(){var ch=this.getLayout().getChildren(),chl=ch.length,chc,m=0;for(var i=0;i<chl;i++){chc=ch[i];if(chc.hasShortcut()){m=Math.max(m,chc.getShortcutObject().getPreferredBoxWidth());};};return m;};proto._computeMaxArrowWidth=function(){var ch=this.getLayout().getChildren(),chl=ch.length,chc,m=0;for(var i=0;i<chl;i++){chc=ch[i];if(chc.hasMenu()){m=Math.max(m,chc.getArrowObject().getPreferredBoxWidth());};};return m;};proto._computeMaxContentWidth=function(){var vSum;var lw=this.getMaxLabelWidth();var sw=this.getMaxShortcutWidth();if(this.getIndentShortcuts()){var vTemp=sw+this.getMaxLabelWidthIncShortcut();if(sw>0){vTemp+=this.getLabelShortcutGap();};vSum=Math.max(lw,vTemp);}else {vSum=lw+sw;if(lw>0&&sw>0){vSum+=this.getLabelShortcutGap();};};return vSum;};proto._computeIconPosition=function(){return 0;};proto._computeLabelPosition=function(){var v=this.getMaxIconWidth();return v>0?v+this.getIconContentGap():this.getContentNonIconPadding();};proto._computeShortcutPosition=function(){return this.getLabelPosition()+this.getMaxContentWidth()-this.getMaxShortcutWidth();};proto._computeArrowPosition=function(){var v=this.getMaxContentWidth();return this.getLabelPosition()+(v>0?v+this.getContentArrowGap():v);};proto._invalidateMaxIconWidth=function(){this._cachedMaxIconWidth=null;this._invalidateLabelPosition();this._invalidateMenuButtonNeededWidth();};proto._invalidateMaxLabelWidth=function(){this._cachedMaxLabelWidth=null;this._invalidateShortcutPosition();this._invalidateMaxLabelWidthIncShortcut();this._invalidateMaxContentWidth();this._invalidateMenuButtonNeededWidth();};proto._invalidateMaxShortcutWidth=function(){this._cachedMaxShortcutWidth=null;this._invalidateArrowPosition();this._invalidateMaxContentWidth();this._invalidateMenuButtonNeededWidth();};proto._invalidateMaxLabelWidth=function(){this._cachedMaxArrowWidth=null;this._invalidateMenuButtonNeededWidth();};proto._invalidateLabelPosition=function(){this._cachedLabelPosition=null;this._invalidateShortcutPosition();};proto._invalidateShortcutPosition=function(){this._cachedShortcutPosition=null;this._invalidateArrowPosition();};proto._computeMenuButtonNeededWidth=function(){var vSum=0;var vMaxIcon=this.getMaxIconWidth();var vMaxContent=this.getMaxContentWidth();var vMaxArrow=this.getMaxArrowWidth();if(vMaxIcon>0){vSum+=vMaxIcon;}else {vSum+=this.getContentNonIconPadding();};if(vMaxContent>0){if(vMaxIcon>0){vSum+=this.getIconContentGap();};vSum+=vMaxContent;};if(vMaxArrow>0){if(vMaxIcon>0||vMaxContent>0){vSum+=this.getContentArrowGap();};vSum+=vMaxArrow;}else {vSum+=this.getContentNonArrowPadding();};return vSum;};proto._onmouseover=function(e){var vParent=this.getParentMenu();if(vParent){vParent._closeTimer.stop();var vOpener=this.getOpener();if(vOpener){vParent.setHoverItem(vOpener);};};var t=e.getTarget();if(t==this){this._openTimer.stop();this._closeTimer.start();this.setHoverItem(null);return;};var vOpen=this.getOpenItem();if(vOpen){this.setHoverItem(t);this._openTimer.stop();if(t.hasMenu()){if(this.getFastReopen()){this.setOpenItem(t);this._closeTimer.stop();}else {this._openTimer.start();};}else {this._closeTimer.start();};}else {this.setHoverItem(t);this._openTimer.stop();if(t.hasMenu()){this._openTimer.start();};};};proto._onmouseout=function(e){this._openTimer.stop();var t=e.getTarget();if(t!=this&&t.hasMenu()){this._closeTimer.start();};this.setHoverItem(null);};proto._onopentimer=function(e){this._openTimer.stop();var vHover=this.getHoverItem();if(vHover&&vHover.hasMenu()){this.setOpenItem(vHover);};};proto._onclosetimer=function(e){this._closeTimer.stop();this.setOpenItem(null);};proto._onkeydown=function(e){switch(e.getKeyCode()){case QxKeyEvent.keys.up:this._onkeydown_up(e);break;case QxKeyEvent.keys.down:this._onkeydown_down(e);break;case QxKeyEvent.keys.left:this._onkeydown_left(e);break;case QxKeyEvent.keys.right:this._onkeydown_right(e);break;case QxKeyEvent.keys.enter:this._onkeydown_enter(e);break;default:return;};e.preventDefault();};proto._onkeydown_up=function(e){var vHover=this.getHoverItem();var vPrev=vHover?vHover.isFirstChild()?this.getLastActiveChild():vHover.getPreviousActiveSibling([QxMenuSeparator]):this.getLastActiveChild();this.setHoverItem(vPrev);};proto._onkeydown_down=function(e){var vHover=this.getHoverItem();var vNext=vHover?vHover.isLastChild()?this.getFirstActiveChild():vHover.getNextActiveSibling([QxMenuSeparator]):this.getFirstActiveChild();this.setHoverItem(vNext);};proto._onkeydown_left=function(e){var vOpener=this.getOpener();if(vOpener instanceof QxMenuButton){var vOpenerParent=this.getOpener().getParentMenu();vOpenerParent.setOpenItem(null);vOpenerParent.setHoverItem(vOpener);vOpenerParent._makeActive();}else if(vOpener instanceof QxToolBarMenuButton){var vToolBar=vOpener.getParentToolBar();this.getFocusRoot().setActiveChild(vToolBar);vToolBar._onkeydown(e);};};proto._onkeydown_right=function(e){var vHover=this.getHoverItem();if(vHover){var vMenu=vHover.getMenu();if(vMenu){this.setOpenItem(vHover);vMenu.setHoverItem(vMenu.getFirstActiveChild());return;};}else if(!this.getOpenItem()){var vFirst=this.getLayout().getFirstActiveChild();if(vFirst){vFirst.hasMenu()?this.setOpenItem(vFirst):this.setHoverItem(vFirst);};};var vOpener=this.getOpener();if(vOpener instanceof QxToolBarMenuButton){var vToolBar=vOpener.getParentToolBar();this.getFocusRoot().setActiveChild(vToolBar);vToolBar._onkeydown(e);}else if(vOpener instanceof QxMenuButton&&vHover){var vOpenerParent=vOpener.getParentMenu();while(vOpenerParent&&vOpenerParent instanceof QxMenu){vOpener=vOpenerParent.getOpener();if(vOpener instanceof QxMenuButton){vOpenerParent=vOpener.getParentMenu();}else {if(vOpener){vOpenerParent=vOpener.getParent();};break;};};if(vOpenerParent instanceof QxToolBarPart){vOpenerParent=vOpenerParent.getParent();};if(vOpenerParent instanceof QxToolBar){this.getFocusRoot().setActiveChild(vOpenerParent);vOpenerParent._onkeydown(e);};};};proto._onkeydown_enter=function(e){var vHover=this.getHoverItem();if(vHover){vHover.execute();};QxMenuManager.update();};proto.dispose=function(){if(this.getDisposed()){return;};if(this._layout){this._layout.dispose();this._layout=null;};if(this._openTimer){this._openTimer.dispose();this._openTimer=null;};if(this._closeTimer){this._closeTimer.dispose();this._closeTimer=null;};this.removeEventListener(QxConst.EVENT_TYPE_MOUSEOVER,this._onmouseover);this.removeEventListener(QxConst.EVENT_TYPE_MOUSEMOVE,this._onmouseover);this.removeEventListener(QxConst.EVENT_TYPE_MOUSEOUT,this._onmouseout);this.removeEventListener(QxConst.EVENT_TYPE_KEYDOWN,this._onkeydown);return QxPopup.prototype.dispose.call(this);};function QxMenuButtonLayoutImpl(vWidget){QxHorizontalBoxLayoutImpl.call(this,vWidget);this.setEnableFlexSupport(false);};QxMenuButtonLayoutImpl.extend(QxHorizontalBoxLayoutImpl,"QxMenuButtonLayoutImpl");proto.computeChildrenNeededWidth=function(){var vWidget=this.getWidget();var vMenu=vWidget.getParent().getParent();return vMenu.getMenuButtonNeededWidth();};proto.updateSelfOnChildOuterWidthChange=function(vChild){var vWidget=this.getWidget();var vMenu=vWidget.getParent().getParent();switch(vChild){case vWidget._iconObject:vMenu._invalidateMaxIconWidth();break;case vWidget._labelObject:vMenu._invalidateMaxLabelWidth();break;case vWidget._shortcutObject:vMenu._invalidateMaxShortcutWidth();break;case vWidget._arrowObject:vMenu._invalidateMaxArrowWidth();break;};return QxHorizontalBoxLayoutImpl.prototype.updateSelfOnChildOuterWidthChange.call(this,vChild);};proto.layoutChild_locationX=function(vChild,vJobs){var vWidget=this.getWidget();var vMenu=vWidget.getParent().getParent();var vPos=null;switch(vChild){case vWidget._iconObject:vPos=vMenu.getIconPosition();break;case vWidget._labelObject:vPos=vMenu.getLabelPosition();break;case vWidget._shortcutObject:vPos=vMenu.getShortcutPosition();break;case vWidget._arrowObject:vPos=vMenu.getArrowPosition();break;};if(vPos!=null){vPos+=vWidget.getPaddingLeft();vChild._applyRuntimeLeft(vPos);};};function QxMenuButton(vLabel,vIcon,vCommand,vMenu){QxHorizontalBoxLayout.call(this);var io=this._iconObject=new QxImage;io.setAnonymous(true);var lo=this._labelObject=new QxLabel;lo.setAnonymous(true);lo.setSelectable(false);var so=this._shortcutObject=new QxLabel;so.setAnonymous(true);so.setSelectable(false);var ao = this._arrowObject = new QxImage("widgets/arrows/next.gif");ao.setAnonymous(true);this.setLabel(vLabel);this.setIcon(vIcon);this.setCommand(vCommand);this.setMenu(vMenu);this.addEventListener(QxConst.EVENT_TYPE_MOUSEDOWN,this._onmousedown);};QxMenuButton.extend(QxHorizontalBoxLayout,"QxMenuButton");QxMenuButton.changeProperty({name:"appearance",type:QxConst.TYPEOF_STRING,defaultValue:"menu-button"});QxMenuButton.addProperty({name:"icon",type:QxConst.TYPEOF_STRING});QxMenuButton.addProperty({name:"label",type:QxConst.TYPEOF_STRING});QxMenuButton.addProperty({name:"menu",type:QxConst.TYPEOF_OBJECT});proto._hasIcon=false;proto._hasLabel=false;proto._hasShortcut=false;proto._hasMenu=false;proto.hasIcon=function(){return this._hasIcon;};proto.hasLabel=function(){return this._hasLabel;};proto.hasShortcut=function(){return this._hasShortcut;};proto.hasMenu=function(){return this._hasMenu;};proto.getIconObject=function(){return this._iconObject;};proto.getLabelObject=function(){return this._labelObject;};proto.getShortcutObject=function(){return this._shortcutObject;};proto.getArrowObject=function(){return this._arrowObject;};proto.getParentMenu=function(){var vParent=this.getParent();if(vParent){vParent=vParent.getParent();if(vParent&&vParent instanceof QxMenu){return vParent;};};return null;};proto._createLayoutImpl=function(){return new QxMenuButtonLayoutImpl(this);};proto._modifyEnabled=function(propValue,propOldValue,propData){if(this._iconObject){this._iconObject.setEnabled(propValue);};if(this._labelObject){this._labelObject.setEnabled(propValue);};return QxBoxLayout.prototype._modifyEnabled.call(this,propValue,propOldValue,propData);};proto._modifyIcon=function(propValue,propOldValue,propData){this._iconObject.setSource(propValue);if(QxUtil.isValidString(propValue)){this._hasIcon=true;if(QxUtil.isInvalidString(propOldValue)){this.addAtBegin(this._iconObject);};}else {this._hasIcon=false;this.remove(this._iconObject);};return true;};proto._modifyLabel=function(propValue,propOldValue,propData){this._labelObject.setHtml(propValue);if(QxUtil.isValidString(propValue)){this._hasLabel=true;if(QxUtil.isInvalidString(propOldValue)){this.addAt(this._labelObject,this.getFirstChild()==this._iconObject?1:0);};}else {this._hasLabel=false;this.remove(this._labelObject);};return true;};proto._modifyCommand=function(propValue,propOldValue,propData){var vHtml=propValue?propValue.getShortcut():QxConst.CORE_EMPTY;this._shortcutObject.setHtml(vHtml);if(QxUtil.isValidString(vHtml)){this._hasShortcut=true;var vOldHtml=propOldValue?propOldValue.getShortcut():QxConst.CORE_EMPTY;if(QxUtil.isInvalidString(vOldHtml)){if(this.getLastChild()==this._arrowObject){this.addBefore(this._shortcutObject,this._arrowObject);}else {this.addAtEnd(this._shortcutObject);};};}else {this._hasShortcut=false;this.remove(this._shortcutObject);};return true;};proto._modifyMenu=function(propValue,propOldValue,propData){if(QxUtil.isValidObject(propValue)){this._hasMenu=true;if(QxUtil.isInvalidObject(propOldValue)){this.addAtEnd(this._arrowObject);};}else {this._hasMenu=false;this.remove(this._arrowObject);};return true;};proto._onmousedown=function(e){this.execute();};proto.dispose=function(){if(this.getDisposed()){return;};if(this._iconObject){this._iconObject.dispose();this._iconObject=null;};if(this._labelObject){this._labelObject.dispose();this._labelObject=null;};if(this._shortcutObject){this._shortcutObject.dispose();this._shortcutObject=null;};if(this._arrowObject){this._arrowObject.dispose();this._arrowObject=null;};this.removeEventListener(QxConst.EVENT_TYPE_MOUSEDOWN,this._onmousedown);return QxCanvasLayout.prototype.dispose.call(this);};function QxMenuCheckBox(vLabel,vCommand,vChecked){QxMenuButton.call(this,vLabel,QxConst.IMAGE_BLANK,vCommand);if(QxUtil.isValidBoolean(vChecked)){this.setChecked(vChecked);};this._iconObject.setAppearance("menu-check-box-icon");};QxMenuCheckBox.extend(QxMenuButton,"QxMenuCheckBox");QxMenuCheckBox.changeProperty({name:"appearance",type:QxConst.TYPEOF_STRING,defaultValue:"menu-check-box"});QxMenuCheckBox.addProperty({name:"name",type:QxConst.TYPEOF_STRING});QxMenuCheckBox.addProperty({name:"value",type:QxConst.TYPEOF_STRING});QxMenuCheckBox.addProperty({name:"checked",type:QxConst.TYPEOF_BOOLEAN,defaultValue:false,getAlias:"isChecked"});proto._modifyChecked=function(propValue,propOldValue,propData){if(propValue){this.addState(QxConst.STATE_CHECKED);this.getIconObject().addState(QxConst.STATE_CHECKED);}else {this.removeState(QxConst.STATE_CHECKED);this.getIconObject().removeState(QxConst.STATE_CHECKED);};return true;};proto.execute=function(){this.setChecked(!this.getChecked());QxMenuButton.prototype.execute.call(this);};function QxMenuRadioButton(vLabel,vCommand,vChecked){QxMenuCheckBox.call(this,vLabel,vCommand,vChecked);this._iconObject.setAppearance("menu-radio-button-icon");};QxMenuRadioButton.extend(QxMenuCheckBox,"QxMenuRadioButton");QxMenuRadioButton.changeProperty({name:"appearance",type:QxConst.TYPEOF_STRING,defaultValue:"menu-radio-button"});QxMenuRadioButton.addProperty({name:"manager",type:QxConst.TYPEOF_OBJECT,instance:"QxRadioManager",allowNull:true});proto._modifyChecked=function(propValue,propOldValue,propData){var vManager=this.getManager();if(vManager){if(propValue){vManager.setSelected(this);}else if(vManager.getSelected()==this){vManager.setSelected(null);};};return QxMenuCheckBox.prototype._modifyChecked.call(this,propValue,propOldValue,propData);};proto._modifyManager=function(propValue,propOldValue,propData){if(propOldValue){propOldValue.remove(this);};if(propValue){propValue.add(this);};return true;};proto._modifyName=function(propValue,propOldValue,propData){if(this.getManager()){this.getManager().setName(propValue);};return true;};proto.execute=function(){this.setChecked(true);QxMenuButton.prototype.execute.call(this);};function QxMenuSeparator(){QxCanvasLayout.call(this);this.setStyleProperty("fontSize","0");this.setStyleProperty("lineHeight","0");this._line=new QxTerminator;this._line.setAnonymous(true);this._line.setAppearance("menu-separator-line");this.add(this._line);this.addEventListener(QxConst.EVENT_TYPE_MOUSEDOWN,this._onmousedown);};QxMenuSeparator.extend(QxCanvasLayout,"QxMenuSeparator");QxMenuSeparator.changeProperty({name:"appearance",type:QxConst.TYPEOF_STRING,defaultValue:"menu-separator"});proto.hasIcon=QxUtil.returnFalse;proto.hasLabel=QxUtil.returnFalse;proto.hasShortcut=QxUtil.returnFalse;proto.hasMenu=QxUtil.returnFalse;proto._onmousedown=function(e){e.stopPropagation();};proto.dispose=function(){if(this.getDisposed()){return true;};if(this._line){this._line.dispose();this._line=null;};return QxCanvasLayout.prototype.dispose.call(this);};function QxToolBar(){QxHorizontalBoxLayout.call(this);this.addEventListener(QxConst.EVENT_TYPE_KEYDOWN,this._onkeydown);};QxToolBar.extend(QxHorizontalBoxLayout,"QxToolBar");QxToolBar.addProperty({name:"openMenu",type:QxConst.TYPEOF_OBJECT,instance:"QxMenu"});QxToolBar.changeProperty({name:"appearance",type:QxConst.TYPEOF_STRING,defaultValue:"toolbar"});proto.getAllButtons=function(){var vChildren=this.getChildren();var vLength=vChildren.length;var vDeepChildren=[];var vCurrent;for(var i=0;i<vLength;i++){vCurrent=vChildren[i];if(vCurrent instanceof QxToolBarMenuButton){vDeepChildren.push(vCurrent);}else if(vCurrent instanceof QxToolBarPart){vDeepChildren=vDeepChildren.concat(vCurrent.getChildren());};};return vDeepChildren;};proto._onkeydown=function(e){switch(e.getKeyCode()){case QxKeyEvent.keys.left:return this._onkeydown_left(e);case QxKeyEvent.keys.right:return this._onkeydown_right(e);};};proto._onkeydown_left=function(e){var vMenu=this.getOpenMenu();if(!vMenu){return;};var vOpener=vMenu.getOpener();if(!vOpener){return;};var vChildren=this.getAllButtons();var vChildrenLength=vChildren.length;var vIndex=vChildren.indexOf(vOpener);var vCurrent;var vPrevButton=null;for(var i=vIndex-1;i>=0;i--){vCurrent=vChildren[i];if(vCurrent instanceof QxToolBarMenuButton&&vCurrent.getEnabled()){vPrevButton=vCurrent;break;};};if(!vPrevButton){for(var i=vChildrenLength-1;i>vIndex;i--){vCurrent=vChildren[i];if(vCurrent instanceof QxToolBarMenuButton&&vCurrent.getEnabled()){vPrevButton=vCurrent;break;};};};if(vPrevButton){QxMenuManager.update();vPrevButton._showMenu(true);};};proto._onkeydown_right=function(e){var vMenu=this.getOpenMenu();if(!vMenu){return;};var vOpener=vMenu.getOpener();if(!vOpener){return;};var vChildren=this.getAllButtons();var vChildrenLength=vChildren.length;var vIndex=vChildren.indexOf(vOpener);var vCurrent;var vNextButton=null;for(var i=vIndex+1;i<vChildrenLength;i++){vCurrent=vChildren[i];if(vCurrent instanceof QxToolBarMenuButton&&vCurrent.getEnabled()){vNextButton=vCurrent;break;};};if(!vNextButton){for(var i=0;i<vIndex;i++){vCurrent=vChildren[i];if(vCurrent instanceof QxToolBarMenuButton&&vCurrent.getEnabled()){vNextButton=vCurrent;break;};};};if(vNextButton){QxMenuManager.update();vNextButton._showMenu(true);};};proto.dispose=function(){if(this.getDisposed()){return;};this.removeEventListener(QxConst.EVENT_TYPE_KEYDOWN,this._onkeydown);return QxHorizontalBoxLayout.prototype.dispose.call(this);};function QxToolBarPart(){QxHorizontalBoxLayout.call(this);this._handle=new QxToolBarPartHandle;this.add(this._handle);};QxToolBarPart.extend(QxHorizontalBoxLayout,"QxToolBarPart");QxToolBarPart.changeProperty({name:"appearance",type:QxConst.TYPEOF_STRING,defaultValue:"toolbar-part"});proto._cloneRecursive=function(cloneInstance){var vChildren=this.getChildren();var vLength=vChildren.length;for(var i=0;i<vLength;i++){if(!(vChildren[i]instanceof QxToolBarPartHandle)){cloneInstance.add(vChildren[i].clone(true));};};};proto.dispose=function(){if(this.getDisposed()){return;};if(this._handle){this._handle.dispose();this._handle=null;};return QxHorizontalBoxLayout.prototype.dispose.call(this);};function QxToolBarPartHandle(){QxCanvasLayout.call(this);var l=new QxTerminator;l.setAppearance("toolbar-part-handle-line");this.add(l);};QxToolBarPartHandle.extend(QxCanvasLayout,"QxToolBarPartHandle");QxToolBarPartHandle.changeProperty({name:"appearance",type:QxConst.TYPEOF_STRING,defaultValue:"toolbar-part-handle"});function QxToolBarButton(vText,vIcon,vIconWidth,vIconHeight,vFlash){QxButton.call(this,vText,vIcon,vIconWidth,vIconHeight,vFlash);this.setTabIndex(-1);};QxToolBarButton.extend(QxButton,"QxToolBarButton");QxToolBarButton.changeProperty({name:"appearance",type:QxConst.TYPEOF_STRING,defaultValue:"toolbar-button"});proto._onkeydown=QxUtil.returnTrue;proto._onkeyup=QxUtil.returnTrue;function QxToolBarSeparator(){QxCanvasLayout.call(this);var l=new QxTerminator;l.setAppearance("toolbar-separator-line");this.add(l);};QxToolBarSeparator.extend(QxCanvasLayout,"QxToolBarSeparator");QxToolBarSeparator.changeProperty({name:"appearance",type:QxConst.TYPEOF_STRING,defaultValue:"toolbar-separator"});function QxToolBarCheckBox(vText,vIcon,vChecked){QxToolBarButton.call(this,vText,vIcon);if(QxUtil.isValid(vChecked)){this.setChecked(vChecked);};};QxToolBarCheckBox.extend(QxToolBarButton,"QxToolBarCheckBox");QxToolBarCheckBox.addProperty({name:"checked",type:QxConst.TYPEOF_BOOLEAN,defaultValue:false});proto._modifyChecked=function(propValue,propOldValue,propData){propValue?this.addState(QxConst.STATE_CHECKED):this.removeState(QxConst.STATE_CHECKED);return true;};proto._onmouseup=function(e){this.setCapture(false);if(!this.hasState(QxConst.STATE_ABANDONED)){this.addState(QxConst.STATE_OVER);this.setChecked(!this.getChecked());this.execute();};this.removeState(QxConst.STATE_ABANDONED);this.removeState(QxConst.STATE_PRESSED);e.stopPropagation();};function QxToolBarRadioButton(vText,vIcon,vChecked){QxToolBarCheckBox.call(this,vText,vIcon,vChecked);};QxToolBarRadioButton.extend(QxToolBarCheckBox,"QxToolBarRadioButton");QxToolBarRadioButton.addProperty({name:"manager",type:QxConst.TYPEOF_OBJECT,instance:"QxRadioManager",allowNull:true});QxToolBarRadioButton.addProperty({name:"name",type:QxConst.TYPEOF_STRING});QxToolBarRadioButton.addProperty({name:"disableUncheck",type:QxConst.TYPEOF_BOOLEAN,defaultValue:false});proto._modifyChecked=function(propValue,propOldValue,propData){QxToolBarCheckBox.prototype._modifyChecked.call(this,propValue,propOldValue,propData);var vManager=this.getManager();if(vManager){vManager.handleItemChecked(this,propValue);};return true;};proto._modifyManager=function(propValue,propOldValue,propData){if(propOldValue){propOldValue.remove(this);};if(propValue){propValue.add(this);};return true;};proto._onmouseup=function(e){this.setCapture(false);if(!this.hasState(QxConst.STATE_ABANDONED)){this.addState(QxConst.STATE_OVER);this.setChecked(this.getDisableUncheck()||!this.getChecked());this.execute();};this.removeState(QxConst.STATE_ABANDONED);this.removeState(QxConst.STATE_PRESSED);e.stopPropagation();};function QxToolBarMenuButton(vText,vMenu,vIcon,vIconWidth,vIconHeight,vFlash){QxToolBarButton.call(this,vText,vIcon,vIconWidth,vIconHeight,vFlash);if(QxUtil.isValidObject(vMenu)){this.setMenu(vMenu);};};QxToolBarMenuButton.extend(QxToolBarButton,"QxToolBarMenuButton");QxToolBarMenuButton.addProperty({name:"menu",type:QxConst.TYPEOF_OBJECT,instance:"QxMenu"});proto.getParentToolBar=function(){var vParent=this.getParent();if(vParent instanceof QxToolBarPart){vParent=vParent.getParent();};return vParent instanceof QxToolBar?vParent:null;};proto._showMenu=function(vFromKeyEvent){var vMenu=this.getMenu();if(vMenu){this.addState(QxConst.STATE_PRESSED);var el=this.getElement();vMenu.setLeft(QxDom.getComputedPageBoxLeft(el));vMenu.setTop(QxDom.getComputedPageBoxTop(el)+QxDom.getComputedBoxHeight(el));if(vFromKeyEvent){vMenu.setHoverItem(vMenu.getFirstActiveChild());};vMenu.show();};};proto._hideMenu=function(){var vMenu=this.getMenu();if(vMenu){vMenu.hide();};};proto._modifyMenu=function(propValue,propOldValue,propData){if(propOldValue){propOldValue.setOpener(null);propOldValue.removeEventListener(QxConst.EVENT_TYPE_APPEAR,this._onmenuappear,this);propOldValue.removeEventListener(QxConst.EVENT_TYPE_DISAPPEAR,this._onmenudisappear,this);};if(propValue){propValue.setOpener(this);propValue.addEventListener(QxConst.EVENT_TYPE_APPEAR,this._onmenuappear,this);propValue.addEventListener(QxConst.EVENT_TYPE_DISAPPEAR,this._onmenudisappear,this);};return true;};proto._onmousedown=function(e){if(e.getTarget()!=this||!e.isLeftButtonPressed()){return;};this.hasState(QxConst.STATE_PRESSED)?this._hideMenu():this._showMenu();};proto._onmouseup=function(e){};proto._onmouseout=function(e){if(e.getTarget()!=this){return;};this.removeState(QxConst.STATE_OVER);};proto._onmouseover=function(e){var vToolBar=this.getParentToolBar();if(vToolBar){var vMenu=this.getMenu();switch(vToolBar.getOpenMenu()){case null:case vMenu:break;default:QxMenuManager.update();this._showMenu();};};return QxToolBarButton.prototype._onmouseover.call(this,e);};proto._onmenuappear=function(e){var vToolBar=this.getParentToolBar();if(!vToolBar){return;};var vMenu=this.getMenu();vToolBar.setOpenMenu(vMenu);};proto._onmenudisappear=function(e){var vToolBar=this.getParentToolBar();if(!vToolBar){return;};var vMenu=this.getMenu();if(vToolBar.getOpenMenu()==vMenu){vToolBar.setOpenMenu(null);};};function QxMenuBar(){QxToolBar.call(this);};QxMenuBar.extend(QxToolBar,"QxMenuBar");function QxMenuBarButton(vText,vMenu,vIcon,vIconWidth,vIconHeight,vFlash){QxToolBarMenuButton.call(this,vText,vMenu,vIcon,vIconWidth,vIconHeight,vFlash);};QxMenuBarButton.extend(QxToolBarMenuButton,"QxMenuBarButton");function QxSelectionStorage(vManager){QxObject.call(this);this._manager=vManager;this.removeAll();};QxSelectionStorage.extend(QxObject,"QxSelectionStorage");proto.add=function(oItem){this._storage[this.getItemHashCode(oItem)]=oItem;};proto.remove=function(oItem){delete this._storage[this.getItemHashCode(oItem)];};proto.removeAll=function(){this._storage={};};proto.contains=function(oItem){return this.getItemHashCode(oItem)in this._storage;};proto.toArray=function(){var res=[];for(var key in this._storage){res.push(this._storage[key]);};return res;};proto.getFirst=function(){for(var key in this._storage){return this._storage[key];};};proto.getChangeValue=function(){var sb=[];for(var hc in this._storage){sb.push(hc);};sb.sort();return sb.join(QxConst.CORE_SEMICOLON);};proto.getItemHashCode=function(oItem){return this._manager.getItemHashCode(oItem);};proto.isEmpty=function(){return QxUtil.isObjectEmpty(this._storage);};proto.dispose=function(){if(this.getDisposed()){return;};this._storage=null;this._manager=null;QxObject.prototype.dispose.call(this);};function QxSelectionManager(vBoundedWidget){QxTarget.call(this);this._selectedItems=new QxSelectionStorage(this);if(QxUtil.isValid(vBoundedWidget)){this.setBoundedWidget(vBoundedWidget);};};QxSelectionManager.extend(QxManager,"QxSelectionManager");QxSelectionManager.addProperty({name:"boundedWidget",type:QxConst.TYPEOF_OBJECT});QxSelectionManager.addProperty({name:"multiSelection",type:QxConst.TYPEOF_BOOLEAN,defaultValue:true});QxSelectionManager.addProperty({name:"dragSelection",type:QxConst.TYPEOF_BOOLEAN,defaultValue:true});QxSelectionManager.addProperty({name:"canDeselect",type:QxConst.TYPEOF_BOOLEAN,defaultValue:true});QxSelectionManager.addProperty({name:"fireChange",type:QxConst.TYPEOF_BOOLEAN,defaultValue:true});QxSelectionManager.addProperty({name:"anchorItem",type:QxConst.TYPEOF_OBJECT});QxSelectionManager.addProperty({name:"leadItem",type:QxConst.TYPEOF_OBJECT});QxSelectionManager.addProperty({name:"multiColumnSupport",type:QxConst.TYPEOF_BOOLEAN,defaultValue:false});proto._modifyAnchorItem=function(propValue,propOldValue,propData){if(propOldValue){this.renderItemAnchorState(propOldValue,false);};if(propValue){this.renderItemAnchorState(propValue,true);};return true;};proto._modifyLeadItem=function(propValue,propOldValue,propData){if(propOldValue){this.renderItemLeadState(propOldValue,false);};if(propValue){this.renderItemLeadState(propValue,true);};return true;};proto._getFirst=function(){return this.getBoundedWidget().getFirstVisibleChild();};proto._getLast=function(){return this.getBoundedWidget().getLastVisibleChild();};proto.getFirst=function(){var vItem=this._getFirst();if(vItem){return vItem.isEnabled()?vItem:this.getNext(vItem);};};proto.getLast=function(){var vItem=this._getLast();if(vItem){return vItem.isEnabled()?vItem:this.getPrevious(vItem);};};proto.getItems=function(){return this.getBoundedWidget().getVisibleChildren();};proto.getNextSibling=function(vItem){return vItem.getNextSibling();};proto.getPreviousSibling=function(vItem){return vItem.getPreviousSibling();};proto.getNext=function(vItem){while(vItem){vItem=this.getNextSibling(vItem);if(!vItem){break;};if(this.getItemEnabled(vItem)){return vItem;};};return null;};proto.getPrevious=function(vItem){while(vItem){vItem=this.getPreviousSibling(vItem);if(!vItem){break;};if(this.getItemEnabled(vItem)){return vItem;};};return null;};proto.isBefore=function(vItem1,vItem2){var cs=this.getItems();return cs.indexOf(vItem1)<cs.indexOf(vItem2);};proto.isEqual=function(vItem1,vItem2){return vItem1==vItem2;};proto.getItemHashCode=function(vItem){return vItem.toHashCode();};proto.scrollItemIntoView=function(vItem,vTopLeft){vItem.scrollIntoView(vTopLeft);};proto.getItemLeft=function(vItem){return vItem.getOffsetLeft();};proto.getItemTop=function(vItem){return vItem.getOffsetTop();};proto.getItemWidth=function(vItem){return vItem.getOffsetWidth();};proto.getItemHeight=function(vItem){return vItem.getOffsetHeight();};proto.getItemEnabled=function(vItem){return vItem.getEnabled();};proto.renderItemSelectionState=function(vItem,vIsSelected){vIsSelected?vItem.addState(QxConst.STATE_SELECTED):vItem.removeState(QxConst.STATE_SELECTED);};proto.renderItemAnchorState=function(vItem,vIsAnchor){vIsAnchor?vItem.addState(QxConst.STATE_ANCHOR):vItem.removeState(QxConst.STATE_ANCHOR);};proto.renderItemLeadState=function(vItem,vIsLead){vIsLead?vItem.addState(QxConst.STATE_LEAD):vItem.removeState(QxConst.STATE_LEAD);};proto.getItemSelected=function(vItem){return this._selectedItems.contains(vItem);};proto.setItemSelected=function(vItem,vSelected){var hc=this.getItemHashCode(vItem);switch(this.getMultiSelection()){case true:if(!this.getItemEnabled(vItem)){return;};if(this.getItemSelected(vItem)==vSelected){return;};this.renderItemSelectionState(vItem,vSelected);vSelected?this._selectedItems.add(vItem):this._selectedItems.remove(vItem);this._dispatchChange();break;case false:var item0=this.getSelectedItems()[0];if(vSelected){var old=item0;if(this.isEqual(vItem,old)){return;};if(old!=null){this.renderItemSelectionState(old,false);};this.renderItemSelectionState(vItem,true);this._selectedItems.removeAll();this._selectedItems.add(vItem);this._dispatchChange();}else {if(!this.isEqual(item0,vItem)){this.renderItemSelectionState(vItem,false);this._selectedItems.removeAll();this._dispatchChange();};};break;};};proto.getSelectedItems=function(){return this._selectedItems.toArray();};proto.getSelectedItem=function(){return this._selectedItems.getFirst();};proto.setSelectedItems=function(vItems){var oldVal=this._getChangeValue();var oldFireChange=this.getFireChange();this.setFireChange(false);this._deselectAll();var vItem;var vItemLength=vItems.length;for(var i=0;i<vItemLength;i++){vItem=vItems[i];if(!this.getItemEnabled(vItem)){continue;};this._selectedItems.add(vItem);this.renderItemSelectionState(vItem,true);};this.setFireChange(oldFireChange);if(oldFireChange&&this._hasChanged(oldVal)){this._dispatchChange();};};proto.setSelectedItem=function(vItem){if(!vItem){return;};if(!this.getItemEnabled(vItem)){return;};var oldVal=this._getChangeValue();var oldFireChange=this.getFireChange();this.setFireChange(false);this._deselectAll();this._selectedItems.add(vItem);this.renderItemSelectionState(vItem,true);this.setFireChange(oldFireChange);if(oldFireChange&&this._hasChanged(oldVal)){this._dispatchChange();};};proto.selectAll=function(){var oldVal=this._getChangeValue();var oldFireChange=this.getFireChange();this.setFireChange(false);this._selectAll();this.setFireChange(oldFireChange);if(oldFireChange&&this._hasChanged(oldVal)){this._dispatchChange();};};proto._selectAll=function(){if(!this.getMultiSelection()){return;};var vItem;var vItems=this.getItems();var vItemsLength=vItems.length;this._selectedItems.removeAll();for(var i=0;i<vItemsLength;i++){vItem=vItems[i];if(!this.getItemEnabled(vItem)){continue;};this._selectedItems.add(vItem);this.renderItemSelectionState(vItem,true);};return true;};proto.deselectAll=function(){var oldVal=this._getChangeValue();var oldFireChange=this.getFireChange();this.setFireChange(false);this._deselectAll();this.setFireChange(oldFireChange);if(oldFireChange&&this._hasChanged(oldVal))this._dispatchChange();};proto._deselectAll=function(){var items=this._selectedItems.toArray();for(var i=0;i<items.length;i++){this.renderItemSelectionState(items[i],false);};this._selectedItems.removeAll();return true;};proto.selectItemRange=function(vItem1,vItem2){var oldVal=this._getChangeValue();var oldFireChange=this.getFireChange();this.setFireChange(false);this._selectItemRange(vItem1,vItem2,true);this.setFireChange(oldFireChange);if(oldFireChange&&this._hasChanged(oldVal)){this._dispatchChange();};};proto._selectItemRange=function(vItem1,vItem2,vDeselect){if(this.isBefore(vItem2,vItem1)){return this._selectItemRange(vItem2,vItem1,vDeselect);};if(vDeselect){this._deselectAll();};var vCurrentItem=vItem1;while(vCurrentItem!=null){if(this.getItemEnabled(vCurrentItem)){this._selectedItems.add(vCurrentItem);this.renderItemSelectionState(vCurrentItem,true);};if(this.isEqual(vCurrentItem,vItem2)){break;};vCurrentItem=this.getNext(vCurrentItem);};return true;};proto._deselectItemRange=function(vItem1,vItem2){if(this.isBefore(vItem2,vItem1)){return this._deselectItemRange(vItem2,vItem1);};var vCurrentItem=vItem1;while(vCurrentItem!=null){this._selectedItems.remove(vCurrentItem);this.renderItemSelectionState(vCurrentItem,false);if(this.isEqual(vCurrentItem,vItem2)){break;};vCurrentItem=this.getNext(vCurrentItem);};};proto._activeDragSession=false;proto.handleMouseDown=function(vItem,e){if(!e.isLeftButtonPressed()&&!e.isRightButtonPressed()){return;};if(e.isRightButtonPressed()&&this.getItemSelected(vItem)){return;};if(e.getShiftKey()||this.getDragSelection()||(!this.getItemSelected(vItem)&&!e.getCtrlKey())){this._onmouseevent(vItem,e);}else {this.setLeadItem(vItem);};this._activeDragSession=this.getDragSelection();if(this._activeDragSession){this.getBoundedWidget().addEventListener(QxConst.EVENT_TYPE_MOUSEUP,this._ondragup,this);this.getBoundedWidget().setCapture(true);};};proto._ondragup=function(e){this.getBoundedWidget().removeEventListener(QxConst.EVENT_TYPE_MOUSEUP,this._ondragup,this);this.getBoundedWidget().setCapture(false);this._activeDragSession=false;};proto.handleMouseUp=function(vItem,e){if(!e.isLeftButtonPressed()){return;};if(e.getCtrlKey()||this.getItemSelected(vItem)&&!this._activeDragSession){this._onmouseevent(vItem,e);};if(this._activeDragSession){this._activeDragSession=false;this.getBoundedWidget().setCapture(false);};};proto.handleMouseOver=function(oItem,e){if(! this.getDragSelection()||!this._activeDragSession){return;};this._onmouseevent(oItem,e,true);};proto.handleClick=function(vItem,e){};proto.handleDblClick=function(vItem,e){};proto._onmouseevent=function(oItem,e,bOver){if(!this.getItemEnabled(oItem)){return;};var oldVal=this._getChangeValue();var oldLead=this.getLeadItem();var oldFireChange=this.getFireChange();this.setFireChange(false);var selectedItems=this.getSelectedItems();var selectedCount=selectedItems.length;this.setLeadItem(oItem);var currentAnchorItem=this.getAnchorItem();var vCtrlKey=e.getCtrlKey();var vShiftKey=e.getShiftKey();if(!currentAnchorItem||selectedCount==0||(vCtrlKey&&!vShiftKey&&this.getMultiSelection()&&!this.getDragSelection())){this.setAnchorItem(oItem);currentAnchorItem=oItem;};if((!vCtrlKey&&!vShiftKey&&!this._activeDragSession||!this.getMultiSelection())){if(!this.getItemEnabled(oItem)){return;};this._deselectAll();this.setAnchorItem(oItem);if(this._activeDragSession){this.scrollItemIntoView((this.getBoundedWidget().getScrollTop()>(this.getItemTop(oItem)-1)?this.getPrevious(oItem):this.getNext(oItem))||oItem);};if(!this.getItemSelected(oItem)){this.renderItemSelectionState(oItem,true);};this._selectedItems.add(oItem);this._addToCurrentSelection=true;}else if(this._activeDragSession&&bOver){if(oldLead){this._deselectItemRange(currentAnchorItem,oldLead);};if(this.isBefore(currentAnchorItem,oItem)){if(this._addToCurrentSelection){this._selectItemRange(currentAnchorItem,oItem,false);}else {this._deselectItemRange(currentAnchorItem,oItem);};}else {if(this._addToCurrentSelection){this._selectItemRange(oItem,currentAnchorItem,false);}else {this._deselectItemRange(oItem,currentAnchorItem);};};this.scrollItemIntoView((this.getBoundedWidget().getScrollTop()>(this.getItemTop(oItem)-1)?this.getPrevious(oItem):this.getNext(oItem))||oItem);}else if(this.getMultiSelection()&&vCtrlKey&&!vShiftKey){if(!this._activeDragSession){this._addToCurrentSelection=!(this.getCanDeselect()&&this.getItemSelected(oItem));};this.setItemSelected(oItem,this._addToCurrentSelection);this.setAnchorItem(oItem);}else if(this.getMultiSelection()&&vCtrlKey&&vShiftKey){if(!this._activeDragSession){this._addToCurrentSelection=!(this.getCanDeselect()&&this.getItemSelected(oItem));};if(this._addToCurrentSelection){this._selectItemRange(currentAnchorItem,oItem,false);}else {this._deselectItemRange(currentAnchorItem,oItem);};}else if(this.getMultiSelection()&&!vCtrlKey&&vShiftKey){if(this.getCanDeselect()){this._selectItemRange(currentAnchorItem,oItem,true);}else {if(oldLead){this._deselectItemRange(currentAnchorItem,oldLead);};this._selectItemRange(currentAnchorItem,oItem,false);};};this.setFireChange(oldFireChange);if(oldFireChange&&this._hasChanged(oldVal)){this._dispatchChange();};};proto.handleKeyDown=function(e){var oldVal=this._getChangeValue();var oldFireChange=this.getFireChange();this.setFireChange(false);if(e.getKeyCode()==65&&e.getCtrlKey()){if(this.getMultiSelection()){this._selectAll();this.setLeadItem(this.getFirst());};}else {var aIndex=this.getAnchorItem();var itemToSelect=this.getItemToSelect(e);if(itemToSelect&&this.getItemEnabled(itemToSelect)){this.setLeadItem(itemToSelect);this.scrollItemIntoView(itemToSelect);e.preventDefault();if(e.getShiftKey()&&this.getMultiSelection()){if(aIndex==null){this.setAnchorItem(itemToSelect);};this._selectItemRange(this.getAnchorItem(),itemToSelect,true);}else if(!e.getCtrlKey()){this._deselectAll();this.renderItemSelectionState(itemToSelect,true);this._selectedItems.add(itemToSelect);this.setAnchorItem(itemToSelect);}else if(e.getKeyCode()==QxKeyEvent.keys.space){if(this._selectedItems.contains(itemToSelect)){this.renderItemSelectionState(itemToSelect,false);this._selectedItems.remove(itemToSelect);this.setAnchorItem(this._selectedItems.getFirst());}else {if(!e.getCtrlKey()||!this.getMultiSelection()){this._deselectAll();};this.renderItemSelectionState(itemToSelect,true);this._selectedItems.add(itemToSelect);this.setAnchorItem(itemToSelect);};};};};this.setFireChange(oldFireChange);if(oldFireChange&&this._hasChanged(oldVal)){this._dispatchChange();};};proto.getItemToSelect=function(vKeyboardEvent){if(vKeyboardEvent.getAltKey()){return null;};switch(vKeyboardEvent.getKeyCode()){case QxKeyEvent.keys.home:return this.getHome(this.getLeadItem());case QxKeyEvent.keys.end:return this.getEnd(this.getLeadItem());case QxKeyEvent.keys.down:return this.getDown(this.getLeadItem());case QxKeyEvent.keys.up:return this.getUp(this.getLeadItem());case QxKeyEvent.keys.left:return this.getLeft(this.getLeadItem());case QxKeyEvent.keys.right:return this.getRight(this.getLeadItem());case QxKeyEvent.keys.pageup:return this.getPageUp(this.getLeadItem())||this.getHome(this.getLeadItem());case QxKeyEvent.keys.pagedown:return this.getPageDown(this.getLeadItem())||this.getEnd(this.getLeadItem());case QxKeyEvent.keys.space:if(vKeyboardEvent.getCtrlKey()){return this.getLeadItem();};};return null;};proto._dispatchChange=function(){if(!this.getFireChange()){return;};if(this.hasEventListeners("changeSelection")){this.dispatchEvent(new QxDataEvent("changeSelection",this.getSelectedItems()),true);};};proto._hasChanged=function(sOldValue){return sOldValue!=this._getChangeValue();};proto._getChangeValue=function(){return this._selectedItems.getChangeValue();};proto.getHome=function(){return this.getFirst();};proto.getEnd=function(){return this.getLast();};proto.getDown=function(vItem){if(!vItem){return this.getFirst();};return this.getMultiColumnSupport()?(this.getUnder(vItem)||this.getLast()):this.getNext(vItem);};proto.getUp=function(vItem){if(!vItem){return this.getLast();};return this.getMultiColumnSupport()?(this.getAbove(vItem)||this.getFirst()):this.getPrevious(vItem);};proto.getLeft=function(vItem){if(!this.getMultiColumnSupport()){return null;};return !vItem?this.getLast():this.getPrevious(vItem);};proto.getRight=function(vItem){if(!this.getMultiColumnSupport()){return null;};return !vItem?this.getFirst():this.getNext(vItem);};proto.getAbove=function(vItem){throw new Error("getAbove():Not implemented yet");};proto.getUnder=function(vItem){throw new Error("getUnder():Not implemented yet");};proto.getPageUp=function(vItem){var vBoundedWidget=this.getBoundedWidget();var vParentScrollTop=vBoundedWidget.getScrollTop();var vParentClientHeight=vBoundedWidget.getClientHeight();var newItem;var nextItem=this.getLeadItem();if(!nextItem){nextItem=this.getFirst();};var tryLoops=0;while(tryLoops<2){while(nextItem&&(this.getItemTop(nextItem)-this.getItemHeight(nextItem)>=vParentScrollTop)){nextItem=this.getUp(nextItem);};if(nextItem==null){break;};if(nextItem!=this.getLeadItem()){this.scrollItemIntoView(nextItem,true);break;};vBoundedWidget.setScrollTop(vParentScrollTop-vParentClientHeight-this.getItemHeight(nextItem));vParentScrollTop=vBoundedWidget.getScrollTop();tryLoops++;};return nextItem;};proto.getPageDown=function(vItem){var vBoundedWidget=this.getBoundedWidget();var vParentScrollTop=vBoundedWidget.getScrollTop();var vParentClientHeight=vBoundedWidget.getClientHeight();var newItem;var nextItem=this.getLeadItem();if(!nextItem){nextItem=this.getFirst();};var tryLoops=0;while(tryLoops<2){while(nextItem&&((this.getItemTop(nextItem)+(2*this.getItemHeight(nextItem)))<=(vParentScrollTop+vParentClientHeight))){nextItem=this.getDown(nextItem);};if(nextItem==null){break;};if(nextItem!=this.getLeadItem()){break;};vBoundedWidget.setScrollTop(vParentScrollTop+vParentClientHeight-2*this.getItemHeight(nextItem));vParentScrollTop=vBoundedWidget.getScrollTop();tryLoops++;};return nextItem;};proto.dispose=function(){if(this.getDisposed()){return;};if(this._selectedItems){this._selectedItems.dispose();this._selectedItems=null;};return QxTarget.prototype.dispose.call(this);};function QxList(){QxVerticalBoxLayout.call(this);this._manager=new QxSelectionManager(this);this.setSelectable(false);this.setTabIndex(1);this.addEventListener(QxConst.EVENT_TYPE_MOUSEOVER,this._onmouseover);this.addEventListener(QxConst.EVENT_TYPE_MOUSEDOWN,this._onmousedown);this.addEventListener(QxConst.EVENT_TYPE_MOUSEUP,this._onmouseup);this.addEventListener(QxConst.EVENT_TYPE_CLICK,this._onclick);this.addEventListener(QxConst.EVENT_TYPE_DBLCLICK,this._ondblclick);this.addEventListener(QxConst.EVENT_TYPE_KEYDOWN,this._onkeydown);this.addEventListener(QxConst.EVENT_TYPE_KEYPRESS,this._onkeypress);};QxList.extend(QxVerticalBoxLayout,"QxList");QxList.changeProperty({name:"appearance",type:QxConst.TYPEOF_STRING,defaultValue:"list"});QxList.addProperty({name:"enableInlineFind",type:QxConst.TYPEOF_BOOLEAN,defaultValue:true});QxList.addProperty({name:"markLeadingItem",type:QxConst.TYPEOF_BOOLEAN,defaultValue:false});proto._pressedString=QxConst.CORE_EMPTY;proto.getManager=function(){return this._manager;};proto.getListItemTarget=function(vItem){while(vItem!=null&&vItem.getParent()!=this){vItem=vItem.getParent();};return vItem;};proto.getSelectedItem=function(){return this.getSelectedItems()[0];};proto.getSelectedItems=function(){return this._manager.getSelectedItems();};proto._onmouseover=function(e){var vItem=this.getListItemTarget(e.getTarget());if(vItem){this._manager.handleMouseOver(vItem,e);};};proto._onmousedown=function(e){var vItem=this.getListItemTarget(e.getTarget());if(vItem){this._manager.handleMouseDown(vItem,e);};};proto._onmouseup=function(e){var vItem=this.getListItemTarget(e.getTarget());if(vItem){this._manager.handleMouseUp(vItem,e);};};proto._onclick=function(e){var vItem=this.getListItemTarget(e.getTarget());if(vItem){this._manager.handleClick(vItem,e);};};proto._ondblclick=function(e){var vItem=this.getListItemTarget(e.getTarget());if(vItem){this._manager.handleDblClick(vItem,e);};};proto._onkeydown=function(e){var kc=e.getKeyCode();if(kc==QxKeyEvent.keys.enter&&!e.getAltKey()){var items=this.getSelectedItems();var currentItem;for(var i=0;i<items.length;i++){currentItem=items[i];if(currentItem.hasEventListeners("action")){currentItem._dispachEvent(new QxEvent("action"));};};}else {this._manager.handleKeyDown(e);};};this._lastKeyPress=0;proto._onkeypress=function(e){if(!this.getEnableInlineFind()){return;};if(((new Date).valueOf()-this._lastKeyPress)>1000){this._pressedString=QxConst.CORE_EMPTY;};this._pressedString+=String.fromCharCode(e.getKeyCode());var matchedItem=this.findString(this._pressedString,null);if(matchedItem){var oldVal=this._manager._getChangeValue();var oldFireChange=this._manager.getFireChange();this._manager.setFireChange(false);this._manager._deselectAll();this._manager.setItemSelected(matchedItem,true);this._manager.setAnchorItem(matchedItem);this._manager.setLeadItem(matchedItem);matchedItem.scrollIntoView();this._manager.setFireChange(oldFireChange);if(oldFireChange&&this._manager._hasChanged(oldVal)){this._manager._dispatchChange();};};this._lastKeyPress=(new Date).valueOf();e.preventDefault();};proto._findItem=function(vUserValue,vStartIndex,vType){var vAllItems=this.getChildren();if(vStartIndex==null){vStartIndex=vAllItems.indexOf(this.getSelectedItem());if(vStartIndex==-1){vStartIndex=0;};};var methodName="matches"+vType;for(var i=vStartIndex;i<vAllItems.length;i++){if(vAllItems[i][methodName](vUserValue)){return vAllItems[i];};};for(var i=0;i<vStartIndex;i++){if(vAllItems[i][methodName](vUserValue)){return vAllItems[i];};};return null;};proto.findString=function(vText,vStartIndex){return this._findItem(vText,vStartIndex||0,"String");};proto.findStringExact=function(vText,vStartIndex){return this._findItem(vText,vStartIndex||0,"StringExact");};proto.findValue=function(vText,vStartIndex){return this._findItem(vText,vStartIndex||0,"Value");};proto.findValueExact=function(vText,vStartIndex){return this._findItem(vText,vStartIndex||0,"ValueExact");};proto._sortItemsCompare=function(a,b){return a.key<b.key?-1:a.key==b.key?0:1;};proto.sortItemsByString=function(vReverse){var sortitems=[];var items=this.getChildren();for(var i=0,l=items.length;i<l;i++){sortitems[i]={key:items[i].getLabel(),item:items[i]};};sortitems.sort(this._sortItemsCompare);if(vReverse){sortitems.reverse();};for(var i=0;i<l;i++){this.addAt(sortitems[i].item,i);};};proto.sortItemsByValue=function(vReverse){var sortitems=[];var items=this.getChildren();for(var i=0,l=items.length;i<l;i++){sortitems[i]={key:items[i].getValue(),item:items[i]};};sortitems.sort(this._sortItemsCompare);if(vReverse){sortitems.reverse();};for(var i=0;i<l;i++){this.addAt(sortitems[i].item,i);};};proto.dispose=function(){if(this.getDisposed()){return;};if(this._manager){this._manager.dispose();this._manager=null;};this.removeEventListener(QxConst.EVENT_TYPE_MOUSEOVER,this._onmouseover);this.removeEventListener(QxConst.EVENT_TYPE_MOUSEDOWN,this._onmousedown);this.removeEventListener(QxConst.EVENT_TYPE_MOUSEUP,this._onmouseup);this.removeEventListener(QxConst.EVENT_TYPE_CLICK,this._onclick);this.removeEventListener(QxConst.EVENT_TYPE_DBLCLICK,this._ondblclick);this.removeEventListener(QxConst.EVENT_TYPE_KEYDOWN,this._onkeydown);this.removeEventListener(QxConst.EVENT_TYPE_KEYPRESS,this._onkeypress);return QxVerticalBoxLayout.prototype.dispose.call(this);};function QxListItem(vText,vIcon,vValue){QxAtom.call(this,vText,vIcon);if(QxUtil.isValid(vValue)){this.setValue(vValue);};this.addEventListener(QxConst.EVENT_TYPE_DBLCLICK,this._ondblclick);};QxListItem.extend(QxAtom,"QxListItem");QxListItem.changeProperty({name:"appearance",type:QxConst.TYPEOF_STRING,defaultValue:"list-item"});QxListItem.addProperty({name:"value"});proto.matchesString=function(vText){return vText!=QxConst.CORE_EMPTY&&this.getLabel().toLowerCase().indexOf(vText.toLowerCase())==0;};proto.matchesStringExact=function(vText){return vText!=QxConst.CORE_EMPTY&&this.getLabel().toLowerCase()==String(vText).toLowerCase();};proto.matchesValue=function(vText){return vText!=QxConst.CORE_EMPTY&&this.getValue().toLowerCase().indexOf(vText.toLowerCase())==0;};proto.matchesValueExact=function(vText){return vText!=QxConst.CORE_EMPTY&&this.getValue().toLowerCase()==String(vText).toLowerCase();};proto._ondblclick=function(e){var vCommand=this.getCommand();if(vCommand){vCommand.execute();};};function QxComboBox(){QxHorizontalBoxLayout.call(this);var l=this._list=new QxList;l.setAppearance("combo-box-list");var m=this._manager=this._list.getManager();m.setMultiSelection(false);m.setDragSelection(false);var p=this._popup=new QxPopup;p.setAppearance("combo-box-popup");p.setAutoHide(false);p.add(l);var f=this._field=new QxTextField;f.setAppearance("combo-box-text-field");this.add(f);var b = this._button = new QxAtom(null, "widgets/arrows/down.gif");b.setAppearance("combo-box-button");b.setTabIndex(-1);this.add(b);this.setTabIndex(1);this.setEditable(false);this.addEventListener(QxConst.EVENT_TYPE_MOUSEDOWN,this._onmousedown);this.addEventListener(QxConst.EVENT_TYPE_MOUSEUP,this._onmouseup);this.addEventListener(QxConst.EVENT_TYPE_MOUSEOVER,this._onmouseover);this.addEventListener(QxConst.EVENT_TYPE_MOUSEWHEEL,this._onmousewheel);this.addEventListener(QxConst.EVENT_TYPE_KEYDOWN,this._onkeydown);this.addEventListener(QxConst.EVENT_TYPE_KEYPRESS,this._onkeypress);p.addEventListener(QxConst.EVENT_TYPE_APPEAR,this._onpopupappear,this);f.addEventListener(QxConst.EVENT_TYPE_INPUT,this._oninput,this);this.remapChildrenHandlingTo(l);};QxComboBox.extend(QxHorizontalBoxLayout,"QxComboBox");QxComboBox.changeProperty({name:"appearance",type:QxConst.TYPEOF_STRING,defaultValue:"combo-box"});QxComboBox.addProperty({name:"editable",type:QxConst.TYPEOF_BOOLEAN,getAlias:"isEditable"});QxComboBox.addProperty({name:"selected",type:QxConst.TYPEOF_OBJECT,instance:"QxListItem"});QxComboBox.addProperty({name:"value",type:QxConst.TYPEOF_STRING});QxComboBox.addProperty({name:"pagingInterval",type:QxConst.TYPEOF_NUMBER,defaultValue:10});proto.getManager=function(){return this._manager;};proto.getPopup=function(){return this._popup;};proto.getList=function(){return this._list;};proto.getField=function(){return this._field;};proto.getButton=function(){return this._button;};proto._modifySelected=function(propValue,propOldValue,propData){this._fromSelected=true;if(!this._fromValue){this.setValue(propValue?propValue.getLabel():QxConst.CORE_EMPTY);};this._manager.setLeadItem(propValue);this._manager.setAnchorItem(propValue);this._manager.setSelectedItem(propValue);delete this._fromSelected;return true;};proto._modifyValue=function(propValue,propOldValue,propData){this._fromValue=true;if(!this._fromInput){this._field.setValue(propValue);};if(!this._fromSelected){var vSelItem=this._list.findStringExact(propValue);if(vSelItem!=null&&!vSelItem.getEnabled()){vSelItem=null;};this.setSelected(vSelItem);if(vSelItem==null){this._manager.deselectAll();};};delete this._fromValue;return true;};proto._modifyEditable=function(propValue,propOldValue,propData){var f=this._field;f.setReadOnly(!propValue);f.setCursor(propValue?null:QxConst.CORE_DEFAULT);f.setSelectable(propValue);return true;};proto._onpopupappear=function(e){var vSelItem=this.getSelected();if(vSelItem){vSelItem.scrollIntoView();};};proto._oninput=function(e){this._fromInput=true;this.setValue(this._field.getComputedValue());if(this.getPopup().isSeeable()&&this.getSelected()){this.getSelected().scrollIntoView();};delete this._fromInput;};proto._onmousedown=function(e){var vTarget=e.getTarget();switch(vTarget){case this._field:if(this.getEditable()){break;};case this._button:this._button.addState(QxConst.STATE_PRESSED);this._togglePopup();break;case this:case this._list:break;default:if(vTarget instanceof QxListItem){this._list._onmousedown(e);this.setSelected(this._list.getSelectedItem());this._closePopup();}else if(this._popup.isSeeable()){this._popup.hide();this.setCapture(false);};};};proto._onmouseup=function(e){switch(e.getTarget()){case this._field:if(this.getEditable()){break;};case this._button:this._button.removeState(QxConst.STATE_PRESSED);break;};};proto._onmouseover=function(e){var vTarget=e.getTarget();if(vTarget instanceof QxListItem){var vManager=this._manager;vManager.deselectAll();vManager.setLeadItem(vTarget);vManager.setAnchorItem(vTarget);vManager.setSelectedItem(vTarget);};};proto._onmousewheel=function(e){if(!this._popup.isSeeable()){var toSelect;var isSelected=this.getSelected();if(e.getWheelDelta()<0){toSelect=isSelected?this._manager.getNext(isSelected):this._manager.getFirst();}else {toSelect=isSelected?this._manager.getPrevious(isSelected):this._manager.getLast();};if(toSelect){this.setSelected(toSelect);};};};proto._onkeydown=function(e){var vManager=this._manager;var vKeyCode=e.getKeyCode();var vKeys=QxKeyEvent.keys;var vVisible=this._popup.isSeeable();switch(vKeyCode){case vKeys.enter:if(vVisible){this.setSelected(this._manager.getSelectedItem());this._closePopup();}else {this._openPopup();};return;case vKeys.esc:if(vVisible){vManager.setLeadItem(this._oldSelected);vManager.setAnchorItem(this._oldSelected);vManager.setSelectedItem(this._oldSelected);this._field.setValue(this._oldSelected?this._oldSelected.getLabel():QxConst.CORE_EMPTY);this._closePopup();};return;case vKeys.pageup:if(!vVisible){var vPrevious;var vTemp=this.getSelected();if(vTemp){var vInterval=this.getPagingInterval();do{vPrevious=vTemp;}while(--vInterval&&(vTemp=vManager.getPrevious(vPrevious)));}else {vPrevious=vManager.getLast();};this.setSelected(vPrevious);return;};break;case vKeys.pagedown:if(!vVisible){var vNext;var vTemp=this.getSelected();if(vTemp){var vInterval=this.getPagingInterval();do{vNext=vTemp;}while(--vInterval&&(vTemp=vManager.getNext(vNext)));}else {vNext=vManager.getFirst();};this.setSelected(vNext);return;};break;};if(!this.isEditable()||vVisible){this._list._onkeydown(e);var vSelected=this._manager.getSelectedItem();if(!vVisible){this.setSelected(vSelected);}else if(vSelected){this._field.setValue(vSelected.getLabel());};return;};switch(vKeyCode){case vKeys.pageup:case vKeys.pagedown:if(!this._popup.isCreated()){return;};case vKeys.up:case vKeys.down:this._list._onkeydown(e);this.setSelected(this._manager.getSelectedItem());break;};};proto._onkeypress=function(e){if(!this.isEditable()){this._list._onkeypress(e);};};proto._oldSelected=null;proto._openPopup=function(){var p=this._popup;var el=this.getElement();if(!p.isCreated()){this.createDispatchEvent("beforeInitialOpen");};if(this._list.getChildrenLength()==0){return;};p.setLeft(QxDom.getComputedPageBoxLeft(el)+1);p.setTop(QxDom.getComputedPageBoxTop(el)+QxDom.getComputedBoxHeight(el));p.setWidth(this.getBoxWidth()-2);p.setParent(this.getTopLevelWidget());p.show();this._oldSelected=this.getSelected();this.setCapture(true);};proto._closePopup=function(){this._popup.hide();this.setCapture(false);this.setFocused(true);};proto._togglePopup=function(){this._popup.isSeeable()?this._closePopup():this._openPopup();};proto.dispose=function(){if(this.getDisposed()){return;};if(this._list){this._list.dispose();this._list=null;};if(this._manager){this._manager.dispose();this._manager=null;};if(this._popup){this._popup.dispose();this._popup=null;};if(this._field){this._field.dispose();this._field=null;};if(this._button){this._button.dispose();this._button=null;};return QxHorizontalBoxLayout.prototype.dispose.call(this);};function QxRangeManager(){QxTarget.call(this);};QxRangeManager.extend(QxManager,"QxRangeManager");QxRangeManager.addProperty({name:"value",type:QxConst.TYPEOF_NUMBER,defaultValue:0});QxRangeManager.addProperty({name:"min",type:QxConst.TYPEOF_NUMBER,defaultValue:0});QxRangeManager.addProperty({name:"max",type:QxConst.TYPEOF_NUMBER,defaultValue:100});QxRangeManager.addProperty({name:"step",type:QxConst.TYPEOF_NUMBER,defaultValue:1});QxRangeManager.CHANGE_EVENTTYPE=QxConst.INTERNAL_CHANGE;proto._checkValue=function(propValue){return Math.max(this.getMin(),Math.min(this.getMax(),Math.floor(propValue)));};proto._modifyValue=function(propValue,propOldValue,propData){if(this.hasEventListeners(QxRangeManager.CHANGE_EVENTTYPE)){this.dispatchEvent(new QxEvent(QxRangeManager.CHANGE_EVENTTYPE),true);};return true;};proto._checkMax=function(propValue){return Math.floor(propValue);};proto._modifyMax=function(propValue,propOldValue,propData){this.setValue(Math.min(this.getValue(),propValue));if(this.hasEventListeners(QxRangeManager.CHANGE_EVENTTYPE)){this.dispatchEvent(new QxEvent(QxRangeManager.CHANGE_EVENTTYPE),true);};return true;};proto._checkMin=function(propValue){return Math.floor(propValue);};proto._modifyMin=function(propValue,propOldValue,propData){this.setValue(Math.max(this.getValue(),propValue));if(this.hasEventListeners(QxRangeManager.CHANGE_EVENTTYPE)){this.dispatchEvent(new QxEvent(QxRangeManager.CHANGE_EVENTTYPE),true);};return true;};function QxSpinner(vMin,vValue,vMax){QxHorizontalBoxLayout.call(this);this.setTabIndex(-1);if(QxClient.isMshtml()){this.setStyleProperty("fontSize",QxConst.CORE_0PIXEL);};this._manager=new QxRangeManager();this._textfield=new QxTextField;this._textfield.setAppearance("spinner-field");this._textfield.setValue(String(this._manager.getValue()));this.add(this._textfield);this._buttonlayout=new QxVerticalBoxLayout;this._buttonlayout.setWidth(QxConst.CORE_AUTO);this.add(this._buttonlayout);this._upbutton = new QxImage("widgets/arrows/up_small.gif");this._upbutton.setAppearance("spinner-button-up");this._buttonlayout.add(this._upbutton);this._downbutton = new QxImage("widgets/arrows/down_small.gif");this._downbutton.setAppearance("spinner-button-down");this._buttonlayout.add(this._downbutton);this._timer=new QxTimer(this.getInterval());this.addEventListener(QxConst.EVENT_TYPE_KEYPRESS,this._onkeypress,this);this.addEventListener(QxConst.EVENT_TYPE_KEYDOWN,this._onkeydown,this);this.addEventListener(QxConst.EVENT_TYPE_KEYUP,this._onkeyup,this);this.addEventListener(QxConst.EVENT_TYPE_MOUSEWHEEL,this._onmousewheel,this);this._textfield.addEventListener(QxConst.EVENT_TYPE_INPUT,this._oninput,this);this._textfield.addEventListener(QxConst.EVENT_TYPE_BLUR,this._onblur,this);this._upbutton.addEventListener(QxConst.EVENT_TYPE_MOUSEDOWN,this._onmousedown,this);this._downbutton.addEventListener(QxConst.EVENT_TYPE_MOUSEDOWN,this._onmousedown,this);this._manager.addEventListener(QxConst.INTERNAL_CHANGE,this._onchange,this);this._timer.addEventListener(QxConst.EVENT_TYPE_INTERVAL,this._oninterval,this);if(QxUtil.isValidNumber(vMin)){this.setMin(vMin);};if(QxUtil.isValidNumber(vValue)){this.setValue(vValue);};if(QxUtil.isValidNumber(vMax)){this.setMax(vMax);};};QxSpinner.extend(QxHorizontalBoxLayout,"QxSpinner");QxSpinner.changeProperty({name:"appearance",type:QxConst.TYPEOF_STRING,defaultValue:"spinner"});QxSpinner.addProperty({name:"incrementAmount",type:QxConst.TYPEOF_NUMBER,defaultValue:1});QxSpinner.addProperty({name:"wheelIncrementAmount",type:QxConst.TYPEOF_NUMBER,defaultValue:1});QxSpinner.addProperty({name:"pageIncrementAmount",type:QxConst.TYPEOF_NUMBER,defaultValue:10});QxSpinner.addProperty({name:QxConst.EVENT_TYPE_INTERVAL,type:QxConst.TYPEOF_NUMBER,defaultValue:100});QxSpinner.addProperty({name:"firstInterval",type:QxConst.TYPEOF_NUMBER,defaultValue:500});QxSpinner.addProperty({name:"minTimer",type:QxConst.TYPEOF_NUMBER,defaultValue:20});QxSpinner.addProperty({name:"timerDecrease",type:QxConst.TYPEOF_NUMBER,defaultValue:2});QxSpinner.addProperty({name:"amountGrowth",type:QxConst.TYPEOF_NUMBER,defaultValue:1.01});proto._computePreferredInnerWidth=function(){return 50;};proto._computePreferredInnerHeight=function(){return 14;};proto._onkeypress=function(e){var vCode=e.getKeyCode();if(vCode==QxKeyEvent.keys.enter&&!e.getAltKey()){this._checkValue(true,false,false);this._textfield.selectAll();}else {switch(vCode){case QxKeyEvent.keys.up:case QxKeyEvent.keys.down:case QxKeyEvent.keys.left:case QxKeyEvent.keys.right:case QxKeyEvent.keys.shift:case QxKeyEvent.keys.ctrl:case QxKeyEvent.keys.alt:case QxKeyEvent.keys.esc:case QxKeyEvent.keys.del:case QxKeyEvent.keys.backspace:case QxKeyEvent.keys.insert:case QxKeyEvent.keys.home:case QxKeyEvent.keys.end:case QxKeyEvent.keys.pageup:case QxKeyEvent.keys.pagedown:case QxKeyEvent.keys.numlock:case QxKeyEvent.keys.tab:break;default:if(vCode>=48&&vCode<=57){return;};e.preventDefault();};};};proto._onkeydown=function(e){var vCode=e.getKeyCode();if(this._intervalIncrease==null){switch(vCode){case QxKeyEvent.keys.up:case QxKeyEvent.keys.down:this._intervalIncrease=vCode==QxKeyEvent.keys.up;this._intervalMode="single";this._resetIncrements();this._checkValue(true,false,false);this._increment();this._timer.startWith(this.getFirstInterval());break;case QxKeyEvent.keys.pageup:case QxKeyEvent.keys.pagedown:this._intervalIncrease=vCode==QxKeyEvent.keys.pageup;this._intervalMode="page";this._resetIncrements();this._checkValue(true,false,false);this._pageIncrement();this._timer.startWith(this.getFirstInterval());break;};};};proto._onkeyup=function(e){if(this._intervalIncrease!=null){switch(e.getKeyCode()){case QxKeyEvent.keys.up:case QxKeyEvent.keys.down:case QxKeyEvent.keys.pageup:case QxKeyEvent.keys.pagedown:this._timer.stop();this._intervalIncrease=null;this._intervalMode=null;};};};proto._onmousedown=function(e){if(!e.isLeftButtonPressed()){return;};this._checkValue(true);var vButton=e.getCurrentTarget();vButton.addState(QxConst.STATE_PRESSED);vButton.addEventListener(QxConst.EVENT_TYPE_MOUSEUP,this._onmouseup,this);vButton.addEventListener(QxConst.EVENT_TYPE_MOUSEOUT,this._onmouseup,this);this._intervalIncrease=vButton==this._upbutton;this._resetIncrements();this._increment();this._textfield.selectAll();this._timer.setInterval(this.getFirstInterval());this._timer.start();};proto._onmouseup=function(e){var vButton=e.getCurrentTarget();vButton.removeState(QxConst.STATE_PRESSED);vButton.removeEventListener(QxConst.EVENT_TYPE_MOUSEUP,this._onmouseup,this);vButton.removeEventListener(QxConst.EVENT_TYPE_MOUSEOUT,this._onmouseup,this);this._textfield.selectAll();this._textfield.setFocused(true);this._timer.stop();this._intervalIncrease=null;};proto._onmousewheel=function(e){this._manager.setValue(this._manager.getValue()+this.getWheelIncrementAmount()*e.getWheelDelta());this._textfield.selectAll();};proto._oninput=function(e){this._checkValue(true,true);};proto._onchange=function(e){var vValue=this._manager.getValue();this._textfield.setValue(String(vValue));if(vValue==this.getMin()){this._downbutton.removeState(QxConst.STATE_PRESSED);this._downbutton.setEnabled(false);this._timer.stop();}else {this._downbutton.setEnabled(true);};if(vValue==this.getMax()){this._upbutton.removeState(QxConst.STATE_PRESSED);this._upbutton.setEnabled(false);this._timer.stop();}else {this._upbutton.setEnabled(true);};if(this.hasEventListeners(QxConst.INTERNAL_CHANGE)){this.dispatchEvent(new QxEvent(QxConst.INTERNAL_CHANGE),true);};};proto._onblur=function(e){this._checkValue(false);};proto.setValue=function(nValue){this._manager.setValue(nValue);};proto.getValue=function(){this._checkValue(true);return this._manager.getValue();};proto.resetValue=function(){return this._manager.resetValue();};proto.setMax=function(vMax){return this._manager.setMax(vMax);};proto.getMax=function(){return this._manager.getMax();};proto.setMin=function(vMin){return this._manager.setMin(vMin);};proto.getMin=function(){return this._manager.getMin();};proto._intervalIncrease=null;proto._oninterval=function(e){this._timer.stop();this.setInterval(Math.max(this.getMinTimer(),this.getInterval()-this.getTimerDecrease()));if(this._intervalMode=="page"){this._pageIncrement();}else {if(this.getInterval()==this.getMinTimer()){this.setIncrementAmount(this.getAmountGrowth()*this.getIncrementAmount());};this._increment();};switch(this._intervalIncrease){case true:if(this.getValue()==this.getMax()){return;};case false:if(this.getValue()==this.getMin()){return;};};this._timer.restartWith(this.getInterval());};proto._checkValue=function(acceptEmpty,acceptEdit){var el=this._textfield.getElement();if(!el){return;};if(el.value==QxConst.CORE_EMPTY){if(!acceptEmpty){el.value=this.resetValue();this._textfield.selectAll();return;};}else {var val=el.value;if(val.length>1){while(val.charAt(0)==QxConst.CORE_ZERO){val=val.substr(1,val.length);};var f1=parseInt(val)||0;if(f1!=el.value){el.value=f1;return;};};if(val==QxConst.CORE_MINUS&&acceptEmpty&&this.getMin()<0){if(el.value!=val){el.value=val;};return;};val=parseInt(val);var doFix=true;var fixedVal=this._manager._checkValue(val);if(isNaN(fixedVal)){fixedVal=this._manager.getValue();};if(acceptEmpty&&val==QxConst.CORE_EMPTY){doFix=false;}else if(!isNaN(val)){if(acceptEdit){if(val>fixedVal&&!(val>0&&fixedVal<=0)&&String(val).length<String(fixedVal).length){doFix=false;}else if(val<fixedVal&&!(val<0&&fixedVal>=0)&&String(val).length<String(fixedVal).length){doFix=false;};};};if(doFix&&el.value!=fixedVal){el.value=fixedVal;};if(!acceptEdit){this._manager.setValue(fixedVal);};};};proto._increment=function(){this._manager.setValue(this._manager.getValue()+((this._intervalIncrease?1:-1)*this.getIncrementAmount()));};proto._pageIncrement=function(){this._manager.setValue(this._manager.getValue()+((this._intervalIncrease?1:-1)*this.getPageIncrementAmount()));};proto._resetIncrements=function(){this.resetIncrementAmount();this.resetInterval();};proto.dispose=function(){if(this.getDisposed()){return;};this.removeEventListener(QxConst.EVENT_TYPE_KEYPRESS,this._onkeypress,this);this.removeEventListener(QxConst.EVENT_TYPE_KEYDOWN,this._onkeydown,this);this.removeEventListener(QxConst.EVENT_TYPE_KEYUP,this._onkeyup,this);this.removeEventListener(QxConst.EVENT_TYPE_MOUSEWHEEL,this._onmousewheel,this);if(this._textfield){this._textfield.removeEventListener(QxConst.EVENT_TYPE_BLUR,this._onblur,this);this._textfield.removeEventListener(QxConst.EVENT_TYPE_INPUT,this._oninput,this);this._textfield.dispose();this._textfield=null;};if(this._buttonlayout){this._buttonlayout.dispose();this._buttonlayout=null;};if(this._upbutton){this._upbutton.removeEventListener(QxConst.EVENT_TYPE_MOUSEDOWN,this._onmousedown,this);this._upbutton.dispose();this._upbutton=null;};if(this._downbutton){this._downbutton.removeEventListener(QxConst.EVENT_TYPE_MOUSEDOWN,this._onmousedown,this);this._downbutton.dispose();this._downbutton=null;};if(this._timer){this._timer.removeEventListener(QxConst.EVENT_TYPE_INTERVAL,this._oninterval,this);this._timer.stop();this._timer.dispose();this._timer=null;};if(this._manager){this._manager.removeEventListener(QxConst.INTERNAL_CHANGE,this._onchange,this);this._manager.dispose();this._manager=null;};return QxHorizontalBoxLayout.prototype.dispose.call(this);};function QxCommand(vShortcut,vKeyCode,vManager){QxTarget.call(this);this._shortcutParts={};if(QxUtil.isValid(vShortcut)){this.setShortcut(vShortcut);};if(QxUtil.isValid(vKeyCode)){this.setKeyCode(vKeyCode);};this.setManager(QxUtil.isValid(vManager)?vManager:window.application.getClientWindow().getEventManager());};QxCommand.extend(QxTarget,"QxCommand");QxCommand.addProperty({name:"checked",type:QxConst.TYPEOF_BOOLEAN,defaultValue:false});QxCommand.addProperty({name:"shortcut",type:QxConst.TYPEOF_STRING});QxCommand.addProperty({name:"keyCode",type:QxConst.TYPEOF_NUMBER});QxCommand.addProperty({name:"manager",type:QxConst.TYPEOF_OBJECT,instance:"QxEventManager"});proto.execute=function(vTarget){if(this.hasEventListeners(QxConst.EVENT_TYPE_EXECUTE)){this.dispatchEvent(new QxDataEvent(QxConst.EVENT_TYPE_EXECUTE,vTarget),true);};return false;};proto._modifyShortcut=function(propValue,propOldValue,propData){if(propValue){this._shortcutParts={};var a = propValue.toLowerCase().split(/[-+\s]+/);var al=a.length;for(var i=0;i<al;i++){this._shortcutParts[a[i]]=true;};}else {this._shortcutParts={};};return true;};proto._modifyManager=function(propValue,propOldValue,propData){if(propOldVal