PrintJobAttributeException.java revision 0
5269N/A/*
5269N/A * Copyright 2000 Sun Microsystems, Inc. All Rights Reserved.
5269N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5269N/A *
5269N/A * This code is free software; you can redistribute it and/or modify it
5269N/A * under the terms of the GNU General Public License version 2 only, as
5269N/A * published by the Free Software Foundation. Sun designates this
5269N/A * particular file as subject to the "Classpath" exception as provided
5269N/A * by Sun in the LICENSE file that accompanied this code.
5269N/A *
5269N/A * This code is distributed in the hope that it will be useful, but WITHOUT
5269N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
5269N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
5269N/A * version 2 for more details (a copy is included in the LICENSE file that
5269N/A * accompanied this code).
5269N/A *
5269N/A * You should have received a copy of the GNU General Public License version
5269N/A * 2 along with this work; if not, write to the Free Software Foundation,
5269N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
5269N/A *
5269N/A * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
5269N/A * CA 95054 USA or visit www.sun.com if you need additional information or
5269N/A * have any questions.
5269N/A */
5269N/A
5269N/Apackage sun.print;
5269N/A
5269N/Aimport javax.print.DocFlavor;
5269N/Aimport javax.print.AttributeException;
5269N/Aimport javax.print.PrintException;
5269N/Aimport javax.print.attribute.Attribute;
5269N/A
5269N/Aclass PrintJobAttributeException extends PrintException
5269N/A implements AttributeException {
5269N/A
5269N/A private Attribute attr;
5269N/A private Class category;
5269N/A
5269N/A PrintJobAttributeException(String s, Class cat, Attribute attrval) {
5269N/A super(s);
5269N/A attr = attrval;
5269N/A category = cat;
5269N/A }
5269N/A
5269N/A public Class[] getUnsupportedAttributes() {
5269N/A if (category == null) {
5269N/A return null;
5269N/A } else {
5269N/A Class [] cats = { category};
5269N/A return cats;
5269N/A }
5269N/A }
5269N/A
5269N/A public Attribute[] getUnsupportedValues() {
5269N/A if (attr == null) {
5269N/A return null;
5269N/A } else {
5269N/A Attribute [] attrs = { attr};
5269N/A return attrs;
5269N/A }
5269N/A }
5269N/A}
5269N/A