@Test public void testEquals() { PolarPlot plot1 = new PolarPlot(); PolarPlot plot2 = new PolarPlot(); assertEquals(plot1, plot2); assertEquals(plot2, plot1); plot1.setAngleGridlinePaint(new GradientPaint(1.0f, 2.0f, Color.RED, 3.0f, 4.0f, Color.BLUE)); assertFalse(plot1.equals(plot2)); plot2.setAngleGridlinePaint(new GradientPaint(1.0f, 2.0f, Color.RED, 3.0f, 4.0f, Color.BLUE)); assertEquals(plot1, plot2); Stroke s = new BasicStroke(1.23f); plot1.setAngleGridlineStroke(s); assertFalse(plot1.equals(plot2)); plot2.setAngleGridlineStroke(s); assertEquals(plot1, plot2); plot1.setAngleTickUnit(new NumberTickUnit(11.0)); assertFalse(plot1.equals(plot2)); plot2.setAngleTickUnit(new NumberTickUnit(11.0)); assertEquals(plot1, plot2); plot1.setAngleGridlinesVisible(false); assertFalse(plot1.equals(plot2)); plot2.setAngleGridlinesVisible(false); assertEquals(plot1, plot2); plot1.setAngleLabelFont(new Font("Serif", Font.PLAIN, 9)); assertFalse(plot1.equals(plot2)); plot2.setAngleLabelFont(new Font("Serif", Font.PLAIN, 9)); assertEquals(plot1, plot2); plot1.setAngleLabelPaint(new GradientPaint(9.0f, 8.0f, Color.BLUE, 7.0f, 6.0f, Color.RED)); assertFalse(plot1.equals(plot2)); plot2.setAngleLabelPaint(new GradientPaint(9.0f, 8.0f, Color.BLUE, 7.0f, 6.0f, Color.RED)); assertEquals(plot1, plot2); plot1.setAngleLabelsVisible(false); assertFalse(plot1.equals(plot2)); plot2.setAngleLabelsVisible(false); assertEquals(plot1, plot2); plot1.setAxis(new NumberAxis("Test")); assertFalse(plot1.equals(plot2)); plot2.setAxis(new NumberAxis("Test")); assertEquals(plot1, plot2); plot1.setRadiusGridlinePaint(new GradientPaint(1.0f, 2.0f, Color.WHITE, 3.0f, 4.0f, Color.BLACK)); assertFalse(plot1.equals(plot2)); plot2.setRadiusGridlinePaint(new GradientPaint(1.0f, 2.0f, Color.WHITE, 3.0f, 4.0f, Color.BLACK)); assertEquals(plot1, plot2); plot1.setRadiusGridlineStroke(s); assertFalse(plot1.equals(plot2)); plot2.setRadiusGridlineStroke(s); assertEquals(plot1, plot2); plot1.setRadiusGridlinesVisible(false); assertFalse(plot1.equals(plot2)); plot2.setRadiusGridlinesVisible(false); assertEquals(plot1, plot2); plot1.setRadiusMinorGridlinesVisible(false); assertFalse(plot1.equals(plot2)); plot2.setRadiusMinorGridlinesVisible(false); assertEquals(plot1, plot2); plot1.addCornerTextItem("XYZ"); assertFalse(plot1.equals(plot2)); plot2.addCornerTextItem("XYZ"); assertEquals(plot1, plot2); plot1.setMargin(6); assertFalse(plot1.equals(plot2)); plot2.setMargin(6); assertEquals(plot1, plot2); List<LegendItem> lic1 = new ArrayList<LegendItem>(); lic1.add(new LegendItem("XYZ", Color.RED)); plot1.setFixedLegendItems(lic1); assertFalse(plot1.equals(plot2)); List<LegendItem> lic2 = new ArrayList<LegendItem>(); lic2.add(new LegendItem("XYZ", Color.RED)); plot2.setFixedLegendItems(lic2); assertEquals(plot1, plot2); }
@Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof PolarPlot)) { return false; } PolarPlot that = (PolarPlot) obj; if (!this.axes.equals(that.axes)) { return false; } if (!this.axisLocations.equals(that.axisLocations)) { return false; } if (!this.renderers.equals(that.renderers)) { return false; } if (!this.angleTickUnit.equals(that.angleTickUnit)) { return false; } if (this.angleGridlinesVisible != that.angleGridlinesVisible) { return false; } if (this.angleOffset != that.angleOffset) { return false; } if (this.counterClockwise != that.counterClockwise) { return false; } if (this.angleLabelsVisible != that.angleLabelsVisible) { return false; } if (!this.angleLabelFont.equals(that.angleLabelFont)) { return false; } if (!PaintUtilities.equal(this.angleLabelPaint, that.angleLabelPaint)) { return false; } if (!ObjectUtilities.equal(this.angleGridlineStroke, that.angleGridlineStroke)) { return false; } if (!PaintUtilities.equal( this.angleGridlinePaint, that.angleGridlinePaint )) { return false; } if (this.radiusGridlinesVisible != that.radiusGridlinesVisible) { return false; } if (!ObjectUtilities.equal(this.radiusGridlineStroke, that.radiusGridlineStroke)) { return false; } if (!PaintUtilities.equal(this.radiusGridlinePaint, that.radiusGridlinePaint)) { return false; } if (this.radiusMinorGridlinesVisible != that.radiusMinorGridlinesVisible) { return false; } if (!this.cornerTextItems.equals(that.cornerTextItems)) { return false; } if (this.margin != that.margin) { return false; } if (!ObjectUtilities.equal(this.fixedLegendItems, that.fixedLegendItems)) { return false; } return super.equals(obj); }
PolarPlot extends Plot implements ValueAxisPlot, Zoomable,
        RendererChangeListener, Cloneable, Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof PolarPlot)) { return false; } PolarPlot that = (PolarPlot) obj; if (!this.axes.equals(that.axes)) { return false; } if (!this.axisLocations.equals(that.axisLocations)) { return false; } if (!this.renderers.equals(that.renderers)) { return false; } if (!this.angleTickUnit.equals(that.angleTickUnit)) { return false; } if (this.angleGridlinesVisible != that.angleGridlinesVisible) { return false; } if (this.angleOffset != that.angleOffset) { return false; } if (this.counterClockwise != that.counterClockwise) { return false; } if (this.angleLabelsVisible != that.angleLabelsVisible) { return false; } if (!this.angleLabelFont.equals(that.angleLabelFont)) { return false; } if (!PaintUtilities.equal(this.angleLabelPaint, that.angleLabelPaint)) { return false; } if (!ObjectUtilities.equal(this.angleGridlineStroke, that.angleGridlineStroke)) { return false; } if (!PaintUtilities.equal( this.angleGridlinePaint, that.angleGridlinePaint )) { return false; } if (this.radiusGridlinesVisible != that.radiusGridlinesVisible) { return false; } if (!ObjectUtilities.equal(this.radiusGridlineStroke, that.radiusGridlineStroke)) { return false; } if (!PaintUtilities.equal(this.radiusGridlinePaint, that.radiusGridlinePaint)) { return false; } if (this.radiusMinorGridlinesVisible != that.radiusMinorGridlinesVisible) { return false; } if (!this.cornerTextItems.equals(that.cornerTextItems)) { return false; } if (this.margin != that.margin) { return false; } if (!ObjectUtilities.equal(this.fixedLegendItems, that.fixedLegendItems)) { return false; } return super.equals(obj); } }
