Source Code Cross Referenced for IIOWriteProgressListener.java in  » 6.0-JDK-Core » image » javax » imageio » event » 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 » image » javax.imageio.event 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001        /*
002         * Copyright 2000-2001 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
026        package javax.imageio.event;
027
028        import java.util.EventListener;
029        import javax.imageio.ImageWriter;
030
031        /**
032         * An interface used by <code>ImageWriter</code> implementations to notify
033         * callers of their image writing methods of progress.
034         *
035         * @see javax.imageio.ImageWriter#write
036         *
037         * @version 0.5
038         */
039        public interface IIOWriteProgressListener extends EventListener {
040
041            /**
042             * Reports that an image write operation is beginning.  All
043             * <code>ImageWriter</code> implementations are required to call
044             * this method exactly once when beginning an image write
045             * operation.
046             *
047             * @param source the <code>ImageWriter</code> object calling this
048             * method.
049             * @param imageIndex the index of the image being written within
050             * its containing input file or stream.
051             */
052            void imageStarted(ImageWriter source, int imageIndex);
053
054            /**
055             * Reports the approximate degree of completion of the current
056             * <code>write</code> call within the associated
057             * <code>ImageWriter</code>.
058             *
059             * <p> The degree of completion is expressed as an index
060             * indicating which image is being written, and a percentage
061             * varying from <code>0.0F</code> to <code>100.0F</code>
062             * indicating how much of the current image has been output.  The
063             * percentage should ideally be calculated in terms of the
064             * remaining time to completion, but it is usually more practical
065             * to use a more well-defined metric such as pixels decoded or
066             * portion of input stream consumed.  In any case, a sequence of
067             * calls to this method during a given read operation should
068             * supply a monotonically increasing sequence of percentage
069             * values.  It is not necessary to supply the exact values
070             * <code>0</code> and <code>100</code>, as these may be inferred
071             * by the callee from other methods.
072             *
073             * <p> Each particular <code>ImageWriter</code> implementation may
074             * call this method at whatever frequency it desires.  A rule of
075             * thumb is to call it around each 5 percent mark.
076             *
077             * @param source the <code>ImageWriter</code> object calling this method.
078             * @param percentageDone the approximate percentage of decoding that
079             * has been completed.
080             */
081            void imageProgress(ImageWriter source, float percentageDone);
082
083            /**
084             * Reports that the image write operation has completed.  All
085             * <code>ImageWriter</code> implementations are required to call
086             * this method exactly once upon completion of each image write
087             * operation.
088             *
089             * @param source the <code>ImageWriter</code> object calling this method.
090             */
091            void imageComplete(ImageWriter source);
092
093            /**
094             * Reports that a thumbnail write operation is beginning.  All
095             * <code>ImageWriter</code> implementations are required to call
096             * this method exactly once when beginning a thumbnail write
097             * operation.
098             *
099             * @param source the <code>ImageWrite</code> object calling this method.
100             * @param imageIndex the index of the image being written within its
101             * containing input file or stream.
102             * @param thumbnailIndex the index of the thumbnail being written.
103             */
104            void thumbnailStarted(ImageWriter source, int imageIndex,
105                    int thumbnailIndex);
106
107            /**
108             * Reports the approximate degree of completion of the current
109             * thumbnail write within the associated <code>ImageWriter</code>.
110             * The semantics are identical to those of
111             * <code>imageProgress</code>.
112             *
113             * @param source the <code>ImageWriter</code> object calling this
114             * method.
115             * @param percentageDone the approximate percentage of decoding that
116             * has been completed.
117             */
118            void thumbnailProgress(ImageWriter source, float percentageDone);
119
120            /**
121             * Reports that a thumbnail write operation has completed.  All
122             * <code>ImageWriter</code> implementations are required to call
123             * this method exactly once upon completion of each thumbnail
124             * write operation.
125             *
126             * @param source the <code>ImageWriter</code> object calling this
127             * method.
128             */
129            void thumbnailComplete(ImageWriter source);
130
131            /**
132             * Reports that a write has been aborted via the writer's
133             * <code>abort</code> method.  No further notifications will be
134             * given.
135             *
136             * @param source the <code>ImageWriter</code> object calling this
137             * method.
138             */
139            void writeAborted(ImageWriter source);
140        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.