src/share/classes/java/awt/print/PrinterJob.java

Print this page




 529      * <code>PageFormat</code> object.
 530      * <p>
 531      * If a supported attribute-value is specified in this attribute set,
 532      * it will take precedence over the API settings for this print()
 533      * operation only.
 534      * The following behaviour is specified for PageFormat:
 535      * If a client uses the Printable interface, then the
 536      * <code>attributes</code> parameter to this method is examined
 537      * for attributes which specify media (by size), orientation, and
 538      * imageable area, and those are used to construct a new PageFormat
 539      * which is passed to the Printable object's print() method.
 540      * See {@link Printable} for an explanation of the required
 541      * behaviour of a Printable to ensure optimal printing via PrinterJob.
 542      * For clients of the Pageable interface, the PageFormat will always
 543      * be as supplied by that interface, on a per page basis.
 544      * <p>
 545      * These behaviours allow an application to directly pass the
 546      * user settings returned from
 547      * <code>printDialog(PrintRequestAttributeSet attributes</code> to
 548      * this print() method.
 549      * <p>
 550      *
 551      * @param attributes a set of attributes for the job
 552      * @exception PrinterException an error in the print system
 553      *            caused the job to be aborted.
 554      * @see Book
 555      * @see Pageable
 556      * @see Printable
 557      * @since 1.4
 558      */
 559     public void print(PrintRequestAttributeSet attributes)
 560         throws PrinterException {
 561         print();
 562     }
 563 
 564     /**
 565      * Sets the number of copies to be printed.
 566      * @param copies the number of copies to be printed
 567      * @see #getCopies
 568      */
 569     public abstract void setCopies(int copies);




 529      * <code>PageFormat</code> object.
 530      * <p>
 531      * If a supported attribute-value is specified in this attribute set,
 532      * it will take precedence over the API settings for this print()
 533      * operation only.
 534      * The following behaviour is specified for PageFormat:
 535      * If a client uses the Printable interface, then the
 536      * <code>attributes</code> parameter to this method is examined
 537      * for attributes which specify media (by size), orientation, and
 538      * imageable area, and those are used to construct a new PageFormat
 539      * which is passed to the Printable object's print() method.
 540      * See {@link Printable} for an explanation of the required
 541      * behaviour of a Printable to ensure optimal printing via PrinterJob.
 542      * For clients of the Pageable interface, the PageFormat will always
 543      * be as supplied by that interface, on a per page basis.
 544      * <p>
 545      * These behaviours allow an application to directly pass the
 546      * user settings returned from
 547      * <code>printDialog(PrintRequestAttributeSet attributes</code> to
 548      * this print() method.

 549      *
 550      * @param attributes a set of attributes for the job
 551      * @exception PrinterException an error in the print system
 552      *            caused the job to be aborted.
 553      * @see Book
 554      * @see Pageable
 555      * @see Printable
 556      * @since 1.4
 557      */
 558     public void print(PrintRequestAttributeSet attributes)
 559         throws PrinterException {
 560         print();
 561     }
 562 
 563     /**
 564      * Sets the number of copies to be printed.
 565      * @param copies the number of copies to be printed
 566      * @see #getCopies
 567      */
 568     public abstract void setCopies(int copies);