/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
implements SunPrinterJobService {
Chromaticity.class,
Copies.class,
Fidelity.class,
JobName.class,
Media.class,
MediaPrintableArea.class,
OrientationRequested.class,
PageRanges.class,
RequestingUserName.class,
SheetCollate.class,
Sides.class,
};
};
super(out);
}
return PSStreamPrinterFactory.psMimeType;
}
return PSStreamPrinterFactory.getFlavors();
}
return new PSStreamPrintJob(this);
}
}
return "Postscript output";
}
public void addPrintServiceAttributeListener(
return;
}
public void removePrintServiceAttributeListener(
return;
}
public <T extends PrintServiceAttribute>
{
throw new NullPointerException("category");
}
throw new IllegalArgumentException("Not a PrintServiceAttribute");
}
if (category == ColorSupported.class) {
return (T)ColorSupported.SUPPORTED;
} else {
return null;
}
}
}
return true;
}
}
return false;
}
return cats;
}
public boolean
{
throw new NullPointerException("null category");
}
throw new IllegalArgumentException(category +
" is not an Attribute");
}
if (category == suppAttrCats[i]) {
return true;
}
}
return false;
}
public Object
{
throw new NullPointerException("null category");
}
throw new IllegalArgumentException(category +
" is not an Attribute");
}
if (!isAttributeCategorySupported(category)) {
return null;
}
return new Copies(1);
} else if (category == Chromaticity.class) {
return Chromaticity.COLOR;
return Fidelity.FIDELITY_FALSE;
if (defaultCountry != null &&
return MediaSizeName.NA_LETTER;
} else {
return MediaSizeName.ISO_A4;
}
} else if (category == MediaPrintableArea.class) {
if (defaultCountry != null &&
} else {
}
} else if (category == OrientationRequested.class) {
return OrientationRequested.PORTRAIT;
} else if (category == PageRanges.class) {
} else if (category == SheetCollate.class) {
return SheetCollate.UNCOLLATED;
} else
return null;
}
public Object
{
throw new NullPointerException("null category");
}
throw new IllegalArgumentException(category +
" does not implement Attribute");
}
throw new IllegalArgumentException(flavor +
" is an unsupported flavor");
}
if (!isAttributeCategorySupported(category)) {
return null;
}
if (category == Chromaticity.class) {
//arr[1] = Chromaticity.MONOCHROME;
return (arr);
} else if (category == RequestingUserName.class) {
} else if (category == OrientationRequested.class) {
return arr;
} else {
return null;
}
(category == CopiesSupported.class)) {
return arr;
return arr;
} else if (category == MediaPrintableArea.class) {
if (attributes == null) {
return null;
}
}
}
return null;
} else {
/* For dimensions >= 5 inches use 0.5 inch margins.
* For smaller dimensions, use 10% margins.
*/
float xmargin = 0.5f;
float ymargin = 0.5f;
if (w < 5f) {
xmargin = w/10;
}
if (h < 5f) {
ymargin = h/10;
}
w - 2*xmargin,
h - 2*ymargin,
return arr;
}
} else if (category == PageRanges.class) {
return arr;
} else {
return null;
}
} else if (category == SheetCollate.class) {
return arr;
} else {
return arr;
}
return arr;
} else {
return null;
}
} else {
return null;
}
}
}
return true;
}
}
return false;
}
throw new NullPointerException("null attribute");
}
throw new IllegalArgumentException(flavor +
" is an unsupported flavor");
}
if (!isAttributeCategorySupported(category)) {
return false;
}
}
attr instanceof MediaSizeName) {
return false;
}
return false;
}
return false;
}
return false;
}
}
return true;
}
"is not supported");
}
if (attributes == null) {
return null;
}
try {
attributes)) {
}
} catch (ClassCastException e) {
}
}
return null;
} else {
return unsupp;
}
}
return null;
}
return "PSStreamPrintService: " + getName();
}
/* Stream services have an output stream which cannot be shared,
* so two services are equal only if they are the same object.
*/
return (obj == this ||
(obj instanceof PSStreamPrintService &&
}
public int hashCode() {
}
}