1 18 package org.apache.batik.extension.svg; 19 20 import java.util.Collections ; 21 import java.util.Iterator ; 22 import java.util.Vector ; 23 24 import org.apache.batik.bridge.BridgeContext; 25 import org.apache.batik.bridge.BridgeExtension; 26 import org.w3c.dom.Element ; 27 28 32 public class BatikBridgeExtension implements BridgeExtension { 33 34 40 public float getPriority() { return 1f; } 41 42 48 public Iterator getImplementedExtensions() { 49 String [] extensions = { 50 "http://xml.apache.org/batik/ext/poly/1.0" , 51 "http://xml.apache.org/batik/ext/star/1.0" , 52 "http://xml.apache.org/batik/ext/histogramNormalization/1.0" , 53 "http://xml.apache.org/batik/ext/colorSwitch/1.0" , 54 "http://xml.apache.org/batik/ext/flowText/1.0" , 55 }; 56 Vector v = new Vector (extensions.length); 57 for (int i=0; i<extensions.length; i++) { 58 v.add(extensions[i]); 59 } 60 return Collections.unmodifiableList(v).iterator(); 61 } 62 63 67 public String getAuthor() { 68 return "Thomas DeWeese"; 69 } 70 71 74 public String getContactAddress() { 75 return "deweese@apache.org"; 76 } 77 78 82 public String getURL() { 83 return "http://xml.apache.org/batik"; 84 } 85 86 91 public String getDescription() { 92 return "Example extension to standard SVG shape tags"; 93 } 94 95 103 public void registerTags(BridgeContext ctx) { 104 ctx.putBridge(new BatikRegularPolygonElementBridge()); 105 ctx.putBridge(new BatikStarElementBridge()); 106 ctx.putBridge(new BatikHistogramNormalizationElementBridge()); 107 ctx.putBridge(new BatikFlowTextElementBridge()); 108 ctx.putBridge(new ColorSwitchBridge()); 109 } 110 111 118 public boolean isDynamicElement(Element e) { 119 return false; 120 } 121 } 122 | Popular Tags |