equal
deleted
inserted
replaced
118 protected static final int STREAM = 2; |
118 protected static final int STREAM = 2; |
119 |
119 |
120 /** |
120 /** |
121 * Pageable MAX pages |
121 * Pageable MAX pages |
122 */ |
122 */ |
123 private static final int MAX_UNKNOWN_PAGES = 9999; |
123 protected static final int MAX_UNKNOWN_PAGES = 9999; |
124 |
124 |
125 private static final int PD_ALLPAGES = 0x00000000; |
125 protected static final int PD_ALLPAGES = 0x00000000; |
126 private static final int PD_SELECTION = 0x00000001; |
126 protected static final int PD_SELECTION = 0x00000001; |
127 private static final int PD_PAGENUMS = 0x00000002; |
127 protected static final int PD_PAGENUMS = 0x00000002; |
128 private static final int PD_NOSELECTION = 0x00000004; |
128 protected static final int PD_NOSELECTION = 0x00000004; |
129 |
129 |
130 /** |
130 /** |
131 * Maximum amount of memory in bytes to use for the |
131 * Maximum amount of memory in bytes to use for the |
132 * buffered image "band". 4Mb is a compromise between |
132 * buffered image "band". 4Mb is a compromise between |
133 * limiting the number of bands on hi-res printers and |
133 * limiting the number of bands on hi-res printers and |
1778 */ |
1778 */ |
1779 protected boolean isCollated() { |
1779 protected boolean isCollated() { |
1780 return mCollate; |
1780 return mCollate; |
1781 } |
1781 } |
1782 |
1782 |
1783 private final int getSelectAttrib() { |
1783 protected final int getSelectAttrib() { |
1784 if (attributes != null) { |
1784 if (attributes != null) { |
1785 SunPageSelection pages = |
1785 SunPageSelection pages = |
1786 (SunPageSelection)attributes.get(SunPageSelection.class); |
1786 (SunPageSelection)attributes.get(SunPageSelection.class); |
1787 if (pages == SunPageSelection.RANGE) { |
1787 if (pages == SunPageSelection.RANGE) { |
1788 return PD_PAGENUMS; |
1788 return PD_PAGENUMS; |
1794 } |
1794 } |
1795 return PD_NOSELECTION; |
1795 return PD_NOSELECTION; |
1796 } |
1796 } |
1797 |
1797 |
1798 //returns 1-based index for "From" page |
1798 //returns 1-based index for "From" page |
1799 private final int getFromPageAttrib() { |
1799 protected final int getFromPageAttrib() { |
1800 if (attributes != null) { |
1800 if (attributes != null) { |
1801 PageRanges pageRangesAttr = |
1801 PageRanges pageRangesAttr = |
1802 (PageRanges)attributes.get(PageRanges.class); |
1802 (PageRanges)attributes.get(PageRanges.class); |
1803 if (pageRangesAttr != null) { |
1803 if (pageRangesAttr != null) { |
1804 int[][] range = pageRangesAttr.getMembers(); |
1804 int[][] range = pageRangesAttr.getMembers(); |
1807 } |
1807 } |
1808 return getMinPageAttrib(); |
1808 return getMinPageAttrib(); |
1809 } |
1809 } |
1810 |
1810 |
1811 //returns 1-based index for "To" page |
1811 //returns 1-based index for "To" page |
1812 private final int getToPageAttrib() { |
1812 protected final int getToPageAttrib() { |
1813 if (attributes != null) { |
1813 if (attributes != null) { |
1814 PageRanges pageRangesAttr = |
1814 PageRanges pageRangesAttr = |
1815 (PageRanges)attributes.get(PageRanges.class); |
1815 (PageRanges)attributes.get(PageRanges.class); |
1816 if (pageRangesAttr != null) { |
1816 if (pageRangesAttr != null) { |
1817 int[][] range = pageRangesAttr.getMembers(); |
1817 int[][] range = pageRangesAttr.getMembers(); |
1819 } |
1819 } |
1820 } |
1820 } |
1821 return getMaxPageAttrib(); |
1821 return getMaxPageAttrib(); |
1822 } |
1822 } |
1823 |
1823 |
1824 private final int getMinPageAttrib() { |
1824 protected final int getMinPageAttrib() { |
1825 if (attributes != null) { |
1825 if (attributes != null) { |
1826 SunMinMaxPage s = |
1826 SunMinMaxPage s = |
1827 (SunMinMaxPage)attributes.get(SunMinMaxPage.class); |
1827 (SunMinMaxPage)attributes.get(SunMinMaxPage.class); |
1828 if (s != null) { |
1828 if (s != null) { |
1829 return s.getMin(); |
1829 return s.getMin(); |
1830 } |
1830 } |
1831 } |
1831 } |
1832 return 1; |
1832 return 1; |
1833 } |
1833 } |
1834 |
1834 |
1835 private final int getMaxPageAttrib() { |
1835 protected final int getMaxPageAttrib() { |
1836 if (attributes != null) { |
1836 if (attributes != null) { |
1837 SunMinMaxPage s = |
1837 SunMinMaxPage s = |
1838 (SunMinMaxPage)attributes.get(SunMinMaxPage.class); |
1838 (SunMinMaxPage)attributes.get(SunMinMaxPage.class); |
1839 if (s != null) { |
1839 if (s != null) { |
1840 return s.getMax(); |
1840 return s.getMax(); |