import java.nio.file.Path;
import java.nio.file.attribute.BasicFileAttributes;
import java.util.Date;
+import java.util.Locale;
import java.util.Map;
import java.util.Properties;
import java.util.logging.ConsoleHandler;
*/
public static String getAppID(String frameType)
{
+
String id = Jalview.getInstance().j2sAppletID;
if (id == null)
{
- Jalview.getInstance().j2sAppletID = id = (String) jsutil
- .getAppletAttribute("_id");
+ Jalview.getInstance().j2sAppletID = id = (isJS ? (String) jsutil
+ .getAppletAttribute("_id") : "jalview");
}
return id + (frameType == null ? "" : "-" + frameType);
}
+
+ /**
+ * 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);
+ }
+
}