@Test public void testEquals() { PiePlot plot1 = new PiePlot(); PiePlot plot2 = new PiePlot(); assertEquals(plot1, plot2); assertEquals(plot2, plot1); plot1.setNoDataMessage("No data XYZ"); assertFalse(plot1.equals(plot2)); plot2.setNoDataMessage("No data XYZ"); assertEquals(plot1, plot2); plot1.setNoDataMessageFont(new Font("SansSerif", Font.PLAIN, 13)); assertFalse(plot1.equals(plot2)); plot2.setNoDataMessageFont(new Font("SansSerif", Font.PLAIN, 13)); assertEquals(plot1, plot2); plot1.setNoDataMessagePaint(new GradientPaint(1.0f, 2.0f, Color.RED, 3.0f, 4.0f, Color.BLUE)); assertFalse(plot1.equals(plot2)); plot2.setNoDataMessagePaint(new GradientPaint(1.0f, 2.0f, Color.RED, 3.0f, 4.0f, Color.BLUE)); assertEquals(plot1, plot2); plot1.setInsets(new RectangleInsets(1.0, 2.0, 3.0, 4.0)); assertFalse(plot1.equals(plot2)); plot2.setInsets(new RectangleInsets(1.0, 2.0, 3.0, 4.0)); assertEquals(plot1, plot2); plot1.setOutlineVisible(false); assertFalse(plot1.equals(plot2)); plot2.setOutlineVisible(false); assertEquals(plot1, plot2); BasicStroke s = new BasicStroke(1.23f); plot1.setOutlineStroke(s); assertFalse(plot1.equals(plot2)); plot2.setOutlineStroke(s); assertEquals(plot1, plot2); plot1.setOutlinePaint(new GradientPaint(1.0f, 2.0f, Color.yellow, 3.0f, 4.0f, Color.green)); assertFalse(plot1.equals(plot2)); plot2.setOutlinePaint(new GradientPaint(1.0f, 2.0f, Color.yellow, 3.0f, 4.0f, Color.green)); assertEquals(plot1, plot2); plot1.setBackgroundPaint(new GradientPaint(1.0f, 2.0f, Color.cyan, 3.0f, 4.0f, Color.green)); assertFalse(plot1.equals(plot2)); plot2.setBackgroundPaint(new GradientPaint(1.0f, 2.0f, Color.cyan, 3.0f, 4.0f, Color.green)); assertEquals(plot1, plot2); plot1.setBackgroundImage(getTestImage()); assertFalse(plot1.equals(plot2)); plot2.setBackgroundImage(getTestImage()); assertEquals(plot1, plot2); plot1.setBackgroundImageAlignment(Align.BOTTOM_RIGHT); assertFalse(plot1.equals(plot2)); plot2.setBackgroundImageAlignment(Align.BOTTOM_RIGHT); assertEquals(plot1, plot2); plot1.setBackgroundImageAlpha(0.77f); assertFalse(plot1.equals(plot2)); plot2.setBackgroundImageAlpha(0.77f); assertEquals(plot1, plot2); plot1.setForegroundAlpha(0.99f); assertFalse(plot1.equals(plot2)); plot2.setForegroundAlpha(0.99f); assertEquals(plot1, plot2); plot1.setBackgroundAlpha(0.99f); assertFalse(plot1.equals(plot2)); plot2.setBackgroundAlpha(0.99f); assertEquals(plot1, plot2); plot1.setDrawingSupplier(new DefaultDrawingSupplier( new Paint[] {Color.BLUE}, new Paint[] {Color.RED}, new Stroke[] {new BasicStroke(1.1f)}, new Stroke[] {new BasicStroke(9.9f)}, new Shape[] {new Rectangle(1, 2, 3, 4)})); assertFalse(plot1.equals(plot2)); plot2.setDrawingSupplier(new DefaultDrawingSupplier( new Paint[] {Color.BLUE}, new Paint[] {Color.RED}, new Stroke[] {new BasicStroke(1.1f)}, new Stroke[] {new BasicStroke(9.9f)}, new Shape[] {new Rectangle(1, 2, 3, 4)})); assertEquals(plot1, plot2); }
@Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof Plot)) { return false; } Plot that = (Plot) obj; if (!ObjectUtilities.equal(this.noDataMessage, that.noDataMessage)) { return false; } if (!ObjectUtilities.equal( this.noDataMessageFont, that.noDataMessageFont )) { return false; } if (!PaintUtilities.equal(this.noDataMessagePaint, that.noDataMessagePaint)) { return false; } if (!ObjectUtilities.equal(this.insets, that.insets)) { return false; } if (this.outlineVisible != that.outlineVisible) { return false; } if (!ObjectUtilities.equal(this.outlineStroke, that.outlineStroke)) { return false; } if (!PaintUtilities.equal(this.outlinePaint, that.outlinePaint)) { return false; } if (!PaintUtilities.equal(this.backgroundPaint, that.backgroundPaint)) { return false; } if (!ObjectUtilities.equal(this.backgroundImage, that.backgroundImage)) { return false; } if (this.backgroundImageAlignment != that.backgroundImageAlignment) { return false; } if (this.backgroundImageAlpha != that.backgroundImageAlpha) { return false; } if (this.foregroundAlpha != that.foregroundAlpha) { return false; } if (this.backgroundAlpha != that.backgroundAlpha) { return false; } if (!this.drawingSupplier.equals(that.drawingSupplier)) { return false; } if (this.notify != that.notify) { return false; } return true; }
Plot implements AxisChangeListener,
        DatasetChangeListener, SelectionChangeListener, LabelChangeListener, AnnotationChangeListener, MarkerChangeListener,
        LegendItemSource, PublicCloneable, Cloneable, Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof Plot)) { return false; } Plot that = (Plot) obj; if (!ObjectUtilities.equal(this.noDataMessage, that.noDataMessage)) { return false; } if (!ObjectUtilities.equal( this.noDataMessageFont, that.noDataMessageFont )) { return false; } if (!PaintUtilities.equal(this.noDataMessagePaint, that.noDataMessagePaint)) { return false; } if (!ObjectUtilities.equal(this.insets, that.insets)) { return false; } if (this.outlineVisible != that.outlineVisible) { return false; } if (!ObjectUtilities.equal(this.outlineStroke, that.outlineStroke)) { return false; } if (!PaintUtilities.equal(this.outlinePaint, that.outlinePaint)) { return false; } if (!PaintUtilities.equal(this.backgroundPaint, that.backgroundPaint)) { return false; } if (!ObjectUtilities.equal(this.backgroundImage, that.backgroundImage)) { return false; } if (this.backgroundImageAlignment != that.backgroundImageAlignment) { return false; } if (this.backgroundImageAlpha != that.backgroundImageAlpha) { return false; } if (this.foregroundAlpha != that.foregroundAlpha) { return false; } if (this.backgroundAlpha != that.backgroundAlpha) { return false; } if (!this.drawingSupplier.equals(that.drawingSupplier)) { return false; } if (this.notify != that.notify) { return false; } return true; } }
