@Test public void testEquals() { BoxAndWhiskerRenderer r1 = new BoxAndWhiskerRenderer(); BoxAndWhiskerRenderer r2 = new BoxAndWhiskerRenderer(); assertEquals(r1, r2); r1.setArtifactPaint(new GradientPaint(1.0f, 2.0f, Color.yellow, 3.0f, 4.0f, Color.BLUE)); assertFalse(r1.equals(r2)); r2.setArtifactPaint(new GradientPaint(1.0f, 2.0f, Color.yellow, 3.0f, 4.0f, Color.BLUE)); assertEquals(r1, r2); r1.setFillBox(!r1.getFillBox()); assertFalse(r1.equals(r2)); r2.setFillBox(!r2.getFillBox()); assertEquals(r1, r2); r1.setItemMargin(0.11); assertFalse(r1.equals(r2)); r2.setItemMargin(0.11); assertEquals(r1, r2); r1.setMaximumBarWidth(0.99); assertFalse(r1.equals(r2)); r2.setMaximumBarWidth(0.99); assertEquals(r1, r2); r1.setMeanVisible(false); assertFalse(r1.equals(r2)); r2.setMeanVisible(false); assertEquals(r1, r2); r1.setMedianVisible(false); assertFalse(r1.equals(r2)); r2.setMedianVisible(false); assertEquals(r1, r2); }
@Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof BoxAndWhiskerRenderer)) { return false; } BoxAndWhiskerRenderer that = (BoxAndWhiskerRenderer) obj; if (this.fillBox != that.fillBox) { return false; } if (this.itemMargin != that.itemMargin) { return false; } if (this.maximumBarWidth != that.maximumBarWidth) { return false; } if (this.meanVisible != that.meanVisible) { return false; } if (this.medianVisible != that.medianVisible) { return false; } if (this.useOutlinePaintForWhiskers != that.useOutlinePaintForWhiskers) { return false; } if (this.whiskerWidth != that.whiskerWidth) { return false; } if (!PaintUtilities.equal(this.artifactPaint, that.artifactPaint)) { return false; } return super.equals(obj); }
BoxAndWhiskerRenderer extends AbstractCategoryItemRenderer implements Cloneable, PublicCloneable, Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof BoxAndWhiskerRenderer)) { return false; } BoxAndWhiskerRenderer that = (BoxAndWhiskerRenderer) obj; if (this.fillBox != that.fillBox) { return false; } if (this.itemMargin != that.itemMargin) { return false; } if (this.maximumBarWidth != that.maximumBarWidth) { return false; } if (this.meanVisible != that.meanVisible) { return false; } if (this.medianVisible != that.medianVisible) { return false; } if (this.useOutlinePaintForWhiskers != that.useOutlinePaintForWhiskers) { return false; } if (this.whiskerWidth != that.whiskerWidth) { return false; } if (!PaintUtilities.equal(this.artifactPaint, that.artifactPaint)) { return false; } return super.equals(obj); } }
BoxAndWhiskerRenderer extends AbstractCategoryItemRenderer implements Cloneable, PublicCloneable, Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof BoxAndWhiskerRenderer)) { return false; } BoxAndWhiskerRenderer that = (BoxAndWhiskerRenderer) obj; if (this.fillBox != that.fillBox) { return false; } if (this.itemMargin != that.itemMargin) { return false; } if (this.maximumBarWidth != that.maximumBarWidth) { return false; } if (this.meanVisible != that.meanVisible) { return false; } if (this.medianVisible != that.medianVisible) { return false; } if (this.useOutlinePaintForWhiskers != that.useOutlinePaintForWhiskers) { return false; } if (this.whiskerWidth != that.whiskerWidth) { return false; } if (!PaintUtilities.equal(this.artifactPaint, that.artifactPaint)) { return false; } return super.equals(obj); } BoxAndWhiskerRenderer(); }
BoxAndWhiskerRenderer extends AbstractCategoryItemRenderer implements Cloneable, PublicCloneable, Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof BoxAndWhiskerRenderer)) { return false; } BoxAndWhiskerRenderer that = (BoxAndWhiskerRenderer) obj; if (this.fillBox != that.fillBox) { return false; } if (this.itemMargin != that.itemMargin) { return false; } if (this.maximumBarWidth != that.maximumBarWidth) { return false; } if (this.meanVisible != that.meanVisible) { return false; } if (this.medianVisible != that.medianVisible) { return false; } if (this.useOutlinePaintForWhiskers != that.useOutlinePaintForWhiskers) { return false; } if (this.whiskerWidth != that.whiskerWidth) { return false; } if (!PaintUtilities.equal(this.artifactPaint, that.artifactPaint)) { return false; } return super.equals(obj); } BoxAndWhiskerRenderer(); Paint getArtifactPaint(); void setArtifactPaint(Paint paint); boolean getFillBox(); void setFillBox(boolean flag); double getItemMargin(); void setItemMargin(double margin); double getMaximumBarWidth(); void setMaximumBarWidth(double percent); boolean isMeanVisible(); void setMeanVisible(boolean visible); boolean isMedianVisible(); void setMedianVisible(boolean visible); boolean getUseOutlinePaintForWhiskers(); void setUseOutlinePaintForWhiskers(boolean flag); double getWhiskerWidth(); void setWhiskerWidth(double width); @Override LegendItem getLegendItem(int datasetIndex, int series); @Override Range findRangeBounds(CategoryDataset dataset); @Override CategoryItemRendererState initialise(Graphics2D g2,
                                                Rectangle2D dataArea,
                                                CategoryPlot plot,
                                                int rendererIndex,
                                                PlotRenderingInfo info); @Override void drawItem(Graphics2D g2, CategoryItemRendererState state,
        Rectangle2D dataArea, CategoryPlot plot, CategoryAxis domainAxis,
        ValueAxis rangeAxis, CategoryDataset dataset, int row, int column,
        int pass); void drawHorizontalItem(Graphics2D g2,
            CategoryItemRendererState state, Rectangle2D dataArea,
            CategoryPlot plot, CategoryAxis domainAxis, ValueAxis rangeAxis,
            CategoryDataset dataset, int row, int column); void drawVerticalItem(Graphics2D g2, CategoryItemRendererState state,
        Rectangle2D dataArea, CategoryPlot plot, CategoryAxis domainAxis,
        ValueAxis rangeAxis, CategoryDataset dataset, int row, int column); @Override boolean equals(Object obj); }
