< prev index next >

src/java.desktop/share/classes/sun/print/ProxyPrintGraphics.java

Print this page




  52     public PrintJob getPrintJob() {
  53         return printJob;
  54     }
  55 
  56    /**
  57      * Creates a new <code>Graphics</code> object that is
  58      * a copy of this <code>Graphics</code> object.
  59      * @return     a new graphics context that is a copy of
  60      *                       this graphics context.
  61      */
  62     public Graphics create() {
  63         return new ProxyPrintGraphics(getGraphics().create(), printJob);
  64     }
  65 
  66 
  67     /**
  68      * Creates a new <code>Graphics</code> object based on this
  69      * <code>Graphics</code> object, but with a new translation and
  70      * clip area.
  71      * Refer to
  72      * {@link sun.print.ProxyGraphics#createGraphics}
  73      * for a complete description of this method.
  74      * <p>
  75      * @param      x   the <i>x</i> coordinate.
  76      * @param      y   the <i>y</i> coordinate.
  77      * @param      width   the width of the clipping rectangle.
  78      * @param      height   the height of the clipping rectangle.
  79      * @return     a new graphics context.
  80      * @see        java.awt.Graphics#translate
  81      * @see        java.awt.Graphics#clipRect
  82      */
  83     public Graphics create(int x, int y, int width, int height) {
  84         Graphics g = getGraphics().create(x, y, width, height);
  85         return new ProxyPrintGraphics(g, printJob);
  86     }
  87 
  88     public Graphics getGraphics() {
  89         return super.getGraphics();
  90     }
  91 
  92 


  52     public PrintJob getPrintJob() {
  53         return printJob;
  54     }
  55 
  56    /**
  57      * Creates a new <code>Graphics</code> object that is
  58      * a copy of this <code>Graphics</code> object.
  59      * @return     a new graphics context that is a copy of
  60      *                       this graphics context.
  61      */
  62     public Graphics create() {
  63         return new ProxyPrintGraphics(getGraphics().create(), printJob);
  64     }
  65 
  66 
  67     /**
  68      * Creates a new <code>Graphics</code> object based on this
  69      * <code>Graphics</code> object, but with a new translation and
  70      * clip area.
  71      * Refer to
  72      * {@link sun.print.ProxyGraphics#create(int, int, int, int)}
  73      * for a complete description of this method.
  74      * <p>
  75      * @param      x   the <i>x</i> coordinate.
  76      * @param      y   the <i>y</i> coordinate.
  77      * @param      width   the width of the clipping rectangle.
  78      * @param      height   the height of the clipping rectangle.
  79      * @return     a new graphics context.
  80      * @see        java.awt.Graphics#translate
  81      * @see        java.awt.Graphics#clipRect
  82      */
  83     public Graphics create(int x, int y, int width, int height) {
  84         Graphics g = getGraphics().create(x, y, width, height);
  85         return new ProxyPrintGraphics(g, printJob);
  86     }
  87 
  88     public Graphics getGraphics() {
  89         return super.getGraphics();
  90     }
  91 
  92 
< prev index next >