@Test public void testEquals() { CyclicNumberAxis a1 = new CyclicNumberAxis("Test", 10, 0); CyclicNumberAxis a2 = new CyclicNumberAxis("Test", 10, 0); assertEquals(a1, a2); a1.setPeriod(5); assertFalse(a1.equals(a2)); a2.setPeriod(5); assertEquals(a1, a2); a1.setOffset(2.0); assertFalse(a1.equals(a2)); a2.setOffset(2.0); assertEquals(a1, a2); a1.setAdvanceLinePaint(new GradientPaint(1.0f, 2.0f, Color.RED, 3.0f, 4.0f, Color.BLACK)); assertFalse(a1.equals(a2)); a2.setAdvanceLinePaint(new GradientPaint(1.0f, 2.0f, Color.RED, 3.0f, 4.0f, Color.BLACK)); assertEquals(a1, a2); Stroke stroke = new BasicStroke(0.2f); a1.setAdvanceLineStroke(stroke); assertFalse(a1.equals(a2)); a2.setAdvanceLineStroke(stroke); assertEquals(a1, a2); a1.setAdvanceLineVisible(!a1.isAdvanceLineVisible()); assertFalse(a1.equals(a2)); a2.setAdvanceLineVisible(a1.isAdvanceLineVisible()); assertEquals(a1, a2); a1.setBoundMappedToLastCycle(!a1.isBoundMappedToLastCycle()); assertFalse(a1.equals(a2)); a2.setBoundMappedToLastCycle(a1.isBoundMappedToLastCycle()); assertEquals(a1, a2); }
@Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof CyclicNumberAxis)) { return false; } if (!super.equals(obj)) { return false; } CyclicNumberAxis that = (CyclicNumberAxis) obj; if (this.period != that.period) { return false; } if (this.offset != that.offset) { return false; } if (!PaintUtilities.equal(this.advanceLinePaint, that.advanceLinePaint)) { return false; } if (!ObjectUtilities.equal(this.advanceLineStroke, that.advanceLineStroke)) { return false; } if (this.advanceLineVisible != that.advanceLineVisible) { return false; } if (this.boundMappedToLastCycle != that.boundMappedToLastCycle) { return false; } return true; }
CyclicNumberAxis extends NumberAxis { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof CyclicNumberAxis)) { return false; } if (!super.equals(obj)) { return false; } CyclicNumberAxis that = (CyclicNumberAxis) obj; if (this.period != that.period) { return false; } if (this.offset != that.offset) { return false; } if (!PaintUtilities.equal(this.advanceLinePaint, that.advanceLinePaint)) { return false; } if (!ObjectUtilities.equal(this.advanceLineStroke, that.advanceLineStroke)) { return false; } if (this.advanceLineVisible != that.advanceLineVisible) { return false; } if (this.boundMappedToLastCycle != that.boundMappedToLastCycle) { return false; } return true; } }
CyclicNumberAxis extends NumberAxis { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof CyclicNumberAxis)) { return false; } if (!super.equals(obj)) { return false; } CyclicNumberAxis that = (CyclicNumberAxis) obj; if (this.period != that.period) { return false; } if (this.offset != that.offset) { return false; } if (!PaintUtilities.equal(this.advanceLinePaint, that.advanceLinePaint)) { return false; } if (!ObjectUtilities.equal(this.advanceLineStroke, that.advanceLineStroke)) { return false; } if (this.advanceLineVisible != that.advanceLineVisible) { return false; } if (this.boundMappedToLastCycle != that.boundMappedToLastCycle) { return false; } return true; } CyclicNumberAxis(double period);  CyclicNumberAxis(double period, double offset);  CyclicNumberAxis(String label, double period);  CyclicNumberAxis(String label, double period, double offset); }
CyclicNumberAxis extends NumberAxis { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof CyclicNumberAxis)) { return false; } if (!super.equals(obj)) { return false; } CyclicNumberAxis that = (CyclicNumberAxis) obj; if (this.period != that.period) { return false; } if (this.offset != that.offset) { return false; } if (!PaintUtilities.equal(this.advanceLinePaint, that.advanceLinePaint)) { return false; } if (!ObjectUtilities.equal(this.advanceLineStroke, that.advanceLineStroke)) { return false; } if (this.advanceLineVisible != that.advanceLineVisible) { return false; } if (this.boundMappedToLastCycle != that.boundMappedToLastCycle) { return false; } return true; } CyclicNumberAxis(double period);  CyclicNumberAxis(double period, double offset);  CyclicNumberAxis(String label, double period);  CyclicNumberAxis(String label, double period, double offset); boolean isAdvanceLineVisible(); void setAdvanceLineVisible(boolean visible); Paint getAdvanceLinePaint(); void setAdvanceLinePaint(Paint paint); Stroke getAdvanceLineStroke(); void setAdvanceLineStroke(Stroke stroke); boolean isBoundMappedToLastCycle(); void setBoundMappedToLastCycle(boolean boundMappedToLastCycle); @Override double java2DToValue(double java2DValue, Rectangle2D dataArea,
                                RectangleEdge edge); @Override double valueToJava2D(double value, Rectangle2D dataArea,
                                RectangleEdge edge); @Override void centerRange(double value); @Override void setAutoRangeMinimumSize(double size, boolean notify); @Override void setFixedAutoRange(double length); @Override void setRange(Range range, boolean turnOffAutoRange,
                         boolean notify); double getCycleBound(); double getOffset(); void setOffset(double offset); double getPeriod(); void setPeriod(double period); @Override AxisState draw(Graphics2D g2, double cursor, Rectangle2D plotArea,
            Rectangle2D dataArea, RectangleEdge edge, 
            PlotRenderingInfo plotState); @Override AxisSpace reserveSpace(Graphics2D g2, Plot plot, 
            Rectangle2D plotArea, RectangleEdge edge, AxisSpace space); @Override boolean equals(Object obj); }