BoxAndWhiskerRenderer extends AbstractCategoryItemRenderer implements Cloneable, PublicCloneable, Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof BoxAndWhiskerRenderer)) { return false; } BoxAndWhiskerRenderer that = (BoxAndWhiskerRenderer) obj; if (this.fillBox != that.fillBox) { return false; } if (this.itemMargin != that.itemMargin) { return false; } if (this.maximumBarWidth != that.maximumBarWidth) { return false; } if (this.meanVisible != that.meanVisible) { return false; } if (this.medianVisible != that.medianVisible) { return false; } if (this.useOutlinePaintForWhiskers != that.useOutlinePaintForWhiskers) { return false; } if (this.whiskerWidth != that.whiskerWidth) { return false; } if (!PaintUtilities.equal(this.artifactPaint, that.artifactPaint)) { return false; } return super.equals(obj); } BoxAndWhiskerRenderer(); Paint getArtifactPaint(); void setArtifactPaint(Paint paint); boolean getFillBox(); void setFillBox(boolean flag); double getItemMargin(); void setItemMargin(double margin); double getMaximumBarWidth(); void setMaximumBarWidth(double percent); boolean isMeanVisible(); void setMeanVisible(boolean visible); boolean isMedianVisible(); void setMedianVisible(boolean visible); boolean getUseOutlinePaintForWhiskers(); void setUseOutlinePaintForWhiskers(boolean flag); double getWhiskerWidth(); void setWhiskerWidth(double width); @Override LegendItem getLegendItem(int datasetIndex, int series); @Override Range findRangeBounds(CategoryDataset dataset); @Override CategoryItemRendererState initialise(Graphics2D g2,
                                                Rectangle2D dataArea,
                                                CategoryPlot plot,
                                                int rendererIndex,
                                                PlotRenderingInfo info); @Override void drawItem(Graphics2D g2, CategoryItemRendererState state,
        Rectangle2D dataArea, CategoryPlot plot, CategoryAxis domainAxis,
        ValueAxis rangeAxis, CategoryDataset dataset, int row, int column,
        int pass); void drawHorizontalItem(Graphics2D g2,
            CategoryItemRendererState state, Rectangle2D dataArea,
            CategoryPlot plot, CategoryAxis domainAxis, ValueAxis rangeAxis,
            CategoryDataset dataset, int row, int column); void drawVerticalItem(Graphics2D g2, CategoryItemRendererState state,
        Rectangle2D dataArea, CategoryPlot plot, CategoryAxis domainAxis,
        ValueAxis rangeAxis, CategoryDataset dataset, int row, int column); @Override boolean equals(Object obj);  }