001/* ========================================================================
002 * JCommon : a free general purpose class library for the Java(tm) platform
003 * ========================================================================
004 *
005 * (C) Copyright 2000-2005, by Object Refinery Limited and Contributors.
006 * 
007 * Project Info:  http://www.jfree.org/jcommon/index.html
008 *
009 * This library is free software; you can redistribute it and/or modify it 
010 * under the terms of the GNU Lesser General Public License as published by 
011 * the Free Software Foundation; either version 2.1 of the License, or 
012 * (at your option) any later version.
013 *
014 * This library is distributed in the hope that it will be useful, but 
015 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 
016 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public 
017 * License for more details.
018 *
019 * You should have received a copy of the GNU Lesser General Public
020 * License along with this library; if not, write to the Free Software
021 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, 
022 * USA.  
023 *
024 * [Java is a trademark or registered trademark of Sun Microsystems, Inc. 
025 * in the United States and other countries.]
026 * 
027 * ----------------
028 * JCommonInfo.java
029 * ----------------
030 * (C)opyright 2003-2005, by Thomas Morgner and Contributors.
031 *
032 * Original Author:  David Gilbert (for Object Refinery Limited);
033 * Contributor(s):   Thomas Morgner;
034 *
035 * $Id: JCommonInfo.java,v 1.7 2006/03/23 19:47:05 taqua Exp $
036 *
037 * Changes
038 * -------
039 * 07-Jun-2004 : Added JCommon header (DG);
040 *
041 */
042
043package org.jfree;
044
045import java.util.Arrays;
046import java.util.ResourceBundle;
047
048import org.jfree.base.BaseBoot;
049import org.jfree.base.Library;
050import org.jfree.ui.about.Contributor;
051import org.jfree.ui.about.Licences;
052import org.jfree.ui.about.ProjectInfo;
053
054/**
055 * Information about the JCommon project.  One instance of this class is
056 * assigned to JCommon.INFO.
057 *
058 * @author David Gilbert
059 */
060public class JCommonInfo extends ProjectInfo {
061
062    /** The singleton instance of the project info object. */
063    private static JCommonInfo singleton;
064
065    /**
066     * Returns the single instance of this class.
067     * 
068     * @return The single instance of information about the JCommon library.
069     */
070    public static synchronized JCommonInfo getInstance() {
071        if (singleton == null) {
072            singleton = new JCommonInfo();
073        }
074        return singleton;
075    }
076
077    /**
078     * Creates a new instance.
079     */
080    private JCommonInfo() {
081
082        // get a locale-specific resource bundle...
083        final String baseResourceClass = "org.jfree.resources.JCommonResources";
084        final ResourceBundle resources 
085            = ResourceBundle.getBundle(baseResourceClass);
086
087        setName(resources.getString("project.name"));
088        setVersion(resources.getString("project.version"));
089        setInfo(resources.getString("project.info"));
090        setCopyright(resources.getString("project.copyright"));
091
092        setLicenceName("LGPL");
093        setLicenceText(Licences.getInstance().getLGPL());
094
095        setContributors(Arrays.asList(
096            new Contributor[] {
097                new Contributor("Anthony Boulestreau", "-"),
098                new Contributor("Jeremy Bowman", "-"),
099                new Contributor("J. David Eisenberg", "-"),
100                new Contributor("Paul English", "-"),
101                new Contributor(
102                    "David Gilbert", "david.gilbert@object-refinery.com"
103                ),
104                new Contributor("Hans-Jurgen Greiner", "-"),
105                new Contributor("Arik Levin", "-"),
106                new Contributor("Achilleus Mantzios", "-"),
107                new Contributor("Thomas Meier", "-"),
108                new Contributor("Aaron Metzger", "-"),
109                new Contributor("Thomas Morgner", "-"),
110                new Contributor("Krzysztof Paz", "-"),
111                new Contributor("Nabuo Tamemasa", "-"),
112                new Contributor("Mark Watson", "-"),
113                new Contributor("Matthew Wright", "-"),
114                new Contributor("Hari", "-"),
115                new Contributor("Sam (oldman)", "-")
116            }
117        ));
118
119        addOptionalLibrary(
120            new Library(
121                "JUnit", "3.8", "IBM Public Licence", "http://www.junit.org/"
122            )
123        );
124
125        setBootClass(BaseBoot.class.getName());
126    }
127}