Plot implements AxisChangeListener,
        DatasetChangeListener, SelectionChangeListener, LabelChangeListener, AnnotationChangeListener, MarkerChangeListener,
        LegendItemSource, PublicCloneable, Cloneable, Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof Plot)) { return false; } Plot that = (Plot) obj; if (!ObjectUtilities.equal(this.noDataMessage, that.noDataMessage)) { return false; } if (!ObjectUtilities.equal( this.noDataMessageFont, that.noDataMessageFont )) { return false; } if (!PaintUtilities.equal(this.noDataMessagePaint, that.noDataMessagePaint)) { return false; } if (!ObjectUtilities.equal(this.insets, that.insets)) { return false; } if (this.outlineVisible != that.outlineVisible) { return false; } if (!ObjectUtilities.equal(this.outlineStroke, that.outlineStroke)) { return false; } if (!PaintUtilities.equal(this.outlinePaint, that.outlinePaint)) { return false; } if (!PaintUtilities.equal(this.backgroundPaint, that.backgroundPaint)) { return false; } if (!ObjectUtilities.equal(this.backgroundImage, that.backgroundImage)) { return false; } if (this.backgroundImageAlignment != that.backgroundImageAlignment) { return false; } if (this.backgroundImageAlpha != that.backgroundImageAlpha) { return false; } if (this.foregroundAlpha != that.foregroundAlpha) { return false; } if (this.backgroundAlpha != that.backgroundAlpha) { return false; } if (!this.drawingSupplier.equals(that.drawingSupplier)) { return false; } if (this.notify != that.notify) { return false; } return true; } protected  Plot(); }
