⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 chartcomponent.js

📁 DWR is the way for AJAX implementation
💻 JS
字号:
/* * Copyright (c) 2001-2007, TIBCO Software Inc. * Use, modification, and distribution subject to terms of license. */jsx3.require("jsx3.gui.Block");jsx3.Class.defineClass("jsx3.chart.ChartComponent",jsx3.gui.Block,null,function(n,q){var oc=jsx3.gui.Event;var nc=jsx3.gui.Interactive;var Fb=jsx3.vector;var zb=jsx3.chart;n.Fd={};n.MASK_PROPS_NOEDIT={NN:false,SS:false,EE:false,WW:false,MM:false};n.MASK_PROPS_ALLEDIT={NN:true,SS:true,EE:true,WW:true,MM:true};n.MASK_PROPS_ALLEDITREL={NN:false,SS:true,EE:true,WW:false,MM:false};q.init=function(p){this.jsxsuper(p);this.hC=null;this.pg=null;};q.getChart=function(){return this.findAncestor(function(i){return zb.Chart&&i instanceof zb.Chart;},true);};q.l5=function(){if(this.hC==null)this.updateView();return this.hC;};if(jsx3.CLASS_LOADER.VML){q.paint=function(){var lc=zb.LOG_BENCH.isLoggable(jsx3.util.Logger.TRACE);if(this.hC==null){if(lc)zb.LOG_BENCH.trace("paint() update view - "+this.getId());this.updateView();}if(lc)zb.LOG_BENCH.trace("paint() serializing - "+this.getId());var z=this.hC.paint();if(lc)zb.LOG_BENCH.trace("paint() done - "+this.getId());return z;};q.repaint=function(){this.updateView();var Cb=this.jsxsuper();var Ic=this.getChart();if(Ic!=null){var P=Ic.getRendered();if(P!=null){var Ub=P.style.zIndex;if(Ub==null)Ub=0;P.style.zIndex=Ub+1;P.style.zIndex=Ub;}}return Cb;};}else{if(jsx3.CLASS_LOADER.SVG){q.isDomPaint=function(){return true;};q.paint=function(){throw new jsx3.Exception();};q.paintDom=function(){if(this.hC==null)this.updateView();return this.hC.paintDom();};q.repaint=function(){this.updateView();return this.jsxsuper();};}}q.doClone=function(p){this.hC=null;this.pg=null;return this.jsxsuper(p);};q.updateView=function(){this.applyDynamicProperties();var cc=null,N=null;if(this.hC!=null){N=this.hC;cc=N.getParent();}this.hC=this.lL().newInstance();this.hC.setId(this.getId());this.hC.setDimensions(this.getDimensions());this.hC.setZIndex(this.getZIndex());this.hC.setPosition(this.getRelativePosition()?"relative":"absolute");var xb=this.getAttributes();for(var R in xb)this.hC.setProperty(R,xb[R]);if(cc!=null){cc.replaceChild(this.hC,N);}if(N!=null)N.release();};q.lL=function(){return Fb.Group.jsxclass;};q.A3=function(p){if(p==null)p=this.hC;var mc={};if(this.getMenu()!=null)mc[oc.MOUSEUP]=true;if(this.hasEvent(nc.SELECT))mc[oc.CLICK]=true;if(this.hasEvent(nc.EXECUTE))mc[oc.DOUBLECLICK]=true;if(this.hasEvent(nc.SPYGLASS)){mc[oc.MOUSEOVER]="doSpyOver";mc[oc.MOUSEOUT]="doSpyOut";}this.lM(mc,p);};n.Jn="kE";if(jsx3.CLASS_LOADER.VML){q.lM=function(k,s){for(var x=0;x<nc.s5.length;x++){var Eb=nc.s5[x];var P="on"+Eb;var yc=[];var Jc=this.getAttribute(P);if(Jc){yc.push(Jc.replace(/\"/g,"&quot;"));if(!Jc.match(/;\s*$/))yc.push(";");}var O=k[Eb];if(O){if(typeof(O)!="string")O=nc.F5[Eb];yc.push("jsx3.GO('"+this.getId()+"')."+n.Jn+"(event,this,'"+O+"');");}if(yc.length>0)s.setProperty(P,yc.join(""));}};}else{if(jsx3.CLASS_LOADER.SVG){q.lM=function(h,p){var fc=h[oc.DOUBLECLICK];var ub=false;var Mc="lz";for(var Lb=0;Lb<nc.s5.length;Lb++){var Ob=nc.s5[Lb];if(Ob==oc.DOUBLECLICK)continue;var vc="on"+Ob;var vb=[];var O=this.getAttribute(vc);if(O){vb.push(O.replace(/\"/g,"&quot;"));if(!O.match(/;\s*$/))vb.push(";");}var wb=h[Ob];if(wb){if(Ob==oc.CLICK&&fc){vb.push("jsx3.GO('"+this.getId()+"')."+Mc+"(evt,this,true,true);");ub=true;}else{if(typeof(wb)!="string")wb=nc.F5[Ob];vb.push("jsx3.GO('"+this.getId()+"')."+n.Jn+"(evt,this,'"+wb+"');");}}if(vb.length>0)p.setProperty(vc,vb.join(""));}if(fc&&!ub)p.setProperty("onclick","jsx3.GO('"+this.getId()+"')."+Mc+"(evt,this,false,true);");};n.Cp=200;q.lz=function(k,e,j,d){var Q=k.detail>1;var W=nc.F5[Q?oc.DOUBLECLICK:oc.CLICK];var wc=this[W];var Y=jsx3.gui.Event.wrap(k);if(wc){if(!Q&&d){var rb=this;this._jsxPq=window.setTimeout(function(){delete rb._jsxPq;wc.call(rb,Y,e);},n.Cp);}else{if(this._jsxPq)window.clearTimeout(this._jsxPq);wc.call(this,Y,e);}}else{throw new jsx3.Exception("no bridge method '"+W+"' for event type '"+Y.getType()+"' on DOM object of id "+this.getId());}};}}q.AV=function(c){var mb=this.getBackgroundColor();if(mb!=null&&mb.match(/\S/)){var yc=c.getFirstChildOfType(Fb.Fill);if(yc==null){yc=new Fb.Fill();c.setFill(yc);}yc.setColor(mb);if(typeof(this.getAlpha)=="function")yc.setAlpha(this.getAlpha());}else{c.setFill(null);}};q.E_=function(a){var L=this.getBorderColor();if(L!=null&&L.match(/\S/)){var lc=a.getFirstChildOfType(Fb.Stroke);if(lc==null){lc=new Fb.Stroke();a.setStroke(lc);}lc.setColor(L);if(typeof(this.getBorderAlpha)=="function")lc.setAlpha(this.getBorderAlpha());if(typeof(this.getBorderWidth)=="function")lc.setWidth(this.getBorderWidth());}else{a.setStroke(null);}};q.uR=function(c,r){this[c]=r;this["_"+c+"_eval"]=null;};q.d8=function(a,h){if(h==null)h="object";var Xb="_"+a+"_eval";if(!this[Xb]&&this[a]){try{var bc=this.eval("var f = "+this[a]+"; f;");this[Xb]=bc;if(typeof(this[Xb])!=h){zb.LOG.error("error evaluating '"+a+"', "+this[Xb]+" is not of type "+h);this[Xb]=n.Fd;}}catch(Kc){Kc=jsx3.NativeError.wrap(Kc);this[Xb]=n.Fd;zb.LOG.error("error evaluating "+h+" field '"+a,Kc);}}return this[Xb]!=n.Fd?this[Xb]:null;};q.o_=function(r){return this.d8(r,"function");};q.toString=function(){return "[ChartComponent '"+this.getName()+"']";};q.xI=function(l,g){if(this.pg==null)this.pg={};this.pg[l]=g;};q.Q0=function(e){return this.pg!=null?this.pg[e]:null;};q.qX=function(r){if(this.pg!=null)delete this.pg[r];};q.getMaskProperties=function(){return n.MASK_PROPS_NOEDIT;};q.setLeft=function(k,o){this.jsxsuper(k,o);if(this.hC!=null&&this.getRelativePosition()==jsx3.gui.Block.ABSOLUTE)this.hC.setLeft(k);return this;};q.setTop=function(k,h){this.jsxsuper(k,h);if(this.hC!=null&&this.getRelativePosition()==jsx3.gui.Block.ABSOLUTE)this.hC.setTop(k);return this;};q.setWidth=function(p,d){this.jsxsuper(p);if(this.hC!=null){this.hC.setWidth(p);if(d)this.repaint();}return this;};q.setHeight=function(g,c){this.jsxsuper(g);if(this.hC!=null){this.hC.setHeight(g);if(c)this.repaint();}return this;};q.setRelativePosition=function(b,r){this.jsxsuper(b,r);if(this.hC!=null){if(b==jsx3.gui.Block.RELATIVE){this.hC.setPosition("relative");this.hC.setLeft(0);this.hC.setTop(0);}else{this.hC.setPosition("absolute");this.hC.setLeft(this.getLeft());this.hC.setTop(this.getTop());}}return this;};q.getMarginDimensions=function(){return this.nR(this.getMargin());};q.getPaddingDimensions=function(){return this.nR(this.getPadding());};q.nR=function(h){if(h){if(typeof(h)=="number"){return [h,h,h,h];}else{var N=(""+h).split(/\D+/);if(N[0]==="")N.shift();if(N.length>0&&N[N.length]==="")N.pop();if(N.length>=4){return [parseInt(N[0]),parseInt(N[1]),parseInt(N[2]),parseInt(N[3])];}else{if(N.length>=1){var hb=parseInt(N[0]);return [hb,hb,hb,hb];}}}}return [0,0,0,0];};q.getCanSpy=function(){return true;};n.getVersion=function(){return zb.q2;};});

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -