@Test public void testEquals() { NumberAxis a1 = new NumberAxis("Test"); NumberAxis a2 = new NumberAxis("Test"); assertEquals(a1, a2); a1.setAxisLineVisible(false); assertFalse(a1.equals(a2)); a2.setAxisLineVisible(false); assertEquals(a1, a2); a1.setPositiveArrowVisible(true); assertFalse(a1.equals(a2)); a2.setPositiveArrowVisible(true); assertEquals(a1, a2); a1.setNegativeArrowVisible(true); assertFalse(a1.equals(a2)); a2.setNegativeArrowVisible(true); assertEquals(a1, a2); a1.setAxisLinePaint(Color.BLUE); assertFalse(a1.equals(a2)); a2.setAxisLinePaint(Color.BLUE); assertEquals(a1, a2); Stroke stroke = new BasicStroke(2.0f); a1.setAxisLineStroke(stroke); assertFalse(a1.equals(a2)); a2.setAxisLineStroke(stroke); assertEquals(a1, a2); a1.setInverted(true); assertFalse(a1.equals(a2)); a2.setInverted(true); assertEquals(a1, a2); a1.setRange(new Range(50.0, 75.0)); assertFalse(a1.equals(a2)); a2.setRange(new Range(50.0, 75.0)); assertEquals(a1, a2); a1.setAutoRange(true); assertFalse(a1.equals(a2)); a2.setAutoRange(true); assertEquals(a1, a2); a1.setAutoRangeMinimumSize(3.33); assertFalse(a1.equals(a2)); a2.setAutoRangeMinimumSize(3.33); assertEquals(a1, a2); a1.setDefaultAutoRange(new Range(1.2, 3.4)); assertFalse(a1.equals(a2)); a2.setDefaultAutoRange(new Range(1.2, 3.4)); assertEquals(a1, a2); a1.setUpperMargin(0.09); assertFalse(a1.equals(a2)); a2.setUpperMargin(0.09); assertEquals(a1, a2); a1.setLowerMargin(0.09); assertFalse(a1.equals(a2)); a2.setLowerMargin(0.09); assertEquals(a1, a2); a1.setFixedAutoRange(50.0); assertFalse(a1.equals(a2)); a2.setFixedAutoRange(50.0); assertEquals(a1, a2); a1.setAutoTickUnitSelection(false); assertFalse(a1.equals(a2)); a2.setAutoTickUnitSelection(false); assertEquals(a1, a2); a1.setStandardTickUnits(NumberAxis.createIntegerTickUnits()); assertFalse(a1.equals(a2)); a2.setStandardTickUnits(NumberAxis.createIntegerTickUnits()); assertEquals(a1, a2); a1.setVerticalTickLabels(true); assertFalse(a1.equals(a2)); a2.setVerticalTickLabels(true); assertEquals(a1, a2); }
@Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof ValueAxis)) { return false; } ValueAxis that = (ValueAxis) obj; if (this.positiveArrowVisible != that.positiveArrowVisible) { return false; } if (this.negativeArrowVisible != that.negativeArrowVisible) { return false; } if (this.inverted != that.inverted) { return false; } if (!this.autoRange && !ObjectUtilities.equal(this.range, that.range)) { return false; } if (this.autoRange != that.autoRange) { return false; } if (this.autoRangeMinimumSize != that.autoRangeMinimumSize) { return false; } if (!this.defaultAutoRange.equals(that.defaultAutoRange)) { return false; } if (this.upperMargin != that.upperMargin) { return false; } if (this.lowerMargin != that.lowerMargin) { return false; } if (this.fixedAutoRange != that.fixedAutoRange) { return false; } if (this.autoTickUnitSelection != that.autoTickUnitSelection) { return false; } if (!ObjectUtilities.equal(this.standardTickUnits, that.standardTickUnits)) { return false; } if (this.verticalTickLabels != that.verticalTickLabels) { return false; } if (this.minorTickCount != that.minorTickCount) { return false; } return super.equals(obj); }
ValueAxis extends Axis implements Cloneable, PublicCloneable, Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof ValueAxis)) { return false; } ValueAxis that = (ValueAxis) obj; if (this.positiveArrowVisible != that.positiveArrowVisible) { return false; } if (this.negativeArrowVisible != that.negativeArrowVisible) { return false; } if (this.inverted != that.inverted) { return false; } if (!this.autoRange && !ObjectUtilities.equal(this.range, that.range)) { return false; } if (this.autoRange != that.autoRange) { return false; } if (this.autoRangeMinimumSize != that.autoRangeMinimumSize) { return false; } if (!this.defaultAutoRange.equals(that.defaultAutoRange)) { return false; } if (this.upperMargin != that.upperMargin) { return false; } if (this.lowerMargin != that.lowerMargin) { return false; } if (this.fixedAutoRange != that.fixedAutoRange) { return false; } if (this.autoTickUnitSelection != that.autoTickUnitSelection) { return false; } if (!ObjectUtilities.equal(this.standardTickUnits, that.standardTickUnits)) { return false; } if (this.verticalTickLabels != that.verticalTickLabels) { return false; } if (this.minorTickCount != that.minorTickCount) { return false; } return super.equals(obj); } }
ValueAxis extends Axis implements Cloneable, PublicCloneable, Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof ValueAxis)) { return false; } ValueAxis that = (ValueAxis) obj; if (this.positiveArrowVisible != that.positiveArrowVisible) { return false; } if (this.negativeArrowVisible != that.negativeArrowVisible) { return false; } if (this.inverted != that.inverted) { return false; } if (!this.autoRange && !ObjectUtilities.equal(this.range, that.range)) { return false; } if (this.autoRange != that.autoRange) { return false; } if (this.autoRangeMinimumSize != that.autoRangeMinimumSize) { return false; } if (!this.defaultAutoRange.equals(that.defaultAutoRange)) { return false; } if (this.upperMargin != that.upperMargin) { return false; } if (this.lowerMargin != that.lowerMargin) { return false; } if (this.fixedAutoRange != that.fixedAutoRange) { return false; } if (this.autoTickUnitSelection != that.autoTickUnitSelection) { return false; } if (!ObjectUtilities.equal(this.standardTickUnits, that.standardTickUnits)) { return false; } if (this.verticalTickLabels != that.verticalTickLabels) { return false; } if (this.minorTickCount != that.minorTickCount) { return false; } return super.equals(obj); } protected  ValueAxis(String label, TickUnitSource standardTickUnits); }
ValueAxis extends Axis implements Cloneable, PublicCloneable, Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof ValueAxis)) { return false; } ValueAxis that = (ValueAxis) obj; if (this.positiveArrowVisible != that.positiveArrowVisible) { return false; } if (this.negativeArrowVisible != that.negativeArrowVisible) { return false; } if (this.inverted != that.inverted) { return false; } if (!this.autoRange && !ObjectUtilities.equal(this.range, that.range)) { return false; } if (this.autoRange != that.autoRange) { return false; } if (this.autoRangeMinimumSize != that.autoRangeMinimumSize) { return false; } if (!this.defaultAutoRange.equals(that.defaultAutoRange)) { return false; } if (this.upperMargin != that.upperMargin) { return false; } if (this.lowerMargin != that.lowerMargin) { return false; } if (this.fixedAutoRange != that.fixedAutoRange) { return false; } if (this.autoTickUnitSelection != that.autoTickUnitSelection) { return false; } if (!ObjectUtilities.equal(this.standardTickUnits, that.standardTickUnits)) { return false; } if (this.verticalTickLabels != that.verticalTickLabels) { return false; } if (this.minorTickCount != that.minorTickCount) { return false; } return super.equals(obj); } protected  ValueAxis(String label, TickUnitSource standardTickUnits); boolean isVerticalTickLabels(); void setVerticalTickLabels(boolean flag); boolean isPositiveArrowVisible(); void setPositiveArrowVisible(boolean visible); boolean isNegativeArrowVisible(); void setNegativeArrowVisible(boolean visible); Shape getUpArrow(); void setUpArrow(Shape arrow); Shape getDownArrow(); void setDownArrow(Shape arrow); Shape getLeftArrow(); void setLeftArrow(Shape arrow); Shape getRightArrow(); void setRightArrow(Shape arrow); abstract List<ValueTick> refreshTicks(Graphics2D g2, AxisState state,
                                                      Rectangle2D dataArea, RectangleEdge edge); @Override AxisSpace reserveSpace(Graphics2D g2, Plot plot,
            Rectangle2D plotArea, RectangleEdge edge, AxisSpace space); boolean isInverted(); void setInverted(boolean flag); boolean isAutoRange(); void setAutoRange(boolean auto); double getAutoRangeMinimumSize(); void setAutoRangeMinimumSize(double size); void setAutoRangeMinimumSize(double size, boolean notify); Range getDefaultAutoRange(); void setDefaultAutoRange(Range range); double getLowerMargin(); void setLowerMargin(double margin); double getUpperMargin(); void setUpperMargin(double margin); double getFixedAutoRange(); void setFixedAutoRange(double length); double getLowerBound(); void setLowerBound(double min); double getUpperBound(); void setUpperBound(double max); Range getRange(); void setRange(Range range); void setRange(Range range, boolean turnOffAutoRange,
                         boolean notify); void setRange(double lower, double upper); void setRangeWithMargins(Range range); void setRangeWithMargins(Range range, boolean turnOffAutoRange,
                                    boolean notify); void setRangeWithMargins(double lower, double upper); void setRangeAboutValue(double value, double length); boolean isAutoTickUnitSelection(); void setAutoTickUnitSelection(boolean flag); void setAutoTickUnitSelection(boolean flag, boolean notify); TickUnitSource getStandardTickUnits(); void setStandardTickUnits(TickUnitSource source); int getMinorTickCount(); void setMinorTickCount(int count); abstract double valueToJava2D(double value, Rectangle2D area,
                                         RectangleEdge edge); double lengthToJava2D(double length, Rectangle2D area,
                                 RectangleEdge edge); abstract double java2DToValue(double java2DValue, Rectangle2D area, 
                                         RectangleEdge edge); void centerRange(double value); void resizeRange(double percent); void resizeRange(double percent, double anchorValue); void resizeRange2(double percent, double anchorValue); void zoomRange(double lowerPercent, double upperPercent); void pan(double percent); @Override boolean equals(Object obj); @Override Object clone(); }
