Examples of KpiInterval


Examples of it.eng.spagobi.engines.chart.bo.charttypes.utils.KpiInterval

          SourceBean param = (SourceBean)paramSBA.getValue();
          String min= (String)param.getAttribute(MIN_INTERVAL);
          String max= (String)param.getAttribute(MAX_INTERVAL);
          String col= (String)param.getAttribute(COLOR_INTERVAL);

          KpiInterval interval=new KpiInterval();
          interval.setMin(Double.valueOf(min).doubleValue());
          interval.setMax(Double.valueOf(max).doubleValue());

          Color color=new Color(Integer.decode(col).intValue());
          if(color!=null){
            interval.setColor(color);}
          else{
            // sets default color
            interval.setColor(Color.white);
          }
          addInterval(interval);
        }
      }
    }

    else{
      String increment=(String)sbRow.getAttribute(INCREMENT);
      String minorTickCount=(String)sbRow.getAttribute(MINOR_TICK);

      String orientation="";
      if(sbRow.getAttribute(ORIENTATION)!=null){
        orientation=(String)sbRow.getAttribute(ORIENTATION);
        if(orientation.equalsIgnoreCase("vertical")){
          horizontalView=false;
          horizontalViewConfigured=true;
        }
        else if (orientation.equalsIgnoreCase("horizontal")){
          horizontalView=true;
          horizontalViewConfigured=true;
        }
      }


      setIncrement(Double.valueOf(increment).doubleValue());
      setMinorTickCount(Integer.valueOf(minorTickCount).intValue());     



      String intervalsNumber=(String)sbRow.getAttribute(INTERVALS_NUMBER);
      if(intervalsNumber==null || intervalsNumber.equals("") || intervalsNumber.equals("0")){ // if intervals are not specified
        /*KpiInterval interval=new KpiInterval();
      interval.setMin(getLower());
      interval.setMax(getUpper());
      interval.setColor(Color.WHITE);
      addInterval(interval);*/
      }
      else{
        for(int i=1;i<=Integer.valueOf(intervalsNumber).intValue();i++){
          KpiInterval interval=new KpiInterval();
          String min=(String)sbRow.getAttribute("min"+(new Integer(i)).toString());
          String max=(String)sbRow.getAttribute("max"+(new Integer(i)).toString());
          String col=(String)sbRow.getAttribute("color"+(new Integer(i)).toString());
          interval.setMin(Double.valueOf(min).doubleValue());
          interval.setMax(Double.valueOf(max).doubleValue());
          Color color=new Color(Integer.decode(col).intValue());
          interval.setColor(color);
          addInterval(interval);

        }
      }

View Full Code Here

Examples of it.eng.spagobi.engines.chart.bo.charttypes.utils.KpiInterval

          -50.0, increment, minorTickCount);
    }

    // sets intervals
    for (Iterator iterator = intervals.iterator(); iterator.hasNext();) {
      KpiInterval interval = (KpiInterval) iterator.next();
      StandardDialRange range = new StandardDialRange(interval.getMin(), interval.getMax(),
          interval.getColor());
      range.setInnerRadius(0.70);
      range.setOuterRadius(0.75);
      plot.addLayer(range);

    }
View Full Code Here

Examples of it.eng.spagobi.engines.chart.bo.charttypes.utils.KpiInterval

    else plot.setUnits(ThermometerPlot.UNITS_NONE);


    // set subranges 
    for (Iterator iterator = intervals.iterator(); iterator.hasNext();){
      KpiInterval subrange = (KpiInterval) iterator.next();
      int range=0;
      if(subrange.getLabel().equalsIgnoreCase(NORMAL))range=(ThermometerPlot.NORMAL);
      else if(subrange.getLabel().equalsIgnoreCase(WARNING))range=(ThermometerPlot.WARNING);
      else if(subrange.getLabel().equalsIgnoreCase(CRITICAL))range=(ThermometerPlot.CRITICAL);

      plot.setSubrange(range, subrange.getMin(), subrange.getMax());
      if(subrange.getColor()!=null){
        plot.setSubrangePaint(range, subrange.getColor());
      }
      //plot.setDisplayRange(subrange.getRange(), subrange.getLower(), subrange.getUpper()); 
    }
    //plot.setFollowDataInSubranges(true);
    logger.debug("OUT");
View Full Code Here

Examples of it.eng.spagobi.engines.chart.bo.charttypes.utils.KpiInterval

      DialCap cap = new DialCap();
      plot.setCap(cap);
 
      // sets intervals
      for (Iterator iterator = intervals.iterator(); iterator.hasNext();) {
        KpiInterval interval = (KpiInterval) iterator.next();
        StandardDialRange range = new StandardDialRange(interval.getMin(), interval.getMax(),
            interval.getColor());
        range.setInnerRadius(0.50);
        range.setOuterRadius(0.85);
       
        range.setPaint(interval.getColor());
       
        plot.addLayer(range);
 
      }
View Full Code Here

