author | serb |
Tue, 12 Nov 2013 20:24:25 +0400 | |
changeset 21596 | 0e3a39f29dbc |
parent 20413 | e991227dd068 |
permissions | -rw-r--r-- |
20413
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
1 |
/* |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
2 |
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
4 |
* |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
5 |
* This code is free software; you can redistribute it and/or modify it |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
21596 | 7 |
* published by the Free Software Foundation. |
20413
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
8 |
* |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
13 |
* accompanied this code). |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
14 |
* |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
15 |
* You should have received a copy of the GNU General Public License version |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
18 |
* |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
20 |
* or visit www.oracle.com if you need additional information or have any |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
21 |
* questions. |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
22 |
*/ |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
23 |
|
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
24 |
import java.util.HashMap; |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
25 |
import java.util.HashSet; |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
26 |
import java.util.Map; |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
27 |
import java.util.Set; |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
28 |
|
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
29 |
import javax.print.DocFlavor; |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
30 |
import javax.print.DocPrintJob; |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
31 |
import javax.print.PrintService; |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
32 |
import javax.print.ServiceUIFactory; |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
33 |
import javax.print.attribute.Attribute; |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
34 |
import javax.print.attribute.AttributeSet; |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
35 |
import javax.print.attribute.HashPrintServiceAttributeSet; |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
36 |
import javax.print.attribute.PrintServiceAttribute; |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
37 |
import javax.print.attribute.PrintServiceAttributeSet; |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
38 |
import javax.print.attribute.standard.Media; |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
39 |
import javax.print.attribute.standard.MediaSizeName; |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
40 |
import javax.print.attribute.standard.PrinterInfo; |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
41 |
import javax.print.attribute.standard.PrinterIsAcceptingJobs; |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
42 |
import javax.print.attribute.standard.PrinterMakeAndModel; |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
43 |
import javax.print.attribute.standard.PrinterName; |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
44 |
import javax.print.attribute.standard.PrinterState; |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
45 |
import javax.print.event.PrintServiceAttributeListener; |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
46 |
|
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
47 |
/** |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
48 |
* Stub implementation of a custom {@link PrintService}. |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
49 |
* |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
50 |
* @author reinhapa |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
51 |
*/ |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
52 |
public class PrintServiceStub implements PrintService { |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
53 |
private final String _name; |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
54 |
private final Set<DocFlavor> _flavors; |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
55 |
private final Map<Class<?>, Object> _attributes; |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
56 |
|
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
57 |
public PrintServiceStub(String name) { |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
58 |
_name = name; |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
59 |
_flavors = new HashSet<DocFlavor>(); |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
60 |
_flavors.add(DocFlavor.SERVICE_FORMATTED.PAGEABLE); |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
61 |
_flavors.add(DocFlavor.SERVICE_FORMATTED.PRINTABLE); |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
62 |
_attributes = new HashMap<>(); |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
63 |
_attributes.put(PrinterName.class, new PrinterName(name, null)); |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
64 |
_attributes.put(PrinterState.class, PrinterState.IDLE); |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
65 |
_attributes.put(PrinterInfo.class, new PrinterInfo("Custom location", |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
66 |
null)); |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
67 |
_attributes.put(PrinterIsAcceptingJobs.class, |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
68 |
PrinterIsAcceptingJobs.ACCEPTING_JOBS); |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
69 |
_attributes.put(PrinterMakeAndModel.class, new PrinterMakeAndModel( |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
70 |
"Custom printer", null)); |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
71 |
_attributes.put(Media.class, new Media[] { MediaSizeName.ISO_A4 }); |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
72 |
} |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
73 |
|
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
74 |
@Override |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
75 |
public String getName() { |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
76 |
return _name; |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
77 |
} |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
78 |
|
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
79 |
@Override |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
80 |
public boolean isDocFlavorSupported(DocFlavor flavor) { |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
81 |
return _flavors.contains(flavor); |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
82 |
} |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
83 |
|
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
84 |
@Override |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
85 |
public Object getSupportedAttributeValues( |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
86 |
Class<? extends Attribute> category, DocFlavor flavor, |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
87 |
AttributeSet attributes) { |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
88 |
return _attributes.get(category); |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
89 |
} |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
90 |
|
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
91 |
@Override |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
92 |
public boolean isAttributeCategorySupported( |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
93 |
Class<? extends Attribute> category) { |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
94 |
return _attributes.containsKey(category); |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
95 |
} |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
96 |
|
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
97 |
@Override |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
98 |
public <T extends PrintServiceAttribute> T getAttribute(Class<T> category) { |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
99 |
return category.cast(_attributes.get(category)); |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
100 |
} |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
101 |
|
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
102 |
@Override |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
103 |
public PrintServiceAttributeSet getAttributes() { |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
104 |
return new HashPrintServiceAttributeSet(_attributes.values().toArray( |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
105 |
new PrintServiceAttribute[_attributes.size()])); |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
106 |
} |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
107 |
|
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
108 |
@Override |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
109 |
public DocFlavor[] getSupportedDocFlavors() { |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
110 |
return _flavors.toArray(new DocFlavor[_flavors.size()]); |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
111 |
} |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
112 |
|
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
113 |
// not implemented methods |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
114 |
|
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
115 |
@Override |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
116 |
public DocPrintJob createPrintJob() { |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
117 |
return null; |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
118 |
} |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
119 |
|
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
120 |
@Override |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
121 |
public void addPrintServiceAttributeListener( |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
122 |
PrintServiceAttributeListener listener) { |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
123 |
|
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
124 |
} |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
125 |
|
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
126 |
@Override |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
127 |
public void removePrintServiceAttributeListener( |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
128 |
PrintServiceAttributeListener listener) { |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
129 |
|
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
130 |
} |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
131 |
|
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
132 |
@Override |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
133 |
public Class<?>[] getSupportedAttributeCategories() { |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
134 |
return null; |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
135 |
} |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
136 |
|
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
137 |
@Override |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
138 |
public Object getDefaultAttributeValue(Class<? extends Attribute> category) { |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
139 |
return null; |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
140 |
} |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
141 |
|
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
142 |
@Override |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
143 |
public boolean isAttributeValueSupported(Attribute attrval, |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
144 |
DocFlavor flavor, AttributeSet attributes) { |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
145 |
return false; |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
146 |
} |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
147 |
|
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
148 |
@Override |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
149 |
public AttributeSet getUnsupportedAttributes(DocFlavor flavor, |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
150 |
AttributeSet attributes) { |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
151 |
return null; |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
152 |
} |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
153 |
|
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
154 |
@Override |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
155 |
public ServiceUIFactory getServiceUIFactory() { |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
156 |
return null; |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
157 |
} |
e991227dd068
6870661: Setting a custom PrintService on a PrinterJob leads to a PrinterException
jgodinez
parents:
diff
changeset
|
158 |
} |