@Test public void testCloning() throws CloneNotSupportedException { ThermometerPlot p1 = new ThermometerPlot(); ThermometerPlot p2 = (ThermometerPlot) p1.clone(); assertNotSame(p1, p2); assertSame(p1.getClass(), p2.getClass()); assertEquals(p1, p2); }
@Override public Object clone() throws CloneNotSupportedException { ThermometerPlot clone = (ThermometerPlot) super.clone(); if (clone.dataset != null) { clone.dataset.addChangeListener(clone); } clone.rangeAxis = ObjectUtilities.clone(this.rangeAxis); if (clone.rangeAxis != null) { clone.rangeAxis.setPlot(clone); clone.rangeAxis.addChangeListener(clone); } clone.valueFormat = (NumberFormat) this.valueFormat.clone(); clone.subrangePaint = this.subrangePaint.clone(); return clone; }
ThermometerPlot extends Plot implements ValueAxisPlot,
        Zoomable, Cloneable, Serializable { @Override public Object clone() throws CloneNotSupportedException { ThermometerPlot clone = (ThermometerPlot) super.clone(); if (clone.dataset != null) { clone.dataset.addChangeListener(clone); } clone.rangeAxis = ObjectUtilities.clone(this.rangeAxis); if (clone.rangeAxis != null) { clone.rangeAxis.setPlot(clone); clone.rangeAxis.addChangeListener(clone); } clone.valueFormat = (NumberFormat) this.valueFormat.clone(); clone.subrangePaint = this.subrangePaint.clone(); return clone; } }
ThermometerPlot extends Plot implements ValueAxisPlot,
        Zoomable, Cloneable, Serializable { @Override public Object clone() throws CloneNotSupportedException { ThermometerPlot clone = (ThermometerPlot) super.clone(); if (clone.dataset != null) { clone.dataset.addChangeListener(clone); } clone.rangeAxis = ObjectUtilities.clone(this.rangeAxis); if (clone.rangeAxis != null) { clone.rangeAxis.setPlot(clone); clone.rangeAxis.addChangeListener(clone); } clone.valueFormat = (NumberFormat) this.valueFormat.clone(); clone.subrangePaint = this.subrangePaint.clone(); return clone; } ThermometerPlot();  ThermometerPlot(ValueDataset dataset); }
ThermometerPlot extends Plot implements ValueAxisPlot,
        Zoomable, Cloneable, Serializable { @Override public Object clone() throws CloneNotSupportedException { ThermometerPlot clone = (ThermometerPlot) super.clone(); if (clone.dataset != null) { clone.dataset.addChangeListener(clone); } clone.rangeAxis = ObjectUtilities.clone(this.rangeAxis); if (clone.rangeAxis != null) { clone.rangeAxis.setPlot(clone); clone.rangeAxis.addChangeListener(clone); } clone.valueFormat = (NumberFormat) this.valueFormat.clone(); clone.subrangePaint = this.subrangePaint.clone(); return clone; } 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 Object clone() throws CloneNotSupportedException { ThermometerPlot clone = (ThermometerPlot) super.clone(); if (clone.dataset != null) { clone.dataset.addChangeListener(clone); } clone.rangeAxis = ObjectUtilities.clone(this.rangeAxis); if (clone.rangeAxis != null) { clone.rangeAxis.setPlot(clone); clone.rangeAxis.addChangeListener(clone); } clone.valueFormat = (NumberFormat) this.valueFormat.clone(); clone.subrangePaint = this.subrangePaint.clone(); return clone; } 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; }