KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > batik > transcoder > image > resources > Messages


1 /*
2
3    Copyright 1999-2003 The Apache Software Foundation
4
5    Licensed under the Apache License, Version 2.0 (the "License");
6    you may not use this file except in compliance with the License.
7    You may obtain a copy of the License at
8
9        http://www.apache.org/licenses/LICENSE-2.0
10
11    Unless required by applicable law or agreed to in writing, software
12    distributed under the License is distributed on an "AS IS" BASIS,
13    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14    See the License for the specific language governing permissions and
15    limitations under the License.
16
17 */

18
19 package org.apache.batik.transcoder.image.resources;
20
21 import java.util.Locale JavaDoc;
22 import java.util.MissingResourceException JavaDoc;
23
24 import org.apache.batik.i18n.LocalizableSupport;
25
26 /**
27  * This class manages the message for the image transcoder module.
28  *
29  * @author <a HREF="mailto:tkormann@apache.org">Thierry Kormann</a>
30  * @version $Id: Messages.java,v 1.5 2004/10/30 18:38:06 deweese Exp $
31  */

32 public class Messages {
33     /**
34      * This class does not need to be instantiated.
35      */

36     protected Messages() {
37     }
38
39     /**
40      * The error messages bundle class name.
41      */

42     protected final static String JavaDoc RESOURCES =
43         "org.apache.batik.transcoder.image.resources.Messages";
44
45     /**
46      * The localizable support for the error messages.
47      */

48     protected static LocalizableSupport localizableSupport =
49         new LocalizableSupport(RESOURCES, Messages.class.getClassLoader());
50
51
52     /**
53      * Implements {@link org.apache.batik.i18n.Localizable#setLocale(Locale)}.
54      */

55     public static void setLocale(Locale JavaDoc l) {
56         localizableSupport.setLocale(l);
57     }
58
59     /**
60      * Implements {@link org.apache.batik.i18n.Localizable#getLocale()}.
61      */

62     public static Locale JavaDoc getLocale() {
63         return localizableSupport.getLocale();
64     }
65
66     /**
67      * Implements {@link
68      * org.apache.batik.i18n.Localizable#formatMessage(String,Object[])}.
69      */

70     public static String JavaDoc formatMessage(String JavaDoc key, Object JavaDoc[] args)
71         throws MissingResourceException JavaDoc {
72         return localizableSupport.formatMessage(key, args);
73     }
74 }
75
Popular Tags