Plot implements AxisChangeListener,
        DatasetChangeListener, SelectionChangeListener, LabelChangeListener, AnnotationChangeListener, MarkerChangeListener,
        LegendItemSource, PublicCloneable, Cloneable, Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof Plot)) { return false; } Plot that = (Plot) obj; if (!ObjectUtilities.equal(this.noDataMessage, that.noDataMessage)) { return false; } if (!ObjectUtilities.equal( this.noDataMessageFont, that.noDataMessageFont )) { return false; } if (!PaintUtilities.equal(this.noDataMessagePaint, that.noDataMessagePaint)) { return false; } if (!ObjectUtilities.equal(this.insets, that.insets)) { return false; } if (this.outlineVisible != that.outlineVisible) { return false; } if (!ObjectUtilities.equal(this.outlineStroke, that.outlineStroke)) { return false; } if (!PaintUtilities.equal(this.outlinePaint, that.outlinePaint)) { return false; } if (!PaintUtilities.equal(this.backgroundPaint, that.backgroundPaint)) { return false; } if (!ObjectUtilities.equal(this.backgroundImage, that.backgroundImage)) { return false; } if (this.backgroundImageAlignment != that.backgroundImageAlignment) { return false; } if (this.backgroundImageAlpha != that.backgroundImageAlpha) { return false; } if (this.foregroundAlpha != that.foregroundAlpha) { return false; } if (this.backgroundAlpha != that.backgroundAlpha) { return false; } if (!this.drawingSupplier.equals(that.drawingSupplier)) { return false; } if (this.notify != that.notify) { return false; } return true; } protected  Plot(); DatasetGroup getDatasetGroup(); String getNoDataMessage(); void setNoDataMessage(String message); Font getNoDataMessageFont(); void setNoDataMessageFont(Font font); Paint getNoDataMessagePaint(); void setNoDataMessagePaint(Paint paint); abstract String getPlotType(); Plot getParent(); void setParent(Plot parent); Plot getRootPlot(); boolean isSubplot(); RectangleInsets getInsets(); void setInsets(RectangleInsets insets); void setInsets(RectangleInsets insets, boolean notify); Paint getBackgroundPaint(); void setBackgroundPaint(Paint paint); float getBackgroundAlpha(); void setBackgroundAlpha(float alpha); DrawingSupplier getDrawingSupplier(); void setDrawingSupplier(DrawingSupplier supplier); void setDrawingSupplier(DrawingSupplier supplier, boolean notify); Image getBackgroundImage(); void setBackgroundImage(Image image); int getBackgroundImageAlignment(); void setBackgroundImageAlignment(int alignment); float getBackgroundImageAlpha(); void setBackgroundImageAlpha(float alpha); boolean isOutlineVisible(); void setOutlineVisible(boolean visible); Stroke getOutlineStroke(); void setOutlineStroke(Stroke stroke); Paint getOutlinePaint(); void setOutlinePaint(Paint paint); float getForegroundAlpha(); void setForegroundAlpha(float alpha); @Override List<LegendItem> getLegendItems(); boolean isNotify(); void setNotify(boolean notify); void addChangeListener(PlotChangeListener listener); void removeChangeListener(PlotChangeListener listener); void notifyListeners(PlotChangeEvent event); abstract void draw(Graphics2D g2,
                              Rectangle2D area,
                              Point2D anchor,
                              PlotState parentState,
                              PlotRenderingInfo info); void drawBackground(Graphics2D g2, Rectangle2D area); void drawBackgroundImage(Graphics2D g2, Rectangle2D area); void drawOutline(Graphics2D g2, Rectangle2D area); void handleClick(int x, int y, PlotRenderingInfo info); void zoom(double percent); @Override void annotationChanged(AnnotationChangeEvent event); @Override void axisChanged(AxisChangeEvent event); @Override void datasetChanged(DatasetChangeEvent event); @Override void selectionChanged(SelectionChangeEvent event); @Override void labelChanged(LabelChangeEvent event); @Override void markerChanged(MarkerChangeEvent event); @Override boolean equals(Object obj); @Override Object clone(); static RectangleEdge resolveDomainAxisLocation(
            AxisLocation location, PlotOrientation orientation); static RectangleEdge resolveRangeAxisLocation(
            AxisLocation location, PlotOrientation orientation); }
