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
310 * javax.print.attribute.standard javax.print.attribute.standard}
311 * describes how each attribute indicates its supported values. Possible
312 * ways of indicating support include:
313 * <UL>
314 * <LI>
315 * Return a single instance of the attribute category to indicate that any
316 * value is legal -- used, for example, by an attribute whose value is an
317 * arbitrary text string. (The value of the returned attribute object is
318 * irrelevant.)
319 * <LI>
320 * Return an array of one or more instances of the attribute category,
321 * containing the legal values -- used, for example, by an attribute with
322 * a list of enumerated values. The type of the array is an array of the
323 * specified attribute category type as returned by its
324 * <code>getCategory(Class)</code>.
325 * <LI>
326 * Return a single object (of some class other than the attribute category)
327 * that indicates bounds on the legal values -- used, for example, by an
328 * integer-valued attribute that must lie within a certain range.
329 * </UL>
330 * <P>
331 *
332 * @param category Printing attribute category to test. It must be a
333 * {@link java.lang.Class Class} that implements
334 * interface {@link
335 * javax.print.attribute.Attribute Attribute}.
336 * @param flavor Doc flavor for a supposed job, or null.
337 * @param attributes Set of printing attributes for a supposed job
338 * (both job-level attributes and document-level
339 * attributes), or null.
340 *
341 * @return Object indicating supported values for <CODE>category</CODE>,
342 * or null if this Print Service does not support specifying a
343 * doc-level or job-level attribute in <CODE>category</CODE> in
344 * a Print Request.
345 *
346 * @exception NullPointerException
347 * (unchecked exception) Thrown if <CODE>category</CODE> is null.
348 * @exception IllegalArgumentException
349 * (unchecked exception) Thrown if <CODE>category</CODE> is not a
350 * {@link java.lang.Class Class} that implements interface {@link
|
1 /*
2 * Copyright (c) 2000, 2014, 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
310 * javax.print.attribute.standard javax.print.attribute.standard}
311 * describes how each attribute indicates its supported values. Possible
312 * ways of indicating support include:
313 * <UL>
314 * <LI>
315 * Return a single instance of the attribute category to indicate that any
316 * value is legal -- used, for example, by an attribute whose value is an
317 * arbitrary text string. (The value of the returned attribute object is
318 * irrelevant.)
319 * <LI>
320 * Return an array of one or more instances of the attribute category,
321 * containing the legal values -- used, for example, by an attribute with
322 * a list of enumerated values. The type of the array is an array of the
323 * specified attribute category type as returned by its
324 * <code>getCategory(Class)</code>.
325 * <LI>
326 * Return a single object (of some class other than the attribute category)
327 * that indicates bounds on the legal values -- used, for example, by an
328 * integer-valued attribute that must lie within a certain range.
329 * </UL>
330 *
331 * @param category Printing attribute category to test. It must be a
332 * {@link java.lang.Class Class} that implements
333 * interface {@link
334 * javax.print.attribute.Attribute Attribute}.
335 * @param flavor Doc flavor for a supposed job, or null.
336 * @param attributes Set of printing attributes for a supposed job
337 * (both job-level attributes and document-level
338 * attributes), or null.
339 *
340 * @return Object indicating supported values for <CODE>category</CODE>,
341 * or null if this Print Service does not support specifying a
342 * doc-level or job-level attribute in <CODE>category</CODE> in
343 * a Print Request.
344 *
345 * @exception NullPointerException
346 * (unchecked exception) Thrown if <CODE>category</CODE> is null.
347 * @exception IllegalArgumentException
348 * (unchecked exception) Thrown if <CODE>category</CODE> is not a
349 * {@link java.lang.Class Class} that implements interface {@link
|