KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > batik > swing > TestMessages


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

16
17 package org.apache.batik.swing;
18
19 import java.util.Locale JavaDoc;
20 import java.util.MissingResourceException JavaDoc;
21
22 import org.apache.batik.i18n.LocalizableSupport;
23
24 /**
25  * This class manages the message for the test.svg module.
26  *
27  * @author <a HREF="mailto:stephane@hillion.org">Stephane Hillion</a>
28  * @version $Id: TestMessages.java,v 1.4 2005/04/01 02:28:16 deweese Exp $
29  */

30 public class TestMessages {
31
32     /**
33      * This class does not need to be instantiated.
34      */

35     protected TestMessages() { }
36
37     /**
38      * The error messages bundle class name.
39      */

40     protected final static String JavaDoc RESOURCES =
41         "org.apache.batik.swing.resources.TestMessages";
42
43     /**
44      * The localizable support for the error messages.
45      */

46     protected static LocalizableSupport localizableSupport =
47         new LocalizableSupport(RESOURCES);
48
49     /**
50      * Implements {@link org.apache.batik.i18n.Localizable#setLocale(Locale)}.
51      */

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

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

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