use of org.jfree.ui.StandardGradientPaintTransformer in project SIMVA-SoS by SESoS.
the class XYSplineRendererTest method testEquals.
/**
* Test that the equals() method distinguishes all fields.
*/
@Test
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));
r1.setFillType(XYSplineRenderer.FillType.TO_ZERO);
assertFalse(r1.equals(r2));
r2.setFillType(XYSplineRenderer.FillType.TO_ZERO);
assertTrue(r1.equals(r2));
r1.setGradientPaintTransformer(null);
assertFalse(r1.equals(r2));
r2.setGradientPaintTransformer(null);
assertTrue(r1.equals(r2));
r1.setGradientPaintTransformer(new StandardGradientPaintTransformer(GradientPaintTransformType.HORIZONTAL));
assertFalse(r1.equals(r2));
r2.setGradientPaintTransformer(new StandardGradientPaintTransformer(GradientPaintTransformType.HORIZONTAL));
assertTrue(r1.equals(r2));
}
use of org.jfree.ui.StandardGradientPaintTransformer in project SIMVA-SoS by SESoS.
the class XYBarRendererTest method testEquals.
/**
* Test that the equals() method distinguishes all fields.
*/
@Test
public void testEquals() {
// default instances
XYBarRenderer r1 = new XYBarRenderer();
XYBarRenderer r2 = new XYBarRenderer();
assertTrue(r1.equals(r2));
assertTrue(r2.equals(r1));
// setBase()
r1.setBase(1.0);
assertFalse(r1.equals(r2));
r2.setBase(1.0);
assertTrue(r1.equals(r2));
// setUseYInterval
r1.setUseYInterval(!r1.getUseYInterval());
assertFalse(r1.equals(r2));
r2.setUseYInterval(!r2.getUseYInterval());
assertTrue(r1.equals(r2));
// setMargin()
r1.setMargin(0.10);
assertFalse(r1.equals(r2));
r2.setMargin(0.10);
assertTrue(r1.equals(r2));
// setDrawBarOutline()
r1.setDrawBarOutline(!r1.isDrawBarOutline());
assertFalse(r1.equals(r2));
r2.setDrawBarOutline(!r2.isDrawBarOutline());
assertTrue(r1.equals(r2));
// setGradientPaintTransformer()
r1.setGradientPaintTransformer(new StandardGradientPaintTransformer(GradientPaintTransformType.CENTER_HORIZONTAL));
assertFalse(r1.equals(r2));
r2.setGradientPaintTransformer(new StandardGradientPaintTransformer(GradientPaintTransformType.CENTER_HORIZONTAL));
assertTrue(r1.equals(r2));
// legendBar
r1.setLegendBar(new Rectangle2D.Double(1.0, 2.0, 3.0, 4.0));
assertFalse(r1.equals(r2));
r2.setLegendBar(new Rectangle2D.Double(1.0, 2.0, 3.0, 4.0));
assertTrue(r1.equals(r2));
// positiveItemLabelFallbackPosition
r1.setPositiveItemLabelPositionFallback(new ItemLabelPosition());
assertFalse(r1.equals(r2));
r2.setPositiveItemLabelPositionFallback(new ItemLabelPosition());
assertTrue(r1.equals(r2));
// negativeItemLabelFallbackPosition
r1.setNegativeItemLabelPositionFallback(new ItemLabelPosition());
assertFalse(r1.equals(r2));
r2.setNegativeItemLabelPositionFallback(new ItemLabelPosition());
assertTrue(r1.equals(r2));
// barPainter
r1.setBarPainter(new GradientXYBarPainter(0.11, 0.22, 0.33));
assertFalse(r1.equals(r2));
r2.setBarPainter(new GradientXYBarPainter(0.11, 0.22, 0.33));
assertTrue(r1.equals(r2));
// shadowsVisible
r1.setShadowVisible(false);
assertFalse(r1.equals(r2));
r2.setShadowVisible(false);
assertTrue(r1.equals(r2));
// shadowXOffset
r1.setShadowXOffset(3.3);
assertFalse(r1.equals(r2));
r2.setShadowXOffset(3.3);
assertTrue(r1.equals(r2));
// shadowYOffset
r1.setShadowYOffset(3.3);
assertFalse(r1.equals(r2));
r2.setShadowYOffset(3.3);
assertTrue(r1.equals(r2));
}
Aggregations