Examples of XYDataItem


Examples of org.jfree.data.xy.XYDataItem

        DPSTick dpsTick=it.next();
        //System.out.println("Tick second="+dpsTick.getStartSecond());
        if(dpsTick.getStartSecond()<=i && (dpsTick.getStartSecond()+dpsTick.getSecondsDuration())>i) {
          //System.out.println("Graph>"+i+" tick="+dpsTick.getDamageDone()/dpsTick.getSecondsDuration());
          foundIt=true;
          xys.add(new XYDataItem(i, dpsTick.getDamageDone()/dpsTick.getSecondsDuration()))
        }
      }
      if(!foundIt)
        xys.add(new XYDataItem(i, 0));
    }
   
    return xys;
  }
View Full Code Here

Examples of org.jfree.data.xy.XYDataItem

      boolean foundIt=false;
      for(Iterator<HPSTick> it=cp.getHpsRealTimeStats().getHPSTicks().iterator();it.hasNext() && !foundIt;) {
        HPSTick hpsTick=it.next();
        if(hpsTick.getStartSecond()<=i && (hpsTick.getStartSecond()+hpsTick.getSecondsDuration())>i) {
          foundIt=true;
          xys.add(new XYDataItem(i, hpsTick.getHealingDone()/hpsTick.getSecondsDuration()))
        }
      }
      if(!foundIt)
        xys.add(new XYDataItem(i, 0));
    }
   
    return xys;
  }
View Full Code Here

Examples of org.jfree.data.xy.XYDataItem

      boolean foundIt=false;
      for(Iterator<DPSTick> it=cp.getDtpsRealTimeStats().getDPSTicks().iterator();it.hasNext() && !foundIt;) {
        DPSTick dtpsTick=it.next();
        if(dtpsTick.getStartSecond()<=i && (dtpsTick.getStartSecond()+dtpsTick.getSecondsDuration())>i) {
          foundIt=true;
          xys.add(new XYDataItem(i, dtpsTick.getDamageDone()/dtpsTick.getSecondsDuration()))
        }
      }
      if(!foundIt)
        xys.add(new XYDataItem(i, 0));
    }
   
    return xys;
  }
View Full Code Here

Examples of org.jfree.data.xy.XYDataItem

    /**
     * Confirm that the equals method can distinguish all the required fields.
     */
    public void testEquals() {

        XYDataItem i1 = new XYDataItem(1.0, 1.1);
        XYDataItem i2 = new XYDataItem(1.0, 1.1);
        assertTrue(i1.equals(i2));
        assertTrue(i2.equals(i1));

        i1.setY(new Double(9.9));
        assertFalse(i1.equals(i2));

        i2.setY(new Double(9.9));
        assertTrue(i1.equals(i2));

    }
View Full Code Here

Examples of org.jfree.data.xy.XYDataItem

    /**
     * Confirm that cloning works.
     */
    public void testCloning() {
        XYDataItem i1 = new XYDataItem(1.0, 1.1);
        XYDataItem i2 = null;
        i2 = (XYDataItem) i1.clone();
        assertTrue(i1 != i2);
        assertTrue(i1.getClass() == i2.getClass());
        assertTrue(i1.equals(i2));
    }
View Full Code Here

Examples of org.jfree.data.xy.XYDataItem

    /**
     * Serialize an instance, restore it, and check for equality.
     */
    public void testSerialization() {

        XYDataItem i1 = new XYDataItem(1.0, 1.1);
        XYDataItem i2 = null;

        try {
            ByteArrayOutputStream buffer = new ByteArrayOutputStream();
            ObjectOutput out = new ObjectOutputStream(buffer);
            out.writeObject(i1);
View Full Code Here

Examples of org.jfree.data.xy.XYDataItem

    /**
     * Some checks for the addOrUpdate() method.
     */
    public void testAddOrUpdate() {
        XYSeries series = new XYSeries("S1", true, false);
        XYDataItem old = series.addOrUpdate(new Long(1), new Long(2));
        assertTrue(old == null);
        assertEquals(1, series.getItemCount());
        assertEquals(new Long(2), series.getY(0));

        old = series.addOrUpdate(new Long(2), new Long(3));
        assertTrue(old == null);
        assertEquals(2, series.getItemCount());
        assertEquals(new Long(3), series.getY(1));

        old = series.addOrUpdate(new Long(1), new Long(99));
        assertEquals(new XYDataItem(new Long(1), new Long(2)), old);
        assertEquals(2, series.getItemCount());
        assertEquals(new Long(99), series.getY(0));
        assertEquals(new Long(3), series.getY(1));
    }
View Full Code Here

Examples of org.jfree.data.xy.XYDataItem

    /**
     * Confirm that the equals method can distinguish all the required fields.
     */
    public void testEquals() {

        XYDataItem i1 = new XYDataItem(1.0, 1.1);
        XYDataItem i2 = new XYDataItem(1.0, 1.1);
        assertTrue(i1.equals(i2));
        assertTrue(i2.equals(i1));

        i1.setY(new Double(9.9));
        assertFalse(i1.equals(i2));

        i2.setY(new Double(9.9));
        assertTrue(i1.equals(i2));

    }
View Full Code Here

Examples of org.jfree.data.xy.XYDataItem

    /**
     * Confirm that cloning works.
     */
    public void testCloning() {
        XYDataItem i1 = new XYDataItem(1.0, 1.1);
        XYDataItem i2 = null;
        i2 = (XYDataItem) i1.clone();
        assertTrue(i1 != i2);
        assertTrue(i1.getClass() == i2.getClass());
        assertTrue(i1.equals(i2));
    }
View Full Code Here

Examples of org.jfree.data.xy.XYDataItem

    /**
     * Serialize an instance, restore it, and check for equality.
     */
    public void testSerialization() {

        XYDataItem i1 = new XYDataItem(1.0, 1.1);
        XYDataItem i2 = null;

        try {
            ByteArrayOutputStream buffer = new ByteArrayOutputStream();
            ObjectOutput out = new ObjectOutputStream(buffer);
            out.writeObject(i1);
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.