Java Code Examples for org.jfree.chart.renderer.xy.CandlestickRenderer#setUseOutlinePaint()
The following examples show how to use
org.jfree.chart.renderer.xy.CandlestickRenderer#setUseOutlinePaint() .
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: CandlestickRendererTests.java From astor with GNU General Public License v2.0 | 4 votes |
/** * Check that the equals() method distinguishes all fields. */ public void testEquals() { CandlestickRenderer r1 = new CandlestickRenderer(); CandlestickRenderer r2 = new CandlestickRenderer(); assertEquals(r1, r2); // upPaint r1.setUpPaint(new GradientPaint(1.0f, 2.0f, Color.red, 3.0f, 4.0f, Color.white)); assertFalse(r1.equals(r2)); r2.setUpPaint(new GradientPaint(1.0f, 2.0f, Color.red, 3.0f, 4.0f, Color.white)); assertTrue(r1.equals(r2)); // downPaint r1.setDownPaint(new GradientPaint(5.0f, 6.0f, Color.green, 7.0f, 8.0f, Color.yellow)); assertFalse(r1.equals(r2)); r2.setDownPaint(new GradientPaint(5.0f, 6.0f, Color.green, 7.0f, 8.0f, Color.yellow)); assertTrue(r1.equals(r2)); // drawVolume r1.setDrawVolume(false); assertFalse(r1.equals(r2)); r2.setDrawVolume(false); assertTrue(r1.equals(r2)); // candleWidth r1.setCandleWidth(3.3); assertFalse(r1.equals(r2)); r2.setCandleWidth(3.3); assertTrue(r1.equals(r2)); // maxCandleWidthInMilliseconds r1.setMaxCandleWidthInMilliseconds(123); assertFalse(r1.equals(r2)); r2.setMaxCandleWidthInMilliseconds(123); assertTrue(r1.equals(r2)); // autoWidthMethod r1.setAutoWidthMethod(CandlestickRenderer.WIDTHMETHOD_SMALLEST); assertFalse(r1.equals(r2)); r2.setAutoWidthMethod(CandlestickRenderer.WIDTHMETHOD_SMALLEST); assertTrue(r1.equals(r2)); // autoWidthFactor r1.setAutoWidthFactor(0.22); assertFalse(r1.equals(r2)); r2.setAutoWidthFactor(0.22); assertTrue(r1.equals(r2)); // autoWidthGap r1.setAutoWidthGap(1.1); assertFalse(r1.equals(r2)); r2.setAutoWidthGap(1.1); assertTrue(r1.equals(r2)); r1.setUseOutlinePaint(true); assertFalse(r1.equals(r2)); r2.setUseOutlinePaint(true); assertTrue(r1.equals(r2)); r1.setVolumePaint(Color.blue); assertFalse(r1.equals(r2)); r2.setVolumePaint(Color.blue); assertTrue(r1.equals(r2)); }
Example 2
Source File: CandlestickRendererTests.java From astor with GNU General Public License v2.0 | 4 votes |
/** * Check that the equals() method distinguishes all fields. */ public void testEquals() { CandlestickRenderer r1 = new CandlestickRenderer(); CandlestickRenderer r2 = new CandlestickRenderer(); assertEquals(r1, r2); // upPaint r1.setUpPaint(new GradientPaint(1.0f, 2.0f, Color.red, 3.0f, 4.0f, Color.white)); assertFalse(r1.equals(r2)); r2.setUpPaint(new GradientPaint(1.0f, 2.0f, Color.red, 3.0f, 4.0f, Color.white)); assertTrue(r1.equals(r2)); // downPaint r1.setDownPaint(new GradientPaint(5.0f, 6.0f, Color.green, 7.0f, 8.0f, Color.yellow)); assertFalse(r1.equals(r2)); r2.setDownPaint(new GradientPaint(5.0f, 6.0f, Color.green, 7.0f, 8.0f, Color.yellow)); assertTrue(r1.equals(r2)); // drawVolume r1.setDrawVolume(false); assertFalse(r1.equals(r2)); r2.setDrawVolume(false); assertTrue(r1.equals(r2)); // candleWidth r1.setCandleWidth(3.3); assertFalse(r1.equals(r2)); r2.setCandleWidth(3.3); assertTrue(r1.equals(r2)); // maxCandleWidthInMilliseconds r1.setMaxCandleWidthInMilliseconds(123); assertFalse(r1.equals(r2)); r2.setMaxCandleWidthInMilliseconds(123); assertTrue(r1.equals(r2)); // autoWidthMethod r1.setAutoWidthMethod(CandlestickRenderer.WIDTHMETHOD_SMALLEST); assertFalse(r1.equals(r2)); r2.setAutoWidthMethod(CandlestickRenderer.WIDTHMETHOD_SMALLEST); assertTrue(r1.equals(r2)); // autoWidthFactor r1.setAutoWidthFactor(0.22); assertFalse(r1.equals(r2)); r2.setAutoWidthFactor(0.22); assertTrue(r1.equals(r2)); // autoWidthGap r1.setAutoWidthGap(1.1); assertFalse(r1.equals(r2)); r2.setAutoWidthGap(1.1); assertTrue(r1.equals(r2)); r1.setUseOutlinePaint(true); assertFalse(r1.equals(r2)); r2.setUseOutlinePaint(true); assertTrue(r1.equals(r2)); r1.setVolumePaint(Color.blue); assertFalse(r1.equals(r2)); r2.setVolumePaint(Color.blue); assertTrue(r1.equals(r2)); }