Package kg.apc.charting.rows

Examples of kg.apc.charting.rows.GraphRowExactValues


    public static AbstractGraphRow instantiateNewRow(int rowType) {
        switch (rowType) {
            case AbstractGraphRow.ROW_AVERAGES:
                return new GraphRowAverages();
            case AbstractGraphRow.ROW_EXACT_VALUES:
                return new GraphRowExactValues();
            case AbstractGraphRow.ROW_OVERALL_AVERAGES:
                return new GraphRowOverallAverages();
            case AbstractGraphRow.ROW_PERCENTILES:
                return new GraphRowPercentiles();
            case AbstractGraphRow.ROW_SUM_VALUES:
View Full Code Here


    }

    private void updateChart(VariableThroughputTimer tg) {
        model.clear();
        chart.clearErrorMessage();
        AbstractGraphRow row = new GraphRowExactValues();
        row.setColor(Color.BLUE);
        row.setDrawLine(true);
        row.setMarkerSize(AbstractGraphRow.MARKER_SIZE_NONE);
        row.setDrawThickLines(true);

        long now = System.currentTimeMillis();

        int rowsCount = tableModel.getRowCount();
        row.add(now, 0);
        row.add(now, tg.getRPSForSecond(0));

        int duration = 0;
        for (int i = 0; i < rowsCount; i++) {
            row.add(now + (duration + 1) * 1000, tg.getRPSForSecond(duration + 1));
            int rowVal = getIntFromRow(i, 2);
            if (rowVal < 0) {
                chart.setErrorMessage("The values entered cannot be rendered in preview...");
                break;
            }
            duration = duration + rowVal;
            row.add(now + duration * 1000, tg.getRPSForSecond(duration));
        }

        chart.setxAxisLabelRenderer(new DateTimeRenderer(DateTimeRenderer.HHMMSS, now - 1)); //-1 because row.add(thread.getStartTime() - 1, 0)
        chart.setForcedMinX(now);

View Full Code Here

   @Test
   public void testAdd()
   {
      System.out.println("add");
      long xVal = 0L;
      GraphRowExactValues instance = new GraphRowExactValues();
      instance.add(xVal, 1);
      instance.add(xVal, 2);
      instance.add(xVal, 3);
   }
View Full Code Here

    */
   @Test
   public void testIterator()
   {
      System.out.println("iterator");
      GraphRowExactValues instance = new GraphRowExactValues();
      instance.add(1, 1);
      instance.add(1, 2);
      instance.add(1, 3);
      Iterator<Entry<Long, AbstractGraphPanelChartElement>> result = instance.iterator();
      assertEquals(1, ((AbstractGraphPanelChartElement) result.next().getValue()).getValue(), 0.001);
      assertEquals(2, ((AbstractGraphPanelChartElement) result.next().getValue()).getValue(), 0.001);
      assertEquals(3, ((AbstractGraphPanelChartElement) result.next().getValue()).getValue(), 0.001);
   }
View Full Code Here

    */
   @Test
   public void testHasNext()
   {
      System.out.println("hasNext");
      GraphRowExactValues instance = new GraphRowExactValues();
      boolean expResult = false;
      boolean result = instance.hasNext();
      assertEquals(expResult, result);
   }
View Full Code Here

    */
   @Test
   public void testNext()
   {
      System.out.println("next");
      GraphRowExactValues instance = new GraphRowExactValues();
      instance.add(1, 1);
      Iterator it = instance.iterator();
      Entry result = (Entry) it.next();
      assertEquals(1L, result.getKey());
   }
View Full Code Here

    */
   @Test
   public void testRemove()
   {
      System.out.println("remove");
      GraphRowExactValues instance = new GraphRowExactValues();
      try
      {
         instance.remove();
         fail("Exception expected");
      }
      catch (UnsupportedOperationException e)
      {
      }
View Full Code Here

   @Test
   public void testSize()
   {
      System.out.println("size");
      GraphRowExactValues instance = new GraphRowExactValues();
      int expResult = 0;
      int result = instance.size();
      assertEquals(expResult, result);
   }
View Full Code Here

    public void testGetElement()
    {
        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.rows.GraphRowExactValues

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.