1 7 8 package java.awt.geom; 9 10 22 public abstract class Dimension2D implements Cloneable { 23 32 protected Dimension2D() { 33 } 34 35 40 public abstract double getWidth(); 41 42 47 public abstract double getHeight(); 48 49 60 public abstract void setSize(double width, double height); 61 62 70 public void setSize(Dimension2D d) { 71 setSize(d.getWidth(), d.getHeight()); 72 } 73 74 82 public Object clone() { 83 try { 84 return super.clone(); 85 } catch (CloneNotSupportedException e) { 86 throw new InternalError (); 88 } 89 } 90 } 91 | Popular Tags |