KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > javax > imageio > event > IIOWriteWarningListener


1 /*
2  * @(#)IIOWriteWarningListener.java 1.19 03/12/19
3  *
4  * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
5  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
6  */

7
8 package javax.imageio.event;
9
10 import java.util.EventListener JavaDoc;
11 import javax.imageio.ImageWriter JavaDoc;
12
13 /**
14  * An interface used by <code>ImageWriter</code> implementations to
15  * notify callers of their image and thumbnail reading methods of
16  * warnings (non-fatal errors). Fatal errors cause the relevant
17  * read method to throw an <code>IIOException</code>.
18  *
19  * <p> Localization is handled by associating a <code>Locale</code>
20  * with each <code>IIOWriteWarningListener</code> as it is registered
21  * with an <code>ImageWriter</code>. It is up to the
22  * <code>ImageWriter</code> to provide localized messages.
23  *
24  * @see javax.imageio.ImageWriter#addIIOWriteWarningListener
25  * @see javax.imageio.ImageWriter#removeIIOWriteWarningListener
26  *
27  * @version 0.5
28  */

29 public interface IIOWriteWarningListener extends EventListener JavaDoc {
30     
31     /**
32      * Reports the occurence of a non-fatal error in encoding. Encoding
33      * will continue following the call to this method. The application
34      * may choose to display a dialog, print the warning to the console,
35      * ignore the warning, or take any other action it chooses.
36      *
37      * @param source the <code>ImageWriter</code> object calling this method.
38      * @param imageIndex the index, starting with 0, of the image
39      * generating the warning.
40      * @param warning a <code>String</code> containing the warning.
41      */

42     void warningOccurred(ImageWriter JavaDoc source,
43                          int imageIndex,
44                          String JavaDoc warning);
45 }
46
Popular Tags