PrinterDots.java

00001 
00004 package edu.stanford.hci.r3.units;
00005 
00006 import edu.stanford.hci.r3.printing.Printer;
00007 import edu.stanford.hci.r3.printing.Printers;
00008 
00017 public class PrinterDots extends Units {
00018 
00023         public static final Units ONE = new PrinterDots(1.0);
00024 
00029         private Printer printer;
00030 
00034         public PrinterDots(double val) {
00035                 super(val);
00036                 printer = Printers.getDefaultPrinter();
00037         }
00038 
00045         public PrinterDots(Printer p, double val) {
00046                 super(val);
00047                 printer = p;
00048         }
00049 
00053         @Override
00054         protected double getNumberOfUnitsInOneInch() {
00055                 return printer.getDPI();
00056         }
00057 }

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