Package org.jfree.chart.renderer.xy

Examples of org.jfree.chart.renderer.xy.XYSplineRenderer$ControlPoint


            plot.setRenderer(new XYLineAndShapeRenderer());
        }
        else
        {
            // Render smooth lines between points for a continuous distribution.
            XYSplineRenderer renderer = new XYSplineRenderer();
            renderer.setBaseShapesVisible(false);
            plot.setRenderer(renderer);
        }

        chartPanel.setChart(chart);
    }
View Full Code Here


//    BufferedImage b = chart.createBufferedImage(100, 100);
//    JFrame frame = new JFrame();
//    frame.getContentPane().getGraphics().drawImage(b, 0, 0, null);
//    frame.pack();
//    frame.setVisible(true);
    chart.getXYPlot().setRenderer(new XYSplineRenderer());
    return chart;
  }
View Full Code Here

        if (dataset == null) {
            NumberAxis domain = new NumberAxis(event.getxAxisLabel());
            NumberAxis range = new NumberAxis(event.getyAxisLabel());
           
            if (event.isDrawSmoothSplinesInLineCharts()) {
                renderer = new XYSplineRenderer();
            } else {
                renderer = new XYLineAndShapeRenderer(event.isDrawLinesInLineCharts(), event.isDrawSymbolsInLineCharts());
            }
           
            dataset = new XYSeriesCollection();
View Full Code Here

        if(marked>0)
          dps_dataset.addSeries(createDPSSeries(c,cp));
        marked--;
      }
      dpsoChart=ChartFactory.createXYLineChart("Real time DPS", "Seconds of combat", "DPS", dps_dataset, PlotOrientation.VERTICAL, true, true, false);
      dpsoChart.getXYPlot().setRenderer(new XYSplineRenderer());
      dpsoChartPanel=new ChartPanel(dpsoChart);
      dpsoChartPanel.setLayout(new BorderLayout());
      dpsoPanel.removeAll();
      dpsoPanel.add(dpsoChartPanel);
      dpsoChartPanel.revalidate();
      dpsoChartPanel.repaint();
      dpso.getColumnModel().getColumn(0).setMaxWidth(30);
      dpso.getColumnModel().getColumn(0).setCellRenderer(new CheckBoxCellRenderer());
      dpso.getColumnModel().getColumn(0).setCellEditor(new DPSCheckBoxCellEditor(c.getName(),this));
      dtm.fireTableDataChanged();
      dpso.revalidate();
      dpso.repaint();
     
      combatName.setText(c.getName());
      SimpleDateFormat sdf=new SimpleDateFormat("HH:mm:ss");
      combatStart.setText(sdf.format(c.getCombatStart()));
      combatEnd.setText(sdf.format(c.getCombatEnd()));
      combatDuration.setText(Long.toString(c.getCombatDuration()));
     
      ((DefaultListModel)cParticipants.getModel()).removeAllElements();
      for(Iterator<CombatParticipant> it=c.getSortedParticipantList().iterator();it.hasNext();) {
        CombatParticipant cp=it.next();
        ((DefaultListModel)cParticipants.getModel()).addElement(cp.getName());
      }
      x1_dps1Stats.setModel(new DefaultTableModel());
      x1_dps1Stats.revalidate();
      x1_dps1Stats.repaint();
      x1_dps2Stats.setModel(new DefaultTableModel());
      x1_dps2Stats.revalidate();
      x1_dps2Stats.repaint();
      x1_dtps1Stats.setModel(new DefaultTableModel());
      x1_dtps1Stats.revalidate();
      x1_dtps1Stats.repaint();
      x1_dtps2Stats.setModel(new DefaultTableModel());
      x1_dtps2Stats.revalidate();
      x1_dtps2Stats.repaint();
      x1_hps1Stats.setModel(new DefaultTableModel());
      x1_hps1Stats.revalidate();
      x1_hps1Stats.repaint();
      x1_hps2Stats.setModel(new DefaultTableModel());
      x1_hps2Stats.revalidate();
      x1_hps2Stats.repaint();
      x1_hps3Stats.setModel(new DefaultTableModel());
      x1_hps3Stats.revalidate();
      x1_hps3Stats.repaint();
      x1_dtpsTypes.setModel(new DefaultTableModel());
      x1_dtpsTypes.revalidate();
      x1_dtpsTypes.repaint();
      interrupts.setModel(new DefaultTableModel());
      interrupts.revalidate();
      interrupts.repaint();
      deaths.setModel(new DefaultTableModel());
      deaths.revalidate();
      deaths.repaint();
      cParticipants.revalidate();
      cParticipants.repaint();     

      DefaultTableModel htm=new DefaultTableModel();
      hps.setModel(htm);
      htm.addColumn("");
      htm.addColumn("Combat participant");
      htm.addColumn("Healing done");
      htm.addColumn("Overhealing");
      htm.addColumn("HPS");
      htm.addColumn("HPSe");
      htm.addColumn("Activity");
      marked=3;
      XYSeriesCollection hps_dataset=new XYSeriesCollection();
      for(Iterator<CombatParticipant> it=c.getSortedHPSParticipantList().iterator();it.hasNext();) {
        CombatParticipant cp=it.next();
        htm.addRow(new Object[]{(marked>0),cp.getName(),cp.getHpsRealTimeStats().getHealingDone(),cp.getHpsRealTimeStats().getOverhealingDone(),cp.getHpsRealTimeStats().getHPS(c.getCombatDuration()),cp.getHpsRealTimeStats().getHPSe(),cp.getHpsRealTimeStats().getActivity(c.getCombatDuration())});
        if(marked>0)
          hps_dataset.addSeries(createHPSSeries(c,cp));
        marked--;
      }
      hpsChart=ChartFactory.createXYLineChart("Real time HPS", "Seconds of combat", "HPS", hps_dataset, PlotOrientation.VERTICAL, true, true, false);
      hpsChart.getXYPlot().setRenderer(new XYSplineRenderer());
      hpsChartPanel=new ChartPanel(hpsChart);
      hpsChartPanel.setLayout(new BorderLayout());
      hpsPanel.removeAll();
      hpsPanel.add(hpsChartPanel);
      hpsChartPanel.revalidate();
      hpsChartPanel.repaint();
      hps.getColumnModel().getColumn(0).setMaxWidth(30);
      hps.getColumnModel().getColumn(0).setCellRenderer(new CheckBoxCellRenderer());
      hps.getColumnModel().getColumn(0).setCellEditor(new HPSCheckBoxCellEditor(c.getName(),this));
      htm.fireTableDataChanged();
      hps.revalidate();
      hps.repaint();
     
      DefaultTableModel dttm=new DefaultTableModel();
      dpst.setModel(dttm);
      dttm.addColumn("");
      dttm.addColumn("Combat participant");
      dttm.addColumn("Damage taken");
      dttm.addColumn("DTPS");
      dttm.addColumn("DTPSe");
      dttm.addColumn("Activity");
      marked=3;
      XYSeriesCollection dtps_dataset=new XYSeriesCollection();
      for(Iterator<CombatParticipant> it=c.getSortedDTPSParticipantList().iterator();it.hasNext();) {
        CombatParticipant cp=it.next();
        dttm.addRow(new Object[]{(marked>0),cp.getName(),cp.getDtpsRealTimeStats().getDamage(),cp.getDtpsRealTimeStats().getDPS(c.getCombatDuration()),cp.getDtpsRealTimeStats().getDPSe(),cp.getDtpsRealTimeStats().getActivity(c.getCombatDuration())});
        if(marked>0)
          dtps_dataset.addSeries(createDTPSSeries(c,cp));
        marked--;
      }
      dpstChart=ChartFactory.createXYLineChart("Real time damage taken", "Seconds of combat", "DTPS", dtps_dataset, PlotOrientation.VERTICAL, true, true, false);
      dpstChart.getXYPlot().setRenderer(new XYSplineRenderer());
      dpstChartPanel=new ChartPanel(dpstChart);
      dpstChartPanel.setLayout(new BorderLayout());
      dpstPanel.removeAll();
      dpstPanel.add(dpstChartPanel);
      dpstChartPanel.revalidate();
