Skip to content
Snippets Groups Projects
Commit c69d3277 authored by tjc's avatar tjc
Browse files

add proxy settings to options dialog

git-svn-id: svn+ssh://svn.internal.sanger.ac.uk/repos/svn/pathsoft/artemis/trunk@10602 ee4ac58c-ac51-4696-9907-e4b3aa274f04
parent 3247cad1
Branches
Tags
No related merge requests found
......@@ -253,6 +253,8 @@ public class LookSeqPanel extends JPanel
setPreferredSize(new Dimension(ii.getIconWidth(),
ii.getIconHeight()));
logger4j.debug("LookSeq URL :: "+urlStr+queryStr);
logger4j.debug("Proxy Settings :: "+System.getProperty("http.proxyHost")+":"+
System.getProperty("http.proxyPort"));
}
catch (MalformedURLException e)
{
......@@ -496,6 +498,36 @@ public class LookSeqPanel extends JPanel
c.anchor = GridBagConstraints.WEST;
optionsPanel.add(laneField, c);
String proxyHost = "";
if(System.getProperty("http.proxyHost") != null)
proxyHost = System.getProperty("http.proxyHost");
final JTextField proxyHostField = new JTextField(proxyHost,40);
c.gridy = 3;
c.gridx = 0;
c.anchor = GridBagConstraints.EAST;
optionsPanel.add(new JLabel("Proxy Host:"), c);
c.gridx = 1;
c.anchor = GridBagConstraints.WEST;
optionsPanel.add(proxyHostField, c);
String proxyPort = "";
if(System.getProperty("http.proxyPort") != null)
proxyPort = System.getProperty("http.proxyPort");
final JTextField proxyPortField = new JTextField(proxyPort,40);
c.gridy = 4;
c.gridx = 0;
c.anchor = GridBagConstraints.EAST;
optionsPanel.add(new JLabel("Proxy Port:"), c);
c.gridx = 1;
c.anchor = GridBagConstraints.WEST;
optionsPanel.add(proxyPortField, c);
String window_options[] = { "Display" };
int select = JOptionPane.showOptionDialog(null,
optionsPanel,
......@@ -503,6 +535,12 @@ public class LookSeqPanel extends JPanel
JOptionPane.QUESTION_MESSAGE, null, window_options,
window_options[0]);
if(!proxyHostField.getText().trim().equals(""))
{
System.getProperties().put("http.proxyHost", proxyHostField.getText().trim());
System.getProperties().put("http.proxyPort", proxyPortField.getText().trim());
}
urlStr = urlStrField.getText().trim();
queryStr = queryStr.replaceFirst(
"chr=[^&]+", "chr="+sampleField.getText().trim());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment