Source for org.jfree.JCommonInfo

   1: /* ========================================================================
   2:  * JCommon : a free general purpose class library for the Java(tm) platform
   3:  * ========================================================================
   4:  *
   5:  * (C) Copyright 2000-2005, 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-2005, 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.7 2006/03/23 19:47:05 taqua Exp $
  36:  *
  37:  * Changes
  38:  * -------
  39:  * 07-Jun-2004 : Added JCommon header (DG);
  40:  *
  41:  */
  42: 
  43: package org.jfree;
  44: 
  45: import java.util.Arrays;
  46: import java.util.ResourceBundle;
  47: 
  48: import org.jfree.base.BaseBoot;
  49: import org.jfree.base.Library;
  50: import org.jfree.ui.about.Contributor;
  51: import org.jfree.ui.about.Licences;
  52: import org.jfree.ui.about.ProjectInfo;
  53: 
  54: /**
  55:  * Information about the JCommon project.  One instance of this class is
  56:  * assigned to JCommon.INFO.
  57:  *
  58:  * @author David Gilbert
  59:  */
  60: public class JCommonInfo extends ProjectInfo {
  61: 
  62:     /** The singleton instance of the project info object. */
  63:     private static JCommonInfo singleton;
  64: 
  65:     /**
  66:      * Returns the single instance of this class.
  67:      * 
  68:      * @return The single instance of information about the JCommon library.
  69:      */
  70:     public static synchronized JCommonInfo getInstance() {
  71:         if (singleton == null) {
  72:             singleton = new JCommonInfo();
  73:         }
  74:         return singleton;
  75:     }
  76: 
  77:     /**
  78:      * Creates a new instance.
  79:      */
  80:     private JCommonInfo() {
  81: 
  82:         // get a locale-specific resource bundle...
  83:         final String baseResourceClass = "org.jfree.resources.JCommonResources";
  84:         final ResourceBundle resources 
  85:             = ResourceBundle.getBundle(baseResourceClass);
  86: 
  87:         setName(resources.getString("project.name"));
  88:         setVersion(resources.getString("project.version"));
  89:         setInfo(resources.getString("project.info"));
  90:         setCopyright(resources.getString("project.copyright"));
  91: 
  92:         setLicenceName("LGPL");
  93:         setLicenceText(Licences.getInstance().getLGPL());
  94: 
  95:         setContributors(Arrays.asList(
  96:             new Contributor[] {
  97:                 new Contributor("Anthony Boulestreau", "-"),
  98:                 new Contributor("Jeremy Bowman", "-"),
  99:                 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: }