View Full Code Here

    /**
     * Test that the equals() method distinguishes all fields.
     */
    public void testEquals() {

        XYSplineRenderer r1 = new XYSplineRenderer();
        XYSplineRenderer r2 = new XYSplineRenderer();
        assertEquals(r1, r2);
        assertEquals(r2, r1);

        r1.setPrecision(9);
        assertFalse(r1.equals(r2));
        r2.setPrecision(9);
        assertTrue(r1.equals(r2));
    }
View Full Code Here

    /**
     * Two objects that are equal are required to return the same hashCode.
     */
    public void testHashcode() {
        XYSplineRenderer r1 = new XYSplineRenderer();
        XYSplineRenderer r2 = new XYSplineRenderer();
        assertTrue(r1.equals(r2));
        int h1 = r1.hashCode();
        int h2 = r2.hashCode();
        assertEquals(h1, h2);
    }
View Full Code Here

    /**
     * Confirm that cloning works.
     */
    public void testCloning() {
        Rectangle2D legendShape = new Rectangle2D.Double(1.0, 2.0, 3.0, 4.0);
        XYSplineRenderer r1 = new XYSplineRenderer();
        r1.setLegendLine(legendShape);
        XYSplineRenderer r2 = null;
        try {
            r2 = (XYSplineRenderer) r1.clone();
        }
        catch (CloneNotSupportedException e) {
            e.printStackTrace();
        }
        assertTrue(r1 != r2);
        assertTrue(r1.getClass() == r2.getClass());
        assertTrue(r1.equals(r2));
    }
View Full Code Here

    /**
     * Verify that this class implements {@link PublicCloneable}.
     */
    public void testPublicCloneable() {
        XYSplineRenderer r1 = new XYSplineRenderer();
        assertTrue(r1 instanceof PublicCloneable);
    }
View Full Code Here

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

        XYSplineRenderer r1 = new XYSplineRenderer();
        XYSplineRenderer r2 = null;
        try {
            ByteArrayOutputStream buffer = new ByteArrayOutputStream();
            ObjectOutput out = new ObjectOutputStream(buffer);
            out.writeObject(r1);
            out.close();
View Full Code Here

    /**
     * Test that the equals() method distinguishes all fields.
     */
    public void testEquals() {

        XYSplineRenderer r1 = new XYSplineRenderer();
        XYSplineRenderer r2 = new XYSplineRenderer();
        assertEquals(r1, r2);
        assertEquals(r2, r1);

        r1.setPrecision(9);
        assertFalse(r1.equals(r2));
        r2.setPrecision(9);
        assertTrue(r1.equals(r2));
    }
View Full Code Here

TOP

Related Classes of org.jfree.chart.renderer.xy.XYSplineRenderer$ControlPoint

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.