| (function($){if(typeof qxsettings===$[8]){qxsettings={};qxvariants={};qxvariants[$[26]]="off"}; |
| rwt={};rwt.qx={Class:{createNamespace:function(d,c){var g=d.split(".");var f=window;var b=g[0];for(var e=0,a=g.length-1;e<a;e++,b=g[e]){if(!f[b]){f=f[b]={}}else{f=f[b]}}f[b]=c;return b},define:function(b,a){if(!a){var a={statics:{}}}this.createNamespace(b,a.statics);if(a.defer){a.defer(a.statics)}rwt.runtime.Bootstrap.__registry[b]=a.statics}}};rwt.qx.Class.define("rwt.runtime.Bootstrap",{statics:{LOADSTART:new Date(),time:function(){return new Date().getTime()},since:function(){return this.time()-this.LOADSTART},__registry:{}}});var namespace=function(a){rwt.qx.Class.createNamespace(a,{})}; |
| if(!Error.prototype.toString||Error.prototype.toString()=="[object Error]"){Error.prototype.toString=function(){return this.message}}if(!Array.prototype.indexOf){Array.prototype.indexOf=function(a,c){if(c==null){c=0}else{if(c<0){c=Math.max(0,this.length+c)}}for(var b=c;b<this.length;b++){if(this[b]===a){return b}}return -1}}if(!Array.prototype.lastIndexOf){Array.prototype.lastIndexOf=function(a,c){if(c==null){c=this.length-1}else{if(c<0){c=Math.max(0,this.length+c)}}for(var b=c;b>=0;b--){if(this[b]===a){return b}}return -1}}if(!Array.prototype.forEach){Array.prototype.forEach=function(d,c){var a=this.length;for(var b=0;b<a;b++){d.call(c,this[b],b,this)}}}if(!Array.prototype.filter){Array.prototype.filter=function(e,d){var a=this.length;var c=[];for(var b=0;b<a;b++){if(e.call(d,this[b],b,this)){c.push(this[b])}}return c}}if(!Array.prototype.map){Array.prototype.map=function(e,d){var a=this.length;var c=[];for(var b=0;b<a;b++){c.push(e.call(d,this[b],b,this))}return c}}if(!Array.prototype.some){Array.prototype.some=function(d,c){var a=this.length;for(var b=0;b<a;b++){if(d.call(c,this[b],b,this)){return true}}return false}}if(!Array.prototype.every){Array.prototype.every=function(d,c){var a=this.length;for(var b=0;b<a;b++){if(!d.call(c,this[b],b,this)){return false}}return true}}if(!String.prototype.quote){String.prototype.quote=function(){return'"'+this.replace(/\\/g,"\\\\").replace(/\"/g,'\\"')+'"'}}; |
| rwt.qx.Class.define("rwt.util.Arrays",{statics:{fromArguments:function(a){return Array.prototype.slice.call(a,0)},fromShortHand:function(c){var b=c.length;if(b===0||b>4){throw new Error("Invalid number of arguments!")}var a=rwt.util.Arrays.copy(c);if(b===1){a[1]=a[2]=a[3]=a[0]}else{if(b===2){a[2]=a[0];a[3]=a[1]}else{if(b===3){a[3]=a[1]}}}return a},copy:function(a){return a.concat()},getLast:function(a){return a[a.length-1]},getFirst:function(a){return a[0]},insertAt:function(a,c,b){a.splice(b,0,c);return a},removeAt:function(a,b){return a.splice(b,1)[0]},remove:function(a,c){var b=a.indexOf(c);if(b!=-1){a.splice(b,1);return c}},contains:function(a,b){return a.indexOf(b)!=-1}}}); |
| rwt.qx.Class.define("rwt.util.Variant",{statics:{__variants:{},__cache:{},compilerIsSet:function(){return true},define:function(b,c,a){if(rwt.util.Variant.compilerIsSet($[26],"on")){if(!this.__isValidArray(c)){throw new Error('Allowed values of variant "'+b+$[440])}if(a===undefined){throw new Error('Default value of variant "'+b+$[440])}}if(!this.__variants[b]){this.__variants[b]={}}else{if(rwt.util.Variant.compilerIsSet($[26],"on")){if(this.__variants[b].defaultValue!==undefined){throw new Error($[317]+b+'" is already defined!')}}}this.__variants[b].allowedValues=c;this.__variants[b].defaultValue=a},get:function(a){var b=this.__variants[a];if(rwt.util.Variant.compilerIsSet($[26],"on")){if(b===undefined){throw new Error($[317]+a+'" is not defined.')}}if(b.value!==undefined){return b.value}return b.defaultValue},__init:function(){if(window.qxvariants){for(var b in qxvariants){if(rwt.util.Variant.compilerIsSet($[26],"on")){if((b.split(".")).length<2){throw new Error('Malformed settings key "'+b+'". Must be following the schema "namespace.key".')}}if(!this.__variants[b]){this.__variants[b]={}}this.__variants[b].value=qxvariants[b]}window.qxvariants=undefined;try{delete window.qxvariants}catch(a){}}},select:function(c,a){if(rwt.util.Variant.compilerIsSet($[26],"on")){if(!this.__isValidObject(this.__variants[c])){throw new Error($[317]+c+'" is not defined')}if(!this.__isValidObject(a)){throw new Error("the second parameter must be a map!")}}for(var b in a){if(this.isSet(c,b)){return a[b]}}if(a[$[62]]!==undefined){return a[$[62]]}if(rwt.util.Variant.compilerIsSet($[26],"on")){throw new Error('No match for variant "'+c+'" in variants ['+rwt.util.Objects.getKeysAsString(a)+'] found, and no default ("default") given')}},isSet:function(f,d){var a=f+"$"+d;if(this.__cache[a]!==undefined){return this.__cache[a]}var c=false;if(d.indexOf("|")<0){c=this.get(f)===d}else{var g=d.split("|");for(var e=0,b=g.length;e<b;e++){if(this.get(f)===g[e]){c=true;break}}}this.__cache[a]=c;return c},__isValidArray:function(a){return typeof a===$[20]&&a!==null&&a instanceof Array},__isValidObject:function(a){return typeof a===$[20]&&a!==null&&!(a instanceof Array)},__arrayContains:function(a,d){for(var c=0,b=a.length;c<b;c++){if(a[c]==d){return true}}return false}},defer:function(a){a.define($[26],["on","off"],"on");a.define($[444],["on","off"],"on");a.define("qx.eventMonitorNoListeners",["on","off"],"off");a.define("qx.aspects",["on","off"],"off");a.define("qx.deprecationWarnings",["on","off"],"on");a.__init()}}); |
| rwt.qx.Class.define("rwt.client.Client",{statics:{__init:function(){this._engineName=null;this._browserName=null;this._engineVersion=null;this._engineVersionMajor=0;this._engineVersionMinor=0;this._engineVersionRevision=0;this._engineVersionBuild=0;this._browserPlatform=null;this._runsLocally=window.location.protocol==="file:";this._engineQuirksMode=document.compatMode!==$[214];this._defaultLocale="en";this._initOpera();this._initKonqueror();this._initWebkit();this._initGecko();this._initMshtml();this._initBoxSizing();this._initLocale();this._initPlatform()},getRunsLocally:function(){return this._runsLocally},getEngine:function(){return this._engineName},getBrowser:function(){return this._browserName},getVersion:function(){return this._engineVersion},getMajor:function(){return this._engineVersionMajor},getMinor:function(){return this._engineVersionMinor},getRevision:function(){return this._engineVersionRevision},getBuild:function(){return this._engineVersionBuild},isMshtml:function(){return this._engineName===$[110]},isNewMshtml:function(){return this._engineName===$[212]},isGecko:function(){return this._engineName===$[121]},isOpera:function(){return this._engineName==="opera"},isWebkit:function(){return this._engineName===$[109]},isInQuirksMode:function(){return this._engineQuirksMode},getTimezoneOffset:function(){return(new Date()).getTimezoneOffset()},getLocale:function(){return this._browserLocale},getLanguage:function(){var a=this.getLocale();var c;var b=a.indexOf("_");if(b==-1){c=a}else{c=a.substring(0,b)}return c},getTerritory:function(){return this.getLocale().split("_")[1]||""},getDefaultLocale:function(){return this._defaultLocale},usesDefaultLocale:function(){return this._browserLocale===this._defaultLocale},getEngineBoxSizingAttributes:function(){return this._engineBoxSizingAttributes},getPlatform:function(){return this._browserPlatform},isMobileSafari:function(){return this.getPlatform()==="ios"&&this.getBrowser()===$[228]},isMobileChrome:function(){return this.getPlatform()===$[200]&&this.getBrowser()===$[221]},isAndroidBrowser:function(){return this.getPlatform()===$[200]&&this.getBrowser()===$[200]},supportsVml:function(){return(this.getEngine()===$[110])&&(this.getVersion()>=5.5)},supportsTouch:function(){return this.isMobileSafari()||this.isAndroidBrowser()||this.isMobileChrome()},supportsSvg:function(){var c=rwt.client.Client.getEngine();var b=rwt.client.Client.getVersion();var a=c===$[121]&&b>=1.8||c===$[109]&&b>=523||c==="opera"&&b>=9||c===$[212];if(this.isAndroidBrowser()){a=b>=534}return a},supportsCss3:function(){var c=rwt.client.Client.getEngine();var b=rwt.client.Client.getVersion();var a=c===$[109]&&b>=522||c===$[121]&&b>=2;return a},isZoomed:function(){var a=false;if(this._engineName===$[110]||this._engineName===$[212]){if(this._engineVersionMajor>=8){a=(screen.deviceXDPI/screen.logicalXDPI)!==1}else{try{var d=document.body.getBoundingClientRect();var c=(d.right-d.left)/document.body.offsetWidth;a=c!==1}catch(b){a=false}}}return a},_initOpera:function(){if(this._engineName===null){var b=window.opera&&/Opera[\s\/]([0-9\.]*)/.test(navigator.userAgent);if(b){this._browserName="opera";this._engineName="opera";var a=RegExp.$1;a=a.substring(0,3)+"."+a.substring(3);(/Version[\s\/]([0-9\.]*)/).test(navigator.userAgent);if(RegExp.$1){a=RegExp.$1}this._parseVersion(a)}}},_initKonqueror:function(){if(this._engineName===null){var b=navigator.vendor;var a=typeof b===$[7]&&b==="KDE"&&/KHTML\/([0-9\-\.]*)/.test(navigator.userAgent);if(a){this._engineName=$[109];this._browserName="konqueror";this._parseVersion("420")}}},_initWebkit:function(){if(this._engineName===null){var d=navigator.userAgent;var a=d.indexOf("AppleWebKit")!=-1&&/AppleWebKit\/([^ ]+)/.test(d);if(a){this._engineName=$[109];var b=RegExp.$1;var c=/[^\.0-9]/.exec(b);if(c){b=b.slice(0,c.index)}this._parseVersion(b);if(d.indexOf("Chrome")!=-1){this._browserName=$[221]}else{if(d.indexOf("Safari")!=-1){if(d.indexOf("Android")!=-1){this._browserName=$[200]}else{this._browserName=$[228]}}else{if(d.indexOf("OmniWeb")!=-1){this._browserName="omniweb"}else{if(d.indexOf("Shiira")!=-1){this._browserName="shiira"}else{if(d.indexOf("NetNewsWire")!=-1){this._browserName="netnewswire"}else{if(d.indexOf("RealPlayer")!=-1){this._browserName="realplayer"}else{if(d.indexOf("Mobile")!=-1){this._browserName=$[228]}else{this._browserName="other webkit"}}}}}}}}}},_initGecko:function(){if(this._engineName===null){var c=navigator.product;var b=navigator.userAgent;var a=window.controllers&&typeof c===$[7]&&c==="Gecko"&&/rv\:([^\);]+)(\)|;)/.test(b);if(a){this._engineName=$[121];this._parseVersion(RegExp.$1);if(b.indexOf("Firefox")!=-1){this._browserName="firefox"}else{if(b.indexOf("Camino")!=-1){this._browserName="camino"}else{if(b.indexOf("Galeon")!=-1){this._browserName="galeon"}else{this._browserName="other gecko"}}}}}},_initMshtml:function(){if(this._engineName===null){var a=/MSIE\s+([^\);]+)(\)|;)/.test(navigator.userAgent);if(a){this._parseVersion(RegExp.$1);if(this._engineVersion>=9){this._engineName=$[212]}else{this._engineName=$[110]}this._browserName="explorer"}}},_parseVersion:function(a){if(typeof a===$[7]){var b=a.split(".");this._engineVersion=parseFloat(a);this._engineVersionMajor=parseInt(b[0]||0,10);this._engineVersionMinor=parseFloat(b[1]||0);this._engineVersionRevision=parseFloat(b[2]||0);this._engineVersionBuild=parseInt(b[3]||0,10)}},_initBoxSizing:function(){var a=[];switch(this._engineName){case $[121]:a.push("-moz-box-sizing");break;case $[109]:a.push("-khtml-box-sizing");a.push("-webkit-box-sizing");break;default:a.push("box-sizing")}this._engineBoxSizingAttributes=a},_initLocale:function(){var c=(this._engineName.indexOf($[110])!==-1)?navigator.userLanguage:navigator.language;var b=c.toLowerCase();var a=b.indexOf("-");if(a!=-1){b=b.substr(0,a)}this._browserLocale=b},_initPlatform:function(){var a=navigator.platform;if(a.indexOf("Windows")!=-1||a.indexOf("Win32")!=-1||a.indexOf("Win64")!=-1){this._browserPlatform="win"}else{if(a.indexOf("Macintosh")!=-1||a.indexOf("MacPPC")!=-1||a.indexOf("MacIntel")!=-1){this._browserPlatform="mac"}else{if(a.indexOf("X11")!=-1||a.indexOf("Linux")!=-1||a.indexOf("BSD")!=-1){if(navigator.userAgent.indexOf("Android")!=-1){this._browserPlatform=$[200]}else{this._browserPlatform="unix"}}else{if(a.indexOf("iPhone")!=-1||a.indexOf("iPod")!=-1||a.indexOf("iPad")!=-1){this._browserPlatform="ios"}else{this._browserPlatform=$[122]}}}}}},defer:function(c,a,b){c.__init();rwt.util.Variant.define($[0],[$[121],$[110],"opera",$[109]],rwt.client.Client.getEngine())}}); |
| rwt.qx.Class.define("rwt.util.Objects",{statics:{isEmpty:function(b){for(var a in b){return false}return true},hasMinLength:function(d,c){var b=0;for(var a in d){if((++b)>=c){return true}}return false},getLength:function(c){var b=0;for(var a in c){b++}return b},_shadowedKeys:["isPrototypeOf","hasOwnProperty","toLocaleString","toString","valueOf"],getKeys:rwt.util.Variant.select($[0],{mshtml:function(g){var b=[];for(var f in g){b.push(f)}for(var e=0,d=this._shadowedKeys,c=d.length;e<c;e++){if(g.hasOwnProperty(d[e])){b.push(d[e])}}return b},"default":function(c){var a=[];for(var b in c){a.push(b)}return a}}),getKeysAsString:function(b){var a=rwt.util.Objects.getKeys(b);if(a.length===0){return""}return'"'+a.join('", "')+'"'},getValues:function(c){var a=[];for(var b in c){a.push(c[b])}return a},mergeWith:function(d,c,a){if(a===undefined){a=true}for(var b in c){if(a||d[b]===undefined){d[b]=c[b]}}return d},carefullyMergeWith:function(b,a){return rwt.util.Objects.mergeWith(b,a,false)},merge:function(d,b){var a=arguments.length;for(var c=1;c<a;c++){rwt.util.Objects.mergeWith(d,arguments[c])}return d},copy:function(b){var c={};for(var a in b){c[a]=b[a]}return c},invert:function(c){var a={};for(var b in c){a[c[b].toString()]=b}return a},getKeyFromValue:function(c,b){for(var a in c){if(c[a]===b){return a}}return null},select:function(a,b){return b[a]},fromArray:function(d){var c={};for(var b=0,a=d.length;b<a;b++){c[d[b].toString()]=true}return c}}}); |
| rwt.qx.Class.define("rwt.qx.Class",{statics:{_normalizeConfig:function(a){if(!a){var a={}}if(a.include&&!(a.include instanceof Array)){a.include=[a.include]}if(a.implement&&!(a.implement instanceof Array)){a.implement=[a.implement]}if(!a.hasOwnProperty("extend")&&!a.type){a.type=$[152]}return a},define:function(c,d){if(this._stopLoading){throw new Error("Stop loading "+c)}try{d=this._normalizeConfig(d);this.__validateConfig(c,d);var k;if(!d.extend){k=d.statics||{}}else{if(!d.construct){d.construct=this.__createDefaultConstructor()}k=this.__wrapConstructor(d.construct,c,d.type);if(d.statics){var p;for(var f=0,o=rwt.util.Objects.getKeys(d.statics),e=o.length;f<e;f++){p=o[f];k[p]=d.statics[p]}}}var n=this.createNamespace(c,k,false);k.name=k.classname=c;k.basename=n;this.__registry[c]=k;if(!k.hasOwnProperty("toString")){k.toString=this.genericToString}if(d.extend){var b=d.extend.prototype;var h=this.__createEmptyFunction();h.prototype=b;var g=new h();k.prototype=g;g.name=g.classname=c;g.basename=n;d.construct.base=k.superclass=d.extend;d.construct.self=k.constructor=g.constructor=k;if(d.destruct){k.$$destructor=d.destruct}var j=this;k.$$initializer=function(){if(d.properties){j.__addProperties(k,d.properties,true)}if(d.members){j.__addMembers(k,d.members,true,true,false)}if(d.events){j.__addEvents(k,d.events,true)}if(d.include){for(var q=0,a=d.include.length;q<a;q++){j.__addMixin(k,d.include[q],false)}}}}if(d.variants){for(var p in d.variants){rwt.util.Variant.define(p,d.variants[p].allowedValues,d.variants[p].defaultValue)}}if(d.defer){this.__initializeClass(k);d.defer.self=k;d.defer(k,k.prototype,{add:function(i,a){var l={};l[i]=a;rwt.qx.Class.__addProperties(k,l,true)}})}}catch(m){alert("Error loading class "+c+": "+(m.message?m.message:m));this._stopLoading=true;throw m}},createNamespace:function(d,c){var g=d.split(".");var f=window;var b=g[0];for(var e=0,a=g.length-1;e<a;e++,b=g[e]){if(!f[b]){f=f[b]={}}else{f=f[b]}}if(f[b]===undefined){f[b]=c}return b},isDefined:function(a){return this.getByName(a)!==undefined},getTotalNumber:function(){return rwt.util.Objects.getLength(this.__registry)},getByName:function(a){return this.__registry[a]},include:function(b,a){rwt.qx.Class.__addMixin(b,a,false)},patch:function(b,a){rwt.qx.Class.__addMixin(b,a,true)},isSubClassOf:function(a,b){if(!a){return false}if(a==b){return true}if(a.prototype instanceof b){return true}return false},getPropertyDefinition:function(b,a){while(b){if(b.$$properties&&b.$$properties[a]){return b.$$properties[a]}b=b.superclass}return null},getByProperty:function(b,a){while(b){if(b.$$properties&&b.$$properties[a]){return b}b=b.superclass}return null},hasProperty:function(b,a){return !!this.getPropertyDefinition(b,a)},getEventType:function(b,a){var b=b.constructor;while(b.superclass){if(b.$$events&&b.$$events[a]!==undefined){return b.$$events[a]}b=b.superclass}return null},supportsEvent:function(b,a){return !!this.getEventType(b,a)},hasOwnMixin:function(b,a){return b.$$includes&&b.$$includes.indexOf(a)!==-1},getByMixin:function(c,b){var e,d,a;while(c){if(c.$$includes){e=c.$$flatIncludes;for(d=0,a=e.length;d<a;d++){if(e[d]===b){return c}}}c=c.superclass}return null},getMixins:function(a){var b=[];while(a){if(a.$$includes){b.push.apply(b,a.$$flatIncludes)}a=a.superclass}return b},hasMixin:function(b,a){return !!this.getByMixin(b,a)},hasOwnInterface:function(a,b){return a.$$implements&&a.$$implements.indexOf(b)!==-1},getByInterface:function(b,e){var d,c,a;while(b){if(b.$$implements){d=b.$$flatImplements;for(c=0,a=d.length;c<a;c++){if(d[c]===e){return b}}}b=b.superclass}return null},getInterfaces:function(a){var b=[];while(a){if(a.$$implements){b.push.apply(b,a.$$flatImplements)}a=a.superclass}return b},hasInterface:function(a,b){return !!this.getByInterface(a,b)},implementsInterface:function(a,b){return false},getInstance:function(){if(!this.$$instance){this.$$allowconstruct=true;var a=this;this.$$instance=new a();delete this.$$allowconstruct}return this.$$instance},genericToString:function(){return"[Class "+this.classname+"]"},__registry:rwt.runtime.Bootstrap.__registry,__allowedKeys:rwt.util.Variant.select($[26],{on:{type:$[7],extend:$[41],implement:$[20],include:$[20],construct:$[41],statics:$[20],properties:$[20],members:$[20],settings:$[20],variants:$[20],events:$[20],defer:$[41],destruct:$[41]},"default":null}),__staticAllowedKeys:rwt.util.Variant.select($[26],{on:{type:$[7],statics:$[20],settings:$[20],variants:$[20],defer:$[41]},"default":null}),__validateConfig:rwt.util.Variant.select($[26],{on:function(b,c){if(c.type&&!(c.type===$[152]||c.type==="abstract"||c.type===$[39])){throw new Error('Invalid type "'+c.type+'" definition for class "'+b+'"!')}var h=c.type===$[152]?this.__staticAllowedKeys:this.__allowedKeys;for(var k in c){if(!h[k]){throw new Error($[304]+k+$[106]+b+$[346])}if(c[k]==null){throw new Error($[205]+k+$[106]+b+$[534])}if(typeof c[k]!==h[k]){throw new Error($[335]+k+$[106]+b+$[310]+h[k]+'"!')}}var g=["statics","properties","members","settings","variants","events"];for(var e=0,d=g.length;e<d;e++){var k=g[e];if(c[k]!==undefined&&(c[k] instanceof Array||c[k] instanceof RegExp||c[k] instanceof Date||c[k].classname!==undefined)){throw new Error($[205]+k+$[106]+b+$[545])}}if(c.include){if(c.include instanceof Array){for(var e=0,j=c.include,d=j.length;e<d;e++){if(j[e]==null||j[e].$$type!=="Mixin"){throw new Error('The include definition in class "'+b+'" contains an invalid mixin at position '+e+": "+j[e])}}}else{throw new Error('Invalid include definition in class "'+b+'"! Only mixins and arrays of mixins are allowed!')}}if(c.implement){if(c.implement instanceof Array){for(var e=0,j=c.implement,d=j.length;e<d;e++){if(j[e]==null||j[e].$$type!=="Interface"){throw new Error('The implement definition in class "'+b+'" contains an invalid interface at position '+e+": "+j[e])}}}else{throw new Error('Invalid implement definition in class "'+b+'"! Only interfaces and arrays of interfaces are allowed!')}}if(c.include){try{rwt.qx.Mixin.checkCompatibility(c.include)}catch(f){throw new Error('Error in include definition of class "'+b+'"! '+f.message)}}if(c.variants){for(var k in c.variants){if(k.substr(0,k.indexOf("."))!=b.substr(0,b.indexOf("."))){throw new Error('Forbidden variant "'+k+'" found in "'+b+'". It is forbidden to define a variant for an external namespace!')}}}},"default":function(){}}),__addEvents:function(a,c,d){if(a.$$events){for(var b in c){a.$$events[b]=c[b]}}else{a.$$events=c}},__addProperties:function(d,e,g){var c;if(g===undefined){g=false}var a=!!d.$$propertiesAttached;for(var b in e){c=e[b];c.name=b;if(!c.refine){if(d.$$properties===undefined){d.$$properties={}}d.$$properties[b]=c}if(c.init!==undefined){d.prototype["__init$"+b]=c.init}if(c.event!==undefined){var f={};f[c.event]=$[404];this.__addEvents(d,f,g)}if(c.inheritable){rwt.qx.Property.$$inheritable[b]=true}if(a){rwt.qx.Property.attachMethods(d,b,c)}if(c._fast){rwt.qx.LegacyProperty.addFastProperty(c,d.prototype)}else{if(c._cached){rwt.qx.LegacyProperty.addCachedProperty(c,d.prototype)}else{if(c._legacy){rwt.qx.LegacyProperty.addProperty(c,d.prototype)}}}}},__validateProperty:rwt.util.Variant.select($[26],{on:function(d,a,c,b){var g=this.hasProperty(d,a);var h=c._legacy||c._fast||c._cached;if(g){var i=this.getPropertyDefinition(d,a);var j=i._legacy||i._fast||i._cached;if(h!=j){throw new Error("Could not redefine existing property '"+a+$[437]+d.classname+"'.")}if(c.refine&&i.init===undefined){throw new Error("Could not refine a init value if there was previously no init value defined. Property '"+a+$[437]+d.classname+"'.")}}if(!g&&c.refine){throw new Error("Could not refine non-existent property: "+a+"!")}if(g&&!b){throw new Error("Class "+d.classname+" already has a property: "+a+"!")}if(g&&b&&!h){if(!c.refine){throw new Error('Could not refine property "'+a+'" without a "refine" flag in the property definition! This class: '+d.classname+", original class: "+this.getByProperty(d,a).classname+".")}for(var f in c){if(f!=="init"&&f!=="refine"){throw new Error("Class "+d.classname+" could not refine property: "+a+"! Key: "+f+" could not be refined!")}}}if(h){return}var e=c.group?rwt.qx.Property.$$allowedGroupKeys:rwt.qx.Property.$$allowedKeys;for(var f in c){if(e[f]===undefined){throw new Error($[304]+f+$[343]+a+$[106]+d.classname+$[346])}if(c[f]===undefined){throw new Error($[205]+f+$[343]+a+$[106]+d.classname+'"! The value is undefined: '+c[f])}if(e[f]!==null&&typeof c[f]!==e[f]){throw new Error($[335]+f+$[343]+a+$[106]+d.classname+$[310]+e[f]+'"!')}}if(c.transform!=null){if(typeof c.transform!==$[7]){throw new Error('Invalid transform definition of property "'+a+$[106]+d.classname+'"! Needs to be a String.')}}if(c.check!=null){if(!(typeof c.check==$[7]||c.check instanceof Array||c.check instanceof Function)){throw new Error('Invalid check definition of property "'+a+$[106]+d.classname+'"! Needs to be a String, Array or Function.')}}if(c.event!=null&&!this.isSubClassOf(d,rwt.qx.Target)){throw new Error("Invalid property '"+a+"' in class '"+d.classname+"': Properties defining an event can only be defined in sub classes of 'rwt.qx.Target'!")}},"default":null}),__addMembers:function(k,f,d,b,c){var j=k.prototype;var n,h;for(var g=0,m=rwt.util.Objects.getKeys(f),e=m.length;g<e;g++){n=m[g];h=f[n];if(b!==false&&h instanceof Function){if(c===true){h=this.__mixinMemberWrapper(h,j[n])}else{if(j[n]){h.base=j[n]}h.self=k}}j[n]=h}},__mixinMemberWrapper:function(b,a){if(a){return function(){var d=b.base;b.base=a;var c=b.apply(this,arguments);b.base=d;return c}}else{return b}},__addMixin:function(c,b,g){var f=rwt.qx.Mixin.flatten([b]);var e;for(var d=0,a=f.length;d<a;d++){e=f[d];if(e.$$events){this.__addEvents(c,e.$$events,g)}if(e.$$properties){this.__addProperties(c,e.$$properties,g)}if(e.$$members){this.__addMembers(c,e.$$members,g,g,g)}}if(c.$$includes){c.$$includes.push(b);c.$$flatIncludes.push.apply(c.$$flatIncludes,f)}else{c.$$includes=[b];c.$$flatIncludes=f}},__createDefaultConstructor:function(){function a(){arguments.callee.base.apply(this,arguments)}return a},__createEmptyFunction:function(){return function(){}},__initializeClass:function(a){if(a.$$initializer){var b=[];var c=a;while(c.$$initializer){b.push(c);c=c.superclass}while(b.length>0){c=b.pop();c.$$initializer();delete c.$$initializer}}},__wrapConstructor:function(a,b,c){var d=this.__initializeClass;var e=function(){var j=arguments.callee.constructor;d(j);if(!j.$$propertiesAttached){rwt.qx.Property.attach(j)}var h=j.$$original.apply(this,arguments);if(j.$$includes){var g=j.$$flatIncludes;for(var k=0,f=g.length;k<f;k++){if(g[k].$$constructor){g[k].$$constructor.apply(this,arguments)}}}if(this.classname===", name, ".classname){this.$$initialized=true}return h};if(c===$[39]){e.getInstance=this.getInstance}e.$$original=a;a.wrapper=e;return e}}}); |
| rwt.qx.Class.define("rwt.qx.Mixin",{statics:{define:function(c,b){if(b){if(b.include&&!(b.include instanceof Array)){b.include=[b.include]}var a=b.statics?b.statics:{};for(var d in a){a[d].mixin=a}if(b.construct){a.$$constructor=b.construct}if(b.include){a.$$includes=b.include}if(b.properties){a.$$properties=b.properties}if(b.members){a.$$members=b.members}for(var d in a.$$members){if(a.$$members[d] instanceof Function){a.$$members[d].mixin=a}}if(b.events){a.$$events=b.events}if(b.destruct){a.$$destructor=b.destruct}}else{var a={}}a.$$type="Mixin";a.name=c;a.toString=this.genericToString;a.basename=rwt.qx.Class.createNamespace(c,a);this.__registry[c]=a;return a},checkCompatibility:function(c){var e=this.flatten(c);var d=e.length;if(d<2){return true}var f={};var a={};var j={};var h;for(var b=0;b<d;b++){h=e[b];for(var g in h.events){if(j[g]){throw new Error($[334]+h.name+'" and "'+j[g]+$[371]+g+'"!')}j[g]=h.name}for(var g in h.properties){if(f[g]){throw new Error($[334]+h.name+'" and "'+f[g]+'" in property "'+g+'"!')}f[g]=h.name}for(var g in h.members){if(a[g]){throw new Error($[334]+h.name+'" and "'+a[g]+$[371]+g+'"!')}a[g]=h.name}}return true},isCompatible:function(a,b){var c=rwt.qx.Class.getMixins(b);c.push(a);return rwt.qx.Mixin.checkCompatibility(c)},getByName:function(a){return this.__registry[a]},isDefined:function(a){return this.getByName(a)!==undefined},getTotalNumber:function(){return rwt.util.Objects.getLength(this.__registry)},flatten:function(b){if(!b){return[]}var d=b.concat();for(var c=0,a=b.length;c<a;c++){if(b[c].$$includes){d.push.apply(d,this.flatten(b[c].$$includes))}}return d},genericToString:function(){return"[Mixin "+this.name+"]"},__registry:{},__allowedKeys:rwt.util.Variant.select($[26],{on:{include:$[20],statics:$[20],members:$[20],properties:$[20],events:$[20],destruct:$[41],construct:$[41]},"default":null}),__validateConfig:rwt.util.Variant.select($[26],{on:function(e,d){var j=this.__allowedKeys;for(var g in d){if(!j[g]){throw new Error($[304]+g+$[251]+e+$[346])}if(d[g]==null){throw new Error($[205]+g+$[251]+e+$[534])}if(j[g]!==null&&typeof d[g]!==j[g]){throw new Error($[335]+g+$[251]+e+$[310]+j[g]+'"!')}}var h=["statics","members","properties","events"];for(var f=0,c=h.length;f<c;f++){var g=h[f];if(d[g]!==undefined&&(d[g] instanceof Array||d[g] instanceof RegExp||d[g] instanceof Date||d[g].classname!==undefined)){throw new Error($[205]+g+$[251]+e+$[545])}}if(d.include){for(var f=0,b=d.include,c=b.length;f<c;f++){if(b[f]==null){throw new Error($[477]+(f+1)+$[408]+e+"'is undefined/null!")}if(b[f].$$type!=="Mixin"){throw new Error($[477]+(f+1)+$[408]+e+"'is not a mixin!")}}this.checkCompatibility(d.include)}},"default":function(){}})}}); |
| rwt.qx.Class.define("rwt.qx.LegacyProperty",{statics:{getSetterName:function(a){return rwt.qx.Property.$$method.set[a]},getGetterName:function(a){return rwt.qx.Property.$$method.get[a]},getResetterName:function(a){return rwt.qx.Property.$$method.reset[a]},addFastProperty:function(b,d){var c=b.name;var g=rwt.util.Strings.toFirstUp(c);var h="_value"+g;var f="get"+g;var e="set"+g;var a="_compute"+g;d[h]=typeof b.defaultValue!==$[8]?b.defaultValue:null;if(b.noCompute){d[f]=function(){return this[h]}}else{d[f]=function(){return this[h]==null?this[h]=this[a]():this[h]}}d[f].self=d.constructor;if(b.setOnlyOnce){d[e]=function(i){this[h]=i;this[e]=null;return i}}else{d[e]=function(i){return this[h]=i}}d[e].self=d.constructor;if(!b.noCompute){d[a]=function(){return null};d[a].self=d.constructor}},addCachedProperty:function(c,e){var d=c.name;var f=rwt.util.Strings.toFirstUp(d);var g="_cached"+f;var a="_compute"+f;var b="_change"+f;if(typeof c.defaultValue!==$[8]){e[g]=c.defaultValue}e["get"+f]=function(){if(this[g]==null){this[g]=this[a]()}return this[g]};e[$[525]+f]=function(){if(this[g]!=null){this[g]=null;if(c.addToQueueRuntime){this.addToQueueRuntime(c.name)}}};e["_recompute"+f]=function(){var h=this[g];var i=this[a]();if(i!=h){this[g]=i;this[b](i,h);return true}return false};e[b]=function(i,h){};e[a]=function(){return null};e["get"+f].self=e.constructor;e[$[525]+f].self=e.constructor;e["_recompute"+f].self=e.constructor},addProperty:function(c,f){if(typeof c!==$[20]){throw new Error("AddProperty: Param should be an object!")}if(typeof c.name!==$[7]){throw new Error("AddProperty: Malformed input parameters: name needed!")}if(c.dispose===undefined&&(c.type==$[41]||c.type==$[20])){c.dispose=true}c.method=rwt.util.Strings.toFirstUp(c.name);c.implMethod=c.impl?rwt.util.Strings.toFirstUp(c.impl):c.method;if(c.defaultValue===undefined){c.defaultValue=null}c.allowNull=c.allowNull!==false;c.allowMultipleArguments=c.allowMultipleArguments===true;if(typeof c.type===$[7]){c.hasType=true}else{if(typeof c.type!==$[8]){throw new Error("AddProperty: Invalid type definition for property "+c.name+": "+c.type)}else{c.hasType=false}}if(typeof c.instance===$[7]){c.hasInstance=true}else{if(typeof c.instance!==$[8]){throw new Error("AddProperty: Invalid instance definition for property "+c.name+": "+c.instance)}else{c.hasInstance=false}}if(typeof c.classname===$[7]){c.hasClassName=true}else{if(typeof c.classname!==$[8]){throw new Error("AddProperty: Invalid classname definition for property "+c.name+": "+c.classname)}else{c.hasClassName=false}}c.hasConvert=c.convert!=null;c.hasPossibleValues=c.possibleValues!=null;c.addToQueue=c.addToQueue||false;c.addToQueueRuntime=c.addToQueueRuntime||false;c.up=c.name.toUpperCase();var e=rwt.qx.Property.$$store.user[c.name]="__user$"+c.name;var a=$[57]+c.method;var d="_modify"+c.implMethod;var b="_check"+c.implMethod;var g=rwt.qx.Property.$$method;if(!g.set[c.name]){g.set[c.name]="set"+c.method;g.get[c.name]="get"+c.method;g.reset[c.name]=$[128]+c.method}f[e]=c.defaultValue;f["get"+c.method]=function(){return this[e]};f["force"+c.method]=function(h){return this[e]=h};f[$[128]+c.method]=function(){return this["set"+c.method](c.defaultValue)};if(c.type===$[135]){f[$[202]+c.method]=function(h){return this["set"+c.method](!this[e])}}if(c.allowMultipleArguments||c.hasConvert||c.hasInstance||c.hasClassName||c.hasPossibleValues||c.hasUnitDetection||c.addToQueue||c.addToQueueRuntime||c.addToStateQueue){f["set"+c.method]=function(j){if(c.allowMultipleArguments&&arguments.length>1){j=rwt.util.Arrays.fromArguments(arguments)}if(c.hasConvert){try{j=c.convert.call(this,j,c)}catch(i){throw new Error("Attention! Could not convert new value for "+c.name+": "+j+": "+i)}}var h=this[e];if(j===h){return j}if(!(c.allowNull&&j==null)){if(c.hasType&&typeof j!==c.type){throw new Error($[193]+j+$[198]+c.name+$[535]+c.type+$[432]+typeof j+'"!')}if(rwt.qx.Class.getByName(c.instance)){if(c.hasInstance&&!(j instanceof rwt.qx.Class.getByName(c.instance))){throw new Error($[193]+j+$[198]+c.name+$[376]+c.instance+'"!')}}else{if(rwt.util.Variant.isSet($[444],"on")){if(c.hasInstance&&!(j instanceof qx.OO.classes[c.instance])){throw new Error($[193]+j+$[198]+c.name+$[376]+c.instance+'"!')}}}if(c.hasClassName&&j.classname!=c.classname){throw new Error($[193]+j+$[198]+c.name+'" which must be an object with the classname "'+c.classname+'"!')}if(c.hasPossibleValues&&j!=null&&!rwt.util.Arrays.contains(c.possibleValues,j)){throw new Error("Failed to save value for "+c.name+". '"+j+"' is not a possible value!")}}if(this[b]){try{j=this[b](j,c);if(j===h){return j}}catch(i){throw new Error($[539]+c.name+" "+i)}}this[e]=j;if(this[d]){try{this[d](j,h,c)}catch(i){throw new Error('Modification of property "'+c.name+$[403]+i)}}if(c.addToQueue){this.addToQueue(c.name)}if(c.addToQueueRuntime){this.addToQueueRuntime(c.name)}if(c.addToStateQueue){this.addToStateQueue()}if(this.hasEventListeners&&this.hasEventListeners(a)){try{this.createDispatchDataEvent(a,j)}catch(i){throw new Error("Property "+c.name+$[499]+i)}}return j}}else{f["set"+c.method]=function(k){var h=this[e];if(k===h){return k}if(!(c.allowNull&&k==null)){if(c.hasType&&typeof k!==c.type){throw new Error($[193]+k+$[198]+c.name+$[535]+c.type+$[432]+typeof k+'"!')}}if(this[b]){try{k=this[b](k,c);if(k===h){return k}}catch(i){throw new Error($[539]+c.name+" "+i)}}this[e]=k;if(this[d]){try{this[d](k,h,c)}catch(i){throw new Error('Setting property "'+c.name+'" to "'+k+$[403]+i)}}if(this.hasEventListeners&&this.hasEventListeners(a)){var j=new rwt.event.DataEvent(a,k,h,false);j.setTarget(this);try{this.dispatchEvent(j,true)}catch(i){throw new Error("Property "+c.name+$[499]+i)}}return k}}f["set"+c.method].self=f.constructor;if(typeof c.getAlias===$[7]){f[c.getAlias]=f["get"+c.method]}if(typeof c.setAlias===$[7]){f[c.setAlias]=f["set"+c.method]}}}}); |
| rwt.qx.Class.define("rwt.qx.Property",{statics:{__checks:{Boolean:'typeof value === "boolean"',String:'typeof value === "string"',NonEmptyString:'typeof value === "string" && value.length > 0',Number:$[353],Integer:'typeof value === "number" && isFinite(value) && value%1 === 0',Float:$[353],Double:$[353],Error:"value instanceof Error",RegExp:"value instanceof RegExp",Object:'value !== null && typeof value === "object"',Array:"value instanceof Array",Map:'value !== null && typeof value === "object" && !(value instanceof Array) && !(value instanceof rwt.qx.Object)',Function:"value instanceof Function",Date:"value instanceof Date",Node:"value !== null && value.nodeType !== undefined",Element:"value !== null && value.nodeType === 1 && value.attributes",Document:"value !== null && value.nodeType === 9 && value.documentElement",Window:"value !== null && window.document",Event:"value !== null && value.type !== undefined",Class:'value !== null && value.$$type === "Class"',Mixin:'value !== null && value.$$type === "Mixin"',Interface:'value !== null && value.$$type === "Interface"',Theme:'value !== null && value.$$type === "Theme"',Color:'typeof value === "string" && rwt.util.Colors.isValid(value)',Border:$[429],Font:$[429],Label:'value !== null && typeof value === "string"'},__dispose:{Object:true,Array:true,Map:true,Function:true,Date:true,Node:true,Element:true,Document:true,Window:true,Event:true,Class:true,Mixin:true,Interface:true,Theme:true,Border:true,Font:true},$$inherit:$[165],$$idcounter:0,$$store:{user:{},theme:{},inherit:{},init:{},useinit:{}},$$method:{get:{},set:{},reset:{},init:{},refresh:{},style:{},unstyle:{}},$$allowedKeys:{name:$[7],dispose:$[135],inheritable:$[135],nullable:$[135],themeable:$[135],refine:$[135],init:null,apply:$[7],event:$[7],check:null,transform:$[7],deferredInit:$[135]},$$allowedGroupKeys:{name:$[7],group:$[20],mode:$[7],themeable:$[135]},$$inheritable:{},refresh:function(g){var f=g.getParent();if(f){var c=g.constructor;var b=this.$$store.inherit;var e=this.$$method.refresh;var d;while(c){d=c.$$properties;if(d){for(var a in this.$$inheritable){if(d[a]&&g[e[a]]){g[e[a]](f[b[a]])}}}c=c.superclass}}},attach:function(b){var c=b.$$properties;if(c){for(var a in c){this.attachMethods(b,a,c[a])}}b.$$propertiesAttached=true},attachMethods:function(c,b,a){if(a._legacy||a._fast||a._cached){return}var d,e;if(b.charAt(0)==="_"){if(b.charAt(1)==="_"){d="__";e=rwt.util.Strings.toFirstUp(b.substring(2))}else{d="_";e=rwt.util.Strings.toFirstUp(b.substring(1))}}else{d="";e=rwt.util.Strings.toFirstUp(b)}if(a.group){this.__attachGroupMethods(c,a,d,e)}else{this.__attachPropertyMethods(c,a,d,e)}},__attachGroupMethods:function(n,e,k,r){var h=n.prototype;var b=e.name;var d=e.themeable===true;var g=[];var o=[];if(d){var s=[];var m=[]}var c="var a=arguments[0] instanceof Array?arguments[0]:arguments;";g.push(c);if(d){s.push(c)}if(e.mode==$[219]){var p="a=rwt.util.Arrays.fromShortHand(rwt.util.Arrays.fromArguments(a));";g.push(p);if(d){s.push(p)}}for(var j=0,q=e.group,f=q.length;j<f;j++){if(rwt.util.Variant.isSet($[26],"on")){if(!this.$$method.set[q[j]]||!this.$$method.reset[q[j]]){throw new Error("Cannot create property group '"+b+"' including non-existing property '"+q[j]+"'!")}}g.push($[55],this.$$method.set[q[j]],"(a[",j,"]);");o.push($[55],this.$$method.reset[q[j]],"();");if(d){if(rwt.util.Variant.isSet($[26],"on")){if(!this.$$method.style[q[j]]){throw new Error("Cannot add the non themable property '"+q[j]+"' to the themable property group '"+b+"'")}}s.push($[55],this.$$method.style[q[j]],"(a[",j,"]);");m.push($[55],this.$$method.unstyle[q[j]],"();")}}this.$$method.set[b]=k+"set"+r;h[this.$$method.set[b]]=new Function(g.join(""));this.$$method.reset[b]=k+$[128]+r;h[this.$$method.reset[b]]=new Function(o.join(""));if(d){this.$$method.style[b]=k+$[66]+r;h[this.$$method.style[b]]=new Function(s.join(""));this.$$method.unstyle[b]=k+$[125]+r;h[this.$$method.unstyle[b]]=new Function(m.join(""))}},__attachPropertyMethods:function(e,d,f,h){var b=e.prototype;var c=d.name;if(d.dispose===undefined&&typeof d.check===$[7]){d.dispose=this.__dispose[d.check]||rwt.qx.Class.isDefined(d.check)}var g=this.$$method;var a=this.$$store;a.user[c]="__user$"+c;a.theme[c]="__theme$"+c;a.init[c]="__init$"+c;a.inherit[c]="__inherit$"+c;a.useinit[c]="__useinit$"+c;g.get[c]=f+"get"+h;b[g.get[c]]=function(){return rwt.qx.Property.executeOptimizedGetter(this,e,c,"get")};g.set[c]=f+"set"+h;b[g.set[c]]=function(i){return rwt.qx.Property.executeOptimizedSetter(this,e,c,"set",arguments)};g.reset[c]=f+$[128]+h;b[g.reset[c]]=function(){return rwt.qx.Property.executeOptimizedSetter(this,e,c,$[128])};if(d.inheritable||d.apply||d.event||d.deferredInit){g.init[c]=f+"init"+h;b[g.init[c]]=function(i){return rwt.qx.Property.executeOptimizedSetter(this,e,c,"init",arguments)}}if(d.inheritable){g.refresh[c]=f+$[154]+h;b[g.refresh[c]]=function(i){return rwt.qx.Property.executeOptimizedSetter(this,e,c,$[154],arguments)}}if(d.themeable){g.style[c]=f+$[66]+h;b[g.style[c]]=function(i){return rwt.qx.Property.executeOptimizedSetter(this,e,c,$[66],arguments)};g.unstyle[c]=f+$[125]+h;b[g.unstyle[c]]=function(){return rwt.qx.Property.executeOptimizedSetter(this,e,c,$[125])}}if(d.check===$[2]){b[f+$[202]+h]=new Function($[144]+g.set[c]+"(!this."+g.get[c]+"())");b[f+"is"+h]=new Function($[144]+g.get[c]+"()")}},__errors:{0:"Could not change or apply init value after constructing phase!",1:"Requires exactly one argument!",2:"Undefined value is not allowed!",3:"Does not allow any arguments!",4:"Null value is not allowed!",5:"Is invalid!"},error:function(e,g,c,a,b){var d=e.constructor.classname;var f="Error in property "+c+" of class "+d+" in method "+this.$$method[a][c]+" with incoming value '"+b+"': ";throw new Error(f+(this.__errors[g]||"Unknown reason: "+g))},__unwrapFunctionFromCode:function(a,c,e,g,h,d){var b=this.$$method[g][e];if(rwt.util.Variant.isSet($[26],"on")){try{c[b]=new Function("value",h.join(""))}catch(f){throw new Error("Malformed generated code to unwrap method: "+this.$$method[g][e]+"\n"+h.join(""))}}else{c[b]=new Function("value",h.join(""))}if(d===undefined){return a[b]()}else{if(rwt.util.Variant.isSet($[26],"on")){return a[b].apply(a,d)}else{return a[b](d[0])}}},executeOptimizedGetter:function(a,e,d,f){var c=e.$$properties[d];var b=e.prototype;var g=[];if(c.inheritable){g.push($[117],this.$$store.inherit[d],$[157]);g.push($[144],this.$$store.inherit[d],";");g.push("else ")}g.push($[117],this.$$store.user[d],$[157]);g.push($[144],this.$$store.user[d],";");if(c.themeable){g.push($[197],this.$$store.theme[d],$[157]);g.push($[144],this.$$store.theme[d],";")}if(c.deferredInit&&c.init===undefined){g.push($[197],this.$$store.init[d],$[157]);g.push($[144],this.$$store.init[d],";")}g.push("else ");if(c.init!==undefined){g.push($[144],this.$$store.init[d],";")}else{if(c.inheritable||c.nullable){g.push("return null;")}else{g.push('throw new Error("Property ',d," of an instance of ",e.classname,' is not (yet) ready!");')}}return this.__unwrapFunctionFromCode(a,b,d,f,g)},executeOptimizedSetter:function(k,g,a,e,h){var d=g.$$properties[a];var f=g.prototype;var b=[];var i=e==="set"||e===$[66]||(e==="init"&&d.init===undefined);var l=e===$[128]||e===$[125];var c=d.apply||d.event||d.inheritable;if(e===$[66]||e===$[125]){var j=this.$$store.theme[a]}else{if(e==="init"){var j=this.$$store.init[a]}else{var j=this.$$store.user[a]}}if(rwt.util.Variant.isSet($[26],"on")){b.push($[493]);if(e==="init"){b.push('if(this.$$initialized)prop.error(this,0,"'+a+'","'+e+$[147])}if(e===$[154]){}else{if(i){b.push('if(arguments.length!==1)prop.error(this,1,"'+a+'","'+e+$[147]);b.push($[495]+a+'","'+e+$[147])}else{b.push('if(arguments.length!==0)prop.error(this,3,"'+a+'","'+e+$[147])}}}else{if(!d.nullable||d.check||d.inheritable){b.push($[493])}if(rwt.util.Variant.isSet($[26],"on")&&e==="set"){b.push($[495]+a+'","'+e+$[147])}}if(i){if(d.transform){b.push("value=this.",d.transform,"(value);")}}if(c){if(i){b.push($[117],j,"===value)return value;")}else{if(l){b.push($[117],j,"===undefined)return;")}}}if(d.inheritable){b.push("var inherit=prop.$$inherit;")}if(i&&rwt.util.Variant.isSet($[26],"on")){if(!d.nullable){b.push('if(value===null)prop.error(this,4,"'+a+'","'+e+$[147])}if(d.check!==undefined){if(d.nullable){b.push("if(value!==null)")}if(d.inheritable){b.push("if(value!==inherit)")}b.push("if(");if(this.__checks[d.check]!==undefined){b.push("!(",this.__checks[d.check],")")}else{if(rwt.qx.Class.isDefined(d.check)){b.push("!(value instanceof ",d.check,")")}else{if(typeof d.check===$[41]){b.push("!",g.classname,$[458],a);b.push(".check.call(this, value)")}else{if(typeof d.check===$[7]){b.push("!(",d.check,")")}else{if(d.check instanceof Array){d.checkMap=rwt.util.Objects.fromArray(d.check);b.push(g.classname,$[458],a);b.push(".checkMap[value]===undefined")}else{throw new Error("Could not add check to property "+a+" of class "+g.classname)}}}}}b.push(')prop.error(this,5,"'+a+'","'+e+$[147])}}if(!c){if(e==="set"){b.push($[55],this.$$store.user[a],$[64])}else{if(e===$[128]){b.push($[117],this.$$store.user[a],$[157]);b.push($[137],this.$$store.user[a],";")}else{if(e===$[66]){b.push($[55],this.$$store.theme[a],$[64])}else{if(e===$[125]){b.push($[117],this.$$store.theme[a],$[157]);b.push($[137],this.$$store.theme[a],";")}else{if(e==="init"&&i){b.push($[55],this.$$store.init[a],$[64])}}}}}}else{if(d.inheritable){b.push("var computed, old=this.",this.$$store.inherit[a],";")}else{b.push("var computed, old;")}b.push($[117],this.$$store.user[a],$[244]);if(e==="set"){if(!d.inheritable){b.push($[263],this.$$store.user[a],";")}b.push($[47],this.$$store.user[a],$[64])}else{if(e===$[128]){if(!d.inheritable){b.push($[263],this.$$store.user[a],";")}b.push($[137],this.$$store.user[a],";");b.push($[117],this.$$store.theme[a],$[157]);b.push($[47],this.$$store.theme[a],";");b.push($[197],this.$$store.init[a],$[244]);b.push($[47],this.$$store.init[a],";");b.push($[55],this.$$store.useinit[a],"=true;");b.push("}")}else{if(d.inheritable){b.push($[47],this.$$store.user[a],";")}else{b.push("old=computed=this.",this.$$store.user[a],";")}if(e===$[66]){b.push($[55],this.$$store.theme[a],$[64])}else{if(e===$[125]){b.push($[137],this.$$store.theme[a],";")}else{if(e==="init"&&i){b.push($[55],this.$$store.init[a],$[64])}}}}}b.push("}");if(d.themeable){b.push($[197],this.$$store.theme[a],$[244]);if(!d.inheritable){b.push($[263],this.$$store.theme[a],";")}if(e==="set"){b.push($[47],this.$$store.user[a],$[64])}else{if(e===$[66]){b.push($[47],this.$$store.theme[a],$[64])}else{if(e===$[125]){b.push($[137],this.$$store.theme[a],";");b.push($[117],this.$$store.init[a],$[244]);b.push($[47],this.$$store.init[a],";");b.push($[55],this.$$store.useinit[a],"=true;");b.push("}")}else{if(e==="init"){if(i){b.push($[55],this.$$store.init[a],$[64])}b.push($[47],this.$$store.theme[a],";")}else{if(e===$[154]){b.push($[47],this.$$store.theme[a],";")}}}}}b.push("}")}b.push($[197],this.$$store.useinit[a],"){");if(!d.inheritable){b.push($[263],this.$$store.init[a],";")}if(e==="init"){if(i){b.push($[47],this.$$store.init[a],$[64])}else{b.push($[47],this.$$store.init[a],";")}}else{if(e==="set"||e===$[66]||e===$[154]){b.push($[137],this.$$store.useinit[a],";");if(e==="set"){b.push($[47],this.$$store.user[a],$[64])}else{if(e===$[66]){b.push($[47],this.$$store.theme[a],$[64])}else{if(e===$[154]){b.push($[47],this.$$store.init[a],";")}}}}}b.push("}");if(e==="set"||e===$[66]||e==="init"){b.push("else{");if(e==="set"){b.push($[47],this.$$store.user[a],$[64])}else{if(e===$[66]){b.push($[47],this.$$store.theme[a],$[64])}else{if(e==="init"){if(i){b.push($[47],this.$$store.init[a],$[64])}else{b.push($[47],this.$$store.init[a],";")}b.push($[55],this.$$store.useinit[a],"=true;")}}}b.push("}")}}if(d.inheritable){b.push("if(computed===undefined||computed===inherit){");if(e===$[154]){b.push("computed=value;")}else{b.push("var pa=this.getParent();if(pa)computed=pa.",this.$$store.inherit[a],";")}b.push("if((computed===undefined||computed===inherit)&&");b.push($[55],this.$$store.init[a],"!==undefined&&");b.push($[55],this.$$store.init[a],"!==inherit){");b.push($[47],this.$$store.init[a],";");b.push($[55],this.$$store.useinit[a],"=true;");b.push("}else{");b.push($[137],this.$$store.useinit[a],";}");b.push("}");b.push($[379]);b.push("if(computed===inherit){");b.push("computed=undefined;delete this.",this.$$store.inherit[a],";");b.push("}");b.push("else if(computed===undefined)");b.push($[137],this.$$store.inherit[a],";");b.push("else this.",this.$$store.inherit[a],"=computed;");b.push("var backup=computed;");b.push($[456]);b.push($[397])}else{if(c){if(e!=="set"&&e!==$[66]){b.push($[456])}b.push($[379]);b.push($[397])}}if(c){if(d.apply){b.push($[55],d.apply,"(computed, old);")}if(d.event){b.push('this.createDispatchChangeEvent("',d.event,'", computed, old);')}if(d.inheritable&&f.getChildren){b.push("var a=this.getChildren();if(a)for(var i=0,l=a.length;i<l;i++){");b.push("if(a[i].",this.$$method.refresh[a],")a[i].",this.$$method.refresh[a],"(backup);");b.push("}")}}if(i){b.push("return value;")}return this.__unwrapFunctionFromCode(k,f,a,e,b,h)}}}); |
| rwt.qx.Class.define("rwt.util.Strings",{statics:{trim:function(a){return a.replace(/^\s+|\s+$/g,"")},pad:function(f,e,d,c){if(typeof d===$[8]){d="0"}var a="";for(var b=f.length;b<e;b++){a+=d}if(c===true){return f+a}else{return a+f}},toFirstUp:function(a){return a.charAt(0).toUpperCase()+a.substr(1)},contains:function(b,a){return b.indexOf(a)!=-1},format:function(c,a){var d=c;for(var b=0;b<a.length;b++){d=d.replace(new RegExp("%"+(b+1),"g"),a[b])}return d}}}); |
| rwt.qx.Class.define($[484],{extend:Object,construct:function(){this._hashCode=rwt.qx.Object.__availableHashCode++;if(this._autoDispose){this.__dbKey=rwt.qx.Object.__freeAvailableDbKeys.pop();if(!this.__dbKey){this.__dbKey=rwt.qx.Object.__db.length;rwt.qx.Object.__db.push(this)}else{rwt.qx.Object.__db[this.__dbKey]=this}}},statics:{__availableHashCode:0,__freeAvailableDbKeys:[],__db:[],__disposeAll:false,$$type:$[187],toHashCode:function(a){if(a._hashCode!=null){return a._hashCode}return a._hashCode=this.__availableHashCode++},getDb:function(){return this.__db},dispose:function(a){if(this.__disposed){return}this.__disposed=true;this.__unload=a||false;var c,d=this.__db;for(var b=d.length-1;b>=0;b--){c=d[b];if(c&&c.__disposed===false){c.dispose()}}},inGlobalDispose:function(){return this.__disposed||false},isPageUnload:function(){return this.__unload||false}},members:{_autoDispose:true,setUserData:function(a,b){if(!this.__userData){this.__userData={}}this.__userData[a]=b},getUserData:function(a){if(!this.__userData){return null}var b=this.__userData[a];return b===undefined?null:b},toHashCode:function(){return this._hashCode},toString:function(){if(this.classname){return"[object "+this.classname+"]"}return"[object Object]"},base:function(b,a){if(arguments.length===1){return b.callee.base.call(this)}else{return b.callee.base.apply(this,Array.prototype.slice.call(arguments,1))}},self:function(a){return a.callee.self},getDbKey:function(){return this.__dbKey},set:function(b,a){var d=rwt.qx.Property.$$method.set;if(typeof b===$[7]){return this[d[b]](a)}else{for(var c in b){this[d[c]](b[c])}return this}},get:function(b){var a=rwt.qx.Property.$$method.get;return this[a[b]]()},reset:function(b){var a=rwt.qx.Property.$$method.reset;this[a[b]]()},__disposed:false,getDisposed:function(){return this.__disposed},isDisposed:function(){return this.__disposed},dispose:function(){if(this.__disposed){return}this.__disposed=true;var c=this.constructor;var b;while(c.superclass){if(c.$$destructor){c.$$destructor.call(this)}if(c.$$includes){b=c.$$flatIncludes;for(var d=0,a=b.length;d<a;d++){if(b[d].$$destructor){b[d].$$destructor.call(this)}}}c=c.superclass}},debug:rwt.util.Variant.select($[26],{on:function(a){if(window.console&&typeof console.log===$[41]){console.log(a)}},"default":function(a){}}),info:function(a){this.debug("INFO: "+a)},warn:function(a){this.debug("WARN: "+a)},error:function(a){this.debug("ERROR: "+a)},printStackTrace:rwt.util.Variant.select($[26],{on:function(){if(console&&typeof console.trace===$[41]){this.debug("Current stack trace:");console.trace()}},"default":function(){}}),_disposeFields:function(b){var c;for(var d=0,a=arguments.length;d<a;d++){var c=arguments[d];if(this[c]==null){continue}if(!this.hasOwnProperty(c)){continue}this[c]=null}},_disposeObjects:function(b){var c;for(var d=0,a=arguments.length;d<a;d++){var c=arguments[d];if(this[c]==null){continue}if(!this.hasOwnProperty(c)){continue}if(!this[c].dispose){throw new Error(this.classname+"."+c+" is not a qooxdoo object. Use _disposeFields instead of _disposeObjects.")}this[c].dispose();this[c]=null}},_disposeObjectDeep:function(b,a){var b;if(this[b]==null){return}if(!this.hasOwnProperty(b)){return}this.__disposeObjectsDeepRecurser(this[b],a||0);this[b]=null},__disposeObjectsDeepRecurser:function(f,b){if(f instanceof rwt.qx.Object){f.dispose()}else{if(f instanceof Array){for(var d=0,a=f.length;d<a;d++){var e=f[d];if(e==null){continue}if(typeof e==$[20]){if(b>0){this.__disposeObjectsDeepRecurser(e,b-1)}f[d]=null}else{if(typeof e==$[41]){f[d]=null}}}}else{if(f instanceof Object){for(var c in f){if(f[c]==null||!f.hasOwnProperty(c)){continue}var e=f[c];if(typeof e==$[20]){if(b>0){this.__disposeObjectsDeepRecurser(e,b-1)}f[c]=null}else{if(typeof e==$[41]){f[c]=null}}}}}}}},destruct:function(){var d=this.constructor;var f;var h=rwt.qx.Property.$$store;var i=h.user;var e=h.theme;var b=h.inherit;var g=h.useinit;var c=h.init;while(d){f=d.$$properties;if(f){for(var a in f){if(f[a].dispose){this[i[a]]=this[e[a]]=this[b[a]]=this[g[a]]=this[c[a]]=undefined}}}d=d.superclass}this._disposeFields("__userData");if(this.__dbKey!=null){if(rwt.qx.Object.__disposeAll){rwt.qx.Object.__db[this.__dbKey]=null}else{delete rwt.qx.Object.__db[this.__dbKey]}rwt.qx.Object.__freeAvailableDbKeys.push(this.__dbKey)}}}); |
| rwt.qx.Class.define("rwt.util.Functions",{statics:{returnTrue:function(){return true},returnFalse:function(){return false},returnNull:function(){return null},returnThis:function(){return this},returnZero:function(){return 0},returnNegativeIndex:function(){return -1},bind:function(e,b,a){if(arguments.length>2){var c=Array.prototype.slice.call(arguments,2);var d=function(){e.context=b;var f=e.apply(b,c.concat(rwt.util.Arrays.fromArguments(arguments)));e.context=null;return f}}else{var d=function(){e.context=b;var f=e.apply(b,arguments);e.context=null;return f}}d.self=e.self?e.self.constructor:b;return d},bindEvent:function(c,a){var b=function(e){c.context=a;var d=c.call(a,e||window.event);c.context=null;return d};b.self=c.self?c.self.constructor:a;return b},getCaller:function(a){return a.caller?a.caller.callee:a.callee.caller}}}); |
| rwt.qx.Class.define("rwt.html.Viewport",{statics:{getWidth:rwt.util.Variant.select($[0],{opera:function(a){return(a||window).document.body.clientWidth},webkit:function(a){return(a||window).innerWidth},"default":function(b){var a=(b||window).document;return a.compatMode===$[214]?a.documentElement.clientWidth:a.body.clientWidth}}),getHeight:rwt.util.Variant.select($[0],{opera:function(a){return(a||window).document.body.clientHeight},webkit:function(a){return(a||window).innerHeight},"default":function(b){var a=(b||window).document;return a.compatMode===$[214]?a.documentElement.clientHeight:a.body.clientHeight}}),getScrollLeft:rwt.util.Variant.select($[0],{mshtml:function(b){var a=(b||window).document;return a.documentElement.scrollLeft||a.body.scrollLeft},"default":function(a){return(a||window).pageXOffset}}),getScrollTop:rwt.util.Variant.select($[0],{mshtml:function(b){var a=(b||window).document;return a.documentElement.scrollTop||a.body.scrollTop},"default":function(a){return(a||window).pageYOffset}})}}); |
| rwt.qx.Class.define("rwt.qx.Target",{extend:rwt.qx.Object,construct:function(){arguments.callee.base.call(this)},members:{addEventListener:function(b,c,d){if(this.getDisposed()){return}if(this.__listeners===undefined){this.__listeners={}}if(this.__listeners[b]===undefined){this.__listeners[b]={}}var a="event"+rwt.qx.Object.toHashCode(c)+(d?"$"+rwt.qx.Object.toHashCode(d):"");this.__listeners[b][a]={handler:c,object:d}},removeEventListener:function(c,d,e){if(this.getDisposed()){return}var b=this.__listeners;if(!b||b[c]===undefined){return}if(typeof d!==$[41]){throw new Error("rwt.qx.Target: removeEventListener("+c+"): '"+d+"' is not a function!")}var a="event"+rwt.qx.Object.toHashCode(d)+(e?"$"+rwt.qx.Object.toHashCode(e):"");delete this.__listeners[c][a]},hasEventListeners:function(a){return this.__listeners&&this.__listeners[a]!==undefined&&!rwt.util.Objects.isEmpty(this.__listeners[a])},createDispatchEvent:function(a){if(this.hasEventListeners(a)){this.dispatchEvent(new rwt.event.Event(a),true)}},createDispatchDataEvent:function(a,b){if(this.hasEventListeners(a)){this.dispatchEvent(new rwt.event.DataEvent(a,b),true)}},createDispatchChangeEvent:function(b,c,a){if(this.hasEventListeners(b)){this.dispatchEvent(new rwt.event.ChangeEvent(b,c,a),true)}},dispatchEvent:function(a,c){if(this.getDisposed()){return}if(a.getTarget()==null){a.setTarget(this)}if(a.getCurrentTarget()==null){a.setCurrentTarget(this)}this._dispatchEvent(a,c);var b=a.getDefaultPrevented();if(c){a.dispose()}return !b},dispatchSimpleEvent:function(g,d,e){var h=this.__listeners;var f=e===true;var k=true;if(h){var b=h[g];if(b){var a;var c;for(var i in b){a=b[i].handler;c=b[i].object||this;k=a.call(c,d)&&k!==false;if(k===false){f=false}}}}if(f&&typeof(this.getParent)===$[41]){var j=this.getParent();if(j&&!j.getDisposed()&&j.getEnabled()){j.dispatchSimpleEvent(g,d,e)}}return k!==false},_dispatchEvent:function(b){var d=this.__listeners;if(d&&this._allowDispatch(b)){b.setCurrentTarget(this);var a=d[b.getType()];if(a){var e,f;for(var g in a){e=a[g].handler;f=a[g].object||this;e.call(f,b)}}}if(b.getBubbles()&&!b.getPropagationStopped()&&typeof(this.getParent)==$[41]){var c=this.getParent();if(c&&!c.getDisposed()){c._dispatchEvent(b)}}},_allowDispatch:function(b){var a=true;if(this.getEnabled&&b instanceof rwt.event.DomEvent){a=this.getEnabled()}return a}},destruct:function(){this._disposeObjectDeep("__listeners",2)}}); |
| rwt.qx.Class.define($[11],{extend:rwt.qx.Object,construct:function(a){arguments.callee.base.call(this);this.setType(a)},properties:{type:{_fast:true,setOnlyOnce:true},originalTarget:{_fast:true,setOnlyOnce:true},target:{_fast:true,setOnlyOnce:true},relatedTarget:{_fast:true,setOnlyOnce:true},currentTarget:{_fast:true},bubbles:{_fast:true,defaultValue:false,noCompute:true},propagationStopped:{_fast:true,defaultValue:true,noCompute:true},defaultPrevented:{_fast:true,defaultValue:false,noCompute:true}},members:{_autoDispose:false,preventDefault:function(){this.setDefaultPrevented(true)},stopPropagation:function(){this.setPropagationStopped(true)}},destruct:function(){this._disposeFields("_valueOriginalTarget","_valueTarget","_valueRelatedTarget","_valueCurrentTarget")}}); |
| rwt.qx.Class.define($[50],{extend:rwt.event.Event,construct:function(a,b){arguments.callee.base.call(this,a);this.setData(b)},properties:{propagationStopped:{_fast:true,defaultValue:false},data:{_fast:true}},destruct:function(){this._disposeFields("_valueData")}}); |
| rwt.qx.Class.define($[404],{extend:rwt.event.Event,construct:function(b,c,a){arguments.callee.base.call(this,b);this.setValue(c);this.setOldValue(a)},properties:{value:{_fast:true},oldValue:{_fast:true}},members:{getData:function(){return this.getValue()}},destruct:function(){this._disposeFields("_valueValue","_valueOldValue")}}); |
| rwt.qx.Class.define("rwt.client.Timer",{extend:rwt.qx.Target,construct:function(a){arguments.callee.base.call(this);this.setEnabled(false);if(a!=null){this.setInterval(a)}this.__oninterval=rwt.util.Functions.bind(this._oninterval,this);this.__event=new rwt.event.Event($[27])},events:{interval:$[11]},statics:{once:function(a,c,b){var d=new rwt.client.Timer(b);d.addEventListener($[27],function(f){d.dispose();a.call(c,f);c=null},c);d.start()}},properties:{enabled:{init:true,check:$[2],apply:$[533]},interval:{check:$[18],init:1000,apply:"_applyInterval"}},members:{__intervalHandler:null,_applyInterval:function(b,a){if(this.getEnabled()){this.restart()}},_applyEnabled:function(b,a){if(a){window.clearInterval(this.__intervalHandler);this.__intervalHandler=null}else{if(b){this.__intervalHandler=window.setInterval(this.__oninterval,this.getInterval())}}},start:function(){this.setEnabled(true)},startWith:function(a){this.setInterval(a);this.start()},stop:function(){this.setEnabled(false)},restart:function(){this.stop();this.start()},restartWith:function(a){this.stop();this.startWith(a)},_oninterval:function(){try{if(this.getEnabled()&&this.hasEventListeners($[27])){this.dispatchEvent(this.__event,false)}}catch(a){rwt.runtime.ErrorHandler.processJavaScriptError(a)}}},destruct:function(){if(this.__intervalHandler){window.clearInterval(this.__intervalHandler)}this._disposeFields("__intervalHandler","__oninterval","__event")}}); |
| rwt.qx.Class.define("rwt.html.Entity",{statics:{TO_CHARCODE:{quot:34,amp:38,lt:60,gt:62,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,copy:169,ordf:170,laquo:171,not:172,shy:173,reg:174,macr:175,deg:176,plusmn:177,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,sup1:185,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,Agrave:192,Aacute:193,Acirc:194,Atilde:195,Auml:196,Aring:197,AElig:198,Ccedil:199,Egrave:200,Eacute:201,Ecirc:202,Euml:203,Igrave:204,Iacute:205,Icirc:206,Iuml:207,ETH:208,Ntilde:209,Ograve:210,Oacute:211,Ocirc:212,Otilde:213,Ouml:214,times:215,Oslash:216,Ugrave:217,Uacute:218,Ucirc:219,Uuml:220,Yacute:221,THORN:222,szlig:223,agrave:224,aacute:225,acirc:226,atilde:227,auml:228,aring:229,aelig:230,ccedil:231,egrave:232,eacute:233,ecirc:234,euml:235,igrave:236,iacute:237,icirc:238,iuml:239,eth:240,ntilde:241,ograve:242,oacute:243,ocirc:244,otilde:245,ouml:246,divide:247,oslash:248,ugrave:249,uacute:250,ucirc:251,uuml:252,yacute:253,thorn:254,yuml:255,fnof:402,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,bull:8226,hellip:8230,prime:8242,Prime:8243,oline:8254,frasl:8260,weierp:8472,image:8465,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,"int":8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,circ:710,tilde:732,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,permil:8240,lsaquo:8249,rsaquo:8250,euro:8364}}}); |
| rwt.qx.Class.define("rwt.html.EventRegistration",{statics:{addEventListener:rwt.util.Variant.select($[0],{mshtml:function(a,b,c){a.attachEvent("on"+b,c)},"default":function(a,b,c){a.addEventListener(b,c,false)}}),removeEventListener:rwt.util.Variant.select($[0],{mshtml:function(a,b,c){a.detachEvent("on"+b,c)},"default":function(a,b,c){a.removeEventListener(b,c,false)}})}}); |
| rwt.qx.Class.define("rwt.event.EventHandlerUtil",{type:$[152],statics:{_lastUpDownType:{},_lastKeyCode:null,cleanUp:function(){delete this.__onKeyEvent;delete this._lastUpDownType;delete this._lastKeyCode},applyBrowserFixes:rwt.util.Variant.select($[0],{gecko:function(){var b=rwt.widgets.base.ClientDocument.getInstance();b.getElement().setAttribute("ondrop","event.preventDefault();");var a=document.documentElement;this._ffMouseFixListener=function(d){var c=null;try{c=d.originalTarget.tagName}catch(f){}if(d.button===0&&c!=null&&c!="INPUT"){d.preventDefault()}};rwt.html.EventRegistration.addEventListener(a,$[1],this._ffMouseFixListener)},"default":function(){}}),getDomEvent:rwt.util.Variant.select($[0],{mshtml:function(a){return a.length>0?a[0]:window.event},"default":function(a){return a[0]}}),getDomTarget:rwt.util.Variant.select($[0],{mshtml:function(a){return a.target||a.srcElement},webkit:function(a){var b=a.target||a.srcElement;if(b&&(b.nodeType==rwt.html.Nodes.TEXT)){b=b.parentNode}return b},"default":function(a){return a.target}}),stopDomEvent:function(a){a._prevented=true;if(a.preventDefault){a.preventDefault()}try{a.keyCode=0}catch(b){}a.returnValue=false},wasStopped:function(a){return a._prevented?true:false},blockUserDomEvents:function(c,d){var a=rwt.html.EventRegistration;if(d){for(var b=0;b<this._userEventTypes.length;b++){a.addEventListener(c,this._userEventTypes[b],this._domEventBlocker)}}else{for(var b=0;b<this._userEventTypes.length;b++){a.removeEventListener(c,this._userEventTypes[b],this._domEventBlocker)}}},_userEventTypes:[$[3],$[28],$[6],$[1],$[5],$[13],$[48],$[42],(rwt.client.Client.isGecko()?$[296]:$[43]),$[10],$[4],$[34]],_domEventBlocker:function(a){rwt.event.EventHandlerUtil.stopDomEvent(a);a.cancelBubble=true;if(a.stopPropagation){a.stopPropagation()}},getOriginalTargetObject:function(b){if(b==document.documentElement){b=document.body}try{while(b!=null&&b.rwtWidget==null){b=b.parentNode}}catch(a){b=null}return b?b.rwtWidget:null},getOriginalTargetObjectFromEvent:function(a,c){var b=this.getDomTarget(a);if(c){var d=c.document;if(b==c||b==d||b==d.documentElement||b==d.body){return d.body.rwtWidget}}return this.getOriginalTargetObject(b)},getRelatedTargetObjectFromEvent:function(b){var a=rwt.event.EventHandlerUtil;var c=b.relatedTarget;if(!c){if(b.type==$[3]){c=b.fromElement}else{c=b.toElement}}return a.getTargetObject(c)},getTargetObject:function(b,a,c){if(!a){var a=this.getOriginalTargetObject(b);if(!a){return null}}while(a){if(!c&&!a.getEnabled()){return null}if(!a.getAnonymous()){break}a=a.getParent()}return a},getKeyCode:rwt.util.Variant.select($[0],{gecko:function(a){return a.keyCode},opera:function(b){var a;if(b.type===$[4]){if(this._lastKeyCode===b.keyCode){a=b.keyCode}else{a=0}}else{a=b.keyCode}return a},"default":function(b){var a=b.type!==$[4]||b.keyCode===13||b.keyCode===27;return a?b.keyCode:0}}),getCharCode:rwt.util.Variant.select($[0],{"default":function(a){var b=a.type===$[4]&&a.keyCode!==13&&a.keyCode!==27;return b?a.charCode:0},"mshtml|newmshtml":function(a){var b=a.type===$[4]&&a.keyCode!==13&&a.keyCode!==27;return b?a.keyCode:0},opera:function(b){var a;if(b.type===$[4]){if(this._lastKeyCode!==b.keyCode){a=b.keyCode}else{a=0}}else{a=0}return a}}),_isFirstKeyDown:function(a){return this._lastUpDownType[a]!==$[10]},getEventPseudoTypes:rwt.util.Variant.select($[0],{"default":function(c,d,b){var a;if(c.type===$[10]){var e=!this.isNonPrintableKeyCode(d);if(this._isFirstKeyDown(d)){a=e?[$[10]]:[$[10],$[4]]}else{a=e?[]:[$[4]]}}else{a=[c.type]}return a},gecko:function(c,d,b){var a;if(c.type===$[10]&&this.isModifier(d)){if(this._isFirstKeyDown(d)){a=[$[10],$[4]]}else{a=[$[4]]}}else{if(c.type===$[10]&&!this._isFirstKeyDown(d)){a=[]}else{a=[c.type]}}return a},opera:function(b,c,a){return[b.type]}}),mustRestoreKeyup:function(b,c){var a=[];if(c[0]===$[10]){if(!this._isFirstKeyDown(93)&&b!==93){a.push(93)}}return a},mustRestoreKeypress:rwt.util.Variant.select($[0],{"default":function(b,c){var a=false;if(this.wasStopped(b)){a=(c.length===1&&c[0]===$[10])||c.length===0}return a},gecko:function(a,b){return false}}),saveData:function(b,c,a){if(b.type!==$[4]){this._lastUpDownType[c]=b.type;this._lastKeyCode=c}},clearStuckKey:function(a){this._lastUpDownType[a]=$[34]},keyCodeToIdentifier:function(b){var a="Unidentified";if(this._numpadToCharCode[b]!==undefined){a=String.fromCharCode(this._numpadToCharCode[b])}else{if(this._keyCodeToIdentifierMap[b]!==undefined){a=this._keyCodeToIdentifierMap[b]}else{if(this._specialCharCodeMap[b]!==undefined){a=this._specialCharCodeMap[b]}else{if(this._isAlphaNumericKeyCode(b)){a=String.fromCharCode(b)}}}}return a},charCodeToIdentifier:function(b){var a;if(this._specialCharCodeMap[b]!==undefined){a=this._specialCharCodeMap[b]}else{a=String.fromCharCode(b).toUpperCase()}return a},isNonPrintableKeyCode:rwt.util.Variant.select($[0],{"default":function(a){return this._keyCodeToIdentifierMap[a]?true:false},webkit:function(a){return(this._keyCodeToIdentifierMap[a]||a===27)?true:false}}),isSpecialKeyCode:function(a){return this._specialCharCodeMap[a]?true:false},isModifier:function(a){return a>=16&&a<=20&&a!==19},_isAlphaNumericKeyCode:function(b){var a=false;if((b>=this._charCodeA&&b<=this._charCodeZ)||(b>=this._charCode0&&b<=this._charCode9)){a=true}return a},_specialCharCodeMap:{13:$[49],27:$[105],32:$[78]},_keyCodeToIdentifierMap:{8:$[321],9:"Tab",16:"Shift",17:$[283],18:"Alt",20:"CapsLock",224:"Meta",37:"Left",38:"Up",39:$[35],40:"Down",33:$[40],34:$[45],35:"End",36:"Home",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",44:"PrintScreen",145:"Scroll",19:"Pause",91:"Win",93:"Apps"},_numpadToCharCode:{96:"0".charCodeAt(0),97:"1".charCodeAt(0),98:"2".charCodeAt(0),99:"3".charCodeAt(0),100:"4".charCodeAt(0),101:"5".charCodeAt(0),102:"6".charCodeAt(0),103:"7".charCodeAt(0),104:"8".charCodeAt(0),105:"9".charCodeAt(0),106:"*".charCodeAt(0),107:"+".charCodeAt(0),109:"-".charCodeAt(0),110:",".charCodeAt(0),111:"/".charCodeAt(0)},_charCodeA:"A".charCodeAt(0),_charCodeZ:"Z".charCodeAt(0),_charCode0:"0".charCodeAt(0),_charCode9:"9".charCodeAt(0)}}); |
| namespace($[185]);rwt.remote.HandlerRegistry={_registry:{},add:function(a,b){this._registry[a]=b},remove:function(a){delete this._registry[a]},getHandler:function(b){var a=this._registry[b];if(a===undefined){throw new Error("No Handler for type "+b)}return a},hasHandler:function(a){return this._registry[a]!=null}}; |
| namespace($[185]);rwt.remote.ObjectRegistry={_map:{},_callbacks:{},add:function(d,a,c){this._map[d]={object:a,handler:c};a._rwtId=d;if(typeof a.applyObjectId===$[41]){a.applyObjectId(d)}if(this._callbacks[d]){for(var b=0;b<this._callbacks[d].length;b++){this._callbacks[d][b](a)}delete this._callbacks[d]}},remove:function(a){if(a!=null){delete this._map[a]}},getId:function(b){var a=null;if(b!=null&&b._rwtId!=null){a=b._rwtId}return a},getObject:function(b){var a=this.getEntry(b);return a?a.object:undefined},getEntry:function(c){var a=this._map[c];if(a==null&&rwt.remote.HandlerRegistry.hasHandler(c)){var b=rwt.remote.HandlerRegistry.getHandler(c);if(b.service===true){this.add(c,b.factory(),b);a=this._map[c]}}return a},addRegistrationCallback:function(b,a){if(!this._callbacks[b]){this._callbacks[b]=[]}this._callbacks[b].push(a)}}; |
| namespace($[185]);rwt.remote.HandlerUtil={_controlDestructor:function(a){rwt.remote.HandlerUtil._widgetDestructor(a)},_childrenFinder:function(a){return rwt.remote.HandlerUtil.getDestroyableChildren(a)},_widgetDestructor:function(b){var a=b.getUserData($[103]);if(a){rwt.remote.HandlerUtil.removeDestroyableChild(a,b)}b.setToolTip(null);b.setUserData($[182],null);b.destroy()},_controlProperties:["children",$[355],$[113],$[100],$[243],$[322],$[91],$[81],$[133],$[86],$[87],"font","menu",$[269],$[241]],_controlPropertyHandler:{children:function(d,c){if(c!==null){var b=c.length;var e=function(g){var f=c.indexOf(rwt.remote.ObjectRegistry.getId(g));g.setZIndex(b-f)};for(var a=0;a<b;a++){rwt.remote.HandlerUtil.callWithTarget(c[a],e)}}},foreground:function(b,a){if(a===null){b.resetTextColor()}else{b.setTextColor(rwt.util.Colors.rgbToRgbString(a))}},background:function(c,b){if(b===null){c.resetBackgroundColor();if(c.__user$backgroundGradient==null){c.resetBackgroundGradient()}}else{if(c.__user$backgroundGradient==null){c.setBackgroundGradient(null)}var a=b[3]===0?$[80]:rwt.util.Colors.rgbToRgbString(b);c.setBackgroundColor(a)}},backgroundImage:function(b,a){if(a===null){b.resetBackgroundImage();b.setUserData($[171],null)}else{b.setUserData($[171],a.slice(1));b.setBackgroundImage(a[0])}},cursor:function(b,a){if(a===null){b.resetCursor()}else{b.setCursor(a)}},bounds:function(c,b){var a=b;if(c.getUserData("tabFolder")!==null){a[0]=0;a[1]=0}if(c.getUserData($[544])===null){c.setLeft(a[0]);c.setTop(a[1])}c.setWidth(a[2]);c.setHeight(a[3])},toolTip:function(d,c){if(c!=null&&c!==""){var b=rwt.util.Encoding;var e=b.escapeText(c,false);e=b.replaceNewLines(e,$[97]);d.setUserData($[182],e);var a=rwt.widgets.base.WidgetToolTip.getInstance();d.setToolTip(a);if(a.getParent()!=null){if(a.getBoundToWidget()==d){a.updateText(d)}}}else{d.setToolTip(null);d.setUserData($[182],null)}},font:function(b,c){if(b.setFont){if(c===null){b.resetFont()}else{var a=rwt.html.Font.fromArray(c);b.setFont(a)}}},menu:function(b,a){rwt.remote.HandlerUtil.callWithTarget(a,function(e){b.setContextMenu(e);var c=rwt.widgets.Menu.menuDetectedByKey;var d=rwt.widgets.Menu.menuDetectedByMouse;if(e==null){b.removeEventListener($[10],c);b.removeEventListener($[5],d)}else{b.addEventListener($[10],c);b.addEventListener($[5],d)}})},activeKeys:function(b,a){var c=rwt.util.Objects.fromArray(a);b.setUserData($[269],c)},cancelKeys:function(b,a){var c=rwt.util.Objects.fromArray(a);b.setUserData($[241],c)}},_controlListeners:["FocusIn","FocusOut","MouseDown","MouseUp",$[471],"KeyDown","Traverse","MenuDetect","Help",$[237],"Deactivate"],_controlListenerHandler:{KeyDown:function(b,a){b.setUserData($[465],a?true:null)},Traverse:function(b,a){b.setUserData($[485],a?true:null)},FocusIn:function(d,c){var a=rwt.remote.EventUtil;var b=rwt.remote.EventUtil.focusGained;if(c){d.addEventListener($[143],b,a)}else{d.removeEventListener($[143],b,a)}},FocusOut:function(c,b){var a=rwt.remote.EventUtil;var d=rwt.remote.EventUtil.focusLost;if(b){c.addEventListener($[120],d,a)}else{c.removeEventListener($[120],d,a)}},MouseDown:function(d,c){var b;var a=rwt.remote.EventUtil.mouseDown;if(c){d.addEventListener($[1],a,b)}else{d.removeEventListener($[1],a,b)}},MouseUp:function(d,c){var b;var a=rwt.remote.EventUtil.mouseUp;if(c){d.addEventListener($[5],a,b)}else{d.removeEventListener($[5],a,b)}},MouseDoubleClick:function(e,d){var c;var b=rwt.remote.EventUtil.mouseDoubleClick;var a=rwt.remote.EventUtil.mouseUpCounter;if(d){e.addEventListener($[1],b,c);e.addEventListener($[5],a,c)}else{e.removeEventListener($[1],b,c);e.removeEventListener($[5],a,c)}},MenuDetect:function(e,d){var c;var a=rwt.remote.EventUtil.menuDetectedByKey;var b=rwt.remote.EventUtil.menuDetectedByMouse;if(d){e.addEventListener($[10],a,c);e.addEventListener($[5],b,c)}else{e.removeEventListener($[10],a,c);e.removeEventListener($[5],b,c)}},Help:function(d,c){var b;var a=rwt.remote.EventUtil.helpRequested;if(c){d.addEventListener($[10],a,b)}else{d.removeEventListener($[10],a,b)}},Activate:function(b,a){b.setUserData($[498],a?true:null)},Deactivate:function(b,a){b.setUserData($[480],a?true:null)}},_specialHandler:{backgroundGradient:function(f,e){var g=null;if(e){var b=e[0];var a=e[1];var c=e[2];g=[];for(var d=0;d<b.length;d++){g[d]=[a[d]/100,rwt.util.Colors.rgbToRgbString(b[d])]}g.horizontal=!c}f.setBackgroundGradient(g)},roundedBorder:function(e,d){if(d){var c=d[0];var a=rwt.util.Colors.rgbToRgbString(d[1]);var f=d.slice(-4);var b=new rwt.html.Border(c,$[85],a,f);e.setBorder(b)}else{e.resetBorder()}}},getWidgetDestructor:function(){return this._widgetDestructor},getControlDestructor:function(){return this._controlDestructor},getDestroyableChildrenFinder:function(a){return this._childrenFinder},extendControlProperties:function(a){return a.concat(this._controlProperties)},extendControlPropertyHandler:function(a){return rwt.util.Objects.mergeWith(a,this._controlPropertyHandler,false)},extendControlListeners:function(a){return a.concat(this._controlListeners)},extendControlListenerHandler:function(a){return rwt.util.Objects.mergeWith(a,this._controlListenerHandler,false)},getBackgroundGradientHandler:function(){return this._specialHandler.backgroundGradient},getRoundedBorderHandler:function(){return this._specialHandler.roundedBorder},getControlPropertyHandler:function(a){return this._controlPropertyHandler[a]},getControlListenerHandler:function(a){return this._controlListenerHandler[a]},addStatesForStyles:function(a,c){for(var b=0;b<c.length;b++){a.addState("rwt_"+c[b])}a._renderAppearance();delete a._isInGlobalStateQueue},createStyleMap:function(c){var a={};for(var b=0;b<c.length;b++){a[c[b]]=true}return a},setParent:function(b,c){var a=this._setParentImplementation;this.callWithTarget(c,function(d){a(b,d)})},_setParentImplementation:function(b,a){if(a instanceof rwt.widgets.ScrolledComposite){b.setUserData($[544],a)}else{if(a instanceof rwt.widgets.TabFolder){b.setUserData("tabFolder",a)}else{if(a instanceof rwt.widgets.ExpandBar){a.addWidget(b)}else{b.setParent(a)}}}rwt.remote.HandlerUtil.addDestroyableChild(a,b);b.setUserData($[103],a)},callWithTarget:function(c,a){if(c==null){a(null)}else{var b=rwt.remote.ObjectRegistry.getObject(c);if(b){a(b)}else{rwt.remote.ObjectRegistry.addRegistrationCallback(c,a)}}},filterUnregisteredObjects:function(d){var b=rwt.remote.ObjectRegistry;var a=[];for(var c=0;c<d.length;c++){if(b.getId(d[c])){a.push(d[c])}}return a},getShell:function(b){var a=b;while(a&&!(a instanceof rwt.widgets.Shell)){a=a.getParent()}return a},addDestroyableChild:function(a,c){var b=a.getUserData($[249]);if(b==null){b={};a.setUserData($[249],b)}b[rwt.qx.Object.toHashCode(c)]=c},removeDestroyableChild:function(a,c){var b=a.getUserData($[249]);if(b!=null){delete b[rwt.qx.Object.toHashCode(c)]}},getDestroyableChildren:function(c){var d=c.getUserData($[249]);if(d==null){d={}}var a=[];for(var b in d){a.push(d[b])}return a}}; |
| namespace("rwt.util");rwt.util.Encoding={_escapeRegExp:/(&|<|>|\")/g,_escapeRegExpMnemonics:/(&&|&|<|>|")/g,_newlineRegExp:/(\r\n|\n|\r)/g,_outerWhitespaceRegExp:/(^ {1,1}| +$)/g,_outerWhitespaceRegExp2:/(^ {1,}| +$)/g,_whitespaceRegExp:/ {2,}/g,_escapeResolver:null,_escapeResolverMnemonics:null,_mnemonicFound:false,_escapeMap:{"<":"<",">":">",'"':""","&&":"&","&":"&"},escapeText:function(c,b){if(c===null){throw new Error("escapeText with parameter null not allowed")}var a;this._mnemonicFound=false;if(b){a=c.replace(this._escapeRegExpMnemonics,this._getEscapeResolverMnemonics())}else{a=c.replace(this._escapeRegExp,this._getEscapeResolver())}return this.truncateAtZero(a)},truncateAtZero:function(c){var a=c;var b=a.indexOf(String.fromCharCode(0));if(b!==-1){a=a.substring(0,b)}return a},replaceNewLines:function(c,a){var b=arguments.length>1?a:"\\n";return c.replace(this._newlineRegExp,b)},replaceWhiteSpaces:function(b){var a=b.replace(this._outerWhitespaceRegExp,this._outerWhitespaceResolver);a=a.replace(this._whitespaceRegExp,this._whitespaceResolver);return a},escapeLeadingTrailingSpaces:function(a){return a.replace(this._outerWhitespaceRegExp2,this._outerWhitespaceResolver)},escapeRegexpChars:function(a){return a.replace(/([\\\.\(\)\[\]\{\}\^\$\?\+\*])/g,"\\$1")},unescape:function(a){return this._unescapeEntities(a,rwt.html.Entity.TO_CHARCODE)},_getEscapeResolverMnemonics:function(){if(this._escapeResolverMnemonics===null){this._getEscapeResolver();var a=this;this._escapeResolverMnemonics=function(c){var b;if(c==="&"&&!a._mnemonicFound){b="";a._mnemonicFound=true}else{b=a._escapeResolver(c)}return b}}return this._escapeResolverMnemonics},_getEscapeResolver:function(){if(this._escapeResolver===null){var a=this;this._escapeResolver=function(b){return a._escapeMap[b]}}return this._escapeResolver},_outerWhitespaceResolver:function(a){return a.replace(/ /g," ")},_whitespaceResolver:function(a){return a.slice(1).replace(/ /g," ")+" "},_unescapeEntities:function(b,a){return b.replace(/&[#\w]+;/gi,function(c){var d=c;var c=c.substring(1,c.length-1);var e=a[c];if(e){d=String.fromCharCode(e)}else{if(c.charAt(0)==="#"){if(c.charAt(1).toUpperCase()==="X"){e=c.substring(2);if(e.match(/^[0-9A-Fa-f]+$/gi)){d=String.fromCharCode(parseInt(e,16))}}else{e=c.substring(1);if(e.match(/^\d+$/gi)){d=String.fromCharCode(parseInt(e,10))}}}}return d})}}; |
| namespace("rwt.widgets");rwt.widgets.Display=function(a){this._document=rwt.widgets.base.ClientDocument.getInstance();this._server=rwt.remote.Server.getInstance();this._exitConfirmation=null;this._initialized=false;if(rwt.widgets.Display._current!==undefined){throw new Error("Display can not be created twice")}else{rwt.widgets.Display._current=this}};rwt.widgets.Display.getCurrent=function(){return rwt.widgets.Display._current};rwt.widgets.Display._onAppearFocus=function(a){var b=this;b.focus();b.removeEventListener($[36],rwt.widgets.Display._onAppearFocus,b)};rwt.widgets.Display.prototype={applyObjectId:function(){if(!this._initialized){this.init()}},init:function(){this._server.getMessageWriter().appendHead("rwt_initialize",true);this._appendWindowSize();this._appendSystemDPI();this._appendColorDepth();this._appendInitialHistoryEvent();this._appendTimezoneOffset();this._attachListener();this._server.send();this._initialized=true},allowEvent:function(){rwt.remote.KeyEventSupport.getInstance().allowEvent()},cancelEvent:function(){rwt.remote.KeyEventSupport.getInstance().cancelEvent()},beep:function(){},setExitConfirmation:function(a){this._exitConfirmation=a},setFocusControl:function(a){var b=rwt.remote.ObjectRegistry.getObject(a);if(b.isSeeable()){b.focus()}else{b.addEventListener($[36],rwt.widgets.Display._onAppearFocus,b)}},setEnableUiTests:function(a){rwt.widgets.base.Widget._renderHtmlIds=a},getDPI:function(){var a=[0,0];if(typeof screen.systemXDPI==$[56]){a[0]=parseInt(screen.systemXDPI,10);a[1]=parseInt(screen.systemYDPI,10)}else{var b=document.createElement("div");b.style.width="1in";b.style.height="1in";b.style.padding=0;document.body.appendChild(b);a[0]=parseInt(b.offsetWidth,10);a[1]=parseInt(b.offsetHeight,10);document.body.removeChild(b)}return a},_attachListener:function(){this._document.addEventListener($[277],this._onResize,this);this._document.addEventListener($[4],this._onKeyPress,this);this._server.addEventListener("send",this._onSend,this);rwt.remote.KeyEventSupport.getInstance();rwt.runtime.System.getInstance().addEventListener($[275],this._onBeforeUnload,this);rwt.runtime.System.getInstance().addEventListener("unload",this._onUnload,this)},_onResize:function(a){this._appendWindowSize();if(this._server.getRequestCounter()!=null){this._server.send()}},_onKeyPress:function(a){if(a.getKeyIdentifier()==$[105]){a.preventDefault()}},_onSend:function(b){var d=rwt.event.MouseEvent.getPageX();var c=rwt.event.MouseEvent.getPageY();var a=[d,c];rwt.remote.Server.getInstance().getRemoteObject(this).set("cursorLocation",a)},_onBeforeUnload:function(a){if(this._exitConfirmation!==null&&this._exitConfirmation!==""){a.getDomEvent().returnValue=this._exitConfirmation;a.setUserData($[386],this._exitConfirmation)}},_onUnload:function(){this._document.removeEventListener($[277],this._onResize,this);this._document.removeEventListener($[4],this._onKeyPress,this);this._server.removeEventListener("send",this._onSend,this)},_appendWindowSize:function(){var b=rwt.html.Window.getInnerWidth(window);var a=rwt.html.Window.getInnerHeight(window);var c=[0,0,b,a];rwt.remote.Server.getInstance().getRemoteObject(this).set($[87],c)},_appendSystemDPI:function(){var a=this.getDPI();rwt.remote.Server.getInstance().getRemoteObject(this).set("dpi",a)},_appendColorDepth:function(){var a=16;if(typeof screen.colorDepth==$[56]){a=parseInt(screen.colorDepth,10)}if(rwt.client.Client.isGecko()){a=a==24?32:a}rwt.remote.Server.getInstance().getRemoteObject(this).set("colorDepth",a)},_appendInitialHistoryEvent:function(){var b=window.location.hash;if(b!==""){var d=rwt.remote.Server.getInstance();var c=rwt.client.BrowserNavigation.getInstance();var a=$[308];rwt.remote.ObjectRegistry.add(a,c,rwt.remote.HandlerRegistry.getHandler(a));d.getRemoteObject(c).notify($[336],{state:b.substr(1)})}},_appendTimezoneOffset:function(){var b=rwt.remote.ObjectRegistry.getObject($[402]);var a=rwt.remote.Server.getInstance().getRemoteObject(b);a.set("timezoneOffset",b.getTimezoneOffset())}}; |
| rwt.remote.HandlerRegistry.add("rwt.widgets.Display",{factory:function(a){return new rwt.widgets.Display(a)},destructor:null,properties:["exitConfirmation",$[451],"enableUiTests",$[269],$[241]],methods:["allowEvent","cancelEvent","beep"],propertyHandler:{activeKeys:function(a,b){var c=rwt.util.Objects.fromArray(b);rwt.remote.KeyEventSupport.getInstance().setKeyBindings(c)},cancelKeys:function(a,b){var c=rwt.util.Objects.fromArray(b);rwt.remote.KeyEventSupport.getInstance().setCancelKeys(c)}},listeners:["KeyDown"]}); |
| rwt.qx.Class.define($[129],{extend:rwt.qx.Target,type:"abstract",construct:function(){arguments.callee.base.call(this);this._layoutChanges={};this._outerFrame=[0,0];this.initHideFocus()},events:{beforeAppear:$[11],appear:$[11],beforeDisappear:$[11],disappear:$[11],insertDom:$[11],create:$[11],execute:$[11],flush:$[50],mouseover:$[83],mousemove:$[83],mouseout:$[83],mousedown:$[83],mouseup:$[83],mousewheel:$[83],click:$[83],dblclick:$[83],contextmenu:$[83],elementOver:$[83],elementOut:$[83],keydown:$[274],keypress:$[274],keyup:$[274],focusout:$[189],focusin:$[189],blur:$[189],focus:$[189],dragdrop:$[148],dragout:$[148],dragover:$[148],dragmove:$[148],dragstart:$[148],dragend:$[148]},statics:{_globalWidgetQueue:[],_globalElementQueue:[],_globalStateQueue:[],_globalJobQueue:[],_globalLayoutQueue:[],_fastGlobalDisplayQueue:[],_lazyGlobalDisplayQueues:{},_globalDisposeQueue:[],_autoFlushTimeout:null,_flushGlobalQueuesPhase:0,_renderHtmlIds:false,_FLUSH_PHASE_IDLE:0,_FLUSH_PHASE_WIDGET:1,_FLUSH_PHASE_STATE:2,_FLUSH_PHASE_ELEMENT:3,_FLUSH_PHASE_JOB:4,_FLUSH_PHASE_LAYOUT:5,_FLUSH_PHASE_DISPLAY:6,_FLUSH_PHASE_DISPOSE:7,_initAutoFlush:function(a){if(rwt.widgets.base.Widget._autoFlushTimeout==null){if(!rwt.widgets.base.Widget._inFlushGlobalQueues||a<rwt.widgets.base.Widget._flushGlobalQueuesPhase){rwt.widgets.base.Widget._autoFlushTimeout=window.setTimeout(rwt.widgets.base.Widget._autoFlushHelper,0)}}},_removeAutoFlush:function(){if(rwt.widgets.base.Widget._autoFlushTimeout!=null){window.clearTimeout(rwt.widgets.base.Widget._autoFlushTimeout);rwt.widgets.base.Widget._autoFlushTimeout=null}},_autoFlushHelper:function(){try{rwt.widgets.base.Widget._autoFlushTimeout=null;if(!rwt.qx.Object.inGlobalDispose()){rwt.widgets.base.Widget.flushGlobalQueues()}}catch(a){rwt.runtime.ErrorHandler.processJavaScriptError(a)}},flushGlobalQueues:function(){if(rwt.widgets.base.Widget._autoFlushTimeout!=null){rwt.widgets.base.Widget._removeAutoFlush()}if(rwt.widgets.base.Widget._inFlushGlobalQueues){return}if(!rwt.runtime.System.getInstance().getUiReady()){return}rwt.widgets.base.Widget._inFlushGlobalQueues=true;rwt.widgets.base.Widget.flushGlobalWidgetQueue();rwt.widgets.base.Widget.flushGlobalStateQueue();rwt.widgets.base.Widget.flushGlobalElementQueue();rwt.widgets.base.Widget.flushGlobalJobQueue();rwt.widgets.base.Widget.flushGlobalLayoutQueue();rwt.widgets.base.Widget.flushGlobalDisplayQueue();rwt.widgets.base.Widget.flushGlobalDisposeQueue();rwt.widgets.base.Widget._flushGlobalQueuesPhase=rwt.widgets.base.Widget._FLUSH_PHASE_IDLE;delete rwt.widgets.base.Widget._inFlushGlobalQueues},addToGlobalWidgetQueue:function(a){if(!a._isInGlobalWidgetQueue&&a._isDisplayable){if(rwt.widgets.base.Widget._autoFlushTimeout==null){rwt.widgets.base.Widget._initAutoFlush(rwt.widgets.base.Widget._FLUSH_PHASE_WIDGET)}rwt.widgets.base.Widget._globalWidgetQueue.push(a);a._isInGlobalWidgetQueue=true}},removeFromGlobalWidgetQueue:function(a){if(a._isInGlobalWidgetQueue){rwt.util.Arrays.remove(rwt.widgets.base.Widget._globalWidgetQueue,a);delete a._isInGlobalWidgetQueue}},flushGlobalWidgetQueue:function(){rwt.widgets.base.Widget._flushGlobalQueuesPhase=rwt.widgets.base.Widget._FLUSH_PHASE_WIDGET;var a=rwt.widgets.base.Widget._globalWidgetQueue,c,d;while((c=a.length)>0){for(var b=0;b<c;b++){d=a[b];d.flushWidgetQueue();delete d._isInGlobalWidgetQueue}a.splice(0,c)}rwt.widgets.base.Widget._globalWidgetQueue=[]},addToGlobalElementQueue:function(a){if(!a._isInGlobalElementQueue&&a._isDisplayable){if(rwt.widgets.base.Widget._autoFlushTimeout==null){rwt.widgets.base.Widget._initAutoFlush(rwt.widgets.base.Widget._FLUSH_PHASE_ELEMENT)}rwt.widgets.base.Widget._globalElementQueue.push(a);a._isInGlobalElementQueue=true}},removeFromGlobalElementQueue:function(a){if(a._isInGlobalElementQueue){rwt.util.Arrays.remove(rwt.widgets.base.Widget._globalElementQueue,a);delete a._isInGlobalElementQueue}},flushGlobalElementQueue:function(){rwt.widgets.base.Widget._flushGlobalQueuesPhase=rwt.widgets.base.Widget._FLUSH_PHASE_ELEMENT;var a=rwt.widgets.base.Widget._globalElementQueue,c,d;while((c=a.length)>0){for(var b=0;b<c;b++){d=a[b];d._createElementImpl();delete d._isInGlobalElementQueue}a.splice(0,c)}rwt.widgets.base.Widget._globalElementQueue=[]},addToGlobalStateQueue:function(a){if(!a._isInGlobalStateQueue&&a._isDisplayable){if(rwt.widgets.base.Widget._autoFlushTimeout==null){rwt.widgets.base.Widget._initAutoFlush(rwt.widgets.base.Widget._FLUSH_PHASE_STATE)}rwt.widgets.base.Widget._globalStateQueue.push(a);a._isInGlobalStateQueue=true}},removeFromGlobalStateQueue:function(a){if(a._isInGlobalStateQueue){rwt.util.Arrays.remove(rwt.widgets.base.Widget._globalStateQueue,a);delete a._isInGlobalStateQueue}},flushGlobalStateQueue:function(){rwt.widgets.base.Widget._flushGlobalQueuesPhase=rwt.widgets.base.Widget._FLUSH_PHASE_STATE;var d=rwt.widgets.base.Widget;while(d._globalStateQueue.length>0){var a=rwt.util.Arrays.copy(d._globalStateQueue);d._globalStateQueue=[];for(var c=0,b=a.length;c<b;c++){var e=a[c];if(e._isInGlobalStateQueue){e._renderAppearance();delete e._isInGlobalStateQueue}}}},addToGlobalJobQueue:function(a){if(!a._isInGlobalJobQueue&&a._isDisplayable){if(rwt.widgets.base.Widget._autoFlushTimeout==null){rwt.widgets.base.Widget._initAutoFlush(rwt.widgets.base.Widget._FLUSH_PHASE_JOB)}rwt.widgets.base.Widget._globalJobQueue.push(a);a._isInGlobalJobQueue=true}},removeFromGlobalJobQueue:function(a){if(a._isInGlobalJobQueue){rwt.util.Arrays.remove(rwt.widgets.base.Widget._globalJobQueue,a);delete a._isInGlobalJobQueue}},flushGlobalJobQueue:function(){rwt.widgets.base.Widget._flushGlobalQueuesPhase=rwt.widgets.base.Widget._FLUSH_PHASE_JOB;var a=rwt.widgets.base.Widget._globalJobQueue,c,d;while((c=a.length)>0){for(var b=0;b<c;b++){d=a[b];d._flushJobQueue(d._jobQueue);delete d._isInGlobalJobQueue}a.splice(0,c)}rwt.widgets.base.Widget._globalJobQueue=[]},addToGlobalLayoutQueue:function(a){if(!a._isInGlobalLayoutQueue&&a._isDisplayable){if(rwt.widgets.base.Widget._autoFlushTimeout==null){rwt.widgets.base.Widget._initAutoFlush(rwt.widgets.base.Widget._FLUSH_PHASE_LAYOUT)}rwt.widgets.base.Widget._globalLayoutQueue.push(a);a._isInGlobalLayoutQueue=true}},removeFromGlobalLayoutQueue:function(a){if(a._isInGlobalLayoutQueue){rwt.util.Arrays.remove(rwt.widgets.base.Widget._globalLayoutQueue,a);delete a._isInGlobalLayoutQueue}},flushGlobalLayoutQueue:function(){rwt.widgets.base.Widget._flushGlobalQueuesPhase=rwt.widgets.base.Widget._FLUSH_PHASE_LAYOUT;var a=rwt.widgets.base.Widget._globalLayoutQueue,d,c;while((d=a.length)>0){for(var b=0;b<d;b++){c=a[b];c._flushChildrenQueue();delete c._isInGlobalLayoutQueue}a.splice(0,d)}rwt.widgets.base.Widget._globalLayoutQueue=[]},addToGlobalDisplayQueue:function(b){if(!b._isInGlobalDisplayQueue&&b._isDisplayable){if(rwt.widgets.base.Widget._autoFlushTimeout==null){rwt.widgets.base.Widget._initAutoFlush(rwt.widgets.base.Widget._FLUSH_PHASE_DISPLAY)}var a=b.getParent();if(a.isSeeable()){var c=a.toHashCode();if(rwt.widgets.base.Widget._lazyGlobalDisplayQueues[c]){rwt.widgets.base.Widget._lazyGlobalDisplayQueues[c].push(b)}else{rwt.widgets.base.Widget._lazyGlobalDisplayQueues[c]=[b]}}else{rwt.widgets.base.Widget._fastGlobalDisplayQueue.push(b)}b._isInGlobalDisplayQueue=true}},removeFromGlobalDisplayQueue:function(a){},flushGlobalDisplayQueue:function(){rwt.widgets.base.Widget._flushGlobalQueuesPhase=rwt.widgets.base.Widget._FLUSH_PHASE_DISPLAY;var e,h,d,g;var f=rwt.widgets.base.Widget._fastGlobalDisplayQueue;var c=rwt.widgets.base.Widget._lazyGlobalDisplayQueues;for(var b=0,a=f.length;b<a;b++){d=f[b];d.getParent()._getTargetNode().appendChild(d.getElement())}for(e in c){h=c[e];if(document.createDocumentFragment&&h.length>=3){g=document.createDocumentFragment();for(var b=0,a=h.length;b<a;b++){d=h[b];g.appendChild(d.getElement())}h[0].getParent()._getTargetNode().appendChild(g);for(var b=0,a=h.length;b<a;b++){d=h[b];d._afterInsertDom()}}else{for(var b=0,a=h.length;b<a;b++){d=h[b];d.getParent()._getTargetNode().appendChild(d.getElement());d._afterInsertDom()}}}for(e in c){h=c[e];for(var b=0,a=h.length;b<a;b++){d=h[b];if(d.getVisibility()){d._afterAppear()}delete d._isInGlobalDisplayQueue}delete c[e]}if(rwt.util.Objects.isEmpty(c)){rwt.widgets.base.Widget._lazyGlobalDisplayQueues={}}for(var b=0,a=f.length;b<a;b++){delete f[b]._isInGlobalDisplayQueue}rwt.widgets.base.Widget._fastGlobalDisplayQueue=[]},addToGlobalDisposeQueue:function(a){if(!a._isInGlobalDisposeQueue&&!a.isDisposed()){if(rwt.widgets.base.Widget._autoFlushTimeout==null){rwt.widgets.base.Widget._initAutoFlush(rwt.widgets.base.Widget._FLUSH_PHASE_DISPOSE)}rwt.widgets.base.Widget._globalDisposeQueue.push(a);a._markInDispose()}},flushGlobalDisposeQueue:function(){rwt.widgets.base.Widget._flushGlobalQueuesPhase=rwt.widgets.base.Widget._FLUSH_PHASE_DISPOSE;var a=rwt.widgets.base.Widget._globalDisposeQueue,c,d;while((c=a.length)>0){for(var b=0;b<c;b++){d=a[b];d.dispose();delete d._isInGlobalDisposeQueue}a.splice(0,c)}rwt.widgets.base.Widget._globalDisposeQueue=[]},getActiveSiblingHelperIgnore:function(b,c){for(var a=0;a<b.length;a++){if(c instanceof b[a]){return true}}return false},getActiveSiblingHelper:function(c,d,b,a,h){if(!a){a=[]}var f=d.getChildren();var g=h==null?f.indexOf(c)+b:h==="first"?0:f.length-1;var e=f[g];while(e&&(!e.getEnabled()||rwt.widgets.base.Widget.getActiveSiblingHelperIgnore(a,e))){g+=b;e=f[g];if(!e){return null}}return e},TYPE_NULL:0,TYPE_PIXEL:1,TYPE_PERCENT:2,TYPE_AUTO:3,TYPE_FLEX:4,__initApplyMethods:function(d){var g="_renderRuntime";var k="_resetRuntime";var b="this._style.";var f="=((v==null)?0:v)+'px'";var m="v";var h=["left",$[14],"top",$[32],$[25],$[17],$[90],$[94],$[88],$[93]];var p=["Left",$[35],"Top","Bottom","Width","Height","MinWidth","MaxWidth","MinHeight","MaxHeight"];var n=g+"Margin";var j=k+"Margin";var l=b+"margin";for(var e=0;e<4;e++){d[n+p[e]]=new Function(m,l+p[e]+f);d[j+p[e]]=new Function(l+p[e]+"=''")}var o=g+"Padding";var a=k+"Padding";var c=b+$[127];for(var e=0;e<4;e++){d[o+p[e]]=new Function(m,"this.setStyleProperty('padding"+p[e]+"', ((v==null)?0:v)+'px')");d[a+p[e]]=new Function("this.removeStyleProperty('padding"+p[e]+"')")}for(var e=0;e<h.length;e++){d[g+p[e]]=new Function(m,b+h[e]+f);d[k+p[e]]=new Function(b+h[e]+"=''")}},layoutPropertyTypes:{},__initLayoutProperties:function(j){var e=[$[25],$[17],$[90],$[94],$[88],$[93],"left",$[14],"top",$[32]];for(var g=0,d=e.length,h,c,f;g<d;g++){h=e[g];c="_computed"+rwt.util.Strings.toFirstUp(h);f=c+"Type";j.layoutPropertyTypes[h]={dataType:f,dataParsed:c+"Parsed",dataValue:c+"Value",typePixel:f+"Pixel",typePercent:f+"Percent",typeAuto:f+"Auto",typeFlex:f+"Flex",typeNull:f+"Null"}}},disableScrolling:function(b){var a=b._getTargetNode();if(a){rwt.html.Scroll.disableScrolling(a)}else{b.addEventListener($[36],this._blockScrollingOnAppear,b)}},enableScrolling:function(b){var a=b._getTargetNode();if(a){rwt.html.Scroll.enableScrolling(a)}else{b.removeEventListener($[36],this._blockScrollingOnAppear,b)}},_blockScrollingOnAppear:function(){var a=rwt.widgets.base.Widget._blockScrollingOnAppear;this.removeEventListener($[36],a,this);rwt.widgets.base.Widget.disableScrolling(this)}},properties:{enabled:{init:$[165],check:$[2],inheritable:true,apply:$[533],event:$[179]},parent:{check:$[393],nullable:true,event:$[181],apply:"_applyParent"},element:{check:"Element",nullable:true,apply:"_applyElement",event:$[323]},visibility:{check:$[2],init:true,apply:$[467],event:$[169]},display:{check:$[2],init:true,apply:"_applyDisplay",event:"changeDisplay"},anonymous:{check:$[2],init:false,event:"changeAnonymous"},horizontalAlign:{check:["left",$[24],$[14]],themeable:true,nullable:true},verticalAlign:{check:["top",$[44],$[32]],themeable:true,nullable:true},allowStretchX:{check:$[2],init:true},allowStretchY:{check:$[2],init:true},zIndex:{check:$[54],apply:"_applyZIndex",event:"changeZIndex",themeable:true,nullable:true,init:null},backgroundColor:{nullable:true,init:null,check:"Color",apply:$[526],event:$[168],themeable:true},backgroundGradient:{check:"Array",nullable:true,init:null,apply:$[348],event:$[326],themeable:true},shadow:{check:"Array",nullable:true,init:null,apply:"_applyShadow",event:"changeShadow",themeable:true},textShadow:{check:"Array",nullable:true,init:null,apply:"_applyTextShadow",event:"changeTextShadow",themeable:true},textColor:{nullable:true,init:$[165],check:"Color",apply:"_applyTextColor",event:$[297],themeable:true,inheritable:true},border:{nullable:true,init:null,apply:"_applyBorder",event:"changeBorder",check:"Border",themeable:true},font:{nullable:true,init:$[165],apply:"_applyFont",check:"Font",event:$[101],themeable:true,inheritable:true},opacity:{check:$[54],apply:$[341],themeable:true,nullable:true,init:null},cursor:{check:$[46],apply:"_applyCursor",themeable:true,nullable:true,init:null},backgroundImage:{check:$[46],nullable:true,apply:"_applyBackgroundImage",themeable:true},backgroundRepeat:{check:$[46],nullable:true,apply:"_applyBackgroundRepeat",themeable:true},overflow:{check:[$[9],"auto",$[21],$[96],$[89]],nullable:true,apply:"_applyOverflow",event:"changeOverflow",themeable:true,init:null},containerOverflow:{check:$[2],nullable:false,apply:"_applyContainerOverflow",themeable:true,init:true},clipLeft:{check:$[18],apply:$[245],themeable:true,nullable:true},clipTop:{check:$[18],apply:$[245],themeable:true,nullable:true},clipWidth:{check:$[18],apply:$[245],themeable:true,nullable:true},clipHeight:{check:$[18],apply:$[245],themeable:true,nullable:true},tabIndex:{check:$[18],nullable:true,init:null,apply:"_applyTabIndex",event:"changeTabIndex"},hideFocus:{check:$[2],init:true,apply:"_applyHideFocus",themeable:true},enableElementFocus:{check:$[2],init:true},focused:{check:$[2],init:false,apply:"_applyFocused",event:$[280]},selectable:{check:$[2],init:null,nullable:true,apply:"_applySelectable"},toolTip:{check:$[272],nullable:true,event:"changeToolTip"},contextMenu:{nullable:true,event:"changeContextMenu"},capture:{check:$[2],init:false,apply:"_applyCapture",event:"changeCapture"},dropDataTypes:{nullable:true,dispose:true},command:{check:"qx.client.Command",nullable:true,apply:"_applyCommand"},appearance:{check:$[46],init:"widget",apply:"_applyAppearance",event:"changeAppearance"},supportsDropMethod:{check:"Function",nullable:true,init:null},marginTop:{check:$[54],apply:"_applyMarginTop",nullable:true,themeable:true},marginRight:{check:$[54],apply:"_applyMarginRight",nullable:true,themeable:true},marginBottom:{check:$[54],apply:"_applyMarginBottom",nullable:true,themeable:true},marginLeft:{check:$[54],apply:"_applyMarginLeft",nullable:true,themeable:true},paddingTop:{check:$[54],apply:"_applyPaddingTop",nullable:true,themeable:true},paddingRight:{check:$[54],apply:"_applyPaddingRight",nullable:true,themeable:true},paddingBottom:{check:$[54],apply:"_applyPaddingBottom",nullable:true,themeable:true},paddingLeft:{check:$[54],apply:"_applyPaddingLeft",nullable:true,themeable:true},left:{apply:"_applyLeft",event:$[278],nullable:true,themeable:true,init:null},right:{apply:"_applyRight",event:"changeRight",nullable:true,themeable:true,init:null},width:{apply:"_applyWidth",event:$[71],nullable:true,themeable:true,init:null},minWidth:{apply:"_applyMinWidth",event:"changeMinWidth",nullable:true,themeable:true,init:null},maxWidth:{apply:"_applyMaxWidth",event:"changeMaxWidth",nullable:true,themeable:true,init:null},top:{apply:"_applyTop",event:"changeTop",nullable:true,themeable:true,init:null},bottom:{apply:"_applyBottom",event:"changeBottom",nullable:true,themeable:true,init:null},height:{apply:$[473],event:$[76],nullable:true,themeable:true,init:null},minHeight:{apply:"_applyMinHeight",event:"changeMinHeight",nullable:true,themeable:true,init:null},maxHeight:{apply:"_applyMaxHeight",event:"changeMaxHeight",nullable:true,themeable:true,init:null},location:{group:["left","top"],themeable:true},dimension:{group:[$[25],$[17]],themeable:true},space:{group:["left",$[25],"top",$[17]],themeable:true},edge:{group:["top",$[14],$[32],"left"],themeable:true,mode:$[219]},padding:{group:[$[149],$[188],$[174],$[160]],mode:$[219],themeable:true},margin:{group:[$[158],$[215],$[195],$[142]],mode:$[219],themeable:true},heights:{group:[$[88],$[17],$[93]],themeable:true},widths:{group:[$[90],$[25],$[94]],themeable:true},align:{group:["horizontalAlign","verticalAlign"],themeable:true},clipLocation:{group:["clipLeft","clipTop"]},clipDimension:{group:["clipWidth","clipHeight"]},clip:{group:["clipLeft","clipTop","clipWidth","clipHeight"]},innerWidth:{_cached:true,defaultValue:null},innerHeight:{_cached:true,defaultValue:null},boxWidth:{_cached:true,defaultValue:null},boxHeight:{_cached:true,defaultValue:null},outerWidth:{_cached:true,defaultValue:null},outerHeight:{_cached:true,defaultValue:null},frameWidth:{_cached:true,defaultValue:null,addToQueueRuntime:true},frameHeight:{_cached:true,defaultValue:null,addToQueueRuntime:true},preferredInnerWidth:{_cached:true,defaultValue:null,addToQueueRuntime:true},preferredInnerHeight:{_cached:true,defaultValue:null,addToQueueRuntime:true},preferredBoxWidth:{_cached:true,defaultValue:null},preferredBoxHeight:{_cached:true,defaultValue:null},hasPercentX:{_cached:true,defaultValue:false},hasPercentY:{_cached:true,defaultValue:false},hasAutoX:{_cached:true,defaultValue:false},hasAutoY:{_cached:true,defaultValue:false},hasFlexX:{_cached:true,defaultValue:false},hasFlexY:{_cached:true,defaultValue:false}},members:{_computedLeftValue:null,_computedLeftParsed:null,_computedLeftType:null,_computedLeftTypeNull:true,_computedLeftTypePixel:false,_computedLeftTypePercent:false,_computedLeftTypeAuto:false,_computedLeftTypeFlex:false,_computedRightValue:null,_computedRightParsed:null,_computedRightType:null,_computedRightTypeNull:true,_computedRightTypePixel:false,_computedRightTypePercent:false,_computedRightTypeAuto:false,_computedRightTypeFlex:false,_computedTopValue:null,_computedTopParsed:null,_computedTopType:null,_computedTopTypeNull:true,_computedTopTypePixel:false,_computedTopTypePercent:false,_computedTopTypeAuto:false,_computedTopTypeFlex:false,_computedBottomValue:null,_computedBottomParsed:null,_computedBottomType:null,_computedBottomTypeNull:true,_computedBottomTypePixel:false,_computedBottomTypePercent:false,_computedBottomTypeAuto:false,_computedBottomTypeFlex:false,_computedWidthValue:null,_computedWidthParsed:null,_computedWidthType:null,_computedWidthTypeNull:true,_computedWidthTypePixel:false,_computedWidthTypePercent:false,_computedWidthTypeAuto:false,_computedWidthTypeFlex:false,_computedMinWidthValue:null,_computedMinWidthParsed:null,_computedMinWidthType:null,_computedMinWidthTypeNull:true,_computedMinWidthTypePixel:false,_computedMinWidthTypePercent:false,_computedMinWidthTypeAuto:false,_computedMinWidthTypeFlex:false,_computedMaxWidthValue:null,_computedMaxWidthParsed:null,_computedMaxWidthType:null,_computedMaxWidthTypeNull:true,_computedMaxWidthTypePixel:false,_computedMaxWidthTypePercent:false,_computedMaxWidthTypeAuto:false,_computedMaxWidthTypeFlex:false,_computedHeightValue:null,_computedHeightParsed:null,_computedHeightType:null,_computedHeightTypeNull:true,_computedHeightTypePixel:false,_computedHeightTypePercent:false,_computedHeightTypeAuto:false,_computedHeightTypeFlex:false,_computedMinHeightValue:null,_computedMinHeightParsed:null,_computedMinHeightType:null,_computedMinHeightTypeNull:true,_computedMinHeightTypePixel:false,_computedMinHeightTypePercent:false,_computedMinHeightTypeAuto:false,_computedMinHeightTypeFlex:false,_computedMaxHeightValue:null,_computedMaxHeightParsed:null,_computedMaxHeightType:null,_computedMaxHeightTypeNull:true,_computedMaxHeightTypePixel:false,_computedMaxHeightTypePercent:false,_computedMaxHeightTypeAuto:false,_computedMaxHeightTypeFlex:false,_customVariant:null,_applyLeft:function(b,a){this._unitDetectionPixelPercent("left",b);this.addToQueue("left")},_applyRight:function(b,a){this._unitDetectionPixelPercent($[14],b);this.addToQueue($[14])},_applyTop:function(b,a){this._unitDetectionPixelPercent("top",b);this.addToQueue("top")},_applyBottom:function(b,a){this._unitDetectionPixelPercent($[32],b);this.addToQueue($[32])},_applyWidth:function(b,a){this._unitDetectionPixelPercentAutoFlex($[25],b);this.addToQueue($[25])},_applyMinWidth:function(b,a){this._unitDetectionPixelPercentAuto($[90],b);this.addToQueue($[90])},_applyMaxWidth:function(b,a){this._unitDetectionPixelPercentAuto($[94],b);this.addToQueue($[94])},_applyHeight:function(b,a){this._unitDetectionPixelPercentAutoFlex($[17],b);this.addToQueue($[17])},_applyMinHeight:function(b,a){this._unitDetectionPixelPercentAuto($[88],b);this.addToQueue($[88])},_applyMaxHeight:function(b,a){this._unitDetectionPixelPercentAuto($[93],b);this.addToQueue($[93])},getChildren:rwt.util.Functions.returnNull,getChildrenLength:rwt.util.Functions.returnZero,hasChildren:rwt.util.Functions.returnFalse,isEmpty:rwt.util.Functions.returnTrue,indexOf:rwt.util.Functions.returnNegativeIndex,contains:rwt.util.Functions.returnFalse,getVisibleChildren:rwt.util.Functions.returnNull,getVisibleChildrenLength:rwt.util.Functions.returnZero,hasVisibleChildren:rwt.util.Functions.returnFalse,isVisibleEmpty:rwt.util.Functions.returnTrue,_hasParent:false,_isDisplayable:false,isDisplayable:function(){return this._isDisplayable},_checkParent:function(b,a){if(this.contains(b)){throw new Error("Could not insert myself into a child "+b+"!")}return b},_applyParent:function(c,a){if(a){var b=a.getChildren().indexOf(this);this._computedWidthValue=null;this._computedMinWidthValue=null;this._computedMaxWidthValue=null;this._computedLeftValue=null;this._computedRightValue=null;this._computedHeightValue=null;this._computedMinHeightValue=null;this._computedMaxHeightValue=null;this._computedTopValue=null;this._computedBottomValue=null;this._cachedBoxWidth=null;this._cachedInnerWidth=null;this._cachedOuterWidth=null;this._cachedBoxHeight=null;this._cachedInnerHeight=null;this._cachedOuterHeight=null;rwt.util.Arrays.removeAt(a.getChildren(),b);a._invalidateVisibleChildren();a._removeChildFromChildrenQueue(this);a.getLayoutImpl().updateChildrenOnRemoveChild(this,b);a.addToJobQueue($[382]);a._invalidatePreferredInnerDimensions();this._oldParent=a}if(c){this._hasParent=true;if(typeof this._insertIndex==$[56]){rwt.util.Arrays.insertAt(c.getChildren(),this,this._insertIndex);delete this._insertIndex}else{c.getChildren().push(this)}}else{this._hasParent=false}rwt.qx.Property.refresh(this);return this._handleDisplayable("parent")},_applyDisplay:function(b,a){return this._handleDisplayable($[163])},_handleDisplayable:function(g){var f=this._computeDisplayable();if(this._isDisplayable==f&&!(f&&g=="parent")){return true}this._isDisplayable=f;var e=this.getParent();if(e){e._invalidateVisibleChildren();e._invalidatePreferredInnerDimensions()}if(g&&this._oldParent&&this._oldParent._initialLayoutDone){var d=this.getElement();if(d){if(this.getVisibility()){this._beforeDisappear()}try{this._oldParent._getTargetNode().removeChild(d)}catch(c){}this._afterRemoveDom();if(this.getVisibility()){this._afterDisappear()}}delete this._oldParent}if(f){if(e._initialLayoutDone){var b=e.getChildren().indexOf(this);e.getLayoutImpl().updateChildrenOnAddChild(this,b);e.addToJobQueue("addChild")}this.addToLayoutChanges("initial");this.addToCustomQueues(g);if(this.getVisibility()){this._beforeAppear()}if(!this._isCreated){rwt.widgets.base.Widget.addToGlobalElementQueue(this)}rwt.widgets.base.Widget.addToGlobalStateQueue(this);if(!rwt.util.Objects.isEmpty(this._jobQueue)){rwt.widgets.base.Widget.addToGlobalJobQueue(this)}if(!rwt.util.Objects.isEmpty(this._childrenQueue)){rwt.widgets.base.Widget.addToGlobalLayoutQueue(this)}}else{rwt.widgets.base.Widget.removeFromGlobalElementQueue(this);rwt.widgets.base.Widget.removeFromGlobalStateQueue(this);rwt.widgets.base.Widget.removeFromGlobalJobQueue(this);rwt.widgets.base.Widget.removeFromGlobalLayoutQueue(this);this.removeFromCustomQueues(g);if(e&&g){if(this.getVisibility()){this._beforeDisappear()}if(e._initialLayoutDone&&this._initialLayoutDone){var b=e.getChildren().indexOf(this);e.getLayoutImpl().updateChildrenOnRemoveChild(this,b);e.addToJobQueue($[382]);var a=rwt.client.Client.isMshtml()?this.getElement().parentElement:this.getElement().parentNode;if(a){a.removeChild(this.getElement());this._afterRemoveDom()}}e._removeChildFromChildrenQueue(this);if(this.getVisibility()){this._afterDisappear()}}}this._handleDisplayableCustom(f,e,g);return true},addToCustomQueues:rwt.util.Functions.returnTrue,removeFromCustomQueues:rwt.util.Functions.returnTrue,_handleDisplayableCustom:rwt.util.Functions.returnTrue,_computeDisplayable:function(){return this.getDisplay()&&this.getParent()&&this.getParent()._isDisplayable?true:false},_beforeAppear:function(){this.dispatchSimpleEvent("beforeAppear")},_afterAppear:function(){this._isSeeable=true;this.dispatchSimpleEvent($[36])},_ieFixLayoutOnAppear:rwt.util.Variant.select($[0],{mshtml:function(){var b=this._style.width;var a=this._style.height;this._style.width="0px";this._style.height="0px";this._style.width=b;this._style.height=a;if(this._innerStyle){b=this._innerStyle.width;a=this._innerStyle.height;this._innerStyle.width="0px";this._innerStyle.height="0px";this._innerStyle.width=b;this._innerStyle.height=a}},"default":rwt.util.Functions.returnTrue}),_beforeDisappear:function(){this.removeState("over");if(rwt.qx.Class.isDefined($[292])){this.removeState($[12]);this.removeState($[29])}this.dispatchSimpleEvent("beforeDisappear")},_afterDisappear:function(){this._isSeeable=false;this.dispatchSimpleEvent($[359])},_isSeeable:false,_isInDom:false,isSeeable:function(){return this._isSeeable},isInDom:function(){return this._isInDom},isAppearRelevant:function(){return this.getVisibility()&&this._isDisplayable},_afterInsertDom:function(){this._isInDom=true;this.dispatchSimpleEvent($[141])},_afterRemoveDom:function(){this._isInDom=false},_applyVisibility:function(b,a){if(b){if(this._isDisplayable&&(this._isCreated||this._isInGlobalElementQueue)){this._beforeAppear()}this.removeStyleProperty($[163]);if(this._isDisplayable&&this._isCreated){this._afterAppear();this._ieFixLayoutOnAppear()}}else{if(this._isDisplayable&&this._isCreated){this._beforeDisappear()}this.setStyleProperty($[163],"none");if(this._isDisplayable&&this._isCreated){this._afterDisappear()}}},show:function(){this.setVisibility(true);this.setDisplay(true)},hide:function(){this.setVisibility(false)},destroy:function(){if(this.getParent()===null||!this.getParent()._isInGlobalDisposeQueue){if(this.dispatchSimpleEvent($[216])){this.setParent(null);rwt.widgets.base.Widget.addToGlobalDisposeQueue(this)}}},_markInDispose:function(){this._isInGlobalDisposeQueue=true},_isCreated:false,_element:null,_targetNode:null,_style:null,_innerStyle:null,_getTargetNode:function(){return this._targetNode||this._element},addToDocument:function(){rwt.widgets.base.ClientDocument.getInstance().add(this)},isCreated:function(){return this._isCreated},_createElementImpl:function(){this.setElement(this.getTopLevelWidget().getDocumentElement().createElement("div"))},_applyElement:function(b,a){this._isCreated=b!=null;if(a){a.rwtWidget=null}if(b){b.rwtWidget=this;b.style.position=$[16];this._element=b;this._style=b.style;if(this._targetNodeEnabled){this.prepareEnhancedBorder(true)}this.initBackgroundColor();this._applyStyleProperties(b);this._applyHtmlProperties(b);this._applyHtmlAttributes(b);this._applyElementData(b);this.dispatchSimpleEvent($[65]);this.addToStateQueue()}else{this._element=this._style=null}},addToJobQueue:function(a){if(this._hasParent){rwt.widgets.base.Widget.addToGlobalJobQueue(this)}if(!this._jobQueue){this._jobQueue={}}this._jobQueue[a]=true;return true},_flushJobQueue:function(e){var k=this._jobQueue;var p=this.getParent();if(!p||rwt.util.Objects.isEmpty(k)){return}var n=this instanceof rwt.widgets.base.Parent?this.getLayoutImpl():null;if(n){n.updateSelfOnJobQueueFlush(k)}var b=false;var g=k.marginLeft||k.marginRight;var h=k.marginTop||k.marginBottom;var c=k.frameWidth;var l=k.frameHeight;var f=(k.frameWidth||k.preferredInnerWidth)&&this._recomputePreferredBoxWidth();var o=(k.frameHeight||k.preferredInnerHeight)&&this._recomputePreferredBoxHeight();if(f){var d=this.getPreferredBoxWidth();if(this._computedWidthTypeAuto){this._computedWidthValue=d;k.width=true}if(this._computedMinWidthTypeAuto){this._computedMinWidthValue=d;k.minWidth=true}if(this._computedMaxWidthTypeAuto){this._computedMaxWidthValue=d;k.maxWidth=true}}if(o){var d=this.getPreferredBoxHeight();if(this._computedHeightTypeAuto){this._computedHeightValue=d;k.height=true}if(this._computedMinHeightTypeAuto){this._computedMinHeightValue=d;k.minHeight=true}if(this._computedMaxHeightTypeAuto){this._computedMaxHeightValue=d;k.maxHeight=true}}if((k.width||k.minWidth||k.maxWidth||k.left||k.right)&&this._recomputeBoxWidth()){g=c=true}if((k.height||k.minHeight||k.maxHeight||k.top||k.bottom)&&this._recomputeBoxHeight()){h=l=true}if((g&&this._recomputeOuterWidth())||f){p._invalidatePreferredInnerWidth();p.getLayoutImpl().updateSelfOnChildOuterWidthChange(this);b=true}if((h&&this._recomputeOuterHeight())||o){p._invalidatePreferredInnerHeight();p.getLayoutImpl().updateSelfOnChildOuterHeightChange(this);b=true}if(b){p._flushJobQueue()}p._addChildToChildrenQueue(this);for(var j in k){this._layoutChanges[j]=true}if(this instanceof rwt.widgets.base.Parent&&(k.paddingLeft||k.paddingRight||k.paddingTop||k.paddingBottom)){var a=this.getChildren(),m=a.length;if(k.paddingLeft){for(var j=0;j<m;j++){a[j].addToLayoutChanges("parentPaddingLeft")}}if(k.paddingRight){for(var j=0;j<m;j++){a[j].addToLayoutChanges("parentPaddingRight")}}if(k.paddingTop){for(var j=0;j<m;j++){a[j].addToLayoutChanges("parentPaddingTop")}}if(k.paddingBottom){for(var j=0;j<m;j++){a[j].addToLayoutChanges("parentPaddingBottom")}}}if(c){this._recomputeInnerWidth()}if(l){this._recomputeInnerHeight()}if(this._initialLayoutDone){if(n){n.updateChildrenOnJobQueueFlush(k)}}delete this._jobQueue},_isWidthEssential:rwt.util.Functions.returnTrue,_isHeightEssential:rwt.util.Functions.returnTrue,_computeBoxWidthFallback:function(){return 0},_computeBoxHeightFallback:function(){return 0},_computeBoxWidth:function(){var a=this.getParent().getLayoutImpl();return Math.max(0,rwt.util.Numbers.limit(a.computeChildBoxWidth(this),this.getMinWidthValue(),this.getMaxWidthValue()))},_computeBoxHeight:function(){var a=this.getParent().getLayoutImpl();return Math.max(0,rwt.util.Numbers.limit(a.computeChildBoxHeight(this),this.getMinHeightValue(),this.getMaxHeightValue()))},_computeOuterWidth:function(){return Math.max(0,(this.getMarginLeft()+this.getBoxWidth()+this.getMarginRight()))},_computeOuterHeight:function(){return Math.max(0,(this.getMarginTop()+this.getBoxHeight()+this.getMarginBottom()))},_computeInnerWidth:function(){return Math.max(0,this.getBoxWidth()-this.getFrameWidth())},_computeInnerHeight:function(){return Math.max(0,this.getBoxHeight()-this.getFrameHeight())},getNeededWidth:function(){var a=this.getParent().getLayoutImpl();return Math.max(0,a.computeChildNeededWidth(this))},getNeededHeight:function(){var a=this.getParent().getLayoutImpl();return Math.max(0,a.computeChildNeededHeight(this))},_recomputeFlexX:function(){if(!this.getHasFlexX()){return false}if(this._computedWidthTypeFlex){this._computedWidthValue=null;this.addToLayoutChanges($[25])}return true},_recomputeFlexY:function(){if(!this.getHasFlexY()){return false}if(this._computedHeightTypeFlex){this._computedHeightValue=null;this.addToLayoutChanges($[17])}return true},_recomputePercentX:function(){if(!this.getHasPercentX()){return false}if(this._computedWidthTypePercent){this._computedWidthValue=null;this.addToLayoutChanges($[25])}if(this._computedMinWidthTypePercent){this._computedMinWidthValue=null;this.addToLayoutChanges($[90])}if(this._computedMaxWidthTypePercent){this._computedMaxWidthValue=null;this.addToLayoutChanges($[94])}if(this._computedLeftTypePercent){this._computedLeftValue=null;this.addToLayoutChanges("left")}if(this._computedRightTypePercent){this._computedRightValue=null;this.addToLayoutChanges($[14])}return true},_recomputePercentY:function(){if(!this.getHasPercentY()){return false}if(this._computedHeightTypePercent){this._computedHeightValue=null;this.addToLayoutChanges($[17])}if(this._computedMinHeightTypePercent){this._computedMinHeightValue=null;this.addToLayoutChanges($[88])}if(this._computedMaxHeightTypePercent){this._computedMaxHeightValue=null;this.addToLayoutChanges($[93])}if(this._computedTopTypePercent){this._computedTopValue=null;this.addToLayoutChanges("top")}if(this._computedBottomTypePercent){this._computedBottomValue=null;this.addToLayoutChanges($[32])}return true},_recomputeRangeX:rwt.util.Variant.select($[0],{"mshtml|newmshtml|opera|webkit":function(){if(this._computedLeftTypeNull||this._computedRightTypeNull){return false}this.addToLayoutChanges($[25]);return true},"default":function(){return !(this._computedLeftTypeNull||this._computedRightTypeNull)}}),_recomputeRangeY:rwt.util.Variant.select($[0],{"mshtml|newmshtml|opera|webkit":function(){if(this._computedTopTypeNull||this._computedBottomTypeNull){return false}this.addToLayoutChanges($[17]);return true},"default":function(){return !(this._computedTopTypeNull||this._computedBottomTypeNull)}}),_recomputeStretchingX:rwt.util.Variant.select($[0],{"mshtml|newmshtml|opera|webkit":function(){if(this.getAllowStretchX()&&this._computedWidthTypeNull){this._computedWidthValue=null;this.addToLayoutChanges($[25]);return true}return false},"default":function(){if(this.getAllowStretchX()&&this._computedWidthTypeNull){return true}return false}}),_recomputeStretchingY:rwt.util.Variant.select($[0],{"mshtml|newmshtml|opera|webkit":function(){if(this.getAllowStretchY()&&this._computedHeightTypeNull){this._computedHeightValue=null;this.addToLayoutChanges($[17]);return true}return false},"default":function(){if(this.getAllowStretchY()&&this._computedHeightTypeNull){return true}return false}}),_computeValuePixel:function(a){return Math.round(a)},_computeValuePixelLimit:function(a){return Math.max(0,this._computeValuePixel(a))},_computeValuePercentX:function(a){return Math.round(this.getParent().getInnerWidthForChild(this)*a*0.01)},_computeValuePercentXLimit:function(a){return Math.max(0,this._computeValuePercentX(a))},_computeValuePercentY:function(a){return Math.round(this.getParent().getInnerHeightForChild(this)*a*0.01)},_computeValuePercentYLimit:function(a){return Math.max(0,this._computeValuePercentY(a))},getWidthValue:function(){if(this._computedWidthValue!=null){return this._computedWidthValue}switch(this._computedWidthType){case rwt.widgets.base.Widget.TYPE_PIXEL:return this._computedWidthValue=this._computeValuePixelLimit(this._computedWidthParsed);case rwt.widgets.base.Widget.TYPE_PERCENT:return this._computedWidthValue=this._computeValuePercentXLimit(this._computedWidthParsed);case rwt.widgets.base.Widget.TYPE_AUTO:return this._computedWidthValue=this.getPreferredBoxWidth();case rwt.widgets.base.Widget.TYPE_FLEX:if(this.getParent().getLayoutImpl().computeChildrenFlexWidth===undefined){throw new Error("Widget "+this+": having horizontal flex size (width="+this.getWidth()+$[411]+this.getParent()+$[463])}this.getParent().getLayoutImpl().computeChildrenFlexWidth();return this._computedWidthValue=this._computedWidthFlexValue}return null},getMinWidthValue:function(){if(this._computedMinWidthValue!=null){return this._computedMinWidthValue}switch(this._computedMinWidthType){case rwt.widgets.base.Widget.TYPE_PIXEL:return this._computedWidthValue=this._computeValuePixelLimit(this._computedMinWidthParsed);case rwt.widgets.base.Widget.TYPE_PERCENT:return this._computedWidthValue=this._computeValuePercentXLimit(this._computedMinWidthParsed);case rwt.widgets.base.Widget.TYPE_AUTO:return this._computedMinWidthValue=this.getPreferredBoxWidth()}return null},getMaxWidthValue:function(){if(this._computedMaxWidthValue!=null){return this._computedMaxWidthValue}switch(this._computedMaxWidthType){case rwt.widgets.base.Widget.TYPE_PIXEL:return this._computedWidthValue=this._computeValuePixelLimit(this._computedMaxWidthParsed);case rwt.widgets.base.Widget.TYPE_PERCENT:return this._computedWidthValue=this._computeValuePercentXLimit(this._computedMaxWidthParsed);case rwt.widgets.base.Widget.TYPE_AUTO:return this._computedMaxWidthValue=this.getPreferredBoxWidth()}return null},getLeftValue:function(){if(this._computedLeftValue!=null){return this._computedLeftValue}switch(this._computedLeftType){case rwt.widgets.base.Widget.TYPE_PIXEL:return this._computedLeftValue=this._computeValuePixel(this._computedLeftParsed);case rwt.widgets.base.Widget.TYPE_PERCENT:return this._computedLeftValue=this._computeValuePercentX(this._computedLeftParsed)}return null},getRightValue:function(){if(this._computedRightValue!=null){return this._computedRightValue}switch(this._computedRightType){case rwt.widgets.base.Widget.TYPE_PIXEL:return this._computedRightValue=this._computeValuePixel(this._computedRightParsed);case rwt.widgets.base.Widget.TYPE_PERCENT:return this._computedRightValue=this._computeValuePercentX(this._computedRightParsed)}return null},getHeightValue:function(){if(this._computedHeightValue!=null){return this._computedHeightValue}switch(this._computedHeightType){case rwt.widgets.base.Widget.TYPE_PIXEL:return this._computedHeightValue=this._computeValuePixelLimit(this._computedHeightParsed);case rwt.widgets.base.Widget.TYPE_PERCENT:return this._computedHeightValue=this._computeValuePercentYLimit(this._computedHeightParsed);case rwt.widgets.base.Widget.TYPE_AUTO:return this._computedHeightValue=this.getPreferredBoxHeight();case rwt.widgets.base.Widget.TYPE_FLEX:if(this.getParent().getLayoutImpl().computeChildrenFlexHeight===undefined){throw new Error("Widget "+this+": having vertical flex size (height="+this.getHeight()+$[411]+this.getParent()+$[463])}this.getParent().getLayoutImpl().computeChildrenFlexHeight();return this._computedHeightValue=this._computedHeightFlexValue}return null},getMinHeightValue:function(){if(this._computedMinHeightValue!=null){return this._computedMinHeightValue}switch(this._computedMinHeightType){case rwt.widgets.base.Widget.TYPE_PIXEL:return this._computedMinHeightValue=this._computeValuePixelLimit(this._computedMinHeightParsed);case rwt.widgets.base.Widget.TYPE_PERCENT:return this._computedMinHeightValue=this._computeValuePercentYLimit(this._computedMinHeightParsed);case rwt.widgets.base.Widget.TYPE_AUTO:return this._computedMinHeightValue=this.getPreferredBoxHeight()}return null},getMaxHeightValue:function(){if(this._computedMaxHeightValue!=null){return this._computedMaxHeightValue}switch(this._computedMaxHeightType){case rwt.widgets.base.Widget.TYPE_PIXEL:return this._computedMaxHeightValue=this._computeValuePixelLimit(this._computedMaxHeightParsed);case rwt.widgets.base.Widget.TYPE_PERCENT:return this._computedMaxHeightValue=this._computeValuePercentYLimit(this._computedMaxHeightParsed);case rwt.widgets.base.Widget.TYPE_AUTO:return this._computedMaxHeightValue=this.getPreferredBoxHeight()}return null},getTopValue:function(){if(this._computedTopValue!=null){return this._computedTopValue}switch(this._computedTopType){case rwt.widgets.base.Widget.TYPE_PIXEL:return this._computedTopValue=this._computeValuePixel(this._computedTopParsed);case rwt.widgets.base.Widget.TYPE_PERCENT:return this._computedTopValue=this._computeValuePercentY(this._computedTopParsed)}return null},getBottomValue:function(){if(this._computedBottomValue!=null){return this._computedBottomValue}switch(this._computedBottomType){case rwt.widgets.base.Widget.TYPE_PIXEL:return this._computedBottomValue=this._computeValuePixel(this._computedBottomParsed);case rwt.widgets.base.Widget.TYPE_PERCENT:return this._computedBottomValue=this._computeValuePercentY(this._computedBottomParsed)}return null},_computeFrameWidth:function(){var a=this._cachedBorderLeft+this.getPaddingLeft()+this.getPaddingRight()+this._cachedBorderRight;return a},_computeFrameHeight:function(){var a=this._cachedBorderTop+this.getPaddingTop()+this.getPaddingBottom()+this._cachedBorderBottom;return a},_invalidateFrameDimensions:function(){this._invalidateFrameWidth();this._invalidateFrameHeight()},_invalidatePreferredInnerDimensions:function(){this._invalidatePreferredInnerWidth();this._invalidatePreferredInnerHeight()},_computePreferredBoxWidth:function(){return Math.max(0,this.getPreferredInnerWidth()+this.getFrameWidth())},_computePreferredBoxHeight:function(){return Math.max(0,this.getPreferredInnerHeight()+this.getFrameHeight())},_initialLayoutDone:false,addToLayoutChanges:function(a){if(this._isDisplayable){this.getParent()._addChildToChildrenQueue(this)}return this._layoutChanges[a]=true},addToQueue:function(a){if(this._initialLayoutDone){this.addToJobQueue(a)}else{this.addToLayoutChanges(a)}},addToQueueRuntime:function(a){return !this._initialLayoutDone||this.addToJobQueue(a)},_computeHasPercentX:function(){return(this._computedLeftTypePercent||this._computedWidthTypePercent||this._computedMinWidthTypePercent||this._computedMaxWidthTypePercent||this._computedRightTypePercent)},_computeHasPercentY:function(){return(this._computedTopTypePercent||this._computedHeightTypePercent||this._computedMinHeightTypePercent||this._computedMaxHeightTypePercent||this._computedBottomTypePercent)},_computeHasAutoX:function(){return(this._computedWidthTypeAuto||this._computedMinWidthTypeAuto||this._computedMaxWidthTypeAuto)},_computeHasAutoY:function(){return(this._computedHeightTypeAuto||this._computedMinHeightTypeAuto||this._computedMaxHeightTypeAuto)},_computeHasFlexX:function(){return this._computedWidthTypeFlex},_computeHasFlexY:function(){return this._computedHeightTypeFlex},_evalUnitsPixelPercentAutoFlex:function(a){switch(a){case"auto":return rwt.widgets.base.Widget.TYPE_AUTO;case Infinity:case -Infinity:return rwt.widgets.base.Widget.TYPE_NULL}switch(typeof a){case $[56]:return isNaN(a)?rwt.widgets.base.Widget.TYPE_NULL:rwt.widgets.base.Widget.TYPE_PIXEL;case $[7]:return a.indexOf("%")!=-1?rwt.widgets.base.Widget.TYPE_PERCENT:a.indexOf("*")!=-1?rwt.widgets.base.Widget.TYPE_FLEX:rwt.widgets.base.Widget.TYPE_NULL}return rwt.widgets.base.Widget.TYPE_NULL},_evalUnitsPixelPercentAuto:function(a){switch(a){case"auto":return rwt.widgets.base.Widget.TYPE_AUTO;case Infinity:case -Infinity:return rwt.widgets.base.Widget.TYPE_NULL}switch(typeof a){case $[56]:return isNaN(a)?rwt.widgets.base.Widget.TYPE_NULL:rwt.widgets.base.Widget.TYPE_PIXEL;case $[7]:return a.indexOf("%")!=-1?rwt.widgets.base.Widget.TYPE_PERCENT:rwt.widgets.base.Widget.TYPE_NULL}return rwt.widgets.base.Widget.TYPE_NULL},_evalUnitsPixelPercent:function(a){switch(a){case Infinity:case -Infinity:return rwt.widgets.base.Widget.TYPE_NULL}switch(typeof a){case $[56]:return isNaN(a)?rwt.widgets.base.Widget.TYPE_NULL:rwt.widgets.base.Widget.TYPE_PIXEL;case $[7]:return a.indexOf("%")!=-1?rwt.widgets.base.Widget.TYPE_PERCENT:rwt.widgets.base.Widget.TYPE_NULL}return rwt.widgets.base.Widget.TYPE_NULL},_unitDetectionPixelPercentAutoFlex:function(b,j){var a=rwt.widgets.base.Widget.layoutPropertyTypes[b];var n=a.dataType;var c=a.dataParsed;var m=a.dataValue;var l=a.typePixel;var k=a.typePercent;var i=a.typeAuto;var h=a.typeFlex;var g=a.typeNull;var e=this[k];var f=this[i];var d=this[h];this[n]=this._evalUnitsPixelPercentAutoFlex(j);switch(this[n]){case rwt.widgets.base.Widget.TYPE_PIXEL:this[l]=true;this[k]=this[i]=this[h]=this[g]=false;this[c]=this[m]=Math.round(j);break;case rwt.widgets.base.Widget.TYPE_PERCENT:this[k]=true;this[l]=this[i]=this[h]=this[g]=false;this[c]=parseFloat(j);this[m]=null;break;case rwt.widgets.base.Widget.TYPE_AUTO:this[i]=true;this[l]=this[k]=this[h]=this[g]=false;this[c]=this[m]=null;break;case rwt.widgets.base.Widget.TYPE_FLEX:this[h]=true;this[l]=this[k]=this[i]=this[g]=false;this[c]=parseFloat(j);this[m]=null;break;default:this[g]=true;this[l]=this[k]=this[i]=this[h]=false;this[c]=this[m]=null;break}if(e!=this[k]){switch(b){case $[90]:case $[94]:case $[25]:case"left":case $[14]:this._invalidateHasPercentX();break;case $[93]:case $[88]:case $[17]:case"top":case $[32]:this._invalidateHasPercentY();break}}if(f!=this[i]){switch(b){case $[90]:case $[94]:case $[25]:this._invalidateHasAutoX();break;case $[88]:case $[93]:case $[17]:this._invalidateHasAutoY();break}}if(d!=this[h]){switch(b){case $[25]:this._invalidateHasFlexX();break;case $[17]:this._invalidateHasFlexY();break}}},_unitDetectionPixelPercentAuto:function(b,h){var a=rwt.widgets.base.Widget.layoutPropertyTypes[b];var l=a.dataType;var c=a.dataParsed;var k=a.dataValue;var j=a.typePixel;var i=a.typePercent;var g=a.typeAuto;var f=a.typeNull;var d=this[i];var e=this[g];this[l]=this._evalUnitsPixelPercentAuto(h);switch(this[l]){case rwt.widgets.base.Widget.TYPE_PIXEL:this[j]=true;this[i]=this[g]=this[f]=false;this[c]=this[k]=Math.round(h);break;case rwt.widgets.base.Widget.TYPE_PERCENT:this[i]=true;this[j]=this[g]=this[f]=false;this[c]=parseFloat(h);this[k]=null;break;case rwt.widgets.base.Widget.TYPE_AUTO:this[g]=true;this[j]=this[i]=this[f]=false;this[c]=this[k]=null;break;default:this[f]=true;this[j]=this[i]=this[g]=false;this[c]=this[k]=null;break}if(d!=this[i]){switch(b){case $[90]:case $[94]:case $[25]:case"left":case $[14]:this._invalidateHasPercentX();break;case $[88]:case $[93]:case $[17]:case"top":case $[32]:this._invalidateHasPercentY();break}}if(e!=this[g]){switch(b){case $[90]:case $[94]:case $[25]:this._invalidateHasAutoX();break;case $[88]:case $[93]:case $[17]:this._invalidateHasAutoY();break}}},_unitDetectionPixelPercent:function(b,f){var a=rwt.widgets.base.Widget.layoutPropertyTypes[b];var j=a.dataType;var c=a.dataParsed;var i=a.dataValue;var h=a.typePixel;var g=a.typePercent;var e=a.typeNull;var d=this[g];this[j]=this._evalUnitsPixelPercent(f);switch(this[j]){case rwt.widgets.base.Widget.TYPE_PIXEL:this[h]=true;this[g]=this[e]=false;this[c]=this[i]=Math.round(f);break;case rwt.widgets.base.Widget.TYPE_PERCENT:this[g]=true;this[h]=this[e]=false;this[c]=parseFloat(f);this[i]=null;break;default:this[e]=true;this[h]=this[g]=false;this[c]=this[i]=null;break}if(d!=this[g]){switch(b){case $[90]:case $[94]:case $[25]:case"left":case $[14]:this._invalidateHasPercentX();break;case $[88]:case $[93]:case $[17]:case"top":case $[32]:this._invalidateHasPercentY();break}}},getTopLevelWidget:function(){return this._hasParent?this.getParent().getTopLevelWidget():null},moveSelfToBegin:function(){this.getParent().addAtBegin(this)},moveSelfToEnd:function(){this.getParent().addAtEnd(this)},getPreviousSibling:function(){var b=this.getParent();if(b==null){return null}var a=b.getChildren();return a[a.indexOf(this)-1]},getNextSibling:function(){var b=this.getParent();if(b==null){return null}var a=b.getChildren();return a[a.indexOf(this)+1]},getPreviousVisibleSibling:function(){if(!this._hasParent){return null}var a=this.getParent().getVisibleChildren();return a[a.indexOf(this)-1]},getNextVisibleSibling:function(){if(!this._hasParent){return null}var a=this.getParent().getVisibleChildren();return a[a.indexOf(this)+1]},getPreviousActiveSibling:function(a){var b=rwt.widgets.base.Widget.getActiveSiblingHelper(this,this.getParent(),-1,a,null);return b?b:this.getParent().getLastActiveChild()},getNextActiveSibling:function(a){var b=rwt.widgets.base.Widget.getActiveSiblingHelper(this,this.getParent(),1,a,null);return b?b:this.getParent().getFirstActiveChild()},isFirstChild:function(){return this._hasParent&&this.getParent().getFirstChild()==this},isLastChild:function(){return this._hasParent&&this.getParent().getLastChild()==this},isFirstVisibleChild:function(){return this._hasParent&&this.getParent().getFirstVisibleChild()==this},isLastVisibleChild:function(){return this._hasParent&&this.getParent().getLastVisibleChild()==this},setCustomVariant:function(a){if(this._customVariant!==null){this.removeState(this._customVariant)}this._customVariant=a;if(this._customVariant!==null){this.addState(this._customVariant)}},hasState:function(a){return this.__states&&this.__states[a]?true:false},addState:function(a){if(!this.__states){this.__states={}}if(!this.__states[a]){this.__states[a]=true;if(this._hasParent){rwt.widgets.base.Widget.addToGlobalStateQueue(this)}}},removeState:function(a){if(this.__states&&this.__states[a]){delete this.__states[a];if(this._hasParent){rwt.widgets.base.Widget.addToGlobalStateQueue(this)}}},_styleFromMap:function(c){this._prepareStyleMap(c);var b=rwt.qx.Property.$$method.style;var d=rwt.qx.Property.$$method.unstyle;var a;for(var e in c){a=c[e];if(a===$[8]){this[d[e]]()}else{this[b[e]](a)}}},_unstyleFromArray:function(c){var d=rwt.qx.Property.$$method.unstyle;for(var b=0,a=c.length;b<a;b++){this[d[c[b]]]()}},_prepareStyleMap:rwt.util.Variant.select($[0],{mshtml:function(c){if(c.shadow&&c.border&&c.border.getStyle()!==$[85]){var b=c.border.getWidthTop();var a=c.border.getColorTop();var d=[0,0,0,0];c.border=new rwt.html.Border(b,$[85],a,d)}},"default":function(a){return a}}),_renderAppearance:function(){if(!this.__states){this.__states={}}this._applyStateStyleFocus(this.__states);var b=this.getAppearance();if(b){var a=rwt.theme.AppearanceManager.getInstance().styleFrom(b,this.__states);if(a){this._styleFromMap(a)}}},_resetAppearanceThemeWrapper:function(a,e){var f=this.getAppearance();if(f){var c=rwt.theme.AppearanceManager.getInstance();var d=c.styleFromTheme(e,f,this.__states);var b=c.styleFromTheme(a,f,this.__states);var g=[];for(var h in d){if(b[h]===undefined){g.push(h)}}this._unstyleFromArray(g);this._styleFromMap(b)}},_applyStateStyleFocus:rwt.util.Variant.select($[0],{mshtml:function(a){},"default":function(a){if(a.focused){if(!rwt.widgets.util.FocusHandler.mouseFocus&&!this.getHideFocus()){this.setStyleProperty($[203],"1px dotted")}}else{this.setStyleProperty($[203],"none")}}}),addToStateQueue:function(){rwt.widgets.base.Widget.addToGlobalStateQueue(this)},recursiveAddToStateQueue:function(){this.addToStateQueue()},_applyAppearance:function(e,a){if(!this.__states){this.__states={}}var c=rwt.theme.AppearanceManager.getInstance();if(e){var b=c.styleFrom(e,this.__states)||{}}if(a){var d=c.styleFrom(a,this.__states)||{};var f=[];for(var g in d){if(!b||!(g in b)){f.push(g)}}}if(f){this._unstyleFromArray(f)}if(b){this._styleFromMap(b)}},_recursiveAppearanceThemeUpdate:function(a,b){this._resetAppearanceThemeWrapper(a,b)},_applyElementData:function(a){},setHtmlProperty:function(b,a){if(!this._htmlProperties){this._htmlProperties={}}this._htmlProperties[b]=a;if(this._isCreated&&this.getElement()[b]!=a){this.getElement()[b]=a}return true},removeHtmlProperty:rwt.util.Variant.select($[0],{mshtml:function(a){if(!this._htmlProperties){return}delete this._htmlProperties[a];if(this._isCreated){this.getElement().removeAttribute(a)}return true},"default":function(a){if(!this._htmlProperties){return}delete this._htmlProperties[a];if(this._isCreated){this.getElement().removeAttribute(a);delete this.getElement()[a]}return true}}),getHtmlProperty:function(a){if(!this._htmlProperties){return""}return this._htmlProperties[a]||""},_applyHtmlProperties:function(a){var c=this._htmlProperties;if(c){var b;for(b in c){a[b]=c[b]}}},setHtmlAttribute:function(b,a){if(!this._htmlAttributes){this._htmlAttributes={}}this._htmlAttributes[b]=a;if(this._isCreated){this.getElement().setAttribute(b,a)}return true},removeHtmlAttribute:function(a){if(!this._htmlAttributes){return}delete this._htmlAttributes[a];if(this._isCreated){this.getElement().removeAttribute(a)}return true},getHtmlAttribute:function(a){if(!this._htmlAttributes){return""}return this._htmlAttributes[a]||""},_applyHtmlAttributes:function(b){var a=this._htmlAttributes;if(a){var c;for(c in a){b.setAttribute(c,a[c])}}},getStyleProperty:function(a){if(!this._styleProperties){return""}return this._styleProperties[a]||""},__outerElementStyleProperties:{cursor:true,zIndex:true,filter:true,display:true,visibility:true,outline:true,boxShadow:true,opacity:true,MozOpacity:true},setStyleProperty:function(c,b){if(!this._styleProperties){this._styleProperties={}}this._styleProperties[c]=b;if(this._isCreated){var a=this.__outerElementStyleProperties[c]?this.getElement():this._getTargetNode();if(a){a.style[c]=(b==null)?"":b}}},removeStyleProperty:function(b){if(!this._styleProperties){return}delete this._styleProperties[b];if(this._isCreated){var a=this.__outerElementStyleProperties[b]?this.getElement():this._getTargetNode();if(a){a.style[b]=""}}},_applyStyleProperties:function(b){var e=this._styleProperties;if(!e){return}var d;var f=b;var a=this._getTargetNode();var b;var c;for(d in e){b=this.__outerElementStyleProperties[d]?f:a;c=e[d];b.style[d]=(c==null)?"":c}},_applyEnabled:function(b,a){if(b===false){this.addState("disabled");this.removeState("over");if(rwt.qx.Class.isDefined($[292])){this.removeState($[29]);this.removeState($[12])}if(this.getFocused()){this.setFocused(false)}}else{this.removeState("disabled")}},isFocusable:function(){return this.getEnabled()&&this.isSeeable()&&this.getTabIndex()!=null},isFocusRoot:function(){return false},getFocusRoot:function(){if(this._hasParent){return this.getParent().getFocusRoot()}return null},getActiveChild:function(){var a=this.getFocusRoot();if(a){return a.getActiveChild()}return null},_ontabfocus:rwt.util.Functions.returnTrue,_applyFocused:function(c,b){if(!this.isCreated()){return}var a=this.getFocusRoot();if(a){if(c){a.setFocusedChild(this);this._visualizeFocus()}else{if(a.getFocusedChild()==this){a.setFocusedChild(null)}this._visualizeBlur()}}},_applyHideFocus:rwt.util.Variant.select($[0],{mshtml:function(b,a){this.setHtmlProperty("hideFocus",b)},"default":rwt.util.Functions.returnTrue}),_visualizeBlur:function(){if(this.getEnableElementFocus()&&(!this.getFocusRoot().getFocusedChild()||(this.getFocusRoot().getFocusedChild()&&this.getFocusRoot().getFocusedChild().getEnableElementFocus()))){try{this.getElement().blur()}catch(a){}}this.removeState($[75])},_visualizeFocus:function(){var a=rwt.widgets.util.FocusHandler;if(!a.mouseFocus&&!a.blockFocus&&this.getEnableElementFocus()){try{this.getElement().focus()}catch(b){}}this.addState($[75])},focus:function(){delete rwt.widgets.util.FocusHandler.mouseFocus;this.setFocused(true)},blur:function(){delete rwt.widgets.util.FocusHandler.mouseFocus;this.setFocused(false)},_applyCapture:function(c,b){var a=rwt.event.EventHandler;if(b){a.setCaptureWidget(null)}if(c){a.setCaptureWidget(this)}},_applyZIndex:function(b,a){if(b==null){this.removeStyleProperty("zIndex")}else{this.setStyleProperty("zIndex",b)}},_applyTabIndex:rwt.util.Variant.select($[0],{mshtml:function(b,a){this.setHtmlProperty($[355],b<0?-1:1)},"default":function(b,a){this.setStyleProperty("userFocus",(b<0?"ignore":$[52]));this.setHtmlProperty($[355],b<0?-1:1)}}),_applySelectable:rwt.util.Variant.select($[0],{mshtml:function(b,a){},gecko:function(b,a){if(b){this.removeStyleProperty($[425])}else{this.setStyleProperty($[425],"none")}},webkit:function(b,a){if(b){this.removeStyleProperty($[521]);this.removeStyleProperty($[442])}else{this.setStyleProperty($[521],"none");this.setStyleProperty($[442],"none")}},"default":function(b,a){if(b){return this.removeStyleProperty("userSelect")}else{this.setStyleProperty("userSelect","none")}}}),_applyOpacity:function(b,a){rwt.html.Style.setOpacity(this,b)},__cursorMap:rwt.util.Variant.select($[0],{mshtml:{"default":$[62],wait:"wait",crosshair:$[306],help:"help",move:"move",text:"text",pointer:$[150],"e-resize":$[173],"n-resize":$[166],"w-resize":$[313],"s-resize":$[286],"ne-resize":$[207],"se-resize":$[358],"nw-resize":$[206],"sw-resize":$[329],"col-resize":$[339],"row-resize":"row-resize",progress:$[242],"not-allowed":$[324],"no-drop":"no-drop",cursor:"hand","ew-resize":$[173],"ns-resize":$[166],"nesw-resize":$[207],"nwse-resize":$[206]},opera:{"default":$[62],wait:"wait",crosshair:$[306],help:"help",move:"move",text:"text",pointer:$[150],"e-resize":$[173],"n-resize":$[166],"w-resize":$[313],"s-resize":$[286],"ne-resize":$[207],"se-resize":$[358],"nw-resize":$[206],"sw-resize":$[329],progress:$[242],"not-allowed":$[324],"no-drop":"no-drop","col-resize":$[173],"row-resize":$[166],"ew-resize":$[173],"ns-resize":$[166],"nesw-resize":$[207],"nwse-resize":$[206]},"default":{"default":$[62],wait:"wait",crosshair:$[306],help:"help",move:"move",text:"text",pointer:$[150],"e-resize":$[173],"n-resize":$[166],"w-resize":$[313],"s-resize":$[286],"ne-resize":$[207],"se-resize":$[358],"nw-resize":$[206],"sw-resize":$[329],"col-resize":$[339],"row-resize":"row-resize",progress:$[242],"not-allowed":$[324],"no-drop":"no-drop"}}),_applyCursor:function(c,a){if(c){var b="url( "+c+" ), default";this.setStyleProperty($[133],this.__cursorMap[c]||b)}else{this.removeStyleProperty($[133])}},_applyCommand:function(b,a){},_applyBackgroundImage:function(c,a){var b=rwt.html.ImageManager.getInstance();if(a){b.hide(a)}if(c){b.show(c)}this._styleBackgroundImage(c)},_styleBackgroundImage:function(a){if(a){this.setStyleProperty($[81],"url("+a+")")}else{this.removeStyleProperty($[81])}},_applyBackgroundRepeat:function(b,a){if(b){this.setStyleProperty($[253],b)}else{this.removeStyleProperty($[253])}},_applyClip:function(b,a){return this._compileClipString()},_compileClipString:function(){var f=this.getClipLeft();var b=this.getClipTop();var e=this.getClipWidth();var a=this.getClipHeight();var d,c;if(f==null){d=(e==null?"auto":e+"px");f="auto"}else{d=(e==null?"auto":f+e+"px");f=f+"px"}if(b==null){c=(a==null?"auto":a+"px");b="auto"}else{c=(a==null?"auto":b+a+"px");b=b+"px"}return this.setStyleProperty("clip",("rect("+b+","+d+","+c+","+f+")"))},_applyOverflow:rwt.util.Variant.select($[0],{"default":function(g,c){var f=g;var d=$[58];switch(g){case $[96]:d=$[102];f=$[21];break;case $[89]:d=$[98];f=$[21];break}var b=[$[58],$[102],$[98]];for(var e=0;e<b.length;e++){if(b[e]!=d){this.removeStyleProperty(b[e])}}switch(g){case $[96]:this.setStyleProperty($[98],$[9]);break;case $[89]:this.setStyleProperty($[102],$[9]);break}this._renderOverflow(d,f,g,c);this.addToQueue($[58])},gecko:function(d,a){var c=d;var b=$[58];switch(c){case $[9]:c=$[316];break;case $[96]:c=$[443];break;case $[89]:c=$[519];break}this._renderOverflow(b,c,d,a);this.addToQueue($[58])},opera:function(g,c){var f=g;var d=$[58];if(rwt.client.Client.getVersion()<9.8){switch(f){case $[96]:case $[89]:f=$[21];break}}else{switch(f){case $[96]:d=$[102];f=$[21];break;case $[89]:d=$[98];f=$[21];break}var b=[$[58],$[102],$[98]];for(var e=0;e<b.length;e++){if(b[e]!=d){this.removeStyleProperty(b[e])}}switch(g){case $[96]:this.setStyleProperty($[98],$[9]);break;case $[89]:this.setStyleProperty($[102],$[9]);break}}this._renderOverflow(d,f,g,c);this.addToQueue($[58])}}),_renderOverflow:function(b,c,d,a){this.setStyleProperty(b,c||"");this._invalidateFrameWidth();this._invalidateFrameHeight()},getOverflowX:function(){var a=this.getOverflow();return a==$[89]?$[9]:a},getOverflowY:function(){var a=this.getOverflow();return a==$[96]?$[9]:a},_applyContainerOverflow:function(b,a){if(this._innerStyle){this._style.overflow=b?"":$[9]}},_applyBackgroundColor:function(b,a){this._styleBackgroundColor(b)},_applyBackgroundGradient:function(b,a){rwt.html.Style.setBackgroundGradient(this,b);if(b===null){this.setStyleProperty($[81],this.getStyleProperty($[81]));this.setStyleProperty($[51],this.getStyleProperty($[51]))}},_applyShadow:function(b,a){rwt.html.Style.setBoxShadow(this,b)},_applyTextShadow:function(b,a){rwt.html.Style.setTextShadow(this,b)},_styleBackgroundColor:function(a){if(a==null||a===$[80]){this._removeBackgroundColor()}else{this.setStyleProperty($[51],a)}},_removeBackgroundColor:rwt.util.Variant.select($[0],{"default":function(){this.removeStyleProperty($[51])},newmshtml:function(){this.setStyleProperty($[51],"rgba( 0, 0, 0, 0 )")}}),_applyTextColor:function(b,a){},_applyFont:function(b,a){},_cachedBorderTop:0,_cachedBorderRight:0,_cachedBorderBottom:0,_cachedBorderLeft:0,_targetNodeEnabled:false,_applyBorder:function(b,a){this._queueBorder(b);if(b&&b.getStyle()===$[85]){this._prepareGraphicsSupport()}},_prepareGraphicsSupport:(function(){var a;if(rwt.client.Client.supportsCss3()){a=rwt.util.Functions.returnTrue}else{a=function(){if(!this._targetNodeEnabled&&!this._isCreated){this._targetNodeEnabled=true}}}return a}()),_queueBorder:function(a){this.addToQueue($[132]);this.__reflowBorderX(a);this.__reflowBorderY(a);this.__borderObject=a},__reflowBorderX:function(b){var a=this._cachedBorderLeft;var c=this._cachedBorderRight;this._cachedBorderLeft=b?b.getWidthLeft():0;this._cachedBorderRight=b?b.getWidthRight():0;if((a+c)!=(this._cachedBorderLeft+this._cachedBorderRight)){this._invalidateFrameWidth()}},__reflowBorderY:function(c){var a=this._cachedBorderTop;var b=this._cachedBorderBottom;this._cachedBorderTop=c?c.getWidthTop():0;this._cachedBorderBottom=c?c.getWidthBottom():0;if((a+b)!=(this._cachedBorderTop+this._cachedBorderBottom)){this._invalidateFrameHeight()}},renderBorder:function(a){var b=this.__borderObject;if(b){b.renderWidget(this)}else{rwt.html.Border.resetWidget(this)}this._outerFrame=this._computeOuterFrame()},_computeOuterFrame:function(){var a=[0,0];if(this._innerStyle&&this.__borderObject){var b=this.__borderObject.getWidths();if(this.__borderObject.getStyle()===$[164]&&b[0]===2){a=[2,2]}else{a=[b[1]+b[3],b[0]+b[2]]}}return a},prepareEnhancedBorder:function(b){if(!this._innerStyle){this._targetNode=document.createElement("div");this._innerStyle=this._targetNode.style;this._targetNodeEnabled=true;if(rwt.client.Client.isMshtml()){this.addToQueue($[25]);this.addToQueue($[17])}else{this._innerStyle.width="100%";this._innerStyle.height="100%"}this._innerStyle.position=$[16];if(!b){for(var a in this._styleProperties){switch(a){case"zIndex":case $[95]:case $[53]:case $[223]:case $[163]:case $[133]:case $[332]:break;default:this._innerStyle[a]=this._styleProperties[a];this._style[a]=""}}}this._style.outline="none";this._applyContainerOverflow(this.getContainerOverflow());if(!b){for(var a in this._htmlProperties){switch(a){case $[448]:this._targetNode.unselectable=this._htmlProperties[a]}}}while(this._element.firstChild){this._targetNode.appendChild(this._element.firstChild)}this._element.appendChild(this._targetNode);if(this.isInDom()){this._afterRemoveDom();this._afterInsertDom()}}},_applyPaddingTop:function(b,a){this.addToQueue($[149]);this._invalidateFrameHeight()},_applyPaddingRight:function(b,a){this.addToQueue($[188]);this._invalidateFrameWidth()},_applyPaddingBottom:function(b,a){this.addToQueue($[174]);this._invalidateFrameHeight()},_applyPaddingLeft:function(b,a){this.addToQueue($[160]);this._invalidateFrameWidth()},renderPadding:function(a){},_applyMarginLeft:function(b,a){this.addToQueue($[142])},_applyMarginRight:function(b,a){this.addToQueue($[215])},_applyMarginTop:function(b,a){this.addToQueue($[158])},_applyMarginBottom:function(b,a){this.addToQueue($[195])},execute:function(){var a=this.getCommand();if(a){a.execute(this)}this.createDispatchEvent($[107])},_visualPropertyCheck:function(){if(!this.isCreated()){throw new Error(this.classname+": Element must be created previously!")}},setScrollLeft:function(a){this._visualPropertyCheck();this._getTargetNode().scrollLeft=a},setScrollTop:function(a){this._visualPropertyCheck();this._getTargetNode().scrollTop=a},getOffsetLeft:function(){this._visualPropertyCheck();return rwt.html.Offset.getLeft(this.getElement())},getOffsetTop:function(){this._visualPropertyCheck();return rwt.html.Offset.getTop(this.getElement())},getScrollLeft:function(){this._visualPropertyCheck();return this._getTargetNode().scrollLeft},getScrollTop:function(){this._visualPropertyCheck();return this._getTargetNode().scrollTop},getClientWidth:function(){this._visualPropertyCheck();return this._getTargetNode().clientWidth},getClientHeight:function(){this._visualPropertyCheck();return this._getTargetNode().clientHeight},getOffsetWidth:function(){this._visualPropertyCheck();return this.getElement().offsetWidth},getOffsetHeight:function(){this._visualPropertyCheck();return this.getElement().offsetHeight},getScrollWidth:function(){this._visualPropertyCheck();return this._getTargetNode().scrollWidth},getScrollHeight:function(){this._visualPropertyCheck();return this._getTargetNode().scrollHeight},scrollIntoView:function(a){this.scrollIntoViewX(a);this.scrollIntoViewY(a)},scrollIntoViewX:function(a){if(!this._isCreated||!this._isDisplayable){return false}return rwt.html.ScrollIntoView.scrollX(this.getElement(),a)},scrollIntoViewY:function(a){if(!this._isCreated||!this._isDisplayable){return false}return rwt.html.ScrollIntoView.scrollY(this.getElement(),a)},supportsDrop:function(a){var b=this.getSupportsDropMethod();if(b!==null){return b.call(this,a)}return(this!=a.sourceWidget)},getAdapter:function(c){if(this._adapters===undefined){this._adapters={}}var b=c.classname;var a=this._adapters[b];if(a==null){new c(this);a=this._adapters[b]}return a},applyObjectId:function(a){if(rwt.widgets.base.Widget._renderHtmlIds){this.setHtmlAttribute("id",a)}}},defer:function(b,a){b.__initApplyMethods(a);if(rwt.client.Client.isMshtml()){a._renderRuntimeWidth=function(d){this._style.pixelWidth=(d==null)?0:d;if(this._targetNodeEnabled){var c=(d!=null)?Math.max(0,d-this._outerFrame[0]):d;this._innerStyle.pixelWidth=c==null?0:c}};a._renderRuntimeHeight=function(d){this._style.pixelHeight=(d==null)?0:d;if(this._targetNodeEnabled){var c=(d!=null)?Math.max(0,d-this._outerFrame[1]):d;this._innerStyle.pixelHeight=c==null?0:c}};a._resetRuntimeWidth=function(){this._style.width="";if(this._targetNodeEnabled){this._innerStyle.width=""}};a._resetRuntimeHeight=function(){this._style.height="";if(this._targetNodeEnabled){this._innerStyle.height=""}}}b.__initLayoutProperties(b)},destruct:function(){this.dispatchSimpleEvent($[196],{target:this});var b=this.getElement();if(b){b.rwtWidget=null;try{if(b.parentNode){b.parentNode.removeChild(b)}}catch(a){}try{if(this._targetNode&&this._targetNode.parentNode){this._targetNode.parentNode.removeChild(this._targetNode)}}catch(a){}}this._disposeObjectDeep("_adapters",1);this._disposeFields("_isCreated","_inlineEvents","_element","_style","_targetNode","_innerStyle","_oldParent","_styleProperties","_htmlProperties","_htmlAttributes","__states","_jobQueue","_layoutChanges","__borderObject","_outerFrame")}}); |
| rwt.qx.Class.define("rwt.widgets.util.WidgetRenderAdapter",{extend:rwt.qx.Target,construct:function(b){this._autoDispose=false;arguments.callee.base.call(this);this._widget=b;var a=this.classname;if(b._adapters[a]!=null){throw new Error("Never create WidgetRenderAdapter directly!")}b._adapters[a]=this},destruct:function(){this._widget=null},events:{visibility:$[50],height:$[50],top:$[50],left:$[50],opacity:$[50],backgroundColor:$[50],backgroundGradient:$[50]},members:{addRenderListener:function(c,e,b){var a=this._renderFunctionNames[c];if(!this.hasEventListeners(c)){var d=this;this._widget[a]=function(){var f=d.dispatchSimpleEvent(c,arguments,false);if(f){this.constructor.prototype[a].apply(this,arguments)}}}this.addEventListener(c,e,b)},removeRenderListener:function(c,d,b){this.removeEventListener(c,d,b);if(!this.hasEventListeners(c)){var a=this._renderFunctionNames[c];delete this._widget[a]}},forceRender:function(a,b){this.getOriginalRenderer(a).call(this._widget,b)},getOriginalRenderer:function(b){var a=this._renderFunctionNames[b];var c=this._widget.constructor.prototype;return c[a]},_renderFunctionNames:{visibility:$[467],height:"_renderRuntimeHeight",top:"_renderRuntimeTop",left:"_renderRuntimeLeft",opacity:$[341],backgroundColor:"_styleBackgroundColor",backgroundGradient:$[348]}}}); |
| rwt.qx.Class.define("rwt.animation.AnimationRenderer",{extend:rwt.qx.Object,construct:function(a){this._autoDispose=false;arguments.callee.base.call(this);this._animation=a;this._animation._addRenderer(this);this._converterFunction=null;this._renderFunction=null;this._context=null;this._startValue=null;this._endValue=null;this._lastValue=null;this._setupFunction=null;this._cloneFrom=null;this._active=true;this._activeOnce=false;this._invisibilityGetter=rwt.util.Functions.returnZero;this._fullVisibilityValue=null;this._autoStartEnabled=true;this._renderType=null;this._renderAdapter=null;this._animationType=0;this._autoCheck=true},destruct:function(){this.clearAnimation();this._animation._removeRenderer(this);this._animation=null;this._startValue=null;this._endValue=null;this._invisibilityGetter=null;this._lastValue=null;this._setupFunction=null;this._converterFunction=null;this._renderFunction=null;this._context=null;this._cloneFrom=null},members:{setConverter:function(a){if(typeof a==$[7]){this._converterFunction=rwt.animation.AnimationRenderer.converter[a]}else{this._converterFunction=a}},setRenderFunction:function(b,a){if(this._renderType==null){this._renderFunction=b;this._context=a}},renderValue:function(a){this._renderFunction.call(this._context,a);this._lastValue=a},setStartValue:function(a){this._startValue=a},setEndValue:function(a){this._endValue=a},setSetupFunction:function(a){this._setupFunction=a},setCloneFrom:function(a){this._cloneFrom=a},getAnimation:function(){return this._animation},getContext:function(){return this._context},getStartValue:function(a){return this._startValue},getEndValue:function(a){return this._endValue},getLastValue:function(){return this._lastValue},setActive:function(a){if(this._active!==a){if(this._animation.isRunning()){throw'AnimationRenderer: Can not change "active" while running!'}this._active=a;if(this._renderType!==null){this._handleAnimationType()}}},isActive:function(){return this._active},activateOnce:function(){if(!this._activeOnce){this.setActive(true);this._activeOnce=true}},cancelActivateOnce:function(){if(this._activeOnce){this._activeOnce=false;this.setActive(false)}},_setup:function(a){if(this._active){if(this._context instanceof rwt.widgets.base.Widget&&this._context._isCreated!==true){if(this._context._isInGlobalElementQueue){rwt.widgets.base.Widget.flushGlobalQueues()}else{throw new Error("AnimationRenderer setup failed: Widget not ready.")}}if(this._setupFunction!=null){this._setupFunction.call(this._context,a,this)}this._startValue=this._prepareValue(this._startValue);this._endValue=this._prepareValue(this._endValue);if(this._renderFunction==null||this._converterFunction==null){throw new Error("renderFunction or converterFunction missing")}}},_render:function(b){if(this._active){var a=this._cloneFrom!=null?this._cloneFrom.getLastValue():b;try{var c=this._converterFunction(a,this._startValue,this._endValue);this.renderValue(c)}catch(d){throw"AnimationRenderer failed: "+(d.message?d.message:d)}}},_finish:function(a){if(this._active&&a==$[359]){this._updateWidgetVisibility();this._forceWidgetRenderer()}this.cancelActivateOnce()},_prepareValue:function(c){var a=c;switch(this._renderType){case $[51]:if(typeof c==$[7]){if(c==$[80]||c===""||c.slice(0,4)==="rgba"){a=null}else{a=rwt.util.Colors.cssStringToRgb(c)}}break;case $[126]:if(c){var a=[];for(var b=0;b<c.length;b++){a[b]=[c[b][0],rwt.util.Colors.cssStringToRgb(c[b][1])]}}break;case $[53]:a=(c==null||c>1||c<0)?1:c;break;default:a=c!=null?c:0;break}return a},animate:function(c,a,b){if(this._context!=c||this._renderType!=a||this._animationType!=b){this.clearAnimation();this._context=c;this._renderAdapter=c.getAdapter(rwt.widgets.util.WidgetRenderAdapter);this._renderType=a;this._animationType=b;this._renderFunction=this._renderAdapter.getOriginalRenderer(this._renderType);var d=rwt.animation.AnimationRenderer.converterByRenderType;this.setConverter(d[this._renderType]);this._handleAnimationType()}},clearAnimation:function(){if(this._renderType!==null){this._animationType=0;this._handleAnimationType();this._renderType=null;this.setRenderFunction(null,null);this._renderAdapter=null}},isAnimated:function(b){var a=false;if(this._animationType>0&&this._active){var c=b&this._animationType;if(typeof b===$[8]||c!==0){a=true}}return a},setInvisibilityGetter:function(a){this._invisibilityGetter=a},setAutoStart:function(a){this._autoStartEnabled=a},setAutoCheck:function(a){this._autoCheck=a},getValueFromWidget:function(){var a=null;switch(this._renderType){case $[53]:a=this._context.getOpacity();break;case $[17]:if(this._context.isCreated()&&this._context._style.height){a=parseInt(this._context._style.height,10)}else{a=this._context.getHeightValue();this._context._computedHeightValue=null;this._context._invalidatePreferredInnerHeight();this._context._invalidatePreferredBoxHeight()}break;case"top":if(this._context.isCreated()&&this._context._style.top){a=parseInt(this._context._style.top,10)}else{a=this._context.getTopValue()}break;case"left":if(this._context.isCreated()&&this._context._style.left){a=parseInt(this._context._style.left,10)}else{a=this._context.getLeftValue()}break;case $[51]:var c=$[51];var b=this._context;if(b.getGfxProperty&&b.getGfxProperty(c)){a=b.getGfxProperty(c)}else{if(b.getStyleProperty(c)){a=b.getStyleProperty(c)}else{a=null}}break;case $[126]:var b=this._context;a=b.getBackgroundGradient();break;default:throw"getValueFromWidget: "+this._renderType+" not supported!"}return a},checkValues:function(){var a;switch(this._renderType){case $[126]:case $[51]:a=this._startValue!=null&&this._endValue!=null;break;default:a=true;break}return a&&this._startValue!=this._endValue},_handleAnimationType:function(){if(this._animation.isRunning()){throw"AnimationRenderer: Can not change animation while running!"}if(this.isAnimated()){this._attachToApplyVisibility(true);this._attachToWidgetRenderer(true)}else{this._attachToApplyVisibility(false);this._attachToWidgetRenderer(false)}},_attachToApplyVisibility:function(a){if(a){this._renderAdapter.addRenderListener($[100],this._onVisibilityChange,this);this._context.addEventListener($[65],this._onCreate,this)}else{this._renderAdapter.removeRenderListener($[100],this._onVisibilityChange,this);this._context.removeEventListener($[65],this._onCreate,this)}},_attachToWidgetRenderer:function(a){if(a){this._renderAdapter.addRenderListener(this._renderType,this._onOriginalRenderer,this)}else{this._renderAdapter.removeRenderListener(this._renderType,this._onOriginalRenderer,this)}},_onVisibilityChange:function(a){var c=a[0];var b=false;if(c){b=this._onBeforeAppear()}else{if(!this._context.isCreated()){this._animation.cancel()}if(this._context.isSeeable()){b=this._onBeforeDisappear()}else{b=true}}return b},_onCreate:function(){if(this._context.isDisplayable()){this._onBeforeAppear()}},_onBeforeAppear:function(){if(this._context.isCreated()){this._animation.skip()}else{this._animation.cancel()}var a=rwt.animation.AnimationRenderer.ANIMATION_APPEAR;if(this._context.isCreated()&&this.isAnimated(a)){this.setEndValue(this.getValueFromWidget());if(this._invisibilityGetter!=null){this.setStartValue(this._invisibilityGetter(this._context));this._render(0)}this._autoStart(a)}return true},_onBeforeDisappear:function(){this._animation.skip();var b=rwt.animation.AnimationRenderer.ANIMATION_DISAPPEAR;var a=!this.isAnimated(b);if(!a){if(this._invisibilityGetter!==null){this.setEndValue(this._invisibilityGetter(this._context))}this.setStartValue(this.getValueFromWidget());this._autoStart(b)}return a},_onOriginalRenderer:function(f){var g=f[0];var e=f[1];var c=false;if(this._animation.isStarted()){var d=this._animation.getConfig();var b=this._endValue;if(d==$[57]||d==$[36]){this.setEndValue(g)}if(b!=this._endValue){if(this._animation.isRunning()){this.setStartValue(this.getLastValue())}if(!this._animation.restart()){c=true;this.cancelActivateOnce()}}}else{var a=rwt.animation.AnimationRenderer.ANIMATION_CHANGE;if(this.isAnimated(a)&&this._context.isSeeable()){this.setStartValue(typeof e!==$[8]?e:this.getValueFromWidget());this.setEndValue(g);if(!this._autoStart(a)&&this._autoStartEnabled){c=true}}else{c=true}}return c},_forceWidgetRenderer:function(){var a=rwt.animation.AnimationRenderer.applyFunctionNames[this._renderType];this._context[a](this._context.get(this._renderType))},_autoStart:function(b){var a=false;if(this._autoStartEnabled&&this.isAnimated(b)&&(this._autoCheck?this.checkValues():true)){a=this._animation.start(this._typeToConfig(b))}else{this.cancelActivateOnce()}return a},_typeToConfig:function(b){var a=null;switch(b){case rwt.animation.AnimationRenderer.ANIMATION_APPEAR:a=$[36];break;case rwt.animation.AnimationRenderer.ANIMATION_DISAPPEAR:a=$[359];break;case rwt.animation.AnimationRenderer.ANIMATION_CHANGE:a=$[57];break}return a},_updateWidgetVisibility:function(){var a=this._context.getVisibility();this._renderAdapter.forceRender($[100],a)}},statics:{ANIMATION_APPEAR:1,ANIMATION_DISAPPEAR:2,ANIMATION_CHANGE:4,applyFunctionNames:{height:$[473],opacity:$[341],backgroundColor:$[526],backgroundGradient:$[348],top:"_applyTop",left:"_applyLeft"},converterByRenderType:{height:"numericPositiveRound",top:$[487],left:$[487],opacity:"factor",backgroundColor:$[61],backgroundGradient:$[115]},converter:{none:function(a){return a},round:Math.round,positive:function(a){return Math.max(0,a)},numeric:function(c,b,a){return b+(a-b)*c},numericRound:function(d,c,b){var a=c+(b-c)*d;return Math.round(a)},numericPositive:function(c,b,a){var d=a-b;return Math.max(0,b+d*c)},numericPositiveRound:function(d,c,b){var e=b-c;var a=Math.max(0,c+e*d);return Math.round(a)},factor:function(d,c,b){var a=c+(b-c)*d;return Math.max(0,Math.min(a,1))},color:function(g,c,b){var a=[];var d;var f;for(var e=0;e<3;e++){f=b[e]-c[e];d=Math.round(c[e]+f*g);a[e]=Math.max(0,Math.min(d,255))}return rwt.util.Colors.rgbToRgbString(a)},gradient:function(f,c,b){var g=rwt.animation.AnimationRenderer.converter.color;var h=rwt.animation.AnimationRenderer.converter.factor;var a=[];var e=Math.min(b.length,c.length);for(var d=0;d<e;d++){a[d]=[h(f,c[d][0],b[d][0]),g(f,c[d][1],b[d][1])]}return a}}}}); |
| rwt.qx.Class.define("rwt.animation.Animation",{extend:rwt.qx.Target,construct:function(){arguments.callee.base.call(this);this._renderer=[];this._duration=1000;this._transitionFunction=rwt.animation.Animation.transitions.linear;this._startOn=null;this._finishOn=null;this._totalTime=null;this._config=null;this._defaultRenderer=null;this._isRunning=false;this._inQueue=false;this._exclusive=false},destruct:function(){if(this.isRunning()){this.skip()}else{this.cancel()}try{for(var b=0;b<this._renderer.length;b++){this._renderer[b].dispose()}}catch(a){throw"Could not Dispose AnimationRenderer: "+a}this._renderer=null},events:{init:$[50],finish:$[50],cancel:$[50]},members:{setDuration:function(a){this._duration=a},getDuration:function(a){return this._duration},setTransition:function(a){this._transitionFunction=rwt.animation.Animation.transitions[a]},setProperties:function(a){this.setDuration(a[0]);this.setTransition(a[1])},getRenderer:function(a){return this._renderer[a]},getDefaultRenderer:function(a){if(this._defaultRenderer==null||this._defaultRenderer.isDisposed()){this._defaultRenderer=new rwt.animation.AnimationRenderer(this)}if(typeof a!=$[8]){this._defaultRenderer.setActive(a)}return this._defaultRenderer},getRendererLength:function(){return this._renderer.length},getRendererIndex:function(a){return this._renderer.indexOf(a)},getConfig:function(){return this._config},setExclusive:function(a){this._exclusive=a},getExclusive:function(){return this._exclusive},start:function(a){if(!this.isStarted()){rwt.animation.Animation._addToQueue(this);this._inQueue=true;this._config=a;this._init()}return this.isStarted()},restart:function(){var a=false;if(this.isStarted()){var b=this._config;this.cancel();a=this.start(b)}return a},cancel:function(){if(this.isStarted()){this._inQueue=false;this._isRunning=false;this.createDispatchDataEvent($[84],this._config);this._config=null;rwt.animation.Animation._removeFromLoop(this)}},skip:function(){if(this.isStarted()){if(!this.isRunning()){this._render(0)}this._finish()}},setRendererActive:function(b){for(var a=0;a<this._renderer.length;a++){this._renderer[a].setActive(b)}},activateRendererOnce:function(){for(var a=0;a<this._renderer.length;a++){this._renderer[a].activateOnce()}},isStarted:function(){return this._inQueue},isRunning:function(){return this._isRunning},_addRenderer:function(a){this._renderer.push(a)},_removeRenderer:function(a){if(this.isStarted()){throw"Cannot remove AnimationRenderer: Animation already started!"}rwt.util.Arrays.remove(this._renderer,a)},_init:function(){this.createDispatchDataEvent("init",this._config);this._startOn=null;this._numberRenderer=this._renderer.length},_loop:function(b){if(this._startOn===null){this._startOn=new Date().getTime();this._finishOn=this._startOn+(this._duration);this._totalTime=this._duration}if(b>=this._finishOn){this._finish()}else{var a=(b-this._startOn)/this._totalTime;this._render(a)}},_render:function(a){if(!this._isRunning){for(var b=0;b<this._numberRenderer;b++){this._renderer[b]._setup(this._config)}this._isRunning=true}var c=this._transitionFunction(a);for(var b=0;b<this._numberRenderer;b++){this._renderer[b]._render(c)}},_finish:function(){this._render(1);var a=this._config;this.cancel();for(var b=0;b<this._numberRenderer;b++){this._renderer[b]._finish(a)}this.createDispatchDataEvent("finish",a)}},statics:{FPS:60,_queue:[],_interval:null,_exclusive:null,_addToQueue:function(a){if(a.getExclusive()){this._exclusive=a}else{this._queue.push(a)}if(this._interval==null){this._startLoop()}},_removeFromLoop:function(a){if(a===this._exclusive){this._exclusive=null}else{rwt.util.Arrays.remove(this._queue,a)}if(this._exclusive===null&&this._queue.length===0){this._stopLoop()}},_startLoop:function(){this._interval=setInterval(this._mainLoop,Math.round(1000/this.FPS))},_stopLoop:function(){window.clearInterval(this._interval);this._interval=null},_mainLoop:function(){try{if(!rwt.remote.EventUtil.getSuspended()){var g=new Date().getTime();var d=rwt.animation.Animation;try{if(d._exclusive!==null){d._exclusive._loop(g)}else{for(var c=0,a=d._queue.length;c<a;c++){if(d._queue[c]){d._queue[c]._loop(g)}}}}catch(f){rwt.animation.Animation._stopLoop();throw"Animation aborted: "+f}}}catch(b){rwt.runtime.ErrorHandler.processJavaScriptError(b)}},blockGlobalFlushs:function(a){rwt.widgets.base.Widget._inFlushGlobalQueues=a;if(!a){rwt.widgets.base.Widget._initAutoFlush(0)}},transitions:{linear:function(a){return a},ease:function(a){var b=-Math.pow(a-1,2)+1;return(-Math.cos(b*Math.PI)/2)+0.5},easeIn:function(a){return Math.pow(a,2)},easeOut:function(a){return -Math.pow(a-1,2)+1},easeInOut:function(a){return(-Math.cos(a*Math.PI)/2)+0.5}}}}); |
| (function(){var b=rwt.animation.AnimationRenderer;var a=rwt.animation.Animation;rwt.animation.AnimationUtil={snapTo:function(i,d,e,l,j){var f=this._createAnimation(i,d,"easeOut");var h=this._createRenderer(f,i,"left");var g=this._createRenderer(f,i,"top");var c=parseInt(i.getLeft(),10);var k=parseInt(i.getTop(),10);h.setStartValue(isNaN(c)?0:c);g.setStartValue(isNaN(k)?0:k);h.setEndValue(e);g.setEndValue(l);f.addEventListener("finish",function(){i.setLeft(e);i.setTop(l);if(j){i.setDisplay(false)}});f.start()},_createAnimation:function(d,e,f){var c=new a();c.setDuration(e);c.setTransition(f);var g=function(){c.cancel();c.dispose()};d.addEventListener($[360],g);d.addEventListener($[196],g);c.addEventListener($[84],function(){d.removeEventListener($[196],g);d.removeEventListener($[360],g);rwt.client.Timer.once(c.dispose,c,0)});return c},_createRenderer:function(h,g,f){var e=b.converterByRenderType;var d=g.getAdapter(rwt.widgets.util.WidgetRenderAdapter);var c=new b(h);c.setRenderFunction(d.getOriginalRenderer(f),g);c.setConverter(e[f]);return c}}}()); |
| (function(){var c=rwt.animation.Animation;var b=rwt.animation.AnimationRenderer;var a=rwt.event.EventHandlerUtil;rwt.qx.Mixin.define("rwt.animation.VisibilityAnimationMixin",{properties:{animation:{check:$[187],nullable:false,init:null,apply:$[497],themeable:true}},construct:function(){this.hide();this.addEventListener($[169],this._blockUserEvents,this);this.addEventListener($[216],this._onDestroyAnim,this);if(this instanceof rwt.widgets.Composite){this.show()}},destruct:function(){if(this._appearAnimation!=null){this._appearAnimation.dispose()}this._appearAnimation=null;if(this._disappearAnimation!=null){this._disappearAnimation.dispose()}this._disappearAnimation=null},members:{_appearAnimation:null,_disappearAnimation:null,_animateDestroy:false,_applyAnimation:function(e,d){this._configureAppearAnimation(e);this._configureDisappearAnimation(e)},_configureAppearAnimation:function(d){if(this._appearAnimation!==null){this._appearAnimation.getDefaultRenderer().setActive(false)}for(var e in d){switch(e){case"fadeIn":this._configureFadeIn(d[e]);break;case"slideIn":this._configureSlideIn(d[e]);break;case"flyInTop":case"flyInLeft":case"flyInRight":case $[381]:this._configureFlyIn(d[e],e);break}}},_configureFadeIn:function(d){var e=this._getAppearAnimation();e.setProperties(d);e.getDefaultRenderer().animate(this,$[53],b.ANIMATION_APPEAR)},_configureSlideIn:function(d){var g=this._getAppearAnimation();g.setProperties(d);var f=g.getDefaultRenderer();var e=b.ANIMATION_APPEAR|b.ANIMATION_CHANGE;f.animate(this,$[17],e);g.addEventListener("init",this._initSlideAnimation,this);g.addEventListener($[84],this._finishSlideAnimation,this)},_configureFlyIn:function(e,d){var h=this._getAppearAnimation();h.setProperties(e);var g=h.getDefaultRenderer();var f=b.ANIMATION_APPEAR;switch(d){case"flyInTop":g.animate(this,"top",f);g.setInvisibilityGetter(rwt.animation.VisibilityAnimationMixin.hideTop);break;case $[381]:g.animate(this,"top",f);g.setInvisibilityGetter(rwt.animation.VisibilityAnimationMixin.hideBottom);break;case"flyInLeft":g.animate(this,"left",f);g.setInvisibilityGetter(rwt.animation.VisibilityAnimationMixin.hideLeft);break;case"flyInRight":g.animate(this,"left",f);g.setInvisibilityGetter(rwt.animation.VisibilityAnimationMixin.hideRight);break}},_getAppearAnimation:function(){if(this._appearAnimation===null){this._appearAnimation=new c();if(rwt.client.Client.isMshtml()&&this instanceof rwt.widgets.Shell){this._appearAnimation.setExclusive(true)}}this._appearAnimation.getDefaultRenderer().setActive(true);return this._appearAnimation},_onDestroyAnim:function(){var d=true;if(this._animateDestroy){d=false;this._markInDispose();this.hide();this._disappearAnimation.addEventListener($[84],this._finishDestroyAnimation,this)}return d},_finishDestroyAnimation:function(){this._animateDestroy=false;delete this._isInGlobalDisposeQueue;this.destroy()},_configureDisappearAnimation:function(d){if(this._disappearAnimation!==null){this._disappearAnimation.getDefaultRenderer().setActive(false);this._animateDestroy=false}for(var e in d){switch(e){case"fadeOut":this._configureFadeOut(d[e]);break;case"slideOut":this._configureSlideOut(d[e]);break;case"flyOutTop":case"flyOutLeft":case $[418]:case $[490]:this._configureFlyOut(d[e],e);break}}},_configureFadeOut:function(d){var f=this._getDisappearAnimation();var e=f.getDefaultRenderer();e.animate(this,$[53],b.ANIMATION_DISAPPEAR);f.setProperties(d)},_configureSlideOut:function(d){var f=this._getDisappearAnimation();var e=f.getDefaultRenderer();e.animate(this,$[17],b.ANIMATION_DISAPPEAR);f.addEventListener("init",this._initSlideAnimation,this);f.addEventListener($[84],this._finishSlideAnimation,this);f.setProperties(d)},_configureFlyOut:function(e,d){var h=this._getDisappearAnimation();h.setProperties(e);var g=h.getDefaultRenderer();var f=b.ANIMATION_DISAPPEAR;switch(d){case"flyOutTop":g.animate(this,"top",f);g.setInvisibilityGetter(rwt.animation.VisibilityAnimationMixin.hideTop);break;case $[490]:g.animate(this,"top",f);g.setInvisibilityGetter(rwt.animation.VisibilityAnimationMixin.hideBottom);break;case"flyOutLeft":g.animate(this,"left",f);g.setInvisibilityGetter(rwt.animation.VisibilityAnimationMixin.hideLeft);break;case $[418]:g.animate(this,"left",f);g.setInvisibilityGetter(rwt.animation.VisibilityAnimationMixin.hideRight);break}},_getDisappearAnimation:function(){if(this._disappearAnimation===null){this._disappearAnimation=new c();if(this instanceof rwt.widgets.Shell){this._disappearAnimation.addEventListener("init",this._lockActiveState,this);this._disappearAnimation.addEventListener($[84],this._unlockActiveState,this);if(rwt.client.Client.isMshtml()){this._disappearAnimation.setExclusive(true)}}}this._disappearAnimation.getDefaultRenderer().setActive(true);this._animateDestroy=true;return this._disappearAnimation},_initSlideAnimation:function(d){this.setContainerOverflow(false)},_finishSlideAnimation:function(d){this.setContainerOverflow(true)},_blockUserEvents:function(e){var d=this.getElement();if(d){a.blockUserDomEvents(d,!e.getValue())}},_lockActiveState:function(){this.getWindowManager().blockActiveState=true},_unlockActiveState:function(){var d=rwt.widgets.base.Window.getDefaultWindowManager();d.blockActiveState=false;if(!this.isDisposed()&&!this._isInGlobalDisposeQueue){this._setActiveState(this.getActive())}var e=d.getActiveWindow();if(e&&e!==this){e._setActiveState(true)}}},statics:{hideTop:function(d){return parseInt(d.getHeightValue(),10)*-1},hideBottom:function(d){return d.getParent().getInnerHeight()},hideLeft:function(d){return parseInt(d.getWidthValue(),10)*-1},hideRight:function(d){return d.getParent().getInnerWidth()}}})}()); |
| rwt.qx.Class.define($[387],{statics:{__hints:{names:{"float":rwt.client.Client.isMshtml()?"styleFloat":"cssFloat",boxSizing:rwt.client.Client.isGecko()?$[541]:"boxSizing"},mshtmlPixel:{width:"pixelWidth",height:$[481],left:"pixelLeft",right:"pixelRight",top:"pixelTop",bottom:$[455]}},BROWSER_PREFIX:rwt.util.Variant.select($[0],{gecko:"-moz-",webkit:"-webkit-","default":""}),COMPUTED_MODE:1,CASCADED_MODE:2,LOCAL_MODE:3,get:rwt.util.Variant.select($[0],{mshtml:function(f,a,g,i){var b=this.__hints;a=b.names[a]||a;switch(g){case this.LOCAL_MODE:return f.style[a]||"";case this.CASCADED_MODE:return f.currentStyle[a];default:var c=f.currentStyle[a];if(/^-?[\.\d]+(px)?$/i.test(c)){return c}var d=b.mshtmlPixel[a];if(d){var e=f.style[a];f.style[a]=c||0;var h=f.style[d]+"px";f.style[a]=e;return h}if(/^-?[\.\d]+(em|pt|%)?$/i.test(c)){throw new Error($[445]+a+$[469])}return c}},"default":function(b,a,g,f){var d=this.__hints;a=d.names[a]||a;switch(g){case this.LOCAL_MODE:return b.style[a];case this.CASCADED_MODE:if(b.currentStyle){return b.currentStyle[a]}throw new Error($[515]);default:var e=rwt.html.Nodes.getDocument(b);var c=e.defaultView.getComputedStyle(b,null);return c?c[a]:null}}}),getStyleProperty:rwt.util.Objects.select((document.defaultView&&document.defaultView.getComputedStyle)?$[538]:"noComputed",{hasComputed:function(b,c){try{return b.ownerDocument.defaultView.getComputedStyle(b,"")[c]}catch(a){throw new Error($[161]+b+"["+c+"]: "+a)}},noComputed:rwt.util.Variant.select($[0],{mshtml:function(b,c){try{return b.currentStyle[c]}catch(a){throw new Error($[161]+b+"["+c+"]: "+a)}},"default":function(b,c){try{return b.style[c]}catch(a){throw new Error($[161]+b+"["+c+"]")}}})}),getStyleSize:function(a,b){return parseInt(rwt.html.Style.getStyleProperty(a,b),10)||0},getMarginLeft:function(a){return rwt.html.Style.getStyleSize(a,$[142])},getMarginTop:function(a){return rwt.html.Style.getStyleSize(a,$[158])},getMarginRight:function(a){return rwt.html.Style.getStyleSize(a,$[215])},getMarginBottom:function(a){return rwt.html.Style.getStyleSize(a,$[195])},getPaddingLeft:function(a){return rwt.html.Style.getStyleSize(a,$[160])},getPaddingTop:function(a){return rwt.html.Style.getStyleSize(a,$[149])},getPaddingRight:function(a){return rwt.html.Style.getStyleSize(a,$[188])},getPaddingBottom:function(a){return rwt.html.Style.getStyleSize(a,$[174])},getBorderLeft:function(a){return rwt.html.Style.getStyleProperty(a,$[293])=="none"?0:rwt.html.Style.getStyleSize(a,$[73])},getBorderTop:function(a){return rwt.html.Style.getStyleProperty(a,$[319])=="none"?0:rwt.html.Style.getStyleSize(a,$[74])},getBorderRight:function(a){return rwt.html.Style.getStyleProperty(a,$[363])=="none"?0:rwt.html.Style.getStyleSize(a,$[229])},getBorderBottom:function(a){return rwt.html.Style.getStyleProperty(a,$[307])=="none"?0:rwt.html.Style.getStyleSize(a,$[235])},setBackgroundImage:(function(){var a;if(rwt.client.Client.isMshtml()&&rwt.client.Client.getVersion()<7){a=function(d,c,b){if(b!=null&&b<1){this.removeCssFilter(d);this._setCssBackgroundImage(d,c);this.setOpacity(d,b)}else{this._setCssBackgroundImage(d,null);this._setCssFilterImage(d,c)}}}else{a=function(d,c,b){this._setCssBackgroundImage(d,c);if(b!=null){this.setOpacity(d,b)}}}return a}()),setOpacity:rwt.util.Variant.select($[0],{mshtml:function(c,b){if(b==null||b>=1||b<0){this.removeCssFilter(c)}else{var a=$[365]+Math.round(b*100)+")";this.setStyleProperty(c,$[95],a)}},gecko:function(c,b){if(b==null||b>=1){this.removeStyleProperty(c,$[223]);this.removeStyleProperty(c,$[53])}else{var a=rwt.util.Numbers.limit(b,0,1);this.setStyleProperty(c,$[223],a);this.setStyleProperty(c,$[53],a)}},"default":function(c,b){if(b==null||b>=1){this.removeStyleProperty(c,$[53])}else{var a=rwt.util.Numbers.limit(b,0,1);this.setStyleProperty(c,$[53],a)}}}),setBackgroundGradient:rwt.util.Variant.select($[0],{webkit:function(g,f){if(f){var d=["linear","left top"];if(f.horizontal===true){d.push("right top")}else{d.push($[417])}for(var e=0;e<f.length;e++){var a=f[e][0];var b=f[e][1];d.push($[407]+a+","+b+")")}var c=this.BROWSER_PREFIX+"gradient( "+d.join()+")";this.setStyleProperty(g,$[91],c)}else{this.removeStyleProperty(g,$[91])}},"default":function(g,f){if(f){var d=[f.horizontal===true?"0deg":"-90deg"];for(var e=0;e<f.length;e++){var a=(f[e][0]*100)+"%";var b=f[e][1];d.push(b+" "+a)}var c=this.BROWSER_PREFIX+$[491]+d.join()+")";this.setStyleProperty(g,$[91],c)}else{this.removeStyleProperty(g,$[91])}}}),setBoxShadow:function(e,c){var d;if(rwt.client.Client.isWebkit()){d=this.BROWSER_PREFIX+"box-shadow"}else{d=$[332]}if(c){var a=c[0]?"inset ":"";a+=c.slice(1,4).join("px ")+"px";var b=rwt.util.Colors.stringToRgb(c[5]);b.push(c[6]);a+=" rgba("+b.join()+")";this.setStyleProperty(e,d,a)}else{this.removeStyleProperty(e,d)}},setTextShadow:rwt.util.Variant.select($[0],{"default":function(e,c){var d="textShadow";if(c){var a=c.slice(1,4).join("px ")+"px";var b=rwt.util.Colors.stringToRgb(c[5]);b.push(c[6]);a+=" rgba("+b.join()+")";this.setStyleProperty(e,d,a)}else{this.removeStyleProperty(e,d)}},mshtml:function(){}}),setPointerEvents:function(e,d){var a=rwt.client.Client.getVersion();var b=rwt.client.Client.getEngine()===$[121]&&a>=1.9;var c=rwt.client.Client.getBrowser()===$[228]&&a>=530;if(b||c){this.setStyleProperty(e,$[282],d);e.setAttribute($[282],d)}else{this._passEventsThrough(e,d)}},setStyleProperty:function(c,b,a){if(c instanceof rwt.widgets.base.Widget){c.setStyleProperty(b,a)}else{c.style[b]=a}},removeStyleProperty:function(b,a){if(b instanceof rwt.widgets.base.Widget){b.removeStyleProperty(a)}else{b.style[a]=""}},removeCssFilter:function(c){var a=null;if(c instanceof rwt.widgets.base.Widget){if(c.isCreated()){a=c.getElement()}else{c.removeStyleProperty($[95])}}else{a=c}if(a!==null){var b=a.style.cssText;b=b.replace(/FILTER:[^;]*(;|$)/,"");a.style.cssText=b}},_setCssBackgroundImage:function(c,b){var a=b?"URL("+b+")":"none";this.setStyleProperty(c,$[81],a);this.setStyleProperty(c,$[253],$[180]);this.setStyleProperty(c,$[256],$[24])},_setCssFilterImage:function(c,b){if(b){var a=$[366]+b+$[351];this.setStyleProperty(c,$[95],a)}else{this.removeCssFilter(c)}},_passEventsThrough:function(e,d){var f=rwt.html.EventRegistration;var b=rwt.event.EventHandler._mouseEventTypes;var c=this._passEventThroughHandler;if(d==="none"){this.setStyleProperty(e,$[133],$[62]);for(var a=0;a<b.length;a++){f.addEventListener(e,b[a],c)}}else{}},_passEventThroughHandler:function(){var a=rwt.event.EventHandlerUtil;var c=a.getDomEvent(arguments);var d=a.getDomTarget(c);var b=c.type;d.style.display="none";var e=document.elementFromPoint(c.clientX,c.clientY);c.cancelBubble=true;a.stopDomEvent(c);if(e&&b!==$[28]&&b!==$[3]&&b!==$[6]){if(b===$[1]){rwt.html.Style._refireEvent(e,$[3],c)}rwt.html.Style._refireEvent(e,b,c);if(b===$[5]){rwt.html.Style._refireEvent(e,$[6],c)}}d.style.display=""},_refireEvent:rwt.util.Variant.select($[0],{mshtml:function(d,b,a){var c=document.createEventObject(a);d.fireEvent("on"+b,c)},"default":function(d,b,a){var c=document.createEvent($[392]);c.initMouseEvent(b,true,true,a.view,a.detail,a.screenX,a.screenY,a.clientX,a.clientY,a.ctrlKey,a.altKey,a.shiftKey,a.metaKey,a.button,a.relatedTarget);d.dispatchEvent(c)}})}}); |
| rwt.qx.Class.define("rwt.html.Scroll",{statics:{disableScrolling:function(a){this.enableScrolling(a);a.scrollLeft=0;a.scrollTop=0;rwt.html.EventRegistration.addEventListener(a,$[21],this._onscroll)},enableScrolling:function(a){rwt.html.EventRegistration.removeEventListener(a,$[21],this._onscroll)},_onscroll:function(b){var a=null;if(b.target){a=(b.target==b.currentTarget)?b.target:null}else{if(b.srcElement){a=b.srcElement}}if(a&&(b.scrollLeft!==0||b.scrollTop!==0)){a.scrollLeft=0;a.scrollTop=0}}}}); |
| rwt.qx.Class.define("rwt.html.StyleSheet",{statics:{createElement:rwt.util.Objects.select(document.createStyleSheet?"ie4+":$[122],{"ie4+":function(a){var b=document.createStyleSheet();if(a){b.cssText=a}return b},other:function(b){var a=document.createElement($[66]);a.type="text/css";a.appendChild(document.createTextNode(b||"body {}"));document.getElementsByTagName("head")[0].appendChild(a);if(a.sheet){return a.sheet}else{var d=document.styleSheets;for(var c=d.length-1;c>=0;c--){if(d[c].ownerNode==a){return d[c]}}}throw"Error: Could not get a reference to the sheet object"}}),addRule:rwt.util.Objects.select(document.createStyleSheet?"ie4+":$[122],{"ie4+":function(a,c,b){a.addRule(c,b)},other:function(a,c,b){a.insertRule(c+"{"+b+"}",a.cssRules.length)}}),removeRule:rwt.util.Objects.select(document.createStyleSheet?"ie4+":$[122],{"ie4+":function(b,e){var d=b.rules;var c=d.length;for(var a=c-1;a>=0;a--){if(d[a].selectorText==e){b.removeRule(a)}}},other:function(b,e){var d=b.cssRules;var c=d.length;for(var a=c-1;a>=0;a--){if(d[a].selectorText==e){b.deleteRule(a)}}}}),removeAllRules:rwt.util.Objects.select(document.createStyleSheet?"ie4+":$[122],{"ie4+":function(b){var d=b.rules;var c=d.length;for(var a=c-1;a>=0;a--){b.removeRule(a)}},other:function(b){var d=b.cssRules;var c=d.length;for(var a=c-1;a>=0;a--){b.deleteRule(a)}}})}}); |
| rwt.qx.Class.define($[393],{extend:rwt.widgets.base.Widget,construct:function(){arguments.callee.base.call(this);this._children=[];this._layoutImpl=this._createLayoutImpl()},properties:{focusHandler:{check:$[516],apply:"_applyFocusHandler",nullable:true},activeChild:{check:$[129],event:$[452],nullable:true},focusedChild:{check:$[129],apply:"_applyFocusedChild",event:$[239],nullable:true},visibleChildren:{_cached:true,defaultValue:null}},members:{isFocusRoot:function(){return this.getFocusHandler()!=null},getFocusRoot:function(){if(this.isFocusRoot()){return this}if(this._hasParent){return this.getParent().getFocusRoot()}return null},activateFocusRoot:function(){if(this._focusHandler){return}this._focusHandler=new rwt.widgets.util.FocusHandler(this);this.setFocusHandler(this._focusHandler)},_onfocuskeyevent:function(a){this.getFocusHandler()._onkeyevent(this,a)},_applyFocusHandler:function(b,a){if(b){this.addEventListener($[4],this._onfocuskeyevent);if(this.getTabIndex()<1){this.setTabIndex(1)}this.setHideFocus(true);this.setActiveChild(this)}else{this.removeEventListener($[10],this._onfocuskeyevent);this.removeEventListener($[4],this._onfocuskeyevent);this.setTabIndex(null);this.setHideFocus(false)}},_applyFocusedChild:function(f,c){var d=f!=null;var a=c!=null;if(rwt.qx.Class.isDefined($[288])&&d){var b=rwt.widgets.util.PopupManager.getInstance();if(b){b.update(f)}}if(a){if(c.hasEventListeners($[120])){var e=new rwt.event.FocusEvent($[120],c);if(d){e.setRelatedTarget(f)}c.dispatchEvent(e);e.dispose()}}if(d){if(f.hasEventListeners($[143])){var e=new rwt.event.FocusEvent($[143],f);if(a){e.setRelatedTarget(c)}f.dispatchEvent(e);e.dispose()}}if(a){if(this.getActiveChild()==c&&!d){this.setActiveChild(null)}c.setFocused(false);var e=new rwt.event.FocusEvent("blur",c);if(d){e.setRelatedTarget(f)}c.dispatchEvent(e);var b=rwt.widgets.util.ToolTipManager.getInstance();if(b){b.handleBlur(e)}e.dispose()}if(d){this.setActiveChild(f);f.setFocused(true);rwt.event.EventHandler.setFocusRoot(this);var e=new rwt.event.FocusEvent($[68],f);if(a){e.setRelatedTarget(c)}f.dispatchEvent(e);var b=rwt.widgets.util.ToolTipManager.getInstance();if(b){b.handleFocus(e)}e.dispose()}},_layoutImpl:null,_createLayoutImpl:function(){return new rwt.widgets.util.CanvasLayoutImpl(this)},getLayoutImpl:function(){return this._layoutImpl},getChildren:function(){return this._children},getChildrenLength:function(){return this.getChildren().length},hasChildren:function(){return this.getChildrenLength()>0},isEmpty:function(){return this.getChildrenLength()===0},indexOf:function(a){return this.getChildren().indexOf(a)},contains:function(a){switch(a){case null:return false;case this:return true;default:return this.contains(a.getParent())}},_computeVisibleChildren:function(){var c=[];var a=this.getChildren();if(!a){return 0}var d=a.length;for(var b=0;b<d;b++){var e=a[b];if(e._isDisplayable){c.push(e)}}return c},getVisibleChildrenLength:function(){return this.getVisibleChildren().length},hasVisibleChildren:function(){return this.getVisibleChildrenLength()>0},isVisibleEmpty:function(){return this.getVisibleChildrenLength()===0},add:function(b){var d;for(var c=0,a=arguments.length;c<a;c++){d=arguments[c];d.setParent(this)}return this},addAt:function(d,b){if(b==null||b<0){throw new Error("Not a valid index for addAt(): "+b)}if(d.getParent()==this){var a=this.getChildren();var c=a.indexOf(d);if(c!=b){if(c!=-1){rwt.util.Arrays.removeAt(a,c)}rwt.util.Arrays.insertAt(a,d,b);if(this._initialLayoutDone){this._invalidateVisibleChildren();this.getLayoutImpl().updateChildrenOnMoveChild(d,b,c)}}}else{d._insertIndex=b;d.setParent(this)}},addAtBegin:function(a){return this.addAt(a,0)},addAtEnd:function(b){var a=this.getChildrenLength();return this.addAt(b,b.getParent()==this?a-1:a)},addBefore:function(e,d){var a=this.getChildren();var c=a.indexOf(d);if(c==-1){throw new Error("Child to add before: "+d+$[504])}var b=a.indexOf(e);if(b==-1||b>c){c++}return this.addAt(e,Math.max(0,c-1))},addAfter:function(e,d){var a=this.getChildren();var c=a.indexOf(d);if(c==-1){throw new Error("Child to add after: "+d+$[504])}var b=a.indexOf(e);if(b!=-1&&b<c){c--}return this.addAt(e,Math.min(a.length,c+1))},remove:function(b){var d;for(var c=0,a=arguments.length;c<a;c++){d=arguments[c];if(!(d instanceof rwt.widgets.base.Parent)&&!(d instanceof rwt.widgets.base.Terminator)){throw new Error("Invalid Widget: "+d)}else{if(d.getParent()==this){d.setParent(null)}}}},removeAt:function(a){var b=this.getChildren()[a];if(b){delete b._insertIndex;b.setParent(null)}},removeAll:function(){var a=this.getChildren();var b=a[0];while(b){this.remove(b);b=a[0]}},getFirstChild:function(){return rwt.util.Arrays.getFirst(this.getChildren())||null},getFirstVisibleChild:function(){return rwt.util.Arrays.getFirst(this.getVisibleChildren())||null},getFirstActiveChild:function(a){return rwt.widgets.base.Widget.getActiveSiblingHelper(null,this,1,a,"first")||null},getLastChild:function(){return rwt.util.Arrays.getLast(this.getChildren())||null},getLastVisibleChild:function(){return rwt.util.Arrays.getLast(this.getVisibleChildren())||null},getLastActiveChild:function(a){return rwt.widgets.base.Widget.getActiveSiblingHelper(null,this,-1,a,"last")||null},forEachChild:function(c){var b=this.getChildren(),d,a=-1;if(!b){return}d=b[++a];while(d){c.call(d,a);d=b[++a]}},forEachVisibleChild:function(c){var b=this.getVisibleChildren(),d,a=-1;if(!b){return}d=b[++a];while(d){c.call(d,a);d=b[++a]}},_markInDispose:function(){this._isInGlobalDisposeQueue=true;if(this.forEachChild){this.forEachChild(arguments.callee)}},_beforeAppear:function(){arguments.callee.base.call(this);this.forEachVisibleChild(function(){if(this.isAppearRelevant()){this._beforeAppear()}})},_afterAppear:function(){arguments.callee.base.call(this);this.forEachVisibleChild(function(){if(this.isAppearRelevant()){this._afterAppear()}})},_ieFixLayoutOnAppear:rwt.util.Variant.select($[0],{mshtml:function(){arguments.callee.base.call(this);this.forEachVisibleChild(function(){if(this._isCreated){this._ieFixLayoutOnAppear()}})},"default":rwt.util.Functions.returnTrue}),_beforeDisappear:function(){arguments.callee.base.call(this);this.forEachVisibleChild(function(){if(this.isAppearRelevant()){this._beforeDisappear()}})},_afterDisappear:function(){arguments.callee.base.call(this);this.forEachVisibleChild(function(){if(this.isAppearRelevant()){this._afterDisappear()}})},_afterInsertDom:function(){arguments.callee.base.call(this);this.forEachVisibleChild(function(){if(this.getElement().parentNode===this.getParent()._getTargetNode()){this._afterInsertDom()}})},_afterRemoveDom:function(){arguments.callee.base.call(this);this.forEachVisibleChild(function(){if(this.isInDom()){this._afterRemoveDom()}})},_handleDisplayableCustom:function(c,a,b){this.forEachChild(function(){this._handleDisplayable()})},_addChildrenToStateQueue:function(){this.forEachVisibleChild(function(){this.addToStateQueue()})},recursiveAddToStateQueue:function(){this.addToStateQueue();this.forEachVisibleChild(function(){this.recursiveAddToStateQueue()})},_recursiveAppearanceThemeUpdate:function(a,b){arguments.callee.base.call(this,a,b);this.forEachVisibleChild(function(){this._recursiveAppearanceThemeUpdate(a,b)})},_addChildToChildrenQueue:function(a){if(!a._isInParentChildrenQueue&&a._isDisplayable){rwt.widgets.base.Widget.addToGlobalLayoutQueue(this);if(!this._childrenQueue){this._childrenQueue={}}this._childrenQueue[a.toHashCode()]=a}},_removeChildFromChildrenQueue:function(a){if(this._childrenQueue&&a._isInParentChildrenQueue){delete this._childrenQueue[a.toHashCode()];if(rwt.util.Objects.isEmpty(this._childrenQueue)){this._childrenQueue={};rwt.widgets.base.Widget.removeFromGlobalLayoutQueue(this)}}},_flushChildrenQueue:function(){if(!rwt.util.Objects.isEmpty(this._childrenQueue)){this.getLayoutImpl().flushChildrenQueue(this._childrenQueue);delete this._childrenQueue}},_addChildrenToLayoutQueue:function(a){this.forEachChild(function(){this.addToLayoutChanges(a)})},_layoutChild:function(b){if(!b._isDisplayable){return}var a=b._layoutChanges;if(b.renderBorder&&a.border){b.renderBorder(a)}if(b.renderPadding){if(a.paddingLeft||a.paddingRight||a.paddingTop||a.paddingBottom){b.renderPadding(a)}}this.getLayoutImpl().layoutChild(b,a);b._layoutPost(a);if(a.initial){b._initialLayoutDone=true;rwt.widgets.base.Widget.addToGlobalDisplayQueue(b)}b._layoutChanges={};delete b._isInParentLayoutQueue;delete this._childrenQueue[b.toHashCode()]},_layoutPost:function(a){this.createDispatchDataEvent("flush",a)},_computePreferredInnerWidth:function(){return this.getLayoutImpl().computeChildrenNeededWidth()},_computePreferredInnerHeight:function(){return this.getLayoutImpl().computeChildrenNeededHeight()},_changeInnerWidth:function(c,a){var b=this.getLayoutImpl();if(b.invalidateChildrenFlexWidth){b.invalidateChildrenFlexWidth()}this.forEachVisibleChild(function(){if(b.updateChildOnInnerWidthChange(this)&&this._recomputeBoxWidth()){this._recomputeOuterWidth();this._recomputeInnerWidth()}})},_changeInnerHeight:function(c,a){var b=this.getLayoutImpl();if(b.invalidateChildrenFlexHeight){b.invalidateChildrenFlexHeight()}this.forEachVisibleChild(function(){if(b.updateChildOnInnerHeightChange(this)&&this._recomputeBoxHeight()){this._recomputeOuterHeight();this._recomputeInnerHeight()}})},getInnerWidthForChild:function(a){return this.getInnerWidth()},getInnerHeightForChild:function(a){return this.getInnerHeight()},_remappingChildTable:["add",$[218],"addAt","addAtBegin","addAtEnd","removeAt","addBefore","addAfter","removeAll"],_remapStart:"return this._remappingChildTarget.",_remapStop:".apply(this._remappingChildTarget, arguments)",remapChildrenHandlingTo:function(e){var c=this._remappingChildTable;this._remappingChildTarget=e;for(var b=0,a=c.length,d;b<a;b++){d=c[b];this[d]=new Function(rwt.widgets.base.Parent.prototype._remapStart+d+rwt.widgets.base.Parent.prototype._remapStop)}}},defer:function(c,a,b){if(rwt.client.Client.isOpera()){a._layoutChildOrig=a._layoutChild;a._layoutChild=function(g){if(!g._initialLayoutDone||!g._layoutChanges.border){return this._layoutChildOrig(g)}var d=g.getElement().style;var f=d.display;d.display="none";var e=this._layoutChildOrig(g);d.display=f;return e}}},destruct:function(){this._disposeObjectDeep("_children",1);this._disposeObjects("_layoutImpl","_focusHandler");this._disposeFields($[479],$[479],"_remappingChildTable","_remappingChildTarget","_cachedVisibleChildren")}}); |
| rwt.qx.Class.define($[189],{extend:rwt.event.Event,construct:function(a,b){arguments.callee.base.call(this,a);this.setTarget(b);switch(a){case $[143]:case $[120]:this.setBubbles(true);this.setPropagationStopped(false)}}}); |
| rwt.qx.Class.define("rwt.event.EventHandler",{type:$[152],statics:{_filter:{},_allowContextMenu:rwt.util.Functions.returnFalse,_captureWidget:null,_focusRoot:null,_menuManager:null,_focused:false,_lastMouseEventType:null,_lastMouseDown:false,_lastMouseEventDate:0,_mouseIsDown:false,init:function(){var a=rwt.util.Functions;this.__onmouseevent=a.bind(this._onmouseevent,this);this.__ondragevent=a.bind(this._ondragevent,this);this.__onselectevent=a.bind(this._onselectevent,this);this.__onwindowblur=a.bind(this._onwindowblur,this);this.__onwindowfocus=a.bind(this._onwindowfocus,this);this.__onwindowresize=a.bind(this._onwindowresize,this);this.__onKeyEvent=rwt.util.Functions.bind(this._onKeyEvent,this);rwt.event.EventHandlerUtil.applyBrowserFixes()},cleanUp:function(){delete this.__onmouseevent;delete this.__ondragevent;delete this.__onselectevent;delete this.__onwindowblur;delete this.__onwindowfocus;delete this.__onwindowresize;delete this.__onKeyEvent;delete this._lastMouseEventType;delete this._lastMouseDown;delete this._lastMouseEventDate;delete this._lastMouseDownDomTarget;delete this._lastMouseDownDispatchTarget;rwt.event.EventHandlerUtil.cleanUp()},attachEvents:function(){var a=rwt.html.EventRegistration;this.attachEventTypes(this._mouseEventTypes,this.__onmouseevent);this.attachEventTypes(this._dragEventTypes,this.__ondragevent);this.attachEventTypes(this._keyEventTypes,this.__onKeyEvent);a.addEventListener(window,"blur",this.__onwindowblur);a.addEventListener(window,$[68],this.__onwindowfocus);a.addEventListener(window,"resize",this.__onwindowresize);document.body.onselect=this.__onselectevent;document.onselectstart=this.__onselectevent;document.onselectionchange=this.__onselectevent},detachEvents:function(){var a=rwt.html.EventRegistration;this.detachEventTypes(this._mouseEventTypes,this.__onmouseevent);this.detachEventTypes(this._dragEventTypes,this.__ondragevent);this.detachEventTypes(this._keyEventTypes,this.__onKeyEvent);a.removeEventListener(window,"blur",this.__onwindowblur);a.removeEventListener(window,$[68],this.__onwindowfocus);a.removeEventListener(window,"resize",this.__onwindowresize);document.body.onselect=null;document.onselectstart=null;document.onselectionchange=null},setCaptureWidget:function(a){if(this._captureWidget!==a){if(this._captureWidget!==null){this._captureWidget.setCapture(false)}this._captureWidget=a;if(a!=null){a.setCapture(true)}}},getCaptureWidget:function(){return this._captureWidget},setFocusRoot:function(a){if(a!==this._focusRoot){if(this._focusRoot!==null){this._focusRoot.setFocusedChild(null)}this._focusRoot=a;if(a!==null&&a.getFocusedChild()===null){a.setFocusedChild(a)}}},getFocusRoot:function(){return this._focusRoot},setAllowContextMenu:function(a){this._allowContextMenu=a},setMenuManager:function(a){this._menuManager=a},getMenuManager:function(a){return this._menuManager},setMouseEventFilter:function(b,a){this._filter[$[254]]=[b,a]},setKeyEventFilter:function(b,a){this._filter[$[257]]=[b,a]},setKeyDomEventFilter:function(b,a){this._filter[$[276]]=[b,a]},_onKeyEvent:function(){try{var e=rwt.event.EventHandlerUtil;var a=e.getDomEvent(arguments);var k=e.getKeyCode(a);var j=e.getCharCode(a);if(typeof this._filter[$[276]]!==$[8]){var b=this._filter[$[276]][1];var d=this._filter[$[276]][0];d.call(b,a.type,k,j,a)}var c=e.getEventPseudoTypes(a,k,j);var f=e.mustRestoreKeyup(k,c);for(var g=0;g<f.length;g++){this._onkeyevent_post(a,$[34],f[g],0);e.clearStuckKey(f[g])}for(var g=0;g<c.length;g++){this._onkeyevent_post(a,c[g],k,j)}if(e.mustRestoreKeypress(a,c)){this._onkeyevent_post(a,$[4],k,j)}e.saveData(a,k,j)}catch(h){rwt.runtime.ErrorHandler.processJavaScriptError(h)}},_onkeyevent_post:function(a,e,d,g){var f=true;if(typeof this._filter[$[257]]!==$[8]){var b=this._filter[$[257]][1];var c=this._filter[$[257]][0];f=c.call(b,e,d,g,a)}if(f){this._processKeyEvent(a,e,d,g)}},_processKeyEvent:function(b,g,d,f){var a=rwt.event.EventHandlerUtil;var c;if(!isNaN(d)&&d!==0){c=a.keyCodeToIdentifier(d)}else{c=a.charCodeToIdentifier(f)}var i=a.getDomTarget(b);var e=this._getKeyEventTarget();var h=new rwt.event.KeyEvent(g,b,i,e,null,d,f,c);if(e!=null&&e.getEnabled()){switch(c){case $[105]:case"Tab":if(this._menuManager!=null){this._menuManager.update(e,g)}break}if(b.ctrlKey&&c=="A"){switch(i.tagName.toLowerCase()){case $[77]:case $[119]:case $[233]:break;default:a.stopDomEvent(b);break}}e.dispatchEvent(h);if(rwt.qx.Class.isDefined($[255])){rwt.event.DragAndDropHandler.getInstance().handleKeyEvent(h)}}h.dispose()},_onmouseevent:function(c){try{var d=true;if(typeof this._filter[$[254]]!==$[8]){var b=this._filter[$[254]][1];d=this._filter[$[254]][0].call(b,c)}if(d){this._processMouseEvent(c)}}catch(a){rwt.runtime.ErrorHandler.processJavaScriptError(a)}},_processMouseEvent:rwt.util.Variant.select($[0],{mshtml:function(){var a=rwt.event.EventHandlerUtil;var b=a.getDomEvent(arguments);var c=a.getDomTarget(b);var d=b.type;if(d==$[28]){if(this._mouseIsDown&&b.button===0){this._onmouseevent_post(b,$[5],c);this._mouseIsDown=false}}else{if(d==$[1]){this._mouseIsDown=true}else{if(d==$[5]){this._mouseIsDown=false}}if(d==$[5]&&!this._lastMouseDown&&((new Date()).valueOf()-this._lastMouseEventDate)<250){this._onmouseevent_post(b,$[1],c)}else{if(d==$[48]&&this._lastMouseEventType==$[5]&&((new Date()).valueOf()-this._lastMouseEventDate)<250){this._onmouseevent_post(b,$[13],c)}}switch(d){case $[1]:case $[5]:case $[13]:case $[48]:case $[42]:this._lastMouseEventType=d;this._lastMouseEventDate=(new Date()).valueOf();this._lastMouseDown=d==$[1];break}}this._onmouseevent_post(b,d,c)},"default":function(b){var a=rwt.event.EventHandlerUtil;var c=a.getDomTarget(b);var d=b.type;switch(d){case $[296]:d=$[43];break;case $[13]:case $[48]:if(b.which!==1){return}}this._onmouseevent_post(b,d,c)}}),_onmouseevent_post:function(e,l,n){var h=false;var b=rwt.event.EventHandlerUtil;var k=this.getCaptureWidget();var c=b.getOriginalTargetObject(n);var j=b.getTargetObject(null,c,true);if(!j){return}var g=k?k:j;var p=this._onmouseevent_click_fix(n,l,g);if(l==$[42]){if(this._allowContextMenu(c,n)){h=true}else{b.stopDomEvent(e)}}if(g.getEnabled()&&!(g instanceof rwt.widgets.base.ClientDocument)&&l==$[1]){rwt.widgets.util.FocusHandler.mouseFocus=true;var m=g.getFocusRoot();if(m){this.setFocusRoot(m);var i=g;while(!i.isFocusable()&&i!=m){i=i.getParent()}m.setFocusedChild(i);m.setActiveChild(g)}}if(l==$[3]||l==$[6]){var d=b.getRelatedTargetObjectFromEvent(e);var o=l==$[3]?$[224]:"elementOut";this._fireElementHoverEvents(o,e,n,j,c,d,g);if(d==j){return}}var a=new rwt.event.MouseEvent(l,e,n,j,c,d);if(l!==$[42]){rwt.event.MouseEvent.storeEventState(a)}if(!h){g.dispatchEvent(a);if(g.getEnabled()){this._onmouseevent_special_post(l,j,c,g,a,e)}}else{if(l==$[3]){var f=rwt.widgets.util.ToolTipManager.getInstance();f.handleMouseEvent(a)}}a.dispose();rwt.widgets.base.Widget.flushGlobalQueues();if(p){this._onmouseevent_post(e,$[13],this._lastMouseDownDomTarget);this._lastMouseDownDomTarget=null;this._lastMouseDownDispatchTarget=null}},_fireElementHoverEvents:function(e,d,f,g,c,b,h){if(h.getEnabled()){var a=new rwt.event.MouseEvent(e,d,f,g,c,b);h.dispatchEvent(a)}},_onmouseevent_special_post:function(d,f,b,c,e,a){switch(d){case $[1]:rwt.widgets.util.PopupManager.getInstance().update(f);if(this._menuManager!=null){this._menuManager.update(f,d)}rwt.widgets.util.IframeManager.getInstance().handleMouseDown(e);break;case $[5]:if(this._menuManager!=null){this._menuManager.update(f,d)}if(rwt.qx.Class.isDefined($[422])){rwt.widgets.util.IframeManager.getInstance().handleMouseUp(e)}break}rwt.widgets.util.ToolTipManager.getInstance().handleMouseEvent(e);this._ignoreWindowBlur=d===$[1];if(rwt.qx.Class.isDefined($[255])&&f){rwt.event.DragAndDropHandler.getInstance().handleMouseEvent(e)}},_ondragevent:function(c){try{var a=rwt.event.EventHandlerUtil;if(!c){c=window.event}a.stopDomEvent(c)}catch(b){rwt.runtime.ErrorHandler.processJavaScriptError(b)}},_onselectevent:function(){try{var a=rwt.event.EventHandlerUtil;var d=a.getDomEvent(arguments);var c=a.getOriginalTargetObjectFromEvent(d);while(c){if(c.getSelectable()!=null){if(!c.getSelectable()){a.stopDomEvent(d)}break}c=c.getParent()}}catch(b){rwt.runtime.ErrorHandler.processJavaScriptError(b)}},_onwindowblur:function(b){try{if(!this._focused||this._ignoreWindowBlur||b.originalTarget!=window){return}this._focused=false;this.setCaptureWidget(null);if(rwt.qx.Class.isDefined($[288])){rwt.widgets.util.PopupManager.getInstance().update()}if(this._menuManager){this._menuManager.update()}if(rwt.qx.Class.isDefined($[255])){rwt.event.DragAndDropHandler.getInstance().globalCancelDrag()}rwt.widgets.base.ClientDocument.getInstance().createDispatchEvent($[210])}catch(a){rwt.runtime.ErrorHandler.processJavaScriptError(a)}},_onwindowfocus:function(b){try{if(this._focused){return}this._focused=true;rwt.widgets.base.ClientDocument.getInstance().createDispatchEvent("windowfocus")}catch(a){rwt.runtime.ErrorHandler.processJavaScriptError(a)}},_onwindowresize:function(g){try{var f=rwt.widgets.base.ClientDocument.getInstance();var b=f.getInnerWidth();var h=f.getInnerHeight();var d=f._computeInnerWidth();var a=f._computeInnerHeight();if(d!==b||a!==h){rwt.widgets.base.ClientDocument.getInstance().createDispatchEvent($[277])}}catch(c){rwt.runtime.ErrorHandler.processJavaScriptError(c)}},_mouseEventTypes:[$[3],$[28],$[6],$[1],$[5],$[13],$[48],$[42],rwt.client.Client.isGecko()?$[296]:$[43]],_keyEventTypes:[$[10],$[4],$[34]],_dragEventTypes:rwt.util.Variant.select($[0],{gecko:[$[213],$[124],$[309],"dragexit",$[424]],mshtml:[$[262],$[124],$[72],"drag",$[309],"dragleave"],"default":[$[72],$[213],$[124],"drag","dragleave",$[309],"dragexit",$[424]]}),_getKeyEventTarget:function(){var a=this.getFocusRoot();return this.getCaptureWidget()||(a==null?null:a.getActiveChild())},attachEventTypes:function(f,e){try{var d=rwt.client.Client.isGecko()?window:document.body;for(var c=0,a=f.length;c<a;c++){rwt.html.EventRegistration.addEventListener(d,f[c],e)}}catch(b){throw new Error("EventHandler: Failed to attach window event types: "+f+": "+b)}},detachEventTypes:function(f,e){try{var d=rwt.client.Client.isGecko()?window:document.body;for(var c=0,a=f.length;c<a;c++){rwt.html.EventRegistration.removeEventListener(d,f[c],e)}}catch(b){throw new Error("EventHandler: Failed to detach window event types: "+f+": "+b)}},_onmouseevent_click_fix:rwt.util.Variant.select($[0],{gecko:function(a,d,c){var b=false;switch(d){case $[1]:this._lastMouseDownDomTarget=a;this._lastMouseDownDispatchTarget=c;break;case $[5]:if(this._lastMouseDownDispatchTarget===c&&a!==this._lastMouseDownDomTarget){b=true}else{this._lastMouseDownDomTarget=null;this._lastMouseDownDispatchTarget=null}break}return b},"default":function(){return false}})}}); |
| rwt.qx.Class.define("rwt.html.Nodes",{statics:{ELEMENT:1,ATTRIBUTE:2,TEXT:3,CDATA_SECTION:4,ENTITY_REFERENCE:5,ENTITY:6,PROCESSING_INSTRUCTION:7,COMMENT:8,DOCUMENT:9,DOCUMENT_TYPE:10,DOCUMENT_FRAGMENT:11,NOTATION:12,isDocument:function(a){return !!(a&&a.nodeType===rwt.html.Nodes.DOCUMENT)},getDocument:function(a){if(this.isDocument(a)){return a}return a.ownerDocument||a.document||null},getWindow:rwt.util.Variant.select($[0],{mshtml:function(a){return this.getDocument(a).parentWindow},"default":function(a){return this.getDocument(a).defaultView}})}}); |
| rwt.qx.Class.define($[384],{extend:rwt.event.Event,construct:function(d,b,c,e,a){arguments.callee.base.call(this,d);this.setDomEvent(b);this.setDomTarget(c);this.setTarget(e);this.setOriginalTarget(a)},statics:{SHIFT_MASK:1,CTRL_MASK:2,ALT_MASK:4,META_MASK:8},properties:{bubbles:{_fast:true,defaultValue:true,noCompute:true},propagationStopped:{_fast:true,defaultValue:false,noCompute:true},domEvent:{_fast:true,setOnlyOnce:true,noCompute:true},domTarget:{_fast:true,setOnlyOnce:true,noCompute:true},modifiers:{_cached:true,defaultValue:null}},members:{_computeModifiers:function(){var b=0;var a=this.getDomEvent();if(a.shiftKey){b|=rwt.event.DomEvent.SHIFT_MASK}if(a.ctrlKey){b|=rwt.event.DomEvent.CTRL_MASK}if(a.altKey){b|=rwt.event.DomEvent.ALT_MASK}if(a.metaKey){b|=rwt.event.DomEvent.META_MASK}return b},isCtrlPressed:function(){return this.getDomEvent().ctrlKey},isShiftPressed:function(){return this.getDomEvent().shiftKey},isAltPressed:function(){return this.getDomEvent().altKey},isMetaPressed:function(){return this.getDomEvent().metaKey},isCtrlOrCommandPressed:function(){if(rwt.client.Client.getPlatform()==="mac"){return this.getDomEvent().metaKey}else{return this.getDomEvent().ctrlKey}},setDefaultPrevented:function(a){if(!a){throw new Error("It is not possible to set preventDefault to false if it was true before!")}rwt.event.EventHandlerUtil.stopDomEvent(this.getDomEvent());arguments.callee.base.call(this,a)}},destruct:function(){this._disposeFields("_valueDomEvent","_valueDomTarget")}}); |
| rwt.qx.Class.define($[274],{extend:rwt.event.DomEvent,construct:function(f,c,d,g,b,e,h,a){arguments.callee.base.call(this,f,c,d,g,b);this._keyCode=e;this.setCharCode(h);this.setKeyIdentifier(a)},statics:{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,print:124,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},codes:{}},properties:{charCode:{_fast:true,setOnlyOnce:true,noCompute:true},keyIdentifier:{_fast:true,setOnlyOnce:true,noCompute:true}},members:{getKeyCode:function(){return this._keyCode}},defer:function(b){for(var a in b.keys){b.codes[b.keys[a]]=a}}}); |
| rwt.qx.Class.define($[83],{extend:rwt.event.DomEvent,construct:function(e,b,d,f,a,c){arguments.callee.base.call(this,e,b,d,f,a);if(c){this.setRelatedTarget(c)}},statics:{C_BUTTON_LEFT:"left",C_BUTTON_MIDDLE:$[44],C_BUTTON_RIGHT:$[14],C_BUTTON_NONE:"none",_screenX:0,_screenY:0,_clientX:0,_clientY:0,_pageX:0,_pageY:0,_button:null,buttons:rwt.util.Variant.select($[0],{mshtml:{left:1,right:2,middle:4},"default":{left:0,right:2,middle:1}}),storeEventState:function(a){this._screenX=a.getScreenX();this._screenY=a.getScreenY();this._clientX=a.getClientX();this._clientY=a.getClientY();this._pageX=a.getPageX();this._pageY=a.getPageY();this._button=a.getButton()},getScreenX:function(){return this._screenX},getScreenY:function(){return this._screenY},getClientX:function(){return this._clientX},getClientY:function(){return this._clientY},getPageX:function(){return this._pageX},getPageY:function(){return this._pageY},getButton:function(){return this._button}},properties:{button:{_fast:true,readOnly:true},wheelDelta:{_fast:true,readOnly:true}},members:{getPageX:rwt.util.Variant.select($[0],{mshtml:function(){return this.getDomEvent().clientX+rwt.html.Viewport.getScrollLeft(window)},"default":function(){return this.getDomEvent().pageX}}),getPageY:rwt.util.Variant.select($[0],{mshtml:function(){return this.getDomEvent().clientY+rwt.html.Viewport.getScrollTop(window)},"default":function(){return this.getDomEvent().pageY}}),getClientX:function(){return this.getDomEvent().clientX},getClientY:function(){return this.getDomEvent().clientY},getScreenX:function(){return this.getDomEvent().screenX},getScreenY:function(){return this.getDomEvent().screenY},isLeftButtonPressed:rwt.util.Variant.select($[0],{mshtml:function(){if(this.getType()==$[13]){return true}else{return this.getButton()===rwt.event.MouseEvent.C_BUTTON_LEFT}},"default":function(){return this.getButton()===rwt.event.MouseEvent.C_BUTTON_LEFT}}),isMiddleButtonPressed:function(){return this.getButton()===rwt.event.MouseEvent.C_BUTTON_MIDDLE},isRightButtonPressed:function(){return this.getButton()===rwt.event.MouseEvent.C_BUTTON_RIGHT},__buttons:rwt.util.Variant.select($[0],{mshtml:{1:"left",2:$[14],4:$[44]},"default":{0:"left",2:$[14],1:$[44]}}),_computeButton:function(){switch(this.getDomEvent().type){case $[13]:case $[48]:return"left";case $[42]:return $[14];default:return this.__buttons[this.getDomEvent().button]||"none"}},_computeWheelDelta:rwt.util.Variant.select($[0],{"default":function(){return this.getDomEvent().wheelDelta/120},gecko:function(){return -(this.getDomEvent().detail/3)}})}}); |
| rwt.qx.Class.define("rwt.util.ObjectManager",{extend:rwt.qx.Target,construct:function(){arguments.callee.base.call(this);this._objects={}},members:{add:function(a){if(this.getDisposed()){return}this._objects[a.toHashCode()]=a},remove:function(a){if(this.getDisposed()){return false}delete this._objects[a.toHashCode()]},has:function(a){return this._objects[a.toHashCode()]!=null},get:function(a){return this._objects[a.toHashCode()]},getAll:function(){return this._objects},enableAll:function(){for(var a in this._objects){this._objects[a].setEnabled(true)}},disableAll:function(){for(var a in this._objects){this._objects[a].setEnabled(false)}}},destruct:function(){this._disposeObjectDeep("_objects")}}); |
| rwt.qx.Class.define($[422],{type:$[39],extend:rwt.util.ObjectManager,construct:function(){arguments.callee.base.call(this);this._blocked={}},members:{handleMouseDown:function(a){var c=this._blockData=rwt.util.Objects.copy(this.getAll());for(var b in c){c[b].block()}},handleMouseUp:function(a){var c=this._blockData;for(var b in c){c[b].release()}}},destruct:function(){this._disposeFields("_blocked","_blockData")}}); |
| rwt.qx.Class.define($[511],{extend:rwt.widgets.base.Parent,construct:function(){arguments.callee.base.call(this);this._locked=false},members:{setLocked:function(d){this._locked=d;var b=this.getChildren();var c=rwt.widgets.CoolItem;for(var a=0;a<b.length;a++){if(b[a] instanceof c){b[a].setLocked(d)}}},getLocked:function(){return this._locked}}}); |
| rwt.remote.HandlerRegistry.add($[511],{factory:function(b){var a=new rwt.widgets.CoolBar();rwt.remote.HandlerUtil.addStatesForStyles(a,b.style);a.setUserData($[23],true);rwt.remote.HandlerUtil.setParent(a,b.parent);a.setOverflow($[9]);a.setAppearance("coolbar");return a},destructor:rwt.remote.HandlerUtil.getControlDestructor(),getDestroyableChildren:rwt.remote.HandlerUtil.getDestroyableChildrenFinder(),properties:rwt.remote.HandlerUtil.extendControlProperties(["locked"]),propertyHandler:rwt.remote.HandlerUtil.extendControlPropertyHandler({}),listeners:rwt.remote.HandlerUtil.extendControlListeners([]),listenerHandler:rwt.remote.HandlerUtil.extendControlListenerHandler({})}); |
| rwt.qx.Class.define("rwt.widgets.util.LayoutImpl",{extend:rwt.qx.Object,construct:function(a){arguments.callee.base.call(this);this._widget=a},members:{getWidget:function(){return this._widget},computeChildBoxWidth:function(a){return a.getWidthValue()||a._computeBoxWidthFallback()},computeChildBoxHeight:function(a){return a.getHeightValue()||a._computeBoxHeightFallback()},computeChildNeededWidth:function(d){var c=d._computedMinWidthTypePercent?null:d.getMinWidthValue();var b=d._computedMaxWidthTypePercent?null:d.getMaxWidthValue();var a=(d._computedWidthTypePercent||d._computedWidthTypeFlex?null:d.getWidthValue())||d.getPreferredBoxWidth()||0;return rwt.util.Numbers.limit(a,c,b)+d.getMarginLeft()+d.getMarginRight()},computeChildNeededHeight:function(d){var c=d._computedMinHeightTypePercent?null:d.getMinHeightValue();var b=d._computedMaxHeightTypePercent?null:d.getMaxHeightValue();var a=(d._computedHeightTypePercent||d._computedHeightTypeFlex?null:d.getHeightValue())||d.getPreferredBoxHeight()||0;return rwt.util.Numbers.limit(a,c,b)+d.getMarginTop()+d.getMarginBottom()},computeChildrenNeededWidth_max:function(){for(var c=0,d=this.getWidget().getVisibleChildren(),b=d.length,a=0;c<b;c++){a=Math.max(a,d[c].getNeededWidth())}return a},computeChildrenNeededHeight_max:function(){for(var c=0,d=this.getWidget().getVisibleChildren(),b=d.length,a=0;c<b;c++){a=Math.max(a,d[c].getNeededHeight())}return a},computeChildrenNeededWidth_sum:function(){for(var c=0,d=this.getWidget().getVisibleChildren(),a=d.length,b=0;c<a;c++){b+=d[c].getNeededWidth()}return b},computeChildrenNeededHeight_sum:function(){for(var c=0,d=this.getWidget().getVisibleChildren(),a=d.length,b=0;c<a;c++){b+=d[c].getNeededHeight()}return b},computeChildrenNeededWidth:null,computeChildrenNeededHeight:null,updateSelfOnChildOuterWidthChange:function(a){},updateSelfOnChildOuterHeightChange:function(a){},updateChildOnInnerWidthChange:function(a){},updateChildOnInnerHeightChange:function(a){},updateSelfOnJobQueueFlush:function(a){},updateChildrenOnJobQueueFlush:function(a){},updateChildrenOnAddChild:function(b,a){},updateChildrenOnRemoveChild:function(b,a){},updateChildrenOnMoveChild:function(c,a,b){},flushChildrenQueue:function(a){var b=this.getWidget();for(var c in a){b._layoutChild(a[c])}},layoutChild:function(b,a){},layoutChild_sizeLimitX:rwt.util.Variant.select($[0],{mshtml:rwt.util.Functions.returnTrue,"default":function(b,a){if(a.minWidth){if(b._computedMinWidthTypeNull){b._resetRuntimeMinWidth()}else{b._renderRuntimeMinWidth(b.getMinWidthValue())}}else{if(a.initial&&!b._computedMinWidthTypeNull){b._renderRuntimeMinWidth(b.getMinWidthValue())}}if(a.maxWidth){if(b._computedMaxWidthTypeNull){b._resetRuntimeMaxWidth()}else{b._renderRuntimeMaxWidth(b.getMaxWidthValue())}}else{if(a.initial&&!b._computedMaxWidthTypeNull){b._renderRuntimeMaxWidth(b.getMaxWidthValue())}}}}),layoutChild_sizeLimitY:rwt.util.Variant.select($[0],{mshtml:rwt.util.Functions.returnTrue,"default":function(b,a){if(a.minHeight){if(b._computedMinHeightTypeNull){b._resetRuntimeMinHeight()}else{b._renderRuntimeMinHeight(b.getMinHeightValue())}}else{if(a.initial&&!b._computedMinHeightTypeNull){b._renderRuntimeMinHeight(b.getMinHeightValue())}}if(a.maxHeight){if(b._computedMaxHeightTypeNull){b._resetRuntimeMaxHeight()}else{b._renderRuntimeMaxHeight(b.getMaxHeightValue())}}else{if(a.initial&&!b._computedMaxHeightTypeNull){b._renderRuntimeMaxHeight(b.getMaxHeightValue())}}}}),layoutChild_marginX:function(d,a){if(a.marginLeft||a.initial){var c=d.getMarginLeft();if(c!=null){d._renderRuntimeMarginLeft(c)}else{d._resetRuntimeMarginLeft()}}if(a.marginRight||a.initial){var b=d.getMarginRight();if(b!=null){d._renderRuntimeMarginRight(b)}else{d._resetRuntimeMarginRight()}}},layoutChild_marginY:function(d,a){if(a.marginTop||a.initial){var c=d.getMarginTop();if(c!=null){d._renderRuntimeMarginTop(c)}else{d._resetRuntimeMarginTop()}}if(a.marginBottom||a.initial){var b=d.getMarginBottom();if(b!=null){d._renderRuntimeMarginBottom(b)}else{d._resetRuntimeMarginBottom()}}},layoutChild_sizeX_essentialWrapper:function(b,a){return b._isWidthEssential()?this.layoutChild_sizeX(b,a):b._resetRuntimeWidth()},layoutChild_sizeY_essentialWrapper:function(b,a){return b._isHeightEssential()?this.layoutChild_sizeY(b,a):b._resetRuntimeHeight()}},defer:function(b,a){a.computeChildrenNeededWidth=a.computeChildrenNeededWidth_max;a.computeChildrenNeededHeight=a.computeChildrenNeededHeight_max},destruct:function(){this._disposeFields("_widget")}}); |
| rwt.qx.Class.define("rwt.util.Numbers",{statics:{isInRange:function(b,a,c){return b>=a&&b<=c},isBetweenRange:function(b,a,c){return b>a&&b<c},limit:function(b,a,c){if(typeof c===$[56]&&b>c){return c}else{if(typeof a===$[56]&&b<a){return a}else{return b}}}}}); |
| rwt.qx.Class.define("rwt.widgets.util.CanvasLayoutImpl",{extend:rwt.widgets.util.LayoutImpl,construct:function(a){arguments.callee.base.call(this,a)},members:{computeChildBoxWidth:function(b){var a=null;if(b._computedLeftTypeNull||b._computedRightTypeNull){a=b.getWidthValue()}else{if(b._hasParent){a=this.getWidget().getInnerWidth()-b.getLeftValue()-b.getRightValue()}}return a||b._computeBoxWidthFallback()},computeChildBoxHeight:function(b){var a=null;if(b._computedTopTypeNull||b._computedBottomTypeNull){a=b.getHeightValue()}else{if(b._hasParent){a=this.getWidget().getInnerHeight()-b.getTopValue()-b.getBottomValue()}}return a||b._computeBoxHeightFallback()},computeChildNeededWidth:function(f){var e=f._computedLeftTypePercent?null:f.getLeftValue();var b=f._computedRightTypePercent?null:f.getRightValue();var d=f._computedMinWidthTypePercent?null:f.getMinWidthValue();var c=f._computedMaxWidthTypePercent?null:f.getMaxWidthValue();if(e!=null&&b!=null){var a=f.getPreferredBoxWidth()||0}else{var a=(f._computedWidthTypePercent?null:f.getWidthValue())||f.getPreferredBoxWidth()||0}return rwt.util.Numbers.limit(a,d,c)+e+b+f.getMarginLeft()+f.getMarginRight()},computeChildNeededHeight:function(f){var b=f._computedTopTypePercent?null:f.getTopValue();var c=f._computedBottomTypePercent?null:f.getBottomValue();var e=f._computedMinHeightTypePercent?null:f.getMinHeightValue();var d=f._computedMaxHeightTypePercent?null:f.getMaxHeightValue();if(b!=null&&c!=null){var a=f.getPreferredBoxHeight()||0}else{var a=(f._computedHeightTypePercent?null:f.getHeightValue())||f.getPreferredBoxHeight()||0}return rwt.util.Numbers.limit(a,e,d)+b+c+f.getMarginTop()+f.getMarginBottom()},updateChildOnInnerWidthChange:function(c){var a=c._recomputePercentX();var b=c._recomputeRangeX();return a||b},updateChildOnInnerHeightChange:function(c){var a=c._recomputePercentY();var b=c._recomputeRangeY();return a||b},layoutChild:function(b,a){this.layoutChild_sizeX_essentialWrapper(b,a);this.layoutChild_sizeY_essentialWrapper(b,a);this.layoutChild_sizeLimitX(b,a);this.layoutChild_sizeLimitY(b,a);this.layoutChild_locationX(b,a);this.layoutChild_locationY(b,a);this.layoutChild_marginX(b,a);this.layoutChild_marginY(b,a)},layoutChild_sizeX:rwt.util.Variant.select($[0],{"mshtml|newmshtml|opera|webkit":function(b,a){if(a.initial||a.width||a.minWidth||a.maxWidth||a.left||a.right){if(b._computedMinWidthTypeNull&&b._computedWidthTypeNull&&b._computedMaxWidthTypeNull&&!(!b._computedLeftTypeNull&&!b._computedRightTypeNull)){b._resetRuntimeWidth()}else{b._renderRuntimeWidth(b.getBoxWidth())}}},"default":function(b,a){if(a.initial||a.width){if(b._computedWidthTypeNull){b._resetRuntimeWidth()}else{b._renderRuntimeWidth(b.getWidthValue())}}}}),layoutChild_sizeY:rwt.util.Variant.select($[0],{"mshtml|newmshtml|opera|webkit":function(b,a){if(a.initial||a.height||a.minHeight||a.maxHeight||a.top||a.bottom){if(b._computedMinHeightTypeNull&&b._computedHeightTypeNull&&b._computedMaxHeightTypeNull&&!(!b._computedTopTypeNull&&!b._computedBottomTypeNull)){b._resetRuntimeHeight()}else{b._renderRuntimeHeight(b.getBoxHeight())}}},"default":function(b,a){if(a.initial||a.height){if(b._computedHeightTypeNull){b._resetRuntimeHeight()}else{b._renderRuntimeHeight(b.getHeightValue())}}}}),layoutChild_locationX:function(c,a){var b=this.getWidget();if(a.initial||a.left||a.parentPaddingLeft){if(c._computedLeftTypeNull){if(c._computedRightTypeNull&&b.getPaddingLeft()>0){c._renderRuntimeLeft(b.getPaddingLeft())}else{c._resetRuntimeLeft()}}else{c._renderRuntimeLeft(c.getLeftValue()+b.getPaddingLeft())}}if(a.initial||a.right||a.parentPaddingRight){if(c._computedRightTypeNull){if(c._computedLeftTypeNull&&b.getPaddingRight()>0){c._renderRuntimeRight(b.getPaddingRight())}else{c._resetRuntimeRight()}}else{c._renderRuntimeRight(c.getRightValue()+b.getPaddingRight())}}},layoutChild_locationY:function(c,a){var b=this.getWidget();if(a.initial||a.top||a.parentPaddingTop){if(c._computedTopTypeNull){if(c._computedBottomTypeNull&&b.getPaddingTop()>0){c._renderRuntimeTop(b.getPaddingTop())}else{c._resetRuntimeTop()}}else{c._renderRuntimeTop(c.getTopValue()+b.getPaddingTop())}}if(a.initial||a.bottom||a.parentPaddingBottom){if(c._computedBottomTypeNull){if(c._computedTopTypeNull&&b.getPaddingBottom()>0){c._renderRuntimeBottom(b.getPaddingBottom())}else{c._resetRuntimeBottom()}}else{c._renderRuntimeBottom(c.getBottomValue()+b.getPaddingBottom())}}}}}); |
| rwt.qx.Class.define("rwt.widgets.base.ClientDocument",{type:$[39],extend:rwt.widgets.base.Parent,construct:function(){arguments.callee.base.call(this);this._window=window;this._document=window.document;this.setElement(this._document.body);this.getElement().setAttribute("spellcheck","false");this._document.body.style.position="";this._cachedInnerWidth=this._document.body.offsetWidth;this._cachedInnerHeight=this._document.body.offsetHeight;this.addEventListener($[277],this._onwindowresize);this._modalWidgets=[];this._modalNativeWindow=null;this.activateFocusRoot();this.initHideFocus();this.initSelectable();rwt.event.EventHandler.setFocusRoot(this);if(rwt.client.Client.isGecko()){this.getElement().style.position=$[16];this.setSelectable(true)}},events:{focus:$[11],windowblur:$[11],windowfocus:$[11],windowresize:$[11]},properties:{appearance:{refine:true,init:"client-document"},enableElementFocus:{refine:true,init:false},enabled:{refine:true,init:true},selectable:{refine:true,init:false},hideFocus:{refine:true,init:true},globalCursor:{check:$[46],nullable:true,themeable:true,apply:"_applyGlobalCursor",event:"changeGlobalCursor"}},members:{_applyParent:rwt.util.Functions.returnTrue,getTopLevelWidget:rwt.util.Functions.returnThis,getWindowElement:function(){return this._window},getDocumentElement:function(){return this._document},getParent:rwt.util.Functions.returnNull,getToolTip:rwt.util.Functions.returnNull,isSeeable:rwt.util.Functions.returnTrue,_isDisplayable:true,_hasParent:false,_initialLayoutDone:true,_isInDom:true,_getBlocker:function(){if(!this._blocker){this._blocker=new rwt.widgets.base.ClientDocumentBlocker();this._blocker.addEventListener($[1],this.blockHelper,this);this._blocker.addEventListener($[5],this.blockHelper,this);this.add(this._blocker)}return this._blocker},blockHelper:function(a){if(this._modalNativeWindow){if(!this._modalNativeWindow.isClosed()){this._modalNativeWindow.focus()}else{this.release(this._modalNativeWindow)}}},block:function(a){this._getBlocker().show();if(rwt.qx.Class.isDefined($[505])&&a instanceof rwt.widgets.base.Window){this._modalWidgets.push(a);var b=a.getZIndex();this._getBlocker().setZIndex(b);a.setZIndex(b+1)}else{if(rwt.qx.Class.isDefined($[433])&&a instanceof qx.client.NativeWindow){this._modalNativeWindow=a;this._getBlocker().setZIndex(10000000)}}},release:function(b){if(b){if(rwt.qx.Class.isDefined($[433])&&b instanceof qx.client.NativeWindow){this._modalNativeWindow=null}else{rwt.util.Arrays.remove(this._modalWidgets,b)}}var a=this._modalWidgets.length;if(a===0){this._getBlocker().hide()}else{var c=this._modalWidgets[a-1];var d=c.getZIndex();this._getBlocker().setZIndex(d);c.setZIndex(d+1)}},createStyleElement:function(a){return rwt.html.StyleSheet.createElement(a)},addCssRule:function(a,c,b){return rwt.html.StyleSheet.addRule(a,c,b)},removeCssRule:function(a,b){return rwt.html.StyleSheet.removeRule(a,b)},removeAllCssRules:function(a){return rwt.html.StyleSheet.removeAllRules(a)},_applyGlobalCursor:rwt.util.Variant.select($[0],{mshtml:function(g,b){if(g==$[150]){g="hand"}if(b==$[150]){b="hand"}var e,h;var f=this._cursorElements;if(f){for(var c=0,a=f.length;c<a;c++){e=f[c];if(e.style.cursor==b){e.style.cursor=e._oldCursor;e._oldCursor=null}}}var d=document.all;var f=this._cursorElements=[];if(g!=null&&g!==""&&g!=="auto"){for(var c=0,a=d.length;c<a;c++){e=d[c];h=e.style.cursor;if(h!=null&&h!==""&&h!=="auto"){e._oldCursor=h;e.style.cursor=g;f.push(e)}}document.body.style.cursor=g}else{document.body.style.cursor=""}},"default":function(b,a){if(!this._globalCursorStyleSheet){this._globalCursorStyleSheet=this.createStyleElement()}this.removeCssRule(this._globalCursorStyleSheet,"*");if(b){this.addCssRule(this._globalCursorStyleSheet,"*","cursor:"+b+" !important")}}}),_onwindowresize:function(a){rwt.widgets.util.PopupManager.getInstance().update();this._recomputeInnerWidth();this._recomputeInnerHeight();rwt.widgets.base.Widget.flushGlobalQueues()},_computeInnerWidth:function(){return this._document.body.offsetWidth},_computeInnerHeight:function(){return this._document.body.offsetHeight}},defer:function(){var b=rwt.client.Client.getEngineBoxSizingAttributes();var a=b.join($[494])+$[494];var c=b.join($[500])+$[500];rwt.html.StyleSheet.createElement("html,body { margin:0;border:0;padding:0; } html { border:0 none; } *{"+a+"} img{"+c+"}");rwt.html.StyleSheet.createElement("html,body{width:100%;height:100%;overflow:hidden;}");rwt.widgets.base.ClientDocument.BOXSIZING=$[270]},destruct:function(){this._disposeObjects("_blocker");this._disposeFields("_window","_document","_modalWidgets","_modalNativeWindow","_globalCursorStyleSheet")}}); |
| rwt.qx.Class.define("rwt.widgets.base.Terminator",{extend:rwt.widgets.base.Widget,members:{renderPadding:function(a){if(a.paddingLeft){this._renderRuntimePaddingLeft(this.getPaddingLeft())}if(a.paddingRight){this._renderRuntimePaddingRight(this.getPaddingRight())}if(a.paddingTop){this._renderRuntimePaddingTop(this.getPaddingTop())}if(a.paddingBottom){this._renderRuntimePaddingBottom(this.getPaddingBottom())}},_renderContent:function(){if(this._computedWidthTypePixel){this._cachedPreferredInnerWidth=null}else{this._invalidatePreferredInnerWidth()}if(this._computedHeightTypePixel){this._cachedPreferredInnerHeight=null}else{this._invalidatePreferredInnerHeight()}if(this._initialLayoutDone){this.addToJobQueue("load")}},_layoutPost:function(a){if(a.initial||a.load||a.width||a.height){this._postApply()}this.createDispatchDataEvent("flush",a)},_postApply:rwt.util.Functions.returnTrue,_computeBoxWidthFallback:function(){return this.getPreferredBoxWidth()},_computeBoxHeightFallback:function(){return this.getPreferredBoxHeight()},_computePreferredInnerWidth:rwt.util.Functions.returnZero,_computePreferredInnerHeight:rwt.util.Functions.returnZero,_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._targetNode){return true}return false},_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._targetNode){return true}return false}}}); |
| rwt.qx.Class.define("rwt.widgets.base.ClientDocumentBlocker",{extend:rwt.widgets.base.Terminator,include:rwt.animation.VisibilityAnimationMixin,construct:function(){arguments.callee.base.call(this);this.initTop();this.initLeft();this.initWidth();this.initHeight();this.initZIndex()},properties:{appearance:{refine:true,init:$[518]},zIndex:{refine:true,init:100000000},top:{refine:true,init:0},left:{refine:true,init:0},width:{refine:true,init:"100%"},height:{refine:true,init:"100%"},display:{refine:true,init:false}},members:{getFocusRoot:function(){return null}}}); |
| rwt.qx.Class.define("rwt.theme.AppearanceManager",{type:$[39],extend:rwt.util.ObjectManager,construct:function(){arguments.callee.base.call(this);this.__cache={};this.__stateMap={};this.__stateMapLength=1},members:{setCurrentTheme:function(a){this._currentTheme=a;this.syncAppearanceTheme()},getCurrentTheme:function(){return this._currentTheme},syncAppearanceTheme:function(){if(!this._currentTheme){return}if(this._currentTheme){this.__cache[this._currentTheme.name]={}}if(rwt.runtime.System.getInstance().getUiReady()){rwt.widgets.base.ClientDocument.getInstance()._recursiveAppearanceThemeUpdate(this._currentTheme)}},styleFrom:function(c,a){var b=this.getCurrentTheme();if(!b){return}return this.styleFromTheme(b,c,a)},styleFromTheme:function(i,e,m){var k=i.appearances[e];if(!k){if(rwt.util.Variant.isSet($[26],"on")){throw new Error("Missing appearance entry: "+e)}return null}if(!k.style){if(k.include){return this.styleFromTheme(i,k.include,m)}else{return null}}var b=this.__stateMap;var f=[e];for(var c in m){if(!b[c]){b[c]=this.__stateMapLength++}f[b[c]]=true}var h=f.join();var a=this.__cache[i.name];if(a&&a[h]!==undefined){return a[h]}var n;if(k.include||k.base){var j=k.style(m);var g;if(k.include){g=this.styleFromTheme(i,k.include,m)}n={};if(k.base){var d=this.styleFromTheme(k.base,e,m);if(k.include){for(var l in d){if(g[l]===undefined&&j[l]===undefined){n[l]=d[l]}}}else{for(var l in d){if(j[l]===undefined){n[l]=d[l]}}}}if(k.include){for(var l in g){if(j[l]===undefined){n[l]=g[l]}}}for(var l in j){n[l]=j[l]}}else{n=k.style(m)}if(a){a[h]=n||null}return n||null}},destruct:function(){this._disposeFields("__cache","__stateMap")}}); |
| rwt.qx.Class.define("rwt.util.Colors",{statics:{REGEXP:{hex3:/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,rgb:/^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*\)$/},SYSTEM:{activeborder:true,activecaption:true,appworkspace:true,background:true,buttonface:true,buttonhighlight:true,buttonshadow:true,buttontext:true,captiontext:true,graytext:true,highlight:true,highlighttext:true,inactiveborder:true,inactivecaption:true,inactivecaptiontext:true,infobackground:true,infotext:true,menu:true,menutext:true,scrollbar:true,threeddarkshadow:true,threedface:true,threedhighlight:true,threedlightshadow:true,threedshadow:true,window:true,windowframe:true,windowtext:true},NAMED:{black:[0,0,0],silver:[192,192,192],gray:[128,128,128],white:[255,255,255],maroon:[128,0,0],red:[255,0,0],purple:[128,0,128],fuchsia:[255,0,255],green:[0,128,0],lime:[0,255,0],olive:[128,128,0],yellow:[255,255,0],navy:[0,0,128],blue:[0,0,255],teal:[0,128,128],aqua:[0,255,255],transparent:[-1,-1,-1],grey:[128,128,128],magenta:[255,0,255],orange:[255,165,0],brown:[165,42,42]},isNamedColor:function(a){return this.NAMED[a]!==undefined},isSystemColor:function(a){return this.SYSTEM[a]!==undefined},stringToRgb:function(a){if(this.isNamedColor(a)){return this.NAMED[a]}else{if(this.isSystemColor(a)){throw new Error($[520]+a)}else{if(this.isRgbString(a)){return this.__rgbStringToRgb()}else{if(this.isHex3String(a)){return this.__hex3StringToRgb()}else{if(this.isHex6String(a)){return this.__hex6StringToRgb()}}}}}throw new Error($[400]+a)},cssStringToRgb:function(a){if(this.isNamedColor(a)){return this.NAMED[a]}else{if(this.isSystemColor(a)){throw new Error($[520]+a)}else{if(this.isRgbString(a)){return this.__rgbStringToRgb()}else{if(this.isHex3String(a)){return this.__hex3StringToRgb()}else{if(this.isHex6String(a)){return this.__hex6StringToRgb()}}}}}throw new Error($[400]+a)},stringToRgbString:function(a){return this.rgbToRgbString(this.stringToRgb(a))},rgbToRgbString:function(a){return"rgb("+a[0]+","+a[1]+","+a[2]+")"},rgbToHexString:function(a){return(rwt.util.Strings.pad(a[0].toString(16).toLowerCase(),2)+rwt.util.Strings.pad(a[1].toString(16).toLowerCase(),2)+rwt.util.Strings.pad(a[2].toString(16).toLowerCase(),2))},isValid:function(a){return this.isCssString(a)},isCssString:function(a){return this.isSystemColor(a)||this.isNamedColor(a)||this.isHex3String(a)||this.isHex6String(a)||this.isRgbString(a)},isHex3String:function(a){return this.REGEXP.hex3.test(a)},isHex6String:function(a){return this.REGEXP.hex6.test(a)},isRgbString:function(a){return this.REGEXP.rgb.test(a)},__rgbStringToRgb:function(){var c=parseInt(RegExp.$1,10);var b=parseInt(RegExp.$2,10);var a=parseInt(RegExp.$3,10);return[c,b,a]},__hex3StringToRgb:function(){var c=parseInt(RegExp.$1,16)*17;var b=parseInt(RegExp.$2,16)*17;var a=parseInt(RegExp.$3,16)*17;return[c,b,a]},__hex6StringToRgb:function(){var c=(parseInt(RegExp.$1,16)*16)+parseInt(RegExp.$2,16);var b=(parseInt(RegExp.$3,16)*16)+parseInt(RegExp.$4,16);var a=(parseInt(RegExp.$5,16)*16)+parseInt(RegExp.$6,16);return[c,b,a]},hex3StringToRgb:function(a){if(this.isHex3String(a)){return this.__hex3StringToRgb(a)}throw new Error("Invalid hex3 value: "+a)},hex6StringToRgb:function(a){if(this.isHex6String(a)){return this.__hex6StringToRgb(a)}throw new Error("Invalid hex6 value: "+a)},hexStringToRgb:function(a){if(this.isHex3String(a)){return this.__hex3StringToRgb(a)}if(this.isHex6String(a)){return this.__hex6StringToRgb(a)}throw new Error("Invalid hex value: "+a)}}}); |
| rwt.qx.Class.define("rwt.html.Border",{extend:rwt.qx.Object,construct:function(c,b,a,d){arguments.callee.base.call(this);this._colors=null;this._widths=null;this._styles=null;this._innerColors=[null,null,null,null];this._radii=[null,null,null,null];this._singleColor=null;this._singleStyle=null;this._setWidth(c);this._setStyle(b?b:"none");this._setColor(a?a:"");if(b===$[164]){if(d===undefined){throw new Error("Missing innerColors")}this._setInnerColor(d)}else{if(b===$[85]){if(d===undefined||this.getColor()===null){throw new Error("Invalid arguments for border style rounded")}this._setRadii(d)}else{if(d!==undefined){throw new Error("colorsOrRadii set for style "+this.getStyle())}}}},statics:{_EDGEWIDTH:[$[74],$[229],$[235],$[73]],_EDGECOLOR:["borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"],_EDGESTYLE:[$[319],$[363],$[307],$[293]],_EDGEMOZCOLORS:["MozBorderTopColors","MozBorderRightColors","MozBorderBottomColors","MozBorderLeftColors"],_BORDERRADII:rwt.util.Variant.select($[0],{webkit:["-webkit-border-top-left-radius","-webkit-border-top-right-radius","-webkit-border-bottom-right-radius","-webkit-border-bottom-left-radius"],"gecko|newmshtml":["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"],"default":[]}),resetWidget:function(a){a._style.border="";if(a._innerStyle){a._innerStyle.border=""}this._resetRadii(a);this._resetComplexBorder(a)},_resetRadii:function(c){try{for(var b=0;b<4;b++){c._style[this._BORDERRADII[b]]=""}}catch(a){}},_resetComplexBorder:rwt.util.Variant.select($[0],{gecko:function(c){var d=rwt.html.Border;var b=c._style;for(var a=0;a<4;a++){b[d._EDGEMOZCOLORS[a]]=""}},"default":function(c){var d=rwt.html.Border;var a=c._innerStyle;if(a){for(var b=0;b<4;b++){a[d._EDGEWIDTH[b]]="";a[d._EDGESTYLE[b]]="";a[d._EDGECOLOR[b]]=""}}}})},members:{_setColor:function(a){if(typeof a===$[7]){this._singleColor=a}this._colors=this._normalizeValue(a)},_setWidth:function(a){this._widths=this._normalizeValue(a)},_setStyle:function(a){if(typeof a===$[7]){this._singleStyle=a;if(a===$[164]||a===$[85]){this._styles=this._normalizeValue($[70])}else{this._styles=this._normalizeValue(a)}}else{this._styles=this._normalizeValue(a)}},_setInnerColor:function(a){this._innerColors=this._normalizeValue(a)},_setRadii:function(a){this._radii=this._normalizeValue(a)},getRadii:function(){return this._radii.concat()},getColor:function(){return this._singleColor},getColors:function(){return this._colors.concat()},getColorTop:function(){return this._colors[0]},getColorRight:function(){return this._colors[1]},getColorBottom:function(){return this._colors[2]},getColorLeft:function(){return this._colors[3]},getInnerColors:function(){return this._innerColors.concat()},getColorInnerTop:function(){return this._innerColors[0]},getColorInnerRight:function(){return this._innerColors[1]},getColorInnerBottom:function(){return this._innerColors[2]},getColorInnerLeft:function(){return this._innerColors[3]},getStyle:function(){return this._singleStyle},getStyles:function(){return this._styles.concat()},getStyleTop:function(){return this._styles[0]},getStyleRight:function(){return this._styles[1]},getStyleBottom:function(){return this._styles[2]},getStyleLeft:function(){return this._styles[3]},getWidths:function(){return this._widths.concat()},getWidthTop:function(){return this._widths[0]},getWidthRight:function(){return this._widths[1]},getWidthBottom:function(){return this._widths[2]},getWidthLeft:function(){return this._widths[3]},_normalizeValue:function(b){var a;if(b instanceof Array){a=b}else{a=[b,b,b,b]}return a},renderWidget:function(a){if(this.getStyle()===$[164]){this._renderComplexBorder(a)}else{if(this.getStyle()===$[85]){this._renderRoundedBorder(a)}else{this._renderSimpleBorder(a)}}},renderElement:function(a){if(this.getStyle()===$[164]||this.getStyle()===$[85]){throw new Error("Rendering complex or rounded border on elements currently unsupported")}this._renderSimpleBorderStyle(a.style)},_renderSimpleBorder:function(a){rwt.html.Border._resetComplexBorder(a);rwt.html.Border._resetRadii(a);this._renderSimpleBorderStyle(a._style)},_renderSimpleBorderStyle:function(b){var c=rwt.html.Border;for(var a=0;a<4;a++){b[c._EDGEWIDTH[a]]=(this._widths[a]||0)+"px";b[c._EDGESTYLE[a]]=this._styles[a]||"none";b[c._EDGECOLOR[a]]=this._colors[a]||""}},_renderComplexBorder:rwt.util.Variant.select($[0],{gecko:function(c){var d=rwt.html.Border;d._resetRadii(c);var b=c._style;for(var a=0;a<4;a++){b[d._EDGEWIDTH[a]]=(this._widths[a]||0)+"px";b[d._EDGECOLOR[a]]=this._colors[a]||"";if(this._widths[a]===2){b[d._EDGESTYLE[a]]=$[70];b[d._EDGEMOZCOLORS[a]]=this._colors[a]+" "+this._innerColors[a]}else{b[d._EDGESTYLE[a]]=this._styles[a]||"none";b[d._EDGEMOZCOLORS[a]]=""}}},"default":function(d){var e=rwt.html.Border;e._resetRadii(d);var c=d._style;var a=d._innerStyle;for(var b=0;b<4;b++){if(this._widths[b]===2){if(!a){d.prepareEnhancedBorder();a=d._innerStyle}c[e._EDGEWIDTH[b]]="1px";c[e._EDGESTYLE[b]]=$[70];c[e._EDGECOLOR[b]]=this._colors[b]||"";a[e._EDGEWIDTH[b]]="1px";a[e._EDGESTYLE[b]]=$[70];a[e._EDGECOLOR[b]]=this._innerColors[b]}else{c[e._EDGEWIDTH[b]]=(this._widths[b]||0)+"px";c[e._EDGESTYLE[b]]=this._styles[b]||"none";c[e._EDGECOLOR[b]]=this._colors[b]||"";if(a){a[e._EDGEWIDTH[b]]="";a[e._EDGESTYLE[b]]="";a[e._EDGECOLOR[b]]=""}}}}}),_renderRoundedBorder:function(c){var d=rwt.html.Border;this._renderSimpleBorder(c);var b=c._style;for(var a=0;a<4;a++){b[d._BORDERRADII[a]]=this._radii[a]+"px"}}}}); |
| rwt.qx.Class.define("rwt.html.Font",{extend:rwt.qx.Object,construct:function(a,b){arguments.callee.base.call(this);if(a!==undefined){this.setSize(a)}if(b!==undefined){this.setFamily(b)}},statics:{_fontPool:{},fromString:function(g){var b=new rwt.html.Font();var f=g.split(/\s+/);var d=[];for(var e=0;e<f.length;e++){var c=f[e];switch(c){case"bold":b.setBold(true);break;case"italic":b.setItalic(true);break;case $[345]:b.setDecoration($[345]);break;default:var a=parseInt(c,10);if(a==c||rwt.util.Strings.contains(c,"px")){b.setSize(a)}else{d.push(c)}break}}if(d.length>0){b.setFamily(d)}return b},fromArray:function(a){var d=a[0];var f=a[1];var e=a[2];var c=a[3];var g=d+f+e+c;var b=this._fontPool[g];if(!b){b=new rwt.html.Font(f,d);b.setBold(e);b.setItalic(c);this._fontPool[g]=b}return b},fromConfig:function(b){var a=new rwt.html.Font();a.set(b);return a},reset:function(a){a.removeStyleProperty("fontFamily");a.removeStyleProperty($[184]);a.removeStyleProperty("fontWeight");a.removeStyleProperty("fontStyle");a.removeStyleProperty($[247])},resetElement:function(a){var b=a.style;b.fontFamily="";b.fontSize="";b.fontWeight="";b.fontStyle="";b.textDecoration=""},resetStyle:function(a){a.fontFamily="";a.fontSize="";a.fontWeight="";a.fontStyle="";a.textDecoration=""}},properties:{size:{check:$[18],nullable:true,apply:"_applySize"},family:{check:"Array",nullable:true,apply:"_applyFamily"},bold:{check:$[2],nullable:true,apply:"_applyBold"},italic:{check:$[2],nullable:true,apply:"_applyItalic"},decoration:{check:[$[345],"line-through","overline"],nullable:true,apply:"_applyDecoration"}},members:{__size:null,__family:null,__bold:null,__italic:null,__decoration:null,_applySize:function(b,a){this.__size=b===null?null:b+"px"},_applyFamily:function(e,b){var d="";for(var c=0,a=e.length;c<a;c++){if(e[c].indexOf(" ")>0){d+='"'+e[c]+'"'}else{d+=e[c]}if(c!=a-1){d+=","}}this.__family=d},_applyBold:function(b,a){this.__bold=b===null?null:b?"bold":$[52]},_applyItalic:function(b,a){this.__italic=b===null?null:b?"italic":$[52]},_applyDecoration:function(b,a){this.__decoration=b===null?null:b},render:function(a){a.setStyleProperty("fontFamily",this.__family);a.setStyleProperty($[184],this.__size);a.setStyleProperty("fontWeight",this.__bold);a.setStyleProperty("fontStyle",this.__italic);a.setStyleProperty($[247],this.__decoration)},renderStyle:function(a){a.fontFamily=this.__family||"";a.fontSize=this.__size||"";a.fontWeight=this.__bold||"";a.fontStyle=this.__italic||"";a.textDecoration=this.__decoration||""},renderElement:function(a){var b=a.style;b.fontFamily=this.__family||"";b.fontSize=this.__size||"";b.fontWeight=this.__bold||"";b.fontStyle=this.__italic||"";b.textDecoration=this.__decoration||""},generateStyle:function(){return(this.__family?"font-family:"+this.__family.replace(/\"/g,"'")+";":"")+(this.__size?"font-size:"+this.__size+";":"")+(this.__weight?"font-weight:"+this.__weight+";":"")+(this.__style?"font-style:"+this.__style+";":"")+(this.__decoration?$[536]+this.__decoration+";":"")},toCss:function(){return(this.getItalic()?"italic ":"")+(this.getBold()?"bold ":"")+(this.__size?this.getSize()+"px ":"")+(this.__family?this.__family.replace(/\"/g,"'"):"")}}}); |
| rwt.qx.Class.define($[516],{extend:rwt.qx.Target,construct:function(a){arguments.callee.base.call(this);if(a!=null){this._attachedWidget=a}},statics:{mouseFocus:false,blockFocus:false},members:{getAttachedWidget:function(){return this._attachedWidget},_onkeyevent:function(a,d){if(d.getKeyIdentifier()!="Tab"){return}d.stopPropagation();d.preventDefault();rwt.widgets.util.FocusHandler.mouseFocus=false;var c=this.getAttachedWidget().getFocusedChild();if(!d.isShiftPressed()){var b=c?this.getWidgetAfter(a,c):this.getFirstWidget(a)}else{var b=c?this.getWidgetBefore(a,c):this.getLastWidget(a)}if(b){b.setFocused(true);b._ontabfocus()}},compareTabOrder:function(f,d){if(f==d){return 0}var h=f.getTabIndex();var g=d.getTabIndex();if(h!=g){return h-g}var j=rwt.html.Location.getTop(f.getElement());var i=rwt.html.Location.getTop(d.getElement());if(j!=i){return j-i}var b=rwt.html.Location.getLeft(f.getElement());var a=rwt.html.Location.getLeft(d.getElement());if(b!=a){return b-a}var e=f.getZIndex();var c=d.getZIndex();if(e!=c){return e-c}return 0},getFirstWidget:function(a){return this._getFirst(a,null)},getLastWidget:function(a){return this._getLast(a,null)},getWidgetAfter:function(b,a){if(b==a){return this.getFirstWidget(b)}if(a.getAnonymous()){a=a.getParent()}if(a==null){return[]}var c=[];this._getAllAfter(b,a,c);c.sort(this.compareTabOrder);return c.length>0?c[0]:this.getFirstWidget(b)},getWidgetBefore:function(c,b){if(c==b){return this.getLastWidget(c)}if(b.getAnonymous()){b=b.getParent()}if(b==null){return[]}var d=[];this._getAllBefore(c,b,d);d.sort(this.compareTabOrder);var a=d.length;return a>0?d[a-1]:this.getLastWidget(c)},_getAllAfter:function(e,f,b){var d=e.getChildren();var g;var a=d.length||0;for(var c=0;c<a;c++){g=d[c];if(g.isDisposed()||!(g instanceof rwt.widgets.base.Parent)&&!(g instanceof rwt.widgets.base.Terminator)){continue}if(g.isFocusable()&&g.getTabIndex()>0&&this.compareTabOrder(f,g)<0){b.push(d[c])}if(!g.isFocusRoot()&&g instanceof rwt.widgets.base.Parent){this._getAllAfter(g,f,b)}}},_getAllBefore:function(e,f,b){var d=e.getChildren();var g;var a=d.length;for(var c=0;c<a;c++){g=d[c];if(!(g instanceof rwt.widgets.base.Parent)&&!(g instanceof rwt.widgets.base.Terminator)){continue}if(g.isFocusable()&&g.getTabIndex()>0&&this.compareTabOrder(f,g)>0){b.push(g)}if(!g.isFocusRoot()&&g instanceof rwt.widgets.base.Parent){this._getAllBefore(g,f,b)}}},_getFirst:function(d,f){var c=d.getChildren();var e;var a=c.length;for(var b=0;b<a;b++){e=c[b];if(!(e instanceof rwt.widgets.base.Parent)&&!(e instanceof rwt.widgets.base.Terminator)){continue}if(e.isFocusable()&&e.getTabIndex()>0){if(f==null||this.compareTabOrder(e,f)<0){f=e}}if(!e.isFocusRoot()&&e instanceof rwt.widgets.base.Parent){f=this._getFirst(e,f)}}return f},_getLast:function(e,b){var d=e.getChildren();var f;var a=d.length;for(var c=0;c<a;c++){f=d[c];if(!(f instanceof rwt.widgets.base.Parent)&&!(f instanceof rwt.widgets.base.Terminator)){continue}if(f.isFocusable()&&f.getTabIndex()>0){if(b==null||this.compareTabOrder(f,b)>0){b=f}}if(!f.isFocusRoot()&&f instanceof rwt.widgets.base.Parent){b=this._getLast(f,b)}}return b}},destruct:function(){this._disposeFields("_attachedWidget")}}); |
| rwt.qx.Class.define("rwt.html.Location",{statics:{__style:function(b,a){return rwt.html.Style.get(b,a,rwt.html.Style.COMPUTED_MODE,false)},__num:function(b,a){return parseInt(rwt.html.Style.get(b,a,rwt.html.Style.COMPUTED_MODE,false),10)||0},__computeScroll:function(b){var e=0,d=0;if(b.getBoundingClientRect){var c=rwt.html.Nodes.getWindow(b);if(!rwt.client.Client.isMobileSafari()){e-=rwt.html.Viewport.getScrollLeft(c);d-=rwt.html.Viewport.getScrollTop(c)}}else{var a=rwt.html.Nodes.getDocument(b).body;b=b.parentNode;while(b&&b!=a){e+=b.scrollLeft;d+=b.scrollTop;b=b.parentNode}}return{left:Math.ceil(e),top:Math.ceil(d)}},__computeBody:rwt.util.Variant.select($[0],{mshtml:function(b){var e=rwt.html.Nodes.getDocument(b);var a=e.body;var d=a.offsetLeft;var c=a.offsetTop;d-=this.__num(a,$[73]);c-=this.__num(a,$[74]);if(e.compatMode===$[214]){d+=this.__num(a,$[142]);c+=this.__num(a,$[158])}return{left:Math.ceil(d),top:Math.ceil(c)}},webkit:function(b){var e=rwt.html.Nodes.getDocument(b);var a=e.body;var d=a.offsetLeft;var c=a.offsetTop;d+=this.__num(a,$[73]);c+=this.__num(a,$[74]);if(e.compatMode===$[214]){d+=this.__num(a,$[142]);c+=this.__num(a,$[158])}return{left:Math.ceil(d),top:Math.ceil(c)}},gecko:function(b){var a=rwt.html.Nodes.getDocument(b).body;var d=a.offsetLeft;var c=a.offsetTop;if(rwt.widgets.base.ClientDocument.BOXSIZING!==$[270]){d+=this.__num(a,$[73]);c+=this.__num(a,$[74]);if(!b.getBoundingClientRect){var e;while(b){if(this.__style(b,$[123])===$[16]||this.__style(b,$[123])===$[138]){e=true;break}b=b.offsetParent}if(!e){d+=this.__num(a,$[73]);c+=this.__num(a,$[74])}}}return{left:Math.ceil(d),top:Math.ceil(c)}},"default":function(b){var a=rwt.html.Nodes.getDocument(b).body;var d=a.offsetLeft;var c=a.offsetTop;return{left:Math.ceil(d),top:Math.ceil(c)}}}),__computeOffset:rwt.util.Variant.select($[0],{"mshtml|newmshtml|webkit":function(c){var f=rwt.html.Nodes.getDocument(c);if(c.getBoundingClientRect){var b=c.getBoundingClientRect();var e=b.left;var d=b.top}else{var e=c.offsetLeft;var d=c.offsetTop;c=c.offsetParent;var a=f.body;while(c&&c!=a){e+=c.offsetLeft;d+=c.offsetTop;e+=this.__num(c,$[73]);d+=this.__num(c,$[74]);c=c.offsetParent}}return{left:Math.ceil(e),top:Math.ceil(d)}},gecko:function(d){if(d.getBoundingClientRect){var c=d.getBoundingClientRect();var f=Math.round(c.left);var e=Math.round(c.top)}else{var f=0;var e=0;var a=rwt.html.Nodes.getDocument(d).body;var b=rwt.widgets.base.ClientDocument.BOXSIZING;if(b!==$[270]){f-=this.__num(d,$[73]);e-=this.__num(d,$[74])}while(d&&d!==a){f+=d.offsetLeft;e+=d.offsetTop;if(b!==$[270]){f+=this.__num(d,$[73]);e+=this.__num(d,$[74])}if(d.parentNode&&this.__style(d.parentNode,$[58])!=$[281]){f+=this.__num(d.parentNode,$[73]);e+=this.__num(d.parentNode,$[74])}d=d.offsetParent}}return{left:Math.ceil(f),top:Math.ceil(e)}},"default":function(b){var d=0;var c=0;var a=rwt.html.Nodes.getDocument(b).body;while(b&&b!==a){d+=b.offsetLeft;c+=b.offsetTop;b=b.offsetParent}return{left:Math.ceil(d),top:Math.ceil(c)}}}),get:function(d,f){var g=this.__computeBody(d);if(d.tagName=="BODY"){var c=g.left;var h=g.top}else{var e=this.__computeOffset(d);var i=this.__computeScroll(d);var c=e.left+g.left-i.left;var h=e.top+g.top-i.top}var j=c+d.offsetWidth;var b=h+d.offsetHeight;if(f){if(f==$[127]||f==$[21]){var a=rwt.html.Overflow.getX(d);if(a==$[21]||a=="auto"){j+=d.scrollWidth-d.offsetWidth+this.__num(d,$[73])+this.__num(d,$[229])}var k=rwt.html.Overflow.getY(d);if(k==$[21]||k=="auto"){b+=d.scrollHeight-d.offsetHeight+this.__num(d,$[74])+this.__num(d,$[235])}}if(f===$[127]){c+=this.__num(d,$[160]);h+=this.__num(d,$[149]);j-=this.__num(d,$[188]);b-=this.__num(d,$[174])}if(f===$[127]||f===$[21]){c-=d.scrollLeft;h-=d.scrollTop;j-=d.scrollLeft;b-=d.scrollTop}if(f===$[127]||f===$[21]||f===$[132]){c+=this.__num(d,$[73]);h+=this.__num(d,$[74]);j-=this.__num(d,$[229]);b-=this.__num(d,$[235])}if(f==="margin"){c-=this.__num(d,$[142]);h-=this.__num(d,$[158]);j+=this.__num(d,$[215]);b+=this.__num(d,$[195])}}return{left:c,top:h,right:j,bottom:b}},getLeft:function(a,b){return this.get(a,b).left},getTop:function(a,b){return this.get(a,b).top},getRight:function(a,b){return this.get(a,b).right},getBottom:function(a,b){return this.get(a,b).bottom},getRelative:function(b,a,f,d){var e=this.get(b,f);var c=this.get(a,d);return{left:e.left-c.left,top:e.top-c.top,right:e.right-c.right,bottom:e.bottom-c.bottom}}}}); |
| rwt.qx.Class.define($[387],{statics:{__hints:{names:{"float":rwt.client.Client.isMshtml()?"styleFloat":"cssFloat",boxSizing:rwt.client.Client.isGecko()?$[541]:"boxSizing"},mshtmlPixel:{width:"pixelWidth",height:$[481],left:"pixelLeft",right:"pixelRight",top:"pixelTop",bottom:$[455]}},BROWSER_PREFIX:rwt.util.Variant.select($[0],{gecko:"-moz-",webkit:"-webkit-","default":""}),COMPUTED_MODE:1,CASCADED_MODE:2,LOCAL_MODE:3,get:rwt.util.Variant.select($[0],{mshtml:function(f,a,g,i){var b=this.__hints;a=b.names[a]||a;switch(g){case this.LOCAL_MODE:return f.style[a]||"";case this.CASCADED_MODE:return f.currentStyle[a];default:var c=f.currentStyle[a];if(/^-?[\.\d]+(px)?$/i.test(c)){return c}var d=b.mshtmlPixel[a];if(d){var e=f.style[a];f.style[a]=c||0;var h=f.style[d]+"px";f.style[a]=e;return h}if(/^-?[\.\d]+(em|pt|%)?$/i.test(c)){throw new Error($[445]+a+$[469])}return c}},"default":function(b,a,g,f){var d=this.__hints;a=d.names[a]||a;switch(g){case this.LOCAL_MODE:return b.style[a];case this.CASCADED_MODE:if(b.currentStyle){return b.currentStyle[a]}throw new Error($[515]);default:var e=rwt.html.Nodes.getDocument(b);var c=e.defaultView.getComputedStyle(b,null);return c?c[a]:null}}}),getStyleProperty:rwt.util.Objects.select((document.defaultView&&document.defaultView.getComputedStyle)?$[538]:"noComputed",{hasComputed:function(b,c){try{return b.ownerDocument.defaultView.getComputedStyle(b,"")[c]}catch(a){throw new Error($[161]+b+"["+c+"]: "+a)}},noComputed:rwt.util.Variant.select($[0],{mshtml:function(b,c){try{return b.currentStyle[c]}catch(a){throw new Error($[161]+b+"["+c+"]: "+a)}},"default":function(b,c){try{return b.style[c]}catch(a){throw new Error($[161]+b+"["+c+"]")}}})}),getStyleSize:function(a,b){return parseInt(rwt.html.Style.getStyleProperty(a,b),10)||0},getMarginLeft:function(a){return rwt.html.Style.getStyleSize(a,$[142])},getMarginTop:function(a){return rwt.html.Style.getStyleSize(a,$[158])},getMarginRight:function(a){return rwt.html.Style.getStyleSize(a,$[215])},getMarginBottom:function(a){return rwt.html.Style.getStyleSize(a,$[195])},getPaddingLeft:function(a){return rwt.html.Style.getStyleSize(a,$[160])},getPaddingTop:function(a){return rwt.html.Style.getStyleSize(a,$[149])},getPaddingRight:function(a){return rwt.html.Style.getStyleSize(a,$[188])},getPaddingBottom:function(a){return rwt.html.Style.getStyleSize(a,$[174])},getBorderLeft:function(a){return rwt.html.Style.getStyleProperty(a,$[293])=="none"?0:rwt.html.Style.getStyleSize(a,$[73])},getBorderTop:function(a){return rwt.html.Style.getStyleProperty(a,$[319])=="none"?0:rwt.html.Style.getStyleSize(a,$[74])},getBorderRight:function(a){return rwt.html.Style.getStyleProperty(a,$[363])=="none"?0:rwt.html.Style.getStyleSize(a,$[229])},getBorderBottom:function(a){return rwt.html.Style.getStyleProperty(a,$[307])=="none"?0:rwt.html.Style.getStyleSize(a,$[235])},setBackgroundImage:(function(){var a;if(rwt.client.Client.isMshtml()&&rwt.client.Client.getVersion()<7){a=function(d,c,b){if(b!=null&&b<1){this.removeCssFilter(d);this._setCssBackgroundImage(d,c);this.setOpacity(d,b)}else{this._setCssBackgroundImage(d,null);this._setCssFilterImage(d,c)}}}else{a=function(d,c,b){this._setCssBackgroundImage(d,c);if(b!=null){this.setOpacity(d,b)}}}return a}()),setOpacity:rwt.util.Variant.select($[0],{mshtml:function(c,b){if(b==null||b>=1||b<0){this.removeCssFilter(c)}else{var a=$[365]+Math.round(b*100)+")";this.setStyleProperty(c,$[95],a)}},gecko:function(c,b){if(b==null||b>=1){this.removeStyleProperty(c,$[223]);this.removeStyleProperty(c,$[53])}else{var a=rwt.util.Numbers.limit(b,0,1);this.setStyleProperty(c,$[223],a);this.setStyleProperty(c,$[53],a)}},"default":function(c,b){if(b==null||b>=1){this.removeStyleProperty(c,$[53])}else{var a=rwt.util.Numbers.limit(b,0,1);this.setStyleProperty(c,$[53],a)}}}),setBackgroundGradient:rwt.util.Variant.select($[0],{webkit:function(g,f){if(f){var d=["linear","left top"];if(f.horizontal===true){d.push("right top")}else{d.push($[417])}for(var e=0;e<f.length;e++){var a=f[e][0];var b=f[e][1];d.push($[407]+a+","+b+")")}var c=this.BROWSER_PREFIX+"gradient( "+d.join()+")";this.setStyleProperty(g,$[91],c)}else{this.removeStyleProperty(g,$[91])}},"default":function(g,f){if(f){var d=[f.horizontal===true?"0deg":"-90deg"];for(var e=0;e<f.length;e++){var a=(f[e][0]*100)+"%";var b=f[e][1];d.push(b+" "+a)}var c=this.BROWSER_PREFIX+$[491]+d.join()+")";this.setStyleProperty(g,$[91],c)}else{this.removeStyleProperty(g,$[91])}}}),setBoxShadow:function(e,c){var d;if(rwt.client.Client.isWebkit()){d=this.BROWSER_PREFIX+"box-shadow"}else{d=$[332]}if(c){var a=c[0]?"inset ":"";a+=c.slice(1,4).join("px ")+"px";var b=rwt.util.Colors.stringToRgb(c[5]);b.push(c[6]);a+=" rgba("+b.join()+")";this.setStyleProperty(e,d,a)}else{this.removeStyleProperty(e,d)}},setTextShadow:rwt.util.Variant.select($[0],{"default":function(e,c){var d="textShadow";if(c){var a=c.slice(1,4).join("px ")+"px";var b=rwt.util.Colors.stringToRgb(c[5]);b.push(c[6]);a+=" rgba("+b.join()+")";this.setStyleProperty(e,d,a)}else{this.removeStyleProperty(e,d)}},mshtml:function(){}}),setPointerEvents:function(e,d){var a=rwt.client.Client.getVersion();var b=rwt.client.Client.getEngine()===$[121]&&a>=1.9;var c=rwt.client.Client.getBrowser()===$[228]&&a>=530;if(b||c){this.setStyleProperty(e,$[282],d);e.setAttribute($[282],d)}else{this._passEventsThrough(e,d)}},setStyleProperty:function(c,b,a){if(c instanceof rwt.widgets.base.Widget){c.setStyleProperty(b,a)}else{c.style[b]=a}},removeStyleProperty:function(b,a){if(b instanceof rwt.widgets.base.Widget){b.removeStyleProperty(a)}else{b.style[a]=""}},removeCssFilter:function(c){var a=null;if(c instanceof rwt.widgets.base.Widget){if(c.isCreated()){a=c.getElement()}else{c.removeStyleProperty($[95])}}else{a=c}if(a!==null){var b=a.style.cssText;b=b.replace(/FILTER:[^;]*(;|$)/,"");a.style.cssText=b}},_setCssBackgroundImage:function(c,b){var a=b?"URL("+b+")":"none";this.setStyleProperty(c,$[81],a);this.setStyleProperty(c,$[253],$[180]);this.setStyleProperty(c,$[256],$[24])},_setCssFilterImage:function(c,b){if(b){var a=$[366]+b+$[351];this.setStyleProperty(c,$[95],a)}else{this.removeCssFilter(c)}},_passEventsThrough:function(e,d){var f=rwt.html.EventRegistration;var b=rwt.event.EventHandler._mouseEventTypes;var c=this._passEventThroughHandler;if(d==="none"){this.setStyleProperty(e,$[133],$[62]);for(var a=0;a<b.length;a++){f.addEventListener(e,b[a],c)}}else{}},_passEventThroughHandler:function(){var a=rwt.event.EventHandlerUtil;var c=a.getDomEvent(arguments);var d=a.getDomTarget(c);var b=c.type;d.style.display="none";var e=document.elementFromPoint(c.clientX,c.clientY);c.cancelBubble=true;a.stopDomEvent(c);if(e&&b!==$[28]&&b!==$[3]&&b!==$[6]){if(b===$[1]){rwt.html.Style._refireEvent(e,$[3],c)}rwt.html.Style._refireEvent(e,b,c);if(b===$[5]){rwt.html.Style._refireEvent(e,$[6],c)}}d.style.display=""},_refireEvent:rwt.util.Variant.select($[0],{mshtml:function(d,b,a){var c=document.createEventObject(a);d.fireEvent("on"+b,c)},"default":function(d,b,a){var c=document.createEvent($[392]);c.initMouseEvent(b,true,true,a.view,a.detail,a.screenX,a.screenY,a.clientX,a.clientY,a.ctrlKey,a.altKey,a.shiftKey,a.metaKey,a.button,a.relatedTarget);d.dispatchEvent(c)}})}}); |
| rwt.qx.Class.define("rwt.html.Overflow",{statics:{getX:rwt.util.Variant.select($[0],{gecko:rwt.client.Client.getVersion()<1.8?function(a,b){var c=rwt.html.Style.get(a,$[58],b,false);if(c===$[316]){c=$[9]}return c}:function(a,b){return rwt.html.Style.get(a,$[102],b,false)},opera:rwt.client.Client.getVersion()<9.5?function(a,b){return rwt.html.Style.get(a,$[58],b,false)}:function(a,b){return rwt.html.Style.get(a,$[102],b,false)},"default":function(a,b){return rwt.html.Style.get(a,$[102],b,false)}}),getY:rwt.util.Variant.select($[0],{gecko:rwt.client.Client.getVersion()<1.8?function(a,b){var c=rwt.html.Style.get(a,$[58],b,false);if(c===$[316]){c=$[9]}return c}:function(a,b){return rwt.html.Style.get(a,$[98],b,false)},opera:rwt.client.Client.getVersion()<9.5?function(a,b){return rwt.html.Style.get(a,$[58],b,false)}:function(a,b){return rwt.html.Style.get(a,$[98],b,false)},"default":function(a,b){return rwt.html.Style.get(a,$[98],b,false)}})}}); |
| rwt.qx.Class.define("rwt.html.ImageManager",{type:$[39],extend:rwt.qx.Target,construct:function(){arguments.callee.base.call(this);this.__visible={};this.__all={}},members:{add:function(b){var a=this.__all;if(a[b]===undefined){a[b]=1}else{a[b]++}},remove:function(b){var a=this.__all;if(a[b]!==undefined){a[b]--}if(a[b]<=0){delete a[b]}},show:function(b){var a=this.__visible;if(a[b]===undefined){a[b]=1}else{a[b]++}},hide:function(b){var a=this.__visible;if(a[b]!==undefined){a[b]--}if(a[b]<=0){delete a[b]}},getVisibleImages:function(){var c=this.__visible;var b={};for(var a in c){if(c[a]>0){b[a]=true}}return b},getHiddenImages:function(){var d=this.__visible;var a=this.__all;var c={};for(var b in a){if(d[b]===undefined){c[b]=true}}return c}},destruct:function(){this._disposeFields("__all","__visible")}}); |
| rwt.qx.Class.define("rwt.html.Offset",{statics:{getLeft:rwt.util.Variant.select($[0],{gecko:function(c){var f=c.offsetLeft;var b=c.parentNode;var e=rwt.html.Style.getStyleProperty(c,$[123]);var d=rwt.html.Style.getStyleProperty(b,$[123]);if(e!=$[16]&&e!=$[138]){f-=rwt.html.Style.getBorderLeft(b)}if(d!=$[16]&&d!=$[138]){while(b){b=b.parentNode;if(!b||typeof b.tagName!==$[7]){break}var a=rwt.html.Style.getStyleProperty(b,$[123]);if(a==$[16]||a==$[138]){f-=rwt.html.Style.getBorderLeft(b)+rwt.html.Style.getPaddingLeft(b);break}}}return f},"default":function(a){return a.offsetLeft}}),getTop:rwt.util.Variant.select($[0],{gecko:function(c){var f=c.offsetTop;var b=c.parentNode;var e=rwt.html.Style.getStyleProperty(c,$[123]);var d=rwt.html.Style.getStyleProperty(b,$[123]);if(e!=$[16]&&e!=$[138]){f-=rwt.html.Style.getBorderTop(b)}if(d!=$[16]&&d!=$[138]){while(b){b=b.parentNode;if(!b||typeof b.tagName!==$[7]){break}var a=rwt.html.Style.getStyleProperty(b,$[123]);if(a==$[16]||a==$[138]){f-=rwt.html.Style.getBorderTop(b)+rwt.html.Style.getPaddingTop(b);break}}}return f},"default":function(a){return a.offsetTop}})}}); |
| rwt.qx.Class.define("rwt.html.ScrollIntoView",{statics:{scrollX:function(b,c){var a,f,e,d;var g=b.parentNode;var h=b.offsetLeft;var e=b.offsetWidth;while(g){switch(rwt.html.Style.getStyleProperty(g,$[58])){case $[21]:case"auto":case $[443]:d=true;break;default:switch(rwt.html.Style.getStyleProperty(g,$[102])){case $[21]:case"auto":d=true;break;default:d=false}}if(d){a=g.clientWidth;f=g.scrollLeft;if(c){g.scrollLeft=h}else{if(c===false){g.scrollLeft=h+e-a}else{if(e>a||h<f){g.scrollLeft=h}else{if((h+e)>(f+a)){g.scrollLeft=h+e-a}}}}h=g.offsetLeft;e=g.offsetWidth}else{h+=g.offsetLeft}if(g.tagName.toLowerCase()=="body"){break}g=g.offsetParent}return true},scrollY:function(b,d){var g,a,c,e;var f=b.parentNode;var h=b.offsetTop;var c=b.offsetHeight;while(f){switch(rwt.html.Style.getStyleProperty(f,$[58])){case $[21]:case"auto":case $[519]:e=true;break;default:switch(rwt.html.Style.getStyleProperty(f,$[98])){case $[21]:case"auto":e=true;break;default:e=false}}if(e){g=f.clientHeight;a=f.scrollTop;if(d){f.scrollTop=h}else{if(d===false){f.scrollTop=h+c-g}else{if(c>g||h<a){f.scrollTop=h}else{if((h+c)>(a+g)){f.scrollTop=h+c-g}}}}h=f.offsetTop;c=f.offsetHeight}else{h+=f.offsetTop}if(f.tagName.toLowerCase()=="body"){break}f=f.offsetParent}return true}}}); |
| rwt.qx.Class.define("rwt.widgets.base.BoxLayout",{extend:rwt.widgets.base.Parent,construct:function(a){arguments.callee.base.call(this);if(a!=null){this.setOrientation(a)}else{this.initOrientation()}},statics:{STR_REVERSED:"-reversed"},properties:{orientation:{check:[$[37],$[31]],init:$[37],apply:$[419],event:"changeOrientation"},spacing:{check:$[18],init:0,themeable:true,apply:$[512],event:$[410]},horizontalChildrenAlign:{check:["left",$[24],$[14]],init:"left",themeable:true,apply:$[514]},verticalChildrenAlign:{check:["top",$[44],$[32]],init:"top",themeable:true,apply:$[502]},reverseChildrenOrder:{check:$[2],init:false,apply:"_applyReverseChildrenOrder"},stretchChildrenOrthogonalAxis:{check:$[2],init:true,apply:"_applyStretchChildrenOrthogonalAxis"},useAdvancedFlexAllocation:{check:$[2],init:false,apply:"_applyUseAdvancedFlexAllocation"},accumulatedChildrenOuterWidth:{_cached:true,defaultValue:null},accumulatedChildrenOuterHeight:{_cached:true,defaultValue:null}},members:{_createLayoutImpl:function(){return this.getOrientation()==$[31]?new rwt.widgets.util.VerticalBoxLayoutImpl(this):new rwt.widgets.util.HorizontalBoxLayoutImpl(this)},_layoutHorizontal:false,_layoutVertical:false,_layoutMode:"left",isHorizontal:function(){return this._layoutHorizontal},isVertical:function(){return this._layoutVertical},getLayoutMode:function(){if(this._layoutMode==null){this._updateLayoutMode()}return this._layoutMode},_updateLayoutMode:function(){this._layoutMode=this._layoutVertical?this.getVerticalChildrenAlign():this.getHorizontalChildrenAlign();if(this.getReverseChildrenOrder()){this._layoutMode+=rwt.widgets.base.BoxLayout.STR_REVERSED}},_invalidateLayoutMode:function(){this._layoutMode=null},_applyOrientation:function(b,a){this._layoutHorizontal=b==$[37];this._layoutVertical=b==$[31];if(this._layoutImpl){this._layoutImpl.dispose();this._layoutImpl=null}if(b){this._layoutImpl=this._createLayoutImpl()}this._doLayoutOrder(b,a);this.addToQueueRuntime("orientation")},_applySpacing:function(b,a){this._doLayout();this.addToQueueRuntime("spacing")},_applyHorizontalChildrenAlign:function(b,a){this._doLayoutOrder();this.addToQueueRuntime("horizontalChildrenAlign")},_applyVerticalChildrenAlign:function(b,a){this._doLayoutOrder();this.addToQueueRuntime("verticalChildrenAlign")},_applyReverseChildrenOrder:function(b,a){this._doLayoutOrder();this.addToQueueRuntime("reverseChildrenOrder")},_applyStretchChildrenOrthogonalAxis:function(b,a){this.addToQueueRuntime("stretchChildrenOrthogonalAxis")},_applyUseAdvancedFlexAllocation:function(b,a){this.addToQueueRuntime("useAdvancedFlexAllocation")},_doLayoutOrder:function(){this._invalidateLayoutMode();this._doLayout()},_doLayout:function(){this._invalidatePreferredInnerDimensions();this._invalidateAccumulatedChildrenOuterWidth();this._invalidateAccumulatedChildrenOuterHeight()},_computeAccumulatedChildrenOuterWidth:function(){var c=this.getVisibleChildren();var e=this.getSpacing();var a=-e;var b=0;var d=c[b];while(d!=null){a+=d.getOuterWidth()+e;b++;d=c[b]}return a},_computeAccumulatedChildrenOuterHeight:function(){var c=this.getVisibleChildren(),e,a=-1,d=this.getSpacing(),b=-d;e=c[++a];while(e){b+=e.getOuterHeight()+d;e=c[++a]}return b},_recomputeChildrenStretchingX:function(){var b=this.getVisibleChildren(),c,a=-1;c=b[++a];while(c){if(c._recomputeStretchingX()&&c._recomputeBoxWidth()){c._recomputeOuterWidth()}c=b[++a]}},_recomputeChildrenStretchingY:function(){var b=this.getVisibleChildren(),c,a=-1;c=b[++a];while(c){if(c._recomputeStretchingY()&&c._recomputeBoxHeight()){c._recomputeOuterHeight()}c=b[++a]}}}}); |
| rwt.qx.Class.define("rwt.widgets.util.VerticalBoxLayoutImpl",{extend:rwt.widgets.util.LayoutImpl,properties:{enableFlexSupport:{check:$[2],init:true}},members:{computeChildBoxWidth:function(a){if(this.getWidget().getStretchChildrenOrthogonalAxis()&&a._computedWidthTypeNull&&a.getAllowStretchX()){return this.getWidget().getInnerWidth()}return a.getWidthValue()||a._computeBoxWidthFallback()},computeChildBoxHeight:function(a){return a.getHeightValue()||a._computeBoxHeightFallback()},computeChildrenFlexHeight:function(){if(this._childrenFlexHeightComputed||!this.getEnableFlexSupport()){return}this._childrenFlexHeightComputed=true;var j=this.getWidget();var i=j.getVisibleChildren();var g=i.length;var m;var e=[];var s=j.getInnerHeight();var n=j.getSpacing()*(g-1);var q;for(q=0;q<g;q++){m=i[q];if(m._computedHeightTypeFlex){e.push(m);if(j._computedHeightTypeAuto){n+=m.getPreferredBoxHeight()}}else{n+=m.getOuterHeight()}}var d=s-n;var c=e.length;var f=0;for(q=0;q<c;q++){f+=e[q]._computedHeightParsed}var h=d/f;if(!j.getUseAdvancedFlexAllocation()){for(q=0;q<c;q++){m=e[q];m._computedHeightFlexValue=Math.round(m._computedHeightParsed*h);n+=m._computedHeightFlexValue}}else{var b=0;var k,c,a,p,l,r;for(q=0;q<c;q++){m=e[q];r=m._computedHeightFlexValue=m._computedHeightParsed*h;b+=r-rwt.util.Numbers.limit(r,m.getMinHeightValue(),m.getMaxHeightValue())}b=Math.round(b);if(b===0){for(q=0;q<c;q++){m=e[q];m._computedHeightFlexValue=Math.round(m._computedHeightFlexValue);n+=m._computedHeightFlexValue}}else{var o=b>0;for(q=c-1;q>=0;q--){m=e[q];if(o){a=(m.getMaxHeightValue()||Infinity)-m._computedHeightFlexValue;if(a>0){m._allocationLoops=Math.floor(a/m._computedHeightParsed)}else{rwt.util.Arrays.removeAt(e,q);m._computedHeightFlexValue=Math.round(m._computedHeightFlexValue);n+=Math.round(m._computedHeightFlexValue+a)}}else{a=rwt.util.Validation.isValidNumber(m.getMinHeightValue())?m._computedHeightFlexValue-m.getMinHeightValue():m._computedHeightFlexValue;if(a>0){m._allocationLoops=Math.floor(a/m._computedHeightParsed)}else{rwt.util.Arrays.removeAt(e,q);m._computedHeightFlexValue=Math.round(m._computedHeightFlexValue);n+=Math.round(m._computedHeightFlexValue-a)}}}while(b!==0&&c>0){c=e.length;k=Infinity;l=0;for(q=0;q<c;q++){k=Math.min(k,e[q]._allocationLoops);l+=e[q]._computedHeightParsed}p=Math.min(l*k,b);b-=p;for(q=c-1;q>=0;q--){m=e[q];m._computedHeightFlexValue+=p/l*m._computedHeightParsed;if(m._allocationLoops==k){m._computedHeightFlexValue=Math.round(m._computedHeightFlexValue);n+=m._computedHeightFlexValue;delete m._allocationLoops;rwt.util.Arrays.removeAt(e,q)}else{if(b===0){m._computedHeightFlexValue=Math.round(m._computedHeightFlexValue);n+=m._computedHeightFlexValue;delete m._allocationLoops}else{m._allocationLoops-=k}}}}}}m._computedHeightFlexValue+=s-n},invalidateChildrenFlexHeight:function(){delete this._childrenFlexHeightComputed},computeChildrenNeededHeight:function(){var a=this.getWidget();return rwt.widgets.util.LayoutImpl.prototype.computeChildrenNeededHeight_sum.call(this)+((a.getVisibleChildrenLength()-1)*a.getSpacing())},updateSelfOnChildOuterHeightChange:function(a){this.getWidget()._invalidateAccumulatedChildrenOuterHeight()},updateChildOnInnerWidthChange:function(c){var a=c._recomputePercentX();var b=c._recomputeStretchingX();if((c.getHorizontalAlign()||this.getWidget().getHorizontalChildrenAlign())==$[24]){c.addToLayoutChanges($[131])}return a||b},updateChildOnInnerHeightChange:function(c){if(this.getWidget().getVerticalChildrenAlign()==$[44]){c.addToLayoutChanges($[114])}var a=c._recomputePercentY();var b=c._recomputeFlexY();return a||b},updateSelfOnJobQueueFlush:function(a){if(a.addChild||a.removeChild){this.getWidget()._invalidateAccumulatedChildrenOuterHeight()}},updateChildrenOnJobQueueFlush:function(a){var d=false,b=false;var c=this.getWidget();if(a.orientation){d=b=true}if(a.spacing||a.orientation||a.reverseChildrenOrder||a.verticalChildrenAlign){c._addChildrenToLayoutQueue($[114])}if(a.horizontalChildrenAlign){c._addChildrenToLayoutQueue($[131])}if(a.stretchChildrenOrthogonalAxis){d=true}if(d){c._recomputeChildrenStretchingX();c._addChildrenToLayoutQueue($[25])}if(b){c._recomputeChildrenStretchingY();c._addChildrenToLayoutQueue($[17])}return true},updateChildrenOnRemoveChild:function(g,c){var b=this.getWidget();var e=b.getVisibleChildren();var a=e.length;var f;var d=-1;if(this.getEnableFlexSupport()){for(var d=0;d<a;d++){f=e[d];if(f.getHasFlexY()){c=Math.min(c,d);break}}d=-1}switch(b.getLayoutMode()){case $[32]:case $[190]:while((f=e[++d])&&d<c){f.addToLayoutChanges($[114])}break;case $[44]:case $[220]:f=e[++d];while(f){f.addToLayoutChanges($[114]);f=e[++d]}break;default:d+=c;f=e[++d];while(f){f.addToLayoutChanges($[114]);f=e[++d]}}},updateChildrenOnMoveChild:function(g,b,e){var a=this.getWidget().getVisibleChildren();var f=Math.min(b,e);var d=Math.max(b,e)+1;d=Math.min(a.length,d);for(var c=f;c<d;c++){a[c].addToLayoutChanges($[114])}},flushChildrenQueue:function(d){var b=this.getWidget(),f=b.getVisibleChildren(),a=f.length,h,e;if(this.getEnableFlexSupport()){this.invalidateChildrenFlexHeight();for(e=0;e<a;e++){h=f[e];if(h.getHasFlexY()){h._computedHeightValue=null;if(h._recomputeBoxHeight()){h._recomputeOuterHeight();h._recomputeInnerHeight()}d[h.toHashCode()]=h;h._layoutChanges.height=true}}}switch(b.getLayoutMode()){case $[32]:case $[190]:for(var e=a-1;e>=0&&!d[f[e].toHashCode()];e--){}for(var c=0;c<=e;c++){b._layoutChild(h=f[c])}break;case $[44]:case $[220]:e=-1;h=f[++e];while(h){b._layoutChild(h);h=f[++e]}break;default:e=-1;var g=false;h=f[++e];while(h){if(g||d[h.toHashCode()]){b._layoutChild(h);g=true}h=f[++e]}}},layoutChild:function(b,a){this.layoutChild_sizeX(b,a);this.layoutChild_sizeY(b,a);this.layoutChild_sizeLimitX(b,a);this.layoutChild_sizeLimitY(b,a);this.layoutChild_locationX(b,a);this.layoutChild_locationY(b,a);this.layoutChild_marginX(b,a);this.layoutChild_marginY(b,a)},layoutChild_sizeX:rwt.util.Variant.select($[0],{"mshtml|newmshtml|opera|webkit":function(b,a){if(a.initial||a.width||a.minWidth||a.maxWidth){if((b._isWidthEssential()&&(!b._computedWidthTypeNull||!b._computedMinWidthTypeNull||!b._computedMaxWidthTypeNull))||(b.getAllowStretchX()&&this.getWidget().getStretchChildrenOrthogonalAxis())){b._renderRuntimeWidth(b.getBoxWidth())}else{b._resetRuntimeWidth()}}},"default":function(b,a){if(a.initial||a.width){if(b._isWidthEssential()&&!b._computedWidthTypeNull){b._renderRuntimeWidth(b.getWidthValue())}else{b._resetRuntimeWidth()}}}}),layoutChild_sizeY:rwt.util.Variant.select($[0],{"mshtml|newmshtml|opera|webkit":function(b,a){if(a.initial||a.height||a.minHeight||a.maxHeight){if(b._isHeightEssential()&&(!b._computedHeightTypeNull||!b._computedMinHeightTypeNull||!b._computedMaxHeightTypeNull)){b._renderRuntimeHeight(b.getBoxHeight())}else{b._resetRuntimeHeight()}}},"default":function(b,a){if(a.initial||a.height){if(b._isHeightEssential()&&!b._computedHeightTypeNull){b._renderRuntimeHeight(b.getHeightValue())}else{b._resetRuntimeHeight()}}}}),layoutChild_locationY:function(e,a){var d=this.getWidget();if(d.getFirstVisibleChild()==e){switch(d.getLayoutMode()){case $[32]:case $[190]:var b=d.getPaddingBottom()+d.getAccumulatedChildrenOuterHeight()-e.getOuterHeight();break;case $[44]:case $[220]:var b=d.getPaddingTop()+Math.round((d.getInnerHeight()-d.getAccumulatedChildrenOuterHeight())/2);break;default:var b=d.getPaddingTop()}}else{var c=e.getPreviousVisibleSibling();switch(d.getLayoutMode()){case $[32]:case $[190]:var b=c._cachedLocationVertical-e.getOuterHeight()-d.getSpacing();break;default:var b=c._cachedLocationVertical+c.getOuterHeight()+d.getSpacing()}}e._cachedLocationVertical=b;switch(this.getWidget().getLayoutMode()){case $[32]:case $[501]:case $[220]:b+=!e._computedBottomTypeNull?e.getBottomValue():!e._computedTopTypeNull?-(e.getTopValue()):0;e._resetRuntimeTop();e._renderRuntimeBottom(b);break;default:b+=!e._computedTopTypeNull?e.getTopValue():!e._computedBottomTypeNull?-(e.getBottomValue()):0;e._resetRuntimeBottom();e._renderRuntimeTop(b)}},layoutChild_locationX:function(e,a){var c=this.getWidget();if(rwt.client.Client.isGecko()){if(e.getAllowStretchX()&&c.getStretchChildrenOrthogonalAxis()&&e._computedWidthTypeNull){e._renderRuntimeLeft(c.getPaddingLeft()||0);e._renderRuntimeRight(c.getPaddingRight()||0);return}}var d=e.getHorizontalAlign()||c.getHorizontalChildrenAlign();var b=d==$[24]?Math.round((c.getInnerWidth()-e.getOuterWidth())/2):0;if(d==$[14]){b+=c.getPaddingRight();if(!e._computedRightTypeNull){b+=e.getRightValue()}else{if(!e._computedLeftTypeNull){b-=e.getLeftValue()}}e._resetRuntimeLeft();e._renderRuntimeRight(b)}else{b+=c.getPaddingLeft();if(!e._computedLeftTypeNull){b+=e.getLeftValue()}else{if(!e._computedRightTypeNull){b-=e.getRightValue()}}e._resetRuntimeRight();e._renderRuntimeLeft(b)}}}}); |
| rwt.qx.Class.define("rwt.util.Validation",{statics:{isValidNumber:function(a){return typeof a===$[56]&&!isNaN(a)},isValidString:function(a){return typeof a===$[7]&&a!==""}}}); |
| rwt.qx.Class.define("rwt.widgets.util.HorizontalBoxLayoutImpl",{extend:rwt.widgets.util.LayoutImpl,properties:{enableFlexSupport:{check:$[2],init:true}},members:{computeChildBoxWidth:function(a){return a.getWidthValue()||a._computeBoxWidthFallback()},computeChildBoxHeight:function(a){if(this.getWidget().getStretchChildrenOrthogonalAxis()&&a._computedHeightTypeNull&&a.getAllowStretchY()){return this.getWidget().getInnerHeight()}return a.getHeightValue()||a._computeBoxHeightFallback()},computeChildrenFlexWidth:function(){if(this._childrenFlexWidthComputed||!this.getEnableFlexSupport()){return}this._childrenFlexWidthComputed=true;var j=this.getWidget();var i=j.getVisibleChildren();var g=i.length;var n;var e=[];var d=j.getInnerWidth();var o=j.getSpacing()*(g-1);var s;for(s=0;s<g;s++){n=i[s];if(n._computedWidthTypeFlex){e.push(n);if(j._computedWidthTypeAuto){o+=n.getPreferredBoxWidth()}}else{o+=n.getOuterWidth()}}var l=d-o;var c=e.length;var f=0;for(s=0;s<c;s++){f+=e[s]._computedWidthParsed}var h=l/f;if(!j.getUseAdvancedFlexAllocation()){for(s=0;s<c;s++){n=e[s];n._computedWidthFlexValue=Math.round(n._computedWidthParsed*h);o+=n._computedWidthFlexValue}}else{var b=0;var k,c,a,r,m,p;for(s=0;s<c;s++){n=e[s];p=n._computedWidthFlexValue=n._computedWidthParsed*h;b+=p-rwt.util.Numbers.limit(p,n.getMinWidthValue(),n.getMaxWidthValue())}b=Math.round(b);if(b===0){for(s=0;s<c;s++){n=e[s];n._computedWidthFlexValue=Math.round(n._computedWidthFlexValue);o+=n._computedWidthFlexValue}}else{var q=b>0;for(s=c-1;s>=0;s--){n=e[s];if(q){a=(n.getMaxWidthValue()||Infinity)-n._computedWidthFlexValue;if(a>0){n._allocationLoops=Math.floor(a/n._computedWidthParsed)}else{rwt.util.Arrays.removeAt(e,s);n._computedWidthFlexValue=Math.round(n._computedWidthFlexValue);o+=Math.round(n._computedWidthFlexValue+a)}}else{a=rwt.util.Validation.isValidNumber(n.getMinWidthValue())?n._computedWidthFlexValue-n.getMinWidthValue():n._computedWidthFlexValue;if(a>0){n._allocationLoops=Math.floor(a/n._computedWidthParsed)}else{rwt.util.Arrays.removeAt(e,s);n._computedWidthFlexValue=Math.round(n._computedWidthFlexValue);o+=Math.round(n._computedWidthFlexValue-a)}}}while(b!==0&&c>0){c=e.length;k=Infinity;m=0;for(s=0;s<c;s++){k=Math.min(k,e[s]._allocationLoops);m+=e[s]._computedWidthParsed}r=Math.min(m*k,b);b-=r;for(s=c-1;s>=0;s--){n=e[s];n._computedWidthFlexValue+=r/m*n._computedWidthParsed;if(n._allocationLoops==k){n._computedWidthFlexValue=Math.round(n._computedWidthFlexValue);o+=n._computedWidthFlexValue;delete n._allocationLoops;rwt.util.Arrays.removeAt(e,s)}else{if(b===0){n._computedWidthFlexValue=Math.round(n._computedWidthFlexValue);o+=n._computedWidthFlexValue;delete n._allocationLoops}else{n._allocationLoops-=k}}}}}}n._computedWidthFlexValue+=d-o},invalidateChildrenFlexWidth:function(){delete this._childrenFlexWidthComputed},computeChildrenNeededWidth:function(){var a=this.getWidget();return rwt.widgets.util.LayoutImpl.prototype.computeChildrenNeededWidth_sum.call(this)+((a.getVisibleChildrenLength()-1)*a.getSpacing())},updateSelfOnChildOuterWidthChange:function(a){this.getWidget()._invalidateAccumulatedChildrenOuterWidth()},updateChildOnInnerWidthChange:function(c){if(this.getWidget().getHorizontalChildrenAlign()==$[24]){c.addToLayoutChanges($[131])}var a=c._recomputePercentX();var b=c._recomputeFlexX();return a||b},updateChildOnInnerHeightChange:function(c){var a=c._recomputePercentY();var b=c._recomputeStretchingY();if((c.getVerticalAlign()||this.getWidget().getVerticalChildrenAlign())==$[44]){c.addToLayoutChanges($[114])}return a||b},updateSelfOnJobQueueFlush:function(a){if(a.addChild||a.removeChild){this.getWidget()._invalidateAccumulatedChildrenOuterWidth()}},updateChildrenOnJobQueueFlush:function(a){var d=false,b=false;var c=this.getWidget();if(a.orientation){d=b=true}if(a.spacing||a.orientation||a.reverseChildrenOrder||a.horizontalChildrenAlign){c._addChildrenToLayoutQueue($[131])}if(a.verticalChildrenAlign){c._addChildrenToLayoutQueue($[114])}if(a.stretchChildrenOrthogonalAxis){b=true}if(d){c._recomputeChildrenStretchingX();c._addChildrenToLayoutQueue($[25])}if(b){c._recomputeChildrenStretchingY();c._addChildrenToLayoutQueue($[17])}return true},updateChildrenOnRemoveChild:function(g,c){var b=this.getWidget(),e=b.getVisibleChildren(),a=e.length,f,d=-1;if(this.getEnableFlexSupport()){for(d=0;d<a;d++){f=e[d];if(f.getHasFlexX()){c=Math.min(c,d);break}}d=-1}switch(b.getLayoutMode()){case $[14]:case $[192]:while((f=e[++d])&&d<c){f.addToLayoutChanges($[131])}break;case $[24]:case $[191]:f=e[++d];while(f){f.addToLayoutChanges($[131]);f=e[++d]}break;default:d+=c;f=e[++d];while(f){f.addToLayoutChanges($[131]);f=e[++d]}}},updateChildrenOnMoveChild:function(g,b,e){var a=this.getWidget().getVisibleChildren();var f=Math.min(b,e);var d=Math.max(b,e)+1;d=Math.min(a.length,d);for(var c=f;c<d;c++){a[c].addToLayoutChanges($[131])}},flushChildrenQueue:function(d){var b=this.getWidget(),f=b.getVisibleChildren(),a=f.length,h,e;if(this.getEnableFlexSupport()){this.invalidateChildrenFlexWidth();for(e=0;e<a;e++){h=f[e];if(h.getHasFlexX()){h._computedWidthValue=null;if(h._recomputeBoxWidth()){h._recomputeOuterWidth();h._recomputeInnerWidth()}d[h.toHashCode()]=h;h._layoutChanges.width=true}}}switch(b.getLayoutMode()){case $[14]:case $[192]:for(var e=a-1;e>=0&&!d[f[e].toHashCode()];e--){}for(var c=0;c<=e;c++){b._layoutChild(h=f[c])}break;case $[24]:case $[191]:e=-1;h=f[++e];while(h){b._layoutChild(h);h=f[++e]}break;default:e=-1;var g=false;h=f[++e];while(h){if(g||d[h.toHashCode()]){b._layoutChild(h);g=true}h=f[++e]}}},layoutChild:function(b,a){this.layoutChild_sizeX(b,a);this.layoutChild_sizeY(b,a);this.layoutChild_sizeLimitX(b,a);this.layoutChild_sizeLimitY(b,a);this.layoutChild_locationX(b,a);this.layoutChild_locationY(b,a);this.layoutChild_marginX(b,a);this.layoutChild_marginY(b,a)},layoutChild_sizeX:rwt.util.Variant.select($[0],{"mshtml|newmshtml|opera|webkit":function(b,a){if(a.initial||a.width||a.minWidth||a.maxWidth){if(b._isWidthEssential()&&(!b._computedWidthTypeNull||!b._computedMinWidthTypeNull||!b._computedMaxWidthTypeNull)){b._renderRuntimeWidth(b.getBoxWidth())}else{b._resetRuntimeWidth()}}},"default":function(b,a){if(a.initial||a.width){if(b._isWidthEssential()&&!b._computedWidthTypeNull){b._renderRuntimeWidth(b.getWidthValue())}else{b._resetRuntimeWidth()}}}}),layoutChild_sizeY:rwt.util.Variant.select($[0],{"mshtml|newmshtml|opera|webkit":function(b,a){if(a.initial||a.height||a.minHeight||a.maxHeight){if((b._isHeightEssential()&&(!b._computedHeightTypeNull||!b._computedMinHeightTypeNull||!b._computedMaxHeightTypeNull))||(b.getAllowStretchY()&&this.getWidget().getStretchChildrenOrthogonalAxis())){b._renderRuntimeHeight(b.getBoxHeight())}else{b._resetRuntimeHeight()}}},"default":function(b,a){if(a.initial||a.height){if(b._isHeightEssential()&&!b._computedHeightTypeNull){b._renderRuntimeHeight(b.getHeightValue())}else{b._resetRuntimeHeight()}}}}),layoutChild_locationX:function(e,a){var d=this.getWidget();if(d.getFirstVisibleChild()==e){switch(d.getLayoutMode()){case $[14]:case $[192]:var b=d.getPaddingRight()+d.getAccumulatedChildrenOuterWidth()-e.getOuterWidth();break;case $[24]:case $[191]:var b=d.getPaddingLeft()+Math.round((d.getInnerWidth()-d.getAccumulatedChildrenOuterWidth())/2);break;default:var b=d.getPaddingLeft()}}else{var c=e.getPreviousVisibleSibling();switch(d.getLayoutMode()){case $[14]:case $[192]:var b=c._cachedLocationHorizontal-e.getOuterWidth()-d.getSpacing();break;default:var b=c._cachedLocationHorizontal+c.getOuterWidth()+d.getSpacing()}}e._cachedLocationHorizontal=b;switch(d.getLayoutMode()){case $[14]:case $[528]:case $[191]:b+=!e._computedRightTypeNull?e.getRightValue():!e._computedLeftTypeNull?-(e.getLeftValue()):0;e._resetRuntimeLeft();e._renderRuntimeRight(b);break;default:b+=!e._computedLeftTypeNull?e.getLeftValue():!e._computedRightTypeNull?-(e.getRightValue()):0;e._resetRuntimeRight();e._renderRuntimeLeft(b)}},layoutChild_locationY:function(e,a){var c=this.getWidget();if(rwt.client.Client.isGecko()){if(e.getAllowStretchY()&&c.getStretchChildrenOrthogonalAxis()&&e._computedHeightTypeNull){e._renderRuntimeTop(c.getPaddingTop()||0);e._renderRuntimeBottom(c.getPaddingBottom()||0);return}}var d=e.getVerticalAlign()||c.getVerticalChildrenAlign();var b=d==$[44]?Math.round((c.getInnerHeight()-e.getOuterHeight())/2):0;if(d==$[32]){b+=c.getPaddingBottom();if(!e._computedBottomTypeNull){b+=e.getBottomValue()}else{if(!e._computedTopTypeNull){b-=e.getTopValue()}}e._resetRuntimeTop();e._renderRuntimeBottom(b)}else{b+=c.getPaddingTop();if(!e._computedTopTypeNull){b+=e.getTopValue()}else{if(!e._computedBottomTypeNull){b-=e.getBottomValue()}}e._resetRuntimeBottom();e._renderRuntimeTop(b)}}}}); |
| rwt.qx.Class.define("rwt.widgets.base.Atom",{extend:rwt.widgets.base.BoxLayout,construct:function(c,e,d,a,b){arguments.callee.base.call(this);this.getLayoutImpl().setEnableFlexSupport(false);if(c!==undefined){this.setLabel(c)}if(rwt.qx.Class.isDefined($[550])&&b!=null&&d!=null&&a!=null&&qx.ui.embed.Flash.getPlayerVersion().getMajor()>0){this._flashMode=true;this.setIcon(b)}else{if(e!=null){this.setIcon(e)}}if(e||b){if(d!=null){this.setIconWidth(d)}if(a!=null){this.setIconHeight(a)}}this.initWidth();this.initHeight()},properties:{orientation:{refine:true,init:$[37]},allowStretchX:{refine:true,init:false},allowStretchY:{refine:true,init:false},appearance:{refine:true,init:"atom"},stretchChildrenOrthogonalAxis:{refine:true,init:false},width:{refine:true,init:"auto"},height:{refine:true,init:"auto"},horizontalChildrenAlign:{refine:true,init:$[24]},verticalChildrenAlign:{refine:true,init:$[44]},spacing:{refine:true,init:4},label:{apply:"_applyLabel",nullable:true,dispose:true,check:"Label"},icon:{check:$[46],apply:$[364],nullable:true,themeable:true},disabledIcon:{check:$[46],apply:"_applyDisabledIcon",nullable:true,themeable:true},show:{init:"both",check:["both",$[67],"icon","none"],themeable:true,nullable:true,inheritable:true,apply:"_applyShow",event:"changeShow"},iconPosition:{init:"left",check:["top",$[14],$[32],"left"],themeable:true,apply:"_applyIconPosition"},iconWidth:{check:$[18],themeable:true,apply:"_applyIconWidth",nullable:true},iconHeight:{check:$[18],themeable:true,apply:"_applyIconHeight",nullable:true}},members:{_flashMode:false,_labelObject:null,_iconObject:null,_createLabel:function(){var a=this._labelObject=new rwt.widgets.base.Label(this.getLabel());a.setAnonymous(true);this.addAt(a,this._iconObject?1:0)},_createIcon:function(){if(this._flashMode&&rwt.qx.Class.isDefined($[550])){var b=this._iconObject=new qx.ui.embed.Flash(this.getIcon())}else{var b=this._iconObject=new rwt.widgets.base.Image()}b.setAnonymous(true);var c=this.getIconWidth();if(c!==null){this._iconObject.setWidth(c)}var a=this.getIconWidth();if(a!==null){this._iconObject.setHeight(a)}this._updateIcon();this.addAt(b,0)},_updateIcon:function(){var a=this.getIcon();if(this._iconObject&&this.getIcon&&this.getDisabledIcon){var b=this.getDisabledIcon();if(b){if(this.getEnabled()){if(a){this._iconObject.setSource(a)}else{this._iconObject.resetSource()}}else{if(b){this._iconObject.setSource(b)}else{this._iconObject.resetSource()}}this._iconObject.setEnabled(true)}else{if(a){this._iconObject.setSource(a)}else{this._iconObject.resetSource()}this._iconObject.resetEnabled()}}},getLabelObject:function(){return this._labelObject},getIconObject:function(){return this._iconObject},_applyIconPosition:function(b,a){switch(b){case"top":case $[32]:this.setOrientation($[31]);this.setReverseChildrenOrder(b==$[32]);break;default:this.setOrientation($[37]);this.setReverseChildrenOrder(b==$[14]);break}},_applyShow:function(b,a){this._handleIcon();this._handleLabel()},_applyLabel:function(b,a){if(this._labelObject){if(b){this._labelObject.setText(b)}else{this._labelObject.resetText()}}this._handleLabel()},_applyIcon:function(b,a){this._updateIcon();this._handleIcon()},_applyDisabledIcon:function(b,a){this._updateIcon();this._handleIcon()},_applyIconWidth:function(b,a){if(this._iconObject){this._iconObject.setWidth(b)}},_applyIconHeight:function(b,a){if(this._iconObject){this._iconObject.setHeight(b)}},_iconIsVisible:false,_labelIsVisible:false,_handleLabel:function(){switch(this.getShow()){case $[67]:case"both":case $[165]:this._labelIsVisible=!!this.getLabel();break;default:this._labelIsVisible=false}if(this._labelIsVisible){if(this._labelObject){this._labelObject.setDisplay(true)}else{this._createLabel()}}else{if(this._labelObject){this._labelObject.setDisplay(false)}}},_handleIcon:function(){switch(this.getShow()){case"icon":case"both":case $[165]:this._iconIsVisible=!!this.getIcon();break;default:this._iconIsVisible=false}if(this._iconIsVisible){if(this._iconObject){this._iconObject.setDisplay(true)}else{this._createIcon()}}else{if(this._iconObject){this._iconObject.setDisplay(false)}}}},destruct:function(){this._disposeObjects("_iconObject","_labelObject")}}); |
| rwt.remote.HandlerRegistry.add($[370],{factory:function(b){var c=rwt.remote.HandlerUtil.createStyleMap(b.style);c.MARKUP_ENABLED=b.markupEnabled;var a=new rwt.widgets.Label(c);rwt.remote.HandlerUtil.addStatesForStyles(a,b.style);a.setUserData($[23],true);rwt.remote.HandlerUtil.setParent(a,b.parent);return a},destructor:rwt.remote.HandlerUtil.getControlDestructor(),getDestroyableChildren:rwt.remote.HandlerUtil.getDestroyableChildrenFinder(),properties:rwt.remote.HandlerUtil.extendControlProperties(["text",$[15],$[362],"appearance","leftMargin","topMargin","rightMargin","bottomMargin",$[126]]),propertyHandler:rwt.remote.HandlerUtil.extendControlPropertyHandler({backgroundGradient:rwt.remote.HandlerUtil.getBackgroundGradientHandler()}),listeners:rwt.remote.HandlerUtil.extendControlListeners([]),listenerHandler:rwt.remote.HandlerUtil.extendControlListenerHandler({})}); |
| rwt.qx.Class.define("rwt.widgets.base.Label",{extend:rwt.widgets.base.Terminator,construct:function(a){arguments.callee.base.call(this);if(a!=null){this.setText(a)}this.initWidth();this.initHeight();this.initSelectable();this.initCursor();this.initWrap()},properties:{appearance:{refine:true,init:$[67]},width:{refine:true,init:"auto"},height:{refine:true,init:"auto"},allowStretchX:{refine:true,init:false},allowStretchY:{refine:true,init:false},selectable:{refine:true,init:false},text:{apply:"_applyText",init:"",dispose:true,check:"Label"},wrap:{check:$[2],init:false,nullable:true,apply:$[325]},textAlign:{check:["left",$[24],$[14],"justify"],nullable:true,themeable:true,apply:$[344]},textOverflow:{check:$[2],init:true},mode:{check:["html","text","auto"],init:"auto"}},members:{_content:"",_applyTextAlign:function(b,a){if(b===null){this.removeStyleProperty($[201])}else{this.setStyleProperty($[201],b)}},_applyFont:function(b,a){this._styleFont(b)},_styleFont:function(a){this._invalidatePreferredInnerDimensions();if(a){a.render(this)}else{rwt.html.Font.reset(this)}},_applyTextColor:function(b,a){this._styleTextColor(b)},_styleTextColor:function(a){if(a){this.setStyleProperty($[61],a)}else{this.removeStyleProperty($[61])}},_applyWrap:function(b,a){if(b==null){this.removeStyleProperty("whiteSpace")}else{this.setStyleProperty("whiteSpace",b?$[52]:"nowrap")}},_applyText:function(b,a){this._syncText(this.getText())},_syncText:function(a){this._content=a;if(this._isCreated){this._renderContent()}},_computeObjectNeededDimensions:function(){var c=this._styleProperties;var a=rwt.widgets.util.FontSizeCalculation;var b=a.computeTextDimensions(this._content,c);this._cachedPreferredInnerWidth=b[0];this._cachedPreferredInnerHeight=b[1]},_computePreferredInnerWidth:function(){this._computeObjectNeededDimensions();return this._cachedPreferredInnerWidth},_computePreferredInnerHeight:function(){this._computeObjectNeededDimensions();return this._cachedPreferredInnerHeight},_postApply:function(){var b=this._content;var a=this._getTargetNode();if(b==null){a.innerHTML=""}else{var c=a.style;if(!this.getWrap()){if(this.getInnerWidth()<this.getPreferredInnerWidth()){c.overflow=$[9]}else{c.overflow=""}}a.innerHTML=b}}}}); |
| rwt.qx.Class.define("rwt.widgets.base.Image",{extend:rwt.widgets.base.Terminator,construct:function(c,b,a){arguments.callee.base.call(this);this._blank=rwt.remote.Server.RESOURCE_PATH+$[446];if(c!=null){this.setSource(c)}if(b!=null){this.setWidth(b)}else{this.initWidth()}if(a!=null){this.setHeight(a)}else{this.initHeight()}this.initSelectable()},events:{error:$[11]},properties:{allowStretchX:{refine:true,init:false},allowStretchY:{refine:true,init:false},selectable:{refine:true,init:false},width:{refine:true,init:"auto"},height:{refine:true,init:"auto"},appearance:{refine:true,init:$[15]},source:{check:$[46],apply:$[503],event:$[389],nullable:true,themeable:true},preloader:{check:$[395],apply:"_applyPreloader",nullable:true},loaded:{check:$[2],init:false,apply:"_applyLoaded"},resizeToInner:{check:$[2],init:false}},members:{_onload:function(){this.setLoaded(true)},_beforeAppear:function(){var a=this.getSource();if(a){rwt.html.ImageManager.getInstance().show(a);this._registeredAsVisible=true}return arguments.callee.base.call(this)},_beforeDisappear:function(){var a=this.getSource();if(a&&this._registeredAsVisible){rwt.html.ImageManager.getInstance().hide(a);delete this._registeredAsVisible}return arguments.callee.base.call(this)},_applySource:function(c,a){var b=rwt.html.ImageManager.getInstance();if(a){b.remove(a);if(this._registeredAsVisible){b.hide(a);delete this._registeredAsVisible}}if(c){b.add(c);if(this.isSeeable()){this._registeredAsVisible=true;b.show(c)}}if(this.isCreated()){this._connect()}},_connect:function(){this._syncSource(this.getSource())},_syncSource:function(b){if(b===null){this.setPreloader(null)}else{var a=rwt.html.ImagePreloaderManager.getInstance().create(b);this.setPreloader(a)}},_applyPreloader:function(b,a){if(a){a.removeEventListener("load",this._onload,this)}if(b){this.setLoaded(false);if(!b.isErroneous()&&b.isLoaded()){this.setLoaded(true)}else{b.addEventListener("load",this._onload,this)}}else{this.setLoaded(false)}},_applyLoaded:function(b,a){if(b&&this.isCreated()){this._renderContent()}else{if(!b){this._invalidatePreferredInnerWidth();this._invalidatePreferredInnerHeight()}}},_applyElement:function(c,a){if(c){if(!this._image){try{this._createImageNode();this._image.style.border="0 none";this._image.style.verticalAlign="top";this._image.alt="";this._image.title=""}catch(b){throw new Error("Failed while creating image #1 "+b)}this._imageNodeCreated()}c.appendChild(this._image)}arguments.callee.base.call(this,c,a);if(c&&this.getSource()){this._connect()}},_createImageNode:rwt.util.Variant.select($[0],{webkit:function(){this._image=document.createElement("img")},"default":function(){this._image=new Image()}}),_imageNodeCreated:rwt.util.Variant.select($[0],{"gecko|opera|webkit":function(){this._styleEnabled()},"default":rwt.util.Functions.returnTrue}),_postApply:function(){this._postApplyDimensions();this._updateContent()},_applyEnabled:function(b,a){if(this._image){this._styleEnabled()}return arguments.callee.base.call(this,b,a)},_updateContent:rwt.util.Variant.select($[0],{mshtml:function(){var a=this._image;var b=this.getPreloader();var c=b&&b.isLoaded()?b.getSource():this._blank;if(b&&b.getIsPng()&&this.getEnabled()){a.src=this._blank;a.style.filter=$[366]+c+"',sizingMethod='scale')"}else{a.src=c;a.style.filter=this.getEnabled()?"":"Gray() Alpha(Opacity=30)"}},"default":function(){var a=this.getPreloader();var b=a&&a.isLoaded()?a.getSource():this._blank;this._image.src=b}}),_resetContent:rwt.util.Variant.select($[0],{mshtml:function(){this._image.src=this._blank;this._image.style.filter=""},"default":function(){this._image.src=this._blank}}),_styleEnabled:rwt.util.Variant.select($[0],{mshtml:function(){this._updateContent()},"default":function(){if(this._image){var b=this.getEnabled()===false?0.3:"";var a=this._image.style;a.opacity=a.KhtmlOpacity=a.MozOpacity=b}}}),_computePreferredInnerWidth:function(){var a=this.getPreloader();return a?a.getWidth():0},_computePreferredInnerHeight:function(){var a=this.getPreloader();return a?a.getHeight():0},_postApplyDimensions:rwt.util.Variant.select($[0],{mshtml:function(){try{var b=this._image.style;if(this.getResizeToInner()){b.pixelWidth=this.getInnerWidth();b.pixelHeight=this.getInnerHeight()}else{b.pixelWidth=this.getPreferredInnerWidth();b.pixelHeight=this.getPreferredInnerHeight()}}catch(a){throw new Error($[454]+a)}},"default":function(){try{var b=this._image;if(this.getResizeToInner()){b.width=this.getInnerWidth();b.height=this.getInnerHeight()}else{b.width=this.getPreferredInnerWidth();b.height=this.getPreferredInnerHeight()}}catch(a){throw new Error($[454]+a)}}}),_changeInnerWidth:rwt.util.Variant.select($[0],{mshtml:function(b,a){if(this.getResizeToInner()){this._image.style.pixelWidth=b}},"default":function(b,a){if(this.getResizeToInner()){this._image.width=b}}}),_changeInnerHeight:rwt.util.Variant.select($[0],{mshtml:function(b,a){if(this.getResizeToInner()){this._image.style.pixelHeight=b}},"default":function(b,a){if(this.getResizeToInner()){this._image.height=b}}})},destruct:function(){if(this._image){this._image.style.filter=""}this._disposeFields("_image")}}); |
| rwt.qx.Class.define("rwt.html.ImagePreloaderManager",{type:$[39],extend:rwt.qx.Object,construct:function(){arguments.callee.base.call(this);this._objects={}},members:{add:function(a){this._objects[a.getUri()]=a},remove:function(a){delete this._objects[a.getUri()]},has:function(a){return this._objects[a]!=null},get:function(a){return this._objects[a]},create:function(a){if(this._objects[a]){return this._objects[a]}return new rwt.html.ImagePreloader(a)}},destruct:function(){this._disposeFields("_objects")}}); |
| rwt.qx.Class.define($[395],{extend:rwt.qx.Target,events:{load:$[11],error:$[11]},construct:function(a){if(rwt.html.ImagePreloaderManager.getInstance().has(a)){return rwt.html.ImagePreloaderManager.getInstance().get(a)}arguments.callee.base.call(this);this._element=new Image();this._element.onload=rwt.util.Functions.bind(this.__onload,this);this._element.onerror=rwt.util.Functions.bind(this.__onerror,this);this._source=a;this._element.src=a;this._checkPng();rwt.html.ImagePreloaderManager.getInstance().add(this)},members:{_source:null,_isLoaded:false,_isErroneous:false,getUri:function(){return this._source},getSource:function(){return this._source},isLoaded:function(){return this._isLoaded},isErroneous:function(){return this._isErroneous},_checkPng:rwt.util.Variant.select($[0],{"default":rwt.util.Functions.returnTrue,mshtml:function(){this._isPng=/\.png$/i.test(this._element.nameProp)}}),_isPng:false,getIsPng:function(){return this._isPng},getWidth:rwt.util.Variant.select($[0],{gecko:function(){return this._element.naturalWidth},"default":function(){return this._element.width}}),getHeight:rwt.util.Variant.select($[0],{gecko:function(){return this._element.naturalHeight},"default":function(){return this._element.height}}),__onload:function(){if(this._isLoaded||this._isErroneous){return}this._isLoaded=true;this._isErroneous=false;if(this.hasEventListeners("load")){this.dispatchEvent(new rwt.event.Event("load"),true)}},__onerror:function(){if(this._isLoaded||this._isErroneous){return}this._isLoaded=false;this._isErroneous=true;if(this.hasEventListeners($[134])){this.dispatchEvent(new rwt.event.Event($[134]),true)}}},destruct:function(){if(this._element){this._element.onload=this._element.onerror=null}this._disposeFields("_element","_isLoaded","_isErroneous","_isPng")}}); |
| rwt.qx.Class.define("rwt.widgets.util.Layout",{statics:{ORIENTATION_HORIZONTAL:$[37],ORIENTATION_VERTICAL:$[31],ALIGN_LEFT:"left",ALIGN_LEFT_REVERSED:$[192],ALIGN_CENTER:$[24],ALIGN_CENTER_REVERSED:$[191],ALIGN_RIGHT:$[14],ALIGN_RIGHT_REVERSED:$[528],ALIGN_TOP:"top",ALIGN_TOP_REVERSED:$[190],ALIGN_MIDDLE:$[44],ALIGN_MIDDLE_REVERSED:$[220],ALIGN_BOTTOM:$[32],ALIGN_BOTTOM_REVERSED:$[501]}}); |
| rwt.qx.Class.define("rwt.widgets.base.HorizontalBoxLayout",{extend:rwt.widgets.base.BoxLayout}); |
| rwt.qx.Class.define("rwt.widgets.base.Spinner",{extend:rwt.widgets.base.HorizontalBoxLayout,construct:function(c,b,a){arguments.callee.base.call(this);if(rwt.client.Client.isMshtml()){this.setStyleProperty($[184],"0px")}this._textfield=new rwt.widgets.base.BasicText();this._textfield.setBorder(null);this._textfield.setWidth("1*");this._textfield.setAllowStretchY(true);this._textfield.setHeight(null);this._textfield.setVerticalAlign($[44]);this._textfield.setAppearance("spinner-text-field");this.add(this._textfield);this._buttonlayout=new rwt.widgets.base.VerticalBoxLayout();this._buttonlayout.setWidth("auto");this.add(this._buttonlayout);this._upbutton=new rwt.widgets.base.Button();this._upbutton.setAppearance("spinner-button-up");this._upbutton.setTabIndex(null);this._upbutton.setHeight("1*");this._buttonlayout.add(this._upbutton);this._downbutton=new rwt.widgets.base.Button();this._downbutton.setAppearance("spinner-button-down");this._downbutton.setTabIndex(null);this._downbutton.setHeight("1*");this._buttonlayout.add(this._downbutton);this._timer=new rwt.client.Timer(this.getInterval());this.setManager(new rwt.util.Range());this.initWrap();this.addEventListener($[4],this._onkeypress,this);this.addEventListener($[10],this._onkeydown,this);this.addEventListener($[34],this._onkeyup,this);this.addEventListener($[43],this._onmousewheel,this);this._textfield.addEventListener($[118],this._ontextchange,this);this._textfield.addEventListener($[77],this._oninput,this);this._textfield.addEventListener("blur",this._onblur,this);this._upbutton.addEventListener($[1],this._onmousedown,this);this._downbutton.addEventListener($[1],this._onmousedown,this);this._timer.addEventListener($[27],this._oninterval,this);if(c!=null){this.setMin(c)}if(a!=null){this.setMax(a)}if(b!=null){this.setValue(b)}this._checkValue=this.__checkValue;this.initWidth();this.initHeight();this._last_value=""},events:{change:$[50]},properties:{appearance:{refine:true,init:"spinner"},width:{refine:true,init:60},height:{refine:true,init:22},incrementAmount:{check:$[54],init:1,apply:"_applyIncrementAmount"},wheelIncrementAmount:{check:$[54],init:1},pageIncrementAmount:{check:$[54],init:10},interval:{check:$[18],init:100},firstInterval:{check:$[18],init:500},minTimer:{check:$[18],init:20},timerDecrease:{check:$[18],init:2},amountGrowth:{check:$[54],init:1.01},wrap:{check:$[2],init:false,apply:$[325]},editable:{check:$[2],init:true,apply:"_applyEditable"},manager:{check:$[486],apply:$[367],dispose:true},checkValueFunction:{apply:"_applyCheckValueFunction"},selectTextOnInteract:{check:$[2],init:true}},members:{_applyIncrementAmount:function(b,a){this._computedIncrementAmount=b},_applyEditable:function(b,a){if(this._textfield){this._textfield.setReadOnly(!b)}},_applyWrap:function(b,a){this.getManager().setWrap(b);this._onchange()},_applyManager:function(b,a){if(a){a.removeEventListener($[57],this._onchange,this)}if(b){b.addEventListener($[57],this._onchange,this)}this._onchange()},_applyCheckValueFunction:function(b,a){this._checkValue=b},_computePreferredInnerWidth:function(){return 50},_computePreferredInnerHeight:function(){return 14},_onkeypress:function(b){var a=b.getKeyIdentifier();if(a==$[49]&&!b.isAltPressed()){this._checkValue(true,false);if(this.getSelectTextOnInteract()){this._textfield.selectAll()}}else{switch(a){case"Up":case"Down":case"Left":case $[35]:case"Shift":case $[283]:case"Alt":case $[105]:case"Delete":case $[321]:case"Insert":case"Home":case"End":case $[40]:case $[45]:case"NumLock":case"Tab":break;default:if((a>="0"&&a<="9")||(a=="-")){return}if(b.getModifiers()===0){b.preventDefault()}}}},_onkeydown:function(b){var a=b.getKeyIdentifier();if(this._intervalIncrease==null){switch(a){case"Up":case"Down":this._intervalIncrease=a=="Up";this._intervalMode="single";this._resetIncrements();this._checkValue(true,false);this._increment();this._timer.startWith(this.getFirstInterval());break;case $[40]:case $[45]:this._intervalIncrease=a==$[40];this._intervalMode="page";this._resetIncrements();this._checkValue(true,false);this._pageIncrement();this._timer.startWith(this.getFirstInterval());break}}},_onkeyup:function(a){if(this._intervalIncrease!=null){switch(a.getKeyIdentifier()){case"Up":case"Down":case $[40]:case $[45]:this._timer.stop();this._intervalIncrease=null;this._intervalMode=null}}},_onmousedown:function(b){if(!b.isLeftButtonPressed()){return}this._checkValue(true);var a=b.getCurrentTarget();a.addState($[12]);a.addEventListener($[5],this._onmouseup,this);a.addEventListener($[6],this._onmouseup,this);this._intervalIncrease=a==this._upbutton;this._resetIncrements();this._increment();if(this.getSelectTextOnInteract()){this._textfield.selectAll()}this._timer.setInterval(this.getFirstInterval());this._timer.start()},_onmouseup:function(b){var a=b.getCurrentTarget();a.removeState($[12]);a.removeEventListener($[5],this._onmouseup,this);a.removeEventListener($[6],this._onmouseup,this);if(this.getSelectTextOnInteract()){this._textfield.selectAll()}this._textfield.setFocused(true);this._timer.stop();this._intervalIncrease=null},_onmousewheel:function(b){this._checkValue(true);if(this.getManager().incrementValue){this.getManager().incrementValue(this.getWheelIncrementAmount()*b.getWheelDelta())}else{var a=this.getManager().getValue()+(this.getWheelIncrementAmount()*b.getWheelDelta());a=this.getManager().limit(a);this.getManager().setValue(a)}this._textfield.selectAll();b.preventDefault();b.stopPropagation()},_ontextchange:function(a){this._last_value=a.getOldValue()},_oninput:function(a){this._checkValue(true,true)},_onchange:function(b){var a=this.getManager().getValue();this._textfield.setValue(String(a));if(a==this.getMin()&&!this.getWrap()){this._downbutton.removeState($[12]);this._downbutton.setEnabled(false);this._timer.stop()}else{this._downbutton.resetEnabled()}if(a==this.getMax()&&!this.getWrap()){this._upbutton.removeState($[12]);this._upbutton.setEnabled(false);this._timer.stop()}else{this._upbutton.resetEnabled()}this.createDispatchDataEvent($[57],a)},_onblur:function(a){this._checkValue(false)},setValue:function(a){this.getManager().setValue(this.getManager().limit(a))},getValue:function(){this._checkValue(true);return this.getManager().getValue()},resetValue:function(){this.getManager().resetValue()},setMax:function(a){return this.getManager().setMax(a)},getMax:function(){return this.getManager().getMax()},setMin:function(a){return this.getManager().setMin(a)},getMin:function(){return this.getManager().getMin()},_intervalIncrease:null,_oninterval:function(b){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._computedIncrementAmount=this.getAmountGrowth()*this._computedIncrementAmount}this._increment()}var a=this.getManager().getWrap();switch(this._intervalIncrease){case true:if(!(this.getValue()==this.getMax()&&!a)){this._timer.restartWith(this.getInterval())}break;case false:if(!(this.getValue()==this.getMin()&&!a)){this._timer.restartWith(this.getInterval())}break}},__checkValue:function(i,c){var b=this._textfield.getInputElement();if(!b){return}if((b.value==="")||(b.value==="-")){if(!i){this.resetValue();return}}else{var h=b.value;var g;g=h;var d=parseFloat(g);var e=this.getManager().limit(d);var a=this.getManager().getValue();var j=e;if(isNaN(d)||(e!=d)||(d!=g)){if(c){this._textfield.setValue(this._last_value)}else{if(isNaN(e)){j=a}else{j=e}}}if(c){return}var f;f=String(j);if((j===a)&&(h!==f)){this._textfield.setValue(f)}this.getManager().setValue(j)}},_increment:function(){if(this.getManager().incrementValue){this.getManager().incrementValue((this._intervalIncrease?1:-1)*this._computedIncrementAmount)}else{var a=this.getManager().getValue()+((this._intervalIncrease?1:-1)*this._computedIncrementAmount);a=this.getManager().limit(a);this.getManager().setValue(a)}},_pageIncrement:function(){if(this.getManager().pageIncrementValue){this.getManager().pageIncrementValue()}else{var a=this.getManager().getValue()+((this._intervalIncrease?1:-1)*this.getPageIncrementAmount());a=this.getManager().limit(a);this.getManager().setValue(a)}},_resetIncrements:function(){this._computedIncrementAmount=this.getIncrementAmount();this.resetInterval()}},destruct:function(){var a=this.getManager();if(a){a.dispose()}this._disposeObjects("_textfield","_buttonlayout","_upbutton","_downbutton","_timer")}}); |
| rwt.qx.Class.define($[378],{extend:rwt.widgets.base.Terminator,construct:function(a){arguments.callee.base.call(this);if(a!=null){this.setValue(a)}this.initHideFocus();this.initWidth();this.initHeight();this.initTabIndex();this._selectionStart=0;this._selectionLength=0;this.__oninput=rwt.util.Functions.bindEvent(this._oninputDom,this);this.addEventListener("blur",this._onblur);this.addEventListener($[10],this._onkeydown);this.addEventListener($[4],this._onkeypress);this.addEventListener($[34],this._onkeyup,this);this.addEventListener($[1],this._onMouseDownUp,this);this.addEventListener($[5],this._onMouseDownUp,this);this._updateLineHeight();this._typed=null;this._selectionNeedsUpdate=false;this._applyBrowserFixes();this._inputOverflow=$[9]},destruct:function(){if(this._inputElement!=null){if(rwt.client.Client.isMshtml()){this._inputElement.onpropertychange=null}else{this._inputElement.removeEventListener($[77],this.__oninput,false)}}this._inputElement=null;this.__font=null;if(this._checkTimer){this._checkTimer.dispose();this._checkTimer=null}},events:{input:$[50]},properties:{allowStretchX:{refine:true,init:true},allowStretchY:{refine:true,init:false},appearance:{refine:true,init:"text-field"},tabIndex:{refine:true,init:1},hideFocus:{refine:true,init:true},width:{refine:true,init:"auto"},height:{refine:true,init:"auto"},selectable:{refine:true,init:true},value:{init:"",nullable:true,event:$[118],apply:"_applyValue",dispose:true},textAlign:{check:["left",$[24],$[14],"justify"],nullable:true,themeable:true,apply:$[344]},maxLength:{check:$[18],apply:"_applyMaxLength",nullable:true},readOnly:{check:$[2],apply:"_applyReadOnly",init:false,event:"changeReadOnly"}},members:{_LINE_HEIGT_FACTOR:1.2,_inputTag:$[77],_inputType:"text",_inputElement:null,setSelection:function(a){this._selectionStart=a[0];this._selectionLength=a[1]-a[0];this._renderSelection()},getSelection:function(){return[this._selectionStart,this._selectionStart+this._selectionLength]},getComputedSelection:function(){var b=this._getSelectionStart();var a=this._getSelectionLength();return[b,b+a]},getComputedValue:function(){var a;if(this._inputElement!=null){a=this._inputElement.value}else{a=this.getValue()}return a},getInputElement:function(){return this._inputElement||null},_renderSelection:function(){if(this.isCreated()&&this.getFocused()){this._setSelectionStart(this._selectionStart);this._setSelectionLength(this._selectionLength);this._selectionNeedsUpdate=false}},_detectSelectionChange:function(){if(this._isCreated){var b=this._getSelectionStart();var a=this._getSelectionLength();if(typeof b===$[8]){b=0}if(typeof a===$[8]){a=0}if(this._selectionStart!==b||this._selectionLength!==a){this._handleSelectionChange(b,a)}}},_handleSelectionChange:function(b,a){this._selectionStart=b;this._selectionLength=a},_setSelectionStart:rwt.util.Variant.select($[0],{mshtml:function(d){this._visualPropertyCheck();var c=this._inputElement.value;var b=0;while(b<d){b=c.indexOf("\r\n",b);if(b===-1){break}d--;b++}var a=this._inputElement.createTextRange();a.collapse();a.move("character",d);a.select()},gecko:function(b){this._visualPropertyCheck();try{this._inputElement.selectionStart=b}catch(a){}},"default":function(a){this._visualPropertyCheck();if(this._inputElement.selectionStart!==a){this._inputElement.selectionStart=a}}}),_getSelectionStart:rwt.util.Variant.select($[0],{mshtml:function(){this._visualPropertyCheck();var d=window.document.selection.createRange();if(!this._inputElement.contains(d.parentElement())){return -1}var b=this._inputElement.createTextRange();var a=b.duplicate();a.moveToBookmark(d.getBookmark());b.setEndPoint("EndToStart",a);var c=d.text.replace(/[\r\n]/g,".");var e=this._inputElement.value.replace(/[\r\n]/g,".");return e.indexOf(c,b.text.length)},gecko:function(){this._visualPropertyCheck();var c=this._inputElement;var a;try{if(this.isValidString(c.value)){a=c.selectionStart}else{a=0}}catch(b){a=0}return a},"default":function(){this._visualPropertyCheck();return this._inputElement.selectionStart}}),_setSelectionLength:rwt.util.Variant.select($[0],{mshtml:function(b){this._visualPropertyCheck();var a=window.document.selection.createRange();if(!this._inputElement.contains(a.parentElement())){return}a.collapse();a.moveEnd("character",b);a.select()},gecko:function(c){this._visualPropertyCheck();var b=this._inputElement;try{if(this.isValidString(b.value)){b.selectionEnd=b.selectionStart+c}}catch(a){}},"default":function(c){this._visualPropertyCheck();var b=this._inputElement;if(this.isValidString(b.value)){var a=b.selectionStart+c;if(b.selectionEnd!=a){b.selectionEnd=b.selectionStart+c}}}}),_getSelectionLength:rwt.util.Variant.select($[0],{mshtml:function(){this._visualPropertyCheck();var a=window.document.selection.createRange();if(!this._inputElement.contains(a.parentElement())){return 0}return a.text.length},gecko:function(){this._visualPropertyCheck();var b=this._inputElement;try{return b.selectionEnd-b.selectionStart}catch(a){}},"default":function(){this._visualPropertyCheck();var a=this._inputElement;return a.selectionEnd-a.selectionStart}}),selectAll:function(){this._visualPropertyCheck();if(this.getValue()!=null){this._setSelectionStart(0);this._setSelectionLength(this._inputElement.value.length)}this._inputElement.select();if(this.isEnabled()&&this.isSeeable()){this._inputElement.focus()}this._detectSelectionChange()},_applyElement:function(c,b){arguments.callee.base.call(this,c,b);if(c){this._inputElement=document.createElement(this._inputTag);if(this._inputType){this._inputElement.type=this._inputType}this._inputElement.autoComplete="off";this._inputElement.setAttribute("autoComplete","off");this._inputElement.disabled=this.getEnabled()===false;this._inputElement.readOnly=this.getReadOnly();if(rwt.client.Client.isMshtml()){if(this.getValue()!=null&&this.getValue()!==""){this._inputElement.value=this.getValue()}else{this._inputElement.value=" "}}else{this._inputElement.value=this.getValue()!=null?this.getValue().toString():""}if(this.getMaxLength()!=null){this._inputElement.maxLength=this.getMaxLength()}var a=this._inputElement.style;a.padding=0;a.margin=0;a.border="0 none";a.background=$[80];a.overflow=this._inputOverflow;a.outline="none";a.resize="none";a.WebkitAppearance="none";a.MozAppearance="none";this._renderFont();this._renderTextColor();this._renderTextAlign();this._renderCursor();this._renderTextShadow();this._textInit();this._getTargetNode().appendChild(this._inputElement);this._updateLineHeight()}},_textInit:rwt.util.Variant.select($[0],{"default":function(){this._inputElement.style.margin="1px 0 1px -1px";this._inputElement.addEventListener($[77],this.__oninput,false);this._applyBrowserFixesOnCreate()},mshtml:function(){this._inputElement.onpropertychange=this.__oninput}}),_postApply:function(){this._syncFieldWidth();this._syncFieldHeight()},_changeInnerWidth:function(b,a){this._syncFieldWidth()},_changeInnerHeight:function(b,a){this._syncFieldHeight();this._centerFieldVertically()},_syncFieldWidth:function(){this._inputElement.style.width=Math.max(2,this.getInnerWidth())+"px"},_syncFieldHeight:function(){if(this._inputTag!==$[77]){this._inputElement.style.height=Math.max(0,this.getInnerHeight()-2)+"px"}},_applyCursor:function(b,a){if(this._inputElement!=null){this._renderCursor()}},_renderCursor:function(){var a=this._inputElement.style;var b=this.getCursor();if(b){if(b===$[150]&&rwt.client.Client.isMshtml()){a.cursor="hand"}else{a.cursor=b}}else{a.cursor=""}},_applyTextAlign:function(b,a){if(this._inputElement){this._renderTextAlign()}},_renderTextAlign:function(){this._inputElement.style.textAlign=this.getTextAlign()||""},_applyEnabled:function(b,a){if(this._inputElement!=null){this._inputElement.disabled=b===false}return arguments.callee.base.call(this,b,a)},_applyValue:function(b,a){this._renderValue();this._detectSelectionChange()},_renderValue:function(){this._inValueProperty=true;var a=this.getValue();if(this._inputElement!=null){if(a===null){a=""}if(this._inputElement.value!==a){this._inputElement.value=a}}delete this._inValueProperty},_applyMaxLength:function(b,a){if(this._inputElement){this._inputElement.maxLength=b==null?"":b}},_applyReadOnly:function(b,a){if(this._inputElement){this._inputElement.readOnly=b}if(b){this.addState($[299])}else{this.removeState($[299])}},_applyTextColor:function(b,a){this._styleTextColor(b)},_styleTextColor:function(a){this.__textColor=a;this._renderTextColor()},_renderTextColor:function(){if(this._inputElement!=null){this._inputElement.style.color=this.__textColor||""}},_applyFont:function(b,a){this._styleFont(b);this._updateLineHeight()},_styleFont:function(a){this.__font=a;this._renderFont()},_renderFont:function(){if(this._inputElement!=null){if(this.__font!=null){this.__font.renderElement(this._inputElement)}else{rwt.html.Font.resetElement(this._inputElement)}}},_updateLineHeight:function(){if(this._inputElement!=null){var b=this.getFont();var a=Math.floor(b.getSize()*this._LINE_HEIGT_FACTOR);this._inputElement.style.lineHeight=a+"px"}},_applyTextShadow:function(b,a){this.__textShadow=b;if(this._inputElement){this._renderTextShadow()}},_renderTextShadow:function(){rwt.html.Style.setTextShadow(this._inputElement,this.__textShadow)},_visualizeFocus:function(){arguments.callee.base.call(this);if(!rwt.widgets.util.FocusHandler.blockFocus){try{this._inputElement.focus()}catch(a){}}},_visualizeBlur:function(){arguments.callee.base.call(this);try{this._inputElement.blur()}catch(a){}},_afterAppear:function(){arguments.callee.base.call(this);this._applyBrowserFixesOnAppear();this._centerFieldVertically();this._renderSelection()},_centerFieldVertically:function(){if(this._inputTag===$[77]&&this._inputElement){var c=this.getInnerHeight();var a=this._getInputElementHeight();if(a!==0){var b=(c-a)/2-1;if(b<0){b=0}b=Math.floor(b);this.setStyleProperty($[149],b+"px")}}},_getInputElementHeight:rwt.util.Variant.select($[0],{mshtml:function(){var a=this._inputElement.offsetHeight;if(a!==0){a-=2}return a},"default":function(){return this._inputElement.offsetHeight}}),_oninputDom:rwt.util.Variant.select($[0],{mshtml:function(a){if(!this._inValueProperty&&a.propertyName==="value"){this._oninput()}},"default":function(a){this._oninput()}}),_oninput:function(){try{var b=this.getComputedValue().toString();var c=true;if(this.hasEventListeners($[77])){c=this.dispatchEvent(new rwt.event.DataEvent($[77],this._typed),true)}if(c){this.setValue(b)}else{if(rwt.client.Client.isWebkit()||rwt.client.Client.isMshtml()){rwt.client.Timer.once(this._renderSelection,this,0);this._selectionNeedsUpdate=true}}}catch(a){rwt.runtime.ErrorHandler.processJavaScriptError(a)}},_ontabfocus:function(){this.selectAll()},_applyFocused:function(b,a){arguments.callee.base.call(this,b,a);if(!rwt.widgets.util.FocusHandler.mouseFocus){this._renderSelection()}},_onblur:function(){if(this.getParent()!=null){this._setSelectionLength(0)}},_onkeydown:function(a){if(a.getKeyIdentifier()==$[321]&&this.getReadOnly()){a.preventDefault()}this._detectSelectionChange();this._typed=null},_onkeypress:function(a){if(a.getKeyIdentifier()!=="Tab"){a.stopPropagation()}if(this._selectionNeedsUpdate){this._renderSelection()}this._detectSelectionChange();this._typed=String.fromCharCode(a.getCharCode())},_onkeyup:function(a){if(this._selectionNeedsUpdate){this._renderSelection()}this._detectSelectionChange();this._typed=null},_onMouseDownUp:function(a){this._detectSelectionChange();this._typed=null},_applyBrowserFixes:rwt.util.Variant.select($[0],{"default":function(){},newmshtml:function(){this._checkTimer=new rwt.client.Timer(0);this._checkTimer.addEventListener($[27],this._checkValueChanged,this);this.addEventListener($[4],this._checkTimer.start,this._checkTimer);this.addEventListener($[34],this._checkTimer.start,this._checkTimer);this.addEventListener($[28],this._checkValueChanged,this);this.addEventListener($[6],this._checkValueChanged,this);this.addEventListener("blur",this._checkValueChanged,this)}}),_checkValueChanged:function(){this._checkTimer.stop();var b=this.getComputedValue();var a=this.getValue();if(b!==a){this._oninput()}},_applyBrowserFixesOnAppear:rwt.util.Variant.select($[0],{"default":function(){},mshtml:function(){if(this._firstInputFixApplied!==true&&this._inputElement){rwt.client.Timer.once(this._ieFirstInputFix,this,1)}}}),_ieFirstInputFix:function(){if(!this.isDisposed()){this._inValueProperty=true;this._inputElement.value=this.getValue()===null?"":this.getValue().toString();this._renderSelection();this._firstInputFixApplied=true;delete this._inValueProperty}},_applyBrowserFixesOnCreate:rwt.util.Variant.select($[0],{"default":function(){},webkit:function(){this.addEventListener($[10],this._preventEnter,this);this.addEventListener($[4],this._preventEnter,this);this.addEventListener($[34],this._preventEnter,this)}}),_preventEnter:function(a){if(a.getKeyIdentifier()===$[49]){a.preventDefault()}},isValidString:function(a){return typeof a===$[7]&&a!==""}}}); |
| rwt.qx.Class.define("rwt.widgets.base.VerticalBoxLayout",{extend:rwt.widgets.base.BoxLayout,properties:{orientation:{refine:true,init:$[31]}}}); |
| rwt.qx.Class.define($[292],{extend:rwt.widgets.base.Atom,construct:function(e,d,c,a,b){arguments.callee.base.call(this,e,d,c,a,b);this.initTabIndex();this.addEventListener($[3],this._onmouseover);this.addEventListener($[6],this._onmouseout);this.addEventListener($[1],this._onmousedown);this.addEventListener($[5],this._onmouseup);this.addEventListener($[10],this._onkeydown);this.addEventListener($[34],this._onkeyup)},properties:{appearance:{refine:true,init:"button"},tabIndex:{refine:true,init:1}},members:{_onmouseover:function(a){if(a.getTarget()!=this){return}if(this.hasState($[29])){this.removeState($[29]);this.addState($[12])}this.addState("over")},_onmouseout:function(a){if(a.getTarget()!=this){return}this.removeState("over");if(this.hasState($[12])){this.setCapture(true);this.removeState($[12]);this.addState($[29])}},_onmousedown:function(a){if(a.getTarget()!=this||!a.isLeftButtonPressed()){return}this.removeState($[29]);this.addState($[12])},_onmouseup:function(b){this.setCapture(false);var a=this.hasState($[12]);var c=this.hasState($[29]);if(a){this.removeState($[12])}if(c){this.removeState($[29])}if(!c){this.addState("over");if(a){this.execute()}}},_onkeydown:function(a){switch(a.getKeyIdentifier()){case $[49]:case $[78]:this.removeState($[29]);this.addState($[12]);a.stopPropagation()}},_onkeyup:function(a){switch(a.getKeyIdentifier()){case $[49]:case $[78]:if(this.hasState($[12])){this.removeState($[29]);this.removeState($[12]);this.execute();a.stopPropagation()}}}}}); |
| rwt.qx.Class.define($[486],{extend:rwt.qx.Target,events:{change:$[11]},properties:{value:{check:"!isNaN(value)&&value>=this.getMin()&&value<=this.getMax()",nullable:true,event:$[57],init:0},precision:{check:$[18],nullable:true,event:$[57],init:0},min:{check:$[54],apply:"_applyMin",event:$[57],init:0},max:{check:$[54],apply:"_applyMax",event:$[57],init:100},wrap:{check:$[2],init:false}},members:{_applyMax:function(b,a){this.setValue(Math.min(this.getValue(),b))},_applyMin:function(b,a){this.setValue(Math.max(this.getValue(),b))},limit:function(c){var a=this.getPrecision();if(a!=null){var b=Math.pow(10,a)}if(this.getWrap()){if(a!=null){var c=Math.round(c*b)/b}if(c<this.getMin()){return(this.getMax()-(this.getMin()-c))+1}if(c>this.getMax()){return(this.getMin()+(c-this.getMax()))-1}}if(c<this.getMin()){return this.getMin()}if(c>this.getMax()){return this.getMax()}if(a!=null){return Math.round(c*b)/b}else{return c}}}}); |
| rwt.qx.Class.define($[305],{extend:rwt.widgets.base.BoxLayout,construct:function(){arguments.callee.base.call(this);this.addEventListener($[280],rwt.widgets.util.TabUtil.onTabFolderChangeFocused);this.addEventListener($[4],rwt.widgets.util.TabUtil.onTabFolderKeyPress);this._bar=new rwt.widgets.base.TabFolderBar();this._pane=new rwt.widgets.base.TabFolderPane();this.add(this._bar,this._pane)},properties:{appearance:{refine:true,init:"tab-view"},orientation:{refine:true,init:$[31]},alignTabsToLeft:{check:$[2],init:true,apply:"_applyAlignTabsToLeft"},placeBarOnTop:{check:$[2],init:true,apply:"_applyPlaceBarOnTop"}},members:{getPane:function(){return this._pane},getBar:function(){return this._bar},_applyAlignTabsToLeft:function(c,b){var a=this._bar;a.setHorizontalChildrenAlign(c?"left":$[14]);a._addChildrenToStateQueue()},_applyPlaceBarOnTop:function(c,b){var a=this._bar;if(c){a.moveSelfToBegin()}else{a.moveSelfToEnd()}a._addChildrenToStateQueue()}},destruct:function(){this._disposeObjects("_bar","_pane")}}); |
| rwt.qx.Class.define($[447],{extend:rwt.qx.Target,construct:function(a,b){arguments.callee.base.call(this);this._items=[];this.setName(a!=null?a:rwt.widgets.util.RadioManager.AUTO_NAME_PREFIX+this.toHashCode());if(b!=null){this.add.apply(this,b)}},statics:{AUTO_NAME_PREFIX:"qx-radio-"},properties:{selected:{nullable:true,apply:"_applySelected",event:"changeSelected",check:$[484]},name:{check:$[46],nullable:true,apply:"_applyName"}},members:{getItems:function(){return this._items},getEnabledItems:function(){var c=[];for(var f=0,e=this._items,d=e.length;f<d;f++){if(e[f].getEnabled()){c.push(e[f])}}return c},handleItemChecked:function(b,a){if(a){this.setSelected(b)}else{if(this.getSelected()==b){this.setSelected(null)}}},add:function(b){var a=arguments;var e=a.length;var d;for(var c=0;c<e;c++){d=a[c];if(rwt.util.Arrays.contains(this._items,d)){return}this._items.push(d);d.setManager(this);if(d.getChecked()){this.setSelected(d)}d.setName(this.getName())}},remove:function(a){rwt.util.Arrays.remove(this._items,a);a.setManager(null);if(a.getChecked()){this.setSelected(null)}},_applySelected:function(b,a){if(a){a.setChecked(false)}if(b){b.setChecked(true)}},_applyName:function(e,a){for(var c=0,b=this._items,d=b.length;c<d;c++){b[c].setName(e)}},selectNext:function(d){var a=this._items.indexOf(d);if(a==-1){return}var b=0;var c=this._items.length;a=(a+1)%c;while(b<c&&!this._items[a].getEnabled()){a=(a+1)%c;b++}this._selectByIndex(a)},selectPrevious:function(d){var a=this._items.indexOf(d);if(a==-1){return}var b=0;var c=this._items.length;a=(a-1+c)%c;while(b<c&&!this._items[a].getEnabled()){a=(a-1+c)%c;b++}this._selectByIndex(a)},_selectByIndex:function(a){if(this._items[a].getEnabled()){this.setSelected(this._items[a]);this._items[a].setFocused(true)}}},destruct:function(){this._disposeObjectDeep("_items",1)}}); |
| rwt.qx.Class.define("rwt.widgets.base.TabFolderBar",{extend:rwt.widgets.base.BoxLayout,construct:function(){arguments.callee.base.call(this);this.initZIndex();this.initHeight();this._manager=new rwt.widgets.util.RadioManager()},properties:{appearance:{refine:true,init:"tab-view-bar"},zIndex:{refine:true,init:2},height:{refine:true,init:"auto"}},members:{getManager:function(){return this._manager}},destruct:function(){this._disposeObjects($[287])}}); |
| rwt.qx.Class.define("rwt.widgets.base.TabFolderPane",{extend:rwt.widgets.base.Parent,construct:function(){arguments.callee.base.call(this);this.initZIndex();this.initHeight()},properties:{appearance:{refine:true,init:"tab-view-pane"},zIndex:{refine:true,init:1},height:{refine:true,init:"1*"}}}); |
| rwt.qx.Class.define("rwt.widgets.base.Popup",{extend:rwt.widgets.base.Parent,construct:function(){arguments.callee.base.call(this);this.setZIndex(this._minZIndex);if(this._isFocusRoot){this.activateFocusRoot()}this.initHeight();this.initWidth()},properties:{appearance:{refine:true,init:"popup"},width:{refine:true,init:"auto"},height:{refine:true,init:"auto"},display:{refine:true,init:false},autoHide:{check:$[2],init:true},centered:{check:$[2],init:false},restrictToPageOnOpen:{check:$[2],init:true},restrictToPageLeft:{check:$[18],init:0},restrictToPageRight:{check:$[18],init:0},restrictToPageTop:{check:$[18],init:0},restrictToPageBottom:{check:$[18],init:0}},members:{_isFocusRoot:true,_showTimeStamp:(new Date(0)).valueOf(),_hideTimeStamp:(new Date(0)).valueOf(),_beforeAppear:function(){arguments.callee.base.call(this);if(this.getRestrictToPageOnOpen()){this._wantedLeft=this.getLeft();if(this._wantedLeft!=null){this.setLeft(10000);if(this.getElement()!=null){this.getElement().style.left=10000}}}rwt.widgets.util.PopupManager.getInstance().add(this);rwt.widgets.util.PopupManager.getInstance().update(this);this._showTimeStamp=(new Date()).valueOf();this.bringToFront()},_beforeDisappear:function(){arguments.callee.base.call(this);rwt.widgets.util.PopupManager.getInstance().remove(this);this._hideTimeStamp=(new Date()).valueOf()},_afterAppear:function(){arguments.callee.base.call(this);if(this.getRestrictToPageOnOpen()){var l=rwt.widgets.base.ClientDocument.getInstance();var h=l.getClientWidth();var p=l.getClientHeight();var b=rwt.html.Viewport.getScrollTop();var f=rwt.html.Viewport.getScrollLeft();var n=this.getRestrictToPageLeft()+f;var i=this.getRestrictToPageRight()-f;var j=this.getRestrictToPageTop()+b;var c=this.getRestrictToPageBottom()-b;var d=(this._wantedLeft==null)?this.getLeft():this._wantedLeft;var k=this.getTop();var a=this.getBoxWidth();var m=this.getBoxHeight();var e=this.getLeft();var g=k;if(d+a>h-i){d=h-i-a}if(k+m>p-c){k=p-c-m}if(d<n){d=n}if(k<j){k=j}if(d!=e||k!=g){var o=this;window.setTimeout(function(){o.setLeft(d);o.setTop(k)},0)}}},_makeActive:function(){this.getFocusRoot().setActiveChild(this)},_makeInactive:function(){var a=this.getFocusRoot();var b=a.getActiveChild();if(b==this){a.setActiveChild(a)}},_minZIndex:1000000,bringToFront:function(){this.setZIndex(this._minZIndex+1000000);this._sendTo()},sendToBack:function(){this.setZIndex(this._minZIndex+1);this._sendTo()},_sendTo:function(){var d=rwt.util.Objects.getValues(rwt.widgets.util.PopupManager.getInstance().getAll());var g=function(j,i){return j.getZIndex()-i.getZIndex()};if(rwt.event.EventHandler.getMenuManager()!=null){var c=rwt.event.EventHandler.getMenuManager();var f=rwt.util.Objects.getValues(c.getAll());var h=d.concat(f).sort(g)}else{var h=d.sort(g)}var e=h.length;var a=this._minZIndex;for(var b=0;b<e;b++){h[b].setZIndex(a++)}},getShowTimeStamp:function(){return this._showTimeStamp},getHideTimeStamp:function(){return this._hideTimeStamp},positionRelativeTo:function(c,a,d){if(c instanceof rwt.widgets.base.Widget){c=c.getElement()}if(c){var b=rwt.html.Location.get(c);this.setLocation(b.left+(a||0),b.top+(d||0))}else{throw new Error("Missing reference element")}},centerToBrowser:function(){var c=rwt.widgets.base.ClientDocument.getInstance();var b=(c.getClientWidth()-this.getBoxWidth())/2;var a=(c.getClientHeight()-this.getBoxHeight())/2;this.setLeft(b<0?0:b);this.setTop(a<0?0:a)}},destruct:function(){rwt.widgets.util.PopupManager.getInstance().remove(this);this._disposeFields("_showTimeStamp","_hideTimeStamp")}}); |
| rwt.qx.Class.define($[288],{type:$[39],extend:rwt.util.ObjectManager,construct:function(){arguments.callee.base.call(this)},members:{update:function(c){if(!(c instanceof rwt.widgets.base.Widget)){c=null}var a,b;var d=this.getAll();for(b in d){a=d[b];if(!a.getAutoHide()||c==a||a.contains(c)){continue}if(rwt.qx.Class.isDefined($[272])&&c instanceof rwt.widgets.base.ToolTip&&!(a instanceof rwt.widgets.base.ToolTip)){continue}a.hide()}}}}); |
| rwt.qx.Class.define("rwt.widgets.util.SelectionManager",{extend:rwt.qx.Target,construct:function(a){arguments.callee.base.call(this);this._selectedItems=new rwt.widgets.util.Selection(this);if(a!=null){this.setBoundedWidget(a)}},events:{changeSelection:$[50]},properties:{boundedWidget:{check:$[129],nullable:true},multiSelection:{check:$[2],init:true},dragSelection:{check:$[2],init:true},canDeselect:{check:$[2],init:true},fireChange:{check:$[2],init:true},anchorItem:{check:$[187],nullable:true,apply:"_applyAnchorItem",event:"changeAnchorItem"},leadItem:{check:$[187],nullable:true,apply:"_applyLeadItem",event:$[294]},multiColumnSupport:{check:$[2],init:false}},members:{_applyAnchorItem:function(b,a){if(a){this.renderItemAnchorState(a,false)}if(b){this.renderItemAnchorState(b,true)}},_applyLeadItem:function(b,a){if(a){this.renderItemLeadState(a,false)}if(b){this.renderItemLeadState(b,true)}},_getFirst:function(){return this.getBoundedWidget().getFirstVisibleChild()},_getLast:function(){return this.getBoundedWidget().getLastVisibleChild()},getFirst:function(){var a=this._getFirst();if(a){return a.getEnabled()?a:this.getNext(a)}},getLast:function(){var a=this._getLast();if(a){return a.getEnabled()?a:this.getPrevious(a)}},getItems:function(){return this.getBoundedWidget().getChildren()},getNextSibling:function(a){return a.getNextSibling()},getPreviousSibling:function(a){return a.getPreviousSibling()},getNext:function(a){while(a){a=this.getNextSibling(a);if(!a){break}if(this.getItemEnabled(a)){return a}}return null},getPrevious:function(a){while(a){a=this.getPreviousSibling(a);if(!a){break}if(this.getItemEnabled(a)){return a}}return null},isBefore:function(b,a){var c=this.getItems();return c.indexOf(b)<c.indexOf(a)},isEqual:function(b,a){return b==a},getItemHashCode:function(a){return a.toHashCode()},scrollItemIntoView:function(b,a){b.scrollIntoView(a)},getItemLeft:function(a){return a.getOffsetLeft()},getItemTop:function(a){return a.getOffsetTop()},getItemWidth:function(a){return a.getOffsetWidth()},getItemHeight:function(a){return a.getOffsetHeight()},getItemEnabled:function(a){return a.getEnabled()},renderItemSelectionState:function(b,a){if(a){b.addState($[22])}else{b.removeState($[22])}if(b.handleStateChange){b.handleStateChange()}},renderItemAnchorState:function(a,b){if(b){a.addState("anchor")}else{a.removeState("anchor")}if(a.handleStateChange!=null){a.handleStateChange()}},renderItemLeadState:function(b,a){if(a){b.addState("lead")}else{b.removeState("lead")}if(b.handleStateChange!=null){b.handleStateChange()}},getItemSelected:function(a){return this._selectedItems.contains(a)},setItemSelected:function(d,c){switch(this.getMultiSelection()){case true:if(!this.getItemEnabled(d)){return}if(this.getItemSelected(d)==c){return}this.renderItemSelectionState(d,c);if(c){this._selectedItems.add(d)}else{this._selectedItems.remove(d)}this._dispatchChange();break;case false:var b=this.getSelectedItems()[0];if(c){var a=b;if(this.isEqual(d,a)){return}if(a!=null){this.renderItemSelectionState(a,false)}this.renderItemSelectionState(d,true);this._selectedItems.removeAll();this._selectedItems.add(d);this._dispatchChange()}else{if(!this.isEqual(b,d)){this.renderItemSelectionState(d,false);this._dispatchChange()}}break}},getSelectedItems:function(){return this._selectedItems.toArray()},getSelectedItem:function(){return this._selectedItems.getFirst()},setSelectedItems:function(c){var b=this._getChangeValue();var a=this.getFireChange();this.setFireChange(false);this._deselectAll();var e;var f=c.length;for(var d=0;d<f;d++){e=c[d];if(!this.getItemEnabled(e)){continue}this._selectedItems.add(e);this.renderItemSelectionState(e,true)}this.setFireChange(a);if(a&&this._hasChanged(b)){this._dispatchChange()}},setSelectedItem:function(c){if(!c){return}if(!this.getItemEnabled(c)){return}var b=this._getChangeValue();var a=this.getFireChange();this.setFireChange(false);this._deselectAll();this._selectedItems.add(c);this.renderItemSelectionState(c,true);this.setFireChange(a);if(a&&this._hasChanged(b)){this._dispatchChange()}},selectAll:function(){var b=this._getChangeValue();var a=this.getFireChange();this.setFireChange(false);this._selectAll();this.setFireChange(a);if(a&&this._hasChanged(b)){this._dispatchChange()}},_selectAll:function(){if(!this.getMultiSelection()){return}var c;var a=this.getItems();var d=a.length;this._selectedItems.removeAll();for(var b=0;b<d;b++){c=a[b];if(!this.getItemEnabled(c)){continue}this._selectedItems.add(c);this.renderItemSelectionState(c,true)}return true},deselectAll:function(){var b=this._getChangeValue();var a=this.getFireChange();this.setFireChange(false);this._deselectAll();this.setFireChange(a);if(a&&this._hasChanged(b)){this._dispatchChange()}},_deselectAll:function(){var a=this._selectedItems.toArray();for(var b=0;b<a.length;b++){this.renderItemSelectionState(a[b],false)}this._selectedItems.removeAll();return true},selectItemRange:function(d,b){var c=this._getChangeValue();var a=this.getFireChange();this.setFireChange(false);this._selectItemRange(d,b,true);this.setFireChange(a);if(a&&this._hasChanged(c)){this._dispatchChange()}},_selectItemRange:function(b,a,c){if(this.isBefore(a,b)){return this._selectItemRange(a,b,c)}if(c){this._deselectAll()}var d=b;while(d!=null){if(this.getItemEnabled(d)){this._selectedItems.add(d);this.renderItemSelectionState(d,true)}if(this.isEqual(d,a)){break}d=this.getNext(d)}return true},_deselectItemRange:function(b,a){if(this.isBefore(a,b)){return this._deselectItemRange(a,b)}var c=b;while(c!=null){this._selectedItems.remove(c);this.renderItemSelectionState(c,false);if(this.isEqual(c,a)){break}c=this.getNext(c)}},_activeDragSession:false,handleMouseDown:function(a,b){b.stopPropagation();if(!b.isLeftButtonPressed()&&!b.isRightButtonPressed()){return}if(b.isRightButtonPressed()&&this.getItemSelected(a)){return}if(b.isShiftPressed()||this.getDragSelection()||(!this.getItemSelected(a)&&!b.isCtrlPressed())){this._onmouseevent(a,b)}else{this.setLeadItem(a)}this._activeDragSession=this.getDragSelection();if(this._activeDragSession){this.getBoundedWidget().addEventListener($[5],this._ondragup,this);this.getBoundedWidget().setCapture(true)}},_ondragup:function(a){this.getBoundedWidget().removeEventListener($[5],this._ondragup,this);this.getBoundedWidget().setCapture(false);this._activeDragSession=false},handleMouseUp:function(a,b){if(!b.isLeftButtonPressed()){return}if(b.isCtrlPressed()||this.getItemSelected(a)&&!this._activeDragSession){this._onmouseevent(a,b)}if(this._activeDragSession){this._activeDragSession=false;this.getBoundedWidget().setCapture(false)}},handleMouseOver:function(b,a){if(!this.getDragSelection()||!this._activeDragSession){return}this._onmouseevent(b,a,true)},handleClick:function(a,b){},handleDblClick:function(a,b){},_onmouseevent:function(h,g,d){if(!this.getItemEnabled(h)){return}var k=this._getChangeValue();var j=this.getLeadItem();var a=this.getFireChange();this.setFireChange(false);var c=this.getSelectedItems();var b=c.length;this.setLeadItem(h);var l=this.getAnchorItem();var i=g.isCtrlPressed();var f=g.isShiftPressed();if(!l||b===0||(i&&!f&&this.getMultiSelection()&&!this.getDragSelection())){this.setAnchorItem(h);l=h}if((!i&&!f&&!this._activeDragSession||!this.getMultiSelection())){if(!this.getItemEnabled(h)){return}this._deselectAll();this.setAnchorItem(h);if(this._activeDragSession){this.scrollItemIntoView((this.getBoundedWidget().getScrollTop()>(this.getItemTop(h)-1)?this.getPrevious(h):this.getNext(h))||h)}if(!this.getItemSelected(h)){this.renderItemSelectionState(h,true)}this._selectedItems.add(h);this._addToCurrentSelection=true}else{if(this._activeDragSession&&d){if(j){this._deselectItemRange(l,j)}if(this.isBefore(l,h)){if(this._addToCurrentSelection){this._selectItemRange(l,h,false)}else{this._deselectItemRange(l,h)}}else{if(this._addToCurrentSelection){this._selectItemRange(h,l,false)}else{this._deselectItemRange(h,l)}}this.scrollItemIntoView((this.getBoundedWidget().getScrollTop()>(this.getItemTop(h)-1)?this.getPrevious(h):this.getNext(h))||h)}else{if(this.getMultiSelection()&&i&&!f){if(!this._activeDragSession){this._addToCurrentSelection=!(this.getCanDeselect()&&this.getItemSelected(h))}this.setItemSelected(h,this._addToCurrentSelection);this.setAnchorItem(h)}else{if(this.getMultiSelection()&&i&&f){if(!this._activeDragSession){this._addToCurrentSelection=!(this.getCanDeselect()&&this.getItemSelected(h))}if(this._addToCurrentSelection){this._selectItemRange(l,h,false)}else{this._deselectItemRange(l,h)}}else{if(this.getMultiSelection()&&!i&&f){if(this.getCanDeselect()){this._selectItemRange(l,h,true)}else{if(j){this._deselectItemRange(l,j)}this._selectItemRange(l,h,false)}}}}}}this.setFireChange(a);if(a&&this._hasChanged(k)){this._dispatchChange()}},handleKeyPress:function(d){var c=this._getChangeValue();var a=this.getFireChange();this.setFireChange(false);if(d.getKeyIdentifier()=="A"&&d.isCtrlPressed()){if(this.getMultiSelection()){this._selectAll();this.setLeadItem(this.getFirst())}}else{var b=this.getAnchorItem();var e=this.getItemToSelect(d);if(e&&this.getItemEnabled(e)){this.setLeadItem(e);this.scrollItemIntoView(e);d.preventDefault();if(d.isShiftPressed()&&this.getMultiSelection()){if(b==null){this.setAnchorItem(e)}this._selectItemRange(this.getAnchorItem(),e,true)}else{if(!d.isCtrlPressed()){this._deselectAll();this.renderItemSelectionState(e,true);this._selectedItems.add(e);this.setAnchorItem(e)}else{if(d.getKeyIdentifier()==$[78]){if(this._selectedItems.contains(e)){this.renderItemSelectionState(e,false);this._selectedItems.remove(e);this.setAnchorItem(this._selectedItems.getFirst())}else{if(!d.isCtrlPressed()||!this.getMultiSelection()){this._deselectAll()}this.renderItemSelectionState(e,true);this._selectedItems.add(e);this.setAnchorItem(e)}}}}}}this.setFireChange(a);if(a&&this._hasChanged(c)){this._dispatchChange()}},getItemToSelect:function(a){if(a.isAltPressed()){return null}switch(a.getKeyIdentifier()){case"Home":return this.getHome(this.getLeadItem());case"End":return this.getEnd(this.getLeadItem());case"Down":return this.getDown(this.getLeadItem());case"Up":return this.getUp(this.getLeadItem());case"Left":return this.getLeft(this.getLeadItem());case $[35]:return this.getRight(this.getLeadItem());case $[40]:return this.getPageUp(this.getLeadItem())||this.getHome(this.getLeadItem());case $[45]:return this.getPageDown(this.getLeadItem())||this.getEnd(this.getLeadItem());case $[78]:if(a.isCtrlPressed()){return this.getLeadItem()}}return null},_dispatchChange:function(){if(!this.getFireChange()){return}if(this.hasEventListeners($[248])){this.dispatchEvent(new rwt.event.DataEvent($[248],this.getSelectedItems()),true)}},_hasChanged:function(a){return a!=this._getChangeValue()},_getChangeValue:function(){return this._selectedItems.getChangeValue()},getHome:function(){return this.getFirst()},getEnd:function(){return this.getLast()},getDown:function(a){if(!a){return this.getFirst()}return this.getMultiColumnSupport()?(this.getUnder(a)||this.getLast()):this.getNext(a)},getUp:function(a){if(!a){return this.getLast()}return this.getMultiColumnSupport()?(this.getAbove(a)||this.getFirst()):this.getPrevious(a)},getLeft:function(a){if(!this.getMultiColumnSupport()){return null}return !a?this.getLast():this.getPrevious(a)},getRight:function(a){if(!this.getMultiColumnSupport()){return null}return !a?this.getFirst():this.getNext(a)},getAbove:function(a){throw new Error("getAbove(): Not implemented yet")},getUnder:function(a){throw new Error("getUnder(): Not implemented yet")},getPageUp:function(e){var c=this.getLeadItem();if(!c){c=this.getFirst()}var b=this.getBoundedWidget();if(b.isCreated()){var a=b.getScrollTop();var f=b.getClientHeight();var d=0;while(d<2){while(c&&(this.getItemTop(c)-this.getItemHeight(c)>=a)){c=this.getUp(c)}if(c==null){break}if(c!=this.getLeadItem()){this.scrollItemIntoView(c,true);break}b.setScrollTop(a-f-this.getItemHeight(c));a=b.getScrollTop();d++}}return c},getPageDown:function(e){var c=this.getLeadItem();if(!c){c=this.getFirst()}var b=this.getBoundedWidget();if(b.isCreated()){var a=b.getScrollTop();var f=b.getClientHeight();var d=0;while(d<2){while(c&&((this.getItemTop(c)+(2*this.getItemHeight(c)))<=(a+f))){c=this.getDown(c)}if(c==null){break}if(c!=this.getLeadItem()){break}b.setScrollTop(a+f-2*this.getItemHeight(c));a=b.getScrollTop();d++}}return c}},destruct:function(){this._disposeObjects("_selectedItems")}}); |
| rwt.qx.Class.define("rwt.widgets.util.Selection",{extend:rwt.qx.Object,construct:function(a){arguments.callee.base.call(this);this.__manager=a;this.removeAll()},members:{add:function(a){this.__storage[this.getItemHashCode(a)]=a},remove:function(a){delete this.__storage[this.getItemHashCode(a)]},removeAll:function(){this.__storage={}},contains:function(a){return this.getItemHashCode(a) in this.__storage},toArray:function(){var b=[];for(var a in this.__storage){b.push(this.__storage[a])}return b},getFirst:function(){for(var a in this.__storage){return this.__storage[a]}return null},getChangeValue:function(){var b=[];for(var a in this.__storage){b.push(a)}b.sort();return b.join(";")},getItemHashCode:function(a){return this.__manager.getItemHashCode(a)},isEmpty:function(){return rwt.util.Objects.isEmpty(this.__storage)}},destruct:function(){this._disposeFields("__storage","__manager")}}); |
| rwt.qx.Class.define("rwt.widgets.base.AbstractSlider",{extend:rwt.widgets.base.Parent,construct:function(a){arguments.callee.base.call(this);this.setOverflow($[9]);this._horizontal=a;this._selection=0;this._minimum=0;this._maximum=100;this._increment=1;this._pageIncrement=10;this._thumbLength=10;this._pxStep=1.38;this._thumbDragOffset=0;this._autoRepeat="";this._mouseOffset=0;this._delayTimer=new rwt.client.Timer(250);this._repeatTimer=new rwt.client.Timer(100);this._thumb=new rwt.widgets.base.BasicButton("push",true);this._minButton=new rwt.widgets.base.BasicButton("push",true);this._maxButton=new rwt.widgets.base.BasicButton("push",true);this.add(this._thumb);this.add(this._minButton);this.add(this._maxButton);this._configureSubwidgets();this._configureAppearance();this._setStates();this._registerListeners()},destruct:function(){this._delayTimer.stop();this._delayTimer.dispose();this._delayTimer=null;this._repeatTimer.stop();this._repeatTimer.dispose();this._repeatTimer=null;this._thumb=null;this._minButton=null;this._maxButton=null},members:{_setSelection:function(b){var a=this._limitSelection(b);if(a!==this._selection){this._selection=a;this._selectionChanged()}},_setMinimum:function(a){this._minimum=a;this._updateThumbSize()},_setMaximum:function(a){this._maximum=a;this._updateThumbSize()},_setIncrement:function(a){this._increment=a},_setPageIncrement:function(a){this._pageIncrement=a},_setThumb:function(a){this._thumbLength=a;this._updateThumbSize()},_registerListeners:function(){this._repeatTimer.addEventListener($[27],this._onRepeatTimerInterval,this);this._delayTimer.addEventListener($[27],this._repeatTimerStart,this);this.addEventListener($[71],this._onChangeSize,this);this.addEventListener($[76],this._onChangeSize,this);this.addEventListener($[179],this._onChangeEnabled,this);this.addEventListener($[1],this._onMouseDown,this);this.addEventListener($[5],this._onMouseUp,this);this.addEventListener($[6],this._onMouseOut,this);this.addEventListener($[3],this._onMouseOver,this);this.addEventListener($[28],this._onMouseMove,this);this.addEventListener($[43],this._onMouseWheel,this);this._thumb.addEventListener($[1],this._onThumbMouseDown,this);this._thumb.addEventListener($[28],this._onThumbMouseMove,this);this._thumb.addEventListener($[5],this._onThumbMouseUp,this);this._minButton.addEventListener($[1],this._onMinButtonMouseEvent,this);this._maxButton.addEventListener($[1],this._onMaxButtonMouseEvent,this);this._minButton.addEventListener($[162],this._onMinButtonMouseEvent,this);this._maxButton.addEventListener($[162],this._onMaxButtonMouseEvent,this)},_selectionChanged:function(){this._updateThumbPosition();if(this._autoRepeat!==""&&!this._repeatTimer.isEnabled()){this._delayTimer.start()}},_onChangeSize:function(a){this._updateThumbSize()},_onChangeEnabled:function(a){this._thumb.setVisibility(a.getValue())},_onMouseWheel:function(a){if(a.getTarget()===this){a.preventDefault();a.stopPropagation();var c=a.getWheelDelta();var d=(c/Math.abs(c))*this._increment;var b=this._selection-d;if(b<this._minimum){b=this._minimum}if(b>(this._maximum-this._thumbWidth)){b=this._maximum-this._thumbWidth}this._setSelection(b)}},_onMouseDown:function(a){if(a.isLeftButtonPressed()){this._mouseOffset=this._getMouseOffset(a);this._handleLineMouseDown()}},_onMouseUp:function(a){this.setCapture(false);this._autoRepeat="";this._delayTimer.stop();this._repeatTimer.stop()},_onMouseOver:function(a){var b=a.getOriginalTarget();if(b===this&&this._autoRepeat.slice(0,4)==="line"){this.setCapture(false);this._repeatTimerStart()}},_onMouseOut:function(b){var c=b.getRelatedTarget();var a=c!==this&&!this.contains(c);if(a&&this._autoRepeat.slice(0,4)==="line"){this.setCapture(true);this._delayTimer.stop();this._repeatTimer.stop()}},_onMouseMove:function(a){this._mouseOffset=this._getMouseOffset(a)},_onMinButtonMouseEvent:function(a){a.stopPropagation();if(this._minButton.hasState($[12])){this._autoRepeat="minButton";this._setSelection(this._selection-this._increment)}else{this._autoRepeat=""}},_onMaxButtonMouseEvent:function(a){a.stopPropagation();if(this._maxButton.hasState($[12])){this._autoRepeat="maxButton";this._setSelection(this._selection+this._increment)}else{this._autoRepeat=""}},_onThumbMouseDown:function(b){b.stopPropagation();this._thumb.addState($[12]);if(b.isLeftButtonPressed()){var a=this._getMouseOffset(b);this._thumbDragOffset=a-this._getThumbPosition();this._thumb.setCapture(true)}},_onThumbMouseMove:function(c){c.stopPropagation();if(this._thumb.getCapture()){var b=this._getMouseOffset(c);var a=this._getSelectionFromPosition(b-this._thumbDragOffset);this._setSelection(a)}},_onThumbMouseUp:function(a){if(this._thumb.hasState($[12])){a.stopPropagation();this._repeatTimer.stop();this._thumb.setCapture(false);this._thumb.removeState($[12])}},_configureSubwidgets:function(){if(this._horizontal){this._thumb.setHeight("100%");this._minButton.setHeight("100%");this._maxButton.setHeight("100%");this._maxButton.setRight(0)}else{this._thumb.setWidth("100%");this._minButton.setWidth("100%");this._maxButton.setWidth("100%");this._maxButton.setBottom(0)}rwt.widgets.util.WidgetUtil.fixIEBoxHeight(this._thumb);rwt.widgets.util.WidgetUtil.fixIEBoxHeight(this._minButton);rwt.widgets.util.WidgetUtil.fixIEBoxHeight(this._maxButton);this._minButton.setTabIndex(null);this._maxButton.setTabIndex(null);this._thumb.setTabIndex(null)},_setStates:function(){var a=this._horizontal?$[383]:$[225];var b=this._horizontal?$[37]:$[31];this.addState(a);this._minButton.addState(a);this._minButton.addState(b);this._maxButton.addState(a);this._maxButton.addState(b);this._thumb.addState(a);this._renderAppearance();this._minButton._renderAppearance();this._maxButton._renderAppearance();this._thumb._renderAppearance()},_visualizeFocus:function(){arguments.callee.base.call(this);this._thumb.addState($[75])},_visualizeBlur:function(){arguments.callee.base.call(this);this._thumb.removeState($[75])},_repeatTimerStart:function(){this._delayTimer.stop();if(this._autoRepeat!==""){this._repeatTimer.start()}},_onRepeatTimerInterval:function(a){switch(this._autoRepeat){case"minButton":this._setSelection(this._selection-this._increment);break;case"maxButton":this._setSelection(this._selection+this._increment);break;case"linePlus":case"lineMinus":this._handleLineMouseDown();break}},_handleLineMouseDown:function(){var e;var b=this._getThumbSize()/2;var c=this._getThumbPosition()+b;var a;if(this._mouseOffset>c){a=this._selection+this._pageIncrement;e="linePlus"}else{e="lineMinus";a=this._selection-this._pageIncrement}if(this._autoRepeat===""||this._autoRepeat===e){this._autoRepeat=e;var d=this._pageIncrement*this._pxStep+b;this._setSelection(a)}},_updateThumbPosition:function(){var a=this._getMinButtonWidth();a+=this._pxStep*(this._selection-this._minimum);if(this._horizontal){this._thumb.setLeft(a)}else{this._thumb.setTop(a)}},_updateThumbSize:function(){var a=this._thumbLength*this._getLineSize()/(this._maximum-this._minimum);a=Math.round(a);if(this._horizontal){this._thumb.setWidth(a)}else{this._thumb.setHeight(a)}this._updateStepsize()},_updateStepsize:function(){var a=this._maximum-this._minimum-this._thumbLength;if(a!==0){var b=this._getLineSize()-this._getThumbSize();this._pxStep=b/a}else{this._pxStep=0}this._selection=this._limitSelection(this._selection);this._updateThumbPosition()},_getSelectionFromPosition:function(a){var b=this._getMinButtonWidth();var c=(a-b)/this._pxStep+this._minimum;return this._limitSelection(Math.round(c))},_limitSelection:function(b){var a=b;if(b>=(this._maximum-this._thumbLength)){a=this._maximum-this._thumbLength}if(a<=this._minimum){a=this._minimum}return a},_getMouseOffset:function(c){var b=rwt.html.Location;var a;if(this._horizontal){a=c.getPageX()-b.getLeft(this.getElement())}else{a=c.getPageY()-b.getTop(this.getElement())}return a},_getThumbPosition:function(){var a;if(this._horizontal){a=this._thumb.getLeft()}else{a=this._thumb.getTop()}return a},_getThumbSize:function(){var a;if(this._horizontal){a=this._thumb.getWidth()}else{a=this._thumb.getHeight()}return a},_getLineSize:function(){var b=this._getMinButtonWidth()+this._getMaxButtonWidth();var a=this._getSliderSize()-this.getFrameWidth()-b;return a},_getSliderSize:function(){var a;if(this._horizontal){a=this.getWidth()}else{a=this.getHeight()}return a},_getMinButtonWidth:function(){var a;if(this._horizontal){a=this._minButton.getWidth()}else{a=this._minButton.getHeight()}return a},_getMaxButtonWidth:function(){var a;if(this._horizontal){a=this._maxButton.getWidth()}else{a=this._maxButton.getHeight()}return a}}}); |
| rwt.qx.Class.define("rwt.widgets.base.ScrollBar",{extend:rwt.widgets.base.AbstractSlider,construct:function(a){arguments.callee.base.call(this,a);this._idealValue=0;this._selectionFactor=1;this._lastDispatchedValue=0;this._mergeEvents=false;this._renderSum=0;this._renderSamples=0;this._eventTimerId=null;this._setMinimum(0);this._hasSelectionListener=false;this._minThumbSize=this._getMinThumbSize();this.setIncrement(20);this.addEventListener($[13],this._stopEvent,this);this.addEventListener($[48],this._stopEvent,this);this._eventTimer=null},destruct:function(){if(this._eventTimer!=null){this._eventTimer.dispose();this._eventTimer=null}},statics:{MERGE_THRESHOLD:4},events:{changeValue:$[11]},members:{_configureAppearance:function(){this.setAppearance("scrollbar");this._thumb.setAppearance($[204]);this._minButton.setAppearance("scrollbar-min-button");this._maxButton.setAppearance("scrollbar-max-button")},setValue:function(a){this._idealValue=a;this._setSelection(a*this._selectionFactor)},getValue:function(a){return Math.round(this._selection/this._selectionFactor)},setMaximum:function(a){this._setMaximum(a);if(this._idealValue!==null){this._setSelection(this._idealValue)}this._updateThumbLength()},getMaximum:function(){return this._maximum},setIncrement:function(a){this._setIncrement(a);this._updatePageIncrement()},setHasSelectionListener:function(a){this._hasSelectionListener=a},getHasSelectionListener:function(){return this._hasSelectionListener},setMergeEvents:function(a){if(!a&&this._mergeEvents){throw new Error("mergeEvents can not be set to false")}else{if(a){this._mergeEvents=true;this._eventTimer=new rwt.client.Timer(125);this._eventTimer.addEventListener($[27],this._dispatchValueChanged,this)}}},getMergeEvents:function(){return this._mergeEvents},autoEnableMerge:function(c){if(!this._mergeEvents&&c>0){this._renderSamples++;this._renderSum+=c;var b=this._renderSum/this._renderSamples;var a=false;if(this._renderSamples>2){a=b>600}else{a=c>1500}if(a){this.setMergeEvents(true)}}},isHorizontal:function(){return this._horizontal},_onChangeSize:function(){arguments.callee.base.call(this);this._updateThumbLength();this._updatePageIncrement();if(this._idealValue!==null){this._setSelection(this._idealValue)}},_updateThumbSize:function(){arguments.callee.base.call(this);var a=this._getThumbSize();if(a<this._minThumbSize){this.addToQueue($[489])}else{this._selectionFactor=1}if(this._horizontal){var b=this._thumb.getCellWidth(1);var d=a>=(b+6);this._thumb.setCellVisible(1,d)}else{var c=this._thumb.getCellHeight(1);var d=a>=(c+6);this._thumb.setCellVisible(1,d)}},_layoutPost:function(b){arguments.callee.base.call(this,b);if(b[$[489]]){if(this._maximum>0&&this._getLineSize()>0){var a=this._getThumbSize();if(a<this._minThumbSize){var d=this._getSliderSize();var c=this._minThumbSize*this._maximum/this._getLineSize();this._setThumb(c);if(this._maximum===d){this._selectionFactor=1}else{this._selectionFactor=(this._maximum-c)/(this._maximum-d)}}}}},_setSelection:function(a){if(a!==this._idealValue){this._idealValue=null}arguments.callee.base.call(this,a)},_selectionChanged:function(){arguments.callee.base.call(this);if(this._getMergeCurrentEvent()){this._eventTimer.stop();this._eventTimer.start()}else{this._dispatchValueChanged()}},_getMinThumbSize:function(){var a=new rwt.theme.ThemeValues(this.__states);return a.getCssDimension("ScrollBar-Thumb","min-height")},_updateThumbLength:function(){this._setThumb(this._getSliderSize())},_updatePageIncrement:function(){this._setPageIncrement(this._getSliderSize()-this._increment)},_stopEvent:function(a){a.stopPropagation();a.preventDefault()},_getMergeCurrentEvent:function(){var a=false;if(this._mergeEvents){var b=rwt.widgets.base.ScrollBar.MERGE_THRESHOLD;var c=Math.abs(this._lastDispatchedValue-this._selection);if(c>=this._increment*b){a=true}}return a},_dispatchValueChanged:function(){if(this._mergeEvents){this._eventTimer.stop()}this._lastDispatchedValue=this._selection;this.createDispatchEvent($[118])},_updateStepsize:function(){var a=this._selection;arguments.callee.base.call(this);if(a!==this._selection){this._dispatchValueChanged()}}}}); |
| rwt.qx.Class.define("rwt.html.ImagePreloaderSystem",{extend:rwt.qx.Target,construct:function(c,b,a){arguments.callee.base.call(this);if(c instanceof Array){this._list=rwt.util.Objects.fromArray(c)}else{this._list=c}this._timer=new rwt.client.Timer(3000);this._timer.addEventListener($[27],this.__oninterval,this);if(b){this.addEventListener($[240],b,a||null)}},events:{completed:$[11]},members:{_stopped:false,start:function(){if(rwt.util.Objects.isEmpty(this._list)){this.createDispatchEvent($[240]);return}for(var a in this._list){var b=rwt.html.ImagePreloaderManager.getInstance().create(a);if(b.isErroneous()||b.isLoaded()){delete this._list[a]}else{b._origSource=a;b.addEventListener("load",this.__onload,this);b.addEventListener($[134],this.__onerror,this)}}this._check()},__onload:function(a){if(this.getDisposed()){return}delete this._list[a.getTarget()._origSource];this._check()},__onerror:function(a){if(this.getDisposed()){return}delete this._list[a.getTarget()._origSource];this._check()},__oninterval:function(a){this._stopped=true;this._timer.stop();this.createDispatchEvent($[240])},_check:function(){if(this._stopped){return}if(rwt.util.Objects.isEmpty(this._list)){this._timer.stop();this.createDispatchEvent($[240])}else{this._timer.restart()}}},destruct:function(){if(this._timer){this._timer.removeEventListener($[27],this.__oninterval,this);this._disposeObjects("_timer")}this._disposeFields("_list")}}); |
| rwt.qx.Class.define("rwt.html.Iframes",{statics:{getWindow:rwt.util.Variant.select($[0],{mshtml:function(b){try{return b.contentWindow}catch(a){return null}},"default":function(c){try{var a=rwt.html.Iframes.getDocument(c);return a?a.defaultView:null}catch(b){return null}}}),getDocument:rwt.util.Variant.select($[0],{mshtml:function(c){try{var a=rwt.html.Iframes.getWindow(c);return a?a.document:null}catch(b){return null}},"default":function(b){try{return b.contentDocument}catch(a){return null}}}),getBody:function(b){var a=rwt.html.Iframes.getDocument(b);return a?a.getElementsByTagName("body")[0]:null}}}); |
| namespace($[185]);(function(){var a=rwt.client.Client;rwt.remote.Request=function(c,d,b){this._url=c;this._method=d;this._async=true;this._success=null;this._error=null;this._data=null;this._responseType=b;this._request=rwt.remote.Request.createXHR()};rwt.remote.Request.createXHR=function(){return new XMLHttpRequest()};rwt.remote.Request.prototype={dispose:function(){if(this._request!=null){this._request.onreadystatechange=null;this._request.abort();this._success=null;this._error=null;this._request=null}},send:function(){var d=null;var c=this._method==="POST";if(!c&&this._data){d=this._data}var b=this._url;if(d){b+=(b.indexOf("?")>=0?"&":"?")+d}this._request.open(this._method,b,this._async);this._configRequest();this._request.send(c?this._data:undefined);if(!this._shouldUseStateListener()){this._onReadyStateChange()}if(!this._async){this.dispose()}},setAsynchronous:function(b){this._async=b},getAsynchronous:function(){return this._async},setSuccessHandler:function(c,b){this._success=function(){c.apply(b,arguments)}},setErrorHandler:function(c,b){this._error=function(){c.apply(b,arguments)}},setData:function(b){this._data=b},getData:function(){return this._data},_configRequest:function(){if(!a.isWebkit()){this._request.setRequestHeader("Referer",window.location.href)}var b="application/json; charset=UTF-8";this._request.setRequestHeader($[441],b);if(this._shouldUseStateListener()){this._request.onreadystatechange=rwt.util.Functions.bind(this._onReadyStateChange,this)}},_shouldUseStateListener:function(){var b=true;if(!this._async&&a.isGecko()&&a.getMajor()<4){b=false}return b},_onReadyStateChange:function(){if(this._request.readyState===4){var c;if(typeof this._request.responseText!=="unknown"){c=this._request.responseText}var b={responseText:c,status:this._request.status,responseHeaders:this._getHeaders(),target:this};if(this._request.status===200){if(this._success){this._success(b)}}else{if(this._error){this._error(b)}}if(this._async){this.dispose()}}},_getHeaders:function(){var f=this._request.getAllResponseHeaders();var c=f.split(/[\r\n]+/g);var b={};for(var d=0;d<c.length;d++){var e=c[d].match(/^([^:]+)\s*:\s*(.+)$/i);if(e){b[e[1]]=e[2]}}return b}}}()); |
| rwt.qx.Class.define("rwt.widgets.base.PopupAtom",{extend:rwt.widgets.base.Popup,construct:function(a,b){arguments.callee.base.call(this);this._atom=new rwt.widgets.base.Atom(a,b);this._atom.setParent(this)},members:{_isFocusRoot:false,getAtom:function(){return this._atom}},destruct:function(){this._disposeObjects("_atom")}}); |
| rwt.qx.Class.define($[272],{extend:rwt.widgets.base.PopupAtom,construct:function(a,b){arguments.callee.base.call(this,a,b);this._showTimer=new rwt.client.Timer(this.getShowInterval());this._showTimer.addEventListener($[27],this._onshowtimer,this);this._hideTimer=new rwt.client.Timer(this.getHideInterval());this._hideTimer.addEventListener($[27],this._onhidetimer,this);this.addEventListener($[3],this._onmouseover);this.addEventListener($[6],this._onmouseover)},properties:{appearance:{refine:true,init:"widget-tool-tip"},hideOnHover:{check:$[2],init:true},mousePointerOffsetX:{check:$[18],init:1},mousePointerOffsetY:{check:$[18],init:20},showInterval:{check:$[18],init:1000,apply:"_applyShowInterval"},hideInterval:{check:$[18],init:4000,apply:"_applyHideInterval"},boundToWidget:{check:$[129],apply:"_applyBoundToWidget"}},members:{_minZIndex:10000000,_applyHideInterval:function(b,a){this._hideTimer.setInterval(b)},_applyShowInterval:function(b,a){this._showTimer.setInterval(b)},_applyBoundToWidget:function(b,a){if(b){this.setParent(b.getTopLevelWidget())}else{if(a){this.setParent(null)}}},_beforeAppear:function(){arguments.callee.base.call(this);this._stopShowTimer();this._startHideTimer()},_beforeDisappear:function(){arguments.callee.base.call(this);this._stopHideTimer()},_afterAppear:function(){arguments.callee.base.call(this);if(this.getRestrictToPageOnOpen()){var z=rwt.widgets.base.ClientDocument.getInstance();var j=z.getClientWidth();var f=z.getClientHeight();var c=parseInt(this.getRestrictToPageLeft(),10);var t=parseInt(this.getRestrictToPageRight(),10);var y=parseInt(this.getRestrictToPageTop(),10);var d=parseInt(this.getRestrictToPageBottom(),10);var i=(this._wantedLeft==null)?this.getLeft():this._wantedLeft;var p=this.getTop();var s=this.getBoxWidth();var r=this.getBoxHeight();var m=rwt.event.MouseEvent.getPageX();var l=rwt.event.MouseEvent.getPageY();var h=this.getLeft();var a=p;if(i+s>j-t){i=j-t-s}if(p+r>f-d){p=f-d-r}if(i<c){i=c}if(p<y){p=y}if(i<=m&&m<=i+s&&p<=l&&l<=p+r){var e=l-p;var v=e-r;var u=m-i;var k=u-s;var b=Math.max(0,y-(p+v));var n=Math.max(0,p+r+e-(f-d));var g=Math.max(0,c-(i+k));var o=Math.max(0,i+s+u-(j-t));var x=[[0,v,b],[0,e,n],[k,0,g],[u,0,o]];x.sort(function(B,A){return B[2]-A[2]||(Math.abs(B[0])+Math.abs(B[1]))-(Math.abs(A[0])+Math.abs(A[1]))});var w=x[0];i=i+w[0];p=p+w[1]}if(i!=h||p!=a){var q=this;window.setTimeout(function(){q.setLeft(i);q.setTop(p)},0)}}},_startShowTimer:function(){if(!this._showTimer.getEnabled()){this._showTimer.start()}},_startHideTimer:function(){if(!this._hideTimer.getEnabled()){this._hideTimer.start()}},_stopShowTimer:function(){if(this._showTimer.getEnabled()){this._showTimer.stop()}},_stopHideTimer:function(){if(this._hideTimer.getEnabled()){this._hideTimer.stop()}},_onmouseover:function(a){if(this.getHideOnHover()){this.hide()}},_onshowtimer:function(a){this.setLeft(rwt.event.MouseEvent.getPageX()+this.getMousePointerOffsetX());this.setTop(rwt.event.MouseEvent.getPageY()+this.getMousePointerOffsetY());this.show()},_onhidetimer:function(a){return this.hide()}},destruct:function(){var a=rwt.widgets.util.ToolTipManager.getInstance();a.remove(this);if(a.getCurrentToolTip()==this){a.resetCurrentToolTip()}this._disposeObjects("_showTimer","_hideTimer")}}); |
| rwt.qx.Class.define("rwt.widgets.util.ToolTipManager",{type:$[39],extend:rwt.util.ObjectManager,properties:{currentToolTip:{check:$[272],nullable:true,apply:"_applyCurrentToolTip"}},members:{_applyCurrentToolTip:function(b,a){if(a&&a.contains(b)){return}if(a&&!a.isDisposed()){a.hide();a._stopShowTimer();a._stopHideTimer()}if(b){b._startShowTimer()}},handleMouseEvent:function(b){var a=b.getType();if(a===$[3]){this._handleMouseOver(b)}else{if(a===$[6]){this._handleMouseOut(b)}}},_handleMouseOver:function(b){var c=b.getTarget();var a;if(!(c instanceof rwt.widgets.base.Widget)&&c.nodeType==1){c=rwt.event.EventHandlerUtil.getTargetObject(c)}while(c!=null&&!(a=c.getToolTip())){c=c.getParent()}if(a!=null){a.setBoundToWidget(c)}this.setCurrentToolTip(a)},_handleMouseOut:function(c){var d=c.getTarget();var b=c.getRelatedTarget();var a=this.getCurrentToolTip();if(a&&(b==a||a.contains(b))){return}if(b&&d&&d.contains(b)){return}if(a&&!b){this.setCurrentToolTip(null)}},handleFocus:function(a){},handleBlur:function(b){var c=b.getTarget();if(!c){return}var a=this.getCurrentToolTip();if(a&&a==c.getToolTip()){this.setCurrentToolTip(null)}}}}); |
| rwt.qx.Class.define("rwt.html.Window",{statics:{getInnerWidth:rwt.util.Variant.select($[0],{"mshtml|webkit":function(a){if(a.document.documentElement&&a.document.documentElement.clientWidth){return a.document.documentElement.clientWidth}else{if(a.document.body){return a.document.body.clientWidth}}return 0},"default":function(a){return a.innerWidth}}),getInnerHeight:rwt.util.Variant.select($[0],{"mshtml|webkit":function(a){if(a.document.documentElement&&a.document.documentElement.clientHeight){return a.document.documentElement.clientHeight}else{if(a.document.body){return a.document.body.clientHeight}}return 0},"default":function(a){return a.innerHeight}}),getScrollLeft:rwt.util.Variant.select($[0],{mshtml:function(a){if(a.document.documentElement&&a.document.documentElement.scrollLeft){return a.document.documentElement.scrollLeft}else{if(a.document.body){return a.document.body.scrollTop}}return 0},"default":function(a){return a.document.body.scrollLeft}}),getScrollTop:rwt.util.Variant.select($[0],{mshtml:function(a){if(a.document.documentElement&&a.document.documentElement.scrollTop){return a.document.documentElement.scrollTop}else{if(a.document.body){return a.document.body.scrollTop}}return 0},"default":function(a){return a.document.body.scrollTop}})}}); |
| rwt.qx.Class.define($[308],{type:$[39],extend:rwt.qx.Target,construct:rwt.util.Variant.select($[0],{mshtml:function(){arguments.callee.base.call(this);this._hasNavigationListener=false;this._iframe=document.createElement($[233]);this._iframe.style.visibility=$[9];this._iframe.style.position=$[16];this._iframe.style.left=$[265];this._iframe.style.top=$[265];var a=rwt.remote.Server.RESOURCE_PATH+$[347];this._iframe.src=a;document.body.appendChild(this._iframe);this._titles={};this._state=decodeURIComponent(this.__getHash());this._locationState=decodeURIComponent(this.__getHash());this.__waitForIFrame(function(){this.__storeState(this._state);this.__startTimer()},this)},"default":function(){arguments.callee.base.call(this);this._hasNavigationListener=false;this._titles={};this._state=this.__getState();this.__startTimer()}}),events:{request:$[50]},properties:{timeoutInterval:{check:$[54],init:100,apply:"_applyTimeoutInterval"}},members:{addToHistory:function(a,b){if(b!=null){document.title=b}this._titles[a]=document.title;if(a!=this._state){this._state=a;this.__storeState(a)}},getState:function(){return this._state},navigateBack:function(){rwt.client.Timer.once(function(){history.back()},0)},navigateForward:function(){rwt.client.Timer.once(function(){history.forward()},0)},_applyTimeoutInterval:function(a){this._timer.setInterval(a)},__onHistoryLoad:function(a){this._state=a;this.createDispatchDataEvent("request",a);if(this._titles[a]!=null){document.title=this._titles[a]}},__startTimer:function(){this._timer=new rwt.client.Timer(this.getTimeoutInterval());this._timer.addEventListener($[27],function(b){var a=this.__getState();if(a!=this._state){this.__onHistoryLoad(a)}},this);if(this._hasNavigationListener){this._timer.start()}},__getHash:function(){var b=window.location.href;var a=b.indexOf("#");return a>=0?b.substring(a+1):""},__getState:rwt.util.Variant.select($[0],{mshtml:function(){var d=decodeURIComponent(this.__getHash());if(d!=this._locationState){this._locationState=d;this.__storeState(d);return d}var c=this._iframe.contentWindow.document;var b=c.getElementById("state");var a=b?decodeURIComponent(b.innerText):"";return a},"default":function(){return decodeURIComponent(this.__getHash())}}),__storeState:rwt.util.Variant.select($[0],{mshtml:function(c){var b='<html><body><div id="state">'+encodeURIComponent(c)+"</div></body></html>";try{var d=this._iframe.contentWindow.document;d.open();d.write(b);d.close()}catch(a){return false}return true},"default":function(a){window.location.hash="#"+encodeURIComponent(a);return true}}),__waitForIFrame:rwt.util.Variant.select($[0],{mshtml:function(b,a){if(!this._iframe.contentWindow||!this._iframe.contentWindow.document){rwt.client.Timer.once(function(){this.__waitForIFrame(b,a)},this,10);return}b.call(a||window)},"default":null}),setHasNavigationListener:function(a){this._hasNavigationListener=a;if(a){this.addEventListener("request",this._historyNavigated,this);if(this._timer){this._timer.start()}}else{this.removeEventListener("request",this._historyNavigated,this);if(this._timer){this._timer.stop()}}},_historyNavigated:function(a){var b=a.getData();var c=rwt.remote.Server.getInstance();c.getRemoteObject(this).notify($[336],{state:b})}},destruct:function(){this._timer.stop();this._disposeObjects("_timer");this._disposeFields("_iframe","_titles")}}); |
| rwt.remote.HandlerRegistry.add($[308],{factory:function(a){return rwt.client.BrowserNavigation.getInstance()},service:true,listeners:[$[336]],methods:["addToHistory"],methodHandler:{addToHistory:function(b,d){var a=d.entries;for(var c=0;c<a.length;c++){b.addToHistory(a[c][0],a[c][1])}}}}); |
| rwt.qx.Class.define($[255],{type:$[39],extend:rwt.util.ObjectManager,construct:function(){arguments.callee.base.call(this);this.__data={};this.__actions={};this.__cursors={};var e,d;var c=["move","copy",$[104],"nodrop"];for(var b=0,a=c.length;b<a;b++){d=c[b];e=this.__cursors[d]=new rwt.widgets.base.Image();e.setAppearance("cursor-dnd-"+d);e.setZIndex(100000000)}},properties:{sourceWidget:{check:$[129],nullable:true},destinationWidget:{check:$[129],nullable:true,apply:"_applyDestinationWidget"},currentAction:{check:$[46],nullable:true,event:"changeCurrentAction"},defaultCursorDeltaX:{check:$[18],init:5},defaultCursorDeltaY:{check:$[18],init:15}},members:{__lastDestinationEvent:null,_applyDestinationWidget:function(b,a){if(b){b.dispatchEvent(new rwt.event.DragEvent($[213],this.__lastDestinationEvent,b,this.getSourceWidget()));this.__lastDestinationEvent=null}},addData:function(a,b){this.__data[a]=b},getData:function(a){return this.__data[a]},clearData:function(){this.__data={}},getDropDataTypes:function(){var d=this.getDestinationWidget();var a=[];if(!d){return a}var e=d.getDropDataTypes();for(var c=0,b=e.length;c<b;c++){if(e[c] in this.__data){a.push(e[c])}}return a},getDropTarget:rwt.util.Variant.select($[0],{"default":function(b){var a=b.getTarget();while(a!=null){if(!a.supportsDrop(this.__dragCache)){return null}if(this.supportsDrop(a)){return a}a=a.getParent()}return null}}),startDrag:function(){if(!this.__dragCache){throw new Error("Invalid usage of startDrag. Missing dragInfo!")}this.__dragCache.dragHandlerActive=true;this.setSourceWidget(this.__dragCache.sourceWidget);if(this.__feedbackWidget){this.__feedbackWidget.setVisibility(false);var a=rwt.widgets.base.ClientDocument.getInstance();a.add(this.__feedbackWidget);this.__feedbackWidget.setZIndex(100000000)}},_fireUserEvents:function(b,a,c){if(b&&b!=a&&b.hasEventListeners($[264])){b.dispatchEvent(new rwt.event.DragEvent($[264],c,b,a),true)}if(a){if(b!=a&&a.hasEventListeners($[124])){a.dispatchEvent(new rwt.event.DragEvent($[124],c,a,b),true)}if(a.hasEventListeners($[246])){a.dispatchEvent(new rwt.event.DragEvent($[246],c,a,null),true)}}},handleMouseEvent:function(a){switch(a.getType()){case $[1]:return this._handleMouseDown(a);case $[5]:return this._handleMouseUp(a);case $[28]:return this._handleMouseMove(a)}},_handleMouseDown:function(a){if(a.getDefaultPrevented()||!a.isLeftButtonPressed()){return}if(this.__dragCache==null){this.__dragCache={startScreenX:a.getScreenX(),startScreenY:a.getScreenY(),pageX:a.getPageX(),pageY:a.getPageY(),sourceWidget:a.getTarget(),sourceTopLevel:a.getTarget().getTopLevelWidget(),dragHandlerActive:false,hasFiredDragStart:false}}},_handleMouseMove:function(b){if(!this.__dragCache){return}if(this.__dragCache.dragHandlerActive){this.__dragCache.pageX=b.getPageX();this.__dragCache.pageY=b.getPageY();var a=this.getDropTarget(b);this.setCurrentAction(a?this._evalNewAction(b.isShiftPressed(),b.isCtrlPressed(),b.isAltPressed()):null);this._fireUserEvents(this.__dragCache.currentDropWidget,a,b);this.__dragCache.currentDropWidget=a;this._renderCursor();this._renderFeedbackWidget()}else{if(!this.__dragCache.hasFiredDragStart){if(Math.abs(b.getScreenX()-this.__dragCache.startScreenX)>5||Math.abs(b.getScreenY()-this.__dragCache.startScreenY)>5){this.__dragCache.sourceWidget.dispatchEvent(new rwt.event.DragEvent($[72],b,this.__dragCache.sourceWidget),true);this.__dragCache.hasFiredDragStart=true;if(this.__dragCache.dragHandlerActive){var c=this.getDropTarget(b);this._fireUserEvents(null,c,b);this.__dragCache.currentDropWidget=c;rwt.widgets.base.ClientDocument.getInstance().setCapture(true)}}}}},_handleMouseUp:function(a){if(!this.__dragCache){return}if(this.__dragCache.dragHandlerActive){this._endDrag(this.getDropTarget(a),a)}else{this.__dragCache=null}},handleKeyEvent:function(a){if(!this.__dragCache){return}switch(a.getType()){case $[10]:this._handleKeyDown(a);return;case $[34]:this._handleKeyUp(a);return}},_handleKeyDown:function(a){if(a.getKeyIdentifier()==$[105]){this.cancelDrag(a)}else{if(this.getCurrentAction()!=null){switch(a.getKeyIdentifier()){case"Shift":case $[283]:case"Alt":this.setAction(this._evalNewAction(a.isShiftPressed(),a.isCtrlPressed(),a.isAltPressed()));this._renderCursor();a.preventDefault()}}}},_handleKeyUp:function(d){var c=d.getKeyIdentifier()=="Shift";var b=d.getKeyIdentifier()==$[283];var a=d.getKeyIdentifier()=="Alt";if(c||b||a){if(this.getCurrentAction()!=null){this.setAction(this._evalNewAction(!c&&d.isShiftPressed(),!b&&d.isCtrlPressed(),!a&&d.isAltPressed()));this._renderCursor();d.preventDefault()}}},cancelDrag:function(a){if(!this.__dragCache){return}if(this.__dragCache.dragHandlerActive){this._endDrag(null,a)}else{this.__dragCache=null}},globalCancelDrag:function(){if(this.__dragCache&&this.__dragCache.dragHandlerActive){this._endDragCore()}},_endDrag:function(a,b){if(a){this.__lastDestinationEvent=b;this.setDestinationWidget(a)}this.getSourceWidget().dispatchEvent(new rwt.event.DragEvent($[262],b,this.getSourceWidget(),a),true);this._endDragCore()},_endDragCore:function(){if(this.__feedbackWidget){var b=rwt.widgets.base.ClientDocument.getInstance();b.remove(this.__feedbackWidget);if(this.__feedbackAutoDispose){this.__feedbackWidget.destroy()}this.__feedbackWidget=null}var a=this.__cursor;if(a){a._style.display="none";this.__cursor=null}this._cursorDeltaX=null;this._cursorDeltaY=null;if(this.__dragCache){this.__dragCache.currentDropWidget=null;this.__dragCache=null}rwt.widgets.base.ClientDocument.getInstance().setCapture(false);this.clearData();this.clearActions();this.setSourceWidget(null);this.setDestinationWidget(null)},setCursorPosition:function(b,a){this._cursorDeltaX=b;this._cursorDeltaY=a},_renderCursor:function(){var b;var a=this.__cursor;switch(this.getCurrentAction()){case"move":b=this.__cursors.move;break;case"copy":b=this.__cursors.copy;break;case $[104]:b=this.__cursors.alias;break;default:b=this.__cursors.nodrop}if(b!=a&&a!=null){a._style.display="none"}if(!b._initialLayoutDone){rwt.widgets.base.ClientDocument.getInstance().add(b);rwt.widgets.base.Widget.flushGlobalQueues()}b._renderRuntimeLeft(this.__dragCache.pageX+((this._cursorDeltaX!=null)?this._cursorDeltaX:this.getDefaultCursorDeltaX()));b._renderRuntimeTop(this.__dragCache.pageY+((this._cursorDeltaY!=null)?this._cursorDeltaY:this.getDefaultCursorDeltaY()));if(b!=a){b._style.display=""}this.__cursor=b},supportsDrop:function(c){var b=c.getDropDataTypes();if(!b){return false}for(var a=0;a<b.length;a++){if(b[a] in this.__data){return true}}return false},addAction:function(b,a){this.__actions[b]=true;if(a||this.getCurrentAction()==null){this.setCurrentAction(b)}},clearActions:function(){this.__actions={};this.setCurrentAction(null)},removeAction:function(a){delete this.__actions[a];if(this.getCurrentAction()==a){this.setCurrentAction(null)}},setAction:function(a){if(a!=null&&!(a in this.__actions)){this.addAction(a,true)}else{this.setCurrentAction(a)}},_evalNewAction:function(d,b,a){if(d&&b&&$[104] in this.__actions){return $[104]}else{if(d&&a&&"copy" in this.__actions){return"copy"}else{if(d&&"move" in this.__actions){return"move"}else{if(a&&$[104] in this.__actions){return $[104]}else{if(b&&"copy" in this.__actions){return"copy"}else{for(var c in this.__actions){return c}}}}}}return null},setFeedbackWidget:function(d,c,b,a){this.__feedbackWidget=d;this.__feedbackDeltaX=(c!=null)?c:10;this.__feedbackDeltaY=(b!=null)?b:10;this.__feedbackAutoDispose=a?true:false},_renderFeedbackWidget:function(){if(this.__feedbackWidget){this.__feedbackWidget.setVisibility(true);this.__feedbackWidget._renderRuntimeLeft(this.__dragCache.pageX+this.__feedbackDeltaX);this.__feedbackWidget._renderRuntimeTop(this.__dragCache.pageY+this.__feedbackDeltaY)}}},destruct:function(){this._disposeObjectDeep("__cursors",1);this._disposeObjects("__feedbackWidget");this._disposeFields("__dragCache","__data","__actions","__lastDestinationEvent")}}); |
| rwt.qx.Class.define($[148],{extend:rwt.event.MouseEvent,construct:function(d,a,e,c){this._mouseEvent=a;var b=null;switch(d){case $[72]:case $[124]:b=a.getOriginalTarget()}arguments.callee.base.call(this,d,a.getDomEvent(),e.getElement(),e,b,c)},members:{getMouseEvent:function(){return this._mouseEvent},startDrag:function(){if(this.getType()!=$[72]){throw new Error("rwt.event.DragEvent startDrag can only be called during the dragstart event: "+this.getType())}this.stopPropagation();rwt.event.DragAndDropHandler.getInstance().startDrag()},addData:function(b,a){rwt.event.DragAndDropHandler.getInstance().addData(b,a)},getData:function(a){return rwt.event.DragAndDropHandler.getInstance().getData(a)},clearData:function(){rwt.event.DragAndDropHandler.getInstance().clearData()},getDropDataTypes:function(){return rwt.event.DragAndDropHandler.getInstance().getDropDataTypes()},addAction:function(a){rwt.event.DragAndDropHandler.getInstance().addAction(a)},removeAction:function(a){rwt.event.DragAndDropHandler.getInstance().removeAction(a)},getAction:function(){return rwt.event.DragAndDropHandler.getInstance().getCurrentAction()},clearActions:function(){rwt.event.DragAndDropHandler.getInstance().clearActions()},setFeedbackWidget:function(d,c,b,a){rwt.event.DragAndDropHandler.getInstance().setFeedbackWidget(d,c,b,a)},setCursorPosition:function(b,a){rwt.event.DragAndDropHandler.getInstance().setCursorPosition(b,a)}},destruct:function(){this._disposeFields("_mouseEvent")}}); |
| rwt.qx.Class.define("rwt.widgets.base.HtmlEmbed",{extend:rwt.widgets.base.Terminator,construct:function(a){arguments.callee.base.call(this);if(a!=null){this.setHtml(a)}},properties:{html:{check:$[46],init:"",apply:"_applyHtml",event:$[337]},textAlign:{check:["left",$[24],$[14],"justify"],nullable:true,themeable:true,apply:$[344]},font:{refine:true,init:null},textColor:{refine:true,init:null}},members:{_applyHtml:function(){if(this._isCreated){this._syncHtml()}},_applyTextAlign:function(b,a){if(b===null){this.removeStyleProperty($[201])}else{this.setStyleProperty($[201],b)}},_applyFont:function(b,a){this._styleFont(b)},_styleFont:function(a){if(a){a.render(this)}else{rwt.html.Font.reset(this)}},_applyTextColor:function(b,a){this._styleTextColor(b)},_styleTextColor:function(a){if(a){this.setStyleProperty($[61],a)}else{this.removeStyleProperty($[61])}},_applyElementData:function(){this._syncHtml()},_syncHtml:function(){this._getTargetNode().innerHTML=this.getHtml()}}}); |
| rwt.qx.Class.define("rwt.widgets.base.Iframe",{extend:rwt.widgets.base.Terminator,construct:function(a){arguments.callee.base.call(this);this.initSelectable();this.initTabIndex();this.initScrolling();if(a!=null){this.setSource(a)}},events:{load:$[11]},statics:{load:function(b){try{if(!b){throw new Error("Could not find iframe which was loaded [A]!")}if(b.currentTarget){b=b.currentTarget}if(b._QxIframe){b._QxIframe._onload()}else{if(b.parentNode){throw new Error("Could not find iframe which was loaded [B]!")}}}catch(a){rwt.runtime.ErrorHandler.processJavaScriptError(a)}},_useAlternateLayouting:function(){return rwt.client.Client.isMobileSafari()}},properties:{tabIndex:{refine:true,init:0},selectable:{refine:true,init:false},appearance:{refine:true,init:$[233]},source:{check:$[46],apply:$[503],event:$[389],nullable:true},frameName:{check:$[46],init:"",apply:"_applyFrameName"},scrolling:{check:["yes","no","auto"],init:"auto",apply:"_applyScrolling"}},members:{getIframeNode:function(){return this._iframeNode},setIframeNode:function(a){return this._iframeNode=a},getBlockerNode:function(){return this._blockerNode},setBlockerNode:function(a){return this._blockerNode=a},getContentWindow:function(){if(this.isCreated()){return rwt.html.Iframes.getWindow(this.getIframeNode())}else{return null}},getContentDocument:function(){if(this.isCreated()){return rwt.html.Iframes.getDocument(this.getIframeNode())}else{return null}},isLoaded:rwt.util.Variant.select($[0],{mshtml:function(){var a=this.getContentDocument();return a?a.readyState=="complete":false},"default":function(){return this._isLoaded}}),reload:function(){if(this.isCreated()&&this.getContentWindow()){this._isLoaded=false;var b=this.queryCurrentUrl()||this.getSource();try{try{this.getContentWindow().location.replace(b)}catch(a){this.getIframeNode().src=b}}catch(a){throw new Error($[482])}}},queryCurrentUrl:function(){var b=this.getContentDocument();try{if(b&&b.location){return b.location.href}}catch(a){}return null},block:function(){if(this._blockerNode&&(!this._blockerNode.parentElement||(rwt.client.Client.isGecko()&&!this._blockerNode.parentNode))){this._getBlockerParent().appendChild(this._blockerNode)}},release:function(){if(this._blockerNode&&(this._blockerNode.parentElement||(rwt.client.Client.isGecko()&&this._blockerNode.parentNode))){this._getBlockerParent().removeChild(this._blockerNode)}},_getBlockerParent:function(){var a=this.getElement();if(this._innerStyle){return a.firstChild}else{return a}},_generateIframeElement:function(){var a=this._createIframeNode(this.getFrameName());a._QxIframe=this;a.frameBorder="0";a.frameSpacing="0";a.marginWidth="0";a.marginHeight="0";if(!rwt.widgets.base.Iframe._useAlternateLayouting()){a.width="100%";a.height="100%"}a.hspace="0";a.vspace="0";a.border="0";a.unselectable="on";a.allowTransparency="true";a.style.position=$[16];a.style.top=0;a.style.left=0;return a},_createIframeNode:rwt.util.Variant.select($[0],{mshtml:function(b){var c=b?'name="'+b+'"':"";var a=rwt.widgets.base.Iframe._element=document.createElement("<iframe "+c+" ></iframe>");a.attachEvent("onload",function(){rwt.widgets.base.Iframe.load(a)});return a},"default":function(b){var a=rwt.widgets.base.Iframe._element=document.createElement($[233]);a.onload=rwt.widgets.base.Iframe.load;if(b){a.name=b}return a}}),_generateBlockerElement:function(){var b=rwt.widgets.base.Iframe._blocker=document.createElement("div");var a=b.style;if(rwt.client.Client.isMshtml()){a.backgroundColor="white";a.filter="Alpha(Opacity=0)"}a.position=$[16];a.top=0;a.left=0;a.width="100%";a.height="100%";a.zIndex=1;return b},_applyElement:function(d,b){var a=this.setIframeNode(this._generateIframeElement());var c=this.setBlockerNode(this._generateBlockerElement());this._syncSource();this._syncScrolling();d.appendChild(a);arguments.callee.base.call(this,d,b)},_beforeAppear:function(){arguments.callee.base.call(this);rwt.widgets.util.IframeManager.getInstance().add(this)},_beforeDisappear:function(){arguments.callee.base.call(this);rwt.widgets.util.IframeManager.getInstance().remove(this)},_applySource:function(b,a){if(this.isCreated()){this._syncSource()}},_syncSource:function(){var b=this.getSource();if(b==null||b===""){b=rwt.remote.Server.RESOURCE_PATH+$[347]}this._isLoaded=false;try{if(this.getContentWindow()){try{this.getContentWindow().location.replace(b)}catch(a){this.getIframeNode().src=b}}else{this.getIframeNode().src=b}}catch(a){throw new Error($[482])}},_applyScrolling:function(b,a){if(this.isCreated()){this._syncScrolling()}},_syncScrolling:function(){this.getIframeNode().setAttribute("scrolling",this.getScrolling())},_applyFrameName:function(c,a,b,d){if(this.isCreated()){throw new Error("Not allowed to set frame name after it has been created")}},_onload:function(){if(!this._isLoaded){this._isLoaded=true;this.createDispatchEvent("load")}},destroy:function(){var a="javascript:false;";if(rwt.client.Client.isMshtml()&&this._iframeNode&&this.getSource()!==a){this.setStyleProperty($[100],$[9]);this.addToDocument();this.addEventListener("load",function(){this.destroy()},this);this.setSource(a)}else{arguments.callee.base.call(this)}},_isLoaded:false},defer:function(e,a){if(rwt.widgets.base.Iframe._useAlternateLayouting()){var c=a._renderRuntimeWidth;var d=a._renderRuntimeHeight;var b=a._resetRuntimeWidth;var g=a._resetRuntimeHeight;a._renderRuntimeWidth=function(h){c.call(this,h);this._iframeNode.style.minWidth=h+"px";this._iframeNode.style.maxWidth=h+"px"};var f=a._renderRuntimeHeight;a._renderRuntimeHeight=function(h){d.call(this,h);this._iframeNode.style.minHeight=h+"px";this._iframeNode.style.maxHeight=h+"px"};a._resetRuntimeWidth=function(h){b.call(this,h);this._iframeNode.style.minWidth="";this._iframeNode.style.maxWidth=""};a._resetRuntimeHeight=function(h){g.call(this,h);this._iframeNode.style.minHeight="";this._iframeNode.style.maxHeight=""}}},destruct:function(){if(this._iframeNode){this._iframeNode._QxIframe=null;this._iframeNode.onload=null;this._iframeNode=null;this._getTargetNode().innerHTML=""}this._disposeFields("__onload","_blockerNode")}}); |
| rwt.qx.Mixin.define("rwt.widgets.util.MResizable",{construct:function(a){this._frame=new rwt.widgets.base.Terminator();this._frame.setAppearance("resizer-frame");this.addEventListener($[1],this._onmousedown);this.addEventListener($[5],this._onmouseup);this.addEventListener($[28],this._onmousemove)},properties:{resizableWest:{check:$[2],init:true,apply:$[252]},resizableNorth:{check:$[2],init:true,apply:$[252]},resizableEast:{check:$[2],init:true,apply:$[252]},resizableSouth:{check:$[2],init:true,apply:$[252]},resizable:{group:["resizableNorth","resizableEast","resizableSouth","resizableWest"],mode:$[219]},resizeMethod:{init:$[99],check:["opaque","lazyopaque",$[99],$[156]],event:"changeResizeMethod"}},members:{isResizable:function(){return this.getResizableWest()||this.getResizableEast()||this.getResizableNorth()||this.getResizableSouth()},getResizable:function(){return this.isResizable()},_applyResizable:function(b,a){},_onmousedown:function(g){if(this._resizeNorth||this._resizeSouth||this._resizeWest||this._resizeEast){this.setCapture(true);this.getTopLevelWidget().setGlobalCursor(this.getCursor());var a=this.getElement();var i=this._getResizeParent();var b=i.getElement();var d=rwt.html.Location.get(b,$[21]);var h=rwt.html.Location.get(a);switch(this.getResizeMethod()){case $[156]:this.setOpacity(0.5);break;case $[99]:var c=this._frame;if(c.getParent()!=i){c.setParent(i);rwt.widgets.base.Widget.flushGlobalQueues()}c._renderRuntimeLeft(h.left-d.left);c._renderRuntimeTop(h.top-d.top);c._renderRuntimeWidth(a.offsetWidth);c._renderRuntimeHeight(a.offsetHeight);c.setZIndex(this.getZIndex()+1);break}var k=this._resizeSession={};var j=this._getMinSizeReference();if(this._resizeWest){k.boxWidth=a.offsetWidth;k.boxRight=h.right}if(this._resizeWest||this._resizeEast){k.boxLeft=h.left;k.parentContentLeft=d.left;k.parentContentRight=d.right;k.minWidth=j.getMinWidthValue();k.maxWidth=j.getMaxWidthValue()}if(this._resizeNorth){k.boxHeight=a.offsetHeight;k.boxBottom=h.bottom}if(this._resizeNorth||this._resizeSouth){k.boxTop=h.top;k.parentContentTop=d.top;k.parentContentBottom=d.bottom;k.minHeight=j.getMinHeightValue();k.maxHeight=j.getMaxHeightValue()}}else{delete this._resizeSession}g.stopPropagation()},_onmouseup:function(b){var a=this._resizeSession;if(a){this.setCapture(false);this.getTopLevelWidget().setGlobalCursor(null);if(this.getResizeMethod()==="lazyopaque"||(this.getResizeMethod()===$[99]&&this._frame&&this._frame.getParent())){if(a.lastLeft!=null){this.setLeft(a.lastLeft)}if(a.lastTop!=null){this.setTop(a.lastTop)}if(a.lastWidth!=null){this._changeWidth(a.lastWidth)}if(a.lastHeight!=null){this._changeHeight(a.lastHeight)}if(this.getResizeMethod()==$[99]){this._frame.setParent(null)}}else{if(this.getResizeMethod()===$[156]){this.setOpacity(null)}}delete this._resizeSession}b.stopPropagation()},_near:function(b,a){return a>(b-5)&&a<(b+5)},_onmousemove:function(d){if(this._disableResize){return}var c=this._resizeSession;if(c){if(this._resizeWest){c.lastWidth=rwt.util.Numbers.limit(c.boxWidth+c.boxLeft-Math.max(d.getPageX(),c.parentContentLeft),c.minWidth,c.maxWidth);c.lastLeft=c.boxRight-c.lastWidth-c.parentContentLeft}else{if(this._resizeEast){c.lastWidth=rwt.util.Numbers.limit(Math.min(d.getPageX(),c.parentContentRight)-c.boxLeft,c.minWidth,c.maxWidth)}}if(this._resizeNorth){c.lastHeight=rwt.util.Numbers.limit(c.boxHeight+c.boxTop-Math.max(d.getPageY(),c.parentContentTop),c.minHeight,c.maxHeight);c.lastTop=c.boxBottom-c.lastHeight-c.parentContentTop}else{if(this._resizeSouth){c.lastHeight=rwt.util.Numbers.limit(Math.min(d.getPageY(),c.parentContentBottom)-c.boxTop,c.minHeight,c.maxHeight)}}switch(this.getResizeMethod()){case"opaque":case $[156]:if(this._resizeWest||this._resizeEast){this.setWidth(c.lastWidth);if(this._resizeWest){this.setLeft(c.lastLeft)}}if(this._resizeNorth||this._resizeSouth){this.setHeight(c.lastHeight);if(this._resizeNorth){this.setTop(c.lastTop)}}break;default:var f=this.getResizeMethod()==$[99]?this._frame:this;if(this._resizeWest||this._resizeEast){f._renderRuntimeWidth(c.lastWidth);if(this._resizeWest){f._renderRuntimeLeft(c.lastLeft)}}if(this._resizeNorth||this._resizeSouth){f._renderRuntimeHeight(c.lastHeight);if(this._resizeNorth){f._renderRuntimeTop(c.lastTop)}}}}else{var g="";var b=this.getElement();this._resizeNorth=this._resizeSouth=this._resizeWest=this._resizeEast=false;var a=rwt.html.Location.get(b);if(this._near(a.top,d.getPageY())){if(this.getResizableNorth()){g="n";this._resizeNorth=true}}else{if(this._near(a.bottom,d.getPageY())){if(this.getResizableSouth()){g="s";this._resizeSouth=true}}}if(this._near(a.left,d.getPageX())){if(this.getResizableWest()){g+="w";this._resizeWest=true}}else{if(this._near(a.right,d.getPageX())){if(this.getResizableEast()){g+="e";this._resizeEast=true}}}if(this._resizeNorth||this._resizeSouth||this._resizeWest||this._resizeEast){this.setCursor(g+"-resize")}else{this.resetCursor()}}d.stopPropagation()}},destruct:function(){this._disposeObjects("_frame")}}); |
| rwt.qx.Class.define("rwt.widgets.base.ResizablePopup",{extend:rwt.widgets.base.Popup,include:rwt.widgets.util.MResizable,construct:function(){arguments.callee.base.call(this);this.initMinWidth();this.initMinHeight();this.initWidth();this.initHeight()},properties:{appearance:{refine:true,init:"resizer"},minWidth:{refine:true,init:"auto"},minHeight:{refine:true,init:"auto"},width:{refine:true,init:"auto"},height:{refine:true,init:"auto"}},members:{_changeWidth:function(a){this.setWidth(a)},_changeHeight:function(a){this.setHeight(a)},_getResizeParent:function(){return this.getParent()},_getMinSizeReference:function(){return this}}}); |
| rwt.qx.Class.define($[505],{extend:rwt.widgets.base.ResizablePopup,construct:function(d,m,g){arguments.callee.base.call(this);this.setWindowManager(g||rwt.widgets.base.Window.getDefaultWindowManager());var e=this._layout=new rwt.widgets.base.VerticalBoxLayout();e.setEdge(0);this.add(e);var f=this._captionBar=new rwt.widgets.base.HorizontalBoxLayout();f.setAppearance("window-captionbar");f.setHeight("auto");f.setOverflow($[9]);e.add(f);var q=this._captionIcon=new rwt.widgets.base.Image();q.setAppearance("window-captionbar-icon");f.add(q);var h=this._captionTitle=new rwt.widgets.base.Label(d);h.setAppearance("window-captionbar-title");h.setSelectable(false);f.add(h);var b=this._captionFlex=new rwt.widgets.base.HorizontalSpacer();f.add(b);var c=this._minimizeButton=new rwt.widgets.base.Button();c.setAppearance("window-captionbar-minimize-button");c.setTabIndex(null);c.addEventListener($[107],this._onminimizebuttonclick,this);c.addEventListener($[1],this._onbuttonmousedown,this);f.add(c);var o=this._restoreButton=new rwt.widgets.base.Button();o.setAppearance("window-captionbar-restore-button");o.setTabIndex(null);o.addEventListener($[107],this._onrestorebuttonclick,this);o.addEventListener($[1],this._onbuttonmousedown,this);var j=this._maximizeButton=new rwt.widgets.base.Button();j.setAppearance("window-captionbar-maximize-button");j.setTabIndex(null);j.addEventListener($[107],this._onmaximizebuttonclick,this);j.addEventListener($[1],this._onbuttonmousedown,this);f.add(j);var i=this._closeButton=new rwt.widgets.base.Button();i.setAppearance("window-captionbar-close-button");i.setTabIndex(null);i.addEventListener($[107],this._onclosebuttonclick,this);i.addEventListener($[1],this._onbuttonmousedown,this);f.add(i);var a=this._pane=new rwt.widgets.base.Parent();a.setHeight("1*");a.setOverflow($[9]);e.add(a);var k=this._statusBar=new rwt.widgets.base.HorizontalBoxLayout();k.setAppearance("window-statusbar");k.setHeight("auto");var n=this._statusText=new rwt.widgets.base.Label("Ready");n.setAppearance("window-statusbar-text");n.setSelectable(false);k.add(n);if(d!=null){this.setCaption(d)}if(m!=null){this.setIcon(m)}this.setAutoHide(false);this.addEventListener($[1],this._onwindowmousedown);this.addEventListener($[13],this._onwindowclick);f.addEventListener($[1],this._oncaptionmousedown,this);f.addEventListener($[5],this._oncaptionmouseup,this);f.addEventListener($[28],this._oncaptionmousemove,this);f.addEventListener($[48],this._oncaptiondblblick,this);this.remapChildrenHandlingTo(this._pane)},statics:{getDefaultWindowManager:function(){if(!rwt.widgets.base.Window._defaultWindowManager){rwt.widgets.base.Window._defaultWindowManager=new rwt.widgets.util.WindowManager()}return rwt.widgets.base.Window._defaultWindowManager}},properties:{appearance:{refine:true,init:"window"},windowManager:{check:$[496],event:"changeWindowManager"},active:{check:$[2],init:false,apply:"_applyActive",event:$[492]},modal:{check:$[2],init:false,apply:"_applyModal",event:"changeModal"},mode:{check:[$[227],$[69]],init:null,nullable:true,apply:"_applyMode",event:"changeMode"},opener:{check:$[129]},caption:{apply:"_applyCaption",event:"changeCaption",dispose:true},icon:{check:$[46],nullable:true,apply:$[364],event:"changeIcon"},status:{check:$[46],init:"Ready",apply:"_applyStatus",event:"changeStatus"},showClose:{check:$[2],init:true,apply:"_applyShowClose"},showMaximize:{check:$[2],init:true,apply:"_applyShowMaximize"},showMinimize:{check:$[2],init:true,apply:"_applyShowMinimize"},showStatusbar:{check:$[2],init:false,apply:"_applyShowStatusbar"},allowClose:{check:$[2],init:true,apply:"_applyAllowClose"},allowMaximize:{check:$[2],init:true,apply:"_applyAllowMaximize"},allowMinimize:{check:$[2],init:true,apply:"_applyAllowMinimize"},showCaption:{check:$[2],init:true,apply:"_applyShowCaption"},showIcon:{check:$[2],init:true,apply:"_applyShowIcon"},moveable:{check:$[2],init:true,event:"changeMoveable"},moveMethod:{check:["opaque",$[99],$[156]],init:"opaque",event:"changeMoveMethod"}},members:{getPane:function(){return this._pane},getCaptionBar:function(){return this._captionBar},getStatusBar:function(){return this._statusBar},close:function(){this.hide()},open:function(a){if(a!=null){this.setOpener(a)}if(this.getCentered()){this.centerToBrowser()}this.show()},focus:function(){this.setActive(true)},blur:function(){this.setActive(false)},maximize:function(){this.setMode($[69])},minimize:function(){this.setMode($[227])},restore:function(){this.setMode(null)},_beforeAppear:function(){rwt.widgets.base.Parent.prototype._beforeAppear.call(this);rwt.widgets.util.PopupManager.getInstance().update();rwt.event.EventHandler.setFocusRoot(this);this.getWindowManager().add(this);this._makeActive()},_beforeDisappear:function(){rwt.widgets.base.Parent.prototype._beforeDisappear.call(this);var a=rwt.event.EventHandler.getFocusRoot();if(a==this||this.contains(a)){rwt.event.EventHandler.setFocusRoot(null)}var b=rwt.event.EventHandler.getCaptureWidget();if(b&&this.contains(b)){b.setCapture(false)}this.getWindowManager().remove(this);this._makeInactive()},_minZIndex:100000,_sendTo:function(){var d=function(g,f){return g.getZIndex()-f.getZIndex()};var e=rwt.util.Objects.getValues(this.getWindowManager().getAll()).sort(d);var c=e.length;var a=this._minZIndex;for(var b=0;b<c;b++){e[b].setZIndex(a++)}},_applyActive:function(b,a){if(a){if(this.getFocused()){this.setFocused(false)}if(this.getWindowManager().getActiveWindow()==this){this.getWindowManager().setActiveWindow(null)}this._setActiveState(false)}else{if(!this.getFocusedChild()){this.setFocused(true)}this._setActiveState(true);this.getWindowManager().setActiveWindow(this);this.bringToFront()}},_setActiveState:function(a){if(!this.getWindowManager().blockActiveState){if(a){this.addState($[63]);this._captionBar.addState($[63]);this._minimizeButton.addState($[63]);this._restoreButton.addState($[63]);this._maximizeButton.addState($[63]);this._closeButton.addState($[63])}else{this.removeState($[63]);this._captionBar.removeState($[63]);this._minimizeButton.removeState($[63]);this._restoreButton.removeState($[63]);this._maximizeButton.removeState($[63]);this._closeButton.removeState($[63])}}},_applyModal:function(c,a){if(this._initialLayoutDone&&this.getVisibility()&&this.getDisplay()){var b=this.getTopLevelWidget();if(c){b.block(this)}else{b.release(this)}}},_applyAllowClose:function(b,a){this._closeButtonManager()},_applyAllowMaximize:function(b,a){this._maximizeButtonManager()},_applyAllowMinimize:function(b,a){this._minimizeButtonManager()},_applyMode:function(b,a){switch(b){case $[227]:this._disableResize=true;this._minimize();break;case $[69]:this._disableResize=true;this._maximize();break;default:delete this._disableResize;switch(a){case $[69]:this._restoreFromMaximized();break;case $[227]:this._restoreFromMinimized();break}}},_applyShowCaption:function(b,a){if(b){this._captionBar.addAt(this._captionTitle,this.getShowIcon()?1:0)}else{this._captionBar.remove(this._captionTitle)}},_applyShowIcon:function(b,a){if(b){this._captionBar.addAtBegin(this._captionIcon)}else{this._captionBar.remove(this._captionIcon)}},_applyShowStatusbar:function(b,a){if(b){this._layout.addAtEnd(this._statusBar)}else{this._layout.remove(this._statusBar)}},_applyShowClose:function(b,a){if(b){this._captionBar.addAtEnd(this._closeButton)}else{this._captionBar.remove(this._closeButton)}},_applyShowMaximize:function(c,a){if(c){var b=this.getMode()==$[69]?this._restoreButton:this._maximizeButton;if(this.getShowMinimize()){this._captionBar.addAfter(b,this._minimizeButton)}else{this._captionBar.addAfter(b,this._captionFlex)}}else{this._captionBar.remove(this._maximizeButton);this._captionBar.remove(this._restoreButton)}},_applyShowMinimize:function(b,a){if(b){this._captionBar.addAfter(this._minimizeButton,this._captionFlex)}else{this._captionBar.remove(this._minimizeButton)}},_minimizeButtonManager:function(){if(this.getAllowMinimize()===false){this._minimizeButton.setEnabled(false)}else{this._minimizeButton.resetEnabled()}},_closeButtonManager:function(){if(this.getAllowClose()===false){this._closeButton.setEnabled(false)}else{this._closeButton.resetEnabled()}},_maximizeButtonManager:function(){var a=this.getAllowMaximize()&&this.getResizable()&&this._computedMaxWidthTypeNull&&this._computedMaxHeightTypeNull;if(this._maximizeButton){if(a===false){this._maximizeButton.setEnabled(false)}else{this._maximizeButton.resetEnabled()}}if(this._restoreButton){if(a===false){this._restoreButton.setEnabled(false)}else{this._restoreButton.resetEnabled()}}},_applyStatus:function(b,a){this._statusText.setText(b)},_applyMaxWidth:function(b,a){arguments.callee.base.call(this,b);this._maximizeButtonManager()},_applyMaxHeight:function(b,a){arguments.callee.base.call(this,b);this._maximizeButtonManager()},_applyResizable:function(b,a){this._maximizeButtonManager()},_applyCaption:function(b,a){this._captionTitle.setText(b)},_applyIcon:function(b,a){this._captionIcon.setSource(b)},_minimize:function(){this.blur();this.hide()},_restoreFromMaximized:function(){this.setLeft(this._previousLeft?this._previousLeft:null);this.setWidth(this._previousWidth?this._previousWidth:null);this.setRight(this._previousRight?this._previousRight:null);this.setTop(this._previousTop?this._previousTop:null);this.setHeight(this._previousHeight?this._previousHeight:null);this.setBottom(this._previousBottom?this._previousBottom:null);this.removeState($[69]);if(this.getShowMaximize()){var a=this._captionBar;var b=a.indexOf(this._restoreButton);a.remove(this._restoreButton);a.addAt(this._maximizeButton,b)}this.focus()},_restoreFromMinimized:function(){if(this.hasState($[69])){this.setMode($[69])}this.show();this.focus()},_maximize:function(){if(this.hasState($[69])){return}this._previousLeft=this.getLeft();this._previousWidth=this.getWidth();this._previousRight=this.getRight();this._previousTop=this.getTop();this._previousHeight=this.getHeight();this._previousBottom=this.getBottom();this.setLeft(0);this.setTop(0);this.setWidth("100%");this.setHeight("100%");this.addState($[69]);if(this.getShowMaximize()){var a=this._captionBar;var b=a.indexOf(this._maximizeButton);a.remove(this._maximizeButton);a.addAt(this._restoreButton,b)}this.focus()},_onwindowclick:function(a){a.stopPropagation()},_onwindowmousedown:function(a){this.focus()},_onbuttonmousedown:function(a){a.stopPropagation()},_onminimizebuttonclick:function(a){this.minimize();this._minimizeButton.removeState($[12]);this._minimizeButton.removeState($[29]);this._minimizeButton.removeState("over");a.stopPropagation()},_onrestorebuttonclick:function(a){this.restore();this._restoreButton.removeState($[12]);this._restoreButton.removeState($[29]);this._restoreButton.removeState("over");a.stopPropagation()},_onmaximizebuttonclick:function(a){this.maximize();this._maximizeButton.removeState($[12]);this._maximizeButton.removeState($[29]);this._maximizeButton.removeState("over");a.stopPropagation()},_onclosebuttonclick:function(a){this.close();this._closeButton.removeState($[12]);this._closeButton.removeState($[29]);this._closeButton.removeState("over");a.stopPropagation()},_oncaptionmousedown:function(i){if(!i.isLeftButtonPressed()||!this.getMoveable()||this.getMode()!=null){return}this._captionBar.setCapture(true);var g=this.getElement();var d=this.getParent();var c=d.getElement();var b=rwt.html.Location.get(c,$[21]);var a=rwt.html.Location.get(g);this._dragSession={offsetX:i.getPageX()-a.left+b.left,offsetY:i.getPageY()-a.top+b.top,parentAvailableAreaLeft:b.left+5,parentAvailableAreaTop:b.top+5,parentAvailableAreaRight:b.right-5,parentAvailableAreaBottom:b.bottom-5};switch(this.getMoveMethod()){case $[156]:this.setOpacity(0.5);break;case $[99]:var h=this._frame;if(h.getParent()!=this.getParent()){h.setParent(this.getParent());rwt.widgets.base.Widget.flushGlobalQueues()}h._renderRuntimeLeft(a.left-b.left);h._renderRuntimeTop(a.top-b.top);h._renderRuntimeWidth(g.offsetWidth);h._renderRuntimeHeight(g.offsetHeight);h.setZIndex(this.getZIndex()+1);break}},_oncaptionmouseup:function(b){var a=this._dragSession;if(!a){return}this._captionBar.setCapture(false);if(a.lastX!=null){this.setLeft(a.lastX)}if(a.lastY!=null){this.setTop(a.lastY)}switch(this.getMoveMethod()){case $[156]:this.setOpacity(null);break;case $[99]:this._frame.setParent(null);break}delete this._dragSession},_oncaptionmousemove:function(b){var a=this._dragSession;if(!a||!this._captionBar.getCapture()){return}if(!rwt.util.Numbers.isBetweenRange(b.getPageX(),a.parentAvailableAreaLeft,a.parentAvailableAreaRight)||!rwt.util.Numbers.isBetweenRange(b.getPageY(),a.parentAvailableAreaTop,a.parentAvailableAreaBottom)){return}var c=this.getMoveMethod()==$[99]?this._frame:this;c._renderRuntimeLeft(a.lastX=b.getPageX()-a.offsetX);c._renderRuntimeTop(a.lastY=b.getPageY()-a.offsetY)},_oncaptiondblblick:function(a){if(!this._maximizeButton.getEnabled()){return}return this.getMode()==$[69]?this.restore():this.maximize()}},destruct:function(){this._disposeObjects("_layout","_captionBar","_captionIcon","_captionTitle","_captionFlex","_closeButton","_minimizeButton","_maximizeButton","_restoreButton","_pane","_statusBar","_statusText")}}); |
| rwt.qx.Class.define("rwt.widgets.base.HorizontalSpacer",{extend:rwt.widgets.base.Terminator,construct:function(){arguments.callee.base.call(this);this.initWidth()},properties:{width:{refine:true,init:"1*"}}}); |
| rwt.qx.Class.define($[496],{extend:rwt.util.ObjectManager,properties:{activeWindow:{check:$[187],nullable:true,apply:"_applyActiveWindow"}},members:{blockActiveState:false,_applyActiveWindow:function(b,a){rwt.widgets.util.PopupManager.getInstance().update();if(a){a.setActive(false)}if(b){b.setActive(true)}if(a&&a.getModal()){a.getTopLevelWidget().release(a)}if(b&&b.getModal()){b.getTopLevelWidget().block(b)}},update:function(){var a,b;var c=this.getAll();for(var b in c){a=c[b];if(!a.getAutoHide()){continue}a.hide()}},compareWindows:function(b,a){switch(b.getWindowManager().getActiveWindow()){case b:return 1;case a:return -1}return b.getZIndex()-a.getZIndex()},add:function(a){arguments.callee.base.call(this,a);this.setActiveWindow(a)},remove:function(e){arguments.callee.base.call(this,e);if(this.getActiveWindow()==e){var c=[];for(var d in this._objects){c.push(this._objects[d])}var b=c.length;if(b===0){this.setActiveWindow(null)}else{if(b===1){this.setActiveWindow(c[0])}else{if(b>1){c.sort(this.compareWindows);this.setActiveWindow(c[b-1])}}}}}}}); |
| rwt.qx.Class.define("rwt.widgets.MenuItemSeparator",{extend:rwt.widgets.base.Parent,construct:function(){arguments.callee.base.call(this);this.initHeight();this.setStyleProperty($[184],"0");this.setStyleProperty($[301],"0");this._line=new rwt.widgets.base.Terminator();this._line.setAnonymous(true);this._line.setAppearance("menu-separator-line");this.add(this._line);this.addEventListener($[1],this._onmousedown)},properties:{height:{refine:true,init:"auto"},appearance:{refine:true,init:"menu-separator"}},members:{hasIcon:rwt.util.Functions.returnFalse,hasLabel:rwt.util.Functions.returnFalse,hasShortcut:rwt.util.Functions.returnFalse,hasMenu:rwt.util.Functions.returnFalse,_onmousedown:function(a){a.stopPropagation()}},destruct:function(){this._disposeObjects("_line")}}); |
| rwt.qx.Class.define($[529],{extend:rwt.widgets.base.Parent,construct:function(a){arguments.callee.base.call(this);if(a!==undefined){this.setButton(a)}this.initTop();this.initRight();this.initBottom();this.initLeft()},properties:{appearance:{refine:true,init:"tab-view-page"},top:{refine:true,init:0},right:{refine:true,init:0},bottom:{refine:true,init:0},left:{refine:true,init:0},display:{refine:true,init:false},button:{check:$[302],apply:"_applyButton"}},members:{_applyButton:function(b,a){if(a){a.setPage(null)}if(b){b.setPage(this)}}}}); |
| rwt.qx.Class.define($[302],{extend:rwt.widgets.base.Atom,construct:function(e,d,c,a,b){arguments.callee.base.call(this,e,d,c,a,b);this.initChecked();this.initTabIndex();this.addEventListener($[3],this._onmouseover);this.addEventListener($[6],this._onmouseout);this.addEventListener($[1],this._onmousedown);this.addEventListener($[10],this._onkeydown);this.addEventListener($[4],this._onkeypress)},events:{closetab:$[11]},properties:{appearance:{refine:true,init:"tab-view-button"},showCloseButton:{check:$[2],init:false,apply:"_applyShowCloseButton",event:"changeShowCloseButton"},closeButtonImage:{check:$[46],init:"icon/16/actions/dialog-cancel.png",apply:"_applyCloseButtonImage"},tabIndex:{refine:true,init:1},checked:{check:$[2],init:false,apply:"_applyChecked",event:$[349]},page:{check:$[529],apply:"_applyPage",nullable:true},manager:{check:$[447],nullable:true,apply:$[367]},name:{check:$[46],apply:"_applyName"}},members:{_onkeydown:function(b){var a=b.getKeyIdentifier();if(a==$[49]||a==$[78]){this.setChecked(true)}},_onkeypress:function(c){switch(c.getKeyIdentifier()){case"Left":var b=this.getPreviousActiveSibling();if(b&&b!=this){delete rwt.widgets.util.FocusHandler.mouseFocus;b.setFocused(true);b.setChecked(true)}break;case $[35]:var a=this.getNextActiveSibling();if(a&&a!=this){delete rwt.widgets.util.FocusHandler.mouseFocus;a.setFocused(true);a.setChecked(true)}break}},_ontabclose:function(a){this.createDispatchDataEvent("closetab",this);a.stopPropagation()},_applyShowCloseButton:function(b,a){if(!this._closeButtonImage){this._closeButtonImage=new rwt.widgets.base.Image(this.getCloseButtonImage())}if(b){this._closeButtonImage.addEventListener($[13],this._ontabclose,this);this.add(this._closeButtonImage)}else{this.remove(this._closeButtonImage);this._closeButtonImage.removeEventListener($[13],this._ontabclose,this)}},_applyCloseButtonImage:function(b,a){if(this._closeButtonImage){this._closeButtonImage.setSource(b)}},_renderAppearance:function(){if(this.getView()){if(this.isFirstVisibleChild()){this.addState("firstChild")}else{this.removeState($[250])}if(this.isLastVisibleChild()){this.addState($[250])}else{this.removeState($[250])}if(this.getView().getAlignTabsToLeft()){this.addState("alignLeft")}else{this.removeState("alignLeft")}if(!this.getView().getAlignTabsToLeft()){this.addState("alignRight")}else{this.removeState("alignRight")}if(this.getView().getPlaceBarOnTop()){this.addState($[153])}else{this.removeState($[153])}if(!this.getView().getPlaceBarOnTop()){this.addState("barBottom")}else{this.removeState("barBottom")}}arguments.callee.base.call(this)},getView:function(){var a=this.getParent();return a?a.getParent():null},_applyManager:function(b,a){if(a){a.remove(this)}if(b){b.add(this)}},_applyParent:function(b,a){arguments.callee.base.call(this,b,a);if(a){a.getManager().remove(this)}if(b){b.getManager().add(this)}},_applyPage:function(b,a){if(a){a.setButton(null)}if(b){b.setButton(this);if(this.getChecked()){b.show()}else{b.hide()}}},_applyChecked:function(c,b){if(this._hasParent){var a=this.getManager();if(a){a.handleItemChecked(this,c)}}if(c){this.addState($[178])}else{this.removeState($[178])}var d=this.getPage();if(d){if(this.getChecked()){d.show()}else{d.hide()}}this.setZIndex(c?1:0)},_applyName:function(b,a){if(this.getManager()){this.getManager().setName(b)}},_onmousedown:function(a){this.setChecked(true)},_onmouseover:function(a){this.addState("over")},_onmouseout:function(a){this.removeState("over")}},destruct:function(){this._disposeObjects("_closeButtonImage")}}); |
| rwt.qx.Class.define("rwt.runtime.ErrorHandler",{statics:{_overlay:null,_box:null,processJavaScriptErrorInResponse:function(a,b,c){var d="<p>Could not process server response:</p><pre>";d+=this._gatherErrorInfo(b,a,c);d+="</pre>";this.showErrorPage(d)},processJavaScriptError:function(b){this.errorObject=b;if(typeof console===$[20]){var e="Error: "+(b.message?b.message:b);if(typeof console.error!==$[8]){console.error(e)}else{if(typeof console.log!==$[8]){console.log(e)}}if(typeof console.log===$[41]&&b.stack){console.log("Error stack:\n"+b.stack)}else{if(typeof console.trace!==$[8]){console.trace()}}}var a=true;try{a=rwt.util.Variant.isSet($[26],"on")}catch(c){}if(a){var d="<p>Javascript error occurred:</p><pre>";d+=this._gatherErrorInfo(b);d+="</pre>";this.showErrorPage(d);throw b}},showErrorPage:function(a){this._enableTextSelection();this._freezeApplication();document.title="Error Page";this._createErrorPageArea().innerHTML=a},showErrorBox:function(e,f){var b=String(window.location);var c=b.indexOf("#");if(c!=-1){b=b.substring(0,c)}var a='href="'+b+'"';var d=e.replace(/\{HREF_URL\}/,a);d=rwt.util.Encoding.replaceNewLines(d,$[97]);if(f){this._freezeApplication()}this._overlay=this._createOverlay();this._box=this._createErrorBoxArea(400,100);this._box.innerHTML=d;this._box.style.backgroundColor="#dae9f7";this._box.style.border="1px solid black";this._box.style.overflow="auto";var g=this._box.getElementsByTagName("a")[0];if(g){g.style.outline="none";g.focus()}},showWaitHint:function(){this._overlay=this._createOverlay();var c=rwt.theme.ThemeStore.getInstance();var a=$[314];var b=c.getSizedImage(a,{},"background-image");if(b&&b[0]){this._box=this._createErrorBoxArea(b[1],b[2]);rwt.html.Style.setBackgroundImage(this._box,b[0]);this._box.style.backgroundColor=$[80];this._box.style.border="none";this._box.style.overflow=$[9]}},hideErrorBox:function(){if(this._box){this._box.parentNode.removeChild(this._box);this._box=null}if(this._overlay){this._overlay.parentNode.removeChild(this._overlay);this._overlay=null}},_gatherErrorInfo:function(b,a,e){var g=[];try{g.push("Error: "+b+"\n");if(a){g.push("Script: "+a)}if(b instanceof Error){for(var d in b){g.push(d+": "+b[d])}if(b.stack){g.push("Stack: "+b.stack)}}g.push("Debug: "+rwt.util.Variant.get($[26]));if(e){g.push("Request: "+e.getData())}var f=rwt.widgets.base.Widget._inFlushGlobalQueues;if(f){g.push("Phase: "+rwt.widgets.base.Widget._flushGlobalQueuesPhase)}}catch(c){}return g.join("\n ")},_createOverlay:function(){var b=document.createElement("div");var d=rwt.theme.ThemeStore.getInstance();var a=d.getColor($[314],{},$[208]);var e=d.getAlpha($[314],{},$[208]);var c=b.style;c.position=$[16];c.width="100%";c.height="100%";c.backgroundColor=a===$[8]?$[80]:a;rwt.html.Style.setOpacity(b,e);c.zIndex=100000000;document.body.appendChild(b);return b},_createErrorPageArea:function(){var a=document.createElement("div");var b=a.style;b.position=$[16];b.width="100%";b.height="100%";b.backgroundColor="#ffffff";b.zIndex=100000001;b.overflow="auto";b.padding="10px";document.body.appendChild(a);return a},_createErrorBoxArea:function(d,a){var b=document.createElement("div");var c=b.style;c.position=$[16];c.width=d+"px";c.height=a+"px";var g=rwt.widgets.base.ClientDocument.getInstance();var f=(g.getClientWidth()-d)/2;var e=(g.getClientHeight()-a)/2;c.left=(f<0?0:f)+"px";c.top=(e<0?0:e)+"px";c.zIndex=100000001;c.padding="10px";c.textAlign=$[24];c.fontFamily='verdana,"lucida sans",arial,helvetica,sans-serif';c.fontSize="12px";c.fontStyle=$[52];c.fontWeight=$[52];document.body.appendChild(b);return b},_freezeApplication:function(){try{var c=rwt.widgets.Display.getCurrent();c.setExitConfirmation(null);rwt.event.EventHandler.detachEvents();rwt.qx.Target.prototype.dispatchEvent=function(){};rwt.animation.Animation._stopLoop()}catch(b){try{console.log("_freezeApplication exception: "+b)}catch(a){}}},_enableTextSelection:function(){var b=rwt.widgets.base.ClientDocument.getInstance();b.setSelectable(true);if(rwt.client.Client.isGecko()){var a=rwt.event.EventHandlerUtil;rwt.html.EventRegistration.removeEventListener(document.documentElement,$[1],a._ffMouseFixListener)}}}}); |
| rwt.qx.Class.define("rwt.widgets.base.GridRowContainer",{extend:rwt.widgets.base.VerticalBoxLayout,construct:function(){arguments.callee.base.call(this);this.setOverflow($[9]);this._scrollLeft=0;this._rowHeight=16;this._rowWidth=0;this._horzGridBorder=null;this._rowBorder=null;this._baseAppearance=null;this._topItem=null;this._vertGridLines=[];this._vertGridBorder=null;this._renderTime=null;this._topItemIndex=0;this._items=[];this._asyncQueue={};this._asyncTimer=new rwt.client.Timer(0);this._asyncTimer.addEventListener($[27],this._onAsyncTimer,this);this._hoverItem=null;this._hoverElement=null;this._config=rwt.widgets.base.GridRowContainer.createRenderConfig();this.addEventListener($[3],this._onRowOver,this);this.addEventListener($[6],this._onRowOver,this);this.addEventListener($[224],this._onElementOver,this)},destruct:function(){this._rowBorder=null;this._topItem=null;this._renderTime=null;this._items=null;this._hoverItem=null;this._hoverElement=null;this._asyncTimer.dispose();this._asyncTimer=null},statics:{createRenderConfig:function(){var a={textColor:null,font:null,enabled:true,focused:false,linesVisible:false,fullSelection:false,hideSelection:false,alwaysHideSelection:false,variant:null,selectionPadding:null,indentionWidth:16,hasCheckBoxes:false,checkBoxLeft:null,checkBoxWidth:null,columnCount:0,treeColumn:0,alignment:[],itemLeft:[],itemWidth:[],itemImageLeft:[],itemImageWidth:[],itemTextLeft:[],itemTextWidth:[],itemCellCheck:[],itemCellCheckLeft:[],itemCellCheckWidth:[]};return a}},members:{getRenderConfig:function(){return this._config},setPostRenderFunction:function(b,a){this._postRender=[b,a]},setSelectionProvider:function(b,a){this._selectionProvider=[b,a]},setBaseAppearance:function(a){this._baseAppearance=a},setRowWidth:function(b){this._rowWidth=b;for(var a=0;a<this._children.length;a++){this._children[a].setWidth(b)}},setRowHeight:function(a){this._rowHeight=a;for(var b=0;b<this._children.length;b++){this._children[b].setHeight(a)}this._updateRowCount()},updateRowLines:function(){var a=this._config.linesVisible?this._getHorizontalGridBorder():null;this._rowBorder=a;for(var b=0;b<this._children.length;b++){this._children[b].setBorder(a);this._children[b].setState($[234],this._config.linesVisible)}},_renderGridVertical:function(){var a=this._config.linesVisible?this._config.columnCount:0;for(var b=0;b<a;b++){this._renderVerticalGridline(b)}for(var b=a;b<this._vertGridLines.length;b++){this._removeGridLine(b)}},_renderVerticalGridline:function(c){var b=this._config.itemWidth[c];var d=this._config.itemLeft[c]+b-1;if(b>0){var a=this._getVerticalGridline(c);a.style.left=d+"px";a.style.height=this.getHeight()+"px"}else{this._removeGridLine(c)}},_getVerticalGridline:function(b){if(typeof this._vertGridLines[b]===$[8]){var a=document.createElement("div");a.style.zIndex=1;a.style.position=$[16];a.style.top="0px";a.style.width="0px";this._getVerticalGridBorder().renderElement(a);if(this._isCreated){this._getTargetNode().appendChild(a)}else{this.addEventListener($[36],function(){this._getTargetNode().appendChild(a)},this)}this._vertGridLines[b]=a}return this._vertGridLines[b]},_removeGridLine:function(a){if(this._vertGridLines[a]){this._getTargetNode().removeChild(this._vertGridLines[a]);delete this._vertGridLines[a]}},_getVerticalGridBorder:function(){if(this._vertGridBorder===null){this._vertGridBorder=this._getGridBorder({vertical:true})}return this._vertGridBorder},_getHorizontalGridBorder:function(){if(this._horzGridBorder===null){this._horzGridBorder=this._getGridBorder({horizontal:true})}return this._horzGridBorder},_getGridBorder:function(d){var a=new rwt.theme.ThemeValues(d);var b=rwt.util.Strings.toFirstUp(this._baseAppearance)+"-GridLine";var c=a.getCssColor(b,$[61]);a.dispose();var e=[0,0,0,0];c=c==$[8]?$[80]:c;if(d.horizontal){e[2]=1}else{if(d.vertical){e[1]=1}}return new rwt.html.Border(e,$[70],c)},_getRowAppearance:function(){return this._baseAppearance+"-row"},setTopItem:function(g,a,d){this._topItem=g;if(d){var h=a-this._topItemIndex;this._topItemIndex=a;var f=h>0;h=Math.abs(h);if(h>=this._children.length){this._renderAll(true)}else{var e=this._children.length-h;var c=f?e:0;var b=f?h:e;this._switchRows(b);this._updateRows(c,h,true);this._renderBounds(true)}}else{this._topItemIndex=a}},renderAll:function(){this._renderAll(false)},renderItemQueue:function(a){for(var c in a){var d=a[c];var b=this._items.indexOf(d);if(b!==-1){this._renderRow(this._children[b],d)}}},renderItem:function(a){if(this._isCreated&&a!=null){var b=this._findRowByItem(a);if(b!=null){this._renderRow(b,a)}}},setScrollLeft:function(a){this._scrollLeft=a;if(this.isSeeable()){arguments.callee.base.call(this,a)}},findItemByRow:function(b){var a=this._children.indexOf(b);return a!==-1?this._items[a]:null},getHoverItem:function(){return this._hoverItem},setHoverItem:function(a){if(a){this._hoverElement=[$[122]]}this._setHoverItem(a)},_renderAll:function(b){if(!b){this._renderGridVertical()}var c=(new Date()).getTime();this._updateRows(0,this._children.length,b);this._renderBounds();if(this._postRender){var a=this._postRender;window.setTimeout(function(){var d=(new Date()).getTime()-c;if(!a[1].isDisposed()){a[0].call(a[1],d)}},0)}},_updateRowCount:function(){var a=this.getHeight();var b=Math.round((this.getHeight()/this._rowHeight)+0.5);while(this._children.length<b){var c=new rwt.widgets.base.GridRow(this.getParent());c.setAppearance(this._getRowAppearance());c.setZIndex(0);c.setWidth(this._rowWidth);c.setHeight(this._rowHeight);c.setBorder(this._rowBorder);c.setState($[234],this._config.linesVisible);this.add(c)}while(this._children.length>b){this._children[this._children.length-1].destroy()}this._items.length=this._children.length;this._updateRowsEvenState()},_updateRowsEvenState:function(){for(var a=0;a<this._children.length;a++){this._children[a].updateEvenState(this._topItemIndex+a)}},_findRowByItem:function(b){var a=this._items.indexOf(b);return a!==-1?this._children[a]:null},_updateRows:function(g,f,c){this._updateRowsEvenState();var b=this._topItem;var e=g+f;var d=0;while(b!=null&&d<this._children.length){if(d>=g&&d<=e){this._renderRow(this._children[d],b,c);this._items[d]=b}b=b.getNextItem();d++}for(var a=d;a<this._children.length;a++){this._renderRow(this._children[a],null,c);this._items[a]=null}},_renderRow:function(c,a,b){c.renderItem(a,this._config,this._isSelected(a),this._getHoverElement(a),b)},_switchRows:function(b){var a=this._children.slice(b);var c=this._items.slice(b);this._children=a.concat(this._children.slice(0,b));this._items=c.concat(this._items.slice(0,b));this._invalidateVisibleChildren()},_renderBounds:function(a){if(a){for(var b=0;b<this._children.length;b++){this._children[b].addToLayoutChanges($[114])}}this._flushChildrenQueue()},_onElementOver:function(c){var d=c.getTarget();var a=d===c.getRelatedTarget();if(d instanceof rwt.widgets.base.GridRow&&a&&this._hoverItem){var b=d.getTargetIdentifier(c);if(this._hoverElement[0]!==b[0]){this._hoverElement=b;this._setHoverItem(this._hoverItem)}}},_onRowOver:function(b){var c=b.getOriginalTarget();if(c instanceof rwt.widgets.base.GridRow){if(b.getType()===$[6]){this._hoverElement=null;this._setHoverItem(null)}else{this._hoverElement=c.getTargetIdentifier(b);var a=this.findItemByRow(c);if(a!==this._hoverItem){this._setHoverItem(a)}}}},_setHoverItem:function(a){var b=this._hoverItem;this._hoverItem=a;if(b!==a){this._renderAsync(b)}this._renderAsync(a)},_getHoverElement:function(b){var a=null;if(this._hoverItem===b){a=this._hoverElement}return a},_renderAsync:function(a){if(a!==null){this._asyncQueue[a.toHashCode()]=a;this._asyncTimer.start()}},_onAsyncTimer:function(){this._asyncTimer.stop();this.renderItemQueue(this._asyncQueue);this._asyncQueue={}},_isSelected:function(a){return this._selectionProvider[0].call(this._selectionProvider[1],a)},_applyHeight:function(b,a){arguments.callee.base.call(this,b,a);this._updateRowCount()},_afterAppear:function(){arguments.callee.base.call(this);this.setScrollLeft(this._scrollLeft)}}}); |
| namespace($[530]);rwt.widgets.util.GridRowContainerWrapper=function(){this._fixedColumns=0;this._container=[];this._container[0]=new rwt.widgets.base.GridRowContainer();this._container[1]=new rwt.widgets.base.GridRowContainer();this._config=rwt.widgets.base.GridRowContainer.createRenderConfig();this._width=0;this._splitOffset=0;this._rowWidth=0;this.addEventListener($[3],this._onRowOver,this);this.addEventListener($[6],this._onRowOver,this)};rwt.widgets.util.GridRowContainerWrapper.createInstance=function(){if(!this.prototype._protoInit){for(var a=0;a<this._CONTAINER_DELEGATES.length;a++){this._createContainerDelegater(this._CONTAINER_DELEGATES[a])}for(var a=0;a<this._CONTAINER_GETTER_DELEGATES.length;a++){this._createContainerGetterDelegater(this._CONTAINER_GETTER_DELEGATES[a])}this.prototype._protoInit=true}return new rwt.widgets.util.GridRowContainerWrapper()};rwt.widgets.util.GridRowContainerWrapper._createContainerDelegater=function(a){this.prototype[a]=function(){this._container[0][a].apply(this._container[0],arguments);this._container[1][a].apply(this._container[1],arguments)}};rwt.widgets.util.GridRowContainerWrapper._createContainerGetterDelegater=function(a){this.prototype[a]=function(){return this._container[0][a].apply(this._container[0],arguments)}};rwt.widgets.util.GridRowContainerWrapper._CONTAINER_DELEGATES=["setParent",$[216],"addEventListener","removeEventListener","setSelectionProvider","setHeight","setTop","setBackgroundColor","setBackgroundImage","setRowHeight","setTopItem","renderItem","setToolTip","renderItemQueue","setBaseAppearance"];rwt.widgets.util.GridRowContainerWrapper._CONTAINER_GETTER_DELEGATES=["getTop","getHeight","getHoverItem","getElement","getChildrenLength"];rwt.widgets.util.GridRowContainerWrapper.prototype={_protoInit:false,getSubContainer:function(a){return this._container[a]||null},setFixedColumns:function(a){this._fixedColumns=a;this._updateConfig()},getFixedColumns:function(){return this._fixedColumns},getRenderConfig:function(){return this._config},setPostRenderFunction:function(){},setWidth:function(a){this._width=a;this._layoutX()},getWidth:function(){return this._width},setRowWidth:function(a){this._rowWidth=a;this._layoutX()},setScrollLeft:function(a){this._container[1].setScrollLeft(a)},findItemByRow:function(b){var a=this._container[0].findItemByRow(b);if(a==null){a=this._container[1].findItemByRow(b)}return a},updateRowLines:function(){this._container[0].getRenderConfig().linesVisible=this._config.linesVisible;this._container[0].updateRowLines();this._container[1].getRenderConfig().linesVisible=this._config.linesVisible;this._container[1].updateRowLines()},renderAll:function(){this._updateConfig();this._container[0].renderAll();this._container[1].renderAll()},_updateConfig:function(){var b=this._container[0].getRenderConfig();var g=this._container[1].getRenderConfig();for(var e in this._config){if(this._config[e] instanceof Array){b[e]=this._config[e].concat();g[e]=this._config[e].concat()}else{b[e]=this._config[e];g[e]=this._config[e]}}g.hasCheckBoxes=false;var a=this._getColumnOrder();var d=0;if(a.length>this._fixedColumns){d=this._config.itemLeft[a[this._fixedColumns]]}else{d=this._width}for(var c=0;c<a.length;c++){var f=a[c];if(c<this._fixedColumns){g.itemWidth[f]=0}else{b.itemWidth[f]=0;g.itemLeft[f]-=d;g.itemImageLeft[f]-=d;g.itemTextLeft[f]-=d}}if(this._splitOffset!==d){this._splitOffset=d;this._layoutX()}},_layoutX:function(){var a=Math.min(this._splitOffset,this._width);this._container[0].setWidth(a);this._container[0].setRowWidth(a);this._container[1].setLeft(a);this._container[1].setWidth(this._width-a);this._container[1].setRowWidth(this._rowWidth-a)},_getColumnOrder:function(){var a=[];var d=this._config.itemLeft.concat();var b=d.concat().sort(function(g,f){return g-f});for(var c=0;c<b.length;c++){var e=d.indexOf(b[c]);a[c]=e;d[e]=null}return a},_onRowOver:function(b){var c=b.getCurrentTarget();for(var a=0;a<this._container.length;a++){if(this._container[a]!==c){this._container[a].setHoverItem(c.getHoverItem())}}}}; |
| namespace($[530]);rwt.widgets.util.GridUtil={setFixedColumns:function(a,c){var b=a.getRowContainer();if(b.setFixedColumns){b.setFixedColumns(c);a.update()}},createTreeRowContainer:function(b){var a;if(b.splitContainer){a=rwt.widgets.util.GridRowContainerWrapper.createInstance()}else{a=new rwt.widgets.base.GridRowContainer()}return a},getColumnByPageX:function(b,d){var c=b.getRowContainer();var e=c instanceof rwt.widgets.util.GridRowContainerWrapper;if(e){c=b.getRowContainer().getSubContainer(0)}var a=this._getColumnByPageX(c,d);if(a===-1&&e){c=b.getRowContainer().getSubContainer(1);a=this._getColumnByPageX(c,d)}return a},_getColumnByPageX:function(a,d){var c=a.getRenderConfig();var g=c.columnCount;var h=g===0?0:-1;var e=a.getFirstChild().getElement();var b=rwt.html.Location.getLeft(e);for(var f=0;h==-1&&f<g;f++){var j=b+c.itemLeft[f];if(d>=j&&d<j+c.itemWidth[f]){h=f}}return h}}; |
| (function(){var b=rwt.html.Style;var a=rwt.util.Variant;rwt.qx.Class.define("rwt.widgets.base.GridRow",{extend:rwt.widgets.base.Terminator,construct:function(){arguments.callee.base.call(this);this.setSelectable(false);this.setHeight(16);this._styleMap={};this._overlayStyleMap={};this._variant=null;this._graphicsOverlay=null;this._expandElement=null;this._checkBoxElement=null;this._overlayElement=null;this._treeColumnElements=[];this._cellLabels=[];this._cellImages=[];this._cellCheckImages=[];this._cellBackgrounds=[];this._miscNodes=[];this._usedMiscNodes=0;this._cellsRendered=0},destruct:function(){this._expandElement=null;this._graphicsOverlay=null;this._checkBoxElement=null;this._treeColumnElements=null;this._cellLabels=null;this._cellImages=null;this._cellCheckImages=null;this._cellBackgrounds=null;this._miscNodes=null},events:{itemRendered:$[11]},members:{renderItem:function(g,e,f,j,i){this._usedMiscNodes=0;if(g!==null){var d=this._renderAsSelected(e,f);var c=this._renderHeight(g,e);var h=i&&!c;this._renderStates(g,e,d,j);this._renderBackground(g,e,d);if(e.treeColumn!==-1){this._renderIndention(g,e,j)}this._renderCheckBox(g,e,j,h);this._renderCells(g,e,d,j,h);this._renderOverlay(g,e);this._hideRemainingElements()}else{this.setBackgroundColor(null);this.setBackgroundImage(null);this.setBackgroundGradient(null);this._clearContent(e);if(!i&&e){this._renderAllBounds(e)}}this.dispatchSimpleEvent("itemRendered",g)},getTargetIdentifier:function(f){var e=f.getDomTarget();var d=[$[122]];if(this._expandElement!==null&&this._expandElement===e){d=[$[289]]}else{if(this._checkBoxElement!==null&&this._checkBoxElement===e){d=[$[259]]}else{if(this._cellCheckImages.indexOf(e)!==-1){var c=this._cellCheckImages.indexOf(e);d=[$[331],c]}else{while(e!==this.getElement()&&d[0]===$[122]){if(this._treeColumnElements.indexOf(e)!=-1){d=[$[258]]}e=e.parentNode}}}}return d},updateEvenState:function(c){this.setState("even",c%2===0)},_renderHeight:function(e,d){var c=false;var f=e.getOwnHeight();if(f!==this.getHeight()){this.setHeight(e.getOwnHeight());c=true}return c},_renderStates:function(e,c,d,f){this.setState($[178],e.isChecked());this.setState($[172],e.isGrayed());this.setState($[92],this._renderAsUnfocused(c));this.setState($[22],c.fullSelection?d:false);this._renderVariant(e.getVariant());this._renderOverState(f,c);this._styleMap=this._getStyleMap();this.setState($[22],d);if(c.fullSelection){this._overlayStyleMap=this._getOverlayStyleMap()}else{this._overlayStyleMap=this._getTreeColumnStyleMap()}},_renderVariant:function(c){if(this._variant!=c){if(this._variant!=null){this.setState(this._variant,false)}this._variant=c;if(this._variant!=null){this.setState(this._variant,true)}}},_renderOverState:function(e,d){var f=e!==null&&d.fullSelection;var c=e!=null&&e[0]===$[258];this.setState("over",f||c)},setState:function(d,c){if(!this.__states){this.__states={}}if(c){this.__states[d]=true}else{delete this.__states[d]}},_getStyleMap:function(){var c=rwt.theme.AppearanceManager.getInstance();return c.styleFrom(this.getAppearance(),this.__states)},_getOverlayStyleMap:function(){var c=rwt.theme.AppearanceManager.getInstance();return c.styleFrom(this.getAppearance()+"-overlay",this.__states)},_getTreeColumnStyleMap:function(){var d=rwt.theme.AppearanceManager.getInstance();var c=d.styleFrom(this.getAppearance(),this.__states);var e=d.styleFrom(this.getAppearance()+"-overlay",this.__states);e.rowForeground=c.foreground;return e},_styleFromMap:function(){},_renderBackground:function(f,d,e){var c=this._styleMap.background;var h=this._styleMap.backgroundImage;var g=this._styleMap.backgroundGradient;if(d.enabled!==false&&f!==null&&f.getBackground()!==null){c=f.getBackground();h=null;g=null}this.setBackgroundColor(c!==$[8]?c:null);this.setBackgroundImage(h!==$[8]?h:null);this.setBackgroundGradient(g!==$[8]?g:null)},_hasOverlayBackground:function(){var c=this._overlayStyleMap.background!==$[8]||this._overlayStyleMap.backgroundImage!==null||this._overlayStyleMap.backgroundGradient!==null;return c},_renderIndention:function(g,d,h){var i=this._getExpandSymbol(g,d,h);if(i!=null){var e=this._addIndentSymbol(g.getLevel(),d,i);this._expandElement=e}else{this._expandElement=null}var c=this._getLineSymbol(g,d);if(c!=null){var f=g.getParent();while(!f.isRootItem()){if(f.hasNextSibling()){this._addIndentSymbol(f.getLevel(),d,c)}f=f.getParent()}}},_getExpandSymbol:function(e,d,f){var c=this._getParentStates(d);if(e.getLevel()===0&&!e.hasPreviousSibling()){c.first=true}if(!e.hasNextSibling()){c.last=true}if(e.hasChildren()){if(e.isExpanded()){c.expanded=true}else{c.collapsed=true}}if(f&&f[0]===$[289]){c.over=true}return this._getImageFromAppearance("indent",c)},_getLineSymbol:function(e,d){var c=this._getParentStates(d);c.line=true;return this._getImageFromAppearance("indent",c)},_getParentStates:function(d){var c={};if(d.variant){c[d.variant]=true}return c},_getImageFromAppearance:function(h,d){var c=this.getAppearance()+"-"+h;var e=rwt.theme.AppearanceManager.getInstance();var g=e.styleFrom(c,d);var f=g&&g.backgroundImage;return f?g.backgroundImage:null},_addIndentSymbol:function(d,f,c){var l=null;var j=(d+1)*f.indentionWidth;var g=f.itemWidth[f.treeColumn];if(j<=g){var h=d*f.indentionWidth;var k=this.getHeight();var e=j-h;var i=this._getMiscImage();this._setImage(i,c,f.enabled);this._setBounds(i,h,0,e,k);l=i}return l},_renderCheckBox:function(j,d,h,f){if(d.hasCheckBoxes){var k=this.__states;this.setState("over",h&&h[0]===$[259]);var g=this._getImageFromAppearance($[357],k);this.setState("over",h!==null);if(this._checkBoxElement===null){this._checkBoxElement=this._createElement(3);this._checkBoxElement.style.backgroundRepeat=$[180];this._checkBoxElement.style.backgroundPosition=$[24]}this._setImage(this._checkBoxElement,g,d.enabled);if(d.treeColumn!==-1||!f){var e=this._getCheckBoxLeft(j,d);var c=this._getCheckBoxWidth(j,d);var i=this.getHeight();this._setBounds(this._checkBoxElement,e,0,c,i)}}},_renderCells:function(m,c,f,k,d){var e=this._getColumnCount(c);if(this._cellsRendered>e){this._removeCells(e,this._cellsRendered)}for(var g=0;g<e;g++){var l=this._isTreeColumn(g,c);if(this._getItemWidth(m,g,c)>0){this._renderCellBackground(m,g,c,d);this._renderCellCheckBox(m,g,c,l,d,k);var j=this._renderCellImage(m,g,c,l,d);var h=this._renderCellLabel(m,g,c,l,d);if(!c.fullSelection&&l){this._treeColumnElements=[j,h]}}else{this._removeCell(g)}}this._cellsRendered=e},_renderOverlay:function(d,c){if(d&&this._hasOverlayBackground()){this._styleOverlay(d,c);this._layoutOverlay(d,c)}else{if(this._overlayElement){this._overlayElement.style.display="none"}}},_styleOverlay:function(e,c){var d=this._getOverlayElement();var g=this._overlayStyleMap;var f=g.backgroundGradient;if(f){this._renderOverlayGradient(d,f)}else{d.style.backgroundColor=g.background;b.setOpacity(d,g.backgroundAlpha)}},_renderOverlayGradient:function(c,d){if(rwt.client.Client.supportsCss3()){b.setBackgroundGradient(c,d)}else{rwt.graphics.GraphicsUtil.setFillGradient(this._getOverlayShape(),d)}},_getOverlayShape:function(){if(!this._graphicsOverlay){var e=rwt.graphics.GraphicsUtil;var d=e.createCanvas();var c=e.createShape($[136]);e.addToCanvas(d,c);this._graphicsOverlay={canvas:d,shape:c};this._getTargetNode().replaceChild(d.node,this._overlayElement);this._overlayElement=d.node;this._overlayElement.style.zIndex=2}return this._graphicsOverlay.shape},_layoutOverlay:function(n,d){var g=this._getOverlayElement();var m=this.getHeight();var e;var c;if(d.fullSelection){e=0;c=this.getWidth()}else{var l=d.treeColumn;var k=d.selectionPadding;e=this._getItemTextLeft(n,l,d);e-=k[0];c=this._getItemTextWidth(n,l,d);c+=c>0?k[0]:0;var j=this._getVisualTextWidth(n,l,d);j+=k[0]+k[1];c=Math.min(c,j)}if(this._graphicsOverlay){var i=rwt.graphics.GraphicsUtil;var h=this._graphicsOverlay.shape;g.style.left=e+"px";g.style.top="0px";var f=[0,0,0,0];i.setRoundRectLayout(h,0,0,c,m,f)}else{this._setBounds(g,e,0,c,m)}},_renderCellBackground:function(h,c,d,i){var f=this._getCellBackgroundColor(h,c,d);var g=false;if(f!==$[8]&&f!=this._styleMap.backgroundColor){g=!i||!this._cellBackgrounds[c];var e=this._getBackgroundElement(c);e.style.backgroundColor=f}else{if(this._cellBackgrounds[c]){this._cellBackgrounds[c].style.backgroundColor=$[80];g=!i}}if(g){this._renderCellBackgroundBounds(h,c,d)}},_renderCellBackgroundBounds:function(h,d,e){var f=this._cellBackgrounds[d];if(f){var i=this._getItemLeft(h,d,e);var g=this._getItemWidth(h,d,e);var c=this.getHeight();if(this.hasState($[234])){c-=1}this._setBounds(f,i,0,g,c)}},_renderCellCheckBox:function(k,i,d,h,e,g){var f=null;var j=false;if(d.itemCellCheck[i]){this.setState($[178],k.isCellChecked(i));this.setState($[172],k.isCellGrayed(i));this.setState("over",g&&g[0]===$[331]&&g[1]===i);var c=this._getImageFromAppearance($[357],this.__states);j=h||!e||!this._cellCheckImages[i];f=this._getCellCheckImage(i);this._setImage(f,c,d.enabled)}if(j){this._renderCellCheckBounds(k,i,d)}return f},_renderCellCheckBounds:function(g,c,d){var e=this._cellCheckImages[c];if(e){var h=this._getCellCheckLeft(g,c,d);var f=this._getCellCheckWidth(g,c,d);this._setBounds(e,h,0,f,this.getHeight())}},_renderCellImage:function(h,c,e,d,j){var i=h.getImage(c);var f=null;var g=false;if(i!==null){g=d||!j||!this._cellImages[c];f=this._getCellImage(c);this._setImage(f,i,g?e.enabled:null)}else{if(this._cellImages[c]){g=d||!j;f=this._getCellImage(c);this._setImage(f,null,null)}}if(g){this._renderCellImageBounds(h,c,e)}return f},_renderCellImageBounds:function(g,c,d){var e=this._cellImages[c];if(e){var h=this._getItemImageLeft(g,c,d);var f=this._getItemImageWidth(g,c,d);this._setBounds(e,h,0,f,this.getHeight())}},_renderCellLabel:function(h,c,e,d,i){var f=null;var g=false;if(h.hasText(c)){g=d||!i||!this._cellLabels[c];f=this._getTextElement(c,e);this._renderElementContent(f,h,c,e.markupEnabled);if(g){f.style.textAlign=d?"left":this._getAlignment(c,e)}this._styleLabel(f,h,c,e)}else{if(this._cellLabels[c]){g=d||!i;f=this._getTextElement(c,e);this._renderElementContent(f,null,-1,e.markupEnabled)}}if(g){this._renderCellLabelBounds(h,c,e)}return f},_renderCellLabelBounds:function(g,c,d){var e=this._cellLabels[c];if(e){var i=this._getItemTextLeft(g,c,d);var f=this._getItemTextWidth(g,c,d);var h=this._getCellPadding(d)[0];this._setBounds(e,i,h,f,this.getHeight()-h)}},_renderElementContent:a.select($[0],{"mshtml|newmshtml":function(f,g,c,e){if(e){var d=g?g.getText(c,false):"";if(f.rap_Markup!==d){f.innerHTML=d;f.rap_Markup=d}}else{f.innerText=g?g.getText(c,false):""}},"default":function(f,g,c,e){var d=g?g.getText(c,!e):"";if(e){if(d!==f.rap_Markup){f.innerHTML=d;f.rap_Markup=d}}else{f.innerHTML=d}}}),_styleLabel:function(e,f,c,d){this._setForeground(e,this._getCellColor(f,c,d));this._setFont(e,this._getCellFont(f,c,d));this._setTextDecoration(e,this._styleMap.textDecoration);b.setTextShadow(e,this._styleMap.textShadow)},_getCellBackgroundColor:function(f,d,e){var c;if(e.enabled===false){c=$[8]}else{c=f.getCellBackground(d)}return c},_getCellColor:function(g,e,f){var d=null;var h=this._styleMap.foreground;var c=this._overlayStyleMap.foreground;if(!f.fullSelection){if(this._isTreeColumn(e,f)){h=this._overlayStyleMap.rowForeground}else{c=$[8]}}if(c!==$[8]){d=c}else{if(f.enabled!==false&&g.getCellForeground(e)){d=g.getCellForeground(e)}else{d=h;if(d===$[8]){d=f.textColor}}}return d},_getCellFont:function(f,d,e){var c=f.getCellFont(d);if(c===null||c===""){c=e.font}return c},_getVisualTextWidth:function(i,g,d){var f=rwt.widgets.util.FontSizeCalculation;var k=0;if(this._cellLabels[g]){var e=this._getCellFont(i,g,d);var j=this._getFontProps(e);var h=this._cellLabels[g].innerHTML;var c=f.computeTextDimensions(h,j);k=c[0]}return k},_renderAsUnfocused:function(c){return !c.focused&&!this.hasState($[356])},_renderAsSelected:function(d,e){var c=(e||this.hasState($[356]))&&(!d.hideSelection||d.focused)&&!d.alwaysHideSelection;return c},_getFontProps:function(d){var c={};var e;if(d instanceof rwt.html.Font){e=d}else{e=rwt.html.Font.fromString(d)}e.renderStyle(c);e.dispose();return c},_setFont:function(d,c){if(c===""||c===null){this._resetFont(d)}else{if(c instanceof rwt.html.Font){c.renderStyle(d.style)}else{d.style.font=c}}},_resetFont:a.select($[0],{"default":function(c){c.style.font="";c.style.fontFamily="";c.style.fontSize="";c.style.fontVariant="";c.style.fontStyle="";c.style.fontWeight=""},mshtml:function(c){c.style.fontFamily="";c.style.fontSize="";c.style.fontVariant="";c.style.fontStyle="";c.style.fontWeight=""}}),_setTextDecoration:function(d,c){if(c==null||c==="none"){d.style.textDecoration=""}else{d.style.textDecoration=c}},_setBounds:function(f,d,h,g,c){try{f.style.left=d+"px";f.style.top=h+"px";f.style.width=g+"px";f.style.height=c+"px"}catch(e){throw"setBounds failed: "+[f,d,h,g,c]}},_setForeground:function(d,c){d.style.color=c!=null?c:""},_setImage:function(e,f,d){e.style.backgroundImage=f?"URL("+f+")":"none";if(d!==null){var c=d?1:0.3;b.setOpacity(e,c)}},_getTextElement:function(d,e){var c=this._cellLabels[d];if(!c){c=this._createElement(3);c.style.verticalAlign=$[44];c.style.whiteSpace="nowrap";if(rwt.client.Client.isNewMshtml()){c.style.backgroundColor="rgba(0, 0, 0, 0)"}this._cellLabels[d]=c}return c},_getCellImage:function(d){var c=this._cellImages[d];if(!c){c=this._createElement(3);c.style.backgroundRepeat=$[180];c.style.backgroundPosition=$[24];this._cellImages[d]=c}return c},_getCellCheckImage:function(d){var c=this._cellCheckImages[d];if(!c){c=this._createElement(3);c.style.backgroundRepeat=$[180];c.style.backgroundPosition=$[24];this._cellCheckImages[d]=c}return c},_getMiscImage:function(){var c=this._getMiscElement(3);c.innerHTML="";c.style.backgroundColor="";return c},_getOverlayElement:function(){if(this._overlayElement===null){this._overlayElement=this._createElement(2)}this._overlayElement.style.display="";return this._overlayElement},_getBackgroundElement:function(d){var c=this._cellBackgrounds[d];if(!c){c=this._createElement(1);this._cellBackgrounds[d]=c}return c},_getMiscElement:function(e){var c;var d=this._getTargetNode();if(this._usedMiscNodes<this._miscNodes.length){c=this._miscNodes[this._usedMiscNodes];c.style.display="";c.style.zIndex=e}else{c=this._createElement(e);c.style.backgroundRepeat=$[180];c.style.backgroundPosition=$[24];this._miscNodes.push(c)}this._usedMiscNodes++;return c},_createElement:function(d){var c=document.createElement("div");c.style.position=$[16];c.style.overflow=$[9];c.style.zIndex=d;this._getTargetNode().appendChild(c);return c},_clearContent:function(c){for(var d=0;d<this._cellBackgrounds.length;d++){if(this._cellBackgrounds[d]){this._cellBackgrounds[d].style.backgroundColor=$[80]}}for(var d=0;d<this._cellCheckImages.length;d++){if(this._cellCheckImages[d]){this._cellCheckImages[d].style.backgroundImage=""}}for(var d=0;d<this._cellImages.length;d++){if(this._cellImages[d]){this._cellImages[d].style.backgroundImage=""}}for(var d=0;d<this._cellLabels.length;d++){if(this._cellLabels[d]){this._renderElementContent(this._cellLabels[d],null,-1,c.markupEnabled)}}if(this._checkBoxElement){this._checkBoxElement.style.backgroundImage=""}this._renderOverlay(null);this._hideRemainingElements()},_renderAllBounds:function(c){var e=this._getColumnCount(c);for(var d=0;d<e;d++){if(!this._isTreeColumn(d,c)){this._renderCellLabelBounds(null,d,c);this._renderCellImageBounds(null,d,c)}this._renderCellBackgroundBounds(null,d,c)}},_hideRemainingElements:function(){var d=this._getTargetNode();for(var c=this._usedMiscNodes;c<this._miscNodes.length;c++){this._miscNodes[c].style.display="none"}},_removeCells:function(e,d){for(var c=e;c<d;c++){this._removeCell(c)}},_removeCell:function(c){this._removeNode(this._cellBackgrounds,c);this._removeNode(this._cellImages,c);this._removeNode(this._cellCheckImages,c);this._removeNode(this._cellLabels,c)},_removeNode:function(c,e){var d=c[e];if(d){this._getTargetNode().removeChild(d);c[e]=null}},_ieFixLayoutOnAppear:a.select($[0],{mshtml:function(){arguments.callee.base.call(this);var d=this._getTargetNode();for(var c=0;c<d.childNodes.length;c++){if(d.childNodes[c].style.display==="none"){d.childNodes[c].style.display="";d.childNodes[c].style.display="none"}}},"default":rwt.util.Functions.returnTrue}),_getCheckBoxLeft:function(d,c){return this._correctOffset(c.checkBoxLeft,d,c)},_getCheckBoxWidth:function(e,d){var c=d.checkBoxWidth;var f=this._getCheckBoxLeft(e,d);return this._correctWidth(c,f,0,d)},_getItemLeft:function(e,d,c){return c.itemLeft[d]},_getItemWidth:function(e,d,c){return c.itemWidth[d]},_getItemImageLeft:function(f,e,d){var c=d.itemImageLeft[e];if(this._isTreeColumn(e,d)){c=this._correctOffset(c,f,d)}return c},_getItemImageWidth:function(f,e,d){var c=d.itemImageWidth[e];if(this._isTreeColumn(e,d)){var g=this._getItemImageLeft(f,e,d);c=this._correctWidth(c,g,e,d)}return c},_getCellCheckLeft:function(f,e,d){var c=d.itemCellCheckLeft[e];if(this._isTreeColumn(e,d)){c=this._correctOffset(c,f,d)}return c},_getCellCheckWidth:function(f,e,d){var c=d.itemCellCheckWidth[e];if(this._isTreeColumn(e,d)){var g=this._getCellCheckLeft(f,e,d);c=this._correctWidth(c,g,e,d)}return c},_getItemTextLeft:function(f,e,d){var c=d.itemTextLeft[e];if(this._isTreeColumn(e,d)){c=this._correctOffset(c,f,d)}return c},_getItemTextWidth:function(f,e,d){var c=d.itemTextWidth[e];if(this._isTreeColumn(e,d)){var g=this._getItemTextLeft(f,e,d);c=this._correctWidth(c,g,e,d)}return c},_getCellPadding:function(c){var d=rwt.theme.AppearanceManager.getInstance();return d.styleFrom(c.baseAppearance+"-cell",{}).padding},_correctOffset:function(e,d,c){return e+this._getIndentionOffset(d.getLevel()+1,c)},_correctWidth:function(g,i,f,d){var c=g;var h=d.itemLeft[f]+d.itemWidth[f];var e=i+c;if(e>h){c=Math.max(0,h-i)}return c},_getAlignment:function(d,c){return c.alignment[d]?c.alignment[d]:"left"},_getIndentionOffset:function(d,c){return c.indentionWidth*d},_getColumnCount:function(c){return Math.max(1,c.columnCount)},_isTreeColumn:function(d,c){return d===c.treeColumn},supportsDrop:function(){return true}}})}()); |
| rwt.qx.Class.define($[435],{extend:rwt.widgets.base.Popup,include:rwt.animation.VisibilityAnimationMixin,construct:function(){arguments.callee.base.call(this);this._layout=null;this._preItem=null;this._hasShowListener=false;this._hasHideListener=false;this._maxCellWidths=null;this._menuLayoutScheduled=false;this._opener=null;this._hoverItem=null;this._openTimer=null;this._closeTimer=null;this._openItem=null;this._itemsHiddenFlag=false;this._hoverFirstItemFlag=false;this.setHeight("auto");this.setWidth("auto");this._maxCellWidths=[null,null,null,null];this._layout=new rwt.widgets.base.VerticalBoxLayout();this._layout.set({top:0,right:0,bottom:0,left:0,anonymous:true});this.add(this._layout);this.addEventListener($[1],this._unhoverSubMenu);this.addEventListener($[6],this._onMouseOut);this.addEventListener($[3],this._onMouseOver);this.addEventListener($[4],this._onKeyPress);this._openTimer=new rwt.client.Timer(250);this._openTimer.addEventListener($[27],this._onopentimer,this);this._closeTimer=new rwt.client.Timer(250);this._closeTimer.addEventListener($[27],this._onclosetimer,this);this.addToDocument()},destruct:function(){this._disposeObjects("_openTimer","_closeTimer","_preItem","_animation");this._disposeFields("_lastActive","_lastFocus","_layout","_opener","_hoverItem","_openItem")},statics:{menuDetectedByKey:function(a){if(a.getKeyIdentifier()==="Apps"){rwt.widgets.Menu.contextMenuHandler(a)}},menuDetectedByMouse:function(a){if(a.getButton()===rwt.event.MouseEvent.C_BUTTON_RIGHT){rwt.widgets.Menu.contextMenuHandler(a)}},contextMenuHandler:function(d){var e=rwt.widgets.util.WidgetUtil.getControl(d.getTarget());var b=e?e.getContextMenu():null;if(b!=null){d.stopPropagation();d.preventDefault();var c=rwt.event.MouseEvent.getPageX();var a=rwt.event.MouseEvent.getPageY();b.setLocation(c,a);b.setOpener(e);b.show()}},getAllowContextMenu:function(c,b){var a=false;switch(c.classname){case $[342]:case $[378]:case"qx.ui.form.TextArea":if(c.getEnabled()!==false){if(rwt.widgets.Menu._hasNativeMenu(b)){a=c.getContextMenu()==null}}break}return a},_hasNativeMenu:function(b){var a=typeof b.tagName==$[7]?b.tagName.toUpperCase():"";return a==="INPUT"||a==="TEXTAREA"}},properties:{appearance:{refine:true,init:"menu"}},events:{changeHoverItem:$[11]},members:{setOpener:function(a){this._opener=a},getOpener:function(a){return this._opener},getFocusRoot:function(){var a=null;if(this._opener){a=this._opener.getFocusRoot()}else{if(this._hasParent){a=this.getParent().getFocusRoot()}}return a},addMenuItemAt:function(b,a){if(b.setParentMenu){b.setParentMenu(this)}this._layout.addAt(b,a)},scheduleMenuLayout:function(){if(this._menuLayoutScheduled!==true){this._menuLayoutScheduled=true;var b=this._layout.getChildren();var c=b.length;for(var a=0;a<c;a++){b[a]._invalidatePreferredInnerWidth();b[a].addToQueue("layoutX")}this.addToQueue("menuLayout")}},_layoutPost:function(a){arguments.callee.base.call(this,a);if(a.menuLayout){this._menuLayoutScheduled=false;if(this.isSeeable()){this._afterAppear()}}},getMaxCellWidth:function(b){if(this._maxCellWidths[b]==null){var a=0;var d=this._layout.getChildren();var e=d.length;for(var c=0;c<e;c++){if(d[c].getPreferredCellWidth){a=Math.max(a,d[c].getPreferredCellWidth(b))}}this._maxCellWidths[b]=a}if(b===0&&this._maxCellWidths[0]===0&&this.getMaxCellWidth(1)===0){this._maxCellWidths[b]=13}return this._maxCellWidths[b]},invalidateMaxCellWidth:function(a){this._maxCellWidths[a]=null},invalidateAllMaxCellWidths:function(){for(var a=0;a<4;a++){this._maxCellWidths[a]=null}},isSubElement:function(b,e){var f=false;if((b.getParent()===this._layout)||((!e)&&(b===this))){f=true}if(!f){var d=this._layout.getChildren(),c=d.length;for(var g=0;g<c;g++){if(this.hasSubmenu(d[g])&&d[g].getMenu().isSubElement(b,e)){f=true}}}return f},setHoverItem:function(b,c){var a=b?b:this._openItem;if(this._hoverItem&&this._hoverItem!=a){this._hoverItem.removeState("over")}if(a){a.addState("over")}this._hoverItem=a;if(!c){this._openTimer.setEnabled(false);if(this.hasSubmenu(a)&&(this._openItem!=a)){this._openTimer.setEnabled(true)}if(this._openItem){if(this._openItem==a||a==null){this._closeTimer.setEnabled(false)}else{if(a!=null){this._closeTimer.setEnabled(true)}}}}this.dispatchSimpleEvent("changeHoverItem")},getHoverItem:function(a){return this._hoverItem},hoverFirstItem:function(){if(this._isDisplayable&&!this._itemsHiddenFlag){this.setHoverItem(null,true);this._hoverNextItem();this.removeState($[517])}else{this.addState($[517])}},_hoverNextItem:function(){var d;var c=null;var b=this._layout.getVisibleChildren();var a=b.indexOf(this._hoverItem);var e=a;do{a++;if(a>b.length){a=-1}d=a>=0?b[a]:null;if(d&&d.isEnabled()&&d.classname==$[273]){c=d}}while(!c&&(a!=e));this.setHoverItem(c,true)},_hoverPreviousItem:function(){var d;var c=null;var b=this._layout.getVisibleChildren();var a=b.indexOf(this._hoverItem);var e=a;do{a--;if(a<-1){a=b.length}d=a>=0?b[a]:null;if(d&&d.isEnabled()&&d.classname==$[273]){c=d}}while(!c&&(a!=e));this.setHoverItem(c,true)},_makeActive:function(){this._lastActive=this.getFocusRoot().getActiveChild();this._lastFocus=this.getFocusRoot().getFocusedChild();this.getFocusRoot().setActiveChild(this)},_makeInactive:function(){var a=this.getFocusRoot();a.setActiveChild(this._lastActive);a.setFocusedChild(this._lastFocus)},_beforeAppear:function(){rwt.widgets.base.Parent.prototype._beforeAppear.call(this);rwt.widgets.util.MenuManager.getInstance().add(this);this.bringToFront();this._makeActive();this._menuShown()},_beforeDisappear:function(){rwt.widgets.base.Parent.prototype._beforeDisappear.call(this);rwt.widgets.util.MenuManager.getInstance().remove(this);if(this.getFocusRoot()){this._makeInactive()}this.setOpenItem(null);this.setHoverItem(null);if(this._opener instanceof rwt.widgets.MenuItem){var a=this._opener.getParentMenu();if(a instanceof rwt.widgets.MenuBar){this._opener.removeState($[12]);if(a.getOpenItem()==this._opener){a.setOpenItem(null)}}}this._menuHidden()},hasSubmenu:function(a){return a&&a.getMenu&&a.getMenu()},_onopentimer:function(a){this._openTimer.stop();this.setOpenItem(this._hoverItem);this._closeTimer.stop()},_onclosetimer:function(a){this._closeTimer.stop();this.setOpenItem(null)},setOpenItem:function(d){if(this._openItem&&this._openItem.getMenu()){this._openItem.setSubMenuOpen(false);var a=this._openItem.getMenu();a.hide();this._makeActive()}this._openItem=d;if(d&&d.getMenu()){var b=d.getMenu();d.setSubMenuOpen(true);b.setOpener(d);var e=d.getElement();var c=this.getElement();b.setTop(rwt.html.Location.getTop(e)-2);b.setLeft(rwt.html.Location.getLeft(c)+c.offsetWidth-3);b.show()}},_onMouseOut:function(a){var c=a.getTarget();var b=a.getRelatedTarget();if(c==this||(b!=this&&!this.contains(b))){this.setHoverItem(null)}},_onMouseOver:function(a){var b=a.getTarget();if(b!=this){this.setHoverItem(b)}this._unhoverSubMenu()},_unhoverSubMenu:function(){if(this._openItem){var a=this._openItem.getMenu();a.setOpenItem(null);a.setHoverItem(null)}},_onKeyPress:function(a){switch(a.getKeyIdentifier()){case"Up":this._handleKeyUp(a);break;case"Down":this._handleKeyDown(a);break;case"Left":this._handleKeyLeft(a);break;case $[35]:this._handleKeyRight(a);break;case $[49]:this._handleKeyEnter(a);break}},_handleKeyUp:function(a){if(this._openItem){this._openItem.getMenu()._hoverPreviousItem()}else{this._hoverPreviousItem()}a.preventDefault();a.stopPropagation()},_handleKeyDown:function(a){if(this._openItem){this._openItem.getMenu()._hoverNextItem()}else{this._hoverNextItem()}a.preventDefault();a.stopPropagation()},_handleKeyLeft:function(c){var a=this._opener?this._opener.getParentMenu():null;if(a instanceof rwt.widgets.Menu){var b=this._opener;a.setOpenItem(null);a.setHoverItem(b,true);c.preventDefault();c.stopPropagation()}},_handleKeyRight:function(a){if(this.hasSubmenu(this._hoverItem)){this._onopentimer();this.setHoverItem(null,true);this._openItem.getMenu().hoverFirstItem();a.preventDefault();a.stopPropagation()}},_handleKeyEnter:function(a){if(this.hasSubmenu(this._hoverItem)){this._onopentimer();this.setHoverItem(null,true);this._openItem.getMenu().hoverFirstItem()}else{if(this._hoverItem){this._hoverItem.execute();rwt.widgets.util.MenuManager.getInstance().update()}}a.preventDefault();a.stopPropagation()},setHasShowListener:function(a){if(!this.hasState($[175])){this._hasShowListener=a}},setHasHideListener:function(a){if(!this.hasState($[175])){this._hasHideListener=a}},_menuShown:function(){if(!rwt.remote.EventUtil.getSuspended()){if(this._hasShowListener){if(this._preItem==null){this._preItem=new rwt.widgets.MenuItem("push");this._preItem.setText("...");this._preItem.setEnabled(false);this.addMenuItemAt(this._preItem,0)}var a=this._layout.getChildren();for(var b=0;b<a.length;b++){var c=a[b];c.setDisplay(false)}this._preItem.setDisplay(true);this._itemsHiddenFlag=true;if(this.getWidth()<60){this.setWidth(60)}rwt.remote.Server.getInstance().getRemoteObject(this).notify("Show")}else{var d=this._layout.getChildren().length!==0;this.setDisplay(d);if(d){if(this._hoverFirstItemFlag){this.hoverFirstItem()}}}}},_menuHidden:function(){if(!rwt.remote.EventUtil.getSuspended()){if(this._hasHideListener){rwt.remote.Server.getInstance().getRemoteObject(this).notify("Hide")}}},unhideItems:function(c){if(c){var a=this._layout.getChildren();for(var b=0;b<a.length;b++){a[b].setDisplay(true)}if(this._preItem){this._preItem.setDisplay(false)}this._itemsHiddenFlag=false;if(this._hoverFirstItemFlag){this.hoverFirstItem()}}else{this.hide()}this._hoverFirstItemFlag=false},showMenu:function(b,a,c){if(b!=null){b._renderAppearance();b.setLocation(a,c);b.show()}}}}); |
| rwt.remote.HandlerRegistry.add($[435],{factory:function(b){var a;if(b.style.indexOf("BAR")!=-1){a=new rwt.widgets.MenuBar()}else{a=new rwt.widgets.Menu()}rwt.remote.HandlerUtil.addStatesForStyles(a,b.style);return a},destructor:rwt.remote.HandlerUtil.getWidgetDestructor(),getDestroyableChildren:rwt.remote.HandlerUtil.getDestroyableChildrenFinder(),properties:["parent",$[87],$[243],$[86]],propertyHandler:{parent:function(b,a){if(b.hasState($[175])){rwt.remote.HandlerUtil.callWithTarget(a,function(c){b.setParent(c)})}},bounds:function(b,a){if(b.hasState($[175])){b.setLeft(a[0]);b.setTop(a[1]);b.setWidth(a[2]);b.setHeight(a[3])}}},listeners:["Show","Hide","Help"],listenerHandler:{Help:rwt.remote.HandlerUtil.getControlListenerHandler("Help")},methods:["unhideItems","showMenu"],methodHandler:{unhideItems:function(b,a){if(!b.hasState($[175])){b.unhideItems(a.reveal)}},showMenu:function(b,a){if(b.hasState("rwt_POP_UP")){b.showMenu(b,a.x,a.y)}}}}); |
| rwt.qx.Class.define("rwt.remote.EventUtil",{statics:{_suspended:false,setSuspended:function(a){this._suspended=a},getSuspended:function(){return this._suspended},DOUBLE_CLICK_TIME:500,_capturingWidget:null,_lastMouseDown:{widget:null,button:"",x:-1,y:-1,mouseUpCount:0},_shiftKey:false,_ctrlKey:false,_altKey:false,_metaKey:false,eventTimestamp:function(){var a=rwt.runtime.System.getInstance();return new Date().getTime()-a.getStartupTime()},widgetDefaultSelected:function(a,e){if(!rwt.remote.EventUtil.getSuspended()){var d=rwt.remote.Server.getInstance();var b={};rwt.remote.EventUtil.addModifierToProperties(b);var c=d.getRemoteObject(e?e:a.getTarget());c.notify($[111],b)}},widgetSelected:function(b){var e=b.getTarget().getLeft();var d=b.getTarget().getTop();var c=b.getTarget().getWidth();var a=b.getTarget().getHeight();rwt.remote.EventUtil.notifySelected(b.getTarget(),e,d,c,a)},notifySelected:function(h,g,f,d,a,c){if(!rwt.remote.EventUtil.getSuspended()){var e=rwt.remote.Server.getInstance();var b;if(arguments.length===2){b=g}else{b={x:g,y:f,width:d,height:a,detail:c}}rwt.remote.EventUtil.addModifierToProperties(b);e.getRemoteObject(h).notify($[30],b)}},notifyDefaultSelected:function(h,g,f,d,a,c){if(!rwt.remote.EventUtil.getSuspended()){var e=rwt.remote.Server.getInstance();var b;if(arguments.length===2){b=g}else{b={x:g,y:f,width:d,height:a,detail:c}}rwt.remote.EventUtil.addModifierToProperties(b);e.getRemoteObject(h).notify($[111],b)}},addModifierToProperties:function(a,c){var b=rwt.client.Client.getPlatform()==="mac";var d=b&&(c?c.metaKey:rwt.remote.EventUtil._metaKey);a.shiftKey=c?c.shiftKey:rwt.remote.EventUtil._shiftKey;a.ctrlKey=(c?c.ctrlKey:rwt.remote.EventUtil._ctrlKey)||d;a.altKey=c?c.altKey:rwt.remote.EventUtil._altKey},_getKeyModifier:function(){var a="";var b=rwt.client.Client.getPlatform()==="mac"&&rwt.remote.EventUtil._metaKey;if(rwt.remote.EventUtil._shiftKey){a+="shift,"}if(rwt.remote.EventUtil._ctrlKey||b){a+="ctrl,"}if(rwt.remote.EventUtil._altKey){a+="alt,"}return a},focusGained:function(a){if(!rwt.remote.EventUtil.getSuspended()){var b=rwt.remote.Server.getInstance().getRemoteObject(a.getTarget());b.notify("FocusIn")}},focusLost:function(a){if(!rwt.remote.EventUtil.getSuspended()){var b=rwt.remote.Server.getInstance().getRemoteObject(a.getTarget());b.notify("FocusOut")}},mouseDown:function(a){if(!rwt.remote.EventUtil.getSuspended()&&rwt.remote.EventUtil._isRelevantMouseEvent(this,a)){rwt.remote.EventUtil._capturingWidget=this;rwt.remote.EventUtil._notifyMouseListeners(this,a,"MouseDown")}},mouseUp:function(a){if(!rwt.remote.EventUtil.getSuspended()&&rwt.remote.EventUtil._isRelevantMouseEvent(this,a)){rwt.remote.EventUtil._capturingWidget=null;rwt.remote.EventUtil._notifyMouseListeners(this,a,"MouseUp")}},mouseDoubleClick:function(a){if(!rwt.remote.EventUtil.getSuspended()&&rwt.remote.EventUtil._isRelevantMouseEvent(this,a)){rwt.remote.EventUtil._capturingWidget=this;if(rwt.remote.EventUtil._isDoubleClick(this,a)){rwt.remote.EventUtil._clearLastMouseDown();rwt.remote.EventUtil._notifyMouseListeners(this,a,$[471])}else{var b=rwt.remote.EventUtil._lastMouseDown;b.widget=this;b.button=a.getButton();b.x=a.getPageX();b.y=a.getPageY();b.mouseUpCount=0;rwt.client.Timer.once(rwt.remote.EventUtil._clearLastMouseDown,this,rwt.remote.EventUtil.DOUBLE_CLICK_TIME)}}},mouseUpCounter:function(a){if(!rwt.remote.EventUtil.getSuspended()&&rwt.remote.EventUtil._isRelevantMouseEvent(this,a)){rwt.remote.EventUtil._capturingWidget=null;rwt.remote.EventUtil._lastMouseDown.mouseUpCount+=1}},_isRelevantMouseEvent:function(c,b){var a=true;if(c!==rwt.remote.EventUtil._capturingWidget&&c!==b.getOriginalTarget()){var f=rwt.remote.WidgetManager.getInstance();var e=b.getOriginalTarget();var d=f.findEnabledControl(e);a=c===d}return a},_clearLastMouseDown:function(){var a=rwt.remote.EventUtil._lastMouseDown;a.widget=null;a.button="";a.mouseUpCount=0;a.x=-1;a.y=-1},_isDoubleClick:function(b,a){var c=rwt.remote.EventUtil._lastMouseDown;return c.mouseUpCount===1&&c.widget===b&&c.button===rwt.event.MouseEvent.C_BUTTON_LEFT&&c.button===a.getButton()},_notifyMouseListeners:function(g,b,e){var d=rwt.remote.EventUtil._determineMouseButton(b);var a=rwt.remote.EventUtil._getKeyModifier();var f=rwt.remote.Server.getInstance().getRemoteObject(g);var c={button:d,x:b.getPageX(),y:b.getPageY(),time:this.eventTimestamp()};rwt.remote.EventUtil.addModifierToProperties(c);f.notify(e,c)},_determineMouseButton:function(b){var a=0;switch(b.getButton()){case rwt.event.MouseEvent.C_BUTTON_LEFT:a=1;break;case rwt.event.MouseEvent.C_BUTTON_MIDDLE:a=2;break;case rwt.event.MouseEvent.C_BUTTON_RIGHT:a=3;break}return a},helpRequested:function(a){if(a.getKeyIdentifier()==="F1"){a.stopPropagation();a.preventDefault();var c=a.getTarget();var e=rwt.remote.WidgetManager.getInstance();var d=e.findIdByWidget(c);if(d===null){c=e.findControl(c);d=e.findIdByWidget(c)}if(d!=null){var b=rwt.remote.Server.getInstance().getRemoteObject(c);b.notify("Help")}}},menuDetectedByKey:function(b){if(b.getKeyIdentifier()==="Apps"){b.stopPropagation();b.preventDefault();var a=rwt.event.MouseEvent.getPageX();var c=rwt.event.MouseEvent.getPageY();rwt.remote.EventUtil.sendMenuDetected(b.getTarget(),a,c)}},menuDetectedByMouse:function(b){if(b.getButton()===rwt.event.MouseEvent.C_BUTTON_RIGHT){b.stopPropagation();b.preventDefault();var a=b.getPageX();var c=b.getPageY();rwt.remote.EventUtil.sendMenuDetected(b.getTarget(),a,c)}},sendMenuDetected:function(c,a,f){if(!rwt.remote.EventUtil.getSuspended()){var e=rwt.remote.WidgetManager.getInstance();while(c!=null&&!e.isControl(c)){c=c.getParent?c.getParent():null}var d=e.findIdByWidget(c);if(d!=null){var b=rwt.remote.Server.getInstance().getRemoteObject(c);b.notify("MenuDetect",{x:a,y:f})}}}}}); |
| rwt.qx.Class.define("rwt.widgets.base.WidgetToolTip",{type:$[39],extend:rwt.widgets.base.ToolTip,include:rwt.animation.VisibilityAnimationMixin,construct:function(){arguments.callee.base.call(this);this._atom._createLabel();this._atom.getLabelObject().setMode("html")},members:{_applyBoundToWidget:function(c,a){arguments.callee.base.call(this,c,a);this.updateText(c);var b=rwt.widgets.util.ToolTipManager.getInstance();b.setCurrentToolTip(null)},updateText:function(a){this._atom.setLabel(a.getUserData($[182]))}}}); |
| rwt.qx.Mixin.define("rwt.widgets.util.GraphicsMixin",{destruct:function(){this._gfxProperties=null;this._gfxData=null;this._gfxCanvas=null},statics:{getSupportsShadows:function(){if(this._shadowSupport===undefined){var b=rwt.client.Client.getEngine();var a=rwt.client.Client.getVersion();this._shadowSupport=false;switch(b){case $[121]:this._shadowSupport=a>=4;break;case $[110]:this._shadowSupport=a>=7;break;case"opera":this._shadowSupport=a>=11.6;break;case $[109]:this._shadowSupport=a>=532.9;break}}return this._shadowSupport}},members:{_gfxData:null,_gfxProperties:null,_gfxCanvas:null,_gfxEnabled:false,_gfxBorderEnabled:false,_gfxBackgroundEnabled:false,_gfxCanvasAppended:false,_applyBackgroundGradient:function(b,a){this.setGfxProperty($[115],b);this._handleGfxBackground()},_applyShadow:rwt.util.Variant.select($[0],{"default":function(d,b){if(rwt.widgets.util.GraphicsMixin.getSupportsShadows()){var c=d!=null&&d[0];var e=this.getOpacity()!==1&&this.getOpacity()!==null;var a=d!=null&&e&&rwt.client.Client.isMshtml();if(c||a){this.setGfxProperty($[19],null)}else{this.setGfxProperty($[19],d)}this.setGfxProperty($[194],null);this._handleGfxShadow()}},newmshtml:function(b,a){arguments.callee.base.call(this,b,a)}}),_applyOpacity:function(b,a){arguments.callee.base.call(this,b,a);this._checkAntiAlias(b);this._applyShadow(this.getShadow())},_checkAntiAlias:rwt.util.Variant.select($[0],{"default":rwt.util.Functions.returnTrue,mshtml:function(a){if(this._gfxData&&this._gfxData.backgroundInsert){var b=a===1||a===null;rwt.graphics.VML._setAntiAlias(this._gfxData.backgroundShape,b)}}}),_styleBackgroundColor:function(a){if(this._gfxBackgroundEnabled){this.setGfxProperty($[51],a);if(this.getGfxProperty($[177])==$[70]&&this._isCanvasReady()){this._renderGfxBackground()}}else{arguments.callee.base.call(this,a)}},_styleBackgroundImage:function(a){if(this._gfxBackgroundEnabled){this.setGfxProperty($[81],a);if(this.getGfxProperty($[177])==$[15]&&this._isCanvasReady()&&a!=null){this._renderGfxBackground()}else{this._handleGfxBackground()}}else{if(a==null&&this.getGfxProperty($[115])!=null){this._handleGfxBackground()}else{arguments.callee.base.call(this,a)}}},renderBorder:function(a){var b=this.__borderObject;if(b&&b.getStyle()===$[85]){this._styleGfxBorder(b.getWidths(),b.getColor(),b.getRadii())}else{if(this._gfxBorderEnabled){this._styleGfxBorder(null,null,null)}arguments.callee.base.call(this,a)}},_styleGfxBorder:function(d,b,f){var a=0;if(d){for(var c=0;c<d.length;c++){a=Math.max(a,d[c])}}var g;if(d!=null&&f!=null&&a>0){g=[];for(var c=0;c<4;c++){var e=c>0?c-1:3;if(d[c]===0||d[e]===0){g[c]=0}else{g[c]=f[c]}}}else{g=f}this.setGfxProperty($[271],d);this.setGfxProperty($[352],a);this.setGfxProperty($[328],b);this.setGfxProperty($[236],g);this.setGfxProperty($[226],null);this.setGfxProperty($[194],null);this._handleGfxBorder();this._handleCssRadii(f)},_handleCssRadii:rwt.util.Variant.select($[0],{"default":rwt.util.Functions.returnTrue,newmshtml:function(c){var b=rwt.html.Border._BORDERRADII;for(var a=0;a<4;a++){this._style[b[a]]=c?c[a]+"px":""}}}),setGfxProperty:function(a,b){if(this._gfxProperties===null){this._gfxProperties={}}this._gfxProperties[a]=b},getGfxProperty:function(a){var b=this._gfxProperties!==null?this._gfxProperties[a]:null;return typeof b!=$[8]?b:null},_handleGfxBorder:function(){var b=this.getGfxProperty($[236])!=null&&this.getGfxProperty($[271])!=null&&this.getGfxProperty($[328])!=null;var a=(this._gfxBorderEnabled!=b);if(a){if(b){this._gfxBorderEnabled=true}else{this._gfxBorderEnabled=false;this._resetTargetNode()}this._handleGfxBackground();this._handleGfxStatus()}if(this._isCanvasReady()&&b){this._renderGfxBorder();if(!this._willBeLayouted()){this._layoutShapes()}}else{if(a&&!b){this._prepareBackgroundShape()}}},_handleGfxBackground:function(){var f=this.getBackgroundImage()!=null;var d=false;if(f){this.setGfxProperty($[177],$[15])}else{d=this.getGfxProperty($[115])!=null;if(d){this.setGfxProperty($[177],$[115])}else{this.setGfxProperty($[177],$[70])}}var b=(d||this._gfxBorderEnabled);var a=(this._gfxBackgroundEnabled!=b);if(a){if(b){var c=this.getStyleProperty($[51]);this.removeStyleProperty($[51]);this.setGfxProperty($[51],c);var e=this.getBackgroundImage();this.setGfxProperty($[81],e);this.removeStyleProperty($[81]);this._gfxBackgroundEnabled=true}else{this._gfxBackgroundEnabled=false;this._applyBackgroundColor(this.getBackgroundColor());this.setGfxProperty($[51],null);this._applyBackgroundImage(this.getBackgroundImage());this.setGfxProperty($[81],null)}this._handleGfxStatus()}if(this._isCanvasReady()&&b){this._renderGfxBackground();if(a&&!this._gfxBorderEnabled&&!this._willBeLayouted()){this._layoutShapes()}}else{if(a&&!b){this._prepareBackgroundShape()}}},_handleGfxShadow:function(){var a=this.getGfxProperty($[19])!=null;this._gfxShadowEnabled=a;this._handleGfxStatus();if(this._isCanvasReady()&&a){this._renderGfxShadow();if(!this._willBeLayouted()){this._layoutShapes()}}else{if(!this._gfxShadowEnabled&&this._gfxData&&this._gfxData.shadowInsert){this._prepareShadowShape()}}},_handleGfxStatus:function(){var a=this._gfxBorderEnabled||this._gfxBackgroundEnabled||this._gfxShadowEnabled;if(a!=this._gfxEnabled){if(a){this._gfxEnabled=true;this.addEventListener($[323],this._gfxOnElementChanged,this);this.addEventListener("flush",this._gfxOnFlush,this)}else{this._gfxEnabled=false;this.removeEventListener($[323],this._gfxOnElementChanged,this);this.removeEventListener("flush",this._gfxOnFlush,this)}this._targetNodeEnabled=(this._innerStyle||a)&&!this._gfxBorderEnabled}},_gfxOnElementChanged:function(a){if(a.getValue()==null&&this._gfxCanvasAppended){this._removeCanvas()}if(a.getValue()!=null&&this._isCanvasReady()){if(this._gfxBackgroundEnabled){this._renderGfxBackground()}if(this._gfxShadowEnabled){this._renderGfxShadow()}}},_gfxOnFlush:function(b){var a=b.getData();if(a.paddingRight||a.paddingBottom){this.setGfxProperty($[226],null);this.setGfxProperty($[194],null)}this._layoutShapes()},_layoutShapes:function(){if(this._gfxBackgroundEnabled){this._layoutBackgroundShape()}if(this._gfxShadowEnabled){this._layoutShadowShape()}},_layoutTargetNode:function(){if(this._innerStyle&&this._gfxBorderEnabled){var c=this.getGfxProperty($[226]);var b=this.getGfxProperty($[271]);var a=this._innerStyle;a.top=b[0]+"px";a.left=b[3]+"px";a.width=Math.max(0,c[0]-b[3]-b[1])+"px";a.height=Math.max(0,c[1]-b[0]-b[2])+"px"}},_resetTargetNode:rwt.util.Variant.select($[0],{mshtml:function(){if(this._innerStyle){this._innerStyle.left="0px";this._innerStyle.top="0px";this._innerStyle.width="";this._innerStyle.height="";this.addToQueue($[25]);this.addToQueue($[17])}},"default":function(){if(this._innerStyle){this._innerStyle.left="0px";this._innerStyle.top="0px";this._innerStyle.width="100%";this._innerStyle.height="100%"}}}),_isCanvasReady:function(){var a=false;if(this._isCreated){if(this._gfxEnabled&&this._gfxCanvasAppended){a=true}else{if(this._gfxEnabled&&!this._gfxCanvasAppended){if(this._gfxCanvas==null){this._createCanvas()}this._appendCanvas();a=true}else{if(!this._gfxEnabled&&this._gfxCanvasAppended){this._removeCanvas()}}}}else{if(this._gfxEnabled){this._prepareGraphicsSupport()}}return a},_createCanvas:function(){if(!this._innerStyle){this._prepareForCanvas()}this._gfxData={};this._gfxCanvas=rwt.graphics.GraphicsUtil.createCanvas();this._prepareBackgroundShape()},_prepareForCanvas:rwt.util.Variant.select($[0],{mshtml:function(){this.prepareEnhancedBorder();this._applyOpacity(this.getOpacity())},gecko:function(){this.prepareEnhancedBorder();this._applyOpacity(this.getOpacity())},webkit:function(){var a=this.getStyleProperty($[203]);this.removeStyleProperty($[203]);this.__outerElementStyleProperties.outline=true;this.setStyleProperty($[203],a);this._applyOpacity(this.getOpacity())},"default":function(){this.prepareEnhancedBorder();this._applyOpacity(this.getOpacity())}}),_appendCanvas:function(){var b=this.getElement();var a=rwt.graphics.GraphicsUtil.getCanvasNode(this._gfxCanvas);if(a!=null){b.insertBefore(a,b.firstChild)}this._gfxCanvasAppended=true;this.addEventListener($[141],this._onCanvasAppear);if(this._isInDom){this._onCanvasAppear()}},_removeCanvas:function(){var a=rwt.graphics.GraphicsUtil.getCanvasNode(this._gfxCanvas);if(a!=null){a.parentNode.removeChild(a);this._gfxCanvasAppended=false;this.removeEventListener($[141],this._onCanvasAppear)}},_onCanvasAppear:function(){if(this._gfxCanvasAppended){rwt.graphics.GraphicsUtil.handleAppear(this._gfxCanvas)}},_prepareBackgroundShape:function(){var c=rwt.graphics.GraphicsUtil;if(this._gfxData){var b=this._gfxData.backgroundShape;if(this._gfxBackgroundEnabled){if(b===undefined){this._gfxData.backgroundShape=c.createShape($[136])}if(!this._gfxData.backgroundInsert){var a=this._gfxData.backgroundShape;c.addToCanvas(this._gfxCanvas,a);this._gfxData.backgroundInsert=true;this._checkAntiAlias(this.getOpacity())}}else{if(this._gfxData.backgroundInsert){c.removeFromCanvas(this._gfxCanvas,b);this._gfxData.backgroundInsert=false}}}},_renderGfxBackground:function(){this._prepareBackgroundShape();var f=this.getGfxProperty($[177]);var c=rwt.graphics.GraphicsUtil;if(f==$[115]){var e=this.getGfxProperty($[115]);c.setFillGradient(this._gfxData.backgroundShape,e)}else{if(f==$[15]){var d=this.getGfxProperty($[81]);d=typeof d==$[8]?null:d;var b=this._getImageSize(d);c.setFillPattern(this._gfxData.backgroundShape,d,b[0],b[1])}else{var a=this.getGfxProperty($[51]);if(a&&(a===$[80]||a.slice(0,4)==="rgba")){a=null}c.setFillColor(this._gfxData.backgroundShape,a)}}},_renderGfxBorder:function(){this._prepareBackgroundShape();this._style.borderWidth=0;var c=this._innerStyle;c.borderWidth=0;var b=this._gfxData.backgroundShape;var d=this.getGfxProperty($[352]);var a=this.getGfxProperty($[328]);rwt.graphics.GraphicsUtil.setStroke(b,a,d)},_layoutBackgroundShape:function(){var b=[this.getBoxWidth(),this.getBoxHeight()];var j=this.getGfxProperty($[226]);var d=!j||(b[0]!==j[0]);var c=!j||(b[1]!==j[1]);if(d||c){this.setGfxProperty($[226],b);this._layoutTargetNode();var b=[this.getBoxWidth(),this.getBoxHeight()];var g;var l;var e;var o;var h;if(this._gfxBorderEnabled){h=this.getGfxProperty($[236]);var a=this.getGfxProperty($[271]);var q=this.getGfxProperty($[352]);var f=0;var p=0;var n=0;var k=0;if(q>0){f=(a[0]===0?-q-1:q);p=(a[1]===0?-q-1:q);n=(a[2]===0?-q-1:q);k=(a[3]===0?-q-1:q)}g=b[0]-(k*0.5+p*0.5);l=b[1]-(f*0.5+n*0.5);e=k*0.5;o=f*0.5}else{e=0;o=0;g=b[0]-this._cachedBorderLeft-this._cachedBorderRight;l=b[1]-this._cachedBorderTop-this._cachedBorderBottom;h=[0,0,0,0]}g=Math.max(0,g);l=Math.max(0,l);var i=this._gfxData.backgroundShape;var m=rwt.graphics.GraphicsUtil;m.setRoundRectLayout(i,e,o,g,l,h)}},_prepareShadowShape:function(){var c=rwt.graphics.GraphicsUtil;if(this._gfxData){if(this._gfxShadowEnabled){if(this._gfxData.shadowShape===undefined){this._createShadowShape();var b=c.getCanvasNode(this._gfxCanvas);rwt.html.Style.setPointerEvents(b,"none")}var a=this._gfxData.shadowShape;if(!this._gfxData.shadowInsert){var d=null;if(this._gfxData.backgroundInsert){d=this._gfxData.backgroundShape}c.addToCanvas(this._gfxCanvas,a,d);this._gfxData.shadowInsert=true}}else{if(this._gfxData.shadowInsert){c.removeFromCanvas(this._gfxCanvas,this._gfxData.shadowShape);c.enableOverflow(this._gfxCanvas,0,0,null,null);delete this._gfxData.shadowInsert}}}},_createShadowShape:function(){var a=null;var b=rwt.graphics.GraphicsUtil;var a=b.createShape($[136]);this._gfxData.shadowShape=a;return a},_renderGfxShadow:function(){this._prepareShadowShape();if(this._gfxShadowEnabled){var b=rwt.graphics.GraphicsUtil;var c=this.getGfxProperty($[19]);var a=this._gfxData.shadowShape;b.setBlur(a,c[3]);b.setFillColor(a,c[5]);b.setOpacity(a,c[6])}},_layoutShadowShape:function(){var f=rwt.graphics.GraphicsUtil;var b=[this.getBoxWidth(),this.getBoxHeight()];var l=[this.getBoxWidth(),this.getBoxHeight()];var n=this.getGfxProperty($[194]);var s=!n||(l[0]!==n[0]);var q=!n||(l[1]!==n[1]);if(s||q){var c=this._gfxData.shadowShape;this.setGfxProperty($[194],l);var h=this.getGfxProperty($[19]);var k=this.getGfxProperty($[236]);k=k===null?[0,0,0,0]:k;var e=h[1];var i=h[2];var m=b[0];var j=b[1];var p=h[3];var o=e<0?Math.abs(e)+p:0;var r=i<0?Math.abs(i)+p:0;var d=Math.max(0,p+e);var a=Math.max(0,p+i);var t=m+d;var g=j+a;f.enableOverflow(this._gfxCanvas,o,r,t,g);f.setRoundRectLayout(c,e,i,m,j,k)}},_getImageSize:function(c){var a=this.getUserData($[171]);if(a==null){var b=rwt.theme.ThemeStore.getInstance();a=b.getImageSize(c)}return a},_willBeLayouted:function(){return this._jobQueue!==undefined||!rwt.util.Objects.isEmpty(this._layoutChanges)}}}); |
| rwt.qx.Class.define("rwt.graphics.GraphicsUtil",{statics:{_renderClass:null,init:function(){if(this._renderClass==null){if(rwt.client.Client.supportsVml()){this._renderClass=rwt.graphics.VML}else{if(rwt.client.Client.supportsSvg()){this._renderClass=rwt.graphics.SVG}}if(this._renderClass!=null){this._renderClass.init()}}},createCanvas:function(){var a=null;a=this._renderClass.createCanvas();return a},getCanvasNode:function(b){var a=null;a=this._renderClass.getCanvasNode(b);return a},handleAppear:function(a){this._renderClass.handleAppear(a)},enableOverflow:function(c,b,e,d,a){this._renderClass.enableOverflow(c,b,e,d,a)},createShape:function(b){var a=null;if(this._renderClass!=null){a=this._renderClass.createShape(b)}return a},addToCanvas:function(c,b,a){this._renderClass.addToCanvas(c,b,a)},removeFromCanvas:function(b,a){this._renderClass.removeFromCanvas(b,a)},setDisplay:function(a,b){this._renderClass.setDisplay(a,b)},getDisplay:function(a){return this._renderClass.getDisplay(a)},setRectBounds:function(c,b,e,d,a){this._renderClass.setRectBounds(c,b,e,d,a)},setRoundRectLayout:function(c,b,f,d,a,e){this._renderClass.setRoundRectLayout(c,b,f,d,a,e)},setFillColor:function(b,a){this._renderClass.setFillColor(b,a)},getFillColor:function(b,a){return this._renderClass.getFillColor(b)},setFillGradient:function(a,b){this._renderClass.setFillGradient(a,b)},setFillPattern:function(b,d,c,a){this._renderClass.setFillPattern(b,d,c,a)},getFillType:function(b,a){return this._renderClass.getFillType(b)},setStroke:function(b,a,c){this._renderClass.setStroke(b,a,c)},getStrokeWidth:function(a){return this._renderClass.getStrokeWidth(a)},getStrokeColor:function(a){return this._renderClass.getStrokeColor(a)},setOpacity:function(a,b){this._renderClass.setOpacity(a,b)},getOpacity:function(a){return this._renderClass.getOpacity(a)},setBlur:function(b,a){this._renderClass.setBlur(b,a)},getBlur:function(a){return this._renderClass.getBlur(a)}}}); |
| rwt.qx.Class.define("rwt.graphics.VML",{statics:{init:function(){document.namespaces.add("v","urn:schemas-microsoft-com:vml");document.namespaces.add("o","urn:schemas-microsoft-com:office:office");var a=document.createStyleSheet();a.cssText="v\\:* { behavior:url(#default#VML);display:inline-block; } o\\:* { behavior: url(#default#VML);}";this._vmlEnabled=true},createCanvas:function(){var a={};a.type="vmlCanvas";var b=document.createElement("div");b.style.position=$[16];b.style.width="10px";b.style.height="10px";b.style.top="0";b.style.left="0";b.style.fontSize="0";b.style.lineHeight="0";a.node=b;a.children={};return a},clearCanvas:function(a){for(var b in a.children){a.node.removeChild(a.children[b].node)}a.children={}},getCanvasNode:function(a){return a.node},handleAppear:function(a){var b=a.children;for(var c in b){this._handleAppearShape(b[c])}},createShape:function(b){var a=null;switch(b){case"rect":a=this._createRect();break;case $[136]:case"custom":a=this._createCustomShape();a.blurRadius=0;break;case $[15]:a=this._createImage();break;default:throw"VML does not support shape "+b}a.restoreData={fill:{}};a.node.stroked=false;var c=this._createNode("fill");c.method="sigma";a.node.appendChild(c);a.fill=c;this.setFillColor(a,null);return a},addToCanvas:function(c,b,a){var d=rwt.qx.Object.toHashCode(b);c.children[d]=b;if(a){c.node.insertBefore(b.node,a.node)}else{c.node.appendChild(b.node)}},enableOverflow:function(a){},removeFromCanvas:function(b,a){var c=rwt.qx.Object.toHashCode(a);delete b.children[c];b.node.removeChild(a.node)},setDisplay:function(a,b){a.node.style.display=b?"":"none"},getDisplay:function(b){var a=b.node.style.display=="none"?false:true;return a},setRectBounds:function(c,b,f,d,a){var e=c.node;e.style.width=this._convertNumeric(d,false);e.style.height=this._convertNumeric(a,false);e.style.left=this._convertNumeric(b,true);e.style.top=this._convertNumeric(f,true)},setImageData:function(c,g,b,h,e,a,d){var f=c.node;f.src=g;if(typeof d!=$[8]){f.cropTop=d[0];f.cropRight=d[1];f.cropBottom=d[2];f.cropLeft=d[3]}f.style.width=e;f.style.height=a;f.style.left=b;f.style.top=h},setRoundRectLayout:function(b,g,f,o,k,m){var h=this._VMLDEGREE*90;var d=Math.floor(Math.min(o,k)/2);var e=Math.min(m[0],d);var n=Math.min(m[1],d);var r=Math.min(m[2],d);var j=Math.min(m[3],d);e=this._convertNumeric(e,false);n=this._convertNumeric(n,false);r=this._convertNumeric(r,false);j=this._convertNumeric(j,false);var c=this._getBlurOffsets(b.blurRadius);var i=this._convertNumeric(g-c[1],true);var p=this._convertNumeric(f-c[1],true);var a=this._convertNumeric(o-c[2],false);var q=this._convertNumeric(k-c[2],false);var l=[];if(e>0){l.push("AL",i+e,p+e);l.push(e,e,2*h,h)}else{l.push("M",i,p+e)}if(n>0){l.push("AE",i+a-n);l.push(p+n);l.push(n,n,3*h,h)}else{l.push("L",i+a,p)}if(r>0){l.push("AE",i+a-r);l.push(p+q-r);l.push(r,r,0,h)}else{l.push("L",i+a,p+q)}if(j>0){l.push("AE",i+j);l.push(p+q-j);l.push(j,j,h,h)}else{l.push("L",i,p+q)}l.push("X E");b.node.path=l.join(" ")},applyDrawingContext:function(b,d,g){var c=d.globalAlpha;if(c!=1){this.setOpacity(b,c)}if(g){var g=d.fillStyle;if(g instanceof Array){this.setFillGradient(b,d.fillStyle)}else{this.setFillColor(b,d.fillStyle)}this.setStroke(b,null,0)}else{this.setFillColor(b,null);this.setStroke(b,d.strokeStyle,d.lineWidth);var f=d.lineCap=="butt"?"flat":d.lineCap;var e=d.lineJoin;var a=d.miterLimit;this._setStrokeStyle(b,e,a,f)}b.node.path=this._convertPath(d._currentPath)},createShapeFromContext:function(b,c){var a=this.createShape("custom");this.applyDrawingContext(a,b,c);return a},setFillColor:function(b,a){var c=b.fill;c.type=$[70];if(a!=null&&a!==$[80]&&a!==""){this._setFillEnabled(b,true);c.color=a;b.restoreData.fill.color=a}else{this._setFillEnabled(b,false);delete b.restoreData.fill.color}},getFillColor:function(b){var a=null;if(this.getFillType(b)==$[61]){a=b.restoreData.fill.color}return a},setFillGradient:function(e,i){var l=e.fill;if(i!=null){e.node.removeChild(e.fill);this._setFillEnabled(e,true);delete e.restoreData.fill.color;l.type=$[115];var f=i[0][1];l.color2=i[i.length-1][1];l.angle=i.horizontal?270:180;var h="0% "+f;var c=rwt.util.Colors.stringToRgb(f);var b=null;var a=0;var g=null;for(var k=1;k<i.length;k++){var d=i[k][1];b=rwt.util.Colors.stringToRgb(d);var j=i[k][0];h+=", ";h+=this._transitionColors(c,b,a,j,3);h+=", "+(j*100)+"% "+d;c=b;a=j}l.colors=h;e.node.appendChild(l)}else{this._setFillEnabled(e,true)}},setFillPattern:function(b,d,c,a){var e=b.fill;if(d!=null){b.node.removeChild(b.fill);this._setFillEnabled(b,true);e.type="tile";e.src=d;e.size=(c*0.75)+"pt,"+(a*0.75)+"pt";b.node.appendChild(e)}else{this._setFillEnabled(b,false)}},getFillType:function(c){var b=c.fill.on;var a=!b?null:c.fill.type;if(a==$[70]){a=$[61]}if(a=="tile"){a="pattern"}return a},setStroke:function(b,a,c){if(c>0){b.node.stroked=true;b.node.strokecolor=a;b.node.strokeweight=c+"px";b.restoreData.strokecolor=a;b.restoreData.strokeweight=c+"px"}else{b.node.stroked=false;delete b.restoreData.strokecolor;delete b.restoreData.strokeweight}},getStrokeWidth:function(b){var a=false;if(b.node.stroked){a=b.node.strokeweight;var c=typeof a==$[56]||a.search("pt")!=-1;a=parseFloat(a);a=c?a/0.75:a}return a},getStrokeColor:function(a){return a.node.strokecolor.value},setOpacity:function(a,b){a.opacity=b;this._renderFilter(a);this._setAntiAlias(a,b<1)},getOpacity:function(b){var a=1;if(typeof b.opacity===$[56]&&b.opacity<1){a=b.opacity}return a},setBlur:function(b,a){b.blurRadius=a;this._renderFilter(b)},getBlur:function(c,b){var a=0;if(typeof c.blurRadius===$[56]&&c.blurRadius>0){a=c.blurRadius}return a},_renderFilter:function(a){var d=[];var b=this.getOpacity(a);var c=this.getBlur(a);if(b<1){d.push($[365]);d.push(Math.round(b*100));d.push(")")}if(c>0){d.push("progid:DXImageTransform.Microsoft.Blur(pixelradius=");d.push(this._getBlurOffsets(c)[0]);d.push(")")}if(d.length>0){a.node.style.filter=d.join("")}else{rwt.html.Style.removeCssFilter(a.node)}},_VMLFACTOR:10,_VMLDEGREE:-65535,_VMLRAD:-65535*(180/Math.PI),_createNode:function(a){return document.createElement("v:"+a)},_createRect:function(){var a={};a.type="vmlRect";var b=this._createNode("rect");b.style.position=$[16];b.style.width=0;b.style.height=0;b.style.top=0;b.style.left=0;b.style.antialias=false;a.node=b;return a},_createImage:function(){var a={};a.type="vmlImage";var b=this._createNode($[15]);b.style.position=$[16];a.node=b;return a},_createCustomShape:function(){var a={};var c=this._createNode("shape");var b=100*this._VMLFACTOR+", "+100*this._VMLFACTOR;c.coordsize=b;c.coordorigin="0 0";c.style.position=$[16];c.style.width=100;c.style.height=100;c.style.top=0;c.style.left=0;a.node=c;return a},_setFillEnabled:function(a,b){a.fill.on=b;a.restoreData.fill.on=b},_ensureStrokeNode:function(a){if(!a.stroke){var b=this._createNode($[222]);a.node.appendChild(b);a.stroke=b}},_setStrokeStyle:function(b,d,a,c){this._ensureStrokeNode(b);b.stroke.joinstyle=d;b.stroke.miterlimit=a;b.stroke.endcap=c},_transitionColors:function(l,k,a,f,g){var j=f-a;var b=j/(g+1);var d=[];var h=[];var e;for(var c=1;c<=g;c++){e=c*(1/(g+1));h[0]=this._transitionColorPart(l[0],k[0],e);h[1]=this._transitionColorPart(l[1],k[1],e);h[2]=this._transitionColorPart(l[2],k[2],e);d.push(Math.round(((a+(c*b))*100))+"% RGB("+h.join()+")")}return d.join(" ,")},_copyData:function(d,e){if(!d||!e){throw"VML._copyData: source or target missing."}for(var b in d){var c=d[b];if(typeof c===$[20]){try{this._copyData(c,e[b])}catch(a){throw new Error("Could not copy "+b+": "+a)}}else{e[b]=c}}},_handleAppearShape:function(a){this._copyData(a.restoreData,a.node)},_transitionColorPart:function(b,a,d){var c=parseInt(b,10)+((a-b)*d);return Math.round(c)},_convertNumeric:function(c,b){var a;if(typeof c==$[56]){a=(b?c-0.5:c)*this._VMLFACTOR;a=Math.round(a)}else{a=c}return a},_convertPath:function(f){var b=[];for(var d=0;d<f.length;d++){var e=f[d];switch(e.type){case"moveTo":b.push("M");b.push(this._convertNumeric(e.x,true));b.push(this._convertNumeric(e.y,true));break;case"lineTo":b.push("L");b.push(this._convertNumeric(e.x,true));b.push(this._convertNumeric(e.y,true));break;case $[130]:b.push("X");e=null;break;case $[421]:b.push("QB");b.push(this._convertNumeric(e.cp1x,true));b.push(this._convertNumeric(e.cp1y,true));b.push("L");b.push(this._convertNumeric(e.x,true));b.push(this._convertNumeric(e.y,true));break;case $[426]:b.push("C");b.push(this._convertNumeric(e.cp1x,true));b.push(this._convertNumeric(e.cp1y,true));b.push(this._convertNumeric(e.cp2x,true));b.push(this._convertNumeric(e.cp2y,true));b.push(this._convertNumeric(e.x,true));b.push(this._convertNumeric(e.y,true));break;case"arc":b.push("AE");var c=Math.round(e.startAngle*this._VMLRAD);var a=Math.round(e.endAngle*this._VMLRAD);b.push(this._convertNumeric(e.centerX,true));b.push(this._convertNumeric(e.centerY,true));b.push(this._convertNumeric(e.radiusX,false));b.push(this._convertNumeric(e.radiusY,false));b.push(c);b.push(a-c);break}}return b.join(" ")},_setAntiAlias:function(a,b){a.node.style.antialias=b},_getBlurOffsets:function(c){var a;var b=this._BLUROFFSETS[c];if(b!==undefined){a=b}else{a=[c,c,1]}return a},_BLUROFFSETS:[[0,0,0],[2,2,1],[3,3,1],[4,4,1]]}}); |
| rwt.qx.Class.define("rwt.graphics.SVG",{statics:{init:function(){},createCanvas:function(){var b={};var c=this._createNode("svg");c.style.position=$[16];c.style.left="0px";c.style.top="0px";c.style.width="100%";c.style.height="100%";var a=this._createNode("defs");c.appendChild(a);b.type="svgCanvas";b.node=c;b.group=c;b.defsNode=a;return b},getCanvasNode:function(a){return a.node},handleAppear:function(a){},enableOverflow:function(c,b,g,d,a){if(c.group===c.node){var e=c.node;var f=this._createNode("g");c.group=f;while(e.firstChild){f.appendChild(e.firstChild)}e.appendChild(f)}c.node.style.left=(b*-1)+"px";c.node.style.top=(g*-1)+"px";if(d){c.node.style.width=(b+d)+"px"}else{c.node.style.width="100%"}if(a){c.node.style.height=(g+a)+"px"}else{c.node.style.height="100%"}if(b===0&&g===0){c.group.setAttribute("transform","")}else{c.group.setAttribute("transform","translate("+b+","+g+")")}},createShape:function(b){var a;switch(b){case"rect":a=this._createRect();break;case $[136]:a=this._createRoundRect();break;default:throw"invalid shape "+b}a.node.setAttribute($[222],"none");a.node.setAttribute($[298],"0px");a.node.setAttribute("fill","none");a.defNodes={};a.parent=null;return a},addToCanvas:function(c,b,a){b.parent=c;if(a){c.group.insertBefore(b.node,a.node)}else{c.group.appendChild(b.node)}this._attachDefinitions(b)},removeFromCanvas:function(b,a){this._detachDefinitions(a);b.group.removeChild(a.node);a.parent=null},setDisplay:function(a,b){a.node.setAttribute($[163],b?"inline":"none")},getDisplay:function(b){var c=b.node.getAttribute($[163]);var a=c=="none"?false:true;return a},setRectBounds:function(c,b,f,d,a){var e=c.node;e.setAttribute($[25],this._convertNumeric(d));e.setAttribute($[17],this._convertNumeric(a));e.setAttribute("x",this._convertNumeric(b));e.setAttribute("y",this._convertNumeric(f))},setRoundRectLayout:function(h,j,i,d,k,f){var g=Math.floor(Math.min(d,k)/2);var c=Math.min(f[0],g);var e=Math.min(f[1],g);var b=Math.min(f[2],g);var a=Math.min(f[3],g);var l=[];l.push("M",j,i+c);if(c>0){l.push("A",c,c,0,0,1);l.push(j+c,i)}l.push("L",j+d-e,i);if(e>0){l.push("A",e,e,0,0,1)}l.push(j+d,i+e);l.push("L",j+d,i+k-b);if(b>0){l.push("A",b,b,0,0,1)}l.push(j+d-b,i+k);l.push("L",j+a,i+k);if(a>0){l.push("A",a,a,0,0,1)}l.push(j,i+k-a);l.push("Z");h.node.setAttribute("d",l.join(" "))},setFillColor:function(b,a){this.setFillGradient(b,null);if(a!=null&&a!==""){b.node.setAttribute("fill",a)}else{b.node.setAttribute("fill","none")}},getFillColor:function(b){var a=null;if(this.getFillType(b)==$[61]){a=b.node.getAttribute("fill")}return a},setFillGradient:function(d,f){if(f!=null){var g="gradient_"+rwt.qx.Object.toHashCode(d);var a;var c=f.horizontal===true;if(typeof d.defNodes[g]==$[8]){a=this._createNode($[507]);a.setAttribute("id",g);a.setAttribute("x1",0);a.setAttribute("y1",0);this._addNewDefinition(d,a,g)}else{a=d.defNodes[g]}a.setAttribute("x2",c?1:0);a.setAttribute("y2",c?0:1);var b=a.childNodes[0];while(b){a.removeChild(b);b=a.childNodes[0]}for(var e=0;e<f.length;e++){b=this._createNode("stop");b.setAttribute("offset",f[e][0]);b.setAttribute("stop-color",f[e][1]);a.appendChild(b)}d.node.setAttribute("fill","url(#"+g+")")}else{d.node.setAttribute("fill","none")}},setFillPattern:function(d,f,e,b){if(f!=null){var g=rwt.qx.Object.toHashCode(d);var c="pattern_"+g;var a;var h;if(typeof d.defNodes[c]==$[8]){a=this._createNode("pattern");a.setAttribute("id",c);a.setAttribute("x",0);a.setAttribute("y",0);a.setAttribute("patternUnits","userSpaceOnUse");h=this._createNode($[15]);h.setAttribute("x",0);h.setAttribute("y",0);h.setAttribute("preserveAspectRatio","none");a.appendChild(h);this._addNewDefinition(d,a,c)}else{a=d.defNodes[c];h=a.firstChild}a.setAttribute($[25],e);a.setAttribute($[17],b);h.setAttribute($[25],e);h.setAttribute($[17],b);d.node.setAttribute("fill","url(#"+c+")");if(rwt.client.Client.getEngine()==$[109]){this._onImageLoad(f,function(){if(d.parent!==null&&d.parent.node.parentNode){rwt.graphics.SVG._setXLink(h,f);rwt.graphics.SVG._redrawWebkit(d)}})}else{this._setXLink(h,f)}}else{d.node.setAttribute("fill","none")}},getFillType:function(b){var a=b.node.getAttribute("fill");if(a.search("pattern_")!=-1){a="pattern"}else{if(a.search("gradient_")!=-1){a=$[115]}else{if(a=="none"){a=null}else{a=$[61]}}}return a},setStroke:function(b,a,c){b.node.setAttribute($[298],c+"px");if(c===0){b.node.setAttribute($[222],"none")}else{b.node.setAttribute($[222],a!=null?a:"none")}},getStrokeWidth:function(a){return parseFloat(a.node.getAttribute($[298]))},getStrokeColor:function(a){return a.node.getAttribute($[222])},setOpacity:function(a,b){a.node.setAttribute($[53],b)},getOpacity:function(b){var a=b.node.getAttribute($[53]);return a?a:0},setBlur:function(a,c){if(c>0){var d="filter_"+rwt.qx.Object.toHashCode(a);var b;if(typeof a.defNodes[d]===$[8]){b=this._createNode($[95]);b.setAttribute("id",d);b.appendChild(this._createNode("feGaussianBlur"));this._addNewDefinition(a,b,d)}else{b=a.defNodes[d]}b.firstChild.setAttribute($[548],c/2);a.node.setAttribute($[95],"url(#"+d+")")}else{a.node.setAttribute($[95],"none")}},getBlur:function(b){var a=0;var c=b.node.getAttribute($[95]);if(c&&c!=="none"){var e="filter_"+rwt.qx.Object.toHashCode(b);var d=b.defNodes[e];a=d.firstChild.getAttribute($[548])*2}return a},_onImageLoad:function(c,b){var a=new Image();a.src=c;a.onload=function(d){if(arguments.callee.caller!=null){rwt.graphics.SVG._onImageLoad(c,b)}else{b()}}},_createNode:function(a){return document.createElementNS("http://www.w3.org/2000/svg",a)},_createRect:function(){var a={};a.type="svgRect";var b=this._createNode("rect");b.setAttribute($[25],"0");b.setAttribute($[17],"0");b.setAttribute("x","0");b.setAttribute("y","0");a.node=b;return a},_setXLink:function(a,b){a.setAttributeNS("http://www.w3.org/1999/xlink","href",b)},_createRoundRect:function(){var a={};a.type="svgRoundRect";var b=this._createNode("path");a.node=b;return a},_addNewDefinition:function(a,b,c){a.defNodes[c]=b;if(a.parent!=null){a.parent.defsNode.appendChild(b)}},_attachDefinitions:function(a){for(var c in a.defNodes){var b=a.defNodes[c];a.parent.defsNode.appendChild(b)}},_detachDefinitions:function(a){for(var c in a.defNodes){var b=a.defNodes[c];b.parentNode.removeChild(b)}},_convertNumeric:function(a){return typeof a==$[7]?a:a+"px"},_redrawWebkit:function(a){var b=function(){rwt.graphics.SVG._redrawWebkitCore(a)};window.setTimeout(b,10)},_redrawWebkitCore:function(a){if(a.parent!=null){a.node.style.webkitTransform="scale(1)"}},_dummyNode:null,_getDummyNode:function(){if(this._dummyNode==null){this._dummyNode=this._createNode("rect")}return this._dummyNode}}}); |
| rwt.qx.Class.define("rwt.widgets.util.WidgetUtil",{statics:{setPropertyParam:function(d,b,a){var f=rwt.remote.WidgetManager.getInstance();var e=f.findIdByWidget(d);var c=rwt.remote.Server.getInstance();c.addParameter(e+"."+b,a)},fixIEBoxHeight:rwt.util.Variant.select($[0],{mshtml:function(a){a.setStyleProperty($[184],"0");a.setStyleProperty($[301],"0")},"default":rwt.util.Functions.returnTrue}),getControl:function(b){var c=rwt.remote.WidgetManager.getInstance();var a=b;while(a!=null&&!c.isControl(a)){a=a.getParent?a.getParent():null}return a},_fakeMouseEvent:function(b,d){if(b.getEnabled()){var f=b._getTargetNode();var a=rwt.event.EventHandlerUtil;var g=a.getTargetObject(null,b,true);var c={type:d,target:f,button:0,wheelData:0,detail:0,pageX:0,pageY:0,clientX:0,clientY:0,screenX:0,screenY:0,shiftKey:false,ctrlKey:false,altKey:false,metaKey:false,preventDefault:function(){}};var e=new rwt.event.MouseEvent(d,c,f,g,b,null);g.dispatchEvent(e)}}}}); |
| rwt.qx.Class.define($[513],{type:$[39],extend:rwt.qx.Object,construct:function(){this._values={dimensions:{},boxdims:{},images:{},gradients:{},fonts:{},colors:{},borders:{},cursors:{},animations:{},shadows:{}};this._cssValues={};this._statesMap={"*":{hover:"over"},"DateTime-Calendar-Day":{unfocused:$[92]},"List-Item":{unfocused:$[92]},Text:{"read-only":$[299]},TreeItem:{unfocused:$[92]},"Tree-RowOverlay":{unfocused:$[92]},TreeColumn:{hover:$[3]},Shell:{inactive:$[199]},"Shell-Titlebar":{inactive:$[199]},"Shell-MinButton":{inactive:$[199]},"Shell-MaxButton":{inactive:$[199]},"Shell-CloseButton":{inactive:$[199]},TableColumn:{hover:$[3]},TableItem:{unfocused:$[92]},"Table-RowOverlay":{unfocused:$[92]},TabItem:{selected:$[178],first:"firstChild",last:$[250]}};this._namedColors={}},members:{setCurrentTheme:function(a){this._currentTheme=a},getCurrentTheme:function(){return this._currentTheme},setFallbackTheme:function(a){this.fallbackTheme=a},getFallbackTheme:function(){return this.fallbackTheme},defineValues:function(a){for(var c in this._values){if(c in a){for(var b in a[c]){if(!(b in this._values[c])){this._values[c][b]=a[c][b]}}}}},setThemeCssValues:function(c,a,b){this._cssValues[c]=a;if(b){this.fallbackTheme=c}this._fillNamedColors(c)},getColor:function(d,b,e,f){var c=this._getCssValue(d,b,e,f);var a=this._values.colors[c];if(a instanceof Array){a="#"+rwt.util.Colors.rgbToHexString(a)}return a},getAlpha:function(e,c,f,g){var d=this._getCssValue(e,c,f,g);var b=this._values.colors[d];var a=1;if(b instanceof Array){a=b[3]}else{if(b===$[80]){a=0}}return a},getNamedColor:function(b){var a=this._namedColors[b];return a?a:b},getDimension:function(c,a,d,e){var b=this._getCssValue(c,a,d,e);return this._values.dimensions[b]},getBoxDimensions:function(c,a,d,e){var b=this._getCssValue(c,a,d,e);return this._values.boxdims[b]},getBoolean:function(b,a,c,d){return this._getCssValue(b,a,c,d)},getFloat:function(b,a,c,d){return parseFloat(this._getCssValue(b,a,c,d))},getIdentifier:function(b,a,c,d){return this._getCssValue(b,a,c,d)},getImage:function(d,b,f,g){var a;var c=this._getCssValue(d,b,f,g);var e=this._values.images[c];if(e!=null){a=$[318]+c}else{a=rwt.theme.ThemeValues.NONE_IMAGE}return a},getSizedImage:function(d,b,f,g){var c=this._getCssValue(d,b,f,g);var e=this._values.images[c];var a;if(e!=null){a=[$[318]+c].concat(e)}else{a=rwt.theme.ThemeValues.NONE_IMAGE_SIZED}return a},getCursor:function(d,b,e,f){var c=this._getCssValue(d,b,e,f);var a=this._values.cursors[c];if(c===null){a="rwt-resources/themes/cursors/"+c}return a},getAnimation:function(c,a,d,e){var b=this._getCssValue(c,a,d,e);return this._values.animations[b]},getFont:function(d,b,f,g){var c=this._getCssValue(d,b,f,g);var e=this._values.fonts[c];if(!(e instanceof rwt.html.Font)){var a=new rwt.html.Font();a.setSize(e.size);a.setFamily(e.family);a.setBold(e.bold);a.setItalic(e.italic);this._values.fonts[c]=a}return this._values.fonts[c]},getBorder:function(j,o,l,i){var g;var m=this._getCssValue(j,o,l,i);var k=this._values.borders[m];var n=k instanceof rwt.html.Border;var b=n?k.getStyle():k.style;if(b===$[70]||b==="none"||b===null){var a=this._getCssValue(j,o,"border-radius",i);var h=this._values.boxdims[a];if(h!=null&&(h.join("")!=="0000")){var d=m+"#"+a;var e=this._values.borders[d];if(!e){var c=n?k.getWidthTop():k.width;var f=n?k.getColorTop():k.color;g=new rwt.html.Border(c,$[85],f,h);this._values.borders[d]=g}else{g=e}}}if(!g){if(n){g=k}else{g=this._getBorderFromValue(k);this._values.borders[m]=g}}return g},getShadow:function(c,a,d,e){var b=this._getCssValue(c,a,d,e);return this._values.shadows[b]},getNamedBorder:function(c){var d="_"+c;var a=this._values.borders[d];if(!a){var f=rwt.theme.BorderDefinitions.getDefinition(c);if(f){var b=this._resolveNamedColors(f.color);var e=this._resolveNamedColors(f.innerColor);a=new rwt.html.Border(f.width,$[164],b,e);this._values.borders[d]=a}else{a=null}}return a},getGradient:function(c,h,f,b){var j=null;var g=this._getCssValue(c,h,f,b);var e=this._values.gradients[g];if(e){if(e.colors&&e.percents){var d=[];for(var a=0;a<e.colors.length;a++){d[a]=[e.percents[a]/100,e.colors[a]]}d.horizontal=!e.vertical;this._values.gradients[g]=d}j=this._values.gradients[g]}return j},getImageSize:function(b){var a=b.slice($[318].length);var c=this._values.images[a];return c!=null?[c[0],c[1]]:[0,0]},_getCssValue:function(e,c,g,h){var a;if(h==null){h=this._currentTheme}if(this._cssValues[h]!==undefined&&this._cssValues[h][e]!==undefined&&this._cssValues[h][e][g]!==undefined){var b=this._cssValues[h][e][g];var f=false;for(var d=0;d<b.length&&!f;d++){if(this._matches(c,e,b[d][0])){a=b[d][1];f=true}}}if(a===undefined&&h!=this.fallbackTheme){a=this._getCssValue(e,c,g,this.fallbackTheme)}return a},_matches:function(b,e,j){var a=true;for(var d=0;d<j.length&&a;d++){var f=j[d];if(f.length>0){var h=f.charAt(0);if(h=="."){a=$[38]+f.substr(1) in b}else{if(h==":"){var g=this._translateState(f.substr(1),e);if(g.charAt(0)=="!"){a=!(g.substr(1) in b)}else{a=g in b}}else{if(h=="["){a="rwt_"+f.substr(1) in b}}}}}return a},_translateState:function(c,b){var a=c;if(b in this._statesMap&&c in this._statesMap[b]){a=this._statesMap[b][c]}else{if(c in this._statesMap["*"]){a=this._statesMap["*"][c]}}return a},_resolveNamedColors:function(c){var a=null;if(c){a=[];for(var b=0;b<c.length;b++){a[b]=this.getNamedColor(c[b])}}return a},_fillNamedColors:function(a){this._namedColors[$[232]]=this.getColor($[176],{},"rwt-darkshadow-color",a);this._namedColors[$[33]]=this.getColor($[176],{},"rwt-highlight-color",a);this._namedColors[$[145]]=this.getColor($[176],{},"rwt-lightshadow-color",a);this._namedColors[$[19]]=this.getColor($[176],{},"rwt-shadow-color",a);this._namedColors.thinborder=this.getColor($[176],{},"rwt-thinborder-color",a);this._namedColors["selection-marker"]=this.getColor($[176],{},"rwt-selectionmarker-color",a);this._namedColors[$[91]]=this.getColor("*",{},$[208],a);this._namedColors[$[322]]=this.getColor("*",{},$[61],a);this._namedColors["info.foreground"]=this.getColor("Widget-ToolTip",{},$[61],a)},_getBorderFromValue:function(b){var a=null;if(b.color==null){if(b.width==1){if(b.style=="outset"){a=this.getNamedBorder("thinOutset")}else{if(b.style=="inset"){a=this.getNamedBorder("thinInset")}}}else{if(b.width==2){a=this.getNamedBorder(b.style)}}}if(a===null){a=new rwt.html.Border(b.width,b.style,b.color)}return a}}}); |
| rwt.remote.HandlerRegistry.add($[513],{factory:function(a){return rwt.theme.ThemeStore.getInstance()},service:true,methods:["loadActiveTheme","loadFallbackTheme"],methodHandler:{loadActiveTheme:function(a,c){var b=new rwt.remote.Request(c.url,"GET",$[261]);b.setAsynchronous(false);b.setSuccessHandler(function(e){var d=JSON.parse(e.responseText);a.defineValues(d.values);a.setThemeCssValues(c.url,d.theme,false);a.setCurrentTheme(c.url)});b.send()},loadFallbackTheme:function(a,c){var b=new rwt.remote.Request(c.url,"GET",$[261]);b.setAsynchronous(false);b.setSuccessHandler(function(e){var d=JSON.parse(e.responseText);a.defineValues(d.values);a.setThemeCssValues(c.url,d.theme,true)});b.send()}}}); |
| rwt.qx.Class.define("rwt.widgets.base.MultiCellWidget",{extend:rwt.widgets.base.Terminator,construct:function(a){arguments.callee.base.call(this);this.__cellData=null;this.__cellNodes=null;this.__cellCount=null;this.__computedTotalSpacing=null;this.__styleRegExp=/([a-z])([A-Z])/g;this.__createCellData(a);this.__paddingCache=[0,0,0,0];this.__fontCache={};this.__colorCache="";this._flexibleCell=-1;this.initWidth();this.initHeight();this.addToQueue($[396]);this.setOverflow($[9]);this.initSelectable();this.initCursor();this.initTextColor();this.initHorizontalChildrenAlign()},destruct:function(){this._disposeObjectDeep("__cellData",0);this._disposeObjectDeep("__cellNodes",0);this._disposeObjectDeep("__paddingCache",0);this._disposeObjectDeep("_fontCache",0)},properties:{spacing:{check:$[18],init:4,themeable:true,apply:$[512],event:$[410]},horizontalChildrenAlign:{check:["left",$[24],$[14]],init:$[24],themeable:true,apply:$[514]},verticalChildrenAlign:{check:["top",$[44],$[32]],init:$[44],themeable:true,apply:$[502]},selectable:{refine:true,init:false},textColor:{refine:true,init:"#000000"},cursor:{refine:true,init:$[62]},allowStretchX:{refine:true,init:false},allowStretchY:{refine:true,init:false},appearance:{refine:true,init:"atom"},width:{refine:true,init:"auto"},height:{refine:true,init:"auto"}},members:{setCellContent:function(a,b){this.__updateComputedCellDimension(a);if(this._cellHasContent(a)!=(b!=null)){this._invalidateTotalSpacing();this.addToQueue($[396])}else{this.addToQueue("updateContent")}this.__cellData[a][1]=b},setCellDimension:function(b,c,a){this.setCellWidth(b,c);this.setCellHeight(b,a)},setCellVisible:function(a,b){this.__cellData[a][6]=b;if(this.getCellNode(a)){this.getCellNode(a).style.display=b?"":"none"}},isCellVisible:function(a){return this.__cellData[a][6]},getCellNode:function(a){return this.__cellNodes[a]},getCellContent:function(a){return this.__cellData[a][1]},setCellWidth:function(a,b){if(this._getCellWidth(a)!==b){this._setCellWidth(a,b);this._invalidateTotalSpacing();this._invalidatePreferredInnerWidth();this._scheduleLayoutX()}},setCellHeight:function(b,a){this._setCellHeight(b,a);this._invalidateTotalSpacing();this._invalidatePreferredInnerHeight();this._scheduleLayoutY()},setFlexibleCell:function(a){this._flexibleCell=a},getFlexibleCell:function(){return this._flexibleCell},getCellDimension:function(b){var c=this.getCellWidth(b);var a=this.getCellHeight(b);return[c,a]},getCellWidth:function(a,b){var f=this.__cellData[a];var e=this._flexibleCell===a&&b!==true;var c=(f[2]!=null?f[2]:f[4]);if(c==null||(e&&f[3]===null)){var d=this.__computeCellDimension(f);c=d[0]}if(e){c=this._limitCellWidth(a,c)}return c},getCellHeight:function(b,c){var g=this.__cellData[b];var f=this._flexibleCell===b&&c!==true;var a=(g[3]!=null?g[3]:g[5]);if(a==null||(f&&g[3]===null)){var e=f?this.getCellWidth(b):null;var d=this.__computeCellDimension(g,e);a=d[1]}if(f){a=this._limitCellHeight(b,a)}return a},_applyElement:function(b,a){arguments.callee.base.call(this,b,a);if(b){this._createSubelements();this._catchSubelements()}},_createSubelements:function(){var b="";for(var a=0;a<this.__cellCount;a++){this.__setCellNode(a,null);if(this._cellHasContent(a)){if(this._isTextCell(a)){b+=this._getLabelHtml(a)}else{if(this._isImageCell(a)){b+=this._getImageHtml(a)}}}}this._getTargetNode().innerHTML=b},_catchSubelements:function(){var b=this._getTargetNode();var c=0;for(var a=0;a<this.__cellCount;a++){if(this._cellHasContent(a)){this.__setCellNode(a,b.childNodes[c]);c++}}if(!this.getEnabled()){this._applyEnabled(false)}},_applySpacing:function(b,a){this._invalidateTotalSpacing();this._scheduleLayoutX()},_applyHorizontalChildrenAlign:function(b,a){this._scheduleLayoutX();this.setStyleProperty($[201],b)},_applyVerticalChildrenAlign:function(b,a){this._scheduleLayoutY()},_applyPaddingTop:function(b,a){this.addToLayoutChanges($[149]);this.__paddingCache[0]=b;this._invalidateFrameHeight()},_applyPaddingRight:function(b,a){this.addToLayoutChanges($[188]);this.__paddingCache[1]=b;this._invalidateFrameWidth()},_applyPaddingBottom:function(b,a){this.addToLayoutChanges($[174]);this.__paddingCache[2]=b;this._invalidateFrameHeight()},_applyPaddingLeft:function(b,a){this.addToLayoutChanges($[160]);this.__paddingCache[3]=b;this._invalidateFrameWidth()},_applyEnabled:function(b,a){arguments.callee.base.call(this,b,a);this._styleAllImagesEnabled()},_scheduleLayoutX:function(){this.addToQueue("layoutX");this._afterScheduleLayoutX()},_scheduleLayoutY:function(){this.addToQueue("layoutY");this._afterScheduleLayoutY()},_afterScheduleLayoutX:rwt.util.Functions.returnTrue,_afterScheduleLayoutY:rwt.util.Functions.returnTrue,_beforeComputeInnerWidth:rwt.util.Functions.returnTrue,_beforeComputeInnerHeight:rwt.util.Functions.returnTrue,_beforeRenderLayout:rwt.util.Functions.returnTrue,_afterRenderLayout:rwt.util.Functions.returnTrue,_cellHasContent:function(a){var b=this.__cellData[a][1];return b!=null},_isImageCell:function(a){var b=this.__cellData[a][0];return b==$[15]},_isTextCell:function(a){var b=this.__cellData[a][0];return b==$[67]},_setCellWidth:function(a,b){this.__cellData[a][2]=b},_getCellWidth:function(a){return this.__cellData[a][2]},_setCellHeight:function(b,a){this.__cellData[b][3]=a},__setCellNode:function(a,b){this.__cellNodes[a]=b;if(b!==null&&!this.isCellVisible(a)){b.style.display="none"}},__cellHasNode:function(a){return this.__cellNodes[a]!=null},__createCellData:function(b){var d=[];var a=[];this.__cellCount=b.length;for(var c=0;c<this.__cellCount;c++){a[c]=null;d[c]=[b[c],null,null,null,null,null,true]}this.__cellNodes=a;this.__cellData=d},__updateComputedCellDimension:function(a){var b=this.__cellData[a];b[4]=null;b[5]=null;if(b[2]==null){this._invalidatePreferredInnerWidth();this._scheduleLayoutX()}if(b[3]==null){this._invalidatePreferredInnerHeight();this._scheduleLayoutY()}},__computeCellDimension:function(c,b){var d;if(c[0]==$[67]&&c[1]!=null){var a=rwt.widgets.util.FontSizeCalculation;d=a.computeTextDimensions(c[1],this.__fontCache,b)}else{d=[0,0]}c[4]=d[0];c[5]=d[1];return d},_isWidthEssential:rwt.util.Functions.returnTrue,_isHeightEssential:rwt.util.Functions.returnTrue,_computePreferredInnerWidth:function(){return this._getContentWidth($[464])},_limitCellWidth:function(b,e){var d=this.getInnerWidth();var c=this._getContentWidth($[303]);var f=Math.max(0,d-c);var a;if(e>f){a=f}else{a=e}return a},_getContentWidth:function(f){this._beforeComputeInnerWidth();var a=0;if(f===$[464]){var e=this.getTotalSpacing();var d=0;for(var b=0;b<this.__cellCount;b++){d+=this.getCellWidth(b,true)}a=e+d}else{if(f===$[303]){var g=this.getSpacing();for(var b=0;b<this.__cellCount;b++){if(b!==this._flexibleCell){var c=this.getCellWidth(b);a+=c;if(c>0){a+=g}}}}else{if(f==="flexible"){var e=this.getTotalSpacing();var d=0;for(var b=0;b<this.__cellCount;b++){d+=this.getCellWidth(b)}a=e+d}else{throw new Error("unkown hint")}}}return a},_computePreferredInnerHeight:function(){this._beforeComputeInnerHeight();var b=0;for(var a=0;a<this.__cellCount;a++){b=Math.max(b,this.getCellHeight(a,true))}return b},_limitCellHeight:function(b,c){var d=this.getInnerHeight();var a;if(c>d){a=d}else{a=c}return a},getTotalSpacing:function(){if(this.__computedTotalSpacing==null){var a=Math.max(0,(this.getTotalVisibleCells()-1));this.__computedTotalSpacing=a*this.getSpacing()}return this.__computedTotalSpacing},getTotalVisibleCells:function(){var a=0;for(var b=0;b<this.__cellCount;b++){if(this.cellIsDisplayable(b)){a++}}return a},cellIsDisplayable:function(a){return(this.getCellWidth(a,true)>0)},_invalidateTotalSpacing:function(){this.__computedTotalSpacing=null;this._invalidatePreferredInnerWidth()},renderPadding:function(a){},_layoutPost:function(a){if(a.createContent){this._createSubelements();this._catchSubelements()}if(a.updateContent&&!a.createContent){this._updateAllImages();this._updateAllLabels()}a.layoutX=a.width||a.layoutX||a.frameWidth||a.initial;a.layoutY=a.height||a.layoutY||a.frameHeight||a.initial;this._beforeRenderLayout(a);if(a.layoutX){this._renderLayoutX()}if(a.layoutY){this._renderLayoutY()}this._afterRenderLayout(a);arguments.callee.base.call(this,a)},_renderLayoutX:function(){var a=this.getSpacing();var d=this.__paddingCache;var g=this.getHorizontalChildrenAlign();var h=this._getContentWidth("flexible");var k=this.getInnerWidth();var j=null;switch(g){case"left":j=d[3];break;case $[24]:j=Math.round(d[3]+k*0.5-h*0.5);break;case $[14]:j=d[3]+k-h;break;default:j=d[3];break}var e=j;var c=null;var b=null;for(var f=0;f<this.__cellCount;f++){if(this.cellIsDisplayable(f)){c=this.getCellWidth(f);if(this._cellHasContent(f)){b=this.getCellNode(f).style;b.left=e+"px";b.width=c+"px"}e+=(c+a)}}},_renderLayoutY:function(){for(var a=0;a<this.__cellCount;a++){if(this._cellHasContent(a)){this._renderCellLayoutY(a)}}},_renderCellLayoutY:function(b){var g=this.getVerticalChildrenAlign();var f=this.__paddingCache;var c=this.getInnerHeight();var a=this.getCellHeight(b);var e=null;switch(g){case"top":e=f[0];break;case $[44]:e=Math.round(f[0]+c*0.5-a*0.5);break;case $[32]:e=f[0]+c-a;break;default:e=f[0];break}var d=this.getCellNode(b).style;d.top=e+"px";d.height=a+"px"},_getImageHtml:rwt.util.Variant.select($[0],{mshtml:function(a){if(rwt.client.Client.getVersion()<7){var c=this.getCellContent(a);var b="";if(c){b="filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+c+$[351]}return'<div style="position:absolute;border:0 none;line-height:0px;font-size:0px;'+b+'"></div>'}else{var c=this.getCellContent(a);var b="";if(c){b=$[527]+c+")"}return"<div style='position:absolute;border:0 none;line-height:0px;font-size:0px;"+b+$[431]}},"default":function(a){var c=this.getCellContent(a);var b="";if(c){b=$[527]+c+")"}return"<div style='position:absolute;border:0 none;"+b+$[431]}}),_updateImage:function(a){var c=this.getCellNode(a);var d=this.getCellContent(a);var b=this.getEnabled()?1:0.3;rwt.html.Style.setBackgroundImage(c,d,b)},_updateAllImages:function(){for(var a=0;a<this.__cellCount;a++){if(this._isImageCell(a)&&this._cellHasContent(a)){this._updateImage(a)}}},_styleAllImagesEnabled:function(){for(var a=0;a<this.__cellCount;a++){if(this._isImageCell(a)&&this.__cellHasNode(a)){this._updateImage(a)}}},_getLabelHtml:function(a){return"<div style='position:absolute;border:0 none;overflow:hidden;"+this._joinStyleProperties(this.__fontCache)+"'>"+this.getCellContent(a)+"</div>"},_joinStyleProperties:function(d){var e=[];var c;for(var b in d){c=d[b];if(c){e.push(b,":",c,";")}}var a=e.join("");return a.replace(this.__styleRegExp,"$1-$2").toLowerCase()},_applyFont:function(b,a){this._styleFont(b)},_styleFont:function(a){if(a){a.renderStyle(this.__fontCache)}else{rwt.html.Font.resetStyle(this.__fontCache)}for(var b=0;b<this.__cellCount;b++){if(this._isTextCell(b)&&this._cellHasContent(b)){if(this.__cellHasNode(b)){if(a){a.renderStyle(this.getCellNode(b).style)}else{rwt.html.Font.resetStyle(this.getCellNode(b).style)}}this.__updateComputedCellDimension(b)}}},_applyTextColor:function(b,a){if(b){this.setStyleProperty($[61],b)}else{this.removeStyleProperty($[61])}},_updateLabel:function(a){this.getCellNode(a).innerHTML=this.getCellContent(a)},_updateAllLabels:function(){for(var a=0;a<this.__cellCount;a++){if(this._isTextCell(a)&&this._cellHasContent(a)){this._updateLabel(a)}}}}}); |
| rwt.qx.Class.define("rwt.widgets.ListItem",{extend:rwt.widgets.base.MultiCellWidget,construct:function(){arguments.callee.base.call(this,[$[67]]);this.initMinWidth();this.setHorizontalChildrenAlign("left");this.setContainerOverflow(false)},properties:{appearance:{refine:true,init:"list-item"},minWidth:{refine:true,init:"auto"},width:{refine:true,init:null},allowStretchX:{refine:true,init:true}},members:{setLabel:function(a){this.setCellContent(0,a)},getLabel:function(a){return this.getCellContent(0)},matchesString:function(d){var c;var b=this.getCellNode(0);if(b){c=b.innerText||b.textContent}else{c=this.getLabel()}var a=(typeof d===$[7])?d.toLowerCase():"";c=(typeof c===$[7])?c.toLowerCase():"";return a!==""&&c.indexOf(a)===0}}}); |
| rwt.qx.Mixin.define("rwt.event.DomEventPatch",{members:{setDomEvent:function(a){arguments.callee.base.call(this,a);rwt.remote.EventUtil._shiftKey=a.shiftKey;rwt.remote.EventUtil._ctrlKey=a.ctrlKey;rwt.remote.EventUtil._altKey=a.altKey;rwt.remote.EventUtil._metaKey=a.metaKey}}}); |
| rwt.qx.Class.define("rwt.widgets.util.MenuManager",{type:$[39],extend:rwt.util.ObjectManager,members:{update:function(j,a){var f=this.getAll();var d=a==$[1];var o=a==$[5];var l=d||o;var e=j!=null;var n=e&&j.getMenu&&j.getMenu()!=null;var m=this._getMenuBar(j);for(var g in f){var b=f[g];var h=false;if(b.getAutoHide()){var i=b.getOpener()===j;var c=!(b.getOpener() instanceof rwt.widgets.MenuItem);var k=m!=this._getMenuBar(b);if(!e||!l){h=true}if(d&&k){h=true}if(d&&c&&i){h=true}if(!n&&!i){if(d&&!b.isSubElement(j)){h=true}if(o&&b.isSubElement(j,true)){h=true}}}if(h){b.hide()}}},_getMenuBar:function(c){var d=null;var b=null;if(c instanceof rwt.widgets.MenuItem){d=c.getParentMenu()}else{if(c instanceof rwt.widgets.Menu||c instanceof rwt.widgets.MenuBar){d=c}}while(b==null&&d!=null){if(d instanceof rwt.widgets.MenuBar){b=d}else{var a=d.getOpener() instanceof rwt.widgets.MenuItem;var d=a?d.getOpener().getParentMenu():null}}return b}}}); |
| rwt.qx.Class.define($[273],{extend:rwt.widgets.base.MultiCellWidget,construct:function(a){arguments.callee.base.call(this,[$[15],$[15],$[67],$[15]]);this._hasSelectionListener=false;this._selected=false;this._parentMenu=null;this._subMenu=null;this._subMenuOpen=false;this._preferredCellWidths=null;this.initTabIndex();this.set({width:"auto",horizontalChildrenAlign:"left",verticalChildrenAlign:$[44]});this.addEventListener($[5],this.execute);this.addEventListener($[101],this._onFontChange);this.addState(a);switch(a){case"bar":this._isSelectable=false;this._isDeselectable=false;this.addState("onMenuBar");break;case"push":this._isSelectable=false;this._isDeselectable=false;break;case $[108]:this._isSelectable=true;this._isDeselectable=true;break;case"cascade":this._isSelectable=false;this._isDeselectable=false;break;case $[116]:this._isSelectable=true;this.setNoRadioGroup(false);rwt.widgets.util.RadioButtonUtil.registerExecute(this);break}this._preferredCellWidths=[0,0,0,13];if(this._isSelectable){this.setCellContent(0,"")}},destruct:function(){this._disposeFields("_parentMenu","_subMenu")},properties:{selectionIndicator:{apply:$[414],nullable:true,themeable:true},arrow:{apply:"_applyArrow",nullable:true,themeable:true},appearance:{refine:true,init:"menu-item"},tabIndex:{refine:true,init:1}},events:{subMenuChanged:$[11]},members:{setParentMenu:function(a){this._parentMenu=a},getParentMenu:function(){return this._parentMenu},setSubMenuOpen:function(a){this._subMenuOpen=a},setMenu:function(a){this._subMenu=a;this.dispatchSimpleEvent($[509])},getMenu:function(){return this._subMenu},_applySelectionIndicator:function(f,b){var c=f?f[0]:null;var d=f?f[1]:0;var a=f?f[2]:0;if(c==null){var e=this._isSelectable?"":null;this.setCellContent(0,e)}else{this.setCellContent(0,c)}this.setCellHeight(0,a);this._setPreferredCellWidth(0,d)},_setPreferredCellWidth:function(a,b){this._preferredCellWidths[a]=b;if(this._parentMenu instanceof rwt.widgets.Menu){this._parentMenu.invalidateMaxCellWidth(a)}this._scheduleLayoutX()},_afterScheduleLayoutX:function(){if(this._parentMenu instanceof rwt.widgets.Menu){this._parentMenu.scheduleMenuLayout()}},getPreferredCellWidth:function(a){return this._preferredCellWidths[a]},setImage:function(c,b,a){this.setCellContent(1,c);this.setCellHeight(1,a);this._setPreferredCellWidth(1,b)},setText:function(a){this.setCellContent(2,a);this.setCellDimension(2,null,null);this._setPreferredCellWidth(2,this.getCellWidth(2))},_onFontChange:function(){this.setCellDimension(2,null,null);this._setPreferredCellWidth(2,this.getCellWidth(2))},_applyArrow:function(e,b){var c=e?e[0]:null;var d=e?e[1]:13;var a=e?e[2]:0;this.setCellContent(3,c);this.setCellHeight(3,a);this._setPreferredCellWidth(3,d)},_beforeComputeInnerWidth:function(){if(this._parentMenu instanceof rwt.widgets.Menu){for(var a=0;a<4;a++){this._setCellWidth(a,this._parentMenu.getMaxCellWidth(a))}}},_beforeAppear:function(){arguments.callee.base.call(this);if(this._parentMenu instanceof rwt.widgets.Menu){this._parentMenu.invalidateAllMaxCellWidths();this._parentMenu.scheduleMenuLayout()}},setHasSelectionListener:function(a){this._hasSelectionListener=a},setSubMenu:function(a){this._subMenu=a;this.createDispatchEvent($[509])},setNoRadioGroup:function(a){if(this.hasState($[116])){this._noRadioGroup=a;this._isDeselectable=a}},getNoRadioGroup:function(){return this._noRadioGroup},execute:function(){arguments.callee.base.call(this);if(this._isSelectable){this.setSelection(!(this._selected&&this._isDeselectable))}this._sendChanges()},setSelection:function(b){if(this._selected!=b||this._selected){this._selected=b;if(this._selected){this.addState($[22])}else{this.removeState($[22])}if(!rwt.remote.EventUtil.getSuspended()){var d=rwt.remote.WidgetManager.getInstance();var c=d.findIdByWidget(this);var a=rwt.remote.Server.getInstance();a.addParameter(c+$[170],this._selected)}}},_sendChanges:function(){if(!rwt.remote.EventUtil.getSuspended()&&this._hasSelectionListener&&this._shouldSendEvent()){rwt.remote.EventUtil.notifySelected(this)}},_shouldSendEvent:function(){return !this.hasState("rwt_CASCADE")},_onmouseup:function(a){this.execute()}}}); |
| rwt.remote.HandlerRegistry.add($[273],{factory:function(b){var a;rwt.remote.HandlerUtil.callWithTarget(b.parent,function(e){var d=rwt.remote.HandlerUtil.createStyleMap(b.style);var c="push";if(e.hasState($[175])){c="bar"}else{if(d.CASCADE){c="cascade"}else{if(d.CHECK){c=$[108]}else{if(d.RADIO){c=$[116]}}}}if(d.SEPARATOR){a=new rwt.widgets.MenuItemSeparator()}else{a=new rwt.widgets.MenuItem(c);a.setNoRadioGroup(e.hasState($[338]))}e.addMenuItemAt(a,b.index);rwt.remote.HandlerUtil.addDestroyableChild(e,a);a.setUserData($[103],e)});rwt.remote.HandlerUtil.addStatesForStyles(a,b.style);return a},destructor:rwt.remote.HandlerUtil.getWidgetDestructor(),properties:["menu",$[243],"text",$[15],$[60],$[86]],propertyHandler:{menu:function(b,a){if(!b.hasState($[217])){rwt.remote.HandlerUtil.callWithTarget(a,function(c){b.setMenu(c)})}},text:function(d,c){if(!d.hasState($[217])){var b=rwt.util.Encoding;var e=c;var a=e.indexOf("\t");if(a!=-1){e=e.substring(0,a)}e=b.escapeText(e,false);d.setText(e)}},image:function(b,a){if(!b.hasState($[217])){if(a===null){b.setImage(a)}else{b.setImage.apply(b,a)}}},selection:function(b,a){if(!b.hasState($[217])){b.setSelection(a)}}},listeners:[$[30],"Help"],listenerHandler:{Selection:function(b,a){if(!b.hasState($[217])){b.setHasSelectionListener(a)}},Help:rwt.remote.HandlerUtil.getControlListenerHandler("Help")}}); |
| rwt.qx.Class.define("rwt.widgets.util.RadioButtonUtil",{statics:{registerExecute:function(a){a.addEventListener($[107],this._onSelection,this)},registerKeypress:function(a){a.addEventListener($[4],this._onKeypress,this)},_onKeypress:function(a){var b=a.getTarget();switch(a.getKeyIdentifier()){case"Left":case"Up":this._setNextOrPrevious(b,"previous");b._sendChanges();a.preventDefault();a.stopPropagation();break;case $[35]:case"Down":this._setNextOrPrevious(b,"next");b._sendChanges();a.preventDefault();a.stopPropagation();break;case"Home":case"End":case $[45]:case $[40]:a.preventDefault();a.stopPropagation();break}},_onSelection:function(a){this._unselectSiblings(a.getTarget())},_isRadioElement:function(a){return a.hasState($[116])},_getRadioGroup:function(d){var e=[];if(!d.getNoRadioGroup()){var f=d.getParent().getChildren();var c=f.length;if(d.classname==$[285]){for(var a=0;a<c;a++){if(this._isRadioElement(f[a])){e.push(f[a])}}}else{var b=false;var a=0;while(a<c&&(!b||this._isRadioElement(f[a]))){if(!b){b=f[a]==d}if(this._isRadioElement(f[a])){e.push(f[a])}else{e=[]}a++}}}return e},_setNextOrPrevious:function(e,g){var a=this._getRadioGroup(e);if(a.length>0){var d;for(var c=0;c<a.length;c++){if(a[c]==e){d=c}}var f=d;if(g=="next"){do{f++;if(f>=a.length){f=0}}while(!a[f].getEnabled())}if(g=="previous"){do{f--;if(f<0){f=a.length-1}}while(!a[f].getEnabled())}if(f!==d){var b=a[f];this._unselectSiblings(b);b.setSelection(true);b.setFocused(true)}}},_unselectSiblings:function(b){var c=this._getRadioGroup(b);for(var a=0;a<c.length;a++){if(c[a]!=b){c[a].setSelection(false)}}}}}); |
| rwt.qx.Class.define("rwt.widgets.MenuBar",{extend:rwt.widgets.base.HorizontalBoxLayout,construct:function(){arguments.callee.base.call(this);this._hoverItem=null;this._openItem=null;this.addEventListener($[1],this._onMouseDown);this.addEventListener($[3],this._onMouseOver);this.addEventListener($[6],this._onMouseOut)},properties:{appearance:{refine:true,init:"toolbar"}},events:{changeOpenItem:$[11]},members:{addMenuItemAt:function(b,a){if(b.setParentMenu){b.setParentMenu(this)}this.addAt(b,a)},_onMouseOver:function(b){var c=b.getTarget();var a=c==this?null:c;this.setHoverItem(a)},_onMouseOut:function(a){var c=a.getTarget();var b=a.getRelatedTarget();if(c==this||!this.contains(b)){this.setHoverItem(null)}},_onMouseDown:function(a){var b=a.getTarget();if(b!=this){this.setOpenItem(b)}},setHoverItem:function(a){if(this._hoverItem!=null&&this._hoverItem!=a){this._hoverItem.removeState("over")}if(a!=null){a.addState("over");if(this._openItem!=null&&this._openItem!=a){this.setOpenItem(a)}}this._hoverItem=a},setOpenItem:function(b){var c=this._openItem;if(c!=null&&c.getMenu()!=null){c.setSubMenuOpen(false);c.getMenu().hide()}if(b!=null&&b!=c&&b.getMenu()!=null){this._openItem=b;b.addState($[12]);var a=b.getMenu();b.setSubMenuOpen(true);a.setOpener(b);var d=b.getElement();a.setTop(rwt.html.Location.getTop(d)+d.offsetHeight);a.setLeft(rwt.html.Location.getLeft(d));a.show()}else{this._openItem=null}this.dispatchSimpleEvent("changeOpenItem")},getOpenItem:function(){return this._openItem}}}); |
| rwt.qx.Class.define("rwt.remote.DNDSupport",{type:$[39],extend:rwt.qx.Object,construct:function(){arguments.callee.base.call(this);this._dragSources={};this._dropTargets={};this._dropTargetEventQueue={};this._requestScheduled=false;this._currentDragSource=null;this._currentDropTarget=null;this._currentTargetWidget=null;this._currentMousePosition={x:0,y:0};this._actionOverwrite=null;this._dataTypeOverwrite=null;this._dropFeedbackRenderer=null;this._dropFeedbackFlags=0;this._dragFeedbackWidget=null;this._blockDrag=false},members:{registerDragSource:function(b,a){b.addEventListener($[72],this._dragStartHandler,this);b.addEventListener($[262],this._dragEndHandler,this);var c=b.toHashCode();this._dragSources[c]={dataTypes:[],actions:this._operationsToActions(a)}},setDragSourceTransferTypes:function(b,a){var c=b.toHashCode();this._dragSources[c]["dataTypes"]=a},deregisterDragSource:function(a){a.removeEventListener($[72],this._dragStartHandler,this);a.removeEventListener($[262],this._dragEndHandler,this);var b=a.toHashCode();delete this._dragSources[b]},isDragSource:function(a){var b=a.toHashCode();return typeof this._dragSources[b]!=$[8]},isDropTarget:function(a){var b=a.toHashCode();return typeof this._dropTargets[b]!=$[8]},_dragStartHandler:function(a){var m=rwt.remote.WidgetManager.getInstance();var g=a.getCurrentTarget();var c=m.findControl(a.getTarget());if(c==g&&!this._blockDrag){var d=g.toHashCode();var j=this._dragSources[d].dataTypes;if(j.length>0){for(var e=0;e<j.length;e++){a.addData(j[e],true)}this._actionOverwrite=null;this._currentDragSource=g;var b=rwt.event.DragAndDropHandler.getInstance();b.clearActions();var k=rwt.widgets.base.ClientDocument.getInstance();k.addEventListener($[3],this._onMouseOver,this);k.addEventListener($[10],this._onKeyEvent,this);k.addEventListener($[34],this._onKeyEvent,this);this.setCurrentTargetWidget(a.getOriginalTarget());var l=rwt.widgets.util.WidgetUtil;l._fakeMouseEvent(this._currentTargetWidget,$[6]);var h=b.__dragCache.sourceWidget;var f=this._getFeedbackWidget(c,h);b.setFeedbackWidget(f,10,20);a.startDrag();a.stopPropagation()}this._sendDragSourceEvent(g,"dragStart",a.getMouseEvent())}},_dragEndHandler:function(b){var c=b.getCurrentTarget();var d=b.getMouseEvent();this._blockDrag=true;if(!this._requestScheduled){var a=rwt.remote.Server.getInstance();a.addEventListener("send",this._onSend,this)}this._sendDragSourceEvent(c,$[537],d);this._cleanUp();b.stopPropagation()},_sendDragSourceEvent:function(c,e,g){var h=rwt.remote.Server.getInstance();var j=rwt.remote.WidgetManager.getInstance();var a=j.findIdByWidget(c);var i=0;var f=0;if(g instanceof rwt.event.MouseEvent){i=g.getPageX();f=g.getPageY()}var d=$[369]+e;h.addEvent(d,a);h.addParameter(d+".x",i);h.addParameter(d+".y",f);var b=rwt.remote.EventUtil.eventTimestamp();h.addParameter(d+".time",b);h.send()},registerDropTarget:function(b,a){b.addEventListener($[124],this._dragOverHandler,this);b.addEventListener($[246],this._dragMoveHandler,this);b.addEventListener($[264],this._dragOutHandler,this);b.addEventListener($[213],this._dragDropHandler,this);var c=b.toHashCode();this._dropTargets[c]={actions:this._operationsToActions(a)};b.setSupportsDropMethod(rwt.util.Functions.returnTrue)},setDropTargetTransferTypes:function(b,a){b.setDropDataTypes(a)},deregisterDropTarget:function(a){a.setDropDataTypes([]);a.removeEventListener($[124],this._dragOverHandler,this);a.removeEventListener($[246],this._dragMoveHandler,this);a.removeEventListener($[264],this._dragOutHandler,this);a.removeEventListener($[213],this._dragDropHandler,this);var b=a.toHashCode();delete this._dropTargets[b];a.setSupportsDropMethod(null)},_dragOverHandler:function(a){var d=a.getCurrentTarget();var c=d.toHashCode();var e=a.getMouseEvent();this._currentDropTarget=d;var b=this._computeCurrentAction(e,d);this._setAction(b,null);this._sendDropTargetEvent(d,$[327],e,b);a.stopPropagation()},_dragMoveHandler:function(a){var c=a.getCurrentTarget();var d=a.getMouseEvent();this._currentMousePosition.x=d.getPageX();this._currentMousePosition.y=d.getPageY();var b=this._computeCurrentAction(d,c);this._setAction(b,d);this._sendDropTargetEvent(c,"dragOver",d,b);a.stopPropagation()},_dragOutHandler:function(b){var c=b.getCurrentTarget();var d=b.getMouseEvent();if(this._currentTargetWidget!==d.getTarget()){this._onMouseOver(d)}var a=rwt.event.DragAndDropHandler.getInstance();a.clearActions();this.setFeedback(c,null,0);this._currentDropTarget=null;this._actionOverwrite=null;this._dataTypeOverwrite=null;if(this._isDropTargetEventScheduled($[327])){this._cancelDropTargetEvent($[327]);this._cancelDropTargetEvent("dragOver")}else{this._sendDropTargetEvent(c,"dragLeave",d,"none")}b.stopPropagation()},_dragDropHandler:function(a){var c=a.getCurrentTarget();var d=a.getMouseEvent();var b=this._computeCurrentAction(d,c);this._sendDropTargetEvent(c,"dropAccept",d,b);a.stopPropagation()},_sendDropTargetEvent:function(h,j,n,g){var p=rwt.remote.WidgetManager.getInstance();var c=p.findIdByWidget(h);var q=this._getCurrentItemTarget();var m=q!=null?p.findIdByWidget(q):null;var o=0;var l=0;if(n instanceof rwt.event.MouseEvent){o=n.getPageX();l=n.getPageY()}else{o=this._currentMousePosition.x;l=this._currentMousePosition.y}var a=p.findIdByWidget(this._currentDragSource);var e=rwt.remote.EventUtil.eventTimestamp();var f=g==$[104]?"link":g;var i=$[369]+j;var b={};b.id=c;b.eventName=i;var d={};d[i+".x"]=o;d[i+".y"]=l;d[i+".item"]=m;d[i+".operation"]=f;d[i+".feedback"]=this._dropFeedbackFlags;d[i+".dataType"]=this._dataTypeOverwrite;d[i+".source"]=a;d[i+".time"]=e;b.param=d;this._dropTargetEventQueue[j]=b;if(!this._requestScheduled){var k=rwt.remote.Server.getInstance();k.addEventListener("send",this._onSend,this);this._requestScheduled=true;rwt.client.Timer.once(k.send,k,200)}},_isDropTargetEventScheduled:function(a){return typeof this._dropTargetEventQueue[a]!=$[8]},_cancelDropTargetEvent:function(a){delete this._dropTargetEventQueue[a]},_setPropertyRetroactively:function(g,f,e){var d=rwt.remote.WidgetManager.getInstance();for(var b in this._dropTargetEventQueue){var c=this._dropTargetEventQueue[b];if(c.id==d.findIdByWidget(g)){var a=c.eventName;c.param[a+"."+f]=e}}},_attachDropTargetEvents:function(){var e=rwt.remote.Server.getInstance();var b=this._dropTargetEventQueue;for(var c in b){var d=b[c];e.addEvent(d.eventName,d.id);for(var a in d.param){e.addParameter(a,d.param[a])}}this._dropTargetEventQueue={}},_getCurrentItemTarget:function(){var b=null;var c=this._getCurrentFeedbackTarget();if(c instanceof rwt.widgets.base.GridRow){var a=this._currentDropTarget;b=a._rowContainer.findItemByRow(c)}else{b=c}return b},_setAction:function(d,a){var b=rwt.event.DragAndDropHandler.getInstance();var c=b.getCurrentAction();if(c!=d){b.clearActions();b.setAction(d);if(a!=null){this._sendDropTargetEvent(this._currentDropTarget,"dragOperationChanged",a,d)}}},_operationsToActions:function(b){var a={};for(var c=0;c<b.length;c++){var d=this._toAction(b[c]);a[d]=d!=null}return a},_toAction:function(b){var a;switch(b){case"DROP_MOVE":a="move";break;case"DROP_COPY":a="copy";break;case"DROP_LINK":a=$[104];break;default:a=b;break}return a},_computeCurrentAction:function(f,g){var j;if(this._actionOverwrite!=null){j=this._actionOverwrite}else{j="move";var b=f.isShiftPressed();var a=f.isCtrlPressed();var d=f.isAltPressed();if(a&&!b&&!d){j="copy"}else{if(d&&!b&&!a){j=$[104]}else{if(!d&&b&&a){j=$[104]}}}var i=g.toHashCode();var e=this._dropTargets[i].actions;var h=this._currentDragSource.toHashCode();var c=this._dragSources[h].actions;if(!c[j]||!e[j]){j="none"}}return j},_createFeedback:function(a){if(this._dropFeedbackRenderer==null){if(a instanceof rwt.widgets.Grid){this._dropFeedbackRenderer=new rwt.widgets.util.GridDNDFeedback(a)}}},_renderFeedback:function(){if(this._dropFeedbackRenderer!=null){var a=this._getCurrentFeedbackTarget();this._dropFeedbackRenderer.renderFeedback(a)}},_getCurrentFeedbackTarget:function(){var a=null;var b=this._currentTargetWidget;if(b instanceof rwt.widgets.base.GridRow){if(this._currentDropTarget&&this._currentDropTarget.contains(b)){a=b}}return a},_getFeedbackWidget:function(c,b){var a=b;var d=false;if(this._dragFeedbackWidget==null){this._dragFeedbackWidget=new rwt.widgets.base.MultiCellWidget([$[15],$[67]]);this._dragFeedbackWidget.setOpacity(0.7);this._dragFeedbackWidget.setEnabled(false);this._dragFeedbackWidget.setPadding(2)}while(!d&&a!=c){if(a instanceof rwt.widgets.base.GridRow){d=true;this._configureTreeRowFeedback(a)}if(!d){a=a.getParent()}}return d?this._dragFeedbackWidget:null},_configureTreeRowFeedback:function(h){var c=this._dragFeedbackWidget;var i=this._currentDragSource;var g=i._rowContainer.findItemByRow(h);if(g!=null){var a=i.getRenderConfig();var b=g.getImage(a.treeColumn);if(b!=null){c.setCellContent(0,b);var d=a.itemImageWidth[a.treeColumn];c.setCellDimension(0,d,h.getHeight())}var e=g.getCellBackground(a.treeColumn);var f=g.getCellForeground(a.treeColumn);c.setBackgroundColor(e);c.setTextColor(f);c.setCellContent(1,g.getText(a.treeColumn));c.setFont(a.font)}},_resetFeedbackWidget:function(){if(this._dragFeedbackWidget!=null){this._dragFeedbackWidget.setParent(null);this._dragFeedbackWidget.setFont(null);this._dragFeedbackWidget.setCellContent(0,null);this._dragFeedbackWidget.setCellDimension(0,null,null);this._dragFeedbackWidget.setCellContent(1,null);this._dragFeedbackWidget.setBackgroundColor(null)}},_onSend:function(b){this._attachDropTargetEvents();this._requestScheduled=false;this._blockDrag=false;var a=rwt.remote.Server.getInstance();a.removeEventListener("send",this._onSend,this)},_onMouseOver:function(b){var c=b.getTarget();if(this._dropFeedbackRenderer!=null){var a=b.getDomTarget();if(!this._dropFeedbackRenderer.isFeedbackNode(a)){this.setCurrentTargetWidget(c)}}else{this.setCurrentTargetWidget(c)}},setCurrentTargetWidget:function(a){this._currentTargetWidget=a;this._renderFeedback()},_onKeyEvent:function(b){if(b.getType()==$[34]&&b.getKeyIdentifier()=="Alt"){this._sendDragSourceEvent(this._currentDragSource,$[537],b);this.cancel()}else{if(this._currentDropTarget!=null){var a=rwt.event.DragAndDropHandler.getInstance();var c=this._computeCurrentAction(b,this._currentDropTarget);this._setAction(c,b);a._renderCursor()}}},_cleanUp:function(){var b=rwt.widgets.util.WidgetUtil;b._fakeMouseEvent(this._currentTargetWidget,$[224]);b._fakeMouseEvent(this._currentTargetWidget,$[3]);this.setCurrentTargetWidget(null);if(this._currentDropTarget!=null){this.setFeedback(this._currentDropTarget,null,0);this._currentDropTarget=null}var a=rwt.event.DragAndDropHandler.getInstance();a.setFeedbackWidget(null);this._resetFeedbackWidget();this._currentDragSource=null;this._dataTypeOverwrite=null;this._currentMousePosition.x=0;this._currentMousePosition.y=0;var c=rwt.widgets.base.ClientDocument.getInstance();c.removeEventListener($[3],this._onMouseOver,this);c.removeEventListener($[10],this._onKeyEvent,this);c.removeEventListener($[34],this._onKeyEvent,this)},cancel:function(){if(this._currentDragSource!=null){var a=rwt.event.DragAndDropHandler.getInstance();a.globalCancelDrag();this._cleanUp()}},setOperationOverwrite:function(d,a){if(d==this._currentDropTarget){var c=this._toAction(a);var b=rwt.event.DragAndDropHandler.getInstance();this._actionOverwrite=c;this._setAction(c,null);b._renderCursor()}this._setPropertyRetroactively(d,"operation",a)},setFeedback:function(e,b,a){if(e==this._currentDropTarget){if(b!=null){this._createFeedback(e);if(this._dropFeedbackRenderer!=null){var d={};for(var c=0;c<b.length;c++){d[b[c]]=true}this._dropFeedbackRenderer.setFeedback(d);this._renderFeedback()}}else{if(this._dropFeedbackRenderer!=null){this._dropFeedbackRenderer.dispose();this._dropFeedbackRenderer=null}}this._dropFeedbackFlags=a}},setDataType:function(b,a){if(b==this._currentDropTarget){this._dataTypeOverwrite=a}this._setPropertyRetroactively(b,"dataType",a)}}}); |
| rwt.remote.HandlerRegistry.add("rwt.widgets.DropTarget",{factory:function(b){var c=rwt.remote.ObjectRegistry.getObject(b.control);var a={control:c};rwt.remote.DNDSupport.getInstance().registerDropTarget(c,b.style);rwt.remote.HandlerUtil.addDestroyableChild(c,a);return a},destructor:function(a){rwt.remote.HandlerUtil.removeDestroyableChild(a.control,a);rwt.remote.DNDSupport.getInstance().deregisterDropTarget(a.control)},properties:["transfer"],propertyHandler:{transfer:function(b,a){var c=b.control;rwt.remote.DNDSupport.getInstance().setDropTargetTransferTypes(c,a)}}}); |
| rwt.remote.HandlerRegistry.add("rwt.widgets.DragSource",{factory:function(b){var c=rwt.remote.ObjectRegistry.getObject(b.control);var a={control:c};rwt.remote.DNDSupport.getInstance().registerDragSource(c,b.style);rwt.remote.HandlerUtil.addDestroyableChild(c,a);return a},destructor:function(a){rwt.remote.HandlerUtil.removeDestroyableChild(a.control,a);rwt.remote.DNDSupport.getInstance().deregisterDragSource(a.control)},properties:["transfer"],propertyHandler:{transfer:function(b,a){var c=b.control;rwt.remote.DNDSupport.getInstance().setDragSourceTransferTypes(c,a)}},methods:["changeFeedback","changeDetail","changeDataType",$[84]],methodHandler:{changeFeedback:function(e,c){var d=rwt.remote.DNDSupport.getInstance();var f=rwt.remote.ObjectRegistry.getObject(c.control);var b=c.feedback;var a=c.flags;d.setFeedback(f,b,a)},changeDetail:function(d,a){var c=rwt.remote.DNDSupport.getInstance();var e=rwt.remote.ObjectRegistry.getObject(a.control);var b=a.detail;c.setOperationOverwrite(e,b)},changeDataType:function(d,b){var c=rwt.remote.DNDSupport.getInstance();var e=rwt.remote.ObjectRegistry.getObject(b.control);var a=b.dataType;c.setDataType(e,a)},cancel:function(c,a){var b=rwt.remote.DNDSupport.getInstance();b.cancel()}}}); |
| rwt.qx.Class.define("rwt.theme.ThemeValues",{extend:rwt.qx.Object,construct:function(a){if(a===undefined){throw new Error("no states given")}this._states=a;this._store=rwt.theme.ThemeStore.getInstance()},statics:{NONE_IMAGE:null,NONE_IMAGE_SIZED:[null,0,0]},members:{getCssBorder:function(b,a){return this._store.getBorder(b,this._states,a)},getCssNamedBorder:function(a){return this._store.getNamedBorder(a)},getCssColor:function(b,a){return this._store.getColor(b,this._states,a)},getCssAlpha:function(b,a){return this._store.getAlpha(b,this._states,a)},getCssNamedColor:function(a){return this._store.getNamedColor(a)},getCssFont:function(b,a){return this._store.getFont(b,this._states,a)},getCssDimension:function(b,a){return this._store.getDimension(b,this._states,a)},getCssBoxDimensions:function(b,a){return this._store.getBoxDimensions(b,this._states,a)},getCssBoolean:function(b,a){return this._store.getBoolean(b,this._states,a)},getCssFloat:function(b,a){return this._store.getFloat(b,this._states,a)},getCssIdentifier:function(b,a){return this._store.getIdentifier(b,this._states,a)},getCssImage:function(b,a){return this._store.getImage(b,this._states,a)},getCssSizedImage:function(b,a){return this._store.getSizedImage(b,this._states,a)},getCssGradient:function(b,a){return this._store.getGradient(b,this._states,a)},getCssCursor:function(b,a){return this._store.getCursor(b,this._states,a)},getCssAnimation:function(b,a){return this._store.getAnimation(b,this._states,a)},getCssShadow:function(b,a){return this._store.getShadow(b,this._states,a)},mergeBorders:function(b,a,h,f,e){if(b==null){throw new Error("Unable to merge borders. Base border is null")}var j=b;var c=false;var g=b.getColors();var i=b.getWidths();var d=b.getStyles();if(a!=null&&a.getWidthTop()!==0){c=true;g[0]=a.getColorTop();i[0]=a.getWidthTop();d[0]=a.getStyleTop()}if(h!=null&&h.getWidthRight()!==0){c=true;g[1]=h.getColorRight();i[1]=h.getWidthRight();d[1]=h.getStyleRight()}if(f!=null&&f.getWidthBottom()!==0){c=true;g[2]=f.getColorBottom();i[2]=f.getWidthBottom();d[2]=f.getStyleBottom()}if(e!=null&&e.getWidthLeft()!==0){c=true;g[3]=e.getColorLeft();i[3]=e.getWidthLeft();d[3]=e.getStyleLeft()}if(c){j=new rwt.html.Border(i,d,g)}return j}}}); |
| rwt.qx.Class.define($[510],{extend:rwt.widgets.base.Parent,construct:function(a){arguments.callee.base.call(this);this._rootItem=new rwt.widgets.GridItem();this._hasMultiSelection=false;this._hasSelectionListener=false;this._hasDefaultSelectionListener=false;this._leadItem=null;this._topItemIndex=0;this._topItem=null;this._hasSetDataListener=false;this._selection=[];this._focusItem=null;this._renderQueue={};this._resizeLine=null;this._selectionTimestamp=null;this._selectionOffsetX=null;this._delayedSelection=false;this._sortDirection=null;this._sortColumn=null;this._hasFixedColumns=false;this._hasExpandListener=false;this._hasCollapseListener=false;this._headerHeight=0;this._footerHeight=0;this._itemHeight=16;this._mergeEventsTimer=new rwt.client.Timer(50);this._rowContainer=rwt.widgets.util.GridUtil.createTreeRowContainer(a);this._columns={};this._horzScrollBar=new rwt.widgets.base.ScrollBar(true);this._vertScrollBar=new rwt.widgets.base.ScrollBar(false);this._header=null;this._footer=null;this.add(this._rowContainer);this.add(this._horzScrollBar);this.add(this._vertScrollBar);this._cellToolTip=null;this._config=this._rowContainer.getRenderConfig();this.setCursor($[62]);this.setOverflow($[9]);rwt.widgets.base.Widget.disableScrolling(this);this._configureScrollBars();this._registerListeners();this._parseArgsMap(a)},destruct:function(){this._rootItem.removeEventListener($[146],this._onItemUpdate,this);this._rootItem.dispose();this._rootItem=null;this._mergeEventsTimer.dispose();this._mergeEventsTimer=null;this._rowContainer=null;this._header=null;this._footer=null;this._horzScrollBar=null;this._vertScrollBar=null;this._leadItem=null;this._focusItem=null;this._sortColumn=null;this._resizeLine=null;if(this._cellToolTip){this._cellToolTip.destroy();this._cellToolTip=null}},members:{_createHeader:function(){this._header=new rwt.widgets.base.GridHeader({appearance:this.getAppearance(),splitContainer:this._hasFixedColumns});this.add(this._header);this._header.addEventListener($[340],this._onShowResizeLine,this);this._header.addEventListener($[394],this._onHideResizeLine,this);this._header.setTop(0);this._header.setLeft(0);this._header.setScrollLeft(this._horzScrollBar.getValue());this._scheduleColumnUpdate()},_createFooter:function(){this._footer=new rwt.widgets.base.GridHeader({appearance:this.getAppearance(),splitContainer:this._hasFixedColumns,footer:true});this.add(this._footer);this._footer.setLeft(0);this._footer.setScrollLeft(this._horzScrollBar.getValue());this._scheduleColumnUpdate()},_configureScrollBars:function(){var a=function(b){b.stopPropagation()};this._horzScrollBar.setZIndex(100000000);this._horzScrollBar.setVisibility(false);this._horzScrollBar.setLeft(0);this._horzScrollBar.setMergeEvents(false);this._horzScrollBar.addEventListener($[72],a);this._vertScrollBar.setZIndex(100000000);this._vertScrollBar.setVisibility(false);this._vertScrollBar.setIncrement(16);this._vertScrollBar.setMergeEvents(false);this._vertScrollBar.addEventListener($[72],a)},_registerListeners:function(){this._rootItem.addEventListener($[146],this._onItemUpdate,this);this.addEventListener($[1],this._handleHyperlinkActivation,this);this.addEventListener($[5],this._handleHyperlinkActivation,this);this.addEventListener($[13],this._handleHyperlinkActivation,this);this.addEventListener($[1],this._onMouseDown,this);this.addEventListener($[5],this._onMouseUp,this);this.addEventListener($[6],this._onMouseOut,this);this.addEventListener($[4],this._onKeyPress,this);this._rowContainer.addEventListener($[43],this._onClientAreaMouseWheel,this);this._mergeEventsTimer.addEventListener($[27],this._updateTopItemIndex,this);this._horzScrollBar.addEventListener($[118],this._onHorzScrollBarChangeValue,this);this._vertScrollBar.addEventListener($[118],this._onVertScrollBarChangeValue,this);this._rowContainer.setSelectionProvider(this.isItemSelected,this);this._rowContainer.setPostRenderFunction(this._vertScrollBar.autoEnableMerge,this._vertScrollBar)},_parseArgsMap:function(a){if(a.noScroll){this._rowContainer.removeEventListener($[43],this._onClientAreaMouseWheel,this)}if(a.hideSelection){this._config.hideSelection=true}if(a.multiSelection){this._hasMultiSelection=true}if(a.fullSelection){this._config.fullSelection=true}else{this._config.selectionPadding=a.selectionPadding}if(a.check){this._config.hasCheckBoxes=true;this._config.checkBoxLeft=a.checkBoxMetrics[0];this._config.checkBoxWidth=a.checkBoxMetrics[1]}if(typeof a.indentionWidth===$[56]){this._config.indentionWidth=a.indentionWidth}if(a.markupEnabled){this._config.markupEnabled=true}this._hasFixedColumns=a.splitContainer;this._config.baseAppearance=a.appearance;this._rowContainer.setBaseAppearance(a.appearance);this.setAppearance(a.appearance)},setItemCount:function(a){this._rootItem.setItemCount(a)},setHeaderVisible:function(a){if(a&&this._header==null){this._createHeader()}else{if(!a){this._header.destroy();this._header=null}}this._layoutX();this._layoutY()},setFooterVisible:function(a){if(a&&this._footer==null){this._createFooter()}else{if(!a){this._footer.destroy();this._footer=null}}this._scheduleUpdate($[151]);this._layoutX();this._layoutY()},setHeaderHeight:function(a){this._headerHeight=a;this._layoutX();this._layoutY()},setFooterHeight:function(a){this._footerHeight=a;this._scheduleUpdate($[151]);this._layoutX();this._layoutY()},setItemHeight:function(a){this._itemHeight=a;this._vertScrollBar.setIncrement(a);this._rowContainer.setRowHeight(a);this._rootItem.setDefaultHeight(a);this._scheduleUpdate($[151])},setColumnCount:function(a){this._config.columnCount=a;this._scheduleUpdate();this._updateScrollWidth()},setItemMetrics:function(d,b,a,h,g,c,e,f,i){this._config.itemLeft[d]=b;this._config.itemWidth[d]=a;this._config.itemImageLeft[d]=h;this._config.itemImageWidth[d]=g;this._config.itemTextLeft[d]=c;this._config.itemTextWidth[d]=e;if(!isNaN(f)){this._config.itemCellCheckLeft[d]=f;this._config.itemCellCheckWidth[d]=i}this._scheduleUpdate();this._updateScrollWidth()},setTreeColumn:function(a){this._config.treeColumn=a},setTopItemIndex:function(a){this._updateScrollHeight();var c=0;var b=this._rootItem.findItemByFlatIndex(a);if(b!=null){c=b.getOffset()}this._vertScrollBar.setValue(c);if(!this._inServerResponse()){rwt.widgets.base.Widget.flushGlobalQueues()}},getTopItemIndex:function(){return this._topItemIndex},setScrollLeft:function(a){this._horzScrollBar.setValue(a)},selectItem:function(a){this._selectItem(a,false);this._scheduleItemUpdate(a)},deselectItem:function(a){this._deselectItem(a,false);this._scheduleItemUpdate(a)},setFocusItem:function(a){this._focusItem=a;this._sendItemFocusChange()},setSortDirection:function(a){this._sortDirection=a;if(this._sortColumn!==null){this._sortColumn.setSortDirection(this._sortDirection)}},setSortColumn:function(a){if(this._sortColumn!==null){this._sortColumn.setSortDirection("none")}this._sortColumn=a;if(this._sortColumn!==null){this._sortColumn.setSortDirection(this._sortDirection)}},setScrollBarsVisible:function(b,a){if(!b){this._horzScrollBar.setValue(0)}this._horzScrollBar.setVisibility(b);if(!a){this._vertScrollBar.setValue(0)}this._vertScrollBar.setVisibility(a);this._layoutX();this._layoutY()},getVerticalBar:function(){return this._vertScrollBar},getHorizontalBar:function(){return this._horzScrollBar},isVerticalBarVisible:function(){return this._vertScrollBar.getVisibility()},isHorizontalBarVisible:function(){return this._horzScrollBar.getVisibility()},setHasSelectionListener:function(a){this._hasSelectionListener=a},setHasDefaultSelectionListener:function(a){this._hasDefaultSelectionListener=a},setHasExpandListener:function(a){this._hasExpandListener=a},setHasCollapseListener:function(a){this._hasCollapseListener=a},setHasSetDataListener:function(a){this._hasSetDataListener=a},setAlignment:function(a,b){this._config.alignment[a]=b;this._scheduleUpdate()},setCellCheck:function(a,b){this._config.itemCellCheck[a]=b;this._scheduleUpdate()},setLinesVisible:function(a){this._config.linesVisible=a;if(a){this.addState($[234])}else{this.removeState($[234])}this._rowContainer.updateRowLines();this._scheduleUpdate()},setAlwaysHideSelection:function(a){this._config.alwaysHideSelection=a;this._scheduleUpdate()},addState:function(a){arguments.callee.base.call(this,a);if(a.slice(0,8)===$[38]){this._config.variant=a}},removeState:function(a){if(this._config.variant===a){this._config.variant=null}arguments.callee.base.call(this,a)},getRenderConfig:function(){return this._config},getRootItem:function(){return this._rootItem},isFocusItem:function(a){return this._focusItem===a},isItemSelected:function(a){return this._selection.indexOf(a)!=-1},getRowContainer:function(){return this._rowContainer},getTableHeader:function(){return this._header},getFooter:function(){return this._footer},update:function(){this._scheduleUpdate()},addColumn:function(a){this._columns[a.toHashCode()]=a;a.addEventListener($[146],this._scheduleColumnUpdate,this);this._scheduleColumnUpdate()},removeColumn:function(a){delete this._columns[a.toHashCode()];a.removeEventListener($[146],this._scheduleColumnUpdate,this);this._scheduleColumnUpdate()},_onItemUpdate:function(b){var a=b.target;if(b.msg===$[230]){if(this._focusItem&&(this._focusItem.isDisposed()||this._focusItem.isChildOf(a))){this.setFocusItem(a)}}if(b.msg===$[218]){this._scheduleUpdate($[449])}this._sendItemUpdate(a,b);this._renderItemUpdate(a,b);return false},_beforeAppear:function(){arguments.callee.base.call(this);this._scheduleColumnUpdate()},_scheduleColumnUpdate:function(){rwt.widgets.base.Widget.addToGlobalWidgetQueue(this);this._scheduleUpdate()},flushWidgetQueue:function(){this._updateColumns()},_onVertScrollBarChangeValue:function(){if(this._vertScrollBar._internalValueChange){this._mergeEventsTimer.start()}else{this._updateTopItemIndex()}},_updateTopItemIndex:function(){this._mergeEventsTimer.stop();var b=this._vertScrollBar.getValue();var a=this._rootItem.findItemByOffset(b-1);if(a){this._topItemIndex=a.getFlatIndex()+1;this._topItem=a.getNextItem()}else{this._topItemIndex=0;this._topItem=null}if(this._inServerResponse()){this._scheduleUpdate("topItem")}else{this._sendTopItemIndexChange();this._updateTopItem(true)}},_onHorzScrollBarChangeValue:function(){this._rowContainer.setScrollLeft(this._horzScrollBar.getValue());if(this._header){this._header.setScrollLeft(this._horzScrollBar.getValue())}if(this._footer){this._footer.setScrollLeft(this._horzScrollBar.getValue())}this._sendScrollLeftChange()},_onMouseDown:function(a){this._delayedSelection=false;var b=a.getOriginalTarget();if(b instanceof rwt.widgets.base.GridRow&&!this._isHyperlinkTarget(a)){this._onRowMouseDown(b,a)}},_onMouseUp:function(a){if(this._delayedSelection){this._onMouseDown(a)}},_onRowMouseDown:function(e,d){var c=this._rowContainer.findItemByRow(e);if(c!=null){var b=e.getTargetIdentifier(d);if(b[0]===$[289]&&c.hasChildren()){var a=!c.isExpanded();if(!a){this._deselectVisibleChildren(c)}c.setExpanded(a)}else{if(b[0]===$[259]||b[0]===$[331]){this._toggleCheckSelection(c,b[1])}else{if(this._isSelectionClick(b)){this._onSelectionClick(d,c)}}}}},_handleHyperlinkActivation:function(b){if(this._isRWTHyperlinkTarget(b)){b.setDefaultPrevented(true);if(b.getType()===$[13]){var c=b.getDomTarget();var e=b.getOriginalTarget();var a=this._rowContainer.findItemByRow(e);var d=c.getAttribute("href");if(!d){d=c.innerHTML}this._sendSelectionEvent(a,false,"hyperlink",undefined,d)}}},_isHyperlinkTarget:function(a){return a.getDomTarget().tagName.toLowerCase()==="a"},_isRWTHyperlinkTarget:function(a){var b=a.getDomTarget();return this._isHyperlinkTarget(a)&&b.getAttribute("target")==="_rwt"},_isSelectionClick:function(b){var a;if(this._config.fullSelection){a=b[0]!==$[259]}else{a=b[0]===$[258]}return a},_onSelectionClick:function(b,a){var c=this._isDoubleClicked(b,a);if(c){this._sendSelectionEvent(a,true,null)}else{if(this._hasMultiSelection){if(!this._delayMultiSelect(b,a)){this._multiSelectItem(b,a)}}else{this._singleSelectItem(b,a)}}},_delayMultiSelect:function(b,a){if(this._isDragSource()&&this.isItemSelected(a)&&b.getType()===$[1]){this._delayedSelection=true}return this._delayedSelection},_onMouseOut:function(a){this._delayedSelection=false},_onClientAreaMouseWheel:function(a){a.preventDefault();a.stopPropagation();var b=a.getWheelDelta()*this._itemHeight*2;this._vertScrollBar.setValue(this._vertScrollBar.getValue()-b);this._vertScrollBar.setValue(this._vertScrollBar.getValue())},_onKeyPress:function(a){if(this._focusItem!=null){switch(a.getKeyIdentifier()){case $[49]:this._handleKeyEnter(a);break;case $[78]:this._handleKeySpace(a);break;case"Up":this._handleKeyUp(a);break;case"Down":this._handleKeyDown(a);break;case $[40]:this._handleKeyPageUp(a);break;case $[45]:this._handleKeyPageDown(a);break;case"Home":this._handleKeyHome(a);break;case"End":this._handleKeyEnd(a);break;case"Left":this._handleKeyLeft(a);break;case $[35]:this._handleKeyRight(a);break}}this._stopKeyEvent(a)},_stopKeyEvent:function(a){switch(a.getKeyIdentifier()){case"Up":case"Down":case"Left":case $[35]:case"Home":case"End":case $[40]:case $[45]:a.preventDefault();a.stopPropagation();break}},_onShowResizeLine:function(c){var b=c.position;if(this._resizeLine===null){this._resizeLine=new rwt.widgets.base.Terminator();this._resizeLine.setAppearance("table-column-resizer");this.add(this._resizeLine);rwt.widgets.base.Widget.flushGlobalQueues()}var e=this._rowContainer.getTop();this._resizeLine._renderRuntimeTop(e);var d=b-2-this._horzScrollBar.getValue();this._resizeLine._renderRuntimeLeft(d);var a=this._rowContainer.getHeight();this._resizeLine._renderRuntimeHeight(a);this._resizeLine.removeStyleProperty($[100])},_onHideResizeLine:function(){this._resizeLine.setStyleProperty($[100],$[9])},_handleKeyEnter:function(a){this._sendSelectionEvent(this._focusItem,true,null)},_handleKeySpace:function(b){if(b.isCtrlPressed()||!this.isItemSelected(this._focusItem)){var a=this._focusItem.getFlatIndex();this._handleKeyboardSelect(b,this._focusItem,a)}if(this._config.hasCheckBoxes){this._toggleCheckSelection(this._focusItem)}},_handleKeyUp:function(c){var b=this._focusItem.getPreviousItem();if(b!=null){var a=b.getFlatIndex();this._handleKeyboardSelect(c,b,a)}},_handleKeyDown:function(c){var b=this._focusItem.getNextItem();if(b!=null){var a=b.getFlatIndex();this._handleKeyboardSelect(c,b,a)}},_handleKeyPageUp:function(c){var e=this._focusItem.getOffset();var d=this._rowContainer.getHeight();var f=Math.max(0,e-d);var b=this._rootItem.findItemByOffset(f);if(f!==0){b=b.getNextItem()}var a=b.getFlatIndex();this._handleKeyboardSelect(c,b,a)},_handleKeyPageDown:function(d){var f=this._focusItem.getOffset();var e=this._rowContainer.getHeight();var a=this.getRootItem().getOffsetHeight()-1;var g=Math.min(a,f+e);var c=this._rootItem.findItemByOffset(g);if(g!==a){c=c.getPreviousItem()}var b=c.getFlatIndex();this._handleKeyboardSelect(d,c,b)},_handleKeyHome:function(b){var a=this.getRootItem().getChild(0);this._handleKeyboardSelect(b,a,0)},_handleKeyEnd:function(c){var b=this.getRootItem().getLastChild();var a=this.getRootItem().getVisibleChildrenCount()-1;this._handleKeyboardSelect(c,b,a)},_handleKeyLeft:function(c){if(this._focusItem.isExpanded()){this._focusItem.setExpanded(false)}else{if(!this._focusItem.getParent().isRootItem()){var b=this._focusItem.getParent();var a=b.getFlatIndex();this._handleKeyboardSelect(c,b,a,true)}}},_handleKeyRight:function(c){if(this._focusItem.hasChildren()){if(!this._focusItem.isExpanded()){this._focusItem.setExpanded(true)}else{var b=this._focusItem.getChild(0);var a=b.getFlatIndex();this._handleKeyboardSelect(c,b,a,true)}}},_handleKeyboardSelect:function(d,c,b,a){if(this._hasMultiSelection&&!a){this._multiSelectItem(d,c)}else{this._singleSelectItem(d,c)}this._scrollIntoView(b,c)},_updateColumns:function(){this._updateScrollWidth();if(this._header!=null){this._header.renderColumns(this._columns)}if(this._footer!=null){this._footer.renderColumns(this._columns)}},_renderItemUpdate:function(b,a){if(b.isDisplayable()){switch(a.msg){case $[82]:case $[230]:case $[17]:this._topItem=null;this._scheduleUpdate($[151]);break;case"add":case $[218]:if(b.isExpanded()){this._scheduleUpdate($[151])}else{this._scheduleItemUpdate(b)}this._topItem=null;break;default:if(this._inServerResponse()){this._scheduleItemUpdate(b)}else{this._rowContainer.renderItem(b)}break}}},_scheduleUpdate:function(a){if(a!==undefined){this.addToQueue(a)}this._renderQueue.allItems=true;this.addToQueue($[333])},_scheduleItemUpdate:function(a){this._renderQueue[a.toHashCode()]=a;this.addToQueue($[333])},_layoutPost:function(a){arguments.callee.base.call(this,a);if(a[$[449]]){this._checkDisposedItems()}if(a[$[151]]){this._updateScrollHeight()}if(a[$[151]]||a.topItem){this._updateTopItem(false)}if(a[$[333]]){if(this._renderQueue.allItems){this._rowContainer.renderAll()}else{this._rowContainer.renderItemQueue(this._renderQueue)}this._renderQueue={}}},_updateScrollHeight:function(){var b=this.getRootItem().getOffsetHeight();var a=b+(this._footer?this._footerHeight:0);if(this._vertScrollBar.getMaximum()!=a){if(!this._vertScrollBar.getDisposed()){this._vertScrollBar.setMaximum(a)}}},_updateTopItem:function(a){this._rowContainer.setTopItem(this._getTopItem(),this._topItemIndex,a)},_updateScrollWidth:function(){var a=this._getItemWidth();this._rowContainer.setRowWidth(this._getRowWidth());if(!this._horzScrollBar.getDisposed()){this._horzScrollBar.setMaximum(a)}var b=this._vertScrollBar.getVisibility()?this._vertScrollBar.getWidth():0;if(this._header){this._header.setScrollWidth(a+b)}if(this._footer){this._footer.setScrollWidth(a)}},_scrollIntoView:function(c,i){if(c<this._topItemIndex){this.setTopItemIndex(c)}else{if(c>this._topItemIndex){var d=this._getTopItem();var h=d.getOffset();var g=i.getOffset();var f=this._rowContainer.getHeight()-i.getOwnHeight();if(g>h+f){var b=g-f-1;var e=this.getRootItem().findItemByOffset(b);var a=e.getFlatIndex()+1;this.setTopItemIndex(a)}}}},setHasScrollBarsSelectionListener:function(a){this._vertScrollBar.setHasSelectionListener(true);this._horzScrollBar.setHasSelectionListener(true)},_sendSelectionChange:function(b){if(!this._inServerResponse()){var a=this._getSelectionList();rwt.remote.Server.getInstance().getRemoteObject(this).set($[60],a);this._sendSelectionEvent(b,false,null)}},_sendItemCheckedChange:function(b){if(!this._inServerResponse()){var a=rwt.remote.Server.getInstance();var c=rwt.remote.WidgetManager.getInstance();var d=c.findIdByWidget(b);a.addParameter(d+".checked",b.isChecked());this._sendSelectionEvent(b,false,$[108])}},_sendCellCheckedChange:function(d,b){if(!this._inServerResponse()){var e=rwt.remote.Server.getInstance();var a=d.getCellChecked();var f=[];for(var c=0;c<this._config.columnCount;c++){f[c]=a[c]===true}e.getRemoteObject(d).set($[461],f);this._sendSelectionEvent(d,false,$[108],b)}},_sendItemFocusChange:function(){if(!this._inServerResponse()){var a=rwt.remote.Server.getInstance();var b=rwt.remote.WidgetManager.getInstance().findIdByWidget(this);a.addParameter(b+".focusItem",this._getItemId(this._focusItem))}},_sendTopItemIndexChange:function(){var b=rwt.remote.Server.getInstance();var a=b.getRemoteObject(this);a.set($[427],this._topItemIndex);if(this._hasSetDataListener||this._vertScrollBar.getHasSelectionListener()){this._startScrollBarChangesTimer(false)}},_sendScrollLeftChange:function(){var b=rwt.remote.Server.getInstance();var a=b.getRemoteObject(this);a.set("scrollLeft",this._horzScrollBar.getValue());if(this._hasSetDataListener||this._horzScrollBar.getHasSelectionListener()){this._startScrollBarChangesTimer(true)}},_startScrollBarChangesTimer:function(a){var b=rwt.remote.Server.getInstance();if(a&&this._horzScrollBar.getHasSelectionListener()){b.onNextSend(this._sendHorizontalScrolled,this)}else{if(this._vertScrollBar.getHasSelectionListener()){b.onNextSend(this._sendVerticalScrolled,this)}if(this._hasSetDataListener){b.onNextSend(this._sendSetData,this)}}b.sendDelayed(400)},_sendVerticalScrolled:function(){var a=rwt.remote.Server.getInstance();a.getRemoteObject(this._vertScrollBar).notify($[30])},_sendHorizontalScrolled:function(){var a=rwt.remote.Server.getInstance();a.getRemoteObject(this._horzScrollBar).notify($[30])},_sendSetData:function(){var a=rwt.remote.Server.getInstance();a.getRemoteObject(this).notify("SetData")},_sendItemUpdate:function(c,b){if(!this._inServerResponse()){if(b.msg===$[82]||b.msg===$[230]){var a=b.msg===$[82];rwt.remote.Server.getInstance().getRemoteObject(c).set($[82],a);if(a&&this._hasExpandListener){rwt.remote.Server.getInstance().getRemoteObject(this).notify($[159],{item:rwt.remote.ObjectRegistry.getId(c)})}else{if(!a&&this._hasCollapseListener){rwt.remote.Server.getInstance().getRemoteObject(this).notify($[167],{item:rwt.remote.ObjectRegistry.getId(c)})}}}}},_sendSelectionEvent:function(e,d,c,a,f){if((this._hasSelectionListener&&!d)||(this._hasDefaultSelectionListener&&d)){var b={item:this._getItemId(e),detail:c,index:!isNaN(a)?a:undefined,text:f};if(d){rwt.remote.EventUtil.notifyDefaultSelected(this,b)}else{rwt.remote.EventUtil.notifySelected(this,b)}}},_isDoubleClicked:function(c,h){var i=false;var d=c.getType()===$[1];var e=c.getButton()==="left";if(e&&d&&this.isFocusItem(h)&&this._selectionTimestamp!=null){var a=new Date();var f=c.getPageX();var b=rwt.remote.EventUtil.DOUBLE_CLICK_TIME;var g=8;if(a.getTime()-this._selectionTimestamp.getTime()<b&&Math.abs(this._selectionOffsetX-f)<g){i=true}}if(d&&e&&!i){this._selectionTimestamp=new Date();this._selectionOffsetX=c.getPageX()}else{if(d){this._selectionTimestamp=null}}return i},_getSelectionList:function(){var a=[];for(var b=0;b<this._selection.length;b++){a.push(this._getItemId(this._selection[b]))}return a},_getItemId:function(c){var d=rwt.remote.WidgetManager.getInstance();var a;if(c.isCached()){a=d.findIdByWidget(c)}else{var b=c.getParent();if(b.isRootItem()){a=d.findIdByWidget(this)}else{a=d.findIdByWidget(b)}a+="#"+b.indexOf(c)}return a},_singleSelectItem:function(b,a){if(b.isCtrlPressed()&&this.isItemSelected(a)){this._ctrlSelectItem(a)}else{this._exclusiveSelectItem(a)}},_multiSelectItem:function(b,a){if(b instanceof rwt.event.MouseEvent&&b.isRightButtonPressed()){if(!this.isItemSelected(a)){this._exclusiveSelectItem(a)}}else{if(b.isCtrlPressed()){if(b instanceof rwt.event.KeyEvent&&a!=this._focusItem){this.setFocusItem(a)}else{this._ctrlSelectItem(a)}}else{if(b.isShiftPressed()){if(this._focusItem!=null){this._shiftSelectItem(a)}else{this._exclusiveSelectItem(a)}}else{this._exclusiveSelectItem(a)}}}},_exclusiveSelectItem:function(a){this.deselectAll();this._leadItem=null;this._selectItem(a,true);this._sendSelectionChange(a);this.setFocusItem(a)},_ctrlSelectItem:function(a){if(!this.isItemSelected(a)){this._selectItem(a,true)}else{this._deselectItem(a,true)}this._sendSelectionChange(a);this.setFocusItem(a)},_shiftSelectItem:function(c){this.deselectAll();var b=this._leadItem!=null?this._leadItem:this._focusItem;this._leadItem=b;var e=c;var f=b.getFlatIndex();var d=e.getFlatIndex();if(f>d){var a=b;b=e;e=a}this._selectItem(b,true);while(b!==e){b=b.getNextItem();this._selectItem(b,true)}this._sendSelectionChange(c);this.setFocusItem(c)},_selectItem:function(b,a){if(!this.isItemSelected(b)){this._selection.push(b)}if(a){this._rowContainer.renderItem(b)}},_deselectItem:function(b,a){if(this.isItemSelected(b)){this._selection.splice(this._selection.indexOf(b),1)}if(a){this._rowContainer.renderItem(b)}},deselectAll:function(){this._checkDisposedItems();var a=this._selection;this._selection=[];for(var b=0;b<a.length;b++){this._rowContainer.renderItem(a[b])}},_toggleCheckSelection:function(b,a){if(b.isCached()){if(isNaN(a)){b.setChecked(!b.isChecked());this._sendItemCheckedChange(b)}else{if(b.isCellCheckable(a)){b.toggleCellChecked(a);this._sendCellCheckedChange(b,a)}}}},_deselectVisibleChildren:function(b){var a=b.getNextItem();var c=b.getNextItem(true);while(a!==c){this._deselectItem(a,false);a=a.getNextItem()}},_applyFocused:function(b,a){arguments.callee.base.call(this,b,a);this._config.focused=b;this._scheduleUpdate()},_applyEnabled:function(b,a){arguments.callee.base.call(this,b,a);this._config.enabled=b;this._scheduleUpdate()},_checkDisposedItems:function(){if(this._focusItem&&this._focusItem.isDisposed()){this._focusItem=null}if(this._leadItem&&this._leadItem.isDisposed()){this._leadItem=null}var a=0;while(a<this._selection.length){if(this._selection[a].isDisposed()){this._deselectItem(this._selection[a],false)}else{a++}}},_applyTextColor:function(b,a){arguments.callee.base.call(this,b,a);this._config.textColor=b;this._scheduleUpdate()},_applyFont:function(b,a){arguments.callee.base.call(this,b,a);this._config.font=b;this._scheduleUpdate()},_applyBackgroundColor:function(a){this._rowContainer.setBackgroundColor(a)},_applyBackgroundImage:function(a){this._rowContainer.setBackgroundImage(a)},_applyWidth:function(b,a){arguments.callee.base.call(this,b,a);this._layoutX()},_applyHeight:function(b,a){arguments.callee.base.call(this,b,a);this._layoutY()},_applyBorder:function(b,a){arguments.callee.base.call(this,b,a);this._layoutX();this._layoutY()},_layoutX:function(){var a=this.getWidth()-this.getFrameWidth();if(this._header&&this._header.getDisplay()){this._header.setWidth(a)}if(this._vertScrollBar.getVisibility()){a-=this._vertScrollBar.getWidth();this._vertScrollBar.setLeft(a)}if(this._footer){this._footer.setWidth(a)}this._horzScrollBar.setWidth(a);this._rowContainer.setWidth(a);this._updateScrollWidth()},_layoutY:function(){var b=0;b+=this._header?this._headerHeight:0;var a=this.getHeight()-this.getFrameHeight();a-=this._header?this._headerHeight:0;a-=this._footer?this._footerHeight:0;a-=this._horzScrollBar.getVisibility()?this._horzScrollBar.getHeight():0;a=Math.max(0,a);if(this._header){this._header.setHeight(this._headerHeight)}if(this._footer){this._footer.setHeight(this._footerHeight);this._footer.setTop(b+a)}if(this._horzScrollBar.getVisibility()){this._horzScrollBar.setTop(b+a+(this._footer?this._footerHeight:0))}this._vertScrollBar.setHeight(a+(this._footer?this._footerHeight:0));this._vertScrollBar.setTop(b);this._rowContainer.setTop(b);this._rowContainer.setHeight(a);this._scheduleUpdate()},_getItemWidth:function(){var a=0;if(this._config.itemLeft.length>0){var c=Math.max(1,this._config.columnCount);for(var b=0;b<c;b++){a=Math.max(a,this._config.itemLeft[b]+this._config.itemWidth[b])}}return a},_getRowWidth:function(){var b=this._rowContainer.getWidth();var a=Math.max(this._getItemWidth(),b);return a},_inServerResponse:function(){return rwt.remote.EventUtil.getSuspended()},_isDragSource:function(){return this.hasEventListeners($[72])},_getTopItem:function(){if(this._topItem===null){this._topItem=this._rootItem.findItemByFlatIndex(this._topItemIndex)}return this._topItem},setEnableCellToolTip:function(a){if(a){this._cellToolTip=new rwt.widgets.base.GridCellToolTip(this);this._rowContainer.addEventListener($[28],this._onClientAreaMouseMove,this);this._rowContainer.setToolTip(this._cellToolTip)}else{this._rowContainer.removeEventListener($[28],this._onClientAreaMouseMove,this);this._rowContainer.setToolTip(null);this._cellToolTip.destroy();this._cellToolTip=null}},_onClientAreaMouseMove:function(a){if(this._cellToolTip!=null){var c=null;var b=-1;if(this._rowContainer.getHoverItem()){var d=rwt.remote.WidgetManager.getInstance();c=d.findIdByWidget(this._rowContainer.getHoverItem());b=rwt.widgets.util.GridUtil.getColumnByPageX(this,a.getPageX())}this._cellToolTip.setCell(c,b)}},setCellToolTipText:function(a){if(this._cellToolTip!=null){this._cellToolTip.setText(a)}}}}); |
| rwt.remote.HandlerRegistry.add("rwt.widgets.ScrollBar",{factory:function(b){var d=rwt.remote.HandlerUtil.createStyleMap(b.style);var c=rwt.remote.ObjectRegistry.getObject(b.parent);var a;if(d.HORIZONTAL){a=c.getHorizontalBar()}else{a=c.getVerticalBar()}rwt.remote.HandlerUtil.addDestroyableChild(c,a);a.setUserData($[103],c);return a},destructor:function(b){var a=b.getUserData($[103]);if(a){rwt.remote.HandlerUtil.removeDestroyableChild(a,b)}},properties:[$[100]],propertyHandler:{visibility:function(c,b){var a=c.getParent();if(c.isHorizontal()){a.setScrollBarsVisible(b,a.isVerticalBarVisible())}else{a.setScrollBarsVisible(a.isHorizontalBarVisible(),b)}}},listeners:rwt.remote.HandlerUtil.extendControlListeners([$[30]]),listenerHandler:{},methods:[]}); |
| rwt.remote.HandlerRegistry.add($[510],{factory:function(b){var d=rwt.remote.HandlerUtil.createStyleMap(b.style);var c={appearance:b.appearance,noScroll:d.NO_SCROLL,multiSelection:d.MULTI,check:d.CHECK,fullSelection:b.appearance==="table"?true:d.FULL_SELECTION,hideSelection:d.HIDE_SELECTION,checkBoxMetrics:b.checkBoxMetrics,selectionPadding:b.selectionPadding,indentionWidth:b.indentionWidth,splitContainer:b.splitContainer,markupEnabled:b.markupEnabled};var a=new rwt.widgets.Grid(c);rwt.remote.HandlerUtil.addStatesForStyles(a,b.style);a.setUserData($[23],true);rwt.remote.HandlerUtil.setParent(a,b.parent);return a},destructor:function(b){var c=b.getRootItem().getUncachedChildren();for(var a=0;a<c.length;a++){c[a].dispose()}rwt.remote.HandlerUtil.getControlDestructor()(b)},getDestroyableChildren:function(b){var a=b.getRootItem().getCachedChildren();return a.concat(rwt.remote.HandlerUtil.getDestroyableChildrenFinder()(b))},properties:rwt.remote.HandlerUtil.extendControlProperties(["itemCount","itemHeight","itemMetrics","columnCount",$[258],"fixedColumns",$[420],"headerVisible","footerHeight","footerVisible","linesVisible",$[427],"scrollLeft",$[60],"focusItem","sortDirection","sortColumn","alwaysHideSelection","enableCellToolTip","cellToolTipText"]),propertyHandler:rwt.remote.HandlerUtil.extendControlPropertyHandler({itemMetrics:function(c,b){for(var a=0;a<b.length;a++){c.setItemMetrics.apply(c,b[a])}},fixedColumns:function(b,a){rwt.widgets.util.GridUtil.setFixedColumns(b,a)},focusItem:function(b,a){rwt.remote.HandlerUtil.callWithTarget(a,function(c){b.setFocusItem(c)})},selection:function(d,c){d.deselectAll();var b=function(e){d.selectItem(e)};for(var a=0;a<c.length;a++){rwt.remote.HandlerUtil.callWithTarget(c[a],b)}},sortColumn:function(b,a){rwt.remote.HandlerUtil.callWithTarget(a,function(c){b.setSortColumn(c)})},scrollBarsVisible:function(b,a){b.setScrollBarsVisible(a[0],a[1])},cellToolTipText:function(c,b){var a=rwt.util.Encoding;var d=a.escapeText(b,false);d=a.replaceNewLines(d,$[97]);c.setCellToolTipText(d)}}),listeners:rwt.remote.HandlerUtil.extendControlListeners([$[30],$[111],$[159],$[167],"SetData"]),listenerHandler:rwt.remote.HandlerUtil.extendControlListenerHandler({scrollBarsSelection:function(b,a){b.setHasScrollBarsSelectionListener(a)}})}); |
| rwt.qx.Class.define($[460],{extend:rwt.qx.Target,construct:function(b,a,c){this._autoDispose=false;arguments.callee.base.call(this);this._parent=b;this._level=-1;this._height=null;this._children=[];this._indexCache={};this._visibleChildrenCount=0;this._expandedItems={};this._customHeightItems={};this._texts=c?["..."]:[];this._images=[];this._cached=!c;this._font=null;this._cellFonts=[];this._foreground=null;this._cellForegrounds=[];this._background=null;this._cellBackgrounds=[];this._checked=false;this._grayed=false;this._cellChecked=[];this._cellGrayed=[];this._cellCheckable=[];this._variant=null;if(this._parent!=null){this._level=this._parent.getLevel()+1;this._parent._add(this,a)}this._expanded=this.isRootItem();this.addEventListener($[146],this._onUpdate,this);this._escaped=false;if(this.isRootItem()){this._rootItem=this;this._height=16}else{this._rootItem=b.getRootItem()}},destruct:function(){if(this._parent!=null&&!this._parent.isDisposed()){this._parent._remove(this)}this._parent=null;this._height=null;this._children=null;this._indexCache=null;this._expandedItems=null;this._customHeightItems=null;this._texts=null;this._images=null;this._font=null;this._cellFonts=null;this._foreground=null;this._cellForegrounds=null;this._background=null;this._cellBackgrounds=null;this._cellChecked=null;this._cellGrayed=null;this._cellCheckable=null;this._rootItem=null},statics:{createItem:function(d,c){var b=this._getItem(d);var a;if(b.isChildCreated(c)&&!b.isChildCached(c)){a=b.getChild(c);a.markCached()}else{a=new rwt.widgets.GridItem(b,c,false)}return a},_getItem:function(b){var a;if(b instanceof rwt.widgets.Grid){a=b.getRootItem()}else{a=b}return a}},events:{update:$[11]},members:{setItemCount:function(a){var b=this._children.length>a?$[218]:"add";this._children.length=a;this._update(b)},clear:function(){this._cached=false;this._checked=false;this._grayed=false;this._texts=["..."];this._images=[];this._background=null;this._foreground=null;this._font=null;this._cellBackgrounds=[];this._cellForegrounds=[];this._cellFonts=[];this._variant=null},isCached:function(){return this._cached},markCached:function(){this._cached=true;this._texts=[]},setTexts:function(a){this._texts=a;this._escaped=false;this._update($[59])},getText:function(b,c){var a=this._texts[b];if((typeof a)===$[7]){if(c!==false&&!this._escaped){this._escapeTexts();this._escaped=true;a=this._texts[b]}}else{a=""}return a},hasText:function(a){return !!this._texts[a]},setFont:function(a){this._font=a;this._update($[59])},getCellFont:function(b){var a=this._cellFonts[b];return typeof a===$[7]&&a!==""?a:this._font},setCellFonts:function(a){this._cellFonts=a;this._update($[59])},setForeground:function(a){this._foreground=a;this._update($[59])},getCellForeground:function(b){var a=this._cellForegrounds[b];return typeof a===$[7]?a:this._foreground},setCellForegrounds:function(a){this._cellForegrounds=a;this._update($[59])},setBackground:function(a){this._background=a;this._update($[59])},getCellBackground:function(b){var a=this._cellBackgrounds[b];return typeof a===$[7]?a:null},getBackground:function(){return this._background},setCellBackgrounds:function(a){this._cellBackgrounds=a;this._update($[59])},setImages:function(a){this._images=a;this._update($[59])},getImage:function(b){var a=this._images[b];return typeof a===$[7]?a:null},setChecked:function(a){this._checked=a;this._update($[59])},isChecked:function(){return this._checked},setGrayed:function(a){this._grayed=a;this._update($[59])},isGrayed:function(){return this._grayed},setCellChecked:function(a){this._cellChecked=a;this._update($[59])},toggleCellChecked:function(a){this._cellChecked[a]=!this._cellChecked[a];this._update($[59])},getCellChecked:function(){return this._cellChecked},isCellChecked:function(a){return this._cellChecked[a]},setCellGrayed:function(a){this._cellGrayed=a;this._update($[59])},isCellGrayed:function(a){return this._cellGrayed[a]},setCellCheckable:function(a){this._cellCheckable=a},isCellCheckable:function(a){return this._cellCheckable[a]===undefined?true:this._cellCheckable[a]},setVariant:function(a){this._variant=a},getVariant:function(){return this._variant},setDefaultHeight:function(a){if(!this.isRootItem()){throw new Error("Can only set default item height on root item")}this._height=a},setHeight:function(a){if(this.isRootItem()){throw new Error("Can not set item height on root item")}this._height=a;if(a!==null){this._parent._addToCustomHeightItems(this)}else{this._removeFromCustomHeightItems(this)}this._update($[17])},getDefaultHeight:function(){var a;if(this.isRootItem()){a=this._height}else{a=this.getRootItem().getDefaultHeight()}return a},isRootItem:function(){return this._level<0},getRootItem:function(){return this._rootItem},getLevel:function(){return this._level},getParent:function(){return this._parent},setExpanded:function(a){if(this._expanded!=a){this._expanded=a;this._update(a?$[82]:$[230]);if(a){this._parent._addToExpandedItems(this)}else{this._parent._removeFromExpandedItems(this)}}},isExpanded:function(){return this._expanded},isDisplayable:function(){var a=false;if(this.isRootItem()||this._parent.isRootItem()){a=true}else{a=this._parent.isExpanded()&&this._parent.isDisplayable()}return a},hasChildren:function(){return this._children.length>0},getChildrenLength:function(){return this._children.length},isChildCreated:function(a){return this._children[a]!==undefined},isChildCached:function(a){return this._children[a].isCached()},getCachedChildren:function(){var a=[];for(var b=0;b<this._children.length;b++){if(this.isChildCreated(b)&&this.isChildCached(b)){a.push(this._children[b])}}return a},getUncachedChildren:function(){var a=[];for(var b=0;b<this._children.length;b++){if(this.isChildCreated(b)&&!this.isChildCached(b)){a.push(this._children[b])}}return a},getOffsetHeight:function(){var a=this.getOwnHeight();if(this.isExpanded()&&this.hasChildren()){var b=this.getLastChild();a+=this._getChildOffset(b);a+=b.getOffsetHeight()}return a},hasCustomHeight:function(){return this._height!==null},getOwnHeight:function(){var a=0;if(!this.isRootItem()){a=this._height!==null?this._height:this.getDefaultHeight()}return a},getVisibleChildrenCount:function(){if(this._visibleChildrenCount==null){this._computeVisibleChildrenCount()}return this._visibleChildrenCount},getChild:function(b){var a=this._children[b];if(!a){if(b>=0&&b<this._children.length){a=new rwt.widgets.GridItem(this,b,true)}}return a},getLastChild:function(){return this.getChild(this._children.length-1)},indexOf:function(a){var b=a.toHashCode();if(this._indexCache[b]===undefined){this._indexCache[b]=this._children.indexOf(a)}return this._indexCache[b]},isChildOf:function(b){var a=this._parent===b;if(!a&&!this._parent.isRootItem()){a=this._parent.isChildOf(b)}return a},findItemByOffset:function(m){var b=this.getDefaultHeight();var f=this._getDifferingHeightIndicies();if(f[0]===0){f.shift()}var g=0;var e=0;var n=null;var c=false;if(m<0||this.getChildrenLength()===0){c=true}while(!c){var i=this.getChild(e);var l=i.getOffsetHeight();var d=f.shift();var k=g+l+(d-e-1)*b;if(m<g+l){if(m<g+i.getOwnHeight()){n=i}else{var j=m-g-i.getOwnHeight();n=i.findItemByOffset(j)}c=true}else{if(d===undefined||k>m){var h=m-g-l;var a=e+1+Math.floor(h/b);n=this.getChild(a);c=true}else{e=d;g=k}}}return n},findItemByFlatIndex:function(c){var b=this._getExpandedIndicies();var h=c;var a=null;var g=false;while(!g&&h>=0){var e=b.shift();if(e===undefined||e>=h){a=this.getChild(h);if(a){this._indexCache[a.toHashCode()]=h}g=true}else{var d=this.getChild(e).getVisibleChildrenCount();var f=h-e;if(f<=d){a=this.getChild(e).findItemByFlatIndex(f-1);g=true;if(a==null){throw new Error("getItemByFlatIndex failed")}}else{h-=d}}}return a},getOffset:function(){var a=0;if(!this._parent.isRootItem()){a+=this._parent.getOffset()+this._parent.getOwnHeight()}a+=this._parent._getChildOffset(this);return a},_getChildOffset:function(c){var e=this.indexOf(c);var a=e*this.getDefaultHeight();var d=this._getDifferingHeightIndicies();while(d.length>0&&e>d[0]){var b=d.shift();a-=this.getDefaultHeight();a+=this._children[b].getOffsetHeight()}return a},getFlatIndex:function(){var d=this._parent.indexOf(this);var a=d;var b=this._parent._getExpandedIndicies();while(b.length>0&&d>b[0]){var c=b.shift();a+=this._parent._children[c].getVisibleChildrenCount()}if(!this._parent.isRootItem()){a+=this._parent.getFlatIndex()+1}return a},hasPreviousSibling:function(){var a=this._parent.indexOf(this)-1;return a>=0},hasNextSibling:function(){var a=this._parent.indexOf(this)+1;return a<this._parent.getChildrenLength()},getPreviousSibling:function(){var a=this._parent.indexOf(this)-1;return this._parent.getChild(a)},getNextSibling:function(){var a=this._parent.indexOf(this)+1;var b=this._parent.getChild(a);this._parent._indexCache[b.toHashCode()]=a;return b},getNextItem:function(b){var a=null;if(!b&&this.hasChildren()&&this.isExpanded()){a=this.getChild(0)}else{if(this.hasNextSibling()){a=this.getNextSibling()}else{if(this.getLevel()>0){a=this._parent.getNextItem(true)}}}return a},getPreviousItem:function(){var a=null;if(this.hasPreviousSibling()){a=this.getPreviousSibling();while(a.hasChildren()&&a.isExpanded()){a=a.getLastChild()}}else{if(this.getLevel()>0){a=this._parent}}return a},_add:function(b,a){if(this._children[a]){this._children.splice(a,0,b);this._children.pop();this._update("add",b)}else{this._children[a]=b}},_remove:function(b){if(b.isExpanded()){delete this._expandedItems[b.toHashCode()]}if(b.hasCustomHeight()){delete this._customHeightItems[b.toHashCode()]}var a=this._children.indexOf(b);this._children.splice(a,1);this._children.push(undefined);this._update($[218],b)},_addToExpandedItems:function(a){this._expandedItems[a.toHashCode()]=a},_removeFromExpandedItems:function(a){delete this._expandedItems[a.toHashCode()]},_addToCustomHeightItems:function(a){this._customHeightItems[a.toHashCode()]=a},_removeFromCustomHeightItems:function(a){delete this._customHeightItems[a.toHashCode()]},getEnabled:function(){return true},_update:function(c,b){var a={msg:c,related:b,target:this};this.dispatchSimpleEvent($[146],a,true);delete a.target;delete a.related;delete a.msg},_onUpdate:function(a){if(a.msg!==$[59]){this._visibleChildrenCount=null;this._indexCache={}}},_escapeTexts:function(){var a=rwt.util.Encoding;for(var b=0;b<this._texts.length;b++){var c=this._texts[b];if(c){c=a.escapeText(c,false);c=a.replaceWhiteSpaces(c)}this._texts[b]=c}},_computeVisibleChildrenCount:function(){var a=0;if(this.isExpanded()||this.isRootItem()){a=this._children.length;for(var b=0;b<this._children.length;b++){if(this.isChildCreated(b)){a+=this.getChild(b).getVisibleChildrenCount()}}}this._visibleChildrenCount=a},_getDifferingHeightIndicies:function(){var a=[];for(var b in this._expandedItems){a.push(this.indexOf(this._expandedItems[b]))}for(var b in this._customHeightItems){if(!this._expandedItems[b]){a.push(this.indexOf(this._customHeightItems[b]))}}return a.sort(function(d,c){return d-c})},_getExpandedIndicies:function(){var a=[];for(var b in this._expandedItems){a.push(this.indexOf(this._expandedItems[b]))}return a.sort(function(d,c){return d-c})},toString:function(){return"TreeItem "+this._texts.join()}}}); |
| rwt.remote.HandlerRegistry.add($[460],{factory:function(b){var a;rwt.remote.HandlerUtil.callWithTarget(b.parent,function(c){a=rwt.widgets.GridItem.createItem(c,b.index)});return a},destructor:function(b){var c=b.getUncachedChildren();for(var a=0;a<c.length;a++){c[a].dispose()}b.dispose()},getDestroyableChildren:function(a){return a.getCachedChildren()},properties:["itemCount","texts","images",$[91],$[322],"font","cellBackgrounds","cellForegrounds","cellFonts",$[82],$[178],$[172],$[461],"cellGrayed","cellCheckable",$[86],$[17]],propertyHandler:{images:function(d,c){var a=[];for(var b=0;b<c.length;b++){if(c[b]===null){a[b]=null}else{a[b]=c[b][0]}}d.setImages(a)},background:function(b,a){if(a===null){b.setBackground(null)}else{b.setBackground(rwt.util.Colors.rgbToRgbString(a))}},foreground:function(b,a){if(a===null){b.setForeground(null)}else{b.setForeground(rwt.util.Colors.rgbToRgbString(a))}},font:function(c,b){if(b===null){c.setFont(null)}else{var a=rwt.html.Font.fromArray(b);c.setFont(a)}},cellBackgrounds:function(d,c){var b=[];for(var a=0;a<c.length;a++){if(c[a]===null){b[a]=null}else{b[a]=rwt.util.Colors.rgbToRgbString(c[a])}}d.setCellBackgrounds(b)},cellForegrounds:function(d,c){var a=[];for(var b=0;b<c.length;b++){if(c[b]===null){a[b]=null}else{a[b]=rwt.util.Colors.rgbToRgbString(c[b])}}d.setCellForegrounds(a)},cellFonts:function(d,c){var e=[];for(var b=0;b<c.length;b++){if(c[b]===null){e[b]=""}else{var a=rwt.html.Font.fromArray(c[b]);e[b]=a.toCss()}}d.setCellFonts(e)},customVariant:function(b,a){b.setVariant(a)}}}); |
| rwt.qx.Class.define("rwt.widgets.util.GridDNDFeedback",{extend:rwt.qx.Object,construct:function(a){arguments.callee.base.call(this);this._tree=a;this._feedback=null;this._currentRow=null;this._insertIndicator=null;this._expandTimer=null;this._scrollTimer=null},destruct:function(){this._renderFeedback(this._currentRow,false);if(this._expandTimer!=null){this._expandTimer.dispose();this._expandTimer=null}if(this._scrollTimer!=null){this._scrollTimer.dispose();this._scrollTimer=null}this._tree=null;this._feedback=null;this._insertIndicator=null;this._currentRow=null},members:{setFeedback:function(a){this._renderFeedback(this._currentRow,false);this._feedback=a;this._renderFeedback(this._currentRow,true)},renderFeedback:function(a){this._renderFeedback(this._currentRow,false);this._renderFeedback(a,true);this._currentRow=a},isFeedbackNode:function(b){var a=false;if(this._insertIndicator!=null&&this._insertIndicator==b){a=true}return a},_renderFeedback:function(b,a){if(this._feedback!=null&&b!=null){if(this._feedback.FEEDBACK_SELECT){this._renderFeedbackSelect(b,a)}else{if(this._feedback.FEEDBACK_INSERT_BEFORE){this._renderFeedbackBefore(b,a)}else{if(this._feedback.FEEDBACK_INSERT_AFTER){this._renderFeedbackAfter(b,a)}}}if(this._feedback.FEEDBACK_EXPAND){this._renderFeedbackExpand(b,a)}if(this._feedback.FEEDBACK_SCROLL){this._renderFeedbackScroll(b,a)}}},_renderFeedbackSelect:function(c,b){c.setState($[356],b);var a=this._tree._rowContainer.findItemByRow(c);this._tree._rowContainer.renderItem(a)},_renderFeedbackBefore:function(c,b){if(b){var a=this._getRowLocation(c);a.y--;this._showInsertIndicator(a.x,a.y)}else{this._hideInsertIndicator()}},_renderFeedbackAfter:function(d,c){if(c){var b=this._getRowLocation(d);var a=d.getHeightValue();b.y=b.y+(a-1);this._showInsertIndicator(b.x,b.y)}else{this._hideInsertIndicator()}},_renderFeedbackExpand:function(c,b){var a=this._tree._rowContainer.findItemByRow(c);if(a!=null&&a.hasChildren()){if(b&&!a.isExpanded()){this._startExpandTimer()}else{this._stopExpandTimer()}}},_renderFeedbackScroll:function(b,a){if(a){this._startScrollTimer()}else{this._stopScrollTimer()}},_getRowLocation:function(d){var a={x:0,y:0};var b=d.getElement();var c=this._tree._getTargetNode();while(b!=c){a.x+=parseInt(b.style.left||0,10);a.y+=parseInt(b.style.top||0,10);b=b.parentNode}return a},_showInsertIndicator:function(a,e){if(this._insertIndicator==null){var d=document.createElement("div");d.style.position=$[16];d.style.borderTopStyle=$[70];d.style.borderTopColor="black";d.style.borderTopWidth="2px";d.style.zIndex=100000;d.style.height="2px";this._insertIndicator=d}var b=this._tree.getWidthValue()-(a+6);this._insertIndicator.style.left=a+"px";this._insertIndicator.style.top=e+"px";this._insertIndicator.style.width=b+"px";var c=this._tree._getTargetNode();c.appendChild(this._insertIndicator)},_hideInsertIndicator:function(){var a=this._tree._getTargetNode();a.removeChild(this._insertIndicator)},_startExpandTimer:function(){if(this._expandTimer==null){this._expandTimer=new rwt.client.Timer(750);this._expandTimer.addEventListener($[27],this._onExpandTimer,this)}this._expandTimer.setEnabled(true)},_stopExpandTimer:function(){if(this._expandTimer!=null){this._expandTimer.stop()}},_onExpandTimer:function(b){this._stopExpandTimer();var a=this._tree._rowContainer.findItemByRow(this._currentRow);a.setExpanded(true)},_startScrollTimer:function(){if(this._scrollTimer==null){this._scrollTimer=new rwt.client.Timer(250);this._scrollTimer.addEventListener($[27],this._onScrollTimer,this)}this._scrollTimer.setEnabled(true)},_stopScrollTimer:function(){if(this._scrollTimer!=null){this._scrollTimer.stop()}},_getScrollDirection:function(b){var a=0;var c=this._tree._rowContainer.indexOf(b);if(c===0){a=-1}else{if(c>=this._tree._rowContainer.getChildrenLength()-2){a=1}}return a},_onScrollTimer:function(b){this._stopScrollTimer();var d=this._getScrollDirection(this._currentRow);if(d!==0){var h=this._tree._rowContainer.findItemByRow(this._currentRow);var f=h.getFlatIndex();var e=d>0?h.getNextItem():h.getPreviousItem();if(e!=null){var c=this._tree._topItemIndex+d;this._tree.setTopItemIndex(c);var i=this._tree._rowContainer._findRowByItem(e);var g=this._currentRow;var a=function(){this._targetUpdateCheck(g,i)};rwt.client.Timer.once(a,this,1)}}},_targetUpdateCheck:function(a,b){if(!this.isDisposed()){if(b!=this._currentRow&&a==this._currentRow){var c=rwt.remote.DNDSupport.getInstance();c.setCurrentTargetWidget(b)}}}}}); |
| rwt.qx.Class.define("rwt.widgets.base.GridCellToolTip",{extend:rwt.widgets.base.ToolTip,include:rwt.animation.VisibilityAnimationMixin,construct:function(a){arguments.callee.base.call(this);this._grid=a;this._itemId=null;this._columnIndex=-1},members:{_onshowtimer:function(a){this._stopShowTimer();this._requestCellToolTipText()},setText:function(a){if(this._isValidToolTip(a)){this.getAtom().setLabel(a);this.setLeft(rwt.event.MouseEvent.getPageX()+this.getMousePointerOffsetX());this.setTop(rwt.event.MouseEvent.getPageY()+this.getMousePointerOffsetY());this.show()}},setCell:function(b,a){if(this._itemId!=b||this._columnIndex!=a){this._itemId=b;this._columnIndex=a;this.hide();if(this._isValidCell()){this._startShowTimer()}else{this._stopShowTimer()}}},_requestCellToolTipText:function(){if(this._isValidCell()){var a=rwt.remote.Server.getInstance();this._requestedCell=this._itemId+","+this._columnIndex;a.getRemoteObject(this._grid).call("renderToolTipText",{item:this._itemId,column:this._columnIndex})}},_isValidCell:function(){return this._itemId!=null&&this._columnIndex!=-1},_isValidToolTip:function(b){var a=this._itemId+","+this._columnIndex;return b&&b!==""&&a===this._requestedCell}}}); |
| rwt.qx.Class.define("rwt.widgets.base.GridHeader",{extend:rwt.widgets.base.Parent,construct:function(b){arguments.callee.base.call(this);this.setOverflow($[9]);this.setZIndex(2000);this._fixedColumns=b.splitContainer;this._scrollWidth=0;this._scrollLeft=0;this._footer=b.footer?true:false;this._baseAppearance=b.appearance;this._dummyColumn=this._createDummyColumn();this._currentDragColumn=null;this._feedbackLabel=null;this._labelToColumnMap={};this._columnToLabelMap={};var a=function(c){c.stopPropagation()};this.addEventListener($[72],a)},destruct:function(){this._dummyColumn=null},events:{columnLayoutChanged:$[11]},members:{setScrollLeft:function(c){this._scrollLeft=c;if(this._fixedColumns&&!rwt.widgets.base.Widget._inFlushGlobalQueues){for(var a=0;a<this._children.length;a++){var b=this._getColumnByLabel(this._children[a]);if(b&&b.isFixed()){this._renderLabelLeft(this._children[a],b)}}if(!rwt.remote.EventUtil.getSuspended()){rwt.widgets.base.Widget.flushGlobalQueues()}}if(this.isSeeable()){arguments.callee.base.call(this,c)}},setScrollWidth:function(a){this._scrollWidth=a;if(this.getVisibility()){this._renderDummyColumn()}},_onColumnDispose:function(a){this._getLabelByColumn(a.target).destroy()},renderColumns:function(c){for(var b in c){var d=c[b];var a=this._getLabelByColumn(d);if(a){this._renderLabel(a,d)}}this._renderDummyColumn()},_renderLabel:function(a,b){this._renderLabelLeft(a,b);a.setWidth(b.getWidth());a.setHoverEffect(b.getMoveable());a.setVisibility(b.getVisibility());if(this._footer){a.setText(b.getFooterText());a.setImage(b.getFooterImage());if(b.getFooterFont()!==null){a.setFont(b.getFooterFont())}else{a.resetFont()}}else{if(b.getFont()!==null){a.setFont(b.getFont())}else{a.resetFont()}a.setText(b.getText());a.setImage(b.getImage());a.setToolTip(b.getToolTip());a.setSortIndicator(b.getSortDirection());a.applyObjectId(b.getObjectId());if(b.isGroup()){a.setChevron(b.isExpanded()?$[82]:$[230])}this._renderLabelY(a,b)}a.setCustomVariant(b.getCustomVariant());a.setZIndex(b.isFixed()?10000000:1);a.setHorizontalChildrenAlign(b.getAlignment())},_renderLabelY:function(a,c){if(c.isGroup()){a.setTop(0);a.setHeight(c.getHeight())}else{if(c.getGroup()!=null){var b=c.getGroup().getHeight();a.setTop(b);a.setHeight(this.getHeight()-b)}else{a.setTop(0);a.setHeight("100%")}}},_renderLabelLeft:function(a,b){var c=b.isFixed()?this._scrollLeft:0;a.setLeft(b.getLeft()+c)},_onDummyRendered:function(){this.setScrollLeft(this._scrollLeft)},_fireUpdateEvent:function(a){this.createDispatchEvent("columnLayoutChanged")},_renderDummyColumn:function(){var b=this._getDummyColumnLeft();var a=Math.max(this._scrollWidth,this.getWidth());var c=Math.max(0,a-b);this._dummyColumn.setLeft(b);this._dummyColumn.setWidth(c)},_getDummyColumnLeft:function(){var c=this._labelToColumnMap;var a=0;for(var b in c){if(c[b].getVisibility()){var d=c[b].getLeft()+c[b].getWidth();a=Math.max(a,d)}}return a},_onLabelSelected:function(b){var a=this._getColumnByLabel(b.target);a.handleSelectionEvent(b)},_onLabelMoveStart:function(b){var a=this._getColumnByLabel(b.target);return !this._footer&&a.getMoveable()},_onLabelMoveEnd:function(b){var a=this._getColumnByLabel(b.target);a.setLeft(b.position)},_onShowDragFeedback:function(b){var a=this._getColumnByLabel(b.target);var c=this._getDragFeedback(a);c.setLeft(b.position)},_onHideDragFeedback:function(c){var a=c.target;var b=this._getColumnByLabel(a);var d=this._getDragFeedback(b);var e=a.getLeft();if(c.snap){rwt.animation.AnimationUtil.snapTo(d,250,e,a.getTop(),true)}else{d.setDisplay(false)}this._currentDragColumn=null},_onLabelResizeStart:function(b){var a=this._getColumnByLabel(b.target);return !this._footer&&a.getResizeable()},_onLabelResizeEnd:function(b){var a=this._getColumnByLabel(b.target);a.setWidth(b.width)},_getColumnByLabel:function(a){return this._labelToColumnMap[a.toHashCode()]},_getLabelByColumn:function(b){var a=this._columnToLabelMap[b.toHashCode()];if(!a){if(b.getVisibility()){a=this._createLabel(b)}else{a=null}}return a},_getDragFeedback:function(a){if(this._feedbackLabel===null){this._feedbackLabel=this._createFeedbackColumn()}if(this._currentDragColumn!==a){this._renderLabelY(this._feedbackLabel,a);this._feedbackLabel.setWidth(a.getWidth());this._feedbackLabel.setCustomVariant(a.getCustomVariant());this._feedbackLabel.setText(a.getText());this._feedbackLabel.setImage(a.getImage());this._feedbackLabel.setSortIndicator(a.getSortDirection());this._feedbackLabel.setHorizontalChildrenAlign(a.getAlignment());this._feedbackLabel.setDisplay(true);this._feedbackLabel.dispatchSimpleEvent($[360]);this._currentDragColumn=a}return this._feedbackLabel},_createLabel:function(b){var a=new rwt.widgets.base.GridColumnLabel(this._baseAppearance);if(this._footer){a.addState("footer")}else{if(b.getResizeable()){a.setResizeCursor("ew-resize")}}if(b.isGroup()){a.addState("group")}a.setTop(0);a.setHeight("100%");this.add(a);this._labelToColumnMap[a.toHashCode()]=b;this._columnToLabelMap[b.toHashCode()]=a;a.addEventListener($[22],this._onLabelSelected,this);a.addEventListener("moveStart",this._onLabelMoveStart,this);a.addEventListener($[409],this._onShowDragFeedback,this);a.addEventListener($[522],this._onHideDragFeedback,this);a.addEventListener("moveEnd",this._onLabelMoveEnd,this);a.addEventListener($[472],this._onLabelResizeStart,this);a.addEventListener("resizeEnd",this._onLabelResizeEnd,this);b.addEventListener($[196],this._onColumnDispose,this);return a},_createDummyColumn:function(){var a=new rwt.widgets.base.GridColumnLabel(this._baseAppearance);if(this._footer){a.addState("footer")}a.setTop(0);a.setHeight("100%");a.addState("dummy");a.addEventListener("flush",this._onDummyRendered,this);a.addEventListener($[36],this._onDummyRendered,this);a.setEnabled(false);this.add(a);return a},_createFeedbackColumn:function(){var a=new rwt.widgets.base.GridColumnLabel(this._baseAppearance);a.addState("moving");a.setTop(0);a.setHeight("100%");a.setEnabled(false);a.setZIndex(100000000);a.addState($[3]);this.add(a);return a}}}); |
| rwt.qx.Class.define($[531],{extend:rwt.qx.Target,construct:function(a,b){arguments.callee.base.call(this);this._grid=a;this._isGroup=b?true:false;this._index=0;this._resizable=b?false:true;this._moveable=false;this._alignment="left";this._group=null;this._left=0;this._height=0;this._visibility=true;this._expanded=true;this._hasSelectionListener=false;this._hasExpandListener=false;this._hasCollapseListener=false;this._width=0;this._toolTip=null;this._customVariant=null;this._objectId=null;this._text="";this._font=null;this._image=null;this._footerText="";this._footerFont=null;this._footerImage=null;this._sortDirection=null;this._check=false;this._grid.addColumn(this)},destruct:function(){this._grid.removeColumn(this);this.dispatchSimpleEvent($[196],{target:this})},members:{setLeft:function(a){if(rwt.remote.EventUtil.getSuspended()){this._left=a;this._update()}else{this._sendMove(a)}},getLeft:function(){return this._left},setWidth:function(a){if(rwt.remote.EventUtil.getSuspended()){this._width=a;this._update()}else{this._sendResize(a)}},getWidth:function(){return this._width},setHeight:function(a){this._height=a;this._update()},getHeight:function(){return this._height},setVisibility:function(a){this._visibility=a;this._update()},getVisibility:function(){return this._visibility},setExpanded:function(a){this._expanded=a;this._update()},isExpanded:function(){return this._expanded},setGroup:function(a){this._group=a},getGroup:function(){return this._group},setToolTip:function(a){this._toolTip=a;this._update()},getToolTip:function(){return this._toolTip},setCustomVariant:function(a){this._customVariant=a;this._update()},getCustomVariant:function(a){return this._customVariant},setText:function(a){this._text=a;this._update()},getText:function(a){return this._text},setImage:function(a){this._image=a;this._update()},getImage:function(){return this._image},setFont:function(a){this._font=a?rwt.html.Font.fromArray(a):null;this._update()},getFont:function(){return this._font},setFooterText:function(a){this._footerText=a;this._update()},getFooterText:function(a){return this._footerText},setFooterImage:function(a){this._footerImage=a;this._update()},getFooterImage:function(){return this._footerImage},setFooterFont:function(b){var a=rwt.remote.WidgetManager.getInstance();this._footerFont=b?rwt.html.Font.fromArray(b):null;this._update()},getFooterFont:function(){return this._footerFont},setIndex:function(a){this._index=a;this._update()},getIndex:function(){return this._index},setSortDirection:function(a){this._sortDirection=a;this._update()},getSortDirection:function(a){return this._sortDirection},setResizable:function(a){this._resizable=a},getResizeable:function(){return this._resizable},setMoveable:function(a){this._moveable=a},getMoveable:function(){return this._moveable},setCheck:function(a){this._grid.setCellCheck(this._index,a);this._check=a},getCheck:function(){return this._check},setHasSelectionListener:function(a){this._hasSelectionListener=a},getHasSelectionListener:function(){return this._hasSelectionListener},setHasExpandListener:function(a){this._hasExpandListener=a},getHasExpandListener:function(){return this._hasExpandListener},setHasCollapseListener:function(a){this._hasCollapseListener=a},getHasCollapseListener:function(){return this._hasCollapseListener},handleSelectionEvent:function(c){if(!rwt.remote.EventUtil.getSuspended()){var a=this._isGroup&&c.chevron;if(this._hasSelectionListener||a){if(a){var b=rwt.remote.Server.getInstance().getRemoteObject(this);b.set($[82],!this._expanded);if((this._hasCollapseListener&&this._expanded)||(this._hasExpandListener&&!this._expanded)){b.notify(this._expanded?$[167]:$[159])}}else{rwt.remote.EventUtil.notifySelected(this)}}}},applyObjectId:function(a){this._objectId=a;this._update()},getObjectId:function(){return this._objectId},setAlignment:function(a){this._grid.setAlignment(this._index,a);this._alignment=a;this._update()},getAlignment:function(){return this._alignment},setFixed:function(a){this._fixed=a;this._update()},isFixed:function(){return this._fixed},isGroup:function(){return this._isGroup},_update:function(){this.dispatchSimpleEvent($[146])},_sendResize:function(a){if(!rwt.remote.EventUtil.getSuspended()){var b=rwt.remote.Server.getInstance().getRemoteObject(this);b.call("resize",{width:a})}},_sendMove:function(a){if(!rwt.remote.EventUtil.getSuspended()){var b=rwt.remote.Server.getInstance().getRemoteObject(this);b.call("move",{left:a})}}}}); |
| rwt.qx.Class.define("rwt.widgets.base.GridColumnLabel",{extend:rwt.widgets.base.MultiCellWidget,construct:function(a){arguments.callee.base.call(this,[$[15],$[67],$[15]]);this._resizeStartX=0;this._inResize=false;this._wasResizeOrMoveEvent=false;this._feedbackVisible=false;this._inMove=false;this._hoverEffect=false;this._offsetX=0;this._initialLeft=0;this._chevron=null;this.setAppearance(a+"-column");this._resizeCursor=null;this.setHorizontalChildrenAlign("left");this.setOverflow($[9]);this.addEventListener($[224],this._onElementOver,this);this.addEventListener("elementOut",this._onElementOut,this);this.addEventListener($[3],this._onMouseOver,this);this.addEventListener($[28],this._onMouseMove,this);this.addEventListener($[6],this._onMouseOut,this);this.addEventListener($[1],this._onMouseDown,this);this.addEventListener($[5],this._onMouseUp,this);this.addEventListener($[13],this._onClick,this)},members:{setLeft:function(a){arguments.callee.base.call(this,a);this._hideDragFeedback(true)},setText:function(b){var a=rwt.util.Encoding;var c=a.escapeText(b,false);c=a.replaceNewLines(c,$[97]);this.setCellContent(1,c)},setImage:function(a){if(a===null){this.setCellContent(0,null);this.setCellDimension(0,0,0)}else{this.setCellContent(0,a[0]);this.setCellDimension(0,a[1],a[2])}},setHoverEffect:function(a){this._hoverEffect=a},setResizeCursor:function(a){this._resizeCursor=a},setSortIndicator:function(c){if(c){var b=rwt.theme.AppearanceManager.getInstance();var a={};a[c]=true;var e=b.styleFrom(this.getAppearance()+"-sort-indicator",a);var d=e.backgroundImage;this.setCellContent(2,d[0]);this.setCellDimension(2,d[1],d[2])}else{this.setCellContent(2,null);this.setCellDimension(2,0,0)}},setChevron:function(a){this._chevron=a;this._updateChevronImage(false)},_onElementOver:function(a){if(this._chevron&&a.getDomTarget()===this.getCellNode(2)){this._updateChevronImage(true)}},_onElementOut:function(a){if(this._chevron&&a.getDomTarget()===this.getCellNode(2)){this._updateChevronImage(false)}},_updateChevronImage:function(c){if(this._chevron){this.setFlexibleCell(1);var b=rwt.theme.AppearanceManager.getInstance();var a={};a[this._chevron]=true;if(c){a[$[3]]=true}var e=b.styleFrom(this.getAppearance()+"-chevron",a);var d=e.backgroundImage;this.setCellContent(2,d[0]);this.setCellDimension(2,d[1],d[2])}else{this.setCellContent(2,null);this.setCellDimension(2,0,0)}},_limitCellWidth:function(a,d){var c=this.getInnerWidth();var b=this._getContentWidth($[303]);var e=Math.max(0,c-b);return e},cellIsDisplayable:function(b){var a=arguments.callee.base.call(this,b);return a||b==2},_onMouseOver:function(a){if(this._hoverEffect&&!this._inMove&&!this._inResize){this.addState($[3])}},_onMouseDown:function(b){if(!this._inMove&&!this._inResize&&b.getButton()==="left"){if(this._isResizeLocation(b.getPageX())&&this._allowResize()){this._inResize=true;var a=this.getLeft()+this.getWidth();this.dispatchSimpleEvent($[340],{position:a},true);this._resizeStartX=b.getPageX();this.setCapture(true);b.stopPropagation();b.preventDefault();rwt.widgets.util.WidgetUtil._fakeMouseEvent(this,$[6])}else{if(this._allowMove()){this._inMove=true;this.setCapture(true);this._offsetX=b.getPageX()-this.getLeft();this._initialLeft=b.getPageX();b.stopPropagation();b.preventDefault();rwt.widgets.util.WidgetUtil._fakeMouseEvent(this,$[6])}}}},_onMouseMove:function(b){if(this._inResize){var a=this.getLeft()+this._getResizeWidth(b.getPageX());if(a<this.getLeft()+5){a=this.getLeft()+5}this.dispatchSimpleEvent($[340],{position:a},true)}else{if(this._inMove){this.addState($[3]);var c=b.getPageX()-this._offsetX;this.dispatchSimpleEvent($[409],{target:this,position:c});this._feedbackVisible=true}else{if(this._isResizeLocation(b.getPageX())){this.getTopLevelWidget().setGlobalCursor(this._resizeCursor)}else{this.getTopLevelWidget().setGlobalCursor(null)}}}b.stopPropagation();b.preventDefault()},_onMouseUp:function(a){var b=rwt.widgets.util.WidgetUtil;if(this._inResize){this.dispatchSimpleEvent($[394],null,true);this.getTopLevelWidget().setGlobalCursor(null);this.setCapture(false);var c=this._getResizeWidth(a.getPageX());this.dispatchSimpleEvent("resizeEnd",{target:this,width:c});this._inResize=false;this._wasResizeOrMoveEvent=true;a.stopPropagation();a.preventDefault();b._fakeMouseEvent(a.getTarget(),$[3])}else{if(this._inMove){this._inMove=false;this.setCapture(false);this.removeState($[3]);if(Math.abs(a.getPageX()-this._initialLeft)>1){this._wasResizeOrMoveEvent=true;this.dispatchSimpleEvent("moveEnd",{target:this,position:a.getPageX()-this._offsetX})}else{this._hideDragFeedback(false)}a.stopPropagation();a.preventDefault();b._fakeMouseEvent(a.getTarget(),$[3])}}},_onClick:function(a){if(!this._wasResizeOrMoveEvent){var b={target:this};if(this._chevron){b.chevron=a.getDomTarget()===this.getCellNode(2);if(b.chevron){this.setChevron("loading")}}this.dispatchSimpleEvent($[22],b)}this._wasResizeOrMoveEvent=false},_onMouseOut:function(a){if(!this._inMove){this.removeState($[3])}if(!this._inResize){this.getTopLevelWidget().setGlobalCursor(null);a.stopPropagation();a.preventDefault()}},_allowResize:function(){return this.dispatchSimpleEvent($[472],{target:this})},_allowMove:function(){return this.dispatchSimpleEvent("moveStart",{target:this})},_hideDragFeedback:function(a){if(this._feedbackVisible){this.dispatchSimpleEvent($[522],{target:this,snap:a});this._feedbackVisible=false}},_isResizeLocation:function(b){var a=false;var c=rwt.html.Location.getLeft(this.getElement())+this.getWidth();if(b>=c-5&&b<=c){a=true}return a},_getResizeWidth:function(a){var b=this._resizeStartX-a;return this.getWidth()-b}}}); |
| rwt.remote.HandlerRegistry.add($[531],{factory:function(b){var a;rwt.remote.HandlerUtil.callWithTarget(b.parent,function(c){a=new rwt.widgets.GridColumn(c);rwt.remote.HandlerUtil.addDestroyableChild(c,a)});return a},destructor:function(a){rwt.remote.HandlerUtil.removeDestroyableChild(a._grid,a);a.dispose()},properties:["index","left",$[25],"text",$[15],"font","footerText","footerImage","footerFont",$[113],"resizable","moveable",$[362],$[138],"group",$[86],$[100],$[108]],propertyHandler:{toolTip:rwt.remote.HandlerUtil.getControlPropertyHandler($[113]),group:function(b,a){rwt.remote.HandlerUtil.callWithTarget(a,function(c){b.setGroup(c)})}},listeners:[$[30]]}); |
| rwt.remote.HandlerRegistry.add("rwt.widgets.GridColumnGroup",{factory:function(b){var a;rwt.remote.HandlerUtil.callWithTarget(b.parent,function(c){a=new rwt.widgets.GridColumn(c,true);rwt.remote.HandlerUtil.addDestroyableChild(c,a)});return a},destructor:function(a){rwt.remote.HandlerUtil.removeDestroyableChild(a._grid,a);a.dispose()},properties:["left",$[25],$[17],"text",$[15],"font",$[82],$[100],$[86]],listeners:[$[159],$[167]]}); |
| rwt.qx.Class.define($[385],{extend:rwt.widgets.base.Iframe,construct:function(){arguments.callee.base.call(this);this._hasProgressListener=false;this._browserFunctions={};this.setTabIndex(1);this.setAppearance("browser");this.addEventListener($[65],this._onCreate,this)},properties:{asynchronousResult:{check:$[2],init:false},executedFunctionPending:{check:$[2],init:false},executedFunctionResult:{nullable:true,init:null},executedFunctionError:{check:$[46],nullable:true,init:null}},statics:{getDomain:function(a){var d=null;if(a!==null){var b=a.toLowerCase();if(b.indexOf("http://")===0||b.indexOf("https://")===0||b.indexOf("ftp://")===0||b.indexOf("ftps://")===0){d=b.slice(b.indexOf("://")+3);var c=d.indexOf("/");if(c!==-1){d=d.slice(0,c)}}}return d}},members:{syncSource:function(){if(this.isCreated()){this._syncSource()}},_applySource:function(b,a){},_applyEnabled:function(b,a){arguments.callee.base.call(this,b,a);if(b){this.release()}else{this.block()}},release:function(){if(this.getEnabled()){arguments.callee.base.call(this)}},_onload:function(a){if(!this._isInGlobalDisposeQueue){arguments.callee.base.call(this,a);if(this._isContentAccessible()){this._attachBrowserFunctions()}this._sendProgressEvent()}},_onCreate:function(a){if(!this.getEnabled()){this.block()}},_sendProgressEvent:function(){if(this._hasProgressListener){rwt.remote.Server.getInstance().getRemoteObject(this).notify("Progress")}},setHasProgressListener:function(a){this._hasProgressListener=a},execute:function(b){this._checkIframeAccess();var f=true;var a=null;try{a=this._parseEvalResult(this._eval(b))}catch(c){f=false}var e=rwt.remote.Server.getInstance();var d=rwt.remote.Server.getInstance().getRemoteObject(this);d.set("executeResult",f);d.set("evaluateResult",a);if(this.getExecutedFunctionPending()){e.sendImmediate(false)}else{e.send()}},_srcInLocalDomain:function(){var f=this.getSource();var e=rwt.widgets.Browser;var c=e.getDomain(document.URL);var d=e.getDomain(f);var a=c===d;var b=d===null;return b||a},_isContentAccessible:function(){var b;try{var a=this.getContentDocument().body.URL;b=true}catch(c){b=false}return b&&this._isLoaded},_checkIframeAccess:function(b){if(!this._isContentAccessible()){var a=this._srcInLocalDomain();if(!a){this._throwSecurityException(false)}if(this._isLoaded&&a){this._throwSecurityException(true)}}},_throwSecurityException:function(a){var e=rwt.widgets.Browser;var b=e.getDomain(document.URL);var d=a?null:e.getDomain(this.getSource());var c="SecurityRestriction:\nBrowser-Widget can not access ";c+=d!==null?'"'+d+'"':"unkown domain";c+=' from "'+b+'".';throw new Error(c)},_eval:function(a){var b=this.getContentWindow();if(!b["eval"]&&b.execScript){b.execScript("null;","JScript")}return b["eval"](a)},_parseEvalResult:function(b){var a=null;var c=this.getContentWindow();if(b instanceof c.Function||b instanceof Function){a=this.toJSON([[]])}else{if(b instanceof c.Array||b instanceof Array){a=this.toJSON([b])}else{if(typeof b!==$[20]&&typeof b!==$[41]){a=this.toJSON([b])}}}return a},createFunction:function(a){this._browserFunctions[a]=true;this._checkIframeAccess();if(this.isLoaded()){try{this._createFunctionImpl(a);this._createFunctionWrapper(a)}catch(b){var c='Unable to create function: "'+a+'".\n'+b;if(rwt.remote.EventUtil.getSuspended()){throw c}else{rwt.runtime.ErrorHandler.processJavaScriptError(c)}}}},_attachBrowserFunctions:function(){for(var a in this._browserFunctions){this.createFunction(a)}},_createFunctionImpl:function(a){var e=this.getContentWindow();var d=rwt.remote.Server.getInstance();var b=d.getRemoteObject(this);var c=this;e[a+"_impl"]=function(){var f={};try{if(c.getExecutedFunctionPending()){f.error='Unable to execute browser function "'+a+'". Another browser function is still pending.'}else{var h=c.toJSON(arguments);b.set("executeFunction",a);b.set("executeArguments",h);c.setExecutedFunctionResult(null);c.setExecutedFunctionError(null);c.setExecutedFunctionPending(true);c.setAsynchronousResult(false);d.sendImmediate(false);if(c.getExecutedFunctionPending()){c.setAsynchronousResult(true)}else{var g=c.getExecutedFunctionError();if(g!=null){f.error=g}else{f.result=c.getExecutedFunctionResult()}}}}catch(i){rwt.runtime.ErrorHandler.processJavaScriptError(i)}return f}},_createFunctionWrapper:function(b){var a=[];a.push("function "+b+"(){");a.push(" var result = "+b+"_impl.apply( window, arguments );");a.push(" if( result.error ) {");a.push(" throw new Error( result.error );");a.push(" }");a.push(" return result.result;");a.push("}");this._eval(a.join(""))},destroyFunction:rwt.util.Variant.select($[0],{"default":function(b){delete this._browserFunctions[b];var d=this.getContentWindow();if(d!=null){try{var a=[];a.push($[391]+b+";");a.push($[391]+b+"_impl;");this._eval(a.join(""))}catch(c){throw new Error($[401]+b+" error: "+c)}}},mshtml:function(b){delete this._browserFunctions[b];var d=this.getContentWindow();if(d!=null){try{var a=[];a.push("window."+b+" = undefined;");a.push("window."+b+"_impl = undefined;");this._eval(a.join(""))}catch(c){throw new Error($[401]+b+" error: "+c)}}}}),setFunctionResult:function(c,a,b){this.setExecutedFunctionResult(a);this.setExecutedFunctionError(b);this.setExecutedFunctionPending(false)},toJSON:function(b){var a;var d=typeof b;if(b===null){a=b}else{if(d===$[20]){a=[];for(var c=0;c<b.length;c++){a.push(this.toJSON(b[c]))}}else{if(d===$[41]){a=String(b)}else{a=b}}}return a},destroy:function(){arguments.callee.base.call(this);this.syncSource()}}}); |
| rwt.remote.HandlerRegistry.add($[385],{factory:function(b){var a=new rwt.widgets.Browser();rwt.remote.HandlerUtil.addStatesForStyles(a,b.style);a.setUserData($[23],true);rwt.remote.HandlerUtil.setParent(a,b.parent);return a},destructor:rwt.remote.HandlerUtil.getControlDestructor(),getDestroyableChildren:rwt.remote.HandlerUtil.getDestroyableChildrenFinder(),properties:rwt.remote.HandlerUtil.extendControlProperties(["url","functionResult"]),propertyHandler:rwt.remote.HandlerUtil.extendControlPropertyHandler({url:function(b,a){b.setSource(a);b.syncSource()},functionResult:function(b,a){b.setFunctionResult(a[0],a[1],a[2])}}),listeners:rwt.remote.HandlerUtil.extendControlListeners(["Progress"]),listenerHandler:rwt.remote.HandlerUtil.extendControlListenerHandler({}),methods:["evaluate","destroyFunctions","createFunctions"],methodHandler:{evaluate:function(b,a){b.execute(a.script)},createFunctions:function(c,b){var d=b.functions;for(var a=0;a<d.length;a++){c.createFunction(d[a])}},destroyFunctions:function(c,b){var d=b.functions;for(var a=0;a<d.length;a++){c.destroyFunction(d[a])}}}}); |
| rwt.qx.Class.define($[406],{type:$[39],extend:rwt.qx.Object,members:{_map:{},open:function(e,a,b){var d=this._escapeId(e);var c=window.open(a,d,b,true);if(c!=null){c.focus();this._map[d]=c}},close:function(c){var b=this._escapeId(c);var a=this._map[b];if(a!=null){a.close()}delete this._map[b]},_escapeId:function(b){var a=b;a=a.replace(/_/g,"_0");a=a.replace(/-/g,"_1");a=a.replace(/\./g,"_");a=a.replace(/ /g,"__");return a}}}); |
| rwt.remote.HandlerRegistry.add($[406],{factory:function(a){return rwt.widgets.ExternalBrowser.getInstance()},destructor:rwt.util.Functions.returnTrue,methods:["open",$[130]],methodHandler:{open:function(g,c){var h=rwt.remote.HandlerUtil.createStyleMap(c.style);var d="dependent=1,scrollbars=1,resizable=1,";var b="status=".concat(h.STATUS?1:0,",");var a="location=".concat(h.LOCATION_BAR?1:0,",");var e="toolbar=".concat(h.NAVIGATION_BAR?1:0,",");var f="menubar=".concat(h.NAVIGATION_BAR?1:0);d=d.concat(b,a,e,f);g.open(c.id,c.url,d)},close:function(b,a){b.close(a.id)}}}); |
| rwt.qx.Class.define("rwt.widgets.util.FontSizeCalculation",{statics:{_measureNode:null,_offset:rwt.client.Client.isZoomed()?1:0,measureItems:function(b){var a=b.items;var e={};for(var d=0;d<a.length;d++){var f=a[d];var h=f[7];var c=this._measureItem(f,!h);var g=f[0];e[g]=c}this._storeMeasurements(g,e)},_measureItem:function(c,b){var e=b?this._escapeText(c[1]):c[1];var d={fontFamily:c[2],fontSize:c[3]+"px",fontWeight:c[4]?"bold":$[52],fontStyle:c[5]?"italic":$[52]};var a=c[6]>0?c[6]:null;return this.computeTextDimensions(e,d,a)},computeTextDimensions:function(f,e,d){var b=this._getMeasureNode();var c=b.style;if(!rwt.client.Client.isMshtml()){c.font=""}c.fontFamily=e.fontFamily||"";c.fontSize=e.fontSize||"";c.fontWeight=e.fontWeight||"";c.fontStyle=e.fontStyle||"";b.innerHTML=f;if(d){c.width=d+"px"}var a=this._measureElement(b);c.width="auto";return a},_measureElement:rwt.util.Variant.select($[0],{"default":function(b){var a;if(b.getBoundingClientRect){var c=b.getBoundingClientRect();if(c.width!=null&&c.height!=null){a=[Math.ceil(c.width),Math.ceil(c.height)]}else{a=[b.scrollWidth,b.scrollHeight]}}else{a=[b.scrollWidth,b.scrollHeight]}return this._addOffset(a)},newmshtml:function(b){var c=window.getComputedStyle(b,null);var a=[Math.ceil(parseFloat(c.width)),Math.ceil(parseFloat(c.height))];return this._addOffset(a)}}),_addOffset:function(b){var a=b[0]>0?b[0]+this._offset:0;var c=b[1]>0?b[1]+this._offset:0;return[a,c]},_getMeasureNode:function(){var b=this._measureNode;if(!b){b=document.createElement("div");var a=b.style;a.width=a.height="auto";a.visibility=$[9];a.position=$[16];a.zIndex="-1";a.left=-1000;document.body.appendChild(b);this._measureNode=b}if(!rwt.client.Client.isMshtml()){b.style.font=""}return b},_addRequestParam:function(a,c){var b=rwt.remote.Server.getInstance();b.addParameter(a,c)},_storeMeasurements:function(c,a){var b=rwt.remote.Server.getInstance().getRemoteObject(this);b.call("storeMeasurements",{results:a})},_escapeText:function(c){var b=rwt.util.Encoding;var a=b.escapeText(c,true);a=b.replaceNewLines(a,$[97]);a=b.replaceWhiteSpaces(a);return a}}}); |
| rwt.remote.HandlerRegistry.add("rwt.client.TextSizeMeasurement",{factory:function(a){return rwt.widgets.util.FontSizeCalculation},service:true,methods:["measureItems"]}); |
| rwt.qx.Class.define($[370],{extend:rwt.widgets.base.MultiCellWidget,construct:function(a){arguments.callee.base.call(this,this._CELLORDER);this.addEventListener($[3],this._onMouseOver);this.addEventListener($[6],this._onMouseOut);this.setVerticalChildrenAlign("top");this.setAlignment("left");this.setAppearance("label-wrapper");if(a.WRAP){this.setFlexibleCell(1)}this._markupEnabled=a.MARKUP_ENABLED===true},members:{_CELLORDER:[$[15],$[67]],setAlignment:function(a){this.setHorizontalChildrenAlign(a)},setImage:function(a){if(a){this.setCellContent(0,a[0]);this.setCellDimension(0,a[1],a[2])}else{this.setCellContent(0,null);this.setCellDimension(0,0,0)}},setText:function(b){var c=b;if(!this._markupEnabled){var a=rwt.util.Encoding;c=a.escapeText(b,false);c=a.replaceNewLines(c,$[97]);c=a.replaceWhiteSpaces(c)}this.setCellContent(1,c)},setTopMargin:function(a){this.setPaddingTop(a)},setLeftMargin:function(a){this.setPaddingLeft(a)},setRightMargin:function(a){this.setPaddingRight(a)},setBottomMargin:function(a){this.setPaddingBottom(a)},_onMouseOver:function(a){if(a.getTarget()===this&&!this.hasState("over")){this.addState("over")}},_onMouseOut:function(a){if(a.getTarget()===this){this.removeState("over")}}}}); |
| rwt.qx.Class.define("rwt.widgets.base.BasicButton",{extend:rwt.widgets.base.MultiCellWidget,construct:function(a,b){arguments.callee.base.call(this,this._CELLORDER);this._hasSelectionListener=false;this._selected=false;this._image=[null,null,null];this._hotImage=[null,null,null];this.addEventListener($[3],this._onMouseOver);this.addEventListener($[6],this._onMouseOut);this.addEventListener($[1],this._onMouseDown);this.addEventListener($[5],this._onMouseUp);if(!b){this.addEventListener($[10],this._onKeyDown);this.addEventListener($[34],this._onKeyUp);this.addEventListener($[4],this._onKeyPress)}this.addState(a);switch(a){case"arrow":case"push":this._isSelectable=false;this._isDeselectable=false;this._sendEvent=true;break;case $[202]:case $[108]:this._isSelectable=true;this._isDeselectable=true;this._sendEvent=true;break;case $[116]:this._isSelectable=true;this._sendEvent=true;this.setNoRadioGroup(false);rwt.widgets.util.RadioButtonUtil.registerExecute(this);rwt.widgets.util.RadioButtonUtil.registerKeypress(this);break}},destruct:function(){if(this._animation!=null){this._animation.dispose()}this._animation=null},events:{stateOverChanged:$[11]},properties:{selectionIndicator:{apply:$[414],nullable:true,themeable:true},icon:{apply:$[364],nullable:true,themeable:true},animation:{check:$[187],nullable:false,init:null,apply:$[497],themeable:true}},members:{_CELLORDER:[$[15],$[15],$[67]],_applyIcon:function(b,a){this.setImage.apply(this,b)},setImage:function(c,b,a){this._image=[c,b,a];this._updateButtonImage()},setHotImage:function(c,b,a){this._hotImage=[c,b,a];this._updateButtonImage()},_updateButtonImage:function(){var b=(this._hotImage[0]!=null&&this.hasState("over"))?this._hotImage:this._image;var a=this.getCellContent(1);if(a!=b[0]){this.setCellContent(1,b[0]);this.setCellDimension(1,b[1],b[2])}},setText:function(a){this.setCellContent(2,a)},_applySelectionIndicator:function(e,b){var c=e?e[0]:null;var d=e?e[1]:0;var a=e?e[2]:0;this.setCellContent(0,c);this.setCellDimension(0,d,a)},setHasSelectionListener:function(a){this._hasSelectionListener=a},setGrayed:function(a){if(a){this.addState($[172])}else{this.removeState($[172])}},setNoRadioGroup:function(a){if(this.hasState($[116])){this._noRadioGroup=a;this._isDeselectable=a}},getNoRadioGroup:function(){return this._noRadioGroup},execute:function(){arguments.callee.base.call(this);if(this._isSelectable){this.setSelection(!(this._selected&&this._isDeselectable))}this._sendChanges()},setSelection:function(b){if(this._selected!=b||this._selected){this._selected=b;if(this._selected){this.addState($[22])}else{this.removeState($[22])}if(!rwt.remote.EventUtil.getSuspended()){var d=rwt.remote.WidgetManager.getInstance();var c=d.findIdByWidget(this);var a=rwt.remote.Server.getInstance();a.addParameter(c+$[170],this._selected)}}},_sendChanges:function(){if(!rwt.remote.EventUtil.getSuspended()&&this._hasSelectionListener&&this._sendEvent){rwt.remote.EventUtil.notifySelected(this)}},_onMouseOver:function(a){if(a.getTarget()==this&&!this.hasState("over")){if(this.hasState($[29])){this.removeState($[29]);this.addState($[12])}this.addState("over");this._updateButtonImage();this.createDispatchEvent($[162])}},_onMouseOut:function(a){if(a.getTarget()==this){this.removeState("over");this._updateButtonImage();if(this.hasState($[12])){this.setCapture(true);this.removeState($[12]);this.addState($[29])}this.createDispatchEvent($[162])}},_onMouseDown:function(a){if(a.getTarget()==this&&a.isLeftButtonPressed()){this.removeState($[29]);this.addState($[12])}},_onMouseUp:function(b){this.setCapture(false);var a=this.hasState($[12]);var c=this.hasState($[29]);if(a){this.removeState($[12])}if(c){this.removeState($[29])}if(!c){this.addState("over");this._updateButtonImage();if(a){this.execute()}}},_onKeyDown:function(a){switch(a.getKeyIdentifier()){case $[49]:case $[78]:this.removeState($[29]);this.addState($[12]);a.stopPropagation()}},_onKeyUp:function(a){switch(a.getKeyIdentifier()){case $[49]:case $[78]:if(this.hasState($[12])){this.removeState($[29]);this.removeState($[12]);this.execute();a.preventDefault();a.stopPropagation()}}},_onKeyPress:function(a){switch(a.getKeyIdentifier()){case"Left":case"Up":case $[35]:case"Down":case $[40]:case $[45]:case"End":case"Home":case $[49]:case $[78]:a.preventDefault();a.stopPropagation()}},_applyAnimation:function(b,a){if(b.hoverIn||b[$[320]]){if(this._animation==null){this._animation=new rwt.animation.Animation();this._animation.addEventListener("init",this._initAnimation,this)}this.addEventListener($[162],this._animation.activateRendererOnce,this._animation);this.addEventListener($[326],this._configureRenderer,this);this._configureRenderer()}else{if(this._animation!=null){this.removeEventListener($[162],this._animation.activateRendererOnce,this._animation);this.removeEventListener($[326],this._configureRenderer,this)}}},_configureRenderer:function(c){if(!c||c.getValue()==null||c.getOldValue()==null){this._animation.skip();var d=this._animation.getDefaultRenderer(false);var a=this.getBackgroundGradient()!=null?$[126]:$[51];var b=rwt.animation.AnimationRenderer.ANIMATION_CHANGE;d.animate(this,a,b)}},_initAnimation:function(a){if(this.hasState($[12])){this._animation.cancel()}else{var b=this.getAnimation();if(this.hasState("over")&&b.hoverIn){this._animation.setProperties(b.hoverIn)}else{if(!this.hasState("over")&&b[$[320]]){this._animation.setProperties(b[$[320]])}else{this._animation.cancel()}}}},_renderAppearance:function(){arguments.callee.base.call(this);if(this._animation!=null&&!this._animation.isStarted()){this._animation.getDefaultRenderer().cancelActivateOnce()}}}}); |
| rwt.qx.Class.define($[377],{extend:rwt.widgets.base.BasicButton,construct:function(a){arguments.callee.base.call(this,a);this._isDropDown=false;if(a=="dropDown"){this._isDropDown=true;this._isSelectable=false;this._isDeselectable=false;this._sendEvent=true;this.setCellDimension(3,1,0);this.setCellContent(3,"")}this._separatorBorder=null;this.setAppearance("toolbar-button");this.removeEventListener($[10],this._onKeyDown);this.removeEventListener($[34],this._onKeyUp)},properties:{dropDownArrow:{apply:"_applyDropDownArrow",nullable:true,themeable:true},separatorBorder:{nullable:true,init:null,apply:$[523],themeable:true}},events:{dropDownClicked:$[11]},members:{_CELLORDER:[$[15],$[15],$[67],$[67],$[15]],_onKeyPress:function(a){this.getParent().dispatchEvent(a);arguments.callee.base.call(this,a)},_onMouseDown:function(a){if(a.getTarget()==this&&a.isLeftButtonPressed()){this.removeState($[29]);if(this._isDropdownClick(a)){this._onDropDownClick()}else{this.addState($[12])}}},_isDropdownClick:function(e){var a=false;var d=this.getCellNode(3);if(d!=null){var c=rwt.html.Location.getLeft(d);var b=e.getClientX();a=b>c}return a},_onDropDownClick:function(){if(!rwt.remote.EventUtil.getSuspended()&&this._hasSelectionListener&&this._sendEvent){rwt.remote.EventUtil.notifySelected(this,0,0,0,0,"arrow")}this.dispatchSimpleEvent("dropDownClicked")},_applyDropDownArrow:function(e,c){var b=e?e[0]:null;var d=e?e[1]:0;var a=e?e[2]:0;this.setCellContent(4,b);this.setCellDimension(4,d,a)},_applySeparatorBorder:function(b,a){this._queueSeparatorBorder(b)},_queueSeparatorBorder:function(a){this._separatorBorder=a;this.addToQueue($[374])},_beforeRenderLayout:function(h){if(this._isDropDown){if(h.layoutY){var g=this.getPaddingTop()+this.getPaddingBottom();this._setCellHeight(3,this.getInnerHeight()+g)}if(h.layoutX){var l=this.getInnerWidth();this._setCellWidth(0,0);this._setCellWidth(2,null);var j=this.getPreferredInnerWidth();var i=l-j;if(i>0){var b=this.getSpacing();if((i>(b*2))&&this.getHorizontalChildrenAlign()!="left"){var e=Math.round(i*0.5)-b;var f=Math.round(i*0.5);this.setCellWidth(0,e);this.setCellWidth(2,this.getCellWidth(2)+f)}else{this.setCellWidth(2,this.getCellWidth(2)+i)}}}if(h.separatorBorder){var c=this.getCellNode(3).style;var a=this._separatorBorder.getWidthLeft();var k=this._separatorBorder.getStyleLeft();var d=this._separatorBorder.getColorLeft();c.borderLeftWidth=(a||0)+"px";c.borderLeftStyle=k||"none";c.borderLeftColor=d||""}}},_renderCellLayoutY:function(a){arguments.callee.base.call(this,a);if(this._isDropDown&&a==3){this.getCellNode(a).style.top=0}}}}); |
| rwt.qx.Class.define($[543],{extend:rwt.widgets.base.Parent,construct:function(){arguments.callee.base.call(this);this._createFrameObject();this._createLegendObject();this.setLegend("");this.remapChildrenHandlingTo(this._frameObject);this.setOverflow($[9]);var b=new rwt.theme.ThemeValues({});this._themeBackgroundColor=b.getCssColor("Group-Label",$[208]);b.dispose();var a=this.getLegendObject().getLabelObject();if(a==null){this.setLegend($[279]);this.setLegend("")}a=this.getLegendObject().getLabelObject();a.setMode("html");this.addEventListener($[168],this._onChangeBackgroundColor,this);this.addEventListener($[101],this._onChangeFont,this);this.getLegendObject().addEventListener($[3],this._onMouseOver,this);this.getLegendObject().addEventListener($[6],this._onMouseOut,this);rwt.widgets.base.Widget.disableScrolling(this)},destruct:function(){this.removeEventListener($[168],this._onChangeBackgroundColor,this);this.removeEventListener($[101],this._onChangeFont,this);this.getLegendObject().removeEventListener($[3],this._onMouseOver,this);this.getLegendObject().removeEventListener($[6],this._onMouseOut,this);this._disposeObjects("_legendObject","_frameObject")},properties:{appearance:{refine:true,init:"group-box"}},members:{addState:function(a){arguments.callee.base.call(this,a);if(a.substr(0,8)==$[38]){this._legendObject.addState(a);this._frameObject.addState(a)}},removeState:function(a){arguments.callee.base.call(this,a);if(a.substr(0,8)==$[38]){this._legendObject.removeState(a);this._frameObject.removeState(a)}},_onChangeBackgroundColor:function(a){var b=a.getValue();if(this._themeBackgroundColor===$[8]){this.getLegendObject().setBackgroundColor(b)}},_onChangeFont:function(b){var a=b.getValue();this.getLegendObject().setFont(a)},_onMouseOver:function(a){this.getLegendObject().addState("over");this.getFrameObject().addState("over")},_onMouseOut:function(a){this.getLegendObject().removeState("over");this.getFrameObject().removeState("over")},_layoutPost:function(a){arguments.callee.base.call(this,a);this._frameObject._layoutPost(a)},applyObjectId:function(b){arguments.callee.base.call(this,b);if(rwt.widgets.base.Widget._renderHtmlIds){var a=this.getLegendObject().getLabelObject();a.setHtmlAttribute("id",b+"-label")}},_createLegendObject:function(){this._legendObject=new rwt.widgets.base.Atom();this._legendObject.setAppearance("group-box-legend");this.add(this._legendObject)},_createFrameObject:function(){this._frameObject=new rwt.widgets.base.Parent();this._frameObject.setAppearance("group-box-frame");this.add(this._frameObject)},getFrameObject:function(){return this._frameObject},getLegendObject:function(){return this._legendObject},setLegend:function(a){if(a!==""&&a!==null){this._legendObject.setLabel(a);this._legendObject.setDisplay(true)}else{this._legendObject.setDisplay(false)}},getLegend:function(){return this._legendObject.getLabel()},setIcon:function(a){this._legendObject.setIcon(a)},getIcon:function(){this._legendObject.getIcon()}}}); |
| rwt.remote.HandlerRegistry.add($[543],{factory:function(b){var a=new rwt.widgets.Group();rwt.remote.HandlerUtil.addStatesForStyles(a,b.style);a.setUserData($[23],true);rwt.remote.HandlerUtil.setParent(a,b.parent);return a},destructor:rwt.remote.HandlerUtil.getControlDestructor(),getDestroyableChildren:rwt.remote.HandlerUtil.getDestroyableChildrenFinder(),properties:rwt.remote.HandlerUtil.extendControlProperties(["text"]),propertyHandler:rwt.remote.HandlerUtil.extendControlPropertyHandler({text:function(c,b){var a=rwt.util.Encoding;var d=a.escapeText(b,false);c.setLegend(d)}}),listeners:rwt.remote.HandlerUtil.extendControlListeners([]),listenerHandler:rwt.remote.HandlerUtil.extendControlListenerHandler({})}); |
| rwt.qx.Class.define($[388],{extend:rwt.widgets.base.Window,include:rwt.animation.VisibilityAnimationMixin,construct:function(b){arguments.callee.base.call(this);this.setShowMinimize(b.MIN===true);this.setAllowMinimize(b.MIN===true);this.setShowMaximize(b.MAX===true);this.setAllowMaximize(b.MAX===true);this.setShowClose(b.CLOSE===true);this.setAllowClose(b.CLOSE===true);this.setResizableWest(b.RESIZE===true);this.setResizableNorth(b.RESIZE===true);this.setResizableEast(b.RESIZE===true);this.setResizableSouth(b.RESIZE===true);this.setOverflow($[9]);this.setRestrictToPageOnOpen(false);this._captionTitle.setMode("html");this._activeControl=null;this._focusControl=null;this._parentShell=null;this._renderZIndex=true;this._hasResizeListener=false;this._hasMoveListener=false;this.addEventListener($[452],this._onChangeActiveChild);this.addEventListener($[239],this._onChangeFocusedChild);this.addEventListener($[492],this._onChangeActive);this.addEventListener("changeMode",this._onChangeMode);this.addEventListener($[278],this._onChangeLocation,this);this.addEventListener("changeTop",this._onChangeLocation,this);this.addEventListener($[71],this._onChangeSize,this);this.addEventListener($[76],this._onChangeSize,this);this.addEventListener($[10],this._onKeydown);var a=rwt.remote.Server.getInstance();a.addEventListener("send",this._onSend,this);this.getCaptionBar().setWidth("100%");this.removeEventListener($[1],this._onwindowmousedown);this.addEventListener($[65],this._onCreate,this);this.__onwindowmousedown=rwt.util.Functions.bind(this._onwindowmousedown,this);this.addToDocument()},statics:{TOP_LEFT:"topLeft",TOP_RIGHT:"topRight",BOTTOM_LEFT:"bottomLeft",BOTTOM_RIGHT:$[476],CORNER_NAMES:["topLeft","topRight","bottomLeft",$[476]],_onParentClose:function(a){if(!rwt.remote.EventUtil.getSuspended()){this.doClose()}},reorderShells:function(c){var g=rwt.util.Objects.getValues(c.getAll());g=g.sort(rwt.widgets.Shell._compareShells);var f=g.length;var e=null;if(f>0){var b=g[0].getTopLevelWidget();var a=rwt.widgets.Shell.MIN_ZINDEX;for(var d=0;d<f;d++){a+=10;g[d].setZIndex(a);if(g[d]._appModal&&g[d].getVisibility()&&g[d].getDisplay()){e=g[d]}}if(e!=null){this._copyStates(e,b._getBlocker());b._getBlocker().show();b._getBlocker().setZIndex(e.getZIndex()-1)}else{b._getBlocker().hide()}}rwt.widgets.Shell._upperModalShell=e},_copyStates:function(b,c){c.__states={};for(var a in b.__states){if(b._isRelevantState(a)){c.addState(a)}}c._renderAppearance();rwt.widgets.base.Widget.removeFromGlobalLayoutQueue(c)},_compareShells:function(c,b){var a=0;if(c.isDialogOf(b)){a=1}else{if(b.isDialogOf(c)){a=-1}}if(a===0){a=(c._onTop?1:0)-(b._onTop?1:0)}if(a===0){a=(c._appModal?1:0)-(b._appModal?1:0)}if(a===0){var e=c.getTopLevelShell();var d=b.getTopLevelShell();a=e.getZIndex()-d.getZIndex()}if(a===0){a=c.getZIndex()-b.getZIndex()}return a},MIN_ZINDEX:100000,MAX_ZINDEX:10000000},destruct:function(){this.setParentShell(null);var a=rwt.remote.Server.getInstance();a.removeEventListener("send",this._onSend,this);if(this.isCreated()){rwt.html.EventRegistration.removeEventListener(this.getElement(),$[1],this.__onwindowmousedown)}},events:{close:$[50],parentShellChanged:$[11]},members:{destroy:function(){this.doClose();this.getWindowManager().remove(this);arguments.callee.base.call(this)},_onCreate:function(a){rwt.html.EventRegistration.addEventListener(this.getElement(),$[1],this.__onwindowmousedown);this.removeEventListener($[65],this._onCreate,this)},_beforeAppear:function(){rwt.widgets.base.Parent.prototype._beforeAppear.call(this);rwt.widgets.util.PopupManager.getInstance().update();var a=this.getWindowManager().getActiveWindow();this.getWindowManager().add(this);this.getWindowManager().setActiveWindow(a)},setDefaultButton:function(a){if(this._defaultButton!=null){this._defaultButton.removeState($[62])}this._defaultButton=a;if(this._defaultButton!=null){this._defaultButton.addState($[62])}},getDefaultButton:function(){return this._defaultButton},setParentShell:function(a){var b=this._parentShell;this._parentShell=a;var c=rwt.widgets.Shell._onParentClose;if(b!=null){b.removeEventListener($[130],c,this)}if(a!=null){a.addEventListener($[130],c,this)}this.dispatchSimpleEvent("parentShellChanged")},isDisableResize:function(){return this._disableResize?true:false},setHasActivateListener:function(a){},setHasCloseListener:function(a){},setHasResizeListener:function(a){this._hasResizeListener=a},setHasMoveListener:function(a){this._hasMoveListener=a},setActiveControl:function(a){this._activeControl=a},initialize:function(){this.setShowCaption(this.hasState("rwt_TITLE"));this._onTop=(this._parentShell!=null&&this._parentShell._onTop)||this.hasState("rwt_ON_TOP");this._appModal=this.hasState("rwt_APPLICATION_MODAL")||this.hasState("rwt_PRIMARY_MODAL")||this.hasState("rwt_SYSTEM_MODAL")},addState:function(b){arguments.callee.base.call(this,b);if(this._isRelevantState(b)){this._captionBar.addState(b);this._captionTitle.addState(b);this._minimizeButton.addState(b);this._maximizeButton.addState(b);this._restoreButton.addState(b);this._closeButton.addState(b);var a=this._getClientDocumentBlocker();if(a!=null){a.addState(b)}}},removeState:function(b){arguments.callee.base.call(this,b);if(this._isRelevantState(b)){this._captionBar.removeState(b);this._captionTitle.removeState(b);this._minimizeButton.removeState(b);this._maximizeButton.removeState(b);this._restoreButton.removeState(b);this._closeButton.removeState(b);var a=this._getClientDocumentBlocker();if(a!=null){a.removeState(b)}}},_getClientDocumentBlocker:function(){var a=null;if(this._appModal&&rwt.widgets.Shell._upperModalShell==this){a=this.getTopLevelWidget()._getBlocker()}return a},_isRelevantState:function(b){var a=b==$[63]||b==$[69]||b==$[227]||b.substr(0,8)==$[38]||b.substr(0,4)=="rwt_";return a},close:function(){if(!rwt.remote.EventUtil.getSuspended()){rwt.remote.Server.getInstance().getRemoteObject(this).notify("Close")}},doClose:function(){if(!this.isDisposed()){this.hide();if(this.hasEventListeners($[130])){var a=new rwt.event.DataEvent($[130],this);this.dispatchEvent(a,true)}var b=this.getWindowManager();rwt.widgets.Shell.reorderShells(b)}},_onChangeActiveChild:function(a){var c=this._getParentControl(a.getValue());if(!rwt.remote.EventUtil.getSuspended()&&c!=null&&c!==this._activeControl){this._notifyDeactivate(this._activeControl,c);var d=rwt.remote.WidgetManager.getInstance().findIdByWidget(c);var b=rwt.remote.Server.getInstance().getRemoteObject(this);b.set($[450],d);this._notifyActivate(this._activeControl,c);this._activeControl=c}},_notifyDeactivate:function(b,d){var c=b;while(c!=null&&!this._hasDeactivateListener(c)){if(c.getParent){c=c.getParent()}else{c=null}}if(c!=null&&!c.contains(d)){var a=rwt.remote.Server.getInstance().getRemoteObject(c);a.notify("Deactivate")}},_notifyActivate:function(b,d){var c=d;while(c!=null&&!this._hasActivateListener(c)){if(c.getParent){c=c.getParent()}else{c=null}}if(c!=null&&!c.contains(b)){var a=rwt.remote.Server.getInstance().getRemoteObject(c);a.notify($[237])}},_hasDeactivateListener:function(a){return a.getUserData($[480])===true},_hasActivateListener:function(a){return a.getUserData($[498])===true},_onChangeFocusedChild:function(a){if(rwt.remote.EventUtil.getSuspended()){this._focusControl=this.getFocusedChild()}},_onChangeActive:function(b){if(!this.getActive()&&!isFinite(this.getZIndex())){this.setZIndex(100000000)}if(!rwt.remote.EventUtil.getSuspended()&&this.getActive()){rwt.remote.Server.getInstance().getRemoteObject(this).notify($[237])}var c=b.getValue();if(c){var a=rwt.widgets.Shell._upperModalShell;if(a!=null&&a.getZIndex()>this.getZIndex()){this.setActive(false);a.setActive(true)}}},_onChangeMode:function(a){var c=a.getValue();var e=rwt.remote.WidgetManager.getInstance();var d=e.findIdByWidget(a.getTarget());var b=rwt.remote.Server.getInstance();b.addParameter(d+".mode",c)},_onChangeSize:function(a){if(!rwt.remote.EventUtil.getSuspended()){this._sendBounds();if(this._hasResizeListener){var b=rwt.remote.Server.getInstance();b.getRemoteObject(this).notify("Resize",{})}}},_onChangeLocation:function(a){if(!rwt.remote.EventUtil.getSuspended()){this._sendBounds();if(this._hasMoveListener){var b=rwt.remote.Server.getInstance();b.getRemoteObject(this).notify("Move",{})}}},_sendBounds:function(){var e=rwt.remote.Server.getInstance();var d=this._parseNumber(this.getLeft());var c=this._parseNumber(this.getTop());var a=this._parseNumber(this.getHeightValue());var b=this._parseNumber(this.getWidthValue());e.getRemoteObject(this).set($[87],[d,c,b,a])},_parseNumber:function(b){var a=parseInt(b,10);return isNaN(a)?0:a},_onKeydown:function(a){var c=a.getKeyIdentifier();if(c==$[49]&&!a.isShiftPressed()&&!a.isAltPressed()&&!a.isCtrlPressed()&&!a.isMetaPressed()){var b=this.getDefaultButton();if(b!=null&&b.isSeeable()){b.setFocused(true);b.execute()}}else{if(c==$[105]&&this._parentShell!=null){this.close()}}},_onSend:function(a){if(this.getActive()){var c=this.getFocusedChild();if(c!=null&&c!=this._focusControl){this._focusControl=c;var f=rwt.remote.WidgetManager.getInstance();var b=f.findIdByWidget(c);var d=rwt.remote.Server.getInstance();var e=d.getRemoteObject(rwt.widgets.Display.getCurrent());e.set($[451],b)}}},_getParentControl:function(c){var b=rwt.remote.WidgetManager.getInstance();var a=c;while(a!=null&&!b.isControl(a)){if(a.getParent){a=a.getParent()}else{a=null}}return a},isDialogOf:function(c){var a=false;var b=this._parentShell;while(!a&&b!=null){a=c===b;b=b._parentShell}return a},getTopLevelShell:function(){var a=this;while(a._parentShell!=null){a=a._parentShell}return a},_sendTo:function(){rwt.widgets.Shell.reorderShells(this.getWindowManager())},bringToFront:function(){var a=this;while(a._parentShell!=null){a=a._parentShell}this._setRenderZIndex(false);this.setZIndex(rwt.widgets.Shell.MAX_ZINDEX+1);a.setZIndex(rwt.widgets.Shell.MAX_ZINDEX+1);rwt.widgets.Shell.reorderShells(this.getWindowManager());this._setRenderZIndex(true)},_applyZIndex:function(b,a){if(this._renderZIndex){arguments.callee.base.call(this,b,a)}},_setRenderZIndex:function(a){this._renderZIndex=a;if(a){this._applyZIndex(this.getZIndex())}},sendToBack:function(){var a=this;while(a._parentShell!=null){a=a._parentShell}this._setRenderZIndex(false);this.setZIndex(rwt.widgets.Shell.MIN_ZINDEX-1);a.setZIndex(rwt.widgets.Shell.MIN_ZINDEX-1);rwt.widgets.Shell.reorderShells(this.getWindowManager());this._setRenderZIndex(true)},setBlocked:function(a){if(a){if(!this._blocker){this._blocker=new rwt.widgets.base.Parent();this._blocker.setAppearance($[518]);this.add(this._blocker)}this._blocker.setSpace(0,0,10000,10000);this._blocker.setZIndex(1000)}else{if(this._blocker){this.remove(this._blocker);this._blocker.destroy();this._blocker=null}}},setFullScreen:function(a){if(a){this._captionBar.setDisplay(false)}else{this._captionBar.setDisplay(this.hasState("rwt_TITLE"))}}}}); |
| rwt.remote.HandlerRegistry.add($[388],{factory:function(b){var d=rwt.remote.HandlerUtil;var c=d.createStyleMap(b.style);var a=new rwt.widgets.Shell(c);d.addStatesForStyles(a,b.style);a.setUserData($[23],true);d.callWithTarget(b.parentShell,function(e){if(e){a.setParentShell(e)}a.initialize()});return a},destructor:rwt.remote.HandlerUtil.getControlDestructor(),getDestroyableChildren:rwt.remote.HandlerUtil.getDestroyableChildrenFinder(),properties:rwt.remote.HandlerUtil.extendControlProperties(["showMinimize","allowMinimize","showMaximize","allowMaximize","showClose","allowClose","resizable",$[15],"text","alpha",$[63],"mode","hasShellListener","minimumSize","defaultButton",$[450]]),propertyHandler:rwt.remote.HandlerUtil.extendControlPropertyHandler({bounds:function(b,a){if(!b.isDisableResize()){b.setLeft(a[0]);b.setTop(a[1]);b.setWidth(a[2]);b.setHeight(a[3])}},alpha:function(a,b){a.setOpacity(b/255)},defaultButton:function(a,b){rwt.remote.HandlerUtil.callWithTarget(b,function(c){a.setDefaultButton(c)})},activeControl:function(a,b){rwt.remote.HandlerUtil.callWithTarget(b,function(c){a.setActiveControl(c)})},mode:function(a,c){var b=c==="fullscreen";a.setMode(b?$[69]:c);a.setFullScreen(b)},minimumSize:function(a,b){a.setMinWidth(b[0]);a.setMinHeight(b[1])},text:function(a,b){var c=rwt.util.Encoding.escapeText(b,false);a.setCaption(c)},image:function(a,b){if(b===null){a.setIcon(b)}else{a.setIcon(b[0])}},visibility:function(a,b){if(b){a.show()}else{a.hide()}rwt.widgets.Shell.reorderShells(a.getWindowManager())}}),listeners:rwt.remote.HandlerUtil.extendControlListeners([$[237],"Close","Resize","Move"]),listenerHandler:rwt.remote.HandlerUtil.extendControlListenerHandler({})}); |
| rwt.qx.Class.define($[470],{extend:rwt.widgets.base.Parent,construct:function(){arguments.callee.base.call(this);this.setOverflow($[9]);this.setAppearance("progressbar");this.setState($[52]);this._timer=null;this._gfxCanvasAppended=false;this._canvas=null;this._backgroundShape=null;this._indicatorShape=null;this._borderShape=null;this._useBorderShape=false;this._gfxBorderWidth=0;this._indicatorVirtualPosition=0;this._separatorStartShape=null;this._separatorEndShape=null;this._useSeparator=false;this._separatorWidth=0;this._minimum=0;this._maximum=100;this._selection=0},destruct:function(){if(this._timer!=null){this._timer.stop();this._timer.dispose()}this._timer=null;this._canvas=null;this._backgroundShape=null;this._indicatorShape=null;this._borderShape=null;this._separatorStartShape=null;this._separatorEndShape=null},statics:{UNDETERMINED_SIZE:40},events:{minimumChanged:$[11],maximumChanged:$[11],selectionChanged:$[11]},properties:{indicatorColor:{nullable:true,init:null,apply:$[238],themeable:true},indicatorImage:{nullable:true,init:null,apply:$[238],themeable:true},indicatorGradient:{nullable:true,init:null,apply:$[238],themeable:true},indicatorOpacity:{nullable:true,init:1,apply:$[238],themeable:true},backgroundImageSized:{nullable:true,init:null,apply:"_applyBackgroundImageSized",themeable:true},separatorBorder:{nullable:true,init:null,apply:$[523],themeable:true}},members:{setMinimum:function(a){this._minimum=a;this.dispatchSimpleEvent($[405])},setMaximum:function(a){this._maximum=a;this.dispatchSimpleEvent($[434])},setSelection:function(a){this._selection=a;this.addToQueue("indicatorSelection");this.dispatchSimpleEvent($[284])},addState:function(a){if(a===$[474]){this._timer=new rwt.client.Timer(120);this._timer.addEventListener($[27],this._onInterval,this);this._timer.start()}arguments.callee.base.call(this,a)},setState:function(a){if(a==$[134]){this.removeState($[52]);this.removeState("paused");this.addState($[134])}else{if(a=="paused"){this.removeState($[52]);this.removeState($[134]);this.addState("paused")}else{this.removeState($[134]);this.removeState("paused");this.addState($[52])}}},_isIndeterminate:function(){return this.hasState($[474])},_isHorizontal:function(){return this.hasState($[383])},_isVertical:function(){return this.hasState($[225])},_queueBorder:function(a){this.addToQueue("indicatorBorder");if(a&&a.getStyle()===$[85]){this._cachedBorderTop=0;this._cachedBorderRight=0;this._cachedBorderBottom=0;this._cachedBorderLeft=0;this._invalidateFrameDimensions()}else{arguments.callee.base.call(this,a)}},_applyBackgroundColor:function(a){if(this._gfxCanvasAppended){this._styleBackgroundFill()}},_applyBackgroundGradient:function(a){if(this._gfxCanvasAppended){this._styleBackgroundFill()}},_applyBackgroundImage:function(a){},_applyBackgroundImageSized:function(a){if(this._gfxCanvasAppended){this._styleBackgroundFill()}},_applyIndicatorFill:function(a){if(this._gfxCanvasAppended){this._styleIndicatorFill()}},_applySeparatorBorder:function(a){this.addToQueue($[374])},_onCanvasAppear:function(){rwt.graphics.GraphicsUtil.handleAppear(this._canvas)},_onInterval:function(){if(this.isSeeable()){this._renderIndicatorSelection()}},_layoutPost:function(b){if(!this._gfxCanvasAppended){this._createCanvas()}var a=b.width||b.height||b.frameWidth||b.frameHeight||b.initial;if(b.separatorBorder){this._styleSeparatorBorder()}if(b.indicatorBorder){this._styleIndicatorBorder()}if(b.indicatorBorder||a){this._renderDimension();this._renderIndicatorSelection()}else{if(b.indicatorSelection||b.separatorBorder){this._renderIndicatorSelection()}}},_createCanvas:function(){var a=rwt.graphics.GraphicsUtil;this._canvas=a.createCanvas();this._getTargetNode().appendChild(a.getCanvasNode(this._canvas));this._gfxCanvasAppended=true;this.addEventListener($[141],this._onCanvasAppear);this._backgroundShape=a.createShape($[136]);this._indicatorShape=a.createShape($[136]);a.addToCanvas(this._canvas,this._backgroundShape);a.addToCanvas(this._canvas,this._indicatorShape);this._styleBackgroundFill();this._styleIndicatorFill();if(this.isSeeable()){this._onCanvasAppear()}},_styleIndicatorBorder:function(){var b=rwt.graphics.GraphicsUtil;if(this.getBorder()&&this.getBorder().getStyle()===$[85]){if(!this._useBorderShape){this._style.border="";if(this._borderShape==null){this._borderShape=b.createShape($[136])}b.addToCanvas(this._canvas,this._borderShape);this._useBorderShape=true}this._gfxBorderWidth=this._getMaxBorderWidth(this.getBorder());var a=this.getBorder().getColor();b.setStroke(this._borderShape,a,this._gfxBorderWidth)}else{if(this._useBorderShape){b.removeFromCanvas(this._canvas,this._borderShape);this._useBorderShape=true;this._gfxBorderWidth=0}}},_styleSeparatorBorder:function(){var c=rwt.graphics.GraphicsUtil;var b=this.getSeparatorBorder();if(b!=null){if(!this._useSeparator){if(this._isIndeterminate()){if(this._separatorStartShape==null){this._separatorStartShape=c.createShape("rect")}c.addToCanvas(this._canvas,this._separatorStartShape)}if(this._separatorEndShape==null){this._separatorEndShape=c.createShape("rect")}c.addToCanvas(this._canvas,this._separatorEndShape);this._useSeparator=true}this._separatorWidth=this._getMaxBorderWidth(b);var a=b.getColorTop();c.setFillColor(this._separatorEndShape,a);if(this._isIndeterminate()){c.setFillColor(this._separatorStartShape,a)}}else{if(this._useSeparator){c.removeFromCanvas(this._canvas,this._separatorEndShape);this._useSeparator=false;if(this._isIndeterminate()){c.removeFromCanvas(this._canvas,this._separatorStartShape)}this._separatorWidth=0}}},_getMaxBorderWidth:function(a){var b=0;b=Math.max(b,a.getWidthTop());b=Math.max(b,a.getWidthLeft());b=Math.max(b,a.getWidthRight());b=Math.max(b,a.getWidthBottom());return b},_styleIndicatorFill:function(){var a=rwt.graphics.GraphicsUtil;if(this.getIndicatorImage()!=null&&this.getIndicatorImage()[0]!=null){var b=this.getIndicatorImage();a.setFillPattern(this._indicatorShape,b[0],b[1],b[2])}else{if(this.getIndicatorGradient()!=null){a.setFillGradient(this._indicatorShape,this.getIndicatorGradient())}else{a.setFillColor(this._indicatorShape,this.getIndicatorColor())}}a.setOpacity(this._indicatorShape,this.getIndicatorOpacity())},_styleBackgroundFill:function(){var a=rwt.graphics.GraphicsUtil;if(this.getBackgroundImageSized()!=null&&this.getBackgroundImageSized()[0]!=null){var b=this.getBackgroundImageSized();a.setFillPattern(this._backgroundShape,b[0],b[1],b[2])}else{if(this.getBackgroundGradient()!=null){a.setFillGradient(this._backgroundShape,this.getBackgroundGradient())}else{a.setFillColor(this._backgroundShape,this.getBackgroundColor())}}},_renderDimension:function(){var b=rwt.graphics.GraphicsUtil;var d=[0,0,0,0];var c=this.getInnerWidth();var a=this.getInnerHeight();if(this._useBorderShape){d=this.getBorder().getRadii();b.setRoundRectLayout(this._borderShape,this._gfxBorderWidth/2,this._gfxBorderWidth/2,c-this._gfxBorderWidth,a-this._gfxBorderWidth,d)}b.setRoundRectLayout(this._backgroundShape,this._gfxBorderWidth/2,this._gfxBorderWidth/2,c-this._gfxBorderWidth,a-this._gfxBorderWidth,d)},_renderIndicatorSelection:function(){var k=rwt.graphics.GraphicsUtil;var c=this._getIndicatorVirtualPosition();var g=Math.max(c,0);var b=this._getIndicatorLength(c);if(b>0){var f=this._getIndicatorRadii(g,b);var h=g;var i=b;if(g+b==this._getIndicatorFullLength()){i+=this._gfxBorderWidth/2}else{i+=this._separatorWidth}if(h===0){h+=this._gfxBorderWidth/2;i+=this._gfxBorderWidth/2}else{h+=this._gfxBorderWidth}var e=this._isVertical();var a=e?this.getInnerWidth()-this._gfxBorderWidth:i;var m=e?i:this.getInnerHeight()-this._gfxBorderWidth;var l=e?this.getInnerHeight()-(h+i):this._gfxBorderWidth/2;var d=e?this._gfxBorderWidth/2:h;var j=this._indicatorShape;k.setDisplay(this._indicatorShape,true);k.setRoundRectLayout(j,d,l,a,m,f)}else{k.setDisplay(this._indicatorShape,false)}if(this._useSeparator){this._renderSeparator(g,b)}},_renderSeparator:function(d,b){var i=rwt.graphics.GraphicsUtil;var g=b+d==this._getIndicatorFullLength();if(b===0){i.setDisplay(this._separatorEndShape,false);if(this._isIndeterminate()){i.setDisplay(this._separatorStartShape,false)}}else{i.setDisplay(this._separatorEndShape,!g);if(this._isIndeterminate()){i.setDisplay(this._separatorStartShape,d!==0)}var e=d+this._gfxBorderWidth-this._separatorWidth;var f=b+2*this._separatorWidth;if(this._isVertical()){var c=this._gfxBorderWidth;var j=this.getInnerHeight()-(f+e);var a=this.getInnerWidth()-2*this._gfxBorderWidth;var k=this._separatorWidth;var h=this._separatorEndShape;if(!g){i.setRectBounds(h,c,j,a,k)}if(d!==0){j=this.getInnerHeight()-e-this._separatorWidth;h=this._separatorStartShape;i.setRectBounds(h,c,j,a,k)}}else{var c=e+f-this._separatorWidth;var j=this._gfxBorderWidth;var a=this._separatorWidth;var k=this.getInnerHeight()-2*this._gfxBorderWidth;var h=this._separatorEndShape;if(!g){i.setRectBounds(h,c,j,a,k)}if(d!==0){c=e;h=this._separatorStartShape;i.setRectBounds(h,c,j,a,k)}}}},_getIndicatorLength:function(c){var a=this._getIndicatorVirtualLength();var e=this._getIndicatorFullLength();if(this._isIndeterminate()){if(c<0){a+=c}if((c+a)>e){a=e-c}}else{if(this._useBorderShape){var d=this._getIndicatorMinSafeLength();var b=this._getIndicatorMaxSafeLength();if(a<d){if(a>0){a=d}else{a=0}}if(a>b&&a<e){a=b}}}return Math.round(a)},_getIndicatorVirtualLength:function(){var b;if(this._isIndeterminate()){b=rwt.widgets.ProgressBar.UNDETERMINED_SIZE}else{var d=this._getIndicatorFullLength();var c=this._selection-this._minimum;var a=this._maximum-this._minimum;b=(c/a)*d}return b},_getIndicatorVirtualPosition:function(){var a=0;if(this._isIndeterminate()){a=this._computeNextSaveIndicatorPosition()}return a},_computeNextSaveIndicatorPosition:function(){var e=rwt.widgets.ProgressBar.UNDETERMINED_SIZE;var f=this._getIndicatorFullLength();var a=this._indicatorVirtualPosition+2;if(this._useBorderShape){var b=this._getIndicatorMinSafeLength();var d=this._getIndicatorMaxSafeLength();var c=a+e;if(c>0&&c<b){a=b-e}if(a>0&&a<b){a=b}c=a+e;if(c>d&&c<f){a=f-e}if(a>d){a=-e}}else{if(a>=f){a=-e}}this._indicatorVirtualPosition=a;return a},_getIndicatorRadii:function(b,d){var a=[0,0,0,0];if(this._useBorderShape&&d>0){var f=this.getBorder().getRadii();var c=b+d;var e=this._getIndicatorFullLength();if(this._isVertical()){if(b===0){a[2]=f[2];a[3]=f[3]}if(c==e){a[0]=f[0];a[1]=f[1]}}else{if(b===0){a[0]=f[0];a[3]=f[3]}if(c==e){a[1]=f[1];a[2]=f[2]}}}return a},_getIndicatorFullLength:function(){return this._isVertical()?this.getInnerHeight()-2*this._gfxBorderWidth:this.getInnerWidth()-2*this._gfxBorderWidth},_getIndicatorMinSafeLength:function(){var b=this.getBorder().getRadii();var a=this._isVertical()?Math.max(b[2],b[3]):Math.max(b[0],b[3]);a+=this._separatorWidth;a-=Math.floor(this._gfxBorderWidth/2);return a},_getIndicatorMaxSafeLength:function(){var c=this.getBorder().getRadii();var b=this._getIndicatorFullLength();var a=this._isVertical()?b-Math.max(c[0],c[1]):b-Math.max(c[1],c[2]);a-=this._separatorWidth;a+=Math.floor(this._gfxBorderWidth/2);return a}}}); |
| rwt.remote.HandlerRegistry.add($[470],{factory:function(b){var a=new rwt.widgets.ProgressBar();rwt.remote.HandlerUtil.addStatesForStyles(a,b.style);a.setUserData($[23],true);rwt.remote.HandlerUtil.setParent(a,b.parent);return a},destructor:rwt.remote.HandlerUtil.getControlDestructor(),getDestroyableChildren:rwt.remote.HandlerUtil.getDestroyableChildrenFinder(),properties:rwt.remote.HandlerUtil.extendControlProperties([$[266],$[267],$[60],"state"]),propertyHandler:rwt.remote.HandlerUtil.extendControlPropertyHandler({backgroundImage:function(b,a){if(a===null){b.resetBackgroundImageSized()}else{b.setBackgroundImageSized(a)}}}),listeners:rwt.remote.HandlerUtil.extendControlListeners([]),listenerHandler:rwt.remote.HandlerUtil.extendControlListenerHandler({})}); |
| rwt.qx.Class.define($[483],{extend:rwt.widgets.base.Parent,construct:function(){arguments.callee.base.call(this);this.setAppearance("link");this._text="";this._hasSelectionListener=false;this._hyperlinksHaveListeners=false;this._readyToSendChanges=true;this._focusedLinkIndex=-1;this._linksCount=0;this._link=new rwt.widgets.base.HtmlEmbed();this._link.setAppearance("link-text");this.add(this._link);this.setSelectable(false);this.setHideFocus(true);this.__onMouseDown=rwt.util.Functions.bindEvent(this._onMouseDown,this);this.__onMouseOver=rwt.util.Functions.bindEvent(this._onMouseOver,this);this.__onMouseOut=rwt.util.Functions.bindEvent(this._onMouseOut,this);this.__onKeyDown=rwt.util.Functions.bindEvent(this._onKeyDown,this);this.addEventListener($[36],this._onAppear,this);this.addEventListener($[179],this._onChangeEnabled,this);this.addEventListener($[4],this._onKeyPress);this.addEventListener($[120],this._onFocusOut);this._link.addEventListener($[337],this._onChangeHtml,this)},destruct:function(){this._removeEventListeners();delete this.__onMouseDown;delete this.__onMouseOver;delete this.__onMouseOut;delete this.__onKeyDown;this.removeEventListener($[36],this._onAppear,this);this.removeEventListener($[179],this._onChangeEnabled,this);this.removeEventListener($[4],this._onKeyPress);this.removeEventListener($[120],this._onFocusOut);this._link.removeEventListener($[337],this._onChangeHtml,this);this._link.dispose()},members:{_onAppear:function(a){this._link.setTabIndex(null);this._link.setHideFocus(true);this._applyHyperlinksStyleProperties();this._addEventListeners()},_onChangeHtml:function(a){this._applyHyperlinksStyleProperties();this._addEventListeners()},_applyTextColor:function(b,a){arguments.callee.base.call(this,b,a);this._applyHyperlinksStyleProperties()},_onChangeEnabled:function(a){this._applyHyperlinksStyleProperties();this._changeHyperlinksTabIndexProperty()},_getStates:function(){if(!this.__states){this.__states={}}return this.__states},addState:function(a){arguments.callee.base.call(this,a);this._link.addState(a)},removeState:function(a){arguments.callee.base.call(this,a);this._link.removeState(a)},setHasSelectionListener:function(a){this._hasSelectionListener=a},addText:function(a){this._text+=a},addLink:function(c,a){var b=this._getHyperlinkStyle(false);var e=rwt.remote.WidgetManager.getInstance();var d=e.findIdByWidget(this)+"#"+a;this._text+='<span tabIndex="1" ';this._text+='style="';this._text+=$[536]+b.textDecoration+"; ";this._text+='" ';this._text+='id="'+d+'"';this._text+=">";this._text+=c;this._text+="</span>";this._linksCount++},applyText:function(){this._link.setHtml(this._text);if(this._linksCount===0){this.setTabIndex(null)}else{this.setTabIndex(1)}},clear:function(){this._removeEventListeners();this._text="";this._linksCount=0;this._focusedLinkIndex=-1},_applyHyperlinksStyleProperties:function(){var c=this._getHyperlinkStyle(false);var a=this._getHyperlinkElements();for(var b=0;b<a.length;b++){rwt.html.Style.setStyleProperty(a[b],$[61],c.textColor);rwt.html.Style.setTextShadow(a[b],c.textShadow);rwt.html.Style.setStyleProperty(a[b],$[133],c.cursor)}},_changeHyperlinksTabIndexProperty:function(){var a=this._getHyperlinkElements();for(var b=0;b<a.length;b++){if(this.isEnabled()){a[b].tabIndex="1"}else{a[b].tabIndex="-1"}}},_addEventListeners:function(){var a=this._getHyperlinkElements();if(a.length>0&&!this._hyperlinksHaveListeners){for(var b=0;b<a.length;b++){rwt.html.EventRegistration.addEventListener(a[b],$[1],this.__onMouseDown);rwt.html.EventRegistration.addEventListener(a[b],$[3],this.__onMouseOver);rwt.html.EventRegistration.addEventListener(a[b],$[6],this.__onMouseOut);rwt.html.EventRegistration.addEventListener(a[b],$[10],this.__onKeyDown)}this._hyperlinksHaveListeners=true}},_removeEventListeners:function(){var a=this._getHyperlinkElements();if(a.length>0&&this._hyperlinksHaveListeners){for(var b=0;b<a.length;b++){rwt.html.EventRegistration.removeEventListener(a[b],$[1],this.__onMouseDown);rwt.html.EventRegistration.removeEventListener(a[b],$[3],this.__onMouseOver);rwt.html.EventRegistration.removeEventListener(a[b],$[6],this.__onMouseOut);rwt.html.EventRegistration.removeEventListener(a[b],$[10],this.__onKeyDown)}this._hyperlinksHaveListeners=false}},_onMouseDown:function(a){if(this.isEnabled()&&this._isLeftMouseButtonPressed(a)){var c=this._getEventTarget(a);var b=this._getLinkIndex(c);this._setFocusedLink(b);if(this._readyToSendChanges){this._readyToSendChanges=false;rwt.client.Timer.once(function(){this._sendChanges(b)},this,rwt.remote.EventUtil.DOUBLE_CLICK_TIME)}}},_onMouseOver:function(a){var c=this._getEventTarget(a);var b=this._getHyperlinkStyle(true);rwt.html.Style.setStyleProperty(c,$[247],b.textDecoration)},_onMouseOut:function(a){var c=this._getEventTarget(a);var b=this._getHyperlinkStyle(false);rwt.html.Style.setStyleProperty(c,$[247],b.textDecoration)},_isLeftMouseButtonPressed:function(b){var a=false;if(b.which){a=(b.which===1)}else{if(b.button){if(rwt.client.Client.isMshtml()){a=(b.button===1)}else{a=(b.button===0)}}}return a},_onKeyDown:function(a){if(this.isEnabled()&&a.keyCode===13){var c=this._getEventTarget(a);var b=this._getLinkIndex(c);this._sendChanges(b)}},_getLinkIndex:function(b){var c=b.id;var a=c.substr(c.lastIndexOf("#")+1);return parseInt(a,10)},_getHyperlinkStyle:function(c){var a=this._getStates();if(c){a.over=true}else{delete a.over}var b=rwt.theme.AppearanceManager.getInstance();return b.styleFrom("link-hyperlink",a)},_getEventTarget:function(a){var b;if(rwt.client.Client.isMshtml()){b=window.event.srcElement}else{b=a.target}return b},_ontabfocus:function(){if(this._focusedLinkIndex===-1&&this._linksCount>0){this._setFocusedLink(0)}},_onKeyPress:function(a){if(this.isFocused()&&a.getKeyIdentifier()==="Tab"&&this._linksCount>0){var b=this._focusedLinkIndex;if(!a.isShiftPressed()&&b>=0&&b<this._linksCount-1){a.stopPropagation();a.preventDefault();this._setFocusedLink(b+1)}else{if(!a.isShiftPressed()&&b===-1){a.stopPropagation();a.preventDefault();this._setFocusedLink(0)}else{if(a.isShiftPressed()&&b>0&&b<=this._linksCount-1){a.stopPropagation();a.preventDefault();this._setFocusedLink(b-1)}}}}},_onFocusOut:function(a){this._setFocusedLink(-1)},_setFocusedLink:function(a){var b=this._getFocusedHyperlinkElement();if(b!==null){b.blur();b.style.outline="none"}this._focusedLinkIndex=a;b=this._getFocusedHyperlinkElement();if(b!==null){b.focus();b.style.outline="1px dotted"}},_getFocusedHyperlinkElement:function(){var a=null;var c=this._getHyperlinkElements();var b=this._focusedLinkIndex;if(b>=0&&b<c.length){a=c[b]}return a},_getHyperlinkElements:function(){var a;var b=this.getElement();if(b){a=b.getElementsByTagName("span")}else{a=[]}return a},_sendChanges:function(a){if(this._hasSelectionListener){rwt.remote.EventUtil.notifySelected(this,{index:a})}this._readyToSendChanges=true}}}); |
| rwt.remote.HandlerRegistry.add($[483],{factory:function(b){var a=new rwt.widgets.Link();rwt.remote.HandlerUtil.addStatesForStyles(a,b.style);a.setUserData($[23],true);rwt.remote.HandlerUtil.setParent(a,b.parent);return a},destructor:rwt.remote.HandlerUtil.getControlDestructor(),getDestroyableChildren:rwt.remote.HandlerUtil.getDestroyableChildrenFinder(),properties:rwt.remote.HandlerUtil.extendControlProperties(["text"]),propertyHandler:rwt.remote.HandlerUtil.extendControlPropertyHandler({text:function(e,d){var b=rwt.util.Encoding;e.clear();for(var c=0;c<d.length;c++){var f=b.escapeText(d[c][0],false);f=b.replaceNewLines(f,$[97]);var a=d[c][1];if(a!==null){e.addLink(f,a)}else{e.addText(f)}}e.applyText()}}),listeners:rwt.remote.HandlerUtil.extendControlListeners([$[30]]),listenerHandler:rwt.remote.HandlerUtil.extendControlListenerHandler({})}); |
| rwt.qx.Class.define("rwt.widgets.base.Scrollable",{extend:rwt.widgets.base.Parent,construct:function(a){arguments.callee.base.call(this);this._clientArea=a;this._horzScrollBar=new rwt.widgets.base.ScrollBar(true);this._vertScrollBar=new rwt.widgets.base.ScrollBar(false);this._blockScrolling=false;this._internalChangeFlag=false;this.add(this._clientArea);this.add(this._horzScrollBar);this.add(this._vertScrollBar);this._configureScrollBars();this._configureClientArea();this.__onscroll=rwt.util.Functions.bindEvent(this._onscroll,this)},destruct:function(){var b=this._clientArea._getTargetNode();if(b){var a=rwt.html.EventRegistration;a.removeEventListener(b,$[21],this.__onscroll);delete this.__onscroll}this._clientArea=null;this._horzScrollBar=null;this._vertScrollBar=null},events:{userScroll:$[11]},statics:{_nativeWidth:null,getNativeScrollBarWidth:function(){if(this._nativeWidth===null){var a=document.createElement("div");a.style.width="100px";a.style.height="100px";a.style.overflow=$[21];a.style.visibility=$[9];document.body.appendChild(a);this._nativeWidth=a.offsetWidth-a.clientWidth;document.body.removeChild(a)}return this._nativeWidth}},members:{setScrollBarsVisible:function(a,b){this._horzScrollBar.setDisplay(a);this._vertScrollBar.setDisplay(b);var c=$[9];if(a&&b){c=$[21]}else{if(a){c=$[96]}else{if(b){c=$[89]}}}this._clientArea.setOverflow(c);this._layoutX();this._layoutY()},setHBarSelection:function(a){this._internalChangeFlag=true;this._horzScrollBar.setValue(a);this._internalChangeFlag=false},setVBarSelection:function(a){this._internalChangeFlag=true;this._vertScrollBar.setValue(a);this._internalChangeFlag=false},setBlockScrolling:function(a){this._blockScrolling=a},getVerticalBar:function(){return this._vertScrollBar},getHorizontalBar:function(){return this._horzScrollBar},isVerticalBarVisible:function(){return this._vertScrollBar.getDisplay()},isHorizontalBarVisible:function(){return this._horzScrollBar.getDisplay()},_configureClientArea:function(){this._clientArea.setOverflow($[21]);this._clientArea.setLeft(0);this._clientArea.setTop(0);this._clientArea.addEventListener($[65],this._onClientCreate,this);this._clientArea.addEventListener($[36],this._onClientAppear,this);this._clientArea._layoutPost=rwt.util.Functions.bindEvent(this._onClientLayout,this)},_configureScrollBars:function(){var a=function(b){b.stopPropagation()};this._horzScrollBar.setLeft(0);this._horzScrollBar.addEventListener($[72],a);this._vertScrollBar.setTop(0);this._vertScrollBar.addEventListener($[72],a);this._horzScrollBar.addEventListener($[118],this._onHorzScrollBarChangeValue,this);this._vertScrollBar.addEventListener($[118],this._onVertScrollBarChangeValue,this)},_applyWidth:function(b,a){arguments.callee.base.call(this,b,a);this._layoutX()},_applyHeight:function(b,a){arguments.callee.base.call(this,b,a);this._layoutY()},_applyBorder:function(b,a){arguments.callee.base.call(this,b,a);this._layoutX();this._layoutY()},_layoutX:function(){var a=this.getWidth()-this.getFrameWidth();if(this._vertScrollBar.getDisplay()){a-=this._vertScrollBar.getWidth()}this._clientArea.setWidth(a);this._vertScrollBar.setLeft(a);this._horzScrollBar.setWidth(a)},_layoutY:function(){var a=this.getHeight()-this.getFrameHeight();if(this._horzScrollBar.getDisplay()){a-=this._horzScrollBar.getHeight()}this._clientArea.setHeight(a);this._vertScrollBar.setHeight(a);this._horzScrollBar.setTop(a)},_onClientCreate:function(b){this._clientArea.prepareEnhancedBorder();this._clientArea.setContainerOverflow(false);var c=this._clientArea._getTargetNode();var a=rwt.html.EventRegistration;a.addEventListener(c,$[21],this.__onscroll);rwt.html.Scroll.disableScrolling(this._clientArea.getElement())},_onClientLayout:rwt.util.Variant.select($[0],{"default":function(){var d=rwt.widgets.base.Scrollable.getNativeScrollBarWidth();var e=this._clientArea._getTargetNode();var c=this._clientArea.getElement();var f=this._clientArea.getOverflow();var b=parseInt(c.style.width,10);var a=parseInt(c.style.height,10);if(f===$[21]||f===$[89]){b+=d}if(f===$[21]||f===$[96]){a+=d}e.style.width=b+"px";e.style.height=a+"px"},newmshtml:function(){var d=rwt.widgets.base.Scrollable.getNativeScrollBarWidth();var e=this._clientArea._getTargetNode();var c=this._clientArea.getElement();var f=this._clientArea.getOverflow();var b=parseInt(c.style.width,10);var a=parseInt(c.style.height,10);if(f===$[21]||f===$[89]){b+=(2*d)}if(f===$[21]||f===$[96]){a+=(2*d)}e.style.width=b+"px";e.style.height=a+"px"}}),_onHorzScrollBarChangeValue:function(){if(this._isCreated){this._syncClientArea(true,false)}if(!this._internalChangeFlag){this.dispatchSimpleEvent($[209],true)}},_onVertScrollBarChangeValue:function(){if(this._isCreated){this._syncClientArea(false,true)}if(!this._internalChangeFlag){this.dispatchSimpleEvent($[209],false)}},_onClientAppear:function(){this._internalChangeFlag=true;this._syncClientArea(true,true);this._internalChangeFlag=false},_onscroll:function(a){if(!this._internalChangeFlag){rwt.event.EventHandlerUtil.stopDomEvent(a);var c=this._blockScrolling||!this._horzScrollBar.getDisplay();var b=this._blockScrolling||!this._vertScrollBar.getDisplay();this._internalChangeFlag=true;this._syncClientArea(c,b);this._internalChangeFlag=false;this._syncScrollBars()}},_syncClientArea:function(d,a){if(d){var c=this._horzScrollBar.getValue();if(this._clientArea.getScrollLeft()!==c){this._clientArea.setScrollLeft(c)}if(this._clientArea.getScrollLeft()!==c){this.addToQueue("hSync")}}if(a){var b=this._vertScrollBar.getValue();if(this._clientArea.getScrollTop()!==b){this._clientArea.setScrollTop(b)}if(this._clientArea.getScrollTop()!==b){this.addToQueue("vSync")}}},_layoutPost:function(a){arguments.callee.base.call(this,a);if(a.hSync||a.vSync){rwt.client.Timer.once(function(){this._internalChangeFlag=true;this._syncClientArea(a.hSync,a.vSync);this._internalChangeFlag=false},this,0)}},_syncScrollBars:function(){var b=this._clientArea.getScrollLeft();this._horzScrollBar.setValue(b);var a=this._clientArea.getScrollTop();this._vertScrollBar.setValue(a)}}}); |
| rwt.qx.Class.define($[457],{extend:rwt.widgets.base.Scrollable,construct:function(){arguments.callee.base.call(this,new rwt.widgets.base.Parent());this.setScrollBarsVisible(false,false);this._clientArea.addEventListener($[43],this._onMouseWheel,this);this._clientArea.addEventListener($[4],this._onKeyPress,this);if(rwt.client.Client.supportsTouch()){this._clientArea.addEventListener($[1],this._onTouch,this)}this.addEventListener($[209],this._onUserScroll);this._content=null;this._requestTimerRunning=false;this._showFocusedControl=false;this._focusRoot=null;this.addEventListener($[181],this._onChangeParent,this);this.setAppearance("scrolledcomposite")},members:{setShowFocusedControl:function(a){this._showFocusedControl=a},setContent:function(a){if(this._content!=null){this._content.removeEventListener($[181],this._onContentRemove,this);this._content.removeEventListener($[71],this._onContentResize,this);this._content.removeEventListener($[76],this._onContentResize,this);this._clientArea.remove(this._content)}this._content=a;this._onContentResize();if(this._content!=null){this._clientArea.add(this._content);this._content.addEventListener($[181],this._onContentRemove,this);this._content.addEventListener($[71],this._onContentResize,this);this._content.addEventListener($[76],this._onContentResize,this)}},_onContentRemove:function(){this.setContent(null)},_onContentResize:function(){if(this._content!==null&&typeof this._content.getWidth()===$[56]&&typeof this._content.getHeight()===$[56]){var b=this._content.getWidth();var a=this._content.getHeight();this._horzScrollBar.setMaximum(b);this._vertScrollBar.setMaximum(a)}},_onChangeParent:function(a){if(this._focusRoot!=null){this._focusRoot.removeEventListener($[239],this._onChangeFocusedChild,this)}this._focusRoot=this.getFocusRoot();if(this._focusRoot!=null){this._focusRoot.addEventListener($[239],this._onChangeFocusedChild,this)}},_onMouseWheel:function(a){this.setBlockScrolling(false)},_onTouch:function(a){this.setBlockScrolling(false)},_onKeyPress:function(a){switch(a.getKeyIdentifier()){case"Left":case"Up":case $[35]:case"Down":case $[40]:case $[45]:case"End":case"Home":this.setBlockScrolling(false);a.stopPropagation();break}},_onUserScroll:function(a){var c=rwt.remote.Server.getInstance();var e=a?this._horzScrollBar:this._vertScrollBar;var b=c.getRemoteObject(this);var d=a?"horizontalBar.selection":"verticalBar.selection";b.set(d,e.getValue());if(e.getHasSelectionListener()){if(a){c.onNextSend(this._sendHorizontalScrolled,this)}else{c.onNextSend(this._sendVerticalScrolled,this)}c.sendDelayed(500)}},_sendVerticalScrolled:function(){var a=rwt.remote.Server.getInstance();a.getRemoteObject(this._vertScrollBar).notify($[30])},_sendHorizontalScrolled:function(){var a=rwt.remote.Server.getInstance();a.getRemoteObject(this._horzScrollBar).notify($[30])},_onChangeFocusedChild:function(a){var b=a.getValue();this.setBlockScrolling(!this._showFocusedControl&&b!==this)}}}); |
| rwt.remote.HandlerRegistry.add($[457],{factory:function(b){var a=new rwt.widgets.ScrolledComposite();rwt.remote.HandlerUtil.addStatesForStyles(a,b.style);a.setUserData($[23],true);rwt.remote.HandlerUtil.setParent(a,b.parent);return a},destructor:rwt.remote.HandlerUtil.getControlDestructor(),getDestroyableChildren:rwt.remote.HandlerUtil.getDestroyableChildrenFinder(),properties:rwt.remote.HandlerUtil.extendControlProperties(["origin",$[59],"showFocusedControl"]),propertyHandler:rwt.remote.HandlerUtil.extendControlPropertyHandler({bounds:function(b,a){rwt.remote.HandlerUtil.getControlPropertyHandler($[87])(b,a);b.setClipWidth(a[2]);b.setClipHeight(a[3])},origin:function(b,a){b.setHBarSelection(a[0]);b.setVBarSelection(a[1])},content:function(b,a){rwt.remote.HandlerUtil.callWithTarget(a,function(c){b.setContent(c)})},scrollBarsVisible:function(b,a){b.setScrollBarsVisible(a[0],a[1])}}),listeners:rwt.remote.HandlerUtil.extendControlListeners([]),listenerHandler:rwt.remote.HandlerUtil.extendControlListenerHandler({scrollBarsSelection:function(b,a){b.setHasSelectionListener(a)}})}); |
| rwt.qx.Class.define($[412],{extend:rwt.widgets.base.Parent,construct:function(){arguments.callee.base.call(this);this._hoverItem=null;this.setAppearance("toolbar");this.setOverflow($[9]);this.initTabIndex();this.addEventListener($[68],this._onFocus);this.addEventListener("blur",this._onBlur);this.addEventListener($[3],this._onMouseOver);this.addEventListener($[4],this._onKeyPress);this.addEventListener($[10],this._onKeyDown);this.addEventListener($[34],this._onKeyUp)},properties:{tabIndex:{refine:true,init:1}},members:{_isRelevantEvent:function(a){var b=a.getTarget();return this._isToolItem(b)||b===this},_isToolItem:function(a){return a instanceof rwt.widgets.ToolItem&&a.getParent()===this},_onMouseOver:function(a){var b=a.getTarget();if(this._hoverItem!=null&&this._hoverItem!=b){this._hoverItem.removeState("over");this._hoverItem=null}if(this._isToolItem(b)){this._hoverItem=b;this._hoverItem.addState("over")}},_onFocus:function(a){if(this._hoverItem==null){this._hoverItem=this.getFirstChild()}if(this._hoverItem!=null){this._hoverItem.addState("over")}},_onBlur:function(a){if(this._hoverItem!=null){this._hoverItem.removeState("over")}},_onKeyPress:function(a){if(this._isRelevantEvent(a)){switch(a.getKeyIdentifier()){case"Left":this._hoverNext(true);break;case $[35]:this._hoverNext(false);break}}},_onKeyDown:function(a){if(this._hoverItem!=null&&this._isRelevantEvent(a)){this._hoverItem._onKeyDown(a)}},_onKeyUp:function(a){if(this._hoverItem!=null&&this._isRelevantEvent(a)){this._hoverItem._onKeyUp(a)}},_hoverNext:function(a){if(this._hoverItem!=null){this._hoverItem.removeState("over");do{if(a){this._hoverItem=this._hoverItem.getPreviousSibling();if(this._hoverItem==null){this._hoverItem=this.getLastChild()}}else{this._hoverItem=this._hoverItem.getNextSibling();if(this._hoverItem==null){this._hoverItem=this.getFirstChild()}}}while(!(this._isToolItem(this._hoverItem)&&this._hoverItem.isEnabled()));this._hoverItem.addState("over")}}}}); |
| rwt.remote.HandlerRegistry.add($[412],{factory:function(b){var a=new rwt.widgets.ToolBar();rwt.remote.HandlerUtil.addStatesForStyles(a,b.style);a.setUserData($[23],true);rwt.remote.HandlerUtil.setParent(a,b.parent);return a},destructor:rwt.remote.HandlerUtil.getControlDestructor(),getDestroyableChildren:rwt.remote.HandlerUtil.getDestroyableChildrenFinder(),properties:rwt.remote.HandlerUtil.extendControlProperties([]),propertyHandler:rwt.remote.HandlerUtil.extendControlPropertyHandler({}),listeners:rwt.remote.HandlerUtil.extendControlListeners([]),listenerHandler:rwt.remote.HandlerUtil.extendControlListenerHandler({})}); |
| rwt.remote.HandlerRegistry.add($[377],{factory:function(b){var d=rwt.remote.HandlerUtil.createStyleMap(b.style);var c=$[300];if(d.PUSH){c="push"}else{if(d.CHECK){c=$[108]}else{if(d.RADIO){c=$[116]}else{if(d.DROP_DOWN){c="dropDown"}}}}var a;rwt.remote.HandlerUtil.callWithTarget(b.parent,function(e){if(c===$[300]){a=new rwt.widgets.ToolItemSeparator(e.hasState($[140]),e.hasState($[225]))}else{a=new rwt.widgets.ToolItem(c);a.setNoRadioGroup(e.hasState($[338]))}e.addAt(a,b.index);rwt.remote.HandlerUtil.addDestroyableChild(e,a);a.setUserData($[103],e)});rwt.remote.HandlerUtil.addStatesForStyles(a,b.style);return a},destructor:rwt.remote.HandlerUtil.getWidgetDestructor(),properties:[$[87],$[281],$[243],$[86],$[113],"text",$[15],"hotImage","control",$[60]],propertyHandler:{bounds:rwt.remote.HandlerUtil.getControlPropertyHandler($[87]),visible:function(b,a){b.setVisibility(a)},toolTip:rwt.remote.HandlerUtil.getControlPropertyHandler($[113]),text:function(c,b){var a=rwt.util.Encoding;var d=a.escapeText(b,false);c.setText(d)},image:function(b,a){if(a===null){b.setImage(null)}else{b.setImage(a[0],a[1],a[2])}},hotImage:function(b,a){if(a===null){b.setHotImage(null)}else{b.setHotImage(a[0],a[1],a[2])}},control:function(b,a){b.setLineVisible(a===null)}},listeners:[$[30]]}); |
| rwt.qx.Class.define($[488],{extend:rwt.widgets.base.Parent,construct:function(a){arguments.callee.base.call(this);this.setAppearance("scale");this._horizontal=a;this._hasSelectionListener=false;this._readyToSendChanges=true;this._selection=0;this._minimum=0;this._maximum=100;this._increment=1;this._pageIncrement=10;this._pxStep=1.34;this._line=new rwt.widgets.base.Image();if(this._horizontal){this._line.addState(rwt.widgets.Scale.STATE_HORIZONTAL)}this._line.setAppearance("scale-line");this._line.setResizeToInner(true);this._line.addEventListener($[1],this._onLineMouseDown,this);this.add(this._line);this._thumb=new rwt.widgets.base.BasicButton("push",true);if(this._horizontal){this._thumb.addState(rwt.widgets.Scale.STATE_HORIZONTAL)}this._thumb.setAppearance($[372]);this._thumb.addEventListener($[1],this._onThumbMouseDown,this);this._thumb.addEventListener($[28],this._onThumbMouseMove,this);this._thumb.addEventListener($[5],this._onThumbMouseUp,this);rwt.widgets.util.WidgetUtil.fixIEBoxHeight(this._thumb);this.add(this._thumb);this._thumbOffset=0;if(this._horizontal){this.addEventListener($[71],this._onChangeWidth,this)}else{this.addEventListener($[76],this._onChangeHeight,this)}this.addEventListener($[42],this._onContextMenu,this);this.addEventListener($[4],this._onKeyPress,this);this.addEventListener($[43],this._onMouseWheel,this)},destruct:function(){this._line.removeEventListener($[1],this._onLineMouseDown,this);this._thumb.removeEventListener($[1],this._onThumbMouseDown,this);this._thumb.removeEventListener($[28],this._onThumbMouseMove,this);this._thumb.removeEventListener($[5],this._onThumbMouseUp,this);if(this._horizontal){this.removeEventListener($[71],this._onChangeWidth,this)}else{this.removeEventListener($[76],this._onChangeHeight,this)}this.removeEventListener($[42],this._onContextMenu,this);this.removeEventListener($[4],this._onKeyPress,this);this.removeEventListener($[43],this._onMouseWheel,this);this._disposeObjects("_line","_thumb");this._thumb=null},events:{selectionChanged:$[11],minimumChanged:$[11],maximumChanged:$[11]},statics:{STATE_HORIZONTAL:$[37],PADDING:8,SCALE_LINE_OFFSET:9,THUMB_OFFSET:9,HALF_THUMB:5,_isNoModifierPressed:function(a){return !a.isCtrlPressed()&&!a.isShiftPressed()&&!a.isAltPressed()&&!a.isMetaPressed()}},members:{_onChangeWidth:function(a){this._line.setWidth(this.getWidth()-2*rwt.widgets.Scale.PADDING);this._updateStep();this._updateThumbPosition()},_onChangeHeight:function(a){this._line.setHeight(this.getHeight()-2*rwt.widgets.Scale.PADDING);this._updateStep();this._updateThumbPosition()},_onContextMenu:function(a){var b=this.getContextMenu();if(b!=null){b.setLocation(a.getPageX(),a.getPageY());b.setOpener(this);b.show();a.stopPropagation()}},_onKeyPress:function(a){var c=a.getKeyIdentifier();var b=null;if(rwt.widgets.Scale._isNoModifierPressed(a)){switch(c){case"Left":b=this._selection-this._increment;a.preventDefault();a.stopPropagation();break;case"Down":if(this._horizontal){b=this._selection-this._increment}else{b=this._selection+this._increment}a.preventDefault();a.stopPropagation();break;case $[35]:b=this._selection+this._increment;a.preventDefault();a.stopPropagation();break;case"Up":if(this._horizontal){b=this._selection+this._increment}else{b=this._selection-this._increment}a.preventDefault();a.stopPropagation();break;case"Home":b=this._minimum;a.preventDefault();a.stopPropagation();break;case"End":b=this._maximum;a.preventDefault();a.stopPropagation();break;case $[45]:if(this._horizontal){b=this._selection-this._pageIncrement}else{b=this._selection+this._pageIncrement}a.preventDefault();a.stopPropagation();break;case $[40]:if(this._horizontal){b=this._selection+this._pageIncrement}else{b=this._selection-this._pageIncrement}a.preventDefault();a.stopPropagation();break}if(b!=null){this.setSelection(b);this._scheduleSendChanges()}}},_onMouseWheel:function(a){if(this.getFocused()){a.preventDefault();a.stopPropagation();var b=Math.round(a.getWheelDelta());this.setSelection(this._selection-b);this._scheduleSendChanges()}},_onLineMouseDown:function(b){var d;var a;var c;if(b.isLeftButtonPressed()){if(this._horizontal){d=this._thumb.getLeft()+rwt.widgets.Scale.HALF_THUMB;a=b.getPageX()-rwt.html.Location.getLeft(this.getElement())}else{d=this._thumb.getTop()+rwt.widgets.Scale.HALF_THUMB;a=b.getPageY()-rwt.html.Location.getTop(this.getElement())}if(a>d){c=this._selection+this._pageIncrement}else{c=this._selection-this._pageIncrement}this.setSelection(c);this._scheduleSendChanges()}},_onThumbMouseDown:function(b){var a;if(b.isLeftButtonPressed()){if(this._horizontal){a=b.getPageX()-rwt.html.Location.getLeft(this.getElement());this._thumbOffset=a-this._thumb.getLeft()}else{a=b.getPageY()-rwt.html.Location.getTop(this.getElement());this._thumbOffset=a-this._thumb.getTop()}this._thumb.setCapture(true)}},_onThumbMouseMove:function(b){var a;if(this._thumb.getCapture()){if(this._horizontal){a=b.getPageX()-rwt.html.Location.getLeft(this.getElement())}else{a=b.getPageY()-rwt.html.Location.getTop(this.getElement())}var c=this._getSelectionFromThumbPosition(a-this._thumbOffset);if(this._selection!=c){this.setSelection(c);this._scheduleSendChanges()}}},_onThumbMouseUp:function(a){this._thumb.setCapture(false)},_updateStep:function(){var a=rwt.widgets.Scale.PADDING+rwt.widgets.Scale.HALF_THUMB;if(this._horizontal){this._pxStep=(this.getWidth()-2*a)/(this._maximum-this._minimum)}else{this._pxStep=(this.getHeight()-2*a)/(this._maximum-this._minimum)}},_updateThumbPosition:function(){var a=rwt.widgets.Scale.PADDING+this._pxStep*(this._selection-this._minimum);if(this._horizontal){this._thumb.setLeft(a)}else{this._thumb.setTop(a)}},_getSelectionFromThumbPosition:function(a){var b=(a-rwt.widgets.Scale.PADDING)/this._pxStep+this._minimum;return this._normalizeSelection(Math.round(b))},_normalizeSelection:function(b){var a=b;if(b<this._minimum){a=this._minimum}if(b>this._maximum){a=this._maximum}return a},_scheduleSendChanges:function(){if(this._readyToSendChanges){this._readyToSendChanges=false;rwt.client.Timer.once(this._sendChanges,this,500)}},_sendChanges:function(){if(!rwt.remote.EventUtil.getSuspended()){var c=rwt.remote.WidgetManager.getInstance();var a=rwt.remote.Server.getInstance();var b=c.findIdByWidget(this);a.addParameter(b+$[170],this._selection);if(this._hasSelectionListener){rwt.remote.EventUtil.notifySelected(this)}this._readyToSendChanges=true}},setHasSelectionListener:function(a){this._hasSelectionListener=a},setSelection:function(a){this._selection=this._normalizeSelection(a);this._updateThumbPosition();this.dispatchSimpleEvent($[284])},setMinimum:function(a){this._minimum=a;this._updateStep();this._updateThumbPosition();this.dispatchSimpleEvent($[405])},setMaximum:function(a){this._maximum=a;this._updateStep();this._updateThumbPosition();this.dispatchSimpleEvent($[434])},setIncrement:function(a){this._increment=a},setPageIncrement:function(a){this._pageIncrement=a},_visualizeFocus:function(){arguments.callee.base.call(this);this._thumb.addState($[75])},_visualizeBlur:function(){arguments.callee.base.call(this);this._thumb.removeState($[75])}}}); |
| rwt.remote.HandlerRegistry.add($[488],{factory:function(b){var c=b.style.indexOf($[330])!=-1;var a=new rwt.widgets.Scale(c);rwt.remote.HandlerUtil.addStatesForStyles(a,b.style);a.setUserData($[23],true);rwt.remote.HandlerUtil.setParent(a,b.parent);return a},destructor:rwt.remote.HandlerUtil.getControlDestructor(),getDestroyableChildren:rwt.remote.HandlerUtil.getDestroyableChildrenFinder(),properties:rwt.remote.HandlerUtil.extendControlProperties([$[266],$[267],$[60],$[311],$[315]]),propertyHandler:rwt.remote.HandlerUtil.extendControlPropertyHandler({}),listeners:rwt.remote.HandlerUtil.extendControlListeners([$[30]]),listenerHandler:rwt.remote.HandlerUtil.extendControlListenerHandler({})}); |
| rwt.qx.Class.define("rwt.widgets.ToolItemSeparator",{extend:rwt.widgets.base.Parent,construct:function(b,a){arguments.callee.base.call(this);this._line=null;this._control=null;this._vertical=a;if(b){this._line=new rwt.widgets.base.Terminator();if(a){this._line.addState($[31])}this._line.setAppearance("toolbar-separator-line");this.add(this._line)}this.setStyleProperty($[184],"0px");this.setStyleProperty($[301],"0px")},properties:{appearance:{refine:true,init:"toolbar-separator"}},members:{_applyWidth:function(e,d){arguments.callee.base.call(this,e,d);if(this._line&&!this._vertical){var c=this._line.getWidth();var b=e*0.5;var a=Math.floor(b-(c*0.5));this._line.setLeft(a)}},_applyHeight:function(e,c){arguments.callee.base.call(this,e,c);if(this._line&&this._vertical){var d=this._line.getHeight();var a=e*0.5;var b=Math.floor(a-(d*0.5));this._line.setTop(b)}},setLineVisible:function(a){if(this._line){this._line.setVisibility(a)}}}}); |
| rwt.qx.Class.define("rwt.theme.BorderDefinitions",{type:$[152],statics:{getDefinition:function(a){return this._definitions[a]},_definitions:{inset:{color:[$[19],$[33],$[33],$[19]],innerColor:[$[232],$[145],$[145],$[232]],width:2},thinInset:{color:[$[19],$[33],$[33],$[19]],width:1},outset:{color:[$[145],$[232],$[232],$[145]],innerColor:[$[33],$[19],$[19],$[33]],width:2},thinOutset:{color:[$[33],$[19],$[19],$[33]],width:1},groove:{color:[$[19],$[33],$[33],$[19]],innerColor:[$[33],$[19],$[19],$[33]],width:2},ridge:{color:[$[33],$[19],$[19],$[33]],innerColor:[$[19],$[33],$[33],$[19]],width:2},shadow:{width:1,color:[$[19],$[19],$[19],$[19]]},verticalDivider:{width:[1,0,1,0],color:[$[19],null,$[33],null]},horizontalDivider:{width:[0,1,0,1],color:[null,$[19],null,$[33]]},"separator.shadowin.horizontal.border":{width:[1,0,1,0],color:[$[145],null,$[33]]},"separator.shadowin.vertical.border":{width:[0,1,0,1],color:[null,$[33],null,$[145]]},"separator.shadowout.horizontal.border":{width:[1,0,1,0],color:[$[33],null,$[19],null]},"separator.shadowout.vertical.border":{width:[0,1,0,1],color:[null,$[19],null,$[33]]}}}}); |
| rwt.qx.Class.define("rwt.widgets.base.BasicList",{extend:rwt.widgets.base.Scrollable,construct:function(b){arguments.callee.base.call(this,new rwt.widgets.base.VerticalBoxLayout());this.setAppearance("list");this.setTabIndex(1);this._manager=new rwt.widgets.util.SelectionManager(this._clientArea);this.addEventListener($[3],this._onmouseover);this.addEventListener($[1],this._onmousedown);this.addEventListener($[5],this._onmouseup);this.addEventListener($[4],this._onkeypress);this.addEventListener($[4],this._onkeyinput);this.initOverflow();this.initTabIndex();this._pressedString="";this._lastKeyPress=0;this._itemWidth=0;this._itemHeight=0;this._markupEnabled=false;var a=this.getManager();a.setMultiSelection(b);a.setDragSelection(false);this.addEventListener($[48],this._ondblclick,this)},destruct:function(){this.removeEventListener($[48],this._ondblclick,this);this._disposeObjects($[287])},members:{setMarkupEnabled:function(a){this._markupEnabled=a},getManager:function(){return this._manager},getPreferredWidth:function(){var b=0;var c=this.getItems();for(var d=0;d<c.length;d++){var a=c[d].getPaddingLeft()+c[d].getPaddingRight();var e=c[d].getPreferredBoxWidth()+a;b=Math.max(b,e)}b+=this._vertScrollBar.getWidth();return b},isRelevantEvent:function(a){var b=a.getTarget();while(b!=null&&b!==this){b=b.getParent()}return b===this},getListItemTarget:function(a){while(a!=null&&a.getParent()!=this._clientArea){a=a.getParent()}return a},getSelectedItem:function(){return this._manager.getSelectedItems()[0]||null},getSelectedItems:function(){return this._manager.getSelectedItems()},_onmouseover:function(a){var b=this.getListItemTarget(a.getTarget());if(b){this._manager.handleMouseOver(b,a)}},_onmousedown:function(a){if(!this._isHyperlinkTarget(a)){var b=this.getListItemTarget(a.getTarget());if(b){this._manager.handleMouseDown(b,a)}}},_onmouseup:function(a){if(!this._isHyperlinkTarget(a)){var b=this.getListItemTarget(a.getTarget());if(b){this._manager.handleMouseUp(b,a)}}},_onclick:function(a){if(!this._isHyperlinkTarget(a)){var b=this.getListItemTarget(a.getTarget());if(b){this._manager.handleClick(b,a)}}},_ondblclick:function(a){if(!this._isHyperlinkTarget(a)){var b=this.getListItemTarget(a.getTarget());if(b){this._manager.handleDblClick(b,a)}}},_onkeypress:function(a){this._manager.handleKeyPress(a)},_onkeyinput:function(d){if(!d.isAltPressed()&&!d.isCtrlPressed()){if(d.getCharCode()!==0){if(((new Date()).valueOf()-this._lastKeyPress)>1000){this._pressedString=""}this._pressedString+=String.fromCharCode(d.getCharCode());var a=this.findString(this._pressedString,null);if(a){var c=this._manager._getChangeValue();var b=this._manager.getFireChange();this._manager.setFireChange(false);this._manager._deselectAll();this._manager.setItemSelected(a,true);this._manager.setAnchorItem(a);this._manager.setLeadItem(a);a.scrollIntoView();this._manager.setFireChange(b);if(b&&this._manager._hasChanged(c)){this._manager._dispatchChange()}}this._lastKeyPress=(new Date()).valueOf();d.preventDefault()}}},findString:function(b,a){return this._findItem(b,a||0)},_findItem:function(d,a){var b=this.getItems();if(a==null){a=b.indexOf(this.getSelectedItem());if(a==-1){a=0}}for(var c=a;c<b.length;c++){if(b[c].matchesString(d)){return b[c]}}for(var c=0;c<a;c++){if(b[c].matchesString(d)){return b[c]}}return null},setItems:function(f){var e=this._escapeItems(f);var c=this.getManager();var k=c.getLeadItem();var g=c.getAnchorItem();var a=c.getSelectedItems();var h=this.getItems();for(var d=0;d<e.length;d++){if(d<h.length){h[d].setLabel(e[d])}else{var j=new rwt.widgets.ListItem();j.addEventListener($[3],this._onListItemMouseOver,this);j.addEventListener($[6],this._onListItemMouseOut,this);j.setWidth(this._itemWidth);j.setHeight(this._itemHeight);j.setContextMenu(this.getContextMenu());j.setTabIndex(null);j.setLabel(e[d]);if(d%2===0){j.addState("even")}if(this._customVariant!==null){j.addState(this._customVariant)}this._clientArea.add(j)}}var b=null;while(this._clientArea.getChildrenLength()>e.length){b=this._clientArea.getLastChild();b.removeEventListener($[3],this._onListItemMouseOver,this);b.removeEventListener($[6],this._onListItemMouseOut,this);b._isDisplayable=true;b.destroy()}c.setSelectedItems(a);c.setLeadItem(k);if(c.getMultiSelection()){c.setAnchorItem(g)}this._updateScrollDimension()},_escapeItems:function(b){var a=b;if(!this._markupEnabled){var c=rwt.util.Encoding;for(var d=0;d<a.length;d++){a[d]=c.replaceNewLines(a[d]," ");a[d]=c.escapeText(a[d],false);a[d]=c.replaceWhiteSpaces(a[d])}}return a},getItems:function(){return this.getManager().getItems()},getItemsCount:function(){return this.getItems().length},getItemIndex:function(a){return this._clientArea.indexOf(a)},selectItem:function(a){if(a==-1){this.getManager().deselectAll()}else{var b=this.getItems()[a];this.getManager().setSelectedItem(b);if(this._clientArea.isCreated()&&this._clientArea.isDisplayable()){this.getManager().scrollItemIntoView(b,true)}}},selectItems:function(a){var c=this.getManager();c.deselectAll();for(var b=0;b<a.length;b++){var d=this.getItems()[a[b]];c.setItemSelected(d,true)}},focusItem:function(b){if(b==-1){this.getManager().setLeadItem(null)}else{var a=this.getItems();this.getManager().setLeadItem(a[b])}},selectAll:function(){if(this.getManager().getMultiSelection()===true){this.getManager().selectAll()}},setItemDimensions:function(d,a){this._itemWidth=d;this._itemHeight=a;var b=this.getItems();for(var c=0;c<b.length;c++){b[c].setWidth(this._itemWidth);b[c].setHeight(this._itemHeight)}this._vertScrollBar.setIncrement(a);this._updateScrollDimension()},_updateScrollDimension:function(){var a=this.getItems().length;this._horzScrollBar.setMaximum(this._itemWidth);this._vertScrollBar.setMaximum(this._itemHeight*a)},setCustomVariant:function(b){if(this._customVariant!==null){var a=this._customVariant;this._clientArea.forEachChild(function(){this.removeState(a)})}this._clientArea.forEachChild(function(){this.addState(b)});arguments.callee.base.call(this,b)},_onListItemMouseOver:function(a){a.getTarget().addState("over")},_onListItemMouseOut:function(a){a.getTarget().removeState("over")},_isHyperlinkTarget:function(a){return a.getDomTarget().tagName.toLowerCase()==="a"}}}); |
| rwt.qx.Class.define($[459],{extend:rwt.widgets.base.Parent,construct:function(b){arguments.callee.base.call(this);this._ccombo=b===true;this._hasSelectionListener=false;this._hasDefaultSelectionListener=false;this._hasModifyListener=false;this._isModified=false;this._selected=null;this._editable=true;this._dropped=false;this._borderWidth=0;this._selectionStart=0;this._selectionLength=0;this._itemHeight=20;this._visibleItemCount=5;this._field=new rwt.widgets.base.BasicText();this._field.setTabIndex(null);this._field.setAllowStretchY(true);this.add(this._field);this._button=new rwt.widgets.base.Button();this._button.setTabIndex(null);this._button.setHeight("100%");this.add(this._button);this._list=new rwt.widgets.base.BasicList(false);this._list.setTabIndex(null);this._list.setDisplay(false);this._blockMouseOver=false;this._list.addEventListener($[209],function(){this._blockMouseOver=true;rwt.client.Timer.once(function(){this._blockMouseOver=false},this,300)},this);this._manager=this._list.getManager();this._manager.setMultiSelection(false);this._manager.setDragSelection(false);this._manager.scrollItemIntoView=this._scrollItemIntoView;this.setHideFocus(true);var a=rwt.widgets.base.ClientDocument.getInstance();a.addEventListener($[210],this._onBlur,this);if(this._ccombo){this.setAppearance("ccombo");this._field.setAppearance("ccombo-field");this._button.setAppearance("ccombo-button");this._list.setAppearance("ccombo-list")}else{this.setAppearance("combo");this._field.setAppearance("combo-field");this._button.setAppearance("combo-button");this._list.setAppearance("combo-list")}this.addEventListener($[36],this._onAppear,this);this.addEventListener($[143],this._onFocusIn,this);this.addEventListener("blur",this._onBlur,this);this.addEventListener($[71],this._onChangeSize,this);this.addEventListener($[76],this._onChangeSize,this);this.addEventListener($[42],this._onContextMenu,this);this.addEventListener($[101],this._onChangeFont,this);this.addEventListener($[297],this._onChangeTextColor,this);this.addEventListener($[168],this._onChangeBackgroundColor,this);this.addEventListener($[169],this._onChangeVisibility,this);this.addEventListener($[1],this._onMouseDown,this);this.addEventListener($[5],this._onMouseUp,this);this.addEventListener($[13],this._onMouseClick,this);this.addEventListener($[43],this._onMouseWheel,this);this.addEventListener($[3],this._onMouseOver,this);this.addEventListener($[28],this._onMouseMove,this);this.addEventListener($[6],this._onMouseOut,this);this.addEventListener($[10],this._onKeyDown,this);this.addEventListener($[4],this._onKeyPress,this);this._field.addEventListener($[4],this._onKeyPress,this);this._field.addEventListener("blur",this._onTextBlur,this);this._field.addEventListener($[77],this._onTextInput,this);this._list.addEventListener($[36],this._onListAppear,this);this._setupCaptureRestore()},destruct:function(){var a=rwt.widgets.base.ClientDocument.getInstance();a.removeEventListener($[210],this._onBlur,this);this.removeEventListener($[36],this._onAppear,this);this.removeEventListener($[143],this._onFocusIn,this);this.removeEventListener("blur",this._onBlur,this);this.removeEventListener($[71],this._onChangeSize,this);this.removeEventListener($[76],this._onChangeSize,this);this.removeEventListener($[42],this._onContextMenu,this);this.removeEventListener($[101],this._onChangeFont,this);this.removeEventListener($[297],this._onChangeTextColor,this);this.removeEventListener($[168],this._onChangeBackgroundColor,this);this.removeEventListener($[169],this._onChangeVisibility,this);this.removeEventListener($[1],this._onMouseDown,this);this.removeEventListener($[5],this._onMouseUp,this);this.removeEventListener($[13],this._onMouseClick,this);this.removeEventListener($[43],this._onMouseWheel,this);this.removeEventListener($[3],this._onMouseOver,this);this.removeEventListener($[6],this._onMouseOut,this);this.removeEventListener($[10],this._onKeyDown,this);this.removeEventListener($[4],this._onKeyPress,this);this._field.removeEventListener($[4],this._onKeyPress,this);this._field.removeEventListener("blur",this._onTextBlur,this);this._field.removeEventListener($[77],this._onTextInput,this);this._list.removeEventListener($[36],this._onListAppear,this);if(this._list&&!rwt.qx.Object.inGlobalDispose()){this._list.setParent(null)}this._disposeObjects("_field","_button","_list",$[287],"_selected")},events:{itemsChanged:$[11],selectionChanged:$[11]},members:{addState:function(a){arguments.callee.base.call(this,a);if(a.substr(0,8)==$[38]){this._field.addState(a);this._list.addState(a);this._button.addState(a)}},removeState:function(a){arguments.callee.base.call(this,a);if(a.substr(0,8)==$[38]){this._field.removeState(a);this._list.removeState(a);this._button.removeState(a)}},_onChangeSize:function(a){this._setListBounds()},_onAppear:function(a){if(this.hasState($[140])){this._field.addState($[140]);this._button.addState($[140]);this._list.addState($[140])}if(this.hasState($[112])){this._field.addState($[112]);this._button.addState($[112]);this._list.addState($[112])}this.getTopLevelWidget().add(this._list)},_onFocusIn:function(a){if(this._field.isCreated()&&!rwt.remote.EventUtil.getSuspended()){this._handleSelectionChange()}},_onContextMenu:function(a){var b=this.getContextMenu();if(b!=null&&!this._dropped){b.setLocation(a.getPageX(),a.getPageY());b.setOpener(this);b.show();a.stopPropagation()}},_onChangeFont:function(a){var d=a.getValue();this._field.setFont(d);var b=this._list.getItems();for(var c=0;c<b.length;c++){b[c].setFont(d)}},_onChangeTextColor:function(a){var b=a.getValue();this._field.setTextColor(b);this._list.setTextColor(b)},_onChangeBackgroundColor:function(a){var b=a.getValue();if(b!=null){this._list.setBackgroundColor(b)}else{this._list.resetBackgroundColor()}},_onChangeVisibility:function(a){var b=a.getValue();if(!b&&this._dropped){this._toggleListVisibility()}},_applyCursor:function(b,a){arguments.callee.base.call(this,b,a);if(b){this._field.setCursor(b);this._button.setCursor(b);this._list.setCursor(b)}else{this._field.resetCursor();this._button.resetCursor();this._list.resetCursor()}},_visualizeFocus:function(){if(this._field.isCreated()){this._field._visualizeFocus()}if(!this._editable){var b=rwt.widgets.util.FocusIndicator.getInstance();var a=this._ccombo?"CCombo-FocusIndicator":"Combo-FocusIndicator";b.show(this,a,null)}this.addState($[75])},_ontabfocus:function(){if(this._field.isCreated()){this._field.selectAll()}},_visualizeBlur:function(){if(this._field.isCreated()){this._field._setSelectionLength(0);this._field._visualizeBlur()}if(!this._editable){var a=rwt.widgets.util.FocusIndicator.getInstance();a.hide(this)}this.removeState($[75])},_onBlur:function(a){if(this._dropped){this._toggleListVisibility()}},_setListBounds:function(){if(this.getElement()){var b=rwt.html.Location.get(this.getElement());var d=b.left;var a=b.top;var e=a+this.getHeight();var f=rwt.html.Window.getInnerHeight(window);var j=rwt.html.Window.getInnerWidth(window);var g=this._list.getPreferredWidth();var i=Math.min(j-d,g);i=Math.max(this.getWidth(),i);var h=this._list.getItemsCount()*this._itemHeight;var c=Math.min(this._getListMaxHeight(),h);c+=this._list.getFrameHeight();if(f<e+c&&a>f-e){e=b.top-c}this._list.setLocation(d,e);this._list.setWidth(i);this._list.setHeight(c);this._list.setItemDimensions(i,this._itemHeight)}},_toggleListVisibility:function(){if(this._list.getItemsCount()){if(this._editable){this._field.setReadOnly(!this._dropped)}if(!this._dropped){this._bringToFront()}this.setCapture(!this._dropped);this._list.setDisplay(!this._dropped);if(this._list.getDisplay()){this._setListBounds()}this._dropped=!this._dropped;if(this._dropped){this._setListSelection(this._selected)}this._updateListScrollBar();this._updateListVisibleRequestParam()}},_updateListScrollBar:function(){if(this._dropped){var a=this._list.getItemsCount()*this._itemHeight;var b=this._getListMaxHeight()<a;this._list.setScrollBarsVisible(false,b)}},_resetListSelection:function(){this._manager.deselectAll();this._manager.setLeadItem(null);this._manager.setAnchorItem(null)},_setListSelection:function(a){this._manager.deselectAll();this._manager.setLeadItem(a);this._manager.setAnchorItem(a);this._manager.setSelectedItem(a)},_onListAppear:function(a){if(this._selected){this._selected.scrollIntoView();this._list._syncScrollBars()}},_bringToFront:function(){var a=this.getTopLevelWidget().getChildren();var b=this._list.getZIndex();for(var d in a){var c=a[d];if(c.getZIndex){if(b<c.getZIndex()){b=c.getZIndex()}}}if(b>this._list.getZIndex()){this._list.setZIndex(b+1)}},_setSelected:function(b){this._selected=b;if(b){var a=b.getLabel().toString();this.setText(this._formatText(a));if(this._field.isCreated()){if(!rwt.remote.EventUtil.getSuspended()){this._field.selectAll();this._handleSelectionChange()}}this._setListSelection(b);this._manager.scrollItemIntoView(b)}else{if(!this._editable){this.setText("")}this._resetListSelection()}this._sendWidgetSelected();this.dispatchSimpleEvent($[284])},_scrollItemIntoView:function(b,a){if(b.isCreated()&&b.isDisplayable()){b.scrollIntoView(a)}},_formatText:function(b){var a=b;a=a.replace(/<[^>]+?>/g,"");a=rwt.util.Encoding.unescape(a);return a},_reDispatch:function(b){var a=b.getTarget();if(this._list.contains(a)){a.dispatchEvent(b,false);b.stopPropagation()}},_onMouseDown:function(a){if(a.isLeftButtonPressed()){if(a.getTarget()==this._field){if(!this._editable||this._dropped){this._toggleListVisibility()}}else{if(this._dropped){this._reDispatch(a)}}}},_onMouseClick:function(a){if(a.isLeftButtonPressed()){if(this._button.hasState("over")){this._button.removeState("over")}var b=a.getTarget();if(b instanceof rwt.widgets.ListItem&&b===this._list.getListItemTarget(b)){this._reDispatch(a);this._toggleListVisibility();this._setSelected(this._manager.getSelectedItem());this.setFocused(true)}else{if(b==this._button||(this._dropped&&b!=this&&b!=this._field&&!this._list.contains(b))){this._toggleListVisibility()}}}},_onMouseUp:function(a){if(!this._dropped){this.setCapture(false)}if(a.getTarget()==this._field&&!rwt.remote.EventUtil.getSuspended()){this._handleSelectionChange()}else{if(this._dropped){this._reDispatch(a)}}},_onMouseWheel:function(a){if(this._dropped){if(!this._list.isRelevantEvent(a)){a.preventDefault();a.stopPropagation()}}else{if(this.getFocused()){a.preventDefault();a.stopPropagation();var c;var b=this._selected;if(b){if(a.getWheelDelta()<0){c=this._manager.getNext(b)}else{c=this._manager.getPrevious(b)}if(c){this._setSelected(c)}}else{if(this._list.getItemsCount()){this._setSelected(this._list.getItems()[0])}}}}},_onMouseOver:function(a){var b=a.getTarget();if(b instanceof rwt.widgets.ListItem&&!this._blockMouseOver){this._setListSelection(b)}else{if(b==this._button){this._button.addState("over")}}},_onMouseMove:function(a){var b=a.getTarget();if(b instanceof rwt.widgets.ListItem&&this._manager.getSelectedItem()!==a.getTarget()){this._onMouseOver(a)}},_onMouseOut:function(a){if(a.getTarget()==this._button){this._button.removeState("over")}},_setupCaptureRestore:function(){var a=this._list._vertScrollBar._thumb;a.addEventListener($[5],this._captureRestore,this)},_captureRestore:function(a){this.setCapture(true)},_onKeyDown:function(a){switch(a.getKeyIdentifier()){case $[49]:if(this._dropped){this._toggleListVisibility();this._setSelected(this._manager.getSelectedItem())}else{if(!a.isShiftPressed()&&!a.isAltPressed()&&!a.isCtrlPressed()&&!a.isMetaPressed()){this._sendWidgetDefaultSelected()}}this.setFocused(true);a.stopPropagation();break;case $[105]:if(this._dropped){this._toggleListVisibility()}this.setFocused(true);a.stopPropagation();break;case"Down":case"Up":case $[40]:case $[45]:if(a.isAltPressed()){this._toggleListVisibility()}else{if(this._selected||this._manager.getSelectedItem()){this._list._onkeypress(a);var b=this._manager.getSelectedItem();this._setSelected(b)}else{if(this._list.getItemsCount()){this._setSelected(this._list.getItems()[0])}}}break}if(this._field.isCreated()&&!rwt.remote.EventUtil.getSuspended()){this._handleSelectionChange()}},_onKeyPress:function(a){switch(a.getKeyIdentifier()){case $[105]:case"Down":case"Up":case $[40]:case $[45]:a.stopPropagation();break;case"Tab":if(this._dropped){this._toggleListVisibility()}break;case $[35]:if(this._dropped){var b=this._selected?this._manager.getNext(this._selected):this._manager.getFirst();if(b){this._setSelected(b)}}break;case"Left":if(this._dropped){var b=this._selected?this._manager.getPrevious(this._selected):this._manager.getLast();if(b){this._setSelected(b)}}break;case $[49]:a.preventDefault();break}if(this._field.isCreated()&&!rwt.remote.EventUtil.getSuspended()){this._handleSelectionChange()}if(a.getCharCode()!==0){this._onKeyInput(a)}},_onKeyInput:function(a){if((this._dropped||!this._editable)&&!a.isAltPressed()&&!a.isCtrlPressed()){this._list._onkeyinput(a);var b=this._manager.getSelectedItem();if(b!=null){this._setSelected(b)}else{this._setListSelection(this._selected)}}},_onTextInput:function(a){if(this._editable){this._isModified=true;this._selected=null;this._resetListSelection();if(!rwt.remote.EventUtil.getSuspended()){var b=rwt.remote.Server.getInstance();b.addEventListener("send",this._onSend,this);if(this._hasModifyListener){rwt.client.Timer.once(this._sendModifyText,this,500)}}}},_onTextBlur:function(a){if(!rwt.remote.EventUtil.getSuspended()&&this._isModified){var b=rwt.remote.Server.getInstance();b.send()}},_onSend:function(a){var d=rwt.remote.WidgetManager.getInstance();var c=d.findIdByWidget(this);var b=rwt.remote.Server.getInstance();b.addParameter(c+".text",this._field.getComputedValue());b.removeEventListener("send",this._onSend,this);this._isModified=false;this.setText(this._field.getComputedValue())},_sendModifyText:function(){var a=rwt.remote.Server.getInstance();a.getRemoteObject(this).notify("Modify");this._isModified=false},_sendWidgetSelected:function(){if(!rwt.remote.EventUtil.getSuspended()){var e=rwt.remote.WidgetManager.getInstance();var b=rwt.remote.Server.getInstance();var d=e.findIdByWidget(this);var c=this._list;var a=this._list.getSelectedItem();b.addParameter(d+".selectionIndex",c.getItemIndex(a));if(this._hasSelectionListener){rwt.remote.EventUtil.notifySelected(this)}if(this._hasModifyListener){this._sendModifyText()}}},_sendWidgetDefaultSelected:function(){if(this._hasDefaultSelectionListener&&!rwt.remote.EventUtil.getSuspended()){rwt.remote.EventUtil.notifyDefaultSelected(this)}},_updateListVisibleRequestParam:function(){if(!rwt.remote.EventUtil.getSuspended()){var c=rwt.remote.WidgetManager.getInstance();var a=rwt.remote.Server.getInstance();var b=c.findIdByWidget(this);a.addParameter(b+".listVisible",this._list.getDisplay())}},_handleSelectionChange:function(){var c=this._field.getComputedSelection();var f=c[0];if(f===undefined){f=0}var b=c[1]-c[0];if(typeof b==$[8]){b=0}if(this._selectionStart!=f||this._selectionLength!=b){var e=rwt.remote.WidgetManager.getInstance();var d=e.findIdByWidget(this);var a=rwt.remote.Server.getInstance();this._selectionStart=f;a.addParameter(d+".selectionStart",f);this._selectionLength=b;a.addParameter(d+".selectionLength",b)}},_getListMaxHeight:function(){return this._itemHeight*this._visibleItemCount},setItems:function(a){this._list.setItems(a);this.createDispatchEvent($[546])},setVisibleItemCount:function(a){this._visibleItemCount=a},setItemHeight:function(a){this._itemHeight=a},select:function(b){var a=this._list.getItems();var c=null;if(b>=0&&b<=a.length-1){c=a[b]}this._setSelected(c)},setEditable:function(a){this._editable=a;this._field.setReadOnly(!a);this._field.setCursor(a?null:$[62])},setListVisible:function(a){if(this._list.getDisplay()!=a){this._dropped=!a;this._toggleListVisibility()}},setText:function(a){this._field.setValue(a)},setTextSelection:function(b,a){if(this._field.isCreated()){this._selectionStart=b;this._selectionLength=a;this._field.setSelection(b,b+a)}},setTextLimit:function(a){this._field.setMaxLength(a)},setHasSelectionListener:function(a){this._hasSelectionListener=a},setHasDefaultSelectionListener:function(a){this._hasDefaultSelectionListener=a},setHasModifyListener:function(a){this._hasModifyListener=a},applyObjectId:function(a){arguments.callee.base.call(this,a);if(rwt.widgets.base.Widget._renderHtmlIds){this._list.applyObjectId(a+"-listbox");this.addEventListener($[546],this._applyListItemIds)}},_applyListItemIds:function(){var a=this._list.getHtmlAttribute("id");var c=this._list.getItems();if(c){for(var b=0;b<c.length;b++){c[b].setHtmlAttribute("id",this._list.getHtmlAttribute("id")+"-listitem-"+b)}}}}}); |
| rwt.remote.HandlerRegistry.add($[459],{factory:function(b){var a=new rwt.widgets.Combo(b.ccombo);rwt.remote.HandlerUtil.addStatesForStyles(a,b.style);a.setUserData($[23],true);rwt.remote.HandlerUtil.setParent(a,b.parent);return a},destructor:rwt.remote.HandlerUtil.getControlDestructor(),getDestroyableChildren:rwt.remote.HandlerUtil.getDestroyableChildrenFinder(),properties:rwt.remote.HandlerUtil.extendControlProperties(["itemHeight","visibleItemCount","items","listVisible","selectionIndex","editable","text",$[60],$[295]]),propertyHandler:rwt.remote.HandlerUtil.extendControlPropertyHandler({selectionIndex:function(b,a){b.select(a)},selection:function(c,b){var d=b[0];var a=b[1]-b[0];c.setTextSelection(d,a)}}),listeners:rwt.remote.HandlerUtil.extendControlListeners([$[30],$[111],"Modify"]),listenerHandler:rwt.remote.HandlerUtil.extendControlListenerHandler({})}); |
| rwt.qx.Class.define("rwt.widgets.util.FocusIndicator",{type:$[39],extend:rwt.qx.Object,construct:function(){arguments.callee.base.call(this);this._frame=null},members:{_createFrame:function(){this._frame=document.createElement("div");this._frame.setAttribute("id","focusIndicator");this._frame.style.position=$[16];this._frame.style.fontSize=0;this._frame.style.lineHeight=0;this._frame.style.zIndex=0},_createTheme:function(h,b,n){var g=null;var m=typeof h.__states!=$[8]?h.__states:{};var i=new rwt.theme.ThemeValues(m);var f=i.getCssBorder(b,$[132]);var k=i.getCssFloat(b,$[53]);var j=f instanceof rwt.html.Border;var e=i.getCssBoxDimensions(b,"margin");var l=i.getCssBoxDimensions(b,$[127]);if(!l){l=[0,0,0,0]}var d=l[0]===0&&l[1]===0&&l[2]===0&&l[3]===0;var a=!d&&n!=null;if(j&&(e!=null||a)){var c=i.getCssColor(b,$[208]);g={backgroundColor:c!=$[8]?c:"",opacity:k,border:f,margin:e,padding:a?l:null}}return g},show:function(d,c,b){this.hide();if(d.isCreated()){var f=this._createTheme(d,c,b);if(f!=null){var a=d._getTargetNode();if(this._frame==null){this._createFrame()}if(this._frame.parentNode!=a){if(a.hasChildNodes()){var e=a.firstChild;a.insertBefore(this._frame,e)}else{a.appendChild(this._frame)}}this._styleFocusIndicator(f);this._layoutFocusIndicator(d,f,b)}}},hide:function(){if(this._frame!=null&&this._frame.parentNode!=null){this._frame.parentNode.removeChild(this._frame)}},_styleFocusIndicator:function(g){var e=g[$[132]];var b=this._frame.style;var f=["Left","Top","Bottom",$[35]];for(var h=0;h<4;h++){var c=f[h];var d=e["getColor"+c]();var j=e["getStyle"+c]();var a=e["getWidth"+c]();b[$[132]+c+"Width"]=a==null?"0px":a+"px";b[$[132]+c+"Style"]=j==null?"none":j;b[$[132]+c+"Color"]=d==null?"":d}b.backgroundColor=g[$[51]];this._styleFocusIndiactorOpacity(g[$[53]])},_styleFocusIndiactorOpacity:rwt.util.Variant.select($[0],{"default":function(c){var b=this._frame.style;var a=c==1?"":c;b.opacity=a;b.KhtmlOpacity=a;b.MozOpacity=a},mshtml:function(c){var b=this._frame.style;var a=c==1?"":"Alpha(Opacity="+(c*100)+")";b.filter=a}}),_layoutFocusIndicator:function(e,d,i){var c=d[$[132]];var a=[];if(d[$[127]]!=null){var g=d[$[127]];a[0]=parseInt(i.style.left,10)-g[3];a[1]=parseInt(i.style.top,10)-g[0];a[2]=parseInt(i.style.width,10)+g[1]+g[3];a[3]=parseInt(i.style.height,10)+g[2]+g[0]}else{var b=d.margin;e._invalidateBoxWidth();e._invalidateBoxHeight();var h=e.getBoxWidth()-e._cachedBorderLeft-e._cachedBorderRight;var f=e.getBoxHeight()-e._cachedBorderTop-e._cachedBorderBottom;e._invalidateBoxWidth();e._invalidateBoxHeight();a[0]=b[3];a[1]=b[0];a[2]=h-(b[3]+b[1]);a[3]=f-(b[0]+b[2]);a[2]=Math.max(0,a[2]);a[3]=Math.max(0,a[3])}this._frame.style.left=a[0]+"px";this._frame.style.top=a[1]+"px";this._frame.style.width=a[2]+"px";this._frame.style.height=a[3]+"px"}}}); |
| rwt.remote.HandlerRegistry.add($[413],{factory:function(b){var c=rwt.remote.ObjectRegistry.getObject(b.parent);var a=new rwt.widgets.GC(c);rwt.remote.HandlerUtil.addDestroyableChild(c,a);return a},destructor:function(a){rwt.remote.HandlerUtil.removeDestroyableChild(a._control,a);a.dispose()},methods:["init","draw"],methodHandler:{init:function(b,a){b.init(a.width,a.height,a.font,a.fillStyle,a.strokeStyle)},draw:function(b,a){b.draw(a.operations)}}}); |
| rwt.qx.Class.define($[413],{extend:rwt.qx.Object,construct:function(a){arguments.callee.base.call(this);this._control=a;this._control.addEventListener($[65],this._onControlCreate,this);this._vmlCanvas=null;this._canvas=null;this._context=null;this._createCanvas();this._canvas.rwtObject=this;this._textCanvas=document.createElement("div");this._textCanvas.style.position=$[16];this._textCanvas.style.overflow=$[9];this._textCanvas.style.left="0px";this._textCanvas.style.top="0px";this._textCanvas.rwtObject=this;if(this._control.isCreated()){this._addCanvasToDOM()}this._linearGradient=null},destruct:function(){this._control.removeEventListener($[65],this._onControlCreate,this);if(rwt.client.Client.isMshtml()){this._control.removeEventListener($[141],this._onCanvasAppear,this)}if(this._control.isCreated()&&!this._control.isDisposed()){this._removeCanvasFromDOM()}this._control=null;this._canvas.rwtObject=null;this._canvas=null;if(this._context.dispose){this._context.dispose()}this._context=null;this._textCanvas.rwtObject=null;this._textCanvas=null},members:{init:rwt.util.Variant.select($[0],{mshtml:function(d,a,b,c,e){rwt.widgets.base.Widget.flushGlobalQueues();this._initTextCanvas(d,a);this._context.clearRect(0,0,d,a);this._initFields(b,c,e);this._control.dispatchSimpleEvent("paint")},"default":function(d,a,b,c,e){this._initTextCanvas(d,a);this._canvas.width=d;this._canvas.style.width=d+"px";this._canvas.height=a;this._canvas.style.height=a+"px";this._context.clearRect(0,0,d,a);this._initFields(b,c,e);this._control.dispatchSimpleEvent("paint")}}),draw:function(a){for(var c=0;c<a.length;c++){try{var e=a[c][0];switch(e){case"fillStyle":case $[415]:case"globalAlpha":case"lineWidth":case"lineCap":case"lineJoin":case"font":this._setProperty(a[c]);break;case"createLinearGradient":case"addColorStop":case"fillText":case"strokeText":case"ellipse":case"drawImage":this["_"+e](a[c]);break;default:this._context[e].apply(this._context,a[c].slice(1));break}}catch(b){var d="[ "+a[c].join(", ")+" ]";throw new Error("Drawing operation failed: "+d+" :"+b.message)}}},getNativeContext:function(){return this._context},_createCanvas:rwt.util.Variant.select($[0],{mshtml:function(){this._vmlCanvas=rwt.graphics.VML.createCanvas();this._canvas=rwt.graphics.VML.getCanvasNode(this._vmlCanvas);this._context=new rwt.graphics.VMLCanvas(this._vmlCanvas);this._control.addEventListener($[141],this._onCanvasAppear,this)},"default":function(){this._canvas=document.createElement("canvas");this._context=this._canvas.getContext("2d")}}),_onControlCreate:function(){this._addCanvasToDOM()},_onCanvasAppear:function(){var a=rwt.graphics.GraphicsUtil;a.handleAppear(this._vmlCanvas)},_addCanvasToDOM:function(){var b=this._control._getTargetNode();var a=b.firstChild;if(a){b.insertBefore(this._canvas,a);b.insertBefore(this._textCanvas,a)}else{b.appendChild(this._canvas);b.appendChild(this._textCanvas)}},_removeCanvasFromDOM:function(){this._canvas.parentNode.removeChild(this._canvas);this._textCanvas.parentNode.removeChild(this._textCanvas)},_initTextCanvas:function(b,a){this._textCanvas.width=b;this._textCanvas.style.width=b+"px";this._textCanvas.height=a;this._textCanvas.style.height=a+"px";this._textCanvas.innerHTML=""},_initFields:function(a,b,c){this._context.strokeStyle=rwt.util.Colors.rgbToRgbString(c);this._context.fillStyle=rwt.util.Colors.rgbToRgbString(b);this._context.globalAlpha=1;this._context.lineWidth=1;this._context.lineCap="butt";this._context.lineJoin="miter";this._context.font=this._toCssFont(a)},_ellipse:rwt.util.Variant.select($[0],{mshtml:function(a){this._context[a[0]].apply(this._context,a.slice(1))},"default":function(c){var a=c[1];var h=c[2];var g=c[3];var f=c[4];var e=c[6];var b=c[7];var d=c[8];if(g>0&&f>0){this._context.save();this._context.translate(a,h);this._context.scale(1,f/g);this._context.arc(0,0,g,e,b,d);this._context.restore()}}}),_setProperty:function(a){var c=a[0];var b=a[1];if(b===$[507]){b=this._linearGradient}else{if(c==="fillStyle"||c===$[415]){b=rwt.util.Colors.rgbToRgbString(b)}else{if(c==="font"){b=this._toCssFont(b)}}}this._context[c]=b},_strokeText:function(a){this._fillText(a)},_fillText:function(c){var e=c[0]==="fillText";var f=this._escapeText(c[1],c[2],c[3],c[4]);var a=c[5];var g=c[6];var b=document.createElement("div");var d=b.style;d.position=$[16];d.left=a+"px";d.top=g+"px";d.color=this._context.strokeStyle;if(e){d.backgroundColor=this._context.fillStyle}if(this._context.font!==""&&this._context.font!=null){d.font=this._context.font}b.innerHTML=f;this._textCanvas.appendChild(b)},_escapeText:function(f,d,e,a){var b=rwt.util.Encoding;var g=b.escapeText(f,d);var c=e?$[97]:"";g=b.replaceNewLines(g,c);c=a?" ":"";g=g.replace(/\t/g,c);return g},_drawImage:function(a){var b=a.slice(1);var f=b.length===3;var e=new Image();e.src=b[0];b[0]=e;if(e.complete||rwt.client.Client.isMshtml()){this._context.drawImage.apply(this._context,b)}else{var d=this._context.globalAlpha;var c=this._context;e.onload=function(){c.save();c.globalAlpha=d;c.drawImage.apply(c,b);c.restore()}}},_createLinearGradient:function(a){var b=this._context.createLinearGradient;this._linearGradient=b.apply(this._context,a.slice(1))},_addColorStop:function(a){this._linearGradient.addColorStop(a[1],rwt.util.Colors.rgbToRgbString(a[2]))},_toCssFont:function(b){var a="";if(b[3]){a+="italic "}if(b[2]){a+="bold "}a+=b[1]+"px ";a+=b[0].join(",");return a}}}); |
| rwt.qx.Class.define("rwt.graphics.VMLCanvas",{extend:rwt.qx.Object,construct:function(a){this._autoDispose=false;arguments.callee.base.call(this);this._canvas=a;this._stateStack=[];this._currentPath=[];this.strokeStyle="#000000";this.fillStyle="#000000";this.lineWidth=1;this.lineJoin="miter";this.lineCap="butt";this.miterLimit=10;this.globalAlpha=1},destruct:function(){this._canvas=null},members:{save:function(){var a={};this._copyState(this,a);this._stateStack.push(a)},restore:function(){var a=this._stateStack.pop();this._copyState(a,this)},beginPath:function(){this._currentPath=[]},closePath:function(){this._currentPath.push({type:$[130]})},clearRect:function(b,d,c,a){rwt.graphics.VML.clearCanvas(this._canvas)},stroke:function(b){var a=rwt.graphics.VML.createShapeFromContext(this,b);rwt.graphics.VML.addToCanvas(this._canvas,a)},fill:function(){this.stroke(true)},moveTo:function(a,b){this._currentPath.push({type:"moveTo",x:a,y:b})},lineTo:function(a,b){this._currentPath.push({type:"lineTo",x:a,y:b})},quadraticCurveTo:function(c,b,a,d){this._currentPath.push({type:$[421],cp1x:c,cp1y:b,x:a,y:d})},bezierCurveTo:function(c,b,e,d,a,f){this._currentPath.push({type:$[426],cp1x:c,cp1y:b,cp2x:e,cp2y:d,x:a,y:f})},rect:function(b,d,c,a){this.moveTo(b,d);this.lineTo(b+c,d);this.lineTo(b+c,d+a);this.lineTo(b,d+a);this.closePath()},ellipse:function(i,h,b,a,j,f,c,g){if(this._currentPath.length===0){var e=i+Math.cos(f)*b;var d=h+Math.sin(f)*a;this.moveTo(e,d)}this._currentPath.push({type:"arc",anticlockwise:g,centerX:i,centerY:h,radiusX:b,radiusY:a,startAngle:f,endAngle:c})},arc:function(b,f,a,d,c,e){this.ellipse(b,f,a,a,0,d,c,e)},drawImage:function(){var g=rwt.graphics.VML.createShape($[15]);rwt.graphics.VML.setOpacity(g,this.globalAlpha);var b=arguments[0];if(arguments.length==3){var i=arguments[1];var h=arguments[2];rwt.graphics.VML.setImageData(g,b.src,i,h,b.width,b.height)}else{var f=arguments[1];var e=arguments[2];var c=arguments[3];var k=arguments[4];var i=arguments[5];var h=arguments[6];var j=arguments[7];var a=arguments[8];var d=[e/b.height,(b.width-f-c)/b.width,(b.height-e-k)/b.height,f/b.width];rwt.graphics.VML.setImageData(g,b.src,i,h,j,a,d)}rwt.graphics.VML.addToCanvas(this._canvas,g)},createLinearGradient:function(b,d,a,c){var e=[];e.addColorStop=this._addColorStopFunction;e.horizontal=b!=a;return e},_copyState:function(a,b){b.font=a.font;b.fillStyle=a.fillStyle;b.lineCap=a.lineCap;b.lineJoin=a.lineJoin;b.lineWidth=a.lineWidth;b.miterLimit=a.miterLimit;b.shadowBlur=a.shadowBlur;b.shadowColor=a.shadowColor;b.shadowOffsetX=a.shadowOffsetX;b.shadowOffsetY=a.shadowOffsetY;b.strokeStyle=a.strokeStyle;b.globalAlpha=a.globalAlpha},_addColorStopFunction:function(b,a){this.push([b,a])}}}); |
| rwt.remote.HandlerRegistry.add($[547],{factory:function(b){var a=new rwt.widgets.Composite();rwt.remote.HandlerUtil.addStatesForStyles(a,b.style);a.setUserData($[23],true);rwt.remote.HandlerUtil.setParent(a,b.parent);return a},destructor:rwt.remote.HandlerUtil.getControlDestructor(),getDestroyableChildren:rwt.remote.HandlerUtil.getDestroyableChildrenFinder(),properties:rwt.remote.HandlerUtil.extendControlProperties([$[126],$[361],"clientArea"]),propertyHandler:rwt.remote.HandlerUtil.extendControlPropertyHandler({backgroundGradient:rwt.remote.HandlerUtil.getBackgroundGradientHandler(),roundedBorder:rwt.remote.HandlerUtil.getRoundedBorderHandler()}),listeners:rwt.remote.HandlerUtil.extendControlListeners([]),listenerHandler:rwt.remote.HandlerUtil.extendControlListenerHandler({})}); |
| rwt.qx.Class.define($[547],{extend:rwt.widgets.base.Parent,include:rwt.animation.VisibilityAnimationMixin,construct:function(){arguments.callee.base.call(this);this.setAppearance("composite");this.setOverflow($[9]);this.setHideFocus(true);this.addEventListener($[3],this._onMouseOver,this);this.addEventListener($[6],this._onMouseOut,this);if(rwt.client.Client.isMshtml()){this._fixBackgroundTransparency();this.addEventListener($[168],this._fixBackgroundTransparency,this)}rwt.widgets.base.Widget.disableScrolling(this);this._clientArea=[0,0,0,0]},destruct:function(){this.removeEventListener($[3],this._onMouseOver,this);this.removeEventListener($[6],this._onMouseOut,this);this._clientArea=null},members:{setClientArea:function(a){this._clientArea=a;this.dispatchSimpleEvent($[368])},getClientArea:function(){return this._clientArea.concat()},_onMouseOver:function(a){this.addState("over")},_onMouseOut:function(a){this.removeState("over")},_applyBackgroundImage:rwt.util.Variant.select($[0],{mshtml:function(b,a){arguments.callee.base.call(this,b,a);if(b==null){this._fixBackgroundTransparency()}},"default":function(b,a){arguments.callee.base.call(this,b,a)}}),_fixBackgroundTransparency:function(){if(this.getBackgroundColor()==null&&this.getBackgroundImage()==null){this._applyBackgroundImage($[446],null)}}}}); |
| rwt.qx.Class.define($[532],{extend:rwt.widgets.base.Parent,construct:function(){arguments.callee.base.call(this);this.setOverflow(null);this.setHtmlProperty($[448],"on");this.addEventListener($[71],this._onChangeSize,this);this.addEventListener($[76],this._onChangeSize,this);this.addEventListener($[3],this._onMouseOver,this);this.addEventListener($[6],this._onMouseOut,this);this._slider=new rwt.widgets.base.Parent();this._slider.setAppearance("sash-slider");this._slider.setVisibility(false);rwt.widgets.util.WidgetUtil.fixIEBoxHeight(this._slider);this.add(this._slider);this._sliderHandle=new rwt.widgets.base.Parent();this._sliderHandle.setStyleProperty($[256],$[430]);this._sliderHandle.setAppearance($[506]);this._sliderHandle.setVisibility(false);rwt.widgets.util.WidgetUtil.fixIEBoxHeight(this._sliderHandle);this.add(this._sliderHandle);this._handle=new rwt.widgets.base.Parent();this._handle.setStyleProperty($[256],$[430]);this._handle.setAppearance($[506]);rwt.widgets.util.WidgetUtil.fixIEBoxHeight(this._handle);this.add(this._handle);this.initOrientation();this._bufferZIndex=null},destruct:function(){this.removeEventListener($[71],this._onChangeSize,this);this.removeEventListener($[76],this._onChangeSize,this);this.removeEventListener($[3],this._onMouseOver,this);this.removeEventListener($[6],this._onMouseOut,this);this._removeStyle(this.getOrientation());this._disposeObjects("_slider","_handle","_sliderHandle")},properties:{appearance:{refine:true,init:"sash"},orientation:{check:[$[37],$[31]],apply:$[419],init:$[37],nullable:true}},members:{_onChangeSize:function(a){this._handle.setWidth(this.getWidth());this._handle.setHeight(this.getHeight())},_onMouseDownX:function(a){if(a.isLeftButtonPressed()){if(this.getEnabled()){this._commonMouseDown();this._dragOffset=a.getPageX();this._minMove=-this.getLeft()-this._frameOffset;this._maxMove=this.getParent().getWidth()-this.getLeft()-this.getWidth()-this._frameOffset}}},_onMouseDownY:function(a){if(a.isLeftButtonPressed()){if(this.getEnabled()){this._commonMouseDown();this._dragOffset=a.getPageY();this._minMove=-this.getTop()-this._frameOffset;this._maxMove=this.getParent().getHeight()-this.getTop()-this.getHeight()-this._frameOffset}}},_commonMouseDown:function(){this.setCapture(true);this.getTopLevelWidget().setGlobalCursor(this.getCursor());this._frameOffset=this.getFrameWidth()/2;this._slider.setLeft(0-this._frameOffset);this._slider.setTop(0-this._frameOffset);this._slider.setWidth(this.getWidth());this._slider.setHeight(this.getHeight());this._sliderHandle.setLeft(0);this._sliderHandle.setTop(0);this._sliderHandle.setWidth(this.getWidth());this._sliderHandle.setHeight(this.getHeight());this._bufferZIndex=this.getZIndex();this.setZIndex(10000000);this._slider.show();this._sliderHandle.show();this._sendWidgetSelected()},_onMouseUpX:function(a){if(this.getCapture()){this._commonMouseUp()}},_onMouseUpY:function(a){if(this.getCapture()){this._commonMouseUp()}},_commonMouseUp:function(){this._slider.hide();this._sliderHandle.hide();this.setCapture(false);this.getTopLevelWidget().setGlobalCursor(null);if(this._bufferZIndex!=null){this.setZIndex(this._bufferZIndex)}var a=rwt.widgets.util.WidgetUtil;a._fakeMouseEvent(this,$[6]);this._sendWidgetSelected()},_onMouseMoveX:function(b){if(this.getCapture()){if(this.getTopLevelWidget().getGlobalCursor()!=this.getCursor()){this.getTopLevelWidget().setGlobalCursor(this.getCursor())}var a=b.getPageX()-this._dragOffset;this._slider.setLeft(this._normalizeMove(a));this._sliderHandle.setLeft(this._normalizeMove(a))}},_onMouseMoveY:function(b){if(this.getCapture()){if(this.getTopLevelWidget().getGlobalCursor()!=this.getCursor()){this.getTopLevelWidget().setGlobalCursor(this.getCursor())}var a=b.getPageY()-this._dragOffset;this._slider.setTop(this._normalizeMove(a));this._sliderHandle.setTop(this._normalizeMove(a))}},_normalizeMove:function(b){var a=b;if(a<this._minMove){a=this._minMove}if(a>this._maxMove){a=this._maxMove}return a},_applyOrientation:function(b,a){this._removeStyle(a);this._setStyle(b)},_setStyle:function(a){if(a==$[37]){this.addEventListener($[1],this._onMouseDownY,this);this.addEventListener($[28],this._onMouseMoveY,this);this.addEventListener($[5],this._onMouseUpY,this);this.addState($[37]);this._handle.addState($[37]);this._sliderHandle.addState($[37])}else{if(a==$[31]){this.addEventListener($[28],this._onMouseMoveX,this);this.addEventListener($[1],this._onMouseDownX,this);this.addEventListener($[5],this._onMouseUpX,this);this.addState($[31]);this._handle.addState($[31]);this._sliderHandle.addState($[31])}}},_removeStyle:function(a){if(a==$[37]){this.removeEventListener($[1],this._onMouseDownY,this);this.removeEventListener($[28],this._onMouseMoveY,this);this.removeEventListener($[5],this._onMouseUpY,this);this.removeState($[37]);this._handle.removeState($[37]);this._sliderHandle.removeState($[37])}else{if(a==$[31]){this.removeEventListener($[1],this._onMouseDownX,this);this.removeEventListener($[28],this._onMouseMoveX,this);this.removeEventListener($[5],this._onMouseUpX,this);this.removeState($[31]);this._handle.removeState($[31]);this._sliderHandle.removeState($[31])}}},_sendWidgetSelected:function(){if(!rwt.remote.EventUtil.getSuspended()){var b=this._slider.getLeft()+this._frameOffset;var a=this._slider.getTop()+this._frameOffset;rwt.remote.EventUtil.notifySelected(this,this.getLeft()+b,this.getTop()+a,this.getWidth(),this.getHeight(),this.getCapture()?"drag":null)}},_onMouseOver:function(a){this.addState("over")},_onMouseOut:function(a){this.removeState("over")}}}); |
| rwt.remote.HandlerRegistry.add($[532],{factory:function(c){var a=new rwt.widgets.Sash();rwt.remote.HandlerUtil.addStatesForStyles(a,c.style);a.setUserData($[23],true);rwt.remote.HandlerUtil.setParent(a,c.parent);var b=rwt.widgets.util.Layout.ORIENTATION_VERTICAL;if(c.style.indexOf($[330])!=-1){b=rwt.widgets.util.Layout.ORIENTATION_HORIZONTAL}a.setOrientation(b);return a},destructor:rwt.remote.HandlerUtil.getControlDestructor(),getDestroyableChildren:rwt.remote.HandlerUtil.getDestroyableChildrenFinder(),properties:rwt.remote.HandlerUtil.extendControlProperties([]),propertyHandler:rwt.remote.HandlerUtil.extendControlPropertyHandler({}),listeners:rwt.remote.HandlerUtil.extendControlListeners([$[30]]),listenerHandler:rwt.remote.HandlerUtil.extendControlListenerHandler({})}); |
| rwt.remote.HandlerRegistry.add("rwt.widgets.Canvas",{factory:function(b){var a=new rwt.widgets.Composite();rwt.remote.HandlerUtil.addStatesForStyles(a,b.style);a.setUserData($[23],true);rwt.remote.HandlerUtil.setParent(a,b.parent);return a},destructor:rwt.remote.HandlerUtil.getControlDestructor(),getDestroyableChildren:rwt.remote.HandlerUtil.getDestroyableChildrenFinder(),properties:rwt.remote.HandlerUtil.extendControlProperties([$[126],$[361],"clientArea"]),propertyHandler:rwt.remote.HandlerUtil.extendControlPropertyHandler({backgroundGradient:rwt.remote.HandlerUtil.getBackgroundGradientHandler(),roundedBorder:rwt.remote.HandlerUtil.getRoundedBorderHandler()}),listeners:rwt.remote.HandlerUtil.extendControlListeners([]),listenerHandler:rwt.remote.HandlerUtil.extendControlListenerHandler({})}); |
| rwt.qx.Class.define($[373],{extend:rwt.widgets.base.BasicList,construct:function(c){arguments.callee.base.call(this,c);this.setScrollBarsVisible(false,false);this._topIndex=0;this._hasSelectionListener=false;this._hasDefaultSelectionListener=false;var a=rwt.remote.Server.getInstance();var b=this.getManager();b.addEventListener($[294],this._onChangeLeadItem,this);b.addEventListener($[248],this._onSelectionChange,this);this.addEventListener($[1],this._handleHyperlinkActivation,this);this.addEventListener($[5],this._handleHyperlinkActivation,this);this.addEventListener($[13],this._handleHyperlinkActivation,this);this.addEventListener($[68],this._onFocusIn,this);this.addEventListener("blur",this._onFocusOut,this);this.addEventListener($[48],this._onDblClick,this);this.addEventListener($[36],this._onAppear,this);this.addEventListener($[209],this._onUserScroll)},destruct:function(){var a=rwt.remote.Server.getInstance();var b=this.getManager();b.removeEventListener($[294],this._onChangeLeadItem,this);b.removeEventListener($[248],this._onSelectionChange,this);this.removeEventListener($[1],this._handleHyperlinkActivation,this);this.removeEventListener($[5],this._handleHyperlinkActivation,this);this.removeEventListener($[13],this._handleHyperlinkActivation,this);this.removeEventListener($[68],this._onFocusIn,this);this.removeEventListener("blur",this._onFocusOut,this);this.removeEventListener($[48],this._onDblClick,this);this.removeEventListener($[36],this._onAppear,this)},members:{setTopIndex:function(a){this._topIndex=a;this._applyTopIndex(a)},_applyTopIndex:function(b){var a=this.getManager().getItems();if(a.length>0&&a[0].isCreated()){var c=this.getManager().getItemHeight(a[0]);if(c>0){this.setVBarSelection(b*c)}}},_getTopIndex:function(){var b=0;var c=this._clientArea.getScrollTop();var a=this.getManager().getItems();if(a.length>0){var d=this.getManager().getItemHeight(a[0]);if(d>0){b=Math.round(c/d)}}return b},_onAppear:function(a){this._applyTopIndex(this._topIndex)},_updateScrollDimension:function(){arguments.callee.base.call(this);this._applyTopIndex(this._topIndex)},setHasSelectionListener:function(a){this._hasSelectionListener=a},setHasDefaultSelectionListener:function(a){this._hasDefaultSelectionListener=a},_onChangeLeadItem:function(a){if(!rwt.remote.EventUtil.getSuspended()){var c=rwt.remote.WidgetManager.getInstance();var e=c.findIdByWidget(this);var b=rwt.remote.Server.getInstance();var d=this._clientArea.indexOf(this.getManager().getLeadItem());b.addParameter(e+".focusIndex",d)}},_onSelectionChange:function(a){if(!rwt.remote.EventUtil.getSuspended()){this._sendSelectionChange();if(this._hasSelectionListener){rwt.remote.EventUtil.notifySelected(this)}}this._updateSelectedItemState()},_sendSelectionChange:function(){var c=[];var d=this.getManager().getSelectedItems();for(var b=0;b<d.length;b++){var a=this._clientArea.indexOf(d[b]);c.push(a)}rwt.remote.Server.getInstance().getRemoteObject(this).set($[60],c)},_onUserScroll:function(a){var b=this._isCreated?this._getTopIndex():0;var d=rwt.remote.Server.getInstance();var c=d.getRemoteObject(this);c.set("topIndex",b)},_onDblClick:function(a){if(!rwt.remote.EventUtil.getSuspended()&&this._hasDefaultSelectionListener){rwt.remote.EventUtil.notifyDefaultSelected(this)}},_handleHyperlinkActivation:function(b){if(this._isRWTHyperlinkTarget(b)){b.setDefaultPrevented(true);if(b.getType()===$[13]&&this._hasSelectionListener){var c=b.getDomTarget();var d=c.getAttribute("href");if(!d){d=c.innerHTML}var a={detail:"hyperlink",text:d};rwt.remote.EventUtil.notifySelected(this,a)}}},_isRWTHyperlinkTarget:function(a){var b=a.getDomTarget();return this._isHyperlinkTarget(a)&&b.getAttribute("target")==="_rwt"},_onFocusIn:function(a){this._updateSelectedItemState()},_onFocusOut:function(a){this._updateSelectedItemState()},_updateSelectedItemState:function(){var b=this.getManager().getSelectedItems();for(var a=0;a<b.length;a++){if(this.getFocused()){b[a].removeState($[92])}else{b[a].addState($[92])}}}}}); |
| rwt.remote.HandlerRegistry.add($[373],{factory:function(b){var c=b.style.indexOf("MULTI")!=-1;var a=new rwt.widgets.List(c);a.setMarkupEnabled(b.markupEnabled===true);rwt.remote.HandlerUtil.addStatesForStyles(a,b.style);a.setUserData($[23],true);rwt.remote.HandlerUtil.setParent(a,b.parent);return a},destructor:rwt.remote.HandlerUtil.getControlDestructor(),getDestroyableChildren:rwt.remote.HandlerUtil.getDestroyableChildrenFinder(),properties:rwt.remote.HandlerUtil.extendControlProperties(["items","selectionIndices","topIndex","focusIndex","itemDimensions"]),propertyHandler:rwt.remote.HandlerUtil.extendControlPropertyHandler({selectionIndices:function(b,a){if(b.hasState($[211])){if(b.getItemsCount()===a.length){b.selectAll()}else{b.selectItems(a)}}else{b.selectItem(a[0]!==undefined?a[0]:-1)}},focusIndex:function(b,a){b.focusItem(a)},scrollBarsVisible:function(b,a){b.setScrollBarsVisible(a[0],a[1])},itemDimensions:function(b,a){b.setItemDimensions(a[0],a[1])}}),listeners:rwt.remote.HandlerUtil.extendControlListeners([$[30],$[111]]),listenerHandler:rwt.remote.HandlerUtil.extendControlListenerHandler({})}); |
| rwt.qx.Class.define("rwt.widgets.util.TabUtil",{statics:{createTabItem:function(g,f,b){var e=rwt.remote.WidgetManager.getInstance();var a=e.findWidgetById(f);var d=new rwt.widgets.TabItem();d.setTabIndex(null);d.setLabel($[279]);d.getLabelObject().setMode("html");d.setLabel("");d.setEnableElementFocus(false);d.addEventListener($[280],rwt.widgets.util.TabUtil._onTabItemChangeFocus);d.addEventListener($[349],rwt.widgets.util.TabUtil._onTabItemSelected);d.addEventListener($[13],rwt.widgets.util.TabUtil._onTabItemClick);a.getBar().addAt(d,b);var c=new rwt.widgets.base.TabFolderPage(d);a.getPane().add(c);e.add(c,g+"pg");return d},releaseTabItem:function(d){var a=d.getParent().getParent();d.removeEventListener($[280],rwt.widgets.util.TabUtil._onTabItemChangeFocus);d.removeEventListener($[349],rwt.widgets.util.TabUtil._onTabItemSelected);d.removeEventListener($[13],rwt.widgets.util.TabUtil._onTabItemClick);var c=rwt.remote.WidgetManager.getInstance();var b=c.findIdByWidget(d);c.dispose(b+"pg");c.dispose(b)},_onTabItemChangeFocus:function(a){if(a.getTarget().getFocused()){a.getTarget().getParent().getParent().focus()}},_onTabItemClick:function(a){var b=a.getTarget().getParent().getParent();if(!b.getFocused()){b.focus()}},_onTabItemSelected:function(a){var b=a.getTarget();if(!rwt.remote.EventUtil.getSuspended()&&b.getChecked()){var f=rwt.remote.WidgetManager.getInstance();var e=f.findIdByWidget(b);var d=rwt.remote.Server.getInstance();var c=b.getParent().getParent();d.getRemoteObject(c).notify($[30],{item:e})}},onTabFolderKeyPress:function(a){var d=a.getTarget();if(d.classname==$[305]){var b=d.getBar().getManager();var c=b.getSelected();if(c!=null){switch(a.getKeyIdentifier()){case"Left":b.selectPrevious(c);rwt.widgets.util.TabUtil.markTabItemFocused(d,a.getTarget());a.stopPropagation();break;case $[35]:b.selectNext(c);rwt.widgets.util.TabUtil.markTabItemFocused(d,a.getTarget());a.stopPropagation();break}}}},onTabFolderChangeFocused:function(a){var c=a.getTarget();var b=c.getBar().getManager().getSelected();rwt.widgets.util.TabUtil.markTabItemFocused(c,b)},markTabItemFocused:function(d,c){var a=d.getBar().getManager().getItems();for(var b=0;b<a.length;b++){a[b].removeState($[75])}if(c!=null&&d.getFocused()){c.addState($[75])}}}}); |
| rwt.remote.HandlerRegistry.add($[305],{factory:function(b){var a=new rwt.widgets.TabFolder();rwt.remote.HandlerUtil.addStatesForStyles(a,b.style);a.setUserData($[23],true);rwt.remote.HandlerUtil.setParent(a,b.parent);a.setHideFocus(true);a.setPlaceBarOnTop(b.style.indexOf("BOTTOM")===-1);return a},destructor:rwt.remote.HandlerUtil.getControlDestructor(),getDestroyableChildren:rwt.remote.HandlerUtil.getDestroyableChildrenFinder(),properties:rwt.remote.HandlerUtil.extendControlProperties([$[60]]),propertyHandler:rwt.remote.HandlerUtil.extendControlPropertyHandler({selection:function(b,a){rwt.remote.HandlerUtil.callWithTarget(a,function(e){var c=b.getBar().getChildren();for(var d=0;d<c.length;d++){if(c[d]===e){c[d].setChecked(true)}else{if(c[d].getChecked()){c[d].setChecked(false)}}}})}}),listeners:rwt.remote.HandlerUtil.extendControlListeners([$[30]]),listenerHandler:rwt.remote.HandlerUtil.extendControlListenerHandler({})}); |
| rwt.remote.HandlerRegistry.add($[302],{factory:function(b){var a=rwt.widgets.util.TabUtil.createTabItem(b.id,b.parent,b.index);rwt.remote.HandlerUtil.callWithTarget(b.parent,function(c){rwt.remote.HandlerUtil.addDestroyableChild(c,a);a.setUserData($[103],c)});return a},destructor:function(b){rwt.widgets.util.TabUtil.releaseTabItem(b);var a=b.getUserData($[103]);if(a){rwt.remote.HandlerUtil.removeDestroyableChild(a,b)}},properties:["text",$[15],"control",$[113],$[86]],propertyHandler:{text:function(c,b){var a=rwt.util.Encoding;var d=a.escapeText(b,false);c.setLabel(d)},image:function(b,a){if(a===null){b.setIcon(null)}else{b.setIcon(a[0])}},control:function(b,a){if(a!==null){rwt.remote.HandlerUtil.callWithTarget(a,function(c){var e=rwt.remote.WidgetManager.getInstance();var d=e.findIdByWidget(b)+"pg";rwt.remote.HandlerUtil.callWithTarget(d,function(f){c.setParent(f)})})}},toolTip:rwt.remote.HandlerUtil.getControlPropertyHandler($[113])}}); |
| rwt.qx.Class.define("rwt.widgets.base.Calendar",{extend:rwt.widgets.base.BoxLayout,construct:function(c){arguments.callee.base.call(this);this.setOrientation($[31]);var b=new rwt.widgets.base.BoxLayout();b.setAppearance("calendar-navBar");b.set({height:"auto",spacing:1});var f=new rwt.widgets.base.Button();var a=new rwt.widgets.base.Button();var m=new rwt.widgets.base.Label();var g=new rwt.widgets.base.Button();var d=new rwt.widgets.base.Button();var l=rwt.remote.WidgetManager.getInstance();l.setToolTip(f,"Previous year");l.setToolTip(a,"Previous month");l.setToolTip(g,"Next month");l.setToolTip(d,"Next year");f.set({show:"icon",spacing:0,tabIndex:null});f.setUserData($[183],true);a.set({show:"icon",tabIndex:null});a.setUserData($[183],true);g.set({show:"icon",tabIndex:null});g.setUserData($[183],true);d.set({show:"icon",tabIndex:null});d.setUserData($[183],true);f.setAppearance("calendar-toolbar-previous-year-button");a.setAppearance("calendar-toolbar-previous-month-button");g.setAppearance("calendar-toolbar-next-month-button");d.setAppearance("calendar-toolbar-next-year-button");f.addEventListener($[13],this._onNavButtonClicked,this);a.addEventListener($[13],this._onNavButtonClicked,this);g.addEventListener($[13],this._onNavButtonClicked,this);d.addEventListener($[13],this._onNavButtonClicked,this);this._lastYearBt=f;this._lastMonthBt=a;this._nextMonthBt=g;this._nextYearBt=d;m.setAppearance("calendar-monthyear");m.set({width:"1*"});b.add(f,a,m,g,d);this._monthYearLabel=m;b.setHtmlProperty("id","navBar");var o=new rwt.widgets.base.Parent();o.setAppearance("calendar-datepane");o.set({width:rwt.widgets.base.Calendar.CELL_WIDTH*8,height:rwt.widgets.base.Calendar.CELL_HEIGHT*7});var k=new rwt.widgets.base.Label();k.setAppearance($[508]);k.set({width:rwt.widgets.base.Calendar.CELL_WIDTH,height:rwt.widgets.base.Calendar.CELL_HEIGHT,left:0});k.addState("header");o.add(k);this._weekdayLabelArr=[];for(var e=1;e<8;e++){var k=new rwt.widgets.base.Label();k.setAppearance("calendar-weekday");k.setSelectable(false);k.setCursor($[62]);k.set({width:rwt.widgets.base.Calendar.CELL_WIDTH,height:rwt.widgets.base.Calendar.CELL_HEIGHT,left:e*rwt.widgets.base.Calendar.CELL_WIDTH});o.add(k);this._weekdayLabelArr.push(k)}this._dayLabelArr=[];this._weekLabelArr=[];for(var h=0;h<6;h++){var k=new rwt.widgets.base.Label();k.setAppearance($[508]);k.setSelectable(false);k.setCursor($[62]);k.set({width:rwt.widgets.base.Calendar.CELL_WIDTH,height:rwt.widgets.base.Calendar.CELL_HEIGHT,left:0,top:(h+1)*rwt.widgets.base.Calendar.CELL_HEIGHT});o.add(k);this._weekLabelArr.push(k);for(var j=1;j<8;j++){var k=new rwt.widgets.base.Label();k.setAppearance($[186]);k.setSelectable(false);k.setCursor($[62]);k.set({width:rwt.widgets.base.Calendar.CELL_WIDTH,height:rwt.widgets.base.Calendar.CELL_HEIGHT,left:j*rwt.widgets.base.Calendar.CELL_WIDTH,top:(h+1)*rwt.widgets.base.Calendar.CELL_HEIGHT});k.addEventListener($[1],this._onDayClicked,this);k.addEventListener($[48],this._onDayDblClicked,this);k.addEventListener($[3],this._onDayMouseOver,this);k.addEventListener($[6],this._onDayMouseOut,this);k.setUserData($[186],true);o.add(k);this._dayLabelArr.push(k)}}var n=(c!=null)?c:new Date();this.showMonth(n.getMonth(),n.getFullYear());this.add(b);this.add(o);this.initWidth();this.initHeight()},events:{select:$[50]},statics:{CELL_WIDTH:24,CELL_HEIGHT:16,MONTH_NAMES:[],WEEKDAY_NAMES:[]},properties:{width:{refine:true,init:"auto"},height:{refine:true,init:"auto"},shownMonth:{check:$[18],init:null,nullable:true,event:"changeShownMonth"},shownYear:{check:$[18],init:null,nullable:true,event:"changeShownYear"},date:{check:"Date",init:null,nullable:true,apply:"_applyDate",event:$[290],transform:"_checkDate"}},members:{addState:function(b){arguments.callee.base.call(this,b);if(b.substr(0,8)==$[38]){this._monthYearLabel.addState(b);for(var a=0;a<7;a++){this._weekdayLabelArr[a].addState(b)}for(var a=0;a<6*7;a++){this._dayLabelArr[a].addState(b)}for(var a=0;a<6;a++){this._weekLabelArr[a].addState(b)}}},removeState:function(b){arguments.callee.base.call(this,b);if(b.substr(0,8)==$[38]){this._monthYearLabel.removeState(b);for(var a=0;a<7;a++){this._weekdayLabelArr[a].removeState(b)}for(var a=0;a<6*7;a++){this._dayLabelArr[a].removeState(b)}for(var a=0;a<6;a++){this._weekLabelArr[a].removeState(b)}}},_checkDate:function(a){return(a==null)?null:new Date(a.getTime())},_applyDate:function(f,a){if((f!=null)&&(this.getShownMonth()!=f.getMonth()||this.getShownYear()!=f.getFullYear())){this.showMonth(f.getMonth(),f.getFullYear())}else{var e=(f==null)?-1:f.getDate();for(var c=0;c<6*7;c++){var d=this._dayLabelArr[c];if(d.hasState($[291])){if(d.hasState($[22])){d.removeState($[22])}}else{var b=parseInt(d.getText(),10);if(b==e){d.addState($[22])}else{if(d.hasState($[22])){d.removeState($[22])}}}}}},_onNavButtonClicked:function(a){var b=this.getShownYear();var c=this.getShownMonth();switch(a.getTarget()){case this._lastYearBt:b--;break;case this._lastMonthBt:c--;if(c<0){c=11;b--}break;case this._nextMonthBt:c++;if(c>=12){c=0;b++}break;case this._nextYearBt:b++;break}this.showMonth(c,b)},_onDayClicked:function(a){if(a.isLeftButtonPressed()){var b=a.getTarget().dateTime;this.setDate(new Date(b))}},_onDayDblClicked:function(){this.createDispatchDataEvent("select",this.getDate())},_onDayMouseOver:function(a){a.getTarget().addState("over")},_onDayMouseOut:function(a){a.getTarget().removeState("over")},_onkeypress:function(a){var e=null;var b=null;var d=null;if(a.getModifiers()===0){switch(a.getKeyIdentifier()){case"Left":e=-1;a.preventDefault();a.stopPropagation();break;case $[35]:e=1;a.preventDefault();a.stopPropagation();break;case"Up":e=-7;a.preventDefault();a.stopPropagation();break;case"Down":e=7;a.preventDefault();a.stopPropagation();break;case $[40]:b=-1;a.preventDefault();a.stopPropagation();break;case $[45]:b=1;a.preventDefault();a.stopPropagation();break;case $[105]:if(this.getDate()!=null){this.setDate(null);a.preventDefault();a.stopPropagation();return true}a.preventDefault();a.stopPropagation();break;case"Home":case"End":a.preventDefault();a.stopPropagation();break;case $[49]:case $[78]:if(this.getDate()!=null){this.createDispatchDataEvent("select",this.getDate())}a.preventDefault();a.stopPropagation();return}}else{if(a.isShiftPressed()){switch(a.getKeyIdentifier()){case $[40]:d=-1;a.preventDefault();a.stopPropagation();break;case $[45]:d=1;a.preventDefault();a.stopPropagation();break}}}if(e!=null||b!=null||d!=null){var c=this.getDate();if(c!=null){c=new Date(c.getTime())}if(c==null){c=new Date()}else{if(e!=null){c.setDate(c.getDate()+e)}if(b!=null){c.setMonth(c.getMonth()+b)}if(d!=null){c.setFullYear(c.getFullYear()+d)}}this.setDate(c)}},showMonth:function(b,a){if((b!=null&&b!=this.getShownMonth())||(a!=null&&a!=this.getShownYear())){if(b!=null){this.setShownMonth(b)}if(a!=null){this.setShownYear(a)}this._updateDatePane()}},_updateDatePane:function(){var t=new Date();var d=t.getFullYear();var j=t.getMonth();var z=t.getDate();var a=this.getDate();var r=(a==null)?-1:a.getFullYear();var b=(a==null)?-1:a.getMonth();var w=(a==null)?-1:a.getDate();var e=this.getShownMonth();var q=this.getShownYear();var x=this.__getWeekStart();var u=new Date(this.getShownYear(),this.getShownMonth(),1);var f=this.getShownYear();var v=rwt.widgets.base.Calendar.MONTH_NAMES[this.getShownMonth()];this._monthYearLabel.setText(v+" "+f);var k=u.getDay();var g=(1+7-k)%7;for(var o=0;o<7;o++){var n=(o+x)%7;var m=this._weekdayLabelArr[o];u.setDate(g+n);var s=rwt.widgets.base.Calendar.WEEKDAY_NAMES[u.getDay()+1];m.setText(s);if(this.__isWeekend(n)){m.addState("weekend")}else{m.removeState("weekend")}}u=new Date(q,e,1);var p=(7+k-x)%7;u.setDate(u.getDate()-p);for(var l=0;l<6;l++){this._weekLabelArr[l].setText(""+this.__getWeekInYear(u));for(var o=0;o<7;o++){var m=this._dayLabelArr[l*7+o];var f=u.getFullYear();var v=u.getMonth();var h=u.getDate();var c=(r==f&&b==v&&w==h);if(c){m.addState($[22])}else{m.removeState($[22])}if(v!=e){m.addState($[291])}else{m.removeState($[291])}var y=(f==d&&v==j&&h==z);if(y){m.addState("today")}else{m.removeState("today")}m.setText(""+h);m.dateTime=u.getTime();u.setDate(u.getDate()+1)}}},__thursdayOfSameWeek:function(a){return new Date(a.getTime()+(3-((a.getDay()+6)%7))*86400000)},__getWeekInYear:function(a){var d=this.__thursdayOfSameWeek(a);var b=d.getFullYear();var c=this.__thursdayOfSameWeek(new Date(b,0,4));return Math.floor(1.5+(d.getTime()-c.getTime())/86400000/7)},__getWeekStart:function(){var a={MV:5,AE:6,AF:6,BH:6,DJ:6,DZ:6,EG:6,ER:6,ET:6,IQ:6,IR:6,JO:6,KE:6,KW:6,LB:6,LY:6,MA:6,OM:6,QA:6,SA:6,SD:6,SO:6,TN:6,YE:6,AS:0,AU:0,AZ:0,BW:0,CA:0,CN:0,FO:0,GE:0,GL:0,GU:0,HK:0,IE:0,IL:0,IS:0,JM:0,JP:0,KG:0,KR:0,LA:0,MH:0,MN:0,MO:0,MP:0,MT:0,NZ:0,PH:0,PK:0,SG:0,TH:0,TT:0,TW:0,UM:0,US:0,UZ:0,VI:0,ZA:0,ZW:0,MW:0,NG:0,TJ:0};var b=this.__getTerritory();return a[b]!=null?a[b]:1},__getWeekendStart:function(){var a={EG:5,IL:5,SY:5,IN:0,AE:4,BH:4,DZ:4,IQ:4,JO:4,KW:4,LB:4,LY:4,MA:4,OM:4,QA:4,SA:4,SD:4,TN:4,YE:4};var b=this.__getTerritory();return a[b]!=null?a[b]:6},__getWeekendEnd:function(){var a={AE:5,BH:5,DZ:5,IQ:5,JO:5,KW:5,LB:5,LY:5,MA:5,OM:5,QA:5,SA:5,SD:5,TN:5,YE:5,AF:5,IR:5,EG:6,IL:6,SY:6};var b=this.__getTerritory();return a[b]!=null?a[b]:0},__isWeekend:function(b){var c=this.__getWeekendStart();var a=this.__getWeekendEnd();if(a>c){return((b>=c)&&(b<=a))}else{return((b>=c)||(b<=a))}},__getTerritory:function(){var a=rwt.client.Client.getTerritory()||rwt.client.Client.getLanguage();return a.toUpperCase()}},destruct:function(){this._disposeObjects("_lastYearBt","_lastMonthBt","_nextMonthBt","_nextYearBt","_monthYearLabel");this._disposeObjectDeep("_weekdayLabelArr",1);this._disposeObjectDeep("_dayLabelArr",1);this._disposeObjectDeep("_weekLabelArr",1)}}); |
| rwt.qx.Class.define($[399],{extend:rwt.widgets.base.Parent,construct:function(a){arguments.callee.base.call(this);this.setOverflow($[9]);this.setAppearance("coolitem");this._orientation=a;this._handle=new rwt.widgets.base.Terminator();this._handle.addState(a);this._handle.setAppearance($[542]);this._handle.addEventListener($[1],this._onHandleMouseDown,this);this._handle.addEventListener($[28],this._onHandleMouseMove,this);this._handle.addEventListener($[5],this._onHandleMouseUp,this);this.add(this._handle);this._bufferedZIndex=null;this._bufferedControlZIndex=null;this._control=null},destruct:function(){if(this._handle!=null){this._handle.removeEventListener($[1],this._onHandleMouseDown,this);this._handle.removeEventListener($[28],this._onHandleMouseMove,this);this._handle.removeEventListener($[5],this._onHandleMouseUp,this);this._handle.dispose()}},statics:{DRAG_CURSOR:$[339],CONTROL_OFFSET:6},members:{setLocked:function(a){this._handle.setDisplay(!a)},setControl:function(a){if(a!=null){a.setLeft(this.getLeft()+rwt.widgets.CoolItem.CONTROL_OFFSET);a.setDisplay(true)}if(this._control!=null){this._control.setDisplay(false)}this._control=a},updateHandleBounds:function(){if(this._orientation==$[31]){this._handle.setWidth(this.getWidth())}else{this._handle.setHeight(this.getHeight())}},_applyParent:function(b,a){arguments.callee.base.call(this,b,a);if(b!=null){this.setLocked(b.getLocked())}},_onHandleMouseDown:function(a){this._handle.setCapture(true);this.getTopLevelWidget().setGlobalCursor(rwt.widgets.CoolItem.DRAG_CURSOR);this._offsetX=a.getPageX()-this.getLeft();this._offsetY=a.getPageY()-this.getTop();this._bufferedZIndex=this.getZIndex();this.setZIndex(10000000-1);if(this._control!=null){this._bufferedControlZIndex=this._control.getZIndex();this._control.setZIndex(10000000)}this.setBackgroundColor(this._findBackground())},_applyLeft:function(c,a){arguments.callee.base.call(this,c,a);if(this._control!=null){var b=c+rwt.widgets.CoolItem.CONTROL_OFFSET;this._control.setLeft(b)}},_applyWidth:function(c,a){arguments.callee.base.call(this,c,a);if(this._control!=null){var b=c-rwt.widgets.CoolItem.CONTROL_OFFSET;this._control.setWidth(b)}},_onHandleMouseMove:function(a){if(this._handle.getCapture()){this.setLeft(a.getPageX()-this._offsetX)}},_onHandleMouseUp:function(a){this._handle.setCapture(false);this.setZIndex(this._bufferedZIndex);if(this._control!=null){this._control.setZIndex(this._bufferedControlZIndex)}this.resetBackgroundColor();this.getTopLevelWidget().setGlobalCursor(null);if(!rwt.remote.EventUtil.getSuspended()){rwt.remote.Server.getInstance().getRemoteObject(this).call("move",{left:this.getLeft()})}},_findBackground:function(){var b=true;var a=null;var c=this.getParent();while(b&&c!=null&&a==null){if(c.getBackgroundColor){a=c.getBackgroundColor()}if(c.getParent){c=c.getParent()}else{b=false}}return a}}}); |
| rwt.remote.HandlerRegistry.add($[399],{factory:function(c){var d=rwt.remote.HandlerUtil.createStyleMap(c.style);var b=d.VERTICAL?$[31]:$[37];var a=new rwt.widgets.CoolItem(b);rwt.remote.HandlerUtil.setParent(a,c.parent);a.setMinWidth(0);a.setMinHeight(0);return a},destructor:rwt.remote.HandlerUtil.getWidgetDestructor(),properties:[$[87],"control",$[86]],propertyHandler:{bounds:function(b,a){b.setLeft(a[0]);b.setTop(a[1]);b.setWidth(a[2]);b.setHeight(a[3]);b.updateHandleBounds()},control:function(b,a){rwt.remote.HandlerUtil.callWithTarget(a,function(c){b.setControl(c)})}}}); |
| rwt.qx.Class.define($[285],{extend:rwt.widgets.base.BasicButton,construct:function(a){arguments.callee.base.call(this,a);this._alignment=a==="arrow"?"up":$[24];switch(a){case"arrow":this.addState("rwt_UP");this.setAppearance($[549]);break;case"push":case $[202]:this.setAppearance($[549]);break;case $[108]:this.setAppearance($[357]);break;case $[116]:this.setAppearance("radio-button")}this.initTabIndex();this.addEventListener($[68],this._onFocus);this.addEventListener("blur",this._onBlur)},properties:{tabIndex:{refine:true,init:1}},members:{setAlignment:function(a){if(this.hasState("rwt_ARROW")){this.removeState("rwt_"+this._alignment.toUpperCase());this.addState("rwt_"+a.toUpperCase())}else{this.setHorizontalChildrenAlign(a)}this._alignment=a},setWrap:function(a){if(a){this.setFlexibleCell(2)}},_afterRenderLayout:function(a){if(this.hasState($[75])){this._showFocusIndicator()}},_showFocusIndicator:function(){var b=rwt.widgets.util.FocusIndicator.getInstance();var a=this.getCellNode(2)!=null?this.getCellNode(2):this.getCellNode(1);b.show(this,"Button-FocusIndicator",a)},_onFocus:function(a){this._showFocusIndicator()},_onBlur:function(b){var a=rwt.widgets.util.FocusIndicator.getInstance();a.hide(this)}}}); |
| rwt.remote.HandlerRegistry.add($[285],{factory:function(c){var d=rwt.remote.HandlerUtil.createStyleMap(c.style);var b="push";if(d.CHECK){b=$[108]}else{if(d.TOGGLE){b=$[202]}else{if(d.RADIO){b=$[116]}else{if(d.ARROW){b="arrow"}}}}var a=new rwt.widgets.Button(b);a.setWrap(d.WRAP);rwt.remote.HandlerUtil.addStatesForStyles(a,c.style);a.setUserData($[23],true);rwt.remote.HandlerUtil.setParent(a,c.parent);rwt.remote.HandlerUtil.callWithTarget(c.parent,function(e){a.setNoRadioGroup(e.hasState($[338]))});return a},destructor:rwt.remote.HandlerUtil.getControlDestructor(),getDestroyableChildren:rwt.remote.HandlerUtil.getDestroyableChildrenFinder(),properties:rwt.remote.HandlerUtil.extendControlProperties(["text",$[362],$[15],$[60],$[172]]),propertyHandler:rwt.remote.HandlerUtil.extendControlPropertyHandler({text:function(c,b){var a=rwt.util.Encoding;var d=a.escapeText(b,false);if(c.hasState("rwt_WRAP")){d=a.replaceNewLines(d,$[97])}c.setText(d===""?null:d)},image:function(b,a){if(a===null){b.setImage(a)}else{b.setImage.apply(b,a)}}}),listeners:rwt.remote.HandlerUtil.extendControlListeners([$[30]]),listenerHandler:rwt.remote.HandlerUtil.extendControlListenerHandler({})}); |
| rwt.qx.Class.define($[478],{extend:rwt.widgets.Button,construct:function(){arguments.callee.base.call(this,"push");this.setAppearance("file-upload");this.addEventListener($[141],this._layoutInputElement,this);this.addEventListener($[224],this._onMouseOverElement,this);this._formElement=null;this._inputElement=null;this._iframe=null;this._cursor="";this.__onValueChange=rwt.util.Functions.bind(this._onValueChange,this);this.setEnableElementFocus(false);this._createIframeWidget()},destruct:function(){this._formElement=null;this._inputElement=null},members:{submit:function(a){if(typeof a!==$[7]){throw new Error("No url given!")}if(this._getFileName()===""){throw new Error("No file selected!")}if(this._formElement===null){throw new Error("Form element not created!")}this._formElement.setAttribute("action",a);this._formElement.submit()},destroy:function(){arguments.callee.base.call(this);this._iframe.destroy()},_createSubelements:function(){if(this._formElement===null){arguments.callee.base.call(this);this._createFormElement();this._createInputElement()}else{this._formElement.removeChild(this._inputElement);this._getTargetNode().removeChild(this._formElement);arguments.callee.base.call(this);this._getTargetNode().appendChild(this._formElement);this._formElement.appendChild(this._inputElement)}},_createFormElement:function(){this._formElement=document.createElement("form");this._formElement.setAttribute("target",this._getFrameName());this._formElement.setAttribute("method","POST");if(rwt.client.Client.isMshtml()){this._formElement.setAttribute("encoding",$[524])}else{this._formElement.setAttribute("enctype",$[524])}this._getTargetNode().appendChild(this._formElement)},_createInputElement:function(){this._inputElement=document.createElement($[77]);this._inputElement.style.position=$[16];this._inputElement.setAttribute("type","file");this._inputElement.setAttribute("name","file");this._inputElement.setAttribute("size","1");this._inputElement.style.cursor=this._cursor;this._inputElement.onchange=this.__onValueChange;rwt.html.Style.setOpacity(this._inputElement,0);this._formElement.appendChild(this._inputElement)},_createIframeWidget:function(){this._iframe=new rwt.widgets.base.Iframe();this._iframe.setSource("about:blank");this._iframe.setVisibility(false);this._iframe.setWidth(0);this._iframe.setHeight(0);this._iframe.setFrameName(this._getFrameName());this._iframe.addToDocument()},_onValueChange:function(b){var e=this._formatFileName(this._getFileName());if(!rwt.remote.EventUtil.getSuspended()){var a=rwt.remote.Server.getInstance();var d=rwt.remote.WidgetManager.getInstance();var c=d.findIdByWidget(this);a.addParameter(c+".fileName",e);a.send()}},_getFileName:function(){return this._inputElement.value},_layoutPost:function(a){arguments.callee.base.call(this,a);if(a.width||a.height){this._layoutInputElement()}},_layoutInputElement:function(){if(this.getEnabled()&&this.isSeeable()&&!rwt.client.Client.isMobileSafari()){var a=10;this._layoutInputElementHorizontal(a);this._layoutInputElementVertical(a)}},_layoutInputElementHorizontal:function(g){var h=0.6;var a=this.getBoxWidth();var e=(a+g*2)/(h);var i=e/10;this._inputElement.style.fontSize=i;var c=0;while(this._inputElement.offsetWidth<=e){i+=10;this._inputElement.style.font=i+"px monospace";c++;if(c>100){var b="Failed to force input-element width.";throw new Error(b)}}var d=this._inputElement.offsetWidth;var f=a-d+g;this._inputElement.style.left=f+"px"},_layoutInputElementVertical:function(b){var a=this.getBoxHeight();this._inputElement.style.height=(a+b*2)+"px";this._inputElement.style.top=(b*-1)+"px"},setStyleProperty:function(b,a){if(b===$[133]){this._cursor=a;if(this._inputElement!=null){this._inputElement.style.cursor=a}}else{arguments.callee.base.call(this,b,a)}},_applyEnabled:function(b,a){arguments.callee.base.call(this,b,a);if(this._inputElement){this._inputElement.style.display=b?"":"none";this._layoutInputElement()}},_afterAppear:function(){arguments.callee.base.call(this);this._layoutInputElement()},_onMouseOver:function(a){if(a.getDomTarget()===this._inputElement){arguments.callee.base.call(this,a)}},_onMouseOverElement:function(a){if(a.getDomTarget()===this._inputElement){this._onMouseOver(a)}},_onMouseDown:function(a){if(a.getDomTarget()===this._inputElement){arguments.callee.base.call(this,a)}if(rwt.client.Client.getBrowser()===$[221]){this._onBlur()}},_onMouseUp:function(a){if(a.getDomTarget()===this._inputElement||this.hasState($[29])){arguments.callee.base.call(this,a)}},_onFocus:function(a){arguments.callee.base.call(this,a);this._inputElement.focus()},_onKeyDown:rwt.util.Functions.returnTrue,_onKeyUp:rwt.util.Functions.returnTrue,_ontabfocus:function(){if(rwt.client.Client.getBrowser()===$[221]){this._showFocusIndicator(true)}},_showFocusIndicator:function(a){var d=rwt.client.Client.getBrowser()===$[221];if(!d||a){var c=rwt.widgets.util.FocusIndicator.getInstance();var b=this.getCellNode(2)!=null?this.getCellNode(2):this.getCellNode(1);c.show(this,"FileUpload-FocusIndicator",b)}},_formatFileName:function(b){var a=b;if(a.indexOf("\\")!=-1){a=a.substr(a.lastIndexOf("\\")+1)}else{if(a.indexOf("/")!=-1){a=a.substr(a.lastIndexOf("/")+1)}}return a},_getFrameName:function(){return"FileUpload_"+this.toHashCode()}}}); |
| rwt.remote.HandlerRegistry.add($[478],{factory:function(b){var a=new rwt.widgets.FileUpload();rwt.remote.HandlerUtil.addStatesForStyles(a,b.style);a.setUserData($[23],true);rwt.remote.HandlerUtil.setParent(a,b.parent);return a},destructor:rwt.remote.HandlerUtil.getControlDestructor(),getDestroyableChildren:rwt.remote.HandlerUtil.getDestroyableChildrenFinder(),properties:rwt.remote.HandlerUtil.extendControlProperties(["text",$[15]]),propertyHandler:rwt.remote.HandlerUtil.extendControlPropertyHandler({text:function(c,b){var a=rwt.util.Encoding;var d=a.escapeText(b,true);c.setText(d===""?null:d)},image:function(b,a){if(a===null){b.setImage(a)}else{b.setImage.apply(b,a)}}}),listeners:rwt.remote.HandlerUtil.extendControlListeners([]),listenerHandler:rwt.remote.HandlerUtil.extendControlListenerHandler({}),methods:["submit"],methodHandler:{submit:function(b,a){b.submit(a.url)}}}); |
| rwt.qx.Class.define($[462],{extend:rwt.widgets.base.AbstractSlider,construct:function(a){arguments.callee.base.call(this,a);this._hasSelectionListener=false;this._requestScheduled=false;this.addEventListener($[42],this._onContextMenu,this);this.addEventListener($[4],this._onKeyPress,this)},statics:{SEND_DELAY:50,_isNoModifierPressed:function(a){return !a.isCtrlPressed()&&!a.isShiftPressed()&&!a.isAltPressed()&&!a.isMetaPressed()}},members:{_configureAppearance:function(){this.setAppearance("slider");this._thumb.setAppearance($[380]);this._minButton.setAppearance("slider-min-button");this._maxButton.setAppearance("slider-max-button")},setSelection:function(a){this._setSelection(a)},setMinimum:function(a){this._setMinimum(a)},setMaximum:function(a){this._setMaximum(a)},setIncrement:function(a){this._setIncrement(a)},setPageIncrement:function(a){this._setPageIncrement(a)},setThumb:function(a){this._setThumb(a)},setHasSelectionListener:function(a){this._hasSelectionListener=a},_setSelection:function(a){arguments.callee.base.call(this,a);this._scheduleSendChanges()},_onContextMenu:function(a){var b=this.getContextMenu();if(b!=null){b.setLocation(a.getPageX(),a.getPageY());b.setOpener(this);b.show();a.stopPropagation()}},_onKeyPress:function(a){var c=a.getKeyIdentifier();var b=null;if(rwt.widgets.Slider._isNoModifierPressed(a)){switch(c){case"Left":b=this._selection-this._increment;a.preventDefault();a.stopPropagation();break;case"Down":if(this._horizontal){b=this._selection-this._increment}else{b=this._selection+this._increment}a.preventDefault();a.stopPropagation();break;case $[35]:b=this._selection+this._increment;a.preventDefault();a.stopPropagation();break;case"Up":if(this._horizontal){b=this._selection+this._increment}else{b=this._selection-this._increment}a.preventDefault();a.stopPropagation();break;case"Home":b=this._minimum;a.preventDefault();a.stopPropagation();break;case"End":b=this._maximum;a.preventDefault();a.stopPropagation();break;case $[45]:if(this._horizontal){b=this._selection-this._pageIncrement}else{b=this._selection+this._pageIncrement}a.preventDefault();a.stopPropagation();break;case $[40]:if(this._horizontal){b=this._selection+this._pageIncrement}else{b=this._selection-this._pageIncrement}a.preventDefault();a.stopPropagation();break}if(b!=null){if(b<this._minimum){b=this._minimum}if(b>this._maximum){b=this._maximum}this.setSelection(b);if(this._readyToSendChanges){this._readyToSendChanges=false;rwt.client.Timer.once(this._sendChanges,this,rwt.widgets.Slider.SEND_DELAY)}}}},_onMouseWheel:function(a){if(this.getFocused()){arguments.callee.base.call(this,a);if(this._readyToSendChanges){this._readyToSendChanges=false;rwt.client.Timer.once(this._sendChanges,this,500)}}},_scheduleSendChanges:function(){if(!rwt.remote.EventUtil.getSuspended()){if(!this._requestScheduled){this._requestScheduled=true;rwt.client.Timer.once(this._sendChanges,this,rwt.widgets.Slider.SEND_DELAY)}}},_sendChanges:function(){var c=rwt.remote.WidgetManager.getInstance();var a=rwt.remote.Server.getInstance();var b=c.findIdByWidget(this);a.addParameter(b+$[170],this._selection);if(this._hasSelectionListener){rwt.remote.EventUtil.notifySelected(this)}this._requestScheduled=false}}}); |
| rwt.remote.HandlerRegistry.add($[462],{factory:function(b){var c=b.style.indexOf($[330])!=-1;var a=new rwt.widgets.Slider(c);rwt.remote.HandlerUtil.addStatesForStyles(a,b.style);a.setUserData($[23],true);rwt.remote.HandlerUtil.setParent(a,b.parent);return a},destructor:rwt.remote.HandlerUtil.getControlDestructor(),properties:rwt.remote.HandlerUtil.extendControlProperties([$[266],$[267],$[60],$[311],$[315],"thumb"]),propertyHandler:rwt.remote.HandlerUtil.extendControlPropertyHandler({}),getDestroyableChildren:rwt.remote.HandlerUtil.getDestroyableChildrenFinder(),listeners:rwt.remote.HandlerUtil.extendControlListeners([$[30]]),listenerHandler:rwt.remote.HandlerUtil.extendControlListenerHandler({})}); |
| rwt.qx.Class.define($[375],{extend:rwt.widgets.base.Spinner,construct:function(){arguments.callee.base.call(this);this._hasSelectionListener=false;this._hasDefaultSelectionListener=false;this.setWrap(false);this._textfield.setFocused=function(){};this._textfield.addEventListener($[118],this._onChangeValue,this);this._textfield.addEventListener($[4],this._onChangeValue,this);this._textfield.addEventListener("blur",this._onChangeValue,this);this._textfield.addEventListener($[10],this._onKeyDown,this);this._textfield.setTabIndex(null);this.addEventListener($[179],this._onChangeEnabled,this);this.addEventListener($[120],this._onFocusOut,this);this._checkValue=this.__checkValueWithDigits},destruct:function(){this._textfield.removeEventListener($[118],this._onChangeValue,this);this._textfield.removeEventListener($[4],this._onChangeValue,this);this._textfield.removeEventListener("blur",this._onChangeValue,this);this._textfield.removeEventListener($[10],this._onKeyDown,this);this.removeEventListener($[179],this._onChangeEnabled,this);this.removeEventListener($[120],this._onFocusOut,this)},properties:{digits:{check:$[18],init:0,apply:"_applyDigits"},decimalSeparator:{check:$[46],init:".",apply:"_applyDecimalSeparator"}},members:{setFont:function(a){this._textfield.setFont(a)},setMaxLength:function(a){this._textfield.setMaxLength(a)},setMinMaxSelection:function(b,a,c){this.setMin(Math.min(b,this.getMin()));this.setMax(Math.max(a,this.getMax()));this.setValue(c);this.setMin(b);this.setMax(a)},_applyCursor:function(b,a){arguments.callee.base.call(this,b,a);if(b){this._upbutton.setCursor(b);this._downbutton.setCursor(b);this._textfield.setCursor(b)}else{this._upbutton.resetCursor();this._downbutton.resetCursor();this._textfield.resetCursor()}},setHasSelectionListener:function(a){this._hasSelectionListener=a},setHasDefaultSelectionListener:function(a){this._hasDefaultSelectionListener=a},_visualizeFocus:function(){this._textfield._visualizeFocus();if(this._textfield.isCreated()){this._textfield.selectAll()}this.addState($[75])},_visualizeBlur:function(){this._textfield._setSelectionLength(0);this._textfield._visualizeBlur();this.removeState($[75])},_oninput:function(a){this._suspendTextFieldUpdate=true;this._checkValue(true,false);this._suspendTextFieldUpdate=false},_onChangeValue:function(a){if(!rwt.remote.EventUtil.getSuspended()){var b=rwt.remote.Server.getInstance();b.getRemoteObject(this).set($[60],this.getManager().getValue());if(this._hasSelectionListener){b.onNextSend(this._sendWidgetSelected,this);b.sendDelayed(500)}}},_onChangeEnabled:function(a){var b=a.getValue();this._upbutton.setEnabled(b&&this.getValue()<this.getMax());this._downbutton.setEnabled(b&&this.getValue()>this.getMin())},_onKeyDown:function(a){if(!rwt.remote.EventUtil.getSuspended()){if(a.getKeyIdentifier()==$[49]&&!a.isShiftPressed()&&!a.isAltPressed()&&!a.isCtrlPressed()&&!a.isMetaPressed()&&this._hasDefaultSelectionListener){a.stopPropagation();this._sendWidgetDefaultSelected()}}},_onmousewheel:function(a){if(this.getFocused()){arguments.callee.base.call(this,a)}},_sendWidgetSelected:function(){rwt.remote.EventUtil.notifySelected(this)},_sendWidgetDefaultSelected:function(){rwt.remote.EventUtil.notifyDefaultSelected(this)},_applyDigits:function(c,b){var a=this.getManager().getValue();if(this.getDigits()>0){this._textfield.setValue(this._format(a))}else{this._textfield.setValue(String(a))}},_applyDecimalSeparator:function(c,b){var a=this.getManager().getValue();if(this.getDigits()>0){this._textfield.setValue(this._format(a))}},_format:function(d){var c=this.getDigits();var f=d/Math.pow(10,c);var a=f.toFixed(c);var e=this.getDecimalSeparator();if(e!="."){var b=rwt.util.Encoding.escapeRegexpChars(".");a=a.replace(new RegExp(b),e)}return a},_limit:function(c){var a=c;var b=this.getDigits();if(b>0){a=a*Math.pow(10,b)}a=Math.round(a);if(a>this.getMax()){a=this.getMax()}if(a<this.getMin()){a=this.getMin()}return a},_onFocusOut:function(a){this._checkValue(true,false)},_onkeypress:function(a){var b=a.getKeyIdentifier();var c=this.getDecimalSeparator();if(!(this.getDigits()>0&&b==c)){arguments.callee.base.call(this,a)}},_onchange:function(a){var b=this.getManager().getValue();if(!this._suspendTextFieldUpdate){if(this.getDigits()>0){this._textfield.setValue(this._format(b))}else{this._textfield.setValue(String(b))}}if(b==this.getMin()&&!this.getWrap()){this._downbutton.removeState($[12]);this._downbutton.setEnabled(false);this._timer.stop()}else{this._downbutton.resetEnabled()}if(b==this.getMax()&&!this.getWrap()){this._upbutton.removeState($[12]);this._upbutton.setEnabled(false);this._timer.stop()}else{this._upbutton.resetEnabled()}this.createDispatchDataEvent($[57],b)},__checkValueWithDigits:function(g,b){var k=this._textfield.getInputElement();if(k){if(k.value===""&&!g){this.resetValue()}else{var i=k.value;var e=i;var d=this.getDecimalSeparator();if(this.getDigits()>0&&d!="."){d=rwt.util.Encoding.escapeRegexpChars(d);e=i.replace(new RegExp(d),".")}var j=parseFloat(e);var f=this._limit(j);var a=this.getManager().getValue();var h=f;if(isNaN(j)||j!=f||j!=e){if(b){this._textfield.setValue(this._last_value)}else{if(isNaN(f)){h=a}}}if(!b){var c=String(h);if(this.getDigits()>0){c=this._format(h)}if(h===a&&i!==c&&!this._suspendTextFieldUpdate){this._textfield.setValue(c)}this.getManager().setValue(h)}}}}}}); |
| rwt.remote.HandlerRegistry.add($[375],{factory:function(b){var a=new rwt.widgets.Spinner();rwt.remote.HandlerUtil.addStatesForStyles(a,b.style);a.setUserData($[23],true);rwt.remote.HandlerUtil.setParent(a,b.parent);var c=rwt.remote.HandlerUtil.createStyleMap(b.style);if(c.READ_ONLY){a.setEditable(false)}if(c.WRAP){a.setWrap(true)}return a},destructor:rwt.remote.HandlerUtil.getControlDestructor(),getDestroyableChildren:rwt.remote.HandlerUtil.getDestroyableChildrenFinder(),properties:rwt.remote.HandlerUtil.extendControlProperties([$[266],$[267],$[60],"digits",$[311],$[315],$[295],"decimalSeparator"]),propertyHandler:rwt.remote.HandlerUtil.extendControlPropertyHandler({minimum:function(c,b){var a=c.getMax();if(b>a){c.setMax(b+1)}c.setMin(b)},maximum:function(b,a){b.setMax(a)},selection:function(b,a){b.setValue(a)},increment:function(b,a){b.setIncrementAmount(a);b.setWheelIncrementAmount(a)},pageIncrement:function(b,a){b.setPageIncrementAmount(a)},textLimit:function(b,a){b.setMaxLength(a)}}),listeners:rwt.remote.HandlerUtil.extendControlListeners([$[30],$[111]]),listenerHandler:rwt.remote.HandlerUtil.extendControlListenerHandler({})}); |
| rwt.qx.Class.define("rwt.widgets.DateTimeTime",{extend:rwt.widgets.base.Parent,construct:function(a){arguments.callee.base.call(this);this.setOverflow($[9]);this.setAppearance("datetime-time");this._short=rwt.util.Strings.contains(a,"short");this._medium=rwt.util.Strings.contains(a,"medium");this._long=rwt.util.Strings.contains(a,"long");this._hasSelectionListener=false;this._requestTimer=null;this.addEventListener($[101],this._rwt_onChangeFont,this);this.addEventListener($[4],this._onKeyPress,this);this.addEventListener($[34],this._onKeyUp,this);this.addEventListener($[43],this._onMouseWheel,this);this.addEventListener($[42],this._onContextMenu,this);this.addEventListener($[68],this._onFocusIn,this);this.addEventListener("blur",this._onFocusOut,this);this._focusedTextField=null;this._hoursTextField=new rwt.widgets.base.Label("00");this._hoursTextField.setAppearance($[139]);this._hoursTextField.setUserData($[155],2);this._hoursTextField.addEventListener($[1],this._onTextFieldMouseDown,this);this.add(this._hoursTextField);this._separator3=new rwt.widgets.base.Label(":");this._separator3.setAppearance($[231]);this._separator3.addEventListener($[42],this._onContextMenu,this);this.add(this._separator3);this._minutesTextField=new rwt.widgets.base.Label("00");this._minutesTextField.setAppearance($[139]);this._minutesTextField.setUserData($[155],2);this._minutesTextField.addEventListener($[1],this._onTextFieldMouseDown,this);this.add(this._minutesTextField);this._separator4=new rwt.widgets.base.Label(":");this._separator4.setAppearance($[231]);if(this._medium||this._long){this.add(this._separator4)}this._secondsTextField=new rwt.widgets.base.Label("00");this._secondsTextField.setAppearance($[139]);this._secondsTextField.setUserData($[155],2);this._secondsTextField.addEventListener($[1],this._onTextFieldMouseDown,this);if(this._medium||this._long){this.add(this._secondsTextField)}this._spinner=new rwt.widgets.base.Spinner();this._spinner.set({wrap:true,border:null,backgroundColor:null});this._spinner.setMin(0);this._spinner.setMax(23);this._spinner.setValue(0);this._spinner.addEventListener($[57],this._onSpinnerChange,this);this._spinner._textfield.setTabIndex(null);this._spinner._textfield.setFocused=function(){};this._spinner._textfield.setVisibility(false);this._spinner._upbutton.setAppearance($[398]);this._spinner._downbutton.setAppearance($[423]);this._spinner.removeEventListener($[4],this._spinner._onkeypress,this._spinner);this._spinner.removeEventListener($[10],this._spinner._onkeydown,this._spinner);this._spinner.removeEventListener($[34],this._spinner._onkeyup,this._spinner);this._spinner.removeEventListener($[43],this._spinner._onmousewheel,this._spinner);this.add(this._spinner);this._focusedTextField=this._hoursTextField},destruct:function(){this.removeEventListener($[101],this._rwt_onChangeFont,this);this.removeEventListener($[4],this._onKeyPress,this);this.removeEventListener($[34],this._onKeyUp,this);this.removeEventListener($[43],this._onMouseWheel,this);this.removeEventListener($[42],this._onContextMenu,this);this.removeEventListener($[68],this._onFocusIn,this);this.removeEventListener("blur",this._onFocusOut,this);this._hoursTextField.removeEventListener($[1],this._onTextFieldMouseDown,this);this._minutesTextField.removeEventListener($[1],this._onTextFieldMouseDown,this);this._secondsTextField.removeEventListener($[1],this._onTextFieldMouseDown,this);this._spinner.removeEventListener($[57],this._onSpinnerChange,this);this._disposeObjects("_hoursTextField","_minutesTextField","_secondsTextField",$[436],"_spinner","_separator3","_separator4")},statics:{HOURS_TEXTFIELD:8,MINUTES_TEXTFIELD:9,SECONDS_TEXTFIELD:10,HOURS_MINUTES_SEPARATOR:11,MINUTES_SECONDS_SEPARATOR:12,SPINNER:7,_isNoModifierPressed:function(a){return !a.isCtrlPressed()&&!a.isShiftPressed()&&!a.isAltPressed()&&!a.isMetaPressed()}},members:{addState:function(a){arguments.callee.base.call(this,a);if(a.substr(0,8)==$[38]){this._hoursTextField.addState(a);this._minutesTextField.addState(a);this._secondsTextField.addState(a);this._spinner.addState(a);this._separator3.addState(a);this._separator4.addState(a)}},removeState:function(a){arguments.callee.base.call(this,a);if(a.substr(0,8)==$[38]){this._hoursTextField.removeState(a);this._minutesTextField.removeState(a);this._secondsTextField.removeState(a);this._spinner.removeState(a);this._separator3.removeState(a);this._separator4.removeState(a)}},_rwt_onChangeFont:function(a){var b=a.getValue();this._hoursTextField.setFont(b);this._minutesTextField.setFont(b);this._secondsTextField.setFont(b)},_onContextMenu:function(a){var b=this.getContextMenu();if(b!=null){b.setLocation(a.getPageX(),a.getPageY());b.setOpener(this);b.show();a.stopPropagation()}},_onFocusIn:function(a){this._focusedTextField.addState($[22]);this._initialEditing=true},_onFocusOut:function(a){this._focusedTextField.removeState($[22])},_onTextFieldMouseDown:function(a){this._setFocusedTextField(a.getTarget())},_setFocusedTextField:function(a){if(this._focusedTextField!==a){var b;this._focusedTextField.removeState($[22]);this._focusedTextField=null;if(a===this._hoursTextField){this._spinner.setMin(0);this._spinner.setMax(23);b=this._removeLeadingZero(this._hoursTextField.getText());this._spinner.setValue(parseInt(b,10))}else{if(a===this._minutesTextField){this._spinner.setMin(0);this._spinner.setMax(59);b=this._removeLeadingZero(this._minutesTextField.getText());this._spinner.setValue(parseInt(b,10))}else{if(a===this._secondsTextField){this._spinner.setMin(0);this._spinner.setMax(59);b=this._removeLeadingZero(this._secondsTextField.getText());this._spinner.setValue(parseInt(b,10))}}}this._focusedTextField=a;this._focusedTextField.addState($[22]);this._initialEditing=true}},_onSpinnerChange:function(a){if(this._focusedTextField!=null){var b=this._focusedTextField.getText();var c=this._addLeadingZero(this._spinner.getValue());this._focusedTextField.setText(c);if(b!=c){this._sendChanges()}}},_onKeyPress:function(a){var c=a.getKeyIdentifier();if(rwt.widgets.DateTimeTime._isNoModifierPressed(a)){switch(c){case"Left":if(this._focusedTextField===this._hoursTextField){if(this._short){this._setFocusedTextField(this._minutesTextField)}else{this._setFocusedTextField(this._secondsTextField)}}else{if(this._focusedTextField===this._minutesTextField){this._setFocusedTextField(this._hoursTextField)}else{if(this._focusedTextField===this._secondsTextField){this._setFocusedTextField(this._minutesTextField)}}}a.preventDefault();a.stopPropagation();break;case $[35]:if(this._focusedTextField===this._hoursTextField){this._setFocusedTextField(this._minutesTextField)}else{if(this._focusedTextField===this._minutesTextField){if(this._short){this._setFocusedTextField(this._hoursTextField)}else{this._setFocusedTextField(this._secondsTextField)}}else{if(this._focusedTextField===this._secondsTextField){this._setFocusedTextField(this._hoursTextField)}}}a.preventDefault();a.stopPropagation();break;case"Up":var b=this._spinner.getValue();if(b==this._spinner.getMax()){this._spinner.setValue(this._spinner.getMin())}else{this._spinner.setValue(b+1)}a.preventDefault();a.stopPropagation();break;case"Down":var b=this._spinner.getValue();if(b==this._spinner.getMin()){this._spinner.setValue(this._spinner.getMax())}else{this._spinner.setValue(b-1)}a.preventDefault();a.stopPropagation();break;case $[40]:case $[45]:case"Home":case"End":a.preventDefault();a.stopPropagation();break}}},_onKeyUp:function(a){var b=a.getKeyIdentifier();var e=this._focusedTextField.getText();e=this._removeLeadingZero(e);if(rwt.widgets.DateTimeTime._isNoModifierPressed(a)){switch(b){case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":var d=this._focusedTextField.getUserData($[155]);var f=b;if(e.length<d&&!this._initialEditing){f=e+b}var c=parseInt(f,10);if(c>=this._spinner.getMin()&&c<=this._spinner.getMax()){this._spinner.setValue(c)}else{f=b;c=parseInt(f,10);if(c>=this._spinner.getMin()&&c<=this._spinner.getMax()){this._spinner.setValue(c)}}this._initialEditing=false;a.preventDefault();a.stopPropagation();break;case"Home":var f=this._spinner.getMin();this._spinner.setValue(f);this._initialEditing=true;a.preventDefault();a.stopPropagation();break;case"End":var f=this._spinner.getMax();this._spinner.setValue(f);this._initialEditing=true;a.preventDefault();a.stopPropagation();break}}},_onMouseWheel:function(a){if(this.getFocused()){a.preventDefault();a.stopPropagation();this._spinner._onmousewheel(a)}},_addLeadingZero:function(a){return a<10?"0"+a:""+a},_removeLeadingZero:function(c){var a=c;if(c.length==2){var b=c.substring(0,1);if(b=="0"){a=c.substring(1)}}return a},_sendChanges:function(){if(!rwt.remote.EventUtil.getSuspended()){var c=rwt.remote.WidgetManager.getInstance();var a=rwt.remote.Server.getInstance();var b=c.findIdByWidget(this);a.addParameter(b+".hours",this._removeLeadingZero(this._hoursTextField.getText()));a.addParameter(b+".minutes",this._removeLeadingZero(this._minutesTextField.getText()));a.addParameter(b+".seconds",this._removeLeadingZero(this._secondsTextField.getText()));if(this._hasSelectionListener){this._requestTimer.restart()}}},_onInterval:function(){this._requestTimer.stop();rwt.remote.EventUtil.notifySelected(this)},setHours:function(a){this._hoursTextField.setText(this._addLeadingZero(a));if(this._focusedTextField===this._hoursTextField){this._spinner.setValue(a)}},setMinutes:function(a){this._minutesTextField.setText(this._addLeadingZero(a));if(this._focusedTextField===this._minutesTextField){this._spinner.setValue(a)}},setSeconds:function(a){this._secondsTextField.setText(this._addLeadingZero(a));if(this._focusedTextField===this._secondsTextField){this._spinner.setValue(a)}},setHasSelectionListener:function(a){this._hasSelectionListener=a;this._requestTimer=new rwt.client.Timer(110);this._requestTimer.addEventListener($[27],this._onInterval,this)},setBounds:function(e,b,f,c,a){var d;switch(e){case rwt.widgets.DateTimeTime.HOURS_TEXTFIELD:d=this._hoursTextField;break;case rwt.widgets.DateTimeTime.MINUTES_TEXTFIELD:d=this._minutesTextField;break;case rwt.widgets.DateTimeTime.SECONDS_TEXTFIELD:d=this._secondsTextField;break;case rwt.widgets.DateTimeTime.HOURS_MINUTES_SEPARATOR:d=this._separator3;break;case rwt.widgets.DateTimeTime.MINUTES_SECONDS_SEPARATOR:d=this._separator4;break;case rwt.widgets.DateTimeTime.SPINNER:d=this._spinner;break}d.set({left:b,top:f,width:c,height:a})}}}); |
| rwt.qx.Class.define("rwt.widgets.DateTimeDate",{extend:rwt.widgets.base.Parent,construct:function(f,e,b,d,g,c){arguments.callee.base.call(this);this.setOverflow($[9]);this.setAppearance("datetime-date");this._short=rwt.util.Strings.contains(f,"short");this._medium=rwt.util.Strings.contains(f,"medium");this._long=rwt.util.Strings.contains(f,"long");this._drop_down=rwt.util.Strings.contains(f,"drop_down");this._hasSelectionListener=false;this._requestTimer=null;this._readyToSendChanges=true;this._weekday=b;this._monthname=e;this._datePattern=c;this.addEventListener($[101],this._rwt_onChangeFont,this);this.addEventListener($[4],this._onKeyPress,this);this.addEventListener($[34],this._onKeyUp,this);this.addEventListener($[43],this._onMouseWheel,this);this.addEventListener($[42],this._onContextMenu,this);this.addEventListener($[68],this._onFocusIn,this);this.addEventListener("blur",this._onFocusOut,this);this._focusedTextField=null;this._weekdayTextField=new rwt.widgets.base.Label();this._weekdayTextField.setAppearance($[139]);if(this._long){this.add(this._weekdayTextField)}this._separator0=new rwt.widgets.base.Label(",");this._separator0.setAppearance($[231]);if(this._long){this.add(this._separator0)}this._monthTextField=new rwt.widgets.base.Label();this._monthTextField.setAppearance($[139]);this._monthTextField.set({textAlign:this._medium?$[14]:$[24]});this._monthInt=1;if(this._medium){this._monthTextField.setText("1")}else{this._monthTextField.setText(this._monthname[this._monthInt-1])}this._monthTextField.addEventListener($[1],this._onTextFieldMouseDown,this);this.add(this._monthTextField);this._separator1=new rwt.widgets.base.Label(g);this._separator1.setAppearance($[231]);if(this._medium){this.add(this._separator1)}this._dayTextField=new rwt.widgets.base.Label("1");this._dayTextField.setAppearance($[139]);this._dayTextField.setUserData($[155],2);this._dayTextField.set({textAlign:$[14]});this._dayTextField.addEventListener($[1],this._onTextFieldMouseDown,this);if(!this._short){this.add(this._dayTextField)}this._separator2=new rwt.widgets.base.Label(",");this._separator2.setAppearance($[231]);if(this._medium){this._separator2.setText(g)}this.add(this._separator2);this._yearTextField=new rwt.widgets.base.Label("1970");this._yearTextField.setAppearance($[139]);this._yearTextField.setUserData($[155],4);this._yearTextField.set({textAlign:$[14]});this._lastValidYear=1970;this._yearTextField.addEventListener($[1],this._onTextFieldMouseDown,this);this.add(this._yearTextField);this._spinner=new rwt.widgets.base.Spinner();this._spinner.set({wrap:true,border:null,backgroundColor:null});this._spinner.setMin(1);this._spinner.setMax(12);this._spinner.setValue(this._monthInt);this._spinner.addEventListener($[57],this._onSpinnerChange,this);this._spinner._textfield.setTabIndex(null);this._spinner._textfield.setFocused=function(){};this._spinner._textfield.setVisibility(false);this._spinner._upbutton.setAppearance($[398]);this._spinner._downbutton.setAppearance($[423]);this._spinner.removeEventListener($[4],this._spinner._onkeypress,this._spinner);this._spinner.removeEventListener($[10],this._spinner._onkeydown,this._spinner);this._spinner.removeEventListener($[34],this._spinner._onkeyup,this._spinner);this._spinner.removeEventListener($[43],this._spinner._onmousewheel,this._spinner);this._spinner.setVisibility(!this._drop_down);this.add(this._spinner);this._dropped=false;this._dropDownButton=null;this._calendar=null;if(this._drop_down){var a=rwt.widgets.base.ClientDocument.getInstance();a.addEventListener($[210],this._onWindowBlur,this);this.addEventListener($[36],this._onAppear,this);this.addEventListener($[169],this._onChangeVisibility,this);this.addEventListener($[1],this._onMouseDown,this);this.addEventListener($[13],this._onMouseClick,this);this.addEventListener($[3],this._onMouseOver,this);this.addEventListener($[6],this._onMouseOut,this);this._dropDownButton=new rwt.widgets.base.Button();this._dropDownButton.setAppearance("datetime-drop-down-button");this._dropDownButton.setTabIndex(null);this._dropDownButton.setAllowStretchY(true);this.add(this._dropDownButton);rwt.widgets.base.Calendar.MONTH_NAMES=e;rwt.widgets.base.Calendar.WEEKDAY_NAMES=d;this._calendar=new rwt.widgets.base.Calendar();this._calendar.setAppearance("datetime-drop-down-calendar");this._calendar.setDate(new Date(70,0,1));this._calendar.setTabIndex(null);this._calendar.setVisibility(false);this._calendar._lastYearBt.setToolTip(null);this._calendar._lastMonthBt.setToolTip(null);this._calendar._nextMonthBt.setToolTip(null);this._calendar._nextYearBt.setToolTip(null)}this._focusedTextField=this._monthTextField;this._setWeekday()},destruct:function(){this.removeEventListener($[101],this._rwt_onChangeFont,this);this.removeEventListener($[4],this._onKeyPress,this);this.removeEventListener($[34],this._onKeyUp,this);this.removeEventListener($[43],this._onMouseWheel,this);this.removeEventListener($[42],this._onContextMenu,this);this.removeEventListener($[68],this._onFocusIn,this);this.removeEventListener("blur",this._onFocusOut,this);this._monthTextField.removeEventListener($[1],this._onTextFieldMouseDown,this);this._dayTextField.removeEventListener($[1],this._onTextFieldMouseDown,this);this._yearTextField.removeEventListener($[1],this._onTextFieldMouseDown,this);this._spinner.removeEventListener($[57],this._onSpinnerChange,this);this._disposeObjects("_weekdayTextField","_monthTextField","_dayTextField","_yearTextField",$[436],"_spinner","_separator0","_separator1","_separator2");if(this._drop_down){var a=rwt.widgets.base.ClientDocument.getInstance();a.removeEventListener($[210],this._onWindowBlur,this);this.removeEventListener($[36],this._onAppear,this);this.removeEventListener($[169],this._onChangeVisibility,this);this.removeEventListener($[1],this._onMouseDown,this);this.removeEventListener($[13],this._onMouseClick,this);this.removeEventListener($[3],this._onMouseOver,this);this.removeEventListener($[6],this._onMouseOut,this);this._dropDownButton.dispose();this._dropDownButton=null;if(!rwt.qx.Object.inGlobalDispose()){this._calendar.setParent(null)}this._calendar.dispose();this._calendar=null}},statics:{WEEKDAY_TEXTFIELD:0,DATE_TEXTFIELD:1,MONTH_TEXTFIELD:2,YEAR_TEXTFIELD:3,WEEKDAY_MONTH_SEPARATOR:4,MONTH_DATE_SEPARATOR:5,DATE_YEAR_SEPARATOR:6,SPINNER:7,DROP_DOWN_BUTTON:13,_isNoModifierPressed:function(a){return !a.isCtrlPressed()&&!a.isShiftPressed()&&!a.isAltPressed()&&!a.isMetaPressed()}},members:{addState:function(a){arguments.callee.base.call(this,a);if(a.substr(0,8)==$[38]){this._weekdayTextField.addState(a);this._monthTextField.addState(a);this._dayTextField.addState(a);this._yearTextField.addState(a);this._spinner.addState(a);this._separator0.addState(a);this._separator1.addState(a);this._separator2.addState(a);if(this._drop_down){this._dropDownButton.addState(a);this._calendar.addState(a)}}},removeState:function(a){arguments.callee.base.call(this,a);if(a.substr(0,8)==$[38]){this._weekdayTextField.removeState(a);this._monthTextField.removeState(a);this._dayTextField.removeState(a);this._yearTextField.removeState(a);this._spinner.removeState(a);this._separator0.removeState(a);this._separator1.removeState(a);this._separator2.removeState(a);if(this._drop_down){this._dropDownButton.removeState(a);this._calendar.removeState(a)}}},_rwt_onChangeFont:function(a){var b=a.getValue();this._weekdayTextField.setFont(b);this._dayTextField.setFont(b);this._monthTextField.setFont(b);this._yearTextField.setFont(b)},_onContextMenu:function(a){var b=this.getContextMenu();if(b!=null&&!this._dropped){b.setLocation(a.getPageX(),a.getPageY());b.setOpener(this);b.show();a.stopPropagation()}},_onFocusIn:function(a){this._focusedTextField.addState($[22]);this._initialEditing=true},_onFocusOut:function(a){if(this._focusedTextField===this._yearTextField){this._checkAndApplyYearValue()}this._focusedTextField.removeState($[22])},_onTextFieldMouseDown:function(a){if(this._focusedTextField===this._yearTextField){this._checkAndApplyYearValue()}this._setFocusedTextField(a.getTarget())},_setFocusedTextField:function(a){if(this._focusedTextField!==a){this._focusedTextField.removeState($[22]);this._focusedTextField=null;if(a===this._dayTextField){this._spinner.setMin(1);this._spinner.setMax(this._getDaysInMonth());var b=this._removeLeadingZero(this._dayTextField.getText());this._spinner.setValue(parseInt(b,10))}else{if(a===this._monthTextField){this._spinner.setMin(1);this._spinner.setMax(12);this._spinner.setValue(this._monthInt)}else{if(a===this._yearTextField){this._spinner.setMax(9999);this._spinner.setMin(1752);this._spinner.setValue(this._lastValidYear)}}}this._focusedTextField=a;this._focusedTextField.addState($[22]);this._initialEditing=true}},_onSpinnerChange:function(a){if(this._focusedTextField!=null){var b=this._focusedTextField.getText();if(this._focusedTextField===this._monthTextField){this._monthInt=this._spinner.getValue();if(this._medium){this._focusedTextField.setText(this._addLeadingZero(this._monthInt))}else{this._focusedTextField.setText(this._monthname[this._monthInt-1])}}else{if(this._focusedTextField===this._yearTextField){this._lastValidYear=this._spinner.getValue();this._focusedTextField.setText(""+this._spinner.getValue())}else{this._focusedTextField.setText(this._addLeadingZero(this._spinner.getValue()))}}if(this._focusedTextField==this._monthTextField||this._focusedTextField==this._yearTextField){var c=this._dayTextField.getText();if(c>this._getDaysInMonth()){this._dayTextField.setText(""+this._getDaysInMonth())}}this._setWeekday();var d=this._focusedTextField.getText();if(b!=d){this._sendChanges()}}},_onKeyPress:function(a){var d=a.getKeyIdentifier();if(this._dropped){this._calendar._onkeypress(a);if(rwt.widgets.DateTimeDate._isNoModifierPressed(a)){switch(d){case $[49]:case $[105]:case $[78]:case"Tab":this._toggleCalendarVisibility();break;case"Left":case $[35]:case"Up":case"Down":case $[40]:case $[45]:var b=this._calendar.getDate();this._setDate(b);this._sendChanges();a.preventDefault();a.stopPropagation();break}}else{if(a.isShiftPressed()){switch(d){case"Tab":this._toggleCalendarVisibility();break;case $[40]:case $[45]:var b=this._calendar.getDate();this._setDate(b);this._sendChanges();a.preventDefault();a.stopPropagation();break}}}}else{if(rwt.widgets.DateTimeDate._isNoModifierPressed(a)){switch(d){case"Left":if(this._datePattern=="MDY"){this._rollLeft(this._monthTextField,this._dayTextField,this._yearTextField)}else{if(this._datePattern=="DMY"){this._rollLeft(this._dayTextField,this._monthTextField,this._yearTextField)}else{if(this._medium){this._rollLeft(this._yearTextField,this._monthTextField,this._dayTextField)}else{this._rollLeft(this._monthTextField,this._dayTextField,this._yearTextField)}}}a.preventDefault();a.stopPropagation();break;case $[35]:if(this._datePattern=="MDY"){this._rollRight(this._monthTextField,this._dayTextField,this._yearTextField)}else{if(this._datePattern=="DMY"){this._rollRight(this._dayTextField,this._monthTextField,this._yearTextField)}else{if(this._medium){this._rollRight(this._yearTextField,this._monthTextField,this._dayTextField)}else{this._rollRight(this._monthTextField,this._dayTextField,this._yearTextField)}}}a.preventDefault();a.stopPropagation();break;case"Up":if(this._focusedTextField===this._yearTextField){this._checkAndApplyYearValue()}var c=this._spinner.getValue();if(c==this._spinner.getMax()){this._spinner.setValue(this._spinner.getMin())}else{this._spinner.setValue(c+1)}a.preventDefault();a.stopPropagation();break;case"Down":if(this._focusedTextField===this._yearTextField){this._checkAndApplyYearValue()}var c=this._spinner.getValue();if(c==this._spinner.getMin()){this._spinner.setValue(this._spinner.getMax())}else{this._spinner.setValue(c-1)}a.preventDefault();a.stopPropagation();break;case $[40]:case $[45]:case"Home":case"End":a.preventDefault();a.stopPropagation();break}}}},_rollRight:function(c,b,a){if(this._focusedTextField===this._yearTextField){this._checkAndApplyYearValue()}if(this._focusedTextField===c){if(b.isSeeable()){this._setFocusedTextField(b)}else{this._setFocusedTextField(a)}}else{if(this._focusedTextField===b){if(a.isSeeable()){this._setFocusedTextField(a)}else{this._setFocusedTextField(c)}}else{if(this._focusedTextField===a){if(c.isSeeable()){this._setFocusedTextField(c)}else{this._setFocusedTextField(b)}}}}},_rollLeft:function(c,b,a){if(this._focusedTextField===this._yearTextField){this._checkAndApplyYearValue()}if(this._focusedTextField===c){if(a.isSeeable()){this._setFocusedTextField(a)}else{this._setFocusedTextField(b)}}else{if(this._focusedTextField===b){if(c.isSeeable()){this._setFocusedTextField(c)}else{this._setFocusedTextField(a)}}else{if(this._focusedTextField===a){if(b.isSeeable()){this._setFocusedTextField(b)}else{this._setFocusedTextField(c)}}}}},_onKeyUp:function(a){if(!this._dropped){var b=a.getKeyIdentifier();var e=this._focusedTextField.getText();e=this._removeLeadingZero(e);if(rwt.widgets.DateTimeDate._isNoModifierPressed(a)){switch(b){case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":var d=this._focusedTextField.getUserData($[155]);if(this._focusedTextField===this._monthTextField){e=""+this._monthInt;d=2}var f=b;if(e.length<d&&!this._initialEditing){f=e+b}var c=parseInt(f,10);if(this._focusedTextField===this._dayTextField||this._focusedTextField===this._monthTextField){if(c>=this._spinner.getMin()&&c<=this._spinner.getMax()){this._spinner.setValue(c)}else{f=b;c=parseInt(f,10);if(c>=this._spinner.getMin()&&c<=this._spinner.getMax()){this._spinner.setValue(c)}}}else{if(this._focusedTextField==this._yearTextField){this._focusedTextField.setText(f);if(f.length==4){this._checkAndApplyYearValue()}}}this._initialEditing=false;a.preventDefault();a.stopPropagation();break;case"Home":var f=this._spinner.getMin();this._spinner.setValue(f);this._initialEditing=true;a.preventDefault();a.stopPropagation();break;case"End":var f=this._spinner.getMax();this._spinner.setValue(f);this._initialEditing=true;a.preventDefault();a.stopPropagation();break}}}},_onMouseWheel:function(a){if(this.getFocused()){a.preventDefault();a.stopPropagation();if(!this._dropped){this._spinner._onmousewheel(a)}}},_getDaysInMonth:function(){var a=31;var c=this._monthInt-1;var d=parseInt(this._yearTextField.getText(),10);var b=new Date(d,c,1);b.setDate(a);while(b.getMonth()!==c){a--;b=new Date(d,c,1);b.setDate(a)}return a},_setWeekday:function(){var a=new Date();a.setDate(parseInt(this._dayTextField.getText(),10));a.setMonth(this._monthInt-1);a.setFullYear(parseInt(this._yearTextField.getText(),10));this._weekdayTextField.setText(this._weekday[a.getDay()+1])},_checkAndApplyYearValue:function(){var a=this._lastValidYear;var b=parseInt(this._yearTextField.getText(),10);if(b>=0&&b<=29){this._lastValidYear=2000+b}else{if(b>=30&&b<=99){this._lastValidYear=1900+b}else{if(b>=1752){this._lastValidYear=b}}}this._yearTextField.setText(""+a);if(a!=this._lastValidYear){this._spinner.setValue(this._lastValidYear)}},_addLeadingZero:function(a){return a<10?"0"+a:""+a},_removeLeadingZero:function(c){var a=c;if(c.length==2){var b=c.substring(0,1);if(b=="0"){a=c.substring(1)}}return a},_sendChanges:function(){if(!rwt.remote.EventUtil.getSuspended()){var c=rwt.remote.WidgetManager.getInstance();var a=rwt.remote.Server.getInstance();var b=c.findIdByWidget(this);a.addParameter(b+".day",this._removeLeadingZero(this._dayTextField.getText()));a.addParameter(b+".month",this._monthInt-1);a.addParameter(b+".year",this._lastValidYear);if(this._hasSelectionListener){this._requestTimer.restart()}}},_onInterval:function(){this._requestTimer.stop();rwt.remote.EventUtil.notifySelected(this)},setMonth:function(a){this._monthInt=a+1;if(this._medium){this._monthTextField.setText(this._addLeadingZero(this._monthInt))}else{this._monthTextField.setText(this._monthname[this._monthInt-1])}if(this._focusedTextField===this._monthTextField){this._spinner.setValue(this._monthInt)}this._setWeekday()},setDay:function(a){this._dayTextField.setText(this._addLeadingZero(a));if(this._focusedTextField===this._dayTextField){this._spinner.setValue(a)}this._setWeekday()},setYear:function(a){this._lastValidYear=a;this._yearTextField.setText(""+a);if(this._focusedTextField===this._yearTextField){this._spinner.setValue(a)}this._setWeekday()},_setDate:function(a){this.setYear(a.getFullYear());this.setMonth(a.getMonth());this.setDay(a.getDate())},setHasSelectionListener:function(a){this._hasSelectionListener=a;this._requestTimer=new rwt.client.Timer(110);this._requestTimer.addEventListener($[27],this._onInterval,this)},setBounds:function(e,b,f,c,a){var d=null;switch(e){case rwt.widgets.DateTimeDate.WEEKDAY_TEXTFIELD:d=this._weekdayTextField;break;case rwt.widgets.DateTimeDate.DATE_TEXTFIELD:d=this._dayTextField;break;case rwt.widgets.DateTimeDate.MONTH_TEXTFIELD:d=this._monthTextField;break;case rwt.widgets.DateTimeDate.YEAR_TEXTFIELD:d=this._yearTextField;break;case rwt.widgets.DateTimeDate.WEEKDAY_MONTH_SEPARATOR:d=this._separator0;break;case rwt.widgets.DateTimeDate.MONTH_DATE_SEPARATOR:d=this._separator1;break;case rwt.widgets.DateTimeDate.DATE_YEAR_SEPARATOR:d=this._separator2;break;case rwt.widgets.DateTimeDate.SPINNER:d=this._spinner;break;case rwt.widgets.DateTimeDate.DROP_DOWN_BUTTON:d=this._dropDownButton;break}if(d!=null){d.set({left:b,top:f,width:c,height:a})}},_onAppear:function(a){if(this._calendar!=null){this.getTopLevelWidget().add(this._calendar);this._setCalendarLocation()}},_onWindowBlur:function(a){if(this._dropped){this._toggleCalendarVisibility()}},_onChangeVisibility:function(a){var b=a.getValue();if(!b&&this._dropped){this._toggleCalendarVisibility()}},_onMouseDown:function(a){var b=a.getTarget();if(b.getUserData($[186])){a.stopPropagation()}else{if(b.getUserData($[183])){a.stopPropagation()}else{if(this._dropped&&b!==this._dropDownButton){this._toggleCalendarVisibility()}}}},_onMouseClick:function(a){if(a.isLeftButtonPressed()){var c=a.getTarget();if(c.getUserData($[186])){this._calendar._onDayClicked(a);var b=this._calendar.getDate();this._setDate(b);this._toggleCalendarVisibility();this.setFocused(true);this._sendChanges()}else{if(c.getUserData($[183])){this._calendar._onNavButtonClicked(a)}else{if(c===this._dropDownButton){this._toggleCalendarVisibility()}}}}},_onMouseOver:function(a){var b=a.getTarget();if(b==this._dropDownButton){this._dropDownButton.addState("over")}else{if(b.getUserData($[186])){this._calendar._onDayMouseOver(a)}}},_onMouseOut:function(a){var b=a.getTarget();if(b==this._dropDownButton){this._dropDownButton.removeState("over")}else{if(b.getUserData($[186])){this._calendar._onDayMouseOut(a)}}},_toggleCalendarVisibility:function(){if(this._calendar!=null){this._dropped=!this._dropped;this._calendar.setVisibility(this._dropped);this.setCapture(this._dropped);if(this._dropped){this._bringToFront();this._setCalendarLocation();var c=parseInt(this._yearTextField.getText(),10);var a=parseInt(this._dayTextField.getText(),10);var b=new Date(c,this._monthInt-1,a);this._calendar.setDate(b);this._focusedTextField.removeState($[22])}else{if(this.getFocused()){this._focusedTextField.addState($[22])}}}},_setCalendarLocation:function(){if(this.getElement()&&this._calendar!=null){var b=rwt.html.Location.get(this.getElement());var c=rwt.html.Window.getInnerHeight(window);var d=b.top+this.getHeight();var a=this._calendar.getHeightValue();if(d+a>c){d=b.top-a}this._calendar.setLocation(b.left,d)}},_bringToFront:function(){var a=this.getTopLevelWidget().getChildren();var b=this._calendar.getZIndex();for(var d in a){var c=a[d];if(c.getZIndex){if(b<c.getZIndex()){b=c.getZIndex()}}}if(b>this._calendar.getZIndex()){this._calendar.setZIndex(b+1)}}}}); |
| rwt.qx.Class.define("rwt.widgets.DateTimeCalendar",{extend:rwt.widgets.base.Parent,construct:function(c,b,a){arguments.callee.base.call(this);this.setOverflow($[9]);this.setAppearance("datetime-calendar");this._hasSelectionListener=false;rwt.widgets.base.Calendar.MONTH_NAMES=b;rwt.widgets.base.Calendar.WEEKDAY_NAMES=a;this._calendar=new rwt.widgets.base.Calendar();this._calendar.addEventListener($[290],this._onChangeDate,this);this._calendar.setDate(new Date(74,5,6));this._calendar.setTabIndex(null);this.add(this._calendar);this.addEventListener($[42],this._onContextMenu,this);this.addEventListener($[4],this._onKeyPress,this);this.addEventListener($[43],this._onmousewheel,this);this.addEventListener($[68],this._onFocusIn,this);this.addEventListener("blur",this._onFocusOut,this);this._updateSelectedDayState()},destruct:function(){this._calendar.removeEventListener($[290],this._onChangeDate,this);this.removeEventListener($[42],this._onContextMenu,this);this.removeEventListener($[4],this._onKeyPress,this);this.removeEventListener($[43],this._onmousewheel,this);this.removeEventListener($[68],this._onFocusIn,this);this.removeEventListener("blur",this._onFocusOut,this);this._disposeObjects("_calendar")},members:{addState:function(a){arguments.callee.base.call(this,a);if(a.substr(0,8)==$[38]){this._calendar.addState(a)}},removeState:function(a){arguments.callee.base.call(this,a);if(a.substr(0,8)==$[38]){this._calendar.removeState(a)}},_onChangeDate:function(){var a=this._calendar.getDate();this._sendChanges(a.getDate(),a.getMonth(),a.getFullYear())},_onContextMenu:function(a){var b=this.getContextMenu();if(b!=null){b.setLocation(a.getPageX(),a.getPageY());b.setOpener(this);b.show();a.stopPropagation()}},_onKeyPress:function(a){this._calendar._onkeypress(a)},_onmousewheel:function(a){a.preventDefault();a.stopPropagation()},_onFocusIn:function(a){this._updateSelectedDayState()},_onFocusOut:function(a){this._updateSelectedDayState()},_updateSelectedDayState:function(){for(var a=0;a<6*7;a++){if(this.getFocused()){this._calendar._dayLabelArr[a].removeState($[92])}else{this._calendar._dayLabelArr[a].addState($[92])}}},_sendChanges:function(a,d,b){if(!rwt.remote.EventUtil.getSuspended()){var f=rwt.remote.WidgetManager.getInstance();var c=rwt.remote.Server.getInstance();var e=f.findIdByWidget(this);c.addParameter(e+".day",a);c.addParameter(e+".month",d);c.addParameter(e+".year",b);if(this._hasSelectionListener){rwt.remote.EventUtil.notifySelected(this)}}},setMonth:function(b){var a=this._calendar.getDate();a.setMonth(b);this._calendar.setDate(a)},setDay:function(b){var a=this._calendar.getDate();a.setDate(b);this._calendar.setDate(a)},setYear:function(b){var a=this._calendar.getDate();a.setYear(b);this._calendar.setDate(a)},setHasSelectionListener:function(a){this._hasSelectionListener=a},setFont:function(){}}}); |
| rwt.remote.HandlerRegistry.add("rwt.widgets.DateTime",{factory:function(b){var a;var d=rwt.remote.HandlerUtil.createStyleMap(b.style);var c;if(d.SHORT){c="short"}else{if(d.LONG){c="long"}else{c="medium"}}if(d.DROP_DOWN){c+="|drop_down"}if(d.TIME){a=new rwt.widgets.DateTimeTime(c)}else{if(d.CALENDAR){rwt.widgets.base.Calendar.CELL_WIDTH=b.cellSize[0];rwt.widgets.base.Calendar.CELL_HEIGHT=b.cellSize[1];a=new rwt.widgets.DateTimeCalendar(c,b.monthNames,b.weekdayShortNames)}else{rwt.widgets.base.Calendar.CELL_WIDTH=b.cellSize[0];rwt.widgets.base.Calendar.CELL_HEIGHT=b.cellSize[1];a=new rwt.widgets.DateTimeDate(c,b.monthNames,b.weekdayNames,b.weekdayShortNames,b.dateSeparator,b.datePattern)}}rwt.remote.HandlerUtil.addStatesForStyles(a,b.style);a.setUserData($[23],true);rwt.remote.HandlerUtil.setParent(a,b.parent);return a},destructor:rwt.remote.HandlerUtil.getControlDestructor(),getDestroyableChildren:rwt.remote.HandlerUtil.getDestroyableChildrenFinder(),properties:rwt.remote.HandlerUtil.extendControlProperties(["year","month","day","hours","minutes","seconds","subWidgetsBounds"]),propertyHandler:rwt.remote.HandlerUtil.extendControlPropertyHandler({subWidgetsBounds:function(c,b){for(var a=0;a<b.length;a++){c.setBounds.apply(c,b[a])}}}),listeners:rwt.remote.HandlerUtil.extendControlListeners([$[30]]),listenerHandler:rwt.remote.HandlerUtil.extendControlListenerHandler({})}); |
| rwt.qx.Class.define($[453],{extend:rwt.widgets.base.Parent,construct:function(a){arguments.callee.base.call(this);if(a.classname!=$[354]){throw new Error("illegal parent, must be a ExpandBar")}this._expandBar=a;this.setAppearance("expand-item");this._headerHeight=24;this._expanded=false;this._image=null;this._text="";this._header=new rwt.widgets.base.Atom($[279],this._image,16,16);this._header.getLabelObject().setPaddingBottom(4);this._header.setAppearance("expand-item-header");this._header.addEventListener($[13],this._onClick,this);this._header.addEventListener($[3],this._onHandleMouseOver,this);this._header.addEventListener($[6],this._onHandleMouseOut,this);this._header.setHeight(this._headerHeight);this._header.setLabel(this._text);this.add(this._header);this._chevron=new rwt.widgets.base.Image();this._chevron.setAppearance("expand-item-chevron-button");this._chevron.setTop((this._headerHeight-this._chevron.getHeight())/2);this._chevron.addEventListener($[13],this._onClick,this);this._chevron.addEventListener($[3],this._onHandleMouseOver,this);this._chevron.addEventListener($[6],this._onHandleMouseOut,this);this.add(this._chevron)},destruct:function(){this._header.removeEventListener($[13],this._onClick,this);this._header.removeEventListener($[3],this._onHandleMouseOver,this);this._header.removeEventListener($[6],this._onHandleMouseOut,this);this._chevron.removeEventListener($[13],this._onClick,this);this._chevron.removeEventListener($[3],this._onHandleMouseOver,this);this._chevron.removeEventListener($[6],this._onHandleMouseOut,this);this._disposeObjects("_header","_chevron")},statics:{STATE_EXPANDED:$[82],STATE_OVER:"over"},members:{addState:function(a){arguments.callee.base.call(this,a);if(a.substr(0,8)==$[38]){this._header.addState(a);this._chevron.addState(a)}},removeState:function(a){arguments.callee.base.call(this,a);if(a.substr(0,8)==$[38]){this._header.removeState(a);this._chevron.removeState(a)}},setExpanded:function(a){this._expanded=a;if(a){this._chevron.addState(rwt.widgets.ExpandItem.STATE_EXPANDED);this._header.addState(rwt.widgets.ExpandItem.STATE_EXPANDED)}else{this._chevron.removeState(rwt.widgets.ExpandItem.STATE_EXPANDED);this._header.removeState(rwt.widgets.ExpandItem.STATE_EXPANDED)}},getExpanded:function(a){return this._expanded},setImage:function(a){this._image=a;this._header.setIcon(a)},setText:function(a){this._text=a;this._header.setLabel(a)},setHeaderHeight:function(a){this._headerHeight=a;this._header.setHeight(this._headerHeight);this._chevron.setTop((this._headerHeight-this._chevron.getHeight())/2)},_onClick:function(a){if(!rwt.remote.EventUtil.getSuspended()){this.setExpanded(!this._expanded);var d=rwt.remote.Server.getInstance().getRemoteObject(this);d.set($[82],this._expanded);if((this._expandBar._hasExpandListener&&this._expanded)||(this._expandBar._hasCollapseListener&&!this._expanded)){var c=rwt.remote.Server.getInstance().getRemoteObject(this._expandBar);var e=rwt.remote.ObjectRegistry.getId(this);var b=this._expanded?$[159]:$[167];c.notify(b,{item:e})}}},_onHandleMouseOver:function(a){this._chevron.addState(rwt.widgets.ExpandItem.STATE_OVER)},_onHandleMouseOut:function(a){this._chevron.removeState(rwt.widgets.ExpandItem.STATE_OVER)}}}); |
| rwt.remote.HandlerRegistry.add($[453],{factory:function(b){var a;rwt.remote.HandlerUtil.callWithTarget(b.parent,function(c){a=new rwt.widgets.ExpandItem(c);c.addWidget(a);rwt.remote.HandlerUtil.addDestroyableChild(c,a);a.setUserData($[103],c)});return a},destructor:rwt.remote.HandlerUtil.getWidgetDestructor(),properties:[$[86],$[87],"text",$[15],$[82],$[420]],propertyHandler:{bounds:function(b,a){b.setLeft(a[0]);b.setTop(a[1]);b.setWidth(a[2]);b.setHeight(a[3])},text:function(c,b){var a=rwt.util.Encoding;var d=a.escapeText(b,false);c.setText(d)},image:function(b,a){if(a===null){b.setImage(null)}else{b.setImage(a[0])}}}}); |
| rwt.qx.Class.define($[354],{extend:rwt.widgets.base.Scrollable,construct:function(){arguments.callee.base.call(this,new rwt.widgets.base.Parent());this.setAppearance("expand-bar");this.setHideFocus(true);this.setScrollBarsVisible(false,false);this._bottomSpacing=new rwt.widgets.base.Parent();rwt.widgets.util.WidgetUtil.fixIEBoxHeight(this._bottomSpacing);this._clientArea.add(this._bottomSpacing);this._hasExpandListener=false;this._hasCollapseListener=false},destruct:function(){this._disposeObjects("_bottomSpacing")},members:{addWidget:function(a){this._clientArea.add(a)},setBottomSpacingBounds:function(b,d,c,a){this._bottomSpacing.setLeft(b);this._bottomSpacing.setTop(d);this._bottomSpacing.setWidth(c);this._bottomSpacing.setHeight(a)},setVScrollBarVisible:function(a){this.setScrollBarsVisible(false,a);if(!a){this.setVBarSelection(0)}},setVScrollBarMax:function(a){this._vertScrollBar.setMaximum(a)},setHasExpandListener:function(a){this._hasExpandListener=a},setHasCollapseListener:function(a){this._hasCollapseListener=a}}}); |
| rwt.remote.HandlerRegistry.add($[354],{factory:function(b){var a=new rwt.widgets.ExpandBar();rwt.remote.HandlerUtil.addStatesForStyles(a,b.style);a.setUserData($[23],true);rwt.remote.HandlerUtil.setParent(a,b.parent);return a},destructor:rwt.remote.HandlerUtil.getControlDestructor(),getDestroyableChildren:rwt.remote.HandlerUtil.getDestroyableChildrenFinder(),properties:rwt.remote.HandlerUtil.extendControlProperties(["bottomSpacingBounds","vScrollBarMax"]),propertyHandler:rwt.remote.HandlerUtil.extendControlPropertyHandler({bottomSpacingBounds:function(b,a){b.setBottomSpacingBounds.apply(b,a)}}),listeners:rwt.remote.HandlerUtil.extendControlListeners([$[159],$[167]]),listenerHandler:rwt.remote.HandlerUtil.extendControlListenerHandler({})}); |
| (function(){rwt.qx.Class.define($[342],{extend:rwt.widgets.base.BasicText,construct:function(a){arguments.callee.base.call(this);if(a){this._inputTag=$[119];this._inputType=null;this._inputOverflow="auto";this.setAppearance("text-area");this.setAllowStretchY(true);this.__oninput=rwt.util.Functions.bindEvent(this._oninputDomTextarea,this)}this._hasDefaultSelectionListener=false;this._hasModifyListener=false;this._modifyScheduled=false;this._message=null;this._messageElement=null;this._searchIconElement=null;this._cancelIconElement=null},destruct:function(){this._messageElement=null;this._searchIconElement=null;this._cancelIconElement=null;this.__oninput=null},properties:{wrap:{check:$[2],init:true,apply:$[325]}},members:{setMessage:function(a){this._message=a;this._updateMessage()},getMessage:function(){return this._message},setPasswordMode:function(b){var a=b?"password":"text";if(this._inputTag!=$[119]&&this._inputType!=a){this._inputType=a;if(this._isCreated){if(rwt.client.Client.getEngine()===$[110]){this._reCreateInputField()}else{this._inputElement.type=this._inputType}}}},setHasDefaultSelectionListener:function(a){if(!this.hasState($[211])){this._hasDefaultSelectionListener=a}},hasSelectionListener:function(){var a=rwt.remote.HandlerUtil.getShell(this);var b=a?a.getDefaultButton():null;var c=b!=null&&b.isSeeable();return !c&&this._hasDefaultSelectionListener},setHasModifyListener:function(a){this._hasModifyListener=a},hasModifyListener:function(){return this._hasModifyListener},_ontabfocus:function(){this._renderSelection()},_onkeydown:function(a){arguments.callee.base.call(this,a);if(a.getKeyIdentifier()==$[49]&&!a.isShiftPressed()&&!a.isAltPressed()&&!a.isCtrlPressed()&&!a.isMetaPressed()){if(this.hasState($[211])){a.stopPropagation()}if(this.hasSelectionListener()){this._sendWidgetDefaultSelected()}}},_onMouseDownUp:function(b){arguments.callee.base.call(this,b);if(b.getType()===$[1]){var c=b.getDomTarget();var a=null;if(c===this._searchIconElement){a=$[79]}else{if(c===this._cancelIconElement){this.setValue("");a=$[84]}}if(this.hasSelectionListener()&&a!=null){this._sendWidgetDefaultSelected(a)}}},_handleSelectionChange:function(b,a){arguments.callee.base.call(this,b,a);if(!rwt.remote.EventUtil.getSuspended()){rwt.widgets.util.WidgetUtil.setPropertyParam(this,"selectionStart",b);rwt.widgets.util.WidgetUtil.setPropertyParam(this,"selectionLength",a)}},_handleModification:function(){var a=rwt.remote.Server.getInstance();if(!this._modifyScheduled&&this.hasModifyListener()){this._modifyScheduled=true;a.sendDelayed(500);a.onNextSend(this._onSend,this)}a.getRemoteObject(this).set("text",this.getComputedValue());this._detectSelectionChange()},_onSend:function(){if(this._modifyScheduled){rwt.remote.Server.getInstance().getRemoteObject(this).notify("Modify",null,true);this._modifyScheduled=false}},_sendWidgetDefaultSelected:function(a){rwt.remote.EventUtil.notifyDefaultSelected(this,0,0,0,0,a)},_applyElement:function(b,a){arguments.callee.base.call(this,b,a);if(this._inputTag==$[119]){this._styleWrap()}this._inputElement.style.paddingRight="1px";this._updateAllIcons();this._updateMessage()},_webkitMultilineFix:function(){if(this._inputTag!==$[119]){arguments.callee.base.call(this)}},_applyWrap:function(b,a){if(this._inputTag==$[119]){this._styleWrap()}},_styleWrap:rwt.util.Variant.select($[0],{mshtml:function(){if(this._inputElement){this._inputElement.wrap=this.getWrap()?"soft":"off"}},gecko:function(){if(this._inputElement){var b=this.getWrap()?"soft":"off";var a=this.getWrap()?"":"auto";this._inputElement.setAttribute("wrap",b);this._inputElement.style.overflow=a}},"default":function(){if(this._inputElement){var a=this.getWrap()?"soft":"off";this._inputElement.setAttribute("wrap",a)}}}),_applyMaxLength:function(b,a){if(this._inputTag!=$[119]){arguments.callee.base.call(this,b,a)}},_oninputDomTextarea:function(e){var b=this.getMaxLength();var d=true;if(b!=null){var f=this._inputElement.value;if(f.length>this.getMaxLength()){var c=this.getValue();var a=this._getSelectionStart();if(c.length==(f.length-1)){this._inputElement.value=c;this._setSelectionStart(a-1);this._setSelectionLength(0)}else{if(f.length>=c.length&&f!=c){this._inputElement.value=f.slice(0,this.getMaxLength());this._setSelectionStart(Math.min(a,this.getMaxLength()));this._setSelectionLength(0)}}if(this._inputElement.value==c){d=false}}}if(d){this._oninputDom(e)}},_syncFieldWidth:function(){var a=this.getInnerWidth()-this._getIconOuterWidth($[79])-this._getIconOuterWidth($[84]);this._inputElement.style.width=Math.max(2,a)+"px"},_syncFieldLeft:function(){this._inputElement.style.marginLeft=this._getIconOuterWidth($[79])+"px"},_updateAllIcons:function(){if(this._isCreated){this._updateIcon($[79]);this._updateIcon($[84])}},_updateIcon:function(b){var a=this._getIconElement(b);if(this._hasIcon(b)&&a==null){a=document.createElement("div");a.style.position=$[16];a.style.cursor=$[150];if(rwt.client.Client.isMshtml()){a.style.fontSize=0;a.style.lineHeight=0}this._getTargetNode().insertBefore(a,this._inputElement);this._setIconElement(b,a)}if(a){var c=this._getIconImage(b);a.style.backgroundImage=c?"URL("+c[0]+")":"none"}this._layoutIcon(b)},_layoutAllIcons:function(){this._layoutIcon($[79]);this._layoutIcon($[84])},_layoutIcon:function(c){var a=this._getIconElement(c);if(a){var b=a.style;var e=this._getIconImage(c);b.width=e?e[1]+"px":0;b.height=e?e[2]+"px":0;var g=parseInt(b.height,10);b.top=Math.round(this.getInnerHeight()/2-g/2)+"px";if(this._getIconPosition(c)===$[14]){var d=this._getMessageStyle();var f=parseInt(b.width,10);b.left=(this.getBoxWidth()-this._cachedBorderRight-d.paddingRight-f)+"px"}}},_getIconElement:function(a){return a===$[79]?this._searchIconElement:this._cancelIconElement},_setIconElement:function(b,a){if(b===$[79]){this._searchIconElement=a}else{this._cancelIconElement=a}},_getIconOuterWidth:function(b){var a=0;var c=this._getIconImage(b);if(this._hasIcon(b)&&c!=null){a=c[1]+this._getIconSpacing(b)}return a},_hasIcon:function(a){return this.hasState(a===$[79]?"rwt_ICON_SEARCH":"rwt_ICON_CANCEL")},_getIconImage:function(a){return this._hasIcon(a)?this._getIconStyle(a).icon:null},_getIconPosition:function(a){return a===$[79]?"left":$[14]},_getIconSpacing:function(a){return this._hasIcon(a)?this._getIconStyle(a).spacing:0},_getIconStyle:function(b){var a=rwt.theme.AppearanceManager.getInstance();return a.styleFrom("text-field-icon",b===$[79]?{search:true}:{})},_reCreateInputField:function(){var a=this._getSelectionStart();var b=this._getSelectionLength();this._inputElement.parentNode.removeChild(this._inputElement);this._inputElement.onpropertychange=null;this._inputElement=null;this._firstInputFixApplied=false;this._applyElement(this.getElement(),null);this._afterAppear();this._postApply();this._applyFocused(this.getFocused());this._setSelectionStart(a);this._setSelectionLength(b)},_postApply:function(){arguments.callee.base.call(this);this._syncFieldLeft();this._layoutAllIcons();this._layoutMessage()},_applyValue:function(b,a){arguments.callee.base.call(this,b,a);this._updateMessageVisibility();if(!rwt.remote.EventUtil.getSuspended()){this._handleModification()}},_applyFocused:function(b,a){arguments.callee.base.call(this,b,a);this._updateMessageVisibility();if(b&&(this.getValue()===""||this.getValue()==null)){this._forceFocus()}},_forceFocus:rwt.util.Variant.select($[0],{mshtml:function(){rwt.client.Timer.once(function(){if(this._inputElement){this._inputElement.select();this._inputElement.focus()}},this,1)},webkit:function(){rwt.client.Timer.once(function(){if(this._inputElement){this._inputElement.focus()}},this,1)},"default":function(){}}),_applyCursor:function(b,a){arguments.callee.base.call(this,b,a);this._updateMessageCursor()},_applyFont:function(b,a){arguments.callee.base.call(this,b,a);this._updateMessageFont()},_preventEnter:function(a){if(this._inputTag!==$[119]){arguments.callee.base.call(this,a)}},_updateMessage:function(){if(this._isCreated){if(this._message!=null&&this._message!==""&&this._messageElement==null){this._messageElement=document.createElement("div");var a=this._messageElement.style;a.position=$[16];a.outline="none";var b=this._getMessageStyle();a.color=b.textColor||"";a.left=b.paddingLeft+"px";rwt.html.Style.setTextShadow(this._messageElement,b.textShadow);this._getTargetNode().insertBefore(this._messageElement,this._inputElement)}if(this._messageElement){this._messageElement.innerHTML=this._message?this._message:""}this._updateMessageCursor();this._updateMessageVisibility();this._updateMessageFont();this._layoutMessage()}},_layoutMessage:function(){if(this._messageElement){var d=this._getMessageStyle();var c=this._messageElement.style;var b=this.getBoxWidth()-this._cachedBorderLeft-this._cachedBorderRight-d.paddingLeft-d.paddingRight-this._getIconOuterWidth($[79])-this._getIconOuterWidth($[84]);c.width=Math.max(0,b)+"px";var a=parseInt(c.height,10);if(this._inputTag==$[119]){c.top="0px";c.left="3px"}else{c.top=Math.round(this.getInnerHeight()/2-a/2)+"px";c.left=(this._getIconOuterWidth($[79])+d.paddingLeft)+"px"}}},_getMessageStyle:function(){var a=rwt.theme.AppearanceManager.getInstance();return a.styleFrom("text-field-message",{})},_updateMessageVisibility:function(){if(this._messageElement){var a=(this.getValue()==null||this.getValue()==="")&&!this.getFocused();this._messageElement.style.display=a?"":"none"}},_updateMessageFont:function(){if(this._messageElement){var b=this._messageElement.style;var a=this.getFont();a.renderElement(this._messageElement);b.height=Math.round(a.getSize()*this._LINE_HEIGT_FACTOR)+"px"}},_updateMessageCursor:function(){if(this._messageElement){var a=this._inputElement.style.cursor;if(a==null||a===""){a="text"}this._messageElement.style.cursor=a}}}})}()); |
| rwt.remote.HandlerRegistry.add($[342],{factory:function(b){var c=rwt.remote.HandlerUtil.createStyleMap(b.style);var a=new rwt.widgets.Text(c.MULTI);rwt.remote.HandlerUtil.addStatesForStyles(a,b.style);a.setUserData($[23],true);rwt.remote.HandlerUtil.setParent(a,b.parent);if(c.RIGHT){a.setTextAlign($[14])}else{if(c.CENTER){a.setTextAlign($[24])}}a.setWrap(c.WRAP!==undefined);return a},destructor:rwt.remote.HandlerUtil.getControlDestructor(),getDestroyableChildren:rwt.remote.HandlerUtil.getDestroyableChildrenFinder(),properties:rwt.remote.HandlerUtil.extendControlProperties(["text","message","echoChar","editable",$[60],$[295]]),propertyHandler:rwt.remote.HandlerUtil.extendControlPropertyHandler({text:function(c,b){var a=rwt.util.Encoding;var d=a.truncateAtZero(b);if(!c.hasState($[211])){d=a.replaceNewLines(d," ")}c.setValue(d)},echoChar:function(b,a){if(!b.hasState($[211])){b.setPasswordMode(a!==null)}},editable:function(b,a){b.setReadOnly(!a)},textLimit:function(b,a){b.setMaxLength(a)}}),listeners:rwt.remote.HandlerUtil.extendControlListeners([$[111],"Modify"]),listenerHandler:rwt.remote.HandlerUtil.extendControlListenerHandler({})}); |
| rwt.qx.Class.define($[466],{extend:rwt.widgets.base.BoxLayout,construct:function(){arguments.callee.base.call(this);rwt.widgets.util.WidgetUtil.fixIEBoxHeight(this);this._line=new rwt.widgets.base.Parent();this._line.setAnonymous(true);this._line.setAppearance("separator-line");this.add(this._line)},properties:{appearance:{refine:true,init:$[300]}},destruct:function(){this._line.dispose();this._line=null},members:{addState:function(a){arguments.callee.base.call(this,a);if(a.substr(0,8)==$[38]){this._line.addState(a)}},removeState:function(a){arguments.callee.base.call(this,a);if(a.substr(0,8)==$[38]){this._line.removeState(a)}},setLineStyle:function(a){this._line.addState(a)},setLineOrientation:function(a){if(a==$[31]){this.setHorizontalChildrenAlign($[24]);this._line.setHeight("100%");this._line.addState($[225])}else{this.setVerticalChildrenAlign($[44]);this._line.setWidth("100%");this._line.removeState($[225])}}}}); |
| rwt.remote.HandlerRegistry.add($[466],{factory:function(c){var b=new rwt.widgets.Separator();rwt.remote.HandlerUtil.addStatesForStyles(b,c.style);b.setUserData($[23],true);rwt.remote.HandlerUtil.setParent(b,c.parent);var d=rwt.remote.HandlerUtil.createStyleMap(c.style);b.setLineOrientation(d.VERTICAL?$[31]:$[37]);var a="rwt_SHADOW_NONE";if(d.SHADOW_IN){a="rwt_SHADOW_IN"}else{if(d.SHADOW_OUT){a="rwt_SHADOW_OUT"}}b.setLineStyle(a);return b},destructor:rwt.remote.HandlerUtil.getControlDestructor(),getDestroyableChildren:rwt.remote.HandlerUtil.getDestroyableChildrenFinder(),properties:rwt.remote.HandlerUtil.extendControlProperties([]),propertyHandler:rwt.remote.HandlerUtil.extendControlPropertyHandler({}),listeners:rwt.remote.HandlerUtil.extendControlListeners([]),listenerHandler:rwt.remote.HandlerUtil.extendControlListenerHandler({})}); |
| rwt.qx.Class.define($[439],{extend:rwt.widgets.base.Image,construct:function(){arguments.callee.base.call(this);this.setZIndex(1000);this.setVisibility(false);this._showHover=true;this._text=null},members:{setText:function(a){this._text=a;this._updateToolTip()},setShowHover:function(a){this._showHover=a;this._updateToolTip()},_updateToolTip:function(){var a=rwt.remote.WidgetManager.getInstance();if(this._text===null||this._text===""||!this._showHover){a.setToolTip(this,null)}else{a.setToolTip(this,this._text)}},setHasSelectionListener:function(b){var a=rwt.remote.EventUtil;if(b){this.addEventListener($[1],a.widgetSelected,this)}else{this.removeEventListener($[1],a.widgetSelected,this)}},setHasDefaultSelectionListener:function(b){var a=rwt.remote.EventUtil;if(b){this.addEventListener($[48],a.widgetDefaultSelected,this)}else{this.removeEventListener($[48],a.widgetDefaultSelected,this)}}}}); |
| rwt.remote.HandlerRegistry.add($[439],{factory:function(b){var a=new rwt.widgets.ControlDecorator();rwt.remote.HandlerUtil.addStatesForStyles(a,b.style);rwt.remote.HandlerUtil.setParent(a,b.parent);return a},destructor:rwt.remote.HandlerUtil.getWidgetDestructor(),properties:[$[87],"text",$[15],$[281],"showHover"],propertyHandler:{bounds:function(b,a){b.setLeft(a[0]);b.setTop(a[1]);b.setWidth(a[2]);b.setHeight(a[3])},text:function(c,b){var a=rwt.util.Encoding;var d=a.escapeText(b,false);d=a.replaceNewLines(d,$[97]);c.setText(d)},image:function(b,a){if(a===null){b.setSource(null)}else{b.setSource(a[0])}},visible:function(b,a){b.setVisibility(a)}},listeners:[$[30],$[111]]}); |
| rwt.qx.Class.define("rwt.runtime.MobileWebkitSupport",{type:$[152],statics:{_draggableTypes:{"rwt.widgets.Shell":null,"rwt.widgets.Sash":null,"rwt.widgets.Scale":[$[372]],"rwt.widgets.Slider":[$[380]],"rwt.widgets.base.ScrollBar":null,"rwt.widgets.ScrolledComposite":[$[204]],"rwt.widgets.base.BasicButton":[$[204]],"rwt.widgets.base.Parent":[$[542]],"rwt.widgets.List":[$[204]],"rwt.widgets.Grid":["tree-column",$[67],$[15],$[204]]},_lastMouseOverTarget:null,_lastMouseClickTarget:null,_lastMouseClickTime:null,_mouseEnabled:true,_fullscreen:window.navigator.standalone,_touchListener:null,_gestureListener:null,_touchSession:null,_allowNativeScroll:false,_allowedMouseEvents:{INPUT:{mousedown:true,mouseup:true},TEXTAREA:{mousedown:true,mouseup:true},"*":{mousewheel:true}},init:function(){if(rwt.client.Client.supportsTouch()){this._configureToolTip();this._hideTabHighlight();this._bindListeners();this._registerListeners();this._registerFilter();this.setTouchScrolling(!rwt.client.Client.isAndroidBrowser())}},addDraggableType:function(a){var b=a in this._draggableTypes;if(!b){this._draggableTypes[a]=null}},setTouchListener:function(b,a){this._touchListener=[b,a]},setGestureListener:function(b,a){this._gestureListener=[b,a]},setTouchScrolling:function(a){this._allowNativeScroll=a},_isZoomed:function(){var a=window.orientation%180===0;var b=a?screen.width:screen.height;return window.innerWidth!==b},_configureToolTip:function(){var a=rwt.widgets.base.WidgetToolTip.getInstance();a.setShowInterval(600);a.setHideInterval(15000);a.setMousePointerOffsetX(-35);a.setMousePointerOffsetY(-100);var b=rwt.widgets.util.ToolTipManager.getInstance();b.handleMouseEvent=function(d){var c=d.getType();if(c===$[1]){this._handleMouseOver(d)}else{if(c===$[5]){this.setCurrentToolTip(null)}}}},_hideTabHighlight:function(){rwt.html.StyleSheet.createElement(" * { -webkit-tap-highlight-color: rgba(0,0,0,0); }")},_bindListeners:function(){this.__onTouchEvent=rwt.util.Functions.bind(this._onTouchEvent,this);this.__onGestureEvent=rwt.util.Functions.bind(this._onGestureEvent,this);this.__onOrientationEvent=rwt.util.Functions.bind(this._onOrientationEvent,this)},_registerListeners:function(){var a=document.body;a.ontouchstart=this.__onTouchEvent;a.ontouchmove=this.__onTouchEvent;a.ontouchend=this.__onTouchEvent;a.ontouchcancel=this.__onTouchEvent;a.ongesturestart=this.__onGestureEvent;a.ongesturechange=this.__onGestureEvent;a.ongestureend=this.__onGestureEvent;a.onorientationchange=this.__onOrientationEvent},_removeListeners:function(){var a=document.body;a.ontouchstart=null;a.ontouchmove=null;a.ontouchend=null;a.ontouchcancel=null;a.ongesturestart=null;a.ongesturechange=null;a.ongestureend=null;a.onorientationchange=null},_registerFilter:function(){var a=rwt.event.EventHandler;a.setMouseEventFilter(this._filterMouseEvents,this)},_filterMouseEvents:function(b){var c=this._allowedMouseEvents;var a=typeof b.originalEvent===$[20];if(!a){a=c["*"][b.type]===true}if(!a&&typeof c[b.target.tagName]===$[20]){a=c[b.target.tagName][b.type]===true}if(!a){b.preventDefault();b.returnValue=false}return a},_onTouchEvent:function(c){try{if(!rwt.remote.EventUtil.getSuspended()){var b=c.type;if(this._mouseEnabled){switch(b){case"touchstart":this._handleTouchStart(c);break;case"touchend":this._handleTouchEnd(c);break;case"touchmove":this._handleTouchMove(c);break}}else{if(this._touchListener!==null){this._touchListener[0].call(this._touchListener[1],c)}}}else{c.preventDefault()}}catch(a){alert("Error in touch event handling:"+a);if(typeof console===$[20]){console.log(a);if(a.stack){console.log(a.stack)}}}},_getTouch:function(a){var b=a.touches.item(0);if(b===null){b=a.changedTouches.item(0)}return b},_handleTouchStart:function(b){var e=this._getTouch(b);var c=b.target;var a=rwt.event.EventHandlerUtil.getOriginalTargetObject(c);var d=[e.clientX,e.clientY];this._touchSession={type:this._getSessionType(a),initialTarget:c,widgetTarget:a,initialPosition:d};if(!this._touchSession.type.scroll&&!this._touchSession.type.outerScroll&&!this._touchSession.type.focus){b.preventDefault()}this._moveMouseTo(c,b);this._fireMouseEvent($[1],c,b,d);if(this._touchSession.type.virtualScroll){this._initVirtualScroll(a)}},_handleTouchMove:function(b){if(this._touchSession!==null){var e=this._getTouch(b);var d=[e.clientX,e.clientY];if(!this._touchSession.type.scroll){b.preventDefault()}if(this._touchSession.type.virtualScroll){this._handleVirtualScroll(d)}if(this._touchSession.type.drag){b.preventDefault();var c=b.target;this._fireMouseEvent($[28],c,b,d)}else{var a=this._touchSession.initialPosition;if(Math.abs(a[0]-d[0])>=15||Math.abs(a[1]-d[1])>=15){this._cancelMouseSession(b)}}}},_handleTouchEnd:function(a){a.preventDefault();var d=this._getTouch(a);var c=[d.clientX,d.clientY];var b=a.target;if(this._touchSession!==null){if(this._touchSession.type.click){this._fireMouseEvent($[5],b,a,c)}if(this._touchSession.type.virtualScroll){this._finishVirtualScroll()}if(this._touchSession.type.click&&this._touchSession.initialTarget===b){this._fireMouseEvent($[13],b,a,c);this._touchSession=null;if(this._isDoubleClick(a)){this._lastMouseClickTarget=null;this._lastMouseClickTime=null;this._fireMouseEvent($[48],b,a,c)}else{this._lastMouseClickTarget=b;this._lastMouseClickTime=(new Date()).getTime()}}}},_getSessionType:function(b){var a={};a.click=true;if(this._isDraggableWidget(b)){a.drag=true}else{if(this._isGridRow(b)){a.virtualScroll=true;a.outerScroll=this._allowNativeScroll&&this._isScrollableWidget(b)}else{if(this._allowNativeScroll&&this._isScrollableWidget(b)){a.scroll=true}else{if(this._isFocusable(b)){a.focus=true}}}}return a},_initVirtualScroll:function(c){var b;if(c instanceof rwt.widgets.base.GridRow){b=c.getParent().getParent()}else{b=this._findScrollable(c)}var d=b._vertScrollBar;var a=b._horzScrollBar;this._touchSession.scrollBarV=d;this._touchSession.initScrollY=d.getValue();this._touchSession.maxScrollY=d.getMaximum();this._touchSession.scrollBarH=a;this._touchSession.initScrollX=a.getValue();this._touchSession.maxScrollX=a.getMaximum()},_handleVirtualScroll:function(h){var b=this._touchSession.initialPosition;var e=b[0]-h[0];var d=b[1]-h[1];var a=this._touchSession.initScrollX+e;var k=this._touchSession.initScrollY+d;var i=this._touchSession.scrollBarV.getMaximum()-this._touchSession.scrollBarV._thumbLength;var c=k<0||k>i;if(this._touchSession.type.outerScroll&&c){var j=this._findScrollable(this._touchSession.widgetTarget);var g=j._vertScrollBar.getValue();var f=j._vertScrollBar.getMaximum()-j._vertScrollBar._thumbLength;if((k<0&&g>0)||(k>i&&g<f)){delete this._touchSession.type.virtualScroll;this._touchSession.type.scroll=true}}this._touchSession.scrollBarH.setValue(a);this._touchSession.scrollBarV.setValue(k)},_finishVirtualScroll:function(){var a=this._touchSession.scrollBarV;a.setValue(a.getValue())},_isFocusable:function(a){return a instanceof rwt.widgets.base.BasicText},_isScrollableWidget:function(a){return this._findScrollable(a)!==null},_isGridRow:function(a){return a instanceof rwt.widgets.base.GridRow},_findScrollable:function(c){var a=null;var b=c;do{if(b instanceof rwt.widgets.base.Scrollable){a=b}else{if(b instanceof rwt.widgets.base.ClientDocument){b=null}else{b=b.getParent()}}}while(b&&!a);return a},_isDraggableWidget:function(b){var f=rwt.remote.WidgetManager.getInstance();var e=f.findControl(b);var a=false;if(e==null){e=b}if(e!=null&&e.classname in this._draggableTypes){var d=this._draggableTypes[e.classname];if(d==null){a=true}else{for(var c=0;c<d.length&&!a;c++){if(b.getAppearance()===d[c]){a=true}}}}return a},_isDoubleClick:function(b){var d=b.target;var a=false;if(this._lastMouseClickTarget===d){var c=((new Date()).getTime())-this._lastMouseClickTime;a=c<rwt.remote.EventUtil.DOUBLE_CLICK_TIME}return a},_onGestureEvent:function(b){b.preventDefault();var a=b.type;if(this._gestureListener!==null){this._gestureListener[0].call(this._gestureListener[1],b)}switch(a){case"gesturestart":this._disableMouse(b);break;case"gestureend":this._enableMouse(b);break}},_onOrientationEvent:function(a){},_disableMouse:function(a){this._cancelMouseSession(a);this._mouseEnabled=false},_cancelMouseSession:function(a){var b=this._getDummyTarget();this._moveMouseTo(b,a);if(this._touchSession!==null){this._fireMouseEvent($[5],b,a,[0,0]);delete this._touchSession.type.click}},_getDummyTarget:function(){return rwt.widgets.base.ClientDocument.getInstance()._getTargetNode()},_enableMouse:function(){this._mouseEnabled=true},_moveMouseTo:function(c,a){var b=this._lastMouseOverTarget;if(b!==c){var d=[0,0];if(b!==null){this._fireMouseEvent($[6],b,a,d)}this._lastMouseOverTarget=c;this._fireMouseEvent($[3],c,a,d)}},_fireMouseEvent:function(c,e,a,b){var d=document.createEvent("MouseEvent");d.initMouseEvent(c,true,true,window,0,b[0],b[1],b[0],b[1],false,false,false,false,rwt.event.MouseEvent.buttons.left,null);d.originalEvent=a;e.dispatchEvent(d)},_postMouseEvent:function(a){if(a===$[5]){rwt.widgets.util.ToolTipManager.getInstance().setCurrentToolTip(null)}}}}); |
| rwt.qx.Class.define($[428],{extend:rwt.widgets.base.Popup,include:rwt.animation.VisibilityAnimationMixin,construct:function(a){arguments.callee.base.call(this);this._style=a;this.setAutoHide(false);this.setDisplay(true);this.setVisibility(false);this.setAppearance("tool-tip");var b=rwt.widgets.base.ClientDocument.getInstance();this.setMaxWidth(b.getClientWidth()/2);this.setMaxHeight(b.getClientHeight()/2);this.addToDocument();this.addEventListener($[1],this._onMouseDown,this);this._hideAfterTimeout=false;this._hasSelectionListener=false;this._messageFont=this._getMessageFont();this._contentArea=null;this._textArea=null;this._image=null;this._text=null;this._message=null;this._createControls()},destruct:function(){this.removeEventListener($[1],this._onMouseDown,this);this._contentArea.dispose();this._textArea.dispose();this._image.dispose();this._text.dispose();this._message.dispose();this._messageFont=null},members:{setText:function(a){this._text.setText(a);if(this.getVisibility()){this._update()}},setMessage:function(a){this._message.setText(a);if(this.getVisibility()){this._update()}},setLocation:function(a,b){this.setLeft(a);this.setTop(b)},setHideAfterTimeout:function(a){this._hideAfterTimeout=a},setHasSelectionListener:function(a){this._hasSelectionListener=a},setVisible:function(a){this.setVisibility(a);if(a){this._update();this.bringToFront();if(this._hideAfterTimeout){rwt.client.Timer.once(this._hide,this,5*1000)}}},addState:function(a){arguments.callee.base.call(this,a);this._image.addState(a)},removeState:function(a){arguments.callee.base.call(this,a);this._image.removeState(a)},_createControls:function(){this._contentArea=new rwt.widgets.base.BoxLayout($[37]);this._contentArea.setWidth("100%");this._contentArea.setHeight("100%");this._contentArea.setSpacing(5);this._contentArea.setParent(this);this._image=new rwt.widgets.base.Image();this._image.setAppearance("tool-tip-image");this._image.setParent(this._contentArea);this._textArea=new rwt.widgets.base.BoxLayout($[31]);this._textArea.setParent(this._contentArea);this._textArea.setHeight("100%");this._textArea.setSpacing(5);this._text=new rwt.widgets.base.Label();this._text.setAppearance("tool-tip-text");this._text.setParent(this._textArea);this._message=new rwt.widgets.base.Label();this._message.setAppearance("tool-tip-message");this._message.setHeight("auto");this._message.setWrap(true);this._message.setParent(this._textArea)},_update:function(){var c=this._message.getText();var d=this._getTextSize(this._text.getText(),-1);var a=this._getTextSize(c,-1);var b=a.x;while(b>0&&!this._matchesWidthToHeightRatio(a)){b-=10;a=this._getTextSize(c,b)}a.x=this._max(a.x,d.x);this._message.setWidth(a.x);this._message.setHeight(a.y)},_matchesWidthToHeightRatio:function(a){return a.x/a.y<=6},_max:function(d,c){return d>c?d:c},_getTextSize:function(d,a){var c=[];c[0]="";c[1]=d;c[2]=this._messageFont.getFamily();c[3]=this._messageFont.getSize();c[4]=this._messageFont.getBold();c[5]=this._messageFont.getItalic();c[6]=a;var b=rwt.widgets.util.FontSizeCalculation._measureItem(c);return{x:b[0],y:b[1]}},_onMouseDown:function(a){this._hide();if(this._hasSelectionListener){var c=this._getWidgetId();var b=rwt.remote.Server.getInstance();b.addEvent("org.eclipse.swt.events.Selection",c);b.send()}},_hide:function(){this.setVisible(false);rwt.widgets.base.Widget.flushGlobalQueues();var a=rwt.remote.Server.getInstance();a.addParameter(this._getWidgetId()+".visible",false)},_getWidgetId:function(){var a=rwt.remote.WidgetManager.getInstance();return a.findIdByWidget(this)},_getMessageFont:function(){var a=new rwt.theme.ThemeValues({});return a.getCssFont("ToolTip-Message","font")}}}); |
| rwt.remote.HandlerRegistry.add($[428],{factory:function(b){var d=rwt.remote.HandlerUtil.createStyleMap(b.style);var c=null;if(d.ICON_ERROR){c=$[134]}else{if(d.ICON_WARNING){c="warning"}else{if(d.ICON_INFORMATION){c="information"}}}var a=new rwt.widgets.ToolTip(c);rwt.remote.HandlerUtil.addStatesForStyles(a,b.style);rwt.remote.HandlerUtil.callWithTarget(b.parent,function(e){rwt.remote.HandlerUtil.addDestroyableChild(e,a)});return a},destructor:rwt.remote.HandlerUtil.getWidgetDestructor(),properties:[$[86],$[361],$[126],"autoHide","text","message","location",$[281]],propertyHandler:{roundedBorder:rwt.remote.HandlerUtil.getRoundedBorderHandler(),backgroundGradient:rwt.remote.HandlerUtil.getBackgroundGradientHandler(),autoHide:function(b,a){b.setHideAfterTimeout(a)},text:function(c,b){var a=rwt.util.Encoding;var d=a.escapeText(b,false);c.setText(d)},message:function(c,b){var a=rwt.util.Encoding;var d=a.escapeText(b,false);d=a.replaceNewLines(d,$[97]);c.setMessage(d)},location:function(b,a){b.setLocation(a[0],a[1])}},listeners:[$[30]]}); |
| rwt.qx.Class.define("rwt.remote.WidgetManager",{type:$[39],extend:rwt.qx.Object,construct:function(){arguments.callee.base.call(this)},members:{dispose:function(b){var a=this.findWidgetById(b);if(a!=null){this.remove(a);if(!a.getDisposed()){this._removeToolTipPopup(a);a.destroy()}}},add:function(c,d,b,a){if(b===true){c.setUserData($[23],true)}rwt.remote.ObjectRegistry.add(d,c,a)},remove:function(a){var b=this.findIdByWidget(a);rwt.remote.ObjectRegistry.remove(b)},findWidgetById:function(a){return rwt.remote.ObjectRegistry.getObject(a)},findIdByWidget:function(a){return rwt.remote.ObjectRegistry.getId(a)},isControl:function(b){var a=null;if(b!=null){a=b.getUserData($[23])}return a===true},findControl:function(b){var a=b;while(a!=null&&!this.isControl(a)){a=a.getParent?a.getParent():null}return a},findEnabledControl:function(b){var a=b;while(a!=null&&!(this.isControl(a)&&a.getEnabled())){a=a.getParent?a.getParent():null}return a},setToolTip:function(c,b){if(b!=null&&b!==""){c.setUserData($[182],b);var a=rwt.widgets.base.WidgetToolTip.getInstance();c.setToolTip(a);if(a.getParent()!=null){if(a.getBoundToWidget()==c){a.updateText(c)}}}else{this._removeToolTipPopup(c)}},_removeToolTipPopup:function(a){a.setToolTip(null);a.setUserData($[182],null)}}}); |
| namespace($[185]);rwt.remote.MessageProcessor={processMessage:function(c){this.processHead(c.head);var a=c.operations;for(var b=0;b<a.length;b++){this.processOperationArray(a[b])}},processHead:function(a){var b=rwt.remote.Server.getInstance();if(a.url!==undefined){b.setUrl(a.url)}if(a.requestCounter!==undefined){b.setRequestCounter(a.requestCounter)}if(a.redirect!==undefined){document.location=a.redirect}},processOperationArray:function(a){var c=a[0];try{switch(c){case $[65]:this._processCreate(a[1],a[2],a[3]);break;case"set":this._processSet(a[1],a[2]);break;case"listen":this._processListen(a[1],a[2]);break;case"call":this._processCall(a[1],a[2],a[3]);break;case $[216]:this._processDestroy(a[1]);break}}catch(b){this._processError(b,a)}},processOperation:function(a){switch(a.action){case $[65]:this._processCreate(a.target,a.type,a.properties);break;case"set":this._processSet(a.target,a.properties);break;case $[216]:this._processDestroy(a.target);break;case"call":this._processCall(a.target,a.method,a.properties);break;case"listen":this._processListen(a.target,a.properties);break}},_processCreate:function(b,e,c){var d=rwt.remote.HandlerRegistry.getHandler(e);if(d.service===true){throw new Error("Objects of type "+e+" can not be created")}var a=d.factory(c);this._addTarget(a,b,d);this._processSetImpl(a,d,c)},_processDestroy:function(c){var a=rwt.remote.ObjectRegistry.getEntry(c);var f=a.handler;var b=a.object;var e=f.getDestroyableChildren?f.getDestroyableChildren(b):null;if(f.destructor instanceof Function){f.destructor(b)}else{if(typeof f.destructor===$[7]){var g=f.destructor;b[g]()}}rwt.remote.ObjectRegistry.remove(c);rwt.remote.RemoteObjectFactory.remove(c);for(var d=0;e!=null&&d<e.length;d++){if(e[d]){this._processDestroy(rwt.remote.ObjectRegistry.getId(e[d]))}}},_processSet:function(b,c){var a=rwt.remote.ObjectRegistry.getEntry(b);this._processSetImpl(a.object,a.handler,c)},_processSetImpl:function(b,e,d){if(d&&e.properties instanceof Array){for(var c=0;c<e.properties.length;c++){var g=e.properties[c];var f=d[g];if(f!==undefined){if(e.propertyHandler&&e.propertyHandler[g]){e.propertyHandler[g].call(window,b,f)}else{var a=this._getSetterName(g);b[a](f)}}}}},_processCall:function(c,f,d){var a=rwt.remote.ObjectRegistry.getEntry(c);var e=a.handler;var b=a.object;if(e.methods instanceof Array&&e.methods.indexOf(f)!==-1){if(e.methodHandler&&e.methodHandler[f]){e.methodHandler[f](b,d)}else{b[f](d)}}},_processListen:function(c,e){var a=rwt.remote.ObjectRegistry.getEntry(c);var h=a.handler;var b=a.object;if(h.events instanceof Array){var g=rwt.remote.RemoteObjectFactory.getRemoteObject(b);for(var d=0;d<h.events.length;d++){var f=h.events[d];if(e[f]===true){g._.listen[f]=true}if(e[f]===false){g._.listen[f]=false}}}else{if(h.listeners instanceof Array){for(var d=0;d<h.listeners.length;d++){var f=h.listeners[d];if(e[f]===true){this._addListener(h,b,f)}if(e[f]===false){this._removeListener(h,b,f)}}}}},_processError:function(c,b){var f;if(c){f=c.message?c.message:c.toString()}else{f="No Error given!"}var e='Operation "'+b[0]+'"';e+=' on target "'+b[1]+'"';var a=rwt.remote.ObjectRegistry.getEntry(b[1]);var d=a?a.object:null;e+=' of type "'+(d&&d.classname?d.classname:d)+'"';e+=" failed:";e+="\n"+f+"\n";e+="Properties: \n"+this._getPropertiesString(b);throw new Error(e)},_getPropertiesString:function(b){var a="";var d;switch(b[0]){case"set":case"listen":d=b[2];break;case $[65]:case"call":d=b[3];break;default:d={};break}for(var c in d){a+=c+" = "+d[c]+"\n"}return a},_addTarget:function(c,a,b){if(c instanceof rwt.widgets.base.Widget){var d=rwt.remote.WidgetManager.getInstance();d.add(c,a,false,b)}else{rwt.remote.ObjectRegistry.add(a,c,b)}},_addListener:function(d,b,c){if(d.listenerHandler&&d.listenerHandler[c]){d.listenerHandler[c](b,true)}else{var a=this._getListenerSetterName(c);b[a](true)}},_removeListener:function(d,b,c){if(d.listenerHandler&&d.listenerHandler[c]){d.listenerHandler[c](b,false)}else{var a=this._getListenerSetterName(c);b[a](false)}},_getSetterName:function(a){return"set"+rwt.util.Strings.toFirstUp(a)},_getListenerSetterName:function(a){return"setHas"+rwt.util.Strings.toFirstUp(a)+"Listener"}}; |
| namespace($[185]);rwt.remote.MessageWriter=function(){this._head={};this._operations=[];this._currentSetOperation=null;this._disposed=false};rwt.remote.MessageWriter.prototype={dispose:function(){this._operations=null;this._head=null;this._disposed=true},hasOperations:function(){return this._operations.length>0},createMessage:function(){if(this._disposed){throw new Error("Protocol message writer already disposed!")}var a={head:this._head,operations:this._operations};return JSON.stringify(a)},appendHead:function(b,a){this._head[b]=a},appendSet:function(a,d,c){var b=this._getPropertiesObjectFor(a);b[d]=c},appendNotify:function(b,a,c){this._currentSetOperation=null;this._operations.push(["notify",b,a,c])},appendCall:function(b,a,c){this._currentSetOperation=null;this._operations.push(["call",b,a,c])},_getPropertiesObjectFor:function(a){if(this._currentSetOperation===null||this._currentSetOperation[1]!==a){this._currentSetOperation=["set",a,{}];this._operations.push(this._currentSetOperation)}return this._currentSetOperation[2]}}; |
| namespace($[268]);rwt.client.ServerPush=function(){if(rwt.client.ServerPush._instance!==undefined){throw new Error("ServerPush can not be created twice")}else{rwt.client.ServerPush._instance=this}this._retryInterval=0;this._active=false;this._running=false;this._requestTimer=new rwt.client.Timer(0);this._requestTimer.addEventListener($[27],this._doSendUICallBackRequest,this)};rwt.client.ServerPush.getInstance=function(){if(rwt.client.ServerPush._instance===undefined){new rwt.client.ServerPush()}return rwt.client.ServerPush._instance};rwt.client.ServerPush.prototype={setActive:function(a){this._active=a},sendUIRequest:function(){rwt.remote.Server.getInstance().sendImmediate(true)},sendUICallBackRequest:function(){if(this._active&&!this._running){this._running=true;this._requestTimer.start()}},_doSendUICallBackRequest:function(){this._requestTimer.stop();var a=rwt.remote.Server.getInstance().getUrl();var b=new rwt.remote.Request(a,"GET","application/javascript");b.setSuccessHandler(this._handleSuccess,this);b.setErrorHandler(this._handleError,this);b.setData("servicehandler=org.eclipse.rap.serverpush");b.send()},_handleSuccess:function(a){this._running=false;this._retryInterval=0;this.sendUIRequest()},_handleError:function(a){this._running=false;if(rwt.remote.Server.getInstance()._isConnectionError(a.status)){rwt.client.Timer.once(this.sendUICallBackRequest,this,this._retryInterval);this._increaseRetryInterval()}},_increaseRetryInterval:function(){if(this._retryInterval===0){this._retryInterval=1000}else{if(this._retryInterval<60*1000){this._retryInterval*=2}}}}; |
| rwt.remote.HandlerRegistry.add("rwt.client.ServerPush",{factory:function(a){return rwt.client.ServerPush.getInstance()},service:true,properties:[$[63]]}); |
| (function(){var h=rwt.client.Client;var d=rwt.client.Timer;var c=rwt.remote.MessageProcessor;var b=rwt.runtime.ErrorHandler;var g=rwt.remote.EventUtil;var f=rwt.client.ServerPush;var a=rwt.widgets.base.ClientDocument;var e=rwt.widgets.base.Widget;rwt.qx.Class.define("rwt.remote.Server",{type:$[39],extend:rwt.qx.Target,construct:function(){arguments.callee.base.call(this);this._url="";this._writer=null;this._event=null;this._requestCounter=null;this._sendTimer=new d(60);this._sendTimer.addEventListener($[27],function(){this.sendImmediate(true)},this);this._delayTimer=new d();this._delayTimer.addEventListener($[27],function(){this._delayTimer.stop();this.send()},this);this._waitHintTimer=new d(1000);this._waitHintTimer.addEventListener($[27],this._showWaitHint,this);this._retryHandler=null;this._sendListeners=[]},destruct:function(){this._retryHandler=null;this._sendTimer.dispose();this._sendTimer=null;this._waitHintTimer.dispose();this._waitHintTimer=null},members:{setUrl:function(i){this._url=i},getUrl:function(){return this._url},setRequestCounter:function(i){this._requestCounter=i},getRequestCounter:function(){return this._requestCounter},addParameter:function(j,l){var i=typeof j===$[7]?j.split("."):null;if(i){if(this._event&&j.indexOf(this._event[1])===0){this._event[2][i.pop()]=l}else{this._flushEvent();var m=i.shift();var k=i.join(".");this.getMessageWriter().appendSet(m,k,l)}}else{}},addEvent:function(i,j){this._flushEvent();this._event=[j,i,{}]},_flushEvent:function(){if(this._event){var i=this.getMessageWriter();this._event[1]=this._event[1].split(".").pop();i.appendNotify.apply(i,this._event);this._event=null}},sendDelayed:function(i){this._delayTimer.setInterval(i);this._delayTimer.start()},send:function(){this._sendTimer.start()},sendImmediate:function(i){this._delayTimer.stop();if(this._requestCounter===-1){this._sendTimer.stop();this.send()}else{this._flushEvent();this.dispatchSimpleEvent("send");rap._.notify("send");this._flushEvent();this._sendTimer.stop();if(this._requestCounter!=null){this.getMessageWriter().appendHead("requestCounter",this._requestCounter)}this._requestCounter=-1;var j=this._createRequest();j.setAsynchronous(i);j.setData(this.getMessageWriter().createMessage());this._writer.dispose();this._writer=null;this._waitHintTimer.start();j.send();this._removeSendListeners()}},getMessageWriter:function(){if(this._writer===null){this._writer=new rwt.remote.MessageWriter()}return this._writer},getRemoteObject:function(i){return rwt.remote.RemoteObjectFactory.getRemoteObject(i)},onNextSend:function(j,i){this._sendListeners.push([j,i]);this.addEventListener("send",j,i)},getWaitHintTimer:function(){return this._waitHintTimer},_removeSendListeners:function(){for(var j=0;j<this._sendListeners.length;j++){var k=this._sendListeners[j];this.removeEventListener("send",k[0],k[1])}this._sendListeners=[]},_createRequest:function(){var i=new rwt.remote.Request(this._url,"POST",$[261]);i.setSuccessHandler(this._handleSuccess,this);i.setErrorHandler(this._handleError,this);return i},_handleError:function(j){this._hideWaitHint();if(this._isConnectionError(j.status)){this._handleConnectionError(j)}else{var l=j.responseText;if(l&&l.length>0){if(this._isJsonResponse(j)){var i=JSON.parse(l);b.showErrorBox(i.head.message,true)}else{b.showErrorPage(l)}}else{var k="<p>Request failed.</p><pre>HTTP Status Code: "+j.status+"</pre>";b.showErrorPage(k)}}},_handleSuccess:function(k){try{var j=JSON.parse(k.responseText);rwt.remote.EventUtil.setSuspended(true);c.processMessage(j);e.flushGlobalQueues();rap._.notify("render");g.setSuspended(false);f.getInstance().sendUICallBackRequest();this.dispatchSimpleEvent($[312])}catch(i){b.processJavaScriptErrorInResponse(k.responseText,i,k.target)}this._hideWaitHint()},_handleConnectionError:function(i){var j='<p>The server seems to be temporarily unavailable</p><p><a href="javascript:rwt.remote.Server.getInstance()._retry();">Retry</a></p>';a.getInstance().setGlobalCursor(null);rwt.runtime.ErrorHandler.showErrorBox(j,false);this._retryHandler=function(){var l=this._createRequest();var k=i.target;l.setAsynchronous(k.getAsynchronous());l.setData(k.getData());l.send()}},_retry:function(){try{b.hideErrorBox();this._showWaitHint();this._retryHandler()}catch(i){rwt.runtime.ErrorHandler.processJavaScriptError(i)}},_isConnectionError:rwt.util.Variant.select($[0],{"mshtml|newmshtml":function(j){var i=(j===12007||j===12029||j===12030||j===12031||j===12152);return i},gecko:function(j){var i;if(h.getMajor()*10+h.getMinor()>=19){i=(j===0)}else{i=(j===-1)}return i},"default":function(i){return i===0}}),_isJsonResponse:function(i){var j=i.responseHeaders[$[441]];return j.indexOf($[261])!==-1},_showWaitHint:function(){this._waitHintTimer.stop();a.getInstance().setGlobalCursor($[242]);b.showWaitHint()},_hideWaitHint:function(){this._waitHintTimer.stop();b.hideErrorBox();a.getInstance().setGlobalCursor(null)}}})}());rwt.remote.Server.RESOURCE_PATH="./rwt-resources/resource/"; |
| rwt.qx.Class.define($[260],{extend:rwt.widgets.base.Atom,construct:function(b,a){arguments.callee.base.call(this);if(b.classname!=$[350]){throw new Error("illegal parent, must be a CTabFolder")}this._parent=b;this.setAppearance("ctab-item");this.setVerticalChildrenAlign(rwt.widgets.util.Layout.ALIGN_MIDDLE);this.setHorizontalChildrenAlign(rwt.widgets.util.Layout.ALIGN_LEFT);this.setOverflow($[9]);this.setTabIndex(null);this.setLabel($[279]);this.getLabelObject().setMode("html");this.getLabelObject().setVerticalAlign(rwt.widgets.util.Layout.ALIGN_MIDDLE);this.setLabel("");this._selected=false;this._showClose=false;this._canClose=a;this.updateForeground();this.updateBackground();this.updateBackgroundImage();this.updateBackgroundGradient();this.setTabPosition(b.getTabPosition());if(b.hasState($[112])){this.addState($[112])}this._closeButton=new rwt.widgets.base.Image();this._closeButton.setAppearance("ctab-close-button");this._closeButton.setWidth(20);this._closeButton.addEventListener($[13],this._onClose,this);var c=rwt.remote.WidgetManager.getInstance();c.setToolTip(this._closeButton,rwt.widgets.CTabFolder.CLOSE_TOOLTIP);this.add(this._closeButton);this.updateCloseButton();this.addEventListener($[3],this._onMouseOver,this);this.addEventListener($[6],this._onMouseOut,this);this.addEventListener($[13],this._onClick,this);this.addEventListener($[48],this._onDblClick,this);this.addEventListener($[181],this._onChangeParent,this);this.addEventListener($[278],this._onChangeLeft,this)},destruct:function(){this.removeEventListener($[3],this._onMouseOver,this);this.removeEventListener($[6],this._onMouseOut,this);this.removeEventListener($[13],this._onClick,this);this.removeEventListener($[48],this._onDblClick,this);this.removeEventListener($[181],this._onChangeParent,this);this.removeEventListener($[278],this._onChangeLeft,this);this._closeButton.removeEventListener($[13],this._onClose,this);var a=rwt.remote.WidgetManager.getInstance();a.setToolTip(this._closeButton,null);this._closeButton.dispose();this._closeButton=null},statics:{STATE_OVER:"over",STATE_SELECTED:$[22],IMG_CLOSE:rwt.remote.Server.RESOURCE_PATH+"widget/rap/ctabfolder/close.gif",IMG_CLOSE_HOVER:rwt.remote.Server.RESOURCE_PATH+"widget/rap/ctabfolder/close_hover.gif"},members:{setTabPosition:function(a){if(a==="top"){this.addState($[153])}else{this.removeState($[153])}},setSelected:function(a){if(this._selected!==a){this._selected=a;if(a){this.addState(rwt.widgets.CTabItem.STATE_SELECTED)}else{this.removeState(rwt.widgets.CTabItem.STATE_SELECTED)}this._updateNextSelected();this.updateForeground();this.updateBackground();this.updateBackgroundImage();this.updateBackgroundGradient();this.updateCloseButton()}},_updateNextSelected:function(){var a=null;var d=false;var c=this._parent.getChildren();for(var b=0;b<c.length&&!d;b++){if(c[b].classname===$[260]){d=c[b].isSelected();if(a!=null){if(d){a.addState($[475])}else{a.removeState($[475])}}a=c[b]}}},isSelected:function(){return this._selected},setShowClose:function(a){this._showClose=a;this.updateCloseButton()},updateForeground:function(){var a=this.isSelected()?this._parent.getSelectionForeground():this._parent.getTextColor();if(a!=null){this.setTextColor(a)}else{this.resetTextColor()}},updateBackground:function(){var a=this.isSelected()?this._parent.getSelectionBackground():null;if(a!=null){this.setBackgroundColor(a)}else{this.resetBackgroundColor()}},updateBackgroundImage:function(){var a=this.isSelected()?this._parent.getSelectionBackgroundImage():null;if(a!=null){this.setUserData($[171],a.slice(1));this.setBackgroundImage(a[0])}else{this.resetBackgroundImage()}},updateBackgroundGradient:function(){var a=this.isSelected()?this._parent.getSelectionBackgroundGradient():null;if(a!=null){this.setBackgroundGradient(a)}else{this.resetBackgroundGradient()}},updateCloseButton:function(){var a=false;if(this._canClose||this._showClose){a=this.isSelected()||(this._parent.getUnselectedCloseVisible()&&this.hasState(rwt.widgets.CTabItem.STATE_OVER))}this._closeButton.setVisibility(a)},_onMouseOver:function(a){this.addState(rwt.widgets.CTabItem.STATE_OVER);if(a.getTarget()==this._closeButton){this._closeButton.addState(rwt.widgets.CTabItem.STATE_OVER)}this.updateCloseButton()},_onMouseOut:function(a){this.removeState(rwt.widgets.CTabItem.STATE_OVER);if(a.getTarget()==this._closeButton){this._closeButton.removeState(rwt.widgets.CTabItem.STATE_OVER)}this.updateCloseButton()},_onClick:function(a){if(!rwt.remote.EventUtil.getSuspended()){if(a.getTarget()!=this._closeButton){a.getTarget().getParent()._notifyItemClick(a.getTarget())}}},_onDblClick:function(a){if(a.getTarget()!=this._closeButton){a.getTarget().getParent()._notifyItemDblClick(a)}},_onClose:function(a){if(!rwt.remote.EventUtil.getSuspended()){var b=rwt.remote.Server.getInstance();b.getRemoteObject(this.getParent()).notify("Folder",{detail:$[130],item:rwt.remote.ObjectRegistry.getId(this)})}},_onChangeParent:function(a){if(!this._parent._isInGlobalDisposeQueue){this._updateNextSelected()}},_onChangeLeft:function(a){if(this.getLeft()===0){this.addState("firstItem")}else{this.removeState("firstItem")}}}}); |
| rwt.remote.HandlerRegistry.add($[260],{factory:function(b){var a;rwt.remote.HandlerUtil.callWithTarget(b.parent,function(c){a=new rwt.widgets.CTabItem(c,c.hasState("rwt_CLOSE"));c.addAt(a,b.index);rwt.remote.HandlerUtil.addStatesForStyles(a,b.style);rwt.remote.HandlerUtil.addDestroyableChild(c,a);a.setUserData($[103],c)});return a},destructor:rwt.remote.HandlerUtil.getWidgetDestructor(),properties:[$[87],"font","text",$[15],$[113],$[86],"showing","showClose"],propertyHandler:{bounds:function(c,b){var a=b;if(c.getParent().getTabPosition()===$[32]){a[1]-=1}a[3]+=1;c.setLeft(a[0]);c.setTop(a[1]);c.setWidth(a[2]);c.setHeight(a[3])},font:rwt.remote.HandlerUtil.getControlPropertyHandler("font"),text:function(c,b){var a=rwt.util.Encoding;var d=a.escapeText(b,false);c.setLabel(d)},image:function(b,a){if(a===null){b.setIcon(null)}else{b.setIcon(a[0])}},toolTip:rwt.remote.HandlerUtil.getControlPropertyHandler($[113]),showing:function(b,a){b.setVisibility(a)}}}); |
| rwt.qx.Class.define($[350],{extend:rwt.widgets.base.Parent,construct:function(){arguments.callee.base.call(this);this.setTabIndex(1);this.setHideFocus(true);this.setAppearance("ctabfolder");this.setOverflow($[9]);this._hasFolderListener=false;this._hasSelectionListener=false;this._hasDefaultSelectionListener=false;this._tabPosition="top";this._tabHeight=0;this._selectionForeground=null;this._selectionBackground=null;this._selectionBackgroundImage=null;this._selectionBackgroundGradient=null;this._chevron=null;this._chevronBounds=[0,0,0,0];this._chevronMenu=null;this._unselectedCloseVisible=true;this._minMaxState=$[52];this._maxButton=null;this._maxButtonBounds=[0,0,0,0];this._minButton=null;this._minButtonBounds=[0,0,0,0];this._body=new rwt.widgets.base.Parent();this._body.addState($[153]);this._body.setAppearance("ctabfolder-body");this.add(this._body);this._separator=new rwt.widgets.base.Parent();this._separator.setAppearance("ctabfolder-separator");this.add(this._separator);this._frame=new rwt.widgets.base.Parent();this._frame.setAppearance("ctabfolder-frame");this.add(this._frame);this._frameBorder=new rwt.html.Border(2,$[70],"black");this.addEventListener($[71],this._updateLayout,this);this.addEventListener($[76],this._updateLayout,this);this.addEventListener($[4],this._onKeyPress,this);this.addEventListener($[42],this._onContextMenu,this)},destruct:function(){this.hideMinButton();this.hideMaxButton();this.removeEventListener($[71],this._updateLayout,this);this.removeEventListener($[76],this._updateLayout,this);this.removeEventListener($[4],this._onKeyPress,this);this.removeEventListener($[42],this._onContextMenu,this);this._disposeObjects("_frame","_separator");this._frameBorder.dispose()},statics:{BUTTON_SIZE:18,MIN_TOOLTIP:"Minimize",MAX_TOOLTIP:"Maximize",RESTORE_TOOLTIP:"Restore",CHEVRON_TOOLTIP:"Show List",CLOSE_TOOLTIP:"Close",setToolTipTexts:function(b,a,c,d,e){rwt.widgets.CTabFolder.MIN_TOOLTIP=b;rwt.widgets.CTabFolder.MAX_TOOLTIP=a;rwt.widgets.CTabFolder.RESTORE_TOOLTIP=c;rwt.widgets.CTabFolder.CHEVRON_TOOLTIP=d;rwt.widgets.CTabFolder.CLOSE_TOOLTIP=e}},members:{addState:function(a){arguments.callee.base.call(this,a);if(a.substr(0,8)==$[38]||a.substr(0,4)=="rwt_"){this._body.addState(a);this._frame.addState(a);this._mapItems(function(b){b.addState(a)})}},removeState:function(a){arguments.callee.base.call(this,a);if(a.substr(0,8)==$[38]||a.substr(0,4)=="rwt_"){this._body.removeState(a);this._frame.removeState(a);this._mapItems(function(b){b.removeState(a)})}},setTabPosition:function(a){this._tabPosition=a;this._mapItems(function(b){b.setTabPosition(a)});if(a=="top"){this._body.addState($[153])}else{this._body.removeState($[153])}this._updateLayout()},getTabPosition:function(){return this._tabPosition},setTabHeight:function(b){this._tabHeight=b;var a=this._getButtonTop();if(this._minButton!=null){this._minButton.setTop(a)}if(this._maxButton!=null){this._maxButton.setTop(a)}if(this._chevron!=null){this._chevron.setTop(a)}this._updateLayout()},_applyTextColor:function(b,a){arguments.callee.base.call(this,b,a);this._mapItems(function(c){c.updateForeground()})},_applyBackgroundColor:function(b,a){this._body.setBackgroundColor(b)},_applyBackgroundImage:function(b,a){this._body.setUserData($[171],this.getUserData($[171]));this._body.setBackgroundImage(b)},setSelectionForeground:function(a){this._selectionForeground=a;this._mapItems(function(b){b.updateForeground()})},setSelectionBackground:function(a){this._selectionBackground=a;this._mapItems(function(b){b.updateBackground()});if(a!=null&&!this.hasState($[140])){this._frame.setBorder(null);this._frameBorder.dispose();this._frameBorder=new rwt.html.Border(2,$[70],a);this._frame.setBorder(this._frameBorder)}else{this._frame.resetBorder()}},setSelectionBackgroundImage:function(a){this._selectionBackgroundImage=a;this._mapItems(function(b){b.updateBackgroundImage()})},setSelectionBackgroundGradient:function(a){this._selectionBackgroundGradient=a;this._mapItems(function(b){b.updateBackgroundGradient()})},setUnselectedCloseVisible:function(a){this._unselectedCloseVisible=a;this._mapItems(function(b){b.updateCloseButton()})},setBorderVisible:function(a){if(a){this.addState($[112])}else{this.removeState($[112])}this._updateLayout()},getSelectionForeground:function(){return this._selectionForeground},getSelectionBackground:function(){return this._selectionBackground},getSelectionBackgroundImage:function(){return this._selectionBackgroundImage},getSelectionBackgroundGradient:function(){return this._selectionBackgroundGradient},getUnselectedCloseVisible:function(){return this._unselectedCloseVisible},_mapItems:function(c){var b=this.getChildren();for(var a=0;a<b.length;a++){if(b[a].classname===$[260]){c(b[a])}}},_getButtonTop:function(){return(this._tabHeight/2)-(rwt.widgets.CTabFolder.BUTTON_SIZE/2)},setChevronBounds:function(d,c,b,a){this._chevronBounds=[d,c,b,a];if(this._chevron!=null){this._chevron.setSpace(d,b,c,a)}},showChevron:function(){if(this._chevron==null){this._chevron=new rwt.widgets.base.Button();this._chevron.setAppearance("ctabfolder-drop-down-button");this._chevron.setShow("icon");this._chevron.addEventListener($[107],this._onChevronExecute,this);var a=rwt.remote.WidgetManager.getInstance();a.setToolTip(this._chevron,rwt.widgets.CTabFolder.CHEVRON_TOOLTIP);this.add(this._chevron)}this._chevron.setLeft(this._chevronBounds[0]);this._chevron.setTop(this._chevronBounds[1]);this._chevron.setWidth(this._chevronBounds[2]);this._chevron.setHeight(this._chevronBounds[3])},hideChevron:function(){if(this._chevron!=null){var a=rwt.remote.WidgetManager.getInstance();a.setToolTip(this._chevron,null);this._chevron.removeEventListener($[107],this._onChevronExecute,this);this.remove(this._chevron);this._chevron.dispose();this._chevron=null}},setMinMaxState:function(d){this._minMaxState=d;var f="";var a="";var g="";var b="";var e=rwt.remote.Server.RESOURCE_PATH+"widget/rap/ctabfolder/";switch(d){case"min":f=e+$[540];a=e+$[468];g=rwt.widgets.CTabFolder.RESTORE_TOOLTIP;b=rwt.widgets.CTabFolder.MAX_TOOLTIP;break;case"max":f=e+$[438];a=e+$[540];g=rwt.widgets.CTabFolder.MIN_TOOLTIP;b=rwt.widgets.CTabFolder.RESTORE_TOOLTIP;break;case $[52]:f=e+$[438];a=e+$[468];g=rwt.widgets.CTabFolder.MIN_TOOLTIP;b=rwt.widgets.CTabFolder.MAX_TOOLTIP;break}var c=rwt.remote.WidgetManager.getInstance();if(this._minButton!=null){this._minButton.setIcon(f);c.setToolTip(this._minButton,g)}if(this._maxButton!=null){this._maxButton.setIcon(a);c.setToolTip(this._maxButton,b)}},setMaxButtonBounds:function(d,c,b,a){this._maxButtonBounds=[d,c,b,a];if(this._maxButton!=null){this._maxButton.setSpace(d,b,c,a)}},showMaxButton:function(){if(this._maxButton==null){this._maxButton=new rwt.widgets.base.Button();this._maxButton.setAppearance($[390]);this._maxButton.setShow("icon");this.setMinMaxState(this._minMaxState);this._maxButton.addEventListener($[1],this._onMinMaxExecute,this);this.add(this._maxButton)}this._maxButton.setLeft(this._maxButtonBounds[0]);this._maxButton.setTop(this._maxButtonBounds[1]);this._maxButton.setWidth(this._maxButtonBounds[2]);this._maxButton.setHeight(this._maxButtonBounds[3])},hideMaxButton:function(){if(this._maxButton!=null){this._maxButton.removeEventListener($[1],this._onMinMaxExecute,this);var a=rwt.remote.WidgetManager.getInstance();a.setToolTip(this._maxButton,null);this.remove(this._maxButton);this._maxButton.dispose();this._maxButton=null}},setMinButtonBounds:function(d,c,b,a){this._minButtonBounds=[d,c,b,a];if(this._minButton!=null){this._minButton.setSpace(d,b,c,a)}},showMinButton:function(){if(this._minButton==null){this._minButton=new rwt.widgets.base.Button();this._minButton.setAppearance($[390]);this._minButton.setShow("icon");this.setMinMaxState(this._minMaxState);this._minButton.addEventListener($[1],this._onMinMaxExecute,this);this.add(this._minButton)}this._minButton.setLeft(this._minButtonBounds[0]);this._minButton.setTop(this._minButtonBounds[1]);this._minButton.setWidth(this._minButtonBounds[2]);this._minButton.setHeight(this._minButtonBounds[3])},hideMinButton:function(b){if(this._minButton!=null){this._minButton.removeEventListener($[1],this._onMinMaxExecute,this);var a=rwt.remote.WidgetManager.getInstance();a.setToolTip(this._minButton,null);this.remove(this._minButton);this._minButton.dispose();this._minButton=null}},setHasFolderListener:function(a){this._hasFolderListener=a},setHasSelectionListener:function(a){this._hasSelectionListener=a},setHasDefaultSelectionListener:function(a){this._hasDefaultSelectionListener=a},deselectAll:function(){this._mapItems(function(a){a.setSelected(false)})},_updateLayout:function(){var c=this.hasState($[112])?1:0;var a=this.hasState($[140])?0:2;var b=1;var e=this.getWidth()-c*2;var d=this._tabHeight+1;this._body.setLeft(0);this._body.setTop(0);this._body.setWidth(this.getWidth());this._body.setHeight(this.getHeight());this._separator.setLeft(c);this._separator.setWidth(e);this._separator.setHeight(10);this._frame.setLeft(c);this._frame.setWidth(e);this._frame.setHeight(this.getHeight()-c-b-d);if(this._tabPosition=="top"){this._separator.setTop(d);this._frame.setTop(d+1)}else{this._separator.setTop(this.getHeight()-d-1);this._frame.setTop(c)}},_onChevronExecute:function(a){if(this._chevronMenu==null||!this._chevronMenu.isSeeable()){if(!rwt.remote.EventUtil.getSuspended()){var b=rwt.remote.Server.getInstance();b.getRemoteObject(this).notify("Folder",{detail:"showList"})}}},_onMinMaxExecute:function(a){if(!rwt.remote.EventUtil.getSuspended()){var b;if(a.getTarget()==this._minButton){if(this._minMaxState=="min"){this.setMinMaxState($[52]);b="restore"}else{this.setMinMaxState("min");b="minimize"}}else{if(this._minMaxState==$[52]||this._minMaxState=="min"){this.setMinMaxState("max");b="maximize"}else{this.setMinMaxState($[52]);b="restore"}}var d=rwt.remote.WidgetManager.getInstance().findIdByWidget(this);var c=rwt.remote.Server.getInstance();c.addParameter(d+".minimized",this._minMaxState=="min");c.addParameter(d+".maximized",this._minMaxState=="max");if(this._hasFolderListener){c.getRemoteObject(this).notify("Folder",{detail:b})}}},_onKeyPress:function(a){switch(a.getKeyIdentifier()){case"Left":a.stopPropagation();break;case $[35]:a.stopPropagation();break}},_onContextMenu:function(a){var b=this.getContextMenu();if(b!=null){b.setLocation(a.getPageX(),a.getPageY());b.setOpener(this);b.show();a.stopPropagation()}},_notifyItemClick:function(b){if(!rwt.remote.EventUtil.getSuspended()){if(!b.isSelected()){this.deselectAll();b.setSelected(true);var e=rwt.remote.WidgetManager.getInstance();var a=rwt.remote.Server.getInstance();var d=e.findIdByWidget(this);var c=e.findIdByWidget(b);a.addParameter(d+$[170],c);rwt.remote.EventUtil.notifySelected(this)}}},_notifyItemDblClick:function(a){if(!rwt.remote.EventUtil.getSuspended()){if(this._hasDefaultSelectionListener){var c=a.getTarget();var f=rwt.remote.WidgetManager.getInstance();var b=rwt.remote.Server.getInstance();var e=f.findIdByWidget(this);var d=f.findIdByWidget(c);b.addParameter(e+$[170],d);rwt.remote.EventUtil.widgetDefaultSelected(a,this)}}}}}); |
| rwt.remote.HandlerRegistry.add($[350],{factory:function(b){var a=new rwt.widgets.CTabFolder();rwt.remote.HandlerUtil.addStatesForStyles(a,b.style);a.setUserData($[23],true);rwt.widgets.CTabFolder.setToolTipTexts.apply(a,b.toolTipTexts);rwt.remote.HandlerUtil.setParent(a,b.parent);return a},destructor:rwt.remote.HandlerUtil.getControlDestructor(),getDestroyableChildren:rwt.remote.HandlerUtil.getDestroyableChildrenFinder(),properties:rwt.remote.HandlerUtil.extendControlProperties(["tabPosition","tabHeight","minMaxState","minimizeBounds","minimizeVisible","maximizeBounds","maximizeVisible","chevronBounds","chevronVisible","unselectedCloseVisible",$[60],"selectionBackground","selectionForeground","selectionBackgroundImage","selectionBackgroundGradient","borderVisible"]),propertyHandler:rwt.remote.HandlerUtil.extendControlPropertyHandler({minimizeBounds:function(b,a){b.setMinButtonBounds.apply(b,a)},minimizeVisible:function(b,a){if(a){b.showMinButton()}else{b.hideMinButton()}},maximizeBounds:function(b,a){b.setMaxButtonBounds.apply(b,a)},maximizeVisible:function(b,a){if(a){b.showMaxButton()}else{b.hideMaxButton()}},chevronBounds:function(b,a){b.setChevronBounds.apply(b,a)},chevronVisible:function(b,a){if(a){b.showChevron()}else{b.hideChevron()}},selection:function(b,a){b.deselectAll();rwt.remote.HandlerUtil.callWithTarget(a,function(c){if(c!=null){c.setSelected(true)}})},selectionBackground:function(b,a){if(a===null){b.setSelectionBackground(null)}else{b.setSelectionBackground(rwt.util.Colors.rgbToRgbString(a))}},selectionForeground:function(b,a){if(a===null){b.setSelectionForeground(null)}else{b.setSelectionForeground(rwt.util.Colors.rgbToRgbString(a))}},selectionBackgroundGradient:function(f,e){var g=null;if(e){var b=e[0];var a=e[1];var c=e[2];g=[];for(var d=0;d<b.length;d++){g[d]=[a[d]/100,rwt.util.Colors.rgbToRgbString(b[d])]}g.horizontal=!c}f.setSelectionBackgroundGradient(g)}}),listeners:rwt.remote.HandlerUtil.extendControlListeners(["Folder",$[30],$[111]]),listenerHandler:rwt.remote.HandlerUtil.extendControlListenerHandler({})}); |
| (function(){var a=rwt.remote.Server.getInstance();rwt.remote.RemoteObject=function(b){this._={id:b,listen:{}}};rwt.remote.RemoteObject.prototype={set:function(b,c){a.getMessageWriter().appendSet(this._.id,b,c)},notify:function(c,b){var e=arguments[2];var d=b?b:{};if(this.isListening(c)){a.getMessageWriter().appendNotify(this._.id,c,d);if(e!==true){a.send()}}},call:function(d,b){var c=b?b:{};a.getMessageWriter().appendCall(this._.id,d,c);a.send()},isListening:function(b){return this._.listen[b]===true}}}()); |
| (function(){var a=rwt.remote.ObjectRegistry;rwt.remote.RemoteObjectFactory={_db:{},getRemoteObject:function(b){var c=a.getId(b);if(c==null){throw new Error("Invalid target for ServerObject, or target not in ObjectManager")}return this._getRemoteObject(c)},remove:function(b){delete this._db[b]},_getRemoteObject:function(b){if(this._db[b]==null){this._db[b]=new rwt.remote.RemoteObject(b);this._initRemoteObject(b)}return this._db[b]},_initRemoteObject:function(f){var e=this._db[f];var d=a.getEntry(f).handler;if(d&&d.listeners){for(var b=0;b<d.listeners.length;b++){var c=d.listeners[b];e._.listen[c]=true}}}}}()); |
| rwt.qx.Class.define("rwt.remote.KeyEventSupport",{type:$[39],extend:rwt.qx.Object,construct:function(){arguments.callee.base.call(this);rwt.event.EventHandler.setKeyDomEventFilter(this._onKeyDomEvent,this);rwt.event.EventHandler.setKeyEventFilter(this._onKeyEvent,this);this._keyBindings={};this._cancelKeys={};this._currentKeyCode=-1;this._bufferedEvents=[];this._keyEventRequestRunning=false;this._ignoreNextKeypress=false;var a=rwt.remote.Server.getInstance();a.addEventListener($[312],this._onRequestReceived,this)},destruct:function(){var a=rwt.remote.Server.getInstance();a.removeEventListener($[312],this._onRequestReceived,this)},members:{setKeyBindings:function(a){this._keyBindings=a},setCancelKeys:function(a){this._cancelKeys=a},_onKeyDomEvent:function(b,e,a,c){if(b===$[10]){this._currentKeyCode=e}var d=this._getTargetControl();if(this._shouldCancel(this._currentKeyCode,a,c,d)){rwt.event.EventHandlerUtil.stopDomEvent(c);c._noProcess=true}},_onKeyEvent:function(b,e,a,c){var d=this._getTargetControl();if(this._shouldSend(b,this._currentKeyCode,a,c,d)){this._sendKeyEvent(d,this._currentKeyCode,a,c)}if(b===$[4]||b===$[34]){this._ignoreNextKeypress=false}return !c._noProcess},_shouldSend:function(c,f,b,d,e){var a=false;if(this._isRelevant(f,c,d)){a=this._shouldSendTraverse(f,b,d,e)||this._shouldSendKeyDown(f,b,d,e)}return a},_shouldSendTraverse:function(d,a,b,c){return this._hasTraverseListener(c)&&this._isTraverseKey(d)},_shouldSendKeyDown:function(e,b,c,d){var a=false;if(this._hasKeyListener(d)){var f=d.getUserData($[269]);if(f){a=this._isActive(f,c,e,b)}else{a=true}}if(!a){a=this._isActive(this._keyBindings,c,e,b)}return a},_isRelevant:function(e,c,d){var a;if(c===$[4]){a=!this._isModifier(e)&&!this._ignoreNextKeypress}else{if(c===$[10]){var b=rwt.event.EventHandlerUtil;a=b.isNonPrintableKeyCode(e)||b.isSpecialKeyCode(e);if(!a&&(d.altKey||d.ctrlKey)){a=this._isAlphaNumeric(e)}if(a){this._ignoreNextKeypress=true}}}if(d.ctrlKey&&e===9){a=false}return a},_onRequestReceived:function(a){if(this._keyEventRequestRunning){this._keyEventRequestRunning=false;this._checkBufferedEvents()}},_checkBufferedEvents:function(){while(this._bufferedEvents.length>0&&!this._keyEventRequestRunning){var a=this._bufferedEvents.shift();this._sendKeyEvent.apply(this,a)}},_sendKeyEvent:function(c,d,a,b){if(this._keyEventRequestRunning){this._bufferedEvents.push([c,d,a,b])}else{this._attachKeyEvent(c,d,a,b);this._keyEventRequestRunning=true;this._sendRequestAsync()}},_sendRequestAsync:function(){window.setTimeout(function(){rwt.remote.Server.getInstance().sendImmediate(true)},0)},_attachKeyEvent:function(e,h,a,d){var g=rwt.remote.Server.getInstance();var c;if(e===null){c=g.getRemoteObject(rwt.widgets.Display.getCurrent())}else{c=g.getRemoteObject(e)}var f=this._getCharCode(h,a,d);var b={keyCode:h,charCode:f};rwt.remote.EventUtil.addModifierToProperties(b,d);if(this._shouldSendTraverse(h,a,d,e)){c.notify("Traverse",b,true)}if(this._shouldSendKeyDown(h,a,d,e)){c.notify("KeyDown",b,true)}},_shouldCancel:function(f,c,d,e){var a=this._isActive(this._cancelKeys,d,f,c);if(!a){var b=e?e.getUserData($[241]):null;if(b){a=this._isActive(b,d,f,c)}}return a},_getTargetControl:function(){var a=rwt.event.EventHandler.getCaptureWidget();if(!a){var b=rwt.event.EventHandler.getFocusRoot();a=b===null?null:b.getActiveChild()}var c=rwt.remote.WidgetManager.getInstance();while(a!==null&&!c.isControl(a)){a=a.getParent?a.getParent():null}return a},_isActive:function(f,d,e,b){var a=false;var c=this._getKeyBindingIdentifier(d,$[10],e,b);a=f[c]===true;if(!a){c=this._getKeyBindingIdentifier(d,$[4],e,b);a=f[c]===true}return a},_getKeyBindingIdentifier:function(d,c,e,b){var a=[];if(c===$[10]&&!isNaN(e)&&e>0){if(d.altKey){a.push("ALT")}if(d.ctrlKey){a.push("CTRL")}if(d.shiftKey){a.push("SHIFT")}a.push("#"+e.toString())}else{if(c===$[4]&&!isNaN(b)&&b>0){a.push(String.fromCharCode(b))}}return a.join("+")},_getCharCode:function(d,b,c){var a=b;if(a===0&&this._isAlphaNumeric(d)){if(c.shiftKey&&!this._isNumeric(d)){a=d}else{a=String.fromCharCode(d).toLowerCase().charCodeAt(0)}}return a},_isModifier:function(a){return a>=16&&a<=20&&a!==19},_isAlphaNumeric:function(a){return(a>=65&&a<=90)||this._isNumeric(a)},_isNumeric:function(a){return a>=48&&a<=57},_hasKeyListener:function(a){return a!==null&&a.getUserData($[465])===true},_hasTraverseListener:function(a){return a!==null&&a.getUserData($[485])===true},_isTraverseKey:function(b){var a=false;if(b===27||b===13||b===9){a=true}return a}}});rwt.remote.KeyEventSupport.getInstance(); |
| namespace($[268]);rwt.client.JavaScriptExecutor=function(){if(rwt.client.JavaScriptExecutor._instance!==undefined){throw new Error("JavaScriptExecutor can not be created twice")}else{rwt.client.JavaScriptExecutor._instance=this}};rwt.client.JavaScriptExecutor.getInstance=function(){if(rwt.client.JavaScriptExecutor._instance===undefined){new rwt.client.JavaScriptExecutor()}return rwt.client.JavaScriptExecutor._instance};rwt.client.JavaScriptExecutor.prototype={execute:function(code){eval(code)}}; |
| rwt.remote.HandlerRegistry.add("rwt.client.ConnectionMessages",{factory:function(a){return rwt.remote.Server.getInstance()},service:true,properties:["waitHintTimeout"],propertyHandler:{waitHintTimeout:function(b,a){b.getWaitHintTimer().setInterval(a)}}}); |
| rwt.remote.HandlerRegistry.add("rwt.client.JavaScriptExecutor",{factory:function(a){return rwt.client.JavaScriptExecutor.getInstance()},service:true,destructor:rwt.util.Functions.returnTrue,methods:[$[107]],methodHandler:{execute:function(b,a){b.execute(a.content)}}}); |
| namespace($[268]);rwt.client.UrlLauncher=function(){if(rwt.client.UrlLauncher._instance!==undefined){throw new Error("UrlLauncher can not be created twice")}else{rwt.client.UrlLauncher._instance=this}this._window=window;var a=document.createElement($[233]);a.style.visibility=$[9];a.style.position=$[16];a.style.left=$[265];a.style.top=$[265];a.src=rwt.remote.Server.RESOURCE_PATH+$[347];document.body.appendChild(a);this._iframe=a};rwt.client.UrlLauncher.getInstance=function(){if(rwt.client.UrlLauncher._instance===undefined){new rwt.client.UrlLauncher()}return rwt.client.UrlLauncher._instance};rwt.client.UrlLauncher.prototype={openURL:function(a){var c=this.getProtocol(a);try{if(["http:","https:","ftp:","ftps:"].indexOf(c)!==-1){this._window.open(a,"_blank")}else{this._iframe.src=a}}catch(b){}},getProtocol:function(a){var b=a.indexOf(":")!==-1?a.split(":")[0]+":":location.protocol;return b.toLowerCase()}}; |
| rwt.remote.HandlerRegistry.add("rwt.client.UrlLauncher",{factory:function(a){return rwt.client.UrlLauncher.getInstance()},service:true,methods:["openURL"],methodHandler:{openURL:function(b,a){b.openURL(a.url)}}}); |
| namespace($[268]);rwt.client.JavaScriptLoader={load:function(b){for(var a=0;a<b.files.length;a++){this._loadFile(b.files[a])}},_loadFile:function(a){var b=new rwt.remote.Request(a,"GET",$[416]);b.setAsynchronous(false);b.setSuccessHandler(this._onLoad,this);b.send()},_onLoad:function(a){var b=document.createElement("script");b.type=$[416];b.text=a.responseText;document.getElementsByTagName("head")[0].appendChild(b)}}; |
| rwt.remote.HandlerRegistry.add("rwt.client.JavaScriptLoader",{factory:function(a){return rwt.client.JavaScriptLoader},service:true,methods:["load"]}); |
| rwt.qx.Class.define("rwt.runtime.System",{type:$[39],extend:rwt.qx.Target,construct:function(){if(this.isSupported()){arguments.callee.base.call(this);this._startupTime=new Date().getTime();this._onloadWrapped=rwt.util.Functions.bind(this._onload,this);this._onbeforeunloadWrapped=rwt.util.Functions.bind(this._onbeforeunload,this);this._onunloadWrapped=rwt.util.Functions.bind(this._onunload,this);rwt.html.EventRegistration.addEventListener(window,"load",this._onloadWrapped);rwt.html.EventRegistration.addEventListener(window,$[275],this._onbeforeunloadWrapped);rwt.html.EventRegistration.addEventListener(window,"unload",this._onunloadWrapped);this._applyPatches();rwt.graphics.GraphicsUtil.init();var a=rwt.event.EventHandler;a.setAllowContextMenu(rwt.widgets.Menu.getAllowContextMenu);a.setMenuManager(rwt.widgets.util.MenuManager.getInstance())}},events:{beforeunload:$[384],unload:$[11],uiready:$[11]},members:{_autoDispose:false,_onloadDone:false,_uiReady:false,setUiReady:function(a){this._uiReady=a;if(a){this.createDispatchEvent("uiready")}},getUiReady:function(){return this._uiReady},isSupported:function(){return this._isBrowserSupported()&&this._isModeSupported()&&this._isXHRSupported()},_applyPatches:function(){if(!rwt.client.Client.supportsCss3()){rwt.qx.Class.patch(rwt.widgets.base.Parent,rwt.widgets.util.GraphicsMixin);rwt.qx.Class.patch(rwt.widgets.base.BasicText,rwt.widgets.util.GraphicsMixin);rwt.qx.Class.patch(rwt.widgets.base.GridRow,rwt.widgets.util.GraphicsMixin);rwt.qx.Class.patch(rwt.widgets.base.MultiCellWidget,rwt.widgets.util.GraphicsMixin)}else{rwt.qx.Class.patch(rwt.widgets.ProgressBar,rwt.widgets.util.GraphicsMixin)}rwt.qx.Class.patch(rwt.event.DomEvent,rwt.event.DomEventPatch)},getStartupTime:function(){return this._startupTime},_onload:function(a){if(!this._onloadDone){this._onloadDone=true;rwt.widgets.base.ClientDocument.getInstance();rwt.runtime.MobileWebkitSupport.init();rwt.client.Timer.once(this._preload,this,0)}},_preload:function(){var a=rwt.html.ImageManager.getInstance().getVisibleImages();this.__preloader=new rwt.html.ImagePreloaderSystem(a,this._preloaderDone,this);this.__preloader.start()},_preloaderDone:function(){this.__preloader.dispose();this.__preloader=null;rwt.event.EventHandler.init();rwt.event.EventHandler.attachEvents();this.setUiReady(true);rwt.widgets.base.Widget.flushGlobalQueues();rwt.client.Timer.once(this._postload,this,100)},_postload:function(){var a=rwt.html.ImageManager.getInstance().getHiddenImages();this.__postloader=new rwt.html.ImagePreloaderSystem(a,this._postloaderDone,this);this.__postloader.start()},_postloaderDone:function(){this.__postloader.dispose();this.__postloader=null},_onbeforeunload:function(b){var a=new rwt.event.DomEvent($[275],b,window,this);this.dispatchEvent(a,false);var c=a.getUserData($[386]);a.dispose();return c!==null?c:undefined},_onunload:function(a){this.createDispatchEvent("unload");rwt.event.EventHandler.detachEvents();rwt.event.EventHandler.cleanUp();rwt.qx.Object.dispose(true)},_isBrowserSupported:function(){var a=true;var c=rwt.client.Client.getEngine();var b=rwt.client.Client.getMajor();if(c===$[110]&&b<7){a=false}return a},_isModeSupported:function(){var a=true;var b=rwt.client.Client.getEngine();if(b===$[212]&&document.documentMode<9){a=false}return a},_isXHRSupported:function(){return typeof window.XMLHttpRequest!==$[8]}},destruct:function(){rwt.html.EventRegistration.removeEventListener(window,"load",this._onloadWrapped);rwt.html.EventRegistration.removeEventListener(window,$[275],this._onbeforeunloadWrapped);rwt.html.EventRegistration.removeEventListener(window,"unload",this._onunloadWrapped)},defer:function(c,b,a){c.getInstance()}}); |
| rwt.remote.HandlerRegistry.add($[402],{factory:function(a){return rwt.client.Client},service:true}); |
| (function(){rap={registerTypeHandler:function(f,e){e.isPublic=true;rwt.remote.HandlerRegistry.add(f,e)},getObject:function(g){var f=rwt.remote.ObjectRegistry.getEntry(g);var e;if(f&&f.handler.isPublic){e=f.object}else{e=a(f.object)}return e},getRemoteObject:function(e){return rwt.remote.Server.getInstance().getRemoteObject(e)},on:function(f,e){if(this._.events[f]){if(this._.events[f].indexOf(e)===-1){this._.events[f].push(e)}}else{throw new Error("Unkown type "+f)}},off:function(g,f){if(this._.events[g]){var e=this._.events[g].indexOf(f);rwt.util.Arrays.removeAt(this._.events[g],e)}},_:{events:{render:[],send:[]},notify:function(f){var g=this.events[f];for(var e=0;e<g.length;e++){g[e]()}}}};var c={};function a(g){var e=null;if(g instanceof Object){var f=rwt.qx.Object.toHashCode(g);if(c[f]==null){if(g instanceof rwt.widgets.Composite){c[f]=new d(g)}else{c[f]={}}}e=c[f]}return e}function b(f){var e;if(f==="Resize"){e=$[368]}else{throw new Error("Unkown event type "+f)}return e}function d(f){var e=null;if(!f.isCreated()){e=[];f.addEventListener($[65],function(){for(var g=0;g<e.length;g++){f._getTargetNode().appendChild(e[g])}f.removeEventListener($[65],arguments.callee);e=null})}this.append=function(g){if(e){e.push(g)}else{f._getTargetNode().appendChild(g)}};this.getClientArea=function(){return f.getClientArea()};this.addListener=function(g,h){f.addEventListener(b(g),h,window)};this.removeListener=function(g,h){f.removeEventListener(b(g),h,window)}}}()); |
| })(["qx.client","mousedown","Boolean","mouseover","keypress","mouseup","mouseout","string","undefined","hidden","keydown","rwt.event.Event","pressed","click","right","image","absolute","height","Integer","shadow","object","scroll","selected","isControl","center","width","qx.debug","interval","mousemove","abandoned","Selection","vertical","bottom","highlight","keyup","Right","appear","horizontal","variant_","singleton","PageUp","function","contextmenu","mousewheel","middle","PageDown","String","computed=this.","dblclick","Enter","rwt.event.DataEvent","backgroundColor","normal","opacity","Number","this.","number","change","overflow","content","selection","color","default","active","=value;","create","style","label","focus","maximized","solid","changeWidth","dragstart","borderLeftWidth","borderTopWidth","focused","changeHeight","input","Space","search","transparent","backgroundImage","expanded","rwt.event.MouseEvent","cancel","rounded","customVariant","bounds","minHeight","scrollY","minWidth","background","parent_unfocused","maxHeight","maxWidth","filter","scrollX","<br/>","overflowY","frame","visibility","changeFont","overflowX","protocolParent","alias","Escape","\" in class \"","execute","check","webkit","mshtml","DefaultSelection","rwt_BORDER","toolTip","locationY","gradient","radio","if(this.","changeValue","textarea","focusout","gecko","other","position","dragover","unstyle","backgroundGradient","padding","reset","rwt.widgets.base.Widget","close","locationX","border","cursor","error","boolean","roundrect","delete this.","fixed","datetime-field","rwt_FLAT","insertDom","marginLeft","focusin","return this.","lightshadow","update","\",value);","rwt.event.DragEvent","paddingTop","pointer","scrollHeight","static","barTop","refresh","maxLength","translucent","!==undefined)","marginTop","Expand","paddingLeft","Could not evaluate computed style: ","stateOverChanged","display","complex","inherit","n-resize","Collapse","changeBackgroundColor","changeVisibility",".selection","backgroundImageSize","grayed","e-resize","paddingBottom","rwt_BAR","Display","fillType","checked","changeEnabled","no-repeat","changeParent","toolTipText","calendar-button","fontSize","rwt.remote","calendar-day","Object","paddingRight","rwt.event.FocusEvent","top-reversed","center-reversed","left-reversed","Attention! The value \"","shadowLayouted","marginBottom","dispose","else if(this.","\" is an invalid value for the property \"","!active","android","textAlign","toggle","outline","scrollbar-thumb","Invalid key \"","nw-resize","ne-resize","background-color","userScroll","windowblur","rwt_MULTI","newmshtml","dragdrop","CSS1Compat","marginRight","destroy","rwt_SEPARATOR","remove","shorthand","middle-reversed","chrome","stroke","MozOpacity","elementOver","rwt_VERTICAL","backgroundLayouted","minimized","safari","borderRightWidth","collapsed","datetime-separator","darkshadow","iframe","linesvisible","borderBottomWidth","borderRadii","Activate","_applyIndicatorFill","changeFocusedChild","completed","cancelKeys","progress","enabled","!==undefined){","_applyClip","dragmove","textDecoration","changeSelection","destroyableChildren","lastChild","\" in mixin \"","_applyResizable","backgroundRepeat","mouseevent","rwt.event.DragAndDropHandler","backgroundPosition","keyevent","treeColumn","checkBox","rwt.widgets.CTabItem","application/json","dragend","old=this.","dragout","-1000px","minimum","maximum","rwt.client","activeKeys","border-box","borderWidths","rwt.widgets.base.ToolTip","rwt.widgets.MenuItem","rwt.event.KeyEvent","beforeunload","domKeyevent","windowresize","changeLeft","(empty)","changeFocused","visible","pointerEvents","Control","selectionChanged","rwt.widgets.Button","s-resize","_manager","rwt.widgets.util.PopupManager","expandIcon","changeDate","otherMonth","rwt.widgets.base.Button","borderLeftStyle","changeLeadItem","textLimit","DOMMouseScroll","changeTextColor","stroke-width","readonly","separator","lineHeight","rwt.widgets.TabItem","skipFlexible","The configuration key \"","rwt.widgets.TabFolder","crosshair","borderBottomStyle","rwt.client.BrowserNavigation","dragenter","\"! The type of the key must be \"","increment","received","w-resize","SystemMessage-DisplayOverlay","pageIncrement","-moz-scrollbars-none","Variant \"","rwt-resources/themes/images/","borderTopStyle","hoverOut","Backspace","foreground","changeElement","not-allowed","_applyWrap","changeBackgroundGradient","dragEnter","borderColor","sw-resize","HORIZONTAL","cellCheckBox","boxShadow","updateRows","Conflict between mixin \"","Invalid type of key \"","Navigation","changeHtml","rwt_NO_RADIO_GROUP","col-resize","showResizeLine","_applyOpacity","rwt.widgets.Text","\" of property \"","_applyTextAlign","underline","\" is not allowed!","static/html/blank.html","_applyBackgroundGradient","changeChecked","rwt.widgets.CTabFolder","',sizingMethod='crop')","borderMaxWidth","typeof value === \"number\" && isFinite(value)","rwt.widgets.ExpandBar","tabIndex","dnd_selected","check-box","se-resize","disappear","cancelAnimations","roundedBorder","alignment","borderRightStyle","_applyIcon","Alpha(opacity=","progid:DXImageTransform.Microsoft.AlphaImageLoader(src='","_applyManager","clientAreaChanged","org.eclipse.swt.dnd.","rwt.widgets.Label","\" in member \"","scale-thumb","rwt.widgets.List","separatorBorder","rwt.widgets.Spinner","\" which must be an instance of \"","rwt.widgets.ToolItem","rwt.widgets.base.BasicText","if(old===computed)return value;","slider-thumb","flyInBottom","removeChild","rwt_HORIZONTAL","rwt.event.DomEvent","rwt.widgets.Browser","returnValue","rwt.html.Style","rwt.widgets.Shell","changeSource","ctabfolder-button","delete window.","MouseEvents","rwt.widgets.base.Parent","hideResizeLine","rwt.html.ImagePreloader","createContent","if(old===undefined)old=null;","datetime-button-up","rwt.widgets.CoolItem","Could not parse color: ","Unable to destroy function: ","rwt.client.ClientInfo","\" failed with exception ","rwt.event.ChangeEvent","minimumChanged","rwt.widgets.ExternalBrowser","color-stop(","' in mixin '","showDragFeedback","changeSpacing",") but parent layout ","rwt.widgets.ToolBar","rwt.widgets.GC","_applySelectionIndicator","strokeStyle","text/javascript","left bottom","flyOutRight","_applyOrientation","headerHeight","quadraticCurveTo","rwt.widgets.util.IframeManager","datetime-button-down","draggesture","MozUserSelect","bezierCurveTo","topItemIndex","rwt.widgets.ToolTip","value !== null","center center",";background-repeat:no-repeat;' ></div>","\" but is typeof \"","qx.client.NativeWindow","maximumChanged","rwt.widgets.Menu","_focusedTextField","' of class '","minimize.gif","rwt.widgets.ControlDecorator","\" must be defined!","Content-Type","KhtmlUserSelect","-moz-scrollbars-horizontal","qx.compatibility","Untranslated computed property value: ","static/image/blank.gif","rwt.widgets.util.RadioManager","unselectable","checkDisposedItems","activeControl","focusControl","changeActiveChild","rwt.widgets.ExpandItem","postApplyDimensions failed ","pixelBottom","if(computed===undefined)computed=null;","rwt.widgets.ScrolledComposite",".$$properties.","rwt.widgets.Combo","rwt.widgets.GridItem","cellChecked","rwt.widgets.Slider"," does not support it","ignoreFlexible","keyListener","rwt.widgets.Separator","_applyVisibility","maximize.gif",". Only pixel values work well across different clients.","rwt.widgets.ProgressBar","MouseDoubleClick","resizeStart","_applyHeight","rwt_INDETERMINATE","nextSelected","bottomRight","Includes of mixins must be mixins. The include number '","rwt.widgets.FileUpload","_childrenQueue","deactivateListener","pixelHeight","Iframe source could not be set! This may be related to AdBlock Plus Firefox Extension.","rwt.widgets.Link","rwt.qx.Object","traverseListener","rwt.util.Range","numericRound","rwt.widgets.Scale","minThumbSize","flyOutBottom","linear-gradient( ","changeActive","var prop=rwt.qx.Property;",":border-box;","if(value===undefined)prop.error(this,2,\"","rwt.widgets.util.WindowManager","_applyAnimation","activateListener"," modified: Failed to dispatch change event: ",":content-box;","bottom-reversed","_applyVerticalChildrenAlign","_applySource"," is not inside this parent.","rwt.widgets.base.Window","sash-handle","linearGradient","calendar-week","subMenuChanged","rwt.widgets.Grid","rwt.widgets.CoolBar","_applySpacing","rwt.theme.ThemeStore","_applyHorizontalChildrenAlign","Cascaded styles are not supported in this browser!","rwt.widgets.util.FocusHandler","hoverFristItem","client-document-blocker","-moz-scrollbars-vertical","Could not convert system colors to RGB: ","WebkitUserSelect","hideDragFeedback","_applySeparatorBorder","multipart/form-data","_invalidate","_applyBackgroundColor","background-image:url(","right-reversed","rwt.widgets.base.TabFolderPage","rwt.widgets.util","rwt.widgets.GridColumn","rwt.widgets.Sash","_applyEnabled","\"! The value is undefined/null!","\" which must be typeof \"","text-decoration:","dragFinished","hasComputed","Failed to check property ","restore.gif","mozBoxSizing","coolitem-handle","rwt.widgets.Group","scrolledComposite","\"! The value needs to be a map!","itemsChanged","rwt.widgets.Composite","stdDeviation","push-button","qx.ui.embed.Flash"]); |