Java Code Examples for java.awt.print.Pageable#UNKNOWN_NUMBER_OF_PAGES
The following examples show how to use
java.awt.print.Pageable#UNKNOWN_NUMBER_OF_PAGES .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: RasterPrinterJob.java From dragonwell8_jdk with GNU General Public License v2.0 | 6 votes |
protected final int getMaxPageAttrib() { if (attributes != null) { SunMinMaxPage s = (SunMinMaxPage)attributes.get(SunMinMaxPage.class); if (s != null) { return s.getMax(); } } Pageable pageable = getPageable(); if (pageable != null) { int numPages = pageable.getNumberOfPages(); if (numPages <= Pageable.UNKNOWN_NUMBER_OF_PAGES) { numPages = MAX_UNKNOWN_PAGES; } return ((numPages == 0) ? 1 : numPages); } return Integer.MAX_VALUE; }
Example 2
Source File: RasterPrinterJob.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
protected final int getMaxPageAttrib() { if (attributes != null) { SunMinMaxPage s = (SunMinMaxPage)attributes.get(SunMinMaxPage.class); if (s != null) { return s.getMax(); } } Pageable pageable = getPageable(); if (pageable != null) { int numPages = pageable.getNumberOfPages(); if (numPages <= Pageable.UNKNOWN_NUMBER_OF_PAGES) { numPages = MAX_UNKNOWN_PAGES; } return ((numPages == 0) ? 1 : numPages); } return Integer.MAX_VALUE; }
Example 3
Source File: RasterPrinterJob.java From hottub with GNU General Public License v2.0 | 6 votes |
protected final int getMaxPageAttrib() { if (attributes != null) { SunMinMaxPage s = (SunMinMaxPage)attributes.get(SunMinMaxPage.class); if (s != null) { return s.getMax(); } } Pageable pageable = getPageable(); if (pageable != null) { int numPages = pageable.getNumberOfPages(); if (numPages <= Pageable.UNKNOWN_NUMBER_OF_PAGES) { numPages = MAX_UNKNOWN_PAGES; } return ((numPages == 0) ? 1 : numPages); } return Integer.MAX_VALUE; }
Example 4
Source File: RasterPrinterJob.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 6 votes |
protected final int getMaxPageAttrib() { if (attributes != null) { SunMinMaxPage s = (SunMinMaxPage)attributes.get(SunMinMaxPage.class); if (s != null) { return s.getMax(); } } Pageable pageable = getPageable(); if (pageable != null) { int numPages = pageable.getNumberOfPages(); if (numPages <= Pageable.UNKNOWN_NUMBER_OF_PAGES) { numPages = MAX_UNKNOWN_PAGES; } return ((numPages == 0) ? 1 : numPages); } return Integer.MAX_VALUE; }
Example 5
Source File: RasterPrinterJob.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
protected final int getMaxPageAttrib() { if (attributes != null) { SunMinMaxPage s = (SunMinMaxPage)attributes.get(SunMinMaxPage.class); if (s != null) { return s.getMax(); } } Pageable pageable = getPageable(); if (pageable != null) { int numPages = pageable.getNumberOfPages(); if (numPages <= Pageable.UNKNOWN_NUMBER_OF_PAGES) { numPages = MAX_UNKNOWN_PAGES; } return ((numPages == 0) ? 1 : numPages); } return Integer.MAX_VALUE; }
Example 6
Source File: RasterPrinterJob.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
protected final int getMaxPageAttrib() { if (attributes != null) { SunMinMaxPage s = (SunMinMaxPage)attributes.get(SunMinMaxPage.class); if (s != null) { return s.getMax(); } } Pageable pageable = getPageable(); if (pageable != null) { int numPages = pageable.getNumberOfPages(); if (numPages <= Pageable.UNKNOWN_NUMBER_OF_PAGES) { numPages = MAX_UNKNOWN_PAGES; } return ((numPages == 0) ? 1 : numPages); } return Integer.MAX_VALUE; }
Example 7
Source File: RasterPrinterJob.java From Bytecoder with Apache License 2.0 | 6 votes |
protected final int getMaxPageAttrib() { if (attributes != null) { SunMinMaxPage s = (SunMinMaxPage)attributes.get(SunMinMaxPage.class); if (s != null) { return s.getMax(); } } Pageable pageable = getPageable(); if (pageable != null) { int numPages = pageable.getNumberOfPages(); if (numPages <= Pageable.UNKNOWN_NUMBER_OF_PAGES) { numPages = MAX_UNKNOWN_PAGES; } return ((numPages == 0) ? 1 : numPages); } return Integer.MAX_VALUE; }
Example 8
Source File: RasterPrinterJob.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
protected final int getMaxPageAttrib() { if (attributes != null) { SunMinMaxPage s = (SunMinMaxPage)attributes.get(SunMinMaxPage.class); if (s != null) { return s.getMax(); } } Pageable pageable = getPageable(); if (pageable != null) { int numPages = pageable.getNumberOfPages(); if (numPages <= Pageable.UNKNOWN_NUMBER_OF_PAGES) { numPages = MAX_UNKNOWN_PAGES; } return ((numPages == 0) ? 1 : numPages); } return Integer.MAX_VALUE; }
Example 9
Source File: RasterPrinterJob.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
protected final int getMaxPageAttrib() { if (attributes != null) { SunMinMaxPage s = (SunMinMaxPage)attributes.get(SunMinMaxPage.class); if (s != null) { return s.getMax(); } } Pageable pageable = getPageable(); if (pageable != null) { int numPages = pageable.getNumberOfPages(); if (numPages <= Pageable.UNKNOWN_NUMBER_OF_PAGES) { numPages = MAX_UNKNOWN_PAGES; } return ((numPages == 0) ? 1 : numPages); } return Integer.MAX_VALUE; }
Example 10
Source File: RasterPrinterJob.java From jdk8u-jdk with GNU General Public License v2.0 | 6 votes |
protected final int getMaxPageAttrib() { if (attributes != null) { SunMinMaxPage s = (SunMinMaxPage)attributes.get(SunMinMaxPage.class); if (s != null) { return s.getMax(); } } Pageable pageable = getPageable(); if (pageable != null) { int numPages = pageable.getNumberOfPages(); if (numPages <= Pageable.UNKNOWN_NUMBER_OF_PAGES) { numPages = MAX_UNKNOWN_PAGES; } return ((numPages == 0) ? 1 : numPages); } return Integer.MAX_VALUE; }
Example 11
Source File: RasterPrinterJob.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
/** * Set the range of pages from a Book to be printed. * Both 'firstPage' and 'lastPage' are zero based * page indices. If either parameter is less than * zero then the page range is set to be from the * first page to the last. */ protected void setPageRange(int firstPage, int lastPage) { if(firstPage >= 0 && lastPage >= 0) { mFirstPage = firstPage; mLastPage = lastPage; if(mLastPage < mFirstPage) mLastPage = mFirstPage; } else { mFirstPage = Pageable.UNKNOWN_NUMBER_OF_PAGES; mLastPage = Pageable.UNKNOWN_NUMBER_OF_PAGES; } }
Example 12
Source File: RasterPrinterJob.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
/** * Set the range of pages from a Book to be printed. * Both 'firstPage' and 'lastPage' are zero based * page indices. If either parameter is less than * zero then the page range is set to be from the * first page to the last. */ protected void setPageRange(int firstPage, int lastPage) { if(firstPage >= 0 && lastPage >= 0) { mFirstPage = firstPage; mLastPage = lastPage; if(mLastPage < mFirstPage) mLastPage = mFirstPage; } else { mFirstPage = Pageable.UNKNOWN_NUMBER_OF_PAGES; mLastPage = Pageable.UNKNOWN_NUMBER_OF_PAGES; } }
Example 13
Source File: RasterPrinterJob.java From Bytecoder with Apache License 2.0 | 5 votes |
/** * Set the range of pages from a Book to be printed. * Both 'firstPage' and 'lastPage' are zero based * page indices. If either parameter is less than * zero then the page range is set to be from the * first page to the last. */ protected void setPageRange(int firstPage, int lastPage) { if(firstPage >= 0 && lastPage >= 0) { mFirstPage = firstPage; mLastPage = lastPage; if(mLastPage < mFirstPage) mLastPage = mFirstPage; } else { mFirstPage = Pageable.UNKNOWN_NUMBER_OF_PAGES; mLastPage = Pageable.UNKNOWN_NUMBER_OF_PAGES; } }
Example 14
Source File: RasterPrinterJob.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
/** * Set the range of pages from a Book to be printed. * Both 'firstPage' and 'lastPage' are zero based * page indices. If either parameter is less than * zero then the page range is set to be from the * first page to the last. */ protected void setPageRange(int firstPage, int lastPage) { if(firstPage >= 0 && lastPage >= 0) { mFirstPage = firstPage; mLastPage = lastPage; if(mLastPage < mFirstPage) mLastPage = mFirstPage; } else { mFirstPage = Pageable.UNKNOWN_NUMBER_OF_PAGES; mLastPage = Pageable.UNKNOWN_NUMBER_OF_PAGES; } }
Example 15
Source File: RasterPrinterJob.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
/** * Set the range of pages from a Book to be printed. * Both 'firstPage' and 'lastPage' are zero based * page indices. If either parameter is less than * zero then the page range is set to be from the * first page to the last. */ protected void setPageRange(int firstPage, int lastPage) { if(firstPage >= 0 && lastPage >= 0) { mFirstPage = firstPage; mLastPage = lastPage; if(mLastPage < mFirstPage) mLastPage = mFirstPage; } else { mFirstPage = Pageable.UNKNOWN_NUMBER_OF_PAGES; mLastPage = Pageable.UNKNOWN_NUMBER_OF_PAGES; } }
Example 16
Source File: RasterPrinterJob.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
/** * Set the range of pages from a Book to be printed. * Both 'firstPage' and 'lastPage' are zero based * page indices. If either parameter is less than * zero then the page range is set to be from the * first page to the last. */ protected void setPageRange(int firstPage, int lastPage) { if(firstPage >= 0 && lastPage >= 0) { mFirstPage = firstPage; mLastPage = lastPage; if(mLastPage < mFirstPage) mLastPage = mFirstPage; } else { mFirstPage = Pageable.UNKNOWN_NUMBER_OF_PAGES; mLastPage = Pageable.UNKNOWN_NUMBER_OF_PAGES; } }
Example 17
Source File: RasterPrinterJob.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 5 votes |
/** * Set the range of pages from a Book to be printed. * Both 'firstPage' and 'lastPage' are zero based * page indices. If either parameter is less than * zero then the page range is set to be from the * first page to the last. */ protected void setPageRange(int firstPage, int lastPage) { if(firstPage >= 0 && lastPage >= 0) { mFirstPage = firstPage; mLastPage = lastPage; if(mLastPage < mFirstPage) mLastPage = mFirstPage; } else { mFirstPage = Pageable.UNKNOWN_NUMBER_OF_PAGES; mLastPage = Pageable.UNKNOWN_NUMBER_OF_PAGES; } }
Example 18
Source File: RasterPrinterJob.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
/** * Set the range of pages from a Book to be printed. * Both 'firstPage' and 'lastPage' are zero based * page indices. If either parameter is less than * zero then the page range is set to be from the * first page to the last. */ protected void setPageRange(int firstPage, int lastPage) { if(firstPage >= 0 && lastPage >= 0) { mFirstPage = firstPage; mLastPage = lastPage; if(mLastPage < mFirstPage) mLastPage = mFirstPage; } else { mFirstPage = Pageable.UNKNOWN_NUMBER_OF_PAGES; mLastPage = Pageable.UNKNOWN_NUMBER_OF_PAGES; } }
Example 19
Source File: RasterPrinterJob.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
/** * Set the range of pages from a Book to be printed. * Both 'firstPage' and 'lastPage' are zero based * page indices. If either parameter is less than * zero then the page range is set to be from the * first page to the last. */ protected void setPageRange(int firstPage, int lastPage) { if(firstPage >= 0 && lastPage >= 0) { mFirstPage = firstPage; mLastPage = lastPage; if(mLastPage < mFirstPage) mLastPage = mFirstPage; } else { mFirstPage = Pageable.UNKNOWN_NUMBER_OF_PAGES; mLastPage = Pageable.UNKNOWN_NUMBER_OF_PAGES; } }
Example 20
Source File: RasterPrinterJob.java From dragonwell8_jdk with GNU General Public License v2.0 | 5 votes |
/** * Set the range of pages from a Book to be printed. * Both 'firstPage' and 'lastPage' are zero based * page indices. If either parameter is less than * zero then the page range is set to be from the * first page to the last. */ protected void setPageRange(int firstPage, int lastPage) { if(firstPage >= 0 && lastPage >= 0) { mFirstPage = firstPage; mLastPage = lastPage; if(mLastPage < mFirstPage) mLastPage = mFirstPage; } else { mFirstPage = Pageable.UNKNOWN_NUMBER_OF_PAGES; mLastPage = Pageable.UNKNOWN_NUMBER_OF_PAGES; } }