My original layout was thrown together to get it working.

But if we are trying to make it look better, maybe the Reload button
should be on the header, as it relates to the template list.

Also Cancel is normally the right-hand button, as in Yes-No-Cancel or
OK-Cancel; I find it confusing to have it on the left.
I think we should try and stick with a standard style here.

On 11 July 2013 00:00,  <[email protected]> wrote:
> Author: milamber
> Date: Wed Jul 10 23:00:48 2013
> New Revision: 1502047
>
> URL: http://svn.apache.org/r1502047
> Log:
> Templates - provide button to reload template details
> Improve the buttons disposition (I thinks)
> Bugzilla Id: 55236
>
> Modified:
>     
> jmeter/trunk/src/core/org/apache/jmeter/gui/action/SelectTemplateDialog.java
>
> Modified: 
> jmeter/trunk/src/core/org/apache/jmeter/gui/action/SelectTemplateDialog.java
> URL: 
> http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/gui/action/SelectTemplateDialog.java?rev=1502047&r1=1502046&r2=1502047&view=diff
> ==============================================================================
> --- 
> jmeter/trunk/src/core/org/apache/jmeter/gui/action/SelectTemplateDialog.java 
> (original)
> +++ 
> jmeter/trunk/src/core/org/apache/jmeter/gui/action/SelectTemplateDialog.java 
> Wed Jul 10 23:00:48 2013
> @@ -171,15 +171,19 @@ public class SelectTemplateDialog extend
>          helpDoc.addHyperlinkListener(this);
>          this.getContentPane().add(scroller, BorderLayout.CENTER);
>
> -        JPanel buttonsPanel = new JPanel(new FlowLayout(FlowLayout.CENTER));
> -
>          applyTemplateButton.addActionListener(this);
>          cancelButton.addActionListener(this);
>
> -        buttonsPanel.add(reloadTemplateButton);
> -        buttonsPanel.add(applyTemplateButton);
> -        buttonsPanel.add(cancelButton);
> -        this.getContentPane().add(buttonsPanel, BorderLayout.SOUTH);
> +        // Buttons bar
> +        JPanel buttonBar = new JPanel(new BorderLayout());
> +        JPanel reloadBtnBar = new JPanel();
> +        reloadBtnBar.add(reloadTemplateButton);
> +        buttonBar.add(reloadBtnBar, BorderLayout.WEST);
> +        JPanel actionBtnBar = new JPanel(new FlowLayout());
> +        actionBtnBar.add(cancelButton);
> +        actionBtnBar.add(applyTemplateButton);
> +        buttonBar.add(actionBtnBar, BorderLayout.EAST);
> +        this.getContentPane().add(buttonBar, BorderLayout.SOUTH);
>
>          this.pack();
>          this.setMinimumSize(new Dimension(MINIMAL_BOX_WIDTH, 
> MINIMAL_BOX_HEIGHT));
>
>

Reply via email to