aboutsummaryrefslogtreecommitdiffstats
path: root/netx/net/sourceforge/jnlp/controlpanel
diff options
context:
space:
mode:
authorAndrew Su <[email protected]>2010-12-23 16:45:37 -0500
committerAndrew Su <[email protected]>2010-12-23 16:45:37 -0500
commit6acb9912526793132a39489ebd7e8a799ff3165d (patch)
tree4a3388cabb1c74512efb7575b54044b9ee6664a4 /netx/net/sourceforge/jnlp/controlpanel
parent6cd5997e86146410c93b63d21a1fe1522e390051 (diff)
Remove creation of swing thread for displaying dialogs.
Diffstat (limited to 'netx/net/sourceforge/jnlp/controlpanel')
-rw-r--r--netx/net/sourceforge/jnlp/controlpanel/AdvancedProxySettingsDialog.java19
-rw-r--r--netx/net/sourceforge/jnlp/controlpanel/CacheViewer.java3
-rw-r--r--netx/net/sourceforge/jnlp/controlpanel/NetworkSettingsPanel.java14
-rw-r--r--netx/net/sourceforge/jnlp/controlpanel/TemporaryInternetFilesPanel.java15
4 files changed, 13 insertions, 38 deletions
diff --git a/netx/net/sourceforge/jnlp/controlpanel/AdvancedProxySettingsDialog.java b/netx/net/sourceforge/jnlp/controlpanel/AdvancedProxySettingsDialog.java
index 8a74ca1..ee92fa6 100644
--- a/netx/net/sourceforge/jnlp/controlpanel/AdvancedProxySettingsDialog.java
+++ b/netx/net/sourceforge/jnlp/controlpanel/AdvancedProxySettingsDialog.java
@@ -116,21 +116,14 @@ public class AdvancedProxySettingsDialog extends JDialog {
*
* @param config
* A loaded DeploymentConfiguration file.
- * @throws Exception
*/
- public static void showAdvancedProxySettingsDialog(final DeploymentConfiguration config) throws Exception {
+ public static void showAdvancedProxySettingsDialog(final DeploymentConfiguration config) {
setSystemLookAndFeel();
- SwingUtilities.invokeLater(new Runnable() {
- @Override
- public void run() {
- AdvancedProxySettingsDialog psd = new AdvancedProxySettingsDialog(config);
- psd.setResizable(false);
- psd.centerDialog();
- psd.setVisible(true);
- psd.dispose();
- }
- });
-
+ AdvancedProxySettingsDialog psd = new AdvancedProxySettingsDialog(config);
+ psd.setResizable(false);
+ psd.centerDialog();
+ psd.setVisible(true);
+ psd.dispose();
}
/**
diff --git a/netx/net/sourceforge/jnlp/controlpanel/CacheViewer.java b/netx/net/sourceforge/jnlp/controlpanel/CacheViewer.java
index 0508981..6771d36 100644
--- a/netx/net/sourceforge/jnlp/controlpanel/CacheViewer.java
+++ b/netx/net/sourceforge/jnlp/controlpanel/CacheViewer.java
@@ -89,9 +89,8 @@ public class CacheViewer extends JDialog {
* Display the cache viewer.
*
* @param config Configuration file.
- * @throws Exception
*/
- public static void showCacheDialog(final DeploymentConfiguration config) throws Exception {
+ public static void showCacheDialog(final DeploymentConfiguration config) {
CacheViewer psd = new CacheViewer(config);
psd.setResizable(true);
psd.centerDialog();
diff --git a/netx/net/sourceforge/jnlp/controlpanel/NetworkSettingsPanel.java b/netx/net/sourceforge/jnlp/controlpanel/NetworkSettingsPanel.java
index cb41425..b1a6f95 100644
--- a/netx/net/sourceforge/jnlp/controlpanel/NetworkSettingsPanel.java
+++ b/netx/net/sourceforge/jnlp/controlpanel/NetworkSettingsPanel.java
@@ -115,22 +115,18 @@ public class NetworkSettingsPanel extends JPanel implements ActionListener {
JLabel portLabel = new JLabel(Translator.R("NSPort") + ":");
final JTextField addressField = new JTextField(config.getProperty(properties[1]), 10);
addressField.getDocument().addDocumentListener(new DocumentAdapter(config, properties[1]));
-
+
final JTextField portField = new JTextField(config.getProperty(properties[2]), 3);
portField.getDocument().addDocumentListener(new DocumentAdapter(config, properties[1]));
-
+
// Create the button which allows setting of other types of proxy.
JButton advancedProxyButton = new JButton(Translator.R("NSAdvanced") + "...");
advancedProxyButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
- try {
- AdvancedProxySettingsDialog.showAdvancedProxySettingsDialog(config);
- addressField.setText(config.getProperty(properties[1]));
- portField.setText(config.getProperty(properties[2]));
- } catch (Exception e1) {
- e1.printStackTrace();
- }
+ AdvancedProxySettingsDialog.showAdvancedProxySettingsDialog(config);
+ addressField.setText(config.getProperty(properties[1]));
+ portField.setText(config.getProperty(properties[2]));
}
});
diff --git a/netx/net/sourceforge/jnlp/controlpanel/TemporaryInternetFilesPanel.java b/netx/net/sourceforge/jnlp/controlpanel/TemporaryInternetFilesPanel.java
index bab888b..7278ec2 100644
--- a/netx/net/sourceforge/jnlp/controlpanel/TemporaryInternetFilesPanel.java
+++ b/netx/net/sourceforge/jnlp/controlpanel/TemporaryInternetFilesPanel.java
@@ -184,23 +184,10 @@ public class TemporaryInternetFilesPanel extends NamedBorderPanel implements Cha
JPanel buttonDeleteRestore = new JPanel(new FlowLayout(FlowLayout.TRAILING));
JButton bViewFiles = new JButton(Translator.R("TIFPViewFiles"));
bViewFiles.addActionListener(new ActionListener() {
-
@Override
public void actionPerformed(ActionEvent e) {
- SwingUtilities.invokeLater(new Runnable() {
- @Override
- public void run() {
- try {
- CacheViewer.showCacheDialog(config);
- } catch (Exception e1) {
- // TODO Auto-generated catch block
- e1.printStackTrace();
- }
-
- }
- });
+ CacheViewer.showCacheDialog(config);
}
-
});
buttonDeleteRestore.add(bViewFiles);