Skip to Content.
Sympa Menu

ndt-dev - [ndt-dev] [ndt] r839 committed - Fix issues in Statistics Pop up window....

Subject: NDT-DEV email list created

List archive

[ndt-dev] [ndt] r839 committed - Fix issues in Statistics Pop up window....


Chronological Thread 
  • From:
  • To:
  • Subject: [ndt-dev] [ndt] r839 committed - Fix issues in Statistics Pop up window....
  • Date: Thu, 10 Oct 2013 13:33:09 +0000

Revision: 839
Author:

Date: Thu Oct 10 13:32:52 2013 UTC
Log: Fix issues in Statistics Pop up window.
The 'Copy' button will be enabled, if there are statistics. Also a user can't change data in statistics pop up window.
http://code.google.com/p/ndt/source/detail?r=839

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

=======================================
--- /branches/applet_usability/Applet/NDTUtils.java Thu Oct 10 08:36:25 2013 UTC
+++ /branches/applet_usability/Applet/NDTUtils.java Thu Oct 10 13:32:52 2013 UTC
@@ -92,4 +92,15 @@
return str == null || str.length() == 0;
} // isEmpty() method ends

+ /**
+ * Utility method to check if the given string is not empty ("") or
null.
+ *
+ * @param str
+ * String to check
+ * @return true is the given string is not empty; otherwise false
+ */
+ public static boolean isNotEmpty(String str) {
+ return !isEmpty(str);
+ } // isNotEmpty() method ends
+
}
=======================================
--- /branches/applet_usability/Applet/Tcpbw100.java Thu Oct 10 08:36:25 2013 UTC
+++ /branches/applet_usability/Applet/Tcpbw100.java Thu Oct 10 13:32:52 2013 UTC
@@ -966,7 +966,7 @@
// Text area for Statistics, add "heading"
_txtStatistics = new JTextArea(
_resBundDisplayMsgs.getString("web100Stats") +
":\n", 25, 70);
- _txtStatistics.setEditable(true);
+ _txtStatistics.setEditable(false);
_buttonStatsDismiss.setEnabled(true);
_buttonStatsCopy.setEnabled(_bCanCopy);

@@ -1142,13 +1142,18 @@
String sTemp = _txtStatistics.getText();
StringSelection ssTemp = new StringSelection(sTemp);
clipbd.setContents(ssTemp, ssTemp);
- _txtStatistics.selectAll();
}
// Show "statistics" window
else if (source == _buttonStatistics) {
_buttonStatistics.setEnabled(false);
_frameDetailedStats.setResizable(true);
_frameDetailedStats.setVisible(true);
+
+ if (NDTUtils.isNotEmpty(_txtStatistics.getText())) {
+ // enable copy button only if there is
statistics informations
+ _buttonStatsCopy.setEnabled(true);
+ }
+
_buttonStatistics.setEnabled(true);
}
// mail to functionality


  • [ndt-dev] [ndt] r839 committed - Fix issues in Statistics Pop up window...., ndt, 10/10/2013

Archive powered by MHonArc 2.6.16.

Top of Page