001    package nl.cwi.sen1.gui.plugin;
002    
003    import javax.swing.JComponent;
004    
005    import nl.cwi.sen1.gui.component.StudioComponentImpl;
006    
007    import org.apache.batik.swing.JSVGCanvas;
008    
009    public class SVGCanvas extends StudioComponentImpl {
010            private JSVGCanvas svgCanvas = new JSVGCanvas();
011    
012            public SVGCanvas(String name, String file) {
013                    super(name, null);
014                    svgCanvas.loadSVGDocument("file://" + file);
015            }
016    
017            @Override
018            public JComponent getViewComponent() {
019                    return svgCanvas;
020            }
021    }