@Test public void testEquals() { GanttRenderer r1 = new GanttRenderer(); GanttRenderer r2 = new GanttRenderer(); assertEquals(r1, r2); r1.setCompletePaint(Color.yellow); assertFalse(r1.equals(r2)); r2.setCompletePaint(Color.yellow); assertEquals(r1, r2); r1.setIncompletePaint(Color.green); assertFalse(r1.equals(r2)); r2.setIncompletePaint(Color.green); assertEquals(r1, r2); r1.setStartPercent(0.11); assertFalse(r1.equals(r2)); r2.setStartPercent(0.11); assertEquals(r1, r2); r1.setEndPercent(0.88); assertFalse(r1.equals(r2)); r2.setEndPercent(0.88); assertEquals(r1, r2); }
@Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof GanttRenderer)) { return false; } GanttRenderer that = (GanttRenderer) obj; if (!PaintUtilities.equal(this.completePaint, that.completePaint)) { return false; } if (!PaintUtilities.equal(this.incompletePaint, that.incompletePaint)) { return false; } if (this.startPercent != that.startPercent) { return false; } if (this.endPercent != that.endPercent) { return false; } return super.equals(obj); }
GanttRenderer extends IntervalBarRenderer implements Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof GanttRenderer)) { return false; } GanttRenderer that = (GanttRenderer) obj; if (!PaintUtilities.equal(this.completePaint, that.completePaint)) { return false; } if (!PaintUtilities.equal(this.incompletePaint, that.incompletePaint)) { return false; } if (this.startPercent != that.startPercent) { return false; } if (this.endPercent != that.endPercent) { return false; } return super.equals(obj); } }
GanttRenderer extends IntervalBarRenderer implements Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof GanttRenderer)) { return false; } GanttRenderer that = (GanttRenderer) obj; if (!PaintUtilities.equal(this.completePaint, that.completePaint)) { return false; } if (!PaintUtilities.equal(this.incompletePaint, that.incompletePaint)) { return false; } if (this.startPercent != that.startPercent) { return false; } if (this.endPercent != that.endPercent) { return false; } return super.equals(obj); } GanttRenderer(); }
GanttRenderer extends IntervalBarRenderer implements Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof GanttRenderer)) { return false; } GanttRenderer that = (GanttRenderer) obj; if (!PaintUtilities.equal(this.completePaint, that.completePaint)) { return false; } if (!PaintUtilities.equal(this.incompletePaint, that.incompletePaint)) { return false; } if (this.startPercent != that.startPercent) { return false; } if (this.endPercent != that.endPercent) { return false; } return super.equals(obj); } GanttRenderer(); Paint getCompletePaint(); void setCompletePaint(Paint paint); Paint getIncompletePaint(); void setIncompletePaint(Paint paint); double getStartPercent(); void setStartPercent(double percent); double getEndPercent(); void setEndPercent(double percent); @Override void drawItem(Graphics2D g2,
                         CategoryItemRendererState state,
                         Rectangle2D dataArea,
                         CategoryPlot plot,
                         CategoryAxis domainAxis,
                         ValueAxis rangeAxis,
                         CategoryDataset dataset,
                         int row,
                         int column,
                         int pass); @Override double getItemMiddle(Comparable rowKey, Comparable columnKey,
            CategoryDataset dataset, CategoryAxis axis, Rectangle2D area,
            RectangleEdge edge); @Override boolean equals(Object obj); }
GanttRenderer extends IntervalBarRenderer implements Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof GanttRenderer)) { return false; } GanttRenderer that = (GanttRenderer) obj; if (!PaintUtilities.equal(this.completePaint, that.completePaint)) { return false; } if (!PaintUtilities.equal(this.incompletePaint, that.incompletePaint)) { return false; } if (this.startPercent != that.startPercent) { return false; } if (this.endPercent != that.endPercent) { return false; } return super.equals(obj); } GanttRenderer(); Paint getCompletePaint(); void setCompletePaint(Paint paint); Paint getIncompletePaint(); void setIncompletePaint(Paint paint); double getStartPercent(); void setStartPercent(double percent); double getEndPercent(); void setEndPercent(double percent); @Override void drawItem(Graphics2D g2,
                         CategoryItemRendererState state,
                         Rectangle2D dataArea,
                         CategoryPlot plot,
                         CategoryAxis domainAxis,
                         ValueAxis rangeAxis,
                         CategoryDataset dataset,
                         int row,
                         int column,
                         int pass); @Override double getItemMiddle(Comparable rowKey, Comparable columnKey,
            CategoryDataset dataset, CategoryAxis axis, Rectangle2D area,
            RectangleEdge edge); @Override boolean equals(Object obj);  }