Size.java

00001 package edu.stanford.hci.r3.units;
00002 
00013 public class Size implements Cloneable {
00014 
00018         private Units height;
00019 
00023         private Units width;
00024 
00028         public Size() {
00029                 width = Inches.ONE;
00030                 height = Inches.ONE;
00031         }
00032 
00037         public Size(Units w, Units h) {
00038                 width = w;
00039                 height = h;
00040         }
00041 
00045         public Size clone() {
00046                 return new Size(width.clone(), height.clone());
00047         }
00048 
00052         public Units getHeight() {
00053                 return height;
00054         }
00055 
00059         public Units getWidth() {
00060                 return width;
00061         }
00062 
00067         public void setSize(Units w, Units h) {
00068                 width = w;
00069                 height = h;
00070         }
00071 
00075         public String toString() {
00076                 return "[" + width + " x " + height + "]";
00077         }
00078 }

Generated on Sat Apr 14 18:21:38 2007 for R3 Paper Toolkit by  doxygen 1.4.7