@Test public void testEquals() { ThermometerPlot p1 = new ThermometerPlot(); ThermometerPlot p2 = new ThermometerPlot(); assertEquals(p1, p2); assertEquals(p2, p1); p1.setPadding(new RectangleInsets(1.0, 2.0, 3.0, 4.0)); assertFalse(p1.equals(p2)); p2.setPadding(new RectangleInsets(1.0, 2.0, 3.0, 4.0)); assertEquals(p2, p1); BasicStroke s = new BasicStroke(1.23f); p1.setThermometerStroke(s); assertFalse(p1.equals(p2)); p2.setThermometerStroke(s); assertEquals(p2, p1); p1.setThermometerPaint(new GradientPaint(1.0f, 2.0f, Color.BLUE, 3.0f, 4.0f, Color.RED)); assertFalse(p1.equals(p2)); p2.setThermometerPaint(new GradientPaint(1.0f, 2.0f, Color.BLUE, 3.0f, 4.0f, Color.RED)); assertEquals(p2, p1); p1.setUnits(ThermometerPlot.UNITS_KELVIN); assertFalse(p1.equals(p2)); p2.setUnits(ThermometerPlot.UNITS_KELVIN); assertEquals(p2, p1); p1.setValueLocation(ThermometerPlot.LEFT); assertFalse(p1.equals(p2)); p2.setValueLocation(ThermometerPlot.LEFT); assertEquals(p2, p1); p1.setAxisLocation(ThermometerPlot.RIGHT); assertFalse(p1.equals(p2)); p2.setAxisLocation(ThermometerPlot.RIGHT); assertEquals(p2, p1); p1.setValueFont(new Font("Serif", Font.PLAIN, 9)); assertFalse(p1.equals(p2)); p2.setValueFont(new Font("Serif", Font.PLAIN, 9)); assertEquals(p2, p1); p1.setValuePaint(new GradientPaint(4.0f, 5.0f, Color.RED, 6.0f, 7.0f, Color.WHITE)); assertFalse(p1.equals(p2)); p2.setValuePaint(new GradientPaint(4.0f, 5.0f, Color.RED, 6.0f, 7.0f, Color.WHITE)); assertEquals(p2, p1); p1.setValueFormat(new DecimalFormat("0.0000")); assertFalse(p1.equals(p2)); p2.setValueFormat(new DecimalFormat("0.0000")); assertEquals(p2, p1); p1.setMercuryPaint(new GradientPaint(9.0f, 8.0f, Color.RED, 7.0f, 6.0f, Color.BLUE)); assertFalse(p1.equals(p2)); p2.setMercuryPaint(new GradientPaint(9.0f, 8.0f, Color.RED, 7.0f, 6.0f, Color.BLUE)); assertEquals(p2, p1); p1.setSubrange(1, 1.0, 2.0); assertFalse(p1.equals(p2)); p2.setSubrange(1, 1.0, 2.0); assertEquals(p2, p1); p1.setSubrangePaint(1, new GradientPaint(1.0f, 2.0f, Color.RED, 3.0f, 4.0f, Color.yellow)); assertFalse(p1.equals(p2)); p2.setSubrangePaint(1, new GradientPaint(1.0f, 2.0f, Color.RED, 3.0f, 4.0f, Color.yellow)); assertEquals(p2, p1); p1.setBulbRadius(9); assertFalse(p1.equals(p2)); p2.setBulbRadius(9); assertEquals(p2, p1); p1.setColumnRadius(8); assertFalse(p1.equals(p2)); p2.setColumnRadius(8); assertEquals(p2, p1); p1.setGap(7); assertFalse(p1.equals(p2)); p2.setGap(7); assertEquals(p2, p1); }
@Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof ThermometerPlot)) { return false; } ThermometerPlot that = (ThermometerPlot) obj; if (!super.equals(obj)) { return false; } if (!ObjectUtilities.equal(this.rangeAxis, that.rangeAxis)) { return false; } if (this.axisLocation != that.axisLocation) { return false; } if (this.lowerBound != that.lowerBound) { return false; } if (this.upperBound != that.upperBound) { return false; } if (!ObjectUtilities.equal(this.padding, that.padding)) { return false; } if (!ObjectUtilities.equal(this.thermometerStroke, that.thermometerStroke)) { return false; } if (!PaintUtilities.equal(this.thermometerPaint, that.thermometerPaint)) { return false; } if (this.units != that.units) { return false; } if (this.valueLocation != that.valueLocation) { return false; } if (!ObjectUtilities.equal(this.valueFont, that.valueFont)) { return false; } if (!PaintUtilities.equal(this.valuePaint, that.valuePaint)) { return false; } if (!ObjectUtilities.equal(this.valueFormat, that.valueFormat)) { return false; } if (!PaintUtilities.equal(this.mercuryPaint, that.mercuryPaint)) { return false; } if (this.showValueLines != that.showValueLines) { return false; } if (this.subrange != that.subrange) { return false; } if (this.followDataInSubranges != that.followDataInSubranges) { return false; } if (!equal(this.subrangeInfo, that.subrangeInfo)) { return false; } if (this.useSubrangePaint != that.useSubrangePaint) { return false; } if (this.bulbRadius != that.bulbRadius) { return false; } if (this.columnRadius != that.columnRadius) { return false; } if (this.gap != that.gap) { return false; } for (int i = 0; i < this.subrangePaint.length; i++) { if (!PaintUtilities.equal(this.subrangePaint[i], that.subrangePaint[i])) { return false; } } return true; }
ThermometerPlot extends Plot implements ValueAxisPlot,
        Zoomable, Cloneable, Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof ThermometerPlot)) { return false; } ThermometerPlot that = (ThermometerPlot) obj; if (!super.equals(obj)) { return false; } if (!ObjectUtilities.equal(this.rangeAxis, that.rangeAxis)) { return false; } if (this.axisLocation != that.axisLocation) { return false; } if (this.lowerBound != that.lowerBound) { return false; } if (this.upperBound != that.upperBound) { return false; } if (!ObjectUtilities.equal(this.padding, that.padding)) { return false; } if (!ObjectUtilities.equal(this.thermometerStroke, that.thermometerStroke)) { return false; } if (!PaintUtilities.equal(this.thermometerPaint, that.thermometerPaint)) { return false; } if (this.units != that.units) { return false; } if (this.valueLocation != that.valueLocation) { return false; } if (!ObjectUtilities.equal(this.valueFont, that.valueFont)) { return false; } if (!PaintUtilities.equal(this.valuePaint, that.valuePaint)) { return false; } if (!ObjectUtilities.equal(this.valueFormat, that.valueFormat)) { return false; } if (!PaintUtilities.equal(this.mercuryPaint, that.mercuryPaint)) { return false; } if (this.showValueLines != that.showValueLines) { return false; } if (this.subrange != that.subrange) { return false; } if (this.followDataInSubranges != that.followDataInSubranges) { return false; } if (!equal(this.subrangeInfo, that.subrangeInfo)) { return false; } if (this.useSubrangePaint != that.useSubrangePaint) { return false; } if (this.bulbRadius != that.bulbRadius) { return false; } if (this.columnRadius != that.columnRadius) { return false; } if (this.gap != that.gap) { return false; } for (int i = 0; i < this.subrangePaint.length; i++) { if (!PaintUtilities.equal(this.subrangePaint[i], that.subrangePaint[i])) { return false; } } return true; } }