PolarPlot extends Plot implements ValueAxisPlot, Zoomable,
        RendererChangeListener, Cloneable, Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof PolarPlot)) { return false; } PolarPlot that = (PolarPlot) obj; if (!this.axes.equals(that.axes)) { return false; } if (!this.axisLocations.equals(that.axisLocations)) { return false; } if (!this.renderers.equals(that.renderers)) { return false; } if (!this.angleTickUnit.equals(that.angleTickUnit)) { return false; } if (this.angleGridlinesVisible != that.angleGridlinesVisible) { return false; } if (this.angleOffset != that.angleOffset) { return false; } if (this.counterClockwise != that.counterClockwise) { return false; } if (this.angleLabelsVisible != that.angleLabelsVisible) { return false; } if (!this.angleLabelFont.equals(that.angleLabelFont)) { return false; } if (!PaintUtilities.equal(this.angleLabelPaint, that.angleLabelPaint)) { return false; } if (!ObjectUtilities.equal(this.angleGridlineStroke, that.angleGridlineStroke)) { return false; } if (!PaintUtilities.equal( this.angleGridlinePaint, that.angleGridlinePaint )) { return false; } if (this.radiusGridlinesVisible != that.radiusGridlinesVisible) { return false; } if (!ObjectUtilities.equal(this.radiusGridlineStroke, that.radiusGridlineStroke)) { return false; } if (!PaintUtilities.equal(this.radiusGridlinePaint, that.radiusGridlinePaint)) { return false; } if (this.radiusMinorGridlinesVisible != that.radiusMinorGridlinesVisible) { return false; } if (!this.cornerTextItems.equals(that.cornerTextItems)) { return false; } if (this.margin != that.margin) { return false; } if (!ObjectUtilities.equal(this.fixedLegendItems, that.fixedLegendItems)) { return false; } return super.equals(obj); } PolarPlot();  PolarPlot(XYDataset dataset, ValueAxis radiusAxis,
                PolarItemRenderer renderer); }
