114 * default for that service is used as the new value to be copied.
115 * <p>
116 * If the user cancels the dialog, the returned attributes will not reflect
117 * any changes made by the user.
118 *
119 * A typical basic usage of this method may be :
120 * <pre>{@code
121 * PrintService[] services = PrintServiceLookup.lookupPrintServices(
122 * DocFlavor.INPUT_STREAM.JPEG, null);
123 * PrintRequestAttributeSet attributes = new HashPrintRequestAttributeSet();
124 * if (services.length > 0) {
125 * PrintService service = ServiceUI.printDialog(null, 50, 50,
126 * services, services[0],
127 * null,
128 * attributes);
129 * if (service != null) {
130 * ... print ...
131 * }
132 * }
133 * }</pre>
134 * <p>
135
136 * @param gc used to select screen. null means primary or default screen.
137 * @param x location of dialog including border in screen coordinates
138 * @param y location of dialog including border in screen coordinates
139 * @param services to be browsable, must be non-null.
140 * @param defaultService - initial PrintService to display.
141 * @param flavor - the flavor to be printed, or null.
142 * @param attributes on input is the initial application supplied
143 * preferences. This cannot be null but may be empty.
144 * On output the attributes reflect changes made by the user.
145 * @return print service selected by the user, or null if the user
146 * cancelled the dialog.
147 * @throws HeadlessException if GraphicsEnvironment.isHeadless()
148 * returns true.
149 * @throws IllegalArgumentException if services is null or empty,
150 * or attributes is null, or the initial PrintService is not in the
151 * list of browsable services.
152 */
153 public static PrintService printDialog(GraphicsConfiguration gc,
154 int x, int y,
155 PrintService[] services,
|
114 * default for that service is used as the new value to be copied.
115 * <p>
116 * If the user cancels the dialog, the returned attributes will not reflect
117 * any changes made by the user.
118 *
119 * A typical basic usage of this method may be :
120 * <pre>{@code
121 * PrintService[] services = PrintServiceLookup.lookupPrintServices(
122 * DocFlavor.INPUT_STREAM.JPEG, null);
123 * PrintRequestAttributeSet attributes = new HashPrintRequestAttributeSet();
124 * if (services.length > 0) {
125 * PrintService service = ServiceUI.printDialog(null, 50, 50,
126 * services, services[0],
127 * null,
128 * attributes);
129 * if (service != null) {
130 * ... print ...
131 * }
132 * }
133 * }</pre>
134 *
135 * @param gc used to select screen. null means primary or default screen.
136 * @param x location of dialog including border in screen coordinates
137 * @param y location of dialog including border in screen coordinates
138 * @param services to be browsable, must be non-null.
139 * @param defaultService - initial PrintService to display.
140 * @param flavor - the flavor to be printed, or null.
141 * @param attributes on input is the initial application supplied
142 * preferences. This cannot be null but may be empty.
143 * On output the attributes reflect changes made by the user.
144 * @return print service selected by the user, or null if the user
145 * cancelled the dialog.
146 * @throws HeadlessException if GraphicsEnvironment.isHeadless()
147 * returns true.
148 * @throws IllegalArgumentException if services is null or empty,
149 * or attributes is null, or the initial PrintService is not in the
150 * list of browsable services.
151 */
152 public static PrintService printDialog(GraphicsConfiguration gc,
153 int x, int y,
154 PrintService[] services,
|