Skip to content

Commit

Permalink
Add a short description in the profiler GUI
Browse files Browse the repository at this point in the history
  • Loading branch information
omajid committed Dec 11, 2014
1 parent 5534c5e commit b2aca66
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ public enum LocaleResources {
PROFILER_TAB_NAME,

PROFILER_HEADING,
PROFILER_DESCRIPTION,

PROFILER_CURRENT_STATUS_ACTIVE,
PROFILER_CURRENT_STATUS_INACTIVE,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -133,12 +134,25 @@ private JPanel createActionsPanel() {

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() {
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit b2aca66

Please sign in to comment.