ASF Bugzilla – Attachment 27507 Details for
Bug 42246
Need for a 'auto-scroll' option in "View Results Tree" and "Assertion Results"
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Fix to issue
BUG_42246.patch (text/plain), 4.04 KB, created by
Philippe Mouawad
on 2011-09-16 10:10:45 UTC
(
hide
)
Description:
Fix to issue
Filename:
MIME Type:
Creator:
Philippe Mouawad
Created:
2011-09-16 10:10:45 UTC
Size:
4.04 KB
patch
obsolete
>Index: src/components/org/apache/jmeter/visualizers/ViewResultsFullVisualizer.java >=================================================================== >--- src/components/org/apache/jmeter/visualizers/ViewResultsFullVisualizer.java (revision 1166194) >+++ src/components/org/apache/jmeter/visualizers/ViewResultsFullVisualizer.java (working copy) >@@ -28,6 +28,8 @@ > import java.awt.Dimension; > import java.awt.event.ActionEvent; > import java.awt.event.ActionListener; >+import java.awt.event.ItemEvent; >+import java.awt.event.ItemListener; > import java.io.IOException; > import java.util.Collections; > import java.util.List; >@@ -35,6 +37,7 @@ > import javax.swing.ComboBoxModel; > import javax.swing.DefaultComboBoxModel; > import javax.swing.ImageIcon; >+import javax.swing.JCheckBox; > import javax.swing.JComboBox; > import javax.swing.JScrollPane; > import javax.swing.JSplitPane; >@@ -62,7 +65,7 @@ > * > */ > public class ViewResultsFullVisualizer extends AbstractVisualizer >-implements ActionListener, TreeSelectionListener, Clearable { >+implements ActionListener, TreeSelectionListener, Clearable, ItemListener { > > private static final long serialVersionUID = 7338676747296593842L; > >@@ -108,6 +111,8 @@ > > private TreeSelectionEvent lastSelectionEvent; > >+ private JCheckBox autoScrollCB; >+ > /** > * Constructor > */ >@@ -144,6 +149,10 @@ > if (root.getChildCount() == 1) { > jTree.expandPath(new TreePath(root)); > } >+ if (autoScrollCB.isSelected() && root.getChildCount() > 1) >+ { >+ jTree.scrollRowToVisible(root.getChildCount()-1); >+ } > } > > private void addSubResults(DefaultMutableTreeNode currNode, SampleResult res) { >@@ -252,23 +261,41 @@ > jTree.addTreeSelectionListener(this); > jTree.setRootVisible(false); > jTree.setShowsRootHandles(true); >- > JScrollPane treePane = new JScrollPane(jTree); > treePane.setPreferredSize(new Dimension(200, 300)); > > VerticalPanel leftPane = new VerticalPanel(); > leftPane.add(treePane, BorderLayout.CENTER); >- leftPane.add(createComboRender(), BorderLayout.SOUTH); >- >+ >+ VerticalPanel leftDownPane = new VerticalPanel(); >+ leftDownPane.add(createComboRender(), BorderLayout.NORTH); >+ autoScrollCB = createASCheckBox("view_results_autoscroll", Color.BLACK); >+ leftDownPane.add(autoScrollCB, BorderLayout.SOUTH); >+ leftPane.add(leftDownPane, BorderLayout.SOUTH); > return leftPane; > } > > /** >+ * Create auto scroll checkbox >+ * @param labelResourceName >+ * @param color >+ * @return {@link JCheckBox} >+ */ >+ private JCheckBox createASCheckBox(String labelResourceName, Color color) { >+ JCheckBox checkBox = new JCheckBox(JMeterUtils.getResString(labelResourceName)); >+ checkBox.setSelected(false); >+ checkBox.addItemListener(this); >+ checkBox.setForeground(color); >+ return checkBox; >+ } >+ >+ /** > * Create the drop-down list to changer render > * @return List of all render (implement ResultsRender) > */ > private Component createComboRender() { > ComboBoxModel nodesModel = new DefaultComboBoxModel(); >+ > // drop-down list for renderer > selectRenderPanel = new JComboBox(nodesModel); > selectRenderPanel.setActionCommand(COMBO_CHANGE_COMMAND); >@@ -379,4 +406,11 @@ > } > } > >+ /** >+ * Handler for Checkbox >+ */ >+ public void itemStateChanged(ItemEvent e) { >+ // NOOP state is held by component >+ } >+ > } >Index: src/components/org/apache/jmeter/visualizers/AssertionVisualizer.java >=================================================================== >--- src/components/org/apache/jmeter/visualizers/AssertionVisualizer.java (revision 1166194) >+++ src/components/org/apache/jmeter/visualizers/AssertionVisualizer.java (working copy) >@@ -56,6 +56,7 @@ > sb.append("\n"); // $NON-NLS-1$ > synchronized (textArea) { > textArea.append(sb.toString()); >+ textArea.setCaretPosition(textArea.getText().length()); > } > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 42246
:
27507
|
27510
|
27514
|
27515