/** * Test the equals() method. */ public void testEquals() { CompassPlot plot1 = new CompassPlot(); CompassPlot plot2 = new CompassPlot(); assertTrue(plot1.equals(plot2)); // labelType... plot1.setLabelType(CompassPlot.VALUE_LABELS); assertFalse(plot1.equals(plot2)); plot2.setLabelType(CompassPlot.VALUE_LABELS); assertTrue(plot1.equals(plot2)); }
/** * Creates a chart. * * @param dataset the dataset. * * @return a chart. */ protected JFreeChart createChart(ValueDataset dataset) { // create the chart... // OPTIONAL CUSTOMISATION COMPLETED. CompassPlot plot = new CompassPlot(dataset); plot.setSeriesNeedle(7); plot.setSeriesPaint(0, Color.red); plot.setSeriesOutlinePaint(0, Color.red); plot.setRoseHighlightPaint(Color.CYAN); JFreeChart chart = new JFreeChart(plot); return chart; }
/** * Creates a chart. * * @param dataset the dataset. * * @return The chart. */ protected JFreeChart createChart(ValueDataset dataset) { CompassPlot plot = new CompassPlot(dataset); plot.setSeriesNeedle(7); plot.setSeriesPaint(0, Color.red); plot.setSeriesOutlinePaint(0, Color.red); plot.setRoseHighlightPaint(Color.CYAN); JFreeChart chart = new JFreeChart(plot); return chart; }
private JFreeChart createCompassChart(String title, ValueDataset dataset) { // create the chart... CompassPlot plot = new CompassPlot(dataset); plot.setSeriesNeedle(7); plot.setSeriesPaint(0, Color.red); plot.setSeriesOutlinePaint(0, Color.red); plot.setRoseHighlightPaint(Color.CYAN); JFreeChart chart = new JFreeChart(plot); return chart; }
/** * Test the equals() method. */ public void testEquals() { CompassPlot plot1 = new CompassPlot(); CompassPlot plot2 = new CompassPlot(); assertTrue(plot1.equals(plot2)); // labelType... plot1.setLabelType(CompassPlot.VALUE_LABELS); assertFalse(plot1.equals(plot2)); plot2.setLabelType(CompassPlot.VALUE_LABELS); assertTrue(plot1.equals(plot2)); // labelFont plot1.setLabelFont(new Font("Serif", Font.PLAIN, 10)); assertFalse(plot1.equals(plot2)); plot2.setLabelFont(new Font("Serif", Font.PLAIN, 10)); assertTrue(plot1.equals(plot2)); // drawBorder plot1.setDrawBorder(true); assertFalse(plot1.equals(plot2)); plot2.setDrawBorder(true); assertTrue(plot1.equals(plot2)); // rosePaint plot1.setRosePaint(new GradientPaint(1.0f, 2.0f, Color.blue, 3.0f, 4.0f, Color.yellow)); assertFalse(plot1.equals(plot2)); plot2.setRosePaint(new GradientPaint(1.0f, 2.0f, Color.blue, 3.0f, 4.0f, Color.yellow)); assertTrue(plot1.equals(plot2)); // roseCenterPaint plot1.setRoseCenterPaint(new GradientPaint(1.0f, 2.0f, Color.red, 3.0f, 4.0f, Color.yellow)); assertFalse(plot1.equals(plot2)); plot2.setRoseCenterPaint(new GradientPaint(1.0f, 2.0f, Color.red, 3.0f, 4.0f, Color.yellow)); assertTrue(plot1.equals(plot2)); // roseHighlightPaint plot1.setRoseHighlightPaint(new GradientPaint(1.0f, 2.0f, Color.green, 3.0f, 4.0f, Color.yellow)); assertFalse(plot1.equals(plot2)); plot2.setRoseHighlightPaint(new GradientPaint(1.0f, 2.0f, Color.green, 3.0f, 4.0f, Color.yellow)); assertTrue(plot1.equals(plot2)); }