KickJava   Java API By Example, From Geeks To Geeks.

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


1 /*
2  * @(#)IIOReadWarningListener.java 1.21 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.ImageReader JavaDoc;
12
13 /**
14  * An interface used by <code>ImageReader</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>IIOReadWarningListener</code> as it is registered
21  * with an <code>ImageReader</code>. It is up to the
22  * <code>ImageReader</code> to provide localized messages.
23  *
24  * @see javax.imageio.ImageReader#addIIOReadWarningListener
25  * @see javax.imageio.ImageReader#removeIIOReadWarningListener
26  *
27  * @version 0.5
28  */

29 public interface IIOReadWarningListener extends EventListener JavaDoc {
30     
31     /**
32      * Reports the occurence of a non-fatal error in decoding. Decoding
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>ImageReader</code> object calling this method.
38      * @param warning a <code>String</code> containing the warning.
39      */

40     void warningOccurred(ImageReader JavaDoc source, String JavaDoc warning);
41 }
42
Popular Tags