/*
 * Copyright (c) 2001-2007, TIBCO Software Inc.
 * Use, modification, and distribution subject to terms of license.
 */
jsx3.require("jsx3.chart.ChartComponent");jsx3.Class.defineClass("jsx3.chart.Series",jsx3.chart.ChartComponent,null,function(m,p){var db=jsx3.gui.Interactive;var Ac=jsx3.vector;var T=jsx3.chart;p.init=function(r,n){this.jsxsuper(r);this.seriesName=n;this.usePrimaryX=jsx3.Boolean.TRUE;this.usePrimaryY=jsx3.Boolean.TRUE;this.stroke=null;this.fill=null;this.fillGradient=null;this.tooltipFunction=null;};p.getSeriesName=function(){return this.seriesName;};p.setSeriesName=function(b){this.seriesName=b;};p.getUsePrimaryX=function(){return this.usePrimaryX;};p.setUsePrimaryX=function(l){this.usePrimaryX=l;};p.getUsePrimaryY=function(){return this.usePrimaryY;};p.setUsePrimaryY=function(d){this.usePrimaryY=d;};p.setTooltipFunction=function(b){this.uR("tooltipFunction",b);};p.getTooltipFunction=function(){return this.o_("tooltipFunction");};p.getIndex=function(){var nb=this.getChart();return nb!=null?nb.getSeriesIndex(this):-1;};p.getStroke=function(){return this.stroke;};p.setStroke=function(r){this.stroke=r;};p.getFill=function(){return this.fill;};p.setFill=function(g){this.fill=g;};p.getFillGradient=function(){return this.fillGradient;};p.setFillGradient=function(q){this.fillGradient=q;};p.getXAxis=function(){var hc=this.getChart();if(hc!=null){return this.usePrimaryX?hc.getPrimaryXAxis():hc.getSecondaryXAxis();}return null;};p.getYAxis=function(){var cc=this.getChart();if(cc!=null){return this.usePrimaryY?cc.getPrimaryYAxis():cc.getSecondaryYAxis();}return null;};p.VT=function(){var sb=Math.max(this.getIndex(),0)%T.Chart.DEFAULT_FILLS.length;return T.Chart.DEFAULT_FILLS[sb];};p.JM=function(){var yb=Math.max(this.getIndex(),0)%T.Chart.DEFAULT_FILLS.length;if(T.Chart.DEFAULT_STROKES[yb]==null){var Cc=this.VT();T.Chart.DEFAULT_STROKES[yb]=new Ac.Stroke(Cc.getColor(),1,Cc.getAlpha());}return T.Chart.DEFAULT_STROKES[yb];};p.D7=function(){var _=this.fill?Ac.Fill.valueOf(this.fill):this.VT();if(_!=null){_=T.addGradient(_,this.fillGradient);}return _;};p.qT=function(h){if(this.stroke){return Ac.Stroke.valueOf(this.stroke);}else{if(this.getColorFunction()!=null){return null;}else{if(h!=null&&h.KJ()){return new Ac.Stroke(h.getColor());}else{if(!this.fill)return this.JM(h);else return null;}}}};p.getColorFunction=function(){return this.o_("colorFunction");};p.setColorFunction=function(k){this.uR("colorFunction",k);};p.getLegendRenderer=function(){return T.PointRenderer.BOX;};p.getLabel=function(){return T.ChartLabel?this.getFirstChildOfType(T.ChartLabel):null;};p.onSetChild=function(f){return (T.ChartLabel&&f instanceof T.ChartLabel)&&this.getLabel()==null;};p.onSetParent=function(c){return T.Chart&&c instanceof T.Chart;};p.A3=function(k,r,h){if(k==null)k=this.l5();if(h!=null)k.setProperty("strRecordId",h);if(r!=null)k.setProperty("recordIndex",r);this.jsxsuper(k);};p.IU=function(l,a){var Sb=a.getAttribute("recordIndex");var u=a.getAttribute("strRecordId");this.doEvent(jsx3.gui.Interactive.SELECT,{objEVENT:l,intINDEX:Sb,strRECORDID:u});};p.LH=function(e,h){var tc=h.getAttribute("recordIndex");var E=h.getAttribute("strRecordId");this.doEvent(jsx3.gui.Interactive.EXECUTE,{objEVENT:e,intINDEX:tc,strRECORDID:E});};p.doSpyOver=function(j,c){var y=c.getAttribute("recordIndex");var V=c.getAttribute("strRecordId");this.jsxsupermix(j,c,{objEVENT:j,intINDEX:y,strRECORDID:V});};p._4=function(h,e){var kb=e.getAttribute("recordIndex");var sc=e.getAttribute("strRecordId");var nb;if(h.rightButton()&&(nb=this.getMenu())!=null){var O=this.getServer().getJSXByName(nb);if(O!=null){var Qb={objEVENT:h,objMENU:O,intINDEX:kb,strRECORDID:sc};var Yb=this.doEvent(db.MENU,Qb);if(Yb!==false){if(Yb instanceof Object&&Yb.objMENU instanceof jsx3.gui.Menu)O=Yb.objMENU;O.showContextMenu(h,this,kb);}}}};p.toString=function(){return "[Series '"+this.getName()+"']";};m.getVersion=function(){return T.q2;};});
