Skip to Content.
Sympa Menu

ndt-dev - [ndt-dev] [ndt] r846 committed - After closing pop up windows focus returns to the main window

Subject: NDT-DEV email list created

List archive

[ndt-dev] [ndt] r846 committed - After closing pop up windows focus returns to the main window


Chronological Thread 
  • From:
  • To:
  • Subject: [ndt-dev] [ndt] r846 committed - After closing pop up windows focus returns to the main window
  • Date: Tue, 15 Oct 2013 14:29:58 +0000

Revision: 846
Author:

Date: Tue Oct 15 14:29:50 2013 UTC
Log: After closing pop up windows focus returns to the main window
http://code.google.com/p/ndt/source/detail?r=846

Modified:
/branches/applet_usability/Applet/NewFrame.java
/branches/applet_usability/Applet/Tcpbw100.java

=======================================
--- /branches/applet_usability/Applet/NewFrame.java Mon Apr 30 20:46:39 2012 UTC
+++ /branches/applet_usability/Applet/NewFrame.java Tue Oct 15 14:29:50 2013 UTC
@@ -1,7 +1,8 @@
+import java.awt.*;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;

-import javax.swing.JFrame;
+import javax.swing.*;

/**
* Utility class that creates a new "Frame" with a window closing functionality.
@@ -19,17 +20,16 @@
*/
private static final long serialVersionUID = 8990839319520684317L;

- /**
- * Constructor
- **/
- public NewFrame() {
+ /**
+ * Constructor
+ **/
+ public NewFrame(final JApplet parent) throws HeadlessException {
addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent event) {
- // System.err.println("Handling window closing
event");
+ parent.requestFocus();
dispose();
}
});
- // System.err.println("Extended Frame class - RAC9/15/03");
}

} // class: NewFrame
=======================================
--- /branches/applet_usability/Applet/Tcpbw100.java Tue Oct 15 13:07:11 2013 UTC
+++ /branches/applet_usability/Applet/Tcpbw100.java Tue Oct 15 14:29:50 2013 UTC
@@ -79,12 +79,10 @@
import java.net.Inet6Address;
import java.net.InetAddress;
import java.net.InetSocketAddress;
-import java.net.MalformedURLException;
import java.net.ServerSocket;
import java.net.Socket;
import java.net.SocketException;
import java.net.URL;
-import java.net.URLEncoder;
import java.net.UnknownHostException;
import java.security.AccessController;
import java.security.PrivilegedAction;
@@ -909,7 +907,7 @@

// create new frame
if (_frameWeb100Vars == null) {
- _frameWeb100Vars = new NewFrame();
+ _frameWeb100Vars = new NewFrame(this);
}

// Get title for this window
@@ -948,7 +946,7 @@

// create new frame
if (_frameDetailedStats == null) {
- _frameDetailedStats = new NewFrame();
+ _frameDetailedStats = new NewFrame(this);
}
_frameDetailedStats.setTitle(_resBundDisplayMsgs
.getString("detailedStats"));
@@ -993,7 +991,7 @@
showStatus(_resBundDisplayMsgs.getString("showOptions"));

if (_frameOptions == null) {
- _frameOptions = new NewFrame();
+ _frameOptions = new NewFrame(this);

_frameOptions.setTitle(_resBundDisplayMsgs.getString("options"));

// main panel
@@ -1107,10 +1105,8 @@
}
// show details of tests since that button was clicked
else if (source == _buttonDetails) {
- _buttonDetails.setEnabled(false);
_frameWeb100Vars.setResizable(true);
_frameWeb100Vars.setVisible(true);
- _buttonDetails.setEnabled(true);
}
// "More Details" Web100 variables window to be closed
else if (source == _buttonDismiss) {
@@ -1148,7 +1144,6 @@
}
// Show "statistics" window
else if (source == _buttonStatistics) {
- _buttonStatistics.setEnabled(false);
_frameDetailedStats.setResizable(true);
_frameDetailedStats.setVisible(true);

@@ -1156,8 +1151,6 @@
// enable copy button only if there is
statistics informations
_buttonStatsCopy.setEnabled(true);
}
-
- _buttonStatistics.setEnabled(true);
}
// mail to functionality
else if (source == _buttonMailTo) {
@@ -1166,7 +1159,6 @@
// String to[], from[], comments[]; //commented out
unused variables
String sName, sHost;

- _buttonMailTo.setEnabled(false);
// invoke mailto: function

showStatus(_resBundDisplayMsgs.getString("invokingMailtoFunction")
+ "...");
@@ -1201,7 +1193,6 @@
_targetURL = new URL(sUrl);

getAppletContext().showDocument(_targetURL);
- _buttonMailTo.setEnabled(true);
} catch (Exception e) {
e.printStackTrace();



  • [ndt-dev] [ndt] r846 committed - After closing pop up windows focus returns to the main window, ndt, 10/15/2013

Archive powered by MHonArc 2.6.16.

Top of Page