sventon subversion web client - http://www.sventon.org
[show recent changes]
 
  Help
HEAD
Rev: 12778 - svn://svn.freehep.org/svn / wired / trunk / wired-glast / src / main / java / hep / wired / glast / GleamLaunchWizardPage.java
Unified Diff View - GleamLaunchWizardPage.java
Search for Help
/wired/trunk/wired-glast/src/main/java/hep/wired/glast/GleamLaunchWizardPage.java @ revision 12777
/wired/trunk/wired-glast/src/main/java/hep/wired/glast/GleamLaunchWizardPage.java @ revision 12778
@@ -1,4 +1,4 @@ -// Copyright 2006, FreeHEP +// Copyright 2006-2007, FreeHEP package hep.wired.glast; import java.awt.BorderLayout; @@ -47,23 +47,27 @@ /**  *  * @author duns - * @version $Id: GleamLaunchWizardPage.java 8598 2006-08-14 20:38:02Z duns $ + * @version $Id: GleamLaunchWizardPage.java 12778 2007-06-15 18:21:50Z duns $  */ public class GleamLaunchWizardPage extends WizardPage implements HasNextPages { -    private static final String defaultHost = "glast-heprep01.slac.stanford.edu"; -    private static final int defaultPort = 22; -    private static final String defaultDSA = System.getProperty("user.home")+"/.ssh/id_dsa"; -    private static final String defaultScript = "/u/gl/glast/heprepserver/dc2/ssh_gleam_server"; +    private static String defaultHost = "glast-heprep01.slac.stanford.edu"; +    private static int defaultPort = 22; +    private static String defaultDSA = System.getProperty("user.home")+"/.ssh/id_dsa"; +    private static String defaultScript = "/u/gl/glast/heprepserver/dc2/ssh_gleam_server"; + +    private static final String defaultHostKey = Gleam.key +"defaultHost"; +    private static final String defaultPortKey = Gleam.key + "defaultPort"; +    private static final String defaultDSAKey = Gleam.key + "defaultDSA"; +    private static final String defaultScriptKey = Gleam.key + "defaultScript"; -    private static final String key = "hep.wired.glast.gleam."; -    private static final String hostKey = key+"host"; -    private static final String portKey = key+"port"; -    private static final String userKey = key+"user"; -    private static final String usePlainPasswordKey = key+"usePlainPassword"; -    private static final String useDSAKey = key+"useDSA"; -    private static final String dsaKey = key+"dsa"; -    private static final String scriptKey = key+"script"; +    private static final String hostKey = Gleam.key+"host"; +    private static final String portKey = Gleam.key+"port"; +    private static final String userKey = Gleam.key+"user"; +    private static final String usePlainPasswordKey = Gleam.key+"usePlainPassword"; +    private static final String useDSAKey = Gleam.key+"useDSA"; +    private static final String dsaKey = Gleam.key+"dsa"; +    private static final String scriptKey = Gleam.key+"script";     private Properties properties; @@ -72,7 +76,7 @@     private boolean hostValid;     private JTextField port; -    private int portNumber = defaultPort; +    private int portNumber;     private RecentComboBox user;     private List users; @@ -103,6 +107,9 @@         properties = Application.getApplication().getUserProperties(); +        defaultPort = PropertyUtilities.getInteger(properties, defaultPortKey, defaultPort); +        portNumber = defaultPort; +         setLayout(new BorderLayout());         JPanel box = new JPanel(); @@ -110,6 +117,7 @@         add(box, BorderLayout.CENTER);         hosts = new ArrayList(); +        defaultHost = PropertyUtilities.getString(properties, defaultHostKey, defaultHost);         hosts.add(defaultHost);         hosts = (List)PropertyUtilities.getStringCollection(properties, hostKey, hosts);         hostValid = true; @@ -140,7 +148,7 @@             };         }; -        port = new JTextField(PropertyUtilities.getString(properties, portKey, String.valueOf(defaultPort)), 5); +        port = new JTextField(String.valueOf(portNumber), 5);         port.addCaretListener(new CaretListener() {             public void caretUpdate(javax.swing.event.CaretEvent e) {                doEnable(); @@ -212,6 +220,7 @@         });         dsas = new ArrayList(); +        defaultDSA = PropertyUtilities.getString(properties, defaultDSAKey, defaultDSA);         dsas.add(defaultDSA);         dsas = (List)PropertyUtilities.getStringCollection(properties, dsaKey, dsas);         dsa = new RecentComboBox(dsas) { @@ -273,6 +282,7 @@         userBox.add("4 * [3 3 3 3] l", dsaDefault);         scripts = new ArrayList(); +        defaultScript = PropertyUtilities.getString(properties, defaultScriptKey, defaultScript);         scripts.add(defaultScript);         scripts = (List)PropertyUtilities.getStringCollection(properties, scriptKey, scripts);         scriptValid = true;


feed icon

sventon 2.5.1