import javax.swing.LookAndFeel;
import javax.swing.UIManager;
-
import jalview.bin.ApplicationSingletonProvider.ApplicationSingletonI;
import jalview.datamodel.PDBEntry;
import jalview.gui.Preferences;
*/
public class Cache implements ApplicationSingletonI
{
+
private Cache()
{
// private singleton
{
return (Cache) ApplicationSingletonProvider.getInstance(Cache.class);
}
+
/**
* property giving log4j level for CASTOR loggers
*/
*/
public static final String DEFAULT_SIFTS_DOWNLOAD_DIR = Platform.getUserPath(".sifts_downloads/");
-
private final static String DEFAULT_CACHE_THRESHOLD_IN_DAYS = "2";
private final static String DEFAULT_FAIL_SAFE_PID_THRESHOLD = "30";
*/
public static void loadProperties(String propsFile)
{
+
getInstance().loadPropertiesImpl(propsFile);
}
private void loadPropertiesImpl(String propsFile)
{
+
propertiesFile = propsFile;
String releasePropertiesFile = null;
boolean defaultProperties = false;
System.out.println(
"Disabling Jalview writing to user's local properties file.");
propsAreReadOnly = true;
+
} catch (Exception ex)
{
fis = null;
System.out.println("Error reading properties file: " + ex);
}
}
-
/* TO BE REPLACED WITH PROXY_TYPE SETTINGS
if (getDefault("USE_PROXY", false))
{
&& (System.getProperty("java.awt.headless") == null || System
.getProperty("java.awt.headless").equals("false")))
{
-
class VersionChecker extends Thread
{
-
@Override
public void run()
{
String remoteBuildPropertiesUrl = Cache
.getAppbaseBuildProperties();
-
String orgtimeout = System
.getProperty("sun.net.client.defaultConnectTimeout");
if (orgtimeout == null)
return Cache.getDefault("INSTALLATION", "unknown");
}
-
/**
*
* For AppletParams and Preferences ok_actionPerformed and