This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.


javax.print.attribute.standard
class PageRanges

java.lang.Object extended by javax.print.attribute.SetOfIntegerSyntax extended by javax.print.attribute.standard.PageRanges
All Implemented Interfaces:
Serializable, Cloneable, DocAttribute, PrintJobAttribute, PrintRequestAttribute

public final class PageRanges
extends SetOfIntegerSyntax
implements DocAttribute, PrintRequestAttribute, PrintJobAttribute

Class PageRanges is a printing attribute class, a set of integers, that identifies the range(s) of print-stream pages that the Printer object uses for each copy of each document which are to be printed. Nothing is printed for any pages identified that do not exist in the document(s). The attribute is associated with print-stream pages, not application-numbered pages (for example, the page numbers found in the headers and or footers for certain word processing applications).

In most cases, the exact pages to be printed will be generated by a device driver and this attribute would not be required. However, when printing an archived document which has already been formatted, the end user may elect to print just a subset of the pages contained in the document. In this case, if a page range of "n-m" is specified, the first page to be printed will be page n. All subsequent pages of the document will be printed through and including page m.

If a PageRanges attribute is not specified for a print job, all pages of the document will be printed. In other words, the default value for the PageRanges attribute is always {{1, Integer.MAX_VALUE}}.

The effect of a PageRanges attribute on a multidoc print job (a job with multiple documents) depends on whether all the docs have the same page ranges specified or whether different docs have different page ranges specified, and on the (perhaps defaulted) value of the {@link MultipleDocumentHandling MultipleDocumentHandling} attribute.

IPP Compatibility: The PageRanges attribute's canonical array form gives the lower and upper bound for each range of pages to be included in and IPP "page-ranges" attribute. See class {@link javax.print.attribute.SetOfIntegerSyntax SetOfIntegerSyntax} for an explanation of canonical array form. The category name returned by getName() gives the IPP attribute name.


Constructor Summary
PageRanges(int member)

          Construct a new page ranges attribute containing a single integer.
PageRanges(int lowerBound, int upperBound)

          Construct a new page ranges attribute containing a single range of integers.
PageRanges(int[][] members)

          Construct a new page ranges attribute with the given members.
PageRanges(String members)

          Construct a new page ranges attribute with the given members in string form.
 
Method Summary
 boolean
equals(Object object)

          Returns whether this page ranges attribute is equivalent to the passed in object.
 Class

          Get the printing attribute class which is to be used as the "category" for this printing attribute value.
 String

          Get the name of the category of which this attribute value is an instance.
 
Methods inherited from class javax.print.attribute.SetOfIntegerSyntax
contains, contains, equals, getMembers, hashCode, next, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PageRanges

public PageRanges(int member)
Construct a new page ranges attribute containing a single integer. That is, only the one page is to be printed.

Parameters:
member - Set member.

PageRanges

public PageRanges(int lowerBound,
                  int upperBound)
Construct a new page ranges attribute containing a single range of integers. That is, only those pages in the one range are to be printed.

Parameters:
lowerBound - Lower bound of the range.
upperBound - Upper bound of the range.

PageRanges

public PageRanges(int[][] members)
Construct a new page ranges attribute with the given members. The members are specified in "array form;" see class {@link javax.print.attribute.SetOfIntegerSyntax SetOfIntegerSyntax} for an explanation of array form.

Parameters:
members - Set members in array form.

PageRanges

public PageRanges(String members)
Construct a new page ranges attribute with the given members in string form. See class {@link javax.print.attribute.SetOfIntegerSyntax SetOfIntegerSyntax} for explanation of the syntax.

Parameters:
members - Set members in string form.
Method Detail

equals

public boolean equals(Object object)
Returns whether this page ranges attribute is equivalent to the passed in object. To be equivalent, all of the following conditions must be true:
  1. object is not null.
  2. object is an instance of class PageRanges.
  3. This page ranges attribute's members and object's members are the same.

Overrides:
equals in class SetOfIntegerSyntax
Parameters:
object - Object to compare to.
Returns:
True if object is equivalent to this page ranges attribute, false otherwise.

getCategory

public final Class getCategory()
Get the printing attribute class which is to be used as the "category" for this printing attribute value.

For class PageRanges, the category is class PageRanges itself.

Returns:
Printing attribute class (category), an instance of class {@link java.lang.Class java.lang.Class}.

getName

public final String getName()
Get the name of the category of which this attribute value is an instance.

For class PageRanges, the category name is "page-ranges".

Returns:
Attribute category name.


This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.
This page displays the Jadeite version of the documention, which is derived from the offical documentation that contains this copyright notice:
Copyright 2008 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.
The official Sun™ documentation can be found here at http://java.sun.com/javase/6/docs/api/.