You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jmeter.apache.org by mi...@apache.org on 2013/07/11 02:14:29 UTC
svn commit: r1502070 -
/jmeter/trunk/src/core/org/apache/jmeter/gui/action/SelectTemplateDialog.java
Author: milamber
Date: Thu Jul 11 00:14:28 2013
New Revision: 1502070
URL: http://svn.apache.org/r1502070
Log:
Templates - provide button to reload template details
Improve the buttons disposition (v2). Classic way for Cancel/CreateOrMerge buttons. Move on header Reload Template button.
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=1502070&r1=1502069&r2=1502070&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 Thu Jul 11 00:14:28 2013
@@ -21,6 +21,7 @@ package org.apache.jmeter.gui.action;
import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.FlowLayout;
+import java.awt.Font;
import java.awt.HeadlessException;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
@@ -64,6 +65,8 @@ public class SelectTemplateDialog extend
// Minimal dimensions for dialog box
private static final int MINIMAL_BOX_WIDTH = 500;
private static final int MINIMAL_BOX_HEIGHT = 300;
+
+ private Font FONT_SMALL = new Font("SansSerif", Font.PLAIN, 10); // $NON-NLS-1$
private static final Logger log = LoggingManager.getLoggerForClass();
@@ -164,8 +167,15 @@ public class SelectTemplateDialog extend
templateList.setValues(TemplateManager.getInstance().getTemplateNames());
templateList.addChangeListener(this);
reloadTemplateButton.addActionListener(this);
- this.getContentPane().setLayout(new BorderLayout(10, 10));
- this.getContentPane().add(templateList, BorderLayout.NORTH);
+ reloadTemplateButton.setFont(FONT_SMALL);
+ this.getContentPane().setLayout(new BorderLayout(10, 0));
+
+ JPanel templateBar = new JPanel(new BorderLayout());
+ templateBar.add(templateList, BorderLayout.CENTER);
+ JPanel reloadBtnBar = new JPanel();
+ reloadBtnBar.add(reloadTemplateButton);
+ templateBar.add(reloadBtnBar, BorderLayout.EAST);
+ this.getContentPane().add(templateBar, BorderLayout.NORTH);
helpDoc.setContentType("text/html"); //$NON-NLS-1$
helpDoc.setEditable(false);
helpDoc.addHyperlinkListener(this);
@@ -174,16 +184,11 @@ public class SelectTemplateDialog extend
applyTemplateButton.addActionListener(this);
cancelButton.addActionListener(this);
- // Buttons bar
- JPanel buttonBar = new JPanel(new BorderLayout());
- JPanel reloadBtnBar = new JPanel();
- reloadBtnBar.add(reloadTemplateButton);
- buttonBar.add(reloadBtnBar, BorderLayout.WEST);
+ // Bottom buttons bar
JPanel actionBtnBar = new JPanel(new FlowLayout());
- actionBtnBar.add(cancelButton);
actionBtnBar.add(applyTemplateButton);
- buttonBar.add(actionBtnBar, BorderLayout.EAST);
- this.getContentPane().add(buttonBar, BorderLayout.SOUTH);
+ actionBtnBar.add(cancelButton);
+ this.getContentPane().add(actionBtnBar, BorderLayout.SOUTH);
this.pack();
this.setMinimumSize(new Dimension(MINIMAL_BOX_WIDTH, MINIMAL_BOX_HEIGHT));
Re: svn commit: r1502070 - /jmeter/trunk/src/core/org/apache/jmeter/gui/action/SelectTemplateDialog.java
Posted by sebb <se...@gmail.com>.
Looks much better now, thanks!
On 11 July 2013 01:14, <mi...@apache.org> wrote:
> Author: milamber
> Date: Thu Jul 11 00:14:28 2013
> New Revision: 1502070
>
> URL: http://svn.apache.org/r1502070
> Log:
> Templates - provide button to reload template details
> Improve the buttons disposition (v2). Classic way for Cancel/CreateOrMerge buttons. Move on header Reload Template button.
> Bugzilla Id: 55236