Source Code Cross Referenced for JobImpressions.java in  » 6.0-JDK-Core » print » javax » print » attribute » standard » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Home
Java Source Code / Java Documentation
1.6.0 JDK Core
2.6.0 JDK Modules
3.6.0 JDK Modules com.sun
4.6.0 JDK Modules com.sun.java
5.6.0 JDK Modules sun
6.6.0 JDK Platform
7.Ajax
8.Apache Harmony Java SE
9.Aspect oriented
10.Authentication Authorization
11.Blogger System
12.Build
13.Byte Code
14.Cache
15.Chart
16.Chat
17.Code Analyzer
18.Collaboration
19.Content Management System
20.Database Client
21.Database DBMS
22.Database JDBC Connection Pool
23.Database ORM
24.Development
25.EJB Server
26.ERP CRM Financial
27.ESB
28.Forum
29.Game
30.GIS
31.Graphic 3D
32.Graphic Library
33.Groupware
34.HTML Parser
35.IDE
36.IDE Eclipse
37.IDE Netbeans
38.Installer
39.Internationalization Localization
40.Inversion of Control
41.Issue Tracking
42.J2EE
43.J2ME
44.JBoss
45.JMS
46.JMX
47.Library
48.Mail Clients
49.Music
50.Net
51.Parser
52.PDF
53.Portal
54.Profiler
55.Project Management
56.Report
57.RSS RDF
58.Rule Engine
59.Science
60.Scripting
61.Search Engine
62.Security
63.Sevlet Container
64.Source Control
65.Swing Library
66.Template Engine
67.Test Coverage
68.Testing
69.UML
70.Web Crawler
71.Web Framework
72.Web Mail
73.Web Server
74.Web Services
75.Web Services apache cxf 2.2.6
76.Web Services AXIS2
77.Wiki Engine
78.Workflow Engines
79.XML
80.XML UI
Java Source Code / Java Documentation » 6.0 JDK Core » print » javax.print.attribute.standard 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001        /*
002         * Copyright 2000-2004 Sun Microsystems, Inc.  All Rights Reserved.
003         * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
004         *
005         * This code is free software; you can redistribute it and/or modify it
006         * under the terms of the GNU General Public License version 2 only, as
007         * published by the Free Software Foundation.  Sun designates this
008         * particular file as subject to the "Classpath" exception as provided
009         * by Sun in the LICENSE file that accompanied this code.
010         *
011         * This code is distributed in the hope that it will be useful, but WITHOUT
012         * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
013         * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
014         * version 2 for more details (a copy is included in the LICENSE file that
015         * accompanied this code).
016         *
017         * You should have received a copy of the GNU General Public License version
018         * 2 along with this work; if not, write to the Free Software Foundation,
019         * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
020         *
021         * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
022         * CA 95054 USA or visit www.sun.com if you need additional information or
023         * have any questions.
024         */
025        package javax.print.attribute.standard;
026
027        import javax.print.attribute.Attribute;
028        import javax.print.attribute.IntegerSyntax;
029        import javax.print.attribute.PrintRequestAttribute;
030        import javax.print.attribute.PrintJobAttribute;
031
032        /**
033         * Class JobImpressions is an integer valued printing attribute class that 
034         * specifies the total size in number of impressions of the document(s) being 
035         * submitted. An "impression" is the image (possibly many print-stream pages in 
036         * different configurations) imposed onto a single media page. 
037         * <P>
038         * The JobImpressions attribute describes the size of the job. This attribute is 
039         * not intended to be a counter; it is intended to be useful routing and 
040         * scheduling information if known. The printer may try to compute the 
041         * JobImpressions attribute's value if it is not supplied in the Print Request. 
042         * Even if the client does supply a value for the JobImpressions attribute in 
043         * the Print Request, the printer may choose to change the value if the printer 
044         * is able to compute a value which is more accurate than the client supplied 
045         * value. The printer may be able to determine the correct value for the 
046         * JobImpressions attribute either right at job submission time or at any later 
047         * point in time. 
048         * <P>
049         * As with {@link JobKOctets JobKOctets}, the JobImpressions value must not 
050         * include the multiplicative factors contributed by the number of copies 
051         * specified by the {@link Copies Copies} attribute, independent of whether the 
052         * device can process multiple copies without making multiple passes over the 
053         * job or document data and independent of whether the output is collated or 
054         * not. Thus the value is independent of the implementation and reflects the 
055         * size of the document(s) measured in impressions independent of the number of 
056         * copies. 
057         * <P>
058         * As with {@link JobKOctets JobKOctets}, the JobImpressions value must also not 
059         * include the multiplicative factor due to a copies instruction embedded in the 
060         * document data. If the document data actually includes replications of the 
061         * document data, this value will include such replication. In other words, this 
062         * value is always the number of impressions in the source document data, rather 
063         * than a measure of the number of impressions to be produced by the job. 
064         * <P>
065         * <B>IPP Compatibility:</B> The integer value gives the IPP integer value. The 
066         * category name returned by <CODE>getName()</CODE> gives the IPP attribute 
067         * name. 
068         * <P>
069         *
070         * @see JobImpressionsSupported
071         * @see JobImpressionsCompleted
072         * @see JobKOctets
073         * @see JobMediaSheets
074         *
075         * @author  Alan Kaminsky
076         */
077        public final class JobImpressions extends IntegerSyntax implements 
078                PrintRequestAttribute, PrintJobAttribute {
079
080            private static final long serialVersionUID = 8225537206784322464L;
081
082            /**
083             * Construct a new job impressions attribute with the given integer value. 
084             *
085             * @param  value  Integer value.
086             *
087             * @exception  IllegalArgumentException
088             *  (Unchecked exception) Thrown if <CODE>value</CODE> is less than 0.
089             */
090            public JobImpressions(int value) {
091                super (value, 0, Integer.MAX_VALUE);
092            }
093
094            /**
095             * Returns whether this job impressions attribute is equivalent to the 
096             * passed in object. To be equivalent, all of the following conditions must 
097             * be true: 
098             * <OL TYPE=1>
099             * <LI>
100             * <CODE>object</CODE> is not null.
101             * <LI>
102             * <CODE>object</CODE> is an instance of class JobImpressions.
103             * <LI>
104             * This job impressions attribute's value and <CODE>object</CODE>'s value 
105             * are equal. 
106             * </OL>
107             *
108             * @param  object  Object to compare to.
109             *
110             * @return  True if <CODE>object</CODE> is equivalent to this job
111             *          impressions attribute, false otherwise. 
112             */
113            public boolean equals(Object object) {
114                return super .equals(object) && object instanceof  JobImpressions;
115            }
116
117            /**
118             * Get the printing attribute class which is to be used as the "category" 
119             * for this printing attribute value.
120             * <P>
121             * For class JobImpressions, the category is class JobImpressions itself. 
122             *
123             * @return  Printing attribute class (category), an instance of class
124             *          {@link java.lang.Class java.lang.Class}.
125             */
126            public final Class<? extends Attribute> getCategory() {
127                return JobImpressions.class;
128            }
129
130            /**
131             * Get the name of the category of which this attribute value is an 
132             * instance. 
133             * <P>
134             * For class JobImpressions, the category name is 
135             * <CODE>"job-impressions"</CODE>. 
136             *
137             * @return  Attribute category name.
138             */
139            public final String getName() {
140                return "job-impressions";
141            }
142
143        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.