Source Code Cross Referenced for SVGBridgeExtension.java in  » Graphic-Library » batik » org » apache » batik » bridge » Java Source Code / Java DocumentationJava Source Code and Java Documentation

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 geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Graphic Library » batik » org.apache.batik.bridge 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:
003:           Licensed to the Apache Software Foundation (ASF) under one or more
004:           contributor license agreements.  See the NOTICE file distributed with
005:           this work for additional information regarding copyright ownership.
006:           The ASF licenses this file to You under the Apache License, Version 2.0
007:           (the "License"); you may not use this file except in compliance with
008:           the License.  You may obtain a copy of the License at
009:
010:               http://www.apache.org/licenses/LICENSE-2.0
011:
012:           Unless required by applicable law or agreed to in writing, software
013:           distributed under the License is distributed on an "AS IS" BASIS,
014:           WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
015:           See the License for the specific language governing permissions and
016:           limitations under the License.
017:
018:         */
019:        package org.apache.batik.bridge;
020:
021:        import java.util.Collections;
022:        import java.util.Iterator;
023:
024:        import org.apache.batik.util.SVGConstants;
025:        import org.w3c.dom.Element;
026:
027:        /**
028:         * This is a Service interface for classes that want to extend the
029:         * functionality of the Bridge, to support new tags in the rendering tree.
030:         *
031:         * @author <a href="mailto:thomas.deweese@kodak.com">Thomas DeWeese</a>
032:         * @version $Id: SVGBridgeExtension.java 475477 2006-11-15 22:44:28Z cam $
033:         */
034:        public class SVGBridgeExtension implements  BridgeExtension {
035:
036:            /**
037:             * Return the priority of this Extension.  Extensions are
038:             * registered from lowest to highest priority.  So if for some
039:             * reason you need to come before/after another existing extension
040:             * make sure your priority is lower/higher than theirs.
041:             */
042:            public float getPriority() {
043:                return 0f;
044:            }
045:
046:            /**
047:             * This should return the list of extensions implemented
048:             * by this BridgeExtension.
049:             * @return An iterator containing strings one for each implemented
050:             *         extension.
051:             */
052:            public Iterator getImplementedExtensions() {
053:                return Collections.EMPTY_LIST.iterator();
054:            }
055:
056:            /**
057:             * This should return the individual or company name responsible
058:             * for the this implementation of the extension.
059:             */
060:            public String getAuthor() {
061:                return "The Apache Batik Team.";
062:            }
063:
064:            /**
065:             * This should contain a contact address (usually an e-mail address).
066:             */
067:            public String getContactAddress() {
068:                return "batik-dev@xmlgraphics.apache.org";
069:            }
070:
071:            /**
072:             * This should return a URL where information can be obtained on
073:             * this extension.
074:             */
075:            public String getURL() {
076:                return "http://xml.apache.org/batik";
077:            }
078:
079:            /**
080:             * Human readable description of the extension.
081:             * Perhaps that should be a resource for internationalization?
082:             * (although I suppose it could be done internally)
083:             */
084:            public String getDescription() {
085:                return "The required SVG 1.0 tags";
086:            }
087:
088:            /**
089:             * This method should update the BridgeContext with support
090:             * for the tags in this extension.  In some rare cases it may
091:             * be necessary to replace existing tag handlers, although this
092:             * is discouraged.
093:             *
094:             * @param ctx The BridgeContext instance to be updated
095:             */
096:            public void registerTags(BridgeContext ctx) {
097:                // bridges to handle elements in the SVG namespace
098:
099:                ctx.putBridge(new SVGAElementBridge());
100:                ctx.putBridge(new SVGAltGlyphElementBridge());
101:                ctx.putBridge(new SVGCircleElementBridge());
102:                ctx.putBridge(new SVGClipPathElementBridge());
103:                ctx.putBridge(new SVGColorProfileElementBridge());
104:                ctx.putBridge(new SVGDescElementBridge());
105:                ctx.putBridge(new SVGEllipseElementBridge());
106:                ctx.putBridge(new SVGFeBlendElementBridge());
107:                ctx.putBridge(new SVGFeColorMatrixElementBridge());
108:                ctx.putBridge(new SVGFeComponentTransferElementBridge());
109:                ctx.putBridge(new SVGFeCompositeElementBridge());
110:                ctx
111:                        .putBridge(new SVGFeComponentTransferElementBridge.SVGFeFuncAElementBridge());
112:                ctx
113:                        .putBridge(new SVGFeComponentTransferElementBridge.SVGFeFuncRElementBridge());
114:                ctx
115:                        .putBridge(new SVGFeComponentTransferElementBridge.SVGFeFuncGElementBridge());
116:                ctx
117:                        .putBridge(new SVGFeComponentTransferElementBridge.SVGFeFuncBElementBridge());
118:                ctx.putBridge(new SVGFeConvolveMatrixElementBridge());
119:                ctx.putBridge(new SVGFeDiffuseLightingElementBridge());
120:                ctx.putBridge(new SVGFeDisplacementMapElementBridge());
121:                ctx
122:                        .putBridge(new AbstractSVGLightingElementBridge.SVGFeDistantLightElementBridge());
123:                ctx.putBridge(new SVGFeFloodElementBridge());
124:                ctx.putBridge(new SVGFeGaussianBlurElementBridge());
125:                ctx.putBridge(new SVGFeImageElementBridge());
126:                ctx.putBridge(new SVGFeMergeElementBridge());
127:                ctx
128:                        .putBridge(new SVGFeMergeElementBridge.SVGFeMergeNodeElementBridge());
129:                ctx.putBridge(new SVGFeMorphologyElementBridge());
130:                ctx.putBridge(new SVGFeOffsetElementBridge());
131:                ctx
132:                        .putBridge(new AbstractSVGLightingElementBridge.SVGFePointLightElementBridge());
133:                ctx.putBridge(new SVGFeSpecularLightingElementBridge());
134:                ctx
135:                        .putBridge(new AbstractSVGLightingElementBridge.SVGFeSpotLightElementBridge());
136:                ctx.putBridge(new SVGFeTileElementBridge());
137:                ctx.putBridge(new SVGFeTurbulenceElementBridge());
138:                ctx.putBridge(new SVGFontElementBridge());
139:                ctx.putBridge(new SVGFontFaceElementBridge());
140:                ctx.putBridge(new SVGFilterElementBridge());
141:                ctx.putBridge(new SVGGElementBridge());
142:                ctx.putBridge(new SVGGlyphElementBridge());
143:                ctx.putBridge(new SVGHKernElementBridge());
144:                ctx.putBridge(new SVGImageElementBridge());
145:                ctx.putBridge(new SVGLineElementBridge());
146:                ctx.putBridge(new SVGLinearGradientElementBridge());
147:                ctx.putBridge(new SVGMarkerElementBridge());
148:                ctx.putBridge(new SVGMaskElementBridge());
149:                ctx.putBridge(new SVGMissingGlyphElementBridge());
150:                ctx.putBridge(new SVGPathElementBridge());
151:                ctx.putBridge(new SVGPatternElementBridge());
152:                ctx.putBridge(new SVGPolylineElementBridge());
153:                ctx.putBridge(new SVGPolygonElementBridge());
154:                ctx.putBridge(new SVGRadialGradientElementBridge());
155:                ctx.putBridge(new SVGRectElementBridge());
156:                ctx
157:                        .putBridge(new AbstractSVGGradientElementBridge.SVGStopElementBridge());
158:                ctx.putBridge(new SVGSVGElementBridge());
159:                ctx.putBridge(new SVGSwitchElementBridge());
160:                ctx.putBridge(new SVGTextElementBridge());
161:                ctx.putBridge(new SVGTextPathElementBridge());
162:                ctx.putBridge(new SVGTitleElementBridge());
163:                ctx.putBridge(new SVGUseElementBridge());
164:                ctx.putBridge(new SVGVKernElementBridge());
165:                ctx.putBridge(new SVGSetElementBridge());
166:                ctx.putBridge(new SVGAnimateElementBridge());
167:                ctx.putBridge(new SVGAnimateColorElementBridge());
168:                ctx.putBridge(new SVGAnimateTransformElementBridge());
169:                ctx.putBridge(new SVGAnimateMotionElementBridge());
170:            }
171:
172:            /**
173:             * Whether the presence of the specified element should cause
174:             * the document to be dynamic.  If this element isn't handled
175:             * by this BridgeExtension, just return false.
176:             *
177:             * @param e The element to check.
178:             */
179:            public boolean isDynamicElement(Element e) {
180:                String ns = e.getNamespaceURI();
181:                if (!SVGConstants.SVG_NAMESPACE_URI.equals(ns)) {
182:                    return false;
183:                }
184:                String ln = e.getLocalName();
185:                if (ln.equals(SVGConstants.SVG_SCRIPT_TAG)
186:                        || ln.startsWith("animate")
187:                        || ln.equals(SVGConstants.SVG_SET_TAG)) {
188:                    return true;
189:                }
190:                return false;
191:            }
192:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.