ThermometerPlot extends Plot implements ValueAxisPlot,
        Zoomable, Cloneable, Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof ThermometerPlot)) { return false; } ThermometerPlot that = (ThermometerPlot) obj; if (!super.equals(obj)) { return false; } if (!ObjectUtilities.equal(this.rangeAxis, that.rangeAxis)) { return false; } if (this.axisLocation != that.axisLocation) { return false; } if (this.lowerBound != that.lowerBound) { return false; } if (this.upperBound != that.upperBound) { return false; } if (!ObjectUtilities.equal(this.padding, that.padding)) { return false; } if (!ObjectUtilities.equal(this.thermometerStroke, that.thermometerStroke)) { return false; } if (!PaintUtilities.equal(this.thermometerPaint, that.thermometerPaint)) { return false; } if (this.units != that.units) { return false; } if (this.valueLocation != that.valueLocation) { return false; } if (!ObjectUtilities.equal(this.valueFont, that.valueFont)) { return false; } if (!PaintUtilities.equal(this.valuePaint, that.valuePaint)) { return false; } if (!ObjectUtilities.equal(this.valueFormat, that.valueFormat)) { return false; } if (!PaintUtilities.equal(this.mercuryPaint, that.mercuryPaint)) { return false; } if (this.showValueLines != that.showValueLines) { return false; } if (this.subrange != that.subrange) { return false; } if (this.followDataInSubranges != that.followDataInSubranges) { return false; } if (!equal(this.subrangeInfo, that.subrangeInfo)) { return false; } if (this.useSubrangePaint != that.useSubrangePaint) { return false; } if (this.bulbRadius != that.bulbRadius) { return false; } if (this.columnRadius != that.columnRadius) { return false; } if (this.gap != that.gap) { return false; } for (int i = 0; i < this.subrangePaint.length; i++) { if (!PaintUtilities.equal(this.subrangePaint[i], that.subrangePaint[i])) { return false; } } return true; } ThermometerPlot();  ThermometerPlot(ValueDataset dataset); }
