public final class PageRange
extends java.lang.Object
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.Type | Property and Description |
---|---|
private ReadOnlyIntegerWrapper |
endPageImpl |
ReadOnlyIntegerProperty |
endPage
IntegerProperty representing the ending
page number of the range. |
private ReadOnlyIntegerWrapper |
startPageImpl
IntegerProperty representing the starting
page number of the range. |
ReadOnlyIntegerProperty |
startPage
IntegerProperty representing the starting
page number of the range. |
Modifier and Type | Field and Description |
---|---|
private ReadOnlyIntegerWrapper |
endPage |
private ReadOnlyIntegerWrapper |
startPage |
Constructor and Description |
---|
PageRange(int startPage,
int endPage)
Create a new PageRange with the specified start and end page numbers.
|
Modifier and Type | Method and Description |
---|---|
private ReadOnlyIntegerWrapper |
endPageImplProperty() |
ReadOnlyIntegerProperty |
endPageProperty()
IntegerProperty representing the ending
page number of the range. |
int |
getEndPage() |
int |
getStartPage() |
private ReadOnlyIntegerWrapper |
startPageImplProperty()
IntegerProperty representing the starting
page number of the range. |
ReadOnlyIntegerProperty |
startPageProperty()
IntegerProperty representing the starting
page number of the range. |
private ReadOnlyIntegerWrapper startPageImplProperty
IntegerProperty
representing the starting
page number of the range. See setStartPage()
for more information.public ReadOnlyIntegerProperty startPageProperty
IntegerProperty
representing the starting
page number of the range. See getStartPage()
for more information.getStartPage()
private ReadOnlyIntegerWrapper endPageImplProperty
public ReadOnlyIntegerProperty endPageProperty
IntegerProperty
representing the ending
page number of the range. See getEndPage()
for more information.getEndPage()
private ReadOnlyIntegerWrapper startPage
private ReadOnlyIntegerWrapper endPage
public PageRange(int startPage, int endPage)
startPage
- the first page in the range.endPage
- the last page in the range.java.lang.IllegalArgumentException
- if the page range is not validprivate ReadOnlyIntegerWrapper startPageImplProperty()
IntegerProperty
representing the starting
page number of the range. See setStartPage()
for more information.public ReadOnlyIntegerProperty startPageProperty()
IntegerProperty
representing the starting
page number of the range. See getStartPage()
for more information.getStartPage()
public int getStartPage()
private ReadOnlyIntegerWrapper endPageImplProperty()
public ReadOnlyIntegerProperty endPageProperty()
IntegerProperty
representing the ending
page number of the range. See getEndPage()
for more information.getEndPage()
public int getEndPage()