jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From milam...@apache.org
Subject svn commit: r1722714 - in /jmeter/trunk/src: components/org/apache/jmeter/visualizers/ core/org/apache/jmeter/gui/action/ core/org/apache/jmeter/gui/util/ monitor/components/org/apache/jmeter/visualizers/ protocol/http/org/apache/jmeter/protocol/http/c...
Date Sun, 03 Jan 2016 12:04:12 GMT
Author: milamber
Date: Sun Jan  3 12:04:12 2016
New Revision: 1722714

URL: http://svn.apache.org/viewvc?rev=1722714&view=rev
Log:
Change fixed font size for small fonts to a percent of defaut label font size
Bugzilla Id: 58426

Modified:
    jmeter/trunk/src/components/org/apache/jmeter/visualizers/AxisGraph.java
    jmeter/trunk/src/components/org/apache/jmeter/visualizers/RespTimeGraphVisualizer.java
    jmeter/trunk/src/components/org/apache/jmeter/visualizers/SearchTextExtension.java
    jmeter/trunk/src/components/org/apache/jmeter/visualizers/StatGraphVisualizer.java
    jmeter/trunk/src/core/org/apache/jmeter/gui/action/SearchTreeDialog.java
    jmeter/trunk/src/core/org/apache/jmeter/gui/action/SelectTemplatesDialog.java
    jmeter/trunk/src/core/org/apache/jmeter/gui/util/FilePanelEntry.java
    jmeter/trunk/src/monitor/components/org/apache/jmeter/visualizers/MonitorPerformancePanel.java
    jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/config/gui/UrlConfigGui.java
    jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/gui/HttpTestSampleGui.java

Modified: jmeter/trunk/src/components/org/apache/jmeter/visualizers/AxisGraph.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/components/org/apache/jmeter/visualizers/AxisGraph.java?rev=1722714&r1=1722713&r2=1722714&view=diff
==============================================================================
--- jmeter/trunk/src/components/org/apache/jmeter/visualizers/AxisGraph.java (original)
+++ jmeter/trunk/src/components/org/apache/jmeter/visualizers/AxisGraph.java Sun Jan  3 12:04:12
2016
@@ -27,6 +27,7 @@ import java.awt.Paint;
 import java.math.BigDecimal;
 
 import javax.swing.JPanel;
+import javax.swing.UIManager;
 
 import org.apache.jmeter.util.JMeterUtils;
 import org.apache.jorphan.logging.LoggingManager;