PolarPlot extends Plot implements ValueAxisPlot, Zoomable,
        RendererChangeListener, Cloneable, Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof PolarPlot)) { return false; } PolarPlot that = (PolarPlot) obj; if (!this.axes.equals(that.axes)) { return false; } if (!this.axisLocations.equals(that.axisLocations)) { return false; } if (!this.renderers.equals(that.renderers)) { return false; } if (!this.angleTickUnit.equals(that.angleTickUnit)) { return false; } if (this.angleGridlinesVisible != that.angleGridlinesVisible) { return false; } if (this.angleOffset != that.angleOffset) { return false; } if (this.counterClockwise != that.counterClockwise) { return false; } if (this.angleLabelsVisible != that.angleLabelsVisible) { return false; } if (!this.angleLabelFont.equals(that.angleLabelFont)) { return false; } if (!PaintUtilities.equal(this.angleLabelPaint, that.angleLabelPaint)) { return false; } if (!ObjectUtilities.equal(this.angleGridlineStroke, that.angleGridlineStroke)) { return false; } if (!PaintUtilities.equal( this.angleGridlinePaint, that.angleGridlinePaint )) { return false; } if (this.radiusGridlinesVisible != that.radiusGridlinesVisible) { return false; } if (!ObjectUtilities.equal(this.radiusGridlineStroke, that.radiusGridlineStroke)) { return false; } if (!PaintUtilities.equal(this.radiusGridlinePaint, that.radiusGridlinePaint)) { return false; } if (this.radiusMinorGridlinesVisible != that.radiusMinorGridlinesVisible) { return false; } if (!this.cornerTextItems.equals(that.cornerTextItems)) { return false; } if (this.margin != that.margin) { return false; } if (!ObjectUtilities.equal(this.fixedLegendItems, that.fixedLegendItems)) { return false; } return super.equals(obj); } PolarPlot();  PolarPlot(XYDataset dataset, ValueAxis radiusAxis,
                PolarItemRenderer renderer); @Override String getPlotType(); ValueAxis getAxis(); ValueAxis getAxis(int index); void setAxis(ValueAxis axis); void setAxis(int index, ValueAxis axis); void setAxis(int index, ValueAxis axis, boolean notify); PolarAxisLocation getAxisLocation(); PolarAxisLocation getAxisLocation(int index); void setAxisLocation(PolarAxisLocation location); void setAxisLocation(PolarAxisLocation location, boolean notify); void setAxisLocation(int index, PolarAxisLocation location); void setAxisLocation(int index, PolarAxisLocation location,
            boolean notify); int getAxisCount(); XYDataset getDataset(); XYDataset getDataset(int index); void setDataset(XYDataset dataset); void setDataset(int index, XYDataset dataset); int getDatasetCount(); int indexOf(XYDataset dataset); PolarItemRenderer getRenderer(); PolarItemRenderer getRenderer(int index); void setRenderer(PolarItemRenderer renderer); void setRenderer(int index, PolarItemRenderer renderer); void setRenderer(int index, PolarItemRenderer renderer,
                            boolean notify); TickUnit getAngleTickUnit(); void setAngleTickUnit(TickUnit unit); double getAngleOffset(); void setAngleOffset(double offset); boolean isCounterClockwise(); void setCounterClockwise(boolean counterClockwise); boolean isAngleLabelsVisible(); void setAngleLabelsVisible(boolean visible); Font getAngleLabelFont(); void setAngleLabelFont(Font font); Paint getAngleLabelPaint(); void setAngleLabelPaint(Paint paint); boolean isAngleGridlinesVisible(); void setAngleGridlinesVisible(boolean visible); Stroke getAngleGridlineStroke(); void setAngleGridlineStroke(Stroke stroke); Paint getAngleGridlinePaint(); void setAngleGridlinePaint(Paint paint); boolean isRadiusGridlinesVisible(); void setRadiusGridlinesVisible(boolean visible); Stroke getRadiusGridlineStroke(); void setRadiusGridlineStroke(Stroke stroke); Paint getRadiusGridlinePaint(); void setRadiusGridlinePaint(Paint paint); boolean isRadiusMinorGridlinesVisible(); void setRadiusMinorGridlinesVisible(boolean flag); int getMargin(); void setMargin(int margin); List<LegendItem> getFixedLegendItems(); void setFixedLegendItems(List<LegendItem> items); void addCornerTextItem(String text); void removeCornerTextItem(String text); void clearCornerTextItems(); void mapDatasetToAxis(int index, int axisIndex); void mapDatasetToAxes(int index, List<Integer> axisIndices); ValueAxis getAxisForDataset(int index); int getAxisIndex(ValueAxis axis); int getIndexOf(PolarItemRenderer renderer); @Override void draw(Graphics2D g2, Rectangle2D area, Point2D anchor,
            PlotState parentState, PlotRenderingInfo info); @Override void zoom(double percent); @Override Range getDataRange(ValueAxis axis); @Override void datasetChanged(DatasetChangeEvent event); @Override void rendererChanged(RendererChangeEvent event); @Override List<LegendItem> getLegendItems(); @Override boolean equals(Object obj); @Override Object clone(); @Override void zoomDomainAxes(double factor, PlotRenderingInfo state,
                               Point2D source); @Override void zoomDomainAxes(double factor, PlotRenderingInfo state,
                               Point2D source, boolean useAnchor); @Override void zoomDomainAxes(double lowerPercent, double upperPercent,
                               PlotRenderingInfo state, Point2D source); @Override void zoomRangeAxes(double factor, PlotRenderingInfo state,
                              Point2D source); @Override void zoomRangeAxes(double factor, PlotRenderingInfo info,
                              Point2D source, boolean useAnchor); @Override void zoomRangeAxes(double lowerPercent, double upperPercent,
                              PlotRenderingInfo state, Point2D source); @Override boolean isDomainZoomable(); @Override boolean isRangeZoomable(); @Override PlotOrientation getOrientation(); Point translateToJava2D(double angleDegrees, double radius,
            ValueAxis axis, Rectangle2D dataArea); }