ThermometerPlot extends Plot implements ValueAxisPlot,
        Zoomable, Cloneable, Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof ThermometerPlot)) { return false; } ThermometerPlot that = (ThermometerPlot) obj; if (!super.equals(obj)) { return false; } if (!ObjectUtilities.equal(this.rangeAxis, that.rangeAxis)) { return false; } if (this.axisLocation != that.axisLocation) { return false; } if (this.lowerBound != that.lowerBound) { return false; } if (this.upperBound != that.upperBound) { return false; } if (!ObjectUtilities.equal(this.padding, that.padding)) { return false; } if (!ObjectUtilities.equal(this.thermometerStroke, that.thermometerStroke)) { return false; } if (!PaintUtilities.equal(this.thermometerPaint, that.thermometerPaint)) { return false; } if (this.units != that.units) { return false; } if (this.valueLocation != that.valueLocation) { return false; } if (!ObjectUtilities.equal(this.valueFont, that.valueFont)) { return false; } if (!PaintUtilities.equal(this.valuePaint, that.valuePaint)) { return false; } if (!ObjectUtilities.equal(this.valueFormat, that.valueFormat)) { return false; } if (!PaintUtilities.equal(this.mercuryPaint, that.mercuryPaint)) { return false; } if (this.showValueLines != that.showValueLines) { return false; } if (this.subrange != that.subrange) { return false; } if (this.followDataInSubranges != that.followDataInSubranges) { return false; } if (!equal(this.subrangeInfo, that.subrangeInfo)) { return false; } if (this.useSubrangePaint != that.useSubrangePaint) { return false; } if (this.bulbRadius != that.bulbRadius) { return false; } if (this.columnRadius != that.columnRadius) { return false; } if (this.gap != that.gap) { return false; } for (int i = 0; i < this.subrangePaint.length; i++) { if (!PaintUtilities.equal(this.subrangePaint[i], that.subrangePaint[i])) { return false; } } return true; } ThermometerPlot();  ThermometerPlot(ValueDataset dataset); ValueDataset getDataset(); void setDataset(ValueDataset dataset); ValueAxis getRangeAxis(); void setRangeAxis(ValueAxis axis); double getLowerBound(); void setLowerBound(double lower); double getUpperBound(); void setUpperBound(double upper); void setRange(double lower, double upper); RectangleInsets getPadding(); void setPadding(RectangleInsets padding); Stroke getThermometerStroke(); void setThermometerStroke(Stroke s); Paint getThermometerPaint(); void setThermometerPaint(Paint paint); int getUnits(); void setUnits(int u); int getValueLocation(); void setValueLocation(int location); int getAxisLocation(); void setAxisLocation(int location); Font getValueFont(); void setValueFont(Font f); Paint getValuePaint(); void setValuePaint(Paint paint); void setValueFormat(NumberFormat formatter); Paint getMercuryPaint(); void setMercuryPaint(Paint paint); void setSubrangeInfo(int range, double low, double hi); void setSubrangeInfo(int range,
                                double rangeLow, double rangeHigh,
                                double displayLow, double displayHigh); void setSubrange(int range, double low, double high); void setDisplayRange(int range, double low, double high); Paint getSubrangePaint(int range); void setSubrangePaint(int range, Paint paint); boolean getFollowDataInSubranges(); void setFollowDataInSubranges(boolean flag); boolean getUseSubrangePaint(); void setUseSubrangePaint(boolean flag); int getBulbRadius(); void setBulbRadius(int r); int getBulbDiameter(); int getColumnRadius(); void setColumnRadius(int r); int getColumnDiameter(); int getGap(); void setGap(int gap); @Override void draw(Graphics2D g2, Rectangle2D area, Point2D anchor,
                     PlotState parentState,
                     PlotRenderingInfo info); @Override void zoom(double percent); @Override String getPlotType(); @Override void datasetChanged(DatasetChangeEvent event); @Override Range getDataRange(ValueAxis axis); @Override List<LegendItem> getLegendItems(); @Override PlotOrientation getOrientation(); @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 zoomRangeAxes(double factor, PlotRenderingInfo state,
                              Point2D source); @Override void zoomRangeAxes(double factor, PlotRenderingInfo state,
                              Point2D source, boolean useAnchor); @Override void zoomDomainAxes(double lowerPercent, double upperPercent,
                               PlotRenderingInfo state, Point2D source); @Override void zoomRangeAxes(double lowerPercent, double upperPercent,
                              PlotRenderingInfo state, Point2D source); @Override boolean isDomainZoomable(); @Override boolean isRangeZoomable(); }
