[Polycasso-commit] SF.net SVN: polycasso:[36] trunk/polycasso/src/com/mebigfatguy/polycasso/ Polyca
Brought to you by:
dbrosius
|
From: <dbr...@us...> - 2009-11-24 05:34:21
|
Revision: 36
http://polycasso.svn.sourceforge.net/polycasso/?rev=36&view=rev
Author: dbrosius
Date: 2009-11-24 05:34:14 +0000 (Tue, 24 Nov 2009)
Log Message:
-----------
javadoc
Modified Paths:
--------------
trunk/polycasso/src/com/mebigfatguy/polycasso/PolycassoBundle.java
Modified: trunk/polycasso/src/com/mebigfatguy/polycasso/PolycassoBundle.java
===================================================================
--- trunk/polycasso/src/com/mebigfatguy/polycasso/PolycassoBundle.java 2009-11-24 05:31:28 UTC (rev 35)
+++ trunk/polycasso/src/com/mebigfatguy/polycasso/PolycassoBundle.java 2009-11-24 05:34:14 UTC (rev 36)
@@ -20,8 +20,14 @@
import java.util.ResourceBundle;
+/**
+ * manages the resource bundle properties file for this application
+ */
public class PolycassoBundle {
+ /**
+ * an enumeration of all the possible entries in the bundle
+ */
enum Key {
Title("pc.title"),
File("pc.file"),
@@ -30,10 +36,20 @@
String id;
+ /**
+ * creates a key given the properties file name
+ *
+ * @param id the properties file entry name
+ */
Key(String id) {
this.id = id;
}
+ /**
+ * retrieves the properties file entry name for this Key
+ *
+ * @return the properties file entry name id
+ */
public String id() {
return id;
}
@@ -41,10 +57,19 @@
private static ResourceBundle bundle = ResourceBundle.getBundle("com/mebigfatguy/polycasso/resource");
+ /**
+ * protects this class from being instantiated as it is meant to be accessed as a static class
+ */
private PolycassoBundle() {
}
+ /**
+ * retrieves a string from a resource bundle given a key
+ *
+ * @param key the key of the property item that is to be retrieved
+ * @return the string representing the localized name
+ */
public static String getString(Key key) {
return bundle.getString(key.id());
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|