Plot implements AxisChangeListener,
        DatasetChangeListener, SelectionChangeListener, LabelChangeListener, AnnotationChangeListener, MarkerChangeListener,
        LegendItemSource, PublicCloneable, Cloneable, Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof Plot)) { return false; } Plot that = (Plot) obj; if (!ObjectUtilities.equal(this.noDataMessage, that.noDataMessage)) { return false; } if (!ObjectUtilities.equal( this.noDataMessageFont, that.noDataMessageFont )) { return false; } if (!PaintUtilities.equal(this.noDataMessagePaint, that.noDataMessagePaint)) { return false; } if (!ObjectUtilities.equal(this.insets, that.insets)) { return false; } if (this.outlineVisible != that.outlineVisible) { return false; } if (!ObjectUtilities.equal(this.outlineStroke, that.outlineStroke)) { return false; } if (!PaintUtilities.equal(this.outlinePaint, that.outlinePaint)) { return false; } if (!PaintUtilities.equal(this.backgroundPaint, that.backgroundPaint)) { return false; } if (!ObjectUtilities.equal(this.backgroundImage, that.backgroundImage)) { return false; } if (this.backgroundImageAlignment != that.backgroundImageAlignment) { return false; } if (this.backgroundImageAlpha != that.backgroundImageAlpha) { return false; } if (this.foregroundAlpha != that.foregroundAlpha) { return false; } if (this.backgroundAlpha != that.backgroundAlpha) { return false; } if (!this.drawingSupplier.equals(that.drawingSupplier)) { return false; } if (this.notify != that.notify) { return false; } return true; } protected  Plot(); DatasetGroup getDatasetGroup(); String getNoDataMessage(); void setNoDataMessage(String message); Font getNoDataMessageFont(); void setNoDataMessageFont(Font font); Paint getNoDataMessagePaint(); void setNoDataMessagePaint(Paint paint); abstract String getPlotType(); Plot getParent(); void setParent(Plot parent); Plot getRootPlot(); boolean isSubplot(); RectangleInsets getInsets(); void setInsets(RectangleInsets insets); void setInsets(RectangleInsets insets, boolean notify); Paint getBackgroundPaint(); void setBackgroundPaint(Paint paint); float getBackgroundAlpha(); void setBackgroundAlpha(float alpha); DrawingSupplier getDrawingSupplier(); void setDrawingSupplier(DrawingSupplier supplier); void setDrawingSupplier(DrawingSupplier supplier, boolean notify); Image getBackgroundImage(); void setBackgroundImage(Image image); int getBackgroundImageAlignment(); void setBackgroundImageAlignment(int alignment); float getBackgroundImageAlpha(); void setBackgroundImageAlpha(float alpha); boolean isOutlineVisible(); void setOutlineVisible(boolean visible); Stroke getOutlineStroke(); void setOutlineStroke(Stroke stroke); Paint getOutlinePaint(); void setOutlinePaint(Paint paint); float getForegroundAlpha(); void setForegroundAlpha(float alpha); @Override List<LegendItem> getLegendItems(); boolean isNotify(); void setNotify(boolean notify); void addChangeListener(PlotChangeListener listener); void removeChangeListener(PlotChangeListener listener); void notifyListeners(PlotChangeEvent event); abstract void draw(Graphics2D g2,
                              Rectangle2D area,
                              Point2D anchor,
                              PlotState parentState,
                              PlotRenderingInfo info); void drawBackground(Graphics2D g2, Rectangle2D area); void drawBackgroundImage(Graphics2D g2, Rectangle2D area); void drawOutline(Graphics2D g2, Rectangle2D area); void handleClick(int x, int y, PlotRenderingInfo info); void zoom(double percent); @Override void annotationChanged(AnnotationChangeEvent event); @Override void axisChanged(AxisChangeEvent event); @Override void datasetChanged(DatasetChangeEvent event); @Override void selectionChanged(SelectionChangeEvent event); @Override void labelChanged(LabelChangeEvent event); @Override void markerChanged(MarkerChangeEvent event); @Override boolean equals(Object obj); @Override Object clone(); static RectangleEdge resolveDomainAxisLocation(
            AxisLocation location, PlotOrientation orientation); static RectangleEdge resolveRangeAxisLocation(
            AxisLocation location, PlotOrientation orientation); static final Number ZERO; static final RectangleInsets DEFAULT_INSETS; static final Stroke DEFAULT_OUTLINE_STROKE; static final Paint DEFAULT_OUTLINE_PAINT; static final float DEFAULT_FOREGROUND_ALPHA; static final float DEFAULT_BACKGROUND_ALPHA; static final Paint DEFAULT_BACKGROUND_PAINT; static final int MINIMUM_WIDTH_TO_DRAW; static final int MINIMUM_HEIGHT_TO_DRAW; static final Shape DEFAULT_LEGEND_ITEM_BOX; static final Shape DEFAULT_LEGEND_ITEM_CIRCLE; }