@Test public void testEquals() { BarRenderer r1 = new BarRenderer(); BarRenderer r2 = new BarRenderer(); assertEquals(r1, r2); assertEquals(r2, r1); r1.setBase(0.123); assertFalse(r1.equals(r2)); r2.setBase(0.123); assertEquals(r1, r2); r1.setItemMargin(0.22); assertFalse(r1.equals(r2)); r2.setItemMargin(0.22); assertEquals(r1, r2); r1.setDrawBarOutline(!r1.isDrawBarOutline()); assertFalse(r1.equals(r2)); r2.setDrawBarOutline(!r2.isDrawBarOutline()); assertEquals(r1, r2); r1.setMaximumBarWidth(0.11); assertFalse(r1.equals(r2)); r2.setMaximumBarWidth(0.11); assertEquals(r1, r2); r1.setMinimumBarLength(0.04); assertFalse(r1.equals(r2)); r2.setMinimumBarLength(0.04); assertEquals(r1, r2); r1.setGradientPaintTransformer(new StandardGradientPaintTransformer( GradientPaintTransformType.CENTER_VERTICAL)); assertFalse(r1.equals(r2)); r2.setGradientPaintTransformer(new StandardGradientPaintTransformer( GradientPaintTransformType.CENTER_VERTICAL)); assertEquals(r1, r2); r1.setPositiveItemLabelPositionFallback(new ItemLabelPosition( ItemLabelAnchor.INSIDE1, TextAnchor.CENTER)); assertFalse(r1.equals(r2)); r2.setPositiveItemLabelPositionFallback(new ItemLabelPosition( ItemLabelAnchor.INSIDE1, TextAnchor.CENTER)); assertEquals(r1, r2); r1.setNegativeItemLabelPositionFallback(new ItemLabelPosition( ItemLabelAnchor.INSIDE1, TextAnchor.CENTER)); assertFalse(r1.equals(r2)); r2.setNegativeItemLabelPositionFallback(new ItemLabelPosition( ItemLabelAnchor.INSIDE1, TextAnchor.CENTER)); assertEquals(r1, r2); r1.setBarPainter(new GradientBarPainter(0.1, 0.2, 0.3)); assertFalse(r1.equals(r2)); r2.setBarPainter(new GradientBarPainter(0.1, 0.2, 0.3)); assertEquals(r1, r2); r1.setShadowVisible(false); assertFalse(r1.equals(r2)); r2.setShadowVisible(false); assertEquals(r1, r2); r1.setShadowPaint(Color.RED); assertFalse(r1.equals(r2)); r2.setShadowPaint(Color.RED); assertEquals(r1, r2); r1.setShadowXOffset(3.3); assertFalse(r1.equals(r2)); r2.setShadowXOffset(3.3); assertEquals(r1, r2); r1.setShadowYOffset(3.3); assertFalse(r1.equals(r2)); r2.setShadowYOffset(3.3); assertEquals(r1, r2); }
@Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof BarRenderer)) { return false; } BarRenderer that = (BarRenderer) obj; if (this.base != that.base) { return false; } if (this.itemMargin != that.itemMargin) { return false; } if (this.drawBarOutline != that.drawBarOutline) { return false; } if (this.maximumBarWidth != that.maximumBarWidth) { return false; } if (this.minimumBarLength != that.minimumBarLength) { return false; } if (!ObjectUtilities.equal(this.gradientPaintTransformer, that.gradientPaintTransformer)) { return false; } if (!ObjectUtilities.equal(this.positiveItemLabelPositionFallback, that.positiveItemLabelPositionFallback)) { return false; } if (!ObjectUtilities.equal(this.negativeItemLabelPositionFallback, that.negativeItemLabelPositionFallback)) { return false; } if (!this.barPainter.equals(that.barPainter)) { return false; } if (this.shadowsVisible != that.shadowsVisible) { return false; } if (!PaintUtilities.equal(this.shadowPaint, that.shadowPaint)) { return false; } if (this.shadowXOffset != that.shadowXOffset) { return false; } if (this.shadowYOffset != that.shadowYOffset) { return false; } return super.equals(obj); }
BarRenderer extends AbstractCategoryItemRenderer implements Cloneable, PublicCloneable, Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof BarRenderer)) { return false; } BarRenderer that = (BarRenderer) obj; if (this.base != that.base) { return false; } if (this.itemMargin != that.itemMargin) { return false; } if (this.drawBarOutline != that.drawBarOutline) { return false; } if (this.maximumBarWidth != that.maximumBarWidth) { return false; } if (this.minimumBarLength != that.minimumBarLength) { return false; } if (!ObjectUtilities.equal(this.gradientPaintTransformer, that.gradientPaintTransformer)) { return false; } if (!ObjectUtilities.equal(this.positiveItemLabelPositionFallback, that.positiveItemLabelPositionFallback)) { return false; } if (!ObjectUtilities.equal(this.negativeItemLabelPositionFallback, that.negativeItemLabelPositionFallback)) { return false; } if (!this.barPainter.equals(that.barPainter)) { return false; } if (this.shadowsVisible != that.shadowsVisible) { return false; } if (!PaintUtilities.equal(this.shadowPaint, that.shadowPaint)) { return false; } if (this.shadowXOffset != that.shadowXOffset) { return false; } if (this.shadowYOffset != that.shadowYOffset) { return false; } return super.equals(obj); } }
BarRenderer extends AbstractCategoryItemRenderer implements Cloneable, PublicCloneable, Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof BarRenderer)) { return false; } BarRenderer that = (BarRenderer) obj; if (this.base != that.base) { return false; } if (this.itemMargin != that.itemMargin) { return false; } if (this.drawBarOutline != that.drawBarOutline) { return false; } if (this.maximumBarWidth != that.maximumBarWidth) { return false; } if (this.minimumBarLength != that.minimumBarLength) { return false; } if (!ObjectUtilities.equal(this.gradientPaintTransformer, that.gradientPaintTransformer)) { return false; } if (!ObjectUtilities.equal(this.positiveItemLabelPositionFallback, that.positiveItemLabelPositionFallback)) { return false; } if (!ObjectUtilities.equal(this.negativeItemLabelPositionFallback, that.negativeItemLabelPositionFallback)) { return false; } if (!this.barPainter.equals(that.barPainter)) { return false; } if (this.shadowsVisible != that.shadowsVisible) { return false; } if (!PaintUtilities.equal(this.shadowPaint, that.shadowPaint)) { return false; } if (this.shadowXOffset != that.shadowXOffset) { return false; } if (this.shadowYOffset != that.shadowYOffset) { return false; } return super.equals(obj); } BarRenderer(); }
BarRenderer extends AbstractCategoryItemRenderer implements Cloneable, PublicCloneable, Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof BarRenderer)) { return false; } BarRenderer that = (BarRenderer) obj; if (this.base != that.base) { return false; } if (this.itemMargin != that.itemMargin) { return false; } if (this.drawBarOutline != that.drawBarOutline) { return false; } if (this.maximumBarWidth != that.maximumBarWidth) { return false; } if (this.minimumBarLength != that.minimumBarLength) { return false; } if (!ObjectUtilities.equal(this.gradientPaintTransformer, that.gradientPaintTransformer)) { return false; } if (!ObjectUtilities.equal(this.positiveItemLabelPositionFallback, that.positiveItemLabelPositionFallback)) { return false; } if (!ObjectUtilities.equal(this.negativeItemLabelPositionFallback, that.negativeItemLabelPositionFallback)) { return false; } if (!this.barPainter.equals(that.barPainter)) { return false; } if (this.shadowsVisible != that.shadowsVisible) { return false; } if (!PaintUtilities.equal(this.shadowPaint, that.shadowPaint)) { return false; } if (this.shadowXOffset != that.shadowXOffset) { return false; } if (this.shadowYOffset != that.shadowYOffset) { return false; } return super.equals(obj); } BarRenderer(); static BarPainter getDefaultBarPainter(); static void setDefaultBarPainter(BarPainter painter); static boolean getDefaultShadowsVisible(); static void setDefaultShadowsVisible(boolean visible); double getBase(); void setBase(double base); double getItemMargin(); void setItemMargin(double percent); boolean isDrawBarOutline(); void setDrawBarOutline(boolean draw); double getMaximumBarWidth(); void setMaximumBarWidth(double percent); double getMinimumBarLength(); void setMinimumBarLength(double min); GradientPaintTransformer getGradientPaintTransformer(); void setGradientPaintTransformer(
            GradientPaintTransformer transformer); ItemLabelPosition getPositiveItemLabelPositionFallback(); void setPositiveItemLabelPositionFallback(
            ItemLabelPosition position); ItemLabelPosition getNegativeItemLabelPositionFallback(); void setNegativeItemLabelPositionFallback(
            ItemLabelPosition position); boolean getIncludeBaseInRange(); void setIncludeBaseInRange(boolean include); BarPainter getBarPainter(); void setBarPainter(BarPainter painter); boolean getShadowsVisible(); void setShadowVisible(boolean visible); Paint getShadowPaint(); void setShadowPaint(Paint paint); double getShadowXOffset(); void setShadowXOffset(double offset); double getShadowYOffset(); void setShadowYOffset(double offset); double getLowerClip(); double getUpperClip(); @Override CategoryItemRendererState initialise(Graphics2D g2,
                                                Rectangle2D dataArea,
                                                CategoryPlot plot,
                                                int rendererIndex,
                                                PlotRenderingInfo info); @Override Range findRangeBounds(CategoryDataset dataset,
            boolean includeInterval); @Override LegendItem getLegendItem(int datasetIndex, int series); @Override void drawItem(Graphics2D g2,
                         CategoryItemRendererState state,
                         Rectangle2D dataArea,
                         CategoryPlot plot,
                         CategoryAxis domainAxis,
                         ValueAxis rangeAxis,
                         CategoryDataset dataset,
                         int row,
                         int column,
                         int pass); @Override boolean equals(Object obj); }
