KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > batik > ext > awt > image > spi > BrokenLinkProvider


1 /*
2
3    Copyright 2001 The Apache Software Foundation
4
5    Licensed under the Apache License, Version 2.0 (the "License");
6    you may not use this file except in compliance with the License.
7    You may obtain a copy of the License at
8
9        http://www.apache.org/licenses/LICENSE-2.0
10
11    Unless required by applicable law or agreed to in writing, software
12    distributed under the License is distributed on an "AS IS" BASIS,
13    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14    See the License for the specific language governing permissions and
15    limitations under the License.
16
17  */

18 package org.apache.batik.ext.awt.image.spi;
19
20 import org.apache.batik.ext.awt.image.renderable.Filter;
21
22 /**
23  * This interface is to be used to provide alternate ways of
24  * generating a placeholder image when the ImageTagRegistry
25  * fails to handle a given reference.
26  */

27 public interface BrokenLinkProvider {
28
29     /**
30      * The image returned by getBrokenLinkImage should always
31      * return some value when queried for the BROKEN_LINK_PROPERTY.
32      * This allows code the determine if the image is the 'real'
33      * image or the broken link image, which may be important for
34      * the application of profiles etc.
35      */

36     public static final String JavaDoc BROKEN_LINK_PROPERTY =
37         "org.apache.batik.BrokenLinkImage";
38
39     /**
40      * This method is responsbile for constructing an image that will
41      * represent the missing image in the document. This method
42      * recives information about the reason a broken link image is
43      * being requested in the <tt>code</tt> and <tt>params</tt>
44      * parameters. These parameters may be used to generate nicely
45      * localized messages for insertion into the broken link image, or
46      * for selecting the broken link image returned.
47      *
48      * @param base The object to use for Message decoding.
49      * @param code This is the reason the image is unavailable should
50      * be taken from ErrorConstants.
51      * @param params This is more detailed information about
52      * the circumstances of the failure. */

53     public Filter getBrokenLinkImage(Object JavaDoc base,
54                                      String JavaDoc code, Object JavaDoc[] params);
55 }
56
Popular Tags