Esempio n. 1
0
 /** Called once when ImageJ quits. */
 public void savePreferences(Properties prefs) {
   Point loc = getLocation();
   prefs.put(IJ_X, Integer.toString(loc.x));
   prefs.put(IJ_Y, Integer.toString(loc.y));
   // prefs.put(IJ_WIDTH, Integer.toString(size.width));
   // prefs.put(IJ_HEIGHT, Integer.toString(size.height));
 }
Esempio n. 2
0
 void configureProxy() {
   if (Prefs.useSystemProxies) {
     try {
       System.setProperty("java.net.useSystemProxies", "true");
     } catch (Exception e) {
     }
   } else {
     String server = Prefs.get("proxy.server", null);
     if (server == null || server.equals("")) return;
     int port = (int) Prefs.get("proxy.port", 0);
     if (port == 0) return;
     Properties props = System.getProperties();
     props.put("proxySet", "true");
     props.put("http.proxyHost", server);
     props.put("http.proxyPort", "" + port);
   }
   // new ProxySettings().logProperties();
 }