@Test public void testCloning() throws CloneNotSupportedException { CategoryAxis a1 = new CategoryAxis("Test"); CategoryAxis a2 = (CategoryAxis) a1.clone(); assertNotSame(a1, a2); assertSame(a1.getClass(), a2.getClass()); assertEquals(a1, a2); }
@Override public Object clone() throws CloneNotSupportedException { CategoryAxis clone = (CategoryAxis) super.clone(); clone.tickLabelFontMap = new HashMap<Comparable, Font>(this.tickLabelFontMap); clone.tickLabelPaintMap = new HashMap<Comparable, Paint>(this.tickLabelPaintMap); clone.categoryLabelToolTips = new HashMap<Comparable, String>(this.categoryLabelToolTips); clone.categoryLabelURLs = new HashMap<Comparable, String>(this.categoryLabelToolTips); return clone; }
CategoryAxis extends Axis implements Cloneable, Serializable { @Override public Object clone() throws CloneNotSupportedException { CategoryAxis clone = (CategoryAxis) super.clone(); clone.tickLabelFontMap = new HashMap<Comparable, Font>(this.tickLabelFontMap); clone.tickLabelPaintMap = new HashMap<Comparable, Paint>(this.tickLabelPaintMap); clone.categoryLabelToolTips = new HashMap<Comparable, String>(this.categoryLabelToolTips); clone.categoryLabelURLs = new HashMap<Comparable, String>(this.categoryLabelToolTips); return clone; } }
CategoryAxis extends Axis implements Cloneable, Serializable { @Override public Object clone() throws CloneNotSupportedException { CategoryAxis clone = (CategoryAxis) super.clone(); clone.tickLabelFontMap = new HashMap<Comparable, Font>(this.tickLabelFontMap); clone.tickLabelPaintMap = new HashMap<Comparable, Paint>(this.tickLabelPaintMap); clone.categoryLabelToolTips = new HashMap<Comparable, String>(this.categoryLabelToolTips); clone.categoryLabelURLs = new HashMap<Comparable, String>(this.categoryLabelToolTips); return clone; } CategoryAxis();  CategoryAxis(String label); }
CategoryAxis extends Axis implements Cloneable, Serializable { @Override public Object clone() throws CloneNotSupportedException { CategoryAxis clone = (CategoryAxis) super.clone(); clone.tickLabelFontMap = new HashMap<Comparable, Font>(this.tickLabelFontMap); clone.tickLabelPaintMap = new HashMap<Comparable, Paint>(this.tickLabelPaintMap); clone.categoryLabelToolTips = new HashMap<Comparable, String>(this.categoryLabelToolTips); clone.categoryLabelURLs = new HashMap<Comparable, String>(this.categoryLabelToolTips); return clone; } 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 Object clone() throws CloneNotSupportedException { CategoryAxis clone = (CategoryAxis) super.clone(); clone.tickLabelFontMap = new HashMap<Comparable, Font>(this.tickLabelFontMap); clone.tickLabelPaintMap = new HashMap<Comparable, Paint>(this.tickLabelPaintMap); clone.categoryLabelToolTips = new HashMap<Comparable, String>(this.categoryLabelToolTips); clone.categoryLabelURLs = new HashMap<Comparable, String>(this.categoryLabelToolTips); return clone; } 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; }