src/share/classes/javax/print/attribute/PrintRequestAttributeSet.java

Print this page


   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
  23  * questions.
  24  */
  25 
  26 
  27 package javax.print.attribute;
  28 
  29 /**
  30  * Interface PrintRequestAttributeSet specifies the interface for a set of
  31  * print request attributes, i.e. printing attributes that implement interface
  32  * {@link PrintRequestAttribute PrintRequestAttribute}.
  33  * The client uses a PrintRequestAttributeSet to specify the settings to be
  34  * applied to a whole print job and to all the docs in the print job.
  35  * <P>
  36  * PrintRequestAttributeSet is just an {@link AttributeSet AttributeSet} whose
  37  * constructors and mutating operations guarantee an additional invariant,
  38  * namely that all attribute values in the PrintRequestAttributeSet must be
  39  * instances of interface {@link PrintRequestAttribute PrintRequestAttribute}.
  40  * The {@link #add(Attribute) add(Attribute)}, and
  41  * {@link #addAll(AttributeSet) addAll(AttributeSet)} operations
  42  * are respecified below to guarantee this additional invariant.
  43  * <P>
  44  *
  45  * @author  Alan Kaminsky
  46  */
  47 public interface PrintRequestAttributeSet extends AttributeSet {
  48 
  49     /**
  50      * Adds the specified attribute value to this attribute set if it is not
  51      * already present, first removing any existing value in the same
  52      * attribute category as the specified attribute value (optional
  53      * operation).
  54      *
  55      * @param  attribute  Attribute value to be added to this attribute set.
  56      *
  57      * @return  <tt>true</tt> if this attribute set changed as a result of
  58      *          the call, i.e., the given attribute value was not already a
  59      *          member of this attribute set.
  60      *
  61      * @throws  UnmodifiableSetException
  62      *     (unchecked exception) Thrown if this attribute set does not
  63      *     support the <CODE>add()</CODE> operation.


   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
  23  * questions.
  24  */
  25 
  26 
  27 package javax.print.attribute;
  28 
  29 /**
  30  * Interface PrintRequestAttributeSet specifies the interface for a set of
  31  * print request attributes, i.e. printing attributes that implement interface
  32  * {@link PrintRequestAttribute PrintRequestAttribute}.
  33  * The client uses a PrintRequestAttributeSet to specify the settings to be
  34  * applied to a whole print job and to all the docs in the print job.
  35  * <P>
  36  * PrintRequestAttributeSet is just an {@link AttributeSet AttributeSet} whose
  37  * constructors and mutating operations guarantee an additional invariant,
  38  * namely that all attribute values in the PrintRequestAttributeSet must be
  39  * instances of interface {@link PrintRequestAttribute PrintRequestAttribute}.
  40  * The {@link #add(Attribute) add(Attribute)}, and
  41  * {@link #addAll(AttributeSet) addAll(AttributeSet)} operations
  42  * are respecified below to guarantee this additional invariant.

  43  *
  44  * @author  Alan Kaminsky
  45  */
  46 public interface PrintRequestAttributeSet extends AttributeSet {
  47 
  48     /**
  49      * Adds the specified attribute value to this attribute set if it is not
  50      * already present, first removing any existing value in the same
  51      * attribute category as the specified attribute value (optional
  52      * operation).
  53      *
  54      * @param  attribute  Attribute value to be added to this attribute set.
  55      *
  56      * @return  <tt>true</tt> if this attribute set changed as a result of
  57      *          the call, i.e., the given attribute value was not already a
  58      *          member of this attribute set.
  59      *
  60      * @throws  UnmodifiableSetException
  61      *     (unchecked exception) Thrown if this attribute set does not
  62      *     support the <CODE>add()</CODE> operation.