@@ -79,7 +80,9 @@ public class AxisGraph extends JPanel {
 
     protected Font legendFont;
 
-    protected Font valueFont = new Font("SansSerif", Font.PLAIN, 8);
+    private static final Font FONT_DEFAULT = UIManager.getDefaults().getFont("TextField.font");
+
+    protected Font valueFont = new Font("SansSerif", Font.PLAIN, (int) Math.round(FONT_DEFAULT.getSize()
* 0.6));
 
     protected Color[] color = { Color.YELLOW };
 

Modified: jmeter/trunk/src/components/org/apache/jmeter/visualizers/RespTimeGraphVisualizer.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/components/org/apache/jmeter/visualizers/RespTimeGraphVisualizer.java?rev=1722714&r1=1722713&r2=1722714&view=diff
==============================================================================
--- jmeter/trunk/src/components/org/apache/jmeter/visualizers/RespTimeGraphVisualizer.java
(original)
+++ jmeter/trunk/src/components/org/apache/jmeter/visualizers/RespTimeGraphVisualizer.java
Sun Jan  3 12:04:12 2016
@@ -51,6 +51,7 @@ import javax.swing.JPanel;
 import javax.swing.JTabbedPane;
 import javax.swing.JTextField;
 import javax.swing.SwingConstants;
+import javax.swing.UIManager;
 import javax.swing.border.Border;
 import javax.swing.border.EmptyBorder;
 import javax.swing.event.ChangeEvent;
@@ -80,7 +81,9 @@ public class RespTimeGraphVisualizer ext
 
     private static final Logger log = LoggingManager.getLoggerForClass();
 
-    private final Font FONT_SMALL = new Font("SansSerif", Font.PLAIN, 10);
+    private static final Font FONT_DEFAULT = UIManager.getDefaults().getFont("TextField.font");
//$NON-NLS-1$
+
+    private static final Font FONT_SMALL = new Font("SansSerif", Font.PLAIN, (int) Math.round(FONT_DEFAULT.getSize()
* 0.8)); //$NON-NLS-1$
 
     //+ JMX property names; do not change
 

Modified: jmeter/trunk/src/components/org/apache/jmeter/visualizers/SearchTextExtension.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/components/org/apache/jmeter/visualizers/SearchTextExtension.java?rev=1722714&r1=1722713&r2=1722714&view=diff
==============================================================================
--- jmeter/trunk/src/components/org/apache/jmeter/visualizers/SearchTextExtension.java (original)
+++ jmeter/trunk/src/components/org/apache/jmeter/visualizers/SearchTextExtension.java Sun
Jan  3 12:04:12 2016
@@ -42,6 +42,7 @@ import javax.swing.JLabel;
 import javax.swing.JOptionPane;
 import javax.swing.JPanel;
 import javax.swing.JTextField;
+import javax.swing.UIManager;
 import javax.swing.event.DocumentEvent;
 import javax.swing.event.DocumentListener;
 import javax.swing.text.BadLocationException;
@@ -58,6 +59,10 @@ public class SearchTextExtension impleme
 
     private static final Logger log = LoggingManager.getLoggerForClass();
 
+    private static final Font FONT_DEFAULT = UIManager.getDefaults().getFont("TextField.font");
+
+    private static final Font FONT_SMALL = new Font("SansSerif", Font.PLAIN, (int) Math.round(FONT_DEFAULT.getSize()
* 0.8));
+
     private static final String SEARCH_TEXT_COMMAND = "search_text"; // $NON-NLS-1$
 
     private static volatile int LAST_POSITION_DEFAULT = 0;
@@ -168,8 +173,6 @@ public class SearchTextExtension impleme
      * @return Text find task pane
      */
     private JPanel createSearchTextPanel() {
-        Font font = new Font("SansSerif", Font.PLAIN, 10);
-
         // Search field
         searchPanel = new JPanel();
         searchPanel.setLayout(new BoxLayout(searchPanel, BoxLayout.X_AXIS));
@@ -187,7 +190,7 @@ public class SearchTextExtension impleme
         // Buttons
         findButton = new JButton(JMeterUtils
                 .getResString("search_text_button_find")); // $NON-NLS-1$
-        findButton.setFont(font);
+        findButton.setFont(FONT_SMALL);
         findButton.setActionCommand(SEARCH_TEXT_COMMAND);
         findButton.addActionListener(this);
         searchPanel.add(findButton);
@@ -195,11 +198,11 @@ public class SearchTextExtension impleme
         // checkboxes
         caseChkBox = new JCheckBox(JMeterUtils
                 .getResString("search_text_chkbox_case"), false); // $NON-NLS-1$
-        caseChkBox.setFont(font);
+        caseChkBox.setFont(FONT_SMALL);
         searchPanel.add(caseChkBox);
         regexpChkBox = new JCheckBox(JMeterUtils
                 .getResString("search_text_chkbox_regexp"), false); // $NON-NLS-1$
-        regexpChkBox.setFont(font);
+        regexpChkBox.setFont(FONT_SMALL);
         searchPanel.add(regexpChkBox);
 
         // when Enter is pressed, search start

Modified: jmeter/trunk/src/components/org/apache/jmeter/visualizers/StatGraphVisualizer.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/components/org/apache/jmeter/visualizers/StatGraphVisualizer.java?rev=1722714&r1=1722713&r2=1722714&view=diff
==============================================================================
--- jmeter/trunk/src/components/org/apache/jmeter/visualizers/StatGraphVisualizer.java (original)
+++ jmeter/trunk/src/components/org/apache/jmeter/visualizers/StatGraphVisualizer.java Sun
Jan  3 12:04:12 2016
@@ -56,6 +56,7 @@ import javax.swing.JTabbedPane;
 import javax.swing.JTable;
 import javax.swing.JTextField;
 import javax.swing.SwingConstants;
+import javax.swing.UIManager;
 import javax.swing.border.Border;
 import javax.swing.border.EmptyBorder;
 import javax.swing.event.ChangeEvent;
@@ -144,7 +145,9 @@ public class StatGraphVisualizer extends
     private final String TOTAL_ROW_LABEL =
         JMeterUtils.getResString("aggregate_report_total_label");       //$NON-NLS-1$
 
-    private Font FONT_SMALL = new Font("SansSerif", Font.PLAIN, 10); // $NON-NLS-1$
+    private static final Font FONT_DEFAULT = UIManager.getDefaults().getFont("TextField.font");
//$NON-NLS-1$
+
+    private static final Font FONT_SMALL = new Font("SansSerif", Font.PLAIN, (int) Math.round(FONT_DEFAULT.getSize()
* 0.8)); //$NON-NLS-1$
 
     private JTable myJTable;
 
@@ -810,7 +813,6 @@ public class StatGraphVisualizer extends
     }
 
     private JPanel createGraphSelectionSubPane() {
-        Font font = new Font("SansSerif", Font.PLAIN, 10);
         // Search field
         JPanel searchPanel = new JPanel();
         searchPanel.setLayout(new BoxLayout(searchPanel, BoxLayout.X_AXIS));
@@ -827,14 +829,14 @@ public class StatGraphVisualizer extends
         searchPanel.add(Box.createRigidArea(new Dimension(5,0)));
 
         // Button
-        applyFilterBtn.setFont(font);
+        applyFilterBtn.setFont(FONT_SMALL);
         applyFilterBtn.addActionListener(this);
         searchPanel.add(applyFilterBtn);
 
         // checkboxes
-        caseChkBox.setFont(font);
+        caseChkBox.setFont(FONT_SMALL);
         searchPanel.add(caseChkBox);
-        regexpChkBox.setFont(font);
+        regexpChkBox.setFont(FONT_SMALL);
         searchPanel.add(regexpChkBox);
 
         return searchPanel;

Modified: jmeter/trunk/src/core/org/apache/jmeter/gui/action/SearchTreeDialog.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/gui/action/SearchTreeDialog.java?rev=1722714&r1=1722713&r2=1722714&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/gui/action/SearchTreeDialog.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/gui/action/SearchTreeDialog.java Sun Jan  3 12:04:12
2016
@@ -41,6 +41,7 @@ import javax.swing.JFrame;
 import javax.swing.JPanel;
 import javax.swing.JRootPane;
 import javax.swing.JTree;
+import javax.swing.UIManager;
 import javax.swing.tree.TreePath;
 
 import org.apache.commons.lang3.StringUtils;
@@ -63,6 +64,10 @@ public class SearchTreeDialog extends JD
 
     private static final Logger logger = LoggingManager.getLoggerForClass();
 
+    private static final Font FONT_DEFAULT = UIManager.getDefaults().getFont("TextField.font");
+
+    private static final Font FONT_SMALL = new Font("SansSerif", Font.PLAIN, (int) Math.round(FONT_DEFAULT.getSize()
* 0.8));
+
     private JButton searchButton;
 
     private JLabeledTextField searchTF;
@@ -127,9 +132,9 @@ public class SearchTreeDialog extends JD
         }
         isRegexpCB = new JCheckBox(JMeterUtils.getResString("search_text_chkbox_regexp"),
false); //$NON-NLS-1$
         isCaseSensitiveCB = new JCheckBox(JMeterUtils.getResString("search_text_chkbox_case"),
false); //$NON-NLS-1$
-        Font font = new Font("SansSerif", Font.PLAIN, 10); // reduce font
-        isRegexpCB.setFont(font);
-        isCaseSensitiveCB.setFont(font);
+        
+        isRegexpCB.setFont(FONT_SMALL);
+        isCaseSensitiveCB.setFont(FONT_SMALL);
 
         JPanel searchCriterionPanel = new JPanel(new FlowLayout(FlowLayout.CENTER));
         searchCriterionPanel.add(isCaseSensitiveCB);

Modified: jmeter/trunk/src/core/org/apache/jmeter/gui/action/SelectTemplatesDialog.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/gui/action/SelectTemplatesDialog.java?rev=1722714&r1=1722713&r2=1722714&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/gui/action/SelectTemplatesDialog.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/gui/action/SelectTemplatesDialog.java Sun Jan
 3 12:04:12 2016
@@ -39,6 +39,7 @@ import javax.swing.JOptionPane;
 import javax.swing.JPanel;
 import javax.swing.JRootPane;
 import javax.swing.JScrollPane;
+import javax.swing.UIManager;
 import javax.swing.event.ChangeEvent;
 import javax.swing.event.ChangeListener;
 import javax.swing.event.HyperlinkEvent;
@@ -66,7 +67,9 @@ public class SelectTemplatesDialog exten
     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 Font FONT_DEFAULT = UIManager.getDefaults().getFont("TextField.font");
//$NON-NLS-1$
+
+    private static final Font FONT_SMALL = new Font("SansSerif", Font.PLAIN, (int) Math.round(FONT_DEFAULT.getSize()
* 0.8)); //$NON-NLS-1$
 
     private static final Logger log = LoggingManager.getLoggerForClass();
 

Modified: jmeter/trunk/src/core/org/apache/jmeter/gui/util/FilePanelEntry.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/gui/util/FilePanelEntry.java?rev=1722714&r1=1722713&r2=1722714&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/gui/util/FilePanelEntry.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/gui/util/FilePanelEntry.java Sun Jan  3 12:04:12
2016
@@ -28,6 +28,7 @@ import javax.swing.JButton;
 import javax.swing.JFileChooser;
 import javax.swing.JLabel;
 import javax.swing.JTextField;
+import javax.swing.UIManager;
 import javax.swing.event.ChangeEvent;
 import javax.swing.event.ChangeListener;
 
@@ -36,7 +37,9 @@ import org.apache.jmeter.util.JMeterUtil
 public class FilePanelEntry extends HorizontalPanel implements ActionListener {
     private static final long serialVersionUID = 280L;
 
-    private final Font FONT_SMALL = new Font("SansSerif", Font.PLAIN, 10); //$NON-NLS-1$
+    private static final Font FONT_DEFAULT = UIManager.getDefaults().getFont("TextField.font");
//$NON-NLS-1$
+
+    private static final Font FONT_SMALL = new Font("SansSerif", Font.PLAIN, (int) Math.round(FONT_DEFAULT.getSize()
* 0.8)); //$NON-NLS-1$
 
     private final JTextField filename = new JTextField(10);
 

Modified: jmeter/trunk/src/monitor/components/org/apache/jmeter/visualizers/MonitorPerformancePanel.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/monitor/components/org/apache/jmeter/visualizers/MonitorPerformancePanel.java?rev=1722714&r1=1722713&r2=1722714&view=diff
==============================================================================
--- jmeter/trunk/src/monitor/components/org/apache/jmeter/visualizers/MonitorPerformancePanel.java
(original)
+++ jmeter/trunk/src/monitor/components/org/apache/jmeter/visualizers/MonitorPerformancePanel.java
Sun Jan  3 12:04:12 2016
@@ -30,6 +30,7 @@ import javax.swing.JPanel;
 import javax.swing.JScrollPane;
 import javax.swing.JSplitPane;
 import javax.swing.JTree;
+import javax.swing.UIManager;
 import javax.swing.event.TreeSelectionEvent;
 import javax.swing.event.TreeSelectionListener;
 import javax.swing.tree.DefaultMutableTreeNode;
@@ -97,7 +98,9 @@ public class MonitorPerformancePanel ext
 
     private final String SERVER_TITLE = JMeterUtils.getResString("monitor_performance_servers");
//$NON-NLS-1$
 
-    private Font plaintext = new Font("plain", Font.TRUETYPE_FONT, 10); //$NON-NLS-1$
+    private static final Font FONT_DEFAULT = UIManager.getDefaults().getFont("TextField.font");
+
+    private static final Font plaintext = new Font("plain", Font.TRUETYPE_FONT, (int) Math.round(FONT_DEFAULT.getSize()
* 0.8));
 
     /**
      *

Modified: jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/config/gui/UrlConfigGui.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/config/gui/UrlConfigGui.java?rev=1722714&r1=1722713&r2=1722714&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/config/gui/UrlConfigGui.java
(original)
+++ jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/config/gui/UrlConfigGui.java
Sun Jan  3 12:04:12 2016
@@ -33,6 +33,7 @@ import javax.swing.JPanel;
 import javax.swing.JPasswordField;
 import javax.swing.JTabbedPane;
 import javax.swing.JTextField;
+import javax.swing.UIManager;
 import javax.swing.event.ChangeEvent;
 import javax.swing.event.ChangeListener;
 
@@ -70,8 +71,10 @@ public class UrlConfigGui extends JPanel
     private static final int TAB_PARAMETERS = 0;
     
     private static final int TAB_RAW_BODY = 1;
+
+    private static final Font FONT_DEFAULT = UIManager.getDefaults().getFont("TextField.font");
     
-    private static final Font FONT_SMALL = new Font("SansSerif", Font.PLAIN, 12);
+    private static final Font FONT_SMALL = new Font("SansSerif", Font.PLAIN, (int) Math.round(FONT_DEFAULT.getSize()
* 0.8));
 
     private HTTPArgumentsPanel argsPanel;
 

Modified: jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/gui/HttpTestSampleGui.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/gui/HttpTestSampleGui.java?rev=1722714&r1=1722713&r2=1722714&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/gui/HttpTestSampleGui.java
(original)
+++ jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/gui/HttpTestSampleGui.java
Sun Jan  3 12:04:12 2016
@@ -30,6 +30,7 @@ import javax.swing.JComboBox;
 import javax.swing.JLabel;
 import javax.swing.JPanel;
 import javax.swing.JTextField;
+import javax.swing.UIManager;
 
 import org.apache.jmeter.gui.util.HorizontalPanel;
 import org.apache.jmeter.gui.util.VerticalPanel;
@@ -49,9 +50,11 @@ import org.apache.jmeter.util.JMeterUtil
 public class HttpTestSampleGui extends AbstractSamplerGui {
     private static final long serialVersionUID = 240L;
     
-    private static final Font FONT_VERY_SMALL = new Font("SansSerif", Font.PLAIN, 9);
-    
-    private static final Font FONT_SMALL = new Font("SansSerif", Font.PLAIN, 12);
+    private static final Font FONT_DEFAULT = UIManager.getDefaults().getFont("TextField.font");
+
+    private static final Font FONT_VERY_SMALL = new Font("SansSerif", Font.PLAIN, (int) Math.round(FONT_DEFAULT.getSize()
* 0.6));
+
+    private static final Font FONT_SMALL = new Font("SansSerif", Font.PLAIN, (int) Math.round(FONT_DEFAULT.getSize()
* 0.8));
 
     private MultipartUrlConfigGui urlConfigGui;
 



Mime
View raw message