org.jfree.chart.labels.IntervalXYItemLabelGenerator Java Examples
The following examples show how to use
org.jfree.chart.labels.IntervalXYItemLabelGenerator.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: YIntervalRendererTest.java From openstock with GNU General Public License v3.0 | 4 votes |
/** * Check that the equals() method distinguishes all fields. */ @Test public void testEquals() { YIntervalRenderer r1 = new YIntervalRenderer(); YIntervalRenderer r2 = new YIntervalRenderer(); assertEquals(r1, r2); // the following fields are inherited from the AbstractXYItemRenderer r1.setItemLabelGenerator(new StandardXYItemLabelGenerator()); assertFalse(r1.equals(r2)); r2.setItemLabelGenerator(new StandardXYItemLabelGenerator()); assertTrue(r1.equals(r2)); r1.setSeriesItemLabelGenerator(0, new StandardXYItemLabelGenerator()); assertFalse(r1.equals(r2)); r2.setSeriesItemLabelGenerator(0, new StandardXYItemLabelGenerator()); assertTrue(r1.equals(r2)); r1.setBaseItemLabelGenerator(new StandardXYItemLabelGenerator()); assertFalse(r1.equals(r2)); r2.setBaseItemLabelGenerator(new StandardXYItemLabelGenerator()); assertTrue(r1.equals(r2)); r1.setToolTipGenerator(new StandardXYToolTipGenerator()); assertFalse(r1.equals(r2)); r2.setToolTipGenerator(new StandardXYToolTipGenerator()); assertTrue(r1.equals(r2)); r1.setSeriesToolTipGenerator(0, new StandardXYToolTipGenerator()); assertFalse(r1.equals(r2)); r2.setSeriesToolTipGenerator(0, new StandardXYToolTipGenerator()); assertTrue(r1.equals(r2)); r1.setBaseToolTipGenerator(new StandardXYToolTipGenerator()); assertFalse(r1.equals(r2)); r2.setBaseToolTipGenerator(new StandardXYToolTipGenerator()); assertTrue(r1.equals(r2)); r1.setURLGenerator(new StandardXYURLGenerator()); assertFalse(r1.equals(r2)); r2.setURLGenerator(new StandardXYURLGenerator()); assertTrue(r1.equals(r2)); r1.addAnnotation(new XYTextAnnotation("X", 1.0, 2.0), Layer.FOREGROUND); assertFalse(r1.equals(r2)); r2.addAnnotation(new XYTextAnnotation("X", 1.0, 2.0), Layer.FOREGROUND); assertTrue(r1.equals(r2)); r1.addAnnotation(new XYTextAnnotation("X", 1.0, 2.0), Layer.BACKGROUND); assertFalse(r1.equals(r2)); r2.addAnnotation(new XYTextAnnotation("X", 1.0, 2.0), Layer.BACKGROUND); assertTrue(r1.equals(r2)); r1.setDefaultEntityRadius(99); assertFalse(r1.equals(r2)); r2.setDefaultEntityRadius(99); assertTrue(r1.equals(r2)); r1.setLegendItemLabelGenerator(new StandardXYSeriesLabelGenerator( "{0} {1}")); assertFalse(r1.equals(r2)); r2.setLegendItemLabelGenerator(new StandardXYSeriesLabelGenerator( "{0} {1}")); assertTrue(r1.equals(r2)); r1.setLegendItemToolTipGenerator(new StandardXYSeriesLabelGenerator()); assertFalse(r1.equals(r2)); r2.setLegendItemToolTipGenerator(new StandardXYSeriesLabelGenerator()); assertTrue(r1.equals(r2)); r1.setLegendItemURLGenerator(new StandardXYSeriesLabelGenerator()); assertFalse(r1.equals(r2)); r2.setLegendItemURLGenerator(new StandardXYSeriesLabelGenerator()); assertTrue(r1.equals(r2)); r1.setAdditionalItemLabelGenerator(new IntervalXYItemLabelGenerator()); assertFalse(r1.equals(r2)); r2.setAdditionalItemLabelGenerator(new IntervalXYItemLabelGenerator()); assertTrue(r1.equals(r2)); }
Example #2
Source File: YIntervalRendererTest.java From ccu-historian with GNU General Public License v3.0 | 4 votes |
/** * Check that the equals() method distinguishes all fields. */ @Test public void testEquals() { YIntervalRenderer r1 = new YIntervalRenderer(); YIntervalRenderer r2 = new YIntervalRenderer(); assertEquals(r1, r2); // the following fields are inherited from the AbstractXYItemRenderer r1.setItemLabelGenerator(new StandardXYItemLabelGenerator()); assertFalse(r1.equals(r2)); r2.setItemLabelGenerator(new StandardXYItemLabelGenerator()); assertTrue(r1.equals(r2)); r1.setSeriesItemLabelGenerator(0, new StandardXYItemLabelGenerator()); assertFalse(r1.equals(r2)); r2.setSeriesItemLabelGenerator(0, new StandardXYItemLabelGenerator()); assertTrue(r1.equals(r2)); r1.setBaseItemLabelGenerator(new StandardXYItemLabelGenerator()); assertFalse(r1.equals(r2)); r2.setBaseItemLabelGenerator(new StandardXYItemLabelGenerator()); assertTrue(r1.equals(r2)); r1.setToolTipGenerator(new StandardXYToolTipGenerator()); assertFalse(r1.equals(r2)); r2.setToolTipGenerator(new StandardXYToolTipGenerator()); assertTrue(r1.equals(r2)); r1.setSeriesToolTipGenerator(0, new StandardXYToolTipGenerator()); assertFalse(r1.equals(r2)); r2.setSeriesToolTipGenerator(0, new StandardXYToolTipGenerator()); assertTrue(r1.equals(r2)); r1.setBaseToolTipGenerator(new StandardXYToolTipGenerator()); assertFalse(r1.equals(r2)); r2.setBaseToolTipGenerator(new StandardXYToolTipGenerator()); assertTrue(r1.equals(r2)); r1.setURLGenerator(new StandardXYURLGenerator()); assertFalse(r1.equals(r2)); r2.setURLGenerator(new StandardXYURLGenerator()); assertTrue(r1.equals(r2)); r1.addAnnotation(new XYTextAnnotation("X", 1.0, 2.0), Layer.FOREGROUND); assertFalse(r1.equals(r2)); r2.addAnnotation(new XYTextAnnotation("X", 1.0, 2.0), Layer.FOREGROUND); assertTrue(r1.equals(r2)); r1.addAnnotation(new XYTextAnnotation("X", 1.0, 2.0), Layer.BACKGROUND); assertFalse(r1.equals(r2)); r2.addAnnotation(new XYTextAnnotation("X", 1.0, 2.0), Layer.BACKGROUND); assertTrue(r1.equals(r2)); r1.setDefaultEntityRadius(99); assertFalse(r1.equals(r2)); r2.setDefaultEntityRadius(99); assertTrue(r1.equals(r2)); r1.setLegendItemLabelGenerator(new StandardXYSeriesLabelGenerator( "{0} {1}")); assertFalse(r1.equals(r2)); r2.setLegendItemLabelGenerator(new StandardXYSeriesLabelGenerator( "{0} {1}")); assertTrue(r1.equals(r2)); r1.setLegendItemToolTipGenerator(new StandardXYSeriesLabelGenerator()); assertFalse(r1.equals(r2)); r2.setLegendItemToolTipGenerator(new StandardXYSeriesLabelGenerator()); assertTrue(r1.equals(r2)); r1.setLegendItemURLGenerator(new StandardXYSeriesLabelGenerator()); assertFalse(r1.equals(r2)); r2.setLegendItemURLGenerator(new StandardXYSeriesLabelGenerator()); assertTrue(r1.equals(r2)); r1.setAdditionalItemLabelGenerator(new IntervalXYItemLabelGenerator()); assertFalse(r1.equals(r2)); r2.setAdditionalItemLabelGenerator(new IntervalXYItemLabelGenerator()); assertTrue(r1.equals(r2)); }
Example #3
Source File: YIntervalRendererTest.java From SIMVA-SoS with Apache License 2.0 | 4 votes |
/** * Check that the equals() method distinguishes all fields. */ @Test public void testEquals() { YIntervalRenderer r1 = new YIntervalRenderer(); YIntervalRenderer r2 = new YIntervalRenderer(); assertEquals(r1, r2); // the following fields are inherited from the AbstractXYItemRenderer r1.setItemLabelGenerator(new StandardXYItemLabelGenerator()); assertFalse(r1.equals(r2)); r2.setItemLabelGenerator(new StandardXYItemLabelGenerator()); assertTrue(r1.equals(r2)); r1.setSeriesItemLabelGenerator(0, new StandardXYItemLabelGenerator()); assertFalse(r1.equals(r2)); r2.setSeriesItemLabelGenerator(0, new StandardXYItemLabelGenerator()); assertTrue(r1.equals(r2)); r1.setBaseItemLabelGenerator(new StandardXYItemLabelGenerator()); assertFalse(r1.equals(r2)); r2.setBaseItemLabelGenerator(new StandardXYItemLabelGenerator()); assertTrue(r1.equals(r2)); r1.setToolTipGenerator(new StandardXYToolTipGenerator()); assertFalse(r1.equals(r2)); r2.setToolTipGenerator(new StandardXYToolTipGenerator()); assertTrue(r1.equals(r2)); r1.setSeriesToolTipGenerator(0, new StandardXYToolTipGenerator()); assertFalse(r1.equals(r2)); r2.setSeriesToolTipGenerator(0, new StandardXYToolTipGenerator()); assertTrue(r1.equals(r2)); r1.setBaseToolTipGenerator(new StandardXYToolTipGenerator()); assertFalse(r1.equals(r2)); r2.setBaseToolTipGenerator(new StandardXYToolTipGenerator()); assertTrue(r1.equals(r2)); r1.setURLGenerator(new StandardXYURLGenerator()); assertFalse(r1.equals(r2)); r2.setURLGenerator(new StandardXYURLGenerator()); assertTrue(r1.equals(r2)); r1.addAnnotation(new XYTextAnnotation("X", 1.0, 2.0), Layer.FOREGROUND); assertFalse(r1.equals(r2)); r2.addAnnotation(new XYTextAnnotation("X", 1.0, 2.0), Layer.FOREGROUND); assertTrue(r1.equals(r2)); r1.addAnnotation(new XYTextAnnotation("X", 1.0, 2.0), Layer.BACKGROUND); assertFalse(r1.equals(r2)); r2.addAnnotation(new XYTextAnnotation("X", 1.0, 2.0), Layer.BACKGROUND); assertTrue(r1.equals(r2)); r1.setDefaultEntityRadius(99); assertFalse(r1.equals(r2)); r2.setDefaultEntityRadius(99); assertTrue(r1.equals(r2)); r1.setLegendItemLabelGenerator(new StandardXYSeriesLabelGenerator( "{0} {1}")); assertFalse(r1.equals(r2)); r2.setLegendItemLabelGenerator(new StandardXYSeriesLabelGenerator( "{0} {1}")); assertTrue(r1.equals(r2)); r1.setLegendItemToolTipGenerator(new StandardXYSeriesLabelGenerator()); assertFalse(r1.equals(r2)); r2.setLegendItemToolTipGenerator(new StandardXYSeriesLabelGenerator()); assertTrue(r1.equals(r2)); r1.setLegendItemURLGenerator(new StandardXYSeriesLabelGenerator()); assertFalse(r1.equals(r2)); r2.setLegendItemURLGenerator(new StandardXYSeriesLabelGenerator()); assertTrue(r1.equals(r2)); r1.setAdditionalItemLabelGenerator(new IntervalXYItemLabelGenerator()); assertFalse(r1.equals(r2)); r2.setAdditionalItemLabelGenerator(new IntervalXYItemLabelGenerator()); assertTrue(r1.equals(r2)); }
Example #4
Source File: YIntervalRendererTest.java From ECG-Viewer with GNU General Public License v2.0 | 4 votes |
/** * Check that the equals() method distinguishes all fields. */ @Test public void testEquals() { YIntervalRenderer r1 = new YIntervalRenderer(); YIntervalRenderer r2 = new YIntervalRenderer(); assertEquals(r1, r2); // the following fields are inherited from the AbstractXYItemRenderer r1.setItemLabelGenerator(new StandardXYItemLabelGenerator()); assertFalse(r1.equals(r2)); r2.setItemLabelGenerator(new StandardXYItemLabelGenerator()); assertTrue(r1.equals(r2)); r1.setSeriesItemLabelGenerator(0, new StandardXYItemLabelGenerator()); assertFalse(r1.equals(r2)); r2.setSeriesItemLabelGenerator(0, new StandardXYItemLabelGenerator()); assertTrue(r1.equals(r2)); r1.setBaseItemLabelGenerator(new StandardXYItemLabelGenerator()); assertFalse(r1.equals(r2)); r2.setBaseItemLabelGenerator(new StandardXYItemLabelGenerator()); assertTrue(r1.equals(r2)); r1.setToolTipGenerator(new StandardXYToolTipGenerator()); assertFalse(r1.equals(r2)); r2.setToolTipGenerator(new StandardXYToolTipGenerator()); assertTrue(r1.equals(r2)); r1.setSeriesToolTipGenerator(0, new StandardXYToolTipGenerator()); assertFalse(r1.equals(r2)); r2.setSeriesToolTipGenerator(0, new StandardXYToolTipGenerator()); assertTrue(r1.equals(r2)); r1.setBaseToolTipGenerator(new StandardXYToolTipGenerator()); assertFalse(r1.equals(r2)); r2.setBaseToolTipGenerator(new StandardXYToolTipGenerator()); assertTrue(r1.equals(r2)); r1.setURLGenerator(new StandardXYURLGenerator()); assertFalse(r1.equals(r2)); r2.setURLGenerator(new StandardXYURLGenerator()); assertTrue(r1.equals(r2)); r1.addAnnotation(new XYTextAnnotation("X", 1.0, 2.0), Layer.FOREGROUND); assertFalse(r1.equals(r2)); r2.addAnnotation(new XYTextAnnotation("X", 1.0, 2.0), Layer.FOREGROUND); assertTrue(r1.equals(r2)); r1.addAnnotation(new XYTextAnnotation("X", 1.0, 2.0), Layer.BACKGROUND); assertFalse(r1.equals(r2)); r2.addAnnotation(new XYTextAnnotation("X", 1.0, 2.0), Layer.BACKGROUND); assertTrue(r1.equals(r2)); r1.setDefaultEntityRadius(99); assertFalse(r1.equals(r2)); r2.setDefaultEntityRadius(99); assertTrue(r1.equals(r2)); r1.setLegendItemLabelGenerator(new StandardXYSeriesLabelGenerator( "{0} {1}")); assertFalse(r1.equals(r2)); r2.setLegendItemLabelGenerator(new StandardXYSeriesLabelGenerator( "{0} {1}")); assertTrue(r1.equals(r2)); r1.setLegendItemToolTipGenerator(new StandardXYSeriesLabelGenerator()); assertFalse(r1.equals(r2)); r2.setLegendItemToolTipGenerator(new StandardXYSeriesLabelGenerator()); assertTrue(r1.equals(r2)); r1.setLegendItemURLGenerator(new StandardXYSeriesLabelGenerator()); assertFalse(r1.equals(r2)); r2.setLegendItemURLGenerator(new StandardXYSeriesLabelGenerator()); assertTrue(r1.equals(r2)); r1.setAdditionalItemLabelGenerator(new IntervalXYItemLabelGenerator()); assertFalse(r1.equals(r2)); r2.setAdditionalItemLabelGenerator(new IntervalXYItemLabelGenerator()); assertTrue(r1.equals(r2)); }
Example #5
Source File: YIntervalRendererTests.java From astor with GNU General Public License v2.0 | 4 votes |
/** * Check that the equals() method distinguishes all fields. */ public void testEquals() { YIntervalRenderer r1 = new YIntervalRenderer(); YIntervalRenderer r2 = new YIntervalRenderer(); assertEquals(r1, r2); // the following fields are inherited from the AbstractXYItemRenderer r1.setSeriesItemLabelGenerator(0, new StandardXYItemLabelGenerator()); assertFalse(r1.equals(r2)); r2.setSeriesItemLabelGenerator(0, new StandardXYItemLabelGenerator()); assertTrue(r1.equals(r2)); r1.setBaseItemLabelGenerator(new StandardXYItemLabelGenerator()); assertFalse(r1.equals(r2)); r2.setBaseItemLabelGenerator(new StandardXYItemLabelGenerator()); assertTrue(r1.equals(r2)); r1.setSeriesToolTipGenerator(0, new StandardXYToolTipGenerator()); assertFalse(r1.equals(r2)); r2.setSeriesToolTipGenerator(0, new StandardXYToolTipGenerator()); assertTrue(r1.equals(r2)); r1.setBaseToolTipGenerator(new StandardXYToolTipGenerator()); assertFalse(r1.equals(r2)); r2.setBaseToolTipGenerator(new StandardXYToolTipGenerator()); assertTrue(r1.equals(r2)); r1.setSeriesURLGenerator(0, new StandardXYURLGenerator()); assertFalse(r1.equals(r2)); r2.setSeriesURLGenerator(0, new StandardXYURLGenerator()); assertTrue(r1.equals(r2)); r1.setBaseURLGenerator(new StandardXYURLGenerator()); assertFalse(r1.equals(r2)); r2.setBaseURLGenerator(new StandardXYURLGenerator()); assertTrue(r1.equals(r2)); r1.addAnnotation(new XYTextAnnotation("X", 1.0, 2.0), Layer.FOREGROUND); assertFalse(r1.equals(r2)); r2.addAnnotation(new XYTextAnnotation("X", 1.0, 2.0), Layer.FOREGROUND); assertTrue(r1.equals(r2)); r1.addAnnotation(new XYTextAnnotation("X", 1.0, 2.0), Layer.BACKGROUND); assertFalse(r1.equals(r2)); r2.addAnnotation(new XYTextAnnotation("X", 1.0, 2.0), Layer.BACKGROUND); assertTrue(r1.equals(r2)); r1.setDefaultEntityRadius(99); assertFalse(r1.equals(r2)); r2.setDefaultEntityRadius(99); assertTrue(r1.equals(r2)); r1.setLegendItemLabelGenerator(new StandardXYSeriesLabelGenerator( "{0} {1}")); assertFalse(r1.equals(r2)); r2.setLegendItemLabelGenerator(new StandardXYSeriesLabelGenerator( "{0} {1}")); assertTrue(r1.equals(r2)); r1.setLegendItemToolTipGenerator(new StandardXYSeriesLabelGenerator()); assertFalse(r1.equals(r2)); r2.setLegendItemToolTipGenerator(new StandardXYSeriesLabelGenerator()); assertTrue(r1.equals(r2)); r1.setLegendItemURLGenerator(new StandardXYSeriesLabelGenerator()); assertFalse(r1.equals(r2)); r2.setLegendItemURLGenerator(new StandardXYSeriesLabelGenerator()); assertTrue(r1.equals(r2)); r1.setAdditionalItemLabelGenerator(new IntervalXYItemLabelGenerator()); assertFalse(r1.equals(r2)); r2.setAdditionalItemLabelGenerator(new IntervalXYItemLabelGenerator()); assertTrue(r1.equals(r2)); }
Example #6
Source File: YIntervalRendererTest.java From buffer_bci with GNU General Public License v3.0 | 4 votes |
/** * Check that the equals() method distinguishes all fields. */ @Test public void testEquals() { YIntervalRenderer r1 = new YIntervalRenderer(); YIntervalRenderer r2 = new YIntervalRenderer(); assertEquals(r1, r2); // the following fields are inherited from the AbstractXYItemRenderer r1.setItemLabelGenerator(new StandardXYItemLabelGenerator()); assertFalse(r1.equals(r2)); r2.setItemLabelGenerator(new StandardXYItemLabelGenerator()); assertTrue(r1.equals(r2)); r1.setSeriesItemLabelGenerator(0, new StandardXYItemLabelGenerator()); assertFalse(r1.equals(r2)); r2.setSeriesItemLabelGenerator(0, new StandardXYItemLabelGenerator()); assertTrue(r1.equals(r2)); r1.setBaseItemLabelGenerator(new StandardXYItemLabelGenerator()); assertFalse(r1.equals(r2)); r2.setBaseItemLabelGenerator(new StandardXYItemLabelGenerator()); assertTrue(r1.equals(r2)); r1.setToolTipGenerator(new StandardXYToolTipGenerator()); assertFalse(r1.equals(r2)); r2.setToolTipGenerator(new StandardXYToolTipGenerator()); assertTrue(r1.equals(r2)); r1.setSeriesToolTipGenerator(0, new StandardXYToolTipGenerator()); assertFalse(r1.equals(r2)); r2.setSeriesToolTipGenerator(0, new StandardXYToolTipGenerator()); assertTrue(r1.equals(r2)); r1.setBaseToolTipGenerator(new StandardXYToolTipGenerator()); assertFalse(r1.equals(r2)); r2.setBaseToolTipGenerator(new StandardXYToolTipGenerator()); assertTrue(r1.equals(r2)); r1.setURLGenerator(new StandardXYURLGenerator()); assertFalse(r1.equals(r2)); r2.setURLGenerator(new StandardXYURLGenerator()); assertTrue(r1.equals(r2)); r1.addAnnotation(new XYTextAnnotation("X", 1.0, 2.0), Layer.FOREGROUND); assertFalse(r1.equals(r2)); r2.addAnnotation(new XYTextAnnotation("X", 1.0, 2.0), Layer.FOREGROUND); assertTrue(r1.equals(r2)); r1.addAnnotation(new XYTextAnnotation("X", 1.0, 2.0), Layer.BACKGROUND); assertFalse(r1.equals(r2)); r2.addAnnotation(new XYTextAnnotation("X", 1.0, 2.0), Layer.BACKGROUND); assertTrue(r1.equals(r2)); r1.setDefaultEntityRadius(99); assertFalse(r1.equals(r2)); r2.setDefaultEntityRadius(99); assertTrue(r1.equals(r2)); r1.setLegendItemLabelGenerator(new StandardXYSeriesLabelGenerator( "{0} {1}")); assertFalse(r1.equals(r2)); r2.setLegendItemLabelGenerator(new StandardXYSeriesLabelGenerator( "{0} {1}")); assertTrue(r1.equals(r2)); r1.setLegendItemToolTipGenerator(new StandardXYSeriesLabelGenerator()); assertFalse(r1.equals(r2)); r2.setLegendItemToolTipGenerator(new StandardXYSeriesLabelGenerator()); assertTrue(r1.equals(r2)); r1.setLegendItemURLGenerator(new StandardXYSeriesLabelGenerator()); assertFalse(r1.equals(r2)); r2.setLegendItemURLGenerator(new StandardXYSeriesLabelGenerator()); assertTrue(r1.equals(r2)); r1.setAdditionalItemLabelGenerator(new IntervalXYItemLabelGenerator()); assertFalse(r1.equals(r2)); r2.setAdditionalItemLabelGenerator(new IntervalXYItemLabelGenerator()); assertTrue(r1.equals(r2)); }