JCommonInfo.java 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. /* ========================================================================
  2. * JCommon : a free general purpose class library for the Java(tm) platform
  3. * ========================================================================
  4. *
  5. * (C) Copyright 2000-2011, 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-2011, 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.9 2011/10/17 21:26:06 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. package org.jfree;
  45. import java.util.Arrays;
  46. import java.util.ResourceBundle;
  47. import org.jfree.base.BaseBoot;
  48. import org.jfree.base.Library;
  49. import org.jfree.ui.about.Contributor;
  50. import org.jfree.ui.about.Licences;
  51. import org.jfree.ui.about.ProjectInfo;
  52. import org.jfree.util.ResourceBundleWrapper;
  53. /**
  54. * Information about the JCommon project. One instance of this class is
  55. * assigned to JCommon.INFO.
  56. *
  57. * @author David Gilbert
  58. */
  59. public class JCommonInfo extends ProjectInfo {
  60. /** The singleton instance of the project info object. */
  61. private static JCommonInfo singleton;
  62. /**
  63. * Returns the single instance of this class.
  64. *
  65. * @return The single instance of information about the JCommon library.
  66. */
  67. public static synchronized JCommonInfo getInstance() {
  68. if (singleton == null) {
  69. singleton = new JCommonInfo();
  70. }
  71. return singleton;
  72. }
  73. /**
  74. * Creates a new instance.
  75. */
  76. private JCommonInfo() {
  77. // get a locale-specific resource bundle...
  78. final String baseResourceClass = "org.jfree.resources.JCommonResources";
  79. final ResourceBundle resources = ResourceBundleWrapper.getBundle(
  80. baseResourceClass);
  81. setName(resources.getString("project.name"));
  82. setVersion(resources.getString("project.version"));
  83. setInfo(resources.getString("project.info"));
  84. setCopyright(resources.getString("project.copyright"));
  85. setLicenceName("LGPL");
  86. setLicenceText(Licences.getInstance().getLGPL());
  87. setContributors(Arrays.asList(
  88. new Contributor[] {
  89. new Contributor("Anthony Boulestreau", "-"),
  90. new Contributor("Jeremy Bowman", "-"),
  91. new Contributor("J. David Eisenberg", "-"),
  92. new Contributor("Paul English", "-"),
  93. new Contributor("David Gilbert",
  94. "david.gilbert@object-refinery.com"),
  95. new Contributor("Hans-Jurgen Greiner", "-"),
  96. new Contributor("Arik Levin", "-"),
  97. new Contributor("Achilleus Mantzios", "-"),
  98. new Contributor("Thomas Meier", "-"),
  99. new Contributor("Aaron Metzger", "-"),
  100. new Contributor("Thomas Morgner", "-"),
  101. new Contributor("Krzysztof Paz", "-"),
  102. new Contributor("Nabuo Tamemasa", "-"),
  103. new Contributor("Mark Watson", "-"),
  104. new Contributor("Matthew Wright", "-"),
  105. new Contributor("Hari", "-"),
  106. new Contributor("Sam (oldman)", "-")
  107. }
  108. ));
  109. addOptionalLibrary(new Library("JUnit", "3.8", "IBM Public Licence",
  110. "http://www.junit.org/"));
  111. setBootClass(BaseBoot.class.getName());
  112. }
  113. }