CyclicNumberAxis extends NumberAxis { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof CyclicNumberAxis)) { return false; } if (!super.equals(obj)) { return false; } CyclicNumberAxis that = (CyclicNumberAxis) obj; if (this.period != that.period) { return false; } if (this.offset != that.offset) { return false; } if (!PaintUtilities.equal(this.advanceLinePaint, that.advanceLinePaint)) { return false; } if (!ObjectUtilities.equal(this.advanceLineStroke, that.advanceLineStroke)) { return false; } if (this.advanceLineVisible != that.advanceLineVisible) { return false; } if (this.boundMappedToLastCycle != that.boundMappedToLastCycle) { return false; } return true; } CyclicNumberAxis(double period);  CyclicNumberAxis(double period, double offset);  CyclicNumberAxis(String label, double period);  CyclicNumberAxis(String label, double period, double offset); boolean isAdvanceLineVisible(); void setAdvanceLineVisible(boolean visible); Paint getAdvanceLinePaint(); void setAdvanceLinePaint(Paint paint); Stroke getAdvanceLineStroke(); void setAdvanceLineStroke(Stroke stroke); boolean isBoundMappedToLastCycle(); void setBoundMappedToLastCycle(boolean boundMappedToLastCycle); @Override double java2DToValue(double java2DValue, Rectangle2D dataArea,
                                RectangleEdge edge); @Override double valueToJava2D(double value, Rectangle2D dataArea,
                                RectangleEdge edge); @Override void centerRange(double value); @Override void setAutoRangeMinimumSize(double size, boolean notify); @Override void setFixedAutoRange(double length); @Override void setRange(Range range, boolean turnOffAutoRange,
                         boolean notify); double getCycleBound(); double getOffset(); void setOffset(double offset); double getPeriod(); void setPeriod(double period); @Override AxisState draw(Graphics2D g2, double cursor, Rectangle2D plotArea,
            Rectangle2D dataArea, RectangleEdge edge, 
            PlotRenderingInfo plotState); @Override AxisSpace reserveSpace(Graphics2D g2, Plot plot, 
            Rectangle2D plotArea, RectangleEdge edge, AxisSpace space); @Override boolean equals(Object obj); static Stroke DEFAULT_ADVANCE_LINE_STROKE; static final Paint DEFAULT_ADVANCE_LINE_PAINT; }