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

Print this page




  25 
  26 
  27 package javax.print.attribute;
  28 
  29 /**
  30  * Interface PrintServiceAttributeSet specifies the interface for a set of
  31  * print job attributes, i.e. printing attributes that implement interface
  32  * {@link
  33  * PrintServiceAttribute PrintServiceAttribute}. In the Print Service API,
  34  * the Print Service instance uses a PrintServiceAttributeSet to report the
  35  * status of the print service.
  36  * <P>
  37  * A PrintServiceAttributeSet is just an {@link AttributeSet AttributeSet}
  38  * whose constructors and mutating operations guarantee an additional
  39  * invariant,
  40  * namely that all attribute values in the PrintServiceAttributeSet must be
  41  * instances of interface {@link PrintServiceAttribute PrintServiceAttribute}.
  42  * The {@link #add(Attribute) add(Attribute)}, and
  43  * {@link #addAll(AttributeSet) addAll(AttributeSet)} operations
  44  * are respecified below to guarantee this additional invariant.
  45  * <P>
  46  *
  47  * @author  Alan Kaminsky
  48  */
  49 public interface PrintServiceAttributeSet extends AttributeSet {
  50 
  51 
  52 
  53     /**
  54      * Adds the specified attribute value to this attribute set if it is not
  55      * already present, first removing any existing value in the same
  56      * attribute category as the specified attribute value (optional
  57      * operation).
  58      *
  59      * @param  attribute  Attribute value to be added to this attribute set.
  60      *
  61      * @return  <tt>true</tt> if this attribute set changed as a result of
  62      *          the call, i.e., the given attribute value was not already a
  63      *          member of this attribute set.
  64      *
  65      * @throws  UnmodifiableSetException




  25 
  26 
  27 package javax.print.attribute;
  28 
  29 /**
  30  * Interface PrintServiceAttributeSet specifies the interface for a set of
  31  * print job attributes, i.e. printing attributes that implement interface
  32  * {@link
  33  * PrintServiceAttribute PrintServiceAttribute}. In the Print Service API,
  34  * the Print Service instance uses a PrintServiceAttributeSet to report the
  35  * status of the print service.
  36  * <P>
  37  * A PrintServiceAttributeSet is just an {@link AttributeSet AttributeSet}
  38  * whose constructors and mutating operations guarantee an additional
  39  * invariant,
  40  * namely that all attribute values in the PrintServiceAttributeSet must be
  41  * instances of interface {@link PrintServiceAttribute PrintServiceAttribute}.
  42  * The {@link #add(Attribute) add(Attribute)}, and
  43  * {@link #addAll(AttributeSet) addAll(AttributeSet)} operations
  44  * are respecified below to guarantee this additional invariant.

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