JavaTM 2 Platform
Standard Ed. 5.0

java.awt
Class PageAttributes

java.lang.Object
  extended by java.awt.PageAttributes
All Implemented Interfaces:
Cloneable

public final class PageAttributes
extends Object
implements Cloneable

A set of attributes which control the output of a printed page.

Instances of this class control the color state, paper size (media type), orientation, logical origin, print quality, and resolution of every page which uses the instance. Attribute names are compliant with the Internet Printing Protocol (IPP) 1.1 where possible. Attribute values are partially compliant where possible.

To use a method which takes an inner class type, pass a reference to one of the constant fields of the inner class. Client code cannot create new instances of the inner class types because none of those classes has a public constructor. For example, to set the color state to monochrome, use the following code:

 import java.awt.PageAttributes;

 public class MonochromeExample {
     public void setMonochrome(PageAttributes pageAttributes) {
         pageAttributes.setColor(PageAttributes.ColorType.MONOCHROME);
     }
 }
 

Every IPP attribute which supports an attributeName-default value has a corresponding setattributeNameToDefault method. Default value fields are not provided.


Nested Class Summary
static class PageAttributes.ColorType
          A type-safe enumeration of possible color states.
static class PageAttributes.MediaType
          A type-safe enumeration of possible paper sizes.
static class PageAttributes.OrientationRequestedType
          A type-safe enumeration of possible orientations.
static class PageAttributes.OriginType
          A type-safe enumeration of possible origins.
static class PageAttributes.PrintQualityType
          A type-safe enumeration of possible print qualities.
 
Constructor Summary
PageAttributes()
          Constructs a PageAttributes instance with default values for every attribute.