    001    /* ========================================================================
    002     * JCommon : a free general purpose class library for the Java(tm) platform
    003     * ========================================================================
    004     *
    005     * (C) Copyright 2000-2008, 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-2008, 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.8 2008/12/18 09:57:32 mungady Exp $
    036     *
    037     * Changes
    038     * -------
    039     * 07-Jun-2004 : Added JCommon header (DG);
    040     * 18-Dec-2008 : Use ResourceBundleWrapper - see JFreeChart patch 1607918 by
    041     *               Jess Thrysoee (DG);
    042     *
    043     */
    044
    045    package org.jfree;
    046
    047    import java.util.Arrays;
    048    import java.util.ResourceBundle;
    049
    050    import org.jfree.base.BaseBoot;
    051    import org.jfree.base.Library;
    052    import org.jfree.ui.about.Contributor;
    053    import org.jfree.ui.about.Licences;
    054    import org.jfree.ui.about.ProjectInfo;
    055    import org.jfree.util.ResourceBundleWrapper;
    056
    057    /**
    058     * Information about the JCommon project.  One instance of this class is
    059     * assigned to JCommon.INFO.
    060     *
    061     * @author David Gilbert
    062     */
    063    public class JCommonInfo extends ProjectInfo {
    064
    065        /** The singleton instance of the project info object. */
    066        private static JCommonInfo singleton;
    067
    068        /**
    069         * Returns the single instance of this class.
    070         *
    071         * @return The single instance of information about the JCommon library.
    072         */
    073        public static synchronized JCommonInfo getInstance() {
    074            if (singleton == null) {
    075                singleton = new JCommonInfo();
    076            }
    077            return singleton;
    078        }
    079
    080        /**
    081         * Creates a new instance.
    082         */
    083        private JCommonInfo() {
    084
    085            // get a locale-specific resource bundle...
    086            final String baseResourceClass = "org.jfree.resources.JCommonResources";
    087            final ResourceBundle resources = ResourceBundleWrapper.getBundle(
    088                    baseResourceClass);
    089
    090            setName(resources.getString("project.name"));
    091            setVersion(resources.getString("project.version"));
    092            setInfo(resources.getString("project.info"));
    093            setCopyright(resources.getString("project.copyright"));
    094
    095            setLicenceName("LGPL");
    096            setLicenceText(Licences.getInstance().getLGPL());
    097
    098            setContributors(Arrays.asList(
    099                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    }