Examples of it.eng.spagobi.engines.chart.bo.charttypes.utils.KpiInterval

        intervalsAttrsList = intervalsSB.getContainedSourceBeanAttributes();
      }

      if(intervalsAttrsList==null || intervalsAttrsList.isEmpty()){ // if intervals are not defined realize a single interval
        logger.warn("intervals not defined; default settings");
        KpiInterval interval=new KpiInterval();
        interval.setMin(getLower());
        interval.setMax(getUpper());
        interval.setColor(Color.WHITE);
        addInterval(interval);
      }
      else

        Iterator intervalsAttrsIter = intervalsAttrsList.iterator();
        while(intervalsAttrsIter.hasNext()) {
          SourceBeanAttribute paramSBA = (SourceBeanAttribute)intervalsAttrsIter.next();
          SourceBean param = (SourceBean)paramSBA.getValue();
          String min= (String)param.getAttribute("min");
          String max= (String)param.getAttribute("max");
          String col= (String)param.getAttribute("color");

          KpiInterval interval=new KpiInterval();
          interval.setMin(Double.valueOf(min).doubleValue());
          interval.setMax(Double.valueOf(max).doubleValue());

          Color color=new Color(Integer.decode(col).intValue());
          if(color!=null){
            interval.setColor(color);}
          else{
            // sets default color
            interval.setColor(Color.WHITE);
          }
          addInterval(interval);
        }
      }
    }
    else{
      logger.debug("configuration defined in LOV"+confDataset);
      String increment=(String)sbRow.getAttribute("increment");
      String minorTickCount=(String)sbRow.getAttribute("minor_tick");
      setIncrement(Double.valueOf(increment).doubleValue());
      setMinorTickCount(Integer.valueOf(minorTickCount).intValue());


      String intervalsNumber=(String)sbRow.getAttribute("intervals_number");
      if(intervalsNumber==null || intervalsNumber.equals("") || intervalsNumber.equals("0")){ // if intervals are not specified
        KpiInterval interval=new KpiInterval();
        interval.setMin(getLower());
        interval.setMax(getUpper());
        interval.setColor(Color.WHITE);
        addInterval(interval);
      }
      else{
        for(int i=1;i<=Integer.valueOf(intervalsNumber).intValue();i++){
          KpiInterval interval=new KpiInterval();
          String min=(String)sbRow.getAttribute("min"+(new Integer(i)).toString());
          String max=(String)sbRow.getAttribute("max"+(new Integer(i)).toString());
          String col=(String)sbRow.getAttribute("color"+(new Integer(i)).toString());
          interval.setMin(Double.valueOf(min).doubleValue());
          interval.setMax(Double.valueOf(max).doubleValue());
          Color color=new Color(Integer.decode(col).intValue());
          interval.setColor(color);
          addInterval(interval);

        }
      }
    }
View Full Code Here

Examples of it.eng.spagobi.engines.chart.bo.charttypes.utils.KpiInterval

    DialCap cap = new DialCap();
    plot.setCap(cap);

    // sets intervals
    for (Iterator iterator = intervals.iterator(); iterator.hasNext();) {
      KpiInterval interval = (KpiInterval) iterator.next();
      StandardDialRange range = new StandardDialRange(interval.getMin(), interval.getMax(),
          interval.getColor());
      range.setInnerRadius(0.52);
      range.setOuterRadius(0.55);
      plot.addLayer(range);

    }
View Full Code Here

Examples of it.eng.spagobi.engines.chart.bo.charttypes.utils.KpiInterval

    List confAttrsList = confSB.getAttributeAsList(INTERVAL);
    if (!confAttrsList.isEmpty()){
      Iterator it = confAttrsList.iterator();
      while(it.hasNext()){
        SourceBean param = (SourceBean)it.next();
        KpiInterval interval=new KpiInterval();
        String min=(String)param.getAttribute(MIN_INTERVAL);
        String max=(String)param.getAttribute(MAX_INTERVAL);
        String col=(String)param.getAttribute(COLOR_INTERVAL);
        interval.setMin(Double.valueOf(min).doubleValue());
        interval.setMax(Double.valueOf(max).doubleValue());
        Color color=new Color(Integer.decode(col).intValue());
        interval.setColor(color);
        this.intervals.add(interval);
      }
    }     
    logger.debug("OUT");
  }
View Full Code Here

Examples of it.eng.spagobi.engines.chart.bo.charttypes.utils.KpiInterval

          plot.addRangeMarker(marker, Layer.FOREGROUND);
        }
       
        //sets different marks
        for (Iterator iterator = intervals.iterator(); iterator.hasNext();) {
      KpiInterval interval = (KpiInterval) iterator.next();
      // add the marks
            IntervalMarker marker = new IntervalMarker(interval.getMin(), interval.getMax(), interval.getColor());
            plot.addRangeMarker(marker, Layer.BACKGROUND);
      logger.debug("Added new interval to the plot");
    }
       
        // customize axes
View Full Code Here

