import java.io.InputStreamReader;
import java.io.Reader;
import java.net.URL;
+import java.util.Locale;
+import java.util.Map;
import java.util.Properties;
import java.util.logging.ConsoleHandler;
import java.util.logging.Level;
import swingjs.api.JSUtilI;
+////////THIS FILE IS NOW OUTDATED /////////////
+
/**
* System platform information used by Applet and Application
*
String key = "";
String value = "";
@SuppressWarnings("unused")
- Object info = jsutil.getAppletAttribute("__Info");
+ Object info = getAppletInfo(null);
/**
* @j2sNative for (key in info) { value = info[key];
*/
}
+ @SuppressWarnings("unchecked")
+ public static Object getAppletInfo(String key)
+ {
+ return (isJS ? (Map<String, Object>) jsutil.getAppletInfo(key) : null);
+ }
+
+ /**
+ * Option to avoid unnecessary seeking of nonexistent resources in JavaScript.
+ * Works in Java as well.
+ *
+ * @param loc
+ * @return
+ */
+ public static Locale getLocaleOrNone(Locale loc)
+ {
+ return (isJS && loc.getCountry() == "en" ? new Locale("") : loc);
+ }
+
}