ValueAxis extends Axis implements Cloneable, PublicCloneable, Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof ValueAxis)) { return false; } ValueAxis that = (ValueAxis) obj; if (this.positiveArrowVisible != that.positiveArrowVisible) { return false; } if (this.negativeArrowVisible != that.negativeArrowVisible) { return false; } if (this.inverted != that.inverted) { return false; } if (!this.autoRange && !ObjectUtilities.equal(this.range, that.range)) { return false; } if (this.autoRange != that.autoRange) { return false; } if (this.autoRangeMinimumSize != that.autoRangeMinimumSize) { return false; } if (!this.defaultAutoRange.equals(that.defaultAutoRange)) { return false; } if (this.upperMargin != that.upperMargin) { return false; } if (this.lowerMargin != that.lowerMargin) { return false; } if (this.fixedAutoRange != that.fixedAutoRange) { return false; } if (this.autoTickUnitSelection != that.autoTickUnitSelection) { return false; } if (!ObjectUtilities.equal(this.standardTickUnits, that.standardTickUnits)) { return false; } if (this.verticalTickLabels != that.verticalTickLabels) { return false; } if (this.minorTickCount != that.minorTickCount) { return false; } return super.equals(obj); } protected  ValueAxis(String label, TickUnitSource standardTickUnits); boolean isVerticalTickLabels(); void setVerticalTickLabels(boolean flag); boolean isPositiveArrowVisible(); void setPositiveArrowVisible(boolean visible); boolean isNegativeArrowVisible(); void setNegativeArrowVisible(boolean visible); Shape getUpArrow(); void setUpArrow(Shape arrow); Shape getDownArrow(); void setDownArrow(Shape arrow); Shape getLeftArrow(); void setLeftArrow(Shape arrow); Shape getRightArrow(); void setRightArrow(Shape arrow); abstract List<ValueTick> refreshTicks(Graphics2D g2, AxisState state,
                                                      Rectangle2D dataArea, RectangleEdge edge); @Override AxisSpace reserveSpace(Graphics2D g2, Plot plot,
            Rectangle2D plotArea, RectangleEdge edge, AxisSpace space); boolean isInverted(); void setInverted(boolean flag); boolean isAutoRange(); void setAutoRange(boolean auto); double getAutoRangeMinimumSize(); void setAutoRangeMinimumSize(double size); void setAutoRangeMinimumSize(double size, boolean notify); Range getDefaultAutoRange(); void setDefaultAutoRange(Range range); double getLowerMargin(); void setLowerMargin(double margin); double getUpperMargin(); void setUpperMargin(double margin); double getFixedAutoRange(); void setFixedAutoRange(double length); double getLowerBound(); void setLowerBound(double min); double getUpperBound(); void setUpperBound(double max); Range getRange(); void setRange(Range range); void setRange(Range range, boolean turnOffAutoRange,
                         boolean notify); void setRange(double lower, double upper); void setRangeWithMargins(Range range); void setRangeWithMargins(Range range, boolean turnOffAutoRange,
                                    boolean notify); void setRangeWithMargins(double lower, double upper); void setRangeAboutValue(double value, double length); boolean isAutoTickUnitSelection(); void setAutoTickUnitSelection(boolean flag); void setAutoTickUnitSelection(boolean flag, boolean notify); TickUnitSource getStandardTickUnits(); void setStandardTickUnits(TickUnitSource source); int getMinorTickCount(); void setMinorTickCount(int count); abstract double valueToJava2D(double value, Rectangle2D area,
                                         RectangleEdge edge); double lengthToJava2D(double length, Rectangle2D area,
                                 RectangleEdge edge); abstract double java2DToValue(double java2DValue, Rectangle2D area, 
                                         RectangleEdge edge); void centerRange(double value); void resizeRange(double percent); void resizeRange(double percent, double anchorValue); void resizeRange2(double percent, double anchorValue); void zoomRange(double lowerPercent, double upperPercent); void pan(double percent); @Override boolean equals(Object obj); @Override Object clone(); static final Range DEFAULT_RANGE; static final boolean DEFAULT_AUTO_RANGE; static final boolean DEFAULT_INVERTED; static final double DEFAULT_AUTO_RANGE_MINIMUM_SIZE; static final double DEFAULT_LOWER_MARGIN; static final double DEFAULT_UPPER_MARGIN; static final boolean DEFAULT_AUTO_TICK_UNIT_SELECTION; static final int MAXIMUM_TICK_COUNT; }