Mercurial > hg > release > thermostat-1.2
changeset 1617:ae48dec4e9a8
Add a short description in the profiler GUI
Reviewed-by: vanaltj
Review-thread: http://icedtea.classpath.org/pipermail/thermostat/2014-December/012214.html
author | Omair Majid <omajid@redhat.com> |
---|---|
date | Wed, 10 Dec 2014 20:13:14 -0500 |
parents | d3d0e57e2d52 |
children | 9d3661b3cb22 |
files | vm-profiler/client-swing/src/main/java/com/redhat/thermostat/vm/profiler/client/swing/internal/LocaleResources.java vm-profiler/client-swing/src/main/java/com/redhat/thermostat/vm/profiler/client/swing/internal/SwingVmProfileView.java vm-profiler/client-swing/src/main/resources/com/redhat/thermostat/vm/profiler/client/swing/internal/strings.properties |
diffstat | 3 files changed, 18 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/vm-profiler/client-swing/src/main/java/com/redhat/thermostat/vm/profiler/client/swing/internal/LocaleResources.java Wed Dec 10 19:49:11 2014 -0500 +++ b/vm-profiler/client-swing/src/main/java/com/redhat/thermostat/vm/profiler/client/swing/internal/LocaleResources.java Wed Dec 10 20:13:14 2014 -0500 @@ -43,6 +43,7 @@ PROFILER_TAB_NAME, PROFILER_HEADING, + PROFILER_DESCRIPTION, PROFILER_CURRENT_STATUS_ACTIVE, PROFILER_CURRENT_STATUS_INACTIVE,
--- a/vm-profiler/client-swing/src/main/java/com/redhat/thermostat/vm/profiler/client/swing/internal/SwingVmProfileView.java Wed Dec 10 19:49:11 2014 -0500 +++ b/vm-profiler/client-swing/src/main/java/com/redhat/thermostat/vm/profiler/client/swing/internal/SwingVmProfileView.java Wed Dec 10 20:13:14 2014 -0500 @@ -71,6 +71,7 @@ import com.redhat.thermostat.client.swing.experimental.ComponentVisibilityNotifier; import com.redhat.thermostat.common.ActionEvent; import com.redhat.thermostat.common.ActionListener; +import com.redhat.thermostat.shared.locale.LocalizedString; import com.redhat.thermostat.shared.locale.Translate; import com.redhat.thermostat.vm.profiler.client.core.ProfilingResult; import com.redhat.thermostat.vm.profiler.client.core.ProfilingResult.MethodInfo; @@ -133,12 +134,25 @@ GridBagConstraints constraints = new GridBagConstraints(); constraints.fill = GridBagConstraints.HORIZONTAL; + constraints.anchor = GridBagConstraints.PAGE_START; constraints.weightx = 1.0; + constraints.gridy = 0; + constraints.gridx = 0; + constraints.gridwidth = 3; + constraints.ipady = 5; + String wrappedText = "<html>" + translator.localize(LocaleResources.PROFILER_DESCRIPTION).getContents() + "</html>"; + JLabel descriptionLabel = new JLabel(wrappedText); + actionsPanel.add(descriptionLabel, constraints); + + constraints.gridy = 1; + constraints.gridx = 0; + constraints.gridwidth = 1; currentStatusLabel = new JLabel("Current Status: {0}"); actionsPanel.add(currentStatusLabel, constraints); constraints.fill = GridBagConstraints.NONE; + constraints.gridx = GridBagConstraints.RELATIVE; constraints.weightx = 0.0; startButton = new JToggleButton(translator.localize(LocaleResources.START_PROFILING).getContents()); startButton.addActionListener(new java.awt.event.ActionListener() {
--- a/vm-profiler/client-swing/src/main/resources/com/redhat/thermostat/vm/profiler/client/swing/internal/strings.properties Wed Dec 10 19:49:11 2014 -0500 +++ b/vm-profiler/client-swing/src/main/resources/com/redhat/thermostat/vm/profiler/client/swing/internal/strings.properties Wed Dec 10 20:13:14 2014 -0500 @@ -1,6 +1,9 @@ PROFILER_TAB_NAME = Profiler PROFILER_HEADING = JVM Profiler +PROFILER_DESCRIPTION = Instrument and profile a JVM. \ + Profiling results will be displayed when the profiling session is stopped or when the profiled JVM exits. \ + JRE/JDK packages are not included in the timing measurements. PROFILER_CURRENT_STATUS_ACTIVE = Currently profiling: yes PROFILER_CURRENT_STATUS_INACTIVE = Currently profiling: no