Examples of it.eng.spagobi.engines.chart.bo.charttypes.utils.KpiInterval

        intervalsAttrsList = intervalsSB.getContainedSourceBeanAttributes();
      }

      if(intervalsAttrsList==null || intervalsAttrsList.isEmpty()){ // if intervals are not defined realize a single interval
        logger.warn("intervals not defined; default settings");
        KpiInterval interval=new KpiInterval();
        interval.setMin(getLower());
        interval.setMax(getUpper());
        interval.setColor(Color.WHITE);
        addInterval(interval);
      }
      else

        Iterator intervalsAttrsIter = intervalsAttrsList.iterator();
        while(intervalsAttrsIter.hasNext()) {
          SourceBeanAttribute paramSBA = (SourceBeanAttribute)intervalsAttrsIter.next();
          SourceBean param = (SourceBean)paramSBA.getValue();
          String min= (String)param.getAttribute(MIN_INTERVAL);
          String max= (String)param.getAttribute(MAX_INTERVAL);
          String col= (String)param.getAttribute(COLOR_INTERVAL);

          KpiInterval interval=new KpiInterval();
          interval.setMin(Double.valueOf(min).doubleValue());
          interval.setMax(Double.valueOf(max).doubleValue());

          Color color=new Color(Integer.decode(col).intValue());
          if(color!=null){
            interval.setColor(color);}
          else{
            // sets default color
            interval.setColor(Color.WHITE);
          }
          addInterval(interval);
        }
      }
     
      //reading values colors if present
      SourceBean colors = (SourceBean)content.getAttribute(VALUES_COLORS);
      if(colors!=null){
        colorMap=new HashMap();
        List atts=colors.getContainedAttributes();
        String colorValue="";
        for (Iterator iterator = atts.iterator(); iterator.hasNext();) {
          SourceBeanAttribute object = (SourceBeanAttribute) iterator.next();

          String valueName=new String(object.getKey());
          colorValue=new String((String)object.getValue());
          Color col=new Color(Integer.decode(colorValue).intValue());
          if(col!=null){
            colorMap.put(valueName,col);
          }
        } 
      }
    }
    else{
      logger.debug("configuration defined in LOV "+confDataset);
      String increment=(String)sbRow.getAttribute("increment");
      String minorTickCount=(String)sbRow.getAttribute("minor_tick");
      setIncrement(Double.valueOf(increment).doubleValue());
      setMinorTickCount(Integer.valueOf(minorTickCount).intValue());

   
      String intervalsNumber=(String)sbRow.getAttribute(INTERVALS_NUMBER);
      if(intervalsNumber==null || intervalsNumber.equals("") || intervalsNumber.equals("0")){ // if intervals are not specified
        KpiInterval interval=new KpiInterval();
        interval.setMin(getLower());
        interval.setMax(getUpper());
        interval.setColor(Color.WHITE);
        addInterval(interval);
      }
      else{
        for(int i=1;i<=Integer.valueOf(intervalsNumber).intValue();i++){
          KpiInterval interval=new KpiInterval();
          String min=(String)sbRow.getAttribute("min"+(new Integer(i)).toString());
          String max=(String)sbRow.getAttribute("max"+(new Integer(i)).toString());
          String col=(String)sbRow.getAttribute("color"+(new Integer(i)).toString());
          interval.setMin(Double.valueOf(min).doubleValue());
          interval.setMax(Double.valueOf(max).doubleValue());
          Color color=new Color(Integer.decode(col).intValue());
          interval.setColor(color);
          addInterval(interval);

        }
      }
      //reading values colors if present
View Full Code Here

Examples of it.eng.spagobi.engines.chart.bo.charttypes.utils.KpiInterval

          String range= (String)param.getAttribute(LABEL_INTERVAL);
          String min= (String)param.getAttribute(MIN_INTERVAL);
          String max= (String)param.getAttribute(MAX_INTERVAL);
          String col= (String)param.getAttribute(COLOR_INTERVAL);

          KpiInterval subrange=new KpiInterval();

          subrange.setLabel(range);
          subrange.setMin(Double.valueOf(min).doubleValue());
          subrange.setMax(Double.valueOf(max).doubleValue());

          Color color=new Color(Integer.decode(col).intValue());
          if(color!=null){
            subrange.setColor(color);}
          else{
            subrange.setColor(Color.RED);
          }
          addIntervals(subrange);
        }
      }
    }
    else{

      String unit=(String)sbRow.getAttribute(UNIT);
      if(unit!=null)
        setUnits(unit);
      else
        setUnits("");

      String subranges=(String)sbRow.getAttribute("subranges");
      if(subranges!=null && subranges.equalsIgnoreCase("NO")){ // if intervals are not specified
        logger.warn("no subranges defined");
      }
      else{
        for(int i=1;i<=3;i++){
          KpiInterval subrange=new KpiInterval();
          String label=(String)sbRow.getAttribute("label"+(new Integer(i)).toString());
          String min=(String)sbRow.getAttribute("min"+(new Integer(i)).toString());
          String max=(String)sbRow.getAttribute("max"+(new Integer(i)).toString());
          String col=(String)sbRow.getAttribute("color"+(new Integer(i)).toString());

          subrange.setLabel(label);
          subrange.setMin(Double.valueOf(min).doubleValue());
          subrange.setMax(Double.valueOf(max).doubleValue());
          Color color=new Color(Integer.decode(col).intValue());
          subrange.setColor(color);
          addIntervals(subrange);

        }
      }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.