On 06/04/11 10:23, Sean Chou wrote:

Hi Sean - For some reason the patch attached is removing whitespaces at the front of some of the lines. Apart for just aesthetic reasons - If you fixed that the patch would be smaller :-)

An example at Line 1600 :

-        {"Number of Threads","Number of Threads"},
+    {"Number of Threads","Number of Threads"},


Hi all,

JConsole is a simple tool for monitoring java processes. During
daily use, we hope it can contain more descriptions for tabs, menus
and other controls, so that it can give user more information
to understand the functionality and enhance user experiences. We
already did some work for this purpose and they are welcomed.

And, we would like to contribute this work to OPENJDK to share
the benefit. However, the patch is a little large, which counts to 1700+ LOC.
I suppose posting the entire patch on the mailing list is not a good
choice, but it is also attached in case some one would like a try.

I heard that jconsole has been supplanted by VisualVM in recent years.
However, I think taking it is worthwhile if the enhancement is somewhat
useful, and little effort is needed.
Please give your comments.

Two images are attached to demo a small difference. Jconsole1.png
is the one with more description and jconsole2.png is the current
openjdk implementation.

And a piece of the patch is as follows:

diff -r 0653cab602f2 src/share/classes/sun/tools/jconsole/ClassTab.java
--- a/src/share/classes/sun/tools/jconsole/ClassTab.javaThu Mar 17 14:33:00 2011 -0700 +++ b/src/share/classes/sun/tools/jconsole/ClassTab.javaTue Mar 22 17:33:19 2011 +0800
@@ -41,6 +41,8 @@
 import java.util.concurrent.*;
 import sun.awt.*;
+import sun.tools.jconsole.LabeledComponent;
+import sun.tools.jconsole.Resources;
 import static sun.tools.jconsole.Formatter.*;
 import static sun.tools.jconsole.Resources.*;
@@ -87,6 +89,10 @@
                         Center: details
     */
+    public static String getTabDescription() {
+        return Resources.getText("Classes.accessibleDescription");
+    }
+
     public static String getTabName() {
         return Resources.getText("Classes");
     }
@@ -109,6 +115,7 @@
         topPanel.add(controlPanel, BorderLayout.CENTER);
verboseCheckBox = new JCheckBox(Resources.getText("Verbose Output"));
+    verboseCheckBox.setMnemonic(getMnemonicInt("Verbose Output"));
         verboseCheckBox.addActionListener(this);
verboseCheckBox.setToolTipText(getText("Verbose Output.toolTip"));
         JPanel topRightPanel = new JPanel();
@@ -128,20 +135,24 @@
                                                   true);
         setAccessibleName(loadedClassesMeter.plotter,
getText("ClassTab.loadedClassesPlotter.accessibleName"));
+    setAccessibleDescription(loadedClassesMeter.plotter,
+ getText("ClassTab.loadedClassesPlotter.accessibleDescription"));
         plotterPanel.add(loadedClassesMeter);
         timeComboBox = new TimeComboBox(loadedClassesMeter.plotter);
- controlPanel.add(new LabeledComponent(Resources.getText("Time Range:"), - getMnemonicInt("Time Range:"),
-                                              timeComboBox));
+    controlPanel.add(new LabeledComponent(getText("Time Range:"),
+            getText("TimeRange.accessibleDescription"),
+                          getMnemonicInt("Time Range:"), timeComboBox));
         LabeledComponent.layout(plotterPanel);
bottomPanel.setBorder(new CompoundBorder(new TitledBorder(Resources.getText("Details")), new EmptyBorder(10, 10, 10, 10))); + setAccessibleDescription(bottomPanel, getText("Details.accessibleDescription"));
         details = new HTMLPane();
         setAccessibleName(details, getText("Details"));
+ setAccessibleDescription(details, getText("Details.accessibleDescription"));
         JScrollPane scrollPane = new JScrollPane(details);
         scrollPane.setPreferredSize(new Dimension(0, 150));
         bottomPanel.add(scrollPane, BorderLayout.SOUTH);


--
Best Regards,
Sean Chou




Reply via email to