jmeter-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sebb <seb...@gmail.com>
Subject Re: svn commit: r1601161 - in /jmeter/trunk: src/protocol/http/org/apache/jmeter/protocol/http/proxy/gui/ProxyControlGui.java xdocs/changes.xml
Date Thu, 26 Jun 2014 15:36:29 GMT
On 7 June 2014 18:59,  <milamber@apache.org> wrote:
> Author: milamber
> Date: Sat Jun  7 17:59:58 2014
> New Revision: 1601161
>
> URL: http://svn.apache.org/r1601161
> Log:
> Bug 56303 - The width of target controller's combo list should be set to the current
panel size, not on label size of the controllers
> Bugzilla Id: 56303
>
> Modified:
>     jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/gui/ProxyControlGui.java
>     jmeter/trunk/xdocs/changes.xml
>
> Modified: jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/gui/ProxyControlGui.java
> URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/gui/ProxyControlGui.java?rev=1601161&r1=1601160&r2=1601161&view=diff
> ==============================================================================
> --- jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/gui/ProxyControlGui.java
(original)
> +++ jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/gui/ProxyControlGui.java
Sat Jun  7 17:59:58 2014
> @@ -45,6 +45,8 @@ import javax.swing.JComboBox;
>  import javax.swing.JLabel;
>  import javax.swing.JOptionPane;
>  import javax.swing.JPanel;
> +import javax.swing.JPopupMenu;
> +import javax.swing.JScrollBar;
>  import javax.swing.JScrollPane;
>  import javax.swing.JTable;
>  import javax.swing.JTextField;
> @@ -740,6 +742,11 @@ public class ProxyControlGui extends Log
>      private JPanel createTargetPanel() {
>          targetNodesModel = new DefaultComboBoxModel();
>          targetNodes = new JComboBox(targetNodesModel);
> +        targetNodes.setPrototypeDisplayValue(""); // $NON-NLS-1$ // Bug 56303 fixed
the width of combo list
> +        JPopupMenu popup = (JPopupMenu) targetNodes.getUI().getAccessibleChild(targetNodes,
0); // get popup element
> +        JScrollPane scrollPane = (JScrollPane) popup.getComponent(0);

The above line causes a problem on MacOS (Mavericks) with Java 1.6 (Apple)

Caused by: java.lang.ClassCastException: javax.swing.Box$Filler cannot
be cast to javax.swing.JScrollPane

Seems OK on 1.7/1.8 from Oracle (though the tests still fail; not sure
why - presumably wrong library on path?)

However it suggests that the solution may not be portable across other
Java implementations.

> +        scrollPane.setHorizontalScrollBar(new JScrollBar(JScrollBar.HORIZONTAL)); //
add scroll pane if label element is too long
> +        scrollPane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
>          targetNodes.setActionCommand(CHANGE_TARGET);
>          // Action listener will be added later
>
>
> Modified: jmeter/trunk/xdocs/changes.xml
> URL: http://svn.apache.org/viewvc/jmeter/trunk/xdocs/changes.xml?rev=1601161&r1=1601160&r2=1601161&view=diff
> ==============================================================================
> --- jmeter/trunk/xdocs/changes.xml (original)
> +++ jmeter/trunk/xdocs/changes.xml Sat Jun  7 17:59:58 2014
> @@ -128,6 +128,7 @@ A workaround is to use a Java 7 update 4
>  <li><bugzilla>56263</bugzilla> - DefaultSamplerCreator should set
BrowserCompatible Multipart true</li>
>  <li><bugzilla>56231</bugzilla> - Move redirect location processing
from HC3/HC4 samplers to HTTPSamplerBase#followRedirects()</li>
>  <li><bugzilla>56207</bugzilla> - URLs get encoded on redirects in
HC3.1 &amp; HC4 samplers</li>
> +<li><bugzilla>56303</bugzilla> - The width of target controller's
combo list should be set to the current panel size, not on label size of the controllers</li>
>  </ul>
>
>  <h3>Other Samplers</h3>
>
>

Mime
View raw message