BarRenderer extends AbstractCategoryItemRenderer implements Cloneable, PublicCloneable, Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof BarRenderer)) { return false; } BarRenderer that = (BarRenderer) obj; if (this.base != that.base) { return false; } if (this.itemMargin != that.itemMargin) { return false; } if (this.drawBarOutline != that.drawBarOutline) { return false; } if (this.maximumBarWidth != that.maximumBarWidth) { return false; } if (this.minimumBarLength != that.minimumBarLength) { return false; } if (!ObjectUtilities.equal(this.gradientPaintTransformer, that.gradientPaintTransformer)) { return false; } if (!ObjectUtilities.equal(this.positiveItemLabelPositionFallback, that.positiveItemLabelPositionFallback)) { return false; } if (!ObjectUtilities.equal(this.negativeItemLabelPositionFallback, that.negativeItemLabelPositionFallback)) { return false; } if (!this.barPainter.equals(that.barPainter)) { return false; } if (this.shadowsVisible != that.shadowsVisible) { return false; } if (!PaintUtilities.equal(this.shadowPaint, that.shadowPaint)) { return false; } if (this.shadowXOffset != that.shadowXOffset) { return false; } if (this.shadowYOffset != that.shadowYOffset) { return false; } return super.equals(obj); } BarRenderer(); static BarPainter getDefaultBarPainter(); static void setDefaultBarPainter(BarPainter painter); static boolean getDefaultShadowsVisible(); static void setDefaultShadowsVisible(boolean visible); double getBase(); void setBase(double base); double getItemMargin(); void setItemMargin(double percent); boolean isDrawBarOutline(); void setDrawBarOutline(boolean draw); double getMaximumBarWidth(); void setMaximumBarWidth(double percent); double getMinimumBarLength(); void setMinimumBarLength(double min); GradientPaintTransformer getGradientPaintTransformer(); void setGradientPaintTransformer(
            GradientPaintTransformer transformer); ItemLabelPosition getPositiveItemLabelPositionFallback(); void setPositiveItemLabelPositionFallback(
            ItemLabelPosition position); ItemLabelPosition getNegativeItemLabelPositionFallback(); void setNegativeItemLabelPositionFallback(
            ItemLabelPosition position); boolean getIncludeBaseInRange(); void setIncludeBaseInRange(boolean include); BarPainter getBarPainter(); void setBarPainter(BarPainter painter); boolean getShadowsVisible(); void setShadowVisible(boolean visible); Paint getShadowPaint(); void setShadowPaint(Paint paint); double getShadowXOffset(); void setShadowXOffset(double offset); double getShadowYOffset(); void setShadowYOffset(double offset); double getLowerClip(); double getUpperClip(); @Override CategoryItemRendererState initialise(Graphics2D g2,
                                                Rectangle2D dataArea,
                                                CategoryPlot plot,
                                                int rendererIndex,
                                                PlotRenderingInfo info); @Override Range findRangeBounds(CategoryDataset dataset,
            boolean includeInterval); @Override LegendItem getLegendItem(int datasetIndex, int series); @Override void drawItem(Graphics2D g2,
                         CategoryItemRendererState state,
                         Rectangle2D dataArea,
                         CategoryPlot plot,
                         CategoryAxis domainAxis,
                         ValueAxis rangeAxis,
                         CategoryDataset dataset,
                         int row,
                         int column,
                         int pass); @Override boolean equals(Object obj); static final double DEFAULT_ITEM_MARGIN; static final double BAR_OUTLINE_WIDTH_THRESHOLD; }