@Test public void testCloning() throws CloneNotSupportedException { LabelBlock b1 = new LabelBlock("ABC", new Font("Dialog", Font.PLAIN, 12), Color.RED); LabelBlock b2 = (LabelBlock) b1.clone(); assertNotSame(b1, b2); assertSame(b1.getClass(), b2.getClass()); assertEquals(b1, b2); }
@Override public Object clone() throws CloneNotSupportedException { return super.clone(); }
LabelBlock extends AbstractBlock implements Block, PublicCloneable { @Override public Object clone() throws CloneNotSupportedException { return super.clone(); } }
LabelBlock extends AbstractBlock implements Block, PublicCloneable { @Override public Object clone() throws CloneNotSupportedException { return super.clone(); } LabelBlock(String label);  LabelBlock(String text, Font font);  LabelBlock(String text, Font font, Paint paint); }
LabelBlock extends AbstractBlock implements Block, PublicCloneable { @Override public Object clone() throws CloneNotSupportedException { return super.clone(); } LabelBlock(String label);  LabelBlock(String text, Font font);  LabelBlock(String text, Font font, Paint paint); Font getFont(); void setFont(Font font); Paint getPaint(); void setPaint(Paint paint); String getToolTipText(); void setToolTipText(String text); String getURLText(); void setURLText(String text); TextBlockAnchor getContentAlignmentPoint(); void setContentAlignmentPoint(TextBlockAnchor anchor); RectangleAnchor getTextAnchor(); void setTextAnchor(RectangleAnchor anchor); @Override Size2D arrange(Graphics2D g2, RectangleConstraint constraint); @Override void draw(Graphics2D g2, Rectangle2D area); @Override Object draw(Graphics2D g2, Rectangle2D area, Object params); @Override boolean equals(Object obj); @Override Object clone(); }
LabelBlock extends AbstractBlock implements Block, PublicCloneable { @Override public Object clone() throws CloneNotSupportedException { return super.clone(); } LabelBlock(String label);  LabelBlock(String text, Font font);  LabelBlock(String text, Font font, Paint paint); Font getFont(); void setFont(Font font); Paint getPaint(); void setPaint(Paint paint); String getToolTipText(); void setToolTipText(String text); String getURLText(); void setURLText(String text); TextBlockAnchor getContentAlignmentPoint(); void setContentAlignmentPoint(TextBlockAnchor anchor); RectangleAnchor getTextAnchor(); void setTextAnchor(RectangleAnchor anchor); @Override Size2D arrange(Graphics2D g2, RectangleConstraint constraint); @Override void draw(Graphics2D g2, Rectangle2D area); @Override Object draw(Graphics2D g2, Rectangle2D area, Object params); @Override boolean equals(Object obj); @Override Object clone(); static final Paint DEFAULT_PAINT; }