PolarPlot extends Plot implements ValueAxisPlot, Zoomable,
        RendererChangeListener, Cloneable, Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof PolarPlot)) { return false; } PolarPlot that = (PolarPlot) obj; if (!this.axes.equals(that.axes)) { return false; } if (!this.axisLocations.equals(that.axisLocations)) { return false; } if (!this.renderers.equals(that.renderers)) { return false; } if (!this.angleTickUnit.equals(that.angleTickUnit)) { return false; } if (this.angleGridlinesVisible != that.angleGridlinesVisible) { return false; } if (this.angleOffset != that.angleOffset) { return false; } if (this.counterClockwise != that.counterClockwise) { return false; } if (this.angleLabelsVisible != that.angleLabelsVisible) { return false; } if (!this.angleLabelFont.equals(that.angleLabelFont)) { return false; } if (!PaintUtilities.equal(this.angleLabelPaint, that.angleLabelPaint)) { return false; } if (!ObjectUtilities.equal(this.angleGridlineStroke, that.angleGridlineStroke)) { return false; } if (!PaintUtilities.equal( this.angleGridlinePaint, that.angleGridlinePaint )) { return false; } if (this.radiusGridlinesVisible != that.radiusGridlinesVisible) { return false; } if (!ObjectUtilities.equal(this.radiusGridlineStroke, that.radiusGridlineStroke)) { return false; } if (!PaintUtilities.equal(this.radiusGridlinePaint, that.radiusGridlinePaint)) { return false; } if (this.radiusMinorGridlinesVisible != that.radiusMinorGridlinesVisible) { return false; } if (!this.cornerTextItems.equals(that.cornerTextItems)) { return false; } if (this.margin != that.margin) { return false; } if (!ObjectUtilities.equal(this.fixedLegendItems, that.fixedLegendItems)) { return false; } return super.equals(obj); } PolarPlot();  PolarPlot(XYDataset dataset, ValueAxis radiusAxis,
                PolarItemRenderer renderer); @Override String getPlotType(); ValueAxis getAxis(); ValueAxis getAxis(int index); void setAxis(ValueAxis axis); void setAxis(int index, ValueAxis axis); void setAxis(int index, ValueAxis axis, boolean notify); PolarAxisLocation getAxisLocation(); PolarAxisLocation getAxisLocation(int index); void setAxisLocation(PolarAxisLocation location); void setAxisLocation(PolarAxisLocation location, boolean notify); void setAxisLocation(int index, PolarAxisLocation location); void setAxisLocation(int index, PolarAxisLocation location,
            boolean notify); int getAxisCount(); XYDataset getDataset(); XYDataset getDataset(int index); void setDataset(XYDataset dataset); void setDataset(int index, XYDataset dataset); int getDatasetCount(); int indexOf(XYDataset dataset); PolarItemRenderer getRenderer(); PolarItemRenderer getRenderer(int index); void setRenderer(PolarItemRenderer renderer); void setRenderer(int index, PolarItemRenderer renderer); void setRenderer(int index, PolarItemRenderer renderer,
                            boolean notify); TickUnit getAngleTickUnit(); void setAngleTickUnit(TickUnit unit); double getAngleOffset(); void setAngleOffset(double offset); boolean isCounterClockwise(); void setCounterClockwise(boolean counterClockwise); boolean isAngleLabelsVisible(); void setAngleLabelsVisible(boolean visible); Font getAngleLabelFont(); void setAngleLabelFont(Font font); Paint getAngleLabelPaint(); void setAngleLabelPaint(Paint paint); boolean isAngleGridlinesVisible(); void setAngleGridlinesVisible(boolean visible); Stroke getAngleGridlineStroke(); void setAngleGridlineStroke(Stroke stroke); Paint getAngleGridlinePaint(); void setAngleGridlinePaint(Paint paint); boolean isRadiusGridlinesVisible(); void setRadiusGridlinesVisible(boolean visible); Stroke getRadiusGridlineStroke(); void setRadiusGridlineStroke(Stroke stroke); Paint getRadiusGridlinePaint(); void setRadiusGridlinePaint(Paint paint); boolean isRadiusMinorGridlinesVisible(); void setRadiusMinorGridlinesVisible(boolean flag); int getMargin(); void setMargin(int margin); List<LegendItem> getFixedLegendItems(); void setFixedLegendItems(List<LegendItem> items); void addCornerTextItem(String text); void removeCornerTextItem(String text); void clearCornerTextItems(); void mapDatasetToAxis(int index, int axisIndex); void mapDatasetToAxes(int index, List<Integer> axisIndices); ValueAxis getAxisForDataset(int index); int getAxisIndex(ValueAxis axis); int getIndexOf(PolarItemRenderer renderer); @Override void draw(Graphics2D g2, Rectangle2D area, Point2D anchor,
            PlotState parentState, PlotRenderingInfo info); @Override void zoom(double percent); @Override Range getDataRange(ValueAxis axis); @Override void datasetChanged(DatasetChangeEvent event); @Override void rendererChanged(RendererChangeEvent event); @Override List<LegendItem> getLegendItems(); @Override boolean equals(Object obj); @Override Object clone(); @Override void zoomDomainAxes(double factor, PlotRenderingInfo state,
                               Point2D source); @Override void zoomDomainAxes(double factor, PlotRenderingInfo state,
                               Point2D source, boolean useAnchor); @Override void zoomDomainAxes(double lowerPercent, double upperPercent,
                               PlotRenderingInfo state, Point2D source); @Override void zoomRangeAxes(double factor, PlotRenderingInfo state,
                              Point2D source); @Override void zoomRangeAxes(double factor, PlotRenderingInfo info,
                              Point2D source, boolean useAnchor); @Override void zoomRangeAxes(double lowerPercent, double upperPercent,
                              PlotRenderingInfo state, Point2D source); @Override boolean isDomainZoomable(); @Override boolean isRangeZoomable(); @Override PlotOrientation getOrientation(); Point translateToJava2D(double angleDegrees, double radius,
            ValueAxis axis, Rectangle2D dataArea); static final double DEFAULT_ANGLE_TICK_UNIT_SIZE; static final double DEFAULT_ANGLE_OFFSET; static final Stroke DEFAULT_GRIDLINE_STROKE; static final Paint DEFAULT_GRIDLINE_PAINT; }