|
Lines 768-774
Link Here
|
| 768 |
}if(config.members){this.__addMembers(clazz, |
768 |
}if(config.members){this.__addMembers(clazz, |
| 769 |
config.members, |
769 |
config.members, |
| 770 |
true, |
770 |
true, |
| 771 |
true); |
771 |
true, |
|
|
772 |
false); |
| 772 |
}if(config.events){this.__addEvents(clazz, |
773 |
}if(config.events){this.__addEvents(clazz, |
| 773 |
config.events, |
774 |
config.events, |
| 774 |
true); |
775 |
true); |
|
Lines 1111-1117
Link Here
|
| 1111 |
__addMembers:function(clazz, |
1112 |
__addMembers:function(clazz, |
| 1112 |
members, |
1113 |
members, |
| 1113 |
patch, |
1114 |
patch, |
| 1114 |
base){var proto=clazz.prototype; |
1115 |
base, |
|
|
1116 |
wrap){var proto=clazz.prototype; |
| 1115 |
var key, |
1117 |
var key, |
| 1116 |
member; |
1118 |
member; |
| 1117 |
for(var i=0, |
1119 |
for(var i=0, |
|
Lines 1122-1135
Link Here
|
| 1122 |
} |
1124 |
} |
| 1123 |
if(patch!==true&&proto[key]!==undefined){throw new Error('Overwriting member "'+key+'" of Class "'+clazz.classname+'" is not allowed!'); |
1125 |
if(patch!==true&&proto[key]!==undefined){throw new Error('Overwriting member "'+key+'" of Class "'+clazz.classname+'" is not allowed!'); |
| 1124 |
}}; |
1126 |
}}; |
| 1125 |
if(base!==false&&member instanceof Function){if(proto[key]){member.base=proto[key]; |
1127 |
if(base!==false&&member instanceof Function){if(wrap==true){member=this.__mixinMemberWrapper(member, |
|
|
1128 |
proto[key]); |
| 1129 |
}else{if(proto[key]){member.base=proto[key]; |
| 1126 |
}member.self=clazz; |
1130 |
}member.self=clazz; |
|
|
1131 |
} |
| 1127 |
if(qx.core.Variant.isSet("qx.aspects", |
1132 |
if(qx.core.Variant.isSet("qx.aspects", |
| 1128 |
"on")){member=qx.core.Aspect.wrap(clazz.classname+"."+key, |
1133 |
"on")){member=qx.core.Aspect.wrap(clazz.classname+"."+key, |
| 1129 |
member, |
1134 |
member, |
| 1130 |
"member"); |
1135 |
"member"); |
| 1131 |
}}proto[key]=member; |
1136 |
}}proto[key]=member; |
| 1132 |
}}, |
1137 |
}}, |
|
|
1138 |
__mixinMemberWrapper:function(member, |
| 1139 |
base){if(base){return function(){var oldBase=member.base; |
| 1140 |
member.base=base; |
| 1141 |
var retval=member.apply(this, |
| 1142 |
arguments); |
| 1143 |
member.base=oldBase; |
| 1144 |
return retval; |
| 1145 |
}; |
| 1146 |
}else{return member; |
| 1147 |
}}, |
| 1133 |
__addInterface:function(clazz, |
1148 |
__addInterface:function(clazz, |
| 1134 |
iface){{if(!clazz||!iface){throw new Error("Incomplete parameters!"); |
1149 |
iface){{if(!clazz||!iface){throw new Error("Incomplete parameters!"); |
| 1135 |
}if(this.hasOwnInterface(clazz, |
1150 |
}if(this.hasOwnInterface(clazz, |
|
Lines 1166-1172
Link Here
|
| 1166 |
}if(entry.$$members){this.__addMembers(clazz, |
1181 |
}if(entry.$$members){this.__addMembers(clazz, |
| 1167 |
entry.$$members, |
1182 |
entry.$$members, |
| 1168 |
patch, |
1183 |
patch, |
| 1169 |
false); |
1184 |
patch, |
|
|
1185 |
patch); |
| 1170 |
}}if(clazz.$$includes){clazz.$$includes.push(mixin); |
1186 |
}}if(clazz.$$includes){clazz.$$includes.push(mixin); |
| 1171 |
clazz.$$flatIncludes.push.apply(clazz.$$flatIncludes, |
1187 |
clazz.$$flatIncludes.push.apply(clazz.$$flatIncludes, |
| 1172 |
list); |
1188 |
list); |
|
Lines 4441-4446
Link Here
|
| 4441 |
|
4457 |
|
| 4442 |
|
4458 |
|
| 4443 |
|
4459 |
|
|
|
4460 |
/* ID: qx.application.Basic */ |
| 4461 |
qx.Class.define("qx.application.Basic", |
| 4462 |
{extend:qx.core.Target, |
| 4463 |
implement:qx.application.IApplication, |
| 4464 |
members:{main:function(){}, |
| 4465 |
close:function(){}, |
| 4466 |
terminate:function(){}}}); |
| 4467 |
|
| 4468 |
|
| 4469 |
|
| 4470 |
|
| 4471 |
/* ID: qx.core.Package */ |
| 4472 |
qx.Class.define("qx.core.Package", |
| 4473 |
{statics:{loadPart:function(name, |
| 4474 |
callback, |
| 4475 |
self){window.qxloader.loadPart(name, |
| 4476 |
callback, |
| 4477 |
self); |
| 4478 |
}, |
| 4479 |
loadScript:function(url, |
| 4480 |
callback, |
| 4481 |
self){window.qxloader.loadScript(url, |
| 4482 |
callback, |
| 4483 |
self); |
| 4484 |
}}}); |
| 4485 |
|
| 4486 |
|
| 4487 |
|
| 4488 |
|
| 4444 |
/* ID: qx.locale.Locale */ |
4489 |
/* ID: qx.locale.Locale */ |
| 4445 |
qx.Class.define("qx.locale.Locale", |
4490 |
qx.Class.define("qx.locale.Locale", |
| 4446 |
{statics:{define:function(name, |
4491 |
{statics:{define:function(name, |
|
Lines 4683-6817
Link Here
|
| 4683 |
|
4728 |
|
| 4684 |
|
4729 |
|
| 4685 |
|
4730 |
|
| 4686 |
/* ID: qx.core.Package */ |
4731 |
/* ID: qx.application.Gui */ |
| 4687 |
qx.Class.define("qx.core.Package", |
4732 |
qx.Class.define("qx.application.Gui", |
| 4688 |
{statics:{loadPart:function(name, |
|
|
| 4689 |
callback, |
| 4690 |
self){window.qxloader.loadPart(name, |
| 4691 |
callback, |
| 4692 |
self); |
| 4693 |
}, |
| 4694 |
loadScript:function(url, |
| 4695 |
callback, |
| 4696 |
self){window.qxloader.loadScript(url, |
| 4697 |
callback, |
| 4698 |
self); |
| 4699 |
}}}); |
| 4700 |
|
| 4701 |
|
| 4702 |
|
| 4703 |
|
| 4704 |
/* ID: qx.application.Basic */ |
| 4705 |
qx.Class.define("qx.application.Basic", |
| 4706 |
{extend:qx.core.Target, |
4733 |
{extend:qx.core.Target, |
| 4707 |
implement:qx.application.IApplication, |
4734 |
implement:qx.application.IApplication, |
| 4708 |
members:{main:function(){}, |
4735 |
properties:{uiReady:{check:"Boolean", |
|
|
4736 |
init:false}}, |
| 4737 |
members:{main:function(){qx.ui.core.Widget.initScrollbarWidth(); |
| 4738 |
qx.theme.manager.Meta.getInstance().initialize(); |
| 4739 |
qx.event.handler.EventHandler.getInstance(); |
| 4740 |
qx.ui.core.ClientDocument.getInstance(); |
| 4741 |
qx.client.Timer.once(this._preload, |
| 4742 |
this, |
| 4743 |
0); |
| 4744 |
}, |
| 4709 |
close:function(){}, |
4745 |
close:function(){}, |
| 4710 |
terminate:function(){}}}); |
4746 |
terminate:function(){}, |
|
|
4747 |
_preload:function(){this.debug("preloading visible images..."); |
| 4748 |
this.__preloader=new qx.io.image.PreloaderSystem(qx.io.image.Manager.getInstance().getVisibleImages(), |
| 4749 |
this._preloaderDone, |
| 4750 |
this); |
| 4751 |
this.__preloader.start(); |
| 4752 |
}, |
| 4753 |
_preloaderDone:function(){this.setUiReady(true); |
| 4754 |
this.__preloader.dispose(); |
| 4755 |
this.__preloader=null; |
| 4756 |
var start=(new Date).valueOf(); |
| 4757 |
qx.ui.core.Widget.flushGlobalQueues(); |
| 4758 |
this.info("render runtime: "+(new Date-start)+"ms"); |
| 4759 |
qx.event.handler.EventHandler.getInstance().attachEvents(); |
| 4760 |
qx.client.Timer.once(this._postload, |
| 4761 |
this, |
| 4762 |
100); |
| 4763 |
}, |
| 4764 |
_postload:function(){this.debug("preloading hidden images..."); |
| 4765 |
this.__postloader=new qx.io.image.PreloaderSystem(qx.io.image.Manager.getInstance().getHiddenImages(), |
| 4766 |
this._postloaderDone, |
| 4767 |
this); |
| 4768 |
this.__postloader.start(); |
| 4769 |
}, |
| 4770 |
_postloaderDone:function(){this.__postloader.dispose(); |
| 4771 |
this.__postloader=null; |
| 4772 |
}}}); |
| 4711 |
|
4773 |
|
| 4712 |
|
4774 |
|
| 4713 |
|
4775 |
|
| 4714 |
|
4776 |
|
| 4715 |
/* ID: qx.html.StyleSheet */ |
4777 |
/* ID: qx.ui.core.Widget */ |
| 4716 |
qx.Class.define("qx.html.StyleSheet", |
4778 |
qx.Class.define("qx.ui.core.Widget", |
| 4717 |
{statics:{includeFile:function(vHref){var el=document.createElement("link"); |
4779 |
{extend:qx.core.Target, |
| 4718 |
el.type="text/css"; |
4780 |
type:"abstract", |
| 4719 |
el.rel="stylesheet"; |
4781 |
construct:function(){this.base(arguments); |
| 4720 |
el.href=vHref; |
4782 |
this._layoutChanges={}; |
| 4721 |
var head=document.getElementsByTagName("head")[0]; |
4783 |
if(qx.core.Setting.get("qx.widgetDebugId")){this._generateHtmlId(); |
| 4722 |
head.appendChild(el); |
4784 |
}}, |
| 4723 |
}, |
4785 |
events:{"beforeAppear":"qx.event.type.Event", |
| 4724 |
createElement:qx.lang.Object.select(document.createStyleSheet?"ie4+":"other", |
4786 |
"appear":"qx.event.type.Event", |
| 4725 |
{"ie4+":function(vCssText){var vSheet=document.createStyleSheet(); |
4787 |
"beforeDisappear":"qx.event.type.Event", |
| 4726 |
if(vCssText){vSheet.cssText=vCssText; |
4788 |
"disappear":"qx.event.type.Event", |
| 4727 |
}return vSheet; |
4789 |
"beforeInsertDom":"qx.event.type.Event", |
| 4728 |
}, |
4790 |
"insertDom":"qx.event.type.Event", |
| 4729 |
"other":function(vCssText){var vElement=document.createElement("style"); |
4791 |
"beforeRemoveDom":"qx.event.type.Event", |
| 4730 |
vElement.type="text/css"; |
4792 |
"removeDom":"qx.event.type.Event", |
| 4731 |
vElement.appendChild(document.createTextNode(vCssText||"body {}")); |
4793 |
"create":"qx.event.type.Event", |
| 4732 |
document.getElementsByTagName("head")[0].appendChild(vElement); |
4794 |
"execute":"qx.event.type.Event", |
| 4733 |
if(vElement.sheet){return vElement.sheet; |
4795 |
"mouseover":"qx.event.type.MouseEvent", |
| 4734 |
}else{var styles=document.styleSheets; |
4796 |
"mousemove":"qx.event.type.MouseEvent", |
| 4735 |
for(var i=styles.length-1;i>=0;i--){if(styles[i].ownerNode==vElement){return styles[i]; |
4797 |
"mouseout":"qx.event.type.MouseEvent", |
| 4736 |
}}}throw "Error: Could not get a reference to the sheet object"; |
4798 |
"mousedown":"qx.event.type.MouseEvent", |
| 4737 |
}}), |
4799 |
"mouseup":"qx.event.type.MouseEvent", |
| 4738 |
addRule:qx.lang.Object.select(document.createStyleSheet?"ie4+":"other", |
4800 |
"mousewheel":"qx.event.type.MouseEvent", |
| 4739 |
{"ie4+":function(vSheet, |
4801 |
"click":"qx.event.type.MouseEvent", |
| 4740 |
vSelector, |
4802 |
"dblclick":"qx.event.type.MouseEvent", |
| 4741 |
vStyle){vSheet.addRule(vSelector, |
4803 |
"contextmenu":"qx.event.type.MouseEvent", |
| 4742 |
vStyle); |
4804 |
"keydown":"qx.event.type.KeyEvent", |
|
|
4805 |
"keypress":"qx.event.type.KeyEvent", |
| 4806 |
"keyinput":"qx.event.type.KeyEvent", |
| 4807 |
"keyup":"qx.event.type.KeyEvent", |
| 4808 |
"focusout":"qx.event.type.FocusEvent", |
| 4809 |
"focusin":"qx.event.type.FocusEvent", |
| 4810 |
"blur":"qx.event.type.FocusEvent", |
| 4811 |
"focus":"qx.event.type.FocusEvent", |
| 4812 |
"dragdrop":"qx.event.type.DragEvent", |
| 4813 |
"dragout":"qx.event.type.DragEvent", |
| 4814 |
"dragover":"qx.event.type.DragEvent", |
| 4815 |
"dragmove":"qx.event.type.DragEvent", |
| 4816 |
"dragstart":"qx.event.type.DragEvent", |
| 4817 |
"dragend":"qx.event.type.DragEvent"}, |
| 4818 |
statics:{create:function(clazz, |
| 4819 |
appearance){clazz._appearance=appearance; |
| 4820 |
return new clazz; |
| 4743 |
}, |
4821 |
}, |
| 4744 |
"other":qx.lang.Object.select(qx.core.Client.getInstance().isSafari2()?"safari2":"other", |
4822 |
SCROLLBAR_SIZE:null, |
| 4745 |
{"safari2+":function(vSheet, |
4823 |
_autoFlushTimeout:null, |
| 4746 |
vSelector, |
4824 |
_initAutoFlush:function(){if(qx.ui.core.Widget._autoFlushTimeout==null){qx.ui.core.Widget._autoFlushTimeout=window.setTimeout(qx.ui.core.Widget._autoFlushHelper, |
| 4747 |
vStyle){if(!vSheet._qxRules){vSheet._qxRules={}; |
4825 |
0); |
|
|
4826 |
}}, |
| 4827 |
_removeAutoFlush:function(){if(qx.ui.core.Widget._autoFlushTimeout!=null){window.clearTimeout(qx.ui.core.Widget._autoFlushTimeout); |
| 4828 |
qx.ui.core.Widget._autoFlushTimeout=null; |
| 4829 |
}}, |
| 4830 |
_autoFlushHelper:function(){qx.ui.core.Widget._autoFlushTimeout=null; |
| 4831 |
if(!qx.core.Object.inGlobalDispose()){qx.ui.core.Widget.flushGlobalQueues(); |
| 4832 |
}}, |
| 4833 |
flushGlobalQueues:function(){if(qx.ui.core.Widget._autoFlushTimeout!=null){qx.ui.core.Widget._removeAutoFlush(); |
| 4748 |
} |
4834 |
} |
| 4749 |
if(!vSheet._qxRules[vSelector]){var ruleNode=document.createTextNode(vSelector+"{"+vStyle+"}"); |
4835 |
if(qx.ui.core.Widget._inFlushGlobalQueues){return; |
| 4750 |
vSheet.ownerNode.appendChild(ruleNode); |
4836 |
}var app=qx.core.Init.getInstance().getApplication(); |
| 4751 |
vSheet._qxRules[vSelector]=ruleNode; |
4837 |
if(app.getUiReady&&!app.getUiReady()){return; |
|
|
4838 |
}qx.ui.core.Widget._inFlushGlobalQueues=true; |
| 4839 |
qx.ui.core.Widget.flushGlobalWidgetQueue(); |
| 4840 |
qx.ui.core.Widget.flushGlobalStateQueue(); |
| 4841 |
qx.ui.core.Widget.flushGlobalElementQueue(); |
| 4842 |
qx.ui.core.Widget.flushGlobalJobQueue(); |
| 4843 |
qx.ui.core.Widget.flushGlobalLayoutQueue(); |
| 4844 |
qx.ui.core.Widget.flushGlobalDisplayQueue(); |
| 4845 |
delete qx.ui.core.Widget._inFlushGlobalQueues; |
| 4846 |
}, |
| 4847 |
_globalWidgetQueue:[], |
| 4848 |
addToGlobalWidgetQueue:function(vWidget){if(!vWidget._isInGlobalWidgetQueue&&vWidget._isDisplayable){if(qx.ui.core.Widget._autoFlushTimeout==null){qx.ui.core.Widget._initAutoFlush(); |
| 4849 |
}qx.ui.core.Widget._globalWidgetQueue.push(vWidget); |
| 4850 |
vWidget._isInGlobalWidgetQueue=true; |
| 4752 |
}}, |
4851 |
}}, |
| 4753 |
"other":function(vSheet, |
4852 |
removeFromGlobalWidgetQueue:function(vWidget){if(vWidget._isInGlobalWidgetQueue){qx.lang.Array.remove(qx.ui.core.Widget._globalWidgetQueue, |
| 4754 |
vSelector, |
4853 |
vWidget); |
| 4755 |
vStyle){vSheet.insertRule(vSelector+"{"+vStyle+"}", |
4854 |
delete vWidget._isInGlobalWidgetQueue; |
| 4756 |
vSheet.cssRules.length); |
|
|
| 4757 |
}})}), |
| 4758 |
removeRule:qx.lang.Object.select(document.createStyleSheet?"ie4+":"other", |
| 4759 |
{"ie4+":function(vSheet, |
| 4760 |
vSelector){var vRules=vSheet.rules; |
| 4761 |
var vLength=vRules.length; |
| 4762 |
for(var i=vLength-1;i>=0;i--){if(vRules[i].selectorText==vSelector){vSheet.removeRule(i); |
| 4763 |
}}}, |
| 4764 |
"other":qx.lang.Object.select(qx.core.Client.getInstance().isSafari2()?"safari2":"other", |
| 4765 |
{"safari2+":function(vSheet, |
| 4766 |
vSelector){var warn=function(){qx.log.Logger.ROOT_LOGGER.warn("In Safari/Webkit you can only remove rules that are created using qx.html.StyleSheet.addRule"); |
| 4767 |
}; |
| 4768 |
if(!vSheet._qxRules){warn(); |
| 4769 |
}var ruleNode=vSheet._qxRules[vSelector]; |
| 4770 |
if(ruleNode){vSheet.ownerNode.removeChild(ruleNode); |
| 4771 |
vSheet._qxRules[vSelector]=null; |
| 4772 |
}else{warn(); |
| 4773 |
}}, |
4855 |
}}, |
| 4774 |
"other":function(vSheet, |
4856 |
flushGlobalWidgetQueue:function(){var vQueue=qx.ui.core.Widget._globalWidgetQueue, |
| 4775 |
vSelector){var vRules=vSheet.cssRules; |
4857 |
vLength, |
| 4776 |
var vLength=vRules.length; |
4858 |
vWidget; |
| 4777 |
for(var i=vLength-1;i>=0;i--){if(vRules[i].selectorText==vSelector){vSheet.deleteRule(i); |
4859 |
while((vLength=vQueue.length)>0){for(var i=0;i<vLength;i++){vWidget=vQueue[i]; |
| 4778 |
}}}})}), |
4860 |
vWidget.flushWidgetQueue(); |
| 4779 |
removeAllRules:qx.lang.Object.select(document.createStyleSheet?"ie4+":"other", |
4861 |
delete vWidget._isInGlobalWidgetQueue; |
| 4780 |
{"ie4+":function(vSheet){var vRules=vSheet.rules; |
4862 |
}vQueue.splice(0, |
| 4781 |
var vLength=vRules.length; |
4863 |
vLength); |
| 4782 |
for(var i=vLength-1;i>=0;i--){vSheet.removeRule(i); |
|
|
| 4783 |
}}, |
4864 |
}}, |
| 4784 |
"other":qx.lang.Object.select(qx.core.Client.getInstance().isSafari2()?"safari2":"other", |
4865 |
_globalElementQueue:[], |
| 4785 |
{"safari2+":function(vSheet){var node=vSheet.ownerNode; |
4866 |
addToGlobalElementQueue:function(vWidget){if(!vWidget._isInGlobalElementQueue&&vWidget._isDisplayable){if(qx.ui.core.Widget._autoFlushTimeout==null){qx.ui.core.Widget._initAutoFlush(); |
| 4786 |
var rules=node.childNodes; |
4867 |
}qx.ui.core.Widget._globalElementQueue.push(vWidget); |
| 4787 |
while(rules.length>0){node.removeChild(rules[0]); |
4868 |
vWidget._isInGlobalElementQueue=true; |
| 4788 |
}}, |
4869 |
}}, |
| 4789 |
"other":function(vSheet){var vRules=vSheet.cssRules; |
4870 |
removeFromGlobalElementQueue:function(vWidget){if(vWidget._isInGlobalElementQueue){qx.lang.Array.remove(qx.ui.core.Widget._globalElementQueue, |
| 4790 |
var vLength=vRules.length; |
4871 |
vWidget); |
| 4791 |
for(var i=vLength-1;i>=0;i--){vSheet.deleteRule(i); |
4872 |
delete vWidget._isInGlobalElementQueue; |
| 4792 |
}}})}), |
|
|
| 4793 |
addImport:qx.lang.Object.select(document.createStyleSheet?"ie4+":"other", |
| 4794 |
{"ie4+":function(vSheet, |
| 4795 |
vUrl){vSheet.addImport(vUrl); |
| 4796 |
}, |
| 4797 |
"other":qx.lang.Object.select(qx.core.Client.getInstance().isSafari2()?"safari2":"other", |
| 4798 |
{"safari2+":function(vSheet, |
| 4799 |
vUrl){vSheet.ownerNode.appendChild(document.createTextNode('@import "'+vUrl+'";')); |
| 4800 |
}, |
| 4801 |
"other":function(vSheet, |
| 4802 |
vUrl){vSheet.insertRule('@import "'+vUrl+'";', |
| 4803 |
vSheet.cssRules.length); |
| 4804 |
}})}), |
| 4805 |
removeImport:qx.lang.Object.select(document.createStyleSheet?"ie4+":"other", |
| 4806 |
{"ie4+":function(vSheet, |
| 4807 |
vUrl){var vImports=vSheet.imports; |
| 4808 |
var vLength=vImports.length; |
| 4809 |
for(var i=vLength-1;i>=0;i--){if(vImports[i].href==vUrl){vSheet.removeImport(i); |
| 4810 |
}}}, |
| 4811 |
"other":function(vSheet, |
| 4812 |
vUrl){var vRules=vSheet.cssRules; |
| 4813 |
var vLength=vRules.length; |
| 4814 |
for(var i=vLength-1;i>=0;i--){if(vRules[i].href==vUrl){vSheet.deleteRule(i); |
| 4815 |
}}}}), |
| 4816 |
removeAllImports:qx.lang.Object.select(document.createStyleSheet?"ie4+":"other", |
| 4817 |
{"ie4+":function(vSheet){var vImports=vSheet.imports; |
| 4818 |
var vLength=vImports.length; |
| 4819 |
for(var i=vLength-1;i>=0;i--){vSheet.removeImport(i); |
| 4820 |
}}, |
4873 |
}}, |
| 4821 |
"other":function(vSheet){var vRules=vSheet.cssRules; |
4874 |
flushGlobalElementQueue:function(){var vQueue=qx.ui.core.Widget._globalElementQueue, |
| 4822 |
var vLength=vRules.length; |
4875 |
vLength, |
| 4823 |
for(var i=vLength-1;i>=0;i--){if(vRules[i].type==vRules[i].IMPORT_RULE){vSheet.deleteRule(i); |
4876 |
vWidget; |
| 4824 |
}}}})}}); |
4877 |
while((vLength=vQueue.length)>0){for(var i=0;i<vLength;i++){vWidget=vQueue[i]; |
| 4825 |
|
4878 |
vWidget._createElementImpl(); |
| 4826 |
|
4879 |
delete vWidget._isInGlobalElementQueue; |
| 4827 |
|
4880 |
}vQueue.splice(0, |
| 4828 |
|
4881 |
vLength); |
| 4829 |
/* ID: qx.html.Scroll */ |
|
|
| 4830 |
qx.Class.define("qx.html.Scroll", |
| 4831 |
{statics:{getLeftSum:function(el){var sum=0; |
| 4832 |
var p=el.parentNode; |
| 4833 |
while(p.nodeType==1){sum+=p.scrollLeft; |
| 4834 |
p=p.parentNode; |
| 4835 |
}return sum; |
| 4836 |
}, |
| 4837 |
getTopSum:function(el){var sum=0; |
| 4838 |
var p=el.parentNode; |
| 4839 |
while(p.nodeType==1){sum+=p.scrollTop; |
| 4840 |
p=p.parentNode; |
| 4841 |
}return sum; |
| 4842 |
}}}); |
| 4843 |
|
| 4844 |
|
| 4845 |
|
| 4846 |
|
| 4847 |
/* ID: qx.html.ScrollIntoView */ |
| 4848 |
qx.Class.define("qx.html.ScrollIntoView", |
| 4849 |
{statics:{scrollX:function(vElement, |
| 4850 |
vAlignLeft){var vParentWidth, |
| 4851 |
vParentScrollLeft, |
| 4852 |
vWidth, |
| 4853 |
vHasScroll; |
| 4854 |
var vParent=vElement.parentNode; |
| 4855 |
var vOffset=vElement.offsetLeft; |
| 4856 |
var vWidth=vElement.offsetWidth; |
| 4857 |
while(vParent){switch(qx.html.Style.getStyleProperty(vParent, |
| 4858 |
"overflow")){case "scroll":case "auto":case "-moz-scrollbars-horizontal":vHasScroll=true; |
| 4859 |
break; |
| 4860 |
default:switch(qx.html.Style.getStyleProperty(vParent, |
| 4861 |
"overflowX")){case "scroll":case "auto":vHasScroll=true; |
| 4862 |
break; |
| 4863 |
default:vHasScroll=false; |
| 4864 |
}} |
| 4865 |
if(vHasScroll){vParentWidth=vParent.clientWidth; |
| 4866 |
vParentScrollLeft=vParent.scrollLeft; |
| 4867 |
if(vAlignLeft){vParent.scrollLeft=vOffset; |
| 4868 |
}else if(vAlignLeft==false){vParent.scrollLeft=vOffset+vWidth-vParentWidth; |
| 4869 |
}else if(vWidth>vParentWidth||vOffset<vParentScrollLeft){vParent.scrollLeft=vOffset; |
| 4870 |
}else if((vOffset+vWidth)>(vParentScrollLeft+vParentWidth)){vParent.scrollLeft=vOffset+vWidth-vParentWidth; |
| 4871 |
}vOffset=vParent.offsetLeft; |
| 4872 |
vWidth=vParent.offsetWidth; |
| 4873 |
}else{vOffset+=vParent.offsetLeft; |
| 4874 |
} |
| 4875 |
if(vParent.tagName.toLowerCase()=="body"){break; |
| 4876 |
}vParent=vParent.offsetParent; |
| 4877 |
}return true; |
| 4878 |
}, |
| 4879 |
scrollY:function(vElement, |
| 4880 |
vAlignTop){var vParentHeight, |
| 4881 |
vParentScrollTop, |
| 4882 |
vHeight, |
| 4883 |
vHasScroll; |
| 4884 |
var vParent=vElement.parentNode; |
| 4885 |
var vOffset=vElement.offsetTop; |
| 4886 |
var vHeight=vElement.offsetHeight; |
| 4887 |
while(vParent){switch(qx.html.Style.getStyleProperty(vParent, |
| 4888 |
"overflow")){case "scroll":case "auto":case "-moz-scrollbars-vertical":vHasScroll=true; |
| 4889 |
break; |
| 4890 |
default:switch(qx.html.Style.getStyleProperty(vParent, |
| 4891 |
"overflowY")){case "scroll":case "auto":vHasScroll=true; |
| 4892 |
break; |
| 4893 |
default:vHasScroll=false; |
| 4894 |
}} |
| 4895 |
if(vHasScroll){vParentHeight=vParent.clientHeight; |
| 4896 |
vParentScrollTop=vParent.scrollTop; |
| 4897 |
if(vAlignTop){vParent.scrollTop=vOffset; |
| 4898 |
}else if(vAlignTop==false){vParent.scrollTop=vOffset+vHeight-vParentHeight; |
| 4899 |
}else if(vHeight>vParentHeight||vOffset<vParentScrollTop){vParent.scrollTop=vOffset; |
| 4900 |
}else if((vOffset+vHeight)>(vParentScrollTop+vParentHeight)){vParent.scrollTop=vOffset+vHeight-vParentHeight; |
| 4901 |
}vOffset=vParent.offsetTop; |
| 4902 |
vHeight=vParent.offsetHeight; |
| 4903 |
}else{vOffset+=vParent.offsetTop; |
| 4904 |
} |
| 4905 |
if(vParent.tagName.toLowerCase()=="body"){break; |
| 4906 |
}vParent=vParent.offsetParent; |
| 4907 |
}return true; |
| 4908 |
}}}); |
| 4909 |
|
| 4910 |
|
| 4911 |
|
| 4912 |
|
| 4913 |
/* ID: qx.html.Style */ |
| 4914 |
qx.Class.define("qx.html.Style", |
| 4915 |
{statics:{getStylePropertySure:qx.lang.Object.select((document.defaultView&&document.defaultView.getComputedStyle)?"hasComputed":"noComputed", |
| 4916 |
{"hasComputed":function(el, |
| 4917 |
prop){return !el?null:el.ownerDocument?el.ownerDocument.defaultView.getComputedStyle(el, |
| 4918 |
"")[prop]:el.style[prop]; |
| 4919 |
}, |
| 4920 |
"noComputed":qx.core.Variant.select("qx.client", |
| 4921 |
{"mshtml":function(el, |
| 4922 |
prop){try{if(!el){return null; |
| 4923 |
} |
| 4924 |
if(el.parentNode&&el.currentStyle){return el.currentStyle[prop]; |
| 4925 |
}else{var v1=el.runtimeStyle[prop]; |
| 4926 |
if(v1!=null&&typeof v1!="undefined"&&v1!=""){return v1; |
| 4927 |
}return el.style[prop]; |
| 4928 |
}}catch(ex){throw new Error("Could not evaluate computed style: "+el+"["+prop+"]: "+ex); |
| 4929 |
}}, |
4882 |
}}, |
| 4930 |
"default":function(el, |
4883 |
_globalStateQueue:[], |
| 4931 |
prop){return !el?null:el.style[prop]; |
4884 |
addToGlobalStateQueue:function(vWidget){if(!vWidget._isInGlobalStateQueue&&vWidget._isDisplayable){if(qx.ui.core.Widget._autoFlushTimeout==null){qx.ui.core.Widget._initAutoFlush(); |
| 4932 |
}})}), |
4885 |
}qx.ui.core.Widget._globalStateQueue.push(vWidget); |
| 4933 |
getStyleProperty:qx.lang.Object.select((document.defaultView&&document.defaultView.getComputedStyle)?"hasComputed":"noComputed", |
4886 |
vWidget._isInGlobalStateQueue=true; |
| 4934 |
{"hasComputed":function(el, |
|
|
| 4935 |
prop){try{return el.ownerDocument.defaultView.getComputedStyle(el, |
| 4936 |
"")[prop]; |
| 4937 |
}catch(ex){throw new Error("Could not evaluate computed style: "+el+"["+prop+"]: "+ex); |
| 4938 |
}}, |
4887 |
}}, |
| 4939 |
"noComputed":qx.core.Variant.select("qx.client", |
4888 |
removeFromGlobalStateQueue:function(vWidget){if(vWidget._isInGlobalStateQueue){qx.lang.Array.remove(qx.ui.core.Widget._globalStateQueue, |
| 4940 |
{"mshtml":function(el, |
4889 |
vWidget); |
| 4941 |
prop){try{return el.currentStyle[prop]; |
4890 |
delete vWidget._isInGlobalStateQueue; |
| 4942 |
}catch(ex){throw new Error("Could not evaluate computed style: "+el+"["+prop+"]: "+ex); |
|
|
| 4943 |
}}, |
4891 |
}}, |
| 4944 |
"default":function(el, |
4892 |
flushGlobalStateQueue:function(){var vQueue=qx.ui.core.Widget._globalStateQueue, |
| 4945 |
prop){try{return el.style[prop]; |
4893 |
vLength, |
| 4946 |
}catch(ex){throw new Error("Could not evaluate computed style: "+el+"["+prop+"]"); |
4894 |
vWidget; |
| 4947 |
}}})}), |
4895 |
while((vLength=vQueue.length)>0){for(var i=0;i<vLength;i++){vWidget=vQueue[i]; |
| 4948 |
getStyleSize:function(vElement, |
4896 |
vWidget._renderAppearance(); |
| 4949 |
propertyName){return parseInt(qx.html.Style.getStyleProperty(vElement, |
4897 |
delete vWidget._isInGlobalStateQueue; |
| 4950 |
propertyName))||0; |
4898 |
}vQueue.splice(0, |
| 4951 |
}, |
4899 |
vLength); |
| 4952 |
getMarginLeft:function(vElement){return qx.html.Style.getStyleSize(vElement, |
4900 |
}}, |
| 4953 |
"marginLeft"); |
4901 |
_globalJobQueue:[], |
| 4954 |
}, |
4902 |
addToGlobalJobQueue:function(vWidget){if(!vWidget._isInGlobalJobQueue&&vWidget._isDisplayable){if(qx.ui.core.Widget._autoFlushTimeout==null){qx.ui.core.Widget._initAutoFlush(); |
| 4955 |
getMarginTop:function(vElement){return qx.html.Style.getStyleSize(vElement, |
4903 |
}qx.ui.core.Widget._globalJobQueue.push(vWidget); |
| 4956 |
"marginTop"); |
4904 |
vWidget._isInGlobalJobQueue=true; |
| 4957 |
}, |
4905 |
}}, |
| 4958 |
getMarginRight:function(vElement){return qx.html.Style.getStyleSize(vElement, |
4906 |
removeFromGlobalJobQueue:function(vWidget){if(vWidget._isInGlobalJobQueue){qx.lang.Array.remove(qx.ui.core.Widget._globalJobQueue, |
| 4959 |
"marginRight"); |
4907 |
vWidget); |
| 4960 |
}, |
4908 |
delete vWidget._isInGlobalJobQueue; |
| 4961 |
getMarginBottom:function(vElement){return qx.html.Style.getStyleSize(vElement, |
4909 |
}}, |
| 4962 |
"marginBottom"); |
4910 |
flushGlobalJobQueue:function(){var vQueue=qx.ui.core.Widget._globalJobQueue, |
| 4963 |
}, |
4911 |
vLength, |
| 4964 |
getPaddingLeft:function(vElement){return qx.html.Style.getStyleSize(vElement, |
4912 |
vWidget; |
| 4965 |
"paddingLeft"); |
4913 |
while((vLength=vQueue.length)>0){for(var i=0;i<vLength;i++){vWidget=vQueue[i]; |
| 4966 |
}, |
4914 |
vWidget._flushJobQueue(vWidget._jobQueue); |
| 4967 |
getPaddingTop:function(vElement){return qx.html.Style.getStyleSize(vElement, |
4915 |
delete vWidget._isInGlobalJobQueue; |
| 4968 |
"paddingTop"); |
4916 |
}vQueue.splice(0, |
| 4969 |
}, |
4917 |
vLength); |
| 4970 |
getPaddingRight:function(vElement){return qx.html.Style.getStyleSize(vElement, |
4918 |
}}, |
| 4971 |
"paddingRight"); |
4919 |
_globalLayoutQueue:[], |
| 4972 |
}, |
4920 |
addToGlobalLayoutQueue:function(vParent){if(!vParent._isInGlobalLayoutQueue&&vParent._isDisplayable){if(qx.ui.core.Widget._autoFlushTimeout==null){qx.ui.core.Widget._initAutoFlush(); |
| 4973 |
getPaddingBottom:function(vElement){return qx.html.Style.getStyleSize(vElement, |
4921 |
}qx.ui.core.Widget._globalLayoutQueue.push(vParent); |
| 4974 |
"paddingBottom"); |
4922 |
vParent._isInGlobalLayoutQueue=true; |
| 4975 |
}, |
4923 |
}}, |
| 4976 |
getBorderLeft:function(vElement){return qx.html.Style.getStyleProperty(vElement, |
4924 |
removeFromGlobalLayoutQueue:function(vParent){if(vParent._isInGlobalLayoutQueue){qx.lang.Array.remove(qx.ui.core.Widget._globalLayoutQueue, |
| 4977 |
"borderLeftStyle")=="none"?0:qx.html.Style.getStyleSize(vElement, |
4925 |
vParent); |
| 4978 |
"borderLeftWidth"); |
4926 |
delete vParent._isInGlobalLayoutQueue; |
| 4979 |
}, |
4927 |
}}, |
| 4980 |
getBorderTop:function(vElement){return qx.html.Style.getStyleProperty(vElement, |
4928 |
flushGlobalLayoutQueue:function(){var vQueue=qx.ui.core.Widget._globalLayoutQueue, |
| 4981 |
"borderTopStyle")=="none"?0:qx.html.Style.getStyleSize(vElement, |
4929 |
vLength, |
| 4982 |
"borderTopWidth"); |
4930 |
vParent; |
| 4983 |
}, |
4931 |
while((vLength=vQueue.length)>0){for(var i=0;i<vLength;i++){vParent=vQueue[i]; |
| 4984 |
getBorderRight:function(vElement){return qx.html.Style.getStyleProperty(vElement, |
4932 |
vParent._flushChildrenQueue(); |
| 4985 |
"borderRightStyle")=="none"?0:qx.html.Style.getStyleSize(vElement, |
4933 |
delete vParent._isInGlobalLayoutQueue; |
| 4986 |
"borderRightWidth"); |
4934 |
}vQueue.splice(0, |
| 4987 |
}, |
4935 |
vLength); |
| 4988 |
getBorderBottom:function(vElement){return qx.html.Style.getStyleProperty(vElement, |
4936 |
}}, |
| 4989 |
"borderBottomStyle")=="none"?0:qx.html.Style.getStyleSize(vElement, |
4937 |
_fastGlobalDisplayQueue:[], |
| 4990 |
"borderBottomWidth"); |
4938 |
_lazyGlobalDisplayQueues:{}, |
| 4991 |
}}}); |
4939 |
addToGlobalDisplayQueue:function(vWidget){if(!vWidget._isInGlobalDisplayQueue&&vWidget._isDisplayable){if(qx.ui.core.Widget._autoFlushTimeout==null){qx.ui.core.Widget._initAutoFlush(); |
| 4992 |
|
4940 |
}var vParent=vWidget.getParent(); |
| 4993 |
|
4941 |
if(vParent.isSeeable()){var vKey=vParent.toHashCode(); |
| 4994 |
|
4942 |
if(qx.ui.core.Widget._lazyGlobalDisplayQueues[vKey]){qx.ui.core.Widget._lazyGlobalDisplayQueues[vKey].push(vWidget); |
| 4995 |
|
4943 |
}else{qx.ui.core.Widget._lazyGlobalDisplayQueues[vKey]=[vWidget]; |
| 4996 |
/* ID: qx.html.Location */ |
4944 |
}}else{qx.ui.core.Widget._fastGlobalDisplayQueue.push(vWidget); |
| 4997 |
qx.Class.define("qx.html.Location", |
4945 |
}vWidget._isInGlobalDisplayQueue=true; |
| 4998 |
{statics:{getPageOuterLeft:function(el){return qx.html.Location.getPageBoxLeft(el)-qx.html.Style.getMarginLeft(el); |
4946 |
}}, |
| 4999 |
}, |
4947 |
removeFromGlobalDisplayQueue:function(vWidget){}, |
| 5000 |
getPageOuterTop:function(el){return qx.html.Location.getPageBoxTop(el)-qx.html.Style.getMarginTop(el); |
4948 |
flushGlobalDisplayQueue:function(){var vKey, |
| 5001 |
}, |
4949 |
vLazyQueue, |
| 5002 |
getPageOuterRight:function(el){return qx.html.Location.getPageBoxRight(el)+qx.html.Style.getMarginRight(el); |
4950 |
vWidget, |
| 5003 |
}, |
4951 |
vFragment; |
| 5004 |
getPageOuterBottom:function(el){return qx.html.Location.getPageBoxBottom(el)+qx.html.Style.getMarginBottom(el); |
4952 |
var vFastQueue=qx.ui.core.Widget._fastGlobalDisplayQueue; |
| 5005 |
}, |
4953 |
var vLazyQueues=qx.ui.core.Widget._lazyGlobalDisplayQueues; |
| 5006 |
getClientOuterLeft:function(el){return qx.html.Location.getClientBoxLeft(el)-qx.html.Style.getMarginLeft(el); |
4954 |
for(var i=0, |
| 5007 |
}, |
4955 |
l=vFastQueue.length;i<l;i++){vWidget=vFastQueue[i]; |
| 5008 |
getClientOuterTop:function(el){return qx.html.Location.getClientBoxTop(el)-qx.html.Style.getMarginTop(el); |
4956 |
vWidget.getParent()._getTargetNode().appendChild(vWidget.getElement()); |
| 5009 |
}, |
4957 |
}if(qx.Class.isDefined("qx.ui.basic.Inline")){for(vKey in vLazyQueues){vLazyQueue=vLazyQueues[vKey]; |
| 5010 |
getClientOuterRight:function(el){return qx.html.Location.getClientBoxRight(el)+qx.html.Style.getMarginRight(el); |
4958 |
for(var i=0;i<vLazyQueue.length;i++){vWidget=vLazyQueue[i]; |
| 5011 |
}, |
4959 |
if(vWidget instanceof qx.ui.basic.Inline){vWidget._beforeInsertDom(); |
| 5012 |
getClientOuterBottom:function(el){return qx.html.Location.getClientBoxBottom(el)+qx.html.Style.getMarginBottom(el); |
4960 |
try{document.getElementById(vWidget.getInlineNodeId()).appendChild(vWidget.getElement()); |
| 5013 |
}, |
4961 |
}catch(ex){vWidget.debug("Could not append to inline id: "+vWidget.getInlineNodeId(), |
| 5014 |
getClientBoxLeft:qx.core.Variant.select("qx.client", |
4962 |
ex); |
| 5015 |
{"mshtml":function(el){return el.getBoundingClientRect().left; |
4963 |
}vWidget._afterInsertDom(); |
| 5016 |
}, |
4964 |
vWidget._afterAppear(); |
| 5017 |
"gecko":function(el){return qx.html.Location.getClientAreaLeft(el)-qx.html.Style.getBorderLeft(el); |
4965 |
qx.lang.Array.remove(vLazyQueue, |
| 5018 |
}, |
4966 |
vWidget); |
| 5019 |
"default":function(el){var sum=el.offsetLeft; |
4967 |
i--; |
| 5020 |
while(el.tagName.toLowerCase()!="body"){el=el.offsetParent; |
4968 |
delete vWidget._isInGlobalDisplayQueue; |
| 5021 |
sum+=el.offsetLeft-el.scrollLeft; |
4969 |
}}}}for(vKey in vLazyQueues){vLazyQueue=vLazyQueues[vKey]; |
| 5022 |
}return sum; |
4970 |
if(document.createDocumentFragment&&vLazyQueue.length>=3){vFragment=document.createDocumentFragment(); |
| 5023 |
}}), |
4971 |
for(var i=0, |
| 5024 |
getClientBoxTop:qx.core.Variant.select("qx.client", |
4972 |
l=vLazyQueue.length;i<l;i++){vWidget=vLazyQueue[i]; |
| 5025 |
{"mshtml":function(el){return el.getBoundingClientRect().top; |
4973 |
vWidget._beforeInsertDom(); |
| 5026 |
}, |
4974 |
vFragment.appendChild(vWidget.getElement()); |
| 5027 |
"gecko":function(el){return qx.html.Location.getClientAreaTop(el)-qx.html.Style.getBorderTop(el); |
4975 |
}vLazyQueue[0].getParent()._getTargetNode().appendChild(vFragment); |
| 5028 |
}, |
4976 |
for(var i=0, |
| 5029 |
"default":function(el){var sum=el.offsetTop; |
4977 |
l=vLazyQueue.length;i<l;i++){vWidget=vLazyQueue[i]; |
| 5030 |
while(el.tagName.toLowerCase()!="body"){el=el.offsetParent; |
4978 |
vWidget._afterInsertDom(); |
| 5031 |
sum+=el.offsetTop-el.scrollTop; |
4979 |
}}else{for(var i=0, |
| 5032 |
}return sum; |
4980 |
l=vLazyQueue.length;i<l;i++){vWidget=vLazyQueue[i]; |
| 5033 |
}}), |
4981 |
vWidget._beforeInsertDom(); |
| 5034 |
getClientBoxRight:qx.core.Variant.select("qx.client", |
4982 |
vWidget.getParent()._getTargetNode().appendChild(vWidget.getElement()); |
| 5035 |
{"mshtml":function(el){return el.getBoundingClientRect().right; |
4983 |
vWidget._afterInsertDom(); |
| 5036 |
}, |
4984 |
}}}for(vKey in vLazyQueues){vLazyQueue=vLazyQueues[vKey]; |
| 5037 |
"default":function(el){return qx.html.Location.getClientBoxLeft(el)+qx.html.Dimension.getBoxWidth(el); |
4985 |
for(var i=0, |
| 5038 |
}}), |
4986 |
l=vLazyQueue.length;i<l;i++){vWidget=vLazyQueue[i]; |
| 5039 |
getClientBoxBottom:qx.core.Variant.select("qx.client", |
4987 |
if(vWidget.getVisibility()){vWidget._afterAppear(); |
| 5040 |
{"mshtml":function(el){return el.getBoundingClientRect().bottom; |
4988 |
}delete vWidget._isInGlobalDisplayQueue; |
| 5041 |
}, |
4989 |
}delete vLazyQueues[vKey]; |
| 5042 |
"default":function(el){return qx.html.Location.getClientBoxTop(el)+qx.html.Dimension.getBoxHeight(el); |
4990 |
}for(var i=0, |
| 5043 |
}}), |
4991 |
l=vFastQueue.length;i<l;i++){delete vFastQueue[i]._isInGlobalDisplayQueue; |
| 5044 |
getPageBoxLeft:qx.core.Variant.select("qx.client", |
4992 |
}qx.lang.Array.removeAll(vFastQueue); |
| 5045 |
{"mshtml":function(el){return qx.html.Location.getClientBoxLeft(el)+qx.html.Scroll.getLeftSum(el); |
|
|
| 5046 |
}, |
| 5047 |
"gecko":function(el){return qx.html.Location.getPageAreaLeft(el)-qx.html.Style.getBorderLeft(el); |
| 5048 |
}, |
| 5049 |
"default":function(el){var sum=el.offsetLeft; |
| 5050 |
while(el.tagName.toLowerCase()!="body"){el=el.offsetParent; |
| 5051 |
sum+=el.offsetLeft; |
| 5052 |
}return sum; |
| 5053 |
}}), |
| 5054 |
getPageBoxTop:qx.core.Variant.select("qx.client", |
| 5055 |
{"mshtml":function(el){return qx.html.Location.getClientBoxTop(el)+qx.html.Scroll.getTopSum(el); |
| 5056 |
}, |
| 5057 |
"gecko":function(el){return qx.html.Location.getPageAreaTop(el)-qx.html.Style.getBorderTop(el); |
| 5058 |
}, |
| 5059 |
"default":function(el){var sum=el.offsetTop; |
| 5060 |
while(el.tagName.toLowerCase()!="body"){el=el.offsetParent; |
| 5061 |
sum+=el.offsetTop; |
| 5062 |
}return sum; |
| 5063 |
}}), |
| 5064 |
getPageBoxRight:qx.core.Variant.select("qx.client", |
| 5065 |
{"mshtml":function(el){return qx.html.Location.getClientBoxRight(el)+qx.html.Scroll.getLeftSum(el); |
| 5066 |
}, |
| 5067 |
"default":function(el){return qx.html.Location.getPageBoxLeft(el)+qx.html.Dimension.getBoxWidth(el); |
| 5068 |
}}), |
| 5069 |
getPageBoxBottom:qx.core.Variant.select("qx.client", |
| 5070 |
{"mshtml":function(el){return qx.html.Location.getClientBoxBottom(el)+qx.html.Scroll.getTopSum(el); |
| 5071 |
}, |
| 5072 |
"default":function(el){return qx.html.Location.getPageBoxTop(el)+qx.html.Dimension.getBoxHeight(el); |
| 5073 |
}}), |
| 5074 |
getClientAreaLeft:qx.core.Variant.select("qx.client", |
| 5075 |
{"gecko":function(el){return qx.html.Location.getPageAreaLeft(el)-qx.html.Scroll.getLeftSum(el); |
| 5076 |
}, |
| 5077 |
"default":function(el){return qx.html.Location.getClientBoxLeft(el)+qx.html.Style.getBorderLeft(el); |
| 5078 |
}}), |
| 5079 |
getClientAreaTop:qx.core.Variant.select("qx.client", |
| 5080 |
{"gecko":function(el){return qx.html.Location.getPageAreaTop(el)-qx.html.Scroll.getTopSum(el); |
| 5081 |
}, |
4993 |
}, |
| 5082 |
"default":function(el){return qx.html.Location.getClientBoxTop(el)+qx.html.Style.getBorderTop(el); |
4994 |
getActiveSiblingHelperIgnore:function(vIgnoreClasses, |
| 5083 |
}}), |
4995 |
vInstance){for(var j=0;j<vIgnoreClasses.length;j++){if(vInstance instanceof vIgnoreClasses[j]){return true; |
| 5084 |
getClientAreaRight:function(el){return qx.html.Location.getClientAreaLeft(el)+qx.html.Dimension.getAreaWidth(el); |
4996 |
}}return false; |
| 5085 |
}, |
4997 |
}, |
| 5086 |
getClientAreaBottom:function(el){return qx.html.Location.getClientAreaTop(el)+qx.html.Dimension.getAreaHeight(el); |
4998 |
getActiveSiblingHelper:function(vObject, |
|
|
4999 |
vParent, |
| 5000 |
vCalc, |
| 5001 |
vIgnoreClasses, |
| 5002 |
vMode){if(!vIgnoreClasses){vIgnoreClasses=[]; |
| 5003 |
}var vChilds=vParent.getChildren(); |
| 5004 |
var vPosition=vMode==null?vChilds.indexOf(vObject)+vCalc:vMode==="first"?0:vChilds.length-1; |
| 5005 |
var vInstance=vChilds[vPosition]; |
| 5006 |
while(vInstance&&(!vInstance.getEnabled()||qx.ui.core.Widget.getActiveSiblingHelperIgnore(vIgnoreClasses, |
| 5007 |
vInstance))){vPosition+=vCalc; |
| 5008 |
vInstance=vChilds[vPosition]; |
| 5009 |
if(!vInstance){return null; |
| 5010 |
}}return vInstance; |
| 5087 |
}, |
5011 |
}, |
| 5088 |
getPageAreaLeft:qx.core.Variant.select("qx.client", |
5012 |
__initApplyMethods:function(members){var applyRuntime="_renderRuntime"; |
| 5089 |
{"gecko":function(el){return el.ownerDocument.getBoxObjectFor(el).x; |
5013 |
var resetRuntime="_resetRuntime"; |
|
|
5014 |
var style="this._style."; |
| 5015 |
var cssValue="=((v==null)?0:v)+'px'"; |
| 5016 |
var parameter="v"; |
| 5017 |
var properties=["left", |
| 5018 |
"right", |
| 5019 |
"top", |
| 5020 |
"bottom", |
| 5021 |
"width", |
| 5022 |
"height", |
| 5023 |
"minWidth", |
| 5024 |
"maxWidth", |
| 5025 |
"minHeight", |
| 5026 |
"maxHeight"]; |
| 5027 |
var propertiesUpper=["Left", |
| 5028 |
"Right", |
| 5029 |
"Top", |
| 5030 |
"Bottom", |
| 5031 |
"Width", |
| 5032 |
"Height", |
| 5033 |
"MinWidth", |
| 5034 |
"MaxWidth", |
| 5035 |
"MinHeight", |
| 5036 |
"MaxHeight"]; |
| 5037 |
var applyMargin=applyRuntime+"Margin"; |
| 5038 |
var resetMargin=resetRuntime+"Margin"; |
| 5039 |
var styleMargin=style+"margin"; |
| 5040 |
for(var i=0;i<4;i++){members[applyMargin+propertiesUpper[i]]=new Function(parameter, |
| 5041 |
styleMargin+propertiesUpper[i]+cssValue); |
| 5042 |
members[resetMargin+propertiesUpper[i]]=new Function(styleMargin+propertiesUpper[i]+"=''"); |
| 5043 |
}var applyPadding=applyRuntime+"Padding"; |
| 5044 |
var resetPadding=resetRuntime+"Padding"; |
| 5045 |
var stylePadding=style+"padding"; |
| 5046 |
if(qx.core.Variant.isSet("qx.client", |
| 5047 |
"gecko")){for(var i=0;i<4;i++){members[applyPadding+propertiesUpper[i]]=new Function(parameter, |
| 5048 |
stylePadding+propertiesUpper[i]+cssValue); |
| 5049 |
members[resetPadding+propertiesUpper[i]]=new Function(stylePadding+propertiesUpper[i]+"=''"); |
| 5050 |
}}else{for(var i=0;i<4;i++){members[applyPadding+propertiesUpper[i]]=new Function(parameter, |
| 5051 |
"this.setStyleProperty('padding"+propertiesUpper[i]+"', ((v==null)?0:v)+'px')"); |
| 5052 |
members[resetPadding+propertiesUpper[i]]=new Function("this.removeStyleProperty('padding"+propertiesUpper[i]+"')"); |
| 5053 |
}}for(var i=0;i<properties.length;i++){members[applyRuntime+propertiesUpper[i]]=new Function(parameter, |
| 5054 |
style+properties[i]+cssValue); |
| 5055 |
members[resetRuntime+propertiesUpper[i]]=new Function(style+properties[i]+"=''"); |
| 5056 |
}}, |
| 5057 |
TYPE_NULL:0, |
| 5058 |
TYPE_PIXEL:1, |
| 5059 |
TYPE_PERCENT:2, |
| 5060 |
TYPE_AUTO:3, |
| 5061 |
TYPE_FLEX:4, |
| 5062 |
layoutPropertyTypes:{}, |
| 5063 |
__initLayoutProperties:function(statics){var a=["width", |
| 5064 |
"height", |
| 5065 |
"minWidth", |
| 5066 |
"maxWidth", |
| 5067 |
"minHeight", |
| 5068 |
"maxHeight", |
| 5069 |
"left", |
| 5070 |
"right", |
| 5071 |
"top", |
| 5072 |
"bottom"]; |
| 5073 |
for(var i=0, |
| 5074 |
l=a.length, |
| 5075 |
p, |
| 5076 |
b, |
| 5077 |
t;i<l;i++){p=a[i]; |
| 5078 |
b="_computed"+qx.lang.String.toFirstUp(p); |
| 5079 |
t=b+"Type"; |
| 5080 |
statics.layoutPropertyTypes[p]={dataType:t, |
| 5081 |
dataParsed:b+"Parsed", |
| 5082 |
dataValue:b+"Value", |
| 5083 |
typePixel:t+"Pixel", |
| 5084 |
typePercent:t+"Percent", |
| 5085 |
typeAuto:t+"Auto", |
| 5086 |
typeFlex:t+"Flex", |
| 5087 |
typeNull:t+"Null"}; |
| 5088 |
}}, |
| 5089 |
initScrollbarWidth:function(){var t=document.createElement("div"); |
| 5090 |
var s=t.style; |
| 5091 |
s.height=s.width="100px"; |
| 5092 |
s.overflow="scroll"; |
| 5093 |
document.body.appendChild(t); |
| 5094 |
var c=qx.html.Dimension.getScrollBarSizeRight(t); |
| 5095 |
qx.ui.core.Widget.SCROLLBAR_SIZE=c?c:16; |
| 5096 |
document.body.removeChild(t); |
| 5090 |
}, |
5097 |
}, |
| 5091 |
"default":function(el){return qx.html.Location.getPageBoxLeft(el)+qx.html.Style.getBorderLeft(el); |
5098 |
_idCounter:0}, |
| 5092 |
}}), |
5099 |
properties:{enabled:{init:"inherit", |
| 5093 |
getPageAreaTop:qx.core.Variant.select("qx.client", |
5100 |
check:"Boolean", |
| 5094 |
{"gecko":function(el){return el.ownerDocument.getBoxObjectFor(el).y; |
5101 |
inheritable:true, |
| 5095 |
}, |
5102 |
apply:"_applyEnabled", |
| 5096 |
"default":function(el){return qx.html.Location.getPageBoxTop(el)+qx.html.Style.getBorderTop(el); |
5103 |
event:"changeEnabled"}, |
| 5097 |
}}), |
5104 |
parent:{check:"qx.ui.core.Parent", |
| 5098 |
getPageAreaRight:function(el){return qx.html.Location.getPageAreaLeft(el)+qx.html.Dimension.getAreaWidth(el); |
|
|
| 5099 |
}, |
| 5100 |
getPageAreaBottom:function(el){return qx.html.Location.getPageAreaTop(el)+qx.html.Dimension.getAreaHeight(el); |
| 5101 |
}, |
| 5102 |
getClientInnerLeft:function(el){return qx.html.Location.getClientAreaLeft(el)+qx.html.Style.getPaddingLeft(el); |
| 5103 |
}, |
| 5104 |
getClientInnerTop:function(el){return qx.html.Location.getClientAreaTop(el)+qx.html.Style.getPaddingTop(el); |
| 5105 |
}, |
| 5106 |
getClientInnerRight:function(el){return qx.html.Location.getClientInnerLeft(el)+qx.html.Dimension.getInnerWidth(el); |
| 5107 |
}, |
| 5108 |
getClientInnerBottom:function(el){return qx.html.Location.getClientInnerTop(el)+qx.html.Dimension.getInnerHeight(el); |
| 5109 |
}, |
| 5110 |
getPageInnerLeft:function(el){return qx.html.Location.getPageAreaLeft(el)+qx.html.Style.getPaddingLeft(el); |
| 5111 |
}, |
| 5112 |
getPageInnerTop:function(el){return qx.html.Location.getPageAreaTop(el)+qx.html.Style.getPaddingTop(el); |
| 5113 |
}, |
| 5114 |
getPageInnerRight:function(el){return qx.html.Location.getPageInnerLeft(el)+qx.html.Dimension.getInnerWidth(el); |
| 5115 |
}, |
| 5116 |
getPageInnerBottom:function(el){return qx.html.Location.getPageInnerTop(el)+qx.html.Dimension.getInnerHeight(el); |
| 5117 |
}, |
| 5118 |
getScreenBoxLeft:qx.core.Variant.select("qx.client", |
| 5119 |
{"gecko":function(el){var sum=0; |
| 5120 |
var p=el.parentNode; |
| 5121 |
while(p.nodeType==1){sum+=p.scrollLeft; |
| 5122 |
p=p.parentNode; |
| 5123 |
}return el.ownerDocument.getBoxObjectFor(el).screenX-sum; |
| 5124 |
}, |
| 5125 |
"default":function(el){return qx.html.Location.getScreenDocumentLeft(el)+qx.html.Location.getPageBoxLeft(el); |
| 5126 |
}}), |
| 5127 |
getScreenBoxTop:qx.core.Variant.select("qx.client", |
| 5128 |
{"gecko":function(el){var sum=0; |
| 5129 |
var p=el.parentNode; |
| 5130 |
while(p.nodeType==1){sum+=p.scrollTop; |
| 5131 |
p=p.parentNode; |
| 5132 |
}return el.ownerDocument.getBoxObjectFor(el).screenY-sum; |
| 5133 |
}, |
| 5134 |
"default":function(el){return qx.html.Location.getScreenDocumentTop(el)+qx.html.Location.getPageBoxTop(el); |
| 5135 |
}}), |
| 5136 |
getScreenBoxRight:function(el){return qx.html.Location.getScreenBoxLeft(el)+qx.html.Dimension.getBoxWidth(el); |
| 5137 |
}, |
| 5138 |
getScreenBoxBottom:function(el){return qx.html.Location.getScreenBoxTop(el)+qx.html.Dimension.getBoxHeight(el); |
| 5139 |
}, |
| 5140 |
getScreenOuterLeft:function(el){return qx.html.Location.getScreenBoxLeft(el)-qx.html.Style.getMarginLeft(el); |
| 5141 |
}, |
| 5142 |
getScreenOuterTop:function(el){return qx.html.Location.getScreenBoxTop(el)-qx.html.Style.getMarginTop(el); |
| 5143 |
}, |
| 5144 |
getScreenOuterRight:function(el){return qx.html.Location.getScreenBoxRight(el)+qx.html.Style.getMarginRight(el); |
| 5145 |
}, |
| 5146 |
getScreenOuterBottom:function(el){return qx.html.Location.getScreenBoxBottom(el)+qx.html.Style.getMarginBottom(el); |
| 5147 |
}, |
| 5148 |
getScreenAreaLeft:function(el){return qx.html.Location.getScreenBoxLeft(el)+qx.html.Dimension.getInsetLeft(el); |
| 5149 |
}, |
| 5150 |
getScreenAreaTop:function(el){return qx.html.Location.getScreenBoxTop(el)+qx.html.Dimension.getInsetTop(el); |
| 5151 |
}, |
| 5152 |
getScreenAreaRight:function(el){return qx.html.Location.getScreenBoxRight(el)-qx.html.Dimension.getInsetRight(el); |
| 5153 |
}, |
| 5154 |
getScreenAreaBottom:function(el){return qx.html.Location.getScreenBoxBottom(el)-qx.html.Dimension.getInsetBottom(el); |
| 5155 |
}, |
| 5156 |
getScreenInnerLeft:function(el){return qx.html.Location.getScreenAreaLeft(el)+qx.html.Style.getPaddingLeft(el); |
| 5157 |
}, |
| 5158 |
getScreenInnerTop:function(el){return qx.html.Location.getScreenAreaTop(el)+qx.html.Style.getPaddingTop(el); |
| 5159 |
}, |
| 5160 |
getScreenInnerRight:function(el){return qx.html.Location.getScreenAreaRight(el)-qx.html.Style.getPaddingRight(el); |
| 5161 |
}, |
| 5162 |
getScreenInnerBottom:function(el){return qx.html.Location.getScreenAreaBottom(el)-qx.html.Style.getPaddingBottom(el); |
| 5163 |
}, |
| 5164 |
getScreenDocumentLeft:qx.core.Variant.select("qx.client", |
| 5165 |
{"gecko":function(el){return qx.html.Location.getScreenOuterLeft(el.ownerDocument.body); |
| 5166 |
}, |
| 5167 |
"default":function(el){return el.document.parentWindow.screenLeft; |
| 5168 |
}}), |
| 5169 |
getScreenDocumentTop:qx.core.Variant.select("qx.client", |
| 5170 |
{"gecko":function(el){return qx.html.Location.getScreenOuterTop(el.ownerDocument.body); |
| 5171 |
}, |
| 5172 |
"default":function(el){return el.document.parentWindow.screenTop; |
| 5173 |
}}), |
| 5174 |
getScreenDocumentRight:qx.core.Variant.select("qx.client", |
| 5175 |
{"gecko":function(el){return qx.html.Location.getScreenOuterRight(el.ownerDocument.body); |
| 5176 |
}, |
| 5177 |
"default":function(el){}}), |
| 5178 |
getScreenDocumentBottom:qx.core.Variant.select("qx.client", |
| 5179 |
{"gecko":function(el){return qx.html.Location.getScreenOuterBottom(el.ownerDocument.body); |
| 5180 |
}, |
| 5181 |
"default":function(el){}})}}); |
| 5182 |
|
| 5183 |
|
| 5184 |
|
| 5185 |
|
| 5186 |
/* ID: qx.html.Dimension */ |
| 5187 |
qx.Class.define("qx.html.Dimension", |
| 5188 |
{statics:{getOuterWidth:function(el){return qx.html.Dimension.getBoxWidth(el)+qx.html.Style.getMarginLeft(el)+qx.html.Style.getMarginRight(el); |
| 5189 |
}, |
| 5190 |
getOuterHeight:function(el){return qx.html.Dimension.getBoxHeight(el)+qx.html.Style.getMarginTop(el)+qx.html.Style.getMarginBottom(el); |
| 5191 |
}, |
| 5192 |
getBoxWidthForZeroHeight:function(el){var h=el.offsetHeight; |
| 5193 |
if(h==0){var o=el.style.height; |
| 5194 |
el.style.height="1px"; |
| 5195 |
}var v=el.offsetWidth; |
| 5196 |
if(h==0){el.style.height=o; |
| 5197 |
}return v; |
| 5198 |
}, |
| 5199 |
getBoxHeightForZeroWidth:function(el){var w=el.offsetWidth; |
| 5200 |
if(w==0){var o=el.style.width; |
| 5201 |
el.style.width="1px"; |
| 5202 |
}var v=el.offsetHeight; |
| 5203 |
if(w==0){el.style.width=o; |
| 5204 |
}return v; |
| 5205 |
}, |
| 5206 |
getBoxWidth:function(el){return el.offsetWidth; |
| 5207 |
}, |
| 5208 |
getBoxHeight:function(el){return el.offsetHeight; |
| 5209 |
}, |
| 5210 |
getAreaWidth:qx.core.Variant.select("qx.client", |
| 5211 |
{"gecko":function(el){if(el.clientWidth!=0&&el.clientWidth!=(qx.html.Style.getBorderLeft(el)+qx.html.Style.getBorderRight(el))){return el.clientWidth; |
| 5212 |
}else{return qx.html.Dimension.getBoxWidth(el)-qx.html.Dimension.getInsetLeft(el)-qx.html.Dimension.getInsetRight(el); |
| 5213 |
}}, |
| 5214 |
"default":function(el){return el.clientWidth!=0?el.clientWidth:(qx.html.Dimension.getBoxWidth(el)-qx.html.Dimension.getInsetLeft(el)-qx.html.Dimension.getInsetRight(el)); |
| 5215 |
}}), |
| 5216 |
getAreaHeight:qx.core.Variant.select("qx.client", |
| 5217 |
{"gecko":function(el){if(el.clientHeight!=0&&el.clientHeight!=(qx.html.Style.getBorderTop(el)+qx.html.Style.getBorderBottom(el))){return el.clientHeight; |
| 5218 |
}else{return qx.html.Dimension.getBoxHeight(el)-qx.html.Dimension.getInsetTop(el)-qx.html.Dimension.getInsetBottom(el); |
| 5219 |
}}, |
| 5220 |
"default":function(el){return el.clientHeight!=0?el.clientHeight:(qx.html.Dimension.getBoxHeight(el)-qx.html.Dimension.getInsetTop(el)-qx.html.Dimension.getInsetBottom(el)); |
| 5221 |
}}), |
| 5222 |
getInnerWidth:function(el){return qx.html.Dimension.getAreaWidth(el)-qx.html.Style.getPaddingLeft(el)-qx.html.Style.getPaddingRight(el); |
| 5223 |
}, |
| 5224 |
getInnerHeight:function(el){return qx.html.Dimension.getAreaHeight(el)-qx.html.Style.getPaddingTop(el)-qx.html.Style.getPaddingBottom(el); |
| 5225 |
}, |
| 5226 |
getInsetLeft:qx.core.Variant.select("qx.client", |
| 5227 |
{"mshtml":function(el){return el.clientLeft; |
| 5228 |
}, |
| 5229 |
"default":function(el){return qx.html.Style.getBorderLeft(el); |
| 5230 |
}}), |
| 5231 |
getInsetTop:qx.core.Variant.select("qx.client", |
| 5232 |
{"mshtml":function(el){return el.clientTop; |
| 5233 |
}, |
| 5234 |
"default":function(el){return qx.html.Style.getBorderTop(el); |
| 5235 |
}}), |
| 5236 |
getInsetRight:qx.core.Variant.select("qx.client", |
| 5237 |
{"mshtml":function(el){if(qx.html.Style.getStyleProperty(el, |
| 5238 |
"overflowY")=="hidden"||el.clientWidth==0){return qx.html.Style.getBorderRight(el); |
| 5239 |
}return Math.max(0, |
| 5240 |
el.offsetWidth-el.clientLeft-el.clientWidth); |
| 5241 |
}, |
| 5242 |
"default":function(el){if(el.clientWidth==0){var ov=qx.html.Style.getStyleProperty(el, |
| 5243 |
"overflow"); |
| 5244 |
var sbv=ov=="scroll"||ov=="-moz-scrollbars-vertical"?16:0; |
| 5245 |
return Math.max(0, |
| 5246 |
qx.html.Style.getBorderRight(el)+sbv); |
| 5247 |
}return Math.max(0, |
| 5248 |
el.offsetWidth-el.clientWidth-qx.html.Style.getBorderLeft(el)); |
| 5249 |
}}), |
| 5250 |
getInsetBottom:qx.core.Variant.select("qx.client", |
| 5251 |
{"mshtml":function(el){if(qx.html.Style.getStyleProperty(el, |
| 5252 |
"overflowX")=="hidden"||el.clientHeight==0){return qx.html.Style.getBorderBottom(el); |
| 5253 |
}return Math.max(0, |
| 5254 |
el.offsetHeight-el.clientTop-el.clientHeight); |
| 5255 |
}, |
| 5256 |
"default":function(el){if(el.clientHeight==0){var ov=qx.html.Style.getStyleProperty(el, |
| 5257 |
"overflow"); |
| 5258 |
var sbv=ov=="scroll"||ov=="-moz-scrollbars-horizontal"?16:0; |
| 5259 |
return Math.max(0, |
| 5260 |
qx.html.Style.getBorderBottom(el)+sbv); |
| 5261 |
}return Math.max(0, |
| 5262 |
el.offsetHeight-el.clientHeight-qx.html.Style.getBorderTop(el)); |
| 5263 |
}}), |
| 5264 |
getScrollBarSizeLeft:function(el){return 0; |
| 5265 |
}, |
| 5266 |
getScrollBarSizeTop:function(el){return 0; |
| 5267 |
}, |
| 5268 |
getScrollBarSizeRight:function(el){return qx.html.Dimension.getInsetRight(el)-qx.html.Style.getBorderRight(el); |
| 5269 |
}, |
| 5270 |
getScrollBarSizeBottom:function(el){return qx.html.Dimension.getInsetBottom(el)-qx.html.Style.getBorderBottom(el); |
| 5271 |
}, |
| 5272 |
getScrollBarVisibleX:function(el){return qx.html.Dimension.getScrollBarSizeRight(el)>0; |
| 5273 |
}, |
| 5274 |
getScrollBarVisibleY:function(el){return qx.html.Dimension.getScrollBarSizeBottom(el)>0; |
| 5275 |
}}}); |
| 5276 |
|
| 5277 |
|
| 5278 |
|
| 5279 |
|
| 5280 |
/* ID: qx.html.Offset */ |
| 5281 |
qx.Class.define("qx.html.Offset", |
| 5282 |
{statics:{getLeft:qx.core.Variant.select("qx.client", |
| 5283 |
{"gecko":function(el){var val=el.offsetLeft; |
| 5284 |
var pa=el.parentNode; |
| 5285 |
var pose=qx.html.Style.getStyleProperty(el, |
| 5286 |
"position"); |
| 5287 |
var posp=qx.html.Style.getStyleProperty(pa, |
| 5288 |
"position"); |
| 5289 |
if(pose!="absolute"&&pose!="fixed"){val-=qx.html.Style.getBorderLeft(pa); |
| 5290 |
}if(posp!="absolute"&&posp!="fixed"){while(pa){pa=pa.parentNode; |
| 5291 |
if(!pa||typeof pa.tagName!=="string"){break; |
| 5292 |
}var posi=qx.html.Style.getStyleProperty(pa, |
| 5293 |
"position"); |
| 5294 |
if(posi=="absolute"||posi=="fixed"){val-=qx.html.Style.getBorderLeft(pa)+qx.html.Style.getPaddingLeft(pa); |
| 5295 |
break; |
| 5296 |
}}}return val; |
| 5297 |
}, |
| 5298 |
"default":function(el){return el.offsetLeft; |
| 5299 |
}}), |
| 5300 |
getTop:qx.core.Variant.select("qx.client", |
| 5301 |
{"gecko":function(el){var val=el.offsetTop; |
| 5302 |
var pa=el.parentNode; |
| 5303 |
var pose=qx.html.Style.getStyleProperty(el, |
| 5304 |
"position"); |
| 5305 |
var posp=qx.html.Style.getStyleProperty(pa, |
| 5306 |
"position"); |
| 5307 |
if(pose!="absolute"&&pose!="fixed"){val-=qx.html.Style.getBorderTop(pa); |
| 5308 |
}if(posp!="absolute"&&posp!="fixed"){while(pa){pa=pa.parentNode; |
| 5309 |
if(!pa||typeof pa.tagName!=="string"){break; |
| 5310 |
}var posi=qx.html.Style.getStyleProperty(pa, |
| 5311 |
"position"); |
| 5312 |
if(posi=="absolute"||posi=="fixed"){val-=qx.html.Style.getBorderTop(pa)+qx.html.Style.getPaddingTop(pa); |
| 5313 |
break; |
| 5314 |
}}}return val; |
| 5315 |
}, |
| 5316 |
"default":function(el){return el.offsetTop; |
| 5317 |
}})}}); |
| 5318 |
|
| 5319 |
|
| 5320 |
|
| 5321 |
|
| 5322 |
/* ID: qx.theme.manager.Color */ |
| 5323 |
qx.Class.define("qx.theme.manager.Color", |
| 5324 |
{type:"singleton", |
| 5325 |
extend:qx.util.manager.Value, |
| 5326 |
properties:{colorTheme:{check:"Theme", |
| 5327 |
nullable:true, |
| 5328 |
apply:"_applyColorTheme", |
| 5329 |
event:"changeColorTheme"}}, |
| 5330 |
members:{_applyColorTheme:function(value){var dest=this._dynamic={}; |
| 5331 |
if(value){var source=value.colors; |
| 5332 |
var util=qx.util.ColorUtil; |
| 5333 |
var temp; |
| 5334 |
for(var key in source){temp=source[key]; |
| 5335 |
if(typeof temp==="string"){if(!util.isCssString(temp)){throw new Error("Could not parse color: "+temp); |
| 5336 |
}}else if(temp instanceof Array){temp=util.rgbToRgbString(temp); |
| 5337 |
}else{throw new Error("Could not parse color: "+temp); |
| 5338 |
}dest[key]=temp; |
| 5339 |
}} |
| 5340 |
if(qx.theme.manager.Meta.getInstance().getAutoSync()){this.syncColorTheme(); |
| 5341 |
}}, |
| 5342 |
syncColorTheme:function(){this._updateObjects(); |
| 5343 |
}}}); |
| 5344 |
|
| 5345 |
|
| 5346 |
|
| 5347 |
|
| 5348 |
/* ID: qx.util.ColorUtil */ |
| 5349 |
qx.Class.define("qx.util.ColorUtil", |
| 5350 |
{statics:{REGEXP:{hex3:/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/, |
| 5351 |
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})$/, |
| 5352 |
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*\)$/}, |
| 5353 |
SYSTEM:{activeborder:true, |
| 5354 |
activecaption:true, |
| 5355 |
appworkspace:true, |
| 5356 |
background:true, |
| 5357 |
buttonface:true, |
| 5358 |
buttonhighlight:true, |
| 5359 |
buttonshadow:true, |
| 5360 |
buttontext:true, |
| 5361 |
captiontext:true, |
| 5362 |
graytext:true, |
| 5363 |
highlight:true, |
| 5364 |
highlighttext:true, |
| 5365 |
inactiveborder:true, |
| 5366 |
inactivecaption:true, |
| 5367 |
inactivecaptiontext:true, |
| 5368 |
infobackground:true, |
| 5369 |
infotext:true, |
| 5370 |
menu:true, |
| 5371 |
menutext:true, |
| 5372 |
scrollbar:true, |
| 5373 |
threeddarkshadow:true, |
| 5374 |
threedface:true, |
| 5375 |
threedhighlight:true, |
| 5376 |
threedlightshadow:true, |
| 5377 |
threedshadow:true, |
| 5378 |
window:true, |
| 5379 |
windowframe:true, |
| 5380 |
windowtext:true}, |
| 5381 |
NAMED:{black:[0, |
| 5382 |
0, |
| 5383 |
0], |
| 5384 |
silver:[192, |
| 5385 |
192, |
| 5386 |
192], |
| 5387 |
gray:[128, |
| 5388 |
128, |
| 5389 |
128], |
| 5390 |
white:[255, |
| 5391 |
255, |
| 5392 |
255], |
| 5393 |
maroon:[128, |
| 5394 |
0, |
| 5395 |
0], |
| 5396 |
red:[255, |
| 5397 |
0, |
| 5398 |
0], |
| 5399 |
purple:[128, |
| 5400 |
0, |
| 5401 |
128], |
| 5402 |
fuchsia:[255, |
| 5403 |
0, |
| 5404 |
255], |
| 5405 |
green:[0, |
| 5406 |
128, |
| 5407 |
0], |
| 5408 |
lime:[0, |
| 5409 |
255, |
| 5410 |
0], |
| 5411 |
olive:[128, |
| 5412 |
128, |
| 5413 |
0], |
| 5414 |
yellow:[255, |
| 5415 |
255, |
| 5416 |
0], |
| 5417 |
navy:[0, |
| 5418 |
0, |
| 5419 |
128], |
| 5420 |
blue:[0, |
| 5421 |
0, |
| 5422 |
255], |
| 5423 |
teal:[0, |
| 5424 |
128, |
| 5425 |
128], |
| 5426 |
aqua:[0, |
| 5427 |
255, |
| 5428 |
255], |
| 5429 |
transparent:[-1, |
| 5430 |
-1, |
| 5431 |
-1], |
| 5432 |
grey:[128, |
| 5433 |
128, |
| 5434 |
128], |
| 5435 |
magenta:[255, |
| 5436 |
0, |
| 5437 |
255], |
| 5438 |
orange:[255, |
| 5439 |
165, |
| 5440 |
0], |
| 5441 |
brown:[165, |
| 5442 |
42, |
| 5443 |
42]}, |
| 5444 |
isNamedColor:function(value){return this.NAMED[value]!==undefined; |
| 5445 |
}, |
| 5446 |
isSystemColor:function(value){return this.SYSTEM[value]!==undefined; |
| 5447 |
}, |
| 5448 |
isThemedColor:function(value){return qx.theme.manager.Color.getInstance().isDynamic(value); |
| 5449 |
}, |
| 5450 |
stringToRgb:function(str){if(this.isThemedColor(str)){var str=qx.theme.manager.Color.getInstance().resolveDynamic(str); |
| 5451 |
} |
| 5452 |
if(this.isNamedColor(str)){return this.NAMED[str]; |
| 5453 |
}else if(this.isSystemColor(str)){throw new Error("Could not convert system colors to RGB: "+str); |
| 5454 |
}else if(this.isRgbString(str)){return this.__rgbStringToRgb(); |
| 5455 |
}else if(this.isHex3String(str)){return this.__hex3StringToRgb(); |
| 5456 |
}else if(this.isHex6String(str)){return this.__hex6StringToRgb(); |
| 5457 |
}throw new Error("Could not parse color: "+str); |
| 5458 |
}, |
| 5459 |
cssStringToRgb:function(str){if(this.isNamedColor(str)){return this.NAMED[str]; |
| 5460 |
}else if(this.isSystemColor(str)){throw new Error("Could not convert system colors to RGB: "+str); |
| 5461 |
}else if(this.isRgbString(str)){return this.__rgbStringToRgb(); |
| 5462 |
}else if(this.isHex3String(str)){return this.__hex3StringToRgb(); |
| 5463 |
}else if(this.isHex6String(str)){return this.__hex6StringToRgb(); |
| 5464 |
}throw new Error("Could not parse color: "+str); |
| 5465 |
}, |
| 5466 |
stringToRgbString:function(str){return this.rgbToRgbString(this.stringToRgb(str)); |
| 5467 |
}, |
| 5468 |
rgbToRgbString:function(rgb){return "rgb("+rgb[0]+","+rgb[1]+","+rgb[2]+")"; |
| 5469 |
}, |
| 5470 |
rgbToHexString:function(rgb){return (qx.lang.String.pad(rgb[0].toString(16).toUpperCase(), |
| 5471 |
2)+qx.lang.String.pad(rgb[1].toString(16).toUpperCase(), |
| 5472 |
2)+qx.lang.String.pad(rgb[2].toString(16).toUpperCase(), |
| 5473 |
2)); |
| 5474 |
}, |
| 5475 |
isValid:function(str){return this.isThemedColor(str)||this.isCssString(str); |
| 5476 |
}, |
| 5477 |
isCssString:function(str){return this.isSystemColor(str)||this.isNamedColor(str)||this.isHex3String(str)||this.isHex6String(str)||this.isRgbString(str); |
| 5478 |
}, |
| 5479 |
isHex3String:function(str){return this.REGEXP.hex3.test(str); |
| 5480 |
}, |
| 5481 |
isHex6String:function(str){return this.REGEXP.hex6.test(str); |
| 5482 |
}, |
| 5483 |
isRgbString:function(str){return this.REGEXP.rgb.test(str); |
| 5484 |
}, |
| 5485 |
__rgbStringToRgb:function(){var red=parseInt(RegExp.$1); |
| 5486 |
var green=parseInt(RegExp.$2); |
| 5487 |
var blue=parseInt(RegExp.$3); |
| 5488 |
return [red, |
| 5489 |
green, |
| 5490 |
blue]; |
| 5491 |
}, |
| 5492 |
__hex3StringToRgb:function(){var red=parseInt(RegExp.$1, |
| 5493 |
16)*17; |
| 5494 |
var green=parseInt(RegExp.$2, |
| 5495 |
16)*17; |
| 5496 |
var blue=parseInt(RegExp.$3, |
| 5497 |
16)*17; |
| 5498 |
return [red, |
| 5499 |
green, |
| 5500 |
blue]; |
| 5501 |
}, |
| 5502 |
__hex6StringToRgb:function(){var red=(parseInt(RegExp.$1, |
| 5503 |
16)*16)+parseInt(RegExp.$2, |
| 5504 |
16); |
| 5505 |
var green=(parseInt(RegExp.$3, |
| 5506 |
16)*16)+parseInt(RegExp.$4, |
| 5507 |
16); |
| 5508 |
var blue=(parseInt(RegExp.$5, |
| 5509 |
16)*16)+parseInt(RegExp.$6, |
| 5510 |
16); |
| 5511 |
return [red, |
| 5512 |
green, |
| 5513 |
blue]; |
| 5514 |
}, |
| 5515 |
hex3StringToRgb:function(value){if(this.isHex3String(value)){return this.__hex3StringToRgb(value); |
| 5516 |
}throw new Error("Invalid hex3 value: "+value); |
| 5517 |
}, |
| 5518 |
hex6StringToRgb:function(value){if(this.isHex6String(value)){return this.__hex6StringToRgb(value); |
| 5519 |
}throw new Error("Invalid hex6 value: "+value); |
| 5520 |
}, |
| 5521 |
hexStringToRgb:function(value){if(this.isHex3String(value)){return this.__hex3StringToRgb(value); |
| 5522 |
} |
| 5523 |
if(this.isHex6String(value)){return this.__hex6StringToRgb(value); |
| 5524 |
}throw new Error("Invalid hex value: "+value); |
| 5525 |
}, |
| 5526 |
rgbToHsb:function(rgb){var hue, |
| 5527 |
saturation, |
| 5528 |
brightness; |
| 5529 |
var red=rgb[0]; |
| 5530 |
var green=rgb[1]; |
| 5531 |
var blue=rgb[2]; |
| 5532 |
var cmax=(red>green)?red:green; |
| 5533 |
if(blue>cmax){cmax=blue; |
| 5534 |
}var cmin=(red<green)?red:green; |
| 5535 |
if(blue<cmin){cmin=blue; |
| 5536 |
}brightness=cmax/255.0; |
| 5537 |
if(cmax!=0){saturation=(cmax-cmin)/cmax; |
| 5538 |
}else{saturation=0; |
| 5539 |
} |
| 5540 |
if(saturation==0){hue=0; |
| 5541 |
}else{var redc=(cmax-red)/(cmax-cmin); |
| 5542 |
var greenc=(cmax-green)/(cmax-cmin); |
| 5543 |
var bluec=(cmax-blue)/(cmax-cmin); |
| 5544 |
if(red==cmax){hue=bluec-greenc; |
| 5545 |
}else if(green==cmax){hue=2.0+redc-bluec; |
| 5546 |
}else{hue=4.0+greenc-redc; |
| 5547 |
}hue=hue/6.0; |
| 5548 |
if(hue<0){hue=hue+1.0; |
| 5549 |
}}return [Math.round(hue*360), |
| 5550 |
Math.round(saturation*100), |
| 5551 |
Math.round(brightness*100)]; |
| 5552 |
}, |
| 5553 |
hsbToRgb:function(hsb){var i, |
| 5554 |
f, |
| 5555 |
p, |
| 5556 |
q, |
| 5557 |
t; |
| 5558 |
var hue=hsb[0]/360; |
| 5559 |
var saturation=hsb[1]/100; |
| 5560 |
var brightness=hsb[2]/100; |
| 5561 |
if(hue>=1.0){hue%=1.0; |
| 5562 |
} |
| 5563 |
if(saturation>1.0){saturation=1.0; |
| 5564 |
} |
| 5565 |
if(brightness>1.0){brightness=1.0; |
| 5566 |
}var tov=Math.floor(255*brightness); |
| 5567 |
var rgb={}; |
| 5568 |
if(saturation==0.0){rgb.red=rgb.green=rgb.blue=tov; |
| 5569 |
}else{hue*=6.0; |
| 5570 |
i=Math.floor(hue); |
| 5571 |
f=hue-i; |
| 5572 |
p=Math.floor(tov*(1.0-saturation)); |
| 5573 |
q=Math.floor(tov*(1.0-(saturation*f))); |
| 5574 |
t=Math.floor(tov*(1.0-(saturation*(1.0-f)))); |
| 5575 |
switch(i){case 0:rgb.red=tov; |
| 5576 |
rgb.green=t; |
| 5577 |
rgb.blue=p; |
| 5578 |
break; |
| 5579 |
case 1:rgb.red=q; |
| 5580 |
rgb.green=tov; |
| 5581 |
rgb.blue=p; |
| 5582 |
break; |
| 5583 |
case 2:rgb.red=p; |
| 5584 |
rgb.green=tov; |
| 5585 |
rgb.blue=t; |
| 5586 |
break; |
| 5587 |
case 3:rgb.red=p; |
| 5588 |
rgb.green=q; |
| 5589 |
rgb.blue=tov; |
| 5590 |
break; |
| 5591 |
case 4:rgb.red=t; |
| 5592 |
rgb.green=p; |
| 5593 |
rgb.blue=tov; |
| 5594 |
break; |
| 5595 |
case 5:rgb.red=tov; |
| 5596 |
rgb.green=p; |
| 5597 |
rgb.blue=q; |
| 5598 |
break; |
| 5599 |
}}return rgb; |
| 5600 |
}, |
| 5601 |
randomColor:function(){var r=Math.round(Math.random()*255); |
| 5602 |
var g=Math.round(Math.random()*255); |
| 5603 |
var b=Math.round(Math.random()*255); |
| 5604 |
return this.rgbToRgbString([r, |
| 5605 |
g, |
| 5606 |
b]); |
| 5607 |
}}}); |
| 5608 |
|
| 5609 |
|
| 5610 |
|
| 5611 |
|
| 5612 |
/* ID: qx.theme.manager.Meta */ |
| 5613 |
qx.Class.define("qx.theme.manager.Meta", |
| 5614 |
{type:"singleton", |
| 5615 |
extend:qx.core.Target, |
| 5616 |
properties:{theme:{check:"Theme", |
| 5617 |
nullable:true, |
| 5618 |
apply:"_applyTheme", |
| 5619 |
event:"changeTheme"}, |
| 5620 |
autoSync:{check:"Boolean", |
| 5621 |
init:true, |
| 5622 |
apply:"_applyAutoSync"}}, |
| 5623 |
members:{_applyTheme:function(value, |
| 5624 |
old){var color=null; |
| 5625 |
var border=null; |
| 5626 |
var font=null; |
| 5627 |
var widget=null; |
| 5628 |
var icon=null; |
| 5629 |
var appearance=null; |
| 5630 |
if(value){color=value.meta.color||null; |
| 5631 |
border=value.meta.border||null; |
| 5632 |
font=value.meta.font||null; |
| 5633 |
widget=value.meta.widget||null; |
| 5634 |
icon=value.meta.icon||null; |
| 5635 |
appearance=value.meta.appearance||null; |
| 5636 |
} |
| 5637 |
if(old){this.setAutoSync(false); |
| 5638 |
}var colorMgr=qx.theme.manager.Color.getInstance(); |
| 5639 |
var borderMgr=qx.theme.manager.Border.getInstance(); |
| 5640 |
var fontMgr=qx.theme.manager.Font.getInstance(); |
| 5641 |
var iconMgr=qx.theme.manager.Icon.getInstance(); |
| 5642 |
var widgetMgr=qx.theme.manager.Widget.getInstance(); |
| 5643 |
var appearanceMgr=qx.theme.manager.Appearance.getInstance(); |
| 5644 |
colorMgr.setColorTheme(color); |
| 5645 |
borderMgr.setBorderTheme(border); |
| 5646 |
fontMgr.setFontTheme(font); |
| 5647 |
widgetMgr.setWidgetTheme(widget); |
| 5648 |
iconMgr.setIconTheme(icon); |
| 5649 |
appearanceMgr.setAppearanceTheme(appearance); |
| 5650 |
if(old){this.setAutoSync(true); |
| 5651 |
}}, |
| 5652 |
_applyAutoSync:function(value, |
| 5653 |
old){if(value){qx.theme.manager.Appearance.getInstance().syncAppearanceTheme(); |
| 5654 |
qx.theme.manager.Icon.getInstance().syncIconTheme(); |
| 5655 |
qx.theme.manager.Widget.getInstance().syncWidgetTheme(); |
| 5656 |
qx.theme.manager.Font.getInstance().syncFontTheme(); |
| 5657 |
qx.theme.manager.Border.getInstance().syncBorderTheme(); |
| 5658 |
qx.theme.manager.Color.getInstance().syncColorTheme(); |
| 5659 |
}}, |
| 5660 |
initialize:function(){var setting=qx.core.Setting; |
| 5661 |
var theme, |
| 5662 |
obj; |
| 5663 |
theme=setting.get("qx.theme"); |
| 5664 |
if(theme){obj=qx.Theme.getByName(theme); |
| 5665 |
if(!obj){throw new Error("The meta theme to use is not available: "+theme); |
| 5666 |
}this.setTheme(obj); |
| 5667 |
}theme=setting.get("qx.colorTheme"); |
| 5668 |
if(theme){obj=qx.Theme.getByName(theme); |
| 5669 |
if(!obj){throw new Error("The color theme to use is not available: "+theme); |
| 5670 |
}qx.theme.manager.Color.getInstance().setColorTheme(obj); |
| 5671 |
}theme=setting.get("qx.borderTheme"); |
| 5672 |
if(theme){obj=qx.Theme.getByName(theme); |
| 5673 |
if(!obj){throw new Error("The border theme to use is not available: "+theme); |
| 5674 |
}qx.theme.manager.Border.getInstance().setBorderTheme(obj); |
| 5675 |
}theme=setting.get("qx.fontTheme"); |
| 5676 |
if(theme){obj=qx.Theme.getByName(theme); |
| 5677 |
if(!obj){throw new Error("The font theme to use is not available: "+theme); |
| 5678 |
}qx.theme.manager.Font.getInstance().setFontTheme(obj); |
| 5679 |
}theme=setting.get("qx.widgetTheme"); |
| 5680 |
if(theme){obj=qx.Theme.getByName(theme); |
| 5681 |
if(!obj){throw new Error("The widget theme to use is not available: "+theme); |
| 5682 |
}qx.theme.manager.Widget.getInstance().setWidgetTheme(obj); |
| 5683 |
}theme=setting.get("qx.iconTheme"); |
| 5684 |
if(theme){obj=qx.Theme.getByName(theme); |
| 5685 |
if(!obj){throw new Error("The icon theme to use is not available: "+theme); |
| 5686 |
}qx.theme.manager.Icon.getInstance().setIconTheme(obj); |
| 5687 |
}theme=setting.get("qx.appearanceTheme"); |
| 5688 |
if(theme){obj=qx.Theme.getByName(theme); |
| 5689 |
if(!obj){throw new Error("The appearance theme to use is not available: "+theme); |
| 5690 |
}qx.theme.manager.Appearance.getInstance().setAppearanceTheme(obj); |
| 5691 |
}}, |
| 5692 |
__queryThemes:function(key){var reg=qx.Theme.getAll(); |
| 5693 |
var theme; |
| 5694 |
var list=[]; |
| 5695 |
for(var name in reg){theme=reg[name]; |
| 5696 |
if(theme[key]){list.push(theme); |
| 5697 |
}}return list; |
| 5698 |
}, |
| 5699 |
getMetaThemes:function(){return this.__queryThemes("meta"); |
| 5700 |
}, |
| 5701 |
getColorThemes:function(){return this.__queryThemes("colors"); |
| 5702 |
}, |
| 5703 |
getBorderThemes:function(){return this.__queryThemes("borders"); |
| 5704 |
}, |
| 5705 |
getFontThemes:function(){return this.__queryThemes("fonts"); |
| 5706 |
}, |
| 5707 |
getWidgetThemes:function(){return this.__queryThemes("widgets"); |
| 5708 |
}, |
| 5709 |
getIconThemes:function(){return this.__queryThemes("icons"); |
| 5710 |
}, |
| 5711 |
getAppearanceThemes:function(){return this.__queryThemes("appearances"); |
| 5712 |
}}, |
| 5713 |
settings:{"qx.theme":"qx.theme.ClassicRoyale", |
| 5714 |
"qx.colorTheme":null, |
| 5715 |
"qx.borderTheme":null, |
| 5716 |
"qx.fontTheme":null, |
| 5717 |
"qx.widgetTheme":null, |
| 5718 |
"qx.appearanceTheme":null, |
| 5719 |
"qx.iconTheme":null}}); |
| 5720 |
|
| 5721 |
|
| 5722 |
|
| 5723 |
|
| 5724 |
/* ID: qx.theme.manager.Border */ |
| 5725 |
qx.Class.define("qx.theme.manager.Border", |
| 5726 |
{type:"singleton", |
| 5727 |
extend:qx.util.manager.Value, |
| 5728 |
properties:{borderTheme:{check:"Theme", |
| 5729 |
nullable:true, |
| 5730 |
apply:"_applyBorderTheme", |
| 5731 |
event:"changeBorderTheme"}}, |
| 5732 |
members:{resolveDynamic:function(value){return value instanceof qx.ui.core.Border?value:this._dynamic[value]; |
| 5733 |
}, |
| 5734 |
isDynamic:function(value){return value&&(value instanceof qx.ui.core.Border||this._dynamic[value]!==undefined); |
| 5735 |
}, |
| 5736 |
syncBorderTheme:function(){this._updateObjects(); |
| 5737 |
}, |
| 5738 |
updateObjectsEdge:function(border, |
| 5739 |
edge){var reg=this._registry; |
| 5740 |
var dynamics=this._dynamic; |
| 5741 |
var entry; |
| 5742 |
for(var key in reg){entry=reg[key]; |
| 5743 |
if(entry.value===border||dynamics[entry.value]===border){entry.callback.call(entry.object, |
| 5744 |
border, |
| 5745 |
edge); |
| 5746 |
}}}, |
| 5747 |
_applyBorderTheme:function(value){var dest=this._dynamic; |
| 5748 |
for(var key in dest){if(dest[key].themed){dest[key].dispose(); |
| 5749 |
delete dest[key]; |
| 5750 |
}} |
| 5751 |
if(value){var source=value.borders; |
| 5752 |
var border=qx.ui.core.Border; |
| 5753 |
for(var key in source){dest[key]=(new border).set(source[key]); |
| 5754 |
dest[key].themed=true; |
| 5755 |
}} |
| 5756 |
if(qx.theme.manager.Meta.getInstance().getAutoSync()){this.syncBorderTheme(); |
| 5757 |
}}}}); |
| 5758 |
|
| 5759 |
|
| 5760 |
|
| 5761 |
|
| 5762 |
/* ID: qx.ui.core.Border */ |
| 5763 |
qx.Class.define("qx.ui.core.Border", |
| 5764 |
{extend:qx.core.Object, |
| 5765 |
construct:function(width, |
| 5766 |
style, |
| 5767 |
color){this.base(arguments); |
| 5768 |
if(width!==undefined){this.setWidth(width); |
| 5769 |
} |
| 5770 |
if(style!==undefined){this.setStyle(style); |
| 5771 |
} |
| 5772 |
if(color!==undefined){this.setColor(color); |
| 5773 |
}}, |
| 5774 |
statics:{fromString:function(str){var border=new qx.ui.core.Border; |
| 5775 |
var parts=str.split(/\s+/); |
| 5776 |
var part, |
| 5777 |
temp; |
| 5778 |
for(var i=0, |
| 5779 |
l=parts.length;i<l;i++){part=parts[i]; |
| 5780 |
switch(part){case "groove":case "ridge":case "inset":case "outset":case "solid":case "dotted":case "dashed":case "double":case "none":border.setStyle(part); |
| 5781 |
break; |
| 5782 |
default:temp=parseInt(part); |
| 5783 |
if(temp===part||qx.lang.String.contains(part, |
| 5784 |
"px")){border.setWidth(temp); |
| 5785 |
}else{border.setColor(part); |
| 5786 |
}break; |
| 5787 |
}}return border; |
| 5788 |
}, |
| 5789 |
fromConfig:function(config){var border=new qx.ui.core.Border; |
| 5790 |
border.set(config); |
| 5791 |
return border; |
| 5792 |
}, |
| 5793 |
resetTop:qx.core.Variant.select("qx.client", |
| 5794 |
{"gecko":function(widget){var style=widget._style; |
| 5795 |
if(style){style.borderTopWidth=style.borderTopStyle=style.borderTopColor=style.MozBorderTopColors=""; |
| 5796 |
}}, |
| 5797 |
"default":function(widget){var style=widget._style; |
| 5798 |
if(style){style.borderTopWidth=style.borderTopStyle=style.borderTopColor=""; |
| 5799 |
}style=widget._innerStyle; |
| 5800 |
if(style){style.borderTopWidth=style.borderTopStyle=style.borderTopColor=""; |
| 5801 |
}}}), |
| 5802 |
resetRight:qx.core.Variant.select("qx.client", |
| 5803 |
{"gecko":function(widget){var style=widget._style; |
| 5804 |
if(style){style.borderRightWidth=style.borderRightStyle=style.borderRightColor=style.MozBorderRightColors=""; |
| 5805 |
}}, |
| 5806 |
"default":function(widget){var style=widget._style; |
| 5807 |
if(style){style.borderRightWidth=style.borderRightStyle=style.borderRightColor=""; |
| 5808 |
}style=widget._innerStyle; |
| 5809 |
if(style){style.borderRightWidth=style.borderRightStyle=style.borderRightColor=""; |
| 5810 |
}}}), |
| 5811 |
resetBottom:qx.core.Variant.select("qx.client", |
| 5812 |
{"gecko":function(widget){var style=widget._style; |
| 5813 |
if(style){style.borderBottomWidth=style.borderBottomStyle=style.borderBottomColor=style.MozBorderBottomColors=""; |
| 5814 |
}}, |
| 5815 |
"default":function(widget){var style=widget._style; |
| 5816 |
if(style){style.borderBottomWidth=style.borderBottomStyle=style.borderBottomColor=""; |
| 5817 |
}style=widget._innerStyle; |
| 5818 |
if(style){style.borderBottomWidth=style.borderBottomStyle=style.borderBottomColor=""; |
| 5819 |
}}}), |
| 5820 |
resetLeft:qx.core.Variant.select("qx.client", |
| 5821 |
{"gecko":function(widget){var style=widget._style; |
| 5822 |
if(style){style.borderLeftWidth=style.borderLeftStyle=style.borderLeftColor=style.MozBorderLeftColors=""; |
| 5823 |
}}, |
| 5824 |
"default":function(widget){var style=widget._style; |
| 5825 |
if(style){style.borderLeftWidth=style.borderLeftStyle=style.borderLeftColor=""; |
| 5826 |
}style=widget._innerStyle; |
| 5827 |
if(style){style.borderLeftWidth=style.borderLeftStyle=style.borderLeftColor=""; |
| 5828 |
}}})}, |
| 5829 |
properties:{widthTop:{check:"Number", |
| 5830 |
init:0, |
| 5831 |
apply:"_applyWidthTop"}, |
| 5832 |
widthRight:{check:"Number", |
| 5833 |
init:0, |
| 5834 |
apply:"_applyWidthRight"}, |
| 5835 |
widthBottom:{check:"Number", |
| 5836 |
init:0, |
| 5837 |
apply:"_applyWidthBottom"}, |
| 5838 |
widthLeft:{check:"Number", |
| 5839 |
init:0, |
| 5840 |
apply:"_applyWidthLeft"}, |
| 5841 |
styleTop:{nullable:true, |
| 5842 |
check:["solid", |
| 5843 |
"dotted", |
| 5844 |
"dashed", |
| 5845 |
"double", |
| 5846 |
"outset", |
| 5847 |
"inset", |
| 5848 |
"ridge", |
| 5849 |
"groove"], |
| 5850 |
init:"solid", |
| 5851 |
apply:"_applyStyleTop"}, |
| 5852 |
styleRight:{nullable:true, |
| 5853 |
check:["solid", |
| 5854 |
"dotted", |
| 5855 |
"dashed", |
| 5856 |
"double", |
| 5857 |
"outset", |
| 5858 |
"inset", |
| 5859 |
"ridge", |
| 5860 |
"groove"], |
| 5861 |
init:"solid", |
| 5862 |
apply:"_applyStyleRight"}, |
| 5863 |
styleBottom:{nullable:true, |
| 5864 |
check:["solid", |
| 5865 |
"dotted", |
| 5866 |
"dashed", |
| 5867 |
"double", |
| 5868 |
"outset", |
| 5869 |
"inset", |
| 5870 |
"ridge", |
| 5871 |
"groove"], |
| 5872 |
init:"solid", |
| 5873 |
apply:"_applyStyleBottom"}, |
| 5874 |
styleLeft:{nullable:true, |
| 5875 |
check:["solid", |
| 5876 |
"dotted", |
| 5877 |
"dashed", |
| 5878 |
"double", |
| 5879 |
"outset", |
| 5880 |
"inset", |
| 5881 |
"ridge", |
| 5882 |
"groove"], |
| 5883 |
init:"solid", |
| 5884 |
apply:"_applyStyleLeft"}, |
| 5885 |
colorTop:{nullable:true, |
| 5886 |
check:"Color", |
| 5887 |
apply:"_applyColorTop"}, |
| 5888 |
colorRight:{nullable:true, |
| 5889 |
check:"Color", |
| 5890 |
apply:"_applyColorRight"}, |
| 5891 |
colorBottom:{nullable:true, |
| 5892 |
check:"Color", |
| 5893 |
apply:"_applyColorBottom"}, |
| 5894 |
colorLeft:{nullable:true, |
| 5895 |
check:"Color", |
| 5896 |
apply:"_applyColorLeft"}, |
| 5897 |
colorInnerTop:{nullable:true, |
| 5898 |
check:"Color", |
| 5899 |
apply:"_applyColorInnerTop"}, |
| 5900 |
colorInnerRight:{nullable:true, |
| 5901 |
check:"Color", |
| 5902 |
apply:"_applyColorInnerRight"}, |
| 5903 |
colorInnerBottom:{nullable:true, |
| 5904 |
check:"Color", |
| 5905 |
apply:"_applyColorInnerBottom"}, |
| 5906 |
colorInnerLeft:{nullable:true, |
| 5907 |
check:"Color", |
| 5908 |
apply:"_applyColorInnerLeft"}, |
| 5909 |
left:{group:["widthLeft", |
| 5910 |
"styleLeft", |
| 5911 |
"colorLeft"]}, |
| 5912 |
right:{group:["widthRight", |
| 5913 |
"styleRight", |
| 5914 |
"colorRight"]}, |
| 5915 |
top:{group:["widthTop", |
| 5916 |
"styleTop", |
| 5917 |
"colorTop"]}, |
| 5918 |
bottom:{group:["widthBottom", |
| 5919 |
"styleBottom", |
| 5920 |
"colorBottom"]}, |
| 5921 |
width:{group:["widthTop", |
| 5922 |
"widthRight", |
| 5923 |
"widthBottom", |
| 5924 |
"widthLeft"], |
| 5925 |
mode:"shorthand"}, |
| 5926 |
style:{group:["styleTop", |
| 5927 |
"styleRight", |
| 5928 |
"styleBottom", |
| 5929 |
"styleLeft"], |
| 5930 |
mode:"shorthand"}, |
| 5931 |
color:{group:["colorTop", |
| 5932 |
"colorRight", |
| 5933 |
"colorBottom", |
| 5934 |
"colorLeft"], |
| 5935 |
mode:"shorthand"}, |
| 5936 |
innerColor:{group:["colorInnerTop", |
| 5937 |
"colorInnerRight", |
| 5938 |
"colorInnerBottom", |
| 5939 |
"colorInnerLeft"], |
| 5940 |
mode:"shorthand"}}, |
| 5941 |
members:{_applyWidthTop:function(value, |
| 5942 |
old){this.__widthTop=value==null?"0px":value+"px"; |
| 5943 |
this.__computeComplexTop(); |
| 5944 |
this.__informManager("top"); |
| 5945 |
}, |
| 5946 |
_applyWidthRight:function(value, |
| 5947 |
old){this.__widthRight=value==null?"0px":value+"px"; |
| 5948 |
this.__computeComplexRight(); |
| 5949 |
this.__informManager("right"); |
| 5950 |
}, |
| 5951 |
_applyWidthBottom:function(value, |
| 5952 |
old){this.__widthBottom=value==null?"0px":value+"px"; |
| 5953 |
this.__computeComplexBottom(); |
| 5954 |
this.__informManager("bottom"); |
| 5955 |
}, |
| 5956 |
_applyWidthLeft:function(value, |
| 5957 |
old){this.__widthLeft=value==null?"0px":value+"px"; |
| 5958 |
this.__computeComplexLeft(); |
| 5959 |
this.__informManager("left"); |
| 5960 |
}, |
| 5961 |
_applyColorTop:function(value, |
| 5962 |
old){qx.theme.manager.Color.getInstance().connect(this._changeColorTop, |
| 5963 |
this, |
| 5964 |
value); |
| 5965 |
}, |
| 5966 |
_applyColorRight:function(value, |
| 5967 |
old){qx.theme.manager.Color.getInstance().connect(this._changeColorRight, |
| 5968 |
this, |
| 5969 |
value); |
| 5970 |
}, |
| 5971 |
_applyColorBottom:function(value, |
| 5972 |
old){qx.theme.manager.Color.getInstance().connect(this._changeColorBottom, |
| 5973 |
this, |
| 5974 |
value); |
| 5975 |
}, |
| 5976 |
_applyColorLeft:function(value, |
| 5977 |
old){qx.theme.manager.Color.getInstance().connect(this._changeColorLeft, |
| 5978 |
this, |
| 5979 |
value); |
| 5980 |
}, |
| 5981 |
_applyColorInnerTop:function(value, |
| 5982 |
old){qx.theme.manager.Color.getInstance().connect(this._changeColorInnerTop, |
| 5983 |
this, |
| 5984 |
value); |
| 5985 |
}, |
| 5986 |
_applyColorInnerRight:function(value, |
| 5987 |
old){qx.theme.manager.Color.getInstance().connect(this._changeColorInnerRight, |
| 5988 |
this, |
| 5989 |
value); |
| 5990 |
}, |
| 5991 |
_applyColorInnerBottom:function(value, |
| 5992 |
old){qx.theme.manager.Color.getInstance().connect(this._changeColorInnerBottom, |
| 5993 |
this, |
| 5994 |
value); |
| 5995 |
}, |
| 5996 |
_applyColorInnerLeft:function(value, |
| 5997 |
old){qx.theme.manager.Color.getInstance().connect(this._changeColorInnerLeft, |
| 5998 |
this, |
| 5999 |
value); |
| 6000 |
}, |
| 6001 |
_applyStyleTop:function(){this.__informManager("top"); |
| 6002 |
}, |
| 6003 |
_applyStyleRight:function(){this.__informManager("right"); |
| 6004 |
}, |
| 6005 |
_applyStyleBottom:function(){this.__informManager("bottom"); |
| 6006 |
}, |
| 6007 |
_applyStyleLeft:function(){this.__informManager("left"); |
| 6008 |
}, |
| 6009 |
_changeColorTop:function(value){this.__colorTop=value; |
| 6010 |
this.__computeComplexTop(); |
| 6011 |
this.__informManager("top"); |
| 6012 |
}, |
| 6013 |
_changeColorInnerTop:function(value){this.__colorInnerTop=value; |
| 6014 |
this.__computeComplexTop(); |
| 6015 |
this.__informManager("top"); |
| 6016 |
}, |
| 6017 |
_changeColorRight:function(value){this.__colorRight=value; |
| 6018 |
this.__computeComplexRight(); |
| 6019 |
this.__informManager("right"); |
| 6020 |
}, |
| 6021 |
_changeColorInnerRight:function(value){this.__colorInnerRight=value; |
| 6022 |
this.__computeComplexRight(); |
| 6023 |
this.__informManager("right"); |
| 6024 |
}, |
| 6025 |
_changeColorBottom:function(value){this.__colorBottom=value; |
| 6026 |
this.__computeComplexBottom(); |
| 6027 |
this.__informManager("bottom"); |
| 6028 |
}, |
| 6029 |
_changeColorInnerBottom:function(value){this.__colorInnerBottom=value; |
| 6030 |
this.__computeComplexBottom(); |
| 6031 |
this.__informManager("bottom"); |
| 6032 |
}, |
| 6033 |
_changeColorLeft:function(value){this.__colorLeft=value; |
| 6034 |
this.__computeComplexLeft(); |
| 6035 |
this.__informManager("left"); |
| 6036 |
}, |
| 6037 |
_changeColorInnerLeft:function(value){this.__colorInnerLeft=value; |
| 6038 |
this.__computeComplexLeft(); |
| 6039 |
this.__informManager("left"); |
| 6040 |
}, |
| 6041 |
__computeComplexTop:function(){this.__complexTop=this.getWidthTop()===2&&this.__colorInnerTop!=null&&this.__colorTop!=this.__colorInnerTop; |
| 6042 |
}, |
| 6043 |
__computeComplexRight:function(){this.__complexRight=this.getWidthRight()===2&&this.__colorInnerRight!=null&&this.__colorRight!=this.__colorInnerRight; |
| 6044 |
}, |
| 6045 |
__computeComplexBottom:function(){this.__complexBottom=this.getWidthBottom()===2&&this.__colorInnerBottom!=null&&this.__colorBottom!=this.__colorInnerBottom; |
| 6046 |
}, |
| 6047 |
__computeComplexLeft:function(){this.__complexLeft=this.getWidthLeft()===2&&this.__colorInnerLeft!=null&&this.__colorLeft!=this.__colorInnerLeft; |
| 6048 |
}, |
| 6049 |
__informManager:function(edge){qx.theme.manager.Border.getInstance().updateObjectsEdge(this, |
| 6050 |
edge); |
| 6051 |
}, |
| 6052 |
renderTop:qx.core.Variant.select("qx.client", |
| 6053 |
{"gecko":function(obj){var style=obj._style; |
| 6054 |
style.borderTopWidth=this.__widthTop||"0px"; |
| 6055 |
style.borderTopColor=this.__colorTop||""; |
| 6056 |
if(this.__complexTop){style.borderTopStyle="solid"; |
| 6057 |
style.MozBorderTopColors=this.__colorTop+" "+this.__colorInnerTop; |
| 6058 |
}else{style.borderTopStyle=this.getStyleTop()||"none"; |
| 6059 |
style.MozBorderTopColors=""; |
| 6060 |
}}, |
| 6061 |
"default":function(obj){var outer=obj._style; |
| 6062 |
var inner=obj._innerStyle; |
| 6063 |
if(this.__complexTop){if(!inner){obj.prepareEnhancedBorder(); |
| 6064 |
inner=obj._innerStyle; |
| 6065 |
}outer.borderTopWidth=inner.borderTopWidth="1px"; |
| 6066 |
outer.borderTopStyle=inner.borderTopStyle="solid"; |
| 6067 |
outer.borderTopColor=this.__colorTop; |
| 6068 |
inner.borderTopColor=this.__colorInnerTop; |
| 6069 |
}else{outer.borderTopWidth=this.__widthTop||"0px"; |
| 6070 |
outer.borderTopStyle=this.getStyleTop()||"none"; |
| 6071 |
outer.borderTopColor=this.__colorTop||""; |
| 6072 |
if(inner){inner.borderTopWidth=inner.borderTopStyle=inner.borderTopColor=""; |
| 6073 |
}}}}), |
| 6074 |
renderRight:qx.core.Variant.select("qx.client", |
| 6075 |
{"gecko":function(obj){var style=obj._style; |
| 6076 |
style.borderRightWidth=this.__widthRight||"0px"; |
| 6077 |
style.borderRightColor=this.__colorRight||""; |
| 6078 |
if(this.__complexRight){style.borderRightStyle="solid"; |
| 6079 |
style.MozBorderRightColors=this.__colorRight+" "+this.__colorInnerRight; |
| 6080 |
}else{style.borderRightStyle=this.getStyleRight()||"none"; |
| 6081 |
style.MozBorderRightColors=""; |
| 6082 |
}}, |
| 6083 |
"default":function(obj){var outer=obj._style; |
| 6084 |
var inner=obj._innerStyle; |
| 6085 |
if(this.__complexRight){if(!inner){obj.prepareEnhancedBorder(); |
| 6086 |
inner=obj._innerStyle; |
| 6087 |
}outer.borderRightWidth=inner.borderRightWidth="1px"; |
| 6088 |
outer.borderRightStyle=inner.borderRightStyle="solid"; |
| 6089 |
outer.borderRightColor=this.__colorRight; |
| 6090 |
inner.borderRightColor=this.__colorInnerRight; |
| 6091 |
}else{outer.borderRightWidth=this.__widthRight||"0px"; |
| 6092 |
outer.borderRightStyle=this.getStyleRight()||"none"; |
| 6093 |
outer.borderRightColor=this.__colorRight||""; |
| 6094 |
if(inner){inner.borderRightWidth=inner.borderRightStyle=inner.borderRightColor=""; |
| 6095 |
}}}}), |
| 6096 |
renderBottom:qx.core.Variant.select("qx.client", |
| 6097 |
{"gecko":function(obj){var style=obj._style; |
| 6098 |
style.borderBottomWidth=this.__widthBottom||"0px"; |
| 6099 |
style.borderBottomColor=this.__colorBottom||""; |
| 6100 |
if(this.__complexBottom){style.borderBottomStyle="solid"; |
| 6101 |
style.MozBorderBottomColors=this.__colorBottom+" "+this.__colorInnerBottom; |
| 6102 |
}else{style.borderBottomStyle=this.getStyleBottom()||"none"; |
| 6103 |
style.MozBorderBottomColors=""; |
| 6104 |
}}, |
| 6105 |
"default":function(obj){var outer=obj._style; |
| 6106 |
var inner=obj._innerStyle; |
| 6107 |
if(this.__complexBottom){if(!inner){obj.prepareEnhancedBorder(); |
| 6108 |
inner=obj._innerStyle; |
| 6109 |
}outer.borderBottomWidth=inner.borderBottomWidth="1px"; |
| 6110 |
outer.borderBottomStyle=inner.borderBottomStyle="solid"; |
| 6111 |
outer.borderBottomColor=this.__colorBottom; |
| 6112 |
inner.borderBottomColor=this.__colorInnerBottom; |
| 6113 |
}else{outer.borderBottomWidth=this.__widthBottom||"0px"; |
| 6114 |
outer.borderBottomStyle=this.getStyleBottom()||"none"; |
| 6115 |
outer.borderBottomColor=this.__colorBottom||""; |
| 6116 |
if(inner){inner.borderBottomWidth=inner.borderBottomStyle=inner.borderBottomColor=""; |
| 6117 |
}}}}), |
| 6118 |
renderLeft:qx.core.Variant.select("qx.client", |
| 6119 |
{"gecko":function(obj){var style=obj._style; |
| 6120 |
style.borderLeftWidth=this.__widthLeft||"0px"; |
| 6121 |
style.borderLeftColor=this.__colorLeft||""; |
| 6122 |
if(this.__complexLeft){style.borderLeftStyle="solid"; |
| 6123 |
style.MozBorderLeftColors=this.__colorLeft+" "+this.__colorInnerLeft; |
| 6124 |
}else{style.borderLeftStyle=this.getStyleLeft()||"none"; |
| 6125 |
style.MozBorderLeftColors=""; |
| 6126 |
}}, |
| 6127 |
"default":function(obj){var outer=obj._style; |
| 6128 |
var inner=obj._innerStyle; |
| 6129 |
if(this.__complexLeft){if(!inner){obj.prepareEnhancedBorder(); |
| 6130 |
inner=obj._innerStyle; |
| 6131 |
}outer.borderLeftWidth=inner.borderLeftWidth="1px"; |
| 6132 |
outer.borderLeftStyle=inner.borderLeftStyle="solid"; |
| 6133 |
outer.borderLeftColor=this.__colorLeft; |
| 6134 |
inner.borderLeftColor=this.__colorInnerLeft; |
| 6135 |
}else{outer.borderLeftWidth=this.__widthLeft||"0px"; |
| 6136 |
outer.borderLeftStyle=this.getStyleLeft()||"none"; |
| 6137 |
outer.borderLeftColor=this.__colorLeft||""; |
| 6138 |
if(inner){inner.borderLeftWidth=inner.borderLeftStyle=inner.borderLeftColor=""; |
| 6139 |
}}}})}}); |
| 6140 |
|
| 6141 |
|
| 6142 |
|
| 6143 |
|
| 6144 |
/* ID: qx.theme.manager.Font */ |
| 6145 |
qx.Class.define("qx.theme.manager.Font", |
| 6146 |
{type:"singleton", |
| 6147 |
extend:qx.util.manager.Value, |
| 6148 |
properties:{fontTheme:{check:"Theme", |
| 6149 |
nullable:true, |
| 6150 |
apply:"_applyFontTheme", |
| 6151 |
event:"changeFontTheme"}}, |
| 6152 |
members:{resolveDynamic:function(value){return value instanceof qx.ui.core.Font?value:this._dynamic[value]; |
| 6153 |
}, |
| 6154 |
isDynamic:function(value){return value&&(value instanceof qx.ui.core.Font||this._dynamic[value]!==undefined); |
| 6155 |
}, |
| 6156 |
syncFontTheme:function(){this._updateObjects(); |
| 6157 |
}, |
| 6158 |
_applyFontTheme:function(value){var dest=this._dynamic; |
| 6159 |
for(var key in dest){if(dest[key].themed){dest[key].dispose(); |
| 6160 |
delete dest[key]; |
| 6161 |
}} |
| 6162 |
if(value){var source=value.fonts; |
| 6163 |
var font=qx.ui.core.Font; |
| 6164 |
for(var key in source){dest[key]=(new font).set(source[key]); |
| 6165 |
dest[key].themed=true; |
| 6166 |
}} |
| 6167 |
if(qx.theme.manager.Meta.getInstance().getAutoSync()){this.syncFontTheme(); |
| 6168 |
}}}}); |
| 6169 |
|
| 6170 |
|
| 6171 |
|
| 6172 |
|
| 6173 |
/* ID: qx.ui.core.Font */ |
| 6174 |
qx.Class.define("qx.ui.core.Font", |
| 6175 |
{extend:qx.core.Object, |
| 6176 |
construct:function(size, |
| 6177 |
family){this.base(arguments); |
| 6178 |
if(size!==undefined){this.setSize(size); |
| 6179 |
} |
| 6180 |
if(family!==undefined){this.setFamily(family); |
| 6181 |
}}, |
| 6182 |
statics:{fromString:function(str){var font=new qx.ui.core.Font; |
| 6183 |
var parts=str.split(/\s+/); |
| 6184 |
var name=[]; |
| 6185 |
var part; |
| 6186 |
for(var i=0;i<parts.length;i++){switch(part=parts[i]){case "bold":font.setBold(true); |
| 6187 |
break; |
| 6188 |
case "italic":font.setItalic(true); |
| 6189 |
break; |
| 6190 |
case "underline":font.setDecoration("underline"); |
| 6191 |
break; |
| 6192 |
default:var temp=parseInt(part); |
| 6193 |
if(temp==part||qx.lang.String.contains(part, |
| 6194 |
"px")){font.setSize(temp); |
| 6195 |
}else{name.push(part); |
| 6196 |
}break; |
| 6197 |
}} |
| 6198 |
if(name.length>0){font.setFamily(name); |
| 6199 |
}return font; |
| 6200 |
}, |
| 6201 |
fromConfig:function(config){var font=new qx.ui.core.Font; |
| 6202 |
font.set(config); |
| 6203 |
return font; |
| 6204 |
}, |
| 6205 |
reset:function(widget){widget.removeStyleProperty("fontFamily"); |
| 6206 |
widget.removeStyleProperty("fontSize"); |
| 6207 |
widget.removeStyleProperty("fontWeight"); |
| 6208 |
widget.removeStyleProperty("fontStyle"); |
| 6209 |
widget.removeStyleProperty("textDecoration"); |
| 6210 |
}, |
| 6211 |
resetElement:function(element){var style=element.style; |
| 6212 |
style.fontFamily=""; |
| 6213 |
style.fontSize=""; |
| 6214 |
style.fontWeight=""; |
| 6215 |
style.fontStyle=""; |
| 6216 |
style.textDecoration=""; |
| 6217 |
}, |
| 6218 |
resetStyle:function(style){style.fontFamily=""; |
| 6219 |
style.fontSize=""; |
| 6220 |
style.fontWeight=""; |
| 6221 |
style.fontStyle=""; |
| 6222 |
style.textDecoration=""; |
| 6223 |
}}, |
| 6224 |
properties:{size:{check:"Integer", |
| 6225 |
nullable:true, |
| 6226 |
apply:"_applySize"}, |
| 6227 |
family:{check:"Array", |
| 6228 |
nullable:true, |
| 6229 |
apply:"_applyFamily"}, |
| 6230 |
bold:{check:"Boolean", |
| 6231 |
nullable:true, |
| 6232 |
apply:"_applyBold"}, |
| 6233 |
italic:{check:"Boolean", |
| 6234 |
nullable:true, |
| 6235 |
apply:"_applyItalic"}, |
| 6236 |
decoration:{check:["underline", |
| 6237 |
"line-through", |
| 6238 |
"overline"], |
| 6239 |
nullable:true, |
| 6240 |
apply:"_applyDecoration"}}, |
| 6241 |
members:{__size:null, |
| 6242 |
__family:null, |
| 6243 |
__bold:null, |
| 6244 |
__italic:null, |
| 6245 |
__decoration:null, |
| 6246 |
_applySize:function(value, |
| 6247 |
old){this.__size=value===null?null:value+"px"; |
| 6248 |
}, |
| 6249 |
_applyFamily:function(value, |
| 6250 |
old){var family=""; |
| 6251 |
for(var i=0, |
| 6252 |
l=value.length;i<l;i++){if(value[i].indexOf(" ")>0){family+='"'+value[i]+'"'; |
| 6253 |
}else{family+=value[i]; |
| 6254 |
} |
| 6255 |
if(i!=l-1){family+=","; |
| 6256 |
}}this.__family=family; |
| 6257 |
}, |
| 6258 |
_applyBold:function(value, |
| 6259 |
old){this.__bold=value===null?null:value?"bold":"normal"; |
| 6260 |
}, |
| 6261 |
_applyItalic:function(value, |
| 6262 |
old){this.__italic=value===null?null:value?"italic":"normal"; |
| 6263 |
}, |
| 6264 |
_applyDecoration:function(value, |
| 6265 |
old){this.__decoration=value===null?null:value; |
| 6266 |
}, |
| 6267 |
render:function(widget){widget.setStyleProperty("fontFamily", |
| 6268 |
this.__family); |
| 6269 |
widget.setStyleProperty("fontSize", |
| 6270 |
this.__size); |
| 6271 |
widget.setStyleProperty("fontWeight", |
| 6272 |
this.__bold); |
| 6273 |
widget.setStyleProperty("fontStyle", |
| 6274 |
this.__italic); |
| 6275 |
widget.setStyleProperty("textDecoration", |
| 6276 |
this.__decoration); |
| 6277 |
}, |
| 6278 |
renderStyle:function(style){style.fontFamily=this.__family||""; |
| 6279 |
style.fontSize=this.__size||""; |
| 6280 |
style.fontWeight=this.__bold||""; |
| 6281 |
style.fontStyle=this.__italic||""; |
| 6282 |
style.textDecoration=this.__decoration||""; |
| 6283 |
}, |
| 6284 |
renderElement:function(element){var style=element.style; |
| 6285 |
style.fontFamily=this.__family||""; |
| 6286 |
style.fontSize=this.__size||""; |
| 6287 |
style.fontWeight=this.__bold||""; |
| 6288 |
style.fontStyle=this.__italic||""; |
| 6289 |
style.textDecoration=this.__decoration||""; |
| 6290 |
}, |
| 6291 |
generateStyle:function(){return (this.__family?"font-family:"+this.__family.replace(/\"/g, |
| 6292 |
"'")+";":"")+(this.__size?"font-size:"+this.__size+";":"")+(this.__weight?"font-weight:"+this.__weight+";":"")+(this.__style?"font-style:"+this.__style+";":"")+(this.__decoration?"text-decoration:"+this.__decoration+";":""); |
| 6293 |
}}}); |
| 6294 |
|
| 6295 |
|
| 6296 |
|
| 6297 |
|
| 6298 |
/* ID: qx.theme.manager.Icon */ |
| 6299 |
qx.Class.define("qx.theme.manager.Icon", |
| 6300 |
{type:"singleton", |
| 6301 |
extend:qx.core.Target, |
| 6302 |
properties:{iconTheme:{check:"Theme", |
| 6303 |
nullable:true, |
| 6304 |
apply:"_applyIconTheme", |
| 6305 |
event:"changeIconTheme"}}, |
| 6306 |
members:{_applyIconTheme:function(value, |
| 6307 |
old){if(qx.theme.manager.Meta.getInstance().getAutoSync()){this.syncIconTheme(); |
| 6308 |
}}, |
| 6309 |
syncIconTheme:function(){var value=this.getIconTheme(); |
| 6310 |
var alias=qx.io.Alias.getInstance(); |
| 6311 |
value?alias.add("icon", |
| 6312 |
value.icons.uri):alias.remove("icon"); |
| 6313 |
}}}); |
| 6314 |
|
| 6315 |
|
| 6316 |
|
| 6317 |
|
| 6318 |
/* ID: qx.io.Alias */ |
| 6319 |
qx.Class.define("qx.io.Alias", |
| 6320 |
{type:"singleton", |
| 6321 |
extend:qx.util.manager.Value, |
| 6322 |
construct:function(){this.base(arguments); |
| 6323 |
this._aliases={}; |
| 6324 |
this.add("static", |
| 6325 |
qx.core.Setting.get("qx.resourceUri")+"/static"); |
| 6326 |
}, |
| 6327 |
members:{_preprocess:function(value){var dynamics=this._dynamic; |
| 6328 |
if(dynamics[value]===false){return value; |
| 6329 |
}else if(dynamics[value]===undefined){if(value.charAt(0)==="/"||value.charAt(0)==="."||value.indexOf("http://")===0||value.indexOf("https://")==="0"||value.indexOf("file://")===0){dynamics[value]=false; |
| 6330 |
return value; |
| 6331 |
}var alias=value.substring(0, |
| 6332 |
value.indexOf("/")); |
| 6333 |
var resolved=this._aliases[alias]; |
| 6334 |
if(resolved!==undefined){dynamics[value]=resolved+value.substring(alias.length); |
| 6335 |
}}return value; |
| 6336 |
}, |
| 6337 |
add:function(alias, |
| 6338 |
base){this._aliases[alias]=base; |
| 6339 |
var dynamics=this._dynamic; |
| 6340 |
var reg=this._registry; |
| 6341 |
var entry; |
| 6342 |
var paths={}; |
| 6343 |
for(var path in dynamics){if(path.substring(0, |
| 6344 |
path.indexOf("/"))===alias){dynamics[path]=base+path.substring(alias.length); |
| 6345 |
paths[path]=true; |
| 6346 |
}}for(var key in reg){entry=reg[key]; |
| 6347 |
if(paths[entry.value]){entry.callback.call(entry.object, |
| 6348 |
dynamics[entry.value]); |
| 6349 |
}}}, |
| 6350 |
remove:function(alias){delete this._aliases[alias]; |
| 6351 |
}, |
| 6352 |
resolve:function(path){if(path!==null){path=this._preprocess(path); |
| 6353 |
}return this._dynamic[path]||path; |
| 6354 |
}}, |
| 6355 |
destruct:function(){this._disposeFields("_aliases"); |
| 6356 |
}}); |
| 6357 |
|
| 6358 |
|
| 6359 |
|
| 6360 |
|
| 6361 |
/* ID: qx.theme.manager.Widget */ |
| 6362 |
qx.Class.define("qx.theme.manager.Widget", |
| 6363 |
{type:"singleton", |
| 6364 |
extend:qx.core.Target, |
| 6365 |
properties:{widgetTheme:{check:"Theme", |
| 6366 |
nullable:true, |
| 6367 |
apply:"_applyWidgetTheme", |
| 6368 |
event:"changeWidgetTheme"}}, |
| 6369 |
members:{_applyWidgetTheme:function(value, |
| 6370 |
old){if(qx.theme.manager.Meta.getInstance().getAutoSync()){this.syncWidgetTheme(); |
| 6371 |
}}, |
| 6372 |
syncWidgetTheme:function(){var value=this.getWidgetTheme(); |
| 6373 |
var alias=qx.io.Alias.getInstance(); |
| 6374 |
value?alias.add("widget", |
| 6375 |
value.widgets.uri):alias.remove("widget"); |
| 6376 |
}}}); |
| 6377 |
|
| 6378 |
|
| 6379 |
|
| 6380 |
|
| 6381 |
/* ID: qx.util.manager.Object */ |
| 6382 |
qx.Class.define("qx.util.manager.Object", |
| 6383 |
{extend:qx.core.Target, |
| 6384 |
construct:function(){this.base(arguments); |
| 6385 |
this._objects={}; |
| 6386 |
}, |
| 6387 |
members:{add:function(vObject){if(this.getDisposed()){return; |
| 6388 |
}this._objects[vObject.toHashCode()]=vObject; |
| 6389 |
}, |
| 6390 |
remove:function(vObject){if(this.getDisposed()){return false; |
| 6391 |
}delete this._objects[vObject.toHashCode()]; |
| 6392 |
}, |
| 6393 |
has:function(vObject){return this._objects[vObject.toHashCode()]!=null; |
| 6394 |
}, |
| 6395 |
get:function(vObject){return this._objects[vObject.toHashCode()]; |
| 6396 |
}, |
| 6397 |
getAll:function(){return this._objects; |
| 6398 |
}, |
| 6399 |
enableAll:function(){for(var vHashCode in this._objects){this._objects[vHashCode].setEnabled(true); |
| 6400 |
}}, |
| 6401 |
disableAll:function(){for(var vHashCode in this._objects){this._objects[vHashCode].setEnabled(false); |
| 6402 |
}}}, |
| 6403 |
destruct:function(){this._disposeObjectDeep("_objects"); |
| 6404 |
}}); |
| 6405 |
|
| 6406 |
|
| 6407 |
|
| 6408 |
|
| 6409 |
/* ID: qx.theme.manager.Appearance */ |
| 6410 |
qx.Class.define("qx.theme.manager.Appearance", |
| 6411 |
{type:"singleton", |
| 6412 |
extend:qx.util.manager.Object, |
| 6413 |
construct:function(){this.base(arguments); |
| 6414 |
this.__cache={}; |
| 6415 |
this.__stateMap={}; |
| 6416 |
this.__stateMapLength=1; |
| 6417 |
}, |
| 6418 |
properties:{appearanceTheme:{check:"Theme", |
| 6419 |
nullable:true, |
| 6420 |
apply:"_applyAppearanceTheme", |
| 6421 |
event:"changeAppearanceTheme"}}, |
| 6422 |
members:{_applyAppearanceTheme:function(value, |
| 6423 |
old){this._currentTheme=value; |
| 6424 |
this._oldTheme=old; |
| 6425 |
if(qx.theme.manager.Meta.getInstance().getAutoSync()){this.syncAppearanceTheme(); |
| 6426 |
}}, |
| 6427 |
syncAppearanceTheme:function(){if(!this._currentTheme&&!this._oldTheme){return; |
| 6428 |
} |
| 6429 |
if(this._currentTheme){this.__cache[this._currentTheme.name]={}; |
| 6430 |
}var app=qx.core.Init.getInstance().getApplication(); |
| 6431 |
if(app&&app.getUiReady()){qx.ui.core.ClientDocument.getInstance()._recursiveAppearanceThemeUpdate(this._currentTheme, |
| 6432 |
this._oldTheme); |
| 6433 |
} |
| 6434 |
if(this._oldTheme){delete this.__cache[this._oldTheme.name]; |
| 6435 |
}delete this._currentTheme; |
| 6436 |
delete this._oldTheme; |
| 6437 |
}, |
| 6438 |
styleFrom:function(id, |
| 6439 |
states){var theme=this.getAppearanceTheme(); |
| 6440 |
if(!theme){return; |
| 6441 |
}return this.styleFromTheme(theme, |
| 6442 |
id, |
| 6443 |
states); |
| 6444 |
}, |
| 6445 |
styleFromTheme:function(theme, |
| 6446 |
id, |
| 6447 |
states){var entry=theme.appearances[id]; |
| 6448 |
if(!entry){{this.warn("Missing appearance entry: "+id); |
| 6449 |
}; |
| 6450 |
return null; |
| 6451 |
}if(!entry.style){if(entry.include){return this.styleFromTheme(theme, |
| 6452 |
entry.include, |
| 6453 |
states); |
| 6454 |
}else{return null; |
| 6455 |
}}var map=this.__stateMap; |
| 6456 |
var helper=[id]; |
| 6457 |
for(var state in states){if(!map[state]){map[state]=this.__stateMapLength++; |
| 6458 |
}helper[map[state]]=true; |
| 6459 |
}var unique=helper.join(); |
| 6460 |
var cache=this.__cache[theme.name]; |
| 6461 |
if(cache&&cache[unique]!==undefined){return cache[unique]; |
| 6462 |
}var result; |
| 6463 |
if(entry.include||entry.base){var local=entry.style(states); |
| 6464 |
var incl; |
| 6465 |
if(entry.include){incl=this.styleFromTheme(theme, |
| 6466 |
entry.include, |
| 6467 |
states); |
| 6468 |
}result={}; |
| 6469 |
if(entry.base){var base=this.styleFromTheme(entry.base, |
| 6470 |
id, |
| 6471 |
states); |
| 6472 |
if(entry.include){for(var key in base){if(incl[key]===undefined&&local[key]===undefined){result[key]=base[key]; |
| 6473 |
}}}else{for(var key in base){if(local[key]===undefined){result[key]=base[key]; |
| 6474 |
}}}}if(entry.include){for(var key in incl){if(local[key]===undefined){result[key]=incl[key]; |
| 6475 |
}}}for(var key in local){result[key]=local[key]; |
| 6476 |
}}else{result=entry.style(states); |
| 6477 |
}if(cache){cache[unique]=result||null; |
| 6478 |
}return result||null; |
| 6479 |
}}, |
| 6480 |
destruct:function(){this._disposeFields("__cache", |
| 6481 |
"__stateMap"); |
| 6482 |
}}); |
| 6483 |
|
| 6484 |
|
| 6485 |
|
| 6486 |
|
| 6487 |
/* ID: qx.ui.core.Widget */ |
| 6488 |
qx.Class.define("qx.ui.core.Widget", |
| 6489 |
{extend:qx.core.Target, |
| 6490 |
type:"abstract", |
| 6491 |
construct:function(){this.base(arguments); |
| 6492 |
this._layoutChanges={}; |
| 6493 |
if(qx.core.Setting.get("qx.widgetDebugId")){this._generateHtmlId(); |
| 6494 |
}}, |
| 6495 |
events:{"beforeAppear":"qx.event.type.Event", |
| 6496 |
"appear":"qx.event.type.Event", |
| 6497 |
"beforeDisappear":"qx.event.type.Event", |
| 6498 |
"disappear":"qx.event.type.Event", |
| 6499 |
"beforeInsertDom":"qx.event.type.Event", |
| 6500 |
"insertDom":"qx.event.type.Event", |
| 6501 |
"beforeRemoveDom":"qx.event.type.Event", |
| 6502 |
"removeDom":"qx.event.type.Event", |
| 6503 |
"create":"qx.event.type.Event", |
| 6504 |
"execute":"qx.event.type.Event", |
| 6505 |
"mouseover":"qx.event.type.MouseEvent", |
| 6506 |
"mousemove":"qx.event.type.MouseEvent", |
| 6507 |
"mouseout":"qx.event.type.MouseEvent", |
| 6508 |
"mousedown":"qx.event.type.MouseEvent", |
| 6509 |
"mouseup":"qx.event.type.MouseEvent", |
| 6510 |
"mousewheel":"qx.event.type.MouseEvent", |
| 6511 |
"click":"qx.event.type.MouseEvent", |
| 6512 |
"dblclick":"qx.event.type.MouseEvent", |
| 6513 |
"contextmenu":"qx.event.type.MouseEvent", |
| 6514 |
"keydown":"qx.event.type.KeyEvent", |
| 6515 |
"keypress":"qx.event.type.KeyEvent", |
| 6516 |
"keyinput":"qx.event.type.KeyEvent", |
| 6517 |
"keyup":"qx.event.type.KeyEvent", |
| 6518 |
"focusout":"qx.event.type.FocusEvent", |
| 6519 |
"focusin":"qx.event.type.FocusEvent", |
| 6520 |
"blur":"qx.event.type.FocusEvent", |
| 6521 |
"focus":"qx.event.type.FocusEvent", |
| 6522 |
"dragdrop":"qx.event.type.DragEvent", |
| 6523 |
"dragout":"qx.event.type.DragEvent", |
| 6524 |
"dragover":"qx.event.type.DragEvent", |
| 6525 |
"dragmove":"qx.event.type.DragEvent", |
| 6526 |
"dragstart":"qx.event.type.DragEvent", |
| 6527 |
"dragend":"qx.event.type.DragEvent"}, |
| 6528 |
statics:{create:function(clazz, |
| 6529 |
appearance){clazz._appearance=appearance; |
| 6530 |
return new clazz; |
| 6531 |
}, |
| 6532 |
SCROLLBAR_SIZE:null, |
| 6533 |
_autoFlushTimeout:null, |
| 6534 |
_initAutoFlush:function(){if(qx.ui.core.Widget._autoFlushTimeout==null){qx.ui.core.Widget._autoFlushTimeout=window.setTimeout(qx.ui.core.Widget._autoFlushHelper, |
| 6535 |
0); |
| 6536 |
}}, |
| 6537 |
_removeAutoFlush:function(){if(qx.ui.core.Widget._autoFlushTimeout!=null){window.clearTimeout(qx.ui.core.Widget._autoFlushTimeout); |
| 6538 |
qx.ui.core.Widget._autoFlushTimeout=null; |
| 6539 |
}}, |
| 6540 |
_autoFlushHelper:function(){qx.ui.core.Widget._autoFlushTimeout=null; |
| 6541 |
if(!qx.core.Object.inGlobalDispose()){qx.ui.core.Widget.flushGlobalQueues(); |
| 6542 |
}}, |
| 6543 |
flushGlobalQueues:function(){if(qx.ui.core.Widget._autoFlushTimeout!=null){qx.ui.core.Widget._removeAutoFlush(); |
| 6544 |
} |
| 6545 |
if(qx.ui.core.Widget._inFlushGlobalQueues){return; |
| 6546 |
}var app=qx.core.Init.getInstance().getApplication(); |
| 6547 |
if(app.getUiReady&&!app.getUiReady()){return; |
| 6548 |
}qx.ui.core.Widget._inFlushGlobalQueues=true; |
| 6549 |
qx.ui.core.Widget.flushGlobalWidgetQueue(); |
| 6550 |
qx.ui.core.Widget.flushGlobalStateQueue(); |
| 6551 |
qx.ui.core.Widget.flushGlobalElementQueue(); |
| 6552 |
qx.ui.core.Widget.flushGlobalJobQueue(); |
| 6553 |
qx.ui.core.Widget.flushGlobalLayoutQueue(); |
| 6554 |
qx.ui.core.Widget.flushGlobalDisplayQueue(); |
| 6555 |
delete qx.ui.core.Widget._inFlushGlobalQueues; |
| 6556 |
}, |
| 6557 |
_globalWidgetQueue:[], |
| 6558 |
addToGlobalWidgetQueue:function(vWidget){if(!vWidget._isInGlobalWidgetQueue&&vWidget._isDisplayable){if(qx.ui.core.Widget._autoFlushTimeout==null){qx.ui.core.Widget._initAutoFlush(); |
| 6559 |
}qx.ui.core.Widget._globalWidgetQueue.push(vWidget); |
| 6560 |
vWidget._isInGlobalWidgetQueue=true; |
| 6561 |
}}, |
| 6562 |
removeFromGlobalWidgetQueue:function(vWidget){if(vWidget._isInGlobalWidgetQueue){qx.lang.Array.remove(qx.ui.core.Widget._globalWidgetQueue, |
| 6563 |
vWidget); |
| 6564 |
delete vWidget._isInGlobalWidgetQueue; |
| 6565 |
}}, |
| 6566 |
flushGlobalWidgetQueue:function(){var vQueue=qx.ui.core.Widget._globalWidgetQueue, |
| 6567 |
vLength, |
| 6568 |
vWidget; |
| 6569 |
while((vLength=vQueue.length)>0){for(var i=0;i<vLength;i++){vWidget=vQueue[i]; |
| 6570 |
vWidget.flushWidgetQueue(); |
| 6571 |
delete vWidget._isInGlobalWidgetQueue; |
| 6572 |
}vQueue.splice(0, |
| 6573 |
vLength); |
| 6574 |
}}, |
| 6575 |
_globalElementQueue:[], |
| 6576 |
addToGlobalElementQueue:function(vWidget){if(!vWidget._isInGlobalElementQueue&&vWidget._isDisplayable){if(qx.ui.core.Widget._autoFlushTimeout==null){qx.ui.core.Widget._initAutoFlush(); |
| 6577 |
}qx.ui.core.Widget._globalElementQueue.push(vWidget); |
| 6578 |
vWidget._isInGlobalElementQueue=true; |
| 6579 |
}}, |
| 6580 |
removeFromGlobalElementQueue:function(vWidget){if(vWidget._isInGlobalElementQueue){qx.lang.Array.remove(qx.ui.core.Widget._globalElementQueue, |
| 6581 |
vWidget); |
| 6582 |
delete vWidget._isInGlobalElementQueue; |
| 6583 |
}}, |
| 6584 |
flushGlobalElementQueue:function(){var vQueue=qx.ui.core.Widget._globalElementQueue, |
| 6585 |
vLength, |
| 6586 |
vWidget; |
| 6587 |
while((vLength=vQueue.length)>0){for(var i=0;i<vLength;i++){vWidget=vQueue[i]; |
| 6588 |
vWidget._createElementImpl(); |
| 6589 |
delete vWidget._isInGlobalElementQueue; |
| 6590 |
}vQueue.splice(0, |
| 6591 |
vLength); |
| 6592 |
}}, |
| 6593 |
_globalStateQueue:[], |
| 6594 |
addToGlobalStateQueue:function(vWidget){if(!vWidget._isInGlobalStateQueue&&vWidget._isDisplayable){if(qx.ui.core.Widget._autoFlushTimeout==null){qx.ui.core.Widget._initAutoFlush(); |
| 6595 |
}qx.ui.core.Widget._globalStateQueue.push(vWidget); |
| 6596 |
vWidget._isInGlobalStateQueue=true; |
| 6597 |
}}, |
| 6598 |
removeFromGlobalStateQueue:function(vWidget){if(vWidget._isInGlobalStateQueue){qx.lang.Array.remove(qx.ui.core.Widget._globalStateQueue, |
| 6599 |
vWidget); |
| 6600 |
delete vWidget._isInGlobalStateQueue; |
| 6601 |
}}, |
| 6602 |
flushGlobalStateQueue:function(){var vQueue=qx.ui.core.Widget._globalStateQueue, |
| 6603 |
vLength, |
| 6604 |
vWidget; |
| 6605 |
while((vLength=vQueue.length)>0){for(var i=0;i<vLength;i++){vWidget=vQueue[i]; |
| 6606 |
vWidget._renderAppearance(); |
| 6607 |
delete vWidget._isInGlobalStateQueue; |
| 6608 |
}vQueue.splice(0, |
| 6609 |
vLength); |
| 6610 |
}}, |
| 6611 |
_globalJobQueue:[], |
| 6612 |
addToGlobalJobQueue:function(vWidget){if(!vWidget._isInGlobalJobQueue&&vWidget._isDisplayable){if(qx.ui.core.Widget._autoFlushTimeout==null){qx.ui.core.Widget._initAutoFlush(); |
| 6613 |
}qx.ui.core.Widget._globalJobQueue.push(vWidget); |
| 6614 |
vWidget._isInGlobalJobQueue=true; |
| 6615 |
}}, |
| 6616 |
removeFromGlobalJobQueue:function(vWidget){if(vWidget._isInGlobalJobQueue){qx.lang.Array.remove(qx.ui.core.Widget._globalJobQueue, |
| 6617 |
vWidget); |
| 6618 |
delete vWidget._isInGlobalJobQueue; |
| 6619 |
}}, |
| 6620 |
flushGlobalJobQueue:function(){var vQueue=qx.ui.core.Widget._globalJobQueue, |
| 6621 |
vLength, |
| 6622 |
vWidget; |
| 6623 |
while((vLength=vQueue.length)>0){for(var i=0;i<vLength;i++){vWidget=vQueue[i]; |
| 6624 |
vWidget._flushJobQueue(vWidget._jobQueue); |
| 6625 |
delete vWidget._isInGlobalJobQueue; |
| 6626 |
}vQueue.splice(0, |
| 6627 |
vLength); |
| 6628 |
}}, |
| 6629 |
_globalLayoutQueue:[], |
| 6630 |
addToGlobalLayoutQueue:function(vParent){if(!vParent._isInGlobalLayoutQueue&&vParent._isDisplayable){if(qx.ui.core.Widget._autoFlushTimeout==null){qx.ui.core.Widget._initAutoFlush(); |
| 6631 |
}qx.ui.core.Widget._globalLayoutQueue.push(vParent); |
| 6632 |
vParent._isInGlobalLayoutQueue=true; |
| 6633 |
}}, |
| 6634 |
removeFromGlobalLayoutQueue:function(vParent){if(vParent._isInGlobalLayoutQueue){qx.lang.Array.remove(qx.ui.core.Widget._globalLayoutQueue, |
| 6635 |
vParent); |
| 6636 |
delete vParent._isInGlobalLayoutQueue; |
| 6637 |
}}, |
| 6638 |
flushGlobalLayoutQueue:function(){var vQueue=qx.ui.core.Widget._globalLayoutQueue, |
| 6639 |
vLength, |
| 6640 |
vParent; |
| 6641 |
while((vLength=vQueue.length)>0){for(var i=0;i<vLength;i++){vParent=vQueue[i]; |
| 6642 |
vParent._flushChildrenQueue(); |
| 6643 |
delete vParent._isInGlobalLayoutQueue; |
| 6644 |
}vQueue.splice(0, |
| 6645 |
vLength); |
| 6646 |
}}, |
| 6647 |
_fastGlobalDisplayQueue:[], |
| 6648 |
_lazyGlobalDisplayQueues:{}, |
| 6649 |
addToGlobalDisplayQueue:function(vWidget){if(!vWidget._isInGlobalDisplayQueue&&vWidget._isDisplayable){if(qx.ui.core.Widget._autoFlushTimeout==null){qx.ui.core.Widget._initAutoFlush(); |
| 6650 |
}var vParent=vWidget.getParent(); |
| 6651 |
if(vParent.isSeeable()){var vKey=vParent.toHashCode(); |
| 6652 |
if(qx.ui.core.Widget._lazyGlobalDisplayQueues[vKey]){qx.ui.core.Widget._lazyGlobalDisplayQueues[vKey].push(vWidget); |
| 6653 |
}else{qx.ui.core.Widget._lazyGlobalDisplayQueues[vKey]=[vWidget]; |
| 6654 |
}}else{qx.ui.core.Widget._fastGlobalDisplayQueue.push(vWidget); |
| 6655 |
}vWidget._isInGlobalDisplayQueue=true; |
| 6656 |
}}, |
| 6657 |
removeFromGlobalDisplayQueue:function(vWidget){}, |
| 6658 |
flushGlobalDisplayQueue:function(){var vKey, |
| 6659 |
vLazyQueue, |
| 6660 |
vWidget, |
| 6661 |
vFragment; |
| 6662 |
var vFastQueue=qx.ui.core.Widget._fastGlobalDisplayQueue; |
| 6663 |
var vLazyQueues=qx.ui.core.Widget._lazyGlobalDisplayQueues; |
| 6664 |
for(var i=0, |
| 6665 |
l=vFastQueue.length;i<l;i++){vWidget=vFastQueue[i]; |
| 6666 |
vWidget.getParent()._getTargetNode().appendChild(vWidget.getElement()); |
| 6667 |
}if(qx.Class.isDefined("qx.ui.basic.Inline")){for(vKey in vLazyQueues){vLazyQueue=vLazyQueues[vKey]; |
| 6668 |
for(var i=0;i<vLazyQueue.length;i++){vWidget=vLazyQueue[i]; |
| 6669 |
if(vWidget instanceof qx.ui.basic.Inline){vWidget._beforeInsertDom(); |
| 6670 |
try{document.getElementById(vWidget.getInlineNodeId()).appendChild(vWidget.getElement()); |
| 6671 |
}catch(ex){vWidget.debug("Could not append to inline id: "+vWidget.getInlineNodeId(), |
| 6672 |
ex); |
| 6673 |
}vWidget._afterInsertDom(); |
| 6674 |
vWidget._afterAppear(); |
| 6675 |
qx.lang.Array.remove(vLazyQueue, |
| 6676 |
vWidget); |
| 6677 |
i--; |
| 6678 |
delete vWidget._isInGlobalDisplayQueue; |
| 6679 |
}}}}for(vKey in vLazyQueues){vLazyQueue=vLazyQueues[vKey]; |
| 6680 |
if(document.createDocumentFragment&&vLazyQueue.length>=3){vFragment=document.createDocumentFragment(); |
| 6681 |
for(var i=0, |
| 6682 |
l=vLazyQueue.length;i<l;i++){vWidget=vLazyQueue[i]; |
| 6683 |
vWidget._beforeInsertDom(); |
| 6684 |
vFragment.appendChild(vWidget.getElement()); |
| 6685 |
}vLazyQueue[0].getParent()._getTargetNode().appendChild(vFragment); |
| 6686 |
for(var i=0, |
| 6687 |
l=vLazyQueue.length;i<l;i++){vWidget=vLazyQueue[i]; |
| 6688 |
vWidget._afterInsertDom(); |
| 6689 |
}}else{for(var i=0, |
| 6690 |
l=vLazyQueue.length;i<l;i++){vWidget=vLazyQueue[i]; |
| 6691 |
vWidget._beforeInsertDom(); |
| 6692 |
vWidget.getParent()._getTargetNode().appendChild(vWidget.getElement()); |
| 6693 |
vWidget._afterInsertDom(); |
| 6694 |
}}}for(vKey in vLazyQueues){vLazyQueue=vLazyQueues[vKey]; |
| 6695 |
for(var i=0, |
| 6696 |
l=vLazyQueue.length;i<l;i++){vWidget=vLazyQueue[i]; |
| 6697 |
if(vWidget.getVisibility()){vWidget._afterAppear(); |
| 6698 |
}delete vWidget._isInGlobalDisplayQueue; |
| 6699 |
}delete vLazyQueues[vKey]; |
| 6700 |
}for(var i=0, |
| 6701 |
l=vFastQueue.length;i<l;i++){delete vFastQueue[i]._isInGlobalDisplayQueue; |
| 6702 |
}qx.lang.Array.removeAll(vFastQueue); |
| 6703 |
}, |
| 6704 |
getActiveSiblingHelperIgnore:function(vIgnoreClasses, |
| 6705 |
vInstance){for(var j=0;j<vIgnoreClasses.length;j++){if(vInstance instanceof vIgnoreClasses[j]){return true; |
| 6706 |
}}return false; |
| 6707 |
}, |
| 6708 |
getActiveSiblingHelper:function(vObject, |
| 6709 |
vParent, |
| 6710 |
vCalc, |
| 6711 |
vIgnoreClasses, |
| 6712 |
vMode){if(!vIgnoreClasses){vIgnoreClasses=[]; |
| 6713 |
}var vChilds=vParent.getChildren(); |
| 6714 |
var vPosition=vMode==null?vChilds.indexOf(vObject)+vCalc:vMode==="first"?0:vChilds.length-1; |
| 6715 |
var vInstance=vChilds[vPosition]; |
| 6716 |
while(vInstance&&(!vInstance.getEnabled()||qx.ui.core.Widget.getActiveSiblingHelperIgnore(vIgnoreClasses, |
| 6717 |
vInstance))){vPosition+=vCalc; |
| 6718 |
vInstance=vChilds[vPosition]; |
| 6719 |
if(!vInstance){return null; |
| 6720 |
}}return vInstance; |
| 6721 |
}, |
| 6722 |
__initApplyMethods:function(members){var applyRuntime="_renderRuntime"; |
| 6723 |
var resetRuntime="_resetRuntime"; |
| 6724 |
var style="this._style."; |
| 6725 |
var cssValue="=((v==null)?0:v)+'px'"; |
| 6726 |
var parameter="v"; |
| 6727 |
var properties=["left", |
| 6728 |
"right", |
| 6729 |
"top", |
| 6730 |
"bottom", |
| 6731 |
"width", |
| 6732 |
"height", |
| 6733 |
"minWidth", |
| 6734 |
"maxWidth", |
| 6735 |
"minHeight", |
| 6736 |
"maxHeight"]; |
| 6737 |
var propertiesUpper=["Left", |
| 6738 |
"Right", |
| 6739 |
"Top", |
| 6740 |
"Bottom", |
| 6741 |
"Width", |
| 6742 |
"Height", |
| 6743 |
"MinWidth", |
| 6744 |
"MaxWidth", |
| 6745 |
"MinHeight", |
| 6746 |
"MaxHeight"]; |
| 6747 |
var applyMargin=applyRuntime+"Margin"; |
| 6748 |
var resetMargin=resetRuntime+"Margin"; |
| 6749 |
var styleMargin=style+"margin"; |
| 6750 |
for(var i=0;i<4;i++){members[applyMargin+propertiesUpper[i]]=new Function(parameter, |
| 6751 |
styleMargin+propertiesUpper[i]+cssValue); |
| 6752 |
members[resetMargin+propertiesUpper[i]]=new Function(styleMargin+propertiesUpper[i]+"=''"); |
| 6753 |
}var applyPadding=applyRuntime+"Padding"; |
| 6754 |
var resetPadding=resetRuntime+"Padding"; |
| 6755 |
var stylePadding=style+"padding"; |
| 6756 |
if(qx.core.Variant.isSet("qx.client", |
| 6757 |
"gecko")){for(var i=0;i<4;i++){members[applyPadding+propertiesUpper[i]]=new Function(parameter, |
| 6758 |
stylePadding+propertiesUpper[i]+cssValue); |
| 6759 |
members[resetPadding+propertiesUpper[i]]=new Function(stylePadding+propertiesUpper[i]+"=''"); |
| 6760 |
}}else{for(var i=0;i<4;i++){members[applyPadding+propertiesUpper[i]]=new Function(parameter, |
| 6761 |
"this.setStyleProperty('padding"+propertiesUpper[i]+"', ((v==null)?0:v)+'px')"); |
| 6762 |
members[resetPadding+propertiesUpper[i]]=new Function("this.removeStyleProperty('padding"+propertiesUpper[i]+"')"); |
| 6763 |
}}for(var i=0;i<properties.length;i++){members[applyRuntime+propertiesUpper[i]]=new Function(parameter, |
| 6764 |
style+properties[i]+cssValue); |
| 6765 |
members[resetRuntime+propertiesUpper[i]]=new Function(style+properties[i]+"=''"); |
| 6766 |
}}, |
| 6767 |
TYPE_NULL:0, |
| 6768 |
TYPE_PIXEL:1, |
| 6769 |
TYPE_PERCENT:2, |
| 6770 |
TYPE_AUTO:3, |
| 6771 |
TYPE_FLEX:4, |
| 6772 |
layoutPropertyTypes:{}, |
| 6773 |
__initLayoutProperties:function(statics){var a=["width", |
| 6774 |
"height", |
| 6775 |
"minWidth", |
| 6776 |
"maxWidth", |
| 6777 |
"minHeight", |
| 6778 |
"maxHeight", |
| 6779 |
"left", |
| 6780 |
"right", |
| 6781 |
"top", |
| 6782 |
"bottom"]; |
| 6783 |
for(var i=0, |
| 6784 |
l=a.length, |
| 6785 |
p, |
| 6786 |
b, |
| 6787 |
t;i<l;i++){p=a[i]; |
| 6788 |
b="_computed"+qx.lang.String.toFirstUp(p); |
| 6789 |
t=b+"Type"; |
| 6790 |
statics.layoutPropertyTypes[p]={dataType:t, |
| 6791 |
dataParsed:b+"Parsed", |
| 6792 |
dataValue:b+"Value", |
| 6793 |
typePixel:t+"Pixel", |
| 6794 |
typePercent:t+"Percent", |
| 6795 |
typeAuto:t+"Auto", |
| 6796 |
typeFlex:t+"Flex", |
| 6797 |
typeNull:t+"Null"}; |
| 6798 |
}}, |
| 6799 |
initScrollbarWidth:function(){var t=document.createElement("div"); |
| 6800 |
var s=t.style; |
| 6801 |
s.height=s.width="100px"; |
| 6802 |
s.overflow="scroll"; |
| 6803 |
document.body.appendChild(t); |
| 6804 |
var c=qx.html.Dimension.getScrollBarSizeRight(t); |
| 6805 |
qx.ui.core.Widget.SCROLLBAR_SIZE=c?c:16; |
| 6806 |
document.body.removeChild(t); |
| 6807 |
}, |
| 6808 |
_idCounter:0}, |
| 6809 |
properties:{enabled:{init:"inherit", |
| 6810 |
check:"Boolean", |
| 6811 |
inheritable:true, |
| 6812 |
apply:"_applyEnabled", |
| 6813 |
event:"changeEnabled"}, |
| 6814 |
parent:{check:"qx.ui.core.Parent", |
| 6815 |
nullable:true, |
5105 |
nullable:true, |
| 6816 |
event:"changeParent", |
5106 |
event:"changeParent", |
| 6817 |
apply:"_applyParent"}, |
5107 |
apply:"_applyParent"}, |
|
Lines 7214-10527
Link Here
|
| 7214 |
value); |
5504 |
value); |
| 7215 |
this.addToQueue("left"); |
5505 |
this.addToQueue("left"); |
| 7216 |
}, |
5506 |
}, |
| 7217 |
_applyRight:function(value, |
5507 |
_applyRight:function(value, |
| 7218 |
old){this._unitDetectionPixelPercent("right", |
5508 |
old){this._unitDetectionPixelPercent("right", |
| 7219 |
value); |
5509 |
value); |
| 7220 |
this.addToQueue("right"); |
5510 |
this.addToQueue("right"); |
|
|
5511 |
}, |
| 5512 |
_applyTop:function(value, |
| 5513 |
old){this._unitDetectionPixelPercent("top", |
| 5514 |
value); |
| 5515 |
this.addToQueue("top"); |
| 5516 |
}, |
| 5517 |
_applyBottom:function(value, |
| 5518 |
old){this._unitDetectionPixelPercent("bottom", |
| 5519 |
value); |
| 5520 |
this.addToQueue("bottom"); |
| 5521 |
}, |
| 5522 |
_applyWidth:function(value, |
| 5523 |
old){this._unitDetectionPixelPercentAutoFlex("width", |
| 5524 |
value); |
| 5525 |
this.addToQueue("width"); |
| 5526 |
}, |
| 5527 |
_applyMinWidth:function(value, |
| 5528 |
old){this._unitDetectionPixelPercentAuto("minWidth", |
| 5529 |
value); |
| 5530 |
this.addToQueue("minWidth"); |
| 5531 |
}, |
| 5532 |
_applyMaxWidth:function(value, |
| 5533 |
old){this._unitDetectionPixelPercentAuto("maxWidth", |
| 5534 |
value); |
| 5535 |
this.addToQueue("maxWidth"); |
| 5536 |
}, |
| 5537 |
_applyHeight:function(value, |
| 5538 |
old){this._unitDetectionPixelPercentAutoFlex("height", |
| 5539 |
value); |
| 5540 |
this.addToQueue("height"); |
| 5541 |
}, |
| 5542 |
_applyMinHeight:function(value, |
| 5543 |
old){this._unitDetectionPixelPercentAuto("minHeight", |
| 5544 |
value); |
| 5545 |
this.addToQueue("minHeight"); |
| 5546 |
}, |
| 5547 |
_applyMaxHeight:function(value, |
| 5548 |
old){this._unitDetectionPixelPercentAuto("maxHeight", |
| 5549 |
value); |
| 5550 |
this.addToQueue("maxHeight"); |
| 5551 |
}, |
| 5552 |
isMaterialized:function(){var elem=this._element; |
| 5553 |
return (this._initialLayoutDone&&this._isDisplayable&&qx.html.Style.getStyleProperty(elem, |
| 5554 |
"display")!="none"&&qx.html.Style.getStyleProperty(elem, |
| 5555 |
"visibility")!="hidden"&&elem.offsetWidth>0&&elem.offsetHeight>0); |
| 5556 |
}, |
| 5557 |
pack:function(){this.setWidth(this.getPreferredBoxWidth()); |
| 5558 |
this.setHeight(this.getPreferredBoxHeight()); |
| 5559 |
}, |
| 5560 |
auto:function(){this.setWidth("auto"); |
| 5561 |
this.setHeight("auto"); |
| 5562 |
}, |
| 5563 |
getChildren:qx.lang.Function.returnNull, |
| 5564 |
getChildrenLength:qx.lang.Function.returnZero, |
| 5565 |
hasChildren:qx.lang.Function.returnFalse, |
| 5566 |
isEmpty:qx.lang.Function.returnTrue, |
| 5567 |
indexOf:qx.lang.Function.returnNegativeIndex, |
| 5568 |
contains:qx.lang.Function.returnFalse, |
| 5569 |
getVisibleChildren:qx.lang.Function.returnNull, |
| 5570 |
getVisibleChildrenLength:qx.lang.Function.returnZero, |
| 5571 |
hasVisibleChildren:qx.lang.Function.returnFalse, |
| 5572 |
isVisibleEmpty:qx.lang.Function.returnTrue, |
| 5573 |
_hasParent:false, |
| 5574 |
_isDisplayable:false, |
| 5575 |
isDisplayable:function(){return this._isDisplayable; |
| 5576 |
}, |
| 5577 |
_checkParent:function(value, |
| 5578 |
old){if(this.contains(value)){throw new Error("Could not insert myself into a child "+value+"!"); |
| 5579 |
}return value; |
| 5580 |
}, |
| 5581 |
_applyParent:function(value, |
| 5582 |
old){if(old){var vOldIndex=old.getChildren().indexOf(this); |
| 5583 |
this._computedWidthValue=this._computedMinWidthValue=this._computedMaxWidthValue=this._computedLeftValue=this._computedRightValue=null; |
| 5584 |
this._computedHeightValue=this._computedMinHeightValue=this._computedMaxHeightValue=this._computedTopValue=this._computedBottomValue=null; |
| 5585 |
this._cachedBoxWidth=this._cachedInnerWidth=this._cachedOuterWidth=null; |
| 5586 |
this._cachedBoxHeight=this._cachedInnerHeight=this._cachedOuterHeight=null; |
| 5587 |
qx.lang.Array.removeAt(old.getChildren(), |
| 5588 |
vOldIndex); |
| 5589 |
old._invalidateVisibleChildren(); |
| 5590 |
old._removeChildFromChildrenQueue(this); |
| 5591 |
old.getLayoutImpl().updateChildrenOnRemoveChild(this, |
| 5592 |
vOldIndex); |
| 5593 |
old.addToJobQueue("removeChild"); |
| 5594 |
old._invalidatePreferredInnerDimensions(); |
| 5595 |
this._oldParent=old; |
| 5596 |
} |
| 5597 |
if(value){this._hasParent=true; |
| 5598 |
if(typeof this._insertIndex=="number"){qx.lang.Array.insertAt(value.getChildren(), |
| 5599 |
this, |
| 5600 |
this._insertIndex); |
| 5601 |
delete this._insertIndex; |
| 5602 |
}else{value.getChildren().push(this); |
| 5603 |
}}else{this._hasParent=false; |
| 5604 |
}qx.core.Property.refresh(this); |
| 5605 |
return this._handleDisplayable("parent"); |
| 5606 |
}, |
| 5607 |
_applyDisplay:function(value, |
| 5608 |
old){return this._handleDisplayable("display"); |
| 5609 |
}, |
| 5610 |
_handleDisplayable:function(vHint){var vDisplayable=this._computeDisplayable(); |
| 5611 |
if(this._isDisplayable==vDisplayable&&!(vDisplayable&&vHint=="parent")){return true; |
| 5612 |
}this._isDisplayable=vDisplayable; |
| 5613 |
var vParent=this.getParent(); |
| 5614 |
if(vParent){vParent._invalidateVisibleChildren(); |
| 5615 |
vParent._invalidatePreferredInnerDimensions(); |
| 5616 |
}if(vHint&&this._oldParent&&this._oldParent._initialLayoutDone){var elem=this.getElement(); |
| 5617 |
if(elem){if(this.getVisibility()){this._beforeDisappear(); |
| 5618 |
}this._beforeRemoveDom(); |
| 5619 |
try{this._oldParent._getTargetNode().removeChild(elem); |
| 5620 |
}catch(e){}this._afterRemoveDom(); |
| 5621 |
if(this.getVisibility()){this._afterDisappear(); |
| 5622 |
}}delete this._oldParent; |
| 5623 |
}if(vDisplayable){if(vParent._initialLayoutDone){vParent.getLayoutImpl().updateChildrenOnAddChild(this, |
| 5624 |
vParent.getChildren().indexOf(this)); |
| 5625 |
vParent.addToJobQueue("addChild"); |
| 5626 |
}this.addToLayoutChanges("initial"); |
| 5627 |
this.addToCustomQueues(vHint); |
| 5628 |
if(this.getVisibility()){this._beforeAppear(); |
| 5629 |
}if(!this._isCreated){qx.ui.core.Widget.addToGlobalElementQueue(this); |
| 5630 |
}qx.ui.core.Widget.addToGlobalStateQueue(this); |
| 5631 |
if(!qx.lang.Object.isEmpty(this._jobQueue)){qx.ui.core.Widget.addToGlobalJobQueue(this); |
| 5632 |
} |
| 5633 |
if(!qx.lang.Object.isEmpty(this._childrenQueue)){qx.ui.core.Widget.addToGlobalLayoutQueue(this); |
| 5634 |
}}else{qx.ui.core.Widget.removeFromGlobalElementQueue(this); |
| 5635 |
qx.ui.core.Widget.removeFromGlobalStateQueue(this); |
| 5636 |
qx.ui.core.Widget.removeFromGlobalJobQueue(this); |
| 5637 |
qx.ui.core.Widget.removeFromGlobalLayoutQueue(this); |
| 5638 |
this.removeFromCustomQueues(vHint); |
| 5639 |
if(vParent&&vHint){if(this.getVisibility()){this._beforeDisappear(); |
| 5640 |
}if(vParent._initialLayoutDone&&this._initialLayoutDone){vParent.getLayoutImpl().updateChildrenOnRemoveChild(this, |
| 5641 |
vParent.getChildren().indexOf(this)); |
| 5642 |
vParent.addToJobQueue("removeChild"); |
| 5643 |
this._beforeRemoveDom(); |
| 5644 |
var parentNode=this.getElement().parentNode; |
| 5645 |
if(parentNode){parentNode.removeChild(this.getElement()); |
| 5646 |
if(parentNode&&parentNode!==vParent._getTargetNode()){this.warn("Unexpected parent node: "+parentNode); |
| 5647 |
}}this._afterRemoveDom(); |
| 5648 |
}vParent._removeChildFromChildrenQueue(this); |
| 5649 |
if(this.getVisibility()){this._afterDisappear(); |
| 5650 |
}}}this._handleDisplayableCustom(vDisplayable, |
| 5651 |
vParent, |
| 5652 |
vHint); |
| 5653 |
return true; |
| 5654 |
}, |
| 5655 |
addToCustomQueues:qx.lang.Function.returnTrue, |
| 5656 |
removeFromCustomQueues:qx.lang.Function.returnTrue, |
| 5657 |
_handleDisplayableCustom:qx.lang.Function.returnTrue, |
| 5658 |
_computeDisplayable:function(){return this.getDisplay()&&this.getParent()&&this.getParent()._isDisplayable?true:false; |
| 5659 |
}, |
| 5660 |
_beforeAppear:function(){this.createDispatchEvent("beforeAppear"); |
| 5661 |
}, |
| 5662 |
_afterAppear:function(){this._isSeeable=true; |
| 5663 |
this.createDispatchEvent("appear"); |
| 5664 |
}, |
| 5665 |
_beforeDisappear:function(){this.removeState("over"); |
| 5666 |
if(qx.Class.isDefined("qx.ui.form.Button")){this.removeState("pressed"); |
| 5667 |
this.removeState("abandoned"); |
| 5668 |
}this.createDispatchEvent("beforeDisappear"); |
| 5669 |
}, |
| 5670 |
_afterDisappear:function(){this._isSeeable=false; |
| 5671 |
this.createDispatchEvent("disappear"); |
| 5672 |
}, |
| 5673 |
_isSeeable:false, |
| 5674 |
isSeeable:function(){return this._isSeeable; |
| 5675 |
}, |
| 5676 |
isAppearRelevant:function(){return this.getVisibility()&&this._isDisplayable; |
| 5677 |
}, |
| 5678 |
_beforeInsertDom:function(){this.createDispatchEvent("beforeInsertDom"); |
| 5679 |
}, |
| 5680 |
_afterInsertDom:function(){this.createDispatchEvent("insertDom"); |
| 5681 |
}, |
| 5682 |
_beforeRemoveDom:function(){this.createDispatchEvent("beforeRemoveDom"); |
| 5683 |
}, |
| 5684 |
_afterRemoveDom:function(){this.createDispatchEvent("removeDom"); |
| 5685 |
}, |
| 5686 |
_applyVisibility:function(value, |
| 5687 |
old){if(value){if(this._isDisplayable){this._beforeAppear(); |
| 5688 |
}this.removeStyleProperty("display"); |
| 5689 |
if(this._isDisplayable){this._afterAppear(); |
| 5690 |
}}else{if(this._isDisplayable){this._beforeDisappear(); |
| 5691 |
}this.setStyleProperty("display", |
| 5692 |
"none"); |
| 5693 |
if(this._isDisplayable){this._afterDisappear(); |
| 5694 |
}}}, |
| 5695 |
show:function(){this.setVisibility(true); |
| 5696 |
this.setDisplay(true); |
| 5697 |
}, |
| 5698 |
hide:function(){this.setVisibility(false); |
| 5699 |
}, |
| 5700 |
connect:function(){this.setDisplay(true); |
| 5701 |
}, |
| 5702 |
disconnect:function(){this.setDisplay(false); |
| 5703 |
}, |
| 5704 |
_isCreated:false, |
| 5705 |
_getTargetNode:qx.core.Variant.select("qx.client", |
| 5706 |
{"gecko":function(){return this._element; |
| 5707 |
}, |
| 5708 |
"default":function(){return this._borderElement||this._element; |
| 5709 |
}}), |
| 5710 |
addToDocument:function(){qx.ui.core.ClientDocument.getInstance().add(this); |
| 5711 |
}, |
| 5712 |
isCreated:function(){return this._isCreated; |
| 5713 |
}, |
| 5714 |
_createElementImpl:function(){this.setElement(this.getTopLevelWidget().getDocumentElement().createElement("div")); |
| 5715 |
}, |
| 5716 |
_applyElement:function(value, |
| 5717 |
old){this._isCreated=value!=null; |
| 5718 |
if(old){old.qx_Widget=null; |
| 5719 |
} |
| 5720 |
if(value){value.qx_Widget=this; |
| 5721 |
value.style.position="absolute"; |
| 5722 |
this._element=value; |
| 5723 |
this._style=value.style; |
| 5724 |
this._applyStyleProperties(value); |
| 5725 |
this._applyHtmlProperties(value); |
| 5726 |
this._applyHtmlAttributes(value); |
| 5727 |
this._applyElementData(value); |
| 5728 |
this.createDispatchEvent("create"); |
| 5729 |
this.addToStateQueue(); |
| 5730 |
}else{this._element=this._style=null; |
| 5731 |
}}, |
| 5732 |
addToJobQueue:function(p){if(this._hasParent){qx.ui.core.Widget.addToGlobalJobQueue(this); |
| 5733 |
} |
| 5734 |
if(!this._jobQueue){this._jobQueue={}; |
| 5735 |
}this._jobQueue[p]=true; |
| 5736 |
return true; |
| 5737 |
}, |
| 5738 |
_flushJobQueue:function(q){try{var vQueue=this._jobQueue; |
| 5739 |
var vParent=this.getParent(); |
| 5740 |
if(!vParent||qx.lang.Object.isEmpty(vQueue)){return; |
| 5741 |
}var vLayoutImpl=this instanceof qx.ui.core.Parent?this.getLayoutImpl():null; |
| 5742 |
if(vLayoutImpl){vLayoutImpl.updateSelfOnJobQueueFlush(vQueue); |
| 5743 |
}}catch(ex){this.error("Flushing job queue (prechecks#1) failed", |
| 5744 |
ex); |
| 5745 |
}try{var vFlushParentJobQueue=false; |
| 5746 |
var vRecomputeOuterWidth=vQueue.marginLeft||vQueue.marginRight; |
| 5747 |
var vRecomputeOuterHeight=vQueue.marginTop||vQueue.marginBottom; |
| 5748 |
var vRecomputeInnerWidth=vQueue.frameWidth; |
| 5749 |
var vRecomputeInnerHeight=vQueue.frameHeight; |
| 5750 |
var vRecomputeParentPreferredInnerWidth=(vQueue.frameWidth||vQueue.preferredInnerWidth)&&this._recomputePreferredBoxWidth(); |
| 5751 |
var vRecomputeParentPreferredInnerHeight=(vQueue.frameHeight||vQueue.preferredInnerHeight)&&this._recomputePreferredBoxHeight(); |
| 5752 |
if(vRecomputeParentPreferredInnerWidth){var vPref=this.getPreferredBoxWidth(); |
| 5753 |
if(this._computedWidthTypeAuto){this._computedWidthValue=vPref; |
| 5754 |
vQueue.width=true; |
| 5755 |
} |
| 5756 |
if(this._computedMinWidthTypeAuto){this._computedMinWidthValue=vPref; |
| 5757 |
vQueue.minWidth=true; |
| 5758 |
} |
| 5759 |
if(this._computedMaxWidthTypeAuto){this._computedMaxWidthValue=vPref; |
| 5760 |
vQueue.maxWidth=true; |
| 5761 |
}} |
| 5762 |
if(vRecomputeParentPreferredInnerHeight){var vPref=this.getPreferredBoxHeight(); |
| 5763 |
if(this._computedHeightTypeAuto){this._computedHeightValue=vPref; |
| 5764 |
vQueue.height=true; |
| 5765 |
} |
| 5766 |
if(this._computedMinHeightTypeAuto){this._computedMinHeightValue=vPref; |
| 5767 |
vQueue.minHeight=true; |
| 5768 |
} |
| 5769 |
if(this._computedMaxHeightTypeAuto){this._computedMaxHeightValue=vPref; |
| 5770 |
vQueue.maxHeight=true; |
| 5771 |
}} |
| 5772 |
if((vQueue.width||vQueue.minWidth||vQueue.maxWidth||vQueue.left||vQueue.right)&&this._recomputeBoxWidth()){vRecomputeOuterWidth=vRecomputeInnerWidth=true; |
| 5773 |
} |
| 5774 |
if((vQueue.height||vQueue.minHeight||vQueue.maxHeight||vQueue.top||vQueue.bottom)&&this._recomputeBoxHeight()){vRecomputeOuterHeight=vRecomputeInnerHeight=true; |
| 5775 |
}}catch(ex){this.error("Flushing job queue (recompute#2) failed", |
| 5776 |
ex); |
| 5777 |
}try{if((vRecomputeOuterWidth&&this._recomputeOuterWidth())||vRecomputeParentPreferredInnerWidth){vParent._invalidatePreferredInnerWidth(); |
| 5778 |
vParent.getLayoutImpl().updateSelfOnChildOuterWidthChange(this); |
| 5779 |
vFlushParentJobQueue=true; |
| 5780 |
} |
| 5781 |
if((vRecomputeOuterHeight&&this._recomputeOuterHeight())||vRecomputeParentPreferredInnerHeight){vParent._invalidatePreferredInnerHeight(); |
| 5782 |
vParent.getLayoutImpl().updateSelfOnChildOuterHeightChange(this); |
| 5783 |
vFlushParentJobQueue=true; |
| 5784 |
} |
| 5785 |
if(vFlushParentJobQueue){vParent._flushJobQueue(); |
| 5786 |
}}catch(ex){this.error("Flushing job queue (parentsignals#3) failed", |
| 5787 |
ex); |
| 5788 |
}try{vParent._addChildToChildrenQueue(this); |
| 5789 |
for(var i in vQueue){this._layoutChanges[i]=true; |
| 5790 |
}}catch(ex){this.error("Flushing job queue (addjobs#4) failed", |
| 5791 |
ex); |
| 5792 |
}try{if(this instanceof qx.ui.core.Parent&&(vQueue.paddingLeft||vQueue.paddingRight||vQueue.paddingTop||vQueue.paddingBottom)){var ch=this.getChildren(), |
| 5793 |
chl=ch.length; |
| 5794 |
if(vQueue.paddingLeft){for(var i=0;i<chl;i++){ch[i].addToLayoutChanges("parentPaddingLeft"); |
| 5795 |
}} |
| 5796 |
if(vQueue.paddingRight){for(var i=0;i<chl;i++){ch[i].addToLayoutChanges("parentPaddingRight"); |
| 5797 |
}} |
| 5798 |
if(vQueue.paddingTop){for(var i=0;i<chl;i++){ch[i].addToLayoutChanges("parentPaddingTop"); |
| 5799 |
}} |
| 5800 |
if(vQueue.paddingBottom){for(var i=0;i<chl;i++){ch[i].addToLayoutChanges("parentPaddingBottom"); |
| 5801 |
}}} |
| 5802 |
if(vRecomputeInnerWidth){this._recomputeInnerWidth(); |
| 5803 |
} |
| 5804 |
if(vRecomputeInnerHeight){this._recomputeInnerHeight(); |
| 5805 |
} |
| 5806 |
if(this._initialLayoutDone){if(vLayoutImpl){vLayoutImpl.updateChildrenOnJobQueueFlush(vQueue); |
| 5807 |
}}}catch(ex){this.error("Flushing job queue (childrensignals#5) failed", |
| 5808 |
ex); |
| 5809 |
}delete this._jobQueue; |
| 5810 |
}, |
| 5811 |
_isWidthEssential:qx.lang.Function.returnTrue, |
| 5812 |
_isHeightEssential:qx.lang.Function.returnTrue, |
| 5813 |
_computeBoxWidthFallback:function(){return 0; |
| 5814 |
}, |
| 5815 |
_computeBoxHeightFallback:function(){return 0; |
| 5816 |
}, |
| 5817 |
_computeBoxWidth:function(){var vLayoutImpl=this.getParent().getLayoutImpl(); |
| 5818 |
return Math.max(0, |
| 5819 |
qx.lang.Number.limit(vLayoutImpl.computeChildBoxWidth(this), |
| 5820 |
this.getMinWidthValue(), |
| 5821 |
this.getMaxWidthValue())); |
| 5822 |
}, |
| 5823 |
_computeBoxHeight:function(){var vLayoutImpl=this.getParent().getLayoutImpl(); |
| 5824 |
return Math.max(0, |
| 5825 |
qx.lang.Number.limit(vLayoutImpl.computeChildBoxHeight(this), |
| 5826 |
this.getMinHeightValue(), |
| 5827 |
this.getMaxHeightValue())); |
| 5828 |
}, |
| 5829 |
_computeOuterWidth:function(){return Math.max(0, |
| 5830 |
(this.getMarginLeft()+this.getBoxWidth()+this.getMarginRight())); |
| 5831 |
}, |
| 5832 |
_computeOuterHeight:function(){return Math.max(0, |
| 5833 |
(this.getMarginTop()+this.getBoxHeight()+this.getMarginBottom())); |
| 5834 |
}, |
| 5835 |
_computeInnerWidth:function(){return Math.max(0, |
| 5836 |
this.getBoxWidth()-this.getFrameWidth()); |
| 5837 |
}, |
| 5838 |
_computeInnerHeight:function(){return Math.max(0, |
| 5839 |
this.getBoxHeight()-this.getFrameHeight()); |
| 5840 |
}, |
| 5841 |
getNeededWidth:function(){var vLayoutImpl=this.getParent().getLayoutImpl(); |
| 5842 |
return Math.max(0, |
| 5843 |
vLayoutImpl.computeChildNeededWidth(this)); |
| 5844 |
}, |
| 5845 |
getNeededHeight:function(){var vLayoutImpl=this.getParent().getLayoutImpl(); |
| 5846 |
return Math.max(0, |
| 5847 |
vLayoutImpl.computeChildNeededHeight(this)); |
| 5848 |
}, |
| 5849 |
_recomputeFlexX:function(){if(!this.getHasFlexX()){return false; |
| 5850 |
} |
| 5851 |
if(this._computedWidthTypeFlex){this._computedWidthValue=null; |
| 5852 |
this.addToLayoutChanges("width"); |
| 5853 |
}return true; |
| 5854 |
}, |
| 5855 |
_recomputeFlexY:function(){if(!this.getHasFlexY()){return false; |
| 5856 |
} |
| 5857 |
if(this._computedHeightTypeFlex){this._computedHeightValue=null; |
| 5858 |
this.addToLayoutChanges("height"); |
| 5859 |
}return true; |
| 7221 |
}, |
5860 |
}, |
| 7222 |
_applyTop:function(value, |
5861 |
_recomputePercentX:function(){if(!this.getHasPercentX()){return false; |
| 7223 |
old){this._unitDetectionPixelPercent("top", |
5862 |
} |
| 7224 |
value); |
5863 |
if(this._computedWidthTypePercent){this._computedWidthValue=null; |
| 7225 |
this.addToQueue("top"); |
5864 |
this.addToLayoutChanges("width"); |
|
|
5865 |
} |
| 5866 |
if(this._computedMinWidthTypePercent){this._computedMinWidthValue=null; |
| 5867 |
this.addToLayoutChanges("minWidth"); |
| 5868 |
} |
| 5869 |
if(this._computedMaxWidthTypePercent){this._computedMaxWidthValue=null; |
| 5870 |
this.addToLayoutChanges("maxWidth"); |
| 5871 |
} |
| 5872 |
if(this._computedLeftTypePercent){this._computedLeftValue=null; |
| 5873 |
this.addToLayoutChanges("left"); |
| 5874 |
} |
| 5875 |
if(this._computedRightTypePercent){this._computedRightValue=null; |
| 5876 |
this.addToLayoutChanges("right"); |
| 5877 |
}return true; |
| 7226 |
}, |
5878 |
}, |
| 7227 |
_applyBottom:function(value, |
5879 |
_recomputePercentY:function(){if(!this.getHasPercentY()){return false; |
| 7228 |
old){this._unitDetectionPixelPercent("bottom", |
5880 |
} |
| 7229 |
value); |
5881 |
if(this._computedHeightTypePercent){this._computedHeightValue=null; |
| 7230 |
this.addToQueue("bottom"); |
5882 |
this.addToLayoutChanges("height"); |
|
|
5883 |
} |
| 5884 |
if(this._computedMinHeightTypePercent){this._computedMinHeightValue=null; |
| 5885 |
this.addToLayoutChanges("minHeight"); |
| 5886 |
} |
| 5887 |
if(this._computedMaxHeightTypePercent){this._computedMaxHeightValue=null; |
| 5888 |
this.addToLayoutChanges("maxHeight"); |
| 5889 |
} |
| 5890 |
if(this._computedTopTypePercent){this._computedTopValue=null; |
| 5891 |
this.addToLayoutChanges("top"); |
| 5892 |
} |
| 5893 |
if(this._computedBottomTypePercent){this._computedBottomValue=null; |
| 5894 |
this.addToLayoutChanges("bottom"); |
| 5895 |
}return true; |
| 7231 |
}, |
5896 |
}, |
| 7232 |
_applyWidth:function(value, |
5897 |
_recomputeRangeX:qx.core.Variant.select("qx.client", |
| 7233 |
old){this._unitDetectionPixelPercentAutoFlex("width", |
5898 |
{"mshtml|opera|webkit":function(){if(this._computedLeftTypeNull||this._computedRightTypeNull){return false; |
| 7234 |
value); |
5899 |
}this.addToLayoutChanges("width"); |
| 7235 |
this.addToQueue("width"); |
5900 |
return true; |
| 7236 |
}, |
5901 |
}, |
| 7237 |
_applyMinWidth:function(value, |
5902 |
"default":function(){return !(this._computedLeftTypeNull||this._computedRightTypeNull); |
| 7238 |
old){this._unitDetectionPixelPercentAuto("minWidth", |
5903 |
}}), |
| 7239 |
value); |
5904 |
_recomputeRangeY:qx.core.Variant.select("qx.client", |
| 7240 |
this.addToQueue("minWidth"); |
5905 |
{"mshtml|opera|webkit":function(){if(this._computedTopTypeNull||this._computedBottomTypeNull){return false; |
|
|
5906 |
}this.addToLayoutChanges("height"); |
| 5907 |
return true; |
| 7241 |
}, |
5908 |
}, |
| 7242 |
_applyMaxWidth:function(value, |
5909 |
"default":function(){return !(this._computedTopTypeNull||this._computedBottomTypeNull); |
| 7243 |
old){this._unitDetectionPixelPercentAuto("maxWidth", |
5910 |
}}), |
| 7244 |
value); |
5911 |
_recomputeStretchingX:qx.core.Variant.select("qx.client", |
| 7245 |
this.addToQueue("maxWidth"); |
5912 |
{"mshtml|opera|webkit":function(){if(this.getAllowStretchX()&&this._computedWidthTypeNull){this._computedWidthValue=null; |
|
|
5913 |
this.addToLayoutChanges("width"); |
| 5914 |
return true; |
| 5915 |
}return false; |
| 7246 |
}, |
5916 |
}, |
| 7247 |
_applyHeight:function(value, |
5917 |
"default":function(){if(this.getAllowStretchX()&&this._computedWidthTypeNull){return true; |
| 7248 |
old){this._unitDetectionPixelPercentAutoFlex("height", |
5918 |
}return false; |
| 7249 |
value); |
5919 |
}}), |
| 7250 |
this.addToQueue("height"); |
5920 |
_recomputeStretchingY:qx.core.Variant.select("qx.client", |
|
|
5921 |
{"mshtml|opera|webkit":function(){if(this.getAllowStretchY()&&this._computedHeightTypeNull){this._computedHeightValue=null; |
| 5922 |
this.addToLayoutChanges("height"); |
| 5923 |
return true; |
| 5924 |
}return false; |
| 7251 |
}, |
5925 |
}, |
| 7252 |
_applyMinHeight:function(value, |
5926 |
"default":function(){if(this.getAllowStretchY()&&this._computedHeightTypeNull){return true; |
| 7253 |
old){this._unitDetectionPixelPercentAuto("minHeight", |
5927 |
}return false; |
| 7254 |
value); |
5928 |
}}), |
| 7255 |
this.addToQueue("minHeight"); |
5929 |
_computeValuePixel:function(v){return Math.round(v); |
| 7256 |
}, |
5930 |
}, |
| 7257 |
_applyMaxHeight:function(value, |
5931 |
_computeValuePixelLimit:function(v){return Math.max(0, |
| 7258 |
old){this._unitDetectionPixelPercentAuto("maxHeight", |
5932 |
this._computeValuePixel(v)); |
| 7259 |
value); |
|
|
| 7260 |
this.addToQueue("maxHeight"); |
| 7261 |
}, |
5933 |
}, |
| 7262 |
isMaterialized:function(){var elem=this._element; |
5934 |
_computeValuePercentX:function(v){return Math.round(this.getParent().getInnerWidthForChild(this)*v*0.01); |
| 7263 |
return (this._initialLayoutDone&&this._isDisplayable&&qx.html.Style.getStyleProperty(elem, |
|
|
| 7264 |
"display")!="none"&&qx.html.Style.getStyleProperty(elem, |
| 7265 |
"visibility")!="hidden"&&elem.offsetWidth>0&&elem.offsetHeight>0); |
| 7266 |
}, |
5935 |
}, |
| 7267 |
pack:function(){this.setWidth(this.getPreferredBoxWidth()); |
5936 |
_computeValuePercentXLimit:function(v){return Math.max(0, |
| 7268 |
this.setHeight(this.getPreferredBoxHeight()); |
5937 |
this._computeValuePercentX(v)); |
| 7269 |
}, |
5938 |
}, |
| 7270 |
auto:function(){this.setWidth("auto"); |
5939 |
_computeValuePercentY:function(v){return Math.round(this.getParent().getInnerHeightForChild(this)*v*0.01); |
| 7271 |
this.setHeight("auto"); |
|
|
| 7272 |
}, |
5940 |
}, |
| 7273 |
getChildren:qx.lang.Function.returnNull, |
5941 |
_computeValuePercentYLimit:function(v){return Math.max(0, |
| 7274 |
getChildrenLength:qx.lang.Function.returnZero, |
5942 |
this._computeValuePercentY(v)); |
| 7275 |
hasChildren:qx.lang.Function.returnFalse, |
|
|
| 7276 |
isEmpty:qx.lang.Function.returnTrue, |
| 7277 |
indexOf:qx.lang.Function.returnNegativeIndex, |
| 7278 |
contains:qx.lang.Function.returnFalse, |
| 7279 |
getVisibleChildren:qx.lang.Function.returnNull, |
| 7280 |
getVisibleChildrenLength:qx.lang.Function.returnZero, |
| 7281 |
hasVisibleChildren:qx.lang.Function.returnFalse, |
| 7282 |
isVisibleEmpty:qx.lang.Function.returnTrue, |
| 7283 |
_hasParent:false, |
| 7284 |
_isDisplayable:false, |
| 7285 |
isDisplayable:function(){return this._isDisplayable; |
| 7286 |
}, |
5943 |
}, |
| 7287 |
_checkParent:function(value, |
5944 |
getWidthValue:function(){if(this._computedWidthValue!=null){return this._computedWidthValue; |
| 7288 |
old){if(this.contains(value)){throw new Error("Could not insert myself into a child "+value+"!"); |
5945 |
} |
| 7289 |
}return value; |
5946 |
switch(this._computedWidthType){case qx.ui.core.Widget.TYPE_PIXEL:return this._computedWidthValue=this._computeValuePixelLimit(this._computedWidthParsed); |
|
|
5947 |
case qx.ui.core.Widget.TYPE_PERCENT:return this._computedWidthValue=this._computeValuePercentXLimit(this._computedWidthParsed); |
| 5948 |
case qx.ui.core.Widget.TYPE_AUTO:return this._computedWidthValue=this.getPreferredBoxWidth(); |
| 5949 |
case qx.ui.core.Widget.TYPE_FLEX:if(this.getParent().getLayoutImpl().computeChildrenFlexWidth===undefined){throw new Error("Widget "+this+": having horizontal flex size (width="+this.getWidth()+") but parent layout "+this.getParent()+" does not support it"); |
| 5950 |
}this.getParent().getLayoutImpl().computeChildrenFlexWidth(); |
| 5951 |
return this._computedWidthValue=this._computedWidthFlexValue; |
| 5952 |
}return null; |
| 7290 |
}, |
5953 |
}, |
| 7291 |
_applyParent:function(value, |
5954 |
getMinWidthValue:function(){if(this._computedMinWidthValue!=null){return this._computedMinWidthValue; |
| 7292 |
old){if(old){var vOldIndex=old.getChildren().indexOf(this); |
|
|
| 7293 |
this._computedWidthValue=this._computedMinWidthValue=this._computedMaxWidthValue=this._computedLeftValue=this._computedRightValue=null; |
| 7294 |
this._computedHeightValue=this._computedMinHeightValue=this._computedMaxHeightValue=this._computedTopValue=this._computedBottomValue=null; |
| 7295 |
this._cachedBoxWidth=this._cachedInnerWidth=this._cachedOuterWidth=null; |
| 7296 |
this._cachedBoxHeight=this._cachedInnerHeight=this._cachedOuterHeight=null; |
| 7297 |
qx.lang.Array.removeAt(old.getChildren(), |
| 7298 |
vOldIndex); |
| 7299 |
old._invalidateVisibleChildren(); |
| 7300 |
old._removeChildFromChildrenQueue(this); |
| 7301 |
old.getLayoutImpl().updateChildrenOnRemoveChild(this, |
| 7302 |
vOldIndex); |
| 7303 |
old.addToJobQueue("removeChild"); |
| 7304 |
old._invalidatePreferredInnerDimensions(); |
| 7305 |
this._oldParent=old; |
| 7306 |
} |
5955 |
} |
| 7307 |
if(value){this._hasParent=true; |
5956 |
switch(this._computedMinWidthType){case qx.ui.core.Widget.TYPE_PIXEL:return this._computedWidthValue=this._computeValuePixelLimit(this._computedMinWidthParsed); |
| 7308 |
if(typeof this._insertIndex=="number"){qx.lang.Array.insertAt(value.getChildren(), |
5957 |
case qx.ui.core.Widget.TYPE_PERCENT:return this._computedWidthValue=this._computeValuePercentXLimit(this._computedMinWidthParsed); |
| 7309 |
this, |
5958 |
case qx.ui.core.Widget.TYPE_AUTO:return this._computedMinWidthValue=this.getPreferredBoxWidth(); |
| 7310 |
this._insertIndex); |
5959 |
}return null; |
| 7311 |
delete this._insertIndex; |
5960 |
}, |
| 7312 |
}else{value.getChildren().push(this); |
5961 |
getMaxWidthValue:function(){if(this._computedMaxWidthValue!=null){return this._computedMaxWidthValue; |
| 7313 |
}}else{this._hasParent=false; |
5962 |
} |
| 7314 |
}qx.core.Property.refresh(this); |
5963 |
switch(this._computedMaxWidthType){case qx.ui.core.Widget.TYPE_PIXEL:return this._computedWidthValue=this._computeValuePixelLimit(this._computedMaxWidthParsed); |
| 7315 |
return this._handleDisplayable("parent"); |
5964 |
case qx.ui.core.Widget.TYPE_PERCENT:return this._computedWidthValue=this._computeValuePercentXLimit(this._computedMaxWidthParsed); |
|
|
5965 |
case qx.ui.core.Widget.TYPE_AUTO:return this._computedMaxWidthValue=this.getPreferredBoxWidth(); |
| 5966 |
}return null; |
| 5967 |
}, |
| 5968 |
getLeftValue:function(){if(this._computedLeftValue!=null){return this._computedLeftValue; |
| 5969 |
} |
| 5970 |
switch(this._computedLeftType){case qx.ui.core.Widget.TYPE_PIXEL:return this._computedLeftValue=this._computeValuePixel(this._computedLeftParsed); |
| 5971 |
case qx.ui.core.Widget.TYPE_PERCENT:return this._computedLeftValue=this._computeValuePercentX(this._computedLeftParsed); |
| 5972 |
}return null; |
| 5973 |
}, |
| 5974 |
getRightValue:function(){if(this._computedRightValue!=null){return this._computedRightValue; |
| 5975 |
} |
| 5976 |
switch(this._computedRightType){case qx.ui.core.Widget.TYPE_PIXEL:return this._computedRightValue=this._computeValuePixel(this._computedRightParsed); |
| 5977 |
case qx.ui.core.Widget.TYPE_PERCENT:return this._computedRightValue=this._computeValuePercentX(this._computedRightParsed); |
| 5978 |
}return null; |
| 5979 |
}, |
| 5980 |
getHeightValue:function(){if(this._computedHeightValue!=null){return this._computedHeightValue; |
| 5981 |
} |
| 5982 |
switch(this._computedHeightType){case qx.ui.core.Widget.TYPE_PIXEL:return this._computedHeightValue=this._computeValuePixelLimit(this._computedHeightParsed); |
| 5983 |
case qx.ui.core.Widget.TYPE_PERCENT:return this._computedHeightValue=this._computeValuePercentYLimit(this._computedHeightParsed); |
| 5984 |
case qx.ui.core.Widget.TYPE_AUTO:return this._computedHeightValue=this.getPreferredBoxHeight(); |
| 5985 |
case qx.ui.core.Widget.TYPE_FLEX:if(this.getParent().getLayoutImpl().computeChildrenFlexHeight===undefined){throw new Error("Widget "+this+": having vertical flex size (height="+this.getHeight()+") but parent layout "+this.getParent()+" does not support it"); |
| 5986 |
}this.getParent().getLayoutImpl().computeChildrenFlexHeight(); |
| 5987 |
return this._computedHeightValue=this._computedHeightFlexValue; |
| 5988 |
}return null; |
| 5989 |
}, |
| 5990 |
getMinHeightValue:function(){if(this._computedMinHeightValue!=null){return this._computedMinHeightValue; |
| 5991 |
} |
| 5992 |
switch(this._computedMinHeightType){case qx.ui.core.Widget.TYPE_PIXEL:return this._computedMinHeightValue=this._computeValuePixelLimit(this._computedMinHeightParsed); |
| 5993 |
case qx.ui.core.Widget.TYPE_PERCENT:return this._computedMinHeightValue=this._computeValuePercentYLimit(this._computedMinHeightParsed); |
| 5994 |
case qx.ui.core.Widget.TYPE_AUTO:return this._computedMinHeightValue=this.getPreferredBoxHeight(); |
| 5995 |
}return null; |
| 5996 |
}, |
| 5997 |
getMaxHeightValue:function(){if(this._computedMaxHeightValue!=null){return this._computedMaxHeightValue; |
| 5998 |
} |
| 5999 |
switch(this._computedMaxHeightType){case qx.ui.core.Widget.TYPE_PIXEL:return this._computedMaxHeightValue=this._computeValuePixelLimit(this._computedMaxHeightParsed); |
| 6000 |
case qx.ui.core.Widget.TYPE_PERCENT:return this._computedMaxHeightValue=this._computeValuePercentYLimit(this._computedMaxHeightParsed); |
| 6001 |
case qx.ui.core.Widget.TYPE_AUTO:return this._computedMaxHeightValue=this.getPreferredBoxHeight(); |
| 6002 |
}return null; |
| 6003 |
}, |
| 6004 |
getTopValue:function(){if(this._computedTopValue!=null){return this._computedTopValue; |
| 6005 |
} |
| 6006 |
switch(this._computedTopType){case qx.ui.core.Widget.TYPE_PIXEL:return this._computedTopValue=this._computeValuePixel(this._computedTopParsed); |
| 6007 |
case qx.ui.core.Widget.TYPE_PERCENT:return this._computedTopValue=this._computeValuePercentY(this._computedTopParsed); |
| 6008 |
}return null; |
| 6009 |
}, |
| 6010 |
getBottomValue:function(){if(this._computedBottomValue!=null){return this._computedBottomValue; |
| 6011 |
} |
| 6012 |
switch(this._computedBottomType){case qx.ui.core.Widget.TYPE_PIXEL:return this._computedBottomValue=this._computeValuePixel(this._computedBottomParsed); |
| 6013 |
case qx.ui.core.Widget.TYPE_PERCENT:return this._computedBottomValue=this._computeValuePercentY(this._computedBottomParsed); |
| 6014 |
}return null; |
| 6015 |
}, |
| 6016 |
_computeFrameWidth:function(){var fw=this._cachedBorderLeft+this.getPaddingLeft()+this.getPaddingRight()+this._cachedBorderRight; |
| 6017 |
switch(this.getOverflow()){case "scroll":case "scrollY":fw+=qx.ui.core.Widget.SCROLLBAR_SIZE; |
| 6018 |
break; |
| 6019 |
case "auto":break; |
| 6020 |
}return fw; |
| 6021 |
}, |
| 6022 |
_computeFrameHeight:function(){var fh=this._cachedBorderTop+this.getPaddingTop()+this.getPaddingBottom()+this._cachedBorderBottom; |
| 6023 |
switch(this.getOverflow()){case "scroll":case "scrollX":fh+=qx.ui.core.Widget.SCROLLBAR_SIZE; |
| 6024 |
break; |
| 6025 |
case "auto":break; |
| 6026 |
}return fh; |
| 6027 |
}, |
| 6028 |
_invalidateFrameDimensions:function(){this._invalidateFrameWidth(); |
| 6029 |
this._invalidateFrameHeight(); |
| 6030 |
}, |
| 6031 |
_invalidatePreferredInnerDimensions:function(){this._invalidatePreferredInnerWidth(); |
| 6032 |
this._invalidatePreferredInnerHeight(); |
| 6033 |
}, |
| 6034 |
_computePreferredBoxWidth:function(){try{return Math.max(0, |
| 6035 |
this.getPreferredInnerWidth()+this.getFrameWidth()); |
| 6036 |
}catch(ex){this.error("_computePreferredBoxWidth failed", |
| 6037 |
ex); |
| 6038 |
}}, |
| 6039 |
_computePreferredBoxHeight:function(){try{return Math.max(0, |
| 6040 |
this.getPreferredInnerHeight()+this.getFrameHeight()); |
| 6041 |
}catch(ex){this.error("_computePreferredBoxHeight failed", |
| 6042 |
ex); |
| 6043 |
}}, |
| 6044 |
_initialLayoutDone:false, |
| 6045 |
addToLayoutChanges:function(p){if(this._isDisplayable){this.getParent()._addChildToChildrenQueue(this); |
| 6046 |
}return this._layoutChanges[p]=true; |
| 7316 |
}, |
6047 |
}, |
| 7317 |
_applyDisplay:function(value, |
6048 |
addToQueue:function(p){this._initialLayoutDone?this.addToJobQueue(p):this.addToLayoutChanges(p); |
| 7318 |
old){return this._handleDisplayable("display"); |
|
|
| 7319 |
}, |
6049 |
}, |
| 7320 |
_handleDisplayable:function(vHint){var vDisplayable=this._computeDisplayable(); |
6050 |
addToQueueRuntime:function(p){return !this._initialLayoutDone||this.addToJobQueue(p); |
| 7321 |
if(this._isDisplayable==vDisplayable&&!(vDisplayable&&vHint=="parent")){return true; |
|
|
| 7322 |
}this._isDisplayable=vDisplayable; |
| 7323 |
var vParent=this.getParent(); |
| 7324 |
if(vParent){vParent._invalidateVisibleChildren(); |
| 7325 |
vParent._invalidatePreferredInnerDimensions(); |
| 7326 |
}if(vHint&&this._oldParent&&this._oldParent._initialLayoutDone){var elem=this.getElement(); |
| 7327 |
if(elem){if(this.getVisibility()){this._beforeDisappear(); |
| 7328 |
}this._beforeRemoveDom(); |
| 7329 |
try{this._oldParent._getTargetNode().removeChild(elem); |
| 7330 |
}catch(e){}this._afterRemoveDom(); |
| 7331 |
if(this.getVisibility()){this._afterDisappear(); |
| 7332 |
}}delete this._oldParent; |
| 7333 |
}if(vDisplayable){if(vParent._initialLayoutDone){vParent.getLayoutImpl().updateChildrenOnAddChild(this, |
| 7334 |
vParent.getChildren().indexOf(this)); |
| 7335 |
vParent.addToJobQueue("addChild"); |
| 7336 |
}this.addToLayoutChanges("initial"); |
| 7337 |
this.addToCustomQueues(vHint); |
| 7338 |
if(this.getVisibility()){this._beforeAppear(); |
| 7339 |
}if(!this._isCreated){qx.ui.core.Widget.addToGlobalElementQueue(this); |
| 7340 |
}qx.ui.core.Widget.addToGlobalStateQueue(this); |
| 7341 |
if(!qx.lang.Object.isEmpty(this._jobQueue)){qx.ui.core.Widget.addToGlobalJobQueue(this); |
| 7342 |
} |
| 7343 |
if(!qx.lang.Object.isEmpty(this._childrenQueue)){qx.ui.core.Widget.addToGlobalLayoutQueue(this); |
| 7344 |
}}else{qx.ui.core.Widget.removeFromGlobalElementQueue(this); |
| 7345 |
qx.ui.core.Widget.removeFromGlobalStateQueue(this); |
| 7346 |
qx.ui.core.Widget.removeFromGlobalJobQueue(this); |
| 7347 |
qx.ui.core.Widget.removeFromGlobalLayoutQueue(this); |
| 7348 |
this.removeFromCustomQueues(vHint); |
| 7349 |
if(vParent&&vHint){if(this.getVisibility()){this._beforeDisappear(); |
| 7350 |
}if(vParent._initialLayoutDone&&this._initialLayoutDone){vParent.getLayoutImpl().updateChildrenOnRemoveChild(this, |
| 7351 |
vParent.getChildren().indexOf(this)); |
| 7352 |
vParent.addToJobQueue("removeChild"); |
| 7353 |
this._beforeRemoveDom(); |
| 7354 |
var parentNode=this.getElement().parentNode; |
| 7355 |
if(parentNode){parentNode.removeChild(this.getElement()); |
| 7356 |
if(parentNode&&parentNode!==vParent._getTargetNode()){this.warn("Unexpected parent node: "+parentNode); |
| 7357 |
}}this._afterRemoveDom(); |
| 7358 |
}vParent._removeChildFromChildrenQueue(this); |
| 7359 |
if(this.getVisibility()){this._afterDisappear(); |
| 7360 |
}}}this._handleDisplayableCustom(vDisplayable, |
| 7361 |
vParent, |
| 7362 |
vHint); |
| 7363 |
return true; |
| 7364 |
}, |
6051 |
}, |
| 7365 |
addToCustomQueues:qx.lang.Function.returnTrue, |
6052 |
_computeHasPercentX:function(){return (this._computedLeftTypePercent||this._computedWidthTypePercent||this._computedMinWidthTypePercent||this._computedMaxWidthTypePercent||this._computedRightTypePercent); |
| 7366 |
removeFromCustomQueues:qx.lang.Function.returnTrue, |
|
|
| 7367 |
_handleDisplayableCustom:qx.lang.Function.returnTrue, |
| 7368 |
_computeDisplayable:function(){return this.getDisplay()&&this.getParent()&&this.getParent()._isDisplayable?true:false; |
| 7369 |
}, |
6053 |
}, |
| 7370 |
_beforeAppear:function(){this.createDispatchEvent("beforeAppear"); |
6054 |
_computeHasPercentY:function(){return (this._computedTopTypePercent||this._computedHeightTypePercent||this._computedMinHeightTypePercent||this._computedMaxHeightTypePercent||this._computedBottomTypePercent); |
| 7371 |
}, |
6055 |
}, |
| 7372 |
_afterAppear:function(){this._isSeeable=true; |
6056 |
_computeHasAutoX:function(){return (this._computedWidthTypeAuto||this._computedMinWidthTypeAuto||this._computedMaxWidthTypeAuto); |
| 7373 |
this.createDispatchEvent("appear"); |
|
|
| 7374 |
}, |
6057 |
}, |
| 7375 |
_beforeDisappear:function(){this.removeState("over"); |
6058 |
_computeHasAutoY:function(){return (this._computedHeightTypeAuto||this._computedMinHeightTypeAuto||this._computedMaxHeightTypeAuto); |
| 7376 |
if(qx.Class.isDefined("qx.ui.form.Button")){this.removeState("pressed"); |
|
|
| 7377 |
this.removeState("abandoned"); |
| 7378 |
}this.createDispatchEvent("beforeDisappear"); |
| 7379 |
}, |
6059 |
}, |
| 7380 |
_afterDisappear:function(){this._isSeeable=false; |
6060 |
_computeHasFlexX:function(){return this._computedWidthTypeFlex; |
| 7381 |
this.createDispatchEvent("disappear"); |
|
|
| 7382 |
}, |
6061 |
}, |
| 7383 |
_isSeeable:false, |
6062 |
_computeHasFlexY:function(){return this._computedHeightTypeFlex; |
| 7384 |
isSeeable:function(){return this._isSeeable; |
|
|
| 7385 |
}, |
6063 |
}, |
| 7386 |
isAppearRelevant:function(){return this.getVisibility()&&this._isDisplayable; |
6064 |
_evalUnitsPixelPercentAutoFlex:function(value){switch(value){case "auto":return qx.ui.core.Widget.TYPE_AUTO; |
|
|
6065 |
case Infinity:case -Infinity:return qx.ui.core.Widget.TYPE_NULL; |
| 6066 |
} |
| 6067 |
switch(typeof value){case "number":return isNaN(value)?qx.ui.core.Widget.TYPE_NULL:qx.ui.core.Widget.TYPE_PIXEL; |
| 6068 |
case "string":return value.indexOf("%")!=-1?qx.ui.core.Widget.TYPE_PERCENT:value.indexOf("*")!=-1?qx.ui.core.Widget.TYPE_FLEX:qx.ui.core.Widget.TYPE_NULL; |
| 6069 |
}return qx.ui.core.Widget.TYPE_NULL; |
| 7387 |
}, |
6070 |
}, |
| 7388 |
_beforeInsertDom:function(){this.createDispatchEvent("beforeInsertDom"); |
6071 |
_evalUnitsPixelPercentAuto:function(value){switch(value){case "auto":return qx.ui.core.Widget.TYPE_AUTO; |
|
|
6072 |
case Infinity:case -Infinity:return qx.ui.core.Widget.TYPE_NULL; |
| 6073 |
} |
| 6074 |
switch(typeof value){case "number":return isNaN(value)?qx.ui.core.Widget.TYPE_NULL:qx.ui.core.Widget.TYPE_PIXEL; |
| 6075 |
case "string":return value.indexOf("%")!=-1?qx.ui.core.Widget.TYPE_PERCENT:qx.ui.core.Widget.TYPE_NULL; |
| 6076 |
}return qx.ui.core.Widget.TYPE_NULL; |
| 7389 |
}, |
6077 |
}, |
| 7390 |
_afterInsertDom:function(){this.createDispatchEvent("insertDom"); |
6078 |
_evalUnitsPixelPercent:function(value){switch(value){case Infinity:case -Infinity:return qx.ui.core.Widget.TYPE_NULL; |
|
|
6079 |
} |
| 6080 |
switch(typeof value){case "number":return isNaN(value)?qx.ui.core.Widget.TYPE_NULL:qx.ui.core.Widget.TYPE_PIXEL; |
| 6081 |
case "string":return value.indexOf("%")!=-1?qx.ui.core.Widget.TYPE_PERCENT:qx.ui.core.Widget.TYPE_NULL; |
| 6082 |
}return qx.ui.core.Widget.TYPE_NULL; |
| 7391 |
}, |
6083 |
}, |
| 7392 |
_beforeRemoveDom:function(){this.createDispatchEvent("beforeRemoveDom"); |
6084 |
_unitDetectionPixelPercentAutoFlex:function(name, |
|
|
6085 |
value){var r=qx.ui.core.Widget.layoutPropertyTypes[name]; |
| 6086 |
var s=r.dataType; |
| 6087 |
var p=r.dataParsed; |
| 6088 |
var v=r.dataValue; |
| 6089 |
var s1=r.typePixel; |
| 6090 |
var s2=r.typePercent; |
| 6091 |
var s3=r.typeAuto; |
| 6092 |
var s4=r.typeFlex; |
| 6093 |
var s5=r.typeNull; |
| 6094 |
var wasPercent=this[s2]; |
| 6095 |
var wasAuto=this[s3]; |
| 6096 |
var wasFlex=this[s4]; |
| 6097 |
switch(this[s]=this._evalUnitsPixelPercentAutoFlex(value)){case qx.ui.core.Widget.TYPE_PIXEL:this[s1]=true; |
| 6098 |
this[s2]=this[s3]=this[s4]=this[s5]=false; |
| 6099 |
this[p]=this[v]=Math.round(value); |
| 6100 |
break; |
| 6101 |
case qx.ui.core.Widget.TYPE_PERCENT:this[s2]=true; |
| 6102 |
this[s1]=this[s3]=this[s4]=this[s5]=false; |
| 6103 |
this[p]=parseFloat(value); |
| 6104 |
this[v]=null; |
| 6105 |
break; |
| 6106 |
case qx.ui.core.Widget.TYPE_AUTO:this[s3]=true; |
| 6107 |
this[s1]=this[s2]=this[s4]=this[s5]=false; |
| 6108 |
this[p]=this[v]=null; |
| 6109 |
break; |
| 6110 |
case qx.ui.core.Widget.TYPE_FLEX:this[s4]=true; |
| 6111 |
this[s1]=this[s2]=this[s3]=this[s5]=false; |
| 6112 |
this[p]=parseFloat(value); |
| 6113 |
this[v]=null; |
| 6114 |
break; |
| 6115 |
default:this[s5]=true; |
| 6116 |
this[s1]=this[s2]=this[s3]=this[s4]=false; |
| 6117 |
this[p]=this[v]=null; |
| 6118 |
break; |
| 6119 |
} |
| 6120 |
if(wasPercent!=this[s2]){switch(name){case "minWidth":case "maxWidth":case "width":case "left":case "right":this._invalidateHasPercentX(); |
| 6121 |
break; |
| 6122 |
case "maxHeight":case "minHeight":case "height":case "top":case "bottom":this._invalidateHasPercentY(); |
| 6123 |
break; |
| 6124 |
}}if(wasAuto!=this[s3]){switch(name){case "minWidth":case "maxWidth":case "width":this._invalidateHasAutoX(); |
| 6125 |
break; |
| 6126 |
case "minHeight":case "maxHeight":case "height":this._invalidateHasAutoY(); |
| 6127 |
break; |
| 6128 |
}}if(wasFlex!=this[s4]){switch(name){case "width":this._invalidateHasFlexX(); |
| 6129 |
break; |
| 6130 |
case "height":this._invalidateHasFlexY(); |
| 6131 |
break; |
| 6132 |
}}}, |
| 6133 |
_unitDetectionPixelPercentAuto:function(name, |
| 6134 |
value){var r=qx.ui.core.Widget.layoutPropertyTypes[name]; |
| 6135 |
var s=r.dataType; |
| 6136 |
var p=r.dataParsed; |
| 6137 |
var v=r.dataValue; |
| 6138 |
var s1=r.typePixel; |
| 6139 |
var s2=r.typePercent; |
| 6140 |
var s3=r.typeAuto; |
| 6141 |
var s4=r.typeNull; |
| 6142 |
var wasPercent=this[s2]; |
| 6143 |
var wasAuto=this[s3]; |
| 6144 |
switch(this[s]=this._evalUnitsPixelPercentAuto(value)){case qx.ui.core.Widget.TYPE_PIXEL:this[s1]=true; |
| 6145 |
this[s2]=this[s3]=this[s4]=false; |
| 6146 |
this[p]=this[v]=Math.round(value); |
| 6147 |
break; |
| 6148 |
case qx.ui.core.Widget.TYPE_PERCENT:this[s2]=true; |
| 6149 |
this[s1]=this[s3]=this[s4]=false; |
| 6150 |
this[p]=parseFloat(value); |
| 6151 |
this[v]=null; |
| 6152 |
break; |
| 6153 |
case qx.ui.core.Widget.TYPE_AUTO:this[s3]=true; |
| 6154 |
this[s1]=this[s2]=this[s4]=false; |
| 6155 |
this[p]=this[v]=null; |
| 6156 |
break; |
| 6157 |
default:this[s4]=true; |
| 6158 |
this[s1]=this[s2]=this[s3]=false; |
| 6159 |
this[p]=this[v]=null; |
| 6160 |
break; |
| 6161 |
} |
| 6162 |
if(wasPercent!=this[s2]){switch(name){case "minWidth":case "maxWidth":case "width":case "left":case "right":this._invalidateHasPercentX(); |
| 6163 |
break; |
| 6164 |
case "minHeight":case "maxHeight":case "height":case "top":case "bottom":this._invalidateHasPercentY(); |
| 6165 |
break; |
| 6166 |
}}if(wasAuto!=this[s3]){switch(name){case "minWidth":case "maxWidth":case "width":this._invalidateHasAutoX(); |
| 6167 |
break; |
| 6168 |
case "minHeight":case "maxHeight":case "height":this._invalidateHasAutoY(); |
| 6169 |
break; |
| 6170 |
}}}, |
| 6171 |
_unitDetectionPixelPercent:function(name, |
| 6172 |
value){var r=qx.ui.core.Widget.layoutPropertyTypes[name]; |
| 6173 |
var s=r.dataType; |
| 6174 |
var p=r.dataParsed; |
| 6175 |
var v=r.dataValue; |
| 6176 |
var s1=r.typePixel; |
| 6177 |
var s2=r.typePercent; |
| 6178 |
var s3=r.typeNull; |
| 6179 |
var wasPercent=this[s2]; |
| 6180 |
switch(this[s]=this._evalUnitsPixelPercent(value)){case qx.ui.core.Widget.TYPE_PIXEL:this[s1]=true; |
| 6181 |
this[s2]=this[s3]=false; |
| 6182 |
this[p]=this[v]=Math.round(value); |
| 6183 |
break; |
| 6184 |
case qx.ui.core.Widget.TYPE_PERCENT:this[s2]=true; |
| 6185 |
this[s1]=this[s3]=false; |
| 6186 |
this[p]=parseFloat(value); |
| 6187 |
this[v]=null; |
| 6188 |
break; |
| 6189 |
default:this[s3]=true; |
| 6190 |
this[s1]=this[s2]=false; |
| 6191 |
this[p]=this[v]=null; |
| 6192 |
break; |
| 6193 |
} |
| 6194 |
if(wasPercent!=this[s2]){switch(name){case "minWidth":case "maxWidth":case "width":case "left":case "right":this._invalidateHasPercentX(); |
| 6195 |
break; |
| 6196 |
case "minHeight":case "maxHeight":case "height":case "top":case "bottom":this._invalidateHasPercentY(); |
| 6197 |
break; |
| 6198 |
}}}, |
| 6199 |
getTopLevelWidget:function(){return this._hasParent?this.getParent().getTopLevelWidget():null; |
| 7393 |
}, |
6200 |
}, |
| 7394 |
_afterRemoveDom:function(){this.createDispatchEvent("removeDom"); |
6201 |
moveSelfBefore:function(vBefore){this.getParent().addBefore(this, |
|
|
6202 |
vBefore); |
| 7395 |
}, |
6203 |
}, |
| 7396 |
_applyVisibility:function(value, |
6204 |
moveSelfAfter:function(vAfter){this.getParent().addAfter(this, |
| 7397 |
old){if(value){if(this._isDisplayable){this._beforeAppear(); |
6205 |
vAfter); |
| 7398 |
}this.removeStyleProperty("display"); |
|
|
| 7399 |
if(this._isDisplayable){this._afterAppear(); |
| 7400 |
}}else{if(this._isDisplayable){this._beforeDisappear(); |
| 7401 |
}this.setStyleProperty("display", |
| 7402 |
"none"); |
| 7403 |
if(this._isDisplayable){this._afterDisappear(); |
| 7404 |
}}}, |
| 7405 |
show:function(){this.setVisibility(true); |
| 7406 |
this.setDisplay(true); |
| 7407 |
}, |
6206 |
}, |
| 7408 |
hide:function(){this.setVisibility(false); |
6207 |
moveSelfToBegin:function(){this.getParent().addAtBegin(this); |
|
|
6208 |
}, |
| 6209 |
moveSelfToEnd:function(){this.getParent().addAtEnd(this); |
| 6210 |
}, |
| 6211 |
getPreviousSibling:function(){var p=this.getParent(); |
| 6212 |
if(p==null){return null; |
| 6213 |
}var cs=p.getChildren(); |
| 6214 |
return cs[cs.indexOf(this)-1]; |
| 6215 |
}, |
| 6216 |
getNextSibling:function(){var p=this.getParent(); |
| 6217 |
if(p==null){return null; |
| 6218 |
}var cs=p.getChildren(); |
| 6219 |
return cs[cs.indexOf(this)+1]; |
| 6220 |
}, |
| 6221 |
getPreviousVisibleSibling:function(){if(!this._hasParent){return null; |
| 6222 |
}var vChildren=this.getParent().getVisibleChildren(); |
| 6223 |
return vChildren[vChildren.indexOf(this)-1]; |
| 6224 |
}, |
| 6225 |
getNextVisibleSibling:function(){if(!this._hasParent){return null; |
| 6226 |
}var vChildren=this.getParent().getVisibleChildren(); |
| 6227 |
return vChildren[vChildren.indexOf(this)+1]; |
| 6228 |
}, |
| 6229 |
getPreviousActiveSibling:function(vIgnoreClasses){var vPrev=qx.ui.core.Widget.getActiveSiblingHelper(this, |
| 6230 |
this.getParent(), |
| 6231 |
-1, |
| 6232 |
vIgnoreClasses, |
| 6233 |
null); |
| 6234 |
return vPrev?vPrev:this.getParent().getLastActiveChild(); |
| 7409 |
}, |
6235 |
}, |
| 7410 |
connect:function(){this.setDisplay(true); |
6236 |
getNextActiveSibling:function(vIgnoreClasses){var vNext=qx.ui.core.Widget.getActiveSiblingHelper(this, |
|
|
6237 |
this.getParent(), |
| 6238 |
1, |
| 6239 |
vIgnoreClasses, |
| 6240 |
null); |
| 6241 |
return vNext?vNext:this.getParent().getFirstActiveChild(); |
| 7411 |
}, |
6242 |
}, |
| 7412 |
disconnect:function(){this.setDisplay(false); |
6243 |
isFirstChild:function(){return this._hasParent&&this.getParent().getFirstChild()==this; |
| 7413 |
}, |
6244 |
}, |
| 7414 |
_isCreated:false, |
6245 |
isLastChild:function(){return this._hasParent&&this.getParent().getLastChild()==this; |
| 7415 |
_getTargetNode:qx.core.Variant.select("qx.client", |
|
|
| 7416 |
{"gecko":function(){return this._element; |
| 7417 |
}, |
6246 |
}, |
| 7418 |
"default":function(){return this._borderElement||this._element; |
6247 |
isFirstVisibleChild:function(){return this._hasParent&&this.getParent().getFirstVisibleChild()==this; |
| 7419 |
}}), |
|
|
| 7420 |
addToDocument:function(){qx.ui.core.ClientDocument.getInstance().add(this); |
| 7421 |
}, |
6248 |
}, |
| 7422 |
isCreated:function(){return this._isCreated; |
6249 |
isLastVisibleChild:function(){return this._hasParent&&this.getParent().getLastVisibleChild()==this; |
| 7423 |
}, |
6250 |
}, |
| 7424 |
_createElementImpl:function(){this.setElement(this.getTopLevelWidget().getDocumentElement().createElement("div")); |
6251 |
hasState:function(vState){return this.__states&&this.__states[vState]?true:false; |
| 7425 |
}, |
6252 |
}, |
| 7426 |
_applyElement:function(value, |
6253 |
addState:function(vState){if(!this.__states){this.__states={}; |
| 7427 |
old){this._isCreated=value!=null; |
|
|
| 7428 |
if(old){old.qx_Widget=null; |
| 7429 |
} |
6254 |
} |
| 7430 |
if(value){value.qx_Widget=this; |
6255 |
if(!this.__states[vState]){this.__states[vState]=true; |
| 7431 |
value.style.position="absolute"; |
6256 |
if(this._hasParent){qx.ui.core.Widget.addToGlobalStateQueue(this); |
| 7432 |
this._element=value; |
6257 |
}}}, |
| 7433 |
this._style=value.style; |
6258 |
removeState:function(vState){if(this.__states&&this.__states[vState]){delete this.__states[vState]; |
| 7434 |
this._applyStyleProperties(value); |
6259 |
if(this._hasParent){qx.ui.core.Widget.addToGlobalStateQueue(this); |
| 7435 |
this._applyHtmlProperties(value); |
6260 |
}}}, |
| 7436 |
this._applyHtmlAttributes(value); |
6261 |
_styleFromMap:function(data){var styler=qx.core.Property.$$method.style; |
| 7437 |
this._applyElementData(value); |
6262 |
var unstyler=qx.core.Property.$$method.unstyle; |
| 7438 |
this.createDispatchEvent("create"); |
6263 |
var value; |
| 7439 |
this.addToStateQueue(); |
6264 |
{for(var prop in data){if(!this[styler[prop]]){throw new Error(this.classname+' has no themeable property "'+prop+'"'); |
| 7440 |
}else{this._element=this._style=null; |
6265 |
}}}; |
|
|
6266 |
for(var prop in data){value=data[prop]; |
| 6267 |
value==="undefined"?this[unstyler[prop]]():this[styler[prop]](value); |
| 7441 |
}}, |
6268 |
}}, |
| 7442 |
addToJobQueue:function(p){if(this._hasParent){qx.ui.core.Widget.addToGlobalJobQueue(this); |
6269 |
_unstyleFromArray:function(data){var unstyler=qx.core.Property.$$method.unstyle; |
| 7443 |
} |
6270 |
{for(var i=0, |
| 7444 |
if(!this._jobQueue){this._jobQueue={}; |
6271 |
l=data.length;i<l;i++){if(!this[unstyler[data[i]]]){throw new Error(this.classname+' has no themeable property "'+data[i]+'"'); |
| 7445 |
}this._jobQueue[p]=true; |
6272 |
}}}; |
| 7446 |
return true; |
6273 |
for(var i=0, |
| 7447 |
}, |
6274 |
l=data.length;i<l;i++){this[unstyler[data[i]]](); |
| 7448 |
_flushJobQueue:function(q){try{var vQueue=this._jobQueue; |
6275 |
}}, |
| 7449 |
var vParent=this.getParent(); |
6276 |
_renderAppearance:function(){if(!this.__states){this.__states={}; |
| 7450 |
if(!vParent||qx.lang.Object.isEmpty(vQueue)){return; |
6277 |
}this._applyStateStyleFocus(this.__states); |
| 7451 |
}var vLayoutImpl=this instanceof qx.ui.core.Parent?this.getLayoutImpl():null; |
6278 |
var vAppearance=this.getAppearance(); |
| 7452 |
if(vLayoutImpl){vLayoutImpl.updateSelfOnJobQueueFlush(vQueue); |
6279 |
if(vAppearance){try{var r=qx.theme.manager.Appearance.getInstance().styleFrom(vAppearance, |
| 7453 |
}}catch(ex){this.error("Flushing job queue (prechecks#1) failed", |
6280 |
this.__states); |
| 7454 |
ex); |
6281 |
if(r){this._styleFromMap(r); |
| 7455 |
}try{var vFlushParentJobQueue=false; |
6282 |
}}catch(ex){this.error("Could not apply state appearance", |
| 7456 |
var vRecomputeOuterWidth=vQueue.marginLeft||vQueue.marginRight; |
|
|
| 7457 |
var vRecomputeOuterHeight=vQueue.marginTop||vQueue.marginBottom; |
| 7458 |
var vRecomputeInnerWidth=vQueue.frameWidth; |
| 7459 |
var vRecomputeInnerHeight=vQueue.frameHeight; |
| 7460 |
var vRecomputeParentPreferredInnerWidth=(vQueue.frameWidth||vQueue.preferredInnerWidth)&&this._recomputePreferredBoxWidth(); |
| 7461 |
var vRecomputeParentPreferredInnerHeight=(vQueue.frameHeight||vQueue.preferredInnerHeight)&&this._recomputePreferredBoxHeight(); |
| 7462 |
if(vRecomputeParentPreferredInnerWidth){var vPref=this.getPreferredBoxWidth(); |
| 7463 |
if(this._computedWidthTypeAuto){this._computedWidthValue=vPref; |
| 7464 |
vQueue.width=true; |
| 7465 |
} |
| 7466 |
if(this._computedMinWidthTypeAuto){this._computedMinWidthValue=vPref; |
| 7467 |
vQueue.minWidth=true; |
| 7468 |
} |
| 7469 |
if(this._computedMaxWidthTypeAuto){this._computedMaxWidthValue=vPref; |
| 7470 |
vQueue.maxWidth=true; |
| 7471 |
}} |
| 7472 |
if(vRecomputeParentPreferredInnerHeight){var vPref=this.getPreferredBoxHeight(); |
| 7473 |
if(this._computedHeightTypeAuto){this._computedHeightValue=vPref; |
| 7474 |
vQueue.height=true; |
| 7475 |
} |
| 7476 |
if(this._computedMinHeightTypeAuto){this._computedMinHeightValue=vPref; |
| 7477 |
vQueue.minHeight=true; |
| 7478 |
} |
| 7479 |
if(this._computedMaxHeightTypeAuto){this._computedMaxHeightValue=vPref; |
| 7480 |
vQueue.maxHeight=true; |
| 7481 |
}} |
| 7482 |
if((vQueue.width||vQueue.minWidth||vQueue.maxWidth||vQueue.left||vQueue.right)&&this._recomputeBoxWidth()){vRecomputeOuterWidth=vRecomputeInnerWidth=true; |
| 7483 |
} |
| 7484 |
if((vQueue.height||vQueue.minHeight||vQueue.maxHeight||vQueue.top||vQueue.bottom)&&this._recomputeBoxHeight()){vRecomputeOuterHeight=vRecomputeInnerHeight=true; |
| 7485 |
}}catch(ex){this.error("Flushing job queue (recompute#2) failed", |
| 7486 |
ex); |
6283 |
ex); |
| 7487 |
}try{if((vRecomputeOuterWidth&&this._recomputeOuterWidth())||vRecomputeParentPreferredInnerWidth){vParent._invalidatePreferredInnerWidth(); |
6284 |
}}}, |
| 7488 |
vParent.getLayoutImpl().updateSelfOnChildOuterWidthChange(this); |
6285 |
_resetAppearanceThemeWrapper:function(vNewAppearanceTheme, |
| 7489 |
vFlushParentJobQueue=true; |
6286 |
vOldAppearanceTheme){var vAppearance=this.getAppearance(); |
| 7490 |
} |
6287 |
if(vAppearance){var vAppearanceManager=qx.theme.manager.Appearance.getInstance(); |
| 7491 |
if((vRecomputeOuterHeight&&this._recomputeOuterHeight())||vRecomputeParentPreferredInnerHeight){vParent._invalidatePreferredInnerHeight(); |
6288 |
var vOldAppearanceProperties=vAppearanceManager.styleFromTheme(vOldAppearanceTheme, |
| 7492 |
vParent.getLayoutImpl().updateSelfOnChildOuterHeightChange(this); |
6289 |
vAppearance, |
| 7493 |
vFlushParentJobQueue=true; |
6290 |
this.__states); |
|
|
6291 |
var vNewAppearanceProperties=vAppearanceManager.styleFromTheme(vNewAppearanceTheme, |
| 6292 |
vAppearance, |
| 6293 |
this.__states); |
| 6294 |
var vUnstyleList=[]; |
| 6295 |
for(var prop in vOldAppearanceProperties){if(vNewAppearanceProperties[prop]===undefined){vUnstyleList.push(prop); |
| 6296 |
}}this._unstyleFromArray(vUnstyleList); |
| 6297 |
this._styleFromMap(vNewAppearanceProperties); |
| 6298 |
}}, |
| 6299 |
_applyStateStyleFocus:qx.core.Variant.select("qx.client", |
| 6300 |
{"mshtml":function(vStates){}, |
| 6301 |
"gecko":function(vStates){if(vStates.focused){if(!qx.event.handler.FocusHandler.mouseFocus&&!this.getHideFocus()){this.setStyleProperty("MozOutline", |
| 6302 |
"1px dotted invert"); |
| 6303 |
}}else{this.removeStyleProperty("MozOutline"); |
| 6304 |
}}, |
| 6305 |
"default":function(vStates){if(vStates.focused){if(!qx.event.handler.FocusHandler.mouseFocus&&!this.getHideFocus()){this.setStyleProperty("outline", |
| 6306 |
"1px dotted invert"); |
| 6307 |
}}else{this.removeStyleProperty("outline"); |
| 6308 |
}}}), |
| 6309 |
addToStateQueue:function(){qx.ui.core.Widget.addToGlobalStateQueue(this); |
| 6310 |
}, |
| 6311 |
recursiveAddToStateQueue:function(){this.addToStateQueue(); |
| 6312 |
}, |
| 6313 |
_applyAppearance:function(value, |
| 6314 |
old){if(!this.__states){this.__states={}; |
| 6315 |
}var vAppearanceManager=qx.theme.manager.Appearance.getInstance(); |
| 6316 |
if(value){var vNewAppearanceProperties=vAppearanceManager.styleFrom(value, |
| 6317 |
this.__states)||{}; |
| 7494 |
} |
6318 |
} |
| 7495 |
if(vFlushParentJobQueue){vParent._flushJobQueue(); |
6319 |
if(old){var vOldAppearanceProperties=vAppearanceManager.styleFrom(old, |
| 7496 |
}}catch(ex){this.error("Flushing job queue (parentsignals#3) failed", |
6320 |
this.__states)||{}; |
| 7497 |
ex); |
6321 |
var vUnstyleList=[]; |
| 7498 |
}try{vParent._addChildToChildrenQueue(this); |
6322 |
for(var prop in vOldAppearanceProperties){if(!vNewAppearanceProperties||!(prop in vNewAppearanceProperties)){vUnstyleList.push(prop); |
| 7499 |
for(var i in vQueue){this._layoutChanges[i]=true; |
|
|
| 7500 |
}}catch(ex){this.error("Flushing job queue (addjobs#4) failed", |
| 7501 |
ex); |
| 7502 |
}try{if(this instanceof qx.ui.core.Parent&&(vQueue.paddingLeft||vQueue.paddingRight||vQueue.paddingTop||vQueue.paddingBottom)){var ch=this.getChildren(), |
| 7503 |
chl=ch.length; |
| 7504 |
if(vQueue.paddingLeft){for(var i=0;i<chl;i++){ch[i].addToLayoutChanges("parentPaddingLeft"); |
| 7505 |
}} |
| 7506 |
if(vQueue.paddingRight){for(var i=0;i<chl;i++){ch[i].addToLayoutChanges("parentPaddingRight"); |
| 7507 |
}} |
| 7508 |
if(vQueue.paddingTop){for(var i=0;i<chl;i++){ch[i].addToLayoutChanges("parentPaddingTop"); |
| 7509 |
}} |
| 7510 |
if(vQueue.paddingBottom){for(var i=0;i<chl;i++){ch[i].addToLayoutChanges("parentPaddingBottom"); |
| 7511 |
}}} |
6323 |
}}} |
| 7512 |
if(vRecomputeInnerWidth){this._recomputeInnerWidth(); |
6324 |
if(vUnstyleList){this._unstyleFromArray(vUnstyleList); |
| 7513 |
} |
|
|
| 7514 |
if(vRecomputeInnerHeight){this._recomputeInnerHeight(); |
| 7515 |
} |
6325 |
} |
| 7516 |
if(this._initialLayoutDone){if(vLayoutImpl){vLayoutImpl.updateChildrenOnJobQueueFlush(vQueue); |
6326 |
if(vNewAppearanceProperties){this._styleFromMap(vNewAppearanceProperties); |
| 7517 |
}}}catch(ex){this.error("Flushing job queue (childrensignals#5) failed", |
6327 |
}}, |
|
|
6328 |
_recursiveAppearanceThemeUpdate:function(vNewAppearanceTheme, |
| 6329 |
vOldAppearanceTheme){try{this._resetAppearanceThemeWrapper(vNewAppearanceTheme, |
| 6330 |
vOldAppearanceTheme); |
| 6331 |
}catch(ex){this.error("Failed to update appearance theme", |
| 7518 |
ex); |
6332 |
ex); |
| 7519 |
}delete this._jobQueue; |
6333 |
}}, |
|
|
6334 |
_applyElementData:function(elem){}, |
| 6335 |
setHtmlProperty:function(propName, |
| 6336 |
value){if(!this._htmlProperties){this._htmlProperties={}; |
| 6337 |
}this._htmlProperties[propName]=value; |
| 6338 |
if(this._isCreated&&this.getElement()[propName]!=value){this.getElement()[propName]=value; |
| 6339 |
}return true; |
| 6340 |
}, |
| 6341 |
removeHtmlProperty:qx.core.Variant.select("qx.client", |
| 6342 |
{"mshtml":function(propName){if(!this._htmlProperties){return; |
| 6343 |
}delete this._htmlProperties[propName]; |
| 6344 |
if(this._isCreated){this.getElement().removeAttribute(propName); |
| 6345 |
}return true; |
| 6346 |
}, |
| 6347 |
"default":function(propName){if(!this._htmlProperties){return; |
| 6348 |
}delete this._htmlProperties[propName]; |
| 6349 |
if(this._isCreated){this.getElement().removeAttribute(propName); |
| 6350 |
delete this.getElement()[propName]; |
| 6351 |
}return true; |
| 6352 |
}}), |
| 6353 |
getHtmlProperty:function(propName){if(!this._htmlProperties){return ""; |
| 6354 |
}return this._htmlProperties[propName]||""; |
| 6355 |
}, |
| 6356 |
_applyHtmlProperties:function(elem){var vProperties=this._htmlProperties; |
| 6357 |
if(vProperties){var propName; |
| 6358 |
for(propName in vProperties){elem[propName]=vProperties[propName]; |
| 6359 |
}}}, |
| 6360 |
_generateHtmlId:function(){var id=this.classname+"."+qx.ui.core.Widget._idCounter++; |
| 6361 |
this.debug("setting autogenerated HTML id to "+id); |
| 6362 |
this.setHtmlProperty("id", |
| 6363 |
id); |
| 6364 |
}, |
| 6365 |
setHtmlAttribute:function(propName, |
| 6366 |
value){qx.log.Logger.deprecatedMethodWarning(arguments.callee, |
| 6367 |
"Use setHtmlProperty instead"); |
| 6368 |
if(!this._htmlAttributes){this._htmlAttributes={}; |
| 6369 |
}this._htmlAttributes[propName]=value; |
| 6370 |
if(this._isCreated){this.getElement().setAttribute(propName, |
| 6371 |
value); |
| 6372 |
}return true; |
| 6373 |
}, |
| 6374 |
removeHtmlAttribute:function(propName){qx.log.Logger.deprecatedMethodWarning(arguments.callee, |
| 6375 |
"Use removeHtmlProperty instead"); |
| 6376 |
if(!this._htmlAttributes){return; |
| 6377 |
}delete this._htmlAttributes[propName]; |
| 6378 |
if(this._isCreated){this.getElement().removeAttribute(propName); |
| 6379 |
}return true; |
| 6380 |
}, |
| 6381 |
getHtmlAttribute:function(propName){if(!this._htmlAttributes){return ""; |
| 6382 |
}return this._htmlAttributes[propName]||""; |
| 6383 |
}, |
| 6384 |
_applyHtmlAttributes:function(elem){var vAttributes=this._htmlAttributes; |
| 6385 |
if(vAttributes){var propName; |
| 6386 |
for(propName in vAttributes){elem.setAttribute(propName, |
| 6387 |
vAttributes[propName]); |
| 6388 |
}}}, |
| 6389 |
getStyleProperty:function(propName){if(!this._styleProperties){return ""; |
| 6390 |
}return this._styleProperties[propName]||""; |
| 6391 |
}, |
| 6392 |
__outerElementStyleProperties:{cursor:true, |
| 6393 |
zIndex:true, |
| 6394 |
filter:true, |
| 6395 |
display:true, |
| 6396 |
visibility:true}, |
| 6397 |
setStyleProperty:function(propName, |
| 6398 |
value){if(!this._styleProperties){this._styleProperties={}; |
| 6399 |
}this._styleProperties[propName]=value; |
| 6400 |
if(this._isCreated){var elem=this.__outerElementStyleProperties[propName]?this.getElement():this._getTargetNode(); |
| 6401 |
if(elem){elem.style[propName]=(value==null)?"":value; |
| 6402 |
}}}, |
| 6403 |
removeStyleProperty:function(propName){if(!this._styleProperties){return; |
| 6404 |
}delete this._styleProperties[propName]; |
| 6405 |
if(this._isCreated){var elem=this.__outerElementStyleProperties[propName]?this.getElement():this._getTargetNode(); |
| 6406 |
if(elem){elem.style[propName]=""; |
| 6407 |
}}}, |
| 6408 |
_applyStyleProperties:function(elem){var vProperties=this._styleProperties; |
| 6409 |
if(!vProperties){return; |
| 6410 |
}var propName; |
| 6411 |
var vBaseElement=elem; |
| 6412 |
var vTargetElement=this._getTargetNode(); |
| 6413 |
var elem; |
| 6414 |
var value; |
| 6415 |
for(propName in vProperties){elem=this.__outerElementStyleProperties[propName]?vBaseElement:vTargetElement; |
| 6416 |
value=vProperties[propName]; |
| 6417 |
elem.style[propName]=(value==null)?"":value; |
| 6418 |
}}, |
| 6419 |
_applyEnabled:function(value, |
| 6420 |
old){if(value===false){this.addState("disabled"); |
| 6421 |
this.removeState("over"); |
| 6422 |
if(qx.Class.isDefined("qx.ui.form.Button")){this.removeState("abandoned"); |
| 6423 |
this.removeState("pressed"); |
| 6424 |
}}else{this.removeState("disabled"); |
| 6425 |
}}, |
| 6426 |
isFocusable:function(){return this.getEnabled()&&this.isSeeable()&&this.getTabIndex()>=0&&this.getTabIndex()!=null; |
| 7520 |
}, |
6427 |
}, |
| 7521 |
_isWidthEssential:qx.lang.Function.returnTrue, |
6428 |
isFocusRoot:function(){return false; |
| 7522 |
_isHeightEssential:qx.lang.Function.returnTrue, |
|
|
| 7523 |
_computeBoxWidthFallback:function(){return 0; |
| 7524 |
}, |
6429 |
}, |
| 7525 |
_computeBoxHeightFallback:function(){return 0; |
6430 |
getFocusRoot:function(){if(this._hasParent){return this.getParent().getFocusRoot(); |
|
|
6431 |
}return null; |
| 7526 |
}, |
6432 |
}, |
| 7527 |
_computeBoxWidth:function(){var vLayoutImpl=this.getParent().getLayoutImpl(); |
6433 |
getActiveChild:function(){var vRoot=this.getFocusRoot(); |
| 7528 |
return Math.max(0, |
6434 |
if(vRoot){return vRoot.getActiveChild(); |
| 7529 |
qx.lang.Number.limit(vLayoutImpl.computeChildBoxWidth(this), |
6435 |
}return null; |
| 7530 |
this.getMinWidthValue(), |
|
|
| 7531 |
this.getMaxWidthValue())); |
| 7532 |
}, |
6436 |
}, |
| 7533 |
_computeBoxHeight:function(){var vLayoutImpl=this.getParent().getLayoutImpl(); |
6437 |
_ontabfocus:qx.lang.Function.returnTrue, |
| 7534 |
return Math.max(0, |
6438 |
_applyFocused:function(value, |
| 7535 |
qx.lang.Number.limit(vLayoutImpl.computeChildBoxHeight(this), |
6439 |
old){if(!this.isCreated()){return; |
| 7536 |
this.getMinHeightValue(), |
6440 |
}var vFocusRoot=this.getFocusRoot(); |
| 7537 |
this.getMaxHeightValue())); |
6441 |
if(vFocusRoot){if(value){vFocusRoot.setFocusedChild(this); |
|
|
6442 |
this._visualizeFocus(); |
| 6443 |
}else{if(vFocusRoot.getFocusedChild()==this){vFocusRoot.setFocusedChild(null); |
| 6444 |
}this._visualizeBlur(); |
| 6445 |
}}}, |
| 6446 |
_applyHideFocus:qx.core.Variant.select("qx.client", |
| 6447 |
{"mshtml":function(value, |
| 6448 |
old){this.setHtmlProperty("hideFocus", |
| 6449 |
value); |
| 7538 |
}, |
6450 |
}, |
| 7539 |
_computeOuterWidth:function(){return Math.max(0, |
6451 |
"default":qx.lang.Function.returnTrue}), |
| 7540 |
(this.getMarginLeft()+this.getBoxWidth()+this.getMarginRight())); |
6452 |
_visualizeBlur:function(){if(this.getEnableElementFocus()&&(!this.getFocusRoot().getFocusedChild()||(this.getFocusRoot().getFocusedChild()&&this.getFocusRoot().getFocusedChild().getEnableElementFocus()))){try{this.getElement().blur(); |
|
|
6453 |
}catch(ex){}}this.removeState("focused"); |
| 7541 |
}, |
6454 |
}, |
| 7542 |
_computeOuterHeight:function(){return Math.max(0, |
6455 |
_visualizeFocus:function(){if(!qx.event.handler.FocusHandler.mouseFocus&&this.getEnableElementFocus()){try{this.getElement().focus(); |
| 7543 |
(this.getMarginTop()+this.getBoxHeight()+this.getMarginBottom())); |
6456 |
}catch(ex){}}this.addState("focused"); |
| 7544 |
}, |
6457 |
}, |
| 7545 |
_computeInnerWidth:function(){return Math.max(0, |
6458 |
focus:function(){delete qx.event.handler.FocusHandler.mouseFocus; |
| 7546 |
this.getBoxWidth()-this.getFrameWidth()); |
6459 |
this.setFocused(true); |
| 7547 |
}, |
6460 |
}, |
| 7548 |
_computeInnerHeight:function(){return Math.max(0, |
6461 |
blur:function(){delete qx.event.handler.FocusHandler.mouseFocus; |
| 7549 |
this.getBoxHeight()-this.getFrameHeight()); |
6462 |
this.setFocused(false); |
| 7550 |
}, |
6463 |
}, |
| 7551 |
getNeededWidth:function(){var vLayoutImpl=this.getParent().getLayoutImpl(); |
6464 |
_applyCapture:function(value, |
| 7552 |
return Math.max(0, |
6465 |
old){var vMgr=qx.event.handler.EventHandler.getInstance(); |
| 7553 |
vLayoutImpl.computeChildNeededWidth(this)); |
6466 |
if(old){vMgr.setCaptureWidget(null); |
|
|
6467 |
}else if(value){vMgr.setCaptureWidget(this); |
| 6468 |
}}, |
| 6469 |
_applyZIndex:function(value, |
| 6470 |
old){if(value==null){this.removeStyleProperty("zIndex"); |
| 6471 |
}else{this.setStyleProperty("zIndex", |
| 6472 |
value); |
| 6473 |
}}, |
| 6474 |
_applyTabIndex:qx.core.Variant.select("qx.client", |
| 6475 |
{"mshtml":function(value, |
| 6476 |
old){this.setHtmlProperty("tabIndex", |
| 6477 |
value<0?-1:1); |
| 7554 |
}, |
6478 |
}, |
| 7555 |
getNeededHeight:function(){var vLayoutImpl=this.getParent().getLayoutImpl(); |
6479 |
"gecko":function(value, |
| 7556 |
return Math.max(0, |
6480 |
old){this.setStyleProperty("MozUserFocus", |
| 7557 |
vLayoutImpl.computeChildNeededHeight(this)); |
6481 |
(value<0?"ignore":"normal")); |
| 7558 |
}, |
6482 |
}, |
| 7559 |
_recomputeFlexX:function(){if(!this.getHasFlexX()){return false; |
6483 |
"default":function(value, |
|
|
6484 |
old){this.setStyleProperty("userFocus", |
| 6485 |
(value<0?"ignore":"normal")); |
| 6486 |
this.setHtmlProperty("tabIndex", |
| 6487 |
value<0?-1:1); |
| 6488 |
}}), |
| 6489 |
_applySelectable:qx.core.Variant.select("qx.client", |
| 6490 |
{"mshtml":function(value, |
| 6491 |
old){}, |
| 6492 |
"gecko":function(value, |
| 6493 |
old){if(value){this.removeStyleProperty("MozUserSelect"); |
| 6494 |
}else{this.setStyleProperty("MozUserSelect", |
| 6495 |
"none"); |
| 6496 |
}}, |
| 6497 |
"webkit":function(value, |
| 6498 |
old){if(value){this.removeStyleProperty("WebkitUserSelect"); |
| 6499 |
}else{this.setStyleProperty("WebkitUserSelect", |
| 6500 |
"none"); |
| 6501 |
}}, |
| 6502 |
"khtml":function(value, |
| 6503 |
old){if(value){this.removeStyleProperty("KhtmlUserSelect"); |
| 6504 |
}else{this.setStyleProperty("KhtmlUserSelect", |
| 6505 |
"none"); |
| 6506 |
}}, |
| 6507 |
"default":function(value, |
| 6508 |
old){if(value){return this.removeStyleProperty("userSelect"); |
| 6509 |
}else{this.setStyleProperty("userSelect", |
| 6510 |
"none"); |
| 6511 |
}}}), |
| 6512 |
_applyOpacity:qx.core.Variant.select("qx.client", |
| 6513 |
{"mshtml":function(value, |
| 6514 |
old){if(value==null||value>=1||value<0){this.removeStyleProperty("filter"); |
| 6515 |
}else{this.setStyleProperty("filter", |
| 6516 |
("Alpha(Opacity="+Math.round(value*100)+")")); |
| 6517 |
}}, |
| 6518 |
"default":function(value, |
| 6519 |
old){if(value==null||value>1){if(qx.core.Variant.isSet("qx.client", |
| 6520 |
"gecko")){this.removeStyleProperty("MozOpacity"); |
| 6521 |
}else if(qx.core.Variant.isSet("qx.client", |
| 6522 |
"khtml")){this.removeStyleProperty("KhtmlOpacity"); |
| 6523 |
}this.removeStyleProperty("opacity"); |
| 6524 |
}else{value=qx.lang.Number.limit(value, |
| 6525 |
0, |
| 6526 |
1); |
| 6527 |
if(qx.core.Variant.isSet("qx.client", |
| 6528 |
"gecko")){this.setStyleProperty("MozOpacity", |
| 6529 |
value); |
| 6530 |
}else if(qx.core.Variant.isSet("qx.client", |
| 6531 |
"khtml")){this.setStyleProperty("KhtmlOpacity", |
| 6532 |
value); |
| 6533 |
}this.setStyleProperty("opacity", |
| 6534 |
value); |
| 6535 |
}}}), |
| 6536 |
__cursorMap:qx.core.Variant.select("qx.client", |
| 6537 |
{"mshtml":{"cursor":"hand", |
| 6538 |
"ew-resize":"e-resize", |
| 6539 |
"ns-resize":"n-resize", |
| 6540 |
"nesw-resize":"ne-resize", |
| 6541 |
"nwse-resize":"nw-resize"}, |
| 6542 |
"opera":{"col-resize":"e-resize", |
| 6543 |
"row-resize":"n-resize", |
| 6544 |
"ew-resize":"e-resize", |
| 6545 |
"ns-resize":"n-resize", |
| 6546 |
"nesw-resize":"ne-resize", |
| 6547 |
"nwse-resize":"nw-resize"}, |
| 6548 |
"default":{}}), |
| 6549 |
_applyCursor:function(value, |
| 6550 |
old){if(value){this.setStyleProperty("cursor", |
| 6551 |
this.__cursorMap[value]||value); |
| 6552 |
}else{this.removeStyleProperty("cursor"); |
| 6553 |
}}, |
| 6554 |
_applyCommand:function(value, |
| 6555 |
old){}, |
| 6556 |
_applyBackgroundImage:function(value, |
| 6557 |
old){var imageMgr=qx.io.image.Manager.getInstance(); |
| 6558 |
var aliasMgr=qx.io.Alias.getInstance(); |
| 6559 |
if(old){imageMgr.hide(old); |
| 7560 |
} |
6560 |
} |
| 7561 |
if(this._computedWidthTypeFlex){this._computedWidthValue=null; |
6561 |
if(value){imageMgr.show(value); |
| 7562 |
this.addToLayoutChanges("width"); |
6562 |
}aliasMgr.connect(this._styleBackgroundImage, |
| 7563 |
}return true; |
6563 |
this, |
|
|
6564 |
value); |
| 7564 |
}, |
6565 |
}, |
| 7565 |
_recomputeFlexY:function(){if(!this.getHasFlexY()){return false; |
6566 |
_styleBackgroundImage:function(value){value?this.setStyleProperty("backgroundImage", |
| 7566 |
} |
6567 |
"url("+value+")"):this.removeStyleProperty("backgroundImage"); |
| 7567 |
if(this._computedHeightTypeFlex){this._computedHeightValue=null; |
|
|
| 7568 |
this.addToLayoutChanges("height"); |
| 7569 |
}return true; |
| 7570 |
}, |
6568 |
}, |
| 7571 |
_recomputePercentX:function(){if(!this.getHasPercentX()){return false; |
6569 |
_applyBackgroundRepeat:function(value, |
| 7572 |
} |
6570 |
old){value?this.setStyleProperty("backgroundRepeat", |
| 7573 |
if(this._computedWidthTypePercent){this._computedWidthValue=null; |
6571 |
value):this.removeStyleProperty("backgroundRepeat"); |
| 7574 |
this.addToLayoutChanges("width"); |
|
|
| 7575 |
} |
| 7576 |
if(this._computedMinWidthTypePercent){this._computedMinWidthValue=null; |
| 7577 |
this.addToLayoutChanges("minWidth"); |
| 7578 |
} |
| 7579 |
if(this._computedMaxWidthTypePercent){this._computedMaxWidthValue=null; |
| 7580 |
this.addToLayoutChanges("maxWidth"); |
| 7581 |
} |
| 7582 |
if(this._computedLeftTypePercent){this._computedLeftValue=null; |
| 7583 |
this.addToLayoutChanges("left"); |
| 7584 |
} |
| 7585 |
if(this._computedRightTypePercent){this._computedRightValue=null; |
| 7586 |
this.addToLayoutChanges("right"); |
| 7587 |
}return true; |
| 7588 |
}, |
6572 |
}, |
| 7589 |
_recomputePercentY:function(){if(!this.getHasPercentY()){return false; |
6573 |
_applyClip:function(value, |
| 7590 |
} |
6574 |
old){return this._compileClipString(); |
| 7591 |
if(this._computedHeightTypePercent){this._computedHeightValue=null; |
|
|
| 7592 |
this.addToLayoutChanges("height"); |
| 7593 |
} |
| 7594 |
if(this._computedMinHeightTypePercent){this._computedMinHeightValue=null; |
| 7595 |
this.addToLayoutChanges("minHeight"); |
| 7596 |
} |
| 7597 |
if(this._computedMaxHeightTypePercent){this._computedMaxHeightValue=null; |
| 7598 |
this.addToLayoutChanges("maxHeight"); |
| 7599 |
} |
| 7600 |
if(this._computedTopTypePercent){this._computedTopValue=null; |
| 7601 |
this.addToLayoutChanges("top"); |
| 7602 |
} |
| 7603 |
if(this._computedBottomTypePercent){this._computedBottomValue=null; |
| 7604 |
this.addToLayoutChanges("bottom"); |
| 7605 |
}return true; |
| 7606 |
}, |
6575 |
}, |
| 7607 |
_recomputeRangeX:qx.core.Variant.select("qx.client", |
6576 |
_compileClipString:function(){var vLeft=this.getClipLeft(); |
| 7608 |
{"mshtml|opera|webkit":function(){if(this._computedLeftTypeNull||this._computedRightTypeNull){return false; |
6577 |
var vTop=this.getClipTop(); |
| 7609 |
}this.addToLayoutChanges("width"); |
6578 |
var vWidth=this.getClipWidth(); |
| 7610 |
return true; |
6579 |
var vHeight=this.getClipHeight(); |
|
|
6580 |
var vRight, |
| 6581 |
vBottom; |
| 6582 |
if(vLeft==null){vRight=(vWidth==null?"auto":vWidth+"px"); |
| 6583 |
vLeft="auto"; |
| 6584 |
}else{vRight=(vWidth==null?"auto":vLeft+vWidth+"px"); |
| 6585 |
vLeft=vLeft+"px"; |
| 6586 |
} |
| 6587 |
if(vTop==null){vBottom=(vHeight==null?"auto":vHeight+"px"); |
| 6588 |
vTop="auto"; |
| 6589 |
}else{vBottom=(vHeight==null?"auto":vTop+vHeight+"px"); |
| 6590 |
vTop=vTop+"px"; |
| 6591 |
}return this.setStyleProperty("clip", |
| 6592 |
("rect("+vTop+","+vRight+","+vBottom+","+vLeft+")")); |
| 7611 |
}, |
6593 |
}, |
| 7612 |
"default":function(){return !(this._computedLeftTypeNull||this._computedRightTypeNull); |
6594 |
_applyOverflow:qx.core.Variant.select("qx.client", |
| 7613 |
}}), |
6595 |
{"default":function(value, |
| 7614 |
_recomputeRangeY:qx.core.Variant.select("qx.client", |
6596 |
old){var pv=value; |
| 7615 |
{"mshtml|opera|webkit":function(){if(this._computedTopTypeNull||this._computedBottomTypeNull){return false; |
6597 |
var pn="overflow"; |
| 7616 |
}this.addToLayoutChanges("height"); |
6598 |
switch(value){case "scrollX":pn="overflowX"; |
| 7617 |
return true; |
6599 |
pv="scroll"; |
|
|
6600 |
break; |
| 6601 |
case "scrollY":pn="overflowY"; |
| 6602 |
pv="scroll"; |
| 6603 |
break; |
| 6604 |
}var a=["overflow", |
| 6605 |
"overflowX", |
| 6606 |
"overflowY"]; |
| 6607 |
for(var i=0;i<a.length;i++){if(a[i]!=pn){this.removeStyleProperty(a[i]); |
| 6608 |
}} |
| 6609 |
switch(value){case "scrollX":this.setStyleProperty("overflowY", |
| 6610 |
"hidden"); |
| 6611 |
break; |
| 6612 |
case "scrollY":this.setStyleProperty("overflowX", |
| 6613 |
"hidden"); |
| 6614 |
break; |
| 6615 |
}this._renderOverflow(pn, |
| 6616 |
pv, |
| 6617 |
value, |
| 6618 |
old); |
| 6619 |
this.addToQueue("overflow"); |
| 7618 |
}, |
6620 |
}, |
| 7619 |
"default":function(){return !(this._computedTopTypeNull||this._computedBottomTypeNull); |
6621 |
"gecko":function(value, |
| 7620 |
}}), |
6622 |
old){var pv=value; |
| 7621 |
_recomputeStretchingX:qx.core.Variant.select("qx.client", |
6623 |
var pn="overflow"; |
| 7622 |
{"mshtml|opera|webkit":function(){if(this.getAllowStretchX()&&this._computedWidthTypeNull){this._computedWidthValue=null; |
6624 |
switch(pv){case "hidden":pv="-moz-scrollbars-none"; |
| 7623 |
this.addToLayoutChanges("width"); |
6625 |
break; |
| 7624 |
return true; |
6626 |
case "scrollX":pv="-moz-scrollbars-horizontal"; |
| 7625 |
}return false; |
6627 |
break; |
|
|
6628 |
case "scrollY":pv="-moz-scrollbars-vertical"; |
| 6629 |
break; |
| 6630 |
}this._renderOverflow(pn, |
| 6631 |
pv, |
| 6632 |
value, |
| 6633 |
old); |
| 6634 |
this.addToQueue("overflow"); |
| 7626 |
}, |
6635 |
}, |
| 7627 |
"default":function(){if(this.getAllowStretchX()&&this._computedWidthTypeNull){return true; |
6636 |
"opera":function(value, |
| 7628 |
}return false; |
6637 |
old){var pv=value; |
|
|
6638 |
var pn="overflow"; |
| 6639 |
switch(pv){case "scrollX":case "scrollY":pv="scroll"; |
| 6640 |
break; |
| 6641 |
}this._renderOverflow(pn, |
| 6642 |
pv, |
| 6643 |
value, |
| 6644 |
old); |
| 6645 |
this.addToQueue("overflow"); |
| 7629 |
}}), |
6646 |
}}), |
| 7630 |
_recomputeStretchingY:qx.core.Variant.select("qx.client", |
6647 |
_renderOverflow:function(pn, |
| 7631 |
{"mshtml|opera|webkit":function(){if(this.getAllowStretchY()&&this._computedHeightTypeNull){this._computedHeightValue=null; |
6648 |
pv, |
| 7632 |
this.addToLayoutChanges("height"); |
6649 |
value, |
| 7633 |
return true; |
6650 |
old){this.setStyleProperty(pn, |
| 7634 |
}return false; |
6651 |
pv||""); |
|
|
6652 |
this._invalidateFrameWidth(); |
| 6653 |
this._invalidateFrameHeight(); |
| 7635 |
}, |
6654 |
}, |
| 7636 |
"default":function(){if(this.getAllowStretchY()&&this._computedHeightTypeNull){return true; |
6655 |
getOverflowX:function(){var vOverflow=this.getOverflow(); |
| 7637 |
}return false; |
6656 |
return vOverflow=="scrollY"?"hidden":vOverflow; |
| 7638 |
}}), |
|
|
| 7639 |
_computeValuePixel:function(v){return Math.round(v); |
| 7640 |
}, |
6657 |
}, |
| 7641 |
_computeValuePixelLimit:function(v){return Math.max(0, |
6658 |
getOverflowY:function(){var vOverflow=this.getOverflow(); |
| 7642 |
this._computeValuePixel(v)); |
6659 |
return vOverflow=="scrollX"?"hidden":vOverflow; |
| 7643 |
}, |
6660 |
}, |
| 7644 |
_computeValuePercentX:function(v){return Math.round(this.getParent().getInnerWidthForChild(this)*v*0.01); |
6661 |
_applyBackgroundColor:function(value, |
|
|
6662 |
old){qx.theme.manager.Color.getInstance().connect(this._styleBackgroundColor, |
| 6663 |
this, |
| 6664 |
value); |
| 7645 |
}, |
6665 |
}, |
| 7646 |
_computeValuePercentXLimit:function(v){return Math.max(0, |
6666 |
_styleBackgroundColor:function(value){value?this.setStyleProperty("backgroundColor", |
| 7647 |
this._computeValuePercentX(v)); |
6667 |
value):this.removeStyleProperty("backgroundColor"); |
| 7648 |
}, |
6668 |
}, |
| 7649 |
_computeValuePercentY:function(v){return Math.round(this.getParent().getInnerHeightForChild(this)*v*0.01); |
6669 |
_applyTextColor:function(value, |
|
|
6670 |
old){}, |
| 6671 |
_applyFont:function(value, |
| 6672 |
old){}, |
| 6673 |
_cachedBorderTop:0, |
| 6674 |
_cachedBorderRight:0, |
| 6675 |
_cachedBorderBottom:0, |
| 6676 |
_cachedBorderLeft:0, |
| 6677 |
_applyBorder:function(value, |
| 6678 |
old){qx.theme.manager.Border.getInstance().connect(this._queueBorder, |
| 6679 |
this, |
| 6680 |
value); |
| 7650 |
}, |
6681 |
}, |
| 7651 |
_computeValuePercentYLimit:function(v){return Math.max(0, |
6682 |
__borderJobs:{top:"borderTop", |
| 7652 |
this._computeValuePercentY(v)); |
6683 |
right:"borderRight", |
|
|
6684 |
bottom:"borderBottom", |
| 6685 |
left:"borderLeft"}, |
| 6686 |
_queueBorder:function(value, |
| 6687 |
edge){if(!edge){var jobs=this.__borderJobs; |
| 6688 |
for(var entry in jobs){this.addToQueue(jobs[entry]); |
| 6689 |
}this.__reflowBorderX(value); |
| 6690 |
this.__reflowBorderY(value); |
| 6691 |
}else{if(edge==="left"||edge==="right"){this.__reflowBorderX(value); |
| 6692 |
}else{this.__reflowBorderY(value); |
| 6693 |
}this.addToQueue(this.__borderJobs[edge]); |
| 6694 |
}this.__borderObject=value; |
| 7653 |
}, |
6695 |
}, |
| 7654 |
getWidthValue:function(){if(this._computedWidthValue!=null){return this._computedWidthValue; |
6696 |
__reflowBorderX:function(value){var oldLeftWidth=this._cachedBorderLeft; |
|
|
6697 |
var oldRightWidth=this._cachedBorderRight; |
| 6698 |
this._cachedBorderLeft=value?value.getWidthLeft():0; |
| 6699 |
this._cachedBorderRight=value?value.getWidthRight():0; |
| 6700 |
if((oldLeftWidth+oldRightWidth)!=(this._cachedBorderLeft+this._cachedBorderRight)){this._invalidateFrameWidth(); |
| 6701 |
}}, |
| 6702 |
__reflowBorderY:function(value){var oldTopWidth=this._cachedBorderTop; |
| 6703 |
var oldBottomWidth=this._cachedBorderBottom; |
| 6704 |
this._cachedBorderTop=value?value.getWidthTop():0; |
| 6705 |
this._cachedBorderBottom=value?value.getWidthBottom():0; |
| 6706 |
if((oldTopWidth+oldBottomWidth)!=(this._cachedBorderTop+this._cachedBorderBottom)){this._invalidateFrameHeight(); |
| 6707 |
}}, |
| 6708 |
renderBorder:function(changes){var value=this.__borderObject; |
| 6709 |
if(value){if(changes.borderTop){value.renderTop(this); |
| 7655 |
} |
6710 |
} |
| 7656 |
switch(this._computedWidthType){case qx.ui.core.Widget.TYPE_PIXEL:return this._computedWidthValue=this._computeValuePixelLimit(this._computedWidthParsed); |
6711 |
if(changes.borderRight){value.renderRight(this); |
| 7657 |
case qx.ui.core.Widget.TYPE_PERCENT:return this._computedWidthValue=this._computeValuePercentXLimit(this._computedWidthParsed); |
|
|
| 7658 |
case qx.ui.core.Widget.TYPE_AUTO:return this._computedWidthValue=this.getPreferredBoxWidth(); |
| 7659 |
case qx.ui.core.Widget.TYPE_FLEX:if(this.getParent().getLayoutImpl().computeChildrenFlexWidth===undefined){throw new Error("Widget "+this+": having horizontal flex size (width="+this.getWidth()+") but parent layout "+this.getParent()+" does not support it"); |
| 7660 |
}this.getParent().getLayoutImpl().computeChildrenFlexWidth(); |
| 7661 |
return this._computedWidthValue=this._computedWidthFlexValue; |
| 7662 |
}return null; |
| 7663 |
}, |
| 7664 |
getMinWidthValue:function(){if(this._computedMinWidthValue!=null){return this._computedMinWidthValue; |
| 7665 |
} |
6712 |
} |
| 7666 |
switch(this._computedMinWidthType){case qx.ui.core.Widget.TYPE_PIXEL:return this._computedWidthValue=this._computeValuePixelLimit(this._computedMinWidthParsed); |
6713 |
if(changes.borderBottom){value.renderBottom(this); |
| 7667 |
case qx.ui.core.Widget.TYPE_PERCENT:return this._computedWidthValue=this._computeValuePercentXLimit(this._computedMinWidthParsed); |
|
|
| 7668 |
case qx.ui.core.Widget.TYPE_AUTO:return this._computedMinWidthValue=this.getPreferredBoxWidth(); |
| 7669 |
}return null; |
| 7670 |
}, |
| 7671 |
getMaxWidthValue:function(){if(this._computedMaxWidthValue!=null){return this._computedMaxWidthValue; |
| 7672 |
} |
6714 |
} |
| 7673 |
switch(this._computedMaxWidthType){case qx.ui.core.Widget.TYPE_PIXEL:return this._computedWidthValue=this._computeValuePixelLimit(this._computedMaxWidthParsed); |
6715 |
if(changes.borderLeft){value.renderLeft(this); |
| 7674 |
case qx.ui.core.Widget.TYPE_PERCENT:return this._computedWidthValue=this._computeValuePercentXLimit(this._computedMaxWidthParsed); |
6716 |
}}else{var border=qx.ui.core.Border; |
| 7675 |
case qx.ui.core.Widget.TYPE_AUTO:return this._computedMaxWidthValue=this.getPreferredBoxWidth(); |
6717 |
if(changes.borderTop){border.resetTop(this); |
| 7676 |
}return null; |
|
|
| 7677 |
}, |
| 7678 |
getLeftValue:function(){if(this._computedLeftValue!=null){return this._computedLeftValue; |
| 7679 |
} |
6718 |
} |
| 7680 |
switch(this._computedLeftType){case qx.ui.core.Widget.TYPE_PIXEL:return this._computedLeftValue=this._computeValuePixel(this._computedLeftParsed); |
6719 |
if(changes.borderRight){border.resetRight(this); |
| 7681 |
case qx.ui.core.Widget.TYPE_PERCENT:return this._computedLeftValue=this._computeValuePercentX(this._computedLeftParsed); |
|
|
| 7682 |
}return null; |
| 7683 |
}, |
| 7684 |
getRightValue:function(){if(this._computedRightValue!=null){return this._computedRightValue; |
| 7685 |
} |
6720 |
} |
| 7686 |
switch(this._computedRightType){case qx.ui.core.Widget.TYPE_PIXEL:return this._computedRightValue=this._computeValuePixel(this._computedRightParsed); |
6721 |
if(changes.borderBottom){border.resetBottom(this); |
| 7687 |
case qx.ui.core.Widget.TYPE_PERCENT:return this._computedRightValue=this._computeValuePercentX(this._computedRightParsed); |
|
|
| 7688 |
}return null; |
| 7689 |
}, |
| 7690 |
getHeightValue:function(){if(this._computedHeightValue!=null){return this._computedHeightValue; |
| 7691 |
} |
6722 |
} |
| 7692 |
switch(this._computedHeightType){case qx.ui.core.Widget.TYPE_PIXEL:return this._computedHeightValue=this._computeValuePixelLimit(this._computedHeightParsed); |
6723 |
if(changes.borderLeft){border.resetLeft(this); |
| 7693 |
case qx.ui.core.Widget.TYPE_PERCENT:return this._computedHeightValue=this._computeValuePercentYLimit(this._computedHeightParsed); |
6724 |
}}}, |
| 7694 |
case qx.ui.core.Widget.TYPE_AUTO:return this._computedHeightValue=this.getPreferredBoxHeight(); |
6725 |
prepareEnhancedBorder:qx.core.Variant.select("qx.client", |
| 7695 |
case qx.ui.core.Widget.TYPE_FLEX:if(this.getParent().getLayoutImpl().computeChildrenFlexHeight===undefined){throw new Error("Widget "+this+": having vertical flex size (height="+this.getHeight()+") but parent layout "+this.getParent()+" does not support it"); |
6726 |
{"gecko":qx.lang.Function.returnTrue, |
| 7696 |
}this.getParent().getLayoutImpl().computeChildrenFlexHeight(); |
6727 |
"default":function(){var elem=this.getElement(); |
| 7697 |
return this._computedHeightValue=this._computedHeightFlexValue; |
6728 |
var cl=this._borderElement=document.createElement("div"); |
| 7698 |
}return null; |
6729 |
var es=elem.style; |
|
|
6730 |
var cs=this._innerStyle=cl.style; |
| 6731 |
if(qx.core.Variant.isSet("qx.client", |
| 6732 |
"mshtml")){}else{cs.width=cs.height="100%"; |
| 6733 |
}cs.position="absolute"; |
| 6734 |
for(var i in this._styleProperties){switch(i){case "zIndex":case "filter":case "display":break; |
| 6735 |
default:cs[i]=es[i]; |
| 6736 |
es[i]=""; |
| 6737 |
}} |
| 6738 |
for(var i in this._htmlProperties){switch(i){case "unselectable":cl.unselectable=this._htmlProperties[i]; |
| 6739 |
}}while(elem.firstChild){cl.appendChild(elem.firstChild); |
| 6740 |
}elem.appendChild(cl); |
| 6741 |
}}), |
| 6742 |
_applyPaddingTop:function(value, |
| 6743 |
old){this.addToQueue("paddingTop"); |
| 6744 |
this._invalidateFrameHeight(); |
| 7699 |
}, |
6745 |
}, |
| 7700 |
getMinHeightValue:function(){if(this._computedMinHeightValue!=null){return this._computedMinHeightValue; |
6746 |
_applyPaddingRight:function(value, |
| 7701 |
} |
6747 |
old){this.addToQueue("paddingRight"); |
| 7702 |
switch(this._computedMinHeightType){case qx.ui.core.Widget.TYPE_PIXEL:return this._computedMinHeightValue=this._computeValuePixelLimit(this._computedMinHeightParsed); |
6748 |
this._invalidateFrameWidth(); |
| 7703 |
case qx.ui.core.Widget.TYPE_PERCENT:return this._computedMinHeightValue=this._computeValuePercentYLimit(this._computedMinHeightParsed); |
|
|
| 7704 |
case qx.ui.core.Widget.TYPE_AUTO:return this._computedMinHeightValue=this.getPreferredBoxHeight(); |
| 7705 |
}return null; |
| 7706 |
}, |
6749 |
}, |
| 7707 |
getMaxHeightValue:function(){if(this._computedMaxHeightValue!=null){return this._computedMaxHeightValue; |
6750 |
_applyPaddingBottom:function(value, |
| 7708 |
} |
6751 |
old){this.addToQueue("paddingBottom"); |
| 7709 |
switch(this._computedMaxHeightType){case qx.ui.core.Widget.TYPE_PIXEL:return this._computedMaxHeightValue=this._computeValuePixelLimit(this._computedMaxHeightParsed); |
6752 |
this._invalidateFrameHeight(); |
| 7710 |
case qx.ui.core.Widget.TYPE_PERCENT:return this._computedMaxHeightValue=this._computeValuePercentYLimit(this._computedMaxHeightParsed); |
|
|
| 7711 |
case qx.ui.core.Widget.TYPE_AUTO:return this._computedMaxHeightValue=this.getPreferredBoxHeight(); |
| 7712 |
}return null; |
| 7713 |
}, |
6753 |
}, |
| 7714 |
getTopValue:function(){if(this._computedTopValue!=null){return this._computedTopValue; |
6754 |
_applyPaddingLeft:function(value, |
| 7715 |
} |
6755 |
old){this.addToQueue("paddingLeft"); |
| 7716 |
switch(this._computedTopType){case qx.ui.core.Widget.TYPE_PIXEL:return this._computedTopValue=this._computeValuePixel(this._computedTopParsed); |
6756 |
this._invalidateFrameWidth(); |
| 7717 |
case qx.ui.core.Widget.TYPE_PERCENT:return this._computedTopValue=this._computeValuePercentY(this._computedTopParsed); |
|
|
| 7718 |
}return null; |
| 7719 |
}, |
6757 |
}, |
| 7720 |
getBottomValue:function(){if(this._computedBottomValue!=null){return this._computedBottomValue; |
6758 |
renderPadding:function(changes){}, |
| 7721 |
} |
6759 |
_applyMarginLeft:function(value, |
| 7722 |
switch(this._computedBottomType){case qx.ui.core.Widget.TYPE_PIXEL:return this._computedBottomValue=this._computeValuePixel(this._computedBottomParsed); |
6760 |
old){this.addToQueue("marginLeft"); |
| 7723 |
case qx.ui.core.Widget.TYPE_PERCENT:return this._computedBottomValue=this._computeValuePercentY(this._computedBottomParsed); |
|
|
| 7724 |
}return null; |
| 7725 |
}, |
6761 |
}, |
| 7726 |
_computeFrameWidth:function(){var fw=this._cachedBorderLeft+this.getPaddingLeft()+this.getPaddingRight()+this._cachedBorderRight; |
6762 |
_applyMarginRight:function(value, |
| 7727 |
switch(this.getOverflow()){case "scroll":case "scrollY":fw+=qx.ui.core.Widget.SCROLLBAR_SIZE; |
6763 |
old){this.addToQueue("marginRight"); |
| 7728 |
break; |
|
|
| 7729 |
case "auto":break; |
| 7730 |
}return fw; |
| 7731 |
}, |
6764 |
}, |
| 7732 |
_computeFrameHeight:function(){var fh=this._cachedBorderTop+this.getPaddingTop()+this.getPaddingBottom()+this._cachedBorderBottom; |
6765 |
_applyMarginTop:function(value, |
| 7733 |
switch(this.getOverflow()){case "scroll":case "scrollX":fh+=qx.ui.core.Widget.SCROLLBAR_SIZE; |
6766 |
old){this.addToQueue("marginTop"); |
| 7734 |
break; |
6767 |
}, |
| 7735 |
case "auto":break; |
6768 |
_applyMarginBottom:function(value, |
| 7736 |
}return fh; |
6769 |
old){this.addToQueue("marginBottom"); |
|
|
6770 |
}, |
| 6771 |
execute:function(){var cmd=this.getCommand(); |
| 6772 |
if(cmd){cmd.execute(this); |
| 6773 |
}this.createDispatchEvent("execute"); |
| 6774 |
}, |
| 6775 |
_visualPropertyCheck:function(){if(!this.isCreated()){throw new Error(this.classname+": Element must be created previously!"); |
| 6776 |
}}, |
| 6777 |
setScrollLeft:function(nScrollLeft){this._visualPropertyCheck(); |
| 6778 |
this._getTargetNode().scrollLeft=nScrollLeft; |
| 7737 |
}, |
6779 |
}, |
| 7738 |
_invalidateFrameDimensions:function(){this._invalidateFrameWidth(); |
6780 |
setScrollTop:function(nScrollTop){this._visualPropertyCheck(); |
| 7739 |
this._invalidateFrameHeight(); |
6781 |
this._getTargetNode().scrollTop=nScrollTop; |
| 7740 |
}, |
6782 |
}, |
| 7741 |
_invalidatePreferredInnerDimensions:function(){this._invalidatePreferredInnerWidth(); |
6783 |
getOffsetLeft:function(){this._visualPropertyCheck(); |
| 7742 |
this._invalidatePreferredInnerHeight(); |
6784 |
return qx.html.Offset.getLeft(this.getElement()); |
| 7743 |
}, |
6785 |
}, |
| 7744 |
_computePreferredBoxWidth:function(){try{return Math.max(0, |
6786 |
getOffsetTop:function(){this._visualPropertyCheck(); |
| 7745 |
this.getPreferredInnerWidth()+this.getFrameWidth()); |
6787 |
return qx.html.Offset.getTop(this.getElement()); |
| 7746 |
}catch(ex){this.error("_computePreferredBoxWidth failed", |
|
|
| 7747 |
ex); |
| 7748 |
}}, |
| 7749 |
_computePreferredBoxHeight:function(){try{return Math.max(0, |
| 7750 |
this.getPreferredInnerHeight()+this.getFrameHeight()); |
| 7751 |
}catch(ex){this.error("_computePreferredBoxHeight failed", |
| 7752 |
ex); |
| 7753 |
}}, |
| 7754 |
_initialLayoutDone:false, |
| 7755 |
addToLayoutChanges:function(p){if(this._isDisplayable){this.getParent()._addChildToChildrenQueue(this); |
| 7756 |
}return this._layoutChanges[p]=true; |
| 7757 |
}, |
6788 |
}, |
| 7758 |
addToQueue:function(p){this._initialLayoutDone?this.addToJobQueue(p):this.addToLayoutChanges(p); |
6789 |
getScrollLeft:function(){this._visualPropertyCheck(); |
|
|
6790 |
return this._getTargetNode().scrollLeft; |
| 7759 |
}, |
6791 |
}, |
| 7760 |
addToQueueRuntime:function(p){return !this._initialLayoutDone||this.addToJobQueue(p); |
6792 |
getScrollTop:function(){this._visualPropertyCheck(); |
|
|
6793 |
return this._getTargetNode().scrollTop; |
| 7761 |
}, |
6794 |
}, |
| 7762 |
_computeHasPercentX:function(){return (this._computedLeftTypePercent||this._computedWidthTypePercent||this._computedMinWidthTypePercent||this._computedMaxWidthTypePercent||this._computedRightTypePercent); |
6795 |
getClientWidth:function(){this._visualPropertyCheck(); |
|
|
6796 |
return this._getTargetNode().clientWidth; |
| 7763 |
}, |
6797 |
}, |
| 7764 |
_computeHasPercentY:function(){return (this._computedTopTypePercent||this._computedHeightTypePercent||this._computedMinHeightTypePercent||this._computedMaxHeightTypePercent||this._computedBottomTypePercent); |
6798 |
getClientHeight:function(){this._visualPropertyCheck(); |
|
|
6799 |
return this._getTargetNode().clientHeight; |
| 7765 |
}, |
6800 |
}, |
| 7766 |
_computeHasAutoX:function(){return (this._computedWidthTypeAuto||this._computedMinWidthTypeAuto||this._computedMaxWidthTypeAuto); |
6801 |
getOffsetWidth:function(){this._visualPropertyCheck(); |
|
|
6802 |
return this.getElement().offsetWidth; |
| 7767 |
}, |
6803 |
}, |
| 7768 |
_computeHasAutoY:function(){return (this._computedHeightTypeAuto||this._computedMinHeightTypeAuto||this._computedMaxHeightTypeAuto); |
6804 |
getOffsetHeight:function(){this._visualPropertyCheck(); |
|
|
6805 |
return this.getElement().offsetHeight; |
| 7769 |
}, |
6806 |
}, |
| 7770 |
_computeHasFlexX:function(){return this._computedWidthTypeFlex; |
6807 |
getScrollWidth:function(){this._visualPropertyCheck(); |
|
|
6808 |
return this._getTargetNode().scrollWidth; |
| 7771 |
}, |
6809 |
}, |
| 7772 |
_computeHasFlexY:function(){return this._computedHeightTypeFlex; |
6810 |
getScrollHeight:function(){this._visualPropertyCheck(); |
|
|
6811 |
return this._getTargetNode().scrollHeight; |
| 7773 |
}, |
6812 |
}, |
| 7774 |
_evalUnitsPixelPercentAutoFlex:function(value){switch(value){case "auto":return qx.ui.core.Widget.TYPE_AUTO; |
6813 |
scrollIntoView:function(alignTopLeft){this.scrollIntoViewX(alignTopLeft); |
| 7775 |
case Infinity:case -Infinity:return qx.ui.core.Widget.TYPE_NULL; |
6814 |
this.scrollIntoViewY(alignTopLeft); |
| 7776 |
} |
|
|
| 7777 |
switch(typeof value){case "number":return isNaN(value)?qx.ui.core.Widget.TYPE_NULL:qx.ui.core.Widget.TYPE_PIXEL; |
| 7778 |
case "string":return value.indexOf("%")!=-1?qx.ui.core.Widget.TYPE_PERCENT:value.indexOf("*")!=-1?qx.ui.core.Widget.TYPE_FLEX:qx.ui.core.Widget.TYPE_NULL; |
| 7779 |
}return qx.ui.core.Widget.TYPE_NULL; |
| 7780 |
}, |
6815 |
}, |
| 7781 |
_evalUnitsPixelPercentAuto:function(value){switch(value){case "auto":return qx.ui.core.Widget.TYPE_AUTO; |
6816 |
scrollIntoViewX:function(alignLeft){if(!this._isCreated||!this._isDisplayable){this.warn("The function scrollIntoViewX can only be called after the widget is created!"); |
| 7782 |
case Infinity:case -Infinity:return qx.ui.core.Widget.TYPE_NULL; |
6817 |
return false; |
| 7783 |
} |
6818 |
}return qx.html.ScrollIntoView.scrollX(this.getElement(), |
| 7784 |
switch(typeof value){case "number":return isNaN(value)?qx.ui.core.Widget.TYPE_NULL:qx.ui.core.Widget.TYPE_PIXEL; |
6819 |
alignLeft); |
| 7785 |
case "string":return value.indexOf("%")!=-1?qx.ui.core.Widget.TYPE_PERCENT:qx.ui.core.Widget.TYPE_NULL; |
|
|
| 7786 |
}return qx.ui.core.Widget.TYPE_NULL; |
| 7787 |
}, |
6820 |
}, |
| 7788 |
_evalUnitsPixelPercent:function(value){switch(value){case Infinity:case -Infinity:return qx.ui.core.Widget.TYPE_NULL; |
6821 |
scrollIntoViewY:function(alignTop){if(!this._isCreated||!this._isDisplayable){this.warn("The function scrollIntoViewY can only be called after the widget is created!"); |
| 7789 |
} |
6822 |
return false; |
| 7790 |
switch(typeof value){case "number":return isNaN(value)?qx.ui.core.Widget.TYPE_NULL:qx.ui.core.Widget.TYPE_PIXEL; |
6823 |
}return qx.html.ScrollIntoView.scrollY(this.getElement(), |
| 7791 |
case "string":return value.indexOf("%")!=-1?qx.ui.core.Widget.TYPE_PERCENT:qx.ui.core.Widget.TYPE_NULL; |
6824 |
alignTop); |
| 7792 |
}return qx.ui.core.Widget.TYPE_NULL; |
|
|
| 7793 |
}, |
6825 |
}, |
| 7794 |
_unitDetectionPixelPercentAutoFlex:function(name, |
6826 |
supportsDrop:function(dragCache){var supportsDropMethod=this.getSupportsDropMethod(); |
| 7795 |
value){var r=qx.ui.core.Widget.layoutPropertyTypes[name]; |
6827 |
if(supportsDropMethod!==null){return supportsDropMethod.call(this, |
| 7796 |
var s=r.dataType; |
6828 |
dragCache); |
| 7797 |
var p=r.dataParsed; |
6829 |
}return (this!=dragCache.sourceWidget); |
| 7798 |
var v=r.dataValue; |
6830 |
}}, |
| 7799 |
var s1=r.typePixel; |
6831 |
settings:{"qx.widgetQueueDebugging":false, |
| 7800 |
var s2=r.typePercent; |
6832 |
"qx.widgetDebugId":false}, |
| 7801 |
var s3=r.typeAuto; |
6833 |
defer:function(statics, |
| 7802 |
var s4=r.typeFlex; |
6834 |
members){statics.__initApplyMethods(members); |
| 7803 |
var s5=r.typeNull; |
6835 |
if(qx.core.Variant.isSet("qx.client", |
| 7804 |
var wasPercent=this[s2]; |
6836 |
"mshtml")){members._renderRuntimeWidth=function(v){this._style.pixelWidth=(v==null)?0:v; |
| 7805 |
var wasAuto=this[s3]; |
6837 |
if(this._innerStyle){this._innerStyle.pixelWidth=(v==null)?0:v-2; |
| 7806 |
var wasFlex=this[s4]; |
6838 |
}}; |
| 7807 |
switch(this[s]=this._evalUnitsPixelPercentAutoFlex(value)){case qx.ui.core.Widget.TYPE_PIXEL:this[s1]=true; |
6839 |
members._renderRuntimeHeight=function(v){this._style.pixelHeight=(v==null)?0:v; |
| 7808 |
this[s2]=this[s3]=this[s4]=this[s5]=false; |
6840 |
if(this._innerStyle){this._innerStyle.pixelHeight=(v==null)?0:v-2; |
| 7809 |
this[p]=this[v]=Math.round(value); |
6841 |
}}; |
| 7810 |
break; |
6842 |
members._resetRuntimeWidth=function(){this._style.width=""; |
| 7811 |
case qx.ui.core.Widget.TYPE_PERCENT:this[s2]=true; |
6843 |
if(this._innerStyle){this._innerStyle.width=""; |
| 7812 |
this[s1]=this[s3]=this[s4]=this[s5]=false; |
6844 |
}}; |
| 7813 |
this[p]=parseFloat(value); |
6845 |
members._resetRuntimeHeight=function(){this._style.height=""; |
| 7814 |
this[v]=null; |
6846 |
if(this._innerStyle){this._innerStyle.height=""; |
| 7815 |
break; |
6847 |
}}; |
| 7816 |
case qx.ui.core.Widget.TYPE_AUTO:this[s3]=true; |
6848 |
}statics.__initLayoutProperties(statics); |
| 7817 |
this[s1]=this[s2]=this[s4]=this[s5]=false; |
6849 |
{if(qx.core.Setting.get("qx.widgetQueueDebugging")){statics.flushGlobalQueues=function(){if(statics._inFlushGlobalQueues||!qx.core.Init.getInstance().getApplication().getUiReady()){return; |
| 7818 |
this[p]=this[v]=null; |
|
|
| 7819 |
break; |
| 7820 |
case qx.ui.core.Widget.TYPE_FLEX:this[s4]=true; |
| 7821 |
this[s1]=this[s2]=this[s3]=this[s5]=false; |
| 7822 |
this[p]=parseFloat(value); |
| 7823 |
this[v]=null; |
| 7824 |
break; |
| 7825 |
default:this[s5]=true; |
| 7826 |
this[s1]=this[s2]=this[s3]=this[s4]=false; |
| 7827 |
this[p]=this[v]=null; |
| 7828 |
break; |
| 7829 |
} |
| 7830 |
if(wasPercent!=this[s2]){switch(name){case "minWidth":case "maxWidth":case "width":case "left":case "right":this._invalidateHasPercentX(); |
| 7831 |
break; |
| 7832 |
case "maxHeight":case "minHeight":case "height":case "top":case "bottom":this._invalidateHasPercentY(); |
| 7833 |
break; |
| 7834 |
}}if(wasAuto!=this[s3]){switch(name){case "minWidth":case "maxWidth":case "width":this._invalidateHasAutoX(); |
| 7835 |
break; |
| 7836 |
case "minHeight":case "maxHeight":case "height":this._invalidateHasAutoY(); |
| 7837 |
break; |
| 7838 |
}}if(wasFlex!=this[s4]){switch(name){case "width":this._invalidateHasFlexX(); |
| 7839 |
break; |
| 7840 |
case "height":this._invalidateHasFlexY(); |
| 7841 |
break; |
| 7842 |
}}}, |
| 7843 |
_unitDetectionPixelPercentAuto:function(name, |
| 7844 |
value){var r=qx.ui.core.Widget.layoutPropertyTypes[name]; |
| 7845 |
var s=r.dataType; |
| 7846 |
var p=r.dataParsed; |
| 7847 |
var v=r.dataValue; |
| 7848 |
var s1=r.typePixel; |
| 7849 |
var s2=r.typePercent; |
| 7850 |
var s3=r.typeAuto; |
| 7851 |
var s4=r.typeNull; |
| 7852 |
var wasPercent=this[s2]; |
| 7853 |
var wasAuto=this[s3]; |
| 7854 |
switch(this[s]=this._evalUnitsPixelPercentAuto(value)){case qx.ui.core.Widget.TYPE_PIXEL:this[s1]=true; |
| 7855 |
this[s2]=this[s3]=this[s4]=false; |
| 7856 |
this[p]=this[v]=Math.round(value); |
| 7857 |
break; |
| 7858 |
case qx.ui.core.Widget.TYPE_PERCENT:this[s2]=true; |
| 7859 |
this[s1]=this[s3]=this[s4]=false; |
| 7860 |
this[p]=parseFloat(value); |
| 7861 |
this[v]=null; |
| 7862 |
break; |
| 7863 |
case qx.ui.core.Widget.TYPE_AUTO:this[s3]=true; |
| 7864 |
this[s1]=this[s2]=this[s4]=false; |
| 7865 |
this[p]=this[v]=null; |
| 7866 |
break; |
| 7867 |
default:this[s4]=true; |
| 7868 |
this[s1]=this[s2]=this[s3]=false; |
| 7869 |
this[p]=this[v]=null; |
| 7870 |
break; |
| 7871 |
} |
| 7872 |
if(wasPercent!=this[s2]){switch(name){case "minWidth":case "maxWidth":case "width":case "left":case "right":this._invalidateHasPercentX(); |
| 7873 |
break; |
| 7874 |
case "minHeight":case "maxHeight":case "height":case "top":case "bottom":this._invalidateHasPercentY(); |
| 7875 |
break; |
| 7876 |
}}if(wasAuto!=this[s3]){switch(name){case "minWidth":case "maxWidth":case "width":this._invalidateHasAutoX(); |
| 7877 |
break; |
| 7878 |
case "minHeight":case "maxHeight":case "height":this._invalidateHasAutoY(); |
| 7879 |
break; |
| 7880 |
}}}, |
| 7881 |
_unitDetectionPixelPercent:function(name, |
| 7882 |
value){var r=qx.ui.core.Widget.layoutPropertyTypes[name]; |
| 7883 |
var s=r.dataType; |
| 7884 |
var p=r.dataParsed; |
| 7885 |
var v=r.dataValue; |
| 7886 |
var s1=r.typePixel; |
| 7887 |
var s2=r.typePercent; |
| 7888 |
var s3=r.typeNull; |
| 7889 |
var wasPercent=this[s2]; |
| 7890 |
switch(this[s]=this._evalUnitsPixelPercent(value)){case qx.ui.core.Widget.TYPE_PIXEL:this[s1]=true; |
| 7891 |
this[s2]=this[s3]=false; |
| 7892 |
this[p]=this[v]=Math.round(value); |
| 7893 |
break; |
| 7894 |
case qx.ui.core.Widget.TYPE_PERCENT:this[s2]=true; |
| 7895 |
this[s1]=this[s3]=false; |
| 7896 |
this[p]=parseFloat(value); |
| 7897 |
this[v]=null; |
| 7898 |
break; |
| 7899 |
default:this[s3]=true; |
| 7900 |
this[s1]=this[s2]=false; |
| 7901 |
this[p]=this[v]=null; |
| 7902 |
break; |
| 7903 |
} |
6850 |
} |
| 7904 |
if(wasPercent!=this[s2]){switch(name){case "minWidth":case "maxWidth":case "width":case "left":case "right":this._invalidateHasPercentX(); |
6851 |
if(!(statics._globalWidgetQueue.length>0||statics._globalElementQueue.length>0||statics._globalStateQueue.length>0||statics._globalJobQueue.length>0||statics._globalLayoutQueue.length>0||statics._fastGlobalDisplayQueue.length>0||!qx.lang.Object.isEmpty(statics._lazyGlobalDisplayQueue))){return; |
| 7905 |
break; |
6852 |
}var globalWidgetQueueLength=statics._globalWidgetQueue.length; |
| 7906 |
case "minHeight":case "maxHeight":case "height":case "top":case "bottom":this._invalidateHasPercentY(); |
6853 |
var globalElementQueueLength=statics._globalElementQueue.length; |
| 7907 |
break; |
6854 |
var globalStateQueueLength=statics._globalStateQueue.length; |
| 7908 |
}}}, |
6855 |
var globalJobQueueLength=statics._globalJobQueue.length; |
| 7909 |
getTopLevelWidget:function(){return this._hasParent?this.getParent().getTopLevelWidget():null; |
6856 |
var globalLayoutQueueLength=statics._globalLayoutQueue.length; |
|
|
6857 |
var fastGlobalDisplayQueueLength=statics._fastGlobalDisplayQueue.length; |
| 6858 |
var lazyGlobalDisplayQueueLength=statics._lazyGlobalDisplayQueue?statics._lazyGlobalDisplayQueue.length:0; |
| 6859 |
statics._inFlushGlobalQueues=true; |
| 6860 |
var start; |
| 6861 |
start=(new Date).valueOf(); |
| 6862 |
statics.flushGlobalWidgetQueue(); |
| 6863 |
var vWidgetDuration=(new Date).valueOf()-start; |
| 6864 |
start=(new Date).valueOf(); |
| 6865 |
statics.flushGlobalStateQueue(); |
| 6866 |
var vStateDuration=(new Date).valueOf()-start; |
| 6867 |
start=(new Date).valueOf(); |
| 6868 |
statics.flushGlobalElementQueue(); |
| 6869 |
var vElementDuration=(new Date).valueOf()-start; |
| 6870 |
start=(new Date).valueOf(); |
| 6871 |
statics.flushGlobalJobQueue(); |
| 6872 |
var vJobDuration=(new Date).valueOf()-start; |
| 6873 |
start=(new Date).valueOf(); |
| 6874 |
statics.flushGlobalLayoutQueue(); |
| 6875 |
var vLayoutDuration=(new Date).valueOf()-start; |
| 6876 |
start=(new Date).valueOf(); |
| 6877 |
statics.flushGlobalDisplayQueue(); |
| 6878 |
var vDisplayDuration=(new Date).valueOf()-start; |
| 6879 |
var vSum=vWidgetDuration+vStateDuration+vElementDuration+vJobDuration+vLayoutDuration+vDisplayDuration; |
| 6880 |
if(vSum>0){var logger=qx.log.Logger.getClassLogger(qx.ui.core.Widget); |
| 6881 |
logger.debug("Flush Global Queues"); |
| 6882 |
logger.debug("Widgets: "+vWidgetDuration+"ms ("+globalWidgetQueueLength+")"); |
| 6883 |
logger.debug("State: "+vStateDuration+"ms ("+globalStateQueueLength+")"); |
| 6884 |
logger.debug("Element: "+vElementDuration+"ms ("+globalElementQueueLength+")"); |
| 6885 |
logger.debug("Job: "+vJobDuration+"ms ("+globalJobQueueLength+")"); |
| 6886 |
logger.debug("Layout: "+vLayoutDuration+"ms ("+globalLayoutQueueLength+")"); |
| 6887 |
logger.debug("Display: "+vDisplayDuration+"ms (fast:"+fastGlobalDisplayQueueLength+",lazy:"+lazyGlobalDisplayQueueLength+")"); |
| 6888 |
window.status="Flush: Widget:"+vWidgetDuration+" State:"+vStateDuration+" Element:"+vElementDuration+" Job:"+vJobDuration+" Layout:"+vLayoutDuration+" Display:"+vDisplayDuration; |
| 6889 |
}delete statics._inFlushGlobalQueues; |
| 6890 |
}; |
| 6891 |
}}; |
| 6892 |
}, |
| 6893 |
destruct:function(){var elem=this.getElement(); |
| 6894 |
if(elem){elem.qx_Widget=null; |
| 6895 |
}this._disposeFields("_isCreated", |
| 6896 |
"_inlineEvents", |
| 6897 |
"_element", |
| 6898 |
"_style", |
| 6899 |
"_borderElement", |
| 6900 |
"_innerStyle", |
| 6901 |
"_oldParent", |
| 6902 |
"_styleProperties", |
| 6903 |
"_htmlProperties", |
| 6904 |
"_htmlAttributes", |
| 6905 |
"__states", |
| 6906 |
"_jobQueue", |
| 6907 |
"_layoutChanges", |
| 6908 |
"__borderObject"); |
| 6909 |
}}); |
| 6910 |
|
| 6911 |
|
| 6912 |
|
| 6913 |
|
| 6914 |
/* ID: qx.html.Dimension */ |
| 6915 |
qx.Class.define("qx.html.Dimension", |
| 6916 |
{statics:{getOuterWidth:function(el){return qx.html.Dimension.getBoxWidth(el)+qx.html.Style.getMarginLeft(el)+qx.html.Style.getMarginRight(el); |
| 7910 |
}, |
6917 |
}, |
| 7911 |
moveSelfBefore:function(vBefore){this.getParent().addBefore(this, |
6918 |
getOuterHeight:function(el){return qx.html.Dimension.getBoxHeight(el)+qx.html.Style.getMarginTop(el)+qx.html.Style.getMarginBottom(el); |
| 7912 |
vBefore); |
|
|
| 7913 |
}, |
6919 |
}, |
| 7914 |
moveSelfAfter:function(vAfter){this.getParent().addAfter(this, |
6920 |
getBoxWidthForZeroHeight:function(el){var h=el.offsetHeight; |
| 7915 |
vAfter); |
6921 |
if(h==0){var o=el.style.height; |
|
|
6922 |
el.style.height="1px"; |
| 6923 |
}var v=el.offsetWidth; |
| 6924 |
if(h==0){el.style.height=o; |
| 6925 |
}return v; |
| 7916 |
}, |
6926 |
}, |
| 7917 |
moveSelfToBegin:function(){this.getParent().addAtBegin(this); |
6927 |
getBoxHeightForZeroWidth:function(el){var w=el.offsetWidth; |
|
|
6928 |
if(w==0){var o=el.style.width; |
| 6929 |
el.style.width="1px"; |
| 6930 |
}var v=el.offsetHeight; |
| 6931 |
if(w==0){el.style.width=o; |
| 6932 |
}return v; |
| 7918 |
}, |
6933 |
}, |
| 7919 |
moveSelfToEnd:function(){this.getParent().addAtEnd(this); |
6934 |
getBoxWidth:function(el){return el.offsetWidth; |
| 7920 |
}, |
6935 |
}, |
| 7921 |
getPreviousSibling:function(){var p=this.getParent(); |
6936 |
getBoxHeight:function(el){return el.offsetHeight; |
| 7922 |
if(p==null){return null; |
|
|
| 7923 |
}var cs=p.getChildren(); |
| 7924 |
return cs[cs.indexOf(this)-1]; |
| 7925 |
}, |
6937 |
}, |
| 7926 |
getNextSibling:function(){var p=this.getParent(); |
6938 |
getAreaWidth:qx.core.Variant.select("qx.client", |
| 7927 |
if(p==null){return null; |
6939 |
{"gecko":function(el){if(el.clientWidth!=0&&el.clientWidth!=(qx.html.Style.getBorderLeft(el)+qx.html.Style.getBorderRight(el))){return el.clientWidth; |
| 7928 |
}var cs=p.getChildren(); |
6940 |
}else{return qx.html.Dimension.getBoxWidth(el)-qx.html.Dimension.getInsetLeft(el)-qx.html.Dimension.getInsetRight(el); |
| 7929 |
return cs[cs.indexOf(this)+1]; |
6941 |
}}, |
|
|
6942 |
"default":function(el){return el.clientWidth!=0?el.clientWidth:(qx.html.Dimension.getBoxWidth(el)-qx.html.Dimension.getInsetLeft(el)-qx.html.Dimension.getInsetRight(el)); |
| 6943 |
}}), |
| 6944 |
getAreaHeight:qx.core.Variant.select("qx.client", |
| 6945 |
{"gecko":function(el){if(el.clientHeight!=0&&el.clientHeight!=(qx.html.Style.getBorderTop(el)+qx.html.Style.getBorderBottom(el))){return el.clientHeight; |
| 6946 |
}else{return qx.html.Dimension.getBoxHeight(el)-qx.html.Dimension.getInsetTop(el)-qx.html.Dimension.getInsetBottom(el); |
| 6947 |
}}, |
| 6948 |
"default":function(el){return el.clientHeight!=0?el.clientHeight:(qx.html.Dimension.getBoxHeight(el)-qx.html.Dimension.getInsetTop(el)-qx.html.Dimension.getInsetBottom(el)); |
| 6949 |
}}), |
| 6950 |
getInnerWidth:function(el){return qx.html.Dimension.getAreaWidth(el)-qx.html.Style.getPaddingLeft(el)-qx.html.Style.getPaddingRight(el); |
| 7930 |
}, |
6951 |
}, |
| 7931 |
getPreviousVisibleSibling:function(){if(!this._hasParent){return null; |
6952 |
getInnerHeight:function(el){return qx.html.Dimension.getAreaHeight(el)-qx.html.Style.getPaddingTop(el)-qx.html.Style.getPaddingBottom(el); |
| 7932 |
}var vChildren=this.getParent().getVisibleChildren(); |
|
|
| 7933 |
return vChildren[vChildren.indexOf(this)-1]; |
| 7934 |
}, |
6953 |
}, |
| 7935 |
getNextVisibleSibling:function(){if(!this._hasParent){return null; |
6954 |
getInsetLeft:qx.core.Variant.select("qx.client", |
| 7936 |
}var vChildren=this.getParent().getVisibleChildren(); |
6955 |
{"mshtml":function(el){return el.clientLeft; |
| 7937 |
return vChildren[vChildren.indexOf(this)+1]; |
|
|
| 7938 |
}, |
6956 |
}, |
| 7939 |
getPreviousActiveSibling:function(vIgnoreClasses){var vPrev=qx.ui.core.Widget.getActiveSiblingHelper(this, |
6957 |
"default":function(el){return qx.html.Style.getBorderLeft(el); |
| 7940 |
this.getParent(), |
6958 |
}}), |
| 7941 |
-1, |
6959 |
getInsetTop:qx.core.Variant.select("qx.client", |
| 7942 |
vIgnoreClasses, |
6960 |
{"mshtml":function(el){return el.clientTop; |
| 7943 |
null); |
|
|
| 7944 |
return vPrev?vPrev:this.getParent().getLastActiveChild(); |
| 7945 |
}, |
6961 |
}, |
| 7946 |
getNextActiveSibling:function(vIgnoreClasses){var vNext=qx.ui.core.Widget.getActiveSiblingHelper(this, |
6962 |
"default":function(el){return qx.html.Style.getBorderTop(el); |
| 7947 |
this.getParent(), |
6963 |
}}), |
| 7948 |
1, |
6964 |
getInsetRight:qx.core.Variant.select("qx.client", |
| 7949 |
vIgnoreClasses, |
6965 |
{"mshtml":function(el){if(qx.html.Style.getStyleProperty(el, |
| 7950 |
null); |
6966 |
"overflowY")=="hidden"||el.clientWidth==0){return qx.html.Style.getBorderRight(el); |
| 7951 |
return vNext?vNext:this.getParent().getFirstActiveChild(); |
6967 |
}return Math.max(0, |
|
|
6968 |
el.offsetWidth-el.clientLeft-el.clientWidth); |
| 7952 |
}, |
6969 |
}, |
| 7953 |
isFirstChild:function(){return this._hasParent&&this.getParent().getFirstChild()==this; |
6970 |
"default":function(el){if(el.clientWidth==0){var ov=qx.html.Style.getStyleProperty(el, |
|
|
6971 |
"overflow"); |
| 6972 |
var sbv=ov=="scroll"||ov=="-moz-scrollbars-vertical"?16:0; |
| 6973 |
return Math.max(0, |
| 6974 |
qx.html.Style.getBorderRight(el)+sbv); |
| 6975 |
}return Math.max(0, |
| 6976 |
el.offsetWidth-el.clientWidth-qx.html.Style.getBorderLeft(el)); |
| 6977 |
}}), |
| 6978 |
getInsetBottom:qx.core.Variant.select("qx.client", |
| 6979 |
{"mshtml":function(el){if(qx.html.Style.getStyleProperty(el, |
| 6980 |
"overflowX")=="hidden"||el.clientHeight==0){return qx.html.Style.getBorderBottom(el); |
| 6981 |
}return Math.max(0, |
| 6982 |
el.offsetHeight-el.clientTop-el.clientHeight); |
| 7954 |
}, |
6983 |
}, |
| 7955 |
isLastChild:function(){return this._hasParent&&this.getParent().getLastChild()==this; |
6984 |
"default":function(el){if(el.clientHeight==0){var ov=qx.html.Style.getStyleProperty(el, |
|
|
6985 |
"overflow"); |
| 6986 |
var sbv=ov=="scroll"||ov=="-moz-scrollbars-horizontal"?16:0; |
| 6987 |
return Math.max(0, |
| 6988 |
qx.html.Style.getBorderBottom(el)+sbv); |
| 6989 |
}return Math.max(0, |
| 6990 |
el.offsetHeight-el.clientHeight-qx.html.Style.getBorderTop(el)); |
| 6991 |
}}), |
| 6992 |
getScrollBarSizeLeft:function(el){return 0; |
| 7956 |
}, |
6993 |
}, |
| 7957 |
isFirstVisibleChild:function(){return this._hasParent&&this.getParent().getFirstVisibleChild()==this; |
6994 |
getScrollBarSizeTop:function(el){return 0; |
| 7958 |
}, |
6995 |
}, |
| 7959 |
isLastVisibleChild:function(){return this._hasParent&&this.getParent().getLastVisibleChild()==this; |
6996 |
getScrollBarSizeRight:function(el){return qx.html.Dimension.getInsetRight(el)-qx.html.Style.getBorderRight(el); |
| 7960 |
}, |
6997 |
}, |
| 7961 |
hasState:function(vState){return this.__states&&this.__states[vState]?true:false; |
6998 |
getScrollBarSizeBottom:function(el){return qx.html.Dimension.getInsetBottom(el)-qx.html.Style.getBorderBottom(el); |
| 7962 |
}, |
6999 |
}, |
| 7963 |
addState:function(vState){if(!this.__states){this.__states={}; |
7000 |
getScrollBarVisibleX:function(el){return qx.html.Dimension.getScrollBarSizeRight(el)>0; |
|
|
7001 |
}, |
| 7002 |
getScrollBarVisibleY:function(el){return qx.html.Dimension.getScrollBarSizeBottom(el)>0; |
| 7003 |
}}}); |
| 7004 |
|
| 7005 |
|
| 7006 |
|
| 7007 |
|
| 7008 |
/* ID: qx.html.Style */ |
| 7009 |
qx.Class.define("qx.html.Style", |
| 7010 |
{statics:{getStylePropertySure:qx.lang.Object.select((document.defaultView&&document.defaultView.getComputedStyle)?"hasComputed":"noComputed", |
| 7011 |
{"hasComputed":function(el, |
| 7012 |
prop){return !el?null:el.ownerDocument?el.ownerDocument.defaultView.getComputedStyle(el, |
| 7013 |
"")[prop]:el.style[prop]; |
| 7014 |
}, |
| 7015 |
"noComputed":qx.core.Variant.select("qx.client", |
| 7016 |
{"mshtml":function(el, |
| 7017 |
prop){try{if(!el){return null; |
| 7964 |
} |
7018 |
} |
| 7965 |
if(!this.__states[vState]){this.__states[vState]=true; |
7019 |
if(el.parentNode&&el.currentStyle){return el.currentStyle[prop]; |
| 7966 |
if(this._hasParent){qx.ui.core.Widget.addToGlobalStateQueue(this); |
7020 |
}else{var v1=el.runtimeStyle[prop]; |
| 7967 |
}}}, |
7021 |
if(v1!=null&&typeof v1!="undefined"&&v1!=""){return v1; |
| 7968 |
removeState:function(vState){if(this.__states&&this.__states[vState]){delete this.__states[vState]; |
7022 |
}return el.style[prop]; |
| 7969 |
if(this._hasParent){qx.ui.core.Widget.addToGlobalStateQueue(this); |
7023 |
}}catch(ex){throw new Error("Could not evaluate computed style: "+el+"["+prop+"]: "+ex); |
| 7970 |
}}}, |
|
|
| 7971 |
_styleFromMap:function(data){var styler=qx.core.Property.$$method.style; |
| 7972 |
var unstyler=qx.core.Property.$$method.unstyle; |
| 7973 |
var value; |
| 7974 |
{for(var prop in data){if(!this[styler[prop]]){throw new Error(this.classname+' has no themeable property "'+prop+'"'); |
| 7975 |
}}}; |
| 7976 |
for(var prop in data){value=data[prop]; |
| 7977 |
value==="undefined"?this[unstyler[prop]]():this[styler[prop]](value); |
| 7978 |
}}, |
7024 |
}}, |
| 7979 |
_unstyleFromArray:function(data){var unstyler=qx.core.Property.$$method.unstyle; |
7025 |
"default":function(el, |
| 7980 |
{for(var i=0, |
7026 |
prop){return !el?null:el.style[prop]; |
| 7981 |
l=data.length;i<l;i++){if(!this[unstyler[data[i]]]){throw new Error(this.classname+' has no themeable property "'+data[i]+'"'); |
7027 |
}})}), |
| 7982 |
}}}; |
7028 |
getStyleProperty:qx.lang.Object.select((document.defaultView&&document.defaultView.getComputedStyle)?"hasComputed":"noComputed", |
| 7983 |
for(var i=0, |
7029 |
{"hasComputed":function(el, |
| 7984 |
l=data.length;i<l;i++){this[unstyler[data[i]]](); |
7030 |
prop){try{return el.ownerDocument.defaultView.getComputedStyle(el, |
|
|
7031 |
"")[prop]; |
| 7032 |
}catch(ex){throw new Error("Could not evaluate computed style: "+el+"["+prop+"]: "+ex); |
| 7033 |
}}, |
| 7034 |
"noComputed":qx.core.Variant.select("qx.client", |
| 7035 |
{"mshtml":function(el, |
| 7036 |
prop){try{return el.currentStyle[prop]; |
| 7037 |
}catch(ex){throw new Error("Could not evaluate computed style: "+el+"["+prop+"]: "+ex); |
| 7038 |
}}, |
| 7039 |
"default":function(el, |
| 7040 |
prop){try{return el.style[prop]; |
| 7041 |
}catch(ex){throw new Error("Could not evaluate computed style: "+el+"["+prop+"]"); |
| 7042 |
}}})}), |
| 7043 |
getStyleSize:function(vElement, |
| 7044 |
propertyName){return parseInt(qx.html.Style.getStyleProperty(vElement, |
| 7045 |
propertyName))||0; |
| 7046 |
}, |
| 7047 |
getMarginLeft:function(vElement){return qx.html.Style.getStyleSize(vElement, |
| 7048 |
"marginLeft"); |
| 7049 |
}, |
| 7050 |
getMarginTop:function(vElement){return qx.html.Style.getStyleSize(vElement, |
| 7051 |
"marginTop"); |
| 7052 |
}, |
| 7053 |
getMarginRight:function(vElement){return qx.html.Style.getStyleSize(vElement, |
| 7054 |
"marginRight"); |
| 7055 |
}, |
| 7056 |
getMarginBottom:function(vElement){return qx.html.Style.getStyleSize(vElement, |
| 7057 |
"marginBottom"); |
| 7058 |
}, |
| 7059 |
getPaddingLeft:function(vElement){return qx.html.Style.getStyleSize(vElement, |
| 7060 |
"paddingLeft"); |
| 7061 |
}, |
| 7062 |
getPaddingTop:function(vElement){return qx.html.Style.getStyleSize(vElement, |
| 7063 |
"paddingTop"); |
| 7064 |
}, |
| 7065 |
getPaddingRight:function(vElement){return qx.html.Style.getStyleSize(vElement, |
| 7066 |
"paddingRight"); |
| 7067 |
}, |
| 7068 |
getPaddingBottom:function(vElement){return qx.html.Style.getStyleSize(vElement, |
| 7069 |
"paddingBottom"); |
| 7070 |
}, |
| 7071 |
getBorderLeft:function(vElement){return qx.html.Style.getStyleProperty(vElement, |
| 7072 |
"borderLeftStyle")=="none"?0:qx.html.Style.getStyleSize(vElement, |
| 7073 |
"borderLeftWidth"); |
| 7074 |
}, |
| 7075 |
getBorderTop:function(vElement){return qx.html.Style.getStyleProperty(vElement, |
| 7076 |
"borderTopStyle")=="none"?0:qx.html.Style.getStyleSize(vElement, |
| 7077 |
"borderTopWidth"); |
| 7078 |
}, |
| 7079 |
getBorderRight:function(vElement){return qx.html.Style.getStyleProperty(vElement, |
| 7080 |
"borderRightStyle")=="none"?0:qx.html.Style.getStyleSize(vElement, |
| 7081 |
"borderRightWidth"); |
| 7082 |
}, |
| 7083 |
getBorderBottom:function(vElement){return qx.html.Style.getStyleProperty(vElement, |
| 7084 |
"borderBottomStyle")=="none"?0:qx.html.Style.getStyleSize(vElement, |
| 7085 |
"borderBottomWidth"); |
| 7086 |
}}}); |
| 7087 |
|
| 7088 |
|
| 7089 |
|
| 7090 |
|
| 7091 |
/* ID: qx.html.StyleSheet */ |
| 7092 |
qx.Class.define("qx.html.StyleSheet", |
| 7093 |
{statics:{includeFile:function(vHref){var el=document.createElement("link"); |
| 7094 |
el.type="text/css"; |
| 7095 |
el.rel="stylesheet"; |
| 7096 |
el.href=vHref; |
| 7097 |
var head=document.getElementsByTagName("head")[0]; |
| 7098 |
head.appendChild(el); |
| 7099 |
}, |
| 7100 |
createElement:qx.lang.Object.select(document.createStyleSheet?"ie4+":"other", |
| 7101 |
{"ie4+":function(vCssText){var vSheet=document.createStyleSheet(); |
| 7102 |
if(vCssText){vSheet.cssText=vCssText; |
| 7103 |
}return vSheet; |
| 7104 |
}, |
| 7105 |
"other":function(vCssText){var vElement=document.createElement("style"); |
| 7106 |
vElement.type="text/css"; |
| 7107 |
vElement.appendChild(document.createTextNode(vCssText||"body {}")); |
| 7108 |
document.getElementsByTagName("head")[0].appendChild(vElement); |
| 7109 |
if(vElement.sheet){return vElement.sheet; |
| 7110 |
}else{var styles=document.styleSheets; |
| 7111 |
for(var i=styles.length-1;i>=0;i--){if(styles[i].ownerNode==vElement){return styles[i]; |
| 7112 |
}}}throw "Error: Could not get a reference to the sheet object"; |
| 7113 |
}}), |
| 7114 |
addRule:qx.lang.Object.select(document.createStyleSheet?"ie4+":"other", |
| 7115 |
{"ie4+":function(vSheet, |
| 7116 |
vSelector, |
| 7117 |
vStyle){vSheet.addRule(vSelector, |
| 7118 |
vStyle); |
| 7119 |
}, |
| 7120 |
"other":qx.lang.Object.select(qx.core.Client.getInstance().isSafari2()?"safari2":"other", |
| 7121 |
{"safari2+":function(vSheet, |
| 7122 |
vSelector, |
| 7123 |
vStyle){if(!vSheet._qxRules){vSheet._qxRules={}; |
| 7124 |
} |
| 7125 |
if(!vSheet._qxRules[vSelector]){var ruleNode=document.createTextNode(vSelector+"{"+vStyle+"}"); |
| 7126 |
vSheet.ownerNode.appendChild(ruleNode); |
| 7127 |
vSheet._qxRules[vSelector]=ruleNode; |
| 7985 |
}}, |
7128 |
}}, |
| 7986 |
_renderAppearance:function(){if(!this.__states){this.__states={}; |
7129 |
"other":function(vSheet, |
| 7987 |
}this._applyStateStyleFocus(this.__states); |
7130 |
vSelector, |
| 7988 |
var vAppearance=this.getAppearance(); |
7131 |
vStyle){vSheet.insertRule(vSelector+"{"+vStyle+"}", |
| 7989 |
if(vAppearance){try{var r=qx.theme.manager.Appearance.getInstance().styleFrom(vAppearance, |
7132 |
vSheet.cssRules.length); |
| 7990 |
this.__states); |
7133 |
}})}), |
| 7991 |
if(r){this._styleFromMap(r); |
7134 |
removeRule:qx.lang.Object.select(document.createStyleSheet?"ie4+":"other", |
| 7992 |
}}catch(ex){this.error("Could not apply state appearance", |
7135 |
{"ie4+":function(vSheet, |
| 7993 |
ex); |
7136 |
vSelector){var vRules=vSheet.rules; |
|
|
7137 |
var vLength=vRules.length; |
| 7138 |
for(var i=vLength-1;i>=0;i--){if(vRules[i].selectorText==vSelector){vSheet.removeRule(i); |
| 7994 |
}}}, |
7139 |
}}}, |
| 7995 |
_resetAppearanceThemeWrapper:function(vNewAppearanceTheme, |
7140 |
"other":qx.lang.Object.select(qx.core.Client.getInstance().isSafari2()?"safari2":"other", |
| 7996 |
vOldAppearanceTheme){var vAppearance=this.getAppearance(); |
7141 |
{"safari2+":function(vSheet, |
| 7997 |
if(vAppearance){var vAppearanceManager=qx.theme.manager.Appearance.getInstance(); |
7142 |
vSelector){var warn=function(){qx.log.Logger.ROOT_LOGGER.warn("In Safari/Webkit you can only remove rules that are created using qx.html.StyleSheet.addRule"); |
| 7998 |
var vOldAppearanceProperties=vAppearanceManager.styleFromTheme(vOldAppearanceTheme, |
7143 |
}; |
| 7999 |
vAppearance, |
7144 |
if(!vSheet._qxRules){warn(); |
| 8000 |
this.__states); |
7145 |
}var ruleNode=vSheet._qxRules[vSelector]; |
| 8001 |
var vNewAppearanceProperties=vAppearanceManager.styleFromTheme(vNewAppearanceTheme, |
7146 |
if(ruleNode){vSheet.ownerNode.removeChild(ruleNode); |
| 8002 |
vAppearance, |
7147 |
vSheet._qxRules[vSelector]=null; |
| 8003 |
this.__states); |
7148 |
}else{warn(); |
| 8004 |
var vUnstyleList=[]; |
|
|
| 8005 |
for(var prop in vOldAppearanceProperties){if(vNewAppearanceProperties[prop]===undefined){vUnstyleList.push(prop); |
| 8006 |
}}this._unstyleFromArray(vUnstyleList); |
| 8007 |
this._styleFromMap(vNewAppearanceProperties); |
| 8008 |
}}, |
7149 |
}}, |
| 8009 |
_applyStateStyleFocus:qx.core.Variant.select("qx.client", |
7150 |
"other":function(vSheet, |
| 8010 |
{"mshtml":function(vStates){}, |
7151 |
vSelector){var vRules=vSheet.cssRules; |
| 8011 |
"gecko":function(vStates){if(vStates.focused){if(!qx.event.handler.FocusHandler.mouseFocus&&!this.getHideFocus()){this.setStyleProperty("MozOutline", |
7152 |
var vLength=vRules.length; |
| 8012 |
"1px dotted invert"); |
7153 |
for(var i=vLength-1;i>=0;i--){if(vRules[i].selectorText==vSelector){vSheet.deleteRule(i); |
| 8013 |
}}else{this.removeStyleProperty("MozOutline"); |
7154 |
}}}})}), |
|
|
7155 |
removeAllRules:qx.lang.Object.select(document.createStyleSheet?"ie4+":"other", |
| 7156 |
{"ie4+":function(vSheet){var vRules=vSheet.rules; |
| 7157 |
var vLength=vRules.length; |
| 7158 |
for(var i=vLength-1;i>=0;i--){vSheet.removeRule(i); |
| 8014 |
}}, |
7159 |
}}, |
| 8015 |
"default":function(vStates){if(vStates.focused){if(!qx.event.handler.FocusHandler.mouseFocus&&!this.getHideFocus()){this.setStyleProperty("outline", |
7160 |
"other":qx.lang.Object.select(qx.core.Client.getInstance().isSafari2()?"safari2":"other", |
| 8016 |
"1px dotted invert"); |
7161 |
{"safari2+":function(vSheet){var node=vSheet.ownerNode; |
| 8017 |
}}else{this.removeStyleProperty("outline"); |
7162 |
var rules=node.childNodes; |
| 8018 |
}}}), |
7163 |
while(rules.length>0){node.removeChild(rules[0]); |
| 8019 |
addToStateQueue:function(){qx.ui.core.Widget.addToGlobalStateQueue(this); |
7164 |
}}, |
|
|
7165 |
"other":function(vSheet){var vRules=vSheet.cssRules; |
| 7166 |
var vLength=vRules.length; |
| 7167 |
for(var i=vLength-1;i>=0;i--){vSheet.deleteRule(i); |
| 7168 |
}}})}), |
| 7169 |
addImport:qx.lang.Object.select(document.createStyleSheet?"ie4+":"other", |
| 7170 |
{"ie4+":function(vSheet, |
| 7171 |
vUrl){vSheet.addImport(vUrl); |
| 8020 |
}, |
7172 |
}, |
| 8021 |
recursiveAddToStateQueue:function(){this.addToStateQueue(); |
7173 |
"other":qx.lang.Object.select(qx.core.Client.getInstance().isSafari2()?"safari2":"other", |
|
|
7174 |
{"safari2+":function(vSheet, |
| 7175 |
vUrl){vSheet.ownerNode.appendChild(document.createTextNode('@import "'+vUrl+'";')); |
| 8022 |
}, |
7176 |
}, |
| 8023 |
_applyAppearance:function(value, |
7177 |
"other":function(vSheet, |
| 8024 |
old){if(!this.__states){this.__states={}; |
7178 |
vUrl){vSheet.insertRule('@import "'+vUrl+'";', |
| 8025 |
}var vAppearanceManager=qx.theme.manager.Appearance.getInstance(); |
7179 |
vSheet.cssRules.length); |
| 8026 |
if(value){var vNewAppearanceProperties=vAppearanceManager.styleFrom(value, |
7180 |
}})}), |
| 8027 |
this.__states)||{}; |
7181 |
removeImport:qx.lang.Object.select(document.createStyleSheet?"ie4+":"other", |
| 8028 |
} |
7182 |
{"ie4+":function(vSheet, |
| 8029 |
if(old){var vOldAppearanceProperties=vAppearanceManager.styleFrom(old, |
7183 |
vUrl){var vImports=vSheet.imports; |
| 8030 |
this.__states)||{}; |
7184 |
var vLength=vImports.length; |
| 8031 |
var vUnstyleList=[]; |
7185 |
for(var i=vLength-1;i>=0;i--){if(vImports[i].href==vUrl){vSheet.removeImport(i); |
| 8032 |
for(var prop in vOldAppearanceProperties){if(!vNewAppearanceProperties||!(prop in vNewAppearanceProperties)){vUnstyleList.push(prop); |
7186 |
}}}, |
| 8033 |
}}} |
7187 |
"other":function(vSheet, |
| 8034 |
if(vUnstyleList){this._unstyleFromArray(vUnstyleList); |
7188 |
vUrl){var vRules=vSheet.cssRules; |
| 8035 |
} |
7189 |
var vLength=vRules.length; |
| 8036 |
if(vNewAppearanceProperties){this._styleFromMap(vNewAppearanceProperties); |
7190 |
for(var i=vLength-1;i>=0;i--){if(vRules[i].href==vUrl){vSheet.deleteRule(i); |
| 8037 |
}}, |
7191 |
}}}}), |
| 8038 |
_recursiveAppearanceThemeUpdate:function(vNewAppearanceTheme, |
7192 |
removeAllImports:qx.lang.Object.select(document.createStyleSheet?"ie4+":"other", |
| 8039 |
vOldAppearanceTheme){try{this._resetAppearanceThemeWrapper(vNewAppearanceTheme, |
7193 |
{"ie4+":function(vSheet){var vImports=vSheet.imports; |
| 8040 |
vOldAppearanceTheme); |
7194 |
var vLength=vImports.length; |
| 8041 |
}catch(ex){this.error("Failed to update appearance theme", |
7195 |
for(var i=vLength-1;i>=0;i--){vSheet.removeImport(i); |
| 8042 |
ex); |
|
|
| 8043 |
}}, |
7196 |
}}, |
| 8044 |
_applyElementData:function(elem){}, |
7197 |
"other":function(vSheet){var vRules=vSheet.cssRules; |
| 8045 |
setHtmlProperty:function(propName, |
7198 |
var vLength=vRules.length; |
| 8046 |
value){if(!this._htmlProperties){this._htmlProperties={}; |
7199 |
for(var i=vLength-1;i>=0;i--){if(vRules[i].type==vRules[i].IMPORT_RULE){vSheet.deleteRule(i); |
| 8047 |
}this._htmlProperties[propName]=value; |
7200 |
}}}})}}); |
| 8048 |
if(this._isCreated&&this.getElement()[propName]!=value){this.getElement()[propName]=value; |
7201 |
|
| 8049 |
}return true; |
7202 |
|
|
|
7203 |
|
| 7204 |
|
| 7205 |
/* ID: qx.ui.core.Parent */ |
| 7206 |
qx.Class.define("qx.ui.core.Parent", |
| 7207 |
{extend:qx.ui.core.Widget, |
| 7208 |
type:"abstract", |
| 7209 |
construct:function(){this.base(arguments); |
| 7210 |
this._children=[]; |
| 7211 |
this._layoutImpl=this._createLayoutImpl(); |
| 8050 |
}, |
7212 |
}, |
| 8051 |
removeHtmlProperty:qx.core.Variant.select("qx.client", |
7213 |
properties:{focusHandler:{check:"qx.event.handler.FocusHandler", |
| 8052 |
{"mshtml":function(propName){if(!this._htmlProperties){return; |
7214 |
apply:"_applyFocusHandler", |
| 8053 |
}delete this._htmlProperties[propName]; |
7215 |
nullable:true}, |
| 8054 |
if(this._isCreated){this.getElement().removeAttribute(propName); |
7216 |
activeChild:{check:"qx.ui.core.Widget", |
| 8055 |
}return true; |
7217 |
apply:"_applyActiveChild", |
|
|
7218 |
event:"changeActiveChild", |
| 7219 |
nullable:true}, |
| 7220 |
focusedChild:{check:"qx.ui.core.Widget", |
| 7221 |
apply:"_applyFocusedChild", |
| 7222 |
event:"changeFocusedChild", |
| 7223 |
nullable:true}, |
| 7224 |
visibleChildren:{_cached:true, |
| 7225 |
defaultValue:null}}, |
| 7226 |
members:{isFocusRoot:function(){return this.getFocusHandler()!=null; |
| 8056 |
}, |
7227 |
}, |
| 8057 |
"default":function(propName){if(!this._htmlProperties){return; |
7228 |
getFocusRoot:function(){if(this.isFocusRoot()){return this; |
| 8058 |
}delete this._htmlProperties[propName]; |
7229 |
} |
| 8059 |
if(this._isCreated){this.getElement().removeAttribute(propName); |
7230 |
if(this._hasParent){return this.getParent().getFocusRoot(); |
| 8060 |
delete this.getElement()[propName]; |
7231 |
}return null; |
| 8061 |
}return true; |
|
|
| 8062 |
}}), |
| 8063 |
getHtmlProperty:function(propName){if(!this._htmlProperties){return ""; |
| 8064 |
}return this._htmlProperties[propName]||""; |
| 8065 |
}, |
7232 |
}, |
| 8066 |
_applyHtmlProperties:function(elem){var vProperties=this._htmlProperties; |
7233 |
activateFocusRoot:function(){if(this._focusHandler){return; |
| 8067 |
if(vProperties){var propName; |
7234 |
}this._focusHandler=new qx.event.handler.FocusHandler(this); |
| 8068 |
for(propName in vProperties){elem[propName]=vProperties[propName]; |
7235 |
this.setFocusHandler(this._focusHandler); |
| 8069 |
}}}, |
|
|
| 8070 |
_generateHtmlId:function(){var id=this.classname+"."+qx.ui.core.Widget._idCounter++; |
| 8071 |
this.debug("setting autogenerated HTML id to "+id); |
| 8072 |
this.setHtmlProperty("id", |
| 8073 |
id); |
| 8074 |
}, |
7236 |
}, |
| 8075 |
setHtmlAttribute:function(propName, |
7237 |
_onfocuskeyevent:function(e){this.getFocusHandler()._onkeyevent(this, |
| 8076 |
value){qx.log.Logger.deprecatedMethodWarning(arguments.callee, |
7238 |
e); |
| 8077 |
"Use setHtmlProperty instead"); |
|
|
| 8078 |
if(!this._htmlAttributes){this._htmlAttributes={}; |
| 8079 |
}this._htmlAttributes[propName]=value; |
| 8080 |
if(this._isCreated){this.getElement().setAttribute(propName, |
| 8081 |
value); |
| 8082 |
}return true; |
| 8083 |
}, |
7239 |
}, |
| 8084 |
removeHtmlAttribute:function(propName){qx.log.Logger.deprecatedMethodWarning(arguments.callee, |
7240 |
_applyFocusHandler:function(value, |
| 8085 |
"Use removeHtmlProperty instead"); |
7241 |
old){if(value){this.addEventListener("keypress", |
| 8086 |
if(!this._htmlAttributes){return; |
7242 |
this._onfocuskeyevent); |
| 8087 |
}delete this._htmlAttributes[propName]; |
7243 |
if(this.getTabIndex()<1){this.setTabIndex(1); |
| 8088 |
if(this._isCreated){this.getElement().removeAttribute(propName); |
7244 |
}this.setHideFocus(true); |
| 8089 |
}return true; |
7245 |
this.setActiveChild(this); |
|
|
7246 |
}else{this.removeEventListener("keydown", |
| 7247 |
this._onfocuskeyevent); |
| 7248 |
this.removeEventListener("keypress", |
| 7249 |
this._onfocuskeyevent); |
| 7250 |
this.setTabIndex(-1); |
| 7251 |
this.setHideFocus(false); |
| 7252 |
}}, |
| 7253 |
_applyActiveChild:function(value, |
| 7254 |
old){}, |
| 7255 |
_applyFocusedChild:function(value, |
| 7256 |
old){var vFocusValid=value!=null; |
| 7257 |
var vBlurValid=old!=null; |
| 7258 |
if(qx.Class.isDefined("qx.ui.popup.PopupManager")&&vFocusValid){var vMgr=qx.ui.popup.PopupManager.getInstance(); |
| 7259 |
if(vMgr){vMgr.update(value); |
| 7260 |
}} |
| 7261 |
if(vBlurValid){if(old.hasEventListeners("focusout")){var vEventObject=new qx.event.type.FocusEvent("focusout", |
| 7262 |
old); |
| 7263 |
if(vFocusValid){vEventObject.setRelatedTarget(value); |
| 7264 |
}old.dispatchEvent(vEventObject); |
| 7265 |
vEventObject.dispose(); |
| 7266 |
}} |
| 7267 |
if(vFocusValid){if(value.hasEventListeners("focusin")){var vEventObject=new qx.event.type.FocusEvent("focusin", |
| 7268 |
value); |
| 7269 |
if(vBlurValid){vEventObject.setRelatedTarget(old); |
| 7270 |
}value.dispatchEvent(vEventObject); |
| 7271 |
vEventObject.dispose(); |
| 7272 |
}} |
| 7273 |
if(vBlurValid){if(this.getActiveChild()==old&&!vFocusValid){this.setActiveChild(null); |
| 7274 |
}old.setFocused(false); |
| 7275 |
var vEventObject=new qx.event.type.FocusEvent("blur", |
| 7276 |
old); |
| 7277 |
if(vFocusValid){vEventObject.setRelatedTarget(value); |
| 7278 |
}old.dispatchEvent(vEventObject); |
| 7279 |
if(qx.Class.isDefined("qx.ui.popup.ToolTipManager")){var vMgr=qx.ui.popup.ToolTipManager.getInstance(); |
| 7280 |
if(vMgr){vMgr.handleBlur(vEventObject); |
| 7281 |
}}vEventObject.dispose(); |
| 7282 |
} |
| 7283 |
if(vFocusValid){this.setActiveChild(value); |
| 7284 |
value.setFocused(true); |
| 7285 |
qx.event.handler.EventHandler.getInstance().setFocusRoot(this); |
| 7286 |
var vEventObject=new qx.event.type.FocusEvent("focus", |
| 7287 |
value); |
| 7288 |
if(vBlurValid){vEventObject.setRelatedTarget(old); |
| 7289 |
}value.dispatchEvent(vEventObject); |
| 7290 |
if(qx.Class.isDefined("qx.ui.popup.ToolTipManager")){var vMgr=qx.ui.popup.ToolTipManager.getInstance(); |
| 7291 |
if(vMgr){vMgr.handleFocus(vEventObject); |
| 7292 |
}}vEventObject.dispose(); |
| 7293 |
}}, |
| 7294 |
_layoutImpl:null, |
| 7295 |
_createLayoutImpl:function(){return null; |
| 8090 |
}, |
7296 |
}, |
| 8091 |
getHtmlAttribute:function(propName){if(!this._htmlAttributes){return ""; |
7297 |
getLayoutImpl:function(){return this._layoutImpl; |
| 8092 |
}return this._htmlAttributes[propName]||""; |
|
|
| 8093 |
}, |
7298 |
}, |
| 8094 |
_applyHtmlAttributes:function(elem){var vAttributes=this._htmlAttributes; |
7299 |
getChildren:function(){return this._children; |
| 8095 |
if(vAttributes){var propName; |
|
|
| 8096 |
for(propName in vAttributes){elem.setAttribute(propName, |
| 8097 |
vAttributes[propName]); |
| 8098 |
}}}, |
| 8099 |
getStyleProperty:function(propName){if(!this._styleProperties){return ""; |
| 8100 |
}return this._styleProperties[propName]||""; |
| 8101 |
}, |
7300 |
}, |
| 8102 |
__outerElementStyleProperties:{cursor:true, |
7301 |
getChildrenLength:function(){return this.getChildren().length; |
| 8103 |
zIndex:true, |
|
|
| 8104 |
filter:true, |
| 8105 |
display:true, |
| 8106 |
visibility:true}, |
| 8107 |
setStyleProperty:function(propName, |
| 8108 |
value){if(!this._styleProperties){this._styleProperties={}; |
| 8109 |
}this._styleProperties[propName]=value; |
| 8110 |
if(this._isCreated){var elem=this.__outerElementStyleProperties[propName]?this.getElement():this._getTargetNode(); |
| 8111 |
if(elem){elem.style[propName]=(value==null)?"":value; |
| 8112 |
}}}, |
| 8113 |
removeStyleProperty:function(propName){if(!this._styleProperties){return; |
| 8114 |
}delete this._styleProperties[propName]; |
| 8115 |
if(this._isCreated){var elem=this.__outerElementStyleProperties[propName]?this.getElement():this._getTargetNode(); |
| 8116 |
if(elem){elem.style[propName]=""; |
| 8117 |
}}}, |
| 8118 |
_applyStyleProperties:function(elem){var vProperties=this._styleProperties; |
| 8119 |
if(!vProperties){return; |
| 8120 |
}var propName; |
| 8121 |
var vBaseElement=elem; |
| 8122 |
var vTargetElement=this._getTargetNode(); |
| 8123 |
var elem; |
| 8124 |
var value; |
| 8125 |
for(propName in vProperties){elem=this.__outerElementStyleProperties[propName]?vBaseElement:vTargetElement; |
| 8126 |
value=vProperties[propName]; |
| 8127 |
elem.style[propName]=(value==null)?"":value; |
| 8128 |
}}, |
| 8129 |
_applyEnabled:function(value, |
| 8130 |
old){if(value===false){this.addState("disabled"); |
| 8131 |
this.removeState("over"); |
| 8132 |
if(qx.Class.isDefined("qx.ui.form.Button")){this.removeState("abandoned"); |
| 8133 |
this.removeState("pressed"); |
| 8134 |
}}else{this.removeState("disabled"); |
| 8135 |
}}, |
| 8136 |
isFocusable:function(){return this.getEnabled()&&this.isSeeable()&&this.getTabIndex()>=0&&this.getTabIndex()!=null; |
| 8137 |
}, |
7302 |
}, |
| 8138 |
isFocusRoot:function(){return false; |
7303 |
hasChildren:function(){return this.getChildrenLength()>0; |
| 8139 |
}, |
7304 |
}, |
| 8140 |
getFocusRoot:function(){if(this._hasParent){return this.getParent().getFocusRoot(); |
7305 |
isEmpty:function(){return this.getChildrenLength()==0; |
| 8141 |
}return null; |
|
|
| 8142 |
}, |
7306 |
}, |
| 8143 |
getActiveChild:function(){var vRoot=this.getFocusRoot(); |
7307 |
indexOf:function(vChild){return this.getChildren().indexOf(vChild); |
| 8144 |
if(vRoot){return vRoot.getActiveChild(); |
|
|
| 8145 |
}return null; |
| 8146 |
}, |
7308 |
}, |
| 8147 |
_ontabfocus:qx.lang.Function.returnTrue, |
7309 |
contains:function(vWidget){switch(vWidget){case null:return false; |
| 8148 |
_applyFocused:function(value, |
7310 |
case this:return true; |
| 8149 |
old){if(!this.isCreated()){return; |
7311 |
default:return this.contains(vWidget.getParent()); |
| 8150 |
}var vFocusRoot=this.getFocusRoot(); |
7312 |
}}, |
| 8151 |
if(vFocusRoot){if(value){vFocusRoot.setFocusedChild(this); |
7313 |
_computeVisibleChildren:function(){var vVisible=[]; |
| 8152 |
this._visualizeFocus(); |
7314 |
var vChildren=this.getChildren(); |
| 8153 |
}else{if(vFocusRoot.getFocusedChild()==this){vFocusRoot.setFocusedChild(null); |
7315 |
if(!vChildren){return 0; |
| 8154 |
}this._visualizeBlur(); |
7316 |
}var vLength=vChildren.length; |
| 8155 |
}}}, |
7317 |
for(var i=0;i<vLength;i++){var vChild=vChildren[i]; |
| 8156 |
_applyHideFocus:qx.core.Variant.select("qx.client", |
7318 |
if(vChild._isDisplayable){vVisible.push(vChild); |
| 8157 |
{"mshtml":function(value, |
7319 |
}}return vVisible; |
| 8158 |
old){this.setHtmlProperty("hideFocus", |
|
|
| 8159 |
value); |
| 8160 |
}, |
7320 |
}, |
| 8161 |
"default":qx.lang.Function.returnTrue}), |
7321 |
getVisibleChildrenLength:function(){return this.getVisibleChildren().length; |
| 8162 |
_visualizeBlur:function(){if(this.getEnableElementFocus()&&(!this.getFocusRoot().getFocusedChild()||(this.getFocusRoot().getFocusedChild()&&this.getFocusRoot().getFocusedChild().getEnableElementFocus()))){try{this.getElement().blur(); |
|
|
| 8163 |
}catch(ex){}}this.removeState("focused"); |
| 8164 |
}, |
7322 |
}, |
| 8165 |
_visualizeFocus:function(){if(!qx.event.handler.FocusHandler.mouseFocus&&this.getEnableElementFocus()){try{this.getElement().focus(); |
7323 |
hasVisibleChildren:function(){return this.getVisibleChildrenLength()>0; |
| 8166 |
}catch(ex){}}this.addState("focused"); |
|
|
| 8167 |
}, |
7324 |
}, |
| 8168 |
focus:function(){delete qx.event.handler.FocusHandler.mouseFocus; |
7325 |
isVisibleEmpty:function(){return this.getVisibleChildrenLength()==0; |
| 8169 |
this.setFocused(true); |
|
|
| 8170 |
}, |
7326 |
}, |
| 8171 |
blur:function(){delete qx.event.handler.FocusHandler.mouseFocus; |
7327 |
add:function(varargs){var vWidget; |
| 8172 |
this.setFocused(false); |
7328 |
for(var i=0, |
|
|
7329 |
l=arguments.length;i<l;i++){vWidget=arguments[i]; |
| 7330 |
if(!(vWidget instanceof qx.ui.core.Parent)&&!(vWidget instanceof qx.ui.basic.Terminator)){throw new Error("Invalid Widget: "+vWidget); |
| 7331 |
}else{vWidget.setParent(this); |
| 7332 |
}}return this; |
| 8173 |
}, |
7333 |
}, |
| 8174 |
_applyCapture:function(value, |
7334 |
addAt:function(vChild, |
| 8175 |
old){var vMgr=qx.event.handler.EventHandler.getInstance(); |
7335 |
vIndex){if(vIndex==null||vIndex<0){throw new Error("Not a valid index for addAt(): "+vIndex); |
| 8176 |
if(old){vMgr.setCaptureWidget(null); |
7336 |
} |
| 8177 |
}else if(value){vMgr.setCaptureWidget(this); |
7337 |
if(vChild.getParent()==this){var vChildren=this.getChildren(); |
| 8178 |
}}, |
7338 |
var vOldIndex=vChildren.indexOf(vChild); |
| 8179 |
_applyZIndex:function(value, |
7339 |
if(vOldIndex!=vIndex){if(vOldIndex!=-1){qx.lang.Array.removeAt(vChildren, |
| 8180 |
old){if(value==null){this.removeStyleProperty("zIndex"); |
7340 |
vOldIndex); |
| 8181 |
}else{this.setStyleProperty("zIndex", |
7341 |
}qx.lang.Array.insertAt(vChildren, |
| 8182 |
value); |
7342 |
vChild, |
|
|
7343 |
vIndex); |
| 7344 |
if(this._initialLayoutDone){this._invalidateVisibleChildren(); |
| 7345 |
this.getLayoutImpl().updateChildrenOnMoveChild(vChild, |
| 7346 |
vIndex, |
| 7347 |
vOldIndex); |
| 7348 |
}}}else{vChild._insertIndex=vIndex; |
| 7349 |
vChild.setParent(this); |
| 8183 |
}}, |
7350 |
}}, |
| 8184 |
_applyTabIndex:qx.core.Variant.select("qx.client", |
7351 |
addAtBegin:function(vChild){return this.addAt(vChild, |
| 8185 |
{"mshtml":function(value, |
7352 |
0); |
| 8186 |
old){this.setHtmlProperty("tabIndex", |
|
|
| 8187 |
value<0?-1:1); |
| 8188 |
}, |
7353 |
}, |
| 8189 |
"gecko":function(value, |
7354 |
addAtEnd:function(vChild){var vLength=this.getChildrenLength(); |
| 8190 |
old){this.setStyleProperty("MozUserFocus", |
7355 |
return this.addAt(vChild, |
| 8191 |
(value<0?"ignore":"normal")); |
7356 |
vChild.getParent()==this?vLength-1:vLength); |
| 8192 |
}, |
7357 |
}, |
| 8193 |
"default":function(value, |
7358 |
addBefore:function(vChild, |
| 8194 |
old){this.setStyleProperty("userFocus", |
7359 |
vBefore){var vChildren=this.getChildren(); |
| 8195 |
(value<0?"ignore":"normal")); |
7360 |
var vTargetIndex=vChildren.indexOf(vBefore); |
| 8196 |
this.setHtmlProperty("tabIndex", |
7361 |
if(vTargetIndex==-1){throw new Error("Child to add before: "+vBefore+" is not inside this parent."); |
| 8197 |
value<0?-1:1); |
7362 |
}var vSourceIndex=vChildren.indexOf(vChild); |
| 8198 |
}}), |
7363 |
if(vSourceIndex==-1||vSourceIndex>vTargetIndex){vTargetIndex++; |
| 8199 |
_applySelectable:qx.core.Variant.select("qx.client", |
7364 |
}return this.addAt(vChild, |
| 8200 |
{"mshtml":function(value, |
7365 |
Math.max(0, |
| 8201 |
old){}, |
7366 |
vTargetIndex-1)); |
| 8202 |
"gecko":function(value, |
7367 |
}, |
| 8203 |
old){if(value){this.removeStyleProperty("MozUserSelect"); |
7368 |
addAfter:function(vChild, |
| 8204 |
}else{this.setStyleProperty("MozUserSelect", |
7369 |
vAfter){var vChildren=this.getChildren(); |
| 8205 |
"none"); |
7370 |
var vTargetIndex=vChildren.indexOf(vAfter); |
| 8206 |
}}, |
7371 |
if(vTargetIndex==-1){throw new Error("Child to add after: "+vAfter+" is not inside this parent."); |
| 8207 |
"webkit":function(value, |
7372 |
}var vSourceIndex=vChildren.indexOf(vChild); |
| 8208 |
old){if(value){this.removeStyleProperty("WebkitUserSelect"); |
7373 |
if(vSourceIndex!=-1&&vSourceIndex<vTargetIndex){vTargetIndex--; |
| 8209 |
}else{this.setStyleProperty("WebkitUserSelect", |
7374 |
}return this.addAt(vChild, |
| 8210 |
"none"); |
7375 |
Math.min(vChildren.length, |
| 8211 |
}}, |
7376 |
vTargetIndex+1)); |
| 8212 |
"khtml":function(value, |
7377 |
}, |
| 8213 |
old){if(value){this.removeStyleProperty("KhtmlUserSelect"); |
7378 |
remove:function(varargs){var vWidget; |
| 8214 |
}else{this.setStyleProperty("KhtmlUserSelect", |
7379 |
for(var i=0, |
| 8215 |
"none"); |
7380 |
l=arguments.length;i<l;i++){vWidget=arguments[i]; |
| 8216 |
}}, |
7381 |
if(!(vWidget instanceof qx.ui.core.Parent)&&!(vWidget instanceof qx.ui.basic.Terminator)){throw new Error("Invalid Widget: "+vWidget); |
| 8217 |
"default":function(value, |
7382 |
}else if(vWidget.getParent()==this){vWidget.setParent(null); |
| 8218 |
old){if(value){return this.removeStyleProperty("userSelect"); |
7383 |
}}}, |
| 8219 |
}else{this.setStyleProperty("userSelect", |
7384 |
removeAt:function(vIndex){var vChild=this.getChildren()[vIndex]; |
| 8220 |
"none"); |
7385 |
if(vChild){delete vChild._insertIndex; |
| 8221 |
}}}), |
7386 |
vChild.setParent(null); |
| 8222 |
_applyOpacity:qx.core.Variant.select("qx.client", |
|
|
| 8223 |
{"mshtml":function(value, |
| 8224 |
old){if(value==null||value>=1||value<0){this.removeStyleProperty("filter"); |
| 8225 |
}else{this.setStyleProperty("filter", |
| 8226 |
("Alpha(Opacity="+Math.round(value*100)+")")); |
| 8227 |
}}, |
7387 |
}}, |
| 8228 |
"default":function(value, |
7388 |
removeAll:function(){var cs=this.getChildren(); |
| 8229 |
old){if(value==null||value>1){if(qx.core.Variant.isSet("qx.client", |
7389 |
var co=cs[0]; |
| 8230 |
"gecko")){this.removeStyleProperty("MozOpacity"); |
7390 |
while(co){this.remove(co); |
| 8231 |
}else if(qx.core.Variant.isSet("qx.client", |
7391 |
co=cs[0]; |
| 8232 |
"khtml")){this.removeStyleProperty("KhtmlOpacity"); |
|
|
| 8233 |
}this.removeStyleProperty("opacity"); |
| 8234 |
}else{value=qx.lang.Number.limit(value, |
| 8235 |
0, |
| 8236 |
1); |
| 8237 |
if(qx.core.Variant.isSet("qx.client", |
| 8238 |
"gecko")){this.setStyleProperty("MozOpacity", |
| 8239 |
value); |
| 8240 |
}else if(qx.core.Variant.isSet("qx.client", |
| 8241 |
"khtml")){this.setStyleProperty("KhtmlOpacity", |
| 8242 |
value); |
| 8243 |
}this.setStyleProperty("opacity", |
| 8244 |
value); |
| 8245 |
}}}), |
| 8246 |
__cursorMap:qx.core.Variant.select("qx.client", |
| 8247 |
{"mshtml":{"cursor":"hand", |
| 8248 |
"ew-resize":"e-resize", |
| 8249 |
"ns-resize":"n-resize", |
| 8250 |
"nesw-resize":"ne-resize", |
| 8251 |
"nwse-resize":"nw-resize"}, |
| 8252 |
"opera":{"col-resize":"e-resize", |
| 8253 |
"row-resize":"n-resize", |
| 8254 |
"ew-resize":"e-resize", |
| 8255 |
"ns-resize":"n-resize", |
| 8256 |
"nesw-resize":"ne-resize", |
| 8257 |
"nwse-resize":"nw-resize"}, |
| 8258 |
"default":{}}), |
| 8259 |
_applyCursor:function(value, |
| 8260 |
old){if(value){this.setStyleProperty("cursor", |
| 8261 |
this.__cursorMap[value]||value); |
| 8262 |
}else{this.removeStyleProperty("cursor"); |
| 8263 |
}}, |
7392 |
}}, |
| 8264 |
_applyCommand:function(value, |
7393 |
getFirstChild:function(){return qx.lang.Array.getFirst(this.getChildren())||null; |
| 8265 |
old){}, |
7394 |
}, |
| 8266 |
_applyBackgroundImage:function(value, |
7395 |
getFirstVisibleChild:function(){return qx.lang.Array.getFirst(this.getVisibleChildren())||null; |
| 8267 |
old){var imageMgr=qx.io.image.Manager.getInstance(); |
7396 |
}, |
| 8268 |
var aliasMgr=qx.io.Alias.getInstance(); |
7397 |
getFirstActiveChild:function(vIgnoreClasses){return qx.ui.core.Widget.getActiveSiblingHelper(null, |
| 8269 |
if(old){imageMgr.hide(old); |
|
|
| 8270 |
} |
| 8271 |
if(value){imageMgr.show(value); |
| 8272 |
}aliasMgr.connect(this._styleBackgroundImage, |
| 8273 |
this, |
7398 |
this, |
| 8274 |
value); |
7399 |
1, |
|
|
7400 |
vIgnoreClasses, |
| 7401 |
"first")||null; |
| 8275 |
}, |
7402 |
}, |
| 8276 |
_styleBackgroundImage:function(value){value?this.setStyleProperty("backgroundImage", |
7403 |
getLastChild:function(){return qx.lang.Array.getLast(this.getChildren())||null; |
| 8277 |
"url("+value+")"):this.removeStyleProperty("backgroundImage"); |
|
|
| 8278 |
}, |
7404 |
}, |
| 8279 |
_applyBackgroundRepeat:function(value, |
7405 |
getLastVisibleChild:function(){return qx.lang.Array.getLast(this.getVisibleChildren())||null; |
| 8280 |
old){value?this.setStyleProperty("backgroundRepeat", |
|
|
| 8281 |
value):this.removeStyleProperty("backgroundRepeat"); |
| 8282 |
}, |
7406 |
}, |
| 8283 |
_applyClip:function(value, |
7407 |
getLastActiveChild:function(vIgnoreClasses){return qx.ui.core.Widget.getActiveSiblingHelper(null, |
| 8284 |
old){return this._compileClipString(); |
7408 |
this, |
|
|
7409 |
-1, |
| 7410 |
vIgnoreClasses, |
| 7411 |
"last")||null; |
| 8285 |
}, |
7412 |
}, |
| 8286 |
_compileClipString:function(){var vLeft=this.getClipLeft(); |
7413 |
forEachChild:function(vFunc){var ch=this.getChildren(), |
| 8287 |
var vTop=this.getClipTop(); |
7414 |
chc, |
| 8288 |
var vWidth=this.getClipWidth(); |
7415 |
i=-1; |
| 8289 |
var vHeight=this.getClipHeight(); |
7416 |
if(!ch){return; |
| 8290 |
var vRight, |
|
|
| 8291 |
vBottom; |
| 8292 |
if(vLeft==null){vRight=(vWidth==null?"auto":vWidth+"px"); |
| 8293 |
vLeft="auto"; |
| 8294 |
}else{vRight=(vWidth==null?"auto":vLeft+vWidth+"px"); |
| 8295 |
vLeft=vLeft+"px"; |
| 8296 |
} |
7417 |
} |
| 8297 |
if(vTop==null){vBottom=(vHeight==null?"auto":vHeight+"px"); |
7418 |
while(chc=ch[++i]){vFunc.call(chc, |
| 8298 |
vTop="auto"; |
7419 |
i); |
| 8299 |
}else{vBottom=(vHeight==null?"auto":vTop+vHeight+"px"); |
7420 |
}}, |
| 8300 |
vTop=vTop+"px"; |
7421 |
forEachVisibleChild:function(vFunc){var ch=this.getVisibleChildren(), |
| 8301 |
}return this.setStyleProperty("clip", |
7422 |
chc, |
| 8302 |
("rect("+vTop+","+vRight+","+vBottom+","+vLeft+")")); |
7423 |
i=-1; |
|
|
7424 |
if(!ch){return; |
| 7425 |
} |
| 7426 |
while(chc=ch[++i]){vFunc.call(chc, |
| 7427 |
i); |
| 7428 |
}}, |
| 7429 |
_beforeAppear:function(){this.base(arguments); |
| 7430 |
this.forEachVisibleChild(function(){if(this.isAppearRelevant()){this._beforeAppear(); |
| 7431 |
}}); |
| 8303 |
}, |
7432 |
}, |
| 8304 |
_applyOverflow:qx.core.Variant.select("qx.client", |
7433 |
_afterAppear:function(){this.base(arguments); |
| 8305 |
{"default":function(value, |
7434 |
this.forEachVisibleChild(function(){if(this.isAppearRelevant()){this._afterAppear(); |
| 8306 |
old){var pv=value; |
7435 |
}}); |
| 8307 |
var pn="overflow"; |
|
|
| 8308 |
switch(value){case "scrollX":pn="overflowX"; |
| 8309 |
pv="scroll"; |
| 8310 |
break; |
| 8311 |
case "scrollY":pn="overflowY"; |
| 8312 |
pv="scroll"; |
| 8313 |
break; |
| 8314 |
}var a=["overflow", |
| 8315 |
"overflowX", |
| 8316 |
"overflowY"]; |
| 8317 |
for(var i=0;i<a.length;i++){if(a[i]!=pn){this.removeStyleProperty(a[i]); |
| 8318 |
}} |
| 8319 |
switch(value){case "scrollX":this.setStyleProperty("overflowY", |
| 8320 |
"hidden"); |
| 8321 |
break; |
| 8322 |
case "scrollY":this.setStyleProperty("overflowX", |
| 8323 |
"hidden"); |
| 8324 |
break; |
| 8325 |
}this._renderOverflow(pn, |
| 8326 |
pv, |
| 8327 |
value, |
| 8328 |
old); |
| 8329 |
this.addToQueue("overflow"); |
| 8330 |
}, |
7436 |
}, |
| 8331 |
"gecko":function(value, |
7437 |
_beforeDisappear:function(){this.base(arguments); |
| 8332 |
old){var pv=value; |
7438 |
this.forEachVisibleChild(function(){if(this.isAppearRelevant()){this._beforeDisappear(); |
| 8333 |
var pn="overflow"; |
7439 |
}}); |
| 8334 |
switch(pv){case "hidden":pv="-moz-scrollbars-none"; |
|
|
| 8335 |
break; |
| 8336 |
case "scrollX":pv="-moz-scrollbars-horizontal"; |
| 8337 |
break; |
| 8338 |
case "scrollY":pv="-moz-scrollbars-vertical"; |
| 8339 |
break; |
| 8340 |
}this._renderOverflow(pn, |
| 8341 |
pv, |
| 8342 |
value, |
| 8343 |
old); |
| 8344 |
this.addToQueue("overflow"); |
| 8345 |
}, |
7440 |
}, |
| 8346 |
"opera":function(value, |
7441 |
_afterDisappear:function(){this.base(arguments); |
| 8347 |
old){var pv=value; |
7442 |
this.forEachVisibleChild(function(){if(this.isAppearRelevant()){this._afterDisappear(); |
| 8348 |
var pn="overflow"; |
7443 |
}}); |
| 8349 |
switch(pv){case "scrollX":case "scrollY":pv="scroll"; |
|
|
| 8350 |
break; |
| 8351 |
}this._renderOverflow(pn, |
| 8352 |
pv, |
| 8353 |
value, |
| 8354 |
old); |
| 8355 |
this.addToQueue("overflow"); |
| 8356 |
}}), |
| 8357 |
_renderOverflow:function(pn, |
| 8358 |
pv, |
| 8359 |
value, |
| 8360 |
old){this.setStyleProperty(pn, |
| 8361 |
pv||""); |
| 8362 |
this._invalidateFrameWidth(); |
| 8363 |
this._invalidateFrameHeight(); |
| 8364 |
}, |
7444 |
}, |
| 8365 |
getOverflowX:function(){var vOverflow=this.getOverflow(); |
7445 |
_beforeInsertDom:function(){this.base(arguments); |
| 8366 |
return vOverflow=="scrollY"?"hidden":vOverflow; |
7446 |
this.forEachVisibleChild(function(){if(this.isAppearRelevant()){this._beforeInsertDom(); |
|
|
7447 |
}}); |
| 8367 |
}, |
7448 |
}, |
| 8368 |
getOverflowY:function(){var vOverflow=this.getOverflow(); |
7449 |
_afterInsertDom:function(){this.base(arguments); |
| 8369 |
return vOverflow=="scrollX"?"hidden":vOverflow; |
7450 |
this.forEachVisibleChild(function(){if(this.isAppearRelevant()){this._afterInsertDom(); |
|
|
7451 |
}}); |
| 8370 |
}, |
7452 |
}, |
| 8371 |
_applyBackgroundColor:function(value, |
7453 |
_beforeRemoveDom:function(){this.base(arguments); |
| 8372 |
old){qx.theme.manager.Color.getInstance().connect(this._styleBackgroundColor, |
7454 |
this.forEachVisibleChild(function(){if(this.isAppearRelevant()){this._beforeRemoveDom(); |
| 8373 |
this, |
7455 |
}}); |
| 8374 |
value); |
|
|
| 8375 |
}, |
7456 |
}, |
| 8376 |
_styleBackgroundColor:function(value){value?this.setStyleProperty("backgroundColor", |
7457 |
_afterRemoveDom:function(){this.base(arguments); |
| 8377 |
value):this.removeStyleProperty("backgroundColor"); |
7458 |
this.forEachVisibleChild(function(){if(this.isAppearRelevant()){this._afterRemoveDom(); |
|
|
7459 |
}}); |
| 8378 |
}, |
7460 |
}, |
| 8379 |
_applyTextColor:function(value, |
7461 |
_handleDisplayableCustom:function(vDisplayable, |
| 8380 |
old){}, |
7462 |
vParent, |
| 8381 |
_applyFont:function(value, |
7463 |
vHint){this.forEachChild(function(){this._handleDisplayable(); |
| 8382 |
old){}, |
7464 |
}); |
| 8383 |
_cachedBorderTop:0, |
|
|
| 8384 |
_cachedBorderRight:0, |
| 8385 |
_cachedBorderBottom:0, |
| 8386 |
_cachedBorderLeft:0, |
| 8387 |
_applyBorder:function(value, |
| 8388 |
old){qx.theme.manager.Border.getInstance().connect(this._queueBorder, |
| 8389 |
this, |
| 8390 |
value); |
| 8391 |
}, |
7465 |
}, |
| 8392 |
__borderJobs:{top:"borderTop", |
7466 |
_addChildrenToStateQueue:function(){this.forEachVisibleChild(function(){this.addToStateQueue(); |
| 8393 |
right:"borderRight", |
7467 |
}); |
| 8394 |
bottom:"borderBottom", |
|
|
| 8395 |
left:"borderLeft"}, |
| 8396 |
_queueBorder:function(value, |
| 8397 |
edge){if(!edge){var jobs=this.__borderJobs; |
| 8398 |
for(var entry in jobs){this.addToQueue(jobs[entry]); |
| 8399 |
}this.__reflowBorderX(value); |
| 8400 |
this.__reflowBorderY(value); |
| 8401 |
}else{if(edge==="left"||edge==="right"){this.__reflowBorderX(value); |
| 8402 |
}else{this.__reflowBorderY(value); |
| 8403 |
}this.addToQueue(this.__borderJobs[edge]); |
| 8404 |
}this.__borderObject=value; |
| 8405 |
}, |
7468 |
}, |
| 8406 |
__reflowBorderX:function(value){var oldLeftWidth=this._cachedBorderLeft; |
7469 |
recursiveAddToStateQueue:function(){this.addToStateQueue(); |
| 8407 |
var oldRightWidth=this._cachedBorderRight; |
7470 |
this.forEachVisibleChild(function(){this.recursiveAddToStateQueue(); |
| 8408 |
this._cachedBorderLeft=value?value.getWidthLeft():0; |
7471 |
}); |
| 8409 |
this._cachedBorderRight=value?value.getWidthRight():0; |
7472 |
}, |
| 8410 |
if((oldLeftWidth+oldRightWidth)!=(this._cachedBorderLeft+this._cachedBorderRight)){this._invalidateFrameWidth(); |
7473 |
_recursiveAppearanceThemeUpdate:function(vNewAppearanceTheme, |
| 8411 |
}}, |
7474 |
vOldAppearanceTheme){this.base(arguments, |
| 8412 |
__reflowBorderY:function(value){var oldTopWidth=this._cachedBorderTop; |
7475 |
vNewAppearanceTheme, |
| 8413 |
var oldBottomWidth=this._cachedBorderBottom; |
7476 |
vOldAppearanceTheme); |
| 8414 |
this._cachedBorderTop=value?value.getWidthTop():0; |
7477 |
this.forEachVisibleChild(function(){this._recursiveAppearanceThemeUpdate(vNewAppearanceTheme, |
| 8415 |
this._cachedBorderBottom=value?value.getWidthBottom():0; |
7478 |
vOldAppearanceTheme); |
| 8416 |
if((oldTopWidth+oldBottomWidth)!=(this._cachedBorderTop+this._cachedBorderBottom)){this._invalidateFrameHeight(); |
7479 |
}); |
| 8417 |
}}, |
7480 |
}, |
| 8418 |
renderBorder:function(changes){var value=this.__borderObject; |
7481 |
_addChildToChildrenQueue:function(vChild){if(!vChild._isInParentChildrenQueue&&!vChild._isDisplayable){this.warn("Ignoring invisible child: "+vChild); |
| 8419 |
if(value){if(changes.borderTop){value.renderTop(this); |
|
|
| 8420 |
} |
| 8421 |
if(changes.borderRight){value.renderRight(this); |
| 8422 |
} |
| 8423 |
if(changes.borderBottom){value.renderBottom(this); |
| 8424 |
} |
| 8425 |
if(changes.borderLeft){value.renderLeft(this); |
| 8426 |
}}else{var border=qx.ui.core.Border; |
| 8427 |
if(changes.borderTop){border.resetTop(this); |
| 8428 |
} |
| 8429 |
if(changes.borderRight){border.resetRight(this); |
| 8430 |
} |
| 8431 |
if(changes.borderBottom){border.resetBottom(this); |
| 8432 |
} |
7482 |
} |
| 8433 |
if(changes.borderLeft){border.resetLeft(this); |
7483 |
if(!vChild._isInParentChildrenQueue&&vChild._isDisplayable){qx.ui.core.Widget.addToGlobalLayoutQueue(this); |
|
|
7484 |
if(!this._childrenQueue){this._childrenQueue={}; |
| 7485 |
}this._childrenQueue[vChild.toHashCode()]=vChild; |
| 7486 |
}}, |
| 7487 |
_removeChildFromChildrenQueue:function(vChild){if(this._childrenQueue&&vChild._isInParentChildrenQueue){delete this._childrenQueue[vChild.toHashCode()]; |
| 7488 |
if(qx.lang.Object.isEmpty(this._childrenQueue)){qx.ui.core.Widget.removeFromGlobalLayoutQueue(this); |
| 8434 |
}}}, |
7489 |
}}}, |
| 8435 |
prepareEnhancedBorder:qx.core.Variant.select("qx.client", |
7490 |
_flushChildrenQueue:function(){if(!qx.lang.Object.isEmpty(this._childrenQueue)){this.getLayoutImpl().flushChildrenQueue(this._childrenQueue); |
| 8436 |
{"gecko":qx.lang.Function.returnTrue, |
7491 |
delete this._childrenQueue; |
| 8437 |
"default":function(){var elem=this.getElement(); |
7492 |
}}, |
| 8438 |
var cl=this._borderElement=document.createElement("div"); |
7493 |
_addChildrenToLayoutQueue:function(p){this.forEachChild(function(){this.addToLayoutChanges(p); |
| 8439 |
var es=elem.style; |
7494 |
}); |
| 8440 |
var cs=this._innerStyle=cl.style; |
|
|
| 8441 |
if(qx.core.Variant.isSet("qx.client", |
| 8442 |
"mshtml")){}else{cs.width=cs.height="100%"; |
| 8443 |
}cs.position="absolute"; |
| 8444 |
for(var i in this._styleProperties){switch(i){case "zIndex":case "filter":case "display":break; |
| 8445 |
default:cs[i]=es[i]; |
| 8446 |
es[i]=""; |
| 8447 |
}} |
| 8448 |
for(var i in this._htmlProperties){switch(i){case "unselectable":cl.unselectable=this._htmlProperties[i]; |
| 8449 |
}}while(elem.firstChild){cl.appendChild(elem.firstChild); |
| 8450 |
}elem.appendChild(cl); |
| 8451 |
}}), |
| 8452 |
_applyPaddingTop:function(value, |
| 8453 |
old){this.addToQueue("paddingTop"); |
| 8454 |
this._invalidateFrameHeight(); |
| 8455 |
}, |
| 8456 |
_applyPaddingRight:function(value, |
| 8457 |
old){this.addToQueue("paddingRight"); |
| 8458 |
this._invalidateFrameWidth(); |
| 8459 |
}, |
7495 |
}, |
| 8460 |
_applyPaddingBottom:function(value, |
7496 |
_layoutChild:function(vChild){if(!vChild._isDisplayable){return ; |
| 8461 |
old){this.addToQueue("paddingBottom"); |
7497 |
}var vChanges=vChild._layoutChanges; |
| 8462 |
this._invalidateFrameHeight(); |
7498 |
try{if(vChild.renderBorder){if(vChanges.borderTop||vChanges.borderRight||vChanges.borderBottom||vChanges.borderLeft){vChild.renderBorder(vChanges); |
|
|
7499 |
}}}catch(ex){this.error("Could not apply border to child "+vChild, |
| 7500 |
ex); |
| 7501 |
} |
| 7502 |
try{if(vChild.renderPadding){if(vChanges.paddingLeft||vChanges.paddingRight||vChanges.paddingTop||vChanges.paddingBottom){vChild.renderPadding(vChanges); |
| 7503 |
}}}catch(ex){this.error("Could not apply padding to child "+vChild, |
| 7504 |
ex); |
| 7505 |
}try{this.getLayoutImpl().layoutChild(vChild, |
| 7506 |
vChanges); |
| 7507 |
}catch(ex){this.error("Could not layout child "+vChild+" through layout handler", |
| 7508 |
ex); |
| 7509 |
}try{vChild._layoutPost(vChanges); |
| 7510 |
}catch(ex){this.error("Could not post layout child "+vChild, |
| 7511 |
ex); |
| 7512 |
}try{if(vChanges.initial){vChild._initialLayoutDone=true; |
| 7513 |
qx.ui.core.Widget.addToGlobalDisplayQueue(vChild); |
| 7514 |
}}catch(ex){this.error("Could not handle display updates from layout flush for child "+vChild, |
| 7515 |
ex); |
| 7516 |
}vChild._layoutChanges={}; |
| 7517 |
delete vChild._isInParentLayoutQueue; |
| 7518 |
delete this._childrenQueue[vChild.toHashCode()]; |
| 8463 |
}, |
7519 |
}, |
| 8464 |
_applyPaddingLeft:function(value, |
7520 |
_layoutPost:qx.lang.Function.returnTrue, |
| 8465 |
old){this.addToQueue("paddingLeft"); |
7521 |
_computePreferredInnerWidth:function(){return this.getLayoutImpl().computeChildrenNeededWidth(); |
| 8466 |
this._invalidateFrameWidth(); |
|
|
| 8467 |
}, |
7522 |
}, |
| 8468 |
renderPadding:function(changes){}, |
7523 |
_computePreferredInnerHeight:function(){return this.getLayoutImpl().computeChildrenNeededHeight(); |
| 8469 |
_applyMarginLeft:function(value, |
|
|
| 8470 |
old){this.addToQueue("marginLeft"); |
| 8471 |
}, |
7524 |
}, |
| 8472 |
_applyMarginRight:function(value, |
7525 |
_changeInnerWidth:function(vNew, |
| 8473 |
old){this.addToQueue("marginRight"); |
7526 |
vOld){var vLayout=this.getLayoutImpl(); |
|
|
7527 |
if(vLayout.invalidateChildrenFlexWidth){vLayout.invalidateChildrenFlexWidth(); |
| 7528 |
}this.forEachVisibleChild(function(){if(vLayout.updateChildOnInnerWidthChange(this)&&this._recomputeBoxWidth()){this._recomputeOuterWidth(); |
| 7529 |
this._recomputeInnerWidth(); |
| 7530 |
}}); |
| 8474 |
}, |
7531 |
}, |
| 8475 |
_applyMarginTop:function(value, |
7532 |
_changeInnerHeight:function(vNew, |
| 8476 |
old){this.addToQueue("marginTop"); |
7533 |
vOld){var vLayout=this.getLayoutImpl(); |
|
|
7534 |
if(vLayout.invalidateChildrenFlexHeight){vLayout.invalidateChildrenFlexHeight(); |
| 7535 |
}this.forEachVisibleChild(function(){if(vLayout.updateChildOnInnerHeightChange(this)&&this._recomputeBoxHeight()){this._recomputeOuterHeight(); |
| 7536 |
this._recomputeInnerHeight(); |
| 7537 |
}}); |
| 8477 |
}, |
7538 |
}, |
| 8478 |
_applyMarginBottom:function(value, |
7539 |
getInnerWidthForChild:function(vChild){return this.getInnerWidth(); |
| 8479 |
old){this.addToQueue("marginBottom"); |
|
|
| 8480 |
}, |
7540 |
}, |
| 8481 |
execute:function(){var cmd=this.getCommand(); |
7541 |
getInnerHeightForChild:function(vChild){return this.getInnerHeight(); |
| 8482 |
if(cmd){cmd.execute(this); |
|
|
| 8483 |
}this.createDispatchEvent("execute"); |
| 8484 |
}, |
7542 |
}, |
| 8485 |
_visualPropertyCheck:function(){if(!this.isCreated()){throw new Error(this.classname+": Element must be created previously!"); |
7543 |
_remappingChildTable:["add", |
|
|
7544 |
"remove", |
| 7545 |
"addAt", |
| 7546 |
"addAtBegin", |
| 7547 |
"addAtEnd", |
| 7548 |
"removeAt", |
| 7549 |
"addBefore", |
| 7550 |
"addAfter", |
| 7551 |
"removeAll"], |
| 7552 |
_remapStart:"return this._remappingChildTarget.", |
| 7553 |
_remapStop:".apply(this._remappingChildTarget, arguments)", |
| 7554 |
remapChildrenHandlingTo:function(vTarget){var t=this._remappingChildTable; |
| 7555 |
this._remappingChildTarget=vTarget; |
| 7556 |
for(var i=0, |
| 7557 |
l=t.length, |
| 7558 |
s;i<l;i++){s=t[i]; |
| 7559 |
this[s]=new Function(qx.ui.core.Parent.prototype._remapStart+s+qx.ui.core.Parent.prototype._remapStop); |
| 7560 |
}}}, |
| 7561 |
defer:function(statics, |
| 7562 |
members, |
| 7563 |
properties){if(qx.core.Variant.isSet("qx.client", |
| 7564 |
"opera")){members._layoutChildOrig=members._layoutChild; |
| 7565 |
members._layoutChild=function(vChild){if(!vChild._initialLayoutDone||!vChild._layoutChanges.border){return this._layoutChildOrig(vChild); |
| 7566 |
}var vStyle=vChild.getElement().style; |
| 7567 |
var vOldDisplay=vStyle.display; |
| 7568 |
vStyle.display="none"; |
| 7569 |
var vRet=this._layoutChildOrig(vChild); |
| 7570 |
vStyle.display=vOldDisplay; |
| 7571 |
return vRet; |
| 7572 |
}; |
| 8486 |
}}, |
7573 |
}}, |
| 8487 |
setScrollLeft:function(nScrollLeft){this._visualPropertyCheck(); |
7574 |
destruct:function(){this._disposeObjectDeep("_children", |
| 8488 |
this._getTargetNode().scrollLeft=nScrollLeft; |
7575 |
1); |
|
|
7576 |
this._disposeObjects("_layoutImpl", |
| 7577 |
"_focusHandler"); |
| 7578 |
this._disposeFields("_childrenQueue", |
| 7579 |
"_childrenQueue", |
| 7580 |
"_remappingChildTable", |
| 7581 |
"_remappingChildTarget", |
| 7582 |
"_cachedVisibleChildren"); |
| 7583 |
}}); |
| 7584 |
|
| 7585 |
|
| 7586 |
|
| 7587 |
|
| 7588 |
/* ID: qx.event.type.FocusEvent */ |
| 7589 |
qx.Class.define("qx.event.type.FocusEvent", |
| 7590 |
{extend:qx.event.type.Event, |
| 7591 |
construct:function(type, |
| 7592 |
target){this.base(arguments, |
| 7593 |
type); |
| 7594 |
this.setTarget(target); |
| 7595 |
switch(type){case "focusin":case "focusout":this.setBubbles(true); |
| 7596 |
this.setPropagationStopped(false); |
| 7597 |
}}}); |
| 7598 |
|
| 7599 |
|
| 7600 |
|
| 7601 |
|
| 7602 |
/* ID: qx.event.handler.EventHandler */ |
| 7603 |
qx.Class.define("qx.event.handler.EventHandler", |
| 7604 |
{type:"singleton", |
| 7605 |
extend:qx.core.Target, |
| 7606 |
construct:function(){this.base(arguments); |
| 7607 |
this.__onmouseevent=qx.lang.Function.bind(this._onmouseevent, |
| 7608 |
this); |
| 7609 |
this.__ondragevent=qx.lang.Function.bind(this._ondragevent, |
| 7610 |
this); |
| 7611 |
this.__onselectevent=qx.lang.Function.bind(this._onselectevent, |
| 7612 |
this); |
| 7613 |
this.__onwindowblur=qx.lang.Function.bind(this._onwindowblur, |
| 7614 |
this); |
| 7615 |
this.__onwindowfocus=qx.lang.Function.bind(this._onwindowfocus, |
| 7616 |
this); |
| 7617 |
this.__onwindowresize=qx.lang.Function.bind(this._onwindowresize, |
| 7618 |
this); |
| 7619 |
this._commands={}; |
| 8489 |
}, |
7620 |
}, |
| 8490 |
setScrollTop:function(nScrollTop){this._visualPropertyCheck(); |
7621 |
events:{"error":"qx.event.type.DataEvent"}, |
| 8491 |
this._getTargetNode().scrollTop=nScrollTop; |
7622 |
statics:{mouseEventTypes:["mouseover", |
|
|
7623 |
"mousemove", |
| 7624 |
"mouseout", |
| 7625 |
"mousedown", |
| 7626 |
"mouseup", |
| 7627 |
"click", |
| 7628 |
"dblclick", |
| 7629 |
"contextmenu", |
| 7630 |
qx.core.Variant.isSet("qx.client", |
| 7631 |
"gecko")?"DOMMouseScroll":"mousewheel"], |
| 7632 |
keyEventTypes:["keydown", |
| 7633 |
"keypress", |
| 7634 |
"keyup"], |
| 7635 |
dragEventTypes:qx.core.Variant.select("qx.client", |
| 7636 |
{"gecko":["dragdrop", |
| 7637 |
"dragover", |
| 7638 |
"dragenter", |
| 7639 |
"dragexit", |
| 7640 |
"draggesture"], |
| 7641 |
"mshtml":["dragend", |
| 7642 |
"dragover", |
| 7643 |
"dragstart", |
| 7644 |
"drag", |
| 7645 |
"dragenter", |
| 7646 |
"dragleave"], |
| 7647 |
"default":["dragstart", |
| 7648 |
"dragdrop", |
| 7649 |
"dragover", |
| 7650 |
"drag", |
| 7651 |
"dragleave", |
| 7652 |
"dragenter", |
| 7653 |
"dragexit", |
| 7654 |
"draggesture"]}), |
| 7655 |
getDomTarget:qx.core.Variant.select("qx.client", |
| 7656 |
{"mshtml":function(vDomEvent){return vDomEvent.target||vDomEvent.srcElement; |
| 8492 |
}, |
7657 |
}, |
| 8493 |
getOffsetLeft:function(){this._visualPropertyCheck(); |
7658 |
"webkit":function(vDomEvent){var vNode=vDomEvent.target||vDomEvent.srcElement; |
| 8494 |
return qx.html.Offset.getLeft(this.getElement()); |
7659 |
if(vNode&&(vNode.nodeType==qx.dom.Node.TEXT)){vNode=vNode.parentNode; |
|
|
7660 |
}return vNode; |
| 8495 |
}, |
7661 |
}, |
| 8496 |
getOffsetTop:function(){this._visualPropertyCheck(); |
7662 |
"default":function(vDomEvent){return vDomEvent.target; |
| 8497 |
return qx.html.Offset.getTop(this.getElement()); |
7663 |
}}), |
|
|
7664 |
stopDomEvent:function(vDomEvent){if(vDomEvent.preventDefault){vDomEvent.preventDefault(); |
| 7665 |
}vDomEvent.returnValue=false; |
| 8498 |
}, |
7666 |
}, |
| 8499 |
getScrollLeft:function(){this._visualPropertyCheck(); |
7667 |
getOriginalTargetObject:function(vNode){if(vNode==document.documentElement){vNode=document.body; |
| 8500 |
return this._getTargetNode().scrollLeft; |
7668 |
}while(vNode!=null&&vNode.qx_Widget==null){try{vNode=vNode.parentNode; |
|
|
7669 |
}catch(vDomEvent){vNode=null; |
| 7670 |
}}return vNode?vNode.qx_Widget:null; |
| 8501 |
}, |
7671 |
}, |
| 8502 |
getScrollTop:function(){this._visualPropertyCheck(); |
7672 |
getOriginalTargetObjectFromEvent:function(vDomEvent, |
| 8503 |
return this._getTargetNode().scrollTop; |
7673 |
vWindow){var vNode=qx.event.handler.EventHandler.getDomTarget(vDomEvent); |
|
|
7674 |
if(vWindow){var vDocument=vWindow.document; |
| 7675 |
if(vNode==vWindow||vNode==vDocument||vNode==vDocument.documentElement||vNode==vDocument.body){return vDocument.body.qx_Widget; |
| 7676 |
}}return qx.event.handler.EventHandler.getOriginalTargetObject(vNode); |
| 8504 |
}, |
7677 |
}, |
| 8505 |
getClientWidth:function(){this._visualPropertyCheck(); |
7678 |
getRelatedOriginalTargetObjectFromEvent:function(vDomEvent){return qx.event.handler.EventHandler.getOriginalTargetObject(vDomEvent.relatedTarget||(vDomEvent.type=="mouseover"?vDomEvent.fromElement:vDomEvent.toElement)); |
| 8506 |
return this._getTargetNode().clientWidth; |
|
|
| 8507 |
}, |
7679 |
}, |
| 8508 |
getClientHeight:function(){this._visualPropertyCheck(); |
7680 |
getTargetObject:function(vNode, |
| 8509 |
return this._getTargetNode().clientHeight; |
7681 |
vObject, |
|
|
7682 |
allowDisabled){if(!vObject){var vObject=qx.event.handler.EventHandler.getOriginalTargetObject(vNode); |
| 7683 |
if(!vObject){return null; |
| 7684 |
}}while(vObject){if(!allowDisabled&&!vObject.getEnabled()){return null; |
| 7685 |
}if(!vObject.getAnonymous()){break; |
| 7686 |
}vObject=vObject.getParent(); |
| 7687 |
}return vObject; |
| 8510 |
}, |
7688 |
}, |
| 8511 |
getOffsetWidth:function(){this._visualPropertyCheck(); |
7689 |
getTargetObjectFromEvent:function(vDomEvent){return qx.event.handler.EventHandler.getTargetObject(qx.event.handler.EventHandler.getDomTarget(vDomEvent)); |
| 8512 |
return this.getElement().offsetWidth; |
|
|
| 8513 |
}, |
7690 |
}, |
| 8514 |
getOffsetHeight:function(){this._visualPropertyCheck(); |
7691 |
getRelatedTargetObjectFromEvent:function(vDomEvent){var target=vDomEvent.relatedTarget; |
| 8515 |
return this.getElement().offsetHeight; |
7692 |
if(!target){if(vDomEvent.type=="mouseover"){target=vDomEvent.fromElement; |
|
|
7693 |
}else{target=vDomEvent.toElement; |
| 7694 |
}}return qx.event.handler.EventHandler.getTargetObject(target); |
| 7695 |
}}, |
| 7696 |
properties:{allowClientContextMenu:{check:"Boolean", |
| 7697 |
init:false}, |
| 7698 |
allowClientSelectAll:{check:"Boolean", |
| 7699 |
init:false}, |
| 7700 |
captureWidget:{check:"qx.ui.core.Widget", |
| 7701 |
nullable:true, |
| 7702 |
apply:"_applyCaptureWidget"}, |
| 7703 |
focusRoot:{check:"qx.ui.core.Parent", |
| 7704 |
nullable:true, |
| 7705 |
apply:"_applyFocusRoot"}}, |
| 7706 |
members:{_lastMouseEventType:null, |
| 7707 |
_lastMouseDown:false, |
| 7708 |
_lastMouseEventDate:0, |
| 7709 |
_applyCaptureWidget:function(value, |
| 7710 |
old){if(old){old.setCapture(false); |
| 7711 |
} |
| 7712 |
if(value){value.setCapture(true); |
| 7713 |
}}, |
| 7714 |
_applyFocusRoot:function(value, |
| 7715 |
old){if(old){old.setFocusedChild(null); |
| 7716 |
} |
| 7717 |
if(value&&value.getFocusedChild()==null){value.setFocusedChild(value); |
| 7718 |
}}, |
| 7719 |
addCommand:function(vCommand){this._commands[vCommand.toHashCode()]=vCommand; |
| 8516 |
}, |
7720 |
}, |
| 8517 |
getScrollWidth:function(){this._visualPropertyCheck(); |
7721 |
removeCommand:function(vCommand){delete this._commands[vCommand.toHashCode()]; |
| 8518 |
return this._getTargetNode().scrollWidth; |
7722 |
}, |
|
|
7723 |
_checkKeyEventMatch:function(e){var vCommand; |
| 7724 |
for(var vHash in this._commands){vCommand=this._commands[vHash]; |
| 7725 |
if(vCommand.getEnabled()&&vCommand.matchesKeyEvent(e)){if(!vCommand.execute(e.getTarget())){e.preventDefault(); |
| 7726 |
}break; |
| 7727 |
}}}, |
| 7728 |
attachEvents:function(){this.attachEventTypes(qx.event.handler.EventHandler.mouseEventTypes, |
| 7729 |
this.__onmouseevent); |
| 7730 |
this.attachEventTypes(qx.event.handler.EventHandler.dragEventTypes, |
| 7731 |
this.__ondragevent); |
| 7732 |
qx.event.handler.KeyEventHandler.getInstance()._attachEvents(); |
| 7733 |
qx.html.EventRegistration.addEventListener(window, |
| 7734 |
"blur", |
| 7735 |
this.__onwindowblur); |
| 7736 |
qx.html.EventRegistration.addEventListener(window, |
| 7737 |
"focus", |
| 7738 |
this.__onwindowfocus); |
| 7739 |
qx.html.EventRegistration.addEventListener(window, |
| 7740 |
"resize", |
| 7741 |
this.__onwindowresize); |
| 7742 |
document.body.onselect=document.onselectstart=document.onselectionchange=this.__onselectevent; |
| 8519 |
}, |
7743 |
}, |
| 8520 |
getScrollHeight:function(){this._visualPropertyCheck(); |
7744 |
detachEvents:function(){this.detachEventTypes(qx.event.handler.EventHandler.mouseEventTypes, |
| 8521 |
return this._getTargetNode().scrollHeight; |
7745 |
this.__onmouseevent); |
|
|
7746 |
this.detachEventTypes(qx.event.handler.EventHandler.dragEventTypes, |
| 7747 |
this.__ondragevent); |
| 7748 |
qx.event.handler.KeyEventHandler.getInstance()._detachEvents(); |
| 7749 |
qx.html.EventRegistration.removeEventListener(window, |
| 7750 |
"blur", |
| 7751 |
this.__onwindowblur); |
| 7752 |
qx.html.EventRegistration.removeEventListener(window, |
| 7753 |
"focus", |
| 7754 |
this.__onwindowfocus); |
| 7755 |
qx.html.EventRegistration.removeEventListener(window, |
| 7756 |
"resize", |
| 7757 |
this.__onwindowresize); |
| 7758 |
document.body.onselect=document.onselectstart=document.onselectionchange=null; |
| 8522 |
}, |
7759 |
}, |
| 8523 |
scrollIntoView:function(alignTopLeft){this.scrollIntoViewX(alignTopLeft); |
7760 |
attachEventTypes:function(vEventTypes, |
| 8524 |
this.scrollIntoViewY(alignTopLeft); |
7761 |
vFunctionPointer){try{var el=qx.core.Variant.isSet("qx.client", |
|
|
7762 |
"gecko")?window:document.body; |
| 7763 |
for(var i=0, |
| 7764 |
l=vEventTypes.length;i<l;i++){qx.html.EventRegistration.addEventListener(el, |
| 7765 |
vEventTypes[i], |
| 7766 |
vFunctionPointer); |
| 7767 |
}}catch(ex){throw new Error("qx.event.handler.EventHandler: Failed to attach window event types: "+vEventTypes+": "+ex); |
| 7768 |
}}, |
| 7769 |
detachEventTypes:function(vEventTypes, |
| 7770 |
vFunctionPointer){try{var el=qx.core.Variant.isSet("qx.client", |
| 7771 |
"gecko")?window:document.body; |
| 7772 |
for(var i=0, |
| 7773 |
l=vEventTypes.length;i<l;i++){qx.html.EventRegistration.removeEventListener(el, |
| 7774 |
vEventTypes[i], |
| 7775 |
vFunctionPointer); |
| 7776 |
}}catch(ex){throw new Error("qx.event.handler.EventHandler: Failed to detach window event types: "+vEventTypes+": "+ex); |
| 7777 |
}}, |
| 7778 |
_onkeyevent_post:function(vDomEvent, |
| 7779 |
vType, |
| 7780 |
vKeyCode, |
| 7781 |
vCharCode, |
| 7782 |
vKeyIdentifier){var vDomTarget=qx.event.handler.EventHandler.getDomTarget(vDomEvent); |
| 7783 |
var vFocusRoot=this.getFocusRoot(); |
| 7784 |
var vTarget=this.getCaptureWidget()||(vFocusRoot==null?null:vFocusRoot.getActiveChild()); |
| 7785 |
var vKeyEventObject=new qx.event.type.KeyEvent(vType, |
| 7786 |
vDomEvent, |
| 7787 |
vDomTarget, |
| 7788 |
vTarget, |
| 7789 |
null, |
| 7790 |
vKeyCode, |
| 7791 |
vCharCode, |
| 7792 |
vKeyIdentifier); |
| 7793 |
if(vType=="keydown"){this._checkKeyEventMatch(vKeyEventObject); |
| 7794 |
} |
| 7795 |
if(vTarget!=null&&vTarget.getEnabled()){switch(vKeyIdentifier){case "Escape":case "Tab":if(qx.Class.isDefined("qx.ui.menu.Manager")){qx.ui.menu.Manager.getInstance().update(vTarget, |
| 7796 |
vType); |
| 7797 |
}break; |
| 7798 |
}if(!this.getAllowClientSelectAll()){if(vDomEvent.ctrlKey&&vKeyIdentifier=="A"){switch(vDomTarget.tagName.toLowerCase()){case "input":case "textarea":case "iframe":break; |
| 7799 |
default:qx.event.handler.EventHandler.stopDomEvent(vDomEvent); |
| 7800 |
}}}vTarget.dispatchEvent(vKeyEventObject); |
| 7801 |
if(qx.Class.isDefined("qx.event.handler.DragAndDropHandler")){qx.event.handler.DragAndDropHandler.getInstance().handleKeyEvent(vKeyEventObject); |
| 7802 |
}}vKeyEventObject.dispose(); |
| 8525 |
}, |
7803 |
}, |
| 8526 |
scrollIntoViewX:function(alignLeft){if(!this._isCreated||!this._isDisplayable){this.warn("The function scrollIntoViewX can only be called after the widget is created!"); |
7804 |
_onmouseevent:qx.core.Variant.select("qx.client", |
| 8527 |
return false; |
7805 |
{"mshtml":function(vDomEvent){if(!vDomEvent){vDomEvent=window.event; |
| 8528 |
}return qx.html.ScrollIntoView.scrollX(this.getElement(), |
7806 |
}var vDomTarget=qx.event.handler.EventHandler.getDomTarget(vDomEvent); |
| 8529 |
alignLeft); |
7807 |
var vType=vDomEvent.type; |
|
|
7808 |
if(vType=="mousemove"){if(this._mouseIsDown&&vDomEvent.button==0){this._onmouseevent_post(vDomEvent, |
| 7809 |
"mouseup"); |
| 7810 |
this._mouseIsDown=false; |
| 7811 |
}}else{if(vType=="mousedown"){this._mouseIsDown=true; |
| 7812 |
}else if(vType=="mouseup"){this._mouseIsDown=false; |
| 7813 |
}if(vType=="mouseup"&&!this._lastMouseDown&&((new Date).valueOf()-this._lastMouseEventDate)<250){this._onmouseevent_post(vDomEvent, |
| 7814 |
"mousedown"); |
| 7815 |
}else if(vType=="dblclick"&&this._lastMouseEventType=="mouseup"&&((new Date).valueOf()-this._lastMouseEventDate)<250){this._onmouseevent_post(vDomEvent, |
| 7816 |
"click"); |
| 7817 |
} |
| 7818 |
switch(vType){case "mousedown":case "mouseup":case "click":case "dblclick":case "contextmenu":this._lastMouseEventType=vType; |
| 7819 |
this._lastMouseEventDate=(new Date).valueOf(); |
| 7820 |
this._lastMouseDown=vType=="mousedown"; |
| 7821 |
}}this._onmouseevent_post(vDomEvent, |
| 7822 |
vType, |
| 7823 |
vDomTarget); |
| 8530 |
}, |
7824 |
}, |
| 8531 |
scrollIntoViewY:function(alignTop){if(!this._isCreated||!this._isDisplayable){this.warn("The function scrollIntoViewY can only be called after the widget is created!"); |
7825 |
"default":function(vDomEvent){var vDomTarget=qx.event.handler.EventHandler.getDomTarget(vDomEvent); |
| 8532 |
return false; |
7826 |
var vType=vDomEvent.type; |
| 8533 |
}return qx.html.ScrollIntoView.scrollY(this.getElement(), |
7827 |
switch(vType){case "DOMMouseScroll":vType="mousewheel"; |
| 8534 |
alignTop); |
7828 |
break; |
|
|
7829 |
case "click":case "dblclick":if(vDomEvent.which!==1){return; |
| 7830 |
}}this._onmouseevent_post(vDomEvent, |
| 7831 |
vType, |
| 7832 |
vDomTarget); |
| 7833 |
}}), |
| 7834 |
_onmouseevent_click_fix:qx.core.Variant.select("qx.client", |
| 7835 |
{"gecko":function(vDomTarget, |
| 7836 |
vType, |
| 7837 |
vDispatchTarget){var vReturn=false; |
| 7838 |
switch(vType){case "mousedown":this._lastMouseDownDomTarget=vDomTarget; |
| 7839 |
this._lastMouseDownDispatchTarget=vDispatchTarget; |
| 7840 |
break; |
| 7841 |
case "mouseup":if(this._lastMouseDownDispatchTarget===vDispatchTarget&&vDomTarget!==this._lastMouseDownDomTarget){vReturn=true; |
| 7842 |
}else{this._lastMouseDownDomTarget=null; |
| 7843 |
this._lastMouseDownDispatchTarget=null; |
| 7844 |
}}return vReturn; |
| 8535 |
}, |
7845 |
}, |
| 8536 |
supportsDrop:function(dragCache){var supportsDropMethod=this.getSupportsDropMethod(); |
7846 |
"default":null}), |
| 8537 |
if(supportsDropMethod!==null){return supportsDropMethod.call(this, |
7847 |
_onmouseevent_post:function(vDomEvent, |
| 8538 |
dragCache); |
7848 |
vType, |
| 8539 |
}return (this!=dragCache.sourceWidget); |
7849 |
vDomTarget){var vEventObject, |
| 8540 |
}}, |
7850 |
vCaptureTarget, |
| 8541 |
settings:{"qx.widgetQueueDebugging":false, |
7851 |
vDispatchTarget, |
| 8542 |
"qx.widgetDebugId":false}, |
7852 |
vTarget, |
| 8543 |
defer:function(statics, |
7853 |
vOriginalTarget, |
| 8544 |
members){statics.__initApplyMethods(members); |
7854 |
vRelatedTarget, |
|
|
7855 |
vFixClick, |
| 7856 |
vTargetIsEnabled; |
| 7857 |
vCaptureTarget=this.getCaptureWidget(); |
| 7858 |
vOriginalTarget=qx.event.handler.EventHandler.getOriginalTargetObject(vDomTarget); |
| 7859 |
if(!vCaptureTarget){vDispatchTarget=vTarget=qx.event.handler.EventHandler.getTargetObject(null, |
| 7860 |
vOriginalTarget, |
| 7861 |
true); |
| 7862 |
}else{vDispatchTarget=vCaptureTarget; |
| 7863 |
vTarget=qx.event.handler.EventHandler.getTargetObject(null, |
| 7864 |
vOriginalTarget, |
| 7865 |
true); |
| 7866 |
}if(!vTarget){return; |
| 7867 |
}vTargetIsEnabled=vTarget.getEnabled(); |
| 8545 |
if(qx.core.Variant.isSet("qx.client", |
7868 |
if(qx.core.Variant.isSet("qx.client", |
| 8546 |
"mshtml")){members._renderRuntimeWidth=function(v){this._style.pixelWidth=(v==null)?0:v; |
7869 |
"gecko")){vFixClick=this._onmouseevent_click_fix(vDomTarget, |
| 8547 |
if(this._innerStyle){this._innerStyle.pixelWidth=(v==null)?0:v-2; |
7870 |
vType, |
| 8548 |
}}; |
7871 |
vDispatchTarget); |
| 8549 |
members._renderRuntimeHeight=function(v){this._style.pixelHeight=(v==null)?0:v; |
7872 |
}if(vType=="contextmenu"&&!this.getAllowClientContextMenu()){qx.event.handler.EventHandler.stopDomEvent(vDomEvent); |
| 8550 |
if(this._innerStyle){this._innerStyle.pixelHeight=(v==null)?0:v-2; |
7873 |
}if(vTargetIsEnabled&&vType=="mousedown"){qx.event.handler.FocusHandler.mouseFocus=true; |
| 8551 |
}}; |
7874 |
var vRoot=vTarget.getFocusRoot(); |
| 8552 |
members._resetRuntimeWidth=function(){this._style.width=""; |
7875 |
if(vRoot){this.setFocusRoot(vRoot); |
| 8553 |
if(this._innerStyle){this._innerStyle.width=""; |
7876 |
var vFocusTarget=vTarget; |
| 8554 |
}}; |
7877 |
while(!vFocusTarget.isFocusable()&&vFocusTarget!=vRoot){vFocusTarget=vFocusTarget.getParent(); |
| 8555 |
members._resetRuntimeHeight=function(){this._style.height=""; |
7878 |
}vRoot.setFocusedChild(vFocusTarget); |
| 8556 |
if(this._innerStyle){this._innerStyle.height=""; |
7879 |
vRoot.setActiveChild(vTarget); |
| 8557 |
}}; |
7880 |
}}switch(vType){case "mouseover":case "mouseout":vRelatedTarget=qx.event.handler.EventHandler.getRelatedTargetObjectFromEvent(vDomEvent); |
| 8558 |
}statics.__initLayoutProperties(statics); |
7881 |
if(vRelatedTarget==vTarget){return; |
| 8559 |
{if(qx.core.Setting.get("qx.widgetQueueDebugging")){statics.flushGlobalQueues=function(){if(statics._inFlushGlobalQueues||!qx.core.Init.getInstance().getApplication().getUiReady()){return; |
7882 |
}}vEventObject=new qx.event.type.MouseEvent(vType, |
|
|
7883 |
vDomEvent, |
| 7884 |
vDomTarget, |
| 7885 |
vTarget, |
| 7886 |
vOriginalTarget, |
| 7887 |
vRelatedTarget); |
| 7888 |
qx.event.type.MouseEvent.storeEventState(vEventObject); |
| 7889 |
if(vTargetIsEnabled){var vEventWasProcessed=false; |
| 7890 |
vEventWasProcessed=vDispatchTarget?vDispatchTarget.dispatchEvent(vEventObject):true; |
| 7891 |
this._onmouseevent_special_post(vType, |
| 7892 |
vTarget, |
| 7893 |
vOriginalTarget, |
| 7894 |
vDispatchTarget, |
| 7895 |
vEventWasProcessed, |
| 7896 |
vEventObject, |
| 7897 |
vDomEvent); |
| 7898 |
}else{if(vType=="mouseover"){if(qx.Class.isDefined("qx.ui.popup.ToolTipManager")){qx.ui.popup.ToolTipManager.getInstance().handleMouseOver(vEventObject); |
| 7899 |
}}}vEventObject.dispose(); |
| 7900 |
vEventObject=null; |
| 7901 |
qx.ui.core.Widget.flushGlobalQueues(); |
| 7902 |
if(vFixClick){this._onmouseevent_post(vDomEvent, |
| 7903 |
"click", |
| 7904 |
this._lastMouseDownDomTarget); |
| 7905 |
this._lastMouseDownDomTarget=null; |
| 7906 |
this._lastMouseDownDispatchTarget=null; |
| 7907 |
}}, |
| 7908 |
_onmouseevent_special_post:function(vType, |
| 7909 |
vTarget, |
| 7910 |
vOriginalTarget, |
| 7911 |
vDispatchTarget, |
| 7912 |
vEventWasProcessed, |
| 7913 |
vEventObject, |
| 7914 |
vDomEvent){switch(vType){case "mousedown":if(qx.Class.isDefined("qx.ui.popup.PopupManager")){qx.ui.popup.PopupManager.getInstance().update(vTarget); |
| 8560 |
} |
7915 |
} |
| 8561 |
if(!(statics._globalWidgetQueue.length>0||statics._globalElementQueue.length>0||statics._globalStateQueue.length>0||statics._globalJobQueue.length>0||statics._globalLayoutQueue.length>0||statics._fastGlobalDisplayQueue.length>0||!qx.lang.Object.isEmpty(statics._lazyGlobalDisplayQueue))){return; |
7916 |
if(qx.Class.isDefined("qx.ui.menu.Manager")){qx.ui.menu.Manager.getInstance().update(vTarget, |
| 8562 |
}var globalWidgetQueueLength=statics._globalWidgetQueue.length; |
7917 |
vType); |
| 8563 |
var globalElementQueueLength=statics._globalElementQueue.length; |
7918 |
} |
| 8564 |
var globalStateQueueLength=statics._globalStateQueue.length; |
7919 |
if(qx.Class.isDefined("qx.ui.embed.IframeManager")){qx.ui.embed.IframeManager.getInstance().handleMouseDown(vEventObject); |
| 8565 |
var globalJobQueueLength=statics._globalJobQueue.length; |
7920 |
}break; |
| 8566 |
var globalLayoutQueueLength=statics._globalLayoutQueue.length; |
7921 |
case "mouseup":if(qx.Class.isDefined("qx.ui.menu.Manager")){qx.ui.menu.Manager.getInstance().update(vTarget, |
| 8567 |
var fastGlobalDisplayQueueLength=statics._fastGlobalDisplayQueue.length; |
7922 |
vType); |
| 8568 |
var lazyGlobalDisplayQueueLength=statics._lazyGlobalDisplayQueue?statics._lazyGlobalDisplayQueue.length:0; |
7923 |
} |
| 8569 |
statics._inFlushGlobalQueues=true; |
7924 |
if(qx.Class.isDefined("qx.ui.embed.IframeManager")){qx.ui.embed.IframeManager.getInstance().handleMouseUp(vEventObject); |
| 8570 |
var start; |
7925 |
}break; |
| 8571 |
start=(new Date).valueOf(); |
7926 |
case "mouseover":if(qx.Class.isDefined("qx.ui.popup.ToolTipManager")){qx.ui.popup.ToolTipManager.getInstance().handleMouseOver(vEventObject); |
| 8572 |
statics.flushGlobalWidgetQueue(); |
7927 |
}break; |
| 8573 |
var vWidgetDuration=(new Date).valueOf()-start; |
7928 |
case "mouseout":if(qx.Class.isDefined("qx.ui.popup.ToolTipManager")){qx.ui.popup.ToolTipManager.getInstance().handleMouseOut(vEventObject); |
| 8574 |
start=(new Date).valueOf(); |
7929 |
}break; |
| 8575 |
statics.flushGlobalStateQueue(); |
7930 |
}this._ignoreWindowBlur=vType==="mousedown"; |
| 8576 |
var vStateDuration=(new Date).valueOf()-start; |
7931 |
if(qx.Class.isDefined("qx.event.handler.DragAndDropHandler")&&vTarget){qx.event.handler.DragAndDropHandler.getInstance().handleMouseEvent(vEventObject); |
| 8577 |
start=(new Date).valueOf(); |
7932 |
}}, |
| 8578 |
statics.flushGlobalElementQueue(); |
7933 |
_ondragevent:function(vEvent){if(!vEvent){vEvent=window.event; |
| 8579 |
var vElementDuration=(new Date).valueOf()-start; |
7934 |
}qx.event.handler.EventHandler.stopDomEvent(vEvent); |
| 8580 |
start=(new Date).valueOf(); |
|
|
| 8581 |
statics.flushGlobalJobQueue(); |
| 8582 |
var vJobDuration=(new Date).valueOf()-start; |
| 8583 |
start=(new Date).valueOf(); |
| 8584 |
statics.flushGlobalLayoutQueue(); |
| 8585 |
var vLayoutDuration=(new Date).valueOf()-start; |
| 8586 |
start=(new Date).valueOf(); |
| 8587 |
statics.flushGlobalDisplayQueue(); |
| 8588 |
var vDisplayDuration=(new Date).valueOf()-start; |
| 8589 |
var vSum=vWidgetDuration+vStateDuration+vElementDuration+vJobDuration+vLayoutDuration+vDisplayDuration; |
| 8590 |
if(vSum>0){var logger=qx.log.Logger.getClassLogger(qx.ui.core.Widget); |
| 8591 |
logger.debug("Flush Global Queues"); |
| 8592 |
logger.debug("Widgets: "+vWidgetDuration+"ms ("+globalWidgetQueueLength+")"); |
| 8593 |
logger.debug("State: "+vStateDuration+"ms ("+globalStateQueueLength+")"); |
| 8594 |
logger.debug("Element: "+vElementDuration+"ms ("+globalElementQueueLength+")"); |
| 8595 |
logger.debug("Job: "+vJobDuration+"ms ("+globalJobQueueLength+")"); |
| 8596 |
logger.debug("Layout: "+vLayoutDuration+"ms ("+globalLayoutQueueLength+")"); |
| 8597 |
logger.debug("Display: "+vDisplayDuration+"ms (fast:"+fastGlobalDisplayQueueLength+",lazy:"+lazyGlobalDisplayQueueLength+")"); |
| 8598 |
window.status="Flush: Widget:"+vWidgetDuration+" State:"+vStateDuration+" Element:"+vElementDuration+" Job:"+vJobDuration+" Layout:"+vLayoutDuration+" Display:"+vDisplayDuration; |
| 8599 |
}delete statics._inFlushGlobalQueues; |
| 8600 |
}; |
| 8601 |
}}; |
| 8602 |
}, |
7935 |
}, |
| 8603 |
destruct:function(){var elem=this.getElement(); |
7936 |
_onselectevent:function(e){if(!e){e=window.event; |
| 8604 |
if(elem){elem.qx_Widget=null; |
7937 |
}var target=qx.event.handler.EventHandler.getOriginalTargetObjectFromEvent(e); |
| 8605 |
}this._disposeFields("_isCreated", |
7938 |
while(target){if(target.getSelectable()!=null){if(!target.getSelectable()){qx.event.handler.EventHandler.stopDomEvent(e); |
| 8606 |
"_inlineEvents", |
7939 |
}break; |
| 8607 |
"_element", |
7940 |
}target=target.getParent(); |
| 8608 |
"_style", |
7941 |
}}, |
| 8609 |
"_borderElement", |
7942 |
_focused:false, |
| 8610 |
"_innerStyle", |
7943 |
_onwindowblur:function(e){if(!this._focused||this._ignoreWindowBlur){return; |
| 8611 |
"_oldParent", |
7944 |
}this._focused=false; |
| 8612 |
"_styleProperties", |
7945 |
this.setCaptureWidget(null); |
| 8613 |
"_htmlProperties", |
7946 |
if(qx.Class.isDefined("qx.ui.popup.PopupManager")){qx.ui.popup.PopupManager.getInstance().update(); |
| 8614 |
"_htmlAttributes", |
7947 |
}if(qx.Class.isDefined("qx.ui.menu.Manager")){qx.ui.menu.Manager.getInstance().update(); |
| 8615 |
"__states", |
7948 |
}if(qx.Class.isDefined("qx.event.handler.DragAndDropHandler")){qx.event.handler.DragAndDropHandler.getInstance().globalCancelDrag(); |
| 8616 |
"_jobQueue", |
7949 |
}qx.ui.core.ClientDocument.getInstance().createDispatchEvent("windowblur"); |
| 8617 |
"_layoutChanges", |
7950 |
}, |
| 8618 |
"__borderObject"); |
7951 |
_onwindowfocus:function(e){if(this._focused){return; |
|
|
7952 |
}this._focused=true; |
| 7953 |
qx.ui.core.ClientDocument.getInstance().createDispatchEvent("windowfocus"); |
| 7954 |
}, |
| 7955 |
_onwindowresize:function(e){qx.ui.core.ClientDocument.getInstance().createDispatchEvent("windowresize"); |
| 7956 |
}}, |
| 7957 |
destruct:function(){this.detachEvents(); |
| 7958 |
this._disposeObjectDeep("_commands", |
| 7959 |
1); |
| 7960 |
this._disposeFields("__onmouseevent", |
| 7961 |
"__ondragevent", |
| 7962 |
"__onselectevent", |
| 7963 |
"__onwindowblur", |
| 7964 |
"__onwindowfocus", |
| 7965 |
"__onwindowresize"); |
| 7966 |
this._disposeFields("_lastMouseEventType", |
| 7967 |
"_lastMouseDown", |
| 7968 |
"_lastMouseEventDate", |
| 7969 |
"_lastMouseDownDomTarget", |
| 7970 |
"_lastMouseDownDispatchTarget"); |
| 8619 |
}}); |
7971 |
}}); |
| 8620 |
|
7972 |
|
| 8621 |
|
7973 |
|
| 8622 |
|
7974 |
|
| 8623 |
|
7975 |
|
| 8624 |
/* ID: qx.ui.core.Parent */ |
7976 |
/* ID: qx.dom.Node */ |
| 8625 |
qx.Class.define("qx.ui.core.Parent", |
7977 |
qx.Class.define("qx.dom.Node", |
| 8626 |
{extend:qx.ui.core.Widget, |
7978 |
{statics:{ELEMENT:1, |
| 8627 |
type:"abstract", |
7979 |
ATTRIBUTE:2, |
| 8628 |
construct:function(){this.base(arguments); |
7980 |
TEXT:3, |
| 8629 |
this._children=[]; |
7981 |
CDATA_SECTION:4, |
| 8630 |
this._layoutImpl=this._createLayoutImpl(); |
7982 |
ENTITY_REFERENCE:5, |
|
|
7983 |
ENTITY:6, |
| 7984 |
PROCESSING_INSTRUCTION:7, |
| 7985 |
COMMENT:8, |
| 7986 |
DOCUMENT:9, |
| 7987 |
DOCUMENT_TYPE:10, |
| 7988 |
DOCUMENT_FRAGMENT:11, |
| 7989 |
NOTATION:12, |
| 7990 |
getDocument:function(node){if(this.isDocument(node)){return node; |
| 7991 |
}return node.ownerDocument||node.document||null; |
| 8631 |
}, |
7992 |
}, |
| 8632 |
properties:{focusHandler:{check:"qx.event.handler.FocusHandler", |
7993 |
getWindow:qx.core.Variant.select("qx.client", |
| 8633 |
apply:"_applyFocusHandler", |
7994 |
{"mshtml":function(node){return this.getDocument(node).parentWindow; |
| 8634 |
nullable:true}, |
|
|
| 8635 |
activeChild:{check:"qx.ui.core.Widget", |
| 8636 |
apply:"_applyActiveChild", |
| 8637 |
event:"changeActiveChild", |
| 8638 |
nullable:true}, |
| 8639 |
focusedChild:{check:"qx.ui.core.Widget", |
| 8640 |
apply:"_applyFocusedChild", |
| 8641 |
event:"changeFocusedChild", |
| 8642 |
nullable:true}, |
| 8643 |
visibleChildren:{_cached:true, |
| 8644 |
defaultValue:null}}, |
| 8645 |
members:{isFocusRoot:function(){return this.getFocusHandler()!=null; |
| 8646 |
}, |
7995 |
}, |
| 8647 |
getFocusRoot:function(){if(this.isFocusRoot()){return this; |
7996 |
"default":function(node){return this.getDocument(node).defaultView; |
| 8648 |
} |
7997 |
}}), |
| 8649 |
if(this._hasParent){return this.getParent().getFocusRoot(); |
7998 |
getDocumentElement:function(node){return this.getDocument(node).documentElement; |
| 8650 |
}return null; |
|
|
| 8651 |
}, |
7999 |
}, |
| 8652 |
activateFocusRoot:function(){if(this._focusHandler){return; |
8000 |
getBodyElement:function(node){return this.getDocument(node).body; |
| 8653 |
}this._focusHandler=new qx.event.handler.FocusHandler(this); |
|
|
| 8654 |
this.setFocusHandler(this._focusHandler); |
| 8655 |
}, |
8001 |
}, |
| 8656 |
_onfocuskeyevent:function(e){this.getFocusHandler()._onkeyevent(this, |
8002 |
isElement:function(node){return !!(node&&node.nodeType===qx.dom.Node.ELEMENT); |
| 8657 |
e); |
|
|
| 8658 |
}, |
8003 |
}, |
| 8659 |
_applyFocusHandler:function(value, |
8004 |
isDocument:function(node){return !!(node&&node.nodeType===qx.dom.Node.DOCUMENT); |
| 8660 |
old){if(value){this.addEventListener("keypress", |
|
|
| 8661 |
this._onfocuskeyevent); |
| 8662 |
if(this.getTabIndex()<1){this.setTabIndex(1); |
| 8663 |
}this.setHideFocus(true); |
| 8664 |
this.setActiveChild(this); |
| 8665 |
}else{this.removeEventListener("keydown", |
| 8666 |
this._onfocuskeyevent); |
| 8667 |
this.removeEventListener("keypress", |
| 8668 |
this._onfocuskeyevent); |
| 8669 |
this.setTabIndex(-1); |
| 8670 |
this.setHideFocus(false); |
| 8671 |
}}, |
| 8672 |
_applyActiveChild:function(value, |
| 8673 |
old){}, |
| 8674 |
_applyFocusedChild:function(value, |
| 8675 |
old){var vFocusValid=value!=null; |
| 8676 |
var vBlurValid=old!=null; |
| 8677 |
if(qx.Class.isDefined("qx.ui.popup.PopupManager")&&vFocusValid){var vMgr=qx.ui.popup.PopupManager.getInstance(); |
| 8678 |
if(vMgr){vMgr.update(value); |
| 8679 |
}} |
| 8680 |
if(vBlurValid){if(old.hasEventListeners("focusout")){var vEventObject=new qx.event.type.FocusEvent("focusout", |
| 8681 |
old); |
| 8682 |
if(vFocusValid){vEventObject.setRelatedTarget(value); |
| 8683 |
}old.dispatchEvent(vEventObject); |
| 8684 |
vEventObject.dispose(); |
| 8685 |
}} |
| 8686 |
if(vFocusValid){if(value.hasEventListeners("focusin")){var vEventObject=new qx.event.type.FocusEvent("focusin", |
| 8687 |
value); |
| 8688 |
if(vBlurValid){vEventObject.setRelatedTarget(old); |
| 8689 |
}value.dispatchEvent(vEventObject); |
| 8690 |
vEventObject.dispose(); |
| 8691 |
}} |
| 8692 |
if(vBlurValid){if(this.getActiveChild()==old&&!vFocusValid){this.setActiveChild(null); |
| 8693 |
}old.setFocused(false); |
| 8694 |
var vEventObject=new qx.event.type.FocusEvent("blur", |
| 8695 |
old); |
| 8696 |
if(vFocusValid){vEventObject.setRelatedTarget(value); |
| 8697 |
}old.dispatchEvent(vEventObject); |
| 8698 |
if(qx.Class.isDefined("qx.ui.popup.ToolTipManager")){var vMgr=qx.ui.popup.ToolTipManager.getInstance(); |
| 8699 |
if(vMgr){vMgr.handleBlur(vEventObject); |
| 8700 |
}}vEventObject.dispose(); |
| 8701 |
} |
| 8702 |
if(vFocusValid){this.setActiveChild(value); |
| 8703 |
value.setFocused(true); |
| 8704 |
qx.event.handler.EventHandler.getInstance().setFocusRoot(this); |
| 8705 |
var vEventObject=new qx.event.type.FocusEvent("focus", |
| 8706 |
value); |
| 8707 |
if(vBlurValid){vEventObject.setRelatedTarget(old); |
| 8708 |
}value.dispatchEvent(vEventObject); |
| 8709 |
if(qx.Class.isDefined("qx.ui.popup.ToolTipManager")){var vMgr=qx.ui.popup.ToolTipManager.getInstance(); |
| 8710 |
if(vMgr){vMgr.handleFocus(vEventObject); |
| 8711 |
}}vEventObject.dispose(); |
| 8712 |
}}, |
| 8713 |
_layoutImpl:null, |
| 8714 |
_createLayoutImpl:function(){return null; |
| 8715 |
}, |
8005 |
}, |
| 8716 |
getLayoutImpl:function(){return this._layoutImpl; |
8006 |
isText:function(node){return !!(node&&node.nodeType===qx.dom.Node.TEXT); |
| 8717 |
}, |
8007 |
}, |
| 8718 |
getChildren:function(){return this._children; |
8008 |
isWindow:function(node){return node.document&&this.getWindow(node.document)==node; |
| 8719 |
}, |
8009 |
}, |
| 8720 |
getChildrenLength:function(){return this.getChildren().length; |
8010 |
getText:function(node){if(!node||!node.nodeType){return null; |
|
|
8011 |
} |
| 8012 |
switch(node.nodeType){case 1:var i, |
| 8013 |
a=[], |
| 8014 |
nodes=node.childNodes, |
| 8015 |
length=nodes.length; |
| 8016 |
for(i=0;i<length;i++){a[i]=this.getText(nodes[i]); |
| 8017 |
}return a.join(""); |
| 8018 |
case 2:return node.nodeValue; |
| 8019 |
break; |
| 8020 |
case 3:return node.nodeValue; |
| 8021 |
break; |
| 8022 |
}return null; |
| 8023 |
}}}); |
| 8024 |
|
| 8025 |
|
| 8026 |
|
| 8027 |
|
| 8028 |
/* ID: qx.event.handler.KeyEventHandler */ |
| 8029 |
qx.Class.define("qx.event.handler.KeyEventHandler", |
| 8030 |
{type:"singleton", |
| 8031 |
extend:qx.core.Target, |
| 8032 |
construct:function(){this.base(arguments); |
| 8033 |
this.__onkeypress=qx.lang.Function.bind(this._onkeypress, |
| 8034 |
this); |
| 8035 |
this.__onkeyupdown=qx.lang.Function.bind(this._onkeyupdown, |
| 8036 |
this); |
| 8721 |
}, |
8037 |
}, |
| 8722 |
hasChildren:function(){return this.getChildrenLength()>0; |
8038 |
members:{_attachEvents:function(){var el=qx.core.Variant.isSet("qx.client", |
|
|
8039 |
"gecko")?window:document.body; |
| 8040 |
qx.html.EventRegistration.addEventListener(el, |
| 8041 |
"keypress", |
| 8042 |
this.__onkeypress); |
| 8043 |
qx.html.EventRegistration.addEventListener(el, |
| 8044 |
"keyup", |
| 8045 |
this.__onkeyupdown); |
| 8046 |
qx.html.EventRegistration.addEventListener(el, |
| 8047 |
"keydown", |
| 8048 |
this.__onkeyupdown); |
| 8723 |
}, |
8049 |
}, |
| 8724 |
isEmpty:function(){return this.getChildrenLength()==0; |
8050 |
_detachEvents:function(){var el=qx.core.Variant.isSet("qx.client", |
|
|
8051 |
"gecko")?window:document.body; |
| 8052 |
qx.html.EventRegistration.removeEventListener(el, |
| 8053 |
"keypress", |
| 8054 |
this.__onkeypress); |
| 8055 |
qx.html.EventRegistration.removeEventListener(el, |
| 8056 |
"keyup", |
| 8057 |
this.__onkeyupdown); |
| 8058 |
qx.html.EventRegistration.removeEventListener(el, |
| 8059 |
"keydown", |
| 8060 |
this.__onkeyupdown); |
| 8061 |
}, |
| 8062 |
_onkeyupdown:qx.core.Variant.select("qx.client", |
| 8063 |
{"mshtml":function(domEvent){domEvent=window.event||domEvent; |
| 8064 |
var keyCode=domEvent.keyCode; |
| 8065 |
var charcode=0; |
| 8066 |
var type=domEvent.type; |
| 8067 |
this.debug("native - type: "+type+" keyCode: "+keyCode+" charCode: "+charcode); |
| 8068 |
if(!(this._lastUpDownType[keyCode]=="keydown"&&type=="keydown")){this._idealKeyHandler(keyCode, |
| 8069 |
charcode, |
| 8070 |
type, |
| 8071 |
domEvent); |
| 8072 |
}if(type=="keydown"){if(this._isNonPrintableKeyCode(keyCode)|| |
| 8073 |
keyCode== |
| 8074 |
8||keyCode==9){this._idealKeyHandler(keyCode, |
| 8075 |
charcode, |
| 8076 |
"keypress", |
| 8077 |
domEvent); |
| 8078 |
}}this._lastUpDownType[keyCode]=type; |
| 8079 |
}, |
| 8080 |
"gecko":function(domEvent){var keyCode=this._keyCodeFix[domEvent.keyCode]||domEvent.keyCode; |
| 8081 |
var charCode=domEvent.charCode; |
| 8082 |
var type=domEvent.type; |
| 8083 |
this.debug("native - type: "+type+" keyCode: "+keyCode+" charCode: "+charCode); |
| 8084 |
if(qx.core.Client.getInstance().runsOnWindows()){var keyIdentifier=keyCode?this._keyCodeToIdentifier(keyCode):this._charCodeToIdentifier(charCode); |
| 8085 |
if(!(this._lastUpDownType[keyIdentifier]=="keypress"&&type=="keydown")){this._idealKeyHandler(keyCode, |
| 8086 |
charCode, |
| 8087 |
type, |
| 8088 |
domEvent); |
| 8089 |
}this._lastUpDownType[keyIdentifier]=type; |
| 8090 |
}else{this._idealKeyHandler(keyCode, |
| 8091 |
charCode, |
| 8092 |
type, |
| 8093 |
domEvent); |
| 8094 |
}}, |
| 8095 |
"webkit":function(domEvent){var keyCode=0; |
| 8096 |
var charCode=0; |
| 8097 |
var type=domEvent.type; |
| 8098 |
this.debug("native - type: "+type+" keyCode: "+keyCode+" charCode: "+charCode); |
| 8099 |
if(qx.core.Client.getInstance().getVersion()<420){if(!this._lastCharCodeForType){this._lastCharCodeForType={}; |
| 8100 |
}var isSafariSpecialKey=this._lastCharCodeForType[type]>63000; |
| 8101 |
if(isSafariSpecialKey){this._lastCharCodeForType[type]=null; |
| 8102 |
return; |
| 8103 |
}this._lastCharCodeForType[type]=domEvent.charCode; |
| 8104 |
} |
| 8105 |
if(type=="keyup"||type=="keydown"){keyCode=this._charCode2KeyCode[domEvent.charCode]||domEvent.keyCode; |
| 8106 |
}else{if(this._charCode2KeyCode[domEvent.charCode]){keyCode=this._charCode2KeyCode[domEvent.charCode]; |
| 8107 |
}else{charCode=domEvent.charCode; |
| 8108 |
}}this._idealKeyHandler(keyCode, |
| 8109 |
charCode, |
| 8110 |
type, |
| 8111 |
domEvent); |
| 8725 |
}, |
8112 |
}, |
| 8726 |
indexOf:function(vChild){return this.getChildren().indexOf(vChild); |
8113 |
"opera":function(domEvent){this._idealKeyHandler(domEvent.keyCode, |
|
|
8114 |
0, |
| 8115 |
domEvent.type, |
| 8116 |
domEvent); |
| 8117 |
this._lastKeyCode=domEvent.keyCode; |
| 8727 |
}, |
8118 |
}, |
| 8728 |
contains:function(vWidget){switch(vWidget){case null:return false; |
8119 |
"default":function(){throw new Error("Unsupported browser for key event handler!"); |
| 8729 |
case this:return true; |
8120 |
}}), |
| 8730 |
default:return this.contains(vWidget.getParent()); |
8121 |
_onkeypress:qx.core.Variant.select("qx.client", |
|
|
8122 |
{"mshtml":function(domEvent){var domEvent=window.event||domEvent; |
| 8123 |
if(this._charCode2KeyCode[domEvent.keyCode]){this._idealKeyHandler(this._charCode2KeyCode[domEvent.keyCode], |
| 8124 |
0, |
| 8125 |
domEvent.type, |
| 8126 |
domEvent); |
| 8127 |
}else{this._idealKeyHandler(0, |
| 8128 |
domEvent.keyCode, |
| 8129 |
domEvent.type, |
| 8130 |
domEvent); |
| 8731 |
}}, |
8131 |
}}, |
| 8732 |
_computeVisibleChildren:function(){var vVisible=[]; |
8132 |
"gecko":function(domEvent){var keyCode=this._keyCodeFix[domEvent.keyCode]||domEvent.keyCode; |
| 8733 |
var vChildren=this.getChildren(); |
8133 |
var charCode=domEvent.charCode; |
| 8734 |
if(!vChildren){return 0; |
8134 |
var type=domEvent.type; |
| 8735 |
}var vLength=vChildren.length; |
8135 |
this.debug("native - type: "+type+" keyCode: "+keyCode+" charCode: "+charCode); |
| 8736 |
for(var i=0;i<vLength;i++){var vChild=vChildren[i]; |
8136 |
if(qx.core.Client.getInstance().runsOnWindows()){var keyIdentifier=keyCode?this._keyCodeToIdentifier(keyCode):this._charCodeToIdentifier(charCode); |
| 8737 |
if(vChild._isDisplayable){vVisible.push(vChild); |
8137 |
if(!(this._lastUpDownType[keyIdentifier]=="keypress"&&type=="keydown")){this._idealKeyHandler(keyCode, |
| 8738 |
}}return vVisible; |
8138 |
charCode, |
| 8739 |
}, |
8139 |
type, |
| 8740 |
getVisibleChildrenLength:function(){return this.getVisibleChildren().length; |
8140 |
domEvent); |
|
|
8141 |
}this._lastUpDownType[keyIdentifier]=type; |
| 8142 |
}else{this._idealKeyHandler(keyCode, |
| 8143 |
charCode, |
| 8144 |
type, |
| 8145 |
domEvent); |
| 8146 |
}}, |
| 8147 |
"webkit":function(domEvent){var keyCode=0; |
| 8148 |
var charCode=0; |
| 8149 |
var type=domEvent.type; |
| 8150 |
if(qx.core.Client.getInstance().getVersion()<420){if(!this._lastCharCodeForType){this._lastCharCodeForType={}; |
| 8151 |
}var isSafariSpecialKey=this._lastCharCodeForType[type]>63000; |
| 8152 |
if(isSafariSpecialKey){this._lastCharCodeForType[type]=null; |
| 8153 |
return; |
| 8154 |
}this._lastCharCodeForType[type]=domEvent.charCode; |
| 8155 |
} |
| 8156 |
if(type=="keyup"||type=="keydown"){keyCode=this._charCode2KeyCode[domEvent.charCode]||domEvent.keyCode; |
| 8157 |
}else{if(this._charCode2KeyCode[domEvent.charCode]){keyCode=this._charCode2KeyCode[domEvent.charCode]; |
| 8158 |
}else{charCode=domEvent.charCode; |
| 8159 |
}}this._idealKeyHandler(keyCode, |
| 8160 |
charCode, |
| 8161 |
type, |
| 8162 |
domEvent); |
| 8741 |
}, |
8163 |
}, |
| 8742 |
hasVisibleChildren:function(){return this.getVisibleChildrenLength()>0; |
8164 |
"opera":function(domEvent){var keyCode=domEvent.keyCode; |
|
|
8165 |
var type=domEvent.type; |
| 8166 |
if(keyCode!=this._lastKeyCode){this._idealKeyHandler(0, |
| 8167 |
this._lastKeyCode, |
| 8168 |
type, |
| 8169 |
domEvent); |
| 8170 |
}else{if(this._keyCodeToIdentifierMap[keyCode]){this._idealKeyHandler(keyCode, |
| 8171 |
0, |
| 8172 |
type, |
| 8173 |
domEvent); |
| 8174 |
}else{this._idealKeyHandler(0, |
| 8175 |
keyCode, |
| 8176 |
type, |
| 8177 |
domEvent); |
| 8178 |
}}this._lastKeyCode=keyCode; |
| 8743 |
}, |
8179 |
}, |
| 8744 |
isVisibleEmpty:function(){return this.getVisibleChildrenLength()==0; |
8180 |
"default":function(){throw new Error("Unsupported browser for key event handler!"); |
|
|
8181 |
}}), |
| 8182 |
_specialCharCodeMap:{8:"Backspace", |
| 8183 |
9:"Tab", |
| 8184 |
13:"Enter", |
| 8185 |
27:"Escape", |
| 8186 |
32:"Space"}, |
| 8187 |
_keyCodeToIdentifierMap:{16:"Shift", |
| 8188 |
17:"Control", |
| 8189 |
18:"Alt", |
| 8190 |
20:"CapsLock", |
| 8191 |
224:"Meta", |
| 8192 |
37:"Left", |
| 8193 |
38:"Up", |
| 8194 |
39:"Right", |
| 8195 |
40:"Down", |
| 8196 |
33:"PageUp", |
| 8197 |
34:"PageDown", |
| 8198 |
35:"End", |
| 8199 |
36:"Home", |
| 8200 |
45:"Insert", |
| 8201 |
46:"Delete", |
| 8202 |
112:"F1", |
| 8203 |
113:"F2", |
| 8204 |
114:"F3", |
| 8205 |
115:"F4", |
| 8206 |
116:"F5", |
| 8207 |
117:"F6", |
| 8208 |
118:"F7", |
| 8209 |
119:"F8", |
| 8210 |
120:"F9", |
| 8211 |
121:"F10", |
| 8212 |
122:"F11", |
| 8213 |
123:"F12", |
| 8214 |
144:"NumLock", |
| 8215 |
44:"PrintScreen", |
| 8216 |
145:"Scroll", |
| 8217 |
19:"Pause", |
| 8218 |
91:"Win", |
| 8219 |
93:"Apps"}, |
| 8220 |
_numpadToCharCode:{96:"0".charCodeAt(0), |
| 8221 |
97:"1".charCodeAt(0), |
| 8222 |
98:"2".charCodeAt(0), |
| 8223 |
99:"3".charCodeAt(0), |
| 8224 |
100:"4".charCodeAt(0), |
| 8225 |
101:"5".charCodeAt(0), |
| 8226 |
102:"6".charCodeAt(0), |
| 8227 |
103:"7".charCodeAt(0), |
| 8228 |
104:"8".charCodeAt(0), |
| 8229 |
105:"9".charCodeAt(0), |
| 8230 |
106:"*".charCodeAt(0), |
| 8231 |
107:"+".charCodeAt(0), |
| 8232 |
109:"-".charCodeAt(0), |
| 8233 |
110:",".charCodeAt(0), |
| 8234 |
111:"/".charCodeAt(0)}, |
| 8235 |
_charCodeA:"A".charCodeAt(0), |
| 8236 |
_charCodeZ:"Z".charCodeAt(0), |
| 8237 |
_charCode0:"0".charCodeAt(0), |
| 8238 |
_charCode9:"9".charCodeAt(0), |
| 8239 |
_isNonPrintableKeyCode:function(keyCode){return this._keyCodeToIdentifierMap[keyCode]?true:false; |
| 8745 |
}, |
8240 |
}, |
| 8746 |
add:function(varargs){var vWidget; |
8241 |
_isIdentifiableKeyCode:function(keyCode){if(keyCode>=this._charCodeA&&keyCode<=this._charCodeZ){return true; |
| 8747 |
for(var i=0, |
8242 |
}if(keyCode>=this._charCode0&&keyCode<=this._charCode9){return true; |
| 8748 |
l=arguments.length;i<l;i++){vWidget=arguments[i]; |
8243 |
}if(this._specialCharCodeMap[keyCode]){return true; |
| 8749 |
if(!(vWidget instanceof qx.ui.core.Parent)&&!(vWidget instanceof qx.ui.basic.Terminator)){throw new Error("Invalid Widget: "+vWidget); |
8244 |
}if(this._numpadToCharCode[keyCode]){return true; |
| 8750 |
}else{vWidget.setParent(this); |
8245 |
}if(this._isNonPrintableKeyCode(keyCode)){return true; |
| 8751 |
}}return this; |
8246 |
}return false; |
| 8752 |
}, |
8247 |
}, |
| 8753 |
addAt:function(vChild, |
8248 |
isValidKeyIdentifier:function(keyIdentifier){if(this._identifierToKeyCodeMap[keyIdentifier]){return true; |
| 8754 |
vIndex){if(vIndex==null||vIndex<0){throw new Error("Not a valid index for addAt(): "+vIndex); |
|
|
| 8755 |
} |
8249 |
} |
| 8756 |
if(vChild.getParent()==this){var vChildren=this.getChildren(); |
8250 |
if(keyIdentifier.length!=1){return false; |
| 8757 |
var vOldIndex=vChildren.indexOf(vChild); |
8251 |
} |
| 8758 |
if(vOldIndex!=vIndex){if(vOldIndex!=-1){qx.lang.Array.removeAt(vChildren, |
8252 |
if(keyIdentifier>="0"&&keyIdentifier<="9"){return true; |
| 8759 |
vOldIndex); |
8253 |
} |
| 8760 |
}qx.lang.Array.insertAt(vChildren, |
8254 |
if(keyIdentifier>="A"&&keyIdentifier<="Z"){return true; |
| 8761 |
vChild, |
8255 |
} |
| 8762 |
vIndex); |
8256 |
switch(keyIdentifier){case "+":case "-":case "*":case "/":return true; |
| 8763 |
if(this._initialLayoutDone){this._invalidateVisibleChildren(); |
8257 |
default:return false; |
| 8764 |
this.getLayoutImpl().updateChildrenOnMoveChild(vChild, |
|
|
| 8765 |
vIndex, |
| 8766 |
vOldIndex); |
| 8767 |
}}}else{vChild._insertIndex=vIndex; |
| 8768 |
vChild.setParent(this); |
| 8769 |
}}, |
8258 |
}}, |
| 8770 |
addAtBegin:function(vChild){return this.addAt(vChild, |
8259 |
_keyCodeToIdentifier:function(keyCode){if(this._isIdentifiableKeyCode(keyCode)){var numPadKeyCode=this._numpadToCharCode[keyCode]; |
| 8771 |
0); |
8260 |
if(numPadKeyCode){return String.fromCharCode(numPadKeyCode); |
| 8772 |
}, |
8261 |
}return (this._keyCodeToIdentifierMap[keyCode]||this._specialCharCodeMap[keyCode]||String.fromCharCode(keyCode)); |
| 8773 |
addAtEnd:function(vChild){var vLength=this.getChildrenLength(); |
8262 |
}else{return "Unidentified"; |
| 8774 |
return this.addAt(vChild, |
8263 |
}}, |
| 8775 |
vChild.getParent()==this?vLength-1:vLength); |
8264 |
_charCodeToIdentifier:function(charCode){return this._specialCharCodeMap[charCode]||String.fromCharCode(charCode).toUpperCase(); |
| 8776 |
}, |
|
|
| 8777 |
addBefore:function(vChild, |
| 8778 |
vBefore){var vChildren=this.getChildren(); |
| 8779 |
var vTargetIndex=vChildren.indexOf(vBefore); |
| 8780 |
if(vTargetIndex==-1){throw new Error("Child to add before: "+vBefore+" is not inside this parent."); |
| 8781 |
}var vSourceIndex=vChildren.indexOf(vChild); |
| 8782 |
if(vSourceIndex==-1||vSourceIndex>vTargetIndex){vTargetIndex++; |
| 8783 |
}return this.addAt(vChild, |
| 8784 |
Math.max(0, |
| 8785 |
vTargetIndex-1)); |
| 8786 |
}, |
8265 |
}, |
| 8787 |
addAfter:function(vChild, |
8266 |
_identifierToKeyCode:function(keyIdentifier){return this._identifierToKeyCodeMap[keyIdentifier]||keyIdentifier.charCodeAt(0); |
| 8788 |
vAfter){var vChildren=this.getChildren(); |
|
|
| 8789 |
var vTargetIndex=vChildren.indexOf(vAfter); |
| 8790 |
if(vTargetIndex==-1){throw new Error("Child to add after: "+vAfter+" is not inside this parent."); |
| 8791 |
}var vSourceIndex=vChildren.indexOf(vChild); |
| 8792 |
if(vSourceIndex!=-1&&vSourceIndex<vTargetIndex){vTargetIndex--; |
| 8793 |
}return this.addAt(vChild, |
| 8794 |
Math.min(vChildren.length, |
| 8795 |
vTargetIndex+1)); |
| 8796 |
}, |
8267 |
}, |
| 8797 |
remove:function(varargs){var vWidget; |
8268 |
_idealKeyHandler:function(keyCode, |
| 8798 |
for(var i=0, |
8269 |
charCode, |
| 8799 |
l=arguments.length;i<l;i++){vWidget=arguments[i]; |
8270 |
eventType, |
| 8800 |
if(!(vWidget instanceof qx.ui.core.Parent)&&!(vWidget instanceof qx.ui.basic.Terminator)){throw new Error("Invalid Widget: "+vWidget); |
8271 |
domEvent){if(!keyCode&&!charCode){return; |
| 8801 |
}else if(vWidget.getParent()==this){vWidget.setParent(null); |
8272 |
}var keyIdentifier; |
|
|
8273 |
if(keyCode){keyIdentifier=this._keyCodeToIdentifier(keyCode); |
| 8274 |
qx.event.handler.EventHandler.getInstance()._onkeyevent_post(domEvent, |
| 8275 |
eventType, |
| 8276 |
keyCode, |
| 8277 |
charCode, |
| 8278 |
keyIdentifier); |
| 8279 |
}else{keyIdentifier=this._charCodeToIdentifier(charCode); |
| 8280 |
qx.event.handler.EventHandler.getInstance()._onkeyevent_post(domEvent, |
| 8281 |
"keypress", |
| 8282 |
keyCode, |
| 8283 |
charCode, |
| 8284 |
keyIdentifier); |
| 8285 |
qx.event.handler.EventHandler.getInstance()._onkeyevent_post(domEvent, |
| 8286 |
"keyinput", |
| 8287 |
keyCode, |
| 8288 |
charCode, |
| 8289 |
keyIdentifier); |
| 8802 |
}}}, |
8290 |
}}}, |
| 8803 |
removeAt:function(vIndex){var vChild=this.getChildren()[vIndex]; |
8291 |
defer:function(statics, |
| 8804 |
if(vChild){delete vChild._insertIndex; |
8292 |
members, |
| 8805 |
vChild.setParent(null); |
8293 |
properties){if(!members._identifierToKeyCodeMap){members._identifierToKeyCodeMap={}; |
| 8806 |
}}, |
8294 |
for(var key in members._keyCodeToIdentifierMap){members._identifierToKeyCodeMap[members._keyCodeToIdentifierMap[key]]=parseInt(key); |
| 8807 |
removeAll:function(){var cs=this.getChildren(); |
8295 |
} |
| 8808 |
var co=cs[0]; |
8296 |
for(var key in members._specialCharCodeMap){members._identifierToKeyCodeMap[members._specialCharCodeMap[key]]=parseInt(key); |
| 8809 |
while(co){this.remove(co); |
8297 |
}} |
| 8810 |
co=cs[0]; |
8298 |
if(qx.core.Variant.isSet("qx.client", |
|
|
8299 |
"mshtml")){members._lastUpDownType={}; |
| 8300 |
members._charCode2KeyCode={13:13, |
| 8301 |
27:27}; |
| 8302 |
}else if(qx.core.Variant.isSet("qx.client", |
| 8303 |
"gecko")){members._lastUpDownType={}; |
| 8304 |
members._keyCodeFix={12:members._identifierToKeyCode("NumLock")}; |
| 8305 |
}else if(qx.core.Variant.isSet("qx.client", |
| 8306 |
"webkit")){members._charCode2KeyCode={63289:members._identifierToKeyCode("NumLock"), |
| 8307 |
63276:members._identifierToKeyCode("PageUp"), |
| 8308 |
63277:members._identifierToKeyCode("PageDown"), |
| 8309 |
63275:members._identifierToKeyCode("End"), |
| 8310 |
63273:members._identifierToKeyCode("Home"), |
| 8311 |
63234:members._identifierToKeyCode("Left"), |
| 8312 |
63232:members._identifierToKeyCode("Up"), |
| 8313 |
63235:members._identifierToKeyCode("Right"), |
| 8314 |
63233:members._identifierToKeyCode("Down"), |
| 8315 |
63272:members._identifierToKeyCode("Delete"), |
| 8316 |
63302:members._identifierToKeyCode("Insert"), |
| 8317 |
63236:members._identifierToKeyCode("F1"), |
| 8318 |
63237:members._identifierToKeyCode("F2"), |
| 8319 |
63238:members._identifierToKeyCode("F3"), |
| 8320 |
63239:members._identifierToKeyCode("F4"), |
| 8321 |
63240:members._identifierToKeyCode("F5"), |
| 8322 |
63241:members._identifierToKeyCode("F6"), |
| 8323 |
63242:members._identifierToKeyCode("F7"), |
| 8324 |
63243:members._identifierToKeyCode("F8"), |
| 8325 |
63244:members._identifierToKeyCode("F9"), |
| 8326 |
63245:members._identifierToKeyCode("F10"), |
| 8327 |
63246:members._identifierToKeyCode("F11"), |
| 8328 |
63247:members._identifierToKeyCode("F12"), |
| 8329 |
63248:members._identifierToKeyCode("PrintScreen"), |
| 8330 |
3:members._identifierToKeyCode("Enter"), |
| 8331 |
12:members._identifierToKeyCode("NumLock"), |
| 8332 |
13:members._identifierToKeyCode("Enter")}; |
| 8333 |
}else if(qx.core.Variant.isSet("qx.client", |
| 8334 |
"opera")){members._lastKeyCode=null; |
| 8811 |
}}, |
8335 |
}}, |
| 8812 |
getFirstChild:function(){return qx.lang.Array.getFirst(this.getChildren())||null; |
8336 |
destruct:function(){this._detachEvents(); |
|
|
8337 |
this._disposeFields("_lastUpDownType", |
| 8338 |
"_lastKeyCode"); |
| 8339 |
}}); |
| 8340 |
|
| 8341 |
|
| 8342 |
|
| 8343 |
|
| 8344 |
/* ID: qx.event.type.DomEvent */ |
| 8345 |
qx.Class.define("qx.event.type.DomEvent", |
| 8346 |
{extend:qx.event.type.Event, |
| 8347 |
construct:function(vType, |
| 8348 |
vDomEvent, |
| 8349 |
vDomTarget, |
| 8350 |
vTarget, |
| 8351 |
vOriginalTarget){this.base(arguments, |
| 8352 |
vType); |
| 8353 |
this.setDomEvent(vDomEvent); |
| 8354 |
this.setDomTarget(vDomTarget); |
| 8355 |
this.setTarget(vTarget); |
| 8356 |
this.setOriginalTarget(vOriginalTarget); |
| 8813 |
}, |
8357 |
}, |
| 8814 |
getFirstVisibleChild:function(){return qx.lang.Array.getFirst(this.getVisibleChildren())||null; |
8358 |
statics:{SHIFT_MASK:1, |
|
|
8359 |
CTRL_MASK:2, |
| 8360 |
ALT_MASK:4, |
| 8361 |
META_MASK:8}, |
| 8362 |
properties:{bubbles:{_fast:true, |
| 8363 |
defaultValue:true, |
| 8364 |
noCompute:true}, |
| 8365 |
propagationStopped:{_fast:true, |
| 8366 |
defaultValue:false, |
| 8367 |
noCompute:true}, |
| 8368 |
domEvent:{_fast:true, |
| 8369 |
setOnlyOnce:true, |
| 8370 |
noCompute:true}, |
| 8371 |
domTarget:{_fast:true, |
| 8372 |
setOnlyOnce:true, |
| 8373 |
noCompute:true}, |
| 8374 |
modifiers:{_cached:true, |
| 8375 |
defaultValue:null}}, |
| 8376 |
members:{_computeModifiers:function(){var mask=0; |
| 8377 |
var evt=this.getDomEvent(); |
| 8378 |
if(evt.shiftKey)mask|=qx.event.type.DomEvent.SHIFT_MASK; |
| 8379 |
if(evt.ctrlKey)mask|=qx.event.type.DomEvent.CTRL_MASK; |
| 8380 |
if(evt.altKey)mask|=qx.event.type.DomEvent.ALT_MASK; |
| 8381 |
if(evt.metaKey)mask|=qx.event.type.DomEvent.META_MASK; |
| 8382 |
return mask; |
| 8815 |
}, |
8383 |
}, |
| 8816 |
getFirstActiveChild:function(vIgnoreClasses){return qx.ui.core.Widget.getActiveSiblingHelper(null, |
8384 |
isCtrlPressed:function(){return this.getDomEvent().ctrlKey; |
| 8817 |
this, |
|
|
| 8818 |
1, |
| 8819 |
vIgnoreClasses, |
| 8820 |
"first")||null; |
| 8821 |
}, |
8385 |
}, |
| 8822 |
getLastChild:function(){return qx.lang.Array.getLast(this.getChildren())||null; |
8386 |
isShiftPressed:function(){return this.getDomEvent().shiftKey; |
| 8823 |
}, |
8387 |
}, |
| 8824 |
getLastVisibleChild:function(){return qx.lang.Array.getLast(this.getVisibleChildren())||null; |
8388 |
isAltPressed:function(){return this.getDomEvent().altKey; |
| 8825 |
}, |
8389 |
}, |
| 8826 |
getLastActiveChild:function(vIgnoreClasses){return qx.ui.core.Widget.getActiveSiblingHelper(null, |
8390 |
isMetaPressed:function(){return this.getDomEvent().metaKey; |
| 8827 |
this, |
|
|
| 8828 |
-1, |
| 8829 |
vIgnoreClasses, |
| 8830 |
"last")||null; |
| 8831 |
}, |
8391 |
}, |
| 8832 |
forEachChild:function(vFunc){var ch=this.getChildren(), |
8392 |
isCtrlOrCommandPressed:function(){if(qx.core.Client.getInstance().runsOnMacintosh()){return this.getDomEvent().metaKey; |
| 8833 |
chc, |
8393 |
}else{return this.getDomEvent().ctrlKey; |
| 8834 |
i=-1; |
|
|
| 8835 |
if(!ch){return; |
| 8836 |
} |
| 8837 |
while(chc=ch[++i]){vFunc.call(chc, |
| 8838 |
i); |
| 8839 |
}}, |
| 8840 |
forEachVisibleChild:function(vFunc){var ch=this.getVisibleChildren(), |
| 8841 |
chc, |
| 8842 |
i=-1; |
| 8843 |
if(!ch){return; |
| 8844 |
} |
| 8845 |
while(chc=ch[++i]){vFunc.call(chc, |
| 8846 |
i); |
| 8847 |
}}, |
8394 |
}}, |
| 8848 |
_beforeAppear:function(){this.base(arguments); |
8395 |
setDefaultPrevented:qx.core.Variant.select("qx.client", |
| 8849 |
this.forEachVisibleChild(function(){if(this.isAppearRelevant()){this._beforeAppear(); |
8396 |
{"mshtml":function(vValue){if(!vValue){return this.error("It is not possible to set preventDefault to false if it was true before!", |
| 8850 |
}}); |
8397 |
"setDefaultPrevented"); |
| 8851 |
}, |
8398 |
}this.getDomEvent().returnValue=false; |
| 8852 |
_afterAppear:function(){this.base(arguments); |
8399 |
this.base(arguments, |
| 8853 |
this.forEachVisibleChild(function(){if(this.isAppearRelevant()){this._afterAppear(); |
8400 |
vValue); |
| 8854 |
}}); |
|
|
| 8855 |
}, |
| 8856 |
_beforeDisappear:function(){this.base(arguments); |
| 8857 |
this.forEachVisibleChild(function(){if(this.isAppearRelevant()){this._beforeDisappear(); |
| 8858 |
}}); |
| 8859 |
}, |
| 8860 |
_afterDisappear:function(){this.base(arguments); |
| 8861 |
this.forEachVisibleChild(function(){if(this.isAppearRelevant()){this._afterDisappear(); |
| 8862 |
}}); |
| 8863 |
}, |
8401 |
}, |
| 8864 |
_beforeInsertDom:function(){this.base(arguments); |
8402 |
"default":function(vValue){if(!vValue){return this.error("It is not possible to set preventDefault to false if it was true before!", |
| 8865 |
this.forEachVisibleChild(function(){if(this.isAppearRelevant()){this._beforeInsertDom(); |
8403 |
"setDefaultPrevented"); |
|
|
8404 |
}this.getDomEvent().preventDefault(); |
| 8405 |
this.getDomEvent().returnValue=false; |
| 8406 |
this.base(arguments, |
| 8407 |
vValue); |
| 8408 |
}})}, |
| 8409 |
destruct:function(){this._disposeFields("_valueDomEvent", |
| 8410 |
"_valueDomTarget"); |
| 8866 |
}}); |
8411 |
}}); |
|
|
8412 |
|
| 8413 |
|
| 8414 |
|
| 8415 |
|
| 8416 |
/* ID: qx.event.type.KeyEvent */ |
| 8417 |
qx.Class.define("qx.event.type.KeyEvent", |
| 8418 |
{extend:qx.event.type.DomEvent, |
| 8419 |
construct:function(vType, |
| 8420 |
vDomEvent, |
| 8421 |
vDomTarget, |
| 8422 |
vTarget, |
| 8423 |
vOriginalTarget, |
| 8424 |
vKeyCode, |
| 8425 |
vCharCode, |
| 8426 |
vKeyIdentifier){this.base(arguments, |
| 8427 |
vType, |
| 8428 |
vDomEvent, |
| 8429 |
vDomTarget, |
| 8430 |
vTarget, |
| 8431 |
vOriginalTarget); |
| 8432 |
this._keyCode=vKeyCode; |
| 8433 |
this.setCharCode(vCharCode); |
| 8434 |
this.setKeyIdentifier(vKeyIdentifier); |
| 8867 |
}, |
8435 |
}, |
| 8868 |
_afterInsertDom:function(){this.base(arguments); |
8436 |
statics:{keys:{esc:27, |
| 8869 |
this.forEachVisibleChild(function(){if(this.isAppearRelevant()){this._afterInsertDom(); |
8437 |
enter:13, |
| 8870 |
}}); |
8438 |
tab:9, |
|
|
8439 |
space:32, |
| 8440 |
up:38, |
| 8441 |
down:40, |
| 8442 |
left:37, |
| 8443 |
right:39, |
| 8444 |
shift:16, |
| 8445 |
ctrl:17, |
| 8446 |
alt:18, |
| 8447 |
f1:112, |
| 8448 |
f2:113, |
| 8449 |
f3:114, |
| 8450 |
f4:115, |
| 8451 |
f5:116, |
| 8452 |
f6:117, |
| 8453 |
f7:118, |
| 8454 |
f8:119, |
| 8455 |
f9:120, |
| 8456 |
f10:121, |
| 8457 |
f11:122, |
| 8458 |
f12:123, |
| 8459 |
print:124, |
| 8460 |
del:46, |
| 8461 |
backspace:8, |
| 8462 |
insert:45, |
| 8463 |
home:36, |
| 8464 |
end:35, |
| 8465 |
pageup:33, |
| 8466 |
pagedown:34, |
| 8467 |
numlock:144, |
| 8468 |
numpad_0:96, |
| 8469 |
numpad_1:97, |
| 8470 |
numpad_2:98, |
| 8471 |
numpad_3:99, |
| 8472 |
numpad_4:100, |
| 8473 |
numpad_5:101, |
| 8474 |
numpad_6:102, |
| 8475 |
numpad_7:103, |
| 8476 |
numpad_8:104, |
| 8477 |
numpad_9:105, |
| 8478 |
numpad_divide:111, |
| 8479 |
numpad_multiply:106, |
| 8480 |
numpad_minus:109, |
| 8481 |
numpad_plus:107}, |
| 8482 |
codes:{}}, |
| 8483 |
properties:{charCode:{_fast:true, |
| 8484 |
setOnlyOnce:true, |
| 8485 |
noCompute:true}, |
| 8486 |
keyIdentifier:{_fast:true, |
| 8487 |
setOnlyOnce:true, |
| 8488 |
noCompute:true}}, |
| 8489 |
members:{getKeyCode:function(){qx.log.Logger.deprecatedMethodWarning(arguments.callee, |
| 8490 |
"Please use getKeyIdentifier() instead."); |
| 8491 |
return this._keyCode; |
| 8492 |
}}, |
| 8493 |
defer:function(statics){for(var i in statics.keys){statics.codes[statics.keys[i]]=i; |
| 8494 |
}}}); |
| 8495 |
|
| 8496 |
|
| 8497 |
|
| 8498 |
|
| 8499 |
/* ID: qx.event.type.MouseEvent */ |
| 8500 |
qx.Class.define("qx.event.type.MouseEvent", |
| 8501 |
{extend:qx.event.type.DomEvent, |
| 8502 |
construct:function(vType, |
| 8503 |
vDomEvent, |
| 8504 |
vDomTarget, |
| 8505 |
vTarget, |
| 8506 |
vOriginalTarget, |
| 8507 |
vRelatedTarget){this.base(arguments, |
| 8508 |
vType, |
| 8509 |
vDomEvent, |
| 8510 |
vDomTarget, |
| 8511 |
vTarget, |
| 8512 |
vOriginalTarget); |
| 8513 |
if(vRelatedTarget){this.setRelatedTarget(vRelatedTarget); |
| 8514 |
}}, |
| 8515 |
statics:{C_BUTTON_LEFT:"left", |
| 8516 |
C_BUTTON_MIDDLE:"middle", |
| 8517 |
C_BUTTON_RIGHT:"right", |
| 8518 |
C_BUTTON_NONE:"none", |
| 8519 |
_screenX:0, |
| 8520 |
_screenY:0, |
| 8521 |
_clientX:0, |
| 8522 |
_clientY:0, |
| 8523 |
_pageX:0, |
| 8524 |
_pageY:0, |
| 8525 |
_button:null, |
| 8526 |
buttons:qx.core.Variant.select("qx.client", |
| 8527 |
{"mshtml":{left:1, |
| 8528 |
right:2, |
| 8529 |
middle:4}, |
| 8530 |
"default":{left:0, |
| 8531 |
right:2, |
| 8532 |
middle:1}}), |
| 8533 |
storeEventState:function(e){this._screenX=e.getScreenX(); |
| 8534 |
this._screenY=e.getScreenY(); |
| 8535 |
this._clientX=e.getClientX(); |
| 8536 |
this._clientY=e.getClientY(); |
| 8537 |
this._pageX=e.getPageX(); |
| 8538 |
this._pageY=e.getPageY(); |
| 8539 |
this._button=e.getButton(); |
| 8871 |
}, |
8540 |
}, |
| 8872 |
_beforeRemoveDom:function(){this.base(arguments); |
8541 |
getScreenX:function(){return this._screenX; |
| 8873 |
this.forEachVisibleChild(function(){if(this.isAppearRelevant()){this._beforeRemoveDom(); |
|
|
| 8874 |
}}); |
| 8875 |
}, |
8542 |
}, |
| 8876 |
_afterRemoveDom:function(){this.base(arguments); |
8543 |
getScreenY:function(){return this._screenY; |
| 8877 |
this.forEachVisibleChild(function(){if(this.isAppearRelevant()){this._afterRemoveDom(); |
|
|
| 8878 |
}}); |
| 8879 |
}, |
8544 |
}, |
| 8880 |
_handleDisplayableCustom:function(vDisplayable, |
8545 |
getClientX:function(){return this._clientX; |
| 8881 |
vParent, |
|
|
| 8882 |
vHint){this.forEachChild(function(){this._handleDisplayable(); |
| 8883 |
}); |
| 8884 |
}, |
8546 |
}, |
| 8885 |
_addChildrenToStateQueue:function(){this.forEachVisibleChild(function(){this.addToStateQueue(); |
8547 |
getClientY:function(){return this._clientY; |
| 8886 |
}); |
|
|
| 8887 |
}, |
8548 |
}, |
| 8888 |
recursiveAddToStateQueue:function(){this.addToStateQueue(); |
8549 |
getPageX:function(){return this._pageX; |
| 8889 |
this.forEachVisibleChild(function(){this.recursiveAddToStateQueue(); |
|
|
| 8890 |
}); |
| 8891 |
}, |
8550 |
}, |
| 8892 |
_recursiveAppearanceThemeUpdate:function(vNewAppearanceTheme, |
8551 |
getPageY:function(){return this._pageY; |
| 8893 |
vOldAppearanceTheme){this.base(arguments, |
|
|
| 8894 |
vNewAppearanceTheme, |
| 8895 |
vOldAppearanceTheme); |
| 8896 |
this.forEachVisibleChild(function(){this._recursiveAppearanceThemeUpdate(vNewAppearanceTheme, |
| 8897 |
vOldAppearanceTheme); |
| 8898 |
}); |
| 8899 |
}, |
8552 |
}, |
| 8900 |
_addChildToChildrenQueue:function(vChild){if(!vChild._isInParentChildrenQueue&&!vChild._isDisplayable){this.warn("Ignoring invisible child: "+vChild); |
8553 |
getButton:function(){return this._button; |
| 8901 |
} |
|
|
| 8902 |
if(!vChild._isInParentChildrenQueue&&vChild._isDisplayable){qx.ui.core.Widget.addToGlobalLayoutQueue(this); |
| 8903 |
if(!this._childrenQueue){this._childrenQueue={}; |
| 8904 |
}this._childrenQueue[vChild.toHashCode()]=vChild; |
| 8905 |
}}, |
| 8906 |
_removeChildFromChildrenQueue:function(vChild){if(this._childrenQueue&&vChild._isInParentChildrenQueue){delete this._childrenQueue[vChild.toHashCode()]; |
| 8907 |
if(qx.lang.Object.isEmpty(this._childrenQueue)){qx.ui.core.Widget.removeFromGlobalLayoutQueue(this); |
| 8908 |
}}}, |
| 8909 |
_flushChildrenQueue:function(){if(!qx.lang.Object.isEmpty(this._childrenQueue)){this.getLayoutImpl().flushChildrenQueue(this._childrenQueue); |
| 8910 |
delete this._childrenQueue; |
| 8911 |
}}, |
8554 |
}}, |
| 8912 |
_addChildrenToLayoutQueue:function(p){this.forEachChild(function(){this.addToLayoutChanges(p); |
8555 |
properties:{button:{_fast:true, |
| 8913 |
}); |
8556 |
readOnly:true}, |
| 8914 |
}, |
8557 |
wheelDelta:{_fast:true, |
| 8915 |
_layoutChild:function(vChild){if(!vChild._isDisplayable){return ; |
8558 |
readOnly:true}}, |
| 8916 |
}var vChanges=vChild._layoutChanges; |
8559 |
members:{getPageX:qx.core.Variant.select("qx.client", |
| 8917 |
try{if(vChild.renderBorder){if(vChanges.borderTop||vChanges.borderRight||vChanges.borderBottom||vChanges.borderLeft){vChild.renderBorder(vChanges); |
8560 |
{"mshtml":function(){return this.getDomEvent().clientX+qx.bom.Viewport.getScrollLeft(window); |
| 8918 |
}}}catch(ex){this.error("Could not apply border to child "+vChild, |
|
|
| 8919 |
ex); |
| 8920 |
} |
| 8921 |
try{if(vChild.renderPadding){if(vChanges.paddingLeft||vChanges.paddingRight||vChanges.paddingTop||vChanges.paddingBottom){vChild.renderPadding(vChanges); |
| 8922 |
}}}catch(ex){this.error("Could not apply padding to child "+vChild, |
| 8923 |
ex); |
| 8924 |
}try{this.getLayoutImpl().layoutChild(vChild, |
| 8925 |
vChanges); |
| 8926 |
}catch(ex){this.error("Could not layout child "+vChild+" through layout handler", |
| 8927 |
ex); |
| 8928 |
}try{vChild._layoutPost(vChanges); |
| 8929 |
}catch(ex){this.error("Could not post layout child "+vChild, |
| 8930 |
ex); |
| 8931 |
}try{if(vChanges.initial){vChild._initialLayoutDone=true; |
| 8932 |
qx.ui.core.Widget.addToGlobalDisplayQueue(vChild); |
| 8933 |
}}catch(ex){this.error("Could not handle display updates from layout flush for child "+vChild, |
| 8934 |
ex); |
| 8935 |
}vChild._layoutChanges={}; |
| 8936 |
delete vChild._isInParentLayoutQueue; |
| 8937 |
delete this._childrenQueue[vChild.toHashCode()]; |
| 8938 |
}, |
| 8939 |
_layoutPost:qx.lang.Function.returnTrue, |
| 8940 |
_computePreferredInnerWidth:function(){return this.getLayoutImpl().computeChildrenNeededWidth(); |
| 8941 |
}, |
8561 |
}, |
| 8942 |
_computePreferredInnerHeight:function(){return this.getLayoutImpl().computeChildrenNeededHeight(); |
8562 |
"default":function(){return this.getDomEvent().pageX; |
|
|
8563 |
}}), |
| 8564 |
getPageY:qx.core.Variant.select("qx.client", |
| 8565 |
{"mshtml":function(){return this.getDomEvent().clientY+qx.bom.Viewport.getScrollTop(window); |
| 8943 |
}, |
8566 |
}, |
| 8944 |
_changeInnerWidth:function(vNew, |
8567 |
"default":function(){return this.getDomEvent().pageY; |
| 8945 |
vOld){var vLayout=this.getLayoutImpl(); |
8568 |
}}), |
| 8946 |
if(vLayout.invalidateChildrenFlexWidth){vLayout.invalidateChildrenFlexWidth(); |
8569 |
getClientX:function(){return this.getDomEvent().clientX; |
| 8947 |
}this.forEachVisibleChild(function(){if(vLayout.updateChildOnInnerWidthChange(this)&&this._recomputeBoxWidth()){this._recomputeOuterWidth(); |
|
|
| 8948 |
this._recomputeInnerWidth(); |
| 8949 |
}}); |
| 8950 |
}, |
8570 |
}, |
| 8951 |
_changeInnerHeight:function(vNew, |
8571 |
getClientY:function(){return this.getDomEvent().clientY; |
| 8952 |
vOld){var vLayout=this.getLayoutImpl(); |
|
|
| 8953 |
if(vLayout.invalidateChildrenFlexHeight){vLayout.invalidateChildrenFlexHeight(); |
| 8954 |
}this.forEachVisibleChild(function(){if(vLayout.updateChildOnInnerHeightChange(this)&&this._recomputeBoxHeight()){this._recomputeOuterHeight(); |
| 8955 |
this._recomputeInnerHeight(); |
| 8956 |
}}); |
| 8957 |
}, |
8572 |
}, |
| 8958 |
getInnerWidthForChild:function(vChild){return this.getInnerWidth(); |
8573 |
getScreenX:function(){return this.getDomEvent().screenX; |
| 8959 |
}, |
8574 |
}, |
| 8960 |
getInnerHeightForChild:function(vChild){return this.getInnerHeight(); |
8575 |
getScreenY:function(){return this.getDomEvent().screenY; |
| 8961 |
}, |
8576 |
}, |
| 8962 |
_remappingChildTable:["add", |
8577 |
isLeftButtonPressed:qx.core.Variant.select("qx.client", |
| 8963 |
"remove", |
8578 |
{"mshtml":function(){if(this.getType()=="click"){return true; |
| 8964 |
"addAt", |
8579 |
}else{return this.getButton()===qx.event.type.MouseEvent.C_BUTTON_LEFT; |
| 8965 |
"addAtBegin", |
|
|
| 8966 |
"addAtEnd", |
| 8967 |
"removeAt", |
| 8968 |
"addBefore", |
| 8969 |
"addAfter", |
| 8970 |
"removeAll"], |
| 8971 |
_remapStart:"return this._remappingChildTarget.", |
| 8972 |
_remapStop:".apply(this._remappingChildTarget, arguments)", |
| 8973 |
remapChildrenHandlingTo:function(vTarget){var t=this._remappingChildTable; |
| 8974 |
this._remappingChildTarget=vTarget; |
| 8975 |
for(var i=0, |
| 8976 |
l=t.length, |
| 8977 |
s;i<l;i++){s=t[i]; |
| 8978 |
this[s]=new Function(qx.ui.core.Parent.prototype._remapStart+s+qx.ui.core.Parent.prototype._remapStop); |
| 8979 |
}}}, |
| 8980 |
defer:function(statics, |
| 8981 |
members, |
| 8982 |
properties){if(qx.core.Variant.isSet("qx.client", |
| 8983 |
"opera")){members._layoutChildOrig=members._layoutChild; |
| 8984 |
members._layoutChild=function(vChild){if(!vChild._initialLayoutDone||!vChild._layoutChanges.border){return this._layoutChildOrig(vChild); |
| 8985 |
}var vStyle=vChild.getElement().style; |
| 8986 |
var vOldDisplay=vStyle.display; |
| 8987 |
vStyle.display="none"; |
| 8988 |
var vRet=this._layoutChildOrig(vChild); |
| 8989 |
vStyle.display=vOldDisplay; |
| 8990 |
return vRet; |
| 8991 |
}; |
| 8992 |
}}, |
8580 |
}}, |
| 8993 |
destruct:function(){this._disposeObjectDeep("_children", |
8581 |
"default":function(){return this.getButton()===qx.event.type.MouseEvent.C_BUTTON_LEFT; |
| 8994 |
1); |
8582 |
}}), |
| 8995 |
this._disposeObjects("_layoutImpl", |
8583 |
isMiddleButtonPressed:function(){return this.getButton()===qx.event.type.MouseEvent.C_BUTTON_MIDDLE; |
| 8996 |
"_focusHandler"); |
|
|
| 8997 |
this._disposeFields("_childrenQueue", |
| 8998 |
"_childrenQueue", |
| 8999 |
"_remappingChildTable", |
| 9000 |
"_remappingChildTarget", |
| 9001 |
"_cachedVisibleChildren"); |
| 9002 |
}}); |
| 9003 |
|
| 9004 |
|
| 9005 |
|
| 9006 |
|
| 9007 |
/* ID: qx.event.type.FocusEvent */ |
| 9008 |
qx.Class.define("qx.event.type.FocusEvent", |
| 9009 |
{extend:qx.event.type.Event, |
| 9010 |
construct:function(type, |
| 9011 |
target){this.base(arguments, |
| 9012 |
type); |
| 9013 |
this.setTarget(target); |
| 9014 |
switch(type){case "focusin":case "focusout":this.setBubbles(true); |
| 9015 |
this.setPropagationStopped(false); |
| 9016 |
}}}); |
| 9017 |
|
| 9018 |
|
| 9019 |
|
| 9020 |
|
| 9021 |
/* ID: qx.event.handler.EventHandler */ |
| 9022 |
qx.Class.define("qx.event.handler.EventHandler", |
| 9023 |
{type:"singleton", |
| 9024 |
extend:qx.core.Target, |
| 9025 |
construct:function(){this.base(arguments); |
| 9026 |
this.__onmouseevent=qx.lang.Function.bind(this._onmouseevent, |
| 9027 |
this); |
| 9028 |
this.__ondragevent=qx.lang.Function.bind(this._ondragevent, |
| 9029 |
this); |
| 9030 |
this.__onselectevent=qx.lang.Function.bind(this._onselectevent, |
| 9031 |
this); |
| 9032 |
this.__onwindowblur=qx.lang.Function.bind(this._onwindowblur, |
| 9033 |
this); |
| 9034 |
this.__onwindowfocus=qx.lang.Function.bind(this._onwindowfocus, |
| 9035 |
this); |
| 9036 |
this.__onwindowresize=qx.lang.Function.bind(this._onwindowresize, |
| 9037 |
this); |
| 9038 |
this._commands={}; |
| 9039 |
}, |
| 9040 |
events:{"error":"qx.event.type.DataEvent"}, |
| 9041 |
statics:{mouseEventTypes:["mouseover", |
| 9042 |
"mousemove", |
| 9043 |
"mouseout", |
| 9044 |
"mousedown", |
| 9045 |
"mouseup", |
| 9046 |
"click", |
| 9047 |
"dblclick", |
| 9048 |
"contextmenu", |
| 9049 |
qx.core.Variant.isSet("qx.client", |
| 9050 |
"gecko")?"DOMMouseScroll":"mousewheel"], |
| 9051 |
keyEventTypes:["keydown", |
| 9052 |
"keypress", |
| 9053 |
"keyup"], |
| 9054 |
dragEventTypes:qx.core.Variant.select("qx.client", |
| 9055 |
{"gecko":["dragdrop", |
| 9056 |
"dragover", |
| 9057 |
"dragenter", |
| 9058 |
"dragexit", |
| 9059 |
"draggesture"], |
| 9060 |
"mshtml":["dragend", |
| 9061 |
"dragover", |
| 9062 |
"dragstart", |
| 9063 |
"drag", |
| 9064 |
"dragenter", |
| 9065 |
"dragleave"], |
| 9066 |
"default":["dragstart", |
| 9067 |
"dragdrop", |
| 9068 |
"dragover", |
| 9069 |
"drag", |
| 9070 |
"dragleave", |
| 9071 |
"dragenter", |
| 9072 |
"dragexit", |
| 9073 |
"draggesture"]}), |
| 9074 |
getDomTarget:qx.core.Variant.select("qx.client", |
| 9075 |
{"mshtml":function(vDomEvent){return vDomEvent.target||vDomEvent.srcElement; |
| 9076 |
}, |
8584 |
}, |
| 9077 |
"webkit":function(vDomEvent){var vNode=vDomEvent.target||vDomEvent.srcElement; |
8585 |
isRightButtonPressed:function(){return this.getButton()===qx.event.type.MouseEvent.C_BUTTON_RIGHT; |
| 9078 |
if(vNode&&(vNode.nodeType==qx.dom.Node.TEXT)){vNode=vNode.parentNode; |
|
|
| 9079 |
}return vNode; |
| 9080 |
}, |
8586 |
}, |
| 9081 |
"default":function(vDomEvent){return vDomEvent.target; |
8587 |
__buttons:qx.core.Variant.select("qx.client", |
| 9082 |
}}), |
8588 |
{"mshtml":{1:"left", |
| 9083 |
stopDomEvent:function(vDomEvent){if(vDomEvent.preventDefault){vDomEvent.preventDefault(); |
8589 |
2:"right", |
| 9084 |
}vDomEvent.returnValue=false; |
8590 |
4:"middle"}, |
|
|
8591 |
"default":{0:"left", |
| 8592 |
2:"right", |
| 8593 |
1:"middle"}}), |
| 8594 |
_computeButton:function(){switch(this.getDomEvent().type){case "click":case "dblclick":return "left"; |
| 8595 |
case "contextmenu":return "right"; |
| 8596 |
default:return this.__buttons[this.getDomEvent().button]||"none"; |
| 8597 |
}}, |
| 8598 |
_computeWheelDelta:qx.core.Variant.select("qx.client", |
| 8599 |
{"default":function(){return this.getDomEvent().wheelDelta/120; |
| 9085 |
}, |
8600 |
}, |
| 9086 |
getOriginalTargetObject:function(vNode){if(vNode==document.documentElement){vNode=document.body; |
8601 |
"gecko":function(){return -(this.getDomEvent().detail/3); |
| 9087 |
}while(vNode!=null&&vNode.qx_Widget==null){try{vNode=vNode.parentNode; |
8602 |
}})}}); |
| 9088 |
}catch(vDomEvent){vNode=null; |
8603 |
|
| 9089 |
}}return vNode?vNode.qx_Widget:null; |
8604 |
|
|
|
8605 |
|
| 8606 |
|
| 8607 |
/* ID: qx.util.manager.Object */ |
| 8608 |
qx.Class.define("qx.util.manager.Object", |
| 8609 |
{extend:qx.core.Target, |
| 8610 |
construct:function(){this.base(arguments); |
| 8611 |
this._objects={}; |
| 9090 |
}, |
8612 |
}, |
| 9091 |
getOriginalTargetObjectFromEvent:function(vDomEvent, |
8613 |
members:{add:function(vObject){if(this.getDisposed()){return; |
| 9092 |
vWindow){var vNode=qx.event.handler.EventHandler.getDomTarget(vDomEvent); |
8614 |
}this._objects[vObject.toHashCode()]=vObject; |
| 9093 |
if(vWindow){var vDocument=vWindow.document; |
|
|
| 9094 |
if(vNode==vWindow||vNode==vDocument||vNode==vDocument.documentElement||vNode==vDocument.body){return vDocument.body.qx_Widget; |
| 9095 |
}}return qx.event.handler.EventHandler.getOriginalTargetObject(vNode); |
| 9096 |
}, |
8615 |
}, |
| 9097 |
getRelatedOriginalTargetObjectFromEvent:function(vDomEvent){return qx.event.handler.EventHandler.getOriginalTargetObject(vDomEvent.relatedTarget||(vDomEvent.type=="mouseover"?vDomEvent.fromElement:vDomEvent.toElement)); |
8616 |
remove:function(vObject){if(this.getDisposed()){return false; |
|
|
8617 |
}delete this._objects[vObject.toHashCode()]; |
| 9098 |
}, |
8618 |
}, |
| 9099 |
getTargetObject:function(vNode, |
8619 |
has:function(vObject){return this._objects[vObject.toHashCode()]!=null; |
| 9100 |
vObject, |
|
|
| 9101 |
allowDisabled){if(!vObject){var vObject=qx.event.handler.EventHandler.getOriginalTargetObject(vNode); |
| 9102 |
if(!vObject){return null; |
| 9103 |
}}while(vObject){if(!allowDisabled&&!vObject.getEnabled()){return null; |
| 9104 |
}if(!vObject.getAnonymous()){break; |
| 9105 |
}vObject=vObject.getParent(); |
| 9106 |
}return vObject; |
| 9107 |
}, |
8620 |
}, |
| 9108 |
getTargetObjectFromEvent:function(vDomEvent){return qx.event.handler.EventHandler.getTargetObject(qx.event.handler.EventHandler.getDomTarget(vDomEvent)); |
8621 |
get:function(vObject){return this._objects[vObject.toHashCode()]; |
| 9109 |
}, |
8622 |
}, |
| 9110 |
getRelatedTargetObjectFromEvent:function(vDomEvent){var target=vDomEvent.relatedTarget; |
8623 |
getAll:function(){return this._objects; |
| 9111 |
if(!target){if(vDomEvent.type=="mouseover"){target=vDomEvent.fromElement; |
8624 |
}, |
| 9112 |
}else{target=vDomEvent.toElement; |
8625 |
enableAll:function(){for(var vHashCode in this._objects){this._objects[vHashCode].setEnabled(true); |
| 9113 |
}}return qx.event.handler.EventHandler.getTargetObject(target); |
|
|
| 9114 |
}}, |
| 9115 |
properties:{allowClientContextMenu:{check:"Boolean", |
| 9116 |
init:false}, |
| 9117 |
allowClientSelectAll:{check:"Boolean", |
| 9118 |
init:false}, |
| 9119 |
captureWidget:{check:"qx.ui.core.Widget", |
| 9120 |
nullable:true, |
| 9121 |
apply:"_applyCaptureWidget"}, |
| 9122 |
focusRoot:{check:"qx.ui.core.Parent", |
| 9123 |
nullable:true, |
| 9124 |
apply:"_applyFocusRoot"}}, |
| 9125 |
members:{_lastMouseEventType:null, |
| 9126 |
_lastMouseDown:false, |
| 9127 |
_lastMouseEventDate:0, |
| 9128 |
_applyCaptureWidget:function(value, |
| 9129 |
old){if(old){old.setCapture(false); |
| 9130 |
} |
| 9131 |
if(value){value.setCapture(true); |
| 9132 |
}}, |
8626 |
}}, |
| 9133 |
_applyFocusRoot:function(value, |
8627 |
disableAll:function(){for(var vHashCode in this._objects){this._objects[vHashCode].setEnabled(false); |
| 9134 |
old){if(old){old.setFocusedChild(null); |
8628 |
}}}, |
| 9135 |
} |
8629 |
destruct:function(){this._disposeObjectDeep("_objects"); |
| 9136 |
if(value&&value.getFocusedChild()==null){value.setFocusedChild(value); |
8630 |
}}); |
|
|
8631 |
|
| 8632 |
|
| 8633 |
|
| 8634 |
|
| 8635 |
/* ID: qx.ui.embed.IframeManager */ |
| 8636 |
qx.Class.define("qx.ui.embed.IframeManager", |
| 8637 |
{type:"singleton", |
| 8638 |
extend:qx.util.manager.Object, |
| 8639 |
construct:function(){this.base(arguments); |
| 8640 |
this._blocked={}; |
| 8641 |
}, |
| 8642 |
members:{handleMouseDown:function(evt){var iframeMap=this._blockData=qx.lang.Object.copy(this.getAll()); |
| 8643 |
for(var key in iframeMap){iframeMap[key].block(); |
| 9137 |
}}, |
8644 |
}}, |
| 9138 |
addCommand:function(vCommand){this._commands[vCommand.toHashCode()]=vCommand; |
8645 |
handleMouseUp:function(evt){var iframeMap=this._blockData; |
|
|
8646 |
for(var key in iframeMap){iframeMap[key].release(); |
| 8647 |
}}}}); |
| 8648 |
|
| 8649 |
|
| 8650 |
|
| 8651 |
|
| 8652 |
/* ID: qx.ui.layout.CanvasLayout */ |
| 8653 |
qx.Class.define("qx.ui.layout.CanvasLayout", |
| 8654 |
{extend:qx.ui.core.Parent, |
| 8655 |
construct:function(){this.base(arguments); |
| 9139 |
}, |
8656 |
}, |
| 9140 |
removeCommand:function(vCommand){delete this._commands[vCommand.toHashCode()]; |
8657 |
members:{_createLayoutImpl:function(){return new qx.ui.layout.impl.CanvasLayoutImpl(this); |
|
|
8658 |
}}}); |
| 8659 |
|
| 8660 |
|
| 8661 |
|
| 8662 |
|
| 8663 |
/* ID: qx.ui.layout.impl.LayoutImpl */ |
| 8664 |
qx.Class.define("qx.ui.layout.impl.LayoutImpl", |
| 8665 |
{extend:qx.core.Object, |
| 8666 |
construct:function(vWidget){this.base(arguments); |
| 8667 |
this._widget=vWidget; |
| 9141 |
}, |
8668 |
}, |
| 9142 |
_checkKeyEventMatch:function(e){var vCommand; |
8669 |
members:{getWidget:function(){return this._widget; |
| 9143 |
for(var vHash in this._commands){vCommand=this._commands[vHash]; |
|
|
| 9144 |
if(vCommand.getEnabled()&&vCommand.matchesKeyEvent(e)){if(!vCommand.execute(e.getTarget())){e.preventDefault(); |
| 9145 |
}break; |
| 9146 |
}}}, |
| 9147 |
attachEvents:function(){this.attachEventTypes(qx.event.handler.EventHandler.mouseEventTypes, |
| 9148 |
this.__onmouseevent); |
| 9149 |
this.attachEventTypes(qx.event.handler.EventHandler.dragEventTypes, |
| 9150 |
this.__ondragevent); |
| 9151 |
qx.event.handler.KeyEventHandler.getInstance()._attachEvents(); |
| 9152 |
qx.html.EventRegistration.addEventListener(window, |
| 9153 |
"blur", |
| 9154 |
this.__onwindowblur); |
| 9155 |
qx.html.EventRegistration.addEventListener(window, |
| 9156 |
"focus", |
| 9157 |
this.__onwindowfocus); |
| 9158 |
qx.html.EventRegistration.addEventListener(window, |
| 9159 |
"resize", |
| 9160 |
this.__onwindowresize); |
| 9161 |
document.body.onselect=document.onselectstart=document.onselectionchange=this.__onselectevent; |
| 9162 |
}, |
8670 |
}, |
| 9163 |
detachEvents:function(){this.detachEventTypes(qx.event.handler.EventHandler.mouseEventTypes, |
8671 |
computeChildBoxWidth:function(vChild){return vChild.getWidthValue()||vChild._computeBoxWidthFallback(); |
| 9164 |
this.__onmouseevent); |
|
|
| 9165 |
this.detachEventTypes(qx.event.handler.EventHandler.dragEventTypes, |
| 9166 |
this.__ondragevent); |
| 9167 |
qx.event.handler.KeyEventHandler.getInstance()._detachEvents(); |
| 9168 |
qx.html.EventRegistration.removeEventListener(window, |
| 9169 |
"blur", |
| 9170 |
this.__onwindowblur); |
| 9171 |
qx.html.EventRegistration.removeEventListener(window, |
| 9172 |
"focus", |
| 9173 |
this.__onwindowfocus); |
| 9174 |
qx.html.EventRegistration.removeEventListener(window, |
| 9175 |
"resize", |
| 9176 |
this.__onwindowresize); |
| 9177 |
document.body.onselect=document.onselectstart=document.onselectionchange=null; |
| 9178 |
}, |
8672 |
}, |
| 9179 |
attachEventTypes:function(vEventTypes, |
8673 |
computeChildBoxHeight:function(vChild){return vChild.getHeightValue()||vChild._computeBoxHeightFallback(); |
| 9180 |
vFunctionPointer){try{var el=qx.core.Variant.isSet("qx.client", |
|
|
| 9181 |
"gecko")?window:document.body; |
| 9182 |
for(var i=0, |
| 9183 |
l=vEventTypes.length;i<l;i++){qx.html.EventRegistration.addEventListener(el, |
| 9184 |
vEventTypes[i], |
| 9185 |
vFunctionPointer); |
| 9186 |
}}catch(ex){throw new Error("qx.event.handler.EventHandler: Failed to attach window event types: "+vEventTypes+": "+ex); |
| 9187 |
}}, |
| 9188 |
detachEventTypes:function(vEventTypes, |
| 9189 |
vFunctionPointer){try{var el=qx.core.Variant.isSet("qx.client", |
| 9190 |
"gecko")?window:document.body; |
| 9191 |
for(var i=0, |
| 9192 |
l=vEventTypes.length;i<l;i++){qx.html.EventRegistration.removeEventListener(el, |
| 9193 |
vEventTypes[i], |
| 9194 |
vFunctionPointer); |
| 9195 |
}}catch(ex){throw new Error("qx.event.handler.EventHandler: Failed to detach window event types: "+vEventTypes+": "+ex); |
| 9196 |
}}, |
| 9197 |
_onkeyevent_post:function(vDomEvent, |
| 9198 |
vType, |
| 9199 |
vKeyCode, |
| 9200 |
vCharCode, |
| 9201 |
vKeyIdentifier){var vDomTarget=qx.event.handler.EventHandler.getDomTarget(vDomEvent); |
| 9202 |
var vFocusRoot=this.getFocusRoot(); |
| 9203 |
var vTarget=this.getCaptureWidget()||(vFocusRoot==null?null:vFocusRoot.getActiveChild()); |
| 9204 |
var vKeyEventObject=new qx.event.type.KeyEvent(vType, |
| 9205 |
vDomEvent, |
| 9206 |
vDomTarget, |
| 9207 |
vTarget, |
| 9208 |
null, |
| 9209 |
vKeyCode, |
| 9210 |
vCharCode, |
| 9211 |
vKeyIdentifier); |
| 9212 |
if(vType=="keydown"){this._checkKeyEventMatch(vKeyEventObject); |
| 9213 |
} |
| 9214 |
if(vTarget!=null&&vTarget.getEnabled()){switch(vKeyIdentifier){case "Escape":case "Tab":if(qx.Class.isDefined("qx.ui.menu.Manager")){qx.ui.menu.Manager.getInstance().update(vTarget, |
| 9215 |
vType); |
| 9216 |
}break; |
| 9217 |
}if(!this.getAllowClientSelectAll()){if(vDomEvent.ctrlKey&&vKeyIdentifier=="A"){switch(vDomTarget.tagName.toLowerCase()){case "input":case "textarea":case "iframe":break; |
| 9218 |
default:qx.event.handler.EventHandler.stopDomEvent(vDomEvent); |
| 9219 |
}}}vTarget.dispatchEvent(vKeyEventObject); |
| 9220 |
if(qx.Class.isDefined("qx.event.handler.DragAndDropHandler")){qx.event.handler.DragAndDropHandler.getInstance().handleKeyEvent(vKeyEventObject); |
| 9221 |
}}vKeyEventObject.dispose(); |
| 9222 |
}, |
8674 |
}, |
| 9223 |
_onmouseevent:qx.core.Variant.select("qx.client", |
8675 |
computeChildNeededWidth:function(vChild){var vMinBox=vChild._computedMinWidthTypePercent?null:vChild.getMinWidthValue(); |
| 9224 |
{"mshtml":function(vDomEvent){if(!vDomEvent){vDomEvent=window.event; |
8676 |
var vMaxBox=vChild._computedMaxWidthTypePercent?null:vChild.getMaxWidthValue(); |
| 9225 |
}var vDomTarget=qx.event.handler.EventHandler.getDomTarget(vDomEvent); |
8677 |
var vBox=(vChild._computedWidthTypePercent||vChild._computedWidthTypeFlex?null:vChild.getWidthValue())||vChild.getPreferredBoxWidth()||0; |
| 9226 |
var vType=vDomEvent.type; |
8678 |
return qx.lang.Number.limit(vBox, |
| 9227 |
if(vType=="mousemove"){if(this._mouseIsDown&&vDomEvent.button==0){this._onmouseevent_post(vDomEvent, |
8679 |
vMinBox, |
| 9228 |
"mouseup"); |
8680 |
vMaxBox)+vChild.getMarginLeft()+vChild.getMarginRight(); |
| 9229 |
this._mouseIsDown=false; |
8681 |
}, |
| 9230 |
}}else{if(vType=="mousedown"){this._mouseIsDown=true; |
8682 |
computeChildNeededHeight:function(vChild){var vMinBox=vChild._computedMinHeightTypePercent?null:vChild.getMinHeightValue(); |
| 9231 |
}else if(vType=="mouseup"){this._mouseIsDown=false; |
8683 |
var vMaxBox=vChild._computedMaxHeightTypePercent?null:vChild.getMaxHeightValue(); |
| 9232 |
}if(vType=="mouseup"&&!this._lastMouseDown&&((new Date).valueOf()-this._lastMouseEventDate)<250){this._onmouseevent_post(vDomEvent, |
8684 |
var vBox=(vChild._computedHeightTypePercent||vChild._computedHeightTypeFlex?null:vChild.getHeightValue())||vChild.getPreferredBoxHeight()||0; |
| 9233 |
"mousedown"); |
8685 |
return qx.lang.Number.limit(vBox, |
| 9234 |
}else if(vType=="dblclick"&&this._lastMouseEventType=="mouseup"&&((new Date).valueOf()-this._lastMouseEventDate)<250){this._onmouseevent_post(vDomEvent, |
8686 |
vMinBox, |
| 9235 |
"click"); |
8687 |
vMaxBox)+vChild.getMarginTop()+vChild.getMarginBottom(); |
| 9236 |
} |
8688 |
}, |
| 9237 |
switch(vType){case "mousedown":case "mouseup":case "click":case "dblclick":case "contextmenu":this._lastMouseEventType=vType; |
8689 |
computeChildrenNeededWidth_max:function(){for(var i=0, |
| 9238 |
this._lastMouseEventDate=(new Date).valueOf(); |
8690 |
ch=this.getWidget().getVisibleChildren(), |
| 9239 |
this._lastMouseDown=vType=="mousedown"; |
8691 |
chl=ch.length, |
| 9240 |
}}this._onmouseevent_post(vDomEvent, |
8692 |
maxv=0;i<chl;i++){maxv=Math.max(maxv, |
| 9241 |
vType, |
8693 |
ch[i].getNeededWidth()); |
| 9242 |
vDomTarget); |
8694 |
}return maxv; |
|
|
8695 |
}, |
| 8696 |
computeChildrenNeededHeight_max:function(){for(var i=0, |
| 8697 |
ch=this.getWidget().getVisibleChildren(), |
| 8698 |
chl=ch.length, |
| 8699 |
maxv=0;i<chl;i++){maxv=Math.max(maxv, |
| 8700 |
ch[i].getNeededHeight()); |
| 8701 |
}return maxv; |
| 9243 |
}, |
8702 |
}, |
| 9244 |
"default":function(vDomEvent){var vDomTarget=qx.event.handler.EventHandler.getDomTarget(vDomEvent); |
8703 |
computeChildrenNeededWidth_sum:function(){for(var i=0, |
| 9245 |
var vType=vDomEvent.type; |
8704 |
ch=this.getWidget().getVisibleChildren(), |
| 9246 |
switch(vType){case "DOMMouseScroll":vType="mousewheel"; |
8705 |
chl=ch.length, |
| 9247 |
break; |
8706 |
sumv=0;i<chl;i++){sumv+=ch[i].getNeededWidth(); |
| 9248 |
case "click":case "dblclick":if(vDomEvent.which!==1){return; |
8707 |
}return sumv; |
| 9249 |
}}this._onmouseevent_post(vDomEvent, |
|
|
| 9250 |
vType, |
| 9251 |
vDomTarget); |
| 9252 |
}}), |
| 9253 |
_onmouseevent_click_fix:qx.core.Variant.select("qx.client", |
| 9254 |
{"gecko":function(vDomTarget, |
| 9255 |
vType, |
| 9256 |
vDispatchTarget){var vReturn=false; |
| 9257 |
switch(vType){case "mousedown":this._lastMouseDownDomTarget=vDomTarget; |
| 9258 |
this._lastMouseDownDispatchTarget=vDispatchTarget; |
| 9259 |
break; |
| 9260 |
case "mouseup":if(this._lastMouseDownDispatchTarget===vDispatchTarget&&vDomTarget!==this._lastMouseDownDomTarget){vReturn=true; |
| 9261 |
}else{this._lastMouseDownDomTarget=null; |
| 9262 |
this._lastMouseDownDispatchTarget=null; |
| 9263 |
}}return vReturn; |
| 9264 |
}, |
8708 |
}, |
| 9265 |
"default":null}), |
8709 |
computeChildrenNeededHeight_sum:function(){for(var i=0, |
| 9266 |
_onmouseevent_post:function(vDomEvent, |
8710 |
ch=this.getWidget().getVisibleChildren(), |
| 9267 |
vType, |
8711 |
chl=ch.length, |
| 9268 |
vDomTarget){var vEventObject, |
8712 |
sumv=0;i<chl;i++){sumv+=ch[i].getNeededHeight(); |
| 9269 |
vCaptureTarget, |
8713 |
}return sumv; |
| 9270 |
vDispatchTarget, |
8714 |
}, |
| 9271 |
vTarget, |
8715 |
computeChildrenNeededWidth:null, |
| 9272 |
vOriginalTarget, |
8716 |
computeChildrenNeededHeight:null, |
| 9273 |
vRelatedTarget, |
8717 |
updateSelfOnChildOuterWidthChange:function(vChild){}, |
| 9274 |
vFixClick, |
8718 |
updateSelfOnChildOuterHeightChange:function(vChild){}, |
| 9275 |
vTargetIsEnabled; |
8719 |
updateChildOnInnerWidthChange:function(vChild){}, |
| 9276 |
vCaptureTarget=this.getCaptureWidget(); |
8720 |
updateChildOnInnerHeightChange:function(vChild){}, |
| 9277 |
vOriginalTarget=qx.event.handler.EventHandler.getOriginalTargetObject(vDomTarget); |
8721 |
updateSelfOnJobQueueFlush:function(vJobQueue){}, |
| 9278 |
if(!vCaptureTarget){vDispatchTarget=vTarget=qx.event.handler.EventHandler.getTargetObject(null, |
8722 |
updateChildrenOnJobQueueFlush:function(vJobQueue){}, |
| 9279 |
vOriginalTarget, |
8723 |
updateChildrenOnAddChild:function(vChild, |
| 9280 |
true); |
8724 |
vIndex){}, |
| 9281 |
}else{vDispatchTarget=vCaptureTarget; |
8725 |
updateChildrenOnRemoveChild:function(vChild, |
| 9282 |
vTarget=qx.event.handler.EventHandler.getTargetObject(null, |
8726 |
vIndex){}, |
| 9283 |
vOriginalTarget, |
8727 |
updateChildrenOnMoveChild:function(vChild, |
| 9284 |
true); |
8728 |
vIndex, |
| 9285 |
}if(!vTarget){return; |
8729 |
vOldIndex){}, |
| 9286 |
}vTargetIsEnabled=vTarget.getEnabled(); |
8730 |
flushChildrenQueue:function(vChildrenQueue){var vWidget=this.getWidget(); |
| 9287 |
if(qx.core.Variant.isSet("qx.client", |
8731 |
for(var vHashCode in vChildrenQueue){vWidget._layoutChild(vChildrenQueue[vHashCode]); |
| 9288 |
"gecko")){vFixClick=this._onmouseevent_click_fix(vDomTarget, |
|
|
| 9289 |
vType, |
| 9290 |
vDispatchTarget); |
| 9291 |
}if(vType=="contextmenu"&&!this.getAllowClientContextMenu()){qx.event.handler.EventHandler.stopDomEvent(vDomEvent); |
| 9292 |
}if(vTargetIsEnabled&&vType=="mousedown"){qx.event.handler.FocusHandler.mouseFocus=true; |
| 9293 |
var vRoot=vTarget.getFocusRoot(); |
| 9294 |
if(vRoot){this.setFocusRoot(vRoot); |
| 9295 |
var vFocusTarget=vTarget; |
| 9296 |
while(!vFocusTarget.isFocusable()&&vFocusTarget!=vRoot){vFocusTarget=vFocusTarget.getParent(); |
| 9297 |
}vRoot.setFocusedChild(vFocusTarget); |
| 9298 |
vRoot.setActiveChild(vTarget); |
| 9299 |
}}switch(vType){case "mouseover":case "mouseout":vRelatedTarget=qx.event.handler.EventHandler.getRelatedTargetObjectFromEvent(vDomEvent); |
| 9300 |
if(vRelatedTarget==vTarget){return; |
| 9301 |
}}vEventObject=new qx.event.type.MouseEvent(vType, |
| 9302 |
vDomEvent, |
| 9303 |
vDomTarget, |
| 9304 |
vTarget, |
| 9305 |
vOriginalTarget, |
| 9306 |
vRelatedTarget); |
| 9307 |
qx.event.type.MouseEvent.storeEventState(vEventObject); |
| 9308 |
if(vTargetIsEnabled){var vEventWasProcessed=false; |
| 9309 |
vEventWasProcessed=vDispatchTarget?vDispatchTarget.dispatchEvent(vEventObject):true; |
| 9310 |
this._onmouseevent_special_post(vType, |
| 9311 |
vTarget, |
| 9312 |
vOriginalTarget, |
| 9313 |
vDispatchTarget, |
| 9314 |
vEventWasProcessed, |
| 9315 |
vEventObject, |
| 9316 |
vDomEvent); |
| 9317 |
}else{if(vType=="mouseover"){if(qx.Class.isDefined("qx.ui.popup.ToolTipManager")){qx.ui.popup.ToolTipManager.getInstance().handleMouseOver(vEventObject); |
| 9318 |
}}}vEventObject.dispose(); |
| 9319 |
vEventObject=null; |
| 9320 |
qx.ui.core.Widget.flushGlobalQueues(); |
| 9321 |
if(vFixClick){this._onmouseevent_post(vDomEvent, |
| 9322 |
"click", |
| 9323 |
this._lastMouseDownDomTarget); |
| 9324 |
this._lastMouseDownDomTarget=null; |
| 9325 |
this._lastMouseDownDispatchTarget=null; |
| 9326 |
}}, |
8732 |
}}, |
| 9327 |
_onmouseevent_special_post:function(vType, |
8733 |
layoutChild:function(vChild, |
| 9328 |
vTarget, |
8734 |
vJobs){}, |
| 9329 |
vOriginalTarget, |
8735 |
layoutChild_sizeLimitX:qx.core.Variant.select("qx.client", |
| 9330 |
vDispatchTarget, |
8736 |
{"mshtml":qx.lang.Function.returnTrue, |
| 9331 |
vEventWasProcessed, |
8737 |
"default":function(vChild, |
| 9332 |
vEventObject, |
8738 |
vJobs){if(vJobs.minWidth){vChild._computedMinWidthTypeNull?vChild._resetRuntimeMinWidth():vChild._renderRuntimeMinWidth(vChild.getMinWidthValue()); |
| 9333 |
vDomEvent){switch(vType){case "mousedown":if(qx.Class.isDefined("qx.ui.popup.PopupManager")){qx.ui.popup.PopupManager.getInstance().update(vTarget); |
8739 |
}else if(vJobs.initial&&!vChild._computedMinWidthTypeNull){vChild._renderRuntimeMinWidth(vChild.getMinWidthValue()); |
| 9334 |
} |
8740 |
} |
| 9335 |
if(qx.Class.isDefined("qx.ui.menu.Manager")){qx.ui.menu.Manager.getInstance().update(vTarget, |
8741 |
if(vJobs.maxWidth){vChild._computedMaxWidthTypeNull?vChild._resetRuntimeMaxWidth():vChild._renderRuntimeMaxWidth(vChild.getMaxWidthValue()); |
| 9336 |
vType); |
8742 |
}else if(vJobs.initial&&!vChild._computedMaxWidthTypeNull){vChild._renderRuntimeMaxWidth(vChild.getMaxWidthValue()); |
|
|
8743 |
}}}), |
| 8744 |
layoutChild_sizeLimitY:qx.core.Variant.select("qx.client", |
| 8745 |
{"mshtml":qx.lang.Function.returnTrue, |
| 8746 |
"default":function(vChild, |
| 8747 |
vJobs){if(vJobs.minHeight){vChild._computedMinHeightTypeNull?vChild._resetRuntimeMinHeight():vChild._renderRuntimeMinHeight(vChild.getMinHeightValue()); |
| 8748 |
}else if(vJobs.initial&&!vChild._computedMinHeightTypeNull){vChild._renderRuntimeMinHeight(vChild.getMinHeightValue()); |
| 9337 |
} |
8749 |
} |
| 9338 |
if(qx.Class.isDefined("qx.ui.embed.IframeManager")){qx.ui.embed.IframeManager.getInstance().handleMouseDown(vEventObject); |
8750 |
if(vJobs.maxHeight){vChild._computedMaxHeightTypeNull?vChild._resetRuntimeMaxHeight():vChild._renderRuntimeMaxHeight(vChild.getMaxHeightValue()); |
| 9339 |
}break; |
8751 |
}else if(vJobs.initial&&!vChild._computedMaxHeightTypeNull){vChild._renderRuntimeMaxHeight(vChild.getMaxHeightValue()); |
| 9340 |
case "mouseup":if(qx.Class.isDefined("qx.ui.menu.Manager")){qx.ui.menu.Manager.getInstance().update(vTarget, |
8752 |
}}}), |
| 9341 |
vType); |
8753 |
layoutChild_marginX:function(vChild, |
|
|
8754 |
vJobs){if(vJobs.marginLeft||vJobs.initial){var vValueLeft=vChild.getMarginLeft(); |
| 8755 |
vValueLeft!=null?vChild._renderRuntimeMarginLeft(vValueLeft):vChild._resetRuntimeMarginLeft(); |
| 9342 |
} |
8756 |
} |
| 9343 |
if(qx.Class.isDefined("qx.ui.embed.IframeManager")){qx.ui.embed.IframeManager.getInstance().handleMouseUp(vEventObject); |
8757 |
if(vJobs.marginRight||vJobs.initial){var vValueRight=vChild.getMarginRight(); |
| 9344 |
}break; |
8758 |
vValueRight!=null?vChild._renderRuntimeMarginRight(vValueRight):vChild._resetRuntimeMarginRight(); |
| 9345 |
case "mouseover":if(qx.Class.isDefined("qx.ui.popup.ToolTipManager")){qx.ui.popup.ToolTipManager.getInstance().handleMouseOver(vEventObject); |
|
|
| 9346 |
}break; |
| 9347 |
case "mouseout":if(qx.Class.isDefined("qx.ui.popup.ToolTipManager")){qx.ui.popup.ToolTipManager.getInstance().handleMouseOut(vEventObject); |
| 9348 |
}break; |
| 9349 |
}this._ignoreWindowBlur=vType==="mousedown"; |
| 9350 |
if(qx.Class.isDefined("qx.event.handler.DragAndDropHandler")&&vTarget){qx.event.handler.DragAndDropHandler.getInstance().handleMouseEvent(vEventObject); |
| 9351 |
}}, |
8759 |
}}, |
| 9352 |
_ondragevent:function(vEvent){if(!vEvent){vEvent=window.event; |
8760 |
layoutChild_marginY:function(vChild, |
| 9353 |
}qx.event.handler.EventHandler.stopDomEvent(vEvent); |
8761 |
vJobs){if(vJobs.marginTop||vJobs.initial){var vValueTop=vChild.getMarginTop(); |
| 9354 |
}, |
8762 |
vValueTop!=null?vChild._renderRuntimeMarginTop(vValueTop):vChild._resetRuntimeMarginTop(); |
| 9355 |
_onselectevent:function(e){if(!e){e=window.event; |
8763 |
} |
| 9356 |
}var target=qx.event.handler.EventHandler.getOriginalTargetObjectFromEvent(e); |
8764 |
if(vJobs.marginBottom||vJobs.initial){var vValueBottom=vChild.getMarginBottom(); |
| 9357 |
while(target){if(target.getSelectable()!=null){if(!target.getSelectable()){qx.event.handler.EventHandler.stopDomEvent(e); |
8765 |
vValueBottom!=null?vChild._renderRuntimeMarginBottom(vValueBottom):vChild._resetRuntimeMarginBottom(); |
| 9358 |
}break; |
|
|
| 9359 |
}target=target.getParent(); |
| 9360 |
}}, |
8766 |
}}, |
| 9361 |
_focused:false, |
8767 |
layoutChild_sizeX_essentialWrapper:function(vChild, |
| 9362 |
_onwindowblur:function(e){if(!this._focused||this._ignoreWindowBlur){return; |
8768 |
vJobs){return vChild._isWidthEssential()?this.layoutChild_sizeX(vChild, |
| 9363 |
}this._focused=false; |
8769 |
vJobs):vChild._resetRuntimeWidth(); |
| 9364 |
this.setCaptureWidget(null); |
|
|
| 9365 |
if(qx.Class.isDefined("qx.ui.popup.PopupManager")){qx.ui.popup.PopupManager.getInstance().update(); |
| 9366 |
}if(qx.Class.isDefined("qx.ui.menu.Manager")){qx.ui.menu.Manager.getInstance().update(); |
| 9367 |
}if(qx.Class.isDefined("qx.event.handler.DragAndDropHandler")){qx.event.handler.DragAndDropHandler.getInstance().globalCancelDrag(); |
| 9368 |
}qx.ui.core.ClientDocument.getInstance().createDispatchEvent("windowblur"); |
| 9369 |
}, |
| 9370 |
_onwindowfocus:function(e){if(this._focused){return; |
| 9371 |
}this._focused=true; |
| 9372 |
qx.ui.core.ClientDocument.getInstance().createDispatchEvent("windowfocus"); |
| 9373 |
}, |
8770 |
}, |
| 9374 |
_onwindowresize:function(e){qx.ui.core.ClientDocument.getInstance().createDispatchEvent("windowresize"); |
8771 |
layoutChild_sizeY_essentialWrapper:function(vChild, |
|
|
8772 |
vJobs){return vChild._isHeightEssential()?this.layoutChild_sizeY(vChild, |
| 8773 |
vJobs):vChild._resetRuntimeHeight(); |
| 9375 |
}}, |
8774 |
}}, |
| 9376 |
destruct:function(){this.detachEvents(); |
8775 |
defer:function(statics, |
| 9377 |
this._disposeObjectDeep("_commands", |
8776 |
members){members.computeChildrenNeededWidth=members.computeChildrenNeededWidth_max; |
| 9378 |
1); |
8777 |
members.computeChildrenNeededHeight=members.computeChildrenNeededHeight_max; |
| 9379 |
this._disposeFields("__onmouseevent", |
8778 |
}, |
| 9380 |
"__ondragevent", |
8779 |
destruct:function(){this._disposeFields("_widget"); |
| 9381 |
"__onselectevent", |
|
|
| 9382 |
"__onwindowblur", |
| 9383 |
"__onwindowfocus", |
| 9384 |
"__onwindowresize"); |
| 9385 |
this._disposeFields("_lastMouseEventType", |
| 9386 |
"_lastMouseDown", |
| 9387 |
"_lastMouseEventDate", |
| 9388 |
"_lastMouseDownDomTarget", |
| 9389 |
"_lastMouseDownDispatchTarget"); |
| 9390 |
}}); |
8780 |
}}); |
| 9391 |
|
8781 |
|
| 9392 |
|
8782 |
|
| 9393 |
|
8783 |
|
| 9394 |
|
8784 |
|
| 9395 |
/* ID: qx.dom.Node */ |
8785 |
/* ID: qx.lang.Number */ |
| 9396 |
qx.Class.define("qx.dom.Node", |
8786 |
qx.Class.define("qx.lang.Number", |
| 9397 |
{statics:{ELEMENT:1, |
8787 |
{statics:{isInRange:function(nr, |
| 9398 |
ATTRIBUTE:2, |
8788 |
vmin, |
| 9399 |
TEXT:3, |
8789 |
vmax){return nr>=vmin&&nr<=vmax; |
| 9400 |
CDATA_SECTION:4, |
|
|
| 9401 |
ENTITY_REFERENCE:5, |
| 9402 |
ENTITY:6, |
| 9403 |
PROCESSING_INSTRUCTION:7, |
| 9404 |
COMMENT:8, |
| 9405 |
DOCUMENT:9, |
| 9406 |
DOCUMENT_TYPE:10, |
| 9407 |
DOCUMENT_FRAGMENT:11, |
| 9408 |
NOTATION:12, |
| 9409 |
getDocument:function(node){if(this.isDocument(node)){return node; |
| 9410 |
}return node.ownerDocument||node.document||null; |
| 9411 |
}, |
8790 |
}, |
| 9412 |
getWindow:qx.core.Variant.select("qx.client", |
8791 |
isBetweenRange:function(nr, |
| 9413 |
{"mshtml":function(node){return this.getDocument(node).parentWindow; |
8792 |
vmin, |
|
|
8793 |
vmax){return nr>vmin&&nr<vmax; |
| 9414 |
}, |
8794 |
}, |
| 9415 |
"default":function(node){return this.getDocument(node).defaultView; |
8795 |
limit:function(nr, |
| 9416 |
}}), |
8796 |
vmin, |
| 9417 |
getDocumentElement:function(node){return this.getDocument(node).documentElement; |
8797 |
vmax){if(typeof vmax==="number"&&nr>vmax){return vmax; |
|
|
8798 |
}else if(typeof vmin==="number"&&nr<vmin){return vmin; |
| 8799 |
}else{return nr; |
| 8800 |
}}}}); |
| 8801 |
|
| 8802 |
|
| 8803 |
|
| 8804 |
|
| 8805 |
/* ID: qx.ui.layout.impl.CanvasLayoutImpl */ |
| 8806 |
qx.Class.define("qx.ui.layout.impl.CanvasLayoutImpl", |
| 8807 |
{extend:qx.ui.layout.impl.LayoutImpl, |
| 8808 |
construct:function(vWidget){this.base(arguments, |
| 8809 |
vWidget); |
| 8810 |
}, |
| 8811 |
members:{computeChildBoxWidth:function(vChild){var vValue=null; |
| 8812 |
if(vChild._computedLeftTypeNull||vChild._computedRightTypeNull){vValue=vChild.getWidthValue(); |
| 8813 |
}else if(vChild._hasParent){vValue=this.getWidget().getInnerWidth()-vChild.getLeftValue()-vChild.getRightValue(); |
| 8814 |
}return vValue||vChild._computeBoxWidthFallback(); |
| 8815 |
}, |
| 8816 |
computeChildBoxHeight:function(vChild){var vValue=null; |
| 8817 |
if(vChild._computedTopTypeNull||vChild._computedBottomTypeNull){vValue=vChild.getHeightValue(); |
| 8818 |
}else if(vChild._hasParent){vValue=this.getWidget().getInnerHeight()-vChild.getTopValue()-vChild.getBottomValue(); |
| 8819 |
}return vValue||vChild._computeBoxHeightFallback(); |
| 9418 |
}, |
8820 |
}, |
| 9419 |
getBodyElement:function(node){return this.getDocument(node).body; |
8821 |
computeChildNeededWidth:function(vChild){var vLeft=vChild._computedLeftTypePercent?null:vChild.getLeftValue(); |
|
|
8822 |
var vRight=vChild._computedRightTypePercent?null:vChild.getRightValue(); |
| 8823 |
var vMinBox=vChild._computedMinWidthTypePercent?null:vChild.getMinWidthValue(); |
| 8824 |
var vMaxBox=vChild._computedMaxWidthTypePercent?null:vChild.getMaxWidthValue(); |
| 8825 |
if(vLeft!=null&&vRight!=null){var vBox=vChild.getPreferredBoxWidth()||0; |
| 8826 |
}else{var vBox=(vChild._computedWidthTypePercent?null:vChild.getWidthValue())||vChild.getPreferredBoxWidth()||0; |
| 8827 |
}return qx.lang.Number.limit(vBox, |
| 8828 |
vMinBox, |
| 8829 |
vMaxBox)+vLeft+vRight+vChild.getMarginLeft()+vChild.getMarginRight(); |
| 9420 |
}, |
8830 |
}, |
| 9421 |
isElement:function(node){return !!(node&&node.nodeType===qx.dom.Node.ELEMENT); |
8831 |
computeChildNeededHeight:function(vChild){var vTop=vChild._computedTopTypePercent?null:vChild.getTopValue(); |
|
|
8832 |
var vBottom=vChild._computedBottomTypePercent?null:vChild.getBottomValue(); |
| 8833 |
var vMinBox=vChild._computedMinHeightTypePercent?null:vChild.getMinHeightValue(); |
| 8834 |
var vMaxBox=vChild._computedMaxHeightTypePercent?null:vChild.getMaxHeightValue(); |
| 8835 |
if(vTop!=null&&vBottom!=null){var vBox=vChild.getPreferredBoxHeight()||0; |
| 8836 |
}else{var vBox=(vChild._computedHeightTypePercent?null:vChild.getHeightValue())||vChild.getPreferredBoxHeight()||0; |
| 8837 |
}return qx.lang.Number.limit(vBox, |
| 8838 |
vMinBox, |
| 8839 |
vMaxBox)+vTop+vBottom+vChild.getMarginTop()+vChild.getMarginBottom(); |
| 9422 |
}, |
8840 |
}, |
| 9423 |
isDocument:function(node){return !!(node&&node.nodeType===qx.dom.Node.DOCUMENT); |
8841 |
updateChildOnInnerWidthChange:function(vChild){var vUpdatePercent=vChild._recomputePercentX(); |
|
|
8842 |
var vUpdateRange=vChild._recomputeRangeX(); |
| 8843 |
return vUpdatePercent||vUpdateRange; |
| 9424 |
}, |
8844 |
}, |
| 9425 |
isText:function(node){return !!(node&&node.nodeType===qx.dom.Node.TEXT); |
8845 |
updateChildOnInnerHeightChange:function(vChild){var vUpdatePercent=vChild._recomputePercentY(); |
|
|
8846 |
var vUpdateRange=vChild._recomputeRangeY(); |
| 8847 |
return vUpdatePercent||vUpdateRange; |
| 9426 |
}, |
8848 |
}, |
| 9427 |
isWindow:function(node){return node.document&&this.getWindow(node.document)==node; |
8849 |
layoutChild:function(vChild, |
|
|
8850 |
vJobs){this.layoutChild_sizeX_essentialWrapper(vChild, |
| 8851 |
vJobs); |
| 8852 |
this.layoutChild_sizeY_essentialWrapper(vChild, |
| 8853 |
vJobs); |
| 8854 |
this.layoutChild_sizeLimitX(vChild, |
| 8855 |
vJobs); |
| 8856 |
this.layoutChild_sizeLimitY(vChild, |
| 8857 |
vJobs); |
| 8858 |
this.layoutChild_locationX(vChild, |
| 8859 |
vJobs); |
| 8860 |
this.layoutChild_locationY(vChild, |
| 8861 |
vJobs); |
| 8862 |
this.layoutChild_marginX(vChild, |
| 8863 |
vJobs); |
| 8864 |
this.layoutChild_marginY(vChild, |
| 8865 |
vJobs); |
| 9428 |
}, |
8866 |
}, |
| 9429 |
getText:function(node){if(!node||!node.nodeType){return null; |
8867 |
layoutChild_sizeX:qx.core.Variant.select("qx.client", |
|
|
8868 |
{"mshtml|opera|webkit":function(vChild, |
| 8869 |
vJobs){if(vJobs.initial||vJobs.width||vJobs.minWidth||vJobs.maxWidth||vJobs.left||vJobs.right){if(vChild._computedMinWidthTypeNull&&vChild._computedWidthTypeNull&&vChild._computedMaxWidthTypeNull&&!(!vChild._computedLeftTypeNull&&!vChild._computedRightTypeNull)){vChild._resetRuntimeWidth(); |
| 8870 |
}else{vChild._renderRuntimeWidth(vChild.getBoxWidth()); |
| 8871 |
}}}, |
| 8872 |
"default":function(vChild, |
| 8873 |
vJobs){if(vJobs.initial||vJobs.width){vChild._computedWidthTypeNull?vChild._resetRuntimeWidth():vChild._renderRuntimeWidth(vChild.getWidthValue()); |
| 8874 |
}}}), |
| 8875 |
layoutChild_sizeY:qx.core.Variant.select("qx.client", |
| 8876 |
{"mshtml|opera|webkit":function(vChild, |
| 8877 |
vJobs){if(vJobs.initial||vJobs.height||vJobs.minHeight||vJobs.maxHeight||vJobs.top||vJobs.bottom){if(vChild._computedMinHeightTypeNull&&vChild._computedHeightTypeNull&&vChild._computedMaxHeightTypeNull&&!(!vChild._computedTopTypeNull&&!vChild._computedBottomTypeNull)){vChild._resetRuntimeHeight(); |
| 8878 |
}else{vChild._renderRuntimeHeight(vChild.getBoxHeight()); |
| 8879 |
}}}, |
| 8880 |
"default":function(vChild, |
| 8881 |
vJobs){if(vJobs.initial||vJobs.height){vChild._computedHeightTypeNull?vChild._resetRuntimeHeight():vChild._renderRuntimeHeight(vChild.getHeightValue()); |
| 8882 |
}}}), |
| 8883 |
layoutChild_locationX:function(vChild, |
| 8884 |
vJobs){var vWidget=this.getWidget(); |
| 8885 |
if(vJobs.initial||vJobs.left||vJobs.parentPaddingLeft){vChild._computedLeftTypeNull?vChild._computedRightTypeNull&&vWidget.getPaddingLeft()>0?vChild._renderRuntimeLeft(vWidget.getPaddingLeft()):vChild._resetRuntimeLeft():vChild._renderRuntimeLeft(vChild.getLeftValue()+vWidget.getPaddingLeft()); |
| 9430 |
} |
8886 |
} |
| 9431 |
switch(node.nodeType){case 1:var i, |
8887 |
if(vJobs.initial||vJobs.right||vJobs.parentPaddingRight){vChild._computedRightTypeNull?vChild._computedLeftTypeNull&&vWidget.getPaddingRight()>0?vChild._renderRuntimeRight(vWidget.getPaddingRight()):vChild._resetRuntimeRight():vChild._renderRuntimeRight(vChild.getRightValue()+vWidget.getPaddingRight()); |
| 9432 |
a=[], |
8888 |
}}, |
| 9433 |
nodes=node.childNodes, |
8889 |
layoutChild_locationY:function(vChild, |
| 9434 |
length=nodes.length; |
8890 |
vJobs){var vWidget=this.getWidget(); |
| 9435 |
for(i=0;i<length;i++){a[i]=this.getText(nodes[i]); |
8891 |
if(vJobs.initial||vJobs.top||vJobs.parentPaddingTop){vChild._computedTopTypeNull?vChild._computedBottomTypeNull&&vWidget.getPaddingTop()>0?vChild._renderRuntimeTop(vWidget.getPaddingTop()):vChild._resetRuntimeTop():vChild._renderRuntimeTop(vChild.getTopValue()+vWidget.getPaddingTop()); |
| 9436 |
}return a.join(""); |
8892 |
} |
| 9437 |
case 2:return node.nodeValue; |
8893 |
if(vJobs.initial||vJobs.bottom||vJobs.parentPaddingBottom){vChild._computedBottomTypeNull?vChild._computedTopTypeNull&&vWidget.getPaddingBottom()>0?vChild._renderRuntimeBottom(vWidget.getPaddingBottom()):vChild._resetRuntimeBottom():vChild._renderRuntimeBottom(vChild.getBottomValue()+vWidget.getPaddingBottom()); |
| 9438 |
break; |
8894 |
}}}}); |
| 9439 |
case 3:return node.nodeValue; |
|
|
| 9440 |
break; |
| 9441 |
}return null; |
| 9442 |
}}}); |
| 9443 |
|
8895 |
|
| 9444 |
|
8896 |
|
| 9445 |
|
8897 |
|
| 9446 |
|
8898 |
|
| 9447 |
/* ID: qx.event.handler.KeyEventHandler */ |
8899 |
/* ID: qx.ui.core.ClientDocument */ |
| 9448 |
qx.Class.define("qx.event.handler.KeyEventHandler", |
8900 |
qx.Class.define("qx.ui.core.ClientDocument", |
| 9449 |
{type:"singleton", |
8901 |
{type:"singleton", |
| 9450 |
extend:qx.core.Target, |
8902 |
extend:qx.ui.layout.CanvasLayout, |
| 9451 |
construct:function(){this.base(arguments); |
8903 |
construct:function(){this.base(arguments); |
| 9452 |
this.__onkeypress=qx.lang.Function.bind(this._onkeypress, |
8904 |
this._window=window; |
|
|
8905 |
this._document=window.document; |
| 8906 |
this.setElement(this._document.body); |
| 8907 |
this._document.body.style.position=""; |
| 8908 |
if(qx.core.Variant.isSet("qx.client", |
| 8909 |
"mshtml")&&(qx.core.Client.getInstance().getMajor()<7)){try{document.execCommand("BackgroundImageCache", |
| 8910 |
false, |
| 8911 |
true); |
| 8912 |
}catch(err){}}this._cachedInnerWidth=this._document.body.offsetWidth; |
| 8913 |
this._cachedInnerHeight=this._document.body.offsetHeight; |
| 8914 |
this.addEventListener("windowresize", |
| 8915 |
this._onwindowresize); |
| 8916 |
this._modalWidgets=[]; |
| 8917 |
this._modalNativeWindow=null; |
| 8918 |
this.activateFocusRoot(); |
| 8919 |
this.initHideFocus(); |
| 8920 |
this.initSelectable(); |
| 8921 |
qx.event.handler.EventHandler.getInstance().setFocusRoot(this); |
| 8922 |
}, |
| 8923 |
events:{"focus":"qx.event.type.Event", |
| 8924 |
"windowblur":"qx.event.type.Event", |
| 8925 |
"windowfocus":"qx.event.type.Event", |
| 8926 |
"windowresize":"qx.event.type.Event"}, |
| 8927 |
properties:{appearance:{refine:true, |
| 8928 |
init:"client-document"}, |
| 8929 |
enableElementFocus:{refine:true, |
| 8930 |
init:false}, |
| 8931 |
enabled:{refine:true, |
| 8932 |
init:true}, |
| 8933 |
selectable:{refine:true, |
| 8934 |
init:false}, |
| 8935 |
hideFocus:{refine:true, |
| 8936 |
init:true}, |
| 8937 |
globalCursor:{check:"String", |
| 8938 |
nullable:true, |
| 8939 |
themeable:true, |
| 8940 |
apply:"_applyGlobalCursor", |
| 8941 |
event:"changeGlobalCursor"}}, |
| 8942 |
members:{_applyParent:qx.lang.Function.returnTrue, |
| 8943 |
getTopLevelWidget:qx.lang.Function.returnThis, |
| 8944 |
getWindowElement:function(){return this._window; |
| 8945 |
}, |
| 8946 |
getDocumentElement:function(){return this._document; |
| 8947 |
}, |
| 8948 |
getParent:qx.lang.Function.returnNull, |
| 8949 |
getToolTip:qx.lang.Function.returnNull, |
| 8950 |
isMaterialized:qx.lang.Function.returnTrue, |
| 8951 |
isSeeable:qx.lang.Function.returnTrue, |
| 8952 |
_isDisplayable:true, |
| 8953 |
_hasParent:false, |
| 8954 |
_initialLayoutDone:true, |
| 8955 |
_getBlocker:function(){if(!this._blocker){this._blocker=new qx.ui.core.ClientDocumentBlocker; |
| 8956 |
this._blocker.addEventListener("mousedown", |
| 8957 |
this.blockHelper, |
| 9453 |
this); |
8958 |
this); |
| 9454 |
this.__onkeyupdown=qx.lang.Function.bind(this._onkeyupdown, |
8959 |
this._blocker.addEventListener("mouseup", |
|
|
8960 |
this.blockHelper, |
| 9455 |
this); |
8961 |
this); |
|
|
8962 |
this.add(this._blocker); |
| 8963 |
}return this._blocker; |
| 9456 |
}, |
8964 |
}, |
| 9457 |
members:{_attachEvents:function(){var el=qx.core.Variant.isSet("qx.client", |
8965 |
blockHelper:function(e){if(this._modalNativeWindow){if(!this._modalNativeWindow.isClosed()){this._modalNativeWindow.focus(); |
| 9458 |
"gecko")?window:document.body; |
8966 |
}else{this.debug("Window seems to be closed already! => Releasing Blocker"); |
| 9459 |
qx.html.EventRegistration.addEventListener(el, |
8967 |
this.release(this._modalNativeWindow); |
| 9460 |
"keypress", |
8968 |
}}}, |
| 9461 |
this.__onkeypress); |
8969 |
block:function(vActiveChild){this._getBlocker().show(); |
| 9462 |
qx.html.EventRegistration.addEventListener(el, |
8970 |
if(qx.Class.isDefined("qx.ui.window.Window")&&vActiveChild instanceof qx.ui.window.Window){this._modalWidgets.push(vActiveChild); |
| 9463 |
"keyup", |
8971 |
var vOrigIndex=vActiveChild.getZIndex(); |
| 9464 |
this.__onkeyupdown); |
8972 |
this._getBlocker().setZIndex(vOrigIndex); |
| 9465 |
qx.html.EventRegistration.addEventListener(el, |
8973 |
vActiveChild.setZIndex(vOrigIndex+1); |
| 9466 |
"keydown", |
8974 |
}else if(qx.Class.isDefined("qx.client.NativeWindow")&&vActiveChild instanceof qx.client.NativeWindow){this._modalNativeWindow=vActiveChild; |
| 9467 |
this.__onkeyupdown); |
8975 |
this._getBlocker().setZIndex(1e7); |
|
|
8976 |
}}, |
| 8977 |
release:function(vActiveChild){if(vActiveChild){if(qx.Class.isDefined("qx.client.NativeWindow")&&vActiveChild instanceof qx.client.NativeWindow){this._modalNativeWindow=null; |
| 8978 |
}else{qx.lang.Array.remove(this._modalWidgets, |
| 8979 |
vActiveChild); |
| 8980 |
}}var l=this._modalWidgets.length; |
| 8981 |
if(l==0){this._getBlocker().hide(); |
| 8982 |
}else{var oldActiveChild=this._modalWidgets[l-1]; |
| 8983 |
var o=oldActiveChild.getZIndex(); |
| 8984 |
this._getBlocker().setZIndex(o); |
| 8985 |
oldActiveChild.setZIndex(o+1); |
| 8986 |
}}, |
| 8987 |
createStyleElement:function(vCssText){return qx.html.StyleSheet.createElement(vCssText); |
| 9468 |
}, |
8988 |
}, |
| 9469 |
_detachEvents:function(){var el=qx.core.Variant.isSet("qx.client", |
8989 |
addCssRule:function(vSheet, |
| 9470 |
"gecko")?window:document.body; |
8990 |
vSelector, |
| 9471 |
qx.html.EventRegistration.removeEventListener(el, |
8991 |
vStyle){return qx.html.StyleSheet.addRule(vSheet, |
| 9472 |
"keypress", |
8992 |
vSelector, |
| 9473 |
this.__onkeypress); |
8993 |
vStyle); |
| 9474 |
qx.html.EventRegistration.removeEventListener(el, |
|
|
| 9475 |
"keyup", |
| 9476 |
this.__onkeyupdown); |
| 9477 |
qx.html.EventRegistration.removeEventListener(el, |
| 9478 |
"keydown", |
| 9479 |
this.__onkeyupdown); |
| 9480 |
}, |
8994 |
}, |
| 9481 |
_onkeyupdown:qx.core.Variant.select("qx.client", |
8995 |
removeCssRule:function(vSheet, |
| 9482 |
{"mshtml":function(domEvent){domEvent=window.event||domEvent; |
8996 |
vSelector){return qx.html.StyleSheet.removeRule(vSheet, |
| 9483 |
var keyCode=domEvent.keyCode; |
8997 |
vSelector); |
| 9484 |
var charcode=0; |
|
|
| 9485 |
var type=domEvent.type; |
| 9486 |
if(!(this._lastUpDownType[keyCode]=="keydown"&&type=="keydown")){this._idealKeyHandler(keyCode, |
| 9487 |
charcode, |
| 9488 |
type, |
| 9489 |
domEvent); |
| 9490 |
}if(type=="keydown"){if(this._isNonPrintableKeyCode(keyCode)|| |
| 9491 |
keyCode== |
| 9492 |
8||keyCode==9){this._idealKeyHandler(keyCode, |
| 9493 |
charcode, |
| 9494 |
"keypress", |
| 9495 |
domEvent); |
| 9496 |
}}this._lastUpDownType[keyCode]=type; |
| 9497 |
}, |
8998 |
}, |
| 9498 |
"gecko":function(domEvent){var keyCode=this._keyCodeFix[domEvent.keyCode]||domEvent.keyCode; |
8999 |
removeAllCssRules:function(vSheet){return qx.html.StyleSheet.removeAllRules(vSheet); |
| 9499 |
var charCode=domEvent.charCode; |
9000 |
}, |
| 9500 |
var type=domEvent.type; |
9001 |
_applyGlobalCursor:qx.core.Variant.select("qx.client", |
| 9501 |
if(qx.core.Client.getInstance().runsOnWindows()){var keyIdentifier=keyCode?this._keyCodeToIdentifier(keyCode):this._charCodeToIdentifier(charCode); |
9002 |
{"mshtml":function(value, |
| 9502 |
if(!(this._lastUpDownType[keyIdentifier]=="keypress"&&type=="keydown")){this._idealKeyHandler(keyCode, |
9003 |
old){if(value=="pointer"){value="hand"; |
| 9503 |
charCode, |
9004 |
} |
| 9504 |
type, |
9005 |
if(old=="pointer"){old="hand"; |
| 9505 |
domEvent); |
9006 |
}var elem, |
| 9506 |
}this._lastUpDownType[keyIdentifier]=type; |
9007 |
current; |
| 9507 |
}else{this._idealKeyHandler(keyCode, |
9008 |
var list=this._cursorElements; |
| 9508 |
charCode, |
9009 |
if(list){for(var i=0, |
| 9509 |
type, |
9010 |
l=list.length;i<l;i++){elem=list[i]; |
| 9510 |
domEvent); |
9011 |
if(elem.style.cursor==old){elem.style.cursor=elem._oldCursor; |
|
|
9012 |
elem._oldCursor=null; |
| 9013 |
}}}var all=document.all; |
| 9014 |
var list=this._cursorElements=[]; |
| 9015 |
if(value!=null&&value!=""&&value!="auto"){for(var i=0, |
| 9016 |
l=all.length;i<l;i++){elem=all[i]; |
| 9017 |
current=elem.style.cursor; |
| 9018 |
if(current!=null&¤t!=""&¤t!="auto"){elem._oldCursor=current; |
| 9019 |
elem.style.cursor=value; |
| 9020 |
list.push(elem); |
| 9021 |
}}document.body.style.cursor=value; |
| 9022 |
}else{document.body.style.cursor=""; |
| 9511 |
}}, |
9023 |
}}, |
| 9512 |
"webkit":function(domEvent){var keyCode=0; |
9024 |
"default":function(value, |
| 9513 |
var charCode=0; |
9025 |
old){if(!this._globalCursorStyleSheet){this._globalCursorStyleSheet=this.createStyleElement(); |
| 9514 |
var type=domEvent.type; |
9026 |
}this.removeCssRule(this._globalCursorStyleSheet, |
| 9515 |
if(qx.core.Client.getInstance().getVersion()<420){if(!this._lastCharCodeForType){this._lastCharCodeForType={}; |
9027 |
"*"); |
| 9516 |
}var isSafariSpecialKey=this._lastCharCodeForType[type]>63000; |
9028 |
if(value){this.addCssRule(this._globalCursorStyleSheet, |
| 9517 |
if(isSafariSpecialKey){this._lastCharCodeForType[type]=null; |
9029 |
"*", |
| 9518 |
return; |
9030 |
"cursor:"+value+" !important"); |
| 9519 |
}this._lastCharCodeForType[type]=domEvent.charCode; |
9031 |
}}}), |
| 9520 |
} |
9032 |
_onwindowresize:function(e){if(qx.Class.isDefined("qx.ui.popup.PopupManager")){qx.ui.popup.PopupManager.getInstance().update(); |
| 9521 |
if(type=="keyup"||type=="keydown"){keyCode=this._charCode2KeyCode[domEvent.charCode]||domEvent.keyCode; |
9033 |
}this._recomputeInnerWidth(); |
| 9522 |
}else{if(this._charCode2KeyCode[domEvent.charCode]){keyCode=this._charCode2KeyCode[domEvent.charCode]; |
9034 |
this._recomputeInnerHeight(); |
| 9523 |
}else{charCode=domEvent.charCode; |
9035 |
qx.ui.core.Widget.flushGlobalQueues(); |
| 9524 |
}}this._idealKeyHandler(keyCode, |
|
|
| 9525 |
charCode, |
| 9526 |
type, |
| 9527 |
domEvent); |
| 9528 |
}, |
9036 |
}, |
| 9529 |
"opera":function(domEvent){this._idealKeyHandler(domEvent.keyCode, |
9037 |
_computeInnerWidth:function(){return this._document.body.offsetWidth; |
| 9530 |
0, |
|
|
| 9531 |
domEvent.type, |
| 9532 |
domEvent); |
| 9533 |
this._lastKeyCode=domEvent.keyCode; |
| 9534 |
}, |
9038 |
}, |
| 9535 |
"default":function(){throw new Error("Unsupported browser for key event handler!"); |
9039 |
_computeInnerHeight:function(){return this._document.body.offsetHeight; |
| 9536 |
}}), |
|
|
| 9537 |
_onkeypress:qx.core.Variant.select("qx.client", |
| 9538 |
{"mshtml":function(domEvent){var domEvent=window.event||domEvent; |
| 9539 |
if(this._charCode2KeyCode[domEvent.keyCode]){this._idealKeyHandler(this._charCode2KeyCode[domEvent.keyCode], |
| 9540 |
0, |
| 9541 |
domEvent.type, |
| 9542 |
domEvent); |
| 9543 |
}else{this._idealKeyHandler(0, |
| 9544 |
domEvent.keyCode, |
| 9545 |
domEvent.type, |
| 9546 |
domEvent); |
| 9547 |
}}, |
9040 |
}}, |
| 9548 |
"gecko":function(domEvent){var keyCode=this._keyCodeFix[domEvent.keyCode]||domEvent.keyCode; |
9041 |
settings:{"qx.enableApplicationLayout":true, |
| 9549 |
var charCode=domEvent.charCode; |
9042 |
"qx.boxModelCorrection":true}, |
| 9550 |
var type=domEvent.type; |
9043 |
defer:function(){if(qx.core.Setting.get("qx.boxModelCorrection")){var boxSizingAttr=qx.core.Client.getInstance().getEngineBoxSizingAttributes(); |
| 9551 |
if(qx.core.Client.getInstance().runsOnWindows()){var keyIdentifier=keyCode?this._keyCodeToIdentifier(keyCode):this._charCodeToIdentifier(charCode); |
9044 |
var borderBoxCss=boxSizingAttr.join(":border-box;")+":border-box;"; |
| 9552 |
if(!(this._lastUpDownType[keyIdentifier]=="keypress"&&type=="keydown")){this._idealKeyHandler(keyCode, |
9045 |
var contentBoxCss=boxSizingAttr.join(":content-box;")+":content-box;"; |
| 9553 |
charCode, |
9046 |
qx.html.StyleSheet.createElement("html,body { margin:0;border:0;padding:0; } "+"html { border:0 none; } "+"*{"+borderBoxCss+"} "+"img{"+contentBoxCss+"}"); |
| 9554 |
type, |
9047 |
} |
| 9555 |
domEvent); |
9048 |
if(qx.core.Setting.get("qx.enableApplicationLayout")){qx.html.StyleSheet.createElement("html,body{width:100%;height:100%;overflow:hidden;}"); |
| 9556 |
}this._lastUpDownType[keyIdentifier]=type; |
|
|
| 9557 |
}else{this._idealKeyHandler(keyCode, |
| 9558 |
charCode, |
| 9559 |
type, |
| 9560 |
domEvent); |
| 9561 |
}}, |
9049 |
}}, |
| 9562 |
"webkit":function(domEvent){var keyCode=0; |
9050 |
destruct:function(){this._disposeObjects("_blocker"); |
| 9563 |
var charCode=0; |
9051 |
this._disposeFields("_window", |
| 9564 |
var type=domEvent.type; |
9052 |
"_document", |
| 9565 |
if(qx.core.Client.getInstance().getVersion()<420){if(!this._lastCharCodeForType){this._lastCharCodeForType={}; |
9053 |
"_modalWidgets", |
| 9566 |
}var isSafariSpecialKey=this._lastCharCodeForType[type]>63000; |
9054 |
"_modalNativeWindow", |
| 9567 |
if(isSafariSpecialKey){this._lastCharCodeForType[type]=null; |
9055 |
"_globalCursorStyleSheet"); |
| 9568 |
return; |
9056 |
}}); |
| 9569 |
}this._lastCharCodeForType[type]=domEvent.charCode; |
9057 |
|
|
|
9058 |
|
| 9059 |
|
| 9060 |
|
| 9061 |
/* ID: qx.ui.basic.Terminator */ |
| 9062 |
qx.Class.define("qx.ui.basic.Terminator", |
| 9063 |
{extend:qx.ui.core.Widget, |
| 9064 |
members:{renderPadding:function(changes){if(changes.paddingLeft){this._renderRuntimePaddingLeft(this.getPaddingLeft()); |
| 9570 |
} |
9065 |
} |
| 9571 |
if(type=="keyup"||type=="keydown"){keyCode=this._charCode2KeyCode[domEvent.charCode]||domEvent.keyCode; |
9066 |
if(changes.paddingRight){this._renderRuntimePaddingRight(this.getPaddingRight()); |
| 9572 |
}else{if(this._charCode2KeyCode[domEvent.charCode]){keyCode=this._charCode2KeyCode[domEvent.charCode]; |
9067 |
} |
| 9573 |
}else{charCode=domEvent.charCode; |
9068 |
if(changes.paddingTop){this._renderRuntimePaddingTop(this.getPaddingTop()); |
| 9574 |
}}this._idealKeyHandler(keyCode, |
9069 |
} |
| 9575 |
charCode, |
9070 |
if(changes.paddingBottom){this._renderRuntimePaddingBottom(this.getPaddingBottom()); |
| 9576 |
type, |
9071 |
}}, |
| 9577 |
domEvent); |
9072 |
_renderContent:function(){if(this._computedWidthTypePixel){this._cachedPreferredInnerWidth=null; |
|
|
9073 |
}else{this._invalidatePreferredInnerWidth(); |
| 9074 |
}if(this._computedHeightTypePixel){this._cachedPreferredInnerHeight=null; |
| 9075 |
}else{this._invalidatePreferredInnerHeight(); |
| 9076 |
}if(this._initialLayoutDone){this.addToJobQueue("load"); |
| 9077 |
}}, |
| 9078 |
_layoutPost:function(changes){if(changes.initial||changes.load||changes.width||changes.height){this._postApply(); |
| 9079 |
}}, |
| 9080 |
_postApply:qx.lang.Function.returnTrue, |
| 9081 |
_computeBoxWidthFallback:function(){return this.getPreferredBoxWidth(); |
| 9578 |
}, |
9082 |
}, |
| 9579 |
"opera":function(domEvent){var keyCode=domEvent.keyCode; |
9083 |
_computeBoxHeightFallback:function(){return this.getPreferredBoxHeight(); |
| 9580 |
var type=domEvent.type; |
|
|
| 9581 |
if(keyCode!=this._lastKeyCode){this._idealKeyHandler(0, |
| 9582 |
this._lastKeyCode, |
| 9583 |
type, |
| 9584 |
domEvent); |
| 9585 |
}else{if(this._keyCodeToIdentifierMap[keyCode]){this._idealKeyHandler(keyCode, |
| 9586 |
0, |
| 9587 |
type, |
| 9588 |
domEvent); |
| 9589 |
}else{this._idealKeyHandler(0, |
| 9590 |
keyCode, |
| 9591 |
type, |
| 9592 |
domEvent); |
| 9593 |
}}this._lastKeyCode=keyCode; |
| 9594 |
}, |
9084 |
}, |
| 9595 |
"default":function(){throw new Error("Unsupported browser for key event handler!"); |
9085 |
_computePreferredInnerWidth:qx.lang.Function.returnZero, |
| 9596 |
}}), |
9086 |
_computePreferredInnerHeight:qx.lang.Function.returnZero, |
| 9597 |
_specialCharCodeMap:{8:"Backspace", |
9087 |
_isWidthEssential:function(){if(!this._computedLeftTypeNull&&!this._computedRightTypeNull){return true; |
| 9598 |
9:"Tab", |
9088 |
} |
| 9599 |
13:"Enter", |
9089 |
if(!this._computedWidthTypeNull&&!this._computedWidthTypeAuto){return true; |
| 9600 |
27:"Escape", |
9090 |
} |
| 9601 |
32:"Space"}, |
9091 |
if(!this._computedMinWidthTypeNull&&!this._computedMinWidthTypeAuto){return true; |
| 9602 |
_keyCodeToIdentifierMap:{16:"Shift", |
9092 |
} |
| 9603 |
17:"Control", |
9093 |
if(!this._computedMaxWidthTypeNull&&!this._computedMaxWidthTypeAuto){return true; |
| 9604 |
18:"Alt", |
9094 |
} |
| 9605 |
20:"CapsLock", |
9095 |
if(this._borderElement){return true; |
| 9606 |
224:"Meta", |
9096 |
}return false; |
| 9607 |
37:"Left", |
|
|
| 9608 |
38:"Up", |
| 9609 |
39:"Right", |
| 9610 |
40:"Down", |
| 9611 |
33:"PageUp", |
| 9612 |
34:"PageDown", |
| 9613 |
35:"End", |
| 9614 |
36:"Home", |
| 9615 |
45:"Insert", |
| 9616 |
46:"Delete", |
| 9617 |
112:"F1", |
| 9618 |
113:"F2", |
| 9619 |
114:"F3", |
| 9620 |
115:"F4", |
| 9621 |
116:"F5", |
| 9622 |
117:"F6", |
| 9623 |
118:"F7", |
| 9624 |
119:"F8", |
| 9625 |
120:"F9", |
| 9626 |
121:"F10", |
| 9627 |
122:"F11", |
| 9628 |
123:"F12", |
| 9629 |
144:"NumLock", |
| 9630 |
44:"PrintScreen", |
| 9631 |
145:"Scroll", |
| 9632 |
19:"Pause", |
| 9633 |
91:"Win", |
| 9634 |
93:"Apps"}, |
| 9635 |
_numpadToCharCode:{96:"0".charCodeAt(0), |
| 9636 |
97:"1".charCodeAt(0), |
| 9637 |
98:"2".charCodeAt(0), |
| 9638 |
99:"3".charCodeAt(0), |
| 9639 |
100:"4".charCodeAt(0), |
| 9640 |
101:"5".charCodeAt(0), |
| 9641 |
102:"6".charCodeAt(0), |
| 9642 |
103:"7".charCodeAt(0), |
| 9643 |
104:"8".charCodeAt(0), |
| 9644 |
105:"9".charCodeAt(0), |
| 9645 |
106:"*".charCodeAt(0), |
| 9646 |
107:"+".charCodeAt(0), |
| 9647 |
109:"-".charCodeAt(0), |
| 9648 |
110:",".charCodeAt(0), |
| 9649 |
111:"/".charCodeAt(0)}, |
| 9650 |
_charCodeA:"A".charCodeAt(0), |
| 9651 |
_charCodeZ:"Z".charCodeAt(0), |
| 9652 |
_charCode0:"0".charCodeAt(0), |
| 9653 |
_charCode9:"9".charCodeAt(0), |
| 9654 |
_isNonPrintableKeyCode:function(keyCode){return this._keyCodeToIdentifierMap[keyCode]?true:false; |
| 9655 |
}, |
9097 |
}, |
| 9656 |
_isIdentifiableKeyCode:function(keyCode){if(keyCode>=this._charCodeA&&keyCode<=this._charCodeZ){return true; |
9098 |
_isHeightEssential:function(){if(!this._computedTopTypeNull&&!this._computedBottomTypeNull){return true; |
| 9657 |
}if(keyCode>=this._charCode0&&keyCode<=this._charCode9){return true; |
9099 |
} |
| 9658 |
}if(this._specialCharCodeMap[keyCode]){return true; |
9100 |
if(!this._computedHeightTypeNull&&!this._computedHeightTypeAuto){return true; |
| 9659 |
}if(this._numpadToCharCode[keyCode]){return true; |
9101 |
} |
| 9660 |
}if(this._isNonPrintableKeyCode(keyCode)){return true; |
9102 |
if(!this._computedMinHeightTypeNull&&!this._computedMinHeightTypeAuto){return true; |
|
|
9103 |
} |
| 9104 |
if(!this._computedMaxHeightTypeNull&&!this._computedMaxHeightTypeAuto){return true; |
| 9105 |
} |
| 9106 |
if(this._borderElement){return true; |
| 9661 |
}return false; |
9107 |
}return false; |
|
|
9108 |
}}}); |
| 9109 |
|
| 9110 |
|
| 9111 |
|
| 9112 |
|
| 9113 |
/* ID: qx.ui.core.ClientDocumentBlocker */ |
| 9114 |
qx.Class.define("qx.ui.core.ClientDocumentBlocker", |
| 9115 |
{extend:qx.ui.basic.Terminator, |
| 9116 |
construct:function(){this.base(arguments); |
| 9117 |
this.initTop(); |
| 9118 |
this.initLeft(); |
| 9119 |
this.initWidth(); |
| 9120 |
this.initHeight(); |
| 9121 |
this.initZIndex(); |
| 9122 |
}, |
| 9123 |
properties:{appearance:{refine:true, |
| 9124 |
init:"client-document-blocker"}, |
| 9125 |
zIndex:{refine:true, |
| 9126 |
init:1e8}, |
| 9127 |
top:{refine:true, |
| 9128 |
init:0}, |
| 9129 |
left:{refine:true, |
| 9130 |
init:0}, |
| 9131 |
width:{refine:true, |
| 9132 |
init:"100%"}, |
| 9133 |
height:{refine:true, |
| 9134 |
init:"100%"}, |
| 9135 |
display:{refine:true, |
| 9136 |
init:false}}, |
| 9137 |
members:{getFocusRoot:function(){return null; |
| 9138 |
}}}); |
| 9139 |
|
| 9140 |
|
| 9141 |
|
| 9142 |
|
| 9143 |
/* ID: qx.theme.manager.Appearance */ |
| 9144 |
qx.Class.define("qx.theme.manager.Appearance", |
| 9145 |
{type:"singleton", |
| 9146 |
extend:qx.util.manager.Object, |
| 9147 |
construct:function(){this.base(arguments); |
| 9148 |
this.__cache={}; |
| 9149 |
this.__stateMap={}; |
| 9150 |
this.__stateMapLength=1; |
| 9662 |
}, |
9151 |
}, |
| 9663 |
isValidKeyIdentifier:function(keyIdentifier){if(this._identifierToKeyCodeMap[keyIdentifier]){return true; |
9152 |
properties:{appearanceTheme:{check:"Theme", |
| 9664 |
} |
9153 |
nullable:true, |
| 9665 |
if(keyIdentifier.length!=1){return false; |
9154 |
apply:"_applyAppearanceTheme", |
|
|
9155 |
event:"changeAppearanceTheme"}}, |
| 9156 |
members:{_applyAppearanceTheme:function(value, |
| 9157 |
old){this._currentTheme=value; |
| 9158 |
this._oldTheme=old; |
| 9159 |
if(qx.theme.manager.Meta.getInstance().getAutoSync()){this.syncAppearanceTheme(); |
| 9160 |
}}, |
| 9161 |
syncAppearanceTheme:function(){if(!this._currentTheme&&!this._oldTheme){return; |
| 9666 |
} |
9162 |
} |
| 9667 |
if(keyIdentifier>="0"&&keyIdentifier<="9"){return true; |
9163 |
if(this._currentTheme){this.__cache[this._currentTheme.name]={}; |
|
|
9164 |
}var app=qx.core.Init.getInstance().getApplication(); |
| 9165 |
if(app&&app.getUiReady()){qx.ui.core.ClientDocument.getInstance()._recursiveAppearanceThemeUpdate(this._currentTheme, |
| 9166 |
this._oldTheme); |
| 9668 |
} |
9167 |
} |
| 9669 |
if(keyIdentifier>="A"&&keyIdentifier<="Z"){return true; |
9168 |
if(this._oldTheme){delete this.__cache[this._oldTheme.name]; |
|
|
9169 |
}delete this._currentTheme; |
| 9170 |
delete this._oldTheme; |
| 9171 |
}, |
| 9172 |
styleFrom:function(id, |
| 9173 |
states){var theme=this.getAppearanceTheme(); |
| 9174 |
if(!theme){return; |
| 9175 |
}return this.styleFromTheme(theme, |
| 9176 |
id, |
| 9177 |
states); |
| 9178 |
}, |
| 9179 |
styleFromTheme:function(theme, |
| 9180 |
id, |
| 9181 |
states){var entry=theme.appearances[id]; |
| 9182 |
if(!entry){{this.warn("Missing appearance entry: "+id); |
| 9183 |
}; |
| 9184 |
return null; |
| 9185 |
}if(!entry.style){if(entry.include){return this.styleFromTheme(theme, |
| 9186 |
entry.include, |
| 9187 |
states); |
| 9188 |
}else{return null; |
| 9189 |
}}var map=this.__stateMap; |
| 9190 |
var helper=[id]; |
| 9191 |
for(var state in states){if(!map[state]){map[state]=this.__stateMapLength++; |
| 9192 |
}helper[map[state]]=true; |
| 9193 |
}var unique=helper.join(); |
| 9194 |
var cache=this.__cache[theme.name]; |
| 9195 |
if(cache&&cache[unique]!==undefined){return cache[unique]; |
| 9196 |
}var result; |
| 9197 |
if(entry.include||entry.base){var local=entry.style(states); |
| 9198 |
var incl; |
| 9199 |
if(entry.include){incl=this.styleFromTheme(theme, |
| 9200 |
entry.include, |
| 9201 |
states); |
| 9202 |
}result={}; |
| 9203 |
if(entry.base){var base=this.styleFromTheme(entry.base, |
| 9204 |
id, |
| 9205 |
states); |
| 9206 |
if(entry.include){for(var key in base){if(incl[key]===undefined&&local[key]===undefined){result[key]=base[key]; |
| 9207 |
}}}else{for(var key in base){if(local[key]===undefined){result[key]=base[key]; |
| 9208 |
}}}}if(entry.include){for(var key in incl){if(local[key]===undefined){result[key]=incl[key]; |
| 9209 |
}}}for(var key in local){result[key]=local[key]; |
| 9210 |
}}else{result=entry.style(states); |
| 9211 |
}if(cache){cache[unique]=result||null; |
| 9212 |
}return result||null; |
| 9213 |
}}, |
| 9214 |
destruct:function(){this._disposeFields("__cache", |
| 9215 |
"__stateMap"); |
| 9216 |
}}); |
| 9217 |
|
| 9218 |
|
| 9219 |
|
| 9220 |
|
| 9221 |
/* ID: qx.theme.manager.Meta */ |
| 9222 |
qx.Class.define("qx.theme.manager.Meta", |
| 9223 |
{type:"singleton", |
| 9224 |
extend:qx.core.Target, |
| 9225 |
properties:{theme:{check:"Theme", |
| 9226 |
nullable:true, |
| 9227 |
apply:"_applyTheme", |
| 9228 |
event:"changeTheme"}, |
| 9229 |
autoSync:{check:"Boolean", |
| 9230 |
init:true, |
| 9231 |
apply:"_applyAutoSync"}}, |
| 9232 |
members:{_applyTheme:function(value, |
| 9233 |
old){var color=null; |
| 9234 |
var border=null; |
| 9235 |
var font=null; |
| 9236 |
var widget=null; |
| 9237 |
var icon=null; |
| 9238 |
var appearance=null; |
| 9239 |
if(value){color=value.meta.color||null; |
| 9240 |
border=value.meta.border||null; |
| 9241 |
font=value.meta.font||null; |
| 9242 |
widget=value.meta.widget||null; |
| 9243 |
icon=value.meta.icon||null; |
| 9244 |
appearance=value.meta.appearance||null; |
| 9670 |
} |
9245 |
} |
| 9671 |
switch(keyIdentifier){case "+":case "-":case "*":case "/":return true; |
9246 |
if(old){this.setAutoSync(false); |
| 9672 |
default:return false; |
9247 |
}var colorMgr=qx.theme.manager.Color.getInstance(); |
|
|
9248 |
var borderMgr=qx.theme.manager.Border.getInstance(); |
| 9249 |
var fontMgr=qx.theme.manager.Font.getInstance(); |
| 9250 |
var iconMgr=qx.theme.manager.Icon.getInstance(); |
| 9251 |
var widgetMgr=qx.theme.manager.Widget.getInstance(); |
| 9252 |
var appearanceMgr=qx.theme.manager.Appearance.getInstance(); |
| 9253 |
colorMgr.setColorTheme(color); |
| 9254 |
borderMgr.setBorderTheme(border); |
| 9255 |
fontMgr.setFontTheme(font); |
| 9256 |
widgetMgr.setWidgetTheme(widget); |
| 9257 |
iconMgr.setIconTheme(icon); |
| 9258 |
appearanceMgr.setAppearanceTheme(appearance); |
| 9259 |
if(old){this.setAutoSync(true); |
| 9673 |
}}, |
9260 |
}}, |
| 9674 |
_keyCodeToIdentifier:function(keyCode){if(this._isIdentifiableKeyCode(keyCode)){var numPadKeyCode=this._numpadToCharCode[keyCode]; |
9261 |
_applyAutoSync:function(value, |
| 9675 |
if(numPadKeyCode){return String.fromCharCode(numPadKeyCode); |
9262 |
old){if(value){qx.theme.manager.Appearance.getInstance().syncAppearanceTheme(); |
| 9676 |
}return (this._keyCodeToIdentifierMap[keyCode]||this._specialCharCodeMap[keyCode]||String.fromCharCode(keyCode)); |
9263 |
qx.theme.manager.Icon.getInstance().syncIconTheme(); |
| 9677 |
}else{return "Unidentified"; |
9264 |
qx.theme.manager.Widget.getInstance().syncWidgetTheme(); |
|
|
9265 |
qx.theme.manager.Font.getInstance().syncFontTheme(); |
| 9266 |
qx.theme.manager.Border.getInstance().syncBorderTheme(); |
| 9267 |
qx.theme.manager.Color.getInstance().syncColorTheme(); |
| 9678 |
}}, |
9268 |
}}, |
| 9679 |
_charCodeToIdentifier:function(charCode){return this._specialCharCodeMap[charCode]||String.fromCharCode(charCode).toUpperCase(); |
9269 |
initialize:function(){var setting=qx.core.Setting; |
|
|
9270 |
var theme, |
| 9271 |
obj; |
| 9272 |
theme=setting.get("qx.theme"); |
| 9273 |
if(theme){obj=qx.Theme.getByName(theme); |
| 9274 |
if(!obj){throw new Error("The meta theme to use is not available: "+theme); |
| 9275 |
}this.setTheme(obj); |
| 9276 |
}theme=setting.get("qx.colorTheme"); |
| 9277 |
if(theme){obj=qx.Theme.getByName(theme); |
| 9278 |
if(!obj){throw new Error("The color theme to use is not available: "+theme); |
| 9279 |
}qx.theme.manager.Color.getInstance().setColorTheme(obj); |
| 9280 |
}theme=setting.get("qx.borderTheme"); |
| 9281 |
if(theme){obj=qx.Theme.getByName(theme); |
| 9282 |
if(!obj){throw new Error("The border theme to use is not available: "+theme); |
| 9283 |
}qx.theme.manager.Border.getInstance().setBorderTheme(obj); |
| 9284 |
}theme=setting.get("qx.fontTheme"); |
| 9285 |
if(theme){obj=qx.Theme.getByName(theme); |
| 9286 |
if(!obj){throw new Error("The font theme to use is not available: "+theme); |
| 9287 |
}qx.theme.manager.Font.getInstance().setFontTheme(obj); |
| 9288 |
}theme=setting.get("qx.widgetTheme"); |
| 9289 |
if(theme){obj=qx.Theme.getByName(theme); |
| 9290 |
if(!obj){throw new Error("The widget theme to use is not available: "+theme); |
| 9291 |
}qx.theme.manager.Widget.getInstance().setWidgetTheme(obj); |
| 9292 |
}theme=setting.get("qx.iconTheme"); |
| 9293 |
if(theme){obj=qx.Theme.getByName(theme); |
| 9294 |
if(!obj){throw new Error("The icon theme to use is not available: "+theme); |
| 9295 |
}qx.theme.manager.Icon.getInstance().setIconTheme(obj); |
| 9296 |
}theme=setting.get("qx.appearanceTheme"); |
| 9297 |
if(theme){obj=qx.Theme.getByName(theme); |
| 9298 |
if(!obj){throw new Error("The appearance theme to use is not available: "+theme); |
| 9299 |
}qx.theme.manager.Appearance.getInstance().setAppearanceTheme(obj); |
| 9300 |
}}, |
| 9301 |
__queryThemes:function(key){var reg=qx.Theme.getAll(); |
| 9302 |
var theme; |
| 9303 |
var list=[]; |
| 9304 |
for(var name in reg){theme=reg[name]; |
| 9305 |
if(theme[key]){list.push(theme); |
| 9306 |
}}return list; |
| 9680 |
}, |
9307 |
}, |
| 9681 |
_identifierToKeyCode:function(keyIdentifier){return this._identifierToKeyCodeMap[keyIdentifier]||keyIdentifier.charCodeAt(0); |
9308 |
getMetaThemes:function(){return this.__queryThemes("meta"); |
| 9682 |
}, |
9309 |
}, |
| 9683 |
_idealKeyHandler:function(keyCode, |
9310 |
getColorThemes:function(){return this.__queryThemes("colors"); |
| 9684 |
charCode, |
9311 |
}, |
| 9685 |
eventType, |
9312 |
getBorderThemes:function(){return this.__queryThemes("borders"); |
| 9686 |
domEvent){if(!keyCode&&!charCode){return; |
9313 |
}, |
| 9687 |
}var keyIdentifier; |
9314 |
getFontThemes:function(){return this.__queryThemes("fonts"); |
| 9688 |
if(keyCode){keyIdentifier=this._keyCodeToIdentifier(keyCode); |
9315 |
}, |
| 9689 |
qx.event.handler.EventHandler.getInstance()._onkeyevent_post(domEvent, |
9316 |
getWidgetThemes:function(){return this.__queryThemes("widgets"); |
| 9690 |
eventType, |
9317 |
}, |
| 9691 |
keyCode, |
9318 |
getIconThemes:function(){return this.__queryThemes("icons"); |
| 9692 |
charCode, |
9319 |
}, |
| 9693 |
keyIdentifier); |
9320 |
getAppearanceThemes:function(){return this.__queryThemes("appearances"); |
| 9694 |
}else{keyIdentifier=this._charCodeToIdentifier(charCode); |
9321 |
}}, |
| 9695 |
qx.event.handler.EventHandler.getInstance()._onkeyevent_post(domEvent, |
9322 |
settings:{"qx.theme":"qx.theme.ClassicRoyale", |
| 9696 |
"keypress", |
9323 |
"qx.colorTheme":null, |
| 9697 |
keyCode, |
9324 |
"qx.borderTheme":null, |
| 9698 |
charCode, |
9325 |
"qx.fontTheme":null, |
| 9699 |
keyIdentifier); |
9326 |
"qx.widgetTheme":null, |
| 9700 |
qx.event.handler.EventHandler.getInstance()._onkeyevent_post(domEvent, |
9327 |
"qx.appearanceTheme":null, |
| 9701 |
"keyinput", |
9328 |
"qx.iconTheme":null}}); |
| 9702 |
keyCode, |
9329 |
|
| 9703 |
charCode, |
9330 |
|
| 9704 |
keyIdentifier); |
9331 |
|
| 9705 |
}}}, |
9332 |
|
| 9706 |
defer:function(statics, |
9333 |
/* ID: qx.theme.manager.Color */ |
| 9707 |
members, |
9334 |
qx.Class.define("qx.theme.manager.Color", |
| 9708 |
properties){if(!members._identifierToKeyCodeMap){members._identifierToKeyCodeMap={}; |
9335 |
{type:"singleton", |
| 9709 |
for(var key in members._keyCodeToIdentifierMap){members._identifierToKeyCodeMap[members._keyCodeToIdentifierMap[key]]=parseInt(key); |
9336 |
extend:qx.util.manager.Value, |
| 9710 |
} |
9337 |
properties:{colorTheme:{check:"Theme", |
| 9711 |
for(var key in members._specialCharCodeMap){members._identifierToKeyCodeMap[members._specialCharCodeMap[key]]=parseInt(key); |
9338 |
nullable:true, |
| 9712 |
}} |
9339 |
apply:"_applyColorTheme", |
| 9713 |
if(qx.core.Variant.isSet("qx.client", |
9340 |
event:"changeColorTheme"}}, |
| 9714 |
"mshtml")){members._lastUpDownType={}; |
9341 |
members:{_applyColorTheme:function(value){var dest=this._dynamic={}; |
| 9715 |
members._charCode2KeyCode={13:13, |
9342 |
if(value){var source=value.colors; |
| 9716 |
27:27}; |
9343 |
var util=qx.util.ColorUtil; |
| 9717 |
}else if(qx.core.Variant.isSet("qx.client", |
9344 |
var temp; |
| 9718 |
"gecko")){members._lastUpDownType={}; |
9345 |
for(var key in source){temp=source[key]; |
| 9719 |
members._keyCodeFix={12:members._identifierToKeyCode("NumLock")}; |
9346 |
if(typeof temp==="string"){if(!util.isCssString(temp)){throw new Error("Could not parse color: "+temp); |
| 9720 |
}else if(qx.core.Variant.isSet("qx.client", |
9347 |
}}else if(temp instanceof Array){temp=util.rgbToRgbString(temp); |
| 9721 |
"webkit")){members._charCode2KeyCode={63289:members._identifierToKeyCode("NumLock"), |
9348 |
}else{throw new Error("Could not parse color: "+temp); |
| 9722 |
63276:members._identifierToKeyCode("PageUp"), |
9349 |
}dest[key]=temp; |
| 9723 |
63277:members._identifierToKeyCode("PageDown"), |
9350 |
}} |
| 9724 |
63275:members._identifierToKeyCode("End"), |
9351 |
if(qx.theme.manager.Meta.getInstance().getAutoSync()){this.syncColorTheme(); |
| 9725 |
63273:members._identifierToKeyCode("Home"), |
|
|
| 9726 |
63234:members._identifierToKeyCode("Left"), |
| 9727 |
63232:members._identifierToKeyCode("Up"), |
| 9728 |
63235:members._identifierToKeyCode("Right"), |
| 9729 |
63233:members._identifierToKeyCode("Down"), |
| 9730 |
63272:members._identifierToKeyCode("Delete"), |
| 9731 |
63302:members._identifierToKeyCode("Insert"), |
| 9732 |
63236:members._identifierToKeyCode("F1"), |
| 9733 |
63237:members._identifierToKeyCode("F2"), |
| 9734 |
63238:members._identifierToKeyCode("F3"), |
| 9735 |
63239:members._identifierToKeyCode("F4"), |
| 9736 |
63240:members._identifierToKeyCode("F5"), |
| 9737 |
63241:members._identifierToKeyCode("F6"), |
| 9738 |
63242:members._identifierToKeyCode("F7"), |
| 9739 |
63243:members._identifierToKeyCode("F8"), |
| 9740 |
63244:members._identifierToKeyCode("F9"), |
| 9741 |
63245:members._identifierToKeyCode("F10"), |
| 9742 |
63246:members._identifierToKeyCode("F11"), |
| 9743 |
63247:members._identifierToKeyCode("F12"), |
| 9744 |
63248:members._identifierToKeyCode("PrintScreen"), |
| 9745 |
3:members._identifierToKeyCode("Enter"), |
| 9746 |
12:members._identifierToKeyCode("NumLock"), |
| 9747 |
13:members._identifierToKeyCode("Enter")}; |
| 9748 |
}else if(qx.core.Variant.isSet("qx.client", |
| 9749 |
"opera")){members._lastKeyCode=null; |
| 9750 |
}}, |
9352 |
}}, |
| 9751 |
destruct:function(){this._detachEvents(); |
9353 |
syncColorTheme:function(){this._updateObjects(); |
| 9752 |
this._disposeFields("_lastUpDownType", |
9354 |
}}}); |
| 9753 |
"_lastKeyCode"); |
|
|
| 9754 |
}}); |
| 9755 |
|
9355 |
|
| 9756 |
|
9356 |
|
| 9757 |
|
9357 |
|
| 9758 |
|
9358 |
|
| 9759 |
/* ID: qx.event.type.DomEvent */ |
9359 |
/* ID: qx.util.ColorUtil */ |
| 9760 |
qx.Class.define("qx.event.type.DomEvent", |
9360 |
qx.Class.define("qx.util.ColorUtil", |
| 9761 |
{extend:qx.event.type.Event, |
9361 |
{statics:{REGEXP:{hex3:/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/, |
| 9762 |
construct:function(vType, |
9362 |
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})$/, |
| 9763 |
vDomEvent, |
9363 |
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*\)$/}, |
| 9764 |
vDomTarget, |
9364 |
SYSTEM:{activeborder:true, |
| 9765 |
vTarget, |
9365 |
activecaption:true, |
| 9766 |
vOriginalTarget){this.base(arguments, |
9366 |
appworkspace:true, |
| 9767 |
vType); |
9367 |
background:true, |
| 9768 |
this.setDomEvent(vDomEvent); |
9368 |
buttonface:true, |
| 9769 |
this.setDomTarget(vDomTarget); |
9369 |
buttonhighlight:true, |
| 9770 |
this.setTarget(vTarget); |
9370 |
buttonshadow:true, |
| 9771 |
this.setOriginalTarget(vOriginalTarget); |
9371 |
buttontext:true, |
|
|
9372 |
captiontext:true, |
| 9373 |
graytext:true, |
| 9374 |
highlight:true, |
| 9375 |
highlighttext:true, |
| 9376 |
inactiveborder:true, |
| 9377 |
inactivecaption:true, |
| 9378 |
inactivecaptiontext:true, |
| 9379 |
infobackground:true, |
| 9380 |
infotext:true, |
| 9381 |
menu:true, |
| 9382 |
menutext:true, |
| 9383 |
scrollbar:true, |
| 9384 |
threeddarkshadow:true, |
| 9385 |
threedface:true, |
| 9386 |
threedhighlight:true, |
| 9387 |
threedlightshadow:true, |
| 9388 |
threedshadow:true, |
| 9389 |
window:true, |
| 9390 |
windowframe:true, |
| 9391 |
windowtext:true}, |
| 9392 |
NAMED:{black:[0, |
| 9393 |
0, |
| 9394 |
0], |
| 9395 |
silver:[192, |
| 9396 |
192, |
| 9397 |
192], |
| 9398 |
gray:[128, |
| 9399 |
128, |
| 9400 |
128], |
| 9401 |
white:[255, |
| 9402 |
255, |
| 9403 |
255], |
| 9404 |
maroon:[128, |
| 9405 |
0, |
| 9406 |
0], |
| 9407 |
red:[255, |
| 9408 |
0, |
| 9409 |
0], |
| 9410 |
purple:[128, |
| 9411 |
0, |
| 9412 |
128], |
| 9413 |
fuchsia:[255, |
| 9414 |
0, |
| 9415 |
255], |
| 9416 |
green:[0, |
| 9417 |
128, |
| 9418 |
0], |
| 9419 |
lime:[0, |
| 9420 |
255, |
| 9421 |
0], |
| 9422 |
olive:[128, |
| 9423 |
128, |
| 9424 |
0], |
| 9425 |
yellow:[255, |
| 9426 |
255, |
| 9427 |
0], |
| 9428 |
navy:[0, |
| 9429 |
0, |
| 9430 |
128], |
| 9431 |
blue:[0, |
| 9432 |
0, |
| 9433 |
255], |
| 9434 |
teal:[0, |
| 9435 |
128, |
| 9436 |
128], |
| 9437 |
aqua:[0, |
| 9438 |
255, |
| 9439 |
255], |
| 9440 |
transparent:[-1, |
| 9441 |
-1, |
| 9442 |
-1], |
| 9443 |
grey:[128, |
| 9444 |
128, |
| 9445 |
128], |
| 9446 |
magenta:[255, |
| 9447 |
0, |
| 9448 |
255], |
| 9449 |
orange:[255, |
| 9450 |
165, |
| 9451 |
0], |
| 9452 |
brown:[165, |
| 9453 |
42, |
| 9454 |
42]}, |
| 9455 |
isNamedColor:function(value){return this.NAMED[value]!==undefined; |
| 9772 |
}, |
9456 |
}, |
| 9773 |
statics:{SHIFT_MASK:1, |
9457 |
isSystemColor:function(value){return this.SYSTEM[value]!==undefined; |
| 9774 |
CTRL_MASK:2, |
|
|
| 9775 |
ALT_MASK:4, |
| 9776 |
META_MASK:8}, |
| 9777 |
properties:{bubbles:{_fast:true, |
| 9778 |
defaultValue:true, |
| 9779 |
noCompute:true}, |
| 9780 |
propagationStopped:{_fast:true, |
| 9781 |
defaultValue:false, |
| 9782 |
noCompute:true}, |
| 9783 |
domEvent:{_fast:true, |
| 9784 |
setOnlyOnce:true, |
| 9785 |
noCompute:true}, |
| 9786 |
domTarget:{_fast:true, |
| 9787 |
setOnlyOnce:true, |
| 9788 |
noCompute:true}, |
| 9789 |
modifiers:{_cached:true, |
| 9790 |
defaultValue:null}}, |
| 9791 |
members:{_computeModifiers:function(){var mask=0; |
| 9792 |
var evt=this.getDomEvent(); |
| 9793 |
if(evt.shiftKey)mask|=qx.event.type.DomEvent.SHIFT_MASK; |
| 9794 |
if(evt.ctrlKey)mask|=qx.event.type.DomEvent.CTRL_MASK; |
| 9795 |
if(evt.altKey)mask|=qx.event.type.DomEvent.ALT_MASK; |
| 9796 |
if(evt.metaKey)mask|=qx.event.type.DomEvent.META_MASK; |
| 9797 |
return mask; |
| 9798 |
}, |
9458 |
}, |
| 9799 |
isCtrlPressed:function(){return this.getDomEvent().ctrlKey; |
9459 |
isThemedColor:function(value){return qx.theme.manager.Color.getInstance().isDynamic(value); |
| 9800 |
}, |
9460 |
}, |
| 9801 |
isShiftPressed:function(){return this.getDomEvent().shiftKey; |
9461 |
stringToRgb:function(str){if(this.isThemedColor(str)){var str=qx.theme.manager.Color.getInstance().resolveDynamic(str); |
|
|
9462 |
} |
| 9463 |
if(this.isNamedColor(str)){return this.NAMED[str]; |
| 9464 |
}else if(this.isSystemColor(str)){throw new Error("Could not convert system colors to RGB: "+str); |
| 9465 |
}else if(this.isRgbString(str)){return this.__rgbStringToRgb(); |
| 9466 |
}else if(this.isHex3String(str)){return this.__hex3StringToRgb(); |
| 9467 |
}else if(this.isHex6String(str)){return this.__hex6StringToRgb(); |
| 9468 |
}throw new Error("Could not parse color: "+str); |
| 9802 |
}, |
9469 |
}, |
| 9803 |
isAltPressed:function(){return this.getDomEvent().altKey; |
9470 |
cssStringToRgb:function(str){if(this.isNamedColor(str)){return this.NAMED[str]; |
|
|
9471 |
}else if(this.isSystemColor(str)){throw new Error("Could not convert system colors to RGB: "+str); |
| 9472 |
}else if(this.isRgbString(str)){return this.__rgbStringToRgb(); |
| 9473 |
}else if(this.isHex3String(str)){return this.__hex3StringToRgb(); |
| 9474 |
}else if(this.isHex6String(str)){return this.__hex6StringToRgb(); |
| 9475 |
}throw new Error("Could not parse color: "+str); |
| 9804 |
}, |
9476 |
}, |
| 9805 |
isMetaPressed:function(){return this.getDomEvent().metaKey; |
9477 |
stringToRgbString:function(str){return this.rgbToRgbString(this.stringToRgb(str)); |
|
|
9478 |
}, |
| 9479 |
rgbToRgbString:function(rgb){return "rgb("+rgb[0]+","+rgb[1]+","+rgb[2]+")"; |
| 9480 |
}, |
| 9481 |
rgbToHexString:function(rgb){return (qx.lang.String.pad(rgb[0].toString(16).toUpperCase(), |
| 9482 |
2)+qx.lang.String.pad(rgb[1].toString(16).toUpperCase(), |
| 9483 |
2)+qx.lang.String.pad(rgb[2].toString(16).toUpperCase(), |
| 9484 |
2)); |
| 9485 |
}, |
| 9486 |
isValid:function(str){return this.isThemedColor(str)||this.isCssString(str); |
| 9487 |
}, |
| 9488 |
isCssString:function(str){return this.isSystemColor(str)||this.isNamedColor(str)||this.isHex3String(str)||this.isHex6String(str)||this.isRgbString(str); |
| 9489 |
}, |
| 9490 |
isHex3String:function(str){return this.REGEXP.hex3.test(str); |
| 9491 |
}, |
| 9492 |
isHex6String:function(str){return this.REGEXP.hex6.test(str); |
| 9493 |
}, |
| 9494 |
isRgbString:function(str){return this.REGEXP.rgb.test(str); |
| 9495 |
}, |
| 9496 |
__rgbStringToRgb:function(){var red=parseInt(RegExp.$1); |
| 9497 |
var green=parseInt(RegExp.$2); |
| 9498 |
var blue=parseInt(RegExp.$3); |
| 9499 |
return [red, |
| 9500 |
green, |
| 9501 |
blue]; |
| 9502 |
}, |
| 9503 |
__hex3StringToRgb:function(){var red=parseInt(RegExp.$1, |
| 9504 |
16)*17; |
| 9505 |
var green=parseInt(RegExp.$2, |
| 9506 |
16)*17; |
| 9507 |
var blue=parseInt(RegExp.$3, |
| 9508 |
16)*17; |
| 9509 |
return [red, |
| 9510 |
green, |
| 9511 |
blue]; |
| 9512 |
}, |
| 9513 |
__hex6StringToRgb:function(){var red=(parseInt(RegExp.$1, |
| 9514 |
16)*16)+parseInt(RegExp.$2, |
| 9515 |
16); |
| 9516 |
var green=(parseInt(RegExp.$3, |
| 9517 |
16)*16)+parseInt(RegExp.$4, |
| 9518 |
16); |
| 9519 |
var blue=(parseInt(RegExp.$5, |
| 9520 |
16)*16)+parseInt(RegExp.$6, |
| 9521 |
16); |
| 9522 |
return [red, |
| 9523 |
green, |
| 9524 |
blue]; |
| 9525 |
}, |
| 9526 |
hex3StringToRgb:function(value){if(this.isHex3String(value)){return this.__hex3StringToRgb(value); |
| 9527 |
}throw new Error("Invalid hex3 value: "+value); |
| 9528 |
}, |
| 9529 |
hex6StringToRgb:function(value){if(this.isHex6String(value)){return this.__hex6StringToRgb(value); |
| 9530 |
}throw new Error("Invalid hex6 value: "+value); |
| 9531 |
}, |
| 9532 |
hexStringToRgb:function(value){if(this.isHex3String(value)){return this.__hex3StringToRgb(value); |
| 9533 |
} |
| 9534 |
if(this.isHex6String(value)){return this.__hex6StringToRgb(value); |
| 9535 |
}throw new Error("Invalid hex value: "+value); |
| 9536 |
}, |
| 9537 |
rgbToHsb:function(rgb){var hue, |
| 9538 |
saturation, |
| 9539 |
brightness; |
| 9540 |
var red=rgb[0]; |
| 9541 |
var green=rgb[1]; |
| 9542 |
var blue=rgb[2]; |
| 9543 |
var cmax=(red>green)?red:green; |
| 9544 |
if(blue>cmax){cmax=blue; |
| 9545 |
}var cmin=(red<green)?red:green; |
| 9546 |
if(blue<cmin){cmin=blue; |
| 9547 |
}brightness=cmax/255.0; |
| 9548 |
if(cmax!=0){saturation=(cmax-cmin)/cmax; |
| 9549 |
}else{saturation=0; |
| 9550 |
} |
| 9551 |
if(saturation==0){hue=0; |
| 9552 |
}else{var redc=(cmax-red)/(cmax-cmin); |
| 9553 |
var greenc=(cmax-green)/(cmax-cmin); |
| 9554 |
var bluec=(cmax-blue)/(cmax-cmin); |
| 9555 |
if(red==cmax){hue=bluec-greenc; |
| 9556 |
}else if(green==cmax){hue=2.0+redc-bluec; |
| 9557 |
}else{hue=4.0+greenc-redc; |
| 9558 |
}hue=hue/6.0; |
| 9559 |
if(hue<0){hue=hue+1.0; |
| 9560 |
}}return [Math.round(hue*360), |
| 9561 |
Math.round(saturation*100), |
| 9562 |
Math.round(brightness*100)]; |
| 9806 |
}, |
9563 |
}, |
| 9807 |
isCtrlOrCommandPressed:function(){if(qx.core.Client.getInstance().runsOnMacintosh()){return this.getDomEvent().metaKey; |
9564 |
hsbToRgb:function(hsb){var i, |
| 9808 |
}else{return this.getDomEvent().ctrlKey; |
9565 |
f, |
| 9809 |
}}, |
9566 |
p, |
| 9810 |
setDefaultPrevented:qx.core.Variant.select("qx.client", |
9567 |
q, |
| 9811 |
{"mshtml":function(vValue){if(!vValue){return this.error("It is not possible to set preventDefault to false if it was true before!", |
9568 |
t; |
| 9812 |
"setDefaultPrevented"); |
9569 |
var hue=hsb[0]/360; |
| 9813 |
}this.getDomEvent().returnValue=false; |
9570 |
var saturation=hsb[1]/100; |
| 9814 |
this.base(arguments, |
9571 |
var brightness=hsb[2]/100; |
| 9815 |
vValue); |
9572 |
if(hue>=1.0){hue%=1.0; |
|
|
9573 |
} |
| 9574 |
if(saturation>1.0){saturation=1.0; |
| 9575 |
} |
| 9576 |
if(brightness>1.0){brightness=1.0; |
| 9577 |
}var tov=Math.floor(255*brightness); |
| 9578 |
var rgb={}; |
| 9579 |
if(saturation==0.0){rgb.red=rgb.green=rgb.blue=tov; |
| 9580 |
}else{hue*=6.0; |
| 9581 |
i=Math.floor(hue); |
| 9582 |
f=hue-i; |
| 9583 |
p=Math.floor(tov*(1.0-saturation)); |
| 9584 |
q=Math.floor(tov*(1.0-(saturation*f))); |
| 9585 |
t=Math.floor(tov*(1.0-(saturation*(1.0-f)))); |
| 9586 |
switch(i){case 0:rgb.red=tov; |
| 9587 |
rgb.green=t; |
| 9588 |
rgb.blue=p; |
| 9589 |
break; |
| 9590 |
case 1:rgb.red=q; |
| 9591 |
rgb.green=tov; |
| 9592 |
rgb.blue=p; |
| 9593 |
break; |
| 9594 |
case 2:rgb.red=p; |
| 9595 |
rgb.green=tov; |
| 9596 |
rgb.blue=t; |
| 9597 |
break; |
| 9598 |
case 3:rgb.red=p; |
| 9599 |
rgb.green=q; |
| 9600 |
rgb.blue=tov; |
| 9601 |
break; |
| 9602 |
case 4:rgb.red=t; |
| 9603 |
rgb.green=p; |
| 9604 |
rgb.blue=tov; |
| 9605 |
break; |
| 9606 |
case 5:rgb.red=tov; |
| 9607 |
rgb.green=p; |
| 9608 |
rgb.blue=q; |
| 9609 |
break; |
| 9610 |
}}return rgb; |
| 9816 |
}, |
9611 |
}, |
| 9817 |
"default":function(vValue){if(!vValue){return this.error("It is not possible to set preventDefault to false if it was true before!", |
9612 |
randomColor:function(){var r=Math.round(Math.random()*255); |
| 9818 |
"setDefaultPrevented"); |
9613 |
var g=Math.round(Math.random()*255); |
| 9819 |
}this.getDomEvent().preventDefault(); |
9614 |
var b=Math.round(Math.random()*255); |
| 9820 |
this.getDomEvent().returnValue=false; |
9615 |
return this.rgbToRgbString([r, |
| 9821 |
this.base(arguments, |
9616 |
g, |
| 9822 |
vValue); |
9617 |
b]); |
| 9823 |
}})}, |
9618 |
}}}); |
| 9824 |
destruct:function(){this._disposeFields("_valueDomEvent", |
|
|
| 9825 |
"_valueDomTarget"); |
| 9826 |
}}); |
| 9827 |
|
9619 |
|
| 9828 |
|
9620 |
|
| 9829 |
|
9621 |
|
| 9830 |
|
9622 |
|
| 9831 |
/* ID: qx.event.type.KeyEvent */ |
9623 |
/* ID: qx.theme.manager.Border */ |
| 9832 |
qx.Class.define("qx.event.type.KeyEvent", |
9624 |
qx.Class.define("qx.theme.manager.Border", |
| 9833 |
{extend:qx.event.type.DomEvent, |
9625 |
{type:"singleton", |
| 9834 |
construct:function(vType, |
9626 |
extend:qx.util.manager.Value, |
| 9835 |
vDomEvent, |
9627 |
properties:{borderTheme:{check:"Theme", |
| 9836 |
vDomTarget, |
9628 |
nullable:true, |
| 9837 |
vTarget, |
9629 |
apply:"_applyBorderTheme", |
| 9838 |
vOriginalTarget, |
9630 |
event:"changeBorderTheme"}}, |
| 9839 |
vKeyCode, |
9631 |
members:{resolveDynamic:function(value){return value instanceof qx.ui.core.Border?value:this._dynamic[value]; |
| 9840 |
vCharCode, |
|
|
| 9841 |
vKeyIdentifier){this.base(arguments, |
| 9842 |
vType, |
| 9843 |
vDomEvent, |
| 9844 |
vDomTarget, |
| 9845 |
vTarget, |
| 9846 |
vOriginalTarget); |
| 9847 |
this._keyCode=vKeyCode; |
| 9848 |
this.setCharCode(vCharCode); |
| 9849 |
this.setKeyIdentifier(vKeyIdentifier); |
| 9850 |
}, |
9632 |
}, |
| 9851 |
statics:{keys:{esc:27, |
9633 |
isDynamic:function(value){return value&&(value instanceof qx.ui.core.Border||this._dynamic[value]!==undefined); |
| 9852 |
enter:13, |
9634 |
}, |
| 9853 |
tab:9, |
9635 |
syncBorderTheme:function(){this._updateObjects(); |
| 9854 |
space:32, |
9636 |
}, |
| 9855 |
up:38, |
9637 |
updateObjectsEdge:function(border, |
| 9856 |
down:40, |
9638 |
edge){var reg=this._registry; |
| 9857 |
left:37, |
9639 |
var dynamics=this._dynamic; |
| 9858 |
right:39, |
9640 |
var entry; |
| 9859 |
shift:16, |
9641 |
for(var key in reg){entry=reg[key]; |
| 9860 |
ctrl:17, |
9642 |
if(entry.value===border||dynamics[entry.value]===border){entry.callback.call(entry.object, |
| 9861 |
alt:18, |
9643 |
border, |
| 9862 |
f1:112, |
9644 |
edge); |
| 9863 |
f2:113, |
9645 |
}}}, |
| 9864 |
f3:114, |
9646 |
_applyBorderTheme:function(value){var dest=this._dynamic; |
| 9865 |
f4:115, |
9647 |
for(var key in dest){if(dest[key].themed){dest[key].dispose(); |
| 9866 |
f5:116, |
9648 |
delete dest[key]; |
| 9867 |
f6:117, |
9649 |
}} |
| 9868 |
f7:118, |
9650 |
if(value){var source=value.borders; |
| 9869 |
f8:119, |
9651 |
var border=qx.ui.core.Border; |
| 9870 |
f9:120, |
9652 |
for(var key in source){dest[key]=(new border).set(source[key]); |
| 9871 |
f10:121, |
9653 |
dest[key].themed=true; |
| 9872 |
f11:122, |
9654 |
}} |
| 9873 |
f12:123, |
9655 |
if(qx.theme.manager.Meta.getInstance().getAutoSync()){this.syncBorderTheme(); |
| 9874 |
print:124, |
9656 |
}}}}); |
| 9875 |
del:46, |
|
|
| 9876 |
backspace:8, |
| 9877 |
insert:45, |
| 9878 |
home:36, |
| 9879 |
end:35, |
| 9880 |
pageup:33, |
| 9881 |
pagedown:34, |
| 9882 |
numlock:144, |
| 9883 |
numpad_0:96, |
| 9884 |
numpad_1:97, |
| 9885 |
numpad_2:98, |
| 9886 |
numpad_3:99, |
| 9887 |
numpad_4:100, |
| 9888 |
numpad_5:101, |
| 9889 |
numpad_6:102, |
| 9890 |
numpad_7:103, |
| 9891 |
numpad_8:104, |
| 9892 |
numpad_9:105, |
| 9893 |
numpad_divide:111, |
| 9894 |
numpad_multiply:106, |
| 9895 |
numpad_minus:109, |
| 9896 |
numpad_plus:107}, |
| 9897 |
codes:{}}, |
| 9898 |
properties:{charCode:{_fast:true, |
| 9899 |
setOnlyOnce:true, |
| 9900 |
noCompute:true}, |
| 9901 |
keyIdentifier:{_fast:true, |
| 9902 |
setOnlyOnce:true, |
| 9903 |
noCompute:true}}, |
| 9904 |
members:{getKeyCode:function(){qx.log.Logger.deprecatedMethodWarning(arguments.callee, |
| 9905 |
"Please use getKeyIdentifier() instead."); |
| 9906 |
return this._keyCode; |
| 9907 |
}}, |
| 9908 |
defer:function(statics){for(var i in statics.keys){statics.codes[statics.keys[i]]=i; |
| 9909 |
}}}); |
| 9910 |
|
9657 |
|
| 9911 |
|
9658 |
|
| 9912 |
|
9659 |
|
| 9913 |
|
9660 |
|
| 9914 |
/* ID: qx.event.type.MouseEvent */ |
9661 |
/* ID: qx.ui.core.Border */ |
| 9915 |
qx.Class.define("qx.event.type.MouseEvent", |
9662 |
qx.Class.define("qx.ui.core.Border", |
| 9916 |
{extend:qx.event.type.DomEvent, |
9663 |
{extend:qx.core.Object, |
| 9917 |
construct:function(vType, |
9664 |
construct:function(width, |
| 9918 |
vDomEvent, |
9665 |
style, |
| 9919 |
vDomTarget, |
9666 |
color){this.base(arguments); |
| 9920 |
vTarget, |
9667 |
if(width!==undefined){this.setWidth(width); |
| 9921 |
vOriginalTarget, |
9668 |
} |
| 9922 |
vRelatedTarget){this.base(arguments, |
9669 |
if(style!==undefined){this.setStyle(style); |
| 9923 |
vType, |
9670 |
} |
| 9924 |
vDomEvent, |
9671 |
if(color!==undefined){this.setColor(color); |
| 9925 |
vDomTarget, |
|
|
| 9926 |
vTarget, |
| 9927 |
vOriginalTarget); |
| 9928 |
if(vRelatedTarget){this.setRelatedTarget(vRelatedTarget); |
| 9929 |
}}, |
9672 |
}}, |
| 9930 |
statics:{C_BUTTON_LEFT:"left", |
9673 |
statics:{fromString:function(str){var border=new qx.ui.core.Border; |
| 9931 |
C_BUTTON_MIDDLE:"middle", |
9674 |
var parts=str.split(/\s+/); |
| 9932 |
C_BUTTON_RIGHT:"right", |
9675 |
var part, |
| 9933 |
C_BUTTON_NONE:"none", |
9676 |
temp; |
| 9934 |
_screenX:0, |
9677 |
for(var i=0, |
| 9935 |
_screenY:0, |
9678 |
l=parts.length;i<l;i++){part=parts[i]; |
| 9936 |
_clientX:0, |
9679 |
switch(part){case "groove":case "ridge":case "inset":case "outset":case "solid":case "dotted":case "dashed":case "double":case "none":border.setStyle(part); |
| 9937 |
_clientY:0, |
9680 |
break; |
| 9938 |
_pageX:0, |
9681 |
default:temp=parseInt(part); |
| 9939 |
_pageY:0, |
9682 |
if(temp===part||qx.lang.String.contains(part, |
| 9940 |
_button:null, |
9683 |
"px")){border.setWidth(temp); |
| 9941 |
buttons:qx.core.Variant.select("qx.client", |
9684 |
}else{border.setColor(part); |
| 9942 |
{"mshtml":{left:1, |
9685 |
}break; |
| 9943 |
right:2, |
9686 |
}}return border; |
| 9944 |
middle:4}, |
|
|
| 9945 |
"default":{left:0, |
| 9946 |
right:2, |
| 9947 |
middle:1}}), |
| 9948 |
storeEventState:function(e){this._screenX=e.getScreenX(); |
| 9949 |
this._screenY=e.getScreenY(); |
| 9950 |
this._clientX=e.getClientX(); |
| 9951 |
this._clientY=e.getClientY(); |
| 9952 |
this._pageX=e.getPageX(); |
| 9953 |
this._pageY=e.getPageY(); |
| 9954 |
this._button=e.getButton(); |
| 9955 |
}, |
| 9956 |
getScreenX:function(){return this._screenX; |
| 9957 |
}, |
| 9958 |
getScreenY:function(){return this._screenY; |
| 9959 |
}, |
9687 |
}, |
| 9960 |
getClientX:function(){return this._clientX; |
9688 |
fromConfig:function(config){var border=new qx.ui.core.Border; |
|
|
9689 |
border.set(config); |
| 9690 |
return border; |
| 9961 |
}, |
9691 |
}, |
| 9962 |
getClientY:function(){return this._clientY; |
9692 |
resetTop:qx.core.Variant.select("qx.client", |
|
|
9693 |
{"gecko":function(widget){var style=widget._style; |
| 9694 |
if(style){style.borderTopWidth=style.borderTopStyle=style.borderTopColor=style.MozBorderTopColors=""; |
| 9695 |
}}, |
| 9696 |
"default":function(widget){var style=widget._style; |
| 9697 |
if(style){style.borderTopWidth=style.borderTopStyle=style.borderTopColor=""; |
| 9698 |
}style=widget._innerStyle; |
| 9699 |
if(style){style.borderTopWidth=style.borderTopStyle=style.borderTopColor=""; |
| 9700 |
}}}), |
| 9701 |
resetRight:qx.core.Variant.select("qx.client", |
| 9702 |
{"gecko":function(widget){var style=widget._style; |
| 9703 |
if(style){style.borderRightWidth=style.borderRightStyle=style.borderRightColor=style.MozBorderRightColors=""; |
| 9704 |
}}, |
| 9705 |
"default":function(widget){var style=widget._style; |
| 9706 |
if(style){style.borderRightWidth=style.borderRightStyle=style.borderRightColor=""; |
| 9707 |
}style=widget._innerStyle; |
| 9708 |
if(style){style.borderRightWidth=style.borderRightStyle=style.borderRightColor=""; |
| 9709 |
}}}), |
| 9710 |
resetBottom:qx.core.Variant.select("qx.client", |
| 9711 |
{"gecko":function(widget){var style=widget._style; |
| 9712 |
if(style){style.borderBottomWidth=style.borderBottomStyle=style.borderBottomColor=style.MozBorderBottomColors=""; |
| 9713 |
}}, |
| 9714 |
"default":function(widget){var style=widget._style; |
| 9715 |
if(style){style.borderBottomWidth=style.borderBottomStyle=style.borderBottomColor=""; |
| 9716 |
}style=widget._innerStyle; |
| 9717 |
if(style){style.borderBottomWidth=style.borderBottomStyle=style.borderBottomColor=""; |
| 9718 |
}}}), |
| 9719 |
resetLeft:qx.core.Variant.select("qx.client", |
| 9720 |
{"gecko":function(widget){var style=widget._style; |
| 9721 |
if(style){style.borderLeftWidth=style.borderLeftStyle=style.borderLeftColor=style.MozBorderLeftColors=""; |
| 9722 |
}}, |
| 9723 |
"default":function(widget){var style=widget._style; |
| 9724 |
if(style){style.borderLeftWidth=style.borderLeftStyle=style.borderLeftColor=""; |
| 9725 |
}style=widget._innerStyle; |
| 9726 |
if(style){style.borderLeftWidth=style.borderLeftStyle=style.borderLeftColor=""; |
| 9727 |
}}})}, |
| 9728 |
properties:{widthTop:{check:"Number", |
| 9729 |
init:0, |
| 9730 |
apply:"_applyWidthTop"}, |
| 9731 |
widthRight:{check:"Number", |
| 9732 |
init:0, |
| 9733 |
apply:"_applyWidthRight"}, |
| 9734 |
widthBottom:{check:"Number", |
| 9735 |
init:0, |
| 9736 |
apply:"_applyWidthBottom"}, |
| 9737 |
widthLeft:{check:"Number", |
| 9738 |
init:0, |
| 9739 |
apply:"_applyWidthLeft"}, |
| 9740 |
styleTop:{nullable:true, |
| 9741 |
check:["solid", |
| 9742 |
"dotted", |
| 9743 |
"dashed", |
| 9744 |
"double", |
| 9745 |
"outset", |
| 9746 |
"inset", |
| 9747 |
"ridge", |
| 9748 |
"groove"], |
| 9749 |
init:"solid", |
| 9750 |
apply:"_applyStyleTop"}, |
| 9751 |
styleRight:{nullable:true, |
| 9752 |
check:["solid", |
| 9753 |
"dotted", |
| 9754 |
"dashed", |
| 9755 |
"double", |
| 9756 |
"outset", |
| 9757 |
"inset", |
| 9758 |
"ridge", |
| 9759 |
"groove"], |
| 9760 |
init:"solid", |
| 9761 |
apply:"_applyStyleRight"}, |
| 9762 |
styleBottom:{nullable:true, |
| 9763 |
check:["solid", |
| 9764 |
"dotted", |
| 9765 |
"dashed", |
| 9766 |
"double", |
| 9767 |
"outset", |
| 9768 |
"inset", |
| 9769 |
"ridge", |
| 9770 |
"groove"], |
| 9771 |
init:"solid", |
| 9772 |
apply:"_applyStyleBottom"}, |
| 9773 |
styleLeft:{nullable:true, |
| 9774 |
check:["solid", |
| 9775 |
"dotted", |
| 9776 |
"dashed", |
| 9777 |
"double", |
| 9778 |
"outset", |
| 9779 |
"inset", |
| 9780 |
"ridge", |
| 9781 |
"groove"], |
| 9782 |
init:"solid", |
| 9783 |
apply:"_applyStyleLeft"}, |
| 9784 |
colorTop:{nullable:true, |
| 9785 |
check:"Color", |
| 9786 |
apply:"_applyColorTop"}, |
| 9787 |
colorRight:{nullable:true, |
| 9788 |
check:"Color", |
| 9789 |
apply:"_applyColorRight"}, |
| 9790 |
colorBottom:{nullable:true, |
| 9791 |
check:"Color", |
| 9792 |
apply:"_applyColorBottom"}, |
| 9793 |
colorLeft:{nullable:true, |
| 9794 |
check:"Color", |
| 9795 |
apply:"_applyColorLeft"}, |
| 9796 |
colorInnerTop:{nullable:true, |
| 9797 |
check:"Color", |
| 9798 |
apply:"_applyColorInnerTop"}, |
| 9799 |
colorInnerRight:{nullable:true, |
| 9800 |
check:"Color", |
| 9801 |
apply:"_applyColorInnerRight"}, |
| 9802 |
colorInnerBottom:{nullable:true, |
| 9803 |
check:"Color", |
| 9804 |
apply:"_applyColorInnerBottom"}, |
| 9805 |
colorInnerLeft:{nullable:true, |
| 9806 |
check:"Color", |
| 9807 |
apply:"_applyColorInnerLeft"}, |
| 9808 |
left:{group:["widthLeft", |
| 9809 |
"styleLeft", |
| 9810 |
"colorLeft"]}, |
| 9811 |
right:{group:["widthRight", |
| 9812 |
"styleRight", |
| 9813 |
"colorRight"]}, |
| 9814 |
top:{group:["widthTop", |
| 9815 |
"styleTop", |
| 9816 |
"colorTop"]}, |
| 9817 |
bottom:{group:["widthBottom", |
| 9818 |
"styleBottom", |
| 9819 |
"colorBottom"]}, |
| 9820 |
width:{group:["widthTop", |
| 9821 |
"widthRight", |
| 9822 |
"widthBottom", |
| 9823 |
"widthLeft"], |
| 9824 |
mode:"shorthand"}, |
| 9825 |
style:{group:["styleTop", |
| 9826 |
"styleRight", |
| 9827 |
"styleBottom", |
| 9828 |
"styleLeft"], |
| 9829 |
mode:"shorthand"}, |
| 9830 |
color:{group:["colorTop", |
| 9831 |
"colorRight", |
| 9832 |
"colorBottom", |
| 9833 |
"colorLeft"], |
| 9834 |
mode:"shorthand"}, |
| 9835 |
innerColor:{group:["colorInnerTop", |
| 9836 |
"colorInnerRight", |
| 9837 |
"colorInnerBottom", |
| 9838 |
"colorInnerLeft"], |
| 9839 |
mode:"shorthand"}}, |
| 9840 |
members:{_applyWidthTop:function(value, |
| 9841 |
old){this.__widthTop=value==null?"0px":value+"px"; |
| 9842 |
this.__computeComplexTop(); |
| 9843 |
this.__informManager("top"); |
| 9963 |
}, |
9844 |
}, |
| 9964 |
getPageX:function(){return this._pageX; |
9845 |
_applyWidthRight:function(value, |
|
|
9846 |
old){this.__widthRight=value==null?"0px":value+"px"; |
| 9847 |
this.__computeComplexRight(); |
| 9848 |
this.__informManager("right"); |
| 9965 |
}, |
9849 |
}, |
| 9966 |
getPageY:function(){return this._pageY; |
9850 |
_applyWidthBottom:function(value, |
|
|
9851 |
old){this.__widthBottom=value==null?"0px":value+"px"; |
| 9852 |
this.__computeComplexBottom(); |
| 9853 |
this.__informManager("bottom"); |
| 9967 |
}, |
9854 |
}, |
| 9968 |
getButton:function(){return this._button; |
9855 |
_applyWidthLeft:function(value, |
| 9969 |
}}, |
9856 |
old){this.__widthLeft=value==null?"0px":value+"px"; |
| 9970 |
properties:{button:{_fast:true, |
9857 |
this.__computeComplexLeft(); |
| 9971 |
readOnly:true}, |
9858 |
this.__informManager("left"); |
| 9972 |
wheelDelta:{_fast:true, |
|
|
| 9973 |
readOnly:true}}, |
| 9974 |
members:{getPageX:qx.core.Variant.select("qx.client", |
| 9975 |
{"mshtml":function(){return this.getDomEvent().clientX+qx.bom.Viewport.getScrollLeft(window); |
| 9976 |
}, |
9859 |
}, |
| 9977 |
"default":function(){return this.getDomEvent().pageX; |
9860 |
_applyColorTop:function(value, |
| 9978 |
}}), |
9861 |
old){qx.theme.manager.Color.getInstance().connect(this._changeColorTop, |
| 9979 |
getPageY:qx.core.Variant.select("qx.client", |
9862 |
this, |
| 9980 |
{"mshtml":function(){return this.getDomEvent().clientY+qx.bom.Viewport.getScrollTop(window); |
9863 |
value); |
| 9981 |
}, |
9864 |
}, |
| 9982 |
"default":function(){return this.getDomEvent().pageY; |
9865 |
_applyColorRight:function(value, |
| 9983 |
}}), |
9866 |
old){qx.theme.manager.Color.getInstance().connect(this._changeColorRight, |
| 9984 |
getClientX:function(){return this.getDomEvent().clientX; |
9867 |
this, |
|
|
9868 |
value); |
| 9985 |
}, |
9869 |
}, |
| 9986 |
getClientY:function(){return this.getDomEvent().clientY; |
9870 |
_applyColorBottom:function(value, |
|
|
9871 |
old){qx.theme.manager.Color.getInstance().connect(this._changeColorBottom, |
| 9872 |
this, |
| 9873 |
value); |
| 9987 |
}, |
9874 |
}, |
| 9988 |
getScreenX:function(){return this.getDomEvent().screenX; |
9875 |
_applyColorLeft:function(value, |
|
|
9876 |
old){qx.theme.manager.Color.getInstance().connect(this._changeColorLeft, |
| 9877 |
this, |
| 9878 |
value); |
| 9989 |
}, |
9879 |
}, |
| 9990 |
getScreenY:function(){return this.getDomEvent().screenY; |
9880 |
_applyColorInnerTop:function(value, |
|
|
9881 |
old){qx.theme.manager.Color.getInstance().connect(this._changeColorInnerTop, |
| 9882 |
this, |
| 9883 |
value); |
| 9991 |
}, |
9884 |
}, |
| 9992 |
isLeftButtonPressed:qx.core.Variant.select("qx.client", |
9885 |
_applyColorInnerRight:function(value, |
| 9993 |
{"mshtml":function(){if(this.getType()=="click"){return true; |
9886 |
old){qx.theme.manager.Color.getInstance().connect(this._changeColorInnerRight, |
| 9994 |
}else{return this.getButton()===qx.event.type.MouseEvent.C_BUTTON_LEFT; |
9887 |
this, |
| 9995 |
}}, |
9888 |
value); |
| 9996 |
"default":function(){return this.getButton()===qx.event.type.MouseEvent.C_BUTTON_LEFT; |
|
|
| 9997 |
}}), |
| 9998 |
isMiddleButtonPressed:function(){return this.getButton()===qx.event.type.MouseEvent.C_BUTTON_MIDDLE; |
| 9999 |
}, |
9889 |
}, |
| 10000 |
isRightButtonPressed:function(){return this.getButton()===qx.event.type.MouseEvent.C_BUTTON_RIGHT; |
9890 |
_applyColorInnerBottom:function(value, |
|
|
9891 |
old){qx.theme.manager.Color.getInstance().connect(this._changeColorInnerBottom, |
| 9892 |
this, |
| 9893 |
value); |
| 10001 |
}, |
9894 |
}, |
| 10002 |
__buttons:qx.core.Variant.select("qx.client", |
9895 |
_applyColorInnerLeft:function(value, |
| 10003 |
{"mshtml":{1:"left", |
9896 |
old){qx.theme.manager.Color.getInstance().connect(this._changeColorInnerLeft, |
| 10004 |
2:"right", |
9897 |
this, |
| 10005 |
4:"middle"}, |
9898 |
value); |
| 10006 |
"default":{0:"left", |
|
|
| 10007 |
2:"right", |
| 10008 |
1:"middle"}}), |
| 10009 |
_computeButton:function(){switch(this.getDomEvent().type){case "click":case "dblclick":return "left"; |
| 10010 |
case "contextmenu":return "right"; |
| 10011 |
default:return this.__buttons[this.getDomEvent().button]||"none"; |
| 10012 |
}}, |
| 10013 |
_computeWheelDelta:qx.core.Variant.select("qx.client", |
| 10014 |
{"default":function(){return this.getDomEvent().wheelDelta/120; |
| 10015 |
}, |
9899 |
}, |
| 10016 |
"gecko":function(){return -(this.getDomEvent().detail/3); |
9900 |
_applyStyleTop:function(){this.__informManager("top"); |
| 10017 |
}})}}); |
|
|
| 10018 |
|
| 10019 |
|
| 10020 |
|
| 10021 |
|
| 10022 |
/* ID: qx.ui.embed.IframeManager */ |
| 10023 |
qx.Class.define("qx.ui.embed.IframeManager", |
| 10024 |
{type:"singleton", |
| 10025 |
extend:qx.util.manager.Object, |
| 10026 |
construct:function(){this.base(arguments); |
| 10027 |
this._blocked={}; |
| 10028 |
}, |
9901 |
}, |
| 10029 |
members:{handleMouseDown:function(evt){var iframeMap=this._blockData=qx.lang.Object.copy(this.getAll()); |
9902 |
_applyStyleRight:function(){this.__informManager("right"); |
| 10030 |
for(var key in iframeMap){iframeMap[key].block(); |
|
|
| 10031 |
}}, |
| 10032 |
handleMouseUp:function(evt){var iframeMap=this._blockData; |
| 10033 |
for(var key in iframeMap){iframeMap[key].release(); |
| 10034 |
}}}}); |
| 10035 |
|
| 10036 |
|
| 10037 |
|
| 10038 |
|
| 10039 |
/* ID: qx.ui.layout.CanvasLayout */ |
| 10040 |
qx.Class.define("qx.ui.layout.CanvasLayout", |
| 10041 |
{extend:qx.ui.core.Parent, |
| 10042 |
construct:function(){this.base(arguments); |
| 10043 |
}, |
9903 |
}, |
| 10044 |
members:{_createLayoutImpl:function(){return new qx.ui.layout.impl.CanvasLayoutImpl(this); |
9904 |
_applyStyleBottom:function(){this.__informManager("bottom"); |
| 10045 |
}}}); |
|
|
| 10046 |
|
| 10047 |
|
| 10048 |
|
| 10049 |
|
| 10050 |
/* ID: qx.ui.layout.impl.LayoutImpl */ |
| 10051 |
qx.Class.define("qx.ui.layout.impl.LayoutImpl", |
| 10052 |
{extend:qx.core.Object, |
| 10053 |
construct:function(vWidget){this.base(arguments); |
| 10054 |
this._widget=vWidget; |
| 10055 |
}, |
9905 |
}, |
| 10056 |
members:{getWidget:function(){return this._widget; |
9906 |
_applyStyleLeft:function(){this.__informManager("left"); |
| 10057 |
}, |
9907 |
}, |
| 10058 |
computeChildBoxWidth:function(vChild){return vChild.getWidthValue()||vChild._computeBoxWidthFallback(); |
9908 |
_changeColorTop:function(value){this.__colorTop=value; |
|
|
9909 |
this.__computeComplexTop(); |
| 9910 |
this.__informManager("top"); |
| 10059 |
}, |
9911 |
}, |
| 10060 |
computeChildBoxHeight:function(vChild){return vChild.getHeightValue()||vChild._computeBoxHeightFallback(); |
9912 |
_changeColorInnerTop:function(value){this.__colorInnerTop=value; |
|
|
9913 |
this.__computeComplexTop(); |
| 9914 |
this.__informManager("top"); |
| 10061 |
}, |
9915 |
}, |
| 10062 |
computeChildNeededWidth:function(vChild){var vMinBox=vChild._computedMinWidthTypePercent?null:vChild.getMinWidthValue(); |
9916 |
_changeColorRight:function(value){this.__colorRight=value; |
| 10063 |
var vMaxBox=vChild._computedMaxWidthTypePercent?null:vChild.getMaxWidthValue(); |
9917 |
this.__computeComplexRight(); |
| 10064 |
var vBox=(vChild._computedWidthTypePercent||vChild._computedWidthTypeFlex?null:vChild.getWidthValue())||vChild.getPreferredBoxWidth()||0; |
9918 |
this.__informManager("right"); |
| 10065 |
return qx.lang.Number.limit(vBox, |
|
|
| 10066 |
vMinBox, |
| 10067 |
vMaxBox)+vChild.getMarginLeft()+vChild.getMarginRight(); |
| 10068 |
}, |
9919 |
}, |
| 10069 |
computeChildNeededHeight:function(vChild){var vMinBox=vChild._computedMinHeightTypePercent?null:vChild.getMinHeightValue(); |
9920 |
_changeColorInnerRight:function(value){this.__colorInnerRight=value; |
| 10070 |
var vMaxBox=vChild._computedMaxHeightTypePercent?null:vChild.getMaxHeightValue(); |
9921 |
this.__computeComplexRight(); |
| 10071 |
var vBox=(vChild._computedHeightTypePercent||vChild._computedHeightTypeFlex?null:vChild.getHeightValue())||vChild.getPreferredBoxHeight()||0; |
9922 |
this.__informManager("right"); |
| 10072 |
return qx.lang.Number.limit(vBox, |
|
|
| 10073 |
vMinBox, |
| 10074 |
vMaxBox)+vChild.getMarginTop()+vChild.getMarginBottom(); |
| 10075 |
}, |
9923 |
}, |
| 10076 |
computeChildrenNeededWidth_max:function(){for(var i=0, |
9924 |
_changeColorBottom:function(value){this.__colorBottom=value; |
| 10077 |
ch=this.getWidget().getVisibleChildren(), |
9925 |
this.__computeComplexBottom(); |
| 10078 |
chl=ch.length, |
9926 |
this.__informManager("bottom"); |
| 10079 |
maxv=0;i<chl;i++){maxv=Math.max(maxv, |
|
|
| 10080 |
ch[i].getNeededWidth()); |
| 10081 |
}return maxv; |
| 10082 |
}, |
9927 |
}, |
| 10083 |
computeChildrenNeededHeight_max:function(){for(var i=0, |
9928 |
_changeColorInnerBottom:function(value){this.__colorInnerBottom=value; |
| 10084 |
ch=this.getWidget().getVisibleChildren(), |
9929 |
this.__computeComplexBottom(); |
| 10085 |
chl=ch.length, |
9930 |
this.__informManager("bottom"); |
| 10086 |
maxv=0;i<chl;i++){maxv=Math.max(maxv, |
|
|
| 10087 |
ch[i].getNeededHeight()); |
| 10088 |
}return maxv; |
| 10089 |
}, |
9931 |
}, |
| 10090 |
computeChildrenNeededWidth_sum:function(){for(var i=0, |
9932 |
_changeColorLeft:function(value){this.__colorLeft=value; |
| 10091 |
ch=this.getWidget().getVisibleChildren(), |
9933 |
this.__computeComplexLeft(); |
| 10092 |
chl=ch.length, |
9934 |
this.__informManager("left"); |
| 10093 |
sumv=0;i<chl;i++){sumv+=ch[i].getNeededWidth(); |
|
|
| 10094 |
}return sumv; |
| 10095 |
}, |
9935 |
}, |
| 10096 |
computeChildrenNeededHeight_sum:function(){for(var i=0, |
9936 |
_changeColorInnerLeft:function(value){this.__colorInnerLeft=value; |
| 10097 |
ch=this.getWidget().getVisibleChildren(), |
9937 |
this.__computeComplexLeft(); |
| 10098 |
chl=ch.length, |
9938 |
this.__informManager("left"); |
| 10099 |
sumv=0;i<chl;i++){sumv+=ch[i].getNeededHeight(); |
|
|
| 10100 |
}return sumv; |
| 10101 |
}, |
9939 |
}, |
| 10102 |
computeChildrenNeededWidth:null, |
9940 |
__computeComplexTop:function(){this.__complexTop=this.getWidthTop()===2&&this.__colorInnerTop!=null&&this.__colorTop!=this.__colorInnerTop; |
| 10103 |
computeChildrenNeededHeight:null, |
9941 |
}, |
| 10104 |
updateSelfOnChildOuterWidthChange:function(vChild){}, |
9942 |
__computeComplexRight:function(){this.__complexRight=this.getWidthRight()===2&&this.__colorInnerRight!=null&&this.__colorRight!=this.__colorInnerRight; |
| 10105 |
updateSelfOnChildOuterHeightChange:function(vChild){}, |
9943 |
}, |
| 10106 |
updateChildOnInnerWidthChange:function(vChild){}, |
9944 |
__computeComplexBottom:function(){this.__complexBottom=this.getWidthBottom()===2&&this.__colorInnerBottom!=null&&this.__colorBottom!=this.__colorInnerBottom; |
| 10107 |
updateChildOnInnerHeightChange:function(vChild){}, |
9945 |
}, |
| 10108 |
updateSelfOnJobQueueFlush:function(vJobQueue){}, |
9946 |
__computeComplexLeft:function(){this.__complexLeft=this.getWidthLeft()===2&&this.__colorInnerLeft!=null&&this.__colorLeft!=this.__colorInnerLeft; |
| 10109 |
updateChildrenOnJobQueueFlush:function(vJobQueue){}, |
9947 |
}, |
| 10110 |
updateChildrenOnAddChild:function(vChild, |
9948 |
__informManager:function(edge){qx.theme.manager.Border.getInstance().updateObjectsEdge(this, |
| 10111 |
vIndex){}, |
9949 |
edge); |
| 10112 |
updateChildrenOnRemoveChild:function(vChild, |
9950 |
}, |
| 10113 |
vIndex){}, |
9951 |
renderTop:qx.core.Variant.select("qx.client", |
| 10114 |
updateChildrenOnMoveChild:function(vChild, |
9952 |
{"gecko":function(obj){var style=obj._style; |
| 10115 |
vIndex, |
9953 |
style.borderTopWidth=this.__widthTop||"0px"; |
| 10116 |
vOldIndex){}, |
9954 |
style.borderTopColor=this.__colorTop||""; |
| 10117 |
flushChildrenQueue:function(vChildrenQueue){var vWidget=this.getWidget(); |
9955 |
if(this.__complexTop){style.borderTopStyle="solid"; |
| 10118 |
for(var vHashCode in vChildrenQueue){vWidget._layoutChild(vChildrenQueue[vHashCode]); |
9956 |
style.MozBorderTopColors=this.__colorTop+" "+this.__colorInnerTop; |
|
|
9957 |
}else{style.borderTopStyle=this.getStyleTop()||"none"; |
| 9958 |
style.MozBorderTopColors=""; |
| 10119 |
}}, |
9959 |
}}, |
| 10120 |
layoutChild:function(vChild, |
9960 |
"default":function(obj){var outer=obj._style; |
| 10121 |
vJobs){}, |
9961 |
var inner=obj._innerStyle; |
| 10122 |
layoutChild_sizeLimitX:qx.core.Variant.select("qx.client", |
9962 |
if(this.__complexTop){if(!inner){obj.prepareEnhancedBorder(); |
| 10123 |
{"mshtml":qx.lang.Function.returnTrue, |
9963 |
inner=obj._innerStyle; |
| 10124 |
"default":function(vChild, |
9964 |
}outer.borderTopWidth=inner.borderTopWidth="1px"; |
| 10125 |
vJobs){if(vJobs.minWidth){vChild._computedMinWidthTypeNull?vChild._resetRuntimeMinWidth():vChild._renderRuntimeMinWidth(vChild.getMinWidthValue()); |
9965 |
outer.borderTopStyle=inner.borderTopStyle="solid"; |
| 10126 |
}else if(vJobs.initial&&!vChild._computedMinWidthTypeNull){vChild._renderRuntimeMinWidth(vChild.getMinWidthValue()); |
9966 |
outer.borderTopColor=this.__colorTop; |
| 10127 |
} |
9967 |
inner.borderTopColor=this.__colorInnerTop; |
| 10128 |
if(vJobs.maxWidth){vChild._computedMaxWidthTypeNull?vChild._resetRuntimeMaxWidth():vChild._renderRuntimeMaxWidth(vChild.getMaxWidthValue()); |
9968 |
}else{outer.borderTopWidth=this.__widthTop||"0px"; |
| 10129 |
}else if(vJobs.initial&&!vChild._computedMaxWidthTypeNull){vChild._renderRuntimeMaxWidth(vChild.getMaxWidthValue()); |
9969 |
outer.borderTopStyle=this.getStyleTop()||"none"; |
| 10130 |
}}}), |
9970 |
outer.borderTopColor=this.__colorTop||""; |
| 10131 |
layoutChild_sizeLimitY:qx.core.Variant.select("qx.client", |
9971 |
if(inner){inner.borderTopWidth=inner.borderTopStyle=inner.borderTopColor=""; |
| 10132 |
{"mshtml":qx.lang.Function.returnTrue, |
9972 |
}}}}), |
| 10133 |
"default":function(vChild, |
9973 |
renderRight:qx.core.Variant.select("qx.client", |
| 10134 |
vJobs){if(vJobs.minHeight){vChild._computedMinHeightTypeNull?vChild._resetRuntimeMinHeight():vChild._renderRuntimeMinHeight(vChild.getMinHeightValue()); |
9974 |
{"gecko":function(obj){var style=obj._style; |
| 10135 |
}else if(vJobs.initial&&!vChild._computedMinHeightTypeNull){vChild._renderRuntimeMinHeight(vChild.getMinHeightValue()); |
9975 |
style.borderRightWidth=this.__widthRight||"0px"; |
| 10136 |
} |
9976 |
style.borderRightColor=this.__colorRight||""; |
| 10137 |
if(vJobs.maxHeight){vChild._computedMaxHeightTypeNull?vChild._resetRuntimeMaxHeight():vChild._renderRuntimeMaxHeight(vChild.getMaxHeightValue()); |
9977 |
if(this.__complexRight){style.borderRightStyle="solid"; |
| 10138 |
}else if(vJobs.initial&&!vChild._computedMaxHeightTypeNull){vChild._renderRuntimeMaxHeight(vChild.getMaxHeightValue()); |
9978 |
style.MozBorderRightColors=this.__colorRight+" "+this.__colorInnerRight; |
| 10139 |
}}}), |
9979 |
}else{style.borderRightStyle=this.getStyleRight()||"none"; |
| 10140 |
layoutChild_marginX:function(vChild, |
9980 |
style.MozBorderRightColors=""; |
| 10141 |
vJobs){if(vJobs.marginLeft||vJobs.initial){var vValueLeft=vChild.getMarginLeft(); |
|
|
| 10142 |
vValueLeft!=null?vChild._renderRuntimeMarginLeft(vValueLeft):vChild._resetRuntimeMarginLeft(); |
| 10143 |
} |
| 10144 |
if(vJobs.marginRight||vJobs.initial){var vValueRight=vChild.getMarginRight(); |
| 10145 |
vValueRight!=null?vChild._renderRuntimeMarginRight(vValueRight):vChild._resetRuntimeMarginRight(); |
| 10146 |
}}, |
9981 |
}}, |
| 10147 |
layoutChild_marginY:function(vChild, |
9982 |
"default":function(obj){var outer=obj._style; |
| 10148 |
vJobs){if(vJobs.marginTop||vJobs.initial){var vValueTop=vChild.getMarginTop(); |
9983 |
var inner=obj._innerStyle; |
| 10149 |
vValueTop!=null?vChild._renderRuntimeMarginTop(vValueTop):vChild._resetRuntimeMarginTop(); |
9984 |
if(this.__complexRight){if(!inner){obj.prepareEnhancedBorder(); |
| 10150 |
} |
9985 |
inner=obj._innerStyle; |
| 10151 |
if(vJobs.marginBottom||vJobs.initial){var vValueBottom=vChild.getMarginBottom(); |
9986 |
}outer.borderRightWidth=inner.borderRightWidth="1px"; |
| 10152 |
vValueBottom!=null?vChild._renderRuntimeMarginBottom(vValueBottom):vChild._resetRuntimeMarginBottom(); |
9987 |
outer.borderRightStyle=inner.borderRightStyle="solid"; |
|
|
9988 |
outer.borderRightColor=this.__colorRight; |
| 9989 |
inner.borderRightColor=this.__colorInnerRight; |
| 9990 |
}else{outer.borderRightWidth=this.__widthRight||"0px"; |
| 9991 |
outer.borderRightStyle=this.getStyleRight()||"none"; |
| 9992 |
outer.borderRightColor=this.__colorRight||""; |
| 9993 |
if(inner){inner.borderRightWidth=inner.borderRightStyle=inner.borderRightColor=""; |
| 9994 |
}}}}), |
| 9995 |
renderBottom:qx.core.Variant.select("qx.client", |
| 9996 |
{"gecko":function(obj){var style=obj._style; |
| 9997 |
style.borderBottomWidth=this.__widthBottom||"0px"; |
| 9998 |
style.borderBottomColor=this.__colorBottom||""; |
| 9999 |
if(this.__complexBottom){style.borderBottomStyle="solid"; |
| 10000 |
style.MozBorderBottomColors=this.__colorBottom+" "+this.__colorInnerBottom; |
| 10001 |
}else{style.borderBottomStyle=this.getStyleBottom()||"none"; |
| 10002 |
style.MozBorderBottomColors=""; |
| 10153 |
}}, |
10003 |
}}, |
| 10154 |
layoutChild_sizeX_essentialWrapper:function(vChild, |
10004 |
"default":function(obj){var outer=obj._style; |
| 10155 |
vJobs){return vChild._isWidthEssential()?this.layoutChild_sizeX(vChild, |
10005 |
var inner=obj._innerStyle; |
| 10156 |
vJobs):vChild._resetRuntimeWidth(); |
10006 |
if(this.__complexBottom){if(!inner){obj.prepareEnhancedBorder(); |
| 10157 |
}, |
10007 |
inner=obj._innerStyle; |
| 10158 |
layoutChild_sizeY_essentialWrapper:function(vChild, |
10008 |
}outer.borderBottomWidth=inner.borderBottomWidth="1px"; |
| 10159 |
vJobs){return vChild._isHeightEssential()?this.layoutChild_sizeY(vChild, |
10009 |
outer.borderBottomStyle=inner.borderBottomStyle="solid"; |
| 10160 |
vJobs):vChild._resetRuntimeHeight(); |
10010 |
outer.borderBottomColor=this.__colorBottom; |
|
|
10011 |
inner.borderBottomColor=this.__colorInnerBottom; |
| 10012 |
}else{outer.borderBottomWidth=this.__widthBottom||"0px"; |
| 10013 |
outer.borderBottomStyle=this.getStyleBottom()||"none"; |
| 10014 |
outer.borderBottomColor=this.__colorBottom||""; |
| 10015 |
if(inner){inner.borderBottomWidth=inner.borderBottomStyle=inner.borderBottomColor=""; |
| 10016 |
}}}}), |
| 10017 |
renderLeft:qx.core.Variant.select("qx.client", |
| 10018 |
{"gecko":function(obj){var style=obj._style; |
| 10019 |
style.borderLeftWidth=this.__widthLeft||"0px"; |
| 10020 |
style.borderLeftColor=this.__colorLeft||""; |
| 10021 |
if(this.__complexLeft){style.borderLeftStyle="solid"; |
| 10022 |
style.MozBorderLeftColors=this.__colorLeft+" "+this.__colorInnerLeft; |
| 10023 |
}else{style.borderLeftStyle=this.getStyleLeft()||"none"; |
| 10024 |
style.MozBorderLeftColors=""; |
| 10161 |
}}, |
10025 |
}}, |
| 10162 |
defer:function(statics, |
10026 |
"default":function(obj){var outer=obj._style; |
| 10163 |
members){members.computeChildrenNeededWidth=members.computeChildrenNeededWidth_max; |
10027 |
var inner=obj._innerStyle; |
| 10164 |
members.computeChildrenNeededHeight=members.computeChildrenNeededHeight_max; |
10028 |
if(this.__complexLeft){if(!inner){obj.prepareEnhancedBorder(); |
| 10165 |
}, |
10029 |
inner=obj._innerStyle; |
| 10166 |
destruct:function(){this._disposeFields("_widget"); |
10030 |
}outer.borderLeftWidth=inner.borderLeftWidth="1px"; |
| 10167 |
}}); |
10031 |
outer.borderLeftStyle=inner.borderLeftStyle="solid"; |
|
|
10032 |
outer.borderLeftColor=this.__colorLeft; |
| 10033 |
inner.borderLeftColor=this.__colorInnerLeft; |
| 10034 |
}else{outer.borderLeftWidth=this.__widthLeft||"0px"; |
| 10035 |
outer.borderLeftStyle=this.getStyleLeft()||"none"; |
| 10036 |
outer.borderLeftColor=this.__colorLeft||""; |
| 10037 |
if(inner){inner.borderLeftWidth=inner.borderLeftStyle=inner.borderLeftColor=""; |
| 10038 |
}}}})}}); |
| 10168 |
|
10039 |
|
| 10169 |
|
10040 |
|
| 10170 |
|
10041 |
|
| 10171 |
|
10042 |
|
| 10172 |
/* ID: qx.lang.Number */ |
10043 |
/* ID: qx.theme.manager.Font */ |
| 10173 |
qx.Class.define("qx.lang.Number", |
10044 |
qx.Class.define("qx.theme.manager.Font", |
| 10174 |
{statics:{isInRange:function(nr, |
10045 |
{type:"singleton", |
| 10175 |
vmin, |
10046 |
extend:qx.util.manager.Value, |
| 10176 |
vmax){return nr>=vmin&&nr<=vmax; |
10047 |
properties:{fontTheme:{check:"Theme", |
|
|
10048 |
nullable:true, |
| 10049 |
apply:"_applyFontTheme", |
| 10050 |
event:"changeFontTheme"}}, |
| 10051 |
members:{resolveDynamic:function(value){return value instanceof qx.ui.core.Font?value:this._dynamic[value]; |
| 10177 |
}, |
10052 |
}, |
| 10178 |
isBetweenRange:function(nr, |
10053 |
isDynamic:function(value){return value&&(value instanceof qx.ui.core.Font||this._dynamic[value]!==undefined); |
| 10179 |
vmin, |
|
|
| 10180 |
vmax){return nr>vmin&&nr<vmax; |
| 10181 |
}, |
10054 |
}, |
| 10182 |
limit:function(nr, |
10055 |
syncFontTheme:function(){this._updateObjects(); |
| 10183 |
vmin, |
10056 |
}, |
| 10184 |
vmax){if(typeof vmax==="number"&&nr>vmax){return vmax; |
10057 |
_applyFontTheme:function(value){var dest=this._dynamic; |
| 10185 |
}else if(typeof vmin==="number"&&nr<vmin){return vmin; |
10058 |
for(var key in dest){if(dest[key].themed){dest[key].dispose(); |
| 10186 |
}else{return nr; |
10059 |
delete dest[key]; |
|
|
10060 |
}} |
| 10061 |
if(value){var source=value.fonts; |
| 10062 |
var font=qx.ui.core.Font; |
| 10063 |
for(var key in source){dest[key]=(new font).set(source[key]); |
| 10064 |
dest[key].themed=true; |
| 10065 |
}} |
| 10066 |
if(qx.theme.manager.Meta.getInstance().getAutoSync()){this.syncFontTheme(); |
| 10187 |
}}}}); |
10067 |
}}}}); |
| 10188 |
|
10068 |
|
| 10189 |
|
10069 |
|
| 10190 |
|
10070 |
|
| 10191 |
|
10071 |
|
| 10192 |
/* ID: qx.ui.layout.impl.CanvasLayoutImpl */ |
10072 |
/* ID: qx.ui.core.Font */ |
| 10193 |
qx.Class.define("qx.ui.layout.impl.CanvasLayoutImpl", |
10073 |
qx.Class.define("qx.ui.core.Font", |
| 10194 |
{extend:qx.ui.layout.impl.LayoutImpl, |
10074 |
{extend:qx.core.Object, |
| 10195 |
construct:function(vWidget){this.base(arguments, |
10075 |
construct:function(size, |
| 10196 |
vWidget); |
10076 |
family){this.base(arguments); |
| 10197 |
}, |
10077 |
if(size!==undefined){this.setSize(size); |
| 10198 |
members:{computeChildBoxWidth:function(vChild){var vValue=null; |
|
|
| 10199 |
if(vChild._computedLeftTypeNull||vChild._computedRightTypeNull){vValue=vChild.getWidthValue(); |
| 10200 |
}else if(vChild._hasParent){vValue=this.getWidget().getInnerWidth()-vChild.getLeftValue()-vChild.getRightValue(); |
| 10201 |
}return vValue||vChild._computeBoxWidthFallback(); |
| 10202 |
}, |
| 10203 |
computeChildBoxHeight:function(vChild){var vValue=null; |
| 10204 |
if(vChild._computedTopTypeNull||vChild._computedBottomTypeNull){vValue=vChild.getHeightValue(); |
| 10205 |
}else if(vChild._hasParent){vValue=this.getWidget().getInnerHeight()-vChild.getTopValue()-vChild.getBottomValue(); |
| 10206 |
}return vValue||vChild._computeBoxHeightFallback(); |
| 10207 |
}, |
| 10208 |
computeChildNeededWidth:function(vChild){var vLeft=vChild._computedLeftTypePercent?null:vChild.getLeftValue(); |
| 10209 |
var vRight=vChild._computedRightTypePercent?null:vChild.getRightValue(); |
| 10210 |
var vMinBox=vChild._computedMinWidthTypePercent?null:vChild.getMinWidthValue(); |
| 10211 |
var vMaxBox=vChild._computedMaxWidthTypePercent?null:vChild.getMaxWidthValue(); |
| 10212 |
if(vLeft!=null&&vRight!=null){var vBox=vChild.getPreferredBoxWidth()||0; |
| 10213 |
}else{var vBox=(vChild._computedWidthTypePercent?null:vChild.getWidthValue())||vChild.getPreferredBoxWidth()||0; |
| 10214 |
}return qx.lang.Number.limit(vBox, |
| 10215 |
vMinBox, |
| 10216 |
vMaxBox)+vLeft+vRight+vChild.getMarginLeft()+vChild.getMarginRight(); |
| 10217 |
}, |
| 10218 |
computeChildNeededHeight:function(vChild){var vTop=vChild._computedTopTypePercent?null:vChild.getTopValue(); |
| 10219 |
var vBottom=vChild._computedBottomTypePercent?null:vChild.getBottomValue(); |
| 10220 |
var vMinBox=vChild._computedMinHeightTypePercent?null:vChild.getMinHeightValue(); |
| 10221 |
var vMaxBox=vChild._computedMaxHeightTypePercent?null:vChild.getMaxHeightValue(); |
| 10222 |
if(vTop!=null&&vBottom!=null){var vBox=vChild.getPreferredBoxHeight()||0; |
| 10223 |
}else{var vBox=(vChild._computedHeightTypePercent?null:vChild.getHeightValue())||vChild.getPreferredBoxHeight()||0; |
| 10224 |
}return qx.lang.Number.limit(vBox, |
| 10225 |
vMinBox, |
| 10226 |
vMaxBox)+vTop+vBottom+vChild.getMarginTop()+vChild.getMarginBottom(); |
| 10227 |
}, |
| 10228 |
updateChildOnInnerWidthChange:function(vChild){var vUpdatePercent=vChild._recomputePercentX(); |
| 10229 |
var vUpdateRange=vChild._recomputeRangeX(); |
| 10230 |
return vUpdatePercent||vUpdateRange; |
| 10231 |
}, |
| 10232 |
updateChildOnInnerHeightChange:function(vChild){var vUpdatePercent=vChild._recomputePercentY(); |
| 10233 |
var vUpdateRange=vChild._recomputeRangeY(); |
| 10234 |
return vUpdatePercent||vUpdateRange; |
| 10235 |
}, |
| 10236 |
layoutChild:function(vChild, |
| 10237 |
vJobs){this.layoutChild_sizeX_essentialWrapper(vChild, |
| 10238 |
vJobs); |
| 10239 |
this.layoutChild_sizeY_essentialWrapper(vChild, |
| 10240 |
vJobs); |
| 10241 |
this.layoutChild_sizeLimitX(vChild, |
| 10242 |
vJobs); |
| 10243 |
this.layoutChild_sizeLimitY(vChild, |
| 10244 |
vJobs); |
| 10245 |
this.layoutChild_locationX(vChild, |
| 10246 |
vJobs); |
| 10247 |
this.layoutChild_locationY(vChild, |
| 10248 |
vJobs); |
| 10249 |
this.layoutChild_marginX(vChild, |
| 10250 |
vJobs); |
| 10251 |
this.layoutChild_marginY(vChild, |
| 10252 |
vJobs); |
| 10253 |
}, |
| 10254 |
layoutChild_sizeX:qx.core.Variant.select("qx.client", |
| 10255 |
{"mshtml|opera|webkit":function(vChild, |
| 10256 |
vJobs){if(vJobs.initial||vJobs.width||vJobs.minWidth||vJobs.maxWidth||vJobs.left||vJobs.right){if(vChild._computedMinWidthTypeNull&&vChild._computedWidthTypeNull&&vChild._computedMaxWidthTypeNull&&!(!vChild._computedLeftTypeNull&&!vChild._computedRightTypeNull)){vChild._resetRuntimeWidth(); |
| 10257 |
}else{vChild._renderRuntimeWidth(vChild.getBoxWidth()); |
| 10258 |
}}}, |
| 10259 |
"default":function(vChild, |
| 10260 |
vJobs){if(vJobs.initial||vJobs.width){vChild._computedWidthTypeNull?vChild._resetRuntimeWidth():vChild._renderRuntimeWidth(vChild.getWidthValue()); |
| 10261 |
}}}), |
| 10262 |
layoutChild_sizeY:qx.core.Variant.select("qx.client", |
| 10263 |
{"mshtml|opera|webkit":function(vChild, |
| 10264 |
vJobs){if(vJobs.initial||vJobs.height||vJobs.minHeight||vJobs.maxHeight||vJobs.top||vJobs.bottom){if(vChild._computedMinHeightTypeNull&&vChild._computedHeightTypeNull&&vChild._computedMaxHeightTypeNull&&!(!vChild._computedTopTypeNull&&!vChild._computedBottomTypeNull)){vChild._resetRuntimeHeight(); |
| 10265 |
}else{vChild._renderRuntimeHeight(vChild.getBoxHeight()); |
| 10266 |
}}}, |
| 10267 |
"default":function(vChild, |
| 10268 |
vJobs){if(vJobs.initial||vJobs.height){vChild._computedHeightTypeNull?vChild._resetRuntimeHeight():vChild._renderRuntimeHeight(vChild.getHeightValue()); |
| 10269 |
}}}), |
| 10270 |
layoutChild_locationX:function(vChild, |
| 10271 |
vJobs){var vWidget=this.getWidget(); |
| 10272 |
if(vJobs.initial||vJobs.left||vJobs.parentPaddingLeft){vChild._computedLeftTypeNull?vChild._computedRightTypeNull&&vWidget.getPaddingLeft()>0?vChild._renderRuntimeLeft(vWidget.getPaddingLeft()):vChild._resetRuntimeLeft():vChild._renderRuntimeLeft(vChild.getLeftValue()+vWidget.getPaddingLeft()); |
| 10273 |
} |
10078 |
} |
| 10274 |
if(vJobs.initial||vJobs.right||vJobs.parentPaddingRight){vChild._computedRightTypeNull?vChild._computedLeftTypeNull&&vWidget.getPaddingRight()>0?vChild._renderRuntimeRight(vWidget.getPaddingRight()):vChild._resetRuntimeRight():vChild._renderRuntimeRight(vChild.getRightValue()+vWidget.getPaddingRight()); |
10079 |
if(family!==undefined){this.setFamily(family); |
| 10275 |
}}, |
10080 |
}}, |
| 10276 |
layoutChild_locationY:function(vChild, |
10081 |
statics:{fromString:function(str){var font=new qx.ui.core.Font; |
| 10277 |
vJobs){var vWidget=this.getWidget(); |
10082 |
var parts=str.split(/\s+/); |
| 10278 |
if(vJobs.initial||vJobs.top||vJobs.parentPaddingTop){vChild._computedTopTypeNull?vChild._computedBottomTypeNull&&vWidget.getPaddingTop()>0?vChild._renderRuntimeTop(vWidget.getPaddingTop()):vChild._resetRuntimeTop():vChild._renderRuntimeTop(vChild.getTopValue()+vWidget.getPaddingTop()); |
10083 |
var name=[]; |
| 10279 |
} |
10084 |
var part; |
| 10280 |
if(vJobs.initial||vJobs.bottom||vJobs.parentPaddingBottom){vChild._computedBottomTypeNull?vChild._computedTopTypeNull&&vWidget.getPaddingBottom()>0?vChild._renderRuntimeBottom(vWidget.getPaddingBottom()):vChild._resetRuntimeBottom():vChild._renderRuntimeBottom(vChild.getBottomValue()+vWidget.getPaddingBottom()); |
10085 |
for(var i=0;i<parts.length;i++){switch(part=parts[i]){case "bold":font.setBold(true); |
| 10281 |
}}}}); |
10086 |
break; |
| 10282 |
|
10087 |
case "italic":font.setItalic(true); |
| 10283 |
|
10088 |
break; |
| 10284 |
|
10089 |
case "underline":font.setDecoration("underline"); |
| 10285 |
|
10090 |
break; |
| 10286 |
/* ID: qx.ui.core.ClientDocument */ |
10091 |
default:var temp=parseInt(part); |
| 10287 |
qx.Class.define("qx.ui.core.ClientDocument", |
10092 |
if(temp==part||qx.lang.String.contains(part, |
| 10288 |
{type:"singleton", |
10093 |
"px")){font.setSize(temp); |
| 10289 |
extend:qx.ui.layout.CanvasLayout, |
10094 |
}else{name.push(part); |
| 10290 |
construct:function(){this.base(arguments); |
10095 |
}break; |
| 10291 |
this._window=window; |
10096 |
}} |
| 10292 |
this._document=window.document; |
10097 |
if(name.length>0){font.setFamily(name); |
| 10293 |
this.setElement(this._document.body); |
10098 |
}return font; |
| 10294 |
this._document.body.style.position=""; |
|
|
| 10295 |
if(qx.core.Variant.isSet("qx.client", |
| 10296 |
"mshtml")&&(qx.core.Client.getInstance().getMajor()<7)){try{document.execCommand("BackgroundImageCache", |
| 10297 |
false, |
| 10298 |
true); |
| 10299 |
}catch(err){}}this._cachedInnerWidth=this._document.body.offsetWidth; |
| 10300 |
this._cachedInnerHeight=this._document.body.offsetHeight; |
| 10301 |
this.addEventListener("windowresize", |
| 10302 |
this._onwindowresize); |
| 10303 |
this._modalWidgets=[]; |
| 10304 |
this._modalNativeWindow=null; |
| 10305 |
this.activateFocusRoot(); |
| 10306 |
this.initHideFocus(); |
| 10307 |
this.initSelectable(); |
| 10308 |
qx.event.handler.EventHandler.getInstance().setFocusRoot(this); |
| 10309 |
}, |
10099 |
}, |
| 10310 |
events:{"focus":"qx.event.type.Event", |
10100 |
fromConfig:function(config){var font=new qx.ui.core.Font; |
| 10311 |
"windowblur":"qx.event.type.Event", |
10101 |
font.set(config); |
| 10312 |
"windowfocus":"qx.event.type.Event", |
10102 |
return font; |
| 10313 |
"windowresize":"qx.event.type.Event"}, |
|
|
| 10314 |
properties:{appearance:{refine:true, |
| 10315 |
init:"client-document"}, |
| 10316 |
enableElementFocus:{refine:true, |
| 10317 |
init:false}, |
| 10318 |
enabled:{refine:true, |
| 10319 |
init:true}, |
| 10320 |
selectable:{refine:true, |
| 10321 |
init:false}, |
| 10322 |
hideFocus:{refine:true, |
| 10323 |
init:true}, |
| 10324 |
globalCursor:{check:"String", |
| 10325 |
nullable:true, |
| 10326 |
themeable:true, |
| 10327 |
apply:"_applyGlobalCursor", |
| 10328 |
event:"changeGlobalCursor"}}, |
| 10329 |
members:{_applyParent:qx.lang.Function.returnTrue, |
| 10330 |
getTopLevelWidget:qx.lang.Function.returnThis, |
| 10331 |
getWindowElement:function(){return this._window; |
| 10332 |
}, |
10103 |
}, |
| 10333 |
getDocumentElement:function(){return this._document; |
10104 |
reset:function(widget){widget.removeStyleProperty("fontFamily"); |
|
|
10105 |
widget.removeStyleProperty("fontSize"); |
| 10106 |
widget.removeStyleProperty("fontWeight"); |
| 10107 |
widget.removeStyleProperty("fontStyle"); |
| 10108 |
widget.removeStyleProperty("textDecoration"); |
| 10334 |
}, |
10109 |
}, |
| 10335 |
getParent:qx.lang.Function.returnNull, |
10110 |
resetElement:function(element){var style=element.style; |
| 10336 |
getToolTip:qx.lang.Function.returnNull, |
10111 |
style.fontFamily=""; |
| 10337 |
isMaterialized:qx.lang.Function.returnTrue, |
10112 |
style.fontSize=""; |
| 10338 |
isSeeable:qx.lang.Function.returnTrue, |
10113 |
style.fontWeight=""; |
| 10339 |
_isDisplayable:true, |
10114 |
style.fontStyle=""; |
| 10340 |
_hasParent:false, |
10115 |
style.textDecoration=""; |
| 10341 |
_initialLayoutDone:true, |
|
|
| 10342 |
_getBlocker:function(){if(!this._blocker){this._blocker=new qx.ui.core.ClientDocumentBlocker; |
| 10343 |
this._blocker.addEventListener("mousedown", |
| 10344 |
this.blockHelper, |
| 10345 |
this); |
| 10346 |
this._blocker.addEventListener("mouseup", |
| 10347 |
this.blockHelper, |
| 10348 |
this); |
| 10349 |
this.add(this._blocker); |
| 10350 |
}return this._blocker; |
| 10351 |
}, |
10116 |
}, |
| 10352 |
blockHelper:function(e){if(this._modalNativeWindow){if(!this._modalNativeWindow.isClosed()){this._modalNativeWindow.focus(); |
10117 |
resetStyle:function(style){style.fontFamily=""; |
| 10353 |
}else{this.debug("Window seems to be closed already! => Releasing Blocker"); |
10118 |
style.fontSize=""; |
| 10354 |
this.release(this._modalNativeWindow); |
10119 |
style.fontWeight=""; |
| 10355 |
}}}, |
10120 |
style.fontStyle=""; |
| 10356 |
block:function(vActiveChild){this._getBlocker().show(); |
10121 |
style.textDecoration=""; |
| 10357 |
if(qx.Class.isDefined("qx.ui.window.Window")&&vActiveChild instanceof qx.ui.window.Window){this._modalWidgets.push(vActiveChild); |
|
|
| 10358 |
var vOrigIndex=vActiveChild.getZIndex(); |
| 10359 |
this._getBlocker().setZIndex(vOrigIndex); |
| 10360 |
vActiveChild.setZIndex(vOrigIndex+1); |
| 10361 |
}else if(qx.Class.isDefined("qx.client.NativeWindow")&&vActiveChild instanceof qx.client.NativeWindow){this._modalNativeWindow=vActiveChild; |
| 10362 |
this._getBlocker().setZIndex(1e7); |
| 10363 |
}}, |
| 10364 |
release:function(vActiveChild){if(vActiveChild){if(qx.Class.isDefined("qx.client.NativeWindow")&&vActiveChild instanceof qx.client.NativeWindow){this._modalNativeWindow=null; |
| 10365 |
}else{qx.lang.Array.remove(this._modalWidgets, |
| 10366 |
vActiveChild); |
| 10367 |
}}var l=this._modalWidgets.length; |
| 10368 |
if(l==0){this._getBlocker().hide(); |
| 10369 |
}else{var oldActiveChild=this._modalWidgets[l-1]; |
| 10370 |
var o=oldActiveChild.getZIndex(); |
| 10371 |
this._getBlocker().setZIndex(o); |
| 10372 |
oldActiveChild.setZIndex(o+1); |
| 10373 |
}}, |
10122 |
}}, |
| 10374 |
createStyleElement:function(vCssText){return qx.html.StyleSheet.createElement(vCssText); |
10123 |
properties:{size:{check:"Integer", |
|
|
10124 |
nullable:true, |
| 10125 |
apply:"_applySize"}, |
| 10126 |
family:{check:"Array", |
| 10127 |
nullable:true, |
| 10128 |
apply:"_applyFamily"}, |
| 10129 |
bold:{check:"Boolean", |
| 10130 |
nullable:true, |
| 10131 |
apply:"_applyBold"}, |
| 10132 |
italic:{check:"Boolean", |
| 10133 |
nullable:true, |
| 10134 |
apply:"_applyItalic"}, |
| 10135 |
decoration:{check:["underline", |
| 10136 |
"line-through", |
| 10137 |
"overline"], |
| 10138 |
nullable:true, |
| 10139 |
apply:"_applyDecoration"}}, |
| 10140 |
members:{__size:null, |
| 10141 |
__family:null, |
| 10142 |
__bold:null, |
| 10143 |
__italic:null, |
| 10144 |
__decoration:null, |
| 10145 |
_applySize:function(value, |
| 10146 |
old){this.__size=value===null?null:value+"px"; |
| 10375 |
}, |
10147 |
}, |
| 10376 |
addCssRule:function(vSheet, |
10148 |
_applyFamily:function(value, |
| 10377 |
vSelector, |
10149 |
old){var family=""; |
| 10378 |
vStyle){return qx.html.StyleSheet.addRule(vSheet, |
10150 |
for(var i=0, |
| 10379 |
vSelector, |
10151 |
l=value.length;i<l;i++){if(value[i].indexOf(" ")>0){family+='"'+value[i]+'"'; |
| 10380 |
vStyle); |
10152 |
}else{family+=value[i]; |
|
|
10153 |
} |
| 10154 |
if(i!=l-1){family+=","; |
| 10155 |
}}this.__family=family; |
| 10381 |
}, |
10156 |
}, |
| 10382 |
removeCssRule:function(vSheet, |
10157 |
_applyBold:function(value, |
| 10383 |
vSelector){return qx.html.StyleSheet.removeRule(vSheet, |
10158 |
old){this.__bold=value===null?null:value?"bold":"normal"; |
| 10384 |
vSelector); |
|
|
| 10385 |
}, |
10159 |
}, |
| 10386 |
removeAllCssRules:function(vSheet){return qx.html.StyleSheet.removeAllRules(vSheet); |
10160 |
_applyItalic:function(value, |
|
|
10161 |
old){this.__italic=value===null?null:value?"italic":"normal"; |
| 10387 |
}, |
10162 |
}, |
| 10388 |
_applyGlobalCursor:qx.core.Variant.select("qx.client", |
10163 |
_applyDecoration:function(value, |
| 10389 |
{"mshtml":function(value, |
10164 |
old){this.__decoration=value===null?null:value; |
| 10390 |
old){if(value=="pointer"){value="hand"; |
|
|
| 10391 |
} |
| 10392 |
if(old=="pointer"){old="hand"; |
| 10393 |
}var elem, |
| 10394 |
current; |
| 10395 |
var list=this._cursorElements; |
| 10396 |
if(list){for(var i=0, |
| 10397 |
l=list.length;i<l;i++){elem=list[i]; |
| 10398 |
if(elem.style.cursor==old){elem.style.cursor=elem._oldCursor; |
| 10399 |
elem._oldCursor=null; |
| 10400 |
}}}var all=document.all; |
| 10401 |
var list=this._cursorElements=[]; |
| 10402 |
if(value!=null&&value!=""&&value!="auto"){for(var i=0, |
| 10403 |
l=all.length;i<l;i++){elem=all[i]; |
| 10404 |
current=elem.style.cursor; |
| 10405 |
if(current!=null&¤t!=""&¤t!="auto"){elem._oldCursor=current; |
| 10406 |
elem.style.cursor=value; |
| 10407 |
list.push(elem); |
| 10408 |
}}document.body.style.cursor=value; |
| 10409 |
}else{document.body.style.cursor=""; |
| 10410 |
}}, |
| 10411 |
"default":function(value, |
| 10412 |
old){if(!this._globalCursorStyleSheet){this._globalCursorStyleSheet=this.createStyleElement(); |
| 10413 |
}this.removeCssRule(this._globalCursorStyleSheet, |
| 10414 |
"*"); |
| 10415 |
if(value){this.addCssRule(this._globalCursorStyleSheet, |
| 10416 |
"*", |
| 10417 |
"cursor:"+value+" !important"); |
| 10418 |
}}}), |
| 10419 |
_onwindowresize:function(e){if(qx.Class.isDefined("qx.ui.popup.PopupManager")){qx.ui.popup.PopupManager.getInstance().update(); |
| 10420 |
}this._recomputeInnerWidth(); |
| 10421 |
this._recomputeInnerHeight(); |
| 10422 |
qx.ui.core.Widget.flushGlobalQueues(); |
| 10423 |
}, |
10165 |
}, |
| 10424 |
_computeInnerWidth:function(){return this._document.body.offsetWidth; |
10166 |
render:function(widget){widget.setStyleProperty("fontFamily", |
|
|
10167 |
this.__family); |
| 10168 |
widget.setStyleProperty("fontSize", |
| 10169 |
this.__size); |
| 10170 |
widget.setStyleProperty("fontWeight", |
| 10171 |
this.__bold); |
| 10172 |
widget.setStyleProperty("fontStyle", |
| 10173 |
this.__italic); |
| 10174 |
widget.setStyleProperty("textDecoration", |
| 10175 |
this.__decoration); |
| 10425 |
}, |
10176 |
}, |
| 10426 |
_computeInnerHeight:function(){return this._document.body.offsetHeight; |
10177 |
renderStyle:function(style){style.fontFamily=this.__family||""; |
| 10427 |
}}, |
10178 |
style.fontSize=this.__size||""; |
| 10428 |
settings:{"qx.enableApplicationLayout":true, |
10179 |
style.fontWeight=this.__bold||""; |
| 10429 |
"qx.boxModelCorrection":true}, |
10180 |
style.fontStyle=this.__italic||""; |
| 10430 |
defer:function(){if(qx.core.Setting.get("qx.boxModelCorrection")){var boxSizingAttr=qx.core.Client.getInstance().getEngineBoxSizingAttributes(); |
10181 |
style.textDecoration=this.__decoration||""; |
| 10431 |
var borderBoxCss=boxSizingAttr.join(":border-box;")+":border-box;"; |
10182 |
}, |
| 10432 |
var contentBoxCss=boxSizingAttr.join(":content-box;")+":content-box;"; |
10183 |
renderElement:function(element){var style=element.style; |
| 10433 |
qx.html.StyleSheet.createElement("html,body { margin:0;border:0;padding:0; } "+"html { border:0 none; } "+"*{"+borderBoxCss+"} "+"img{"+contentBoxCss+"}"); |
10184 |
style.fontFamily=this.__family||""; |
| 10434 |
} |
10185 |
style.fontSize=this.__size||""; |
| 10435 |
if(qx.core.Setting.get("qx.enableApplicationLayout")){qx.html.StyleSheet.createElement("html,body{width:100%;height:100%;overflow:hidden;}"); |
10186 |
style.fontWeight=this.__bold||""; |
| 10436 |
}}, |
10187 |
style.fontStyle=this.__italic||""; |
| 10437 |
destruct:function(){this._disposeObjects("_blocker"); |
10188 |
style.textDecoration=this.__decoration||""; |
| 10438 |
this._disposeFields("_window", |
10189 |
}, |
| 10439 |
"_document", |
10190 |
generateStyle:function(){return (this.__family?"font-family:"+this.__family.replace(/\"/g, |
| 10440 |
"_modalWidgets", |
10191 |
"'")+";":"")+(this.__size?"font-size:"+this.__size+";":"")+(this.__weight?"font-weight:"+this.__weight+";":"")+(this.__style?"font-style:"+this.__style+";":"")+(this.__decoration?"text-decoration:"+this.__decoration+";":""); |
| 10441 |
"_modalNativeWindow", |
10192 |
}}}); |
| 10442 |
"_globalCursorStyleSheet"); |
|
|
| 10443 |
}}); |
| 10444 |
|
10193 |
|
| 10445 |
|
10194 |
|
| 10446 |
|
10195 |
|
| 10447 |
|
10196 |
|
| 10448 |
/* ID: qx.ui.basic.Terminator */ |
10197 |
/* ID: qx.theme.manager.Icon */ |
| 10449 |
qx.Class.define("qx.ui.basic.Terminator", |
10198 |
qx.Class.define("qx.theme.manager.Icon", |
| 10450 |
{extend:qx.ui.core.Widget, |
10199 |
{type:"singleton", |
| 10451 |
members:{renderPadding:function(changes){if(changes.paddingLeft){this._renderRuntimePaddingLeft(this.getPaddingLeft()); |
10200 |
extend:qx.core.Target, |
| 10452 |
} |
10201 |
properties:{iconTheme:{check:"Theme", |
| 10453 |
if(changes.paddingRight){this._renderRuntimePaddingRight(this.getPaddingRight()); |
10202 |
nullable:true, |
| 10454 |
} |
10203 |
apply:"_applyIconTheme", |
| 10455 |
if(changes.paddingTop){this._renderRuntimePaddingTop(this.getPaddingTop()); |
10204 |
event:"changeIconTheme"}}, |
| 10456 |
} |
10205 |
members:{_applyIconTheme:function(value, |
| 10457 |
if(changes.paddingBottom){this._renderRuntimePaddingBottom(this.getPaddingBottom()); |
10206 |
old){if(qx.theme.manager.Meta.getInstance().getAutoSync()){this.syncIconTheme(); |
| 10458 |
}}, |
|
|
| 10459 |
_renderContent:function(){if(this._computedWidthTypePixel){this._cachedPreferredInnerWidth=null; |
| 10460 |
}else{this._invalidatePreferredInnerWidth(); |
| 10461 |
}if(this._computedHeightTypePixel){this._cachedPreferredInnerHeight=null; |
| 10462 |
}else{this._invalidatePreferredInnerHeight(); |
| 10463 |
}if(this._initialLayoutDone){this.addToJobQueue("load"); |
| 10464 |
}}, |
| 10465 |
_layoutPost:function(changes){if(changes.initial||changes.load||changes.width||changes.height){this._postApply(); |
| 10466 |
}}, |
10207 |
}}, |
| 10467 |
_postApply:qx.lang.Function.returnTrue, |
10208 |
syncIconTheme:function(){var value=this.getIconTheme(); |
| 10468 |
_computeBoxWidthFallback:function(){return this.getPreferredBoxWidth(); |
10209 |
var alias=qx.io.Alias.getInstance(); |
| 10469 |
}, |
10210 |
value?alias.add("icon", |
| 10470 |
_computeBoxHeightFallback:function(){return this.getPreferredBoxHeight(); |
10211 |
value.icons.uri):alias.remove("icon"); |
| 10471 |
}, |
|
|
| 10472 |
_computePreferredInnerWidth:qx.lang.Function.returnZero, |
| 10473 |
_computePreferredInnerHeight:qx.lang.Function.returnZero, |
| 10474 |
_isWidthEssential:function(){if(!this._computedLeftTypeNull&&!this._computedRightTypeNull){return true; |
| 10475 |
} |
| 10476 |
if(!this._computedWidthTypeNull&&!this._computedWidthTypeAuto){return true; |
| 10477 |
} |
| 10478 |
if(!this._computedMinWidthTypeNull&&!this._computedMinWidthTypeAuto){return true; |
| 10479 |
} |
| 10480 |
if(!this._computedMaxWidthTypeNull&&!this._computedMaxWidthTypeAuto){return true; |
| 10481 |
} |
| 10482 |
if(this._borderElement){return true; |
| 10483 |
}return false; |
| 10484 |
}, |
| 10485 |
_isHeightEssential:function(){if(!this._computedTopTypeNull&&!this._computedBottomTypeNull){return true; |
| 10486 |
} |
| 10487 |
if(!this._computedHeightTypeNull&&!this._computedHeightTypeAuto){return true; |
| 10488 |
} |
| 10489 |
if(!this._computedMinHeightTypeNull&&!this._computedMinHeightTypeAuto){return true; |
| 10490 |
} |
| 10491 |
if(!this._computedMaxHeightTypeNull&&!this._computedMaxHeightTypeAuto){return true; |
| 10492 |
} |
| 10493 |
if(this._borderElement){return true; |
| 10494 |
}return false; |
| 10495 |
}}}); |
10212 |
}}}); |
| 10496 |
|
10213 |
|
| 10497 |
|
10214 |
|
| 10498 |
|
10215 |
|
| 10499 |
|
10216 |
|
| 10500 |
/* ID: qx.ui.core.ClientDocumentBlocker */ |
10217 |
/* ID: qx.io.Alias */ |
| 10501 |
qx.Class.define("qx.ui.core.ClientDocumentBlocker", |
10218 |
qx.Class.define("qx.io.Alias", |
| 10502 |
{extend:qx.ui.basic.Terminator, |
10219 |
{type:"singleton", |
|
|
10220 |
extend:qx.util.manager.Value, |
| 10503 |
construct:function(){this.base(arguments); |
10221 |
construct:function(){this.base(arguments); |
| 10504 |
this.initTop(); |
10222 |
this._aliases={}; |
| 10505 |
this.initLeft(); |
10223 |
this.add("static", |
| 10506 |
this.initWidth(); |
10224 |
qx.core.Setting.get("qx.resourceUri")+"/static"); |
| 10507 |
this.initHeight(); |
|
|
| 10508 |
this.initZIndex(); |
| 10509 |
}, |
10225 |
}, |
| 10510 |
properties:{appearance:{refine:true, |
10226 |
members:{_preprocess:function(value){var dynamics=this._dynamic; |
| 10511 |
init:"client-document-blocker"}, |
10227 |
if(dynamics[value]===false){return value; |
| 10512 |
zIndex:{refine:true, |
10228 |
}else if(dynamics[value]===undefined){if(value.charAt(0)==="/"||value.charAt(0)==="."||value.indexOf("http://")===0||value.indexOf("https://")==="0"||value.indexOf("file://")===0){dynamics[value]=false; |
| 10513 |
init:1e8}, |
10229 |
return value; |
| 10514 |
top:{refine:true, |
10230 |
}var alias=value.substring(0, |
| 10515 |
init:0}, |
10231 |
value.indexOf("/")); |
| 10516 |
left:{refine:true, |
10232 |
var resolved=this._aliases[alias]; |
| 10517 |
init:0}, |
10233 |
if(resolved!==undefined){dynamics[value]=resolved+value.substring(alias.length); |
| 10518 |
width:{refine:true, |
10234 |
}}return value; |
| 10519 |
init:"100%"}, |
10235 |
}, |
| 10520 |
height:{refine:true, |
10236 |
add:function(alias, |
| 10521 |
init:"100%"}, |
10237 |
base){this._aliases[alias]=base; |
| 10522 |
display:{refine:true, |
10238 |
var dynamics=this._dynamic; |
| 10523 |
init:false}}, |
10239 |
var reg=this._registry; |
| 10524 |
members:{getFocusRoot:function(){return null; |
10240 |
var entry; |
|
|
10241 |
var paths={}; |
| 10242 |
for(var path in dynamics){if(path.substring(0, |
| 10243 |
path.indexOf("/"))===alias){dynamics[path]=base+path.substring(alias.length); |
| 10244 |
paths[path]=true; |
| 10245 |
}}for(var key in reg){entry=reg[key]; |
| 10246 |
if(paths[entry.value]){entry.callback.call(entry.object, |
| 10247 |
dynamics[entry.value]); |
| 10248 |
}}}, |
| 10249 |
remove:function(alias){delete this._aliases[alias]; |
| 10250 |
}, |
| 10251 |
resolve:function(path){if(path!==null){path=this._preprocess(path); |
| 10252 |
}return this._dynamic[path]||path; |
| 10253 |
}}, |
| 10254 |
destruct:function(){this._disposeFields("_aliases"); |
| 10255 |
}}); |
| 10256 |
|
| 10257 |
|
| 10258 |
|
| 10259 |
|
| 10260 |
/* ID: qx.theme.manager.Widget */ |
| 10261 |
qx.Class.define("qx.theme.manager.Widget", |
| 10262 |
{type:"singleton", |
| 10263 |
extend:qx.core.Target, |
| 10264 |
properties:{widgetTheme:{check:"Theme", |
| 10265 |
nullable:true, |
| 10266 |
apply:"_applyWidgetTheme", |
| 10267 |
event:"changeWidgetTheme"}}, |
| 10268 |
members:{_applyWidgetTheme:function(value, |
| 10269 |
old){if(qx.theme.manager.Meta.getInstance().getAutoSync()){this.syncWidgetTheme(); |
| 10270 |
}}, |
| 10271 |
syncWidgetTheme:function(){var value=this.getWidgetTheme(); |
| 10272 |
var alias=qx.io.Alias.getInstance(); |
| 10273 |
value?alias.add("widget", |
| 10274 |
value.widgets.uri):alias.remove("widget"); |
| 10525 |
}}}); |
10275 |
}}}); |
| 10526 |
|
10276 |
|
| 10527 |
|
10277 |
|
|
Lines 10565-10663
Link Here
|
| 10565 |
if(z1!=z2){return z1-z2; |
10315 |
if(z1!=z2){return z1-z2; |
| 10566 |
}return 0; |
10316 |
}return 0; |
| 10567 |
}, |
10317 |
}, |
| 10568 |
getFirstWidget:function(parentContainer){return this._getFirst(parentContainer, |
10318 |
getFirstWidget:function(parentContainer){return this._getFirst(parentContainer, |
| 10569 |
null); |
10319 |
null); |
|
|
10320 |
}, |
| 10321 |
getLastWidget:function(parentContainer){return this._getLast(parentContainer, |
| 10322 |
null); |
| 10323 |
}, |
| 10324 |
getWidgetAfter:function(parentContainer, |
| 10325 |
widget){if(parentContainer==widget){return this.getFirstWidget(parentContainer); |
| 10326 |
} |
| 10327 |
if(widget.getAnonymous()){widget=widget.getParent(); |
| 10328 |
} |
| 10329 |
if(widget==null){return []; |
| 10330 |
}var vAll=[]; |
| 10331 |
this._getAllAfter(parentContainer, |
| 10332 |
widget, |
| 10333 |
vAll); |
| 10334 |
vAll.sort(this.compareTabOrder); |
| 10335 |
return vAll.length>0?vAll[0]:this.getFirstWidget(parentContainer); |
| 10336 |
}, |
| 10337 |
getWidgetBefore:function(parentContainer, |
| 10338 |
widget){if(parentContainer==widget){return this.getLastWidget(parentContainer); |
| 10339 |
} |
| 10340 |
if(widget.getAnonymous()){widget=widget.getParent(); |
| 10341 |
} |
| 10342 |
if(widget==null){return []; |
| 10343 |
}var vAll=[]; |
| 10344 |
this._getAllBefore(parentContainer, |
| 10345 |
widget, |
| 10346 |
vAll); |
| 10347 |
vAll.sort(this.compareTabOrder); |
| 10348 |
var len=vAll.length; |
| 10349 |
return len>0?vAll[len-1]:this.getLastWidget(parentContainer); |
| 10350 |
}, |
| 10351 |
_getAllAfter:function(parent, |
| 10352 |
widget, |
| 10353 |
arr){var children=parent.getChildren(); |
| 10354 |
var child; |
| 10355 |
var len=children.length; |
| 10356 |
for(var i=0;i<len;i++){child=children[i]; |
| 10357 |
if(!(child instanceof qx.ui.core.Parent)&&!(child instanceof qx.ui.basic.Terminator)){continue; |
| 10358 |
} |
| 10359 |
if(child.isFocusable()&&child.getTabIndex()>0&&this.compareTabOrder(widget, |
| 10360 |
child)<0){arr.push(children[i]); |
| 10361 |
} |
| 10362 |
if(!child.isFocusRoot()&&child instanceof qx.ui.core.Parent){this._getAllAfter(child, |
| 10363 |
widget, |
| 10364 |
arr); |
| 10365 |
}}}, |
| 10366 |
_getAllBefore:function(parent, |
| 10367 |
widget, |
| 10368 |
arr){var children=parent.getChildren(); |
| 10369 |
var child; |
| 10370 |
var len=children.length; |
| 10371 |
for(var i=0;i<len;i++){child=children[i]; |
| 10372 |
if(!(child instanceof qx.ui.core.Parent)&&!(child instanceof qx.ui.basic.Terminator)){continue; |
| 10373 |
} |
| 10374 |
if(child.isFocusable()&&child.getTabIndex()>0&&this.compareTabOrder(widget, |
| 10375 |
child)>0){arr.push(child); |
| 10376 |
} |
| 10377 |
if(!child.isFocusRoot()&&child instanceof qx.ui.core.Parent){this._getAllBefore(child, |
| 10378 |
widget, |
| 10379 |
arr); |
| 10380 |
}}}, |
| 10381 |
_getFirst:function(parent, |
| 10382 |
firstWidget){var children=parent.getChildren(); |
| 10383 |
var child; |
| 10384 |
var len=children.length; |
| 10385 |
for(var i=0;i<len;i++){child=children[i]; |
| 10386 |
if(!(child instanceof qx.ui.core.Parent)&&!(child instanceof qx.ui.basic.Terminator)){continue; |
| 10387 |
} |
| 10388 |
if(child.isFocusable()&&child.getTabIndex()>0){if(firstWidget==null||this.compareTabOrder(child, |
| 10389 |
firstWidget)<0){firstWidget=child; |
| 10390 |
}} |
| 10391 |
if(!child.isFocusRoot()&&child instanceof qx.ui.core.Parent){firstWidget=this._getFirst(child, |
| 10392 |
firstWidget); |
| 10393 |
}}return firstWidget; |
| 10394 |
}, |
| 10395 |
_getLast:function(parent, |
| 10396 |
lastWidget){var children=parent.getChildren(); |
| 10397 |
var child; |
| 10398 |
var len=children.length; |
| 10399 |
for(var i=0;i<len;i++){child=children[i]; |
| 10400 |
if(!(child instanceof qx.ui.core.Parent)&&!(child instanceof qx.ui.basic.Terminator)){continue; |
| 10401 |
} |
| 10402 |
if(child.isFocusable()&&child.getTabIndex()>0){if(lastWidget==null||this.compareTabOrder(child, |
| 10403 |
lastWidget)>0){lastWidget=child; |
| 10404 |
}} |
| 10405 |
if(!child.isFocusRoot()&&child instanceof qx.ui.core.Parent){lastWidget=this._getLast(child, |
| 10406 |
lastWidget); |
| 10407 |
}}return lastWidget; |
| 10408 |
}}, |
| 10409 |
destruct:function(){this._disposeFields("_attachedWidget"); |
| 10410 |
}}); |
| 10411 |
|
| 10412 |
|
| 10413 |
|
| 10414 |
|
| 10415 |
/* ID: qx.html.Location */ |
| 10416 |
qx.Class.define("qx.html.Location", |
| 10417 |
{statics:{getPageOuterLeft:function(el){return qx.html.Location.getPageBoxLeft(el)-qx.html.Style.getMarginLeft(el); |
| 10418 |
}, |
| 10419 |
getPageOuterTop:function(el){return qx.html.Location.getPageBoxTop(el)-qx.html.Style.getMarginTop(el); |
| 10420 |
}, |
| 10421 |
getPageOuterRight:function(el){return qx.html.Location.getPageBoxRight(el)+qx.html.Style.getMarginRight(el); |
| 10422 |
}, |
| 10423 |
getPageOuterBottom:function(el){return qx.html.Location.getPageBoxBottom(el)+qx.html.Style.getMarginBottom(el); |
| 10424 |
}, |
| 10425 |
getClientOuterLeft:function(el){return qx.html.Location.getClientBoxLeft(el)-qx.html.Style.getMarginLeft(el); |
| 10426 |
}, |
| 10427 |
getClientOuterTop:function(el){return qx.html.Location.getClientBoxTop(el)-qx.html.Style.getMarginTop(el); |
| 10428 |
}, |
| 10429 |
getClientOuterRight:function(el){return qx.html.Location.getClientBoxRight(el)+qx.html.Style.getMarginRight(el); |
| 10430 |
}, |
| 10431 |
getClientOuterBottom:function(el){return qx.html.Location.getClientBoxBottom(el)+qx.html.Style.getMarginBottom(el); |
| 10432 |
}, |
| 10433 |
getClientBoxLeft:qx.core.Variant.select("qx.client", |
| 10434 |
{"mshtml":function(el){return el.getBoundingClientRect().left; |
| 10435 |
}, |
| 10436 |
"gecko":function(el){return qx.html.Location.getClientAreaLeft(el)-qx.html.Style.getBorderLeft(el); |
| 10437 |
}, |
| 10438 |
"default":function(el){var sum=el.offsetLeft; |
| 10439 |
while(el.tagName.toLowerCase()!="body"){el=el.offsetParent; |
| 10440 |
sum+=el.offsetLeft-el.scrollLeft; |
| 10441 |
}return sum; |
| 10442 |
}}), |
| 10443 |
getClientBoxTop:qx.core.Variant.select("qx.client", |
| 10444 |
{"mshtml":function(el){return el.getBoundingClientRect().top; |
| 10445 |
}, |
| 10446 |
"gecko":function(el){return qx.html.Location.getClientAreaTop(el)-qx.html.Style.getBorderTop(el); |
| 10447 |
}, |
| 10448 |
"default":function(el){var sum=el.offsetTop; |
| 10449 |
while(el.tagName.toLowerCase()!="body"){el=el.offsetParent; |
| 10450 |
sum+=el.offsetTop-el.scrollTop; |
| 10451 |
}return sum; |
| 10452 |
}}), |
| 10453 |
getClientBoxRight:qx.core.Variant.select("qx.client", |
| 10454 |
{"mshtml":function(el){return el.getBoundingClientRect().right; |
| 10455 |
}, |
| 10456 |
"default":function(el){return qx.html.Location.getClientBoxLeft(el)+qx.html.Dimension.getBoxWidth(el); |
| 10457 |
}}), |
| 10458 |
getClientBoxBottom:qx.core.Variant.select("qx.client", |
| 10459 |
{"mshtml":function(el){return el.getBoundingClientRect().bottom; |
| 10460 |
}, |
| 10461 |
"default":function(el){return qx.html.Location.getClientBoxTop(el)+qx.html.Dimension.getBoxHeight(el); |
| 10462 |
}}), |
| 10463 |
getPageBoxLeft:qx.core.Variant.select("qx.client", |
| 10464 |
{"mshtml":function(el){return qx.html.Location.getClientBoxLeft(el)+qx.html.Scroll.getLeftSum(el); |
| 10465 |
}, |
| 10466 |
"gecko":function(el){return qx.html.Location.getPageAreaLeft(el)-qx.html.Style.getBorderLeft(el); |
| 10467 |
}, |
| 10468 |
"default":function(el){var sum=el.offsetLeft; |
| 10469 |
while(el.tagName.toLowerCase()!="body"){el=el.offsetParent; |
| 10470 |
sum+=el.offsetLeft; |
| 10471 |
}return sum; |
| 10472 |
}}), |
| 10473 |
getPageBoxTop:qx.core.Variant.select("qx.client", |
| 10474 |
{"mshtml":function(el){return qx.html.Location.getClientBoxTop(el)+qx.html.Scroll.getTopSum(el); |
| 10475 |
}, |
| 10476 |
"gecko":function(el){return qx.html.Location.getPageAreaTop(el)-qx.html.Style.getBorderTop(el); |
| 10477 |
}, |
| 10478 |
"default":function(el){var sum=el.offsetTop; |
| 10479 |
while(el.tagName.toLowerCase()!="body"){el=el.offsetParent; |
| 10480 |
sum+=el.offsetTop; |
| 10481 |
}return sum; |
| 10482 |
}}), |
| 10483 |
getPageBoxRight:qx.core.Variant.select("qx.client", |
| 10484 |
{"mshtml":function(el){return qx.html.Location.getClientBoxRight(el)+qx.html.Scroll.getLeftSum(el); |
| 10485 |
}, |
| 10486 |
"default":function(el){return qx.html.Location.getPageBoxLeft(el)+qx.html.Dimension.getBoxWidth(el); |
| 10487 |
}}), |
| 10488 |
getPageBoxBottom:qx.core.Variant.select("qx.client", |
| 10489 |
{"mshtml":function(el){return qx.html.Location.getClientBoxBottom(el)+qx.html.Scroll.getTopSum(el); |
| 10490 |
}, |
| 10491 |
"default":function(el){return qx.html.Location.getPageBoxTop(el)+qx.html.Dimension.getBoxHeight(el); |
| 10492 |
}}), |
| 10493 |
getClientAreaLeft:qx.core.Variant.select("qx.client", |
| 10494 |
{"gecko":function(el){return qx.html.Location.getPageAreaLeft(el)-qx.html.Scroll.getLeftSum(el); |
| 10495 |
}, |
| 10496 |
"default":function(el){return qx.html.Location.getClientBoxLeft(el)+qx.html.Style.getBorderLeft(el); |
| 10497 |
}}), |
| 10498 |
getClientAreaTop:qx.core.Variant.select("qx.client", |
| 10499 |
{"gecko":function(el){return qx.html.Location.getPageAreaTop(el)-qx.html.Scroll.getTopSum(el); |
| 10500 |
}, |
| 10501 |
"default":function(el){return qx.html.Location.getClientBoxTop(el)+qx.html.Style.getBorderTop(el); |
| 10502 |
}}), |
| 10503 |
getClientAreaRight:function(el){return qx.html.Location.getClientAreaLeft(el)+qx.html.Dimension.getAreaWidth(el); |
| 10504 |
}, |
| 10505 |
getClientAreaBottom:function(el){return qx.html.Location.getClientAreaTop(el)+qx.html.Dimension.getAreaHeight(el); |
| 10506 |
}, |
| 10507 |
getPageAreaLeft:qx.core.Variant.select("qx.client", |
| 10508 |
{"gecko":function(el){return el.ownerDocument.getBoxObjectFor(el).x; |
| 10509 |
}, |
| 10510 |
"default":function(el){return qx.html.Location.getPageBoxLeft(el)+qx.html.Style.getBorderLeft(el); |
| 10511 |
}}), |
| 10512 |
getPageAreaTop:qx.core.Variant.select("qx.client", |
| 10513 |
{"gecko":function(el){return el.ownerDocument.getBoxObjectFor(el).y; |
| 10514 |
}, |
| 10515 |
"default":function(el){return qx.html.Location.getPageBoxTop(el)+qx.html.Style.getBorderTop(el); |
| 10516 |
}}), |
| 10517 |
getPageAreaRight:function(el){return qx.html.Location.getPageAreaLeft(el)+qx.html.Dimension.getAreaWidth(el); |
| 10518 |
}, |
| 10519 |
getPageAreaBottom:function(el){return qx.html.Location.getPageAreaTop(el)+qx.html.Dimension.getAreaHeight(el); |
| 10520 |
}, |
| 10521 |
getClientInnerLeft:function(el){return qx.html.Location.getClientAreaLeft(el)+qx.html.Style.getPaddingLeft(el); |
| 10522 |
}, |
| 10523 |
getClientInnerTop:function(el){return qx.html.Location.getClientAreaTop(el)+qx.html.Style.getPaddingTop(el); |
| 10524 |
}, |
| 10525 |
getClientInnerRight:function(el){return qx.html.Location.getClientInnerLeft(el)+qx.html.Dimension.getInnerWidth(el); |
| 10526 |
}, |
| 10527 |
getClientInnerBottom:function(el){return qx.html.Location.getClientInnerTop(el)+qx.html.Dimension.getInnerHeight(el); |
| 10528 |
}, |
| 10529 |
getPageInnerLeft:function(el){return qx.html.Location.getPageAreaLeft(el)+qx.html.Style.getPaddingLeft(el); |
| 10530 |
}, |
| 10531 |
getPageInnerTop:function(el){return qx.html.Location.getPageAreaTop(el)+qx.html.Style.getPaddingTop(el); |
| 10532 |
}, |
| 10533 |
getPageInnerRight:function(el){return qx.html.Location.getPageInnerLeft(el)+qx.html.Dimension.getInnerWidth(el); |
| 10534 |
}, |
| 10535 |
getPageInnerBottom:function(el){return qx.html.Location.getPageInnerTop(el)+qx.html.Dimension.getInnerHeight(el); |
| 10536 |
}, |
| 10537 |
getScreenBoxLeft:qx.core.Variant.select("qx.client", |
| 10538 |
{"gecko":function(el){var sum=0; |
| 10539 |
var p=el.parentNode; |
| 10540 |
while(p.nodeType==1){sum+=p.scrollLeft; |
| 10541 |
p=p.parentNode; |
| 10542 |
}return el.ownerDocument.getBoxObjectFor(el).screenX-sum; |
| 10543 |
}, |
| 10544 |
"default":function(el){return qx.html.Location.getScreenDocumentLeft(el)+qx.html.Location.getPageBoxLeft(el); |
| 10545 |
}}), |
| 10546 |
getScreenBoxTop:qx.core.Variant.select("qx.client", |
| 10547 |
{"gecko":function(el){var sum=0; |
| 10548 |
var p=el.parentNode; |
| 10549 |
while(p.nodeType==1){sum+=p.scrollTop; |
| 10550 |
p=p.parentNode; |
| 10551 |
}return el.ownerDocument.getBoxObjectFor(el).screenY-sum; |
| 10552 |
}, |
| 10553 |
"default":function(el){return qx.html.Location.getScreenDocumentTop(el)+qx.html.Location.getPageBoxTop(el); |
| 10554 |
}}), |
| 10555 |
getScreenBoxRight:function(el){return qx.html.Location.getScreenBoxLeft(el)+qx.html.Dimension.getBoxWidth(el); |
| 10556 |
}, |
| 10557 |
getScreenBoxBottom:function(el){return qx.html.Location.getScreenBoxTop(el)+qx.html.Dimension.getBoxHeight(el); |
| 10558 |
}, |
| 10559 |
getScreenOuterLeft:function(el){return qx.html.Location.getScreenBoxLeft(el)-qx.html.Style.getMarginLeft(el); |
| 10560 |
}, |
| 10561 |
getScreenOuterTop:function(el){return qx.html.Location.getScreenBoxTop(el)-qx.html.Style.getMarginTop(el); |
| 10562 |
}, |
| 10563 |
getScreenOuterRight:function(el){return qx.html.Location.getScreenBoxRight(el)+qx.html.Style.getMarginRight(el); |
| 10570 |
}, |
10564 |
}, |
| 10571 |
getLastWidget:function(parentContainer){return this._getLast(parentContainer, |
10565 |
getScreenOuterBottom:function(el){return qx.html.Location.getScreenBoxBottom(el)+qx.html.Style.getMarginBottom(el); |
| 10572 |
null); |
|
|
| 10573 |
}, |
10566 |
}, |
| 10574 |
getWidgetAfter:function(parentContainer, |
10567 |
getScreenAreaLeft:function(el){return qx.html.Location.getScreenBoxLeft(el)+qx.html.Dimension.getInsetLeft(el); |
| 10575 |
widget){if(parentContainer==widget){return this.getFirstWidget(parentContainer); |
|
|
| 10576 |
} |
| 10577 |
if(widget.getAnonymous()){widget=widget.getParent(); |
| 10578 |
} |
| 10579 |
if(widget==null){return []; |
| 10580 |
}var vAll=[]; |
| 10581 |
this._getAllAfter(parentContainer, |
| 10582 |
widget, |
| 10583 |
vAll); |
| 10584 |
vAll.sort(this.compareTabOrder); |
| 10585 |
return vAll.length>0?vAll[0]:this.getFirstWidget(parentContainer); |
| 10586 |
}, |
10568 |
}, |
| 10587 |
getWidgetBefore:function(parentContainer, |
10569 |
getScreenAreaTop:function(el){return qx.html.Location.getScreenBoxTop(el)+qx.html.Dimension.getInsetTop(el); |
| 10588 |
widget){if(parentContainer==widget){return this.getLastWidget(parentContainer); |
|
|
| 10589 |
} |
| 10590 |
if(widget.getAnonymous()){widget=widget.getParent(); |
| 10591 |
} |
| 10592 |
if(widget==null){return []; |
| 10593 |
}var vAll=[]; |
| 10594 |
this._getAllBefore(parentContainer, |
| 10595 |
widget, |
| 10596 |
vAll); |
| 10597 |
vAll.sort(this.compareTabOrder); |
| 10598 |
var len=vAll.length; |
| 10599 |
return len>0?vAll[len-1]:this.getLastWidget(parentContainer); |
| 10600 |
}, |
10570 |
}, |
| 10601 |
_getAllAfter:function(parent, |
10571 |
getScreenAreaRight:function(el){return qx.html.Location.getScreenBoxRight(el)-qx.html.Dimension.getInsetRight(el); |
| 10602 |
widget, |
|
|
| 10603 |
arr){var children=parent.getChildren(); |
| 10604 |
var child; |
| 10605 |
var len=children.length; |
| 10606 |
for(var i=0;i<len;i++){child=children[i]; |
| 10607 |
if(!(child instanceof qx.ui.core.Parent)&&!(child instanceof qx.ui.basic.Terminator)){continue; |
| 10608 |
} |
| 10609 |
if(child.isFocusable()&&child.getTabIndex()>0&&this.compareTabOrder(widget, |
| 10610 |
child)<0){arr.push(children[i]); |
| 10611 |
} |
| 10612 |
if(!child.isFocusRoot()&&child instanceof qx.ui.core.Parent){this._getAllAfter(child, |
| 10613 |
widget, |
| 10614 |
arr); |
| 10615 |
}}}, |
| 10616 |
_getAllBefore:function(parent, |
| 10617 |
widget, |
| 10618 |
arr){var children=parent.getChildren(); |
| 10619 |
var child; |
| 10620 |
var len=children.length; |
| 10621 |
for(var i=0;i<len;i++){child=children[i]; |
| 10622 |
if(!(child instanceof qx.ui.core.Parent)&&!(child instanceof qx.ui.basic.Terminator)){continue; |
| 10623 |
} |
| 10624 |
if(child.isFocusable()&&child.getTabIndex()>0&&this.compareTabOrder(widget, |
| 10625 |
child)>0){arr.push(child); |
| 10626 |
} |
| 10627 |
if(!child.isFocusRoot()&&child instanceof qx.ui.core.Parent){this._getAllBefore(child, |
| 10628 |
widget, |
| 10629 |
arr); |
| 10630 |
}}}, |
| 10631 |
_getFirst:function(parent, |
| 10632 |
firstWidget){var children=parent.getChildren(); |
| 10633 |
var child; |
| 10634 |
var len=children.length; |
| 10635 |
for(var i=0;i<len;i++){child=children[i]; |
| 10636 |
if(!(child instanceof qx.ui.core.Parent)&&!(child instanceof qx.ui.basic.Terminator)){continue; |
| 10637 |
} |
| 10638 |
if(child.isFocusable()&&child.getTabIndex()>0){if(firstWidget==null||this.compareTabOrder(child, |
| 10639 |
firstWidget)<0){firstWidget=child; |
| 10640 |
}} |
| 10641 |
if(!child.isFocusRoot()&&child instanceof qx.ui.core.Parent){firstWidget=this._getFirst(child, |
| 10642 |
firstWidget); |
| 10643 |
}}return firstWidget; |
| 10644 |
}, |
10572 |
}, |
| 10645 |
_getLast:function(parent, |
10573 |
getScreenAreaBottom:function(el){return qx.html.Location.getScreenBoxBottom(el)-qx.html.Dimension.getInsetBottom(el); |
| 10646 |
lastWidget){var children=parent.getChildren(); |
10574 |
}, |
| 10647 |
var child; |
10575 |
getScreenInnerLeft:function(el){return qx.html.Location.getScreenAreaLeft(el)+qx.html.Style.getPaddingLeft(el); |
| 10648 |
var len=children.length; |
10576 |
}, |
| 10649 |
for(var i=0;i<len;i++){child=children[i]; |
10577 |
getScreenInnerTop:function(el){return qx.html.Location.getScreenAreaTop(el)+qx.html.Style.getPaddingTop(el); |
| 10650 |
if(!(child instanceof qx.ui.core.Parent)&&!(child instanceof qx.ui.basic.Terminator)){continue; |
10578 |
}, |
| 10651 |
} |
10579 |
getScreenInnerRight:function(el){return qx.html.Location.getScreenAreaRight(el)-qx.html.Style.getPaddingRight(el); |
| 10652 |
if(child.isFocusable()&&child.getTabIndex()>0){if(lastWidget==null||this.compareTabOrder(child, |
10580 |
}, |
| 10653 |
lastWidget)>0){lastWidget=child; |
10581 |
getScreenInnerBottom:function(el){return qx.html.Location.getScreenAreaBottom(el)-qx.html.Style.getPaddingBottom(el); |
| 10654 |
}} |
10582 |
}, |
| 10655 |
if(!child.isFocusRoot()&&child instanceof qx.ui.core.Parent){lastWidget=this._getLast(child, |
10583 |
getScreenDocumentLeft:qx.core.Variant.select("qx.client", |
| 10656 |
lastWidget); |
10584 |
{"gecko":function(el){return qx.html.Location.getScreenOuterLeft(el.ownerDocument.body); |
| 10657 |
}}return lastWidget; |
10585 |
}, |
| 10658 |
}}, |
10586 |
"default":function(el){return el.document.parentWindow.screenLeft; |
| 10659 |
destruct:function(){this._disposeFields("_attachedWidget"); |
10587 |
}}), |
| 10660 |
}}); |
10588 |
getScreenDocumentTop:qx.core.Variant.select("qx.client", |
|
|
10589 |
{"gecko":function(el){return qx.html.Location.getScreenOuterTop(el.ownerDocument.body); |
| 10590 |
}, |
| 10591 |
"default":function(el){return el.document.parentWindow.screenTop; |
| 10592 |
}}), |
| 10593 |
getScreenDocumentRight:qx.core.Variant.select("qx.client", |
| 10594 |
{"gecko":function(el){return qx.html.Location.getScreenOuterRight(el.ownerDocument.body); |
| 10595 |
}, |
| 10596 |
"default":function(el){}}), |
| 10597 |
getScreenDocumentBottom:qx.core.Variant.select("qx.client", |
| 10598 |
{"gecko":function(el){return qx.html.Location.getScreenOuterBottom(el.ownerDocument.body); |
| 10599 |
}, |
| 10600 |
"default":function(el){}})}}); |
| 10601 |
|
| 10602 |
|
| 10603 |
|
| 10604 |
|
| 10605 |
/* ID: qx.html.Scroll */ |
| 10606 |
qx.Class.define("qx.html.Scroll", |
| 10607 |
{statics:{getLeftSum:function(el){var sum=0; |
| 10608 |
var p=el.parentNode; |
| 10609 |
while(p.nodeType==1){sum+=p.scrollLeft; |
| 10610 |
p=p.parentNode; |
| 10611 |
}return sum; |
| 10612 |
}, |
| 10613 |
getTopSum:function(el){var sum=0; |
| 10614 |
var p=el.parentNode; |
| 10615 |
while(p.nodeType==1){sum+=p.scrollTop; |
| 10616 |
p=p.parentNode; |
| 10617 |
}return sum; |
| 10618 |
}}}); |
| 10661 |
|
10619 |
|
| 10662 |
|
10620 |
|
| 10663 |
|
10621 |
|
|
Lines 10706-10899
Link Here
|
| 10706 |
|
10664 |
|
| 10707 |
|
10665 |
|
| 10708 |
|
10666 |
|
| 10709 |
/* ID: qx.client.Command */ |
10667 |
/* ID: qx.html.Offset */ |
| 10710 |
qx.Class.define("qx.client.Command", |
10668 |
qx.Class.define("qx.html.Offset", |
| 10711 |
{extend:qx.core.Target, |
10669 |
{statics:{getLeft:qx.core.Variant.select("qx.client", |
| 10712 |
events:{"execute":"qx.event.type.DataEvent"}, |
10670 |
{"gecko":function(el){var val=el.offsetLeft; |
| 10713 |
construct:function(shortcut, |
10671 |
var pa=el.parentNode; |
| 10714 |
keyCode){this.base(arguments); |
10672 |
var pose=qx.html.Style.getStyleProperty(el, |
| 10715 |
this.__modifier={}; |
10673 |
"position"); |
| 10716 |
this.__key=null; |
10674 |
var posp=qx.html.Style.getStyleProperty(pa, |
| 10717 |
if(shortcut!=null){this.setShortcut(shortcut); |
10675 |
"position"); |
| 10718 |
} |
10676 |
if(pose!="absolute"&&pose!="fixed"){val-=qx.html.Style.getBorderLeft(pa); |
| 10719 |
if(keyCode!=null){this.warn("The use of keyCode in command is deprecated. Use keyIdentifier instead."); |
10677 |
}if(posp!="absolute"&&posp!="fixed"){while(pa){pa=pa.parentNode; |
| 10720 |
this.setKeyCode(keyCode); |
10678 |
if(!pa||typeof pa.tagName!=="string"){break; |
| 10721 |
}{if(this.__modifier.Alt&&this.__key&&this.__key.length==1){if((this.__key>="A"&&this.__key<="Z")||(this.__key>="0"&&this.__key<="9")){this.warn("A shortcut containing Alt and a letter or number will not work under OS X!"); |
10679 |
}var posi=qx.html.Style.getStyleProperty(pa, |
| 10722 |
}}}; |
10680 |
"position"); |
| 10723 |
qx.event.handler.EventHandler.getInstance().addCommand(this); |
10681 |
if(posi=="absolute"||posi=="fixed"){val-=qx.html.Style.getBorderLeft(pa)+qx.html.Style.getPaddingLeft(pa); |
| 10724 |
}, |
10682 |
break; |
| 10725 |
properties:{enabled:{init:true, |
10683 |
}}}return val; |
| 10726 |
check:"Boolean", |
10684 |
}, |
| 10727 |
event:"changeEnabled"}, |
10685 |
"default":function(el){return el.offsetLeft; |
| 10728 |
shortcut:{check:"String", |
10686 |
}}), |
| 10729 |
apply:"_applyShortcut", |
10687 |
getTop:qx.core.Variant.select("qx.client", |
| 10730 |
nullable:true}, |
10688 |
{"gecko":function(el){var val=el.offsetTop; |
| 10731 |
keyCode:{check:"Number", |
10689 |
var pa=el.parentNode; |
| 10732 |
nullable:true}, |
10690 |
var pose=qx.html.Style.getStyleProperty(el, |
| 10733 |
keyIdentifier:{check:"String", |
10691 |
"position"); |
| 10734 |
nullable:true}}, |
10692 |
var posp=qx.html.Style.getStyleProperty(pa, |
| 10735 |
members:{getKeyCode:function(){return this._keyCode; |
10693 |
"position"); |
| 10736 |
}, |
10694 |
if(pose!="absolute"&&pose!="fixed"){val-=qx.html.Style.getBorderTop(pa); |
| 10737 |
setKeyCode:function(code){qx.log.Logger.deprecatedMethodWarning(arguments.callee); |
10695 |
}if(posp!="absolute"&&posp!="fixed"){while(pa){pa=pa.parentNode; |
| 10738 |
this._keyCode=code; |
10696 |
if(!pa||typeof pa.tagName!=="string"){break; |
| 10739 |
}, |
10697 |
}var posi=qx.html.Style.getStyleProperty(pa, |
| 10740 |
execute:function(vTarget){if(this.hasEventListeners("execute")){var event=new qx.event.type.DataEvent("execute", |
10698 |
"position"); |
| 10741 |
vTarget); |
10699 |
if(posi=="absolute"||posi=="fixed"){val-=qx.html.Style.getBorderTop(pa)+qx.html.Style.getPaddingTop(pa); |
| 10742 |
this.dispatchEvent(event, |
10700 |
break; |
| 10743 |
true); |
10701 |
}}}return val; |
| 10744 |
}return false; |
10702 |
}, |
| 10745 |
}, |
10703 |
"default":function(el){return el.offsetTop; |
| 10746 |
_applyShortcut:function(value, |
10704 |
}})}}); |
| 10747 |
old){if(value){this.__modifier={}; |
|
|
| 10748 |
this.__key=null; |
| 10749 |
var a=value.split(/[-+\s]+/); |
| 10750 |
var al=a.length; |
| 10751 |
for(var i=0;i<al;i++){var identifier=this.__oldKeyNameToKeyIdentifier(a[i]); |
| 10752 |
switch(identifier){case "Control":case "Shift":case "Meta":case "Alt":this.__modifier[identifier]=true; |
| 10753 |
break; |
| 10754 |
case "Unidentified":var msg="Not a valid key name for a command: "+a[i]; |
| 10755 |
this.error(msg); |
| 10756 |
throw msg; |
| 10757 |
default:if(this.__key){var msg="You can only specify one non modifier key!"; |
| 10758 |
this.error(msg); |
| 10759 |
throw msg; |
| 10760 |
}this.__key=identifier; |
| 10761 |
}}}return true; |
| 10762 |
}, |
| 10763 |
matchesKeyEvent:function(e){var key=this.__key||this.getKeyIdentifier(); |
| 10764 |
if(!key&&!this.getKeyCode()){return ; |
| 10765 |
}if((this.__modifier.Shift&&!e.isShiftPressed())|| |
| 10766 |
(this.__modifier.Control&&!e.isCtrlPressed())|| |
| 10767 |
(this.__modifier.Alt&&!e.isAltPressed())){return false; |
| 10768 |
} |
| 10769 |
if(key){if(key==e.getKeyIdentifier()){return true; |
| 10770 |
}}else{if(this.getKeyCode()==e.getKeyCode()){return true; |
| 10771 |
}}return false; |
| 10772 |
}, |
| 10773 |
__oldKeyNameToKeyIdentifierMap:{esc:"Escape", |
| 10774 |
ctrl:"Control", |
| 10775 |
print:"PrintScreen", |
| 10776 |
del:"Delete", |
| 10777 |
pageup:"PageUp", |
| 10778 |
pagedown:"PageDown", |
| 10779 |
numlock:"NumLock", |
| 10780 |
numpad_0:"0", |
| 10781 |
numpad_1:"1", |
| 10782 |
numpad_2:"2", |
| 10783 |
numpad_3:"3", |
| 10784 |
numpad_4:"4", |
| 10785 |
numpad_5:"5", |
| 10786 |
numpad_6:"6", |
| 10787 |
numpad_7:"7", |
| 10788 |
numpad_8:"8", |
| 10789 |
numpad_9:"9", |
| 10790 |
numpad_divide:"/", |
| 10791 |
numpad_multiply:"*", |
| 10792 |
numpad_minus:"-", |
| 10793 |
numpad_plus:"+"}, |
| 10794 |
__oldKeyNameToKeyIdentifier:function(keyName){var keyHandler=qx.event.handler.KeyEventHandler.getInstance(); |
| 10795 |
var keyIdentifier="Unidentified"; |
| 10796 |
if(keyHandler.isValidKeyIdentifier(keyName)){return keyName; |
| 10797 |
} |
| 10798 |
if(keyName.length==1&&keyName>="a"&&keyName<="z"){return keyName.toUpperCase(); |
| 10799 |
}keyName=keyName.toLowerCase(); |
| 10800 |
if(!qx.event.type.KeyEvent.keys[keyName]){return "Unidentified"; |
| 10801 |
}var keyIdentifier=this.__oldKeyNameToKeyIdentifierMap[keyName]; |
| 10802 |
if(keyIdentifier){return keyIdentifier; |
| 10803 |
}else{return qx.lang.String.toFirstUp(keyName); |
| 10804 |
}}, |
| 10805 |
toString:function(){var keyCode=this.getKeyCode(); |
| 10806 |
var key=this.__key||this.getKeyIdentifier(); |
| 10807 |
var str=[]; |
| 10808 |
for(var modifier in this.__modifier){str.push(qx.locale.Key.getKeyName("short", |
| 10809 |
modifier)); |
| 10810 |
} |
| 10811 |
if(key){str.push(qx.locale.Key.getKeyName("short", |
| 10812 |
key)); |
| 10813 |
} |
| 10814 |
if(keyCode!=null){var vTemp=qx.event.type.KeyEvent.codes[keyCode]; |
| 10815 |
str.push(vTemp?qx.lang.String.toFirstUp(vTemp):String(keyCode)); |
| 10816 |
}return str.join("-"); |
| 10817 |
}}, |
| 10818 |
destruct:function(){var mgr=qx.event.handler.EventHandler.getInstance(); |
| 10819 |
if(mgr){mgr.removeCommand(this); |
| 10820 |
}this._disposeFields("__modifier", |
| 10821 |
"__key"); |
| 10822 |
}}); |
| 10823 |
|
| 10824 |
|
| 10825 |
|
10705 |
|
| 10826 |
|
10706 |
|
| 10827 |
/* ID: qx.locale.Key */ |
10707 |
|
| 10828 |
qx.Class.define("qx.locale.Key", |
10708 |
|
| 10829 |
{statics:{getKeyName:function(size, |
10709 |
/* ID: qx.html.ScrollIntoView */ |
| 10830 |
keyIdentifier, |
10710 |
qx.Class.define("qx.html.ScrollIntoView", |
| 10831 |
locale){if(size!="short"&&size!="full"){throw new Error('format must be one of: "short", "full"'); |
10711 |
{statics:{scrollX:function(vElement, |
| 10832 |
}var key="key_"+size+"_"+keyIdentifier; |
10712 |
vAlignLeft){var vParentWidth, |
| 10833 |
var localizedKey=new qx.locale.LocalizedString(key, |
10713 |
vParentScrollLeft, |
| 10834 |
[], |
10714 |
vWidth, |
| 10835 |
locale); |
10715 |
vHasScroll; |
| 10836 |
if(localizedKey==key){return qx.locale.Key._keyNames[key]||keyIdentifier; |
10716 |
var vParent=vElement.parentNode; |
| 10837 |
}else{return localizedKey.toString(); |
10717 |
var vOffset=vElement.offsetLeft; |
| 10838 |
}}}, |
10718 |
var vWidth=vElement.offsetWidth; |
| 10839 |
defer:function(statics, |
10719 |
while(vParent){switch(qx.html.Style.getStyleProperty(vParent, |
| 10840 |
members, |
10720 |
"overflow")){case "scroll":case "auto":case "-moz-scrollbars-horizontal":vHasScroll=true; |
| 10841 |
properties){var keyNames={}; |
10721 |
break; |
| 10842 |
var Manager=qx.locale.Manager; |
10722 |
default:switch(qx.html.Style.getStyleProperty(vParent, |
| 10843 |
keyNames[Manager.marktr("key_short_Backspace")]="Backspace"; |
10723 |
"overflowX")){case "scroll":case "auto":vHasScroll=true; |
| 10844 |
keyNames[Manager.marktr("key_short_Tab")]="Tab"; |
10724 |
break; |
| 10845 |
keyNames[Manager.marktr("key_short_Space")]="Space"; |
10725 |
default:vHasScroll=false; |
| 10846 |
keyNames[Manager.marktr("key_short_Enter")]="Enter"; |
10726 |
}} |
| 10847 |
keyNames[Manager.marktr("key_short_Shift")]="Shift"; |
10727 |
if(vHasScroll){vParentWidth=vParent.clientWidth; |
| 10848 |
keyNames[Manager.marktr("key_short_Control")]="Ctrl"; |
10728 |
vParentScrollLeft=vParent.scrollLeft; |
| 10849 |
keyNames[Manager.marktr("key_short_Alt")]="Alt"; |
10729 |
if(vAlignLeft){vParent.scrollLeft=vOffset; |
| 10850 |
keyNames[Manager.marktr("key_short_CapsLock")]="Caps"; |
10730 |
}else if(vAlignLeft==false){vParent.scrollLeft=vOffset+vWidth-vParentWidth; |
| 10851 |
keyNames[Manager.marktr("key_short_Meta")]="Meta"; |
10731 |
}else if(vWidth>vParentWidth||vOffset<vParentScrollLeft){vParent.scrollLeft=vOffset; |
| 10852 |
keyNames[Manager.marktr("key_short_Escape")]="Esc"; |
10732 |
}else if((vOffset+vWidth)>(vParentScrollLeft+vParentWidth)){vParent.scrollLeft=vOffset+vWidth-vParentWidth; |
| 10853 |
keyNames[Manager.marktr("key_short_Left")]="Left"; |
10733 |
}vOffset=vParent.offsetLeft; |
| 10854 |
keyNames[Manager.marktr("key_short_Up")]="Up"; |
10734 |
vWidth=vParent.offsetWidth; |
| 10855 |
keyNames[Manager.marktr("key_short_Right")]="Right"; |
10735 |
}else{vOffset+=vParent.offsetLeft; |
| 10856 |
keyNames[Manager.marktr("key_short_Down")]="Down"; |
10736 |
} |
| 10857 |
keyNames[Manager.marktr("key_short_PageUp")]="PgUp"; |
10737 |
if(vParent.tagName.toLowerCase()=="body"){break; |
| 10858 |
keyNames[Manager.marktr("key_short_PageDown")]="PgDn"; |
10738 |
}vParent=vParent.offsetParent; |
| 10859 |
keyNames[Manager.marktr("key_short_End")]="End"; |
10739 |
}return true; |
| 10860 |
keyNames[Manager.marktr("key_short_Home")]="Home"; |
10740 |
}, |
| 10861 |
keyNames[Manager.marktr("key_short_Insert")]="Ins"; |
10741 |
scrollY:function(vElement, |
| 10862 |
keyNames[Manager.marktr("key_short_Delete")]="Del"; |
10742 |
vAlignTop){var vParentHeight, |
| 10863 |
keyNames[Manager.marktr("key_short_NumLock")]="Num"; |
10743 |
vParentScrollTop, |
| 10864 |
keyNames[Manager.marktr("key_short_PrintScreen")]="Print"; |
10744 |
vHeight, |
| 10865 |
keyNames[Manager.marktr("key_short_Scroll")]="Scroll"; |
10745 |
vHasScroll; |
| 10866 |
keyNames[Manager.marktr("key_short_Pause")]="Pause"; |
10746 |
var vParent=vElement.parentNode; |
| 10867 |
keyNames[Manager.marktr("key_short_Win")]="Win"; |
10747 |
var vOffset=vElement.offsetTop; |
| 10868 |
keyNames[Manager.marktr("key_short_Apps")]="Apps"; |
10748 |
var vHeight=vElement.offsetHeight; |
| 10869 |
keyNames[Manager.marktr("key_full_Backspace")]="Backspace"; |
10749 |
while(vParent){switch(qx.html.Style.getStyleProperty(vParent, |
| 10870 |
keyNames[Manager.marktr("key_full_Tab")]="Tabulator"; |
10750 |
"overflow")){case "scroll":case "auto":case "-moz-scrollbars-vertical":vHasScroll=true; |
| 10871 |
keyNames[Manager.marktr("key_full_Space")]="Space"; |
10751 |
break; |
| 10872 |
keyNames[Manager.marktr("key_full_Enter")]="Enter"; |
10752 |
default:switch(qx.html.Style.getStyleProperty(vParent, |
| 10873 |
keyNames[Manager.marktr("key_full_Shift")]="Shift"; |
10753 |
"overflowY")){case "scroll":case "auto":vHasScroll=true; |
| 10874 |
keyNames[Manager.marktr("key_full_Control")]="Control"; |
10754 |
break; |
| 10875 |
keyNames[Manager.marktr("key_full_Alt")]="Alt"; |
10755 |
default:vHasScroll=false; |
| 10876 |
keyNames[Manager.marktr("key_full_CapsLock")]="CapsLock"; |
10756 |
}} |
| 10877 |
keyNames[Manager.marktr("key_full_Meta")]="Meta"; |
10757 |
if(vHasScroll){vParentHeight=vParent.clientHeight; |
| 10878 |
keyNames[Manager.marktr("key_full_Escape")]="Escape"; |
10758 |
vParentScrollTop=vParent.scrollTop; |
| 10879 |
keyNames[Manager.marktr("key_full_Left")]="Left"; |
10759 |
if(vAlignTop){vParent.scrollTop=vOffset; |
| 10880 |
keyNames[Manager.marktr("key_full_Up")]="Up"; |
10760 |
}else if(vAlignTop==false){vParent.scrollTop=vOffset+vHeight-vParentHeight; |
| 10881 |
keyNames[Manager.marktr("key_full_Right")]="Right"; |
10761 |
}else if(vHeight>vParentHeight||vOffset<vParentScrollTop){vParent.scrollTop=vOffset; |
| 10882 |
keyNames[Manager.marktr("key_full_Down")]="Down"; |
10762 |
}else if((vOffset+vHeight)>(vParentScrollTop+vParentHeight)){vParent.scrollTop=vOffset+vHeight-vParentHeight; |
| 10883 |
keyNames[Manager.marktr("key_full_PageUp")]="PageUp"; |
10763 |
}vOffset=vParent.offsetTop; |
| 10884 |
keyNames[Manager.marktr("key_full_PageDown")]="PageDown"; |
10764 |
vHeight=vParent.offsetHeight; |
| 10885 |
keyNames[Manager.marktr("key_full_End")]="End"; |
10765 |
}else{vOffset+=vParent.offsetTop; |
| 10886 |
keyNames[Manager.marktr("key_full_Home")]="Home"; |
10766 |
} |
| 10887 |
keyNames[Manager.marktr("key_full_Insert")]="Insert"; |
10767 |
if(vParent.tagName.toLowerCase()=="body"){break; |
| 10888 |
keyNames[Manager.marktr("key_full_Delete")]="Delete"; |
10768 |
}vParent=vParent.offsetParent; |
| 10889 |
keyNames[Manager.marktr("key_full_NumLock")]="NumLock"; |
10769 |
}return true; |
| 10890 |
keyNames[Manager.marktr("key_full_PrintScreen")]="PrintScreen"; |
10770 |
}}}); |
| 10891 |
keyNames[Manager.marktr("key_full_Scroll")]="Scroll"; |
|
|
| 10892 |
keyNames[Manager.marktr("key_full_Pause")]="Pause"; |
| 10893 |
keyNames[Manager.marktr("key_full_Win")]="Win"; |
| 10894 |
keyNames[Manager.marktr("key_full_Apps")]="Apps"; |
| 10895 |
statics._keyNames=keyNames; |
| 10896 |
}}); |
| 10897 |
|
10771 |
|
| 10898 |
|
10772 |
|
| 10899 |
|
10773 |
|
|
Lines 11033-11097
Link Here
|
| 11033 |
if(this.hasEventListeners("load")){this.dispatchEvent(new qx.event.type.Event("load"), |
10907 |
if(this.hasEventListeners("load")){this.dispatchEvent(new qx.event.type.Event("load"), |
| 11034 |
true); |
10908 |
true); |
| 11035 |
}}, |
10909 |
}}, |
| 11036 |
__onerror:function(){if(this._isLoaded||this._isErroneous){return; |
10910 |
__onerror:function(){if(this._isLoaded||this._isErroneous){return; |
| 11037 |
}this.debug("Could not load: "+this._source); |
10911 |
}this.debug("Could not load: "+this._source); |
| 11038 |
this._isLoaded=false; |
10912 |
this._isLoaded=false; |
| 11039 |
this._isErroneous=true; |
10913 |
this._isErroneous=true; |
| 11040 |
if(this.hasEventListeners("error")){this.dispatchEvent(new qx.event.type.Event("error"), |
10914 |
if(this.hasEventListeners("error")){this.dispatchEvent(new qx.event.type.Event("error"), |
| 11041 |
true); |
10915 |
true); |
| 11042 |
}}}, |
10916 |
}}}, |
| 11043 |
destruct:function(){if(this._element){this._element.onload=this._element.onerror=null; |
10917 |
destruct:function(){if(this._element){this._element.onload=this._element.onerror=null; |
| 11044 |
}this._disposeFields("_element", |
10918 |
}this._disposeFields("_element", |
| 11045 |
"_isLoaded", |
10919 |
"_isLoaded", |
| 11046 |
"_isErroneous", |
10920 |
"_isErroneous", |
| 11047 |
"_isPng"); |
10921 |
"_isPng"); |
|
|
10922 |
}}); |
| 10923 |
|
| 10924 |
|
| 10925 |
|
| 10926 |
|
| 10927 |
/* ID: qx.client.Command */ |
| 10928 |
qx.Class.define("qx.client.Command", |
| 10929 |
{extend:qx.core.Target, |
| 10930 |
events:{"execute":"qx.event.type.DataEvent"}, |
| 10931 |
construct:function(shortcut, |
| 10932 |
keyCode){this.base(arguments); |
| 10933 |
this.__modifier={}; |
| 10934 |
this.__key=null; |
| 10935 |
if(shortcut!=null){this.setShortcut(shortcut); |
| 10936 |
} |
| 10937 |
if(keyCode!=null){this.warn("The use of keyCode in command is deprecated. Use keyIdentifier instead."); |
| 10938 |
this.setKeyCode(keyCode); |
| 10939 |
}{if(this.__modifier.Alt&&this.__key&&this.__key.length==1){if((this.__key>="A"&&this.__key<="Z")||(this.__key>="0"&&this.__key<="9")){this.warn("A shortcut containing Alt and a letter or number will not work under OS X!"); |
| 10940 |
}}}; |
| 10941 |
qx.event.handler.EventHandler.getInstance().addCommand(this); |
| 10942 |
}, |
| 10943 |
properties:{enabled:{init:true, |
| 10944 |
check:"Boolean", |
| 10945 |
event:"changeEnabled"}, |
| 10946 |
shortcut:{check:"String", |
| 10947 |
apply:"_applyShortcut", |
| 10948 |
nullable:true}, |
| 10949 |
keyCode:{check:"Number", |
| 10950 |
nullable:true}, |
| 10951 |
keyIdentifier:{check:"String", |
| 10952 |
nullable:true}}, |
| 10953 |
members:{getKeyCode:function(){return this._keyCode; |
| 10954 |
}, |
| 10955 |
setKeyCode:function(code){qx.log.Logger.deprecatedMethodWarning(arguments.callee); |
| 10956 |
this._keyCode=code; |
| 10957 |
}, |
| 10958 |
execute:function(vTarget){if(this.hasEventListeners("execute")){var event=new qx.event.type.DataEvent("execute", |
| 10959 |
vTarget); |
| 10960 |
this.dispatchEvent(event, |
| 10961 |
true); |
| 10962 |
}return false; |
| 10963 |
}, |
| 10964 |
_applyShortcut:function(value, |
| 10965 |
old){if(value){this.__modifier={}; |
| 10966 |
this.__key=null; |
| 10967 |
var a=value.split(/[-+\s]+/); |
| 10968 |
var al=a.length; |
| 10969 |
for(var i=0;i<al;i++){var identifier=this.__oldKeyNameToKeyIdentifier(a[i]); |
| 10970 |
switch(identifier){case "Control":case "Shift":case "Meta":case "Alt":this.__modifier[identifier]=true; |
| 10971 |
break; |
| 10972 |
case "Unidentified":var msg="Not a valid key name for a command: "+a[i]; |
| 10973 |
this.error(msg); |
| 10974 |
throw msg; |
| 10975 |
default:if(this.__key){var msg="You can only specify one non modifier key!"; |
| 10976 |
this.error(msg); |
| 10977 |
throw msg; |
| 10978 |
}this.__key=identifier; |
| 10979 |
}}}return true; |
| 10980 |
}, |
| 10981 |
matchesKeyEvent:function(e){var key=this.__key||this.getKeyIdentifier(); |
| 10982 |
if(!key&&!this.getKeyCode()){return ; |
| 10983 |
}if((this.__modifier.Shift&&!e.isShiftPressed())|| |
| 10984 |
(this.__modifier.Control&&!e.isCtrlPressed())|| |
| 10985 |
(this.__modifier.Alt&&!e.isAltPressed())){return false; |
| 10986 |
} |
| 10987 |
if(key){if(key==e.getKeyIdentifier()){return true; |
| 10988 |
}}else{if(this.getKeyCode()==e.getKeyCode()){return true; |
| 10989 |
}}return false; |
| 10990 |
}, |
| 10991 |
__oldKeyNameToKeyIdentifierMap:{esc:"Escape", |
| 10992 |
ctrl:"Control", |
| 10993 |
print:"PrintScreen", |
| 10994 |
del:"Delete", |
| 10995 |
pageup:"PageUp", |
| 10996 |
pagedown:"PageDown", |
| 10997 |
numlock:"NumLock", |
| 10998 |
numpad_0:"0", |
| 10999 |
numpad_1:"1", |
| 11000 |
numpad_2:"2", |
| 11001 |
numpad_3:"3", |
| 11002 |
numpad_4:"4", |
| 11003 |
numpad_5:"5", |
| 11004 |
numpad_6:"6", |
| 11005 |
numpad_7:"7", |
| 11006 |
numpad_8:"8", |
| 11007 |
numpad_9:"9", |
| 11008 |
numpad_divide:"/", |
| 11009 |
numpad_multiply:"*", |
| 11010 |
numpad_minus:"-", |
| 11011 |
numpad_plus:"+"}, |
| 11012 |
__oldKeyNameToKeyIdentifier:function(keyName){var keyHandler=qx.event.handler.KeyEventHandler.getInstance(); |
| 11013 |
var keyIdentifier="Unidentified"; |
| 11014 |
if(keyHandler.isValidKeyIdentifier(keyName)){return keyName; |
| 11015 |
} |
| 11016 |
if(keyName.length==1&&keyName>="a"&&keyName<="z"){return keyName.toUpperCase(); |
| 11017 |
}keyName=keyName.toLowerCase(); |
| 11018 |
if(!qx.event.type.KeyEvent.keys[keyName]){return "Unidentified"; |
| 11019 |
}var keyIdentifier=this.__oldKeyNameToKeyIdentifierMap[keyName]; |
| 11020 |
if(keyIdentifier){return keyIdentifier; |
| 11021 |
}else{return qx.lang.String.toFirstUp(keyName); |
| 11022 |
}}, |
| 11023 |
toString:function(){var keyCode=this.getKeyCode(); |
| 11024 |
var key=this.__key||this.getKeyIdentifier(); |
| 11025 |
var str=[]; |
| 11026 |
for(var modifier in this.__modifier){str.push(qx.locale.Key.getKeyName("short", |
| 11027 |
modifier)); |
| 11028 |
} |
| 11029 |
if(key){str.push(qx.locale.Key.getKeyName("short", |
| 11030 |
key)); |
| 11031 |
} |
| 11032 |
if(keyCode!=null){var vTemp=qx.event.type.KeyEvent.codes[keyCode]; |
| 11033 |
str.push(vTemp?qx.lang.String.toFirstUp(vTemp):String(keyCode)); |
| 11034 |
}return str.join("-"); |
| 11035 |
}}, |
| 11036 |
destruct:function(){var mgr=qx.event.handler.EventHandler.getInstance(); |
| 11037 |
if(mgr){mgr.removeCommand(this); |
| 11038 |
}this._disposeFields("__modifier", |
| 11039 |
"__key"); |
| 11048 |
}}); |
11040 |
}}); |
| 11049 |
|
11041 |
|
| 11050 |
|
11042 |
|
| 11051 |
|
11043 |
|
| 11052 |
|
11044 |
|
| 11053 |
/* ID: qx.application.Gui */ |
11045 |
/* ID: qx.locale.Key */ |
| 11054 |
qx.Class.define("qx.application.Gui", |
11046 |
qx.Class.define("qx.locale.Key", |
| 11055 |
{extend:qx.core.Target, |
11047 |
{statics:{getKeyName:function(size, |
| 11056 |
implement:qx.application.IApplication, |
11048 |
keyIdentifier, |
| 11057 |
properties:{uiReady:{check:"Boolean", |
11049 |
locale){if(size!="short"&&size!="full"){throw new Error('format must be one of: "short", "full"'); |
| 11058 |
init:false}}, |
11050 |
}var key="key_"+size+"_"+keyIdentifier; |
| 11059 |
members:{main:function(){qx.ui.core.Widget.initScrollbarWidth(); |
11051 |
var localizedKey=new qx.locale.LocalizedString(key, |
| 11060 |
qx.theme.manager.Meta.getInstance().initialize(); |
11052 |
[], |
| 11061 |
qx.event.handler.EventHandler.getInstance(); |
11053 |
locale); |
| 11062 |
qx.ui.core.ClientDocument.getInstance(); |
11054 |
if(localizedKey==key){return qx.locale.Key._keyNames[key]||keyIdentifier; |
| 11063 |
qx.client.Timer.once(this._preload, |
11055 |
}else{return localizedKey.toString(); |
| 11064 |
this, |
11056 |
}}}, |
| 11065 |
0); |
11057 |
defer:function(statics, |
| 11066 |
}, |
11058 |
members, |
| 11067 |
close:function(){}, |
11059 |
properties){var keyNames={}; |
| 11068 |
terminate:function(){}, |
11060 |
var Manager=qx.locale.Manager; |
| 11069 |
_preload:function(){this.debug("preloading visible images..."); |
11061 |
keyNames[Manager.marktr("key_short_Backspace")]="Backspace"; |
| 11070 |
this.__preloader=new qx.io.image.PreloaderSystem(qx.io.image.Manager.getInstance().getVisibleImages(), |
11062 |
keyNames[Manager.marktr("key_short_Tab")]="Tab"; |
| 11071 |
this._preloaderDone, |
11063 |
keyNames[Manager.marktr("key_short_Space")]="Space"; |
| 11072 |
this); |
11064 |
keyNames[Manager.marktr("key_short_Enter")]="Enter"; |
| 11073 |
this.__preloader.start(); |
11065 |
keyNames[Manager.marktr("key_short_Shift")]="Shift"; |
| 11074 |
}, |
11066 |
keyNames[Manager.marktr("key_short_Control")]="Ctrl"; |
| 11075 |
_preloaderDone:function(){this.setUiReady(true); |
11067 |
keyNames[Manager.marktr("key_short_Alt")]="Alt"; |
| 11076 |
this.__preloader.dispose(); |
11068 |
keyNames[Manager.marktr("key_short_CapsLock")]="Caps"; |
| 11077 |
this.__preloader=null; |
11069 |
keyNames[Manager.marktr("key_short_Meta")]="Meta"; |
| 11078 |
var start=(new Date).valueOf(); |
11070 |
keyNames[Manager.marktr("key_short_Escape")]="Esc"; |
| 11079 |
qx.ui.core.Widget.flushGlobalQueues(); |
11071 |
keyNames[Manager.marktr("key_short_Left")]="Left"; |
| 11080 |
this.info("render runtime: "+(new Date-start)+"ms"); |
11072 |
keyNames[Manager.marktr("key_short_Up")]="Up"; |
| 11081 |
qx.event.handler.EventHandler.getInstance().attachEvents(); |
11073 |
keyNames[Manager.marktr("key_short_Right")]="Right"; |
| 11082 |
qx.client.Timer.once(this._postload, |
11074 |
keyNames[Manager.marktr("key_short_Down")]="Down"; |
| 11083 |
this, |
11075 |
keyNames[Manager.marktr("key_short_PageUp")]="PgUp"; |
| 11084 |
100); |
11076 |
keyNames[Manager.marktr("key_short_PageDown")]="PgDn"; |
| 11085 |
}, |
11077 |
keyNames[Manager.marktr("key_short_End")]="End"; |
| 11086 |
_postload:function(){this.debug("preloading hidden images..."); |
11078 |
keyNames[Manager.marktr("key_short_Home")]="Home"; |
| 11087 |
this.__postloader=new qx.io.image.PreloaderSystem(qx.io.image.Manager.getInstance().getHiddenImages(), |
11079 |
keyNames[Manager.marktr("key_short_Insert")]="Ins"; |
| 11088 |
this._postloaderDone, |
11080 |
keyNames[Manager.marktr("key_short_Delete")]="Del"; |
| 11089 |
this); |
11081 |
keyNames[Manager.marktr("key_short_NumLock")]="Num"; |
| 11090 |
this.__postloader.start(); |
11082 |
keyNames[Manager.marktr("key_short_PrintScreen")]="Print"; |
| 11091 |
}, |
11083 |
keyNames[Manager.marktr("key_short_Scroll")]="Scroll"; |
| 11092 |
_postloaderDone:function(){this.__postloader.dispose(); |
11084 |
keyNames[Manager.marktr("key_short_Pause")]="Pause"; |
| 11093 |
this.__postloader=null; |
11085 |
keyNames[Manager.marktr("key_short_Win")]="Win"; |
| 11094 |
}}}); |
11086 |
keyNames[Manager.marktr("key_short_Apps")]="Apps"; |
|
|
11087 |
keyNames[Manager.marktr("key_full_Backspace")]="Backspace"; |
| 11088 |
keyNames[Manager.marktr("key_full_Tab")]="Tabulator"; |
| 11089 |
keyNames[Manager.marktr("key_full_Space")]="Space"; |
| 11090 |
keyNames[Manager.marktr("key_full_Enter")]="Enter"; |
| 11091 |
keyNames[Manager.marktr("key_full_Shift")]="Shift"; |
| 11092 |
keyNames[Manager.marktr("key_full_Control")]="Control"; |
| 11093 |
keyNames[Manager.marktr("key_full_Alt")]="Alt"; |
| 11094 |
keyNames[Manager.marktr("key_full_CapsLock")]="CapsLock"; |
| 11095 |
keyNames[Manager.marktr("key_full_Meta")]="Meta"; |
| 11096 |
keyNames[Manager.marktr("key_full_Escape")]="Escape"; |
| 11097 |
keyNames[Manager.marktr("key_full_Left")]="Left"; |
| 11098 |
keyNames[Manager.marktr("key_full_Up")]="Up"; |
| 11099 |
keyNames[Manager.marktr("key_full_Right")]="Right"; |
| 11100 |
keyNames[Manager.marktr("key_full_Down")]="Down"; |
| 11101 |
keyNames[Manager.marktr("key_full_PageUp")]="PageUp"; |
| 11102 |
keyNames[Manager.marktr("key_full_PageDown")]="PageDown"; |
| 11103 |
keyNames[Manager.marktr("key_full_End")]="End"; |
| 11104 |
keyNames[Manager.marktr("key_full_Home")]="Home"; |
| 11105 |
keyNames[Manager.marktr("key_full_Insert")]="Insert"; |
| 11106 |
keyNames[Manager.marktr("key_full_Delete")]="Delete"; |
| 11107 |
keyNames[Manager.marktr("key_full_NumLock")]="NumLock"; |
| 11108 |
keyNames[Manager.marktr("key_full_PrintScreen")]="PrintScreen"; |
| 11109 |
keyNames[Manager.marktr("key_full_Scroll")]="Scroll"; |
| 11110 |
keyNames[Manager.marktr("key_full_Pause")]="Pause"; |
| 11111 |
keyNames[Manager.marktr("key_full_Win")]="Win"; |
| 11112 |
keyNames[Manager.marktr("key_full_Apps")]="Apps"; |
| 11113 |
statics._keyNames=keyNames; |
| 11114 |
}}); |
| 11095 |
|
11115 |
|
| 11096 |
|
11116 |
|
| 11097 |
|
11117 |
|
|
Lines 15193-15291
Link Here
|
| 15193 |
|
15213 |
|
| 15194 |
|
15214 |
|
| 15195 |
|
15215 |
|
| 15196 |
|
15216 |
|
| 15197 |
/* ID: qx.ui.popup.ToolTipManager */ |
15217 |
/* ID: qx.ui.popup.ToolTipManager */ |
| 15198 |
qx.Class.define("qx.ui.popup.ToolTipManager", |
15218 |
qx.Class.define("qx.ui.popup.ToolTipManager", |
| 15199 |
{type:"singleton", |
15219 |
{type:"singleton", |
| 15200 |
extend:qx.util.manager.Object, |
15220 |
extend:qx.util.manager.Object, |
| 15201 |
properties:{currentToolTip:{check:"qx.ui.popup.ToolTip", |
15221 |
properties:{currentToolTip:{check:"qx.ui.popup.ToolTip", |
| 15202 |
nullable:true, |
15222 |
nullable:true, |
| 15203 |
apply:"_applyCurrentToolTip"}}, |
15223 |
apply:"_applyCurrentToolTip"}}, |
| 15204 |
members:{_applyCurrentToolTip:function(value, |
15224 |
members:{_applyCurrentToolTip:function(value, |
| 15205 |
old){if(old&&old.contains(value)){return; |
15225 |
old){if(old&&old.contains(value)){return; |
| 15206 |
}if(old&&!old.isDisposed()){old.hide(); |
15226 |
}if(old&&!old.isDisposed()){old.hide(); |
| 15207 |
old._stopShowTimer(); |
15227 |
old._stopShowTimer(); |
| 15208 |
old._stopHideTimer(); |
15228 |
old._stopHideTimer(); |
| 15209 |
}if(value){value._startShowTimer(); |
15229 |
}if(value){value._startShowTimer(); |
| 15210 |
}}, |
15230 |
}}, |
| 15211 |
handleMouseOver:function(e){var vTarget=e.getTarget(); |
15231 |
handleMouseOver:function(e){var vTarget=e.getTarget(); |
| 15212 |
var vToolTip; |
15232 |
var vToolTip; |
| 15213 |
if(!(vTarget instanceof qx.ui.core.Widget)&&vTarget.nodeType==1){vTarget=qx.event.handler.EventHandler.getTargetObject(vTarget); |
15233 |
if(!(vTarget instanceof qx.ui.core.Widget)&&vTarget.nodeType==1){vTarget=qx.event.handler.EventHandler.getTargetObject(vTarget); |
| 15214 |
}while(vTarget!=null&&!(vToolTip=vTarget.getToolTip())){vTarget=vTarget.getParent(); |
15234 |
}while(vTarget!=null&&!(vToolTip=vTarget.getToolTip())){vTarget=vTarget.getParent(); |
| 15215 |
}if(vToolTip!=null){vToolTip.setBoundToWidget(vTarget); |
15235 |
}if(vToolTip!=null){vToolTip.setBoundToWidget(vTarget); |
| 15216 |
}this.setCurrentToolTip(vToolTip); |
15236 |
}this.setCurrentToolTip(vToolTip); |
| 15217 |
}, |
|
|
| 15218 |
handleMouseOut:function(e){var vTarget=e.getTarget(); |
| 15219 |
var vRelatedTarget=e.getRelatedTarget(); |
| 15220 |
var vToolTip=this.getCurrentToolTip(); |
| 15221 |
if(vToolTip&&(vRelatedTarget==vToolTip||vToolTip.contains(vRelatedTarget))){return; |
| 15222 |
}if(vRelatedTarget&&vTarget&&vTarget.contains(vRelatedTarget)){return; |
| 15223 |
}if(vToolTip&&!vRelatedTarget){this.setCurrentToolTip(null); |
| 15224 |
}}, |
| 15225 |
handleFocus:function(e){var vTarget=e.getTarget(); |
| 15226 |
var vToolTip=vTarget.getToolTip(); |
| 15227 |
if(vToolTip!=null){vToolTip.setBoundToWidget(vTarget); |
| 15228 |
this.setCurrentToolTip(vToolTip); |
| 15229 |
}}, |
| 15230 |
handleBlur:function(e){var vTarget=e.getTarget(); |
| 15231 |
if(!vTarget){return; |
| 15232 |
}var vToolTip=this.getCurrentToolTip(); |
| 15233 |
if(vToolTip&&vToolTip==vTarget.getToolTip()){this.setCurrentToolTip(null); |
| 15234 |
}}}}); |
| 15235 |
|
| 15236 |
|
| 15237 |
|
| 15238 |
|
| 15239 |
/* ID: qx.ui.pageview.AbstractPageView */ |
| 15240 |
qx.Class.define("qx.ui.pageview.AbstractPageView", |
| 15241 |
{type:"abstract", |
| 15242 |
extend:qx.ui.layout.BoxLayout, |
| 15243 |
construct:function(vBarClass, |
| 15244 |
vPaneClass){this.base(arguments); |
| 15245 |
this._bar=new vBarClass; |
| 15246 |
this._pane=new vPaneClass; |
| 15247 |
this.add(this._bar, |
| 15248 |
this._pane); |
| 15249 |
}, |
| 15250 |
members:{getPane:function(){return this._pane; |
| 15251 |
}, |
| 15252 |
getBar:function(){return this._bar; |
| 15253 |
}}, |
| 15254 |
destruct:function(){this._disposeObjects("_bar", |
| 15255 |
"_pane"); |
| 15256 |
}}); |
| 15257 |
|
| 15258 |
|
| 15259 |
|
| 15260 |
|
| 15261 |
/* ID: qx.ui.pageview.tabview.TabView */ |
| 15262 |
qx.Class.define("qx.ui.pageview.tabview.TabView", |
| 15263 |
{extend:qx.ui.pageview.AbstractPageView, |
| 15264 |
construct:function(){this.base(arguments, |
| 15265 |
qx.ui.pageview.tabview.Bar, |
| 15266 |
qx.ui.pageview.tabview.Pane); |
| 15267 |
}, |
| 15268 |
properties:{appearance:{refine:true, |
| 15269 |
init:"tab-view"}, |
| 15270 |
orientation:{refine:true, |
| 15271 |
init:"vertical"}, |
| 15272 |
alignTabsToLeft:{check:"Boolean", |
| 15273 |
init:true, |
| 15274 |
apply:"_applyAlignTabsToLeft"}, |
| 15275 |
placeBarOnTop:{check:"Boolean", |
| 15276 |
init:true, |
| 15277 |
apply:"_applyPlaceBarOnTop"}}, |
| 15278 |
members:{_applyAlignTabsToLeft:function(value, |
| 15279 |
old){var vBar=this._bar; |
| 15280 |
vBar.setHorizontalChildrenAlign(value?"left":"right"); |
| 15281 |
vBar._addChildrenToStateQueue(); |
| 15282 |
}, |
15237 |
}, |
| 15283 |
_applyPlaceBarOnTop:function(value, |
15238 |
handleMouseOut:function(e){var vTarget=e.getTarget(); |
| 15284 |
old){var vBar=this._bar; |
15239 |
var vRelatedTarget=e.getRelatedTarget(); |
| 15285 |
if(value){vBar.moveSelfToBegin(); |
15240 |
var vToolTip=this.getCurrentToolTip(); |
| 15286 |
}else{vBar.moveSelfToEnd(); |
15241 |
if(vToolTip&&(vRelatedTarget==vToolTip||vToolTip.contains(vRelatedTarget))){return; |
| 15287 |
}vBar._addChildrenToStateQueue(); |
15242 |
}if(vRelatedTarget&&vTarget&&vTarget.contains(vRelatedTarget)){return; |
| 15288 |
}}}); |
15243 |
}if(vToolTip&&!vRelatedTarget){this.setCurrentToolTip(null); |
|
|
15244 |
}}, |
| 15245 |
handleFocus:function(e){var vTarget=e.getTarget(); |
| 15246 |
var vToolTip=vTarget.getToolTip(); |
| 15247 |
if(vToolTip!=null){vToolTip.setBoundToWidget(vTarget); |
| 15248 |
this.setCurrentToolTip(vToolTip); |
| 15249 |
}}, |
| 15250 |
handleBlur:function(e){var vTarget=e.getTarget(); |
| 15251 |
if(!vTarget){return; |
| 15252 |
}var vToolTip=this.getCurrentToolTip(); |
| 15253 |
if(vToolTip&&vToolTip==vTarget.getToolTip()){this.setCurrentToolTip(null); |
| 15254 |
}}}}); |
| 15289 |
|
15255 |
|
| 15290 |
|
15256 |
|
| 15291 |
|
15257 |
|
|
Lines 15424-15454
Link Here
|
| 15424 |
|
15390 |
|
| 15425 |
|
15391 |
|
| 15426 |
|
15392 |
|
| 15427 |
/* ID: qx.ui.pageview.AbstractPane */ |
|
|
| 15428 |
qx.Class.define("qx.ui.pageview.AbstractPane", |
| 15429 |
{type:"abstract", |
| 15430 |
extend:qx.ui.layout.CanvasLayout}); |
| 15431 |
|
| 15432 |
|
| 15433 |
|
| 15434 |
|
| 15435 |
/* ID: qx.ui.pageview.tabview.Pane */ |
| 15436 |
qx.Class.define("qx.ui.pageview.tabview.Pane", |
| 15437 |
{extend:qx.ui.pageview.AbstractPane, |
| 15438 |
construct:function(){this.base(arguments); |
| 15439 |
this.initZIndex(); |
| 15440 |
this.initHeight(); |
| 15441 |
}, |
| 15442 |
properties:{appearance:{refine:true, |
| 15443 |
init:"tab-view-pane"}, |
| 15444 |
zIndex:{refine:true, |
| 15445 |
init:1}, |
| 15446 |
height:{refine:true, |
| 15447 |
init:"1*"}}}); |
| 15448 |
|
| 15449 |
|
| 15450 |
|
| 15451 |
|
| 15452 |
/* ID: qx.ui.pageview.AbstractButton */ |
15393 |
/* ID: qx.ui.pageview.AbstractButton */ |
| 15453 |
qx.Class.define("qx.ui.pageview.AbstractButton", |
15394 |
qx.Class.define("qx.ui.pageview.AbstractButton", |
| 15454 |
{type:"abstract", |
15395 |
{type:"abstract", |
|
Lines 15642-15647
Link Here
|
| 15642 |
|
15583 |
|
| 15643 |
|
15584 |
|
| 15644 |
|
15585 |
|
|
|
15586 |
/* ID: qx.ui.pageview.AbstractPane */ |
| 15587 |
qx.Class.define("qx.ui.pageview.AbstractPane", |
| 15588 |
{type:"abstract", |
| 15589 |
extend:qx.ui.layout.CanvasLayout}); |
| 15590 |
|
| 15591 |
|
| 15592 |
|
| 15593 |
|
| 15594 |
/* ID: qx.ui.pageview.tabview.Pane */ |
| 15595 |
qx.Class.define("qx.ui.pageview.tabview.Pane", |
| 15596 |
{extend:qx.ui.pageview.AbstractPane, |
| 15597 |
construct:function(){this.base(arguments); |
| 15598 |
this.initZIndex(); |
| 15599 |
this.initHeight(); |
| 15600 |
}, |
| 15601 |
properties:{appearance:{refine:true, |
| 15602 |
init:"tab-view-pane"}, |
| 15603 |
zIndex:{refine:true, |
| 15604 |
init:1}, |
| 15605 |
height:{refine:true, |
| 15606 |
init:"1*"}}}); |
| 15607 |
|
| 15608 |
|
| 15609 |
|
| 15610 |
|
| 15611 |
/* ID: qx.ui.pageview.AbstractPageView */ |
| 15612 |
qx.Class.define("qx.ui.pageview.AbstractPageView", |
| 15613 |
{type:"abstract", |
| 15614 |
extend:qx.ui.layout.BoxLayout, |
| 15615 |
construct:function(vBarClass, |
| 15616 |
vPaneClass){this.base(arguments); |
| 15617 |
this._bar=new vBarClass; |
| 15618 |
this._pane=new vPaneClass; |
| 15619 |
this.add(this._bar, |
| 15620 |
this._pane); |
| 15621 |
}, |
| 15622 |
members:{getPane:function(){return this._pane; |
| 15623 |
}, |
| 15624 |
getBar:function(){return this._bar; |
| 15625 |
}}, |
| 15626 |
destruct:function(){this._disposeObjects("_bar", |
| 15627 |
"_pane"); |
| 15628 |
}}); |
| 15629 |
|
| 15630 |
|
| 15631 |
|
| 15632 |
|
| 15633 |
/* ID: qx.ui.pageview.tabview.TabView */ |
| 15634 |
qx.Class.define("qx.ui.pageview.tabview.TabView", |
| 15635 |
{extend:qx.ui.pageview.AbstractPageView, |
| 15636 |
construct:function(){this.base(arguments, |
| 15637 |
qx.ui.pageview.tabview.Bar, |
| 15638 |
qx.ui.pageview.tabview.Pane); |
| 15639 |
}, |
| 15640 |
properties:{appearance:{refine:true, |
| 15641 |
init:"tab-view"}, |
| 15642 |
orientation:{refine:true, |
| 15643 |
init:"vertical"}, |
| 15644 |
alignTabsToLeft:{check:"Boolean", |
| 15645 |
init:true, |
| 15646 |
apply:"_applyAlignTabsToLeft"}, |
| 15647 |
placeBarOnTop:{check:"Boolean", |
| 15648 |
init:true, |
| 15649 |
apply:"_applyPlaceBarOnTop"}}, |
| 15650 |
members:{_applyAlignTabsToLeft:function(value, |
| 15651 |
old){var vBar=this._bar; |
| 15652 |
vBar.setHorizontalChildrenAlign(value?"left":"right"); |
| 15653 |
vBar._addChildrenToStateQueue(); |
| 15654 |
}, |
| 15655 |
_applyPlaceBarOnTop:function(value, |
| 15656 |
old){var vBar=this._bar; |
| 15657 |
if(value){vBar.moveSelfToBegin(); |
| 15658 |
}else{vBar.moveSelfToEnd(); |
| 15659 |
}vBar._addChildrenToStateQueue(); |
| 15660 |
}}}); |
| 15661 |
|
| 15662 |
|
| 15663 |
|
| 15664 |
|
| 15645 |
/* ID: qx.ui.toolbar.Button */ |
15665 |
/* ID: qx.ui.toolbar.Button */ |
| 15646 |
qx.Class.define("qx.ui.toolbar.Button", |
15666 |
qx.Class.define("qx.ui.toolbar.Button", |
| 15647 |
{extend:qx.ui.form.Button, |
15667 |
{extend:qx.ui.form.Button, |
|
Lines 15690-15709
Link Here
|
| 15690 |
|
15710 |
|
| 15691 |
|
15711 |
|
| 15692 |
|
15712 |
|
| 15693 |
/* ID: qx.ui.toolbar.PartHandle */ |
|
|
| 15694 |
qx.Class.define("qx.ui.toolbar.PartHandle", |
| 15695 |
{extend:qx.ui.layout.CanvasLayout, |
| 15696 |
construct:function(){this.base(arguments); |
| 15697 |
var l=new qx.ui.basic.Terminator; |
| 15698 |
l.setAppearance("toolbar-part-handle-line"); |
| 15699 |
this.add(l); |
| 15700 |
}, |
| 15701 |
properties:{appearance:{refine:true, |
| 15702 |
init:"toolbar-part-handle"}}}); |
| 15703 |
|
| 15704 |
|
| 15705 |
|
| 15706 |
|
| 15707 |
/* ID: qx.ui.toolbar.MenuButton */ |
15713 |
/* ID: qx.ui.toolbar.MenuButton */ |
| 15708 |
qx.Class.define("qx.ui.toolbar.MenuButton", |
15714 |
qx.Class.define("qx.ui.toolbar.MenuButton", |
| 15709 |
{extend:qx.ui.toolbar.Button, |
15715 |
{extend:qx.ui.toolbar.Button, |
|
Lines 15821-15826
Link Here
|
| 15821 |
|
15827 |
|
| 15822 |
|
15828 |
|
| 15823 |
|
15829 |
|
|
|
15830 |
/* ID: qx.ui.toolbar.PartHandle */ |
| 15831 |
qx.Class.define("qx.ui.toolbar.PartHandle", |
| 15832 |
{extend:qx.ui.layout.CanvasLayout, |
| 15833 |
construct:function(){this.base(arguments); |
| 15834 |
var l=new qx.ui.basic.Terminator; |
| 15835 |
l.setAppearance("toolbar-part-handle-line"); |
| 15836 |
this.add(l); |
| 15837 |
}, |
| 15838 |
properties:{appearance:{refine:true, |
| 15839 |
init:"toolbar-part-handle"}}}); |
| 15840 |
|
| 15841 |
|
| 15842 |
|
| 15843 |
|
| 15824 |
/* ID: qx.ui.toolbar.ToolBar */ |
15844 |
/* ID: qx.ui.toolbar.ToolBar */ |
| 15825 |
qx.Class.define("qx.ui.toolbar.ToolBar", |
15845 |
qx.Class.define("qx.ui.toolbar.ToolBar", |
| 15826 |
{extend:qx.ui.layout.HorizontalBoxLayout, |
15846 |
{extend:qx.ui.layout.HorizontalBoxLayout, |
|
Lines 15928-15947
Link Here
|
| 15928 |
|
15948 |
|
| 15929 |
|
15949 |
|
| 15930 |
|
15950 |
|
| 15931 |
/* ID: qx.ui.toolbar.Separator */ |
|
|
| 15932 |
qx.Class.define("qx.ui.toolbar.Separator", |
| 15933 |
{extend:qx.ui.layout.CanvasLayout, |
| 15934 |
construct:function(){this.base(arguments); |
| 15935 |
var l=new qx.ui.basic.Terminator; |
| 15936 |
l.setAppearance("toolbar-separator-line"); |
| 15937 |
this.add(l); |
| 15938 |
}, |
| 15939 |
properties:{appearance:{refine:true, |
| 15940 |
init:"toolbar-separator"}}}); |
| 15941 |
|
| 15942 |
|
| 15943 |
|
| 15944 |
|
| 15945 |
/* ID: qx.ui.toolbar.RadioButton */ |
15951 |
/* ID: qx.ui.toolbar.RadioButton */ |
| 15946 |
qx.Class.define("qx.ui.toolbar.RadioButton", |
15952 |
qx.Class.define("qx.ui.toolbar.RadioButton", |
| 15947 |
{extend:qx.ui.toolbar.CheckBox, |
15953 |
{extend:qx.ui.toolbar.CheckBox, |
|
Lines 15977-15982
Link Here
|
| 15977 |
|
15983 |
|
| 15978 |
|
15984 |
|
| 15979 |
|
15985 |
|
|
|
15986 |
/* ID: qx.ui.toolbar.Separator */ |
| 15987 |
qx.Class.define("qx.ui.toolbar.Separator", |
| 15988 |
{extend:qx.ui.layout.CanvasLayout, |
| 15989 |
construct:function(){this.base(arguments); |
| 15990 |
var l=new qx.ui.basic.Terminator; |
| 15991 |
l.setAppearance("toolbar-separator-line"); |
| 15992 |
this.add(l); |
| 15993 |
}, |
| 15994 |
properties:{appearance:{refine:true, |
| 15995 |
init:"toolbar-separator"}}}); |
| 15996 |
|
| 15997 |
|
| 15998 |
|
| 15999 |
|
| 15980 |
/* ID: qx.ui.form.CheckBox */ |
16000 |
/* ID: qx.ui.form.CheckBox */ |
| 15981 |
qx.Class.define("qx.ui.form.CheckBox", |
16001 |
qx.Class.define("qx.ui.form.CheckBox", |
| 15982 |
{extend:qx.ui.basic.Atom, |
16002 |
{extend:qx.ui.basic.Atom, |
|
Lines 16104-16435
Link Here
|
| 16104 |
return this.base(arguments, |
16124 |
return this.base(arguments, |
| 16105 |
value, |
16125 |
value, |
| 16106 |
old); |
16126 |
old); |
| 16107 |
}}, |
16127 |
}}, |
| 16108 |
defer:function(statics, |
16128 |
defer:function(statics, |
| 16109 |
members){members.getBoxWidth=members.getPreferredBoxWidth; |
16129 |
members){members.getBoxWidth=members.getPreferredBoxWidth; |
| 16110 |
members.getBoxHeight=members.getPreferredBoxHeight; |
16130 |
members.getBoxHeight=members.getPreferredBoxHeight; |
| 16111 |
members.getInnerWidth=members.getPreferredBoxWidth; |
16131 |
members.getInnerWidth=members.getPreferredBoxWidth; |
| 16112 |
members.getInnerHeight=members.getPreferredBoxHeight; |
16132 |
members.getInnerHeight=members.getPreferredBoxHeight; |
| 16113 |
}}); |
16133 |
}}); |
| 16114 |
|
16134 |
|
| 16115 |
|
16135 |
|
| 16116 |
|
16136 |
|
| 16117 |
|
16137 |
|
| 16118 |
/* ID: qx.ui.form.Spinner */ |
16138 |
/* ID: qx.ui.form.ComboBox */ |
| 16119 |
qx.Class.define("qx.ui.form.Spinner", |
16139 |
qx.Class.define("qx.ui.form.ComboBox", |
| 16120 |
{extend:qx.ui.layout.HorizontalBoxLayout, |
16140 |
{extend:qx.ui.layout.HorizontalBoxLayout, |
| 16121 |
construct:function(vMin, |
16141 |
construct:function(){this.base(arguments); |
| 16122 |
vValue, |
16142 |
var l=this._list=new qx.ui.form.List; |
| 16123 |
vMax){this.base(arguments); |
16143 |
l.setAppearance("combo-box-list"); |
| 16124 |
if(qx.core.Variant.isSet("qx.client", |
16144 |
l.setTabIndex(-1); |
| 16125 |
"mshtml")){this.setStyleProperty("fontSize", |
16145 |
l.setEdge(0); |
| 16126 |
"0px"); |
16146 |
var m=this._manager=this._list.getManager(); |
| 16127 |
}this._textfield=new qx.ui.form.TextField; |
16147 |
m.setMultiSelection(false); |
| 16128 |
this._textfield.setBorder(null); |
16148 |
m.setDragSelection(false); |
| 16129 |
this._textfield.setWidth("1*"); |
16149 |
var p=this._popup=new qx.ui.popup.Popup; |
| 16130 |
this._textfield.setAllowStretchY(true); |
16150 |
p.setAppearance("combo-box-popup"); |
| 16131 |
this._textfield.setHeight(null); |
16151 |
p.setRestrictToPageLeft(-100000); |
| 16132 |
this._textfield.setLiveUpdate(true); |
16152 |
p.setRestrictToPageRight(-100000); |
| 16133 |
this._textfield.setVerticalAlign("middle"); |
16153 |
p.setAutoHide(false); |
| 16134 |
this._textfield.setAppearance("spinner-text-field"); |
16154 |
p.setHeight("auto"); |
| 16135 |
this.add(this._textfield); |
16155 |
p.add(l); |
| 16136 |
this._buttonlayout=new qx.ui.layout.VerticalBoxLayout; |
16156 |
var f=this._field=new qx.ui.form.TextField; |
| 16137 |
this._buttonlayout.setWidth("auto"); |
16157 |
f.setAppearance("combo-box-text-field"); |
| 16138 |
this.add(this._buttonlayout); |
16158 |
f.setTabIndex(-1); |
| 16139 |
this._upbutton=new qx.ui.basic.Image; |
16159 |
f.setWidth("1*"); |
| 16140 |
this._upbutton.setAppearance("spinner-button-up"); |
16160 |
f.setAllowStretchY(true); |
| 16141 |
this._upbutton.setHeight("1*"); |
16161 |
f.setHeight(null); |
| 16142 |
this._buttonlayout.add(this._upbutton); |
16162 |
this.add(f); |
| 16143 |
this._downbutton=new qx.ui.basic.Image; |
16163 |
var b=this._button=new qx.ui.basic.Atom; |
| 16144 |
this._downbutton.setAppearance("spinner-button-down"); |
16164 |
b.setAppearance("combo-box-button"); |
| 16145 |
this._downbutton.setHeight("1*"); |
16165 |
b.setAllowStretchY(true); |
| 16146 |
this._buttonlayout.add(this._downbutton); |
16166 |
b.setTabIndex(-1); |
| 16147 |
this._timer=new qx.client.Timer(this.getInterval()); |
16167 |
b.setHeight(null); |
| 16148 |
this.setManager(new qx.util.range.Range()); |
16168 |
this.add(b); |
| 16149 |
this.initWrap(); |
16169 |
this.addEventListener("mousedown", |
| 16150 |
this.addEventListener("keypress", |
16170 |
this._onmousedown); |
| 16151 |
this._onkeypress, |
16171 |
this.addEventListener("mouseup", |
| 16152 |
this); |
16172 |
this._onmouseup); |
| 16153 |
this.addEventListener("keydown", |
16173 |
this.addEventListener("click", |
| 16154 |
this._onkeydown, |
16174 |
this._onclick); |
| 16155 |
this); |
16175 |
this.addEventListener("mouseover", |
| 16156 |
this.addEventListener("keyup", |
16176 |
this._onmouseover); |
| 16157 |
this._onkeyup, |
|
|
| 16158 |
this); |
| 16159 |
this.addEventListener("mousewheel", |
16177 |
this.addEventListener("mousewheel", |
| 16160 |
this._onmousewheel, |
16178 |
this._onmousewheel); |
| 16161 |
this); |
16179 |
this.addEventListener("keydown", |
| 16162 |
this._textfield.addEventListener("changeValue", |
16180 |
this._onkeydown); |
| 16163 |
this._ontextchange, |
16181 |
this.addEventListener("keypress", |
|
|
16182 |
this._onkeypress); |
| 16183 |
this.addEventListener("keyinput", |
| 16184 |
this._onkeyinput); |
| 16185 |
this.addEventListener("beforeDisappear", |
| 16186 |
this._onbeforedisappear); |
| 16187 |
this._popup.addEventListener("appear", |
| 16188 |
this._onpopupappear, |
| 16164 |
this); |
16189 |
this); |
| 16165 |
this._textfield.addEventListener("input", |
16190 |
this._field.addEventListener("input", |
| 16166 |
this._oninput, |
16191 |
this._oninput, |
| 16167 |
this); |
16192 |
this); |
| 16168 |
this._textfield.addEventListener("blur", |
16193 |
qx.locale.Manager.getInstance().addEventListener("changeLocale", |
| 16169 |
this._onblur, |
16194 |
this._onlocalechange, |
| 16170 |
this); |
|
|
| 16171 |
this._upbutton.addEventListener("mousedown", |
| 16172 |
this._onmousedown, |
| 16173 |
this); |
| 16174 |
this._downbutton.addEventListener("mousedown", |
| 16175 |
this._onmousedown, |
| 16176 |
this); |
16195 |
this); |
| 16177 |
this._timer.addEventListener("interval", |
16196 |
var vDoc=qx.ui.core.ClientDocument.getInstance(); |
| 16178 |
this._oninterval, |
16197 |
vDoc.addEventListener("windowblur", |
|
|
16198 |
this._testClosePopup, |
| 16179 |
this); |
16199 |
this); |
| 16180 |
if(vMin!=null){this.setMin(vMin); |
16200 |
this.remapChildrenHandlingTo(l); |
| 16181 |
} |
16201 |
this.initEditable(); |
| 16182 |
if(vMax!=null){this.setMax(vMax); |
16202 |
this.initTabIndex(); |
| 16183 |
} |
|
|
| 16184 |
if(vValue!=null){this.setValue(vValue); |
| 16185 |
}this._checkValue=this.__checkValue; |
| 16186 |
this._numberFormat=null; |
| 16187 |
this.initWidth(); |
16203 |
this.initWidth(); |
| 16188 |
this.initHeight(); |
16204 |
this.initHeight(); |
| 16189 |
this._last_value=""; |
16205 |
this.initMinWidth(); |
| 16190 |
}, |
16206 |
}, |
| 16191 |
events:{"change":"qx.event.type.DataEvent"}, |
16207 |
events:{"beforeInitialOpen":"qx.event.type.Event"}, |
| 16192 |
properties:{appearance:{refine:true, |
16208 |
properties:{appearance:{refine:true, |
| 16193 |
init:"spinner"}, |
16209 |
init:"combo-box"}, |
|
|
16210 |
allowStretchY:{refine:true, |
| 16211 |
init:false}, |
| 16194 |
width:{refine:true, |
16212 |
width:{refine:true, |
| 16195 |
init:60}, |
16213 |
init:120}, |
| 16196 |
height:{refine:true, |
16214 |
height:{refine:true, |
| 16197 |
init:22}, |
16215 |
init:"auto"}, |
| 16198 |
incrementAmount:{check:"Number", |
16216 |
minWidth:{refine:true, |
| 16199 |
init:1, |
16217 |
init:40}, |
| 16200 |
apply:"_applyIncrementAmount"}, |
16218 |
tabIndex:{refine:true, |
| 16201 |
wheelIncrementAmount:{check:"Number", |
|
|
| 16202 |
init:1}, |
16219 |
init:1}, |
| 16203 |
pageIncrementAmount:{check:"Number", |
|
|
| 16204 |
init:10}, |
| 16205 |
interval:{check:"Integer", |
| 16206 |
init:100}, |
| 16207 |
firstInterval:{check:"Integer", |
| 16208 |
init:500}, |
| 16209 |
minTimer:{check:"Integer", |
| 16210 |
init:20}, |
| 16211 |
timerDecrease:{check:"Integer", |
| 16212 |
init:2}, |
| 16213 |
amountGrowth:{check:"Number", |
| 16214 |
init:1.01}, |
| 16215 |
wrap:{check:"Boolean", |
| 16216 |
init:false, |
| 16217 |
apply:"_applyWrap"}, |
| 16218 |
editable:{check:"Boolean", |
16220 |
editable:{check:"Boolean", |
| 16219 |
init:true, |
16221 |
apply:"_applyEditable", |
| 16220 |
apply:"_applyEditable"}, |
16222 |
event:"changeEditable", |
| 16221 |
manager:{check:"qx.util.range.IRange", |
16223 |
init:false}, |
| 16222 |
apply:"_applyManager", |
16224 |
selected:{check:"qx.ui.form.ListItem", |
| 16223 |
dispose:true}, |
16225 |
nullable:true, |
| 16224 |
checkValueFunction:{apply:"_applyCheckValueFunction"}, |
16226 |
apply:"_applySelected", |
| 16225 |
numberFormat:{check:"qx.util.format.NumberFormat", |
16227 |
event:"changeSelected"}, |
| 16226 |
apply:"_applyNumberFormat"}, |
16228 |
value:{check:"String", |
| 16227 |
selectTextOnInteract:{check:"Boolean", |
16229 |
nullable:true, |
| 16228 |
init:true}}, |
16230 |
apply:"_applyValue", |
| 16229 |
members:{_applyIncrementAmount:function(value, |
16231 |
event:"changeValue"}, |
| 16230 |
old){this._computedIncrementAmount=value; |
16232 |
pagingInterval:{check:"Integer", |
|
|
16233 |
init:10}}, |
| 16234 |
members:{getManager:function(){return this._manager; |
| 16235 |
}, |
| 16236 |
getPopup:function(){return this._popup; |
| 16237 |
}, |
| 16238 |
getList:function(){return this._list; |
| 16239 |
}, |
| 16240 |
getField:function(){return this._field; |
| 16241 |
}, |
| 16242 |
getButton:function(){return this._button; |
| 16243 |
}, |
| 16244 |
_applySelected:function(value, |
| 16245 |
old){this._fromSelected=true; |
| 16246 |
if(!this._fromValue){this.setValue(value?value.getLabel().toString():""); |
| 16247 |
}this._manager.setLeadItem(value); |
| 16248 |
this._manager.setAnchorItem(value); |
| 16249 |
if(value){this._manager.setSelectedItem(value); |
| 16250 |
}else{this._manager.deselectAll(); |
| 16251 |
}delete this._fromSelected; |
| 16252 |
}, |
| 16253 |
_applyValue:function(value, |
| 16254 |
old){this._fromValue=true; |
| 16255 |
if(!this._fromInput){if(this._field.getValue()==value){this._field.setValue(null); |
| 16256 |
}this._field.setValue(value); |
| 16257 |
}delete this._fromValue; |
| 16231 |
}, |
16258 |
}, |
| 16232 |
_applyEditable:function(value, |
16259 |
_applyEditable:function(value, |
| 16233 |
old){if(this._textfield){this._textfield.setReadOnly(!value); |
16260 |
old){var f=this._field; |
| 16234 |
}}, |
16261 |
f.setReadOnly(!value); |
| 16235 |
_applyWrap:function(value, |
16262 |
f.setCursor(value?null:"default"); |
| 16236 |
old){this.getManager().setWrap(value); |
16263 |
f.setSelectable(value); |
| 16237 |
this._onchange(); |
|
|
| 16238 |
}, |
16264 |
}, |
| 16239 |
_applyManager:function(value, |
16265 |
_oldSelected:null, |
| 16240 |
old){if(old){old.removeEventListener("change", |
16266 |
_openPopup:function(){var p=this._popup; |
| 16241 |
this._onchange, |
16267 |
var el=this.getElement(); |
| 16242 |
this); |
16268 |
if(!p.isCreated()){this.createDispatchEvent("beforeInitialOpen"); |
| 16243 |
} |
16269 |
} |
| 16244 |
if(value){value.addEventListener("change", |
16270 |
if(this._list.getChildrenLength()==0){return; |
| 16245 |
this._onchange, |
16271 |
}p.positionRelativeTo(el, |
| 16246 |
this); |
16272 |
1, |
| 16247 |
}this._onchange(); |
16273 |
qx.html.Dimension.getBoxHeight(el)); |
|
|
16274 |
p.setWidth(this.getBoxWidth()-2); |
| 16275 |
p.setParent(this.getTopLevelWidget()); |
| 16276 |
p.show(); |
| 16277 |
this._oldSelected=this.getSelected(); |
| 16278 |
this.setCapture(true); |
| 16248 |
}, |
16279 |
}, |
| 16249 |
_applyCheckValueFunction:function(value, |
16280 |
_closePopup:function(){this._popup.hide(); |
| 16250 |
old){this._checkValue=value; |
16281 |
this.setCapture(false); |
| 16251 |
}, |
16282 |
}, |
| 16252 |
_applyNumberFormat:function(value, |
16283 |
_testClosePopup:function(){if(this._popup.isSeeable()){this._closePopup(); |
| 16253 |
old){this._numberFormat=value; |
16284 |
}}, |
| 16254 |
this.getManager().setPrecision(value.getMaximumFractionDigits()); |
16285 |
_togglePopup:function(){this._popup.isSeeable()?this._closePopup():this._openPopup(); |
| 16255 |
this._onchange(); |
|
|
| 16256 |
}, |
16286 |
}, |
| 16257 |
_computePreferredInnerWidth:function(){return 50; |
16287 |
_onpopupappear:function(e){var vSelItem=this.getSelected(); |
|
|
16288 |
if(vSelItem){vSelItem.scrollIntoView(); |
| 16289 |
}}, |
| 16290 |
_oninput:function(e){this._fromInput=true; |
| 16291 |
this.setValue(this._field.getComputedValue()); |
| 16292 |
var vSelected=this.getSelected(); |
| 16293 |
if(vSelected&&vSelected.getLabel()!=this.getValue()){this.resetSelected(); |
| 16294 |
}delete this._fromInput; |
| 16258 |
}, |
16295 |
}, |
| 16259 |
_computePreferredInnerHeight:function(){return 14; |
16296 |
_onbeforedisappear:function(e){this._testClosePopup(); |
| 16260 |
}, |
16297 |
}, |
| 16261 |
_onkeypress:function(e){var vIdentifier=e.getKeyIdentifier(); |
16298 |
_onlocalechange:function(e){var selected=this.getSelected(); |
| 16262 |
if(vIdentifier=="Enter"&&!e.isAltPressed()){this._checkValue(true, |
16299 |
this._applySelected(selected, |
| 16263 |
false); |
16300 |
selected); |
| 16264 |
if(this.getSelectTextOnInteract()){this._textfield.selectAll(); |
16301 |
}, |
| 16265 |
}}else{switch(vIdentifier){case "Up":case "Down":case "Left":case "Right":case "Shift":case "Control":case "Alt":case "Escape":case "Delete":case "Backspace":case "Insert":case "Home":case "End":case "PageUp":case "PageDown":case "NumLock":case "Tab":break; |
16302 |
_onmousedown:function(e){if(!e.isLeftButtonPressed()){return; |
| 16266 |
default:if((vIdentifier>="0"&&vIdentifier<="9")||(vIdentifier=='-')){return; |
16303 |
}var vTarget=e.getTarget(); |
| 16267 |
} |
16304 |
switch(vTarget){case this._field:if(this.getEditable()){break; |
| 16268 |
if(this._numberFormat){var locale=this._numberFormat._locale; |
16305 |
}case this._button:this._button.addState("pressed"); |
| 16269 |
if((vIdentifier==qx.locale.Number.getGroupSeparator(locale))||(vIdentifier==qx.locale.Number.getDecimalSeparator(locale)))return; |
16306 |
this._togglePopup(); |
| 16270 |
}if(e.getModifiers()==0){e.preventDefault(); |
16307 |
this.setCapture(true); |
| 16271 |
}}}}, |
|
|
| 16272 |
_onkeydown:function(e){var vIdentifier=e.getKeyIdentifier(); |
| 16273 |
if(this._intervalIncrease==null){switch(vIdentifier){case "Up":case "Down":this._intervalIncrease=vIdentifier=="Up"; |
| 16274 |
this._intervalMode="single"; |
| 16275 |
this._resetIncrements(); |
| 16276 |
this._checkValue(true, |
| 16277 |
false); |
| 16278 |
this._increment(); |
| 16279 |
this._timer.startWith(this.getFirstInterval()); |
| 16280 |
break; |
| 16281 |
case "PageUp":case "PageDown":this._intervalIncrease=vIdentifier=="PageUp"; |
| 16282 |
this._intervalMode="page"; |
| 16283 |
this._resetIncrements(); |
| 16284 |
this._checkValue(true, |
| 16285 |
false); |
| 16286 |
this._pageIncrement(); |
| 16287 |
this._timer.startWith(this.getFirstInterval()); |
| 16288 |
break; |
16308 |
break; |
|
|
16309 |
default:break; |
| 16310 |
}e.stopPropagation(); |
| 16311 |
}, |
| 16312 |
_onclick:function(e){if(!e.isLeftButtonPressed()){return; |
| 16313 |
}var vTarget=e.getTarget(); |
| 16314 |
switch(vTarget){case this._field:case this._button:case this:case this._list:break; |
| 16315 |
default:if(vTarget instanceof qx.ui.form.ListItem&&vTarget.getParent()==this._list){this._list._onmousedown(e); |
| 16316 |
this.setSelected(this._list.getSelectedItem()); |
| 16317 |
this._closePopup(); |
| 16318 |
this.setFocused(true); |
| 16319 |
}else if(this._popup.isSeeable()){this._popup.hide(); |
| 16320 |
this.setCapture(false); |
| 16289 |
}}}, |
16321 |
}}}, |
| 16290 |
_onkeyup:function(e){if(this._intervalIncrease!=null){switch(e.getKeyIdentifier()){case "Up":case "Down":case "PageUp":case "PageDown":this._timer.stop(); |
16322 |
_onmouseup:function(e){this._button.removeState("pressed"); |
| 16291 |
this._intervalIncrease=null; |
16323 |
if(!this._popup.isSeeable()){this.setCapture(false); |
| 16292 |
this._intervalMode=null; |
16324 |
}}, |
|
|
16325 |
_onmouseover:function(e){var vTarget=e.getTarget(); |
| 16326 |
if(vTarget instanceof qx.ui.form.ListItem){var vManager=this._manager; |
| 16327 |
vManager.deselectAll(); |
| 16328 |
vManager.setLeadItem(vTarget); |
| 16329 |
vManager.setAnchorItem(vTarget); |
| 16330 |
vManager.setSelectedItem(vTarget); |
| 16331 |
}}, |
| 16332 |
_onmousewheel:function(e){if(!this._popup.isSeeable()){var toSelect; |
| 16333 |
var isSelected=this.getSelected(); |
| 16334 |
if(e.getWheelDelta()<0){toSelect=isSelected?this._manager.getNext(isSelected):this._manager.getFirst(); |
| 16335 |
}else{toSelect=isSelected?this._manager.getPrevious(isSelected):this._manager.getLast(); |
| 16336 |
} |
| 16337 |
if(toSelect){this.setSelected(toSelect); |
| 16338 |
}}else{var vTarget=e.getTarget(); |
| 16339 |
if(vTarget!=this&&vTarget.getParent()!=this._list){this._popup.hide(); |
| 16340 |
this.setCapture(false); |
| 16293 |
}}}, |
16341 |
}}}, |
| 16294 |
_onmousedown:function(e){if(!e.isLeftButtonPressed()){return; |
16342 |
_onkeydown:function(e){var vManager=this._manager; |
| 16295 |
}this._checkValue(true); |
16343 |
var vVisible=this._popup.isSeeable(); |
| 16296 |
var vButton=e.getCurrentTarget(); |
16344 |
switch(e.getKeyIdentifier()){case "Enter":if(vVisible){this.setSelected(this._manager.getSelectedItem()); |
| 16297 |
vButton.addState("pressed"); |
16345 |
this._closePopup(); |
| 16298 |
vButton.addEventListener("mouseup", |
16346 |
this.setFocused(true); |
| 16299 |
this._onmouseup, |
16347 |
}else{this._openPopup(); |
| 16300 |
this); |
16348 |
}e.stopPropagation(); |
| 16301 |
vButton.addEventListener("mouseout", |
16349 |
return; |
| 16302 |
this._onmouseup, |
16350 |
case "Escape":if(vVisible){vManager.setLeadItem(this._oldSelected); |
| 16303 |
this); |
16351 |
vManager.setAnchorItem(this._oldSelected); |
| 16304 |
this._intervalIncrease=vButton==this._upbutton; |
16352 |
vManager.setSelectedItem(this._oldSelected); |
| 16305 |
this._resetIncrements(); |
16353 |
this._field.setValue(this._oldSelected?this._oldSelected.getLabel():""); |
| 16306 |
this._increment(); |
16354 |
this._closePopup(); |
| 16307 |
if(this.getSelectTextOnInteract()){this._textfield.selectAll(); |
16355 |
this.setFocused(true); |
| 16308 |
}this._timer.setInterval(this.getFirstInterval()); |
16356 |
e.stopPropagation(); |
| 16309 |
this._timer.start(); |
16357 |
}return; |
|
|
16358 |
case "Down":if(e.isAltPressed()){this._togglePopup(); |
| 16359 |
return; |
| 16360 |
}break; |
| 16361 |
}}, |
| 16362 |
_onkeypress:function(e){var vVisible=this._popup.isSeeable(); |
| 16363 |
var vManager=this._manager; |
| 16364 |
switch(e.getKeyIdentifier()){case "PageUp":if(!vVisible){var vPrevious; |
| 16365 |
var vTemp=this.getSelected(); |
| 16366 |
if(vTemp){var vInterval=this.getPagingInterval(); |
| 16367 |
do{vPrevious=vTemp; |
| 16368 |
}while(--vInterval&&(vTemp=vManager.getPrevious(vPrevious))); |
| 16369 |
}else{vPrevious=vManager.getLast(); |
| 16370 |
}this.setSelected(vPrevious); |
| 16371 |
return; |
| 16372 |
}break; |
| 16373 |
case "PageDown":if(!vVisible){var vNext; |
| 16374 |
var vTemp=this.getSelected(); |
| 16375 |
if(vTemp){var vInterval=this.getPagingInterval(); |
| 16376 |
do{vNext=vTemp; |
| 16377 |
}while(--vInterval&&(vTemp=vManager.getNext(vNext))); |
| 16378 |
}else{vNext=vManager.getFirst(); |
| 16379 |
}this.setSelected(vNext||null); |
| 16380 |
return; |
| 16381 |
}break; |
| 16382 |
}if(!this.isEditable()||vVisible){this._list._onkeypress(e); |
| 16383 |
}}, |
| 16384 |
_onkeyinput:function(e){var vVisible=this._popup.isSeeable(); |
| 16385 |
if(!this.isEditable()||vVisible){this._list._onkeyinput(e); |
| 16386 |
}}, |
| 16387 |
_visualizeBlur:function(){this.getField()._visualizeBlur(); |
| 16388 |
this.removeState("focused"); |
| 16310 |
}, |
16389 |
}, |
| 16311 |
_onmouseup:function(e){var vButton=e.getCurrentTarget(); |
16390 |
_visualizeFocus:function(){this.getField()._visualizeFocus(); |
| 16312 |
vButton.removeState("pressed"); |
16391 |
this.getField().selectAll(); |
| 16313 |
vButton.removeEventListener("mouseup", |
16392 |
this.addState("focused"); |
| 16314 |
this._onmouseup, |
16393 |
}}, |
|
|
16394 |
destruct:function(){if(this._popup&&!qx.core.Object.inGlobalDispose()){this._popup.setParent(null); |
| 16395 |
}var vDoc=qx.ui.core.ClientDocument.getInstance(); |
| 16396 |
vDoc.removeEventListener("windowblur", |
| 16397 |
this._testClosePopup, |
| 16315 |
this); |
16398 |
this); |
| 16316 |
vButton.removeEventListener("mouseout", |
16399 |
var vMgr=qx.locale.Manager.getInstance(); |
| 16317 |
this._onmouseup, |
16400 |
vMgr.removeEventListener("changeLocale", |
|
|
16401 |
this._onlocalechange, |
| 16318 |
this); |
16402 |
this); |
| 16319 |
if(this.getSelectTextOnInteract()){this._textfield.selectAll(); |
16403 |
this._disposeObjects("_popup", |
| 16320 |
}this._textfield.setFocused(true); |
16404 |
"_list", |
| 16321 |
this._timer.stop(); |
16405 |
"_manager", |
| 16322 |
this._intervalIncrease=null; |
16406 |
"_field", |
| 16323 |
}, |
16407 |
"_button"); |
| 16324 |
_onmousewheel:function(e){this._checkValue(true); |
16408 |
}}); |
| 16325 |
if(this.getManager().incrementValue){this.getManager().incrementValue(this.getWheelIncrementAmount()*e.getWheelDelta()); |
16409 |
|
| 16326 |
}else{var value=this.getManager().getValue()+(this.getWheelIncrementAmount()*e.getWheelDelta()); |
16410 |
|
| 16327 |
value=this.getManager().limit(value); |
16411 |
|
| 16328 |
this.getManager().setValue(value); |
16412 |
|
| 16329 |
}this._textfield.selectAll(); |
16413 |
/* ID: qx.ui.form.List */ |
|
|
16414 |
qx.Class.define("qx.ui.form.List", |
| 16415 |
{extend:qx.ui.layout.VerticalBoxLayout, |
| 16416 |
construct:function(){this.base(arguments); |
| 16417 |
this._manager=new qx.ui.selection.SelectionManager(this); |
| 16418 |
this.addEventListener("mouseover", |
| 16419 |
this._onmouseover); |
| 16420 |
this.addEventListener("mousedown", |
| 16421 |
this._onmousedown); |
| 16422 |
this.addEventListener("mouseup", |
| 16423 |
this._onmouseup); |
| 16424 |
this.addEventListener("click", |
| 16425 |
this._onclick); |
| 16426 |
this.addEventListener("dblclick", |
| 16427 |
this._ondblclick); |
| 16428 |
this.addEventListener("keydown", |
| 16429 |
this._onkeydown); |
| 16430 |
this.addEventListener("keypress", |
| 16431 |
this._onkeypress); |
| 16432 |
this.addEventListener("keyinput", |
| 16433 |
this._onkeyinput); |
| 16434 |
this.initOverflow(); |
| 16435 |
this.initTabIndex(); |
| 16330 |
}, |
16436 |
}, |
| 16331 |
_ontextchange:function(e){this._last_value=e.getOldValue(); |
16437 |
properties:{appearance:{refine:true, |
|
|
16438 |
init:"list"}, |
| 16439 |
overflow:{refine:true, |
| 16440 |
init:"hidden"}, |
| 16441 |
tabIndex:{refine:true, |
| 16442 |
init:1}, |
| 16443 |
enableInlineFind:{check:"Boolean", |
| 16444 |
init:true}, |
| 16445 |
markLeadingItem:{check:"Boolean", |
| 16446 |
init:false}}, |
| 16447 |
members:{_pressedString:"", |
| 16448 |
getManager:function(){return this._manager; |
| 16332 |
}, |
16449 |
}, |
| 16333 |
_oninput:function(e){this._checkValue(true, |
16450 |
getListItemTarget:function(vItem){while(vItem!=null&&vItem.getParent()!=this){vItem=vItem.getParent(); |
| 16334 |
true); |
16451 |
}return vItem; |
| 16335 |
}, |
16452 |
}, |
| 16336 |
_onchange:function(e){var vValue=this.getManager().getValue(); |
16453 |
getSelectedItem:function(){return this.getSelectedItems()[0]||null; |
| 16337 |
if(this._numberFormat){this._textfield.setValue(this._numberFormat.format(vValue)); |
|
|
| 16338 |
}else{this._textfield.setValue(String(vValue)); |
| 16339 |
} |
| 16340 |
if(vValue==this.getMin()&&!this.getWrap()){this._downbutton.removeState("pressed"); |
| 16341 |
this._downbutton.setEnabled(false); |
| 16342 |
this._timer.stop(); |
| 16343 |
}else{this._downbutton.resetEnabled(); |
| 16344 |
} |
| 16345 |
if(vValue==this.getMax()&&!this.getWrap()){this._upbutton.removeState("pressed"); |
| 16346 |
this._upbutton.setEnabled(false); |
| 16347 |
this._timer.stop(); |
| 16348 |
}else{this._upbutton.resetEnabled(); |
| 16349 |
}this.createDispatchDataEvent("change", |
| 16350 |
vValue); |
| 16351 |
}, |
16454 |
}, |
| 16352 |
_onblur:function(e){this._checkValue(false); |
16455 |
getSelectedItems:function(){return this._manager.getSelectedItems(); |
| 16353 |
}, |
16456 |
}, |
| 16354 |
setValue:function(nValue){this.getManager().setValue(this.getManager().limit(nValue)); |
16457 |
_onmouseover:function(e){var vItem=this.getListItemTarget(e.getTarget()); |
|
|
16458 |
if(vItem){this._manager.handleMouseOver(vItem, |
| 16459 |
e); |
| 16460 |
}}, |
| 16461 |
_onmousedown:function(e){var vItem=this.getListItemTarget(e.getTarget()); |
| 16462 |
if(vItem){this._manager.handleMouseDown(vItem, |
| 16463 |
e); |
| 16464 |
}}, |
| 16465 |
_onmouseup:function(e){var vItem=this.getListItemTarget(e.getTarget()); |
| 16466 |
if(vItem){this._manager.handleMouseUp(vItem, |
| 16467 |
e); |
| 16468 |
}}, |
| 16469 |
_onclick:function(e){var vItem=this.getListItemTarget(e.getTarget()); |
| 16470 |
if(vItem){this._manager.handleClick(vItem, |
| 16471 |
e); |
| 16472 |
}}, |
| 16473 |
_ondblclick:function(e){var vItem=this.getListItemTarget(e.getTarget()); |
| 16474 |
if(vItem){this._manager.handleDblClick(vItem, |
| 16475 |
e); |
| 16476 |
}}, |
| 16477 |
_onkeydown:function(e){if(e.getKeyIdentifier()=="Enter"&&!e.isAltPressed()){var items=this.getSelectedItems(); |
| 16478 |
for(var i=0;i<items.length;i++){items[i].createDispatchEvent("action"); |
| 16479 |
}}}, |
| 16480 |
_onkeypress:function(e){this._manager.handleKeyPress(e); |
| 16355 |
}, |
16481 |
}, |
| 16356 |
getValue:function(){this._checkValue(true); |
16482 |
_lastKeyPress:0, |
| 16357 |
return this.getManager().getValue(); |
16483 |
_onkeyinput:function(e){if(!this.getEnableInlineFind()){return; |
|
|
16484 |
}if(((new Date).valueOf()-this._lastKeyPress)>1000){this._pressedString=""; |
| 16485 |
}this._pressedString+=String.fromCharCode(e.getCharCode()); |
| 16486 |
var matchedItem=this.findString(this._pressedString, |
| 16487 |
null); |
| 16488 |
if(matchedItem){var oldVal=this._manager._getChangeValue(); |
| 16489 |
var oldFireChange=this._manager.getFireChange(); |
| 16490 |
this._manager.setFireChange(false); |
| 16491 |
this._manager._deselectAll(); |
| 16492 |
this._manager.setItemSelected(matchedItem, |
| 16493 |
true); |
| 16494 |
this._manager.setAnchorItem(matchedItem); |
| 16495 |
this._manager.setLeadItem(matchedItem); |
| 16496 |
matchedItem.scrollIntoView(); |
| 16497 |
this._manager.setFireChange(oldFireChange); |
| 16498 |
if(oldFireChange&&this._manager._hasChanged(oldVal)){this._manager._dispatchChange(); |
| 16499 |
}}this._lastKeyPress=(new Date).valueOf(); |
| 16500 |
e.preventDefault(); |
| 16358 |
}, |
16501 |
}, |
| 16359 |
resetValue:function(){this.getManager().resetValue(); |
16502 |
_findItem:function(vUserValue, |
|
|
16503 |
vStartIndex, |
| 16504 |
vType){var vAllItems=this.getChildren(); |
| 16505 |
if(vStartIndex==null){vStartIndex=vAllItems.indexOf(this.getSelectedItem()); |
| 16506 |
if(vStartIndex==-1){vStartIndex=0; |
| 16507 |
}}var methodName="matches"+vType; |
| 16508 |
for(var i=vStartIndex;i<vAllItems.length;i++){if(vAllItems[i][methodName](vUserValue)){return vAllItems[i]; |
| 16509 |
}}for(var i=0;i<vStartIndex;i++){if(vAllItems[i][methodName](vUserValue)){return vAllItems[i]; |
| 16510 |
}}return null; |
| 16360 |
}, |
16511 |
}, |
| 16361 |
setMax:function(vMax){return this.getManager().setMax(vMax); |
16512 |
findString:function(vText, |
|
|
16513 |
vStartIndex){return this._findItem(vText, |
| 16514 |
vStartIndex||0, |
| 16515 |
"String"); |
| 16362 |
}, |
16516 |
}, |
| 16363 |
getMax:function(){return this.getManager().getMax(); |
16517 |
findStringExact:function(vText, |
|
|
16518 |
vStartIndex){return this._findItem(vText, |
| 16519 |
vStartIndex||0, |
| 16520 |
"StringExact"); |
| 16364 |
}, |
16521 |
}, |
| 16365 |
setMin:function(vMin){return this.getManager().setMin(vMin); |
16522 |
findValue:function(vText, |
|
|
16523 |
vStartIndex){return this._findItem(vText, |
| 16524 |
vStartIndex||0, |
| 16525 |
"Value"); |
| 16366 |
}, |
16526 |
}, |
| 16367 |
getMin:function(){return this.getManager().getMin(); |
16527 |
findValueExact:function(vText, |
|
|
16528 |
vStartIndex){return this._findItem(vText, |
| 16529 |
vStartIndex||0, |
| 16530 |
"ValueExact"); |
| 16368 |
}, |
16531 |
}, |
| 16369 |
_intervalIncrease:null, |
16532 |
_sortItemsCompare:function(a, |
| 16370 |
_oninterval:function(e){this._timer.stop(); |
16533 |
b){return a.key<b.key?-1:a.key==b.key?0:1; |
| 16371 |
this.setInterval(Math.max(this.getMinTimer(), |
|
|
| 16372 |
this.getInterval()-this.getTimerDecrease())); |
| 16373 |
if(this._intervalMode=="page"){this._pageIncrement(); |
| 16374 |
}else{if(this.getInterval()==this.getMinTimer()){this._computedIncrementAmount=this.getAmountGrowth()*this._computedIncrementAmount; |
| 16375 |
}this._increment(); |
| 16376 |
}var wrap=this.getManager().getWrap(); |
| 16377 |
switch(this._intervalIncrease){case true:if(this.getValue()==this.getMax()&&!wrap){return; |
| 16378 |
}case false:if(this.getValue()==this.getMin()&&!wrap){return; |
| 16379 |
}}this._timer.restartWith(this.getInterval()); |
| 16380 |
}, |
16534 |
}, |
| 16381 |
__checkValue:function(acceptEmpty, |
16535 |
sortItemsByString:function(vReverse){var sortitems=[]; |
| 16382 |
acceptEdit){var el=this._textfield.getInputElement(); |
16536 |
var items=this.getChildren(); |
| 16383 |
if(!el){return; |
16537 |
for(var i=0, |
| 16384 |
} |
16538 |
l=items.length;i<l;i++){sortitems[i]={key:items[i].getLabel(), |
| 16385 |
if((el.value=="")||(el.value=="-")){if(!acceptEmpty){this.resetValue(); |
16539 |
item:items[i]}; |
| 16386 |
return; |
16540 |
}sortitems.sort(this._sortItemsCompare); |
| 16387 |
}}else{var str_val=el.value; |
16541 |
if(vReverse){sortitems.reverse(); |
| 16388 |
var parsable_str; |
|
|
| 16389 |
if(this._numberFormat){var groupSepEsc=qx.lang.String.escapeRegexpChars(qx.locale.Number.getGroupSeparator(this._numberFormat._locale)+""); |
| 16390 |
var decimalSepEsc=qx.lang.String.escapeRegexpChars(qx.locale.Number.getDecimalSeparator(this._numberFormat._locale)+""); |
| 16391 |
parsable_str=str_val.replace(new RegExp(decimalSepEsc), |
| 16392 |
"."); |
| 16393 |
parsable_str=parsable_str.replace(new RegExp(groupSepEsc, |
| 16394 |
"g"), |
| 16395 |
""); |
| 16396 |
}else{parsable_str=str_val; |
| 16397 |
}var val=parseFloat(parsable_str); |
| 16398 |
var limitedVal=this.getManager().limit(val); |
| 16399 |
var oldValue=this.getManager().getValue(); |
| 16400 |
var fixedVal=limitedVal; |
| 16401 |
if(isNaN(val)||(limitedVal!=val)||(val!=parsable_str)){if(acceptEdit){this._textfield.setValue(this._last_value); |
| 16402 |
}else{if(isNaN(limitedVal)){fixedVal=oldValue; |
| 16403 |
}else{fixedVal=limitedVal; |
| 16404 |
}}} |
| 16405 |
if(acceptEdit)return; |
| 16406 |
var formattedValue; |
| 16407 |
if(this._numberFormat){formattedValue=this._numberFormat.format(fixedVal); |
| 16408 |
}else{formattedValue=String(fixedVal); |
| 16409 |
} |
16542 |
} |
| 16410 |
if((fixedVal===oldValue)&&(str_val!==formattedValue)){this._textfield.setValue(formattedValue); |
16543 |
for(var i=0;i<l;i++){this.addAt(sortitems[i].item, |
| 16411 |
}this.getManager().setValue(fixedVal); |
16544 |
i); |
| 16412 |
}}, |
|
|
| 16413 |
_increment:function(){if(this.getManager().incrementValue){this.getManager().incrementValue((this._intervalIncrease?1:-1)*this._computedIncrementAmount); |
| 16414 |
}else{var value=this.getManager().getValue()+((this._intervalIncrease?1:-1)*this._computedIncrementAmount); |
| 16415 |
value=this.getManager().limit(value); |
| 16416 |
this.getManager().setValue(value); |
| 16417 |
}}, |
| 16418 |
_pageIncrement:function(){if(this.getManager().pageIncrementValue){this.getManager().pageIncrementValue(); |
| 16419 |
}else{var value=this.getManager().getValue()+((this._intervalIncrease?1:-1)*this.getPageIncrementAmount()); |
| 16420 |
value=this.getManager().limit(value); |
| 16421 |
this.getManager().setValue(value); |
| 16422 |
}}, |
| 16423 |
_resetIncrements:function(){this._computedIncrementAmount=this.getIncrementAmount(); |
| 16424 |
this.resetInterval(); |
| 16425 |
}}, |
16545 |
}}, |
| 16426 |
destruct:function(){var mgr=this.getManager(); |
16546 |
sortItemsByValue:function(vReverse){var sortitems=[]; |
| 16427 |
if(mgr){mgr.dispose(); |
16547 |
var items=this.getChildren(); |
| 16428 |
}this._disposeObjects("_textfield", |
16548 |
for(var i=0, |
| 16429 |
"_buttonlayout", |
16549 |
l=items.length;i<l;i++){sortitems[i]={key:items[i].getValue(), |
| 16430 |
"_upbutton", |
16550 |
item:items[i]}; |
| 16431 |
"_downbutton", |
16551 |
}sortitems.sort(this._sortItemsCompare); |
| 16432 |
"_timer"); |
16552 |
if(vReverse){sortitems.reverse(); |
|
|
16553 |
} |
| 16554 |
for(var i=0;i<l;i++){this.addAt(sortitems[i].item, |
| 16555 |
i); |
| 16556 |
}}}, |
| 16557 |
destruct:function(){this._disposeObjects("_manager"); |
| 16433 |
}}); |
16558 |
}}); |
| 16434 |
|
16559 |
|
| 16435 |
|
16560 |
|
|
Lines 16576-17018
Link Here
|
| 16576 |
_applyEnabled:function(value, |
16701 |
_applyEnabled:function(value, |
| 16577 |
old){if(this._inputElement){this._inputElement.disabled=value===false; |
16702 |
old){if(this._inputElement){this._inputElement.disabled=value===false; |
| 16578 |
}return this.base(arguments, |
16703 |
}return this.base(arguments, |
| 16579 |
value, |
16704 |
value, |
| 16580 |
old); |
16705 |
old); |
| 16581 |
}, |
|
|
| 16582 |
_applyValue:function(value, |
| 16583 |
old){this._inValueProperty=true; |
| 16584 |
if(this._inputElement){if(value===null){value=""; |
| 16585 |
} |
| 16586 |
if(this._inputElement.value!==value){this._inputElement.value=value; |
| 16587 |
}}delete this._inValueProperty; |
| 16588 |
}, |
| 16589 |
_applyMaxLength:function(value, |
| 16590 |
old){if(this._inputElement){this._inputElement.maxLength=value==null?"":value; |
| 16591 |
}}, |
| 16592 |
_applyReadOnly:function(value, |
| 16593 |
old){if(this._inputElement){this._inputElement.readOnly=value; |
| 16594 |
} |
| 16595 |
if(value){this.addState("readonly"); |
| 16596 |
}else{this.removeState("readonly"); |
| 16597 |
}}, |
| 16598 |
_applyTextColor:function(value, |
| 16599 |
old){qx.theme.manager.Color.getInstance().connect(this._styleTextColor, |
| 16600 |
this, |
| 16601 |
value); |
| 16602 |
}, |
| 16603 |
_styleTextColor:function(value){this.__textColor=value; |
| 16604 |
this._renderTextColor(); |
| 16605 |
}, |
| 16606 |
_renderTextColor:function(){var inp=this._inputElement; |
| 16607 |
if(inp){inp.style.color=this.__textColor||""; |
| 16608 |
}}, |
| 16609 |
_applyFont:function(value, |
| 16610 |
old){qx.theme.manager.Font.getInstance().connect(this._styleFont, |
| 16611 |
this, |
| 16612 |
value); |
| 16613 |
}, |
| 16614 |
_styleFont:function(value){this.__font=value; |
| 16615 |
this._renderFont(); |
| 16616 |
}, |
| 16617 |
_renderFont:function(){var inp=this._inputElement; |
| 16618 |
if(inp){var value=this.__font; |
| 16619 |
value?value.renderElement(inp):qx.ui.core.Font.resetElement(inp); |
| 16620 |
}}, |
| 16621 |
_visualizeFocus:function(){this.base(arguments); |
| 16622 |
if(!qx.event.handler.FocusHandler.mouseFocus&&this.getEnableElementFocus()){try{this._inputElement.focus(); |
| 16623 |
}catch(ex){}}}, |
| 16624 |
_visualizeBlur:function(){this.base(arguments); |
| 16625 |
if(!qx.event.handler.FocusHandler.mouseFocus){try{this._inputElement.blur(); |
| 16626 |
}catch(ex){}}}, |
| 16627 |
getComputedValue:function(){if(this._inputElement){return this._inputElement.value; |
| 16628 |
}return this.getValue(); |
| 16629 |
}, |
| 16630 |
getInputElement:function(){return this._inputElement||null; |
| 16631 |
}, |
| 16632 |
isValid:function(){var vValidator=this.getValidator(); |
| 16633 |
return !vValidator||vValidator(this.getValue()); |
| 16634 |
}, |
| 16635 |
isComputedValid:function(){var vValidator=this.getValidator(); |
| 16636 |
return !vValidator||vValidator(this.getComputedValue()); |
| 16637 |
}, |
| 16638 |
_computePreferredInnerWidth:function(){return 120; |
| 16639 |
}, |
| 16640 |
_computePreferredInnerHeight:function(){return 16; |
| 16641 |
}, |
| 16642 |
_ieFirstInputFix:qx.core.Variant.select("qx.client", |
| 16643 |
{"mshtml":function(){this._inValueProperty=true; |
| 16644 |
this._inputElement.value=this.getValue()===null?"":this.getValue(); |
| 16645 |
this._firstInputFixApplied=true; |
| 16646 |
delete this._inValueProperty; |
| 16647 |
}, |
| 16648 |
"default":null}), |
| 16649 |
_afterAppear:qx.core.Variant.select("qx.client", |
| 16650 |
{"mshtml":function(){this.base(arguments); |
| 16651 |
if(!this._firstInputFixApplied&&this._inputElement){qx.client.Timer.once(this._ieFirstInputFix, |
| 16652 |
this, |
| 16653 |
1); |
| 16654 |
}}, |
| 16655 |
"default":function(){this.base(arguments); |
| 16656 |
}}), |
| 16657 |
_firstInputFixApplied:false, |
| 16658 |
_textOnFocus:null, |
| 16659 |
_oninputDom:qx.core.Variant.select("qx.client", |
| 16660 |
{"mshtml":function(e){if(!this._inValueProperty&&e.propertyName==="value"){this.createDispatchDataEvent("input", |
| 16661 |
this.getComputedValue()); |
| 16662 |
}}, |
| 16663 |
"default":function(e){this.createDispatchDataEvent("input", |
| 16664 |
this.getComputedValue()); |
| 16665 |
}}), |
| 16666 |
_ontabfocus:function(){this.selectAll(); |
| 16667 |
}, |
| 16668 |
_onfocus:function(){this._textOnFocus=this.getComputedValue(); |
| 16669 |
}, |
| 16670 |
_onblur:function(){var vValue=this.getComputedValue().toString(); |
| 16671 |
if(this._textOnFocus!=vValue){this.setValue(vValue); |
| 16672 |
}if(this.getParent()!=null){this.setSelectionLength(0); |
| 16673 |
}}, |
| 16674 |
_oninput:function(){if(!this.isLiveUpdate()){return; |
| 16675 |
}var vValue=this.getComputedValue().toString(); |
| 16676 |
this.setValue(vValue); |
| 16677 |
}, |
| 16678 |
_onkeydown:function(e){if(e.getKeyIdentifier()=="Backspace"&&this.getReadOnly()){e.preventDefault(); |
| 16679 |
}}, |
| 16680 |
__getRange:qx.core.Variant.select("qx.client", |
| 16681 |
{"mshtml":function(){this._visualPropertyCheck(); |
| 16682 |
return this._inputElement.createTextRange(); |
| 16683 |
}, |
| 16684 |
"default":null}), |
| 16685 |
__getSelectionRange:qx.core.Variant.select("qx.client", |
| 16686 |
{"mshtml":function(){this._visualPropertyCheck(); |
| 16687 |
return this.getTopLevelWidget().getDocumentElement().selection.createRange(); |
| 16688 |
}, |
| 16689 |
"default":null}), |
| 16690 |
setSelectionStart:qx.core.Variant.select("qx.client", |
| 16691 |
{"mshtml":function(vStart){this._visualPropertyCheck(); |
| 16692 |
var vText=this._inputElement.value; |
| 16693 |
var i=0; |
| 16694 |
while(i<vStart){i=vText.indexOf("\r\n", |
| 16695 |
i); |
| 16696 |
if(i==-1){break; |
| 16697 |
}vStart--; |
| 16698 |
i++; |
| 16699 |
}var vRange=this.__getRange(); |
| 16700 |
vRange.collapse(); |
| 16701 |
vRange.move("character", |
| 16702 |
vStart); |
| 16703 |
vRange.select(); |
| 16704 |
}, |
| 16705 |
"default":function(vStart){this._visualPropertyCheck(); |
| 16706 |
this._inputElement.selectionStart=vStart; |
| 16707 |
}}), |
| 16708 |
getSelectionStart:qx.core.Variant.select("qx.client", |
| 16709 |
{"mshtml":function(){this._visualPropertyCheck(); |
| 16710 |
var vSelectionRange=this.__getSelectionRange(); |
| 16711 |
if(!this._inputElement.contains(vSelectionRange.parentElement())){return -1; |
| 16712 |
}var vRange=this.__getRange(); |
| 16713 |
var len=this._inputElement.value.length; |
| 16714 |
vRange.moveToBookmark(vSelectionRange.getBookmark()); |
| 16715 |
vRange.moveEnd('character', |
| 16716 |
len); |
| 16717 |
return len-vRange.text.length; |
| 16718 |
}, |
| 16719 |
"default":function(){this._visualPropertyCheck(); |
| 16720 |
return this._inputElement.selectionStart; |
| 16721 |
}}), |
| 16722 |
setSelectionLength:qx.core.Variant.select("qx.client", |
| 16723 |
{"mshtml":function(vLength){this._visualPropertyCheck(); |
| 16724 |
var vSelectionRange=this.__getSelectionRange(); |
| 16725 |
if(!this._inputElement.contains(vSelectionRange.parentElement())){return; |
| 16726 |
}vSelectionRange.collapse(); |
| 16727 |
vSelectionRange.moveEnd("character", |
| 16728 |
vLength); |
| 16729 |
vSelectionRange.select(); |
| 16730 |
}, |
16706 |
}, |
| 16731 |
"default":function(vLength){this._visualPropertyCheck(); |
16707 |
_applyValue:function(value, |
| 16732 |
var el=this._inputElement; |
16708 |
old){this._inValueProperty=true; |
| 16733 |
if(qx.util.Validation.isValidString(el.value)&&this.getVisibility()){el.selectionEnd=el.selectionStart+vLength; |
16709 |
if(this._inputElement){if(value===null){value=""; |
| 16734 |
}}}), |
16710 |
} |
| 16735 |
getSelectionLength:qx.core.Variant.select("qx.client", |
16711 |
if(this._inputElement.value!==value){this._inputElement.value=value; |
| 16736 |
{"mshtml":function(){this._visualPropertyCheck(); |
16712 |
}}delete this._inValueProperty; |
| 16737 |
var vSelectionRange=this.__getSelectionRange(); |
|
|
| 16738 |
if(!this._inputElement.contains(vSelectionRange.parentElement())){return 0; |
| 16739 |
}return vSelectionRange.text.length; |
| 16740 |
}, |
16713 |
}, |
| 16741 |
"default":function(){this._visualPropertyCheck(); |
16714 |
_applyMaxLength:function(value, |
| 16742 |
var el=this._inputElement; |
16715 |
old){if(this._inputElement){this._inputElement.maxLength=value==null?"":value; |
| 16743 |
return el.selectionEnd-el.selectionStart; |
16716 |
}}, |
| 16744 |
}}), |
16717 |
_applyReadOnly:function(value, |
| 16745 |
setSelectionText:qx.core.Variant.select("qx.client", |
16718 |
old){if(this._inputElement){this._inputElement.readOnly=value; |
| 16746 |
{"mshtml":function(vText){this._visualPropertyCheck(); |
16719 |
} |
| 16747 |
var vStart=this.getSelectionStart(); |
16720 |
if(value){this.addState("readonly"); |
| 16748 |
var vSelectionRange=this.__getSelectionRange(); |
16721 |
}else{this.removeState("readonly"); |
| 16749 |
if(!this._inputElement.contains(vSelectionRange.parentElement())){return; |
16722 |
}}, |
| 16750 |
}vSelectionRange.text=vText; |
16723 |
_applyTextColor:function(value, |
| 16751 |
this.setValue(this._inputElement.value); |
16724 |
old){qx.theme.manager.Color.getInstance().connect(this._styleTextColor, |
| 16752 |
this.setSelectionStart(vStart); |
16725 |
this, |
| 16753 |
this.setSelectionLength(vText.length); |
16726 |
value); |
| 16754 |
}, |
16727 |
}, |
| 16755 |
"default":function(vText){this._visualPropertyCheck(); |
16728 |
_styleTextColor:function(value){this.__textColor=value; |
| 16756 |
var el=this._inputElement; |
16729 |
this._renderTextColor(); |
| 16757 |
var vOldText=el.value; |
|
|
| 16758 |
var vStart=el.selectionStart; |
| 16759 |
var vOldTextBefore=vOldText.substr(0, |
| 16760 |
vStart); |
| 16761 |
var vOldTextAfter=vOldText.substr(el.selectionEnd); |
| 16762 |
var vValue=el.value=vOldTextBefore+vText+vOldTextAfter; |
| 16763 |
el.selectionStart=vStart; |
| 16764 |
el.selectionEnd=vStart+vText.length; |
| 16765 |
this.setValue(vValue); |
| 16766 |
}}), |
| 16767 |
getSelectionText:qx.core.Variant.select("qx.client", |
| 16768 |
{"mshtml":function(){this._visualPropertyCheck(); |
| 16769 |
var vSelectionRange=this.__getSelectionRange(); |
| 16770 |
if(!this._inputElement.contains(vSelectionRange.parentElement())){return ""; |
| 16771 |
}return vSelectionRange.text; |
| 16772 |
}, |
16730 |
}, |
| 16773 |
"default":function(){this._visualPropertyCheck(); |
16731 |
_renderTextColor:function(){var inp=this._inputElement; |
| 16774 |
return this._inputElement.value.substr(this.getSelectionStart(), |
16732 |
if(inp){inp.style.color=this.__textColor||""; |
| 16775 |
this.getSelectionLength()); |
16733 |
}}, |
| 16776 |
}}), |
16734 |
_applyFont:function(value, |
| 16777 |
selectAll:function(){this._visualPropertyCheck(); |
16735 |
old){qx.theme.manager.Font.getInstance().connect(this._styleFont, |
| 16778 |
if(this.getValue()!=null){this.setSelectionStart(0); |
16736 |
this, |
| 16779 |
this.setSelectionLength(this._inputElement.value.length); |
16737 |
value); |
| 16780 |
}this._inputElement.select(); |
|
|
| 16781 |
this._inputElement.focus(); |
| 16782 |
}, |
16738 |
}, |
| 16783 |
selectFromTo:qx.core.Variant.select("qx.client", |
16739 |
_styleFont:function(value){this.__font=value; |
| 16784 |
{"mshtml":function(vStart, |
16740 |
this._renderFont(); |
| 16785 |
vEnd){this._visualPropertyCheck(); |
|
|
| 16786 |
this.setSelectionStart(vStart); |
| 16787 |
this.setSelectionLength(vEnd-vStart); |
| 16788 |
}, |
16741 |
}, |
| 16789 |
"default":function(vStart, |
16742 |
_renderFont:function(){var inp=this._inputElement; |
| 16790 |
vEnd){this._visualPropertyCheck(); |
16743 |
if(inp){var value=this.__font; |
| 16791 |
var el=this._inputElement; |
16744 |
value?value.renderElement(inp):qx.ui.core.Font.resetElement(inp); |
| 16792 |
el.selectionStart=vStart; |
16745 |
}}, |
| 16793 |
el.selectionEnd=vEnd; |
16746 |
_visualizeFocus:function(){this.base(arguments); |
| 16794 |
}})}, |
16747 |
if(!qx.event.handler.FocusHandler.mouseFocus&&this.getEnableElementFocus()){try{this._inputElement.focus(); |
| 16795 |
destruct:function(){if(this._inputElement){if(qx.core.Variant.isSet("qx.client", |
16748 |
}catch(ex){}}}, |
| 16796 |
"mshtml")){this._inputElement.onpropertychange=null; |
16749 |
_visualizeBlur:function(){this.base(arguments); |
| 16797 |
}else{this._inputElement.removeEventListener("input", |
16750 |
if(!qx.event.handler.FocusHandler.mouseFocus){try{this._inputElement.blur(); |
| 16798 |
this.__oninput, |
16751 |
}catch(ex){}}}, |
| 16799 |
false); |
16752 |
getComputedValue:function(){if(this._inputElement){return this._inputElement.value; |
| 16800 |
}}this._disposeFields("_inputElement", |
16753 |
}return this.getValue(); |
| 16801 |
"__font", |
|
|
| 16802 |
"__oninput"); |
| 16803 |
}}); |
| 16804 |
|
| 16805 |
|
| 16806 |
|
| 16807 |
|
| 16808 |
/* ID: qx.util.range.IRange */ |
| 16809 |
qx.Interface.define("qx.util.range.IRange", |
| 16810 |
{properties:{value:{}, |
| 16811 |
min:{}, |
| 16812 |
max:{}, |
| 16813 |
wrap:{}}, |
| 16814 |
members:{limit:function(value){return true; |
| 16815 |
}}}); |
| 16816 |
|
| 16817 |
|
| 16818 |
|
| 16819 |
|
| 16820 |
/* ID: qx.util.range.Range */ |
| 16821 |
qx.Class.define("qx.util.range.Range", |
| 16822 |
{extend:qx.core.Target, |
| 16823 |
implement:[qx.util.range.IRange], |
| 16824 |
events:{"change":"qx.event.type.Event"}, |
| 16825 |
properties:{value:{check:"!isNaN(value)&&value>=this.getMin()&&value<=this.getMax()", |
| 16826 |
nullable:true, |
| 16827 |
event:"change", |
| 16828 |
init:0}, |
| 16829 |
precision:{check:"Integer", |
| 16830 |
nullable:true, |
| 16831 |
event:"change", |
| 16832 |
init:0}, |
| 16833 |
min:{check:"Number", |
| 16834 |
apply:"_applyMin", |
| 16835 |
event:"change", |
| 16836 |
init:0}, |
| 16837 |
max:{check:"Number", |
| 16838 |
apply:"_applyMax", |
| 16839 |
event:"change", |
| 16840 |
init:100}, |
| 16841 |
wrap:{check:"Boolean", |
| 16842 |
init:false}}, |
| 16843 |
members:{_applyMax:function(value, |
| 16844 |
old){this.setValue(Math.min(this.getValue(), |
| 16845 |
value)); |
| 16846 |
}, |
16754 |
}, |
| 16847 |
_applyMin:function(value, |
16755 |
getInputElement:function(){return this._inputElement||null; |
| 16848 |
old){this.setValue(Math.max(this.getValue(), |
|
|
| 16849 |
value)); |
| 16850 |
}, |
16756 |
}, |
| 16851 |
limit:function(value){var precision=this.getPrecision(); |
16757 |
isValid:function(){var vValidator=this.getValidator(); |
| 16852 |
if(precision!=null)var mover=Math.pow(10, |
16758 |
return !vValidator||vValidator(this.getValue()); |
| 16853 |
precision); |
|
|
| 16854 |
if(this.getWrap()){if(precision!=null){var value=Math.round(value*mover)/mover; |
| 16855 |
} |
| 16856 |
if(value<this.getMin()){return (this.getMax()-(this.getMin()-value))+1; |
| 16857 |
} |
| 16858 |
if(value>this.getMax()){return (this.getMin()+(value-this.getMax()))-1; |
| 16859 |
}} |
| 16860 |
if(value<this.getMin()){return this.getMin(); |
| 16861 |
} |
| 16862 |
if(value>this.getMax()){return this.getMax(); |
| 16863 |
} |
| 16864 |
if(precision!=null){return Math.round(value*mover)/mover; |
| 16865 |
}else{return value; |
| 16866 |
}}}}); |
| 16867 |
|
| 16868 |
|
| 16869 |
|
| 16870 |
|
| 16871 |
/* ID: qx.ui.form.List */ |
| 16872 |
qx.Class.define("qx.ui.form.List", |
| 16873 |
{extend:qx.ui.layout.VerticalBoxLayout, |
| 16874 |
construct:function(){this.base(arguments); |
| 16875 |
this._manager=new qx.ui.selection.SelectionManager(this); |
| 16876 |
this.addEventListener("mouseover", |
| 16877 |
this._onmouseover); |
| 16878 |
this.addEventListener("mousedown", |
| 16879 |
this._onmousedown); |
| 16880 |
this.addEventListener("mouseup", |
| 16881 |
this._onmouseup); |
| 16882 |
this.addEventListener("click", |
| 16883 |
this._onclick); |
| 16884 |
this.addEventListener("dblclick", |
| 16885 |
this._ondblclick); |
| 16886 |
this.addEventListener("keydown", |
| 16887 |
this._onkeydown); |
| 16888 |
this.addEventListener("keypress", |
| 16889 |
this._onkeypress); |
| 16890 |
this.addEventListener("keyinput", |
| 16891 |
this._onkeyinput); |
| 16892 |
this.initOverflow(); |
| 16893 |
this.initTabIndex(); |
| 16894 |
}, |
16759 |
}, |
| 16895 |
properties:{appearance:{refine:true, |
16760 |
isComputedValid:function(){var vValidator=this.getValidator(); |
| 16896 |
init:"list"}, |
16761 |
return !vValidator||vValidator(this.getComputedValue()); |
| 16897 |
overflow:{refine:true, |
|
|
| 16898 |
init:"hidden"}, |
| 16899 |
tabIndex:{refine:true, |
| 16900 |
init:1}, |
| 16901 |
enableInlineFind:{check:"Boolean", |
| 16902 |
init:true}, |
| 16903 |
markLeadingItem:{check:"Boolean", |
| 16904 |
init:false}}, |
| 16905 |
members:{_pressedString:"", |
| 16906 |
getManager:function(){return this._manager; |
| 16907 |
}, |
16762 |
}, |
| 16908 |
getListItemTarget:function(vItem){while(vItem!=null&&vItem.getParent()!=this){vItem=vItem.getParent(); |
16763 |
_computePreferredInnerWidth:function(){return 120; |
| 16909 |
}return vItem; |
|
|
| 16910 |
}, |
16764 |
}, |
| 16911 |
getSelectedItem:function(){return this.getSelectedItems()[0]||null; |
16765 |
_computePreferredInnerHeight:function(){return 16; |
| 16912 |
}, |
16766 |
}, |
| 16913 |
getSelectedItems:function(){return this._manager.getSelectedItems(); |
16767 |
_ieFirstInputFix:qx.core.Variant.select("qx.client", |
|
|
16768 |
{"mshtml":function(){this._inValueProperty=true; |
| 16769 |
this._inputElement.value=this.getValue()===null?"":this.getValue(); |
| 16770 |
this._firstInputFixApplied=true; |
| 16771 |
delete this._inValueProperty; |
| 16914 |
}, |
16772 |
}, |
| 16915 |
_onmouseover:function(e){var vItem=this.getListItemTarget(e.getTarget()); |
16773 |
"default":null}), |
| 16916 |
if(vItem){this._manager.handleMouseOver(vItem, |
16774 |
_afterAppear:qx.core.Variant.select("qx.client", |
| 16917 |
e); |
16775 |
{"mshtml":function(){this.base(arguments); |
| 16918 |
}}, |
16776 |
if(!this._firstInputFixApplied&&this._inputElement){qx.client.Timer.once(this._ieFirstInputFix, |
| 16919 |
_onmousedown:function(e){var vItem=this.getListItemTarget(e.getTarget()); |
16777 |
this, |
| 16920 |
if(vItem){this._manager.handleMouseDown(vItem, |
16778 |
1); |
| 16921 |
e); |
|
|
| 16922 |
}}, |
16779 |
}}, |
| 16923 |
_onmouseup:function(e){var vItem=this.getListItemTarget(e.getTarget()); |
16780 |
"default":function(){this.base(arguments); |
| 16924 |
if(vItem){this._manager.handleMouseUp(vItem, |
16781 |
}}), |
| 16925 |
e); |
16782 |
_firstInputFixApplied:false, |
|
|
16783 |
_textOnFocus:null, |
| 16784 |
_oninputDom:qx.core.Variant.select("qx.client", |
| 16785 |
{"mshtml":function(e){if(!this._inValueProperty&&e.propertyName==="value"){this.createDispatchDataEvent("input", |
| 16786 |
this.getComputedValue()); |
| 16926 |
}}, |
16787 |
}}, |
| 16927 |
_onclick:function(e){var vItem=this.getListItemTarget(e.getTarget()); |
16788 |
"default":function(e){this.createDispatchDataEvent("input", |
| 16928 |
if(vItem){this._manager.handleClick(vItem, |
16789 |
this.getComputedValue()); |
| 16929 |
e); |
16790 |
}}), |
|
|
16791 |
_ontabfocus:function(){this.selectAll(); |
| 16792 |
}, |
| 16793 |
_onfocus:function(){this._textOnFocus=this.getComputedValue(); |
| 16794 |
}, |
| 16795 |
_onblur:function(){var vValue=this.getComputedValue().toString(); |
| 16796 |
if(this._textOnFocus!=vValue){this.setValue(vValue); |
| 16797 |
}if(this.getParent()!=null){this.setSelectionLength(0); |
| 16930 |
}}, |
16798 |
}}, |
| 16931 |
_ondblclick:function(e){var vItem=this.getListItemTarget(e.getTarget()); |
16799 |
_oninput:function(){if(!this.isLiveUpdate()){return; |
| 16932 |
if(vItem){this._manager.handleDblClick(vItem, |
16800 |
}var vValue=this.getComputedValue().toString(); |
| 16933 |
e); |
16801 |
this.setValue(vValue); |
|
|
16802 |
}, |
| 16803 |
_onkeydown:function(e){if(e.getKeyIdentifier()=="Backspace"&&this.getReadOnly()){e.preventDefault(); |
| 16934 |
}}, |
16804 |
}}, |
| 16935 |
_onkeydown:function(e){if(e.getKeyIdentifier()=="Enter"&&!e.isAltPressed()){var items=this.getSelectedItems(); |
16805 |
__getRange:qx.core.Variant.select("qx.client", |
| 16936 |
for(var i=0;i<items.length;i++){items[i].createDispatchEvent("action"); |
16806 |
{"mshtml":function(){this._visualPropertyCheck(); |
| 16937 |
}}}, |
16807 |
return this._inputElement.createTextRange(); |
| 16938 |
_onkeypress:function(e){this._manager.handleKeyPress(e); |
|
|
| 16939 |
}, |
16808 |
}, |
| 16940 |
_lastKeyPress:0, |
16809 |
"default":null}), |
| 16941 |
_onkeyinput:function(e){if(!this.getEnableInlineFind()){return; |
16810 |
__getSelectionRange:qx.core.Variant.select("qx.client", |
| 16942 |
}if(((new Date).valueOf()-this._lastKeyPress)>1000){this._pressedString=""; |
16811 |
{"mshtml":function(){this._visualPropertyCheck(); |
| 16943 |
}this._pressedString+=String.fromCharCode(e.getCharCode()); |
16812 |
return this.getTopLevelWidget().getDocumentElement().selection.createRange(); |
| 16944 |
var matchedItem=this.findString(this._pressedString, |
|
|
| 16945 |
null); |
| 16946 |
if(matchedItem){var oldVal=this._manager._getChangeValue(); |
| 16947 |
var oldFireChange=this._manager.getFireChange(); |
| 16948 |
this._manager.setFireChange(false); |
| 16949 |
this._manager._deselectAll(); |
| 16950 |
this._manager.setItemSelected(matchedItem, |
| 16951 |
true); |
| 16952 |
this._manager.setAnchorItem(matchedItem); |
| 16953 |
this._manager.setLeadItem(matchedItem); |
| 16954 |
matchedItem.scrollIntoView(); |
| 16955 |
this._manager.setFireChange(oldFireChange); |
| 16956 |
if(oldFireChange&&this._manager._hasChanged(oldVal)){this._manager._dispatchChange(); |
| 16957 |
}}this._lastKeyPress=(new Date).valueOf(); |
| 16958 |
e.preventDefault(); |
| 16959 |
}, |
16813 |
}, |
| 16960 |
_findItem:function(vUserValue, |
16814 |
"default":null}), |
| 16961 |
vStartIndex, |
16815 |
setSelectionStart:qx.core.Variant.select("qx.client", |
| 16962 |
vType){var vAllItems=this.getChildren(); |
16816 |
{"mshtml":function(vStart){this._visualPropertyCheck(); |
| 16963 |
if(vStartIndex==null){vStartIndex=vAllItems.indexOf(this.getSelectedItem()); |
16817 |
var vText=this._inputElement.value; |
| 16964 |
if(vStartIndex==-1){vStartIndex=0; |
16818 |
var i=0; |
| 16965 |
}}var methodName="matches"+vType; |
16819 |
while(i<vStart){i=vText.indexOf("\r\n", |
| 16966 |
for(var i=vStartIndex;i<vAllItems.length;i++){if(vAllItems[i][methodName](vUserValue)){return vAllItems[i]; |
16820 |
i); |
| 16967 |
}}for(var i=0;i<vStartIndex;i++){if(vAllItems[i][methodName](vUserValue)){return vAllItems[i]; |
16821 |
if(i==-1){break; |
| 16968 |
}}return null; |
16822 |
}vStart--; |
|
|
16823 |
i++; |
| 16824 |
}var vRange=this.__getRange(); |
| 16825 |
vRange.collapse(); |
| 16826 |
vRange.move("character", |
| 16827 |
vStart); |
| 16828 |
vRange.select(); |
| 16969 |
}, |
16829 |
}, |
| 16970 |
findString:function(vText, |
16830 |
"default":function(vStart){this._visualPropertyCheck(); |
| 16971 |
vStartIndex){return this._findItem(vText, |
16831 |
this._inputElement.selectionStart=vStart; |
| 16972 |
vStartIndex||0, |
16832 |
}}), |
| 16973 |
"String"); |
16833 |
getSelectionStart:qx.core.Variant.select("qx.client", |
|
|
16834 |
{"mshtml":function(){this._visualPropertyCheck(); |
| 16835 |
var vSelectionRange=this.__getSelectionRange(); |
| 16836 |
if(!this._inputElement.contains(vSelectionRange.parentElement())){return -1; |
| 16837 |
}var vRange=this.__getRange(); |
| 16838 |
var len=this._inputElement.value.length; |
| 16839 |
vRange.moveToBookmark(vSelectionRange.getBookmark()); |
| 16840 |
vRange.moveEnd('character', |
| 16841 |
len); |
| 16842 |
return len-vRange.text.length; |
| 16974 |
}, |
16843 |
}, |
| 16975 |
findStringExact:function(vText, |
16844 |
"default":function(){this._visualPropertyCheck(); |
| 16976 |
vStartIndex){return this._findItem(vText, |
16845 |
return this._inputElement.selectionStart; |
| 16977 |
vStartIndex||0, |
16846 |
}}), |
| 16978 |
"StringExact"); |
16847 |
setSelectionLength:qx.core.Variant.select("qx.client", |
|
|
16848 |
{"mshtml":function(vLength){this._visualPropertyCheck(); |
| 16849 |
var vSelectionRange=this.__getSelectionRange(); |
| 16850 |
if(!this._inputElement.contains(vSelectionRange.parentElement())){return; |
| 16851 |
}vSelectionRange.collapse(); |
| 16852 |
vSelectionRange.moveEnd("character", |
| 16853 |
vLength); |
| 16854 |
vSelectionRange.select(); |
| 16979 |
}, |
16855 |
}, |
| 16980 |
findValue:function(vText, |
16856 |
"default":function(vLength){this._visualPropertyCheck(); |
| 16981 |
vStartIndex){return this._findItem(vText, |
16857 |
var el=this._inputElement; |
| 16982 |
vStartIndex||0, |
16858 |
if(qx.util.Validation.isValidString(el.value)&&this.getVisibility()){el.selectionEnd=el.selectionStart+vLength; |
| 16983 |
"Value"); |
16859 |
}}}), |
|
|
16860 |
getSelectionLength:qx.core.Variant.select("qx.client", |
| 16861 |
{"mshtml":function(){this._visualPropertyCheck(); |
| 16862 |
var vSelectionRange=this.__getSelectionRange(); |
| 16863 |
if(!this._inputElement.contains(vSelectionRange.parentElement())){return 0; |
| 16864 |
}return vSelectionRange.text.length; |
| 16984 |
}, |
16865 |
}, |
| 16985 |
findValueExact:function(vText, |
16866 |
"default":function(){this._visualPropertyCheck(); |
| 16986 |
vStartIndex){return this._findItem(vText, |
16867 |
var el=this._inputElement; |
| 16987 |
vStartIndex||0, |
16868 |
return el.selectionEnd-el.selectionStart; |
| 16988 |
"ValueExact"); |
16869 |
}}), |
|
|
16870 |
setSelectionText:qx.core.Variant.select("qx.client", |
| 16871 |
{"mshtml":function(vText){this._visualPropertyCheck(); |
| 16872 |
var vStart=this.getSelectionStart(); |
| 16873 |
var vSelectionRange=this.__getSelectionRange(); |
| 16874 |
if(!this._inputElement.contains(vSelectionRange.parentElement())){return; |
| 16875 |
}vSelectionRange.text=vText; |
| 16876 |
this.setValue(this._inputElement.value); |
| 16877 |
this.setSelectionStart(vStart); |
| 16878 |
this.setSelectionLength(vText.length); |
| 16989 |
}, |
16879 |
}, |
| 16990 |
_sortItemsCompare:function(a, |
16880 |
"default":function(vText){this._visualPropertyCheck(); |
| 16991 |
b){return a.key<b.key?-1:a.key==b.key?0:1; |
16881 |
var el=this._inputElement; |
|
|
16882 |
var vOldText=el.value; |
| 16883 |
var vStart=el.selectionStart; |
| 16884 |
var vOldTextBefore=vOldText.substr(0, |
| 16885 |
vStart); |
| 16886 |
var vOldTextAfter=vOldText.substr(el.selectionEnd); |
| 16887 |
var vValue=el.value=vOldTextBefore+vText+vOldTextAfter; |
| 16888 |
el.selectionStart=vStart; |
| 16889 |
el.selectionEnd=vStart+vText.length; |
| 16890 |
this.setValue(vValue); |
| 16891 |
}}), |
| 16892 |
getSelectionText:qx.core.Variant.select("qx.client", |
| 16893 |
{"mshtml":function(){this._visualPropertyCheck(); |
| 16894 |
var vSelectionRange=this.__getSelectionRange(); |
| 16895 |
if(!this._inputElement.contains(vSelectionRange.parentElement())){return ""; |
| 16896 |
}return vSelectionRange.text; |
| 16992 |
}, |
16897 |
}, |
| 16993 |
sortItemsByString:function(vReverse){var sortitems=[]; |
16898 |
"default":function(){this._visualPropertyCheck(); |
| 16994 |
var items=this.getChildren(); |
16899 |
return this._inputElement.value.substr(this.getSelectionStart(), |
| 16995 |
for(var i=0, |
16900 |
this.getSelectionLength()); |
| 16996 |
l=items.length;i<l;i++){sortitems[i]={key:items[i].getLabel(), |
16901 |
}}), |
| 16997 |
item:items[i]}; |
16902 |
selectAll:function(){this._visualPropertyCheck(); |
| 16998 |
}sortitems.sort(this._sortItemsCompare); |
16903 |
if(this.getValue()!=null){this.setSelectionStart(0); |
| 16999 |
if(vReverse){sortitems.reverse(); |
16904 |
this.setSelectionLength(this._inputElement.value.length); |
| 17000 |
} |
16905 |
}this._inputElement.select(); |
| 17001 |
for(var i=0;i<l;i++){this.addAt(sortitems[i].item, |
16906 |
this._inputElement.focus(); |
| 17002 |
i); |
16907 |
}, |
| 17003 |
}}, |
16908 |
selectFromTo:qx.core.Variant.select("qx.client", |
| 17004 |
sortItemsByValue:function(vReverse){var sortitems=[]; |
16909 |
{"mshtml":function(vStart, |
| 17005 |
var items=this.getChildren(); |
16910 |
vEnd){this._visualPropertyCheck(); |
| 17006 |
for(var i=0, |
16911 |
this.setSelectionStart(vStart); |
| 17007 |
l=items.length;i<l;i++){sortitems[i]={key:items[i].getValue(), |
16912 |
this.setSelectionLength(vEnd-vStart); |
| 17008 |
item:items[i]}; |
16913 |
}, |
| 17009 |
}sortitems.sort(this._sortItemsCompare); |
16914 |
"default":function(vStart, |
| 17010 |
if(vReverse){sortitems.reverse(); |
16915 |
vEnd){this._visualPropertyCheck(); |
| 17011 |
} |
16916 |
var el=this._inputElement; |
| 17012 |
for(var i=0;i<l;i++){this.addAt(sortitems[i].item, |
16917 |
el.selectionStart=vStart; |
| 17013 |
i); |
16918 |
el.selectionEnd=vEnd; |
| 17014 |
}}}, |
16919 |
}})}, |
| 17015 |
destruct:function(){this._disposeObjects("_manager"); |
16920 |
destruct:function(){if(this._inputElement){if(qx.core.Variant.isSet("qx.client", |
|
|
16921 |
"mshtml")){this._inputElement.onpropertychange=null; |
| 16922 |
}else{this._inputElement.removeEventListener("input", |
| 16923 |
this.__oninput, |
| 16924 |
false); |
| 16925 |
}}this._disposeFields("_inputElement", |
| 16926 |
"__font", |
| 16927 |
"__oninput"); |
| 17016 |
}}); |
16928 |
}}); |
| 17017 |
|
16929 |
|
| 17018 |
|
16930 |
|
|
Lines 17070-17075
Link Here
|
| 17070 |
|
16982 |
|
| 17071 |
|
16983 |
|
| 17072 |
|
16984 |
|
|
|
16985 |
/* ID: qx.ui.form.PasswordField */ |
| 16986 |
qx.Class.define("qx.ui.form.PasswordField", |
| 16987 |
{extend:qx.ui.form.TextField, |
| 16988 |
members:{_inputType:"password"}}); |
| 16989 |
|
| 16990 |
|
| 16991 |
|
| 16992 |
|
| 17073 |
/* ID: qx.ui.form.RadioButton */ |
16993 |
/* ID: qx.ui.form.RadioButton */ |
| 17074 |
qx.Class.define("qx.ui.form.RadioButton", |
16994 |
qx.Class.define("qx.ui.form.RadioButton", |
| 17075 |
{extend:qx.ui.form.CheckBox, |
16995 |
{extend:qx.ui.form.CheckBox, |
|
Lines 17107-17454
Link Here
|
| 17107 |
if(this.getManager()){this.getManager().setName(value); |
17027 |
if(this.getManager()){this.getManager().setName(value); |
| 17108 |
}}, |
17028 |
}}, |
| 17109 |
_applyValue:function(value, |
17029 |
_applyValue:function(value, |
| 17110 |
old){if(this.isCreated()&&this._iconObject){this._iconObject.setValue(value); |
17030 |
old){if(this.isCreated()&&this._iconObject){this._iconObject.setValue(value); |
| 17111 |
}}, |
|
|
| 17112 |
_onkeydown:function(e){if(e.getKeyIdentifier()=="Enter"&&!e.isAltPressed()){this.setChecked(true); |
| 17113 |
}}, |
| 17114 |
_onkeypress:function(e){switch(e.getKeyIdentifier()){case "Left":case "Up":qx.event.handler.FocusHandler.mouseFocus=false; |
| 17115 |
qx.event.handler.FocusHandler.mouseFocus=false; |
| 17116 |
return this.getManager()?this.getManager().selectPrevious(this):true; |
| 17117 |
case "Right":case "Down":qx.event.handler.FocusHandler.mouseFocus=false; |
| 17118 |
return this.getManager()?this.getManager().selectNext(this):true; |
| 17119 |
}}, |
| 17120 |
_onclick:function(e){this.setChecked(true); |
| 17121 |
}, |
| 17122 |
_onkeyup:function(e){if(e.getKeyIdentifier()=="Space"){this.setChecked(true); |
| 17123 |
}}}}); |
| 17124 |
|
| 17125 |
|
| 17126 |
|
| 17127 |
|
| 17128 |
/* ID: qx.ui.form.TextArea */ |
| 17129 |
qx.Class.define("qx.ui.form.TextArea", |
| 17130 |
{extend:qx.ui.form.TextField, |
| 17131 |
properties:{appearance:{refine:true, |
| 17132 |
init:"text-area"}, |
| 17133 |
allowStretchY:{refine:true, |
| 17134 |
init:true}, |
| 17135 |
spellCheck:{refine:true, |
| 17136 |
init:true}, |
| 17137 |
wrap:{check:"Boolean", |
| 17138 |
init:true, |
| 17139 |
apply:"_applyWrap"}}, |
| 17140 |
members:{_inputTag:"textarea", |
| 17141 |
_inputType:null, |
| 17142 |
_inputOverflow:"auto", |
| 17143 |
_applyElement:function(value, |
| 17144 |
old){this.base(arguments, |
| 17145 |
value, |
| 17146 |
old); |
| 17147 |
this._styleWrap(); |
| 17148 |
}, |
| 17149 |
_applyWrap:function(value, |
| 17150 |
old){this._styleWrap(); |
| 17151 |
}, |
| 17152 |
_styleWrap:qx.core.Variant.select("qx.client", |
| 17153 |
{"mshtml":function(){if(this._inputElement){this._inputElement.wrap=this.getWrap()?"soft":"off"; |
| 17154 |
}}, |
17031 |
}}, |
| 17155 |
"gecko":function(){if(this._inputElement){var wrapValue=this.getWrap()?"soft":"off"; |
17032 |
_onkeydown:function(e){if(e.getKeyIdentifier()=="Enter"&&!e.isAltPressed()){this.setChecked(true); |
| 17156 |
var styleValue=this.getWrap()?"":"auto"; |
|
|
| 17157 |
this._inputElement.setAttribute('wrap', |
| 17158 |
wrapValue); |
| 17159 |
this._inputElement.style.overflow=styleValue; |
| 17160 |
}}, |
17033 |
}}, |
| 17161 |
"default":function(){if(this._inputElement){this._inputElement.style.whiteSpace=this.getWrap()?"normal":"nowrap"; |
17034 |
_onkeypress:function(e){switch(e.getKeyIdentifier()){case "Left":case "Up":qx.event.handler.FocusHandler.mouseFocus=false; |
| 17162 |
}}}), |
17035 |
qx.event.handler.FocusHandler.mouseFocus=false; |
| 17163 |
_computePreferredInnerHeight:function(){return 60; |
17036 |
return this.getManager()?this.getManager().selectPrevious(this):true; |
| 17164 |
}}}); |
17037 |
case "Right":case "Down":qx.event.handler.FocusHandler.mouseFocus=false; |
| 17165 |
|
17038 |
return this.getManager()?this.getManager().selectNext(this):true; |
| 17166 |
|
17039 |
}}, |
| 17167 |
|
17040 |
_onclick:function(e){this.setChecked(true); |
| 17168 |
|
17041 |
}, |
| 17169 |
/* ID: qx.ui.form.PasswordField */ |
17042 |
_onkeyup:function(e){if(e.getKeyIdentifier()=="Space"){this.setChecked(true); |
| 17170 |
qx.Class.define("qx.ui.form.PasswordField", |
17043 |
}}}}); |
| 17171 |
{extend:qx.ui.form.TextField, |
|
|
| 17172 |
members:{_inputType:"password"}}); |
| 17173 |
|
17044 |
|
| 17174 |
|
17045 |
|
| 17175 |
|
17046 |
|
| 17176 |
|
17047 |
|
| 17177 |
/* ID: qx.ui.form.ComboBox */ |
17048 |
/* ID: qx.ui.form.Spinner */ |
| 17178 |
qx.Class.define("qx.ui.form.ComboBox", |
17049 |
qx.Class.define("qx.ui.form.Spinner", |
| 17179 |
{extend:qx.ui.layout.HorizontalBoxLayout, |
17050 |
{extend:qx.ui.layout.HorizontalBoxLayout, |
| 17180 |
construct:function(){this.base(arguments); |
17051 |
construct:function(vMin, |
| 17181 |
var l=this._list=new qx.ui.form.List; |
17052 |
vValue, |
| 17182 |
l.setAppearance("combo-box-list"); |
17053 |
vMax){this.base(arguments); |
| 17183 |
l.setTabIndex(-1); |
17054 |
if(qx.core.Variant.isSet("qx.client", |
| 17184 |
l.setEdge(0); |
17055 |
"mshtml")){this.setStyleProperty("fontSize", |
| 17185 |
var m=this._manager=this._list.getManager(); |
17056 |
"0px"); |
| 17186 |
m.setMultiSelection(false); |
17057 |
}this._textfield=new qx.ui.form.TextField; |
| 17187 |
m.setDragSelection(false); |
17058 |
this._textfield.setBorder(null); |
| 17188 |
var p=this._popup=new qx.ui.popup.Popup; |
17059 |
this._textfield.setWidth("1*"); |
| 17189 |
p.setAppearance("combo-box-popup"); |
17060 |
this._textfield.setAllowStretchY(true); |
| 17190 |
p.setRestrictToPageLeft(-100000); |
17061 |
this._textfield.setHeight(null); |
| 17191 |
p.setRestrictToPageRight(-100000); |
17062 |
this._textfield.setLiveUpdate(true); |
| 17192 |
p.setAutoHide(false); |
17063 |
this._textfield.setVerticalAlign("middle"); |
| 17193 |
p.setHeight("auto"); |
17064 |
this._textfield.setAppearance("spinner-text-field"); |
| 17194 |
p.add(l); |
17065 |
this.add(this._textfield); |
| 17195 |
var f=this._field=new qx.ui.form.TextField; |
17066 |
this._buttonlayout=new qx.ui.layout.VerticalBoxLayout; |
| 17196 |
f.setAppearance("combo-box-text-field"); |
17067 |
this._buttonlayout.setWidth("auto"); |
| 17197 |
f.setTabIndex(-1); |
17068 |
this.add(this._buttonlayout); |
| 17198 |
f.setWidth("1*"); |
17069 |
this._upbutton=new qx.ui.basic.Image; |
| 17199 |
f.setAllowStretchY(true); |
17070 |
this._upbutton.setAppearance("spinner-button-up"); |
| 17200 |
f.setHeight(null); |
17071 |
this._upbutton.setHeight("1*"); |
| 17201 |
this.add(f); |
17072 |
this._buttonlayout.add(this._upbutton); |
| 17202 |
var b=this._button=new qx.ui.basic.Atom; |
17073 |
this._downbutton=new qx.ui.basic.Image; |
| 17203 |
b.setAppearance("combo-box-button"); |
17074 |
this._downbutton.setAppearance("spinner-button-down"); |
| 17204 |
b.setAllowStretchY(true); |
17075 |
this._downbutton.setHeight("1*"); |
| 17205 |
b.setTabIndex(-1); |
17076 |
this._buttonlayout.add(this._downbutton); |
| 17206 |
b.setHeight(null); |
17077 |
this._timer=new qx.client.Timer(this.getInterval()); |
| 17207 |
this.add(b); |
17078 |
this.setManager(new qx.util.range.Range()); |
| 17208 |
this.addEventListener("mousedown", |
17079 |
this.initWrap(); |
| 17209 |
this._onmousedown); |
|
|
| 17210 |
this.addEventListener("mouseup", |
| 17211 |
this._onmouseup); |
| 17212 |
this.addEventListener("click", |
| 17213 |
this._onclick); |
| 17214 |
this.addEventListener("mouseover", |
| 17215 |
this._onmouseover); |
| 17216 |
this.addEventListener("mousewheel", |
| 17217 |
this._onmousewheel); |
| 17218 |
this.addEventListener("keydown", |
| 17219 |
this._onkeydown); |
| 17220 |
this.addEventListener("keypress", |
17080 |
this.addEventListener("keypress", |
| 17221 |
this._onkeypress); |
17081 |
this._onkeypress, |
| 17222 |
this.addEventListener("keyinput", |
|
|
| 17223 |
this._onkeyinput); |
| 17224 |
this.addEventListener("beforeDisappear", |
| 17225 |
this._onbeforedisappear); |
| 17226 |
this._popup.addEventListener("appear", |
| 17227 |
this._onpopupappear, |
| 17228 |
this); |
17082 |
this); |
| 17229 |
this._field.addEventListener("input", |
17083 |
this.addEventListener("keydown", |
|
|
17084 |
this._onkeydown, |
| 17085 |
this); |
| 17086 |
this.addEventListener("keyup", |
| 17087 |
this._onkeyup, |
| 17088 |
this); |
| 17089 |
this.addEventListener("mousewheel", |
| 17090 |
this._onmousewheel, |
| 17091 |
this); |
| 17092 |
this._textfield.addEventListener("changeValue", |
| 17093 |
this._ontextchange, |
| 17094 |
this); |
| 17095 |
this._textfield.addEventListener("input", |
| 17230 |
this._oninput, |
17096 |
this._oninput, |
| 17231 |
this); |
17097 |
this); |
| 17232 |
qx.locale.Manager.getInstance().addEventListener("changeLocale", |
17098 |
this._textfield.addEventListener("blur", |
| 17233 |
this._onlocalechange, |
17099 |
this._onblur, |
|
|
17100 |
this); |
| 17101 |
this._upbutton.addEventListener("mousedown", |
| 17102 |
this._onmousedown, |
| 17103 |
this); |
| 17104 |
this._downbutton.addEventListener("mousedown", |
| 17105 |
this._onmousedown, |
| 17106 |
this); |
| 17107 |
this._timer.addEventListener("interval", |
| 17108 |
this._oninterval, |
| 17109 |
this); |
| 17110 |
if(vMin!=null){this.setMin(vMin); |
| 17111 |
} |
| 17112 |
if(vMax!=null){this.setMax(vMax); |
| 17113 |
} |
| 17114 |
if(vValue!=null){this.setValue(vValue); |
| 17115 |
}this._checkValue=this.__checkValue; |
| 17116 |
this._numberFormat=null; |
| 17117 |
this.initWidth(); |
| 17118 |
this.initHeight(); |
| 17119 |
this._last_value=""; |
| 17120 |
}, |
| 17121 |
events:{"change":"qx.event.type.DataEvent"}, |
| 17122 |
properties:{appearance:{refine:true, |
| 17123 |
init:"spinner"}, |
| 17124 |
width:{refine:true, |
| 17125 |
init:60}, |
| 17126 |
height:{refine:true, |
| 17127 |
init:22}, |
| 17128 |
incrementAmount:{check:"Number", |
| 17129 |
init:1, |
| 17130 |
apply:"_applyIncrementAmount"}, |
| 17131 |
wheelIncrementAmount:{check:"Number", |
| 17132 |
init:1}, |
| 17133 |
pageIncrementAmount:{check:"Number", |
| 17134 |
init:10}, |
| 17135 |
interval:{check:"Integer", |
| 17136 |
init:100}, |
| 17137 |
firstInterval:{check:"Integer", |
| 17138 |
init:500}, |
| 17139 |
minTimer:{check:"Integer", |
| 17140 |
init:20}, |
| 17141 |
timerDecrease:{check:"Integer", |
| 17142 |
init:2}, |
| 17143 |
amountGrowth:{check:"Number", |
| 17144 |
init:1.01}, |
| 17145 |
wrap:{check:"Boolean", |
| 17146 |
init:false, |
| 17147 |
apply:"_applyWrap"}, |
| 17148 |
editable:{check:"Boolean", |
| 17149 |
init:true, |
| 17150 |
apply:"_applyEditable"}, |
| 17151 |
manager:{check:"qx.util.range.IRange", |
| 17152 |
apply:"_applyManager", |
| 17153 |
dispose:true}, |
| 17154 |
checkValueFunction:{apply:"_applyCheckValueFunction"}, |
| 17155 |
numberFormat:{check:"qx.util.format.NumberFormat", |
| 17156 |
apply:"_applyNumberFormat"}, |
| 17157 |
selectTextOnInteract:{check:"Boolean", |
| 17158 |
init:true}}, |
| 17159 |
members:{_applyIncrementAmount:function(value, |
| 17160 |
old){this._computedIncrementAmount=value; |
| 17161 |
}, |
| 17162 |
_applyEditable:function(value, |
| 17163 |
old){if(this._textfield){this._textfield.setReadOnly(!value); |
| 17164 |
}}, |
| 17165 |
_applyWrap:function(value, |
| 17166 |
old){this.getManager().setWrap(value); |
| 17167 |
this._onchange(); |
| 17168 |
}, |
| 17169 |
_applyManager:function(value, |
| 17170 |
old){if(old){old.removeEventListener("change", |
| 17171 |
this._onchange, |
| 17172 |
this); |
| 17173 |
} |
| 17174 |
if(value){value.addEventListener("change", |
| 17175 |
this._onchange, |
| 17176 |
this); |
| 17177 |
}this._onchange(); |
| 17178 |
}, |
| 17179 |
_applyCheckValueFunction:function(value, |
| 17180 |
old){this._checkValue=value; |
| 17181 |
}, |
| 17182 |
_applyNumberFormat:function(value, |
| 17183 |
old){this._numberFormat=value; |
| 17184 |
this.getManager().setPrecision(value.getMaximumFractionDigits()); |
| 17185 |
this._onchange(); |
| 17186 |
}, |
| 17187 |
_computePreferredInnerWidth:function(){return 50; |
| 17188 |
}, |
| 17189 |
_computePreferredInnerHeight:function(){return 14; |
| 17190 |
}, |
| 17191 |
_onkeypress:function(e){var vIdentifier=e.getKeyIdentifier(); |
| 17192 |
if(vIdentifier=="Enter"&&!e.isAltPressed()){this._checkValue(true, |
| 17193 |
false); |
| 17194 |
if(this.getSelectTextOnInteract()){this._textfield.selectAll(); |
| 17195 |
}}else{switch(vIdentifier){case "Up":case "Down":case "Left":case "Right":case "Shift":case "Control":case "Alt":case "Escape":case "Delete":case "Backspace":case "Insert":case "Home":case "End":case "PageUp":case "PageDown":case "NumLock":case "Tab":break; |
| 17196 |
default:if((vIdentifier>="0"&&vIdentifier<="9")||(vIdentifier=='-')){return; |
| 17197 |
} |
| 17198 |
if(this._numberFormat){var locale=this._numberFormat._locale; |
| 17199 |
if((vIdentifier==qx.locale.Number.getGroupSeparator(locale))||(vIdentifier==qx.locale.Number.getDecimalSeparator(locale)))return; |
| 17200 |
}if(e.getModifiers()==0){e.preventDefault(); |
| 17201 |
}}}}, |
| 17202 |
_onkeydown:function(e){var vIdentifier=e.getKeyIdentifier(); |
| 17203 |
if(this._intervalIncrease==null){switch(vIdentifier){case "Up":case "Down":this._intervalIncrease=vIdentifier=="Up"; |
| 17204 |
this._intervalMode="single"; |
| 17205 |
this._resetIncrements(); |
| 17206 |
this._checkValue(true, |
| 17207 |
false); |
| 17208 |
this._increment(); |
| 17209 |
this._timer.startWith(this.getFirstInterval()); |
| 17210 |
break; |
| 17211 |
case "PageUp":case "PageDown":this._intervalIncrease=vIdentifier=="PageUp"; |
| 17212 |
this._intervalMode="page"; |
| 17213 |
this._resetIncrements(); |
| 17214 |
this._checkValue(true, |
| 17215 |
false); |
| 17216 |
this._pageIncrement(); |
| 17217 |
this._timer.startWith(this.getFirstInterval()); |
| 17218 |
break; |
| 17219 |
}}}, |
| 17220 |
_onkeyup:function(e){if(this._intervalIncrease!=null){switch(e.getKeyIdentifier()){case "Up":case "Down":case "PageUp":case "PageDown":this._timer.stop(); |
| 17221 |
this._intervalIncrease=null; |
| 17222 |
this._intervalMode=null; |
| 17223 |
}}}, |
| 17224 |
_onmousedown:function(e){if(!e.isLeftButtonPressed()){return; |
| 17225 |
}this._checkValue(true); |
| 17226 |
var vButton=e.getCurrentTarget(); |
| 17227 |
vButton.addState("pressed"); |
| 17228 |
vButton.addEventListener("mouseup", |
| 17229 |
this._onmouseup, |
| 17234 |
this); |
17230 |
this); |
| 17235 |
var vDoc=qx.ui.core.ClientDocument.getInstance(); |
17231 |
vButton.addEventListener("mouseout", |
| 17236 |
vDoc.addEventListener("windowblur", |
17232 |
this._onmouseup, |
| 17237 |
this._testClosePopup, |
|
|
| 17238 |
this); |
17233 |
this); |
| 17239 |
this.remapChildrenHandlingTo(l); |
17234 |
this._intervalIncrease=vButton==this._upbutton; |
| 17240 |
this.initEditable(); |
17235 |
this._resetIncrements(); |
| 17241 |
this.initTabIndex(); |
17236 |
this._increment(); |
| 17242 |
this.initWidth(); |
17237 |
if(this.getSelectTextOnInteract()){this._textfield.selectAll(); |
| 17243 |
this.initHeight(); |
17238 |
}this._timer.setInterval(this.getFirstInterval()); |
| 17244 |
this.initMinWidth(); |
17239 |
this._timer.start(); |
| 17245 |
}, |
|
|
| 17246 |
events:{"beforeInitialOpen":"qx.event.type.Event"}, |
| 17247 |
properties:{appearance:{refine:true, |
| 17248 |
init:"combo-box"}, |
| 17249 |
allowStretchY:{refine:true, |
| 17250 |
init:false}, |
| 17251 |
width:{refine:true, |
| 17252 |
init:120}, |
| 17253 |
height:{refine:true, |
| 17254 |
init:"auto"}, |
| 17255 |
minWidth:{refine:true, |
| 17256 |
init:40}, |
| 17257 |
tabIndex:{refine:true, |
| 17258 |
init:1}, |
| 17259 |
editable:{check:"Boolean", |
| 17260 |
apply:"_applyEditable", |
| 17261 |
event:"changeEditable", |
| 17262 |
init:false}, |
| 17263 |
selected:{check:"qx.ui.form.ListItem", |
| 17264 |
nullable:true, |
| 17265 |
apply:"_applySelected", |
| 17266 |
event:"changeSelected"}, |
| 17267 |
value:{check:"String", |
| 17268 |
nullable:true, |
| 17269 |
apply:"_applyValue", |
| 17270 |
event:"changeValue"}, |
| 17271 |
pagingInterval:{check:"Integer", |
| 17272 |
init:10}}, |
| 17273 |
members:{getManager:function(){return this._manager; |
| 17274 |
}, |
17240 |
}, |
| 17275 |
getPopup:function(){return this._popup; |
17241 |
_onmouseup:function(e){var vButton=e.getCurrentTarget(); |
|
|
17242 |
vButton.removeState("pressed"); |
| 17243 |
vButton.removeEventListener("mouseup", |
| 17244 |
this._onmouseup, |
| 17245 |
this); |
| 17246 |
vButton.removeEventListener("mouseout", |
| 17247 |
this._onmouseup, |
| 17248 |
this); |
| 17249 |
if(this.getSelectTextOnInteract()){this._textfield.selectAll(); |
| 17250 |
}this._textfield.setFocused(true); |
| 17251 |
this._timer.stop(); |
| 17252 |
this._intervalIncrease=null; |
| 17276 |
}, |
17253 |
}, |
| 17277 |
getList:function(){return this._list; |
17254 |
_onmousewheel:function(e){this._checkValue(true); |
|
|
17255 |
if(this.getManager().incrementValue){this.getManager().incrementValue(this.getWheelIncrementAmount()*e.getWheelDelta()); |
| 17256 |
}else{var value=this.getManager().getValue()+(this.getWheelIncrementAmount()*e.getWheelDelta()); |
| 17257 |
value=this.getManager().limit(value); |
| 17258 |
this.getManager().setValue(value); |
| 17259 |
}this._textfield.selectAll(); |
| 17278 |
}, |
17260 |
}, |
| 17279 |
getField:function(){return this._field; |
17261 |
_ontextchange:function(e){this._last_value=e.getOldValue(); |
| 17280 |
}, |
17262 |
}, |
| 17281 |
getButton:function(){return this._button; |
17263 |
_oninput:function(e){this._checkValue(true, |
|
|
17264 |
true); |
| 17282 |
}, |
17265 |
}, |
| 17283 |
_applySelected:function(value, |
17266 |
_onchange:function(e){var vValue=this.getManager().getValue(); |
| 17284 |
old){this._fromSelected=true; |
17267 |
if(this._numberFormat){this._textfield.setValue(this._numberFormat.format(vValue)); |
| 17285 |
if(!this._fromValue){this.setValue(value?value.getLabel().toString():""); |
17268 |
}else{this._textfield.setValue(String(vValue)); |
| 17286 |
}this._manager.setLeadItem(value); |
17269 |
} |
| 17287 |
this._manager.setAnchorItem(value); |
17270 |
if(vValue==this.getMin()&&!this.getWrap()){this._downbutton.removeState("pressed"); |
| 17288 |
if(value){this._manager.setSelectedItem(value); |
17271 |
this._downbutton.setEnabled(false); |
| 17289 |
}else{this._manager.deselectAll(); |
17272 |
this._timer.stop(); |
| 17290 |
}delete this._fromSelected; |
17273 |
}else{this._downbutton.resetEnabled(); |
|
|
17274 |
} |
| 17275 |
if(vValue==this.getMax()&&!this.getWrap()){this._upbutton.removeState("pressed"); |
| 17276 |
this._upbutton.setEnabled(false); |
| 17277 |
this._timer.stop(); |
| 17278 |
}else{this._upbutton.resetEnabled(); |
| 17279 |
}this.createDispatchDataEvent("change", |
| 17280 |
vValue); |
| 17291 |
}, |
17281 |
}, |
| 17292 |
_applyValue:function(value, |
17282 |
_onblur:function(e){this._checkValue(false); |
| 17293 |
old){this._fromValue=true; |
|
|
| 17294 |
if(!this._fromInput){if(this._field.getValue()==value){this._field.setValue(null); |
| 17295 |
}this._field.setValue(value); |
| 17296 |
}delete this._fromValue; |
| 17297 |
}, |
17283 |
}, |
| 17298 |
_applyEditable:function(value, |
17284 |
setValue:function(nValue){this.getManager().setValue(this.getManager().limit(nValue)); |
| 17299 |
old){var f=this._field; |
|
|
| 17300 |
f.setReadOnly(!value); |
| 17301 |
f.setCursor(value?null:"default"); |
| 17302 |
f.setSelectable(value); |
| 17303 |
}, |
17285 |
}, |
| 17304 |
_oldSelected:null, |
17286 |
getValue:function(){this._checkValue(true); |
| 17305 |
_openPopup:function(){var p=this._popup; |
17287 |
return this.getManager().getValue(); |
| 17306 |
var el=this.getElement(); |
|
|
| 17307 |
if(!p.isCreated()){this.createDispatchEvent("beforeInitialOpen"); |
| 17308 |
} |
| 17309 |
if(this._list.getChildrenLength()==0){return; |
| 17310 |
}p.positionRelativeTo(el, |
| 17311 |
1, |
| 17312 |
qx.html.Dimension.getBoxHeight(el)); |
| 17313 |
p.setWidth(this.getBoxWidth()-2); |
| 17314 |
p.setParent(this.getTopLevelWidget()); |
| 17315 |
p.show(); |
| 17316 |
this._oldSelected=this.getSelected(); |
| 17317 |
this.setCapture(true); |
| 17318 |
}, |
17288 |
}, |
| 17319 |
_closePopup:function(){this._popup.hide(); |
17289 |
resetValue:function(){this.getManager().resetValue(); |
| 17320 |
this.setCapture(false); |
|
|
| 17321 |
}, |
17290 |
}, |
| 17322 |
_testClosePopup:function(){if(this._popup.isSeeable()){this._closePopup(); |
17291 |
setMax:function(vMax){return this.getManager().setMax(vMax); |
| 17323 |
}}, |
|
|
| 17324 |
_togglePopup:function(){this._popup.isSeeable()?this._closePopup():this._openPopup(); |
| 17325 |
}, |
17292 |
}, |
| 17326 |
_onpopupappear:function(e){var vSelItem=this.getSelected(); |
17293 |
getMax:function(){return this.getManager().getMax(); |
| 17327 |
if(vSelItem){vSelItem.scrollIntoView(); |
|
|
| 17328 |
}}, |
| 17329 |
_oninput:function(e){this._fromInput=true; |
| 17330 |
this.setValue(this._field.getComputedValue()); |
| 17331 |
var vSelected=this.getSelected(); |
| 17332 |
if(vSelected&&vSelected.getLabel()!=this.getValue()){this.resetSelected(); |
| 17333 |
}delete this._fromInput; |
| 17334 |
}, |
17294 |
}, |
| 17335 |
_onbeforedisappear:function(e){this._testClosePopup(); |
17295 |
setMin:function(vMin){return this.getManager().setMin(vMin); |
| 17336 |
}, |
17296 |
}, |
| 17337 |
_onlocalechange:function(e){var selected=this.getSelected(); |
17297 |
getMin:function(){return this.getManager().getMin(); |
| 17338 |
this._applySelected(selected, |
|
|
| 17339 |
selected); |
| 17340 |
}, |
17298 |
}, |
| 17341 |
_onmousedown:function(e){if(!e.isLeftButtonPressed()){return; |
17299 |
_intervalIncrease:null, |
| 17342 |
}var vTarget=e.getTarget(); |
17300 |
_oninterval:function(e){this._timer.stop(); |
| 17343 |
switch(vTarget){case this._field:if(this.getEditable()){break; |
17301 |
this.setInterval(Math.max(this.getMinTimer(), |
| 17344 |
}case this._button:this._button.addState("pressed"); |
17302 |
this.getInterval()-this.getTimerDecrease())); |
| 17345 |
this._togglePopup(); |
17303 |
if(this._intervalMode=="page"){this._pageIncrement(); |
| 17346 |
this.setCapture(true); |
17304 |
}else{if(this.getInterval()==this.getMinTimer()){this._computedIncrementAmount=this.getAmountGrowth()*this._computedIncrementAmount; |
| 17347 |
break; |
17305 |
}this._increment(); |
| 17348 |
default:break; |
17306 |
}var wrap=this.getManager().getWrap(); |
| 17349 |
}e.stopPropagation(); |
17307 |
switch(this._intervalIncrease){case true:if(this.getValue()==this.getMax()&&!wrap){return; |
|
|
17308 |
}case false:if(this.getValue()==this.getMin()&&!wrap){return; |
| 17309 |
}}this._timer.restartWith(this.getInterval()); |
| 17350 |
}, |
17310 |
}, |
| 17351 |
_onclick:function(e){if(!e.isLeftButtonPressed()){return; |
17311 |
__checkValue:function(acceptEmpty, |
| 17352 |
}var vTarget=e.getTarget(); |
17312 |
acceptEdit){var el=this._textfield.getInputElement(); |
| 17353 |
switch(vTarget){case this._field:case this._button:case this:case this._list:break; |
17313 |
if(!el){return; |
| 17354 |
default:if(vTarget instanceof qx.ui.form.ListItem&&vTarget.getParent()==this._list){this._list._onmousedown(e); |
|
|
| 17355 |
this.setSelected(this._list.getSelectedItem()); |
| 17356 |
this._closePopup(); |
| 17357 |
this.setFocused(true); |
| 17358 |
}else if(this._popup.isSeeable()){this._popup.hide(); |
| 17359 |
this.setCapture(false); |
| 17360 |
}}}, |
| 17361 |
_onmouseup:function(e){this._button.removeState("pressed"); |
| 17362 |
if(!this._popup.isSeeable()){this.setCapture(false); |
| 17363 |
}}, |
| 17364 |
_onmouseover:function(e){var vTarget=e.getTarget(); |
| 17365 |
if(vTarget instanceof qx.ui.form.ListItem){var vManager=this._manager; |
| 17366 |
vManager.deselectAll(); |
| 17367 |
vManager.setLeadItem(vTarget); |
| 17368 |
vManager.setAnchorItem(vTarget); |
| 17369 |
vManager.setSelectedItem(vTarget); |
| 17370 |
}}, |
| 17371 |
_onmousewheel:function(e){if(!this._popup.isSeeable()){var toSelect; |
| 17372 |
var isSelected=this.getSelected(); |
| 17373 |
if(e.getWheelDelta()<0){toSelect=isSelected?this._manager.getNext(isSelected):this._manager.getFirst(); |
| 17374 |
}else{toSelect=isSelected?this._manager.getPrevious(isSelected):this._manager.getLast(); |
| 17375 |
} |
17314 |
} |
| 17376 |
if(toSelect){this.setSelected(toSelect); |
17315 |
if((el.value=="")||(el.value=="-")){if(!acceptEmpty){this.resetValue(); |
| 17377 |
}}else{var vTarget=e.getTarget(); |
|
|
| 17378 |
if(vTarget!=this&&vTarget.getParent()!=this._list){this._popup.hide(); |
| 17379 |
this.setCapture(false); |
| 17380 |
}}}, |
| 17381 |
_onkeydown:function(e){var vManager=this._manager; |
| 17382 |
var vVisible=this._popup.isSeeable(); |
| 17383 |
switch(e.getKeyIdentifier()){case "Enter":if(vVisible){this.setSelected(this._manager.getSelectedItem()); |
| 17384 |
this._closePopup(); |
| 17385 |
this.setFocused(true); |
| 17386 |
}else{this._openPopup(); |
| 17387 |
}e.stopPropagation(); |
| 17388 |
return; |
| 17389 |
case "Escape":if(vVisible){vManager.setLeadItem(this._oldSelected); |
| 17390 |
vManager.setAnchorItem(this._oldSelected); |
| 17391 |
vManager.setSelectedItem(this._oldSelected); |
| 17392 |
this._field.setValue(this._oldSelected?this._oldSelected.getLabel():""); |
| 17393 |
this._closePopup(); |
| 17394 |
this.setFocused(true); |
| 17395 |
e.stopPropagation(); |
| 17396 |
}return; |
| 17397 |
case "Down":if(e.isAltPressed()){this._togglePopup(); |
| 17398 |
return; |
| 17399 |
}break; |
| 17400 |
}}, |
| 17401 |
_onkeypress:function(e){var vVisible=this._popup.isSeeable(); |
| 17402 |
var vManager=this._manager; |
| 17403 |
switch(e.getKeyIdentifier()){case "PageUp":if(!vVisible){var vPrevious; |
| 17404 |
var vTemp=this.getSelected(); |
| 17405 |
if(vTemp){var vInterval=this.getPagingInterval(); |
| 17406 |
do{vPrevious=vTemp; |
| 17407 |
}while(--vInterval&&(vTemp=vManager.getPrevious(vPrevious))); |
| 17408 |
}else{vPrevious=vManager.getLast(); |
| 17409 |
}this.setSelected(vPrevious); |
| 17410 |
return; |
| 17411 |
}break; |
| 17412 |
case "PageDown":if(!vVisible){var vNext; |
| 17413 |
var vTemp=this.getSelected(); |
| 17414 |
if(vTemp){var vInterval=this.getPagingInterval(); |
| 17415 |
do{vNext=vTemp; |
| 17416 |
}while(--vInterval&&(vTemp=vManager.getNext(vNext))); |
| 17417 |
}else{vNext=vManager.getFirst(); |
| 17418 |
}this.setSelected(vNext||null); |
| 17419 |
return; |
17316 |
return; |
| 17420 |
}break; |
17317 |
}}else{var str_val=el.value; |
| 17421 |
}if(!this.isEditable()||vVisible){this._list._onkeypress(e); |
17318 |
var parsable_str; |
|
|
17319 |
if(this._numberFormat){var groupSepEsc=qx.lang.String.escapeRegexpChars(qx.locale.Number.getGroupSeparator(this._numberFormat._locale)+""); |
| 17320 |
var decimalSepEsc=qx.lang.String.escapeRegexpChars(qx.locale.Number.getDecimalSeparator(this._numberFormat._locale)+""); |
| 17321 |
parsable_str=str_val.replace(new RegExp(decimalSepEsc), |
| 17322 |
"."); |
| 17323 |
parsable_str=parsable_str.replace(new RegExp(groupSepEsc, |
| 17324 |
"g"), |
| 17325 |
""); |
| 17326 |
}else{parsable_str=str_val; |
| 17327 |
}var val=parseFloat(parsable_str); |
| 17328 |
var limitedVal=this.getManager().limit(val); |
| 17329 |
var oldValue=this.getManager().getValue(); |
| 17330 |
var fixedVal=limitedVal; |
| 17331 |
if(isNaN(val)||(limitedVal!=val)||(val!=parsable_str)){if(acceptEdit){this._textfield.setValue(this._last_value); |
| 17332 |
}else{if(isNaN(limitedVal)){fixedVal=oldValue; |
| 17333 |
}else{fixedVal=limitedVal; |
| 17334 |
}}} |
| 17335 |
if(acceptEdit)return; |
| 17336 |
var formattedValue; |
| 17337 |
if(this._numberFormat){formattedValue=this._numberFormat.format(fixedVal); |
| 17338 |
}else{formattedValue=String(fixedVal); |
| 17339 |
} |
| 17340 |
if((fixedVal===oldValue)&&(str_val!==formattedValue)){this._textfield.setValue(formattedValue); |
| 17341 |
}this.getManager().setValue(fixedVal); |
| 17422 |
}}, |
17342 |
}}, |
| 17423 |
_onkeyinput:function(e){var vVisible=this._popup.isSeeable(); |
17343 |
_increment:function(){if(this.getManager().incrementValue){this.getManager().incrementValue((this._intervalIncrease?1:-1)*this._computedIncrementAmount); |
| 17424 |
if(!this.isEditable()||vVisible){this._list._onkeyinput(e); |
17344 |
}else{var value=this.getManager().getValue()+((this._intervalIncrease?1:-1)*this._computedIncrementAmount); |
|
|
17345 |
value=this.getManager().limit(value); |
| 17346 |
this.getManager().setValue(value); |
| 17425 |
}}, |
17347 |
}}, |
| 17426 |
_visualizeBlur:function(){this.getField()._visualizeBlur(); |
17348 |
_pageIncrement:function(){if(this.getManager().pageIncrementValue){this.getManager().pageIncrementValue(); |
| 17427 |
this.removeState("focused"); |
17349 |
}else{var value=this.getManager().getValue()+((this._intervalIncrease?1:-1)*this.getPageIncrementAmount()); |
| 17428 |
}, |
17350 |
value=this.getManager().limit(value); |
| 17429 |
_visualizeFocus:function(){this.getField()._visualizeFocus(); |
17351 |
this.getManager().setValue(value); |
| 17430 |
this.getField().selectAll(); |
|
|
| 17431 |
this.addState("focused"); |
| 17432 |
}}, |
17352 |
}}, |
| 17433 |
destruct:function(){if(this._popup&&!qx.core.Object.inGlobalDispose()){this._popup.setParent(null); |
17353 |
_resetIncrements:function(){this._computedIncrementAmount=this.getIncrementAmount(); |
| 17434 |
}var vDoc=qx.ui.core.ClientDocument.getInstance(); |
17354 |
this.resetInterval(); |
| 17435 |
vDoc.removeEventListener("windowblur", |
17355 |
}}, |
| 17436 |
this._testClosePopup, |
17356 |
destruct:function(){var mgr=this.getManager(); |
| 17437 |
this); |
17357 |
if(mgr){mgr.dispose(); |
| 17438 |
var vMgr=qx.locale.Manager.getInstance(); |
17358 |
}this._disposeObjects("_textfield", |
| 17439 |
vMgr.removeEventListener("changeLocale", |
17359 |
"_buttonlayout", |
| 17440 |
this._onlocalechange, |
17360 |
"_upbutton", |
| 17441 |
this); |
17361 |
"_downbutton", |
| 17442 |
this._disposeObjects("_popup", |
17362 |
"_timer"); |
| 17443 |
"_list", |
|
|
| 17444 |
"_manager", |
| 17445 |
"_field", |
| 17446 |
"_button"); |
| 17447 |
}}); |
17363 |
}}); |
| 17448 |
|
17364 |
|
| 17449 |
|
17365 |
|
| 17450 |
|
17366 |
|
| 17451 |
|
17367 |
|
|
|
17368 |
/* ID: qx.util.range.IRange */ |
| 17369 |
qx.Interface.define("qx.util.range.IRange", |
| 17370 |
{properties:{value:{}, |
| 17371 |
min:{}, |
| 17372 |
max:{}, |
| 17373 |
wrap:{}}, |
| 17374 |
members:{limit:function(value){return true; |
| 17375 |
}}}); |
| 17376 |
|
| 17377 |
|
| 17378 |
|
| 17379 |
|
| 17380 |
/* ID: qx.util.range.Range */ |
| 17381 |
qx.Class.define("qx.util.range.Range", |
| 17382 |
{extend:qx.core.Target, |
| 17383 |
implement:[qx.util.range.IRange], |
| 17384 |
events:{"change":"qx.event.type.Event"}, |
| 17385 |
properties:{value:{check:"!isNaN(value)&&value>=this.getMin()&&value<=this.getMax()", |
| 17386 |
nullable:true, |
| 17387 |
event:"change", |
| 17388 |
init:0}, |
| 17389 |
precision:{check:"Integer", |
| 17390 |
nullable:true, |
| 17391 |
event:"change", |
| 17392 |
init:0}, |
| 17393 |
min:{check:"Number", |
| 17394 |
apply:"_applyMin", |
| 17395 |
event:"change", |
| 17396 |
init:0}, |
| 17397 |
max:{check:"Number", |
| 17398 |
apply:"_applyMax", |
| 17399 |
event:"change", |
| 17400 |
init:100}, |
| 17401 |
wrap:{check:"Boolean", |
| 17402 |
init:false}}, |
| 17403 |
members:{_applyMax:function(value, |
| 17404 |
old){this.setValue(Math.min(this.getValue(), |
| 17405 |
value)); |
| 17406 |
}, |
| 17407 |
_applyMin:function(value, |
| 17408 |
old){this.setValue(Math.max(this.getValue(), |
| 17409 |
value)); |
| 17410 |
}, |
| 17411 |
limit:function(value){var precision=this.getPrecision(); |
| 17412 |
if(precision!=null)var mover=Math.pow(10, |
| 17413 |
precision); |
| 17414 |
if(this.getWrap()){if(precision!=null){var value=Math.round(value*mover)/mover; |
| 17415 |
} |
| 17416 |
if(value<this.getMin()){return (this.getMax()-(this.getMin()-value))+1; |
| 17417 |
} |
| 17418 |
if(value>this.getMax()){return (this.getMin()+(value-this.getMax()))-1; |
| 17419 |
}} |
| 17420 |
if(value<this.getMin()){return this.getMin(); |
| 17421 |
} |
| 17422 |
if(value>this.getMax()){return this.getMax(); |
| 17423 |
} |
| 17424 |
if(precision!=null){return Math.round(value*mover)/mover; |
| 17425 |
}else{return value; |
| 17426 |
}}}}); |
| 17427 |
|
| 17428 |
|
| 17429 |
|
| 17430 |
|
| 17431 |
/* ID: qx.ui.form.TextArea */ |
| 17432 |
qx.Class.define("qx.ui.form.TextArea", |
| 17433 |
{extend:qx.ui.form.TextField, |
| 17434 |
properties:{appearance:{refine:true, |
| 17435 |
init:"text-area"}, |
| 17436 |
allowStretchY:{refine:true, |
| 17437 |
init:true}, |
| 17438 |
spellCheck:{refine:true, |
| 17439 |
init:true}, |
| 17440 |
wrap:{check:"Boolean", |
| 17441 |
init:true, |
| 17442 |
apply:"_applyWrap"}}, |
| 17443 |
members:{_inputTag:"textarea", |
| 17444 |
_inputType:null, |
| 17445 |
_inputOverflow:"auto", |
| 17446 |
_applyElement:function(value, |
| 17447 |
old){this.base(arguments, |
| 17448 |
value, |
| 17449 |
old); |
| 17450 |
this._styleWrap(); |
| 17451 |
}, |
| 17452 |
_applyWrap:function(value, |
| 17453 |
old){this._styleWrap(); |
| 17454 |
}, |
| 17455 |
_styleWrap:qx.core.Variant.select("qx.client", |
| 17456 |
{"mshtml":function(){if(this._inputElement){this._inputElement.wrap=this.getWrap()?"soft":"off"; |
| 17457 |
}}, |
| 17458 |
"gecko":function(){if(this._inputElement){var wrapValue=this.getWrap()?"soft":"off"; |
| 17459 |
var styleValue=this.getWrap()?"":"auto"; |
| 17460 |
this._inputElement.setAttribute('wrap', |
| 17461 |
wrapValue); |
| 17462 |
this._inputElement.style.overflow=styleValue; |
| 17463 |
}}, |
| 17464 |
"default":function(){if(this._inputElement){this._inputElement.style.whiteSpace=this.getWrap()?"normal":"nowrap"; |
| 17465 |
}}}), |
| 17466 |
_computePreferredInnerHeight:function(){return 60; |
| 17467 |
}}}); |
| 17468 |
|
| 17469 |
|
| 17470 |
|
| 17471 |
|
| 17452 |
/* ID: qx.ui.groupbox.GroupBox */ |
17472 |
/* ID: qx.ui.groupbox.GroupBox */ |
| 17453 |
qx.Class.define("qx.ui.groupbox.GroupBox", |
17473 |
qx.Class.define("qx.ui.groupbox.GroupBox", |
| 17454 |
{extend:qx.ui.layout.CanvasLayout, |
17474 |
{extend:qx.ui.layout.CanvasLayout, |
|
Lines 18110-18222
Link Here
|
| 18110 |
old){value===true?this.addState("checked"):this.removeState("checked"); |
18130 |
old){value===true?this.addState("checked"):this.removeState("checked"); |
| 18111 |
}, |
18131 |
}, |
| 18112 |
execute:function(){this._processExecute(); |
18132 |
execute:function(){this._processExecute(); |
| 18113 |
this.base(arguments); |
18133 |
this.base(arguments); |
| 18114 |
}, |
18134 |
}, |
| 18115 |
_processExecute:function(){this.toggleChecked(); |
18135 |
_processExecute:function(){this.toggleChecked(); |
| 18116 |
}}}); |
18136 |
}}}); |
| 18117 |
|
18137 |
|
| 18118 |
|
18138 |
|
| 18119 |
|
18139 |
|
| 18120 |
|
18140 |
|
| 18121 |
/* ID: qx.ui.menu.RadioButton */ |
18141 |
/* ID: qx.ui.menu.RadioButton */ |
| 18122 |
qx.Class.define("qx.ui.menu.RadioButton", |
18142 |
qx.Class.define("qx.ui.menu.RadioButton", |
| 18123 |
{extend:qx.ui.menu.CheckBox, |
18143 |
{extend:qx.ui.menu.CheckBox, |
| 18124 |
properties:{appearance:{refine:true, |
18144 |
properties:{appearance:{refine:true, |
| 18125 |
init:"menu-radio-button"}, |
18145 |
init:"menu-radio-button"}, |
| 18126 |
manager:{check:"qx.ui.selection.RadioManager", |
18146 |
manager:{check:"qx.ui.selection.RadioManager", |
| 18127 |
nullable:true, |
18147 |
nullable:true, |
| 18128 |
apply:"_applyManager"}}, |
18148 |
apply:"_applyManager"}}, |
| 18129 |
members:{_applyChecked:function(value, |
18149 |
members:{_applyChecked:function(value, |
| 18130 |
old){this.base(arguments, |
18150 |
old){this.base(arguments, |
| 18131 |
value, |
18151 |
value, |
| 18132 |
old); |
18152 |
old); |
| 18133 |
var vManager=this.getManager(); |
18153 |
var vManager=this.getManager(); |
| 18134 |
if(vManager){vManager.handleItemChecked(this, |
18154 |
if(vManager){vManager.handleItemChecked(this, |
| 18135 |
value); |
18155 |
value); |
| 18136 |
}}, |
|
|
| 18137 |
_applyManager:function(value, |
| 18138 |
old){if(old){old.remove(this); |
| 18139 |
} |
| 18140 |
if(value){value.add(this); |
| 18141 |
}}, |
| 18142 |
_applyName:function(value, |
| 18143 |
old){if(this.getManager()){this.getManager().setName(value); |
| 18144 |
}}, |
| 18145 |
_processExecute:function(){this.setChecked(true); |
| 18146 |
}}}); |
| 18147 |
|
| 18148 |
|
| 18149 |
|
| 18150 |
|
| 18151 |
/* ID: qx.ui.menubar.MenuBar */ |
| 18152 |
qx.Class.define("qx.ui.menubar.MenuBar", |
| 18153 |
{extend:qx.ui.toolbar.ToolBar}); |
| 18154 |
|
| 18155 |
|
| 18156 |
|
| 18157 |
|
| 18158 |
/* ID: qx.ui.menubar.Button */ |
| 18159 |
qx.Class.define("qx.ui.menubar.Button", |
| 18160 |
{extend:qx.ui.toolbar.MenuButton}); |
| 18161 |
|
| 18162 |
|
| 18163 |
|
| 18164 |
|
| 18165 |
/* ID: qx.event.type.DragEvent */ |
| 18166 |
qx.Class.define("qx.event.type.DragEvent", |
| 18167 |
{extend:qx.event.type.MouseEvent, |
| 18168 |
construct:function(vType, |
| 18169 |
vMouseEvent, |
| 18170 |
vTarget, |
| 18171 |
vRelatedTarget){this._mouseEvent=vMouseEvent; |
| 18172 |
var vOriginalTarget=null; |
| 18173 |
switch(vType){case "dragstart":case "dragover":vOriginalTarget=vMouseEvent.getOriginalTarget(); |
| 18174 |
}this.base(arguments, |
| 18175 |
vType, |
| 18176 |
vMouseEvent.getDomEvent(), |
| 18177 |
vTarget.getElement(), |
| 18178 |
vTarget, |
| 18179 |
vOriginalTarget, |
| 18180 |
vRelatedTarget); |
| 18181 |
}, |
| 18182 |
members:{getMouseEvent:function(){return this._mouseEvent; |
| 18183 |
}, |
| 18184 |
startDrag:function(){if(this.getType()!="dragstart"){throw new Error("qx.event.type.DragEvent startDrag can only be called during the dragstart event: "+this.getType()); |
| 18185 |
}this.stopPropagation(); |
| 18186 |
qx.event.handler.DragAndDropHandler.getInstance().startDrag(); |
| 18187 |
}, |
| 18188 |
addData:function(sType, |
| 18189 |
oData){qx.event.handler.DragAndDropHandler.getInstance().addData(sType, |
| 18190 |
oData); |
| 18191 |
}, |
| 18192 |
getData:function(sType){return qx.event.handler.DragAndDropHandler.getInstance().getData(sType); |
| 18193 |
}, |
| 18194 |
clearData:function(){qx.event.handler.DragAndDropHandler.getInstance().clearData(); |
| 18195 |
}, |
| 18196 |
getDropDataTypes:function(){return qx.event.handler.DragAndDropHandler.getInstance().getDropDataTypes(); |
| 18197 |
}, |
| 18198 |
addAction:function(sAction){qx.event.handler.DragAndDropHandler.getInstance().addAction(sAction); |
| 18199 |
}, |
| 18200 |
removeAction:function(sAction){qx.event.handler.DragAndDropHandler.getInstance().removeAction(sAction); |
| 18201 |
}, |
| 18202 |
getAction:function(){return qx.event.handler.DragAndDropHandler.getInstance().getCurrentAction(); |
| 18203 |
}, |
| 18204 |
clearActions:function(){qx.event.handler.DragAndDropHandler.getInstance().clearActions(); |
| 18205 |
}, |
| 18206 |
setFeedbackWidget:function(widget, |
| 18207 |
deltaX, |
| 18208 |
deltaY, |
| 18209 |
autoDisposeWidget){qx.event.handler.DragAndDropHandler.getInstance().setFeedbackWidget(widget, |
| 18210 |
deltaX, |
| 18211 |
deltaY, |
| 18212 |
autoDisposeWidget); |
| 18213 |
}, |
| 18214 |
setCursorPosition:function(deltaX, |
| 18215 |
deltaY){qx.event.handler.DragAndDropHandler.getInstance().setCursorPosition(deltaX, |
| 18216 |
deltaY); |
| 18217 |
}}, |
18156 |
}}, |
| 18218 |
destruct:function(){this._disposeFields("_mouseEvent"); |
18157 |
_applyManager:function(value, |
| 18219 |
}}); |
18158 |
old){if(old){old.remove(this); |
|
|
18159 |
} |
| 18160 |
if(value){value.add(this); |
| 18161 |
}}, |
| 18162 |
_applyName:function(value, |
| 18163 |
old){if(this.getManager()){this.getManager().setName(value); |
| 18164 |
}}, |
| 18165 |
_processExecute:function(){this.setChecked(true); |
| 18166 |
}}}); |
| 18167 |
|
| 18168 |
|
| 18169 |
|
| 18170 |
|
| 18171 |
/* ID: qx.ui.menubar.Button */ |
| 18172 |
qx.Class.define("qx.ui.menubar.Button", |
| 18173 |
{extend:qx.ui.toolbar.MenuButton}); |
| 18174 |
|
| 18175 |
|
| 18176 |
|
| 18177 |
|
| 18178 |
/* ID: qx.ui.menubar.MenuBar */ |
| 18179 |
qx.Class.define("qx.ui.menubar.MenuBar", |
| 18180 |
{extend:qx.ui.toolbar.ToolBar}); |
| 18220 |
|
18181 |
|
| 18221 |
|
18182 |
|
| 18222 |
|
18183 |
|
|
Lines 18438-18517
Link Here
|
| 18438 |
if(vNewCursor!=vOldCursor){vNewCursor._style.display=""; |
18399 |
if(vNewCursor!=vOldCursor){vNewCursor._style.display=""; |
| 18439 |
}this.__cursor=vNewCursor; |
18400 |
}this.__cursor=vNewCursor; |
| 18440 |
}, |
18401 |
}, |
| 18441 |
supportsDrop:function(vWidget){var vTypes=vWidget.getDropDataTypes(); |
18402 |
supportsDrop:function(vWidget){var vTypes=vWidget.getDropDataTypes(); |
| 18442 |
if(!vTypes){return false; |
18403 |
if(!vTypes){return false; |
| 18443 |
} |
18404 |
} |
| 18444 |
for(var i=0;i<vTypes.length;i++){if(vTypes[i] in this.__data){return true; |
18405 |
for(var i=0;i<vTypes.length;i++){if(vTypes[i] in this.__data){return true; |
| 18445 |
}}return false; |
18406 |
}}return false; |
|
|
18407 |
}, |
| 18408 |
addAction:function(vAction, |
| 18409 |
vForce){this.__actions[vAction]=true; |
| 18410 |
if(vForce||this.getCurrentAction()==null){this.setCurrentAction(vAction); |
| 18411 |
}}, |
| 18412 |
clearActions:function(){this.__actions={}; |
| 18413 |
this.setCurrentAction(null); |
| 18414 |
}, |
| 18415 |
removeAction:function(vAction){delete this.__actions[vAction]; |
| 18416 |
if(this.getCurrentAction()==vAction){this.setCurrentAction(null); |
| 18417 |
}}, |
| 18418 |
setAction:function(vAction){if(vAction!=null&&!(vAction in this.__actions)){this.addAction(vAction, |
| 18419 |
true); |
| 18420 |
}else{this.setCurrentAction(vAction); |
| 18421 |
}}, |
| 18422 |
_evalNewAction:function(vKeyShift, |
| 18423 |
vKeyCtrl, |
| 18424 |
vKeyAlt){if(vKeyShift&&vKeyCtrl&&"alias" in this.__actions){return "alias"; |
| 18425 |
}else if(vKeyShift&&vKeyAlt&&"copy" in this.__actions){return "copy"; |
| 18426 |
}else if(vKeyShift&&"move" in this.__actions){return "move"; |
| 18427 |
}else if(vKeyAlt&&"alias" in this.__actions){return "alias"; |
| 18428 |
}else if(vKeyCtrl&&"copy" in this.__actions){return "copy"; |
| 18429 |
}else{for(var vAction in this.__actions){return vAction; |
| 18430 |
}}return null; |
| 18431 |
}, |
| 18432 |
setFeedbackWidget:function(widget, |
| 18433 |
deltaX, |
| 18434 |
deltaY, |
| 18435 |
autoDisposeWidget){this.__feedbackWidget=widget; |
| 18436 |
this.__feedbackDeltaX=(deltaX!=null)?deltaX:10; |
| 18437 |
this.__feedbackDeltaY=(deltaY!=null)?deltaY:10; |
| 18438 |
this.__feedbackAutoDispose=autoDisposeWidget?true:false; |
| 18439 |
}, |
| 18440 |
_renderFeedbackWidget:function(){if(this.__feedbackWidget){this.__feedbackWidget.setVisibility(true); |
| 18441 |
this.__feedbackWidget._renderRuntimeLeft(this.__dragCache.pageX+this.__feedbackDeltaX); |
| 18442 |
this.__feedbackWidget._renderRuntimeTop(this.__dragCache.pageY+this.__feedbackDeltaY); |
| 18443 |
}}}, |
| 18444 |
destruct:function(){this._disposeObjectDeep("__cursors", |
| 18445 |
1); |
| 18446 |
this._disposeObjects("__feedbackWidget"); |
| 18447 |
this._disposeFields("__dragCache", |
| 18448 |
"__data", |
| 18449 |
"__actions", |
| 18450 |
"__lastDestinationEvent"); |
| 18451 |
}}); |
| 18452 |
|
| 18453 |
|
| 18454 |
|
| 18455 |
|
| 18456 |
/* ID: qx.event.type.DragEvent */ |
| 18457 |
qx.Class.define("qx.event.type.DragEvent", |
| 18458 |
{extend:qx.event.type.MouseEvent, |
| 18459 |
construct:function(vType, |
| 18460 |
vMouseEvent, |
| 18461 |
vTarget, |
| 18462 |
vRelatedTarget){this._mouseEvent=vMouseEvent; |
| 18463 |
var vOriginalTarget=null; |
| 18464 |
switch(vType){case "dragstart":case "dragover":vOriginalTarget=vMouseEvent.getOriginalTarget(); |
| 18465 |
}this.base(arguments, |
| 18466 |
vType, |
| 18467 |
vMouseEvent.getDomEvent(), |
| 18468 |
vTarget.getElement(), |
| 18469 |
vTarget, |
| 18470 |
vOriginalTarget, |
| 18471 |
vRelatedTarget); |
| 18472 |
}, |
| 18473 |
members:{getMouseEvent:function(){return this._mouseEvent; |
| 18474 |
}, |
| 18475 |
startDrag:function(){if(this.getType()!="dragstart"){throw new Error("qx.event.type.DragEvent startDrag can only be called during the dragstart event: "+this.getType()); |
| 18476 |
}this.stopPropagation(); |
| 18477 |
qx.event.handler.DragAndDropHandler.getInstance().startDrag(); |
| 18478 |
}, |
| 18479 |
addData:function(sType, |
| 18480 |
oData){qx.event.handler.DragAndDropHandler.getInstance().addData(sType, |
| 18481 |
oData); |
| 18482 |
}, |
| 18483 |
getData:function(sType){return qx.event.handler.DragAndDropHandler.getInstance().getData(sType); |
| 18484 |
}, |
| 18485 |
clearData:function(){qx.event.handler.DragAndDropHandler.getInstance().clearData(); |
| 18486 |
}, |
| 18487 |
getDropDataTypes:function(){return qx.event.handler.DragAndDropHandler.getInstance().getDropDataTypes(); |
| 18488 |
}, |
| 18489 |
addAction:function(sAction){qx.event.handler.DragAndDropHandler.getInstance().addAction(sAction); |
| 18490 |
}, |
| 18491 |
removeAction:function(sAction){qx.event.handler.DragAndDropHandler.getInstance().removeAction(sAction); |
| 18492 |
}, |
| 18493 |
getAction:function(){return qx.event.handler.DragAndDropHandler.getInstance().getCurrentAction(); |
| 18494 |
}, |
| 18495 |
clearActions:function(){qx.event.handler.DragAndDropHandler.getInstance().clearActions(); |
| 18496 |
}, |
| 18497 |
setFeedbackWidget:function(widget, |
| 18498 |
deltaX, |
| 18499 |
deltaY, |
| 18500 |
autoDisposeWidget){qx.event.handler.DragAndDropHandler.getInstance().setFeedbackWidget(widget, |
| 18501 |
deltaX, |
| 18502 |
deltaY, |
| 18503 |
autoDisposeWidget); |
| 18504 |
}, |
| 18505 |
setCursorPosition:function(deltaX, |
| 18506 |
deltaY){qx.event.handler.DragAndDropHandler.getInstance().setCursorPosition(deltaX, |
| 18507 |
deltaY); |
| 18508 |
}}, |
| 18509 |
destruct:function(){this._disposeFields("_mouseEvent"); |
| 18510 |
}}); |
| 18511 |
|
| 18512 |
|
| 18513 |
|
| 18514 |
|
| 18515 |
/* ID: qx.html.Iframe */ |
| 18516 |
qx.Class.define("qx.html.Iframe", |
| 18517 |
{statics:{getWindow:qx.core.Variant.select("qx.client", |
| 18518 |
{"mshtml":function(vIframe){try{return vIframe.contentWindow; |
| 18519 |
}catch(ex){return null; |
| 18520 |
}}, |
| 18521 |
"default":function(vIframe){try{var vDoc=qx.html.Iframe.getDocument(vIframe); |
| 18522 |
return vDoc?vDoc.defaultView:null; |
| 18523 |
}catch(ex){return null; |
| 18524 |
}}}), |
| 18525 |
getDocument:qx.core.Variant.select("qx.client", |
| 18526 |
{"mshtml":function(vIframe){try{var vWin=qx.html.Iframe.getWindow(vIframe); |
| 18527 |
return vWin?vWin.document:null; |
| 18528 |
}catch(ex){return null; |
| 18529 |
}}, |
| 18530 |
"default":function(vIframe){try{return vIframe.contentDocument; |
| 18531 |
}catch(ex){return null; |
| 18532 |
}}}), |
| 18533 |
getBody:function(vIframe){var vDoc=qx.html.Iframe.getDocument(vIframe); |
| 18534 |
return vDoc?vDoc.getElementsByTagName("body")[0]:null; |
| 18535 |
}}}); |
| 18536 |
|
| 18537 |
|
| 18538 |
|
| 18539 |
|
| 18540 |
/* ID: qx.io.remote.AbstractRemoteTransport */ |
| 18541 |
qx.Class.define("qx.io.remote.AbstractRemoteTransport", |
| 18542 |
{type:"abstract", |
| 18543 |
extend:qx.core.Target, |
| 18544 |
construct:function(){this.base(arguments); |
| 18545 |
}, |
| 18546 |
events:{"created":"qx.event.type.Event", |
| 18547 |
"configured":"qx.event.type.Event", |
| 18548 |
"sending":"qx.event.type.Event", |
| 18549 |
"receiving":"qx.event.type.Event", |
| 18550 |
"completed":"qx.event.type.Event", |
| 18551 |
"aborted":"qx.event.type.Event", |
| 18552 |
"failed":"qx.event.type.Event", |
| 18553 |
"timeout":"qx.event.type.Event"}, |
| 18554 |
properties:{url:{check:"String", |
| 18555 |
nullable:true}, |
| 18556 |
method:{check:"String", |
| 18557 |
nullable:true}, |
| 18558 |
asynchronous:{check:"Boolean", |
| 18559 |
nullable:true}, |
| 18560 |
data:{check:"String", |
| 18561 |
nullable:true}, |
| 18562 |
username:{check:"String", |
| 18563 |
nullable:true}, |
| 18564 |
password:{check:"String", |
| 18565 |
nullable:true}, |
| 18566 |
state:{check:["created", |
| 18567 |
"configured", |
| 18568 |
"sending", |
| 18569 |
"receiving", |
| 18570 |
"completed", |
| 18571 |
"aborted", |
| 18572 |
"timeout", |
| 18573 |
"failed"], |
| 18574 |
init:"created", |
| 18575 |
event:"changeState", |
| 18576 |
apply:"_applyState"}, |
| 18577 |
requestHeaders:{check:"Object", |
| 18578 |
nullable:true}, |
| 18579 |
parameters:{check:"Object", |
| 18580 |
nullable:true}, |
| 18581 |
formFields:{check:"Object", |
| 18582 |
nullable:true}, |
| 18583 |
responseType:{check:"String", |
| 18584 |
nullable:true}, |
| 18585 |
useBasicHttpAuth:{check:"Boolean", |
| 18586 |
nullable:true}}, |
| 18587 |
members:{send:function(){throw new Error("send is abstract"); |
| 18588 |
}, |
| 18589 |
abort:function(){{if(qx.core.Setting.get("qx.ioRemoteDebug")){this.warn("Aborting..."); |
| 18590 |
}}; |
| 18591 |
this.setState("aborted"); |
| 18592 |
}, |
| 18593 |
timeout:function(){{if(qx.core.Setting.get("qx.ioRemoteDebug")){this.warn("Timeout..."); |
| 18594 |
}}; |
| 18595 |
this.setState("timeout"); |
| 18596 |
}, |
| 18597 |
failed:function(){{if(qx.core.Setting.get("qx.ioRemoteDebug")){this.warn("Failed..."); |
| 18598 |
}}; |
| 18599 |
this.setState("failed"); |
| 18600 |
}, |
| 18601 |
setRequestHeader:function(vLabel, |
| 18602 |
vValue){throw new Error("setRequestHeader is abstract"); |
| 18603 |
}, |
| 18604 |
getResponseHeader:function(vLabel){throw new Error("getResponseHeader is abstract"); |
| 18605 |
}, |
| 18606 |
getResponseHeaders:function(){throw new Error("getResponseHeaders is abstract"); |
| 18607 |
}, |
| 18608 |
getStatusCode:function(){throw new Error("getStatusCode is abstract"); |
| 18609 |
}, |
| 18610 |
getStatusText:function(){throw new Error("getStatusText is abstract"); |
| 18446 |
}, |
18611 |
}, |
| 18447 |
addAction:function(vAction, |
18612 |
getResponseText:function(){throw new Error("getResponseText is abstract"); |
| 18448 |
vForce){this.__actions[vAction]=true; |
|
|
| 18449 |
if(vForce||this.getCurrentAction()==null){this.setCurrentAction(vAction); |
| 18450 |
}}, |
| 18451 |
clearActions:function(){this.__actions={}; |
| 18452 |
this.setCurrentAction(null); |
| 18453 |
}, |
18613 |
}, |
| 18454 |
removeAction:function(vAction){delete this.__actions[vAction]; |
18614 |
getResponseXml:function(){throw new Error("getResponseXml is abstract"); |
| 18455 |
if(this.getCurrentAction()==vAction){this.setCurrentAction(null); |
|
|
| 18456 |
}}, |
| 18457 |
setAction:function(vAction){if(vAction!=null&&!(vAction in this.__actions)){this.addAction(vAction, |
| 18458 |
true); |
| 18459 |
}else{this.setCurrentAction(vAction); |
| 18460 |
}}, |
| 18461 |
_evalNewAction:function(vKeyShift, |
| 18462 |
vKeyCtrl, |
| 18463 |
vKeyAlt){if(vKeyShift&&vKeyCtrl&&"alias" in this.__actions){return "alias"; |
| 18464 |
}else if(vKeyShift&&vKeyAlt&&"copy" in this.__actions){return "copy"; |
| 18465 |
}else if(vKeyShift&&"move" in this.__actions){return "move"; |
| 18466 |
}else if(vKeyAlt&&"alias" in this.__actions){return "alias"; |
| 18467 |
}else if(vKeyCtrl&&"copy" in this.__actions){return "copy"; |
| 18468 |
}else{for(var vAction in this.__actions){return vAction; |
| 18469 |
}}return null; |
| 18470 |
}, |
18615 |
}, |
| 18471 |
setFeedbackWidget:function(widget, |
18616 |
getFetchedLength:function(){throw new Error("getFetchedLength is abstract"); |
| 18472 |
deltaX, |
|
|
| 18473 |
deltaY, |
| 18474 |
autoDisposeWidget){this.__feedbackWidget=widget; |
| 18475 |
this.__feedbackDeltaX=(deltaX!=null)?deltaX:10; |
| 18476 |
this.__feedbackDeltaY=(deltaY!=null)?deltaY:10; |
| 18477 |
this.__feedbackAutoDispose=autoDisposeWidget?true:false; |
| 18478 |
}, |
18617 |
}, |
| 18479 |
_renderFeedbackWidget:function(){if(this.__feedbackWidget){this.__feedbackWidget.setVisibility(true); |
18618 |
_applyState:function(value, |
| 18480 |
this.__feedbackWidget._renderRuntimeLeft(this.__dragCache.pageX+this.__feedbackDeltaX); |
18619 |
old){{if(qx.core.Setting.get("qx.ioRemoteDebug")){this.debug("State: "+value); |
| 18481 |
this.__feedbackWidget._renderRuntimeTop(this.__dragCache.pageY+this.__feedbackDeltaY); |
18620 |
}}; |
| 18482 |
}}}, |
18621 |
switch(value){case "created":this.createDispatchEvent("created"); |
| 18483 |
destruct:function(){this._disposeObjectDeep("__cursors", |
18622 |
break; |
| 18484 |
1); |
18623 |
case "configured":this.createDispatchEvent("configured"); |
| 18485 |
this._disposeObjects("__feedbackWidget"); |
18624 |
break; |
| 18486 |
this._disposeFields("__dragCache", |
18625 |
case "sending":this.createDispatchEvent("sending"); |
| 18487 |
"__data", |
18626 |
break; |
| 18488 |
"__actions", |
18627 |
case "receiving":this.createDispatchEvent("receiving"); |
| 18489 |
"__lastDestinationEvent"); |
18628 |
break; |
| 18490 |
}}); |
18629 |
case "completed":this.createDispatchEvent("completed"); |
| 18491 |
|
18630 |
break; |
| 18492 |
|
18631 |
case "aborted":this.createDispatchEvent("aborted"); |
| 18493 |
|
18632 |
break; |
| 18494 |
|
18633 |
case "failed":this.createDispatchEvent("failed"); |
| 18495 |
/* ID: qx.html.Iframe */ |
18634 |
break; |
| 18496 |
qx.Class.define("qx.html.Iframe", |
18635 |
case "timeout":this.createDispatchEvent("timeout"); |
| 18497 |
{statics:{getWindow:qx.core.Variant.select("qx.client", |
18636 |
break; |
| 18498 |
{"mshtml":function(vIframe){try{return vIframe.contentWindow; |
18637 |
}return true; |
| 18499 |
}catch(ex){return null; |
|
|
| 18500 |
}}, |
| 18501 |
"default":function(vIframe){try{var vDoc=qx.html.Iframe.getDocument(vIframe); |
| 18502 |
return vDoc?vDoc.defaultView:null; |
| 18503 |
}catch(ex){return null; |
| 18504 |
}}}), |
| 18505 |
getDocument:qx.core.Variant.select("qx.client", |
| 18506 |
{"mshtml":function(vIframe){try{var vWin=qx.html.Iframe.getWindow(vIframe); |
| 18507 |
return vWin?vWin.document:null; |
| 18508 |
}catch(ex){return null; |
| 18509 |
}}, |
| 18510 |
"default":function(vIframe){try{return vIframe.contentDocument; |
| 18511 |
}catch(ex){return null; |
| 18512 |
}}}), |
| 18513 |
getBody:function(vIframe){var vDoc=qx.html.Iframe.getDocument(vIframe); |
| 18514 |
return vDoc?vDoc.getElementsByTagName("body")[0]:null; |
| 18515 |
}}}); |
18638 |
}}}); |
| 18516 |
|
18639 |
|
| 18517 |
|
18640 |
|
|
Lines 18724-18910
Link Here
|
| 18724 |
value.setAsynchronous(vRequest.getAsynchronous()); |
18847 |
value.setAsynchronous(vRequest.getAsynchronous()); |
| 18725 |
value.setUsername(vRequest.getUsername()); |
18848 |
value.setUsername(vRequest.getUsername()); |
| 18726 |
value.setPassword(vRequest.getPassword()); |
18849 |
value.setPassword(vRequest.getPassword()); |
| 18727 |
value.setParameters(vRequest.getParameters()); |
18850 |
value.setParameters(vRequest.getParameters()); |
| 18728 |
value.setFormFields(vRequest.getFormFields()); |
18851 |
value.setFormFields(vRequest.getFormFields()); |
| 18729 |
value.setRequestHeaders(vRequest.getRequestHeaders()); |
18852 |
value.setRequestHeaders(vRequest.getRequestHeaders()); |
| 18730 |
value.setData(vRequest.getData()); |
18853 |
value.setData(vRequest.getData()); |
| 18731 |
value.setResponseType(vRequest.getResponseType()); |
18854 |
value.setResponseType(vRequest.getResponseType()); |
| 18732 |
value.addEventListener("sending", |
18855 |
value.addEventListener("sending", |
| 18733 |
this._onsending, |
18856 |
this._onsending, |
| 18734 |
this); |
18857 |
this); |
| 18735 |
value.addEventListener("receiving", |
18858 |
value.addEventListener("receiving", |
| 18736 |
this._onreceiving, |
18859 |
this._onreceiving, |
| 18737 |
this); |
18860 |
this); |
| 18738 |
value.addEventListener("completed", |
18861 |
value.addEventListener("completed", |
| 18739 |
this._oncompleted, |
18862 |
this._oncompleted, |
| 18740 |
this); |
18863 |
this); |
| 18741 |
value.addEventListener("aborted", |
18864 |
value.addEventListener("aborted", |
| 18742 |
this._onabort, |
18865 |
this._onabort, |
| 18743 |
this); |
18866 |
this); |
| 18744 |
value.addEventListener("timeout", |
18867 |
value.addEventListener("timeout", |
| 18745 |
this._ontimeout, |
18868 |
this._ontimeout, |
| 18746 |
this); |
18869 |
this); |
| 18747 |
value.addEventListener("failed", |
18870 |
value.addEventListener("failed", |
| 18748 |
this._onfailed, |
18871 |
this._onfailed, |
| 18749 |
this); |
18872 |
this); |
| 18750 |
}}, |
18873 |
}}, |
| 18751 |
_applyState:function(value, |
|
|
| 18752 |
old){{if(qx.core.Setting.get("qx.ioRemoteDebug")){this.debug("State: "+old+" => "+value); |
| 18753 |
}}; |
| 18754 |
switch(value){case "sending":this.createDispatchEvent("sending"); |
| 18755 |
break; |
| 18756 |
case "receiving":this.createDispatchEvent("receiving"); |
| 18757 |
break; |
| 18758 |
case "completed":case "aborted":case "timeout":case "failed":var vImpl=this.getImplementation(); |
| 18759 |
if(!vImpl){break; |
| 18760 |
} |
| 18761 |
if(this.hasEventListeners(value)){var vResponse=new qx.io.remote.Response(value); |
| 18762 |
if(value=="completed"){var vContent=vImpl.getResponseContent(); |
| 18763 |
vResponse.setContent(vContent); |
| 18764 |
if(vContent===null){{if(qx.core.Setting.get("qx.ioRemoteDebug")){this.debug("Altered State: "+value+" => failed"); |
| 18765 |
}}; |
| 18766 |
value="failed"; |
| 18767 |
}}vResponse.setStatusCode(vImpl.getStatusCode()); |
| 18768 |
vResponse.setResponseHeaders(vImpl.getResponseHeaders()); |
| 18769 |
this.dispatchEvent(vResponse); |
| 18770 |
}this.setImplementation(null); |
| 18771 |
vImpl.dispose(); |
| 18772 |
break; |
| 18773 |
}}}, |
| 18774 |
settings:{"qx.ioRemoteDebug":false, |
| 18775 |
"qx.ioRemoteDebugData":false}, |
| 18776 |
destruct:function(){var vImpl=this.getImplementation(); |
| 18777 |
if(vImpl){this.setImplementation(null); |
| 18778 |
vImpl.dispose(); |
| 18779 |
}this.setRequest(null); |
| 18780 |
}}); |
| 18781 |
|
| 18782 |
|
| 18783 |
|
| 18784 |
|
| 18785 |
/* ID: qx.io.remote.Response */ |
| 18786 |
qx.Class.define("qx.io.remote.Response", |
| 18787 |
{extend:qx.event.type.Event, |
| 18788 |
construct:function(eventType){this.base(arguments, |
| 18789 |
eventType); |
| 18790 |
}, |
| 18791 |
properties:{state:{check:"Integer", |
| 18792 |
nullable:true}, |
| 18793 |
statusCode:{check:"Integer", |
| 18794 |
nullable:true}, |
| 18795 |
content:{nullable:true}, |
| 18796 |
responseHeaders:{check:"Object", |
| 18797 |
nullable:true}}, |
| 18798 |
members:{getResponseHeader:function(vHeader){var vAll=this.getResponseHeaders(); |
| 18799 |
if(vAll){return vAll[vHeader]||null; |
| 18800 |
}return null; |
| 18801 |
}, |
| 18802 |
getData:function(){qx.log.Logger.deprecatedMethodWarning(arguments.callee, |
| 18803 |
"This method is no longer needed since the event object is now an instance of the Response class."); |
| 18804 |
return this; |
| 18805 |
}}}); |
| 18806 |
|
| 18807 |
|
| 18808 |
|
| 18809 |
|
| 18810 |
/* ID: qx.io.remote.AbstractRemoteTransport */ |
| 18811 |
qx.Class.define("qx.io.remote.AbstractRemoteTransport", |
| 18812 |
{type:"abstract", |
| 18813 |
extend:qx.core.Target, |
| 18814 |
construct:function(){this.base(arguments); |
| 18815 |
}, |
| 18816 |
events:{"created":"qx.event.type.Event", |
| 18817 |
"configured":"qx.event.type.Event", |
| 18818 |
"sending":"qx.event.type.Event", |
| 18819 |
"receiving":"qx.event.type.Event", |
| 18820 |
"completed":"qx.event.type.Event", |
| 18821 |
"aborted":"qx.event.type.Event", |
| 18822 |
"failed":"qx.event.type.Event", |
| 18823 |
"timeout":"qx.event.type.Event"}, |
| 18824 |
properties:{url:{check:"String", |
| 18825 |
nullable:true}, |
| 18826 |
method:{check:"String", |
| 18827 |
nullable:true}, |
| 18828 |
asynchronous:{check:"Boolean", |
| 18829 |
nullable:true}, |
| 18830 |
data:{check:"String", |
| 18831 |
nullable:true}, |
| 18832 |
username:{check:"String", |
| 18833 |
nullable:true}, |
| 18834 |
password:{check:"String", |
| 18835 |
nullable:true}, |
| 18836 |
state:{check:["created", |
| 18837 |
"configured", |
| 18838 |
"sending", |
| 18839 |
"receiving", |
| 18840 |
"completed", |
| 18841 |
"aborted", |
| 18842 |
"timeout", |
| 18843 |
"failed"], |
| 18844 |
init:"created", |
| 18845 |
event:"changeState", |
| 18846 |
apply:"_applyState"}, |
| 18847 |
requestHeaders:{check:"Object", |
| 18848 |
nullable:true}, |
| 18849 |
parameters:{check:"Object", |
| 18850 |
nullable:true}, |
| 18851 |
formFields:{check:"Object", |
| 18852 |
nullable:true}, |
| 18853 |
responseType:{check:"String", |
| 18854 |
nullable:true}, |
| 18855 |
useBasicHttpAuth:{check:"Boolean", |
| 18856 |
nullable:true}}, |
| 18857 |
members:{send:function(){throw new Error("send is abstract"); |
| 18858 |
}, |
| 18859 |
abort:function(){{if(qx.core.Setting.get("qx.ioRemoteDebug")){this.warn("Aborting..."); |
| 18860 |
}}; |
| 18861 |
this.setState("aborted"); |
| 18862 |
}, |
| 18863 |
timeout:function(){{if(qx.core.Setting.get("qx.ioRemoteDebug")){this.warn("Timeout..."); |
| 18864 |
}}; |
| 18865 |
this.setState("timeout"); |
| 18866 |
}, |
| 18867 |
failed:function(){{if(qx.core.Setting.get("qx.ioRemoteDebug")){this.warn("Failed..."); |
| 18868 |
}}; |
| 18869 |
this.setState("failed"); |
| 18870 |
}, |
| 18871 |
setRequestHeader:function(vLabel, |
| 18872 |
vValue){throw new Error("setRequestHeader is abstract"); |
| 18873 |
}, |
| 18874 |
getResponseHeader:function(vLabel){throw new Error("getResponseHeader is abstract"); |
| 18875 |
}, |
| 18876 |
getResponseHeaders:function(){throw new Error("getResponseHeaders is abstract"); |
| 18877 |
}, |
| 18878 |
getStatusCode:function(){throw new Error("getStatusCode is abstract"); |
| 18879 |
}, |
| 18880 |
getStatusText:function(){throw new Error("getStatusText is abstract"); |
| 18881 |
}, |
| 18882 |
getResponseText:function(){throw new Error("getResponseText is abstract"); |
| 18883 |
}, |
| 18884 |
getResponseXml:function(){throw new Error("getResponseXml is abstract"); |
| 18885 |
}, |
| 18886 |
getFetchedLength:function(){throw new Error("getFetchedLength is abstract"); |
| 18887 |
}, |
| 18888 |
_applyState:function(value, |
18874 |
_applyState:function(value, |
| 18889 |
old){{if(qx.core.Setting.get("qx.ioRemoteDebug")){this.debug("State: "+value); |
18875 |
old){{if(qx.core.Setting.get("qx.ioRemoteDebug")){this.debug("State: "+old+" => "+value); |
| 18890 |
}}; |
18876 |
}}; |
| 18891 |
switch(value){case "created":this.createDispatchEvent("created"); |
18877 |
switch(value){case "sending":this.createDispatchEvent("sending"); |
| 18892 |
break; |
|
|
| 18893 |
case "configured":this.createDispatchEvent("configured"); |
| 18894 |
break; |
| 18895 |
case "sending":this.createDispatchEvent("sending"); |
| 18896 |
break; |
18878 |
break; |
| 18897 |
case "receiving":this.createDispatchEvent("receiving"); |
18879 |
case "receiving":this.createDispatchEvent("receiving"); |
| 18898 |
break; |
18880 |
break; |
| 18899 |
case "completed":this.createDispatchEvent("completed"); |
18881 |
case "completed":case "aborted":case "timeout":case "failed":var vImpl=this.getImplementation(); |
| 18900 |
break; |
18882 |
if(!vImpl){break; |
| 18901 |
case "aborted":this.createDispatchEvent("aborted"); |
18883 |
} |
| 18902 |
break; |
18884 |
if(this.hasEventListeners(value)){var vResponse=new qx.io.remote.Response(value); |
| 18903 |
case "failed":this.createDispatchEvent("failed"); |
18885 |
if(value=="completed"){var vContent=vImpl.getResponseContent(); |
| 18904 |
break; |
18886 |
vResponse.setContent(vContent); |
| 18905 |
case "timeout":this.createDispatchEvent("timeout"); |
18887 |
if(vContent===null){{if(qx.core.Setting.get("qx.ioRemoteDebug")){this.debug("Altered State: "+value+" => failed"); |
|
|
18888 |
}}; |
| 18889 |
value="failed"; |
| 18890 |
}}vResponse.setStatusCode(vImpl.getStatusCode()); |
| 18891 |
vResponse.setResponseHeaders(vImpl.getResponseHeaders()); |
| 18892 |
this.dispatchEvent(vResponse); |
| 18893 |
}this.setImplementation(null); |
| 18894 |
vImpl.dispose(); |
| 18906 |
break; |
18895 |
break; |
| 18907 |
}return true; |
18896 |
}}}, |
|
|
18897 |
settings:{"qx.ioRemoteDebug":false, |
| 18898 |
"qx.ioRemoteDebugData":false}, |
| 18899 |
destruct:function(){var vImpl=this.getImplementation(); |
| 18900 |
if(vImpl){this.setImplementation(null); |
| 18901 |
vImpl.dispose(); |
| 18902 |
}this.setRequest(null); |
| 18903 |
}}); |
| 18904 |
|
| 18905 |
|
| 18906 |
|
| 18907 |
|
| 18908 |
/* ID: qx.io.remote.Response */ |
| 18909 |
qx.Class.define("qx.io.remote.Response", |
| 18910 |
{extend:qx.event.type.Event, |
| 18911 |
construct:function(eventType){this.base(arguments, |
| 18912 |
eventType); |
| 18913 |
}, |
| 18914 |
properties:{state:{check:"Integer", |
| 18915 |
nullable:true}, |
| 18916 |
statusCode:{check:"Integer", |
| 18917 |
nullable:true}, |
| 18918 |
content:{nullable:true}, |
| 18919 |
responseHeaders:{check:"Object", |
| 18920 |
nullable:true}}, |
| 18921 |
members:{getResponseHeader:function(vHeader){var vAll=this.getResponseHeaders(); |
| 18922 |
if(vAll){return vAll[vHeader]||null; |
| 18923 |
}return null; |
| 18924 |
}, |
| 18925 |
getData:function(){qx.log.Logger.deprecatedMethodWarning(arguments.callee, |
| 18926 |
"This method is no longer needed since the event object is now an instance of the Response class."); |
| 18927 |
return this; |
| 18908 |
}}}); |
18928 |
}}}); |
| 18909 |
|
18929 |
|
| 18910 |
|
18930 |
|
|
Lines 18995-19003
Link Here
|
| 18995 |
}while(i<input.length); |
19015 |
}while(i<input.length); |
| 18996 |
return output; |
19016 |
return output; |
| 18997 |
}; |
19017 |
}; |
| 18998 |
vRequest.onreadystatechange=qx.lang.Function.bind(this._onreadystatechange, |
19018 |
var xxx=qx.lang.Function.bind(this._onreadystatechange, |
| 18999 |
this); |
19019 |
this); |
| 19000 |
if(this.getUsername()){if(this.getUseBasicHttpAuth()){vRequest.open(vMethod, |
19020 |
if(vAsynchronous){vRequest.onreadystatechange=xxx; |
|
|
19021 |
}if(this.getUsername()){if(this.getUseBasicHttpAuth()){vRequest.open(vMethod, |
| 19001 |
vUrl, |
19022 |
vUrl, |
| 19002 |
vAsynchronous); |
19023 |
vAsynchronous); |
| 19003 |
vRequest.setRequestHeader('Authorization', |
19024 |
vRequest.setRequestHeader('Authorization', |
|
Lines 19023-19029
Link Here
|
| 19023 |
"send"); |
19044 |
"send"); |
| 19024 |
this.failed(); |
19045 |
this.failed(); |
| 19025 |
}return; |
19046 |
}return; |
| 19026 |
}if(!vAsynchronous){this._onreadystatechange(); |
19047 |
}if(!vAsynchronous){xxx(); |
| 19027 |
}}, |
19048 |
}}, |
| 19028 |
failedLocally:function(){if(this.getState()==="failed"){return; |
19049 |
failedLocally:function(){if(this.getState()==="failed"){return; |
| 19029 |
}this.warn("Could not load from file: "+this.getUrl()); |
19050 |
}this.warn("Could not load from file: "+this.getUrl()); |
|
Lines 19253-19480
Link Here
|
| 19253 |
}this._form.action=vUrl; |
19274 |
}this._form.action=vUrl; |
| 19254 |
this._form.method=vMethod; |
19275 |
this._form.method=vMethod; |
| 19255 |
this._data.appendChild(document.createTextNode(this.getData())); |
19276 |
this._data.appendChild(document.createTextNode(this.getData())); |
| 19256 |
this._form.submit(); |
19277 |
this._form.submit(); |
| 19257 |
this.setState("sending"); |
19278 |
this.setState("sending"); |
| 19258 |
}, |
|
|
| 19259 |
_onload:function(e){if(this._form.src){return; |
| 19260 |
}this._switchReadyState(qx.io.remote.IframeTransport._numericMap.complete); |
| 19261 |
}, |
| 19262 |
_onreadystatechange:function(e){this._switchReadyState(qx.io.remote.IframeTransport._numericMap[this._frame.readyState]); |
| 19263 |
}, |
| 19264 |
_switchReadyState:function(vReadyState){switch(this.getState()){case "completed":case "aborted":case "failed":case "timeout":this.warn("Ignore Ready State Change"); |
| 19265 |
return; |
| 19266 |
}while(this._lastReadyState<vReadyState){this.setState(qx.io.remote.Exchange._nativeMap[++this._lastReadyState]); |
| 19267 |
}}, |
| 19268 |
setRequestHeader:function(vLabel, |
| 19269 |
vValue){}, |
| 19270 |
getResponseHeader:function(vLabel){return null; |
| 19271 |
}, |
| 19272 |
getResponseHeaders:function(){return {}; |
| 19273 |
}, |
| 19274 |
getStatusCode:function(){return 200; |
| 19275 |
}, |
| 19276 |
getStatusText:function(){return ""; |
| 19277 |
}, |
| 19278 |
getIframeWindow:function(){return qx.html.Iframe.getWindow(this._frame); |
| 19279 |
}, |
| 19280 |
getIframeDocument:function(){return qx.html.Iframe.getDocument(this._frame); |
| 19281 |
}, |
| 19282 |
getIframeBody:function(){return qx.html.Iframe.getBody(this._frame); |
| 19283 |
}, |
| 19284 |
getIframeTextContent:function(){var vBody=this.getIframeBody(); |
| 19285 |
if(!vBody){return null; |
| 19286 |
} |
| 19287 |
if(!vBody.firstChild){return ""; |
| 19288 |
}if(vBody.firstChild.tagName&&vBody.firstChild.tagName.toLowerCase()=="pre"){return vBody.firstChild.innerHTML; |
| 19289 |
}else{return vBody.innerHTML; |
| 19290 |
}}, |
| 19291 |
getIframeHtmlContent:function(){var vBody=this.getIframeBody(); |
| 19292 |
return vBody?vBody.innerHTML:null; |
| 19293 |
}, |
| 19294 |
getFetchedLength:function(){return 0; |
| 19295 |
}, |
| 19296 |
getResponseContent:function(){if(this.getState()!=="completed"){{if(qx.core.Setting.get("qx.ioRemoteDebug")){this.warn("Transfer not complete, ignoring content!"); |
| 19297 |
}}; |
| 19298 |
return null; |
| 19299 |
}{if(qx.core.Setting.get("qx.ioRemoteDebug")){this.debug("Returning content for responseType: "+this.getResponseType()); |
| 19300 |
}}; |
| 19301 |
var vText=this.getIframeTextContent(); |
| 19302 |
switch(this.getResponseType()){case qx.util.Mime.TEXT:{if(qx.core.Setting.get("qx.ioRemoteDebugData")){this.debug("Response: "+this._responseContent); |
| 19303 |
}}; |
| 19304 |
return vText; |
| 19305 |
break; |
| 19306 |
case qx.util.Mime.HTML:vText=this.getIframeHtmlContent(); |
| 19307 |
{if(qx.core.Setting.get("qx.ioRemoteDebugData")){this.debug("Response: "+this._responseContent); |
| 19308 |
}}; |
| 19309 |
return vText; |
| 19310 |
break; |
| 19311 |
case qx.util.Mime.JSON:vText=this.getIframeHtmlContent(); |
| 19312 |
{if(qx.core.Setting.get("qx.ioRemoteDebugData")){this.debug("Response: "+this._responseContent); |
| 19313 |
}}; |
| 19314 |
try{return vText&&vText.length>0?qx.io.Json.parseQx(vText):null; |
| 19315 |
}catch(ex){return this.error("Could not execute json: ("+vText+")", |
| 19316 |
ex); |
| 19317 |
}case qx.util.Mime.JAVASCRIPT:vText=this.getIframeHtmlContent(); |
| 19318 |
{if(qx.core.Setting.get("qx.ioRemoteDebugData")){this.debug("Response: "+this._responseContent); |
| 19319 |
}}; |
| 19320 |
try{return vText&&vText.length>0?window.eval(vText):null; |
| 19321 |
}catch(ex){return this.error("Could not execute javascript: ("+vText+")", |
| 19322 |
ex); |
| 19323 |
}case qx.util.Mime.XML:vText=this.getIframeDocument(); |
| 19324 |
{if(qx.core.Setting.get("qx.ioRemoteDebugData")){this.debug("Response: "+this._responseContent); |
| 19325 |
}}; |
| 19326 |
return vText; |
| 19327 |
default:this.warn("No valid responseType specified ("+this.getResponseType()+")!"); |
| 19328 |
return null; |
| 19329 |
}}}, |
| 19330 |
defer:function(statics, |
| 19331 |
members, |
| 19332 |
properties){qx.io.remote.Exchange.registerType(qx.io.remote.IframeTransport, |
| 19333 |
"qx.io.remote.IframeTransport"); |
| 19334 |
}, |
| 19335 |
destruct:function(){if(this._frame){this._frame.onload=null; |
| 19336 |
this._frame.onreadystatechange=null; |
| 19337 |
if(qx.core.Variant.isSet("qx.client", |
| 19338 |
"gecko")){this._frame.src=qx.io.Alias.getInstance().resolve("static/image/blank.gif"); |
| 19339 |
}document.body.removeChild(this._frame); |
| 19340 |
} |
| 19341 |
if(this._form){document.body.removeChild(this._form); |
| 19342 |
}this._disposeFields("_frame", |
| 19343 |
"_form"); |
| 19344 |
}}); |
| 19345 |
|
| 19346 |
|
| 19347 |
|
| 19348 |
|
| 19349 |
/* ID: qx.io.remote.RequestQueue */ |
| 19350 |
qx.Class.define("qx.io.remote.RequestQueue", |
| 19351 |
{type:"singleton", |
| 19352 |
extend:qx.core.Target, |
| 19353 |
construct:function(){this.base(arguments); |
| 19354 |
this._queue=[]; |
| 19355 |
this._active=[]; |
| 19356 |
this._totalRequests=0; |
| 19357 |
this._timer=new qx.client.Timer(500); |
| 19358 |
this._timer.addEventListener("interval", |
| 19359 |
this._oninterval, |
| 19360 |
this); |
| 19361 |
}, |
| 19362 |
properties:{enabled:{init:true, |
| 19363 |
check:"Boolean", |
| 19364 |
apply:"_applyEnabled"}, |
| 19365 |
maxTotalRequests:{check:"Integer", |
| 19366 |
nullable:true}, |
| 19367 |
maxConcurrentRequests:{check:"Integer", |
| 19368 |
init:3}, |
| 19369 |
defaultTimeout:{check:"Integer", |
| 19370 |
init:5000}}, |
| 19371 |
members:{_debug:function(){var vText=this._active.length+"/"+(this._queue.length+this._active.length); |
| 19372 |
{if(qx.core.Setting.get("qx.ioRemoteDebug")){this.debug("Progress: "+vText); |
| 19373 |
window.status="Request-Queue Progress: "+vText; |
| 19374 |
}}; |
| 19375 |
}, |
| 19376 |
_check:function(){this._debug(); |
| 19377 |
if(this._active.length==0&&this._queue.length==0){this._timer.stop(); |
| 19378 |
}if(!this.getEnabled()){return; |
| 19379 |
}if(this._active.length>=this.getMaxConcurrentRequests()||this._queue.length==0){return; |
| 19380 |
}if(this.getMaxTotalRequests()!=null&&this._totalRequests>=this.getMaxTotalRequests()){return; |
| 19381 |
}var vRequest=this._queue.shift(); |
| 19382 |
var vTransport=new qx.io.remote.Exchange(vRequest); |
| 19383 |
this._totalRequests++; |
| 19384 |
this._active.push(vTransport); |
| 19385 |
this._debug(); |
| 19386 |
vTransport.addEventListener("sending", |
| 19387 |
vRequest._onsending, |
| 19388 |
vRequest); |
| 19389 |
vTransport.addEventListener("receiving", |
| 19390 |
vRequest._onreceiving, |
| 19391 |
vRequest); |
| 19392 |
vTransport.addEventListener("completed", |
| 19393 |
vRequest._oncompleted, |
| 19394 |
vRequest); |
| 19395 |
vTransport.addEventListener("aborted", |
| 19396 |
vRequest._onaborted, |
| 19397 |
vRequest); |
| 19398 |
vTransport.addEventListener("timeout", |
| 19399 |
vRequest._ontimeout, |
| 19400 |
vRequest); |
| 19401 |
vTransport.addEventListener("failed", |
| 19402 |
vRequest._onfailed, |
| 19403 |
vRequest); |
| 19404 |
vTransport.addEventListener("sending", |
| 19405 |
this._onsending, |
| 19406 |
this); |
| 19407 |
vTransport.addEventListener("completed", |
| 19408 |
this._oncompleted, |
| 19409 |
this); |
| 19410 |
vTransport.addEventListener("aborted", |
| 19411 |
this._oncompleted, |
| 19412 |
this); |
| 19413 |
vTransport.addEventListener("timeout", |
| 19414 |
this._oncompleted, |
| 19415 |
this); |
| 19416 |
vTransport.addEventListener("failed", |
| 19417 |
this._oncompleted, |
| 19418 |
this); |
| 19419 |
vTransport._start=(new Date).valueOf(); |
| 19420 |
vTransport.send(); |
| 19421 |
if(this._queue.length>0){this._check(); |
| 19422 |
}}, |
| 19423 |
_remove:function(vTransport){qx.lang.Array.remove(this._active, |
| 19424 |
vTransport); |
| 19425 |
vTransport.dispose(); |
| 19426 |
this._check(); |
| 19427 |
}, |
19279 |
}, |
| 19428 |
_activeCount:0, |
19280 |
_onload:function(e){if(this._form.src){return; |
| 19429 |
_onsending:function(e){{if(qx.core.Setting.get("qx.ioRemoteDebug")){this._activeCount++; |
19281 |
}this._switchReadyState(qx.io.remote.IframeTransport._numericMap.complete); |
| 19430 |
e.getTarget()._counted=true; |
|
|
| 19431 |
this.debug("ActiveCount: "+this._activeCount); |
| 19432 |
}}; |
| 19433 |
}, |
19282 |
}, |
| 19434 |
_oncompleted:function(e){{if(qx.core.Setting.get("qx.ioRemoteDebug")){if(e.getTarget()._counted){this._activeCount--; |
19283 |
_onreadystatechange:function(e){this._switchReadyState(qx.io.remote.IframeTransport._numericMap[this._frame.readyState]); |
| 19435 |
this.debug("ActiveCount: "+this._activeCount); |
|
|
| 19436 |
}}}; |
| 19437 |
this._remove(e.getTarget()); |
| 19438 |
}, |
19284 |
}, |
| 19439 |
_oninterval:function(e){var vActive=this._active; |
19285 |
_switchReadyState:function(vReadyState){switch(this.getState()){case "completed":case "aborted":case "failed":case "timeout":this.warn("Ignore Ready State Change"); |
| 19440 |
if(vActive.length==0){this._timer.stop(); |
|
|
| 19441 |
return; |
19286 |
return; |
| 19442 |
}var vCurrent=(new Date).valueOf(); |
19287 |
}while(this._lastReadyState<vReadyState){this.setState(qx.io.remote.Exchange._nativeMap[++this._lastReadyState]); |
| 19443 |
var vTransport; |
19288 |
}}, |
| 19444 |
var vRequest; |
19289 |
setRequestHeader:function(vLabel, |
| 19445 |
var vDefaultTimeout=this.getDefaultTimeout(); |
19290 |
vValue){}, |
| 19446 |
var vTimeout; |
19291 |
getResponseHeader:function(vLabel){return null; |
| 19447 |
var vTime; |
|
|
| 19448 |
for(var i=vActive.length-1;i>=0;i--){vTransport=vActive[i]; |
| 19449 |
vRequest=vTransport.getRequest(); |
| 19450 |
if(vRequest.isAsynchronous()){vTimeout=vRequest.getTimeout(); |
| 19451 |
if(vTimeout==0){continue; |
| 19452 |
} |
| 19453 |
if(vTimeout==null){vTimeout=vDefaultTimeout; |
| 19454 |
}vTime=vCurrent-vTransport._start; |
| 19455 |
if(vTime>vTimeout){this.warn("Timeout: transport "+vTransport.toHashCode()); |
| 19456 |
this.warn(vTime+"ms > "+vTimeout+"ms"); |
| 19457 |
vTransport.timeout(); |
| 19458 |
}}}}, |
| 19459 |
_applyEnabled:function(value, |
| 19460 |
old){if(value){this._check(); |
| 19461 |
}this._timer.setEnabled(value); |
| 19462 |
}, |
19292 |
}, |
| 19463 |
add:function(vRequest){vRequest.setState("queued"); |
19293 |
getResponseHeaders:function(){return {}; |
| 19464 |
this._queue.push(vRequest); |
19294 |
}, |
| 19465 |
this._check(); |
19295 |
getStatusCode:function(){return 200; |
| 19466 |
if(this.getEnabled()){this._timer.start(); |
19296 |
}, |
|
|
19297 |
getStatusText:function(){return ""; |
| 19298 |
}, |
| 19299 |
getIframeWindow:function(){return qx.html.Iframe.getWindow(this._frame); |
| 19300 |
}, |
| 19301 |
getIframeDocument:function(){return qx.html.Iframe.getDocument(this._frame); |
| 19302 |
}, |
| 19303 |
getIframeBody:function(){return qx.html.Iframe.getBody(this._frame); |
| 19304 |
}, |
| 19305 |
getIframeTextContent:function(){var vBody=this.getIframeBody(); |
| 19306 |
if(!vBody){return null; |
| 19307 |
} |
| 19308 |
if(!vBody.firstChild){return ""; |
| 19309 |
}if(vBody.firstChild.tagName&&vBody.firstChild.tagName.toLowerCase()=="pre"){return vBody.firstChild.innerHTML; |
| 19310 |
}else{return vBody.innerHTML; |
| 19467 |
}}, |
19311 |
}}, |
| 19468 |
abort:function(vRequest){var vTransport=vRequest.getTransport(); |
19312 |
getIframeHtmlContent:function(){var vBody=this.getIframeBody(); |
| 19469 |
if(vTransport){vTransport.abort(); |
19313 |
return vBody?vBody.innerHTML:null; |
| 19470 |
}else if(qx.lang.Array.contains(this._queue, |
19314 |
}, |
| 19471 |
vRequest)){qx.lang.Array.remove(this._queue, |
19315 |
getFetchedLength:function(){return 0; |
| 19472 |
vRequest); |
19316 |
}, |
|
|
19317 |
getResponseContent:function(){if(this.getState()!=="completed"){{if(qx.core.Setting.get("qx.ioRemoteDebug")){this.warn("Transfer not complete, ignoring content!"); |
| 19318 |
}}; |
| 19319 |
return null; |
| 19320 |
}{if(qx.core.Setting.get("qx.ioRemoteDebug")){this.debug("Returning content for responseType: "+this.getResponseType()); |
| 19321 |
}}; |
| 19322 |
var vText=this.getIframeTextContent(); |
| 19323 |
switch(this.getResponseType()){case qx.util.Mime.TEXT:{if(qx.core.Setting.get("qx.ioRemoteDebugData")){this.debug("Response: "+this._responseContent); |
| 19324 |
}}; |
| 19325 |
return vText; |
| 19326 |
break; |
| 19327 |
case qx.util.Mime.HTML:vText=this.getIframeHtmlContent(); |
| 19328 |
{if(qx.core.Setting.get("qx.ioRemoteDebugData")){this.debug("Response: "+this._responseContent); |
| 19329 |
}}; |
| 19330 |
return vText; |
| 19331 |
break; |
| 19332 |
case qx.util.Mime.JSON:vText=this.getIframeHtmlContent(); |
| 19333 |
{if(qx.core.Setting.get("qx.ioRemoteDebugData")){this.debug("Response: "+this._responseContent); |
| 19334 |
}}; |
| 19335 |
try{return vText&&vText.length>0?qx.io.Json.parseQx(vText):null; |
| 19336 |
}catch(ex){return this.error("Could not execute json: ("+vText+")", |
| 19337 |
ex); |
| 19338 |
}case qx.util.Mime.JAVASCRIPT:vText=this.getIframeHtmlContent(); |
| 19339 |
{if(qx.core.Setting.get("qx.ioRemoteDebugData")){this.debug("Response: "+this._responseContent); |
| 19340 |
}}; |
| 19341 |
try{return vText&&vText.length>0?window.eval(vText):null; |
| 19342 |
}catch(ex){return this.error("Could not execute javascript: ("+vText+")", |
| 19343 |
ex); |
| 19344 |
}case qx.util.Mime.XML:vText=this.getIframeDocument(); |
| 19345 |
{if(qx.core.Setting.get("qx.ioRemoteDebugData")){this.debug("Response: "+this._responseContent); |
| 19346 |
}}; |
| 19347 |
return vText; |
| 19348 |
default:this.warn("No valid responseType specified ("+this.getResponseType()+")!"); |
| 19349 |
return null; |
| 19473 |
}}}, |
19350 |
}}}, |
| 19474 |
destruct:function(){this._disposeObjectDeep("_active", |
19351 |
defer:function(statics, |
| 19475 |
1); |
19352 |
members, |
| 19476 |
this._disposeObjects("_timer"); |
19353 |
properties){qx.io.remote.Exchange.registerType(qx.io.remote.IframeTransport, |
| 19477 |
this._disposeFields("_queue"); |
19354 |
"qx.io.remote.IframeTransport"); |
|
|
19355 |
}, |
| 19356 |
destruct:function(){if(this._frame){this._frame.onload=null; |
| 19357 |
this._frame.onreadystatechange=null; |
| 19358 |
if(qx.core.Variant.isSet("qx.client", |
| 19359 |
"gecko")){this._frame.src=qx.io.Alias.getInstance().resolve("static/image/blank.gif"); |
| 19360 |
}document.body.removeChild(this._frame); |
| 19361 |
} |
| 19362 |
if(this._form){document.body.removeChild(this._form); |
| 19363 |
}this._disposeFields("_frame", |
| 19364 |
"_form"); |
| 19478 |
}}); |
19365 |
}}); |
| 19479 |
|
19366 |
|
| 19480 |
|
19367 |
|
|
Lines 19680-19685
Link Here
|
| 19680 |
|
19567 |
|
| 19681 |
|
19568 |
|
| 19682 |
|
19569 |
|
|
|
19570 |
/* ID: qx.io.remote.RequestQueue */ |
| 19571 |
qx.Class.define("qx.io.remote.RequestQueue", |
| 19572 |
{type:"singleton", |
| 19573 |
extend:qx.core.Target, |
| 19574 |
construct:function(){this.base(arguments); |
| 19575 |
this._queue=[]; |
| 19576 |
this._active=[]; |
| 19577 |
this._totalRequests=0; |
| 19578 |
this._timer=new qx.client.Timer(500); |
| 19579 |
this._timer.addEventListener("interval", |
| 19580 |
this._oninterval, |
| 19581 |
this); |
| 19582 |
}, |
| 19583 |
properties:{enabled:{init:true, |
| 19584 |
check:"Boolean", |
| 19585 |
apply:"_applyEnabled"}, |
| 19586 |
maxTotalRequests:{check:"Integer", |
| 19587 |
nullable:true}, |
| 19588 |
maxConcurrentRequests:{check:"Integer", |
| 19589 |
init:3}, |
| 19590 |
defaultTimeout:{check:"Integer", |
| 19591 |
init:5000}}, |
| 19592 |
members:{_debug:function(){var vText=this._active.length+"/"+(this._queue.length+this._active.length); |
| 19593 |
{if(qx.core.Setting.get("qx.ioRemoteDebug")){this.debug("Progress: "+vText); |
| 19594 |
window.status="Request-Queue Progress: "+vText; |
| 19595 |
}}; |
| 19596 |
}, |
| 19597 |
_check:function(){this._debug(); |
| 19598 |
if(this._active.length==0&&this._queue.length==0){this._timer.stop(); |
| 19599 |
}if(!this.getEnabled()){return; |
| 19600 |
}if((this._queue.length>0&&this._queue[0].isAsynchronous()&&this._active.length>=this.getMaxConcurrentRequests())||this._queue.length==0){return; |
| 19601 |
}if(this.getMaxTotalRequests()!=null&&this._totalRequests>=this.getMaxTotalRequests()){return; |
| 19602 |
}var vRequest=this._queue.shift(); |
| 19603 |
var vTransport=new qx.io.remote.Exchange(vRequest); |
| 19604 |
this._totalRequests++; |
| 19605 |
this._active.push(vTransport); |
| 19606 |
this._debug(); |
| 19607 |
vTransport.addEventListener("sending", |
| 19608 |
vRequest._onsending, |
| 19609 |
vRequest); |
| 19610 |
vTransport.addEventListener("receiving", |
| 19611 |
vRequest._onreceiving, |
| 19612 |
vRequest); |
| 19613 |
vTransport.addEventListener("completed", |
| 19614 |
vRequest._oncompleted, |
| 19615 |
vRequest); |
| 19616 |
vTransport.addEventListener("aborted", |
| 19617 |
vRequest._onaborted, |
| 19618 |
vRequest); |
| 19619 |
vTransport.addEventListener("timeout", |
| 19620 |
vRequest._ontimeout, |
| 19621 |
vRequest); |
| 19622 |
vTransport.addEventListener("failed", |
| 19623 |
vRequest._onfailed, |
| 19624 |
vRequest); |
| 19625 |
vTransport.addEventListener("sending", |
| 19626 |
this._onsending, |
| 19627 |
this); |
| 19628 |
vTransport.addEventListener("completed", |
| 19629 |
this._oncompleted, |
| 19630 |
this); |
| 19631 |
vTransport.addEventListener("aborted", |
| 19632 |
this._oncompleted, |
| 19633 |
this); |
| 19634 |
vTransport.addEventListener("timeout", |
| 19635 |
this._oncompleted, |
| 19636 |
this); |
| 19637 |
vTransport.addEventListener("failed", |
| 19638 |
this._oncompleted, |
| 19639 |
this); |
| 19640 |
vTransport._start=(new Date).valueOf(); |
| 19641 |
vTransport.send(); |
| 19642 |
if(this._queue.length>0){this._check(); |
| 19643 |
}}, |
| 19644 |
_remove:function(vTransport){qx.lang.Array.remove(this._active, |
| 19645 |
vTransport); |
| 19646 |
vTransport.dispose(); |
| 19647 |
this._check(); |
| 19648 |
}, |
| 19649 |
_activeCount:0, |
| 19650 |
_onsending:function(e){{if(qx.core.Setting.get("qx.ioRemoteDebug")){this._activeCount++; |
| 19651 |
e.getTarget()._counted=true; |
| 19652 |
this.debug("ActiveCount: "+this._activeCount); |
| 19653 |
}}; |
| 19654 |
}, |
| 19655 |
_oncompleted:function(e){{if(qx.core.Setting.get("qx.ioRemoteDebug")){if(e.getTarget()._counted){this._activeCount--; |
| 19656 |
this.debug("ActiveCount: "+this._activeCount); |
| 19657 |
}}}; |
| 19658 |
this._remove(e.getTarget()); |
| 19659 |
}, |
| 19660 |
_oninterval:function(e){var vActive=this._active; |
| 19661 |
if(vActive.length==0){this._timer.stop(); |
| 19662 |
return; |
| 19663 |
}var vCurrent=(new Date).valueOf(); |
| 19664 |
var vTransport; |
| 19665 |
var vRequest; |
| 19666 |
var vDefaultTimeout=this.getDefaultTimeout(); |
| 19667 |
var vTimeout; |
| 19668 |
var vTime; |
| 19669 |
for(var i=vActive.length-1;i>=0;i--){vTransport=vActive[i]; |
| 19670 |
vRequest=vTransport.getRequest(); |
| 19671 |
if(vRequest.isAsynchronous()){vTimeout=vRequest.getTimeout(); |
| 19672 |
if(vTimeout==0){continue; |
| 19673 |
} |
| 19674 |
if(vTimeout==null){vTimeout=vDefaultTimeout; |
| 19675 |
}vTime=vCurrent-vTransport._start; |
| 19676 |
if(vTime>vTimeout){this.warn("Timeout: transport "+vTransport.toHashCode()); |
| 19677 |
this.warn(vTime+"ms > "+vTimeout+"ms"); |
| 19678 |
vTransport.timeout(); |
| 19679 |
}}}}, |
| 19680 |
_applyEnabled:function(value, |
| 19681 |
old){if(value){this._check(); |
| 19682 |
}this._timer.setEnabled(value); |
| 19683 |
}, |
| 19684 |
add:function(vRequest){vRequest.setState("queued"); |
| 19685 |
if(vRequest.isAsynchronous())this._queue.push(vRequest); |
| 19686 |
else this._queue.unshift(vRequest); |
| 19687 |
this._check(); |
| 19688 |
if(this.getEnabled()){this._timer.start(); |
| 19689 |
}}, |
| 19690 |
abort:function(vRequest){var vTransport=vRequest.getTransport(); |
| 19691 |
if(vTransport){vTransport.abort(); |
| 19692 |
}else if(qx.lang.Array.contains(this._queue, |
| 19693 |
vRequest)){qx.lang.Array.remove(this._queue, |
| 19694 |
vRequest); |
| 19695 |
}}}, |
| 19696 |
destruct:function(){this._disposeObjectDeep("_active", |
| 19697 |
1); |
| 19698 |
this._disposeObjects("_timer"); |
| 19699 |
this._disposeFields("_queue"); |
| 19700 |
}}); |
| 19701 |
|
| 19702 |
|
| 19703 |
|
| 19704 |
|
| 19683 |
/* ID: qx.ui.embed.Iframe */ |
19705 |
/* ID: qx.ui.embed.Iframe */ |
| 19684 |
qx.Class.define("qx.ui.embed.Iframe", |
19706 |
qx.Class.define("qx.ui.embed.Iframe", |
| 19685 |
{extend:qx.ui.basic.Terminator, |
19707 |
{extend:qx.ui.basic.Terminator, |