1 /* 2 * This file is a part of the SchemaSpy project (http://schemaspy.sourceforge.net). 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 John Currier 4 * 5 * SchemaSpy is free software; you can redistribute it and/or 6 * modify it under the terms of the GNU Lesser General Public 7 * License as published by the Free Software Foundation; either 8 * version 2.1 of the License, or (at your option) any later version. 9 * 10 * SchemaSpy is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 * Lesser General Public License for more details. 14 * 15 * You should have received a copy of the GNU Lesser General Public 16 * License along with this library; if not, write to the Free Software 17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 18 */ 19 package net.sourceforge.schemaspy.view; 20 21 import java.io.File; 22 import java.io.IOException; 23 import net.sourceforge.schemaspy.util.ResourceWriter; 24 25 public class ImageWriter extends ResourceWriter { 26 private static ImageWriter instance = new ImageWriter(); 27 28 private ImageWriter() { 29 } 30 31 public static ImageWriter getInstance() { 32 return instance; 33 } 34 35 public void writeImages(File outputDir) throws IOException { 36 new File(outputDir, "images").mkdir(); 37 38 writeResource("/images/tabLeft.gif", new File(outputDir, "/images/tabLeft.gif")); 39 writeResource("/images/tabRight.gif", new File(outputDir, "/images/tabRight.gif")); 40 writeResource("/images/background.gif", new File(outputDir, "/images/background.gif")); 41 } 42 }