git://source.jalview.org
/
jalview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'Jalview-JS/develop' into merge_js_develop
[jalview.git]
/
src
/
jalview
/
gui
/
WsPreferences.java
diff --git
a/src/jalview/gui/WsPreferences.java
b/src/jalview/gui/WsPreferences.java
index
51b40dd
..
cf88718
100644
(file)
--- a/
src/jalview/gui/WsPreferences.java
+++ b/
src/jalview/gui/WsPreferences.java
@@
-20,12
+20,6
@@
*/
package jalview.gui;
*/
package jalview.gui;
-import jalview.bin.Cache;
-import jalview.jbgui.GWsPreferences;
-import jalview.util.MessageManager;
-import jalview.ws.WSDiscovererI;
-import jalview.ws.jws2.Jws2Discoverer;
-import jalview.ws.rest.RestServiceDescription;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.BorderLayout;
import java.awt.Color;
@@
-45,6
+39,13
@@
import javax.swing.JTextField;
import javax.swing.table.AbstractTableModel;
import javax.swing.table.TableCellRenderer;
import javax.swing.table.AbstractTableModel;
import javax.swing.table.TableCellRenderer;
+import jalview.bin.Cache;
+import jalview.jbgui.GWsPreferences;
+import jalview.util.MessageManager;
+import jalview.ws.WSDiscovererI;
+import jalview.ws.jws2.Jws2Discoverer;
+import jalview.ws.rest.RestServiceDescription;
+
public class WsPreferences extends GWsPreferences
{
public class WsPreferences extends GWsPreferences
{
@@
-66,7
+67,7
@@
public class WsPreferences extends GWsPreferences
private void initFromPreferences()
{
private void initFromPreferences()
{
- wsUrls = Jws2Discoverer.getDiscoverer().getServiceUrls();
+ wsUrls = Jws2Discoverer.getInstance().getServiceUrls();
if (!wsUrls.isEmpty())
{
oldUrls = new Vector<String>(wsUrls);
if (!wsUrls.isEmpty())
{
oldUrls = new Vector<String>(wsUrls);
@@
-123,7
+124,7
@@
public class WsPreferences extends GWsPreferences
int r = 0;
for (String url : wsUrls)
{
int r = 0;
for (String url : wsUrls)
{
- int status = Jws2Discoverer.getDiscoverer().getServerStatusFor(url);
+ int status = Jws2Discoverer.getInstance().getServerStatusFor(url);
tdat[r][1] = Integer.valueOf(status);
tdat[r++][0] = url;
}
tdat[r][1] = Integer.valueOf(status);
tdat[r++][0] = url;
}
@@
-243,7
+244,7
@@
public class WsPreferences extends GWsPreferences
private void updateServiceList()
{
private void updateServiceList()
{
- Jws2Discoverer.getDiscoverer().setServiceUrls(wsUrls);
+ Jws2Discoverer.getInstance().setServiceUrls(wsUrls);
}
private void updateRsbsServiceList()
}
private void updateRsbsServiceList()
@@
-456,7
+457,7
@@
public class WsPreferences extends GWsPreferences
boolean valid = false;
int resp = JvOptionPane.CANCEL_OPTION;
while (!valid && (resp = JvOptionPane.showInternalConfirmDialog(
boolean valid = false;
int resp = JvOptionPane.CANCEL_OPTION;
while (!valid && (resp = JvOptionPane.showInternalConfirmDialog(
- Desktop.desktop, panel, title,
+ Desktop.getDesktopPane(), panel, title,
JvOptionPane.OK_CANCEL_OPTION)) == JvOptionPane.OK_OPTION)
{
try
JvOptionPane.OK_CANCEL_OPTION)) == JvOptionPane.OK_OPTION)
{
try
@@
-474,26
+475,26
@@
public class WsPreferences extends GWsPreferences
} catch (Exception e)
{
valid = false;
} catch (Exception e)
{
valid = false;
- JvOptionPane.showInternalMessageDialog(Desktop.desktop,
+ JvOptionPane.showInternalMessageDialog(Desktop.getDesktopPane(),
MessageManager.getString("label.invalid_url"));
}
}
if (valid && resp == JvOptionPane.OK_OPTION)
{
MessageManager.getString("label.invalid_url"));
}
}
if (valid && resp == JvOptionPane.OK_OPTION)
{
- int validate = JvOptionPane.showInternalConfirmDialog(Desktop.desktop,
+ int validate = JvOptionPane.showInternalConfirmDialog(Desktop.getDesktopPane(),
MessageManager.getString("info.validate_jabaws_server"),
MessageManager.getString("label.test_server"),
JvOptionPane.YES_NO_OPTION);
if (validate == JvOptionPane.OK_OPTION)
{
MessageManager.getString("info.validate_jabaws_server"),
MessageManager.getString("label.test_server"),
JvOptionPane.YES_NO_OPTION);
if (validate == JvOptionPane.OK_OPTION)
{
- if (Jws2Discoverer.getDiscoverer().testServiceUrl(foo))
+ if (Jws2Discoverer.getInstance().testServiceUrl(foo))
{
return foo.toString();
}
else
{
{
return foo.toString();
}
else
{
- int opt = JvOptionPane.showInternalOptionDialog(Desktop.desktop,
+ int opt = JvOptionPane.showInternalOptionDialog(Desktop.getDesktopPane(),
"The Server '" + foo.toString()
+ "' failed validation,\ndo you want to add it anyway? ",
"Server Validation Failed", JvOptionPane.YES_NO_OPTION,
"The Server '" + foo.toString()
+ "' failed validation,\ndo you want to add it anyway? ",
"Server Validation Failed", JvOptionPane.YES_NO_OPTION,
@@
-504,7
+505,7
@@
public class WsPreferences extends GWsPreferences
}
else
{
}
else
{
- JvOptionPane.showInternalMessageDialog(Desktop.desktop,
+ JvOptionPane.showInternalMessageDialog(Desktop.getDesktopPane(),
MessageManager.getString(
"warn.server_didnt_pass_validation"));
}
MessageManager.getString(
"warn.server_didnt_pass_validation"));
}
@@
-597,7
+598,7
@@
public class WsPreferences extends GWsPreferences
if (lastrefresh != update)
{
lastrefresh = update;
if (lastrefresh != update)
{
lastrefresh = update;
- Desktop.instance.startServiceDiscovery(true); // wait around for all
+ Desktop.getInstance().startServiceDiscovery(true); // wait around for all
// threads to complete
updateList();
// threads to complete
updateList();
@@
-618,15
+619,15
@@
public class WsPreferences extends GWsPreferences
public void run()
{
long ct = System.currentTimeMillis();
public void run()
{
long ct = System.currentTimeMillis();
- Desktop.instance.setProgressBar(MessageManager
+ Desktop.getInstance().setProgressBar(MessageManager
.getString("status.refreshing_web_service_menus"), ct);
if (lastrefresh != update)
{
lastrefresh = update;
.getString("status.refreshing_web_service_menus"), ct);
if (lastrefresh != update)
{
lastrefresh = update;
- Desktop.instance.startServiceDiscovery(true);
+ Desktop.getInstance().startServiceDiscovery(true);
updateList();
}
updateList();
}
- Desktop.instance.setProgressBar(null, ct);
+ Desktop.getInstance().setProgressBar(null, ct);
}
}).start();
}
}).start();
@@
-648,8
+649,8
@@
public class WsPreferences extends GWsPreferences
@Override
protected void resetWs_actionPerformed(ActionEvent e)
{
@Override
protected void resetWs_actionPerformed(ActionEvent e)
{
- Jws2Discoverer.getDiscoverer().setServiceUrls(null);
- List<String> nwsUrls = Jws2Discoverer.getDiscoverer().getServiceUrls();
+ Jws2Discoverer.getInstance().setServiceUrls(null);
+ List<String> nwsUrls = Jws2Discoverer.getInstance().getServiceUrls();
if (!wsUrls.equals(nwsUrls))
{
update++;
if (!wsUrls.equals(nwsUrls))
{
update++;