Package kg.apc.charting

Examples of kg.apc.charting.AbstractGraphPanelChartElement


                continue;
            }
            if (limitPointFactor == 1) {

                element = it.next();
                AbstractGraphPanelChartElement elt = (AbstractGraphPanelChartElement) element.getValue();

                //not compatible with factor != 1, ie cannot be used if limit nb of point is selected.
                if (chartSettings.getHideNonRepValLimit() > 0) {
                    while (!elt.isPointRepresentative(chartSettings.getHideNonRepValLimit()) && it.hasNext()) {
                        element = it.next();
                        elt = (AbstractGraphPanelChartElement) element.getValue();
                    }

                    if (!elt.isPointRepresentative(chartSettings.getHideNonRepValLimit())) {
                        break;
                    }
                }

                calcPointX = element.getKey().doubleValue();
                calcPointY = elt.getValue();
            } else {
                calcPointX = 0;
                calcPointY = 0;
                int nbPointProcessed = 0;
                for (int i = 0; i < limitPointFactor; i++) {
View Full Code Here


    }

    @Override
    public AbstractGraphPanelChartElement getElement(long value)
    {
        AbstractGraphPanelChartElement ret = null;
        Iterator<Entry<Long, AbstractGraphPanelChartElement>> it = values.entrySet().iterator();

        while(it.hasNext() && ret == null)
        {
            GraphPanelChartExactElement el = (GraphPanelChartExactElement) it.next().getValue();
View Full Code Here

      System.out.println("setValue");
      GraphPanelChartAverageElement value = null;
      GraphRowOverallAverages instance = new GraphRowOverallAverages();
      try
      {
         AbstractGraphPanelChartElement result = instance.setValue(value);
         fail("Exception expected");
      }
      catch (UnsupportedOperationException e)
      {
      }
View Full Code Here

    {
        System.out.println("getElement");

        long value = 100L;
        GraphRowOverallAverages instance = new GraphRowOverallAverages();
        AbstractGraphPanelChartElement expResult = new GraphPanelChartAverageElement(10);
        instance.add(value, 10);
        AbstractGraphPanelChartElement result = instance.getElement(value);
        assertTrue(instance.getElement(value).getValue() == expResult.getValue());
    }
View Full Code Here

    @Test
    public void testGetElement()
    {
        System.out.println("getElement");
        long value = 100L;
        AbstractGraphPanelChartElement expResult = new GraphPanelChartAverageElement(10);
        instance.add(value, 10);
        AbstractGraphPanelChartElement result = instance.getElement(value);
        assertTrue(instance.getElement(value).getValue() == expResult.getValue());
    }
View Full Code Here

     */
    @Test
    public void testGetLowerElement() {
        System.out.println("getLowerElement");
        long value = 0L;
        AbstractGraphPanelChartElement expResult = null;
        AbstractGraphPanelChartElement result = instance.getLowerElement(value);
        assertEquals(expResult, result);
    }
View Full Code Here

    @Test
    public void testGetElement()
    {
        System.out.println("getElement");
        long value = 100L;
        AbstractGraphPanelChartElement expResult = new GraphPanelChartSimpleElement(10);
        instance.add(value, 10);
        AbstractGraphPanelChartElement result = instance.getElement(value);
        assertTrue(result.getValue() == expResult.getValue());
    }
View Full Code Here

        {
            ret = 0;
            Iterator<AbstractGraphRow> iter = state.values().iterator();
            while (iter.hasNext())
            {
                AbstractGraphPanelChartElement element = iter.next().getLowerElement(res.getStartTime());
                if(element != null) ret += element.getValue();
            }
        }
        else
        {
            ret = res.getGroupThreads();
View Full Code Here

        while (rowsIter.hasNext()) {
            AbstractGraphRow row = rowsIter.next();

            //if the tg finished, last value = 0, else we take last known value
            if (time <= (row.getMaxX() + row.getGranulationValue())) {
                AbstractGraphPanelChartElement element = row.getElement(time);

                if (element == null) {
                    element = row.getLowerElement(time);
                }
                if (element != null) {
                    ret += element.getValue();
                }
            }
        }

        return ret;
View Full Code Here

    {
        System.out.println("getElement");
       
        long value = 100L;
        GraphRowExactValues instance = new GraphRowExactValues();
        AbstractGraphPanelChartElement expResult = new GraphPanelChartExactElement(value, 2);
        instance.add(value, 2);
        AbstractGraphPanelChartElement result = instance.getElement(value);
        assertTrue(instance.getElement(value).getValue() == expResult.getValue());
    }
View Full Code Here

TOP

Related Classes of kg.apc.charting.AbstractGraphPanelChartElement

Copyright © 2018 www.massapicom. 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.