KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > batik > bridge > BridgeExtension


1 /*
2
3    Copyright 2001,2004 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.bridge;
19
20 import java.util.Iterator JavaDoc;
21
22 import org.w3c.dom.Element JavaDoc;
23
24 /**
25  * This is a Service interface for classes that want to extend the
26  * functionality of the Bridge, to support new tags in the rendering tree.
27  */

28 public interface BridgeExtension {
29
30     /**
31      * Return the priority of this Extension. Extensions are
32      * registered from lowest to highest priority. So if for some
33      * reason you need to come before/after another existing extension
34      * make sure your priority is lower/higher than theirs.
35      */

36     public float getPriority();
37
38     /**
39      * This should return the list of extensions implemented
40      * by this BridgeExtension, these are added to the list of
41      * requiredExtensions that the User Agent supports for purposes
42      * of the 'switch' element in SVG.
43      * @return An iterator containing strings one for each implemented
44      * extension.
45      */

46      public Iterator JavaDoc getImplementedExtensions();
47
48     /**
49      * This should return the individual or company name responsible
50      * for the this implementation of the extension.
51      */

52     public String JavaDoc getAuthor();
53
54     /**
55      * This should return a contact address (usually an e-mail address).
56      */

57     public String JavaDoc getContactAddress();
58
59     /**
60      * This should return a URL where information can be obtained on
61      * this extension.
62      */

63     public String JavaDoc getURL();
64
65     /**
66      * Human readable description of the extension.
67      * Perhaps that should be a resource for internationalization?
68      * (although I suppose it could be done internally)
69      */

70     public String JavaDoc getDescription();
71
72     /**
73      * This method should update the BridgeContext with support
74      * for the tags in this extension. In some rare cases it may
75      * be necessary to replace existing tag handlers, although this
76      * is discouraged.
77      *
78      * @param ctx The BridgeContext instance to be updated
79      */

80     public void registerTags(BridgeContext ctx);
81
82     /**
83      * Whether the presence of the specified element should cause
84      * the document to be dynamic. If this element isn't handled
85      * by this BridgeExtension, just return false.
86      *
87      * @param e The element to check.
88      */

89     public boolean isDynamicElement(Element JavaDoc e);
90 }
91
Popular Tags