@Test public void testEquals() { HighLowRenderer r1 = new HighLowRenderer(); HighLowRenderer r2 = new HighLowRenderer(); assertEquals(r1, r2); r1.setDrawOpenTicks(false); assertFalse(r1.equals(r2)); r2.setDrawOpenTicks(false); assertEquals(r1, r2); r1.setDrawCloseTicks(false); assertFalse(r1.equals(r2)); r2.setDrawCloseTicks(false); assertEquals(r1, r2); r1.setOpenTickPaint(Color.RED); assertFalse(r1.equals(r2)); r2.setOpenTickPaint(Color.RED); assertEquals(r1, r2); r1.setCloseTickPaint(Color.BLUE); assertFalse(r1.equals(r2)); r2.setCloseTickPaint(Color.BLUE); assertEquals(r1, r2); r1.setTickLength(99.9); assertFalse(r1.equals(r2)); r2.setTickLength(99.9); assertEquals(r1, r2); }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!(obj instanceof HighLowRenderer)) { return false; } HighLowRenderer that = (HighLowRenderer) obj; if (this.drawOpenTicks != that.drawOpenTicks) { return false; } if (this.drawCloseTicks != that.drawCloseTicks) { return false; } if (!PaintUtilities.equal(this.openTickPaint, that.openTickPaint)) { return false; } if (!PaintUtilities.equal(this.closeTickPaint, that.closeTickPaint)) { return false; } if (this.tickLength != that.tickLength) { return false; } if (!super.equals(obj)) { return false; } return true; }
HighLowRenderer extends AbstractXYItemRenderer implements XYItemRenderer, Cloneable, PublicCloneable, Serializable { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!(obj instanceof HighLowRenderer)) { return false; } HighLowRenderer that = (HighLowRenderer) obj; if (this.drawOpenTicks != that.drawOpenTicks) { return false; } if (this.drawCloseTicks != that.drawCloseTicks) { return false; } if (!PaintUtilities.equal(this.openTickPaint, that.openTickPaint)) { return false; } if (!PaintUtilities.equal(this.closeTickPaint, that.closeTickPaint)) { return false; } if (this.tickLength != that.tickLength) { return false; } if (!super.equals(obj)) { return false; } return true; } }
HighLowRenderer extends AbstractXYItemRenderer implements XYItemRenderer, Cloneable, PublicCloneable, Serializable { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!(obj instanceof HighLowRenderer)) { return false; } HighLowRenderer that = (HighLowRenderer) obj; if (this.drawOpenTicks != that.drawOpenTicks) { return false; } if (this.drawCloseTicks != that.drawCloseTicks) { return false; } if (!PaintUtilities.equal(this.openTickPaint, that.openTickPaint)) { return false; } if (!PaintUtilities.equal(this.closeTickPaint, that.closeTickPaint)) { return false; } if (this.tickLength != that.tickLength) { return false; } if (!super.equals(obj)) { return false; } return true; } HighLowRenderer(); }
HighLowRenderer extends AbstractXYItemRenderer implements XYItemRenderer, Cloneable, PublicCloneable, Serializable { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!(obj instanceof HighLowRenderer)) { return false; } HighLowRenderer that = (HighLowRenderer) obj; if (this.drawOpenTicks != that.drawOpenTicks) { return false; } if (this.drawCloseTicks != that.drawCloseTicks) { return false; } if (!PaintUtilities.equal(this.openTickPaint, that.openTickPaint)) { return false; } if (!PaintUtilities.equal(this.closeTickPaint, that.closeTickPaint)) { return false; } if (this.tickLength != that.tickLength) { return false; } if (!super.equals(obj)) { return false; } return true; } HighLowRenderer(); boolean getDrawOpenTicks(); void setDrawOpenTicks(boolean draw); boolean getDrawCloseTicks(); void setDrawCloseTicks(boolean draw); Paint getOpenTickPaint(); void setOpenTickPaint(Paint paint); Paint getCloseTickPaint(); void setCloseTickPaint(Paint paint); double getTickLength(); void setTickLength(double length); @Override Range findRangeBounds(XYDataset dataset); @Override void drawItem(Graphics2D g2,
                         XYItemRendererState state,
                         Rectangle2D dataArea,
                         PlotRenderingInfo info,
                         XYPlot plot,
                         ValueAxis domainAxis,
                         ValueAxis rangeAxis,
                         XYDataset dataset,
                         int series,
                         int item,
                         CrosshairState crosshairState,
                         int pass); @Override Object clone(); @Override boolean equals(Object obj); }
HighLowRenderer extends AbstractXYItemRenderer implements XYItemRenderer, Cloneable, PublicCloneable, Serializable { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!(obj instanceof HighLowRenderer)) { return false; } HighLowRenderer that = (HighLowRenderer) obj; if (this.drawOpenTicks != that.drawOpenTicks) { return false; } if (this.drawCloseTicks != that.drawCloseTicks) { return false; } if (!PaintUtilities.equal(this.openTickPaint, that.openTickPaint)) { return false; } if (!PaintUtilities.equal(this.closeTickPaint, that.closeTickPaint)) { return false; } if (this.tickLength != that.tickLength) { return false; } if (!super.equals(obj)) { return false; } return true; } HighLowRenderer(); boolean getDrawOpenTicks(); void setDrawOpenTicks(boolean draw); boolean getDrawCloseTicks(); void setDrawCloseTicks(boolean draw); Paint getOpenTickPaint(); void setOpenTickPaint(Paint paint); Paint getCloseTickPaint(); void setCloseTickPaint(Paint paint); double getTickLength(); void setTickLength(double length); @Override Range findRangeBounds(XYDataset dataset); @Override void drawItem(Graphics2D g2,
                         XYItemRendererState state,
                         Rectangle2D dataArea,
                         PlotRenderingInfo info,
                         XYPlot plot,
                         ValueAxis domainAxis,
                         ValueAxis rangeAxis,
                         XYDataset dataset,
                         int series,
                         int item,
                         CrosshairState crosshairState,
                         int pass); @Override Object clone(); @Override boolean equals(Object obj);  }