-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LoopControlPanel; non-standard GUI feedback #766
Comments
khammond25 (migrated from Bugzilla): patch.LoopControlPanel.diff--- \jakarta-jmeter-cvs\jakarta-jmeter\src\org\apache\jmeter\gui\LoopControlPanel.java Fri Aug 31 00:46:44 2001
+++ \jakarta-jmeter-nightly\2001.09.15\jakarta-jmeter\src\org\apache\jmeter\gui\LoopControlPanel.java Tue Sep 18 05:37:46 2001
@@ -75,6 +75,7 @@
LoopController model;
JCheckBox infinite = new JCheckBox(JMeterUtils.getResString("infinite"));
JTextField loops = new JTextField(5);
+ JLabel loopsLabel = new JLabel(JMeterUtils.getResString("iterator_num"));
private boolean displayName = true;
private static String INFINITE = "infinite";
@@ -132,10 +133,12 @@
loops.setText("");
model.setLoops(-1);
loops.setEnabled(false);
+ loopsLabel.setEnabled(false);
}
else
{
loops.setEnabled(true);
+ loopsLabel.setEnabled(true);
}
}
@@ -175,8 +178,6 @@
{
model.setLoops(-1);
loops.setText("");
- loops.setEnabled(false);
- infinite.setSelected(true);
JOptionPane.showMessageDialog(this, "You must enter a valid number",
"Invalid data", JOptionPane.WARNING_MESSAGE);
}
@@ -207,7 +208,7 @@
loopPanel.add(infinite);
JPanel entryPanel = new JPanel();
entryPanel.add(Box.createHorizontalStrut(10));
- entryPanel.add(new JLabel(JMeterUtils.getResString("iterator_num")));
+ entryPanel.add(loopsLabel);
loops.setName(LOOPS);
loops.addKeyListener(this);
setState();
@@ -223,12 +224,14 @@
infinite.setSelected(true);
loops.setEnabled(false);
loops.setText("");
+ loopsLabel.setEnabled(false);
}
else
{
infinite.setSelected(false);
loops.setEnabled(true);
loops.setText(""+model.getLoops());
+ loopsLabel.setEnabled(true);
}
}
} |
khammond25 (migrated from Bugzilla): patch2.LoopControlPanel.diff--- \jakarta-jmeter-cvs\jakarta-jmeter\src\org\apache\jmeter\gui\LoopControlPanel.java Fri Aug 31 00:46:44 2001
+++ \jakarta-jmeter-nightly\2001.09.15\jakarta-jmeter\src\org\apache\jmeter\gui\LoopControlPanel.java Tue Sep 18 13:36:00 2001
@@ -75,6 +75,7 @@
LoopController model;
JCheckBox infinite = new JCheckBox(JMeterUtils.getResString("infinite"));
JTextField loops = new JTextField(5);
+ JLabel loopsLabel = new JLabel(JMeterUtils.getResString("iterator_num"));
private boolean displayName = true;
private static String INFINITE = "infinite";
@@ -132,10 +133,12 @@
loops.setText("");
model.setLoops(-1);
loops.setEnabled(false);
+ loopsLabel.setEnabled(false);
}
else
{
loops.setEnabled(true);
+ loopsLabel.setEnabled(true);
}
}
@@ -173,12 +176,14 @@
{
if(loops.getText().length() > 0)
{
- model.setLoops(-1);
- loops.setText("");
- loops.setEnabled(false);
- infinite.setSelected(true);
+ // We need a standard warning/error dialog. The problem with
+ // having it here is that the dialog is centered over this
+ // LoopControlPanel instead of begin centered in the entire
+ // JMeter GUI window.
JOptionPane.showMessageDialog(this, "You must enter a valid number",
"Invalid data", JOptionPane.WARNING_MESSAGE);
+ model.setLoops(-1);
+ loops.setText("");
}
else
{
@@ -207,7 +212,7 @@
loopPanel.add(infinite);
JPanel entryPanel = new JPanel();
entryPanel.add(Box.createHorizontalStrut(10));
- entryPanel.add(new JLabel(JMeterUtils.getResString("iterator_num")));
+ entryPanel.add(loopsLabel);
loops.setName(LOOPS);
loops.addKeyListener(this);
setState();
@@ -223,12 +228,14 @@
infinite.setSelected(true);
loops.setEnabled(false);
loops.setText("");
+ loopsLabel.setEnabled(false);
}
else
{
infinite.setSelected(false);
loops.setEnabled(true);
loops.setText(""+model.getLoops());
+ loopsLabel.setEnabled(true);
}
}
} |
khammond25 (migrated from Bugzilla): This way, when the user gets the dialog, they can see that "oh yeah, I did have I have also updated ThreadGroup and ThreadGroupGui to have the same behavior. |
khammond25 (migrated from Bugzilla): |
Jordi Salvat i Alabart (migrated from Bugzilla): |
Jordi Salvat i Alabart (migrated from Bugzilla): |
khammond25 (Bug 3682):
In the latest version of org.apache.jmeter.gui.LoopControlPanel (, there are
two problems:
When the "infinite" checkbox is checked, the text field is disabled, but the
text label "Number of iterations" remains enabled. The defacto standard is to
disable both the label and the text field.
When the "infinite" checkbox is unchecked, and you enter an non-numeric
value, you get an Error Dialog. This is fine, but when you click OK to leave
the dialog, the text field you were typing in is cleared out and the "infinite"
checkbox is checked. Since we are validating this field after every keypress,
one typing mistake and your penalized. You have to deselect the checkbox and
type in your value again. It's an extra mouse click. It's fine to clear out
the text field, but since the user was trying to enter a valid iteration count,
let him try it again without having him deselect the checkbox again.
Severity: normal
OS: All
The text was updated successfully, but these errors were encountered: