View Javadoc
1 /* 2 * Resources 3 * 4 * $RCSfile: Resources.java,v $ 5 * $Revision: 1.1 $ 6 * $Date: 2004/01/01 17:41:45 $ 7 * $Source: /cvsroot/jpui/jpui/src/Resources.java,v $ 8 * 9 * JPUI - Java Preferences User Interface 10 * Copyright (C) 2003 11 * 12 * This program is free software; you can redistribute it and/or modify it 13 * under the terms of the GNU General Public License as published by the Free 14 * Software Foundation; either version 2 of the License, or (at your option) 15 * any later version. 16 * 17 * This program is distributed in the hope that it will be useful, but WITHOUT 18 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 19 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 20 * more details. 21 * 22 * You should have received a copy of the GNU General Public License along with 23 * this program; if not, write to the Free Software Foundation, Inc., 59 Temple 24 * Place, Suite 330, Boston, MA 02111-1307 USA 25 * 26 * Author: macksold@users.sourceforge.net 27 */ 28 29 import java.util.PropertyResourceBundle; 30 import java.util.ResourceBundle; 31 32 /*** 33 * exposes i18n resources for JPUI as a singleton 34 */ 35 public class Resources { 36 // application resource bundle 37 private static ResourceBundle moBundle; 38 // singleton instance 39 private static Resources moInstance = new Resources(); 40 41 /*** 42 * private ctor 43 */ 44 private Resources() { 45 moBundle = PropertyResourceBundle.getBundle("Resources"); 46 } 47 48 /*** 49 * Retrieve the locale specific string for given key 50 * @param sKey 51 * @return 52 */ 53 public static String getString(String sKey) { 54 return moBundle.getString(sKey); 55 } 56 }

This page was automatically generated by Maven