ThermometerPlot extends Plot implements ValueAxisPlot,
        Zoomable, Cloneable, Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof ThermometerPlot)) { return false; } ThermometerPlot that = (ThermometerPlot) obj; if (!super.equals(obj)) { return false; } if (!ObjectUtilities.equal(this.rangeAxis, that.rangeAxis)) { return false; } if (this.axisLocation != that.axisLocation) { return false; } if (this.lowerBound != that.lowerBound) { return false; } if (this.upperBound != that.upperBound) { return false; } if (!ObjectUtilities.equal(this.padding, that.padding)) { return false; } if (!ObjectUtilities.equal(this.thermometerStroke, that.thermometerStroke)) { return false; } if (!PaintUtilities.equal(this.thermometerPaint, that.thermometerPaint)) { return false; } if (this.units != that.units) { return false; } if (this.valueLocation != that.valueLocation) { return false; } if (!ObjectUtilities.equal(this.valueFont, that.valueFont)) { return false; } if (!PaintUtilities.equal(this.valuePaint, that.valuePaint)) { return false; } if (!ObjectUtilities.equal(this.valueFormat, that.valueFormat)) { return false; } if (!PaintUtilities.equal(this.mercuryPaint, that.mercuryPaint)) { return false; } if (this.showValueLines != that.showValueLines) { return false; } if (this.subrange != that.subrange) { return false; } if (this.followDataInSubranges != that.followDataInSubranges) { return false; } if (!equal(this.subrangeInfo, that.subrangeInfo)) { return false; } if (this.useSubrangePaint != that.useSubrangePaint) { return false; } if (this.bulbRadius != that.bulbRadius) { return false; } if (this.columnRadius != that.columnRadius) { return false; } if (this.gap != that.gap) { return false; } for (int i = 0; i < this.subrangePaint.length; i++) { if (!PaintUtilities.equal(this.subrangePaint[i], that.subrangePaint[i])) { return false; } } return true; } ThermometerPlot();  ThermometerPlot(ValueDataset dataset); ValueDataset getDataset(); void setDataset(ValueDataset dataset); ValueAxis getRangeAxis(); void setRangeAxis(ValueAxis axis); double getLowerBound(); void setLowerBound(double lower); double getUpperBound(); void setUpperBound(double upper); void setRange(double lower, double upper); RectangleInsets getPadding(); void setPadding(RectangleInsets padding); Stroke getThermometerStroke(); void setThermometerStroke(Stroke s); Paint getThermometerPaint(); void setThermometerPaint(Paint paint); int getUnits(); void setUnits(int u); int getValueLocation(); void setValueLocation(int location); int getAxisLocation(); void setAxisLocation(int location); Font getValueFont(); void setValueFont(Font f); Paint getValuePaint(); void setValuePaint(Paint paint); void setValueFormat(NumberFormat formatter); Paint getMercuryPaint(); void setMercuryPaint(Paint paint); void setSubrangeInfo(int range, double low, double hi); void setSubrangeInfo(int range,
                                double rangeLow, double rangeHigh,
                                double displayLow, double displayHigh); void setSubrange(int range, double low, double high); void setDisplayRange(int range, double low, double high); Paint getSubrangePaint(int range); void setSubrangePaint(int range, Paint paint); boolean getFollowDataInSubranges(); void setFollowDataInSubranges(boolean flag); boolean getUseSubrangePaint(); void setUseSubrangePaint(boolean flag); int getBulbRadius(); void setBulbRadius(int r); int getBulbDiameter(); int getColumnRadius(); void setColumnRadius(int r); int getColumnDiameter(); int getGap(); void setGap(int gap); @Override void draw(Graphics2D g2, Rectangle2D area, Point2D anchor,
                     PlotState parentState,
                     PlotRenderingInfo info); @Override void zoom(double percent); @Override String getPlotType(); @Override void datasetChanged(DatasetChangeEvent event); @Override Range getDataRange(ValueAxis axis); @Override List<LegendItem> getLegendItems(); @Override PlotOrientation getOrientation(); @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 zoomRangeAxes(double factor, PlotRenderingInfo state,
                              Point2D source); @Override void zoomRangeAxes(double factor, PlotRenderingInfo state,
                              Point2D source, boolean useAnchor); @Override void zoomDomainAxes(double lowerPercent, double upperPercent,
                               PlotRenderingInfo state, Point2D source); @Override void zoomRangeAxes(double lowerPercent, double upperPercent,
                              PlotRenderingInfo state, Point2D source); @Override boolean isDomainZoomable(); @Override boolean isRangeZoomable(); static final int UNITS_NONE; static final int UNITS_FAHRENHEIT; static final int UNITS_CELCIUS; static final int UNITS_KELVIN; static final int NONE; static final int RIGHT; static final int LEFT; static final int BULB; static final int NORMAL; static final int WARNING; static final int CRITICAL; }