Module javafx.graphics
Package javafx.print

# Class PageRange

java.lang.Object
javafx.print.PageRange

    public final class PageRange
    extends Object

A `PageRange` is used to select or constrain the job print stream pages to print. Page numbering starts from 1 to correspond to user expectations. The start page must be greater than zero and less than or equal to the endpage. If start and end are equal, the range refers to a single page. Values that exceed the number of job pages are harmlessly ignored during printing.

Since:
  JavaFX 8.0

- ## Property Summary

  Properties
  Type | Property | Description
  --- | --- | ---
  `ReadOnlyIntegerProperty` | `endPage` | `IntegerProperty` representing the ending page number of the range.
  `ReadOnlyIntegerProperty` | `startPage` | `IntegerProperty` representing the starting page number of the range.

- ## Constructor Summary

  Constructors
  Constructor | Description
  --- | ---
  `PageRange​(int startPage, int endPage)` | Create a new PageRange with the specified start and end page numbers.

- ## Method Summary

  Modifier and Type | Method | Description
  --- | --- | ---
  `ReadOnlyIntegerProperty` | `endPageProperty()` | `IntegerProperty` representing the ending page number of the range.
  `int` | `getEndPage()` |
  `int` | `getStartPage()` |
  `ReadOnlyIntegerProperty` | `startPageProperty()` | `IntegerProperty` representing the starting page number of the range.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Property Details

  - ### startPage

    public ReadOnlyIntegerProperty startPageProperty
    `IntegerProperty` representing the starting page number of the range. See `getStartPage()` for more information.
    See Also:
      `getStartPage()`

  - ### endPage

    public ReadOnlyIntegerProperty endPageProperty
    `IntegerProperty` representing the ending page number of the range. See `getEndPage()` for more information.
    See Also:
      `getEndPage()`

- ## Constructor Details

  - ### PageRange

    public PageRange​(int startPage, int endPage)
    Create a new PageRange with the specified start and end page numbers.
    Parameters:
      `startPage` - the first page in the range.
      `endPage` - the last page in the range.
    Throws:
      `IllegalArgumentException` - if the page range is not valid

- ## Method Details

  - ### startPageProperty

    public ReadOnlyIntegerProperty startPageProperty()
    `IntegerProperty` representing the starting page number of the range. See `getStartPage()` for more information.
    See Also:
      `getStartPage()`

  - ### getStartPage

    public int getStartPage()
    Returns:
      the starting page of the range.

  - ### endPageProperty

    public ReadOnlyIntegerProperty endPageProperty()
    `IntegerProperty` representing the ending page number of the range. See `getEndPage()` for more information.
    See Also:
      `getEndPage()`

  - ### getEndPage

    public int getEndPage()
    Returns:
      the ending page of the range.