@Test public void testEquals() { CategoryAxis a1 = new CategoryAxis("Test"); CategoryAxis a2 = new CategoryAxis("Test"); assertEquals(a1, a2); a1.setLowerMargin(0.15); assertFalse(a1.equals(a2)); a2.setLowerMargin(0.15); assertEquals(a1, a2); a1.setUpperMargin(0.15); assertFalse(a1.equals(a2)); a2.setUpperMargin(0.15); assertEquals(a1, a2); a1.setCategoryMargin(0.15); assertFalse(a1.equals(a2)); a2.setCategoryMargin(0.15); assertEquals(a1, a2); a1.setMaximumCategoryLabelWidthRatio(0.98f); assertFalse(a1.equals(a2)); a2.setMaximumCategoryLabelWidthRatio(0.98f); assertEquals(a1, a2); a1.setCategoryLabelPositionOffset(11); assertFalse(a1.equals(a2)); a2.setCategoryLabelPositionOffset(11); assertEquals(a1, a2); a1.setCategoryLabelPositions(CategoryLabelPositions.DOWN_45); assertFalse(a1.equals(a2)); a2.setCategoryLabelPositions(CategoryLabelPositions.DOWN_45); assertEquals(a1, a2); a1.addCategoryLabelToolTip("Test", "Check"); assertFalse(a1.equals(a2)); a2.addCategoryLabelToolTip("Test", "Check"); assertEquals(a1, a2); a1.addCategoryLabelURL("Test", "http: assertFalse(a1.equals(a2)); a2.addCategoryLabelURL("Test", "http: assertEquals(a1, a2); a1.setTickLabelFont("C1", new Font("Dialog", Font.PLAIN, 21)); assertFalse(a1.equals(a2)); a2.setTickLabelFont("C1", new Font("Dialog", Font.PLAIN, 21)); assertEquals(a1, a2); a1.setTickLabelPaint("C1", Color.RED); assertFalse(a1.equals(a2)); a2.setTickLabelPaint("C1", Color.RED); assertEquals(a1, a2); a1.setTickLabelPaint("C1", new GradientPaint(1.0f, 2.0f, Color.RED, 3.0f, 4.0f, Color.yellow)); assertFalse(a1.equals(a2)); a2.setTickLabelPaint("C1", new GradientPaint(1.0f, 2.0f, Color.RED, 3.0f, 4.0f, Color.yellow)); assertEquals(a1, a2); }
@Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof CategoryAxis)) { return false; } if (!super.equals(obj)) { return false; } CategoryAxis that = (CategoryAxis) obj; if (that.lowerMargin != this.lowerMargin) { return false; } if (that.upperMargin != this.upperMargin) { return false; } if (that.categoryMargin != this.categoryMargin) { return false; } if (that.maximumCategoryLabelWidthRatio != this.maximumCategoryLabelWidthRatio) { return false; } if (that.categoryLabelPositionOffset != this.categoryLabelPositionOffset) { return false; } if (!ObjectUtilities.equal(that.categoryLabelPositions, this.categoryLabelPositions)) { return false; } if (!ObjectUtilities.equal(that.categoryLabelToolTips, this.categoryLabelToolTips)) { return false; } if (!ObjectUtilities.equal(this.categoryLabelURLs, that.categoryLabelURLs)) { return false; } if (!ObjectUtilities.equal(this.tickLabelFontMap, that.tickLabelFontMap)) { return false; } if (!equalPaintMaps(this.tickLabelPaintMap, that.tickLabelPaintMap)) { return false; } return true; }
CategoryAxis extends Axis implements Cloneable, Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof CategoryAxis)) { return false; } if (!super.equals(obj)) { return false; } CategoryAxis that = (CategoryAxis) obj; if (that.lowerMargin != this.lowerMargin) { return false; } if (that.upperMargin != this.upperMargin) { return false; } if (that.categoryMargin != this.categoryMargin) { return false; } if (that.maximumCategoryLabelWidthRatio != this.maximumCategoryLabelWidthRatio) { return false; } if (that.categoryLabelPositionOffset != this.categoryLabelPositionOffset) { return false; } if (!ObjectUtilities.equal(that.categoryLabelPositions, this.categoryLabelPositions)) { return false; } if (!ObjectUtilities.equal(that.categoryLabelToolTips, this.categoryLabelToolTips)) { return false; } if (!ObjectUtilities.equal(this.categoryLabelURLs, that.categoryLabelURLs)) { return false; } if (!ObjectUtilities.equal(this.tickLabelFontMap, that.tickLabelFontMap)) { return false; } if (!equalPaintMaps(this.tickLabelPaintMap, that.tickLabelPaintMap)) { return false; } return true; } }
CategoryAxis extends Axis implements Cloneable, Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof CategoryAxis)) { return false; } if (!super.equals(obj)) { return false; } CategoryAxis that = (CategoryAxis) obj; if (that.lowerMargin != this.lowerMargin) { return false; } if (that.upperMargin != this.upperMargin) { return false; } if (that.categoryMargin != this.categoryMargin) { return false; } if (that.maximumCategoryLabelWidthRatio != this.maximumCategoryLabelWidthRatio) { return false; } if (that.categoryLabelPositionOffset != this.categoryLabelPositionOffset) { return false; } if (!ObjectUtilities.equal(that.categoryLabelPositions, this.categoryLabelPositions)) { return false; } if (!ObjectUtilities.equal(that.categoryLabelToolTips, this.categoryLabelToolTips)) { return false; } if (!ObjectUtilities.equal(this.categoryLabelURLs, that.categoryLabelURLs)) { return false; } if (!ObjectUtilities.equal(this.tickLabelFontMap, that.tickLabelFontMap)) { return false; } if (!equalPaintMaps(this.tickLabelPaintMap, that.tickLabelPaintMap)) { return false; } return true; } CategoryAxis();  CategoryAxis(String label); }
CategoryAxis extends Axis implements Cloneable, Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof CategoryAxis)) { return false; } if (!super.equals(obj)) { return false; } CategoryAxis that = (CategoryAxis) obj; if (that.lowerMargin != this.lowerMargin) { return false; } if (that.upperMargin != this.upperMargin) { return false; } if (that.categoryMargin != this.categoryMargin) { return false; } if (that.maximumCategoryLabelWidthRatio != this.maximumCategoryLabelWidthRatio) { return false; } if (that.categoryLabelPositionOffset != this.categoryLabelPositionOffset) { return false; } if (!ObjectUtilities.equal(that.categoryLabelPositions, this.categoryLabelPositions)) { return false; } if (!ObjectUtilities.equal(that.categoryLabelToolTips, this.categoryLabelToolTips)) { return false; } if (!ObjectUtilities.equal(this.categoryLabelURLs, that.categoryLabelURLs)) { return false; } if (!ObjectUtilities.equal(this.tickLabelFontMap, that.tickLabelFontMap)) { return false; } if (!equalPaintMaps(this.tickLabelPaintMap, that.tickLabelPaintMap)) { return false; } return true; } CategoryAxis();  CategoryAxis(String label); double getLowerMargin(); void setLowerMargin(double margin); double getUpperMargin(); void setUpperMargin(double margin); double getCategoryMargin(); void setCategoryMargin(double margin); int getMaximumCategoryLabelLines(); void setMaximumCategoryLabelLines(int lines); float getMaximumCategoryLabelWidthRatio(); void setMaximumCategoryLabelWidthRatio(float ratio); int getCategoryLabelPositionOffset(); void setCategoryLabelPositionOffset(int offset); CategoryLabelPositions getCategoryLabelPositions(); void setCategoryLabelPositions(CategoryLabelPositions positions); Font getTickLabelFont(Comparable category); void setTickLabelFont(Comparable category, Font font); Paint getTickLabelPaint(Comparable category); void setTickLabelPaint(Comparable category, Paint paint); void addCategoryLabelToolTip(Comparable category, String tooltip); String getCategoryLabelToolTip(Comparable category); void removeCategoryLabelToolTip(Comparable category); void clearCategoryLabelToolTips(); void addCategoryLabelURL(Comparable category, String url); String getCategoryLabelURL(Comparable category); void removeCategoryLabelURL(Comparable category); void clearCategoryLabelURLs(); double getCategoryJava2DCoordinate(CategoryAnchor anchor,
           int category, int categoryCount, Rectangle2D area,
           RectangleEdge edge); double getCategoryStart(int category, int categoryCount,
            Rectangle2D area, RectangleEdge edge); double getCategoryMiddle(int category, int categoryCount,
            Rectangle2D area, RectangleEdge edge); double getCategoryEnd(int category, int categoryCount,
            Rectangle2D area, RectangleEdge edge); double getCategoryMiddle(Comparable category,
            List<Comparable> categories, Rectangle2D area, RectangleEdge edge); double getCategorySeriesMiddle(Comparable category,
            Comparable seriesKey, CategoryDataset dataset, double itemMargin,
            Rectangle2D area, RectangleEdge edge); double getCategorySeriesMiddle(int categoryIndex, int categoryCount,
            int seriesIndex, int seriesCount, double itemMargin,
            Rectangle2D area, RectangleEdge edge); @Override AxisSpace reserveSpace(Graphics2D g2, Plot plot,
            Rectangle2D plotArea, RectangleEdge edge, AxisSpace space); @Override void configure(); @Override AxisState draw(Graphics2D g2, double cursor, Rectangle2D plotArea,
            Rectangle2D dataArea, RectangleEdge edge,
            PlotRenderingInfo plotState); @Override List<CategoryTick> refreshTicks(Graphics2D g2, AxisState state,
            Rectangle2D dataArea, RectangleEdge edge); void drawTickMarks(Graphics2D g2, double cursor,
            Rectangle2D dataArea, RectangleEdge edge, AxisState state); @Override Object clone(); @Override boolean equals(Object obj); @Override int hashCode(); }
CategoryAxis extends Axis implements Cloneable, Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof CategoryAxis)) { return false; } if (!super.equals(obj)) { return false; } CategoryAxis that = (CategoryAxis) obj; if (that.lowerMargin != this.lowerMargin) { return false; } if (that.upperMargin != this.upperMargin) { return false; } if (that.categoryMargin != this.categoryMargin) { return false; } if (that.maximumCategoryLabelWidthRatio != this.maximumCategoryLabelWidthRatio) { return false; } if (that.categoryLabelPositionOffset != this.categoryLabelPositionOffset) { return false; } if (!ObjectUtilities.equal(that.categoryLabelPositions, this.categoryLabelPositions)) { return false; } if (!ObjectUtilities.equal(that.categoryLabelToolTips, this.categoryLabelToolTips)) { return false; } if (!ObjectUtilities.equal(this.categoryLabelURLs, that.categoryLabelURLs)) { return false; } if (!ObjectUtilities.equal(this.tickLabelFontMap, that.tickLabelFontMap)) { return false; } if (!equalPaintMaps(this.tickLabelPaintMap, that.tickLabelPaintMap)) { return false; } return true; } CategoryAxis();  CategoryAxis(String label); double getLowerMargin(); void setLowerMargin(double margin); double getUpperMargin(); void setUpperMargin(double margin); double getCategoryMargin(); void setCategoryMargin(double margin); int getMaximumCategoryLabelLines(); void setMaximumCategoryLabelLines(int lines); float getMaximumCategoryLabelWidthRatio(); void setMaximumCategoryLabelWidthRatio(float ratio); int getCategoryLabelPositionOffset(); void setCategoryLabelPositionOffset(int offset); CategoryLabelPositions getCategoryLabelPositions(); void setCategoryLabelPositions(CategoryLabelPositions positions); Font getTickLabelFont(Comparable category); void setTickLabelFont(Comparable category, Font font); Paint getTickLabelPaint(Comparable category); void setTickLabelPaint(Comparable category, Paint paint); void addCategoryLabelToolTip(Comparable category, String tooltip); String getCategoryLabelToolTip(Comparable category); void removeCategoryLabelToolTip(Comparable category); void clearCategoryLabelToolTips(); void addCategoryLabelURL(Comparable category, String url); String getCategoryLabelURL(Comparable category); void removeCategoryLabelURL(Comparable category); void clearCategoryLabelURLs(); double getCategoryJava2DCoordinate(CategoryAnchor anchor,
           int category, int categoryCount, Rectangle2D area,
           RectangleEdge edge); double getCategoryStart(int category, int categoryCount,
            Rectangle2D area, RectangleEdge edge); double getCategoryMiddle(int category, int categoryCount,
            Rectangle2D area, RectangleEdge edge); double getCategoryEnd(int category, int categoryCount,
            Rectangle2D area, RectangleEdge edge); double getCategoryMiddle(Comparable category,
            List<Comparable> categories, Rectangle2D area, RectangleEdge edge); double getCategorySeriesMiddle(Comparable category,
            Comparable seriesKey, CategoryDataset dataset, double itemMargin,
            Rectangle2D area, RectangleEdge edge); double getCategorySeriesMiddle(int categoryIndex, int categoryCount,
            int seriesIndex, int seriesCount, double itemMargin,
            Rectangle2D area, RectangleEdge edge); @Override AxisSpace reserveSpace(Graphics2D g2, Plot plot,
            Rectangle2D plotArea, RectangleEdge edge, AxisSpace space); @Override void configure(); @Override AxisState draw(Graphics2D g2, double cursor, Rectangle2D plotArea,
            Rectangle2D dataArea, RectangleEdge edge,
            PlotRenderingInfo plotState); @Override List<CategoryTick> refreshTicks(Graphics2D g2, AxisState state,
            Rectangle2D dataArea, RectangleEdge edge); void drawTickMarks(Graphics2D g2, double cursor,
            Rectangle2D dataArea, RectangleEdge edge, AxisState state); @Override Object clone(); @Override boolean equals(Object obj); @Override int hashCode(); static final double DEFAULT_AXIS_MARGIN; static final double DEFAULT_CATEGORY_MARGIN; }