Main Page | Packages | Class Hierarchy | Alphabetical List | Class List | File List | Class Members

com/ohrasys/app/gdsparser/GDSParserI18NFactory.java

Go to the documentation of this file.
00001 /* Copyright (C) 2004 Thomas N. Valine
00002  * tvaline@users.sourceforge.net
00003  *
00004  * This program is free software; you can redistribute it and/or
00005  * modify it under the terms of the GNU General Public License
00006  * as published by the Free Software Foundation; either version 2
00007  * of the License, or (at your option) any later version.
00008  *
00009  * This program is distributed in the hope that it will be useful,
00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  * GNU General Public License for more details.
00013  *
00014  * You should have received a copy of the GNU General Public License
00015  * along with this program; if not, write to the Free Software
00016  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
00017  * 02111-1307, USA. */
00018 
00019 package com.ohrasys.app.gdsparser;
00020 import java.io.*;
00021 import java.util.*;
00022 
00031 final class GDSParserI18NFactory {
00033   protected static final String res =
00034     "com/ohrasys/app/gdsparser/GDSParserProperties" /*NOI18N*/;
00035 
00037   public static final String i18n_INFO = "I18N_INFO" /*NOI18N*/;
00038 
00040   public static final String i18n_ERROR = "I18N_ERROR" /*NOI18N*/;
00041 
00043   public static final String i18n_INFO_LOG_SET_TO =
00044     "I18N_INFO_LOG_SET_TO" /*NOI18N*/;
00045 
00047   public static final String i18n_INFO_GDS_SET_TO =
00048     "I18N_INFO_GDS_SET_TO" /*NOI18N*/;
00049 
00051   public static final String i18n_INFO_DONE = "I18N_INFO_DONE" /*NOI18N*/;
00052 
00054   public static final String i18n_USAGE_START = "I18N_USAGE_START" /*NOI18N*/;
00055 
00057   public static final String i18n_APP_VERSION = "I18N_APP_VERSION" /*NOI18N*/;
00058 
00060   public static final String i18n_APP_COPY = "I18N_APP_COPY" /*NOI18N*/;
00061 
00063   public static final String i18n_APP_TITLE = "I18N_APP_TITLE" /*NOI18N*/;
00064 
00066   public static final String i18n_ERROR_TITLE = "I18N_ERROR_TITLE" /*NOI18N*/;
00067 
00075   public static String getString(String key) {
00076     return ResourceBundle.getBundle(res).getString(key);
00077   }
00078 
00087   public static String sprintf(String format, Object... args) {
00088     StringWriter s = new StringWriter(format.length() * 2);
00089     PrintWriter  p = new PrintWriter(s);
00090     p.printf(format, args);
00091     p.flush();
00092     String result = s.toString();
00093     p.close();
00094     try {
00095       s.close();
00096     } catch(IOException e) {
00097       /* Can't do anything now */
00098     }
00099 
00100     return result;
00101   }
00102 
00108   public String toString(){return super.toString();}
00109 } // end class GDSParserI18NFactory
00110 
00111 
00112 /* This material is distributed under the GNU General Public License.
00113  * For more information please go to http://www.gnu.org/copyleft/gpl.html */

Generated on Mon May 23 13:48:55 2005 for Java GDS Parser (JGDSParser) by  doxygen 1.4.2