1 /*
2 * Copyright (c) 2000, 2005, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
34 import java.awt.Point;
35 import java.awt.Rectangle;
36 import java.awt.Window;
37 import java.awt.KeyboardFocusManager;
38 import javax.print.attribute.Attribute;
39 import javax.print.attribute.AttributeSet;
40 import javax.print.attribute.PrintRequestAttributeSet;
41 import javax.print.attribute.standard.Destination;
42 import javax.print.attribute.standard.Fidelity;
43
44 import sun.print.ServiceDialog;
45 import sun.print.SunAlternateMedia;
46
47 /** This class is a collection of UI convenience methods which provide a
48 * graphical user dialog for browsing print services looked up through the Java
49 * Print Service API.
50 * <p>
51 * The dialogs follow a standard pattern of acting as a continue/cancel option
52 *for a user as well as allowing the user to select the print service to use
53 *and specify choices such as paper size and number of copies.
54 * <p>
55 * <p>
56 * The dialogs are designed to work with pluggable print services though the
57 * public APIs of those print services.
58 * <p>
59 * If a print service provides any vendor extensions these may be made
60 * accessible to the user through a vendor supplied tab panel Component.
61 * Such a vendor extension is encouraged to use Swing! and to support its
62 * accessibility APIs.
63 * The vendor extensions should return the settings as part of the
64 * AttributeSet.
65 * Applications which want to preserve the user settings should use those
66 * settings to specify the print job.
67 * Note that this class is not referenced by any other part of the Java
68 * Print Service and may not be included in profiles which cannot depend
69 * on the presence of the AWT packages.
70 */
71
72 public class ServiceUI {
73
74
|
1 /*
2 * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
34 import java.awt.Point;
35 import java.awt.Rectangle;
36 import java.awt.Window;
37 import java.awt.KeyboardFocusManager;
38 import javax.print.attribute.Attribute;
39 import javax.print.attribute.AttributeSet;
40 import javax.print.attribute.PrintRequestAttributeSet;
41 import javax.print.attribute.standard.Destination;
42 import javax.print.attribute.standard.Fidelity;
43
44 import sun.print.ServiceDialog;
45 import sun.print.SunAlternateMedia;
46
47 /** This class is a collection of UI convenience methods which provide a
48 * graphical user dialog for browsing print services looked up through the Java
49 * Print Service API.
50 * <p>
51 * The dialogs follow a standard pattern of acting as a continue/cancel option
52 *for a user as well as allowing the user to select the print service to use
53 *and specify choices such as paper size and number of copies.
54 * <p>
55 * The dialogs are designed to work with pluggable print services though the
56 * public APIs of those print services.
57 * <p>
58 * If a print service provides any vendor extensions these may be made
59 * accessible to the user through a vendor supplied tab panel Component.
60 * Such a vendor extension is encouraged to use Swing! and to support its
61 * accessibility APIs.
62 * The vendor extensions should return the settings as part of the
63 * AttributeSet.
64 * Applications which want to preserve the user settings should use those
65 * settings to specify the print job.
66 * Note that this class is not referenced by any other part of the Java
67 * Print Service and may not be included in profiles which cannot depend
68 * on the presence of the AWT packages.
69 */
70
71 public class ServiceUI {
72
73
|