< prev index next >

src/java.desktop/share/classes/java/awt/PageAttributes.java

Print this page

        

*** 940,950 **** * @param printQuality PrintQualityType.DRAFT, PrintQualityType.NORMAL, * or PrintQualityType.HIGH * @param printerResolution an integer array of 3 elements. The first * element must be greater than 0. The second element must be * must be greater than 0. The third element must be either ! * <code>3</code> or <code>4</code>. * @throws IllegalArgumentException if one or more of the above * conditions is violated. */ public PageAttributes(ColorType color, MediaType media, OrientationRequestedType orientationRequested, --- 940,950 ---- * @param printQuality PrintQualityType.DRAFT, PrintQualityType.NORMAL, * or PrintQualityType.HIGH * @param printerResolution an integer array of 3 elements. The first * element must be greater than 0. The second element must be * must be greater than 0. The third element must be either ! * {@code 3} or {@code 4}. * @throws IllegalArgumentException if one or more of the above * conditions is violated. */ public PageAttributes(ColorType color, MediaType media, OrientationRequestedType orientationRequested,
*** 1093,1110 **** this.orientationRequested = orientationRequested; } /** * Specifies the print orientation for pages using these attributes. ! * Specifying <code>3</code> denotes portrait. Specifying <code>4</code> * denotes landscape. Specifying any other value will generate an * IllegalArgumentException. Not specifying the property is equivalent * to calling setOrientationRequested(OrientationRequestedType.PORTRAIT). * ! * @param orientationRequested <code>3</code> or <code>4</code> * @throws IllegalArgumentException if orientationRequested is not ! * <code>3</code> or <code>4</code> */ public void setOrientationRequested(int orientationRequested) { switch (orientationRequested) { case 3: setOrientationRequested(OrientationRequestedType.PORTRAIT); --- 1093,1110 ---- this.orientationRequested = orientationRequested; } /** * Specifies the print orientation for pages using these attributes. ! * Specifying {@code 3} denotes portrait. Specifying {@code 4} * denotes landscape. Specifying any other value will generate an * IllegalArgumentException. Not specifying the property is equivalent * to calling setOrientationRequested(OrientationRequestedType.PORTRAIT). * ! * @param orientationRequested {@code 3} or {@code 4} * @throws IllegalArgumentException if orientationRequested is not ! * {@code 3} or {@code 4} */ public void setOrientationRequested(int orientationRequested) { switch (orientationRequested) { case 3: setOrientationRequested(OrientationRequestedType.PORTRAIT);
*** 1187,1205 **** this.printQuality = printQuality; } /** * Specifies the print quality for pages using these attributes. ! * Specifying <code>3</code> denotes draft. Specifying <code>4</code> ! * denotes normal. Specifying <code>5</code> denotes high. Specifying * any other value will generate an IllegalArgumentException. Not * specifying the property is equivalent to calling * setPrintQuality(PrintQualityType.NORMAL). * ! * @param printQuality <code>3</code>, <code>4</code>, or <code>5</code> ! * @throws IllegalArgumentException if printQuality is not <code>3 ! * </code>, <code>4</code>, or <code>5</code> */ public void setPrintQuality(int printQuality) { switch (printQuality) { case 3: setPrintQuality(PrintQualityType.DRAFT); --- 1187,1205 ---- this.printQuality = printQuality; } /** * Specifies the print quality for pages using these attributes. ! * Specifying {@code 3} denotes draft. Specifying {@code 4} ! * denotes normal. Specifying {@code 5} denotes high. Specifying * any other value will generate an IllegalArgumentException. Not * specifying the property is equivalent to calling * setPrintQuality(PrintQualityType.NORMAL). * ! * @param printQuality {@code 3}, {@code 4}, or {@code 5} ! * @throws IllegalArgumentException if printQuality is not ! * {@code 3}, {@code 4}, or {@code 5} */ public void setPrintQuality(int printQuality) { switch (printQuality) { case 3: setPrintQuality(PrintQualityType.DRAFT);
*** 1229,1245 **** * Returns the print resolution for pages using these attributes. * Index 0 of the array specifies the cross feed direction resolution * (typically the horizontal resolution). Index 1 of the array specifies * the feed direction resolution (typically the vertical resolution). * Index 2 of the array specifies whether the resolutions are in dots per ! * inch or dots per centimeter. <code>3</code> denotes dots per inch. ! * <code>4</code> denotes dots per centimeter. * * @return an integer array of 3 elements. The first * element must be greater than 0. The second element must be * must be greater than 0. The third element must be either ! * <code>3</code> or <code>4</code>. */ public int[] getPrinterResolution() { // Return a copy because otherwise client code could circumvent the // the checks made in setPrinterResolution by modifying the // returned array. --- 1229,1245 ---- * Returns the print resolution for pages using these attributes. * Index 0 of the array specifies the cross feed direction resolution * (typically the horizontal resolution). Index 1 of the array specifies * the feed direction resolution (typically the vertical resolution). * Index 2 of the array specifies whether the resolutions are in dots per ! * inch or dots per centimeter. {@code 3} denotes dots per inch. ! * {@code 4} denotes dots per centimeter. * * @return an integer array of 3 elements. The first * element must be greater than 0. The second element must be * must be greater than 0. The third element must be either ! * {@code 3} or {@code 4}. */ public int[] getPrinterResolution() { // Return a copy because otherwise client code could circumvent the // the checks made in setPrinterResolution by modifying the // returned array.
*** 1256,1275 **** * implementation and the target printer. Index 0 of the array specifies * the cross feed direction resolution (typically the horizontal * resolution). Index 1 of the array specifies the feed direction * resolution (typically the vertical resolution). Index 2 of the array * specifies whether the resolutions are in dots per inch or dots per ! * centimeter. <code>3</code> denotes dots per inch. <code>4</code> * denotes dots per centimeter. Note that the 1.1 printing implementation * (Toolkit.getPrintJob) requires that the feed and cross feed resolutions * be the same. Not specifying the property is equivalent to calling * setPrinterResolution(72). * * @param printerResolution an integer array of 3 elements. The first * element must be greater than 0. The second element must be * must be greater than 0. The third element must be either ! * <code>3</code> or <code>4</code>. * @throws IllegalArgumentException if one or more of the above * conditions is violated. */ public void setPrinterResolution(int[] printerResolution) { if (printerResolution == null || --- 1256,1275 ---- * implementation and the target printer. Index 0 of the array specifies * the cross feed direction resolution (typically the horizontal * resolution). Index 1 of the array specifies the feed direction * resolution (typically the vertical resolution). Index 2 of the array * specifies whether the resolutions are in dots per inch or dots per ! * centimeter. {@code 3} denotes dots per inch. {@code 4} * denotes dots per centimeter. Note that the 1.1 printing implementation * (Toolkit.getPrintJob) requires that the feed and cross feed resolutions * be the same. Not specifying the property is equivalent to calling * setPrinterResolution(72). * * @param printerResolution an integer array of 3 elements. The first * element must be greater than 0. The second element must be * must be greater than 0. The third element must be either ! * {@code 3} or {@code 4}. * @throws IllegalArgumentException if one or more of the above * conditions is violated. */ public void setPrinterResolution(int[] printerResolution) { if (printerResolution == null ||
*** 1293,1303 **** /** * Specifies the desired cross feed and feed print resolutions in dots per * inch for pages using these attributes. The same value is used for both * resolutions. The actual resolutions will be determined by the * limitations of the implementation and the target printer. Not ! * specifying the property is equivalent to specifying <code>72</code>. * * @param printerResolution an integer greater than 0. * @throws IllegalArgumentException if printerResolution is less than or * equal to 0. */ --- 1293,1303 ---- /** * Specifies the desired cross feed and feed print resolutions in dots per * inch for pages using these attributes. The same value is used for both * resolutions. The actual resolutions will be determined by the * limitations of the implementation and the target printer. Not ! * specifying the property is equivalent to specifying {@code 72}. * * @param printerResolution an integer greater than 0. * @throws IllegalArgumentException if printerResolution is less than or * equal to 0. */
< prev index next >