@Test public void testCloning() throws CloneNotSupportedException { SubCategoryAxis a1 = new SubCategoryAxis("Test"); a1.addSubCategory("SubCategoryA"); SubCategoryAxis a2 = (SubCategoryAxis) a1.clone(); assertNotSame(a1, a2); assertSame(a1.getClass(), a2.getClass()); assertEquals(a1, a2); }
public void addSubCategory(Comparable subCategory) { if (subCategory == null) { throw new IllegalArgumentException("Null 'subcategory' axis."); } this.subCategories.add(subCategory); notifyListeners(new AxisChangeEvent(this)); }
SubCategoryAxis extends CategoryAxis implements Cloneable, Serializable { public void addSubCategory(Comparable subCategory) { if (subCategory == null) { throw new IllegalArgumentException("Null 'subcategory' axis."); } this.subCategories.add(subCategory); notifyListeners(new AxisChangeEvent(this)); } }
SubCategoryAxis extends CategoryAxis implements Cloneable, Serializable { public void addSubCategory(Comparable subCategory) { if (subCategory == null) { throw new IllegalArgumentException("Null 'subcategory' axis."); } this.subCategories.add(subCategory); notifyListeners(new AxisChangeEvent(this)); } SubCategoryAxis(String label); }
SubCategoryAxis extends CategoryAxis implements Cloneable, Serializable { public void addSubCategory(Comparable subCategory) { if (subCategory == null) { throw new IllegalArgumentException("Null 'subcategory' axis."); } this.subCategories.add(subCategory); notifyListeners(new AxisChangeEvent(this)); } SubCategoryAxis(String label); void addSubCategory(Comparable subCategory); Font getSubLabelFont(); void setSubLabelFont(Font font); Paint getSubLabelPaint(); void setSubLabelPaint(Paint paint); @Override AxisSpace reserveSpace(Graphics2D g2, Plot plot,
                                  Rectangle2D plotArea,
                                  RectangleEdge edge, AxisSpace space); @Override AxisState draw(Graphics2D g2,
                          double cursor,
                          Rectangle2D plotArea,
                          Rectangle2D dataArea,
                          RectangleEdge edge,
                          PlotRenderingInfo plotState); @Override boolean equals(Object obj); }
SubCategoryAxis extends CategoryAxis implements Cloneable, Serializable { public void addSubCategory(Comparable subCategory) { if (subCategory == null) { throw new IllegalArgumentException("Null 'subcategory' axis."); } this.subCategories.add(subCategory); notifyListeners(new AxisChangeEvent(this)); } SubCategoryAxis(String label); void addSubCategory(Comparable subCategory); Font getSubLabelFont(); void setSubLabelFont(Font font); Paint getSubLabelPaint(); void setSubLabelPaint(Paint paint); @Override AxisSpace reserveSpace(Graphics2D g2, Plot plot,
                                  Rectangle2D plotArea,
                                  RectangleEdge edge, AxisSpace space); @Override AxisState draw(Graphics2D g2,
                          double cursor,
                          Rectangle2D plotArea,
                          Rectangle2D dataArea,
                          RectangleEdge edge,
                          PlotRenderingInfo plotState); @Override boolean equals(Object obj);  }