Frames | No Frames |
1: /* ======================================================================== 2: * JCommon : a free general purpose class library for the Java(tm) platform 3: * ======================================================================== 4: * 5: * (C) Copyright 2000-2008, by Object Refinery Limited and Contributors. 6: * 7: * Project Info: http://www.jfree.org/jcommon/index.html 8: * 9: * This library is free software; you can redistribute it and/or modify it 10: * under the terms of the GNU Lesser General Public License as published by 11: * the Free Software Foundation; either version 2.1 of the License, or 12: * (at your option) any later version. 13: * 14: * This library is distributed in the hope that it will be useful, but 15: * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 16: * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public 17: * License for more details. 18: * 19: * You should have received a copy of the GNU Lesser General Public 20: * License along with this library; if not, write to the Free Software 21: * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 22: * USA. 23: * 24: * [Java is a trademark or registered trademark of Sun Microsystems, Inc. 25: * in the United States and other countries.] 26: * 27: * ---------------- 28: * JCommonInfo.java 29: * ---------------- 30: * (C)opyright 2003-2008, by Thomas Morgner and Contributors. 31: * 32: * Original Author: David Gilbert (for Object Refinery Limited); 33: * Contributor(s): Thomas Morgner; 34: * 35: * $Id: JCommonInfo.java,v 1.8 2008/12/18 09:57:32 mungady Exp $ 36: * 37: * Changes 38: * ------- 39: * 07-Jun-2004 : Added JCommon header (DG); 40: * 18-Dec-2008 : Use ResourceBundleWrapper - see JFreeChart patch 1607918 by 41: * Jess Thrysoee (DG); 42: * 43: */ 44: 45: package org.jfree; 46: 47: import java.util.Arrays; 48: import java.util.ResourceBundle; 49: 50: import org.jfree.base.BaseBoot; 51: import org.jfree.base.Library; 52: import org.jfree.ui.about.Contributor; 53: import org.jfree.ui.about.Licences; 54: import org.jfree.ui.about.ProjectInfo; 55: import org.jfree.util.ResourceBundleWrapper; 56: 57: /** 58: * Information about the JCommon project. One instance of this class is 59: * assigned to JCommon.INFO. 60: * 61: * @author David Gilbert 62: */ 63: public class JCommonInfo extends ProjectInfo { 64: 65: /** The singleton instance of the project info object. */ 66: private static JCommonInfo singleton; 67: 68: /** 69: * Returns the single instance of this class. 70: * 71: * @return The single instance of information about the JCommon library. 72: */ 73: public static synchronized JCommonInfo getInstance() { 74: if (singleton == null) { 75: singleton = new JCommonInfo(); 76: } 77: return singleton; 78: } 79: 80: /** 81: * Creates a new instance. 82: */ 83: private JCommonInfo() { 84: 85: // get a locale-specific resource bundle... 86: final String baseResourceClass = "org.jfree.resources.JCommonResources"; 87: final ResourceBundle resources = ResourceBundleWrapper.getBundle( 88: baseResourceClass); 89: 90: setName(resources.getString("project.name")); 91: setVersion(resources.getString("project.version")); 92: setInfo(resources.getString("project.info")); 93: setCopyright(resources.getString("project.copyright")); 94: 95: setLicenceName("LGPL"); 96: setLicenceText(Licences.getInstance().getLGPL()); 97: 98: setContributors(Arrays.asList( 99: new Contributor[] { 100: new Contributor("Anthony Boulestreau", "-"), 101: new Contributor("Jeremy Bowman", "-"), 102: new Contributor("J. David Eisenberg", "-"), 103: new Contributor("Paul English", "-"), 104: new Contributor("David Gilbert", 105: "david.gilbert@object-refinery.com"), 106: new Contributor("Hans-Jurgen Greiner", "-"), 107: new Contributor("Arik Levin", "-"), 108: new Contributor("Achilleus Mantzios", "-"), 109: new Contributor("Thomas Meier", "-"), 110: new Contributor("Aaron Metzger", "-"), 111: new Contributor("Thomas Morgner", "-"), 112: new Contributor("Krzysztof Paz", "-"), 113: new Contributor("Nabuo Tamemasa", "-"), 114: new Contributor("Mark Watson", "-"), 115: new Contributor("Matthew Wright", "-"), 116: new Contributor("Hari", "-"), 117: new Contributor("Sam (oldman)", "-") 118: } 119: )); 120: 121: addOptionalLibrary(new Library("JUnit", "3.8", "IBM Public Licence", 122: "http://www.junit.org/")); 123: 124: setBootClass(BaseBoot.class.getName()); 125: } 126: }