org.jfree.chart.labels.StandardXYSeriesLabelGenerator Java Examples
The following examples show how to use
org.jfree.chart.labels.StandardXYSeriesLabelGenerator.
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: AbstractXYItemRendererTest.java From openstock with GNU General Public License v3.0 | 6 votes |
/** * Check that the legendItemLabelGenerator is cloned. */ @Test public void testCloning_LegendItemLabelGenerator() throws CloneNotSupportedException { StandardXYSeriesLabelGenerator generator = new StandardXYSeriesLabelGenerator("Series {0}"); XYBarRenderer r1 = new XYBarRenderer(); r1.setLegendItemLabelGenerator(generator); XYBarRenderer r2 = (XYBarRenderer) r1.clone(); assertTrue(r1 != r2); assertTrue(r1.getClass() == r2.getClass()); assertTrue(r1.equals(r2)); // check that the generator has been cloned assertTrue(r1.getLegendItemLabelGenerator() != r2.getLegendItemLabelGenerator()); }
Example #2
Source File: AbstractXYItemRendererTest.java From buffer_bci with GNU General Public License v3.0 | 6 votes |
/** * Check that the legendItemURLGenerator is cloned. */ @Test public void testCloning_LegendItemURLGenerator() throws CloneNotSupportedException { StandardXYSeriesLabelGenerator generator = new StandardXYSeriesLabelGenerator("Series {0}"); XYBarRenderer r1 = new XYBarRenderer(); r1.setLegendItemURLGenerator(generator); XYBarRenderer r2 = (XYBarRenderer) r1.clone(); assertTrue(r1 != r2); assertTrue(r1.getClass() == r2.getClass()); assertTrue(r1.equals(r2)); // check that the generator has been cloned assertTrue(r1.getLegendItemURLGenerator() != r2.getLegendItemURLGenerator()); }
Example #3
Source File: AbstractXYItemRendererTest.java From buffer_bci with GNU General Public License v3.0 | 6 votes |
/** * Check that the legendItemToolTipGenerator is cloned. */ @Test public void testCloning_LegendItemToolTipGenerator() throws CloneNotSupportedException { StandardXYSeriesLabelGenerator generator = new StandardXYSeriesLabelGenerator("Series {0}"); XYBarRenderer r1 = new XYBarRenderer(); r1.setLegendItemToolTipGenerator(generator); XYBarRenderer r2 = (XYBarRenderer) r1.clone(); assertTrue(r1 != r2); assertTrue(r1.getClass() == r2.getClass()); assertTrue(r1.equals(r2)); // check that the generator has been cloned assertTrue(r1.getLegendItemToolTipGenerator() != r2.getLegendItemToolTipGenerator()); }
Example #4
Source File: AbstractXYItemRendererTest.java From buffer_bci with GNU General Public License v3.0 | 6 votes |
/** * Check that the legendItemLabelGenerator is cloned. */ @Test public void testCloning_LegendItemLabelGenerator() throws CloneNotSupportedException { StandardXYSeriesLabelGenerator generator = new StandardXYSeriesLabelGenerator("Series {0}"); XYBarRenderer r1 = new XYBarRenderer(); r1.setLegendItemLabelGenerator(generator); XYBarRenderer r2 = (XYBarRenderer) r1.clone(); assertTrue(r1 != r2); assertTrue(r1.getClass() == r2.getClass()); assertTrue(r1.equals(r2)); // check that the generator has been cloned assertTrue(r1.getLegendItemLabelGenerator() != r2.getLegendItemLabelGenerator()); }
Example #5
Source File: AbstractXYItemRendererTest.java From ECG-Viewer with GNU General Public License v2.0 | 6 votes |
/** * Check that the legendItemURLGenerator is cloned. */ @Test public void testCloning_LegendItemURLGenerator() throws CloneNotSupportedException { StandardXYSeriesLabelGenerator generator = new StandardXYSeriesLabelGenerator("Series {0}"); XYBarRenderer r1 = new XYBarRenderer(); r1.setLegendItemURLGenerator(generator); XYBarRenderer r2 = (XYBarRenderer) r1.clone(); assertTrue(r1 != r2); assertTrue(r1.getClass() == r2.getClass()); assertTrue(r1.equals(r2)); // check that the generator has been cloned assertTrue(r1.getLegendItemURLGenerator() != r2.getLegendItemURLGenerator()); }
Example #6
Source File: AbstractXYItemRendererTest.java From ECG-Viewer with GNU General Public License v2.0 | 6 votes |
/** * Check that the legendItemToolTipGenerator is cloned. */ @Test public void testCloning_LegendItemToolTipGenerator() throws CloneNotSupportedException { StandardXYSeriesLabelGenerator generator = new StandardXYSeriesLabelGenerator("Series {0}"); XYBarRenderer r1 = new XYBarRenderer(); r1.setLegendItemToolTipGenerator(generator); XYBarRenderer r2 = (XYBarRenderer) r1.clone(); assertTrue(r1 != r2); assertTrue(r1.getClass() == r2.getClass()); assertTrue(r1.equals(r2)); // check that the generator has been cloned assertTrue(r1.getLegendItemToolTipGenerator() != r2.getLegendItemToolTipGenerator()); }
Example #7
Source File: AbstractXYItemRendererTest.java From ECG-Viewer with GNU General Public License v2.0 | 6 votes |
/** * Check that the legendItemLabelGenerator is cloned. */ @Test public void testCloning_LegendItemLabelGenerator() throws CloneNotSupportedException { StandardXYSeriesLabelGenerator generator = new StandardXYSeriesLabelGenerator("Series {0}"); XYBarRenderer r1 = new XYBarRenderer(); r1.setLegendItemLabelGenerator(generator); XYBarRenderer r2 = (XYBarRenderer) r1.clone(); assertTrue(r1 != r2); assertTrue(r1.getClass() == r2.getClass()); assertTrue(r1.equals(r2)); // check that the generator has been cloned assertTrue(r1.getLegendItemLabelGenerator() != r2.getLegendItemLabelGenerator()); }
Example #8
Source File: AbstractXYItemRendererTest.java From SIMVA-SoS with Apache License 2.0 | 6 votes |
/** * Check that the legendItemURLGenerator is cloned. */ @Test public void testCloning_LegendItemURLGenerator() throws CloneNotSupportedException { StandardXYSeriesLabelGenerator generator = new StandardXYSeriesLabelGenerator("Series {0}"); XYBarRenderer r1 = new XYBarRenderer(); r1.setLegendItemURLGenerator(generator); XYBarRenderer r2 = (XYBarRenderer) r1.clone(); assertTrue(r1 != r2); assertTrue(r1.getClass() == r2.getClass()); assertTrue(r1.equals(r2)); // check that the generator has been cloned assertTrue(r1.getLegendItemURLGenerator() != r2.getLegendItemURLGenerator()); }
Example #9
Source File: AbstractXYItemRendererTest.java From SIMVA-SoS with Apache License 2.0 | 6 votes |
/** * Check that the legendItemToolTipGenerator is cloned. */ @Test public void testCloning_LegendItemToolTipGenerator() throws CloneNotSupportedException { StandardXYSeriesLabelGenerator generator = new StandardXYSeriesLabelGenerator("Series {0}"); XYBarRenderer r1 = new XYBarRenderer(); r1.setLegendItemToolTipGenerator(generator); XYBarRenderer r2 = (XYBarRenderer) r1.clone(); assertTrue(r1 != r2); assertTrue(r1.getClass() == r2.getClass()); assertTrue(r1.equals(r2)); // check that the generator has been cloned assertTrue(r1.getLegendItemToolTipGenerator() != r2.getLegendItemToolTipGenerator()); }
Example #10
Source File: AbstractXYItemRendererTest.java From SIMVA-SoS with Apache License 2.0 | 6 votes |
/** * Check that the legendItemLabelGenerator is cloned. */ @Test public void testCloning_LegendItemLabelGenerator() throws CloneNotSupportedException { StandardXYSeriesLabelGenerator generator = new StandardXYSeriesLabelGenerator("Series {0}"); XYBarRenderer r1 = new XYBarRenderer(); r1.setLegendItemLabelGenerator(generator); XYBarRenderer r2 = (XYBarRenderer) r1.clone(); assertTrue(r1 != r2); assertTrue(r1.getClass() == r2.getClass()); assertTrue(r1.equals(r2)); // check that the generator has been cloned assertTrue(r1.getLegendItemLabelGenerator() != r2.getLegendItemLabelGenerator()); }
Example #11
Source File: AbstractXYItemRendererTest.java From ccu-historian with GNU General Public License v3.0 | 6 votes |
/** * Check that the legendItemURLGenerator is cloned. */ @Test public void testCloning_LegendItemURLGenerator() throws CloneNotSupportedException { StandardXYSeriesLabelGenerator generator = new StandardXYSeriesLabelGenerator("Series {0}"); XYBarRenderer r1 = new XYBarRenderer(); r1.setLegendItemURLGenerator(generator); XYBarRenderer r2 = (XYBarRenderer) r1.clone(); assertTrue(r1 != r2); assertTrue(r1.getClass() == r2.getClass()); assertTrue(r1.equals(r2)); // check that the generator has been cloned assertTrue(r1.getLegendItemURLGenerator() != r2.getLegendItemURLGenerator()); }
Example #12
Source File: AbstractXYItemRendererTest.java From ccu-historian with GNU General Public License v3.0 | 6 votes |
/** * Check that the legendItemToolTipGenerator is cloned. */ @Test public void testCloning_LegendItemToolTipGenerator() throws CloneNotSupportedException { StandardXYSeriesLabelGenerator generator = new StandardXYSeriesLabelGenerator("Series {0}"); XYBarRenderer r1 = new XYBarRenderer(); r1.setLegendItemToolTipGenerator(generator); XYBarRenderer r2 = (XYBarRenderer) r1.clone(); assertTrue(r1 != r2); assertTrue(r1.getClass() == r2.getClass()); assertTrue(r1.equals(r2)); // check that the generator has been cloned assertTrue(r1.getLegendItemToolTipGenerator() != r2.getLegendItemToolTipGenerator()); }
Example #13
Source File: AbstractXYItemRendererTest.java From openstock with GNU General Public License v3.0 | 6 votes |
/** * Check that the legendItemToolTipGenerator is cloned. */ @Test public void testCloning_LegendItemToolTipGenerator() throws CloneNotSupportedException { StandardXYSeriesLabelGenerator generator = new StandardXYSeriesLabelGenerator("Series {0}"); XYBarRenderer r1 = new XYBarRenderer(); r1.setLegendItemToolTipGenerator(generator); XYBarRenderer r2 = (XYBarRenderer) r1.clone(); assertTrue(r1 != r2); assertTrue(r1.getClass() == r2.getClass()); assertTrue(r1.equals(r2)); // check that the generator has been cloned assertTrue(r1.getLegendItemToolTipGenerator() != r2.getLegendItemToolTipGenerator()); }
Example #14
Source File: AbstractXYItemRendererTest.java From ccu-historian with GNU General Public License v3.0 | 6 votes |
/** * Check that the legendItemLabelGenerator is cloned. */ @Test public void testCloning_LegendItemLabelGenerator() throws CloneNotSupportedException { StandardXYSeriesLabelGenerator generator = new StandardXYSeriesLabelGenerator("Series {0}"); XYBarRenderer r1 = new XYBarRenderer(); r1.setLegendItemLabelGenerator(generator); XYBarRenderer r2 = (XYBarRenderer) r1.clone(); assertTrue(r1 != r2); assertTrue(r1.getClass() == r2.getClass()); assertTrue(r1.equals(r2)); // check that the generator has been cloned assertTrue(r1.getLegendItemLabelGenerator() != r2.getLegendItemLabelGenerator()); }
Example #15
Source File: AbstractXYItemRendererTest.java From openstock with GNU General Public License v3.0 | 6 votes |
/** * Check that the legendItemURLGenerator is cloned. */ @Test public void testCloning_LegendItemURLGenerator() throws CloneNotSupportedException { StandardXYSeriesLabelGenerator generator = new StandardXYSeriesLabelGenerator("Series {0}"); XYBarRenderer r1 = new XYBarRenderer(); r1.setLegendItemURLGenerator(generator); XYBarRenderer r2 = (XYBarRenderer) r1.clone(); assertTrue(r1 != r2); assertTrue(r1.getClass() == r2.getClass()); assertTrue(r1.equals(r2)); // check that the generator has been cloned assertTrue(r1.getLegendItemURLGenerator() != r2.getLegendItemURLGenerator()); }
Example #16
Source File: StandardXYSeriesLabelGeneratorTests.java From astor with GNU General Public License v2.0 | 5 votes |
/** * Simple check that hashCode is implemented. */ public void testHashCode() { StandardXYSeriesLabelGenerator g1 = new StandardXYSeriesLabelGenerator(); StandardXYSeriesLabelGenerator g2 = new StandardXYSeriesLabelGenerator(); assertTrue(g1.equals(g2)); assertTrue(g1.hashCode() == g2.hashCode()); }
Example #17
Source File: AbstractXYItemRenderer.java From buffer_bci with GNU General Public License v3.0 | 5 votes |
/** * Creates a renderer where the tooltip generator and the URL generator are * both <code>null</code>. */ protected AbstractXYItemRenderer() { super(); this.itemLabelGenerator = null; this.itemLabelGeneratorMap = new HashMap<Integer, XYItemLabelGenerator>(); this.toolTipGenerator = null; this.toolTipGeneratorMap = new HashMap<Integer, XYToolTipGenerator>(); this.urlGenerator = null; this.backgroundAnnotations = new java.util.ArrayList(); this.foregroundAnnotations = new java.util.ArrayList(); this.legendItemLabelGenerator = new StandardXYSeriesLabelGenerator( "{0}"); }
Example #18
Source File: AbstractXYItemRenderer.java From buffer_bci with GNU General Public License v3.0 | 5 votes |
/** * Creates a renderer where the tooltip generator and the URL generator are * both <code>null</code>. */ protected AbstractXYItemRenderer() { super(); this.itemLabelGenerator = null; this.itemLabelGeneratorMap = new HashMap<Integer, XYItemLabelGenerator>(); this.toolTipGenerator = null; this.toolTipGeneratorMap = new HashMap<Integer, XYToolTipGenerator>(); this.urlGenerator = null; this.backgroundAnnotations = new java.util.ArrayList(); this.foregroundAnnotations = new java.util.ArrayList(); this.legendItemLabelGenerator = new StandardXYSeriesLabelGenerator( "{0}"); }
Example #19
Source File: AbstractXYItemRenderer.java From opensim-gui with Apache License 2.0 | 5 votes |
/** * Creates a renderer where the tooltip generator and the URL generator are * both <code>null</code>. */ protected AbstractXYItemRenderer() { this.itemLabelGenerator = null; this.itemLabelGeneratorList = new ObjectList(); this.toolTipGenerator = null; this.toolTipGeneratorList = new ObjectList(); this.urlGenerator = null; this.backgroundAnnotations = new java.util.ArrayList(); this.foregroundAnnotations = new java.util.ArrayList(); this.defaultEntityRadius = 3; this.legendItemLabelGenerator = new StandardXYSeriesLabelGenerator("{0}"); }
Example #20
Source File: AbstractXYItemRenderer.java From astor with GNU General Public License v2.0 | 5 votes |
/** * Creates a renderer where the tooltip generator and the URL generator are * both <code>null</code>. */ protected AbstractXYItemRenderer() { super(); this.itemLabelGeneratorList = new ObjectList(); this.toolTipGeneratorList = new ObjectList(); this.urlGeneratorList = new ObjectList(); this.baseURLGenerator = null; this.backgroundAnnotations = new java.util.ArrayList(); this.foregroundAnnotations = new java.util.ArrayList(); this.defaultEntityRadius = 3; this.legendItemLabelGenerator = new StandardXYSeriesLabelGenerator( "{0}"); }
Example #21
Source File: StandardXYSeriesLabelGeneratorTests.java From astor with GNU General Public License v2.0 | 5 votes |
/** * Some checks for the generalLabel() method. */ public void testGenerateLabel() { StandardXYSeriesLabelGenerator g = new StandardXYSeriesLabelGenerator("Series {0}"); XYSeriesCollection dataset = new XYSeriesCollection(); dataset.addSeries(new XYSeries("1")); dataset.addSeries(new XYSeries("2")); assertEquals("Series 1", g.generateLabel(dataset, 0)); assertEquals("Series 2", g.generateLabel(dataset, 1)); }
Example #22
Source File: AbstractXYItemRenderer.java From astor with GNU General Public License v2.0 | 5 votes |
/** * Creates a renderer where the tooltip generator and the URL generator are * both <code>null</code>. */ protected AbstractXYItemRenderer() { super(); this.itemLabelGeneratorList = new ObjectList(); this.toolTipGeneratorList = new ObjectList(); this.urlGeneratorList = new ObjectList(); this.baseURLGenerator = null; this.backgroundAnnotations = new java.util.ArrayList(); this.foregroundAnnotations = new java.util.ArrayList(); this.legendItemLabelGenerator = new StandardXYSeriesLabelGenerator( "{0}"); }
Example #23
Source File: StandardXYSeriesLabelGeneratorTests.java From astor with GNU General Public License v2.0 | 5 votes |
/** * Some checks for the generalLabel() method. */ public void testGenerateLabel() { StandardXYSeriesLabelGenerator g = new StandardXYSeriesLabelGenerator("Series {0}"); XYSeriesCollection dataset = new XYSeriesCollection(); dataset.addSeries(new XYSeries("1")); dataset.addSeries(new XYSeries("2")); assertEquals("Series 1", g.generateLabel(dataset, 0)); assertEquals("Series 2", g.generateLabel(dataset, 1)); }
Example #24
Source File: AbstractXYItemRenderer.java From ECG-Viewer with GNU General Public License v2.0 | 5 votes |
/** * Creates a renderer where the tooltip generator and the URL generator are * both <code>null</code>. */ protected AbstractXYItemRenderer() { super(); this.itemLabelGenerator = null; this.itemLabelGeneratorMap = new HashMap<Integer, XYItemLabelGenerator>(); this.toolTipGenerator = null; this.toolTipGeneratorMap = new HashMap<Integer, XYToolTipGenerator>(); this.urlGenerator = null; this.backgroundAnnotations = new java.util.ArrayList(); this.foregroundAnnotations = new java.util.ArrayList(); this.legendItemLabelGenerator = new StandardXYSeriesLabelGenerator( "{0}"); }
Example #25
Source File: AbstractXYItemRenderer.java From openstock with GNU General Public License v3.0 | 5 votes |
/** * Creates a renderer where the tooltip generator and the URL generator are * both <code>null</code>. */ protected AbstractXYItemRenderer() { super(); this.itemLabelGenerator = null; this.itemLabelGeneratorMap = new HashMap<Integer, XYItemLabelGenerator>(); this.toolTipGenerator = null; this.toolTipGeneratorMap = new HashMap<Integer, XYToolTipGenerator>(); this.urlGenerator = null; this.backgroundAnnotations = new java.util.ArrayList(); this.foregroundAnnotations = new java.util.ArrayList(); this.legendItemLabelGenerator = new StandardXYSeriesLabelGenerator( "{0}"); }
Example #26
Source File: AbstractXYItemRenderer.java From SIMVA-SoS with Apache License 2.0 | 5 votes |
/** * Creates a renderer where the tooltip generator and the URL generator are * both <code>null</code>. */ protected AbstractXYItemRenderer() { super(); this.itemLabelGenerator = null; this.itemLabelGeneratorMap = new HashMap<Integer, XYItemLabelGenerator>(); this.toolTipGenerator = null; this.toolTipGeneratorMap = new HashMap<Integer, XYToolTipGenerator>(); this.urlGenerator = null; this.backgroundAnnotations = new java.util.ArrayList(); this.foregroundAnnotations = new java.util.ArrayList(); this.legendItemLabelGenerator = new StandardXYSeriesLabelGenerator( "{0}"); }
Example #27
Source File: AbstractXYItemRenderer.java From ccu-historian with GNU General Public License v3.0 | 5 votes |
/** * Creates a renderer where the tooltip generator and the URL generator are * both <code>null</code>. */ protected AbstractXYItemRenderer() { super(); this.itemLabelGenerator = null; this.itemLabelGeneratorMap = new HashMap<Integer, XYItemLabelGenerator>(); this.toolTipGenerator = null; this.toolTipGeneratorMap = new HashMap<Integer, XYToolTipGenerator>(); this.urlGenerator = null; this.backgroundAnnotations = new java.util.ArrayList(); this.foregroundAnnotations = new java.util.ArrayList(); this.legendItemLabelGenerator = new StandardXYSeriesLabelGenerator( "{0}"); }
Example #28
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 #29
Source File: StandardXYSeriesLabelGeneratorTests.java From astor with GNU General Public License v2.0 | 4 votes |
/** * Check to ensure that this class implements PublicCloneable. */ public void testPublicCloneable() { StandardXYSeriesLabelGenerator g1 = new StandardXYSeriesLabelGenerator("Series {0}"); assertTrue(g1 instanceof PublicCloneable); }
Example #30
Source File: AbstractXYItemRendererTests.java From astor with GNU General Public License v2.0 | 4 votes |
/** * Some checks for the equals() method. */ public void testEquals() { XYBarRenderer r1 = new XYBarRenderer(); XYBarRenderer r2 = new XYBarRenderer(); assertTrue(r1.equals(r2)); // background annotation r1.addAnnotation(new XYTextAnnotation("ABC", 1.0, 2.0), Layer.BACKGROUND); assertFalse(r1.equals(r2)); r2.addAnnotation(new XYTextAnnotation("ABC", 1.0, 2.0), Layer.BACKGROUND); assertTrue(r1.equals(r2)); // foreground annotation r1.addAnnotation(new XYTextAnnotation("DEF", 3.0, 4.0), Layer.FOREGROUND); assertFalse(r1.equals(r2)); r2.addAnnotation(new XYTextAnnotation("DEF", 3.0, 4.0), Layer.FOREGROUND); assertTrue(r1.equals(r2)); // default entity radius r1.setDefaultEntityRadius(99); assertFalse(r1.equals(r2)); r2.setDefaultEntityRadius(99); assertTrue(r1.equals(r2)); // legend item label generator r1.setLegendItemLabelGenerator(new StandardXYSeriesLabelGenerator( "X:{0}")); assertFalse(r1.equals(r2)); r2.setLegendItemLabelGenerator(new StandardXYSeriesLabelGenerator( "X:{0}")); assertTrue(r1.equals(r2)); // legend item tool tip generator r1.setLegendItemToolTipGenerator(new StandardXYSeriesLabelGenerator( "X:{0}")); assertFalse(r1.equals(r2)); r2.setLegendItemToolTipGenerator(new StandardXYSeriesLabelGenerator( "X:{0}")); assertTrue(r1.equals(r2)); // legend item URL generator r1.setLegendItemURLGenerator(new StandardXYSeriesLabelGenerator( "X:{0}")); assertFalse(r1.equals(r2)); r2.setLegendItemURLGenerator(new StandardXYSeriesLabelGenerator( "X:{0}")); assertTrue(r1.equals(r2)); }