jmeter-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Felix Schumacher <felix.schumac...@internetallee.de>
Subject Re: svn commit: r1733756 - in /jmeter/trunk/src: components/org/apache/jmeter/modifiers/gui/ components/org/apache/jmeter/visualizers/ core/org/apache/jmeter/config/gui/ core/org/apache/jmeter/gui/util/ core/org/apache/jmeter/testbeans/gui/ core/org/apache...
Date Sat, 05 Mar 2016 20:13:08 GMT
Am 05.03.2016 um 21:05 schrieb Philippe Mouawad:
> Hi,
> Wouldn't it be better to put applyHiDPI in ComponentUtil ?
I have just seen your comment about ComponentUtil#createTable and I like 
it even better than JMeterUtils#applyHiDPI.

An easy solution would be to add a return statement to applyHiDPI and 
return the given table and move it to ComponentUtil. That way one could 
write
   JTable table = ComponentUtil.applyHiDPI(new JTable());

The next step would be to create the table in the function and rename it 
to createTable.

I wonder if it would be even better to have a HiDPITable, which extends 
JTable and overwrites setRowHeight, but that might be overkill.

Felix

>
> Regards
>
> On Sat, Mar 5, 2016 at 7:50 PM, <milamber@apache.org> wrote:
>
>> Author: milamber
>> Date: Sat Mar  5 18:50:43 2016
>> New Revision: 1733756
>>
>> URL: http://svn.apache.org/viewvc?rev=1733756&view=rev
>> Log:
>> Better code to apploy the HiDPI mode in JTable elements. Thanks Benoit and
>> Felix.
>> Bugzilla Id: 58426
>>
>> Modified:
>>
>> jmeter/trunk/src/components/org/apache/jmeter/modifiers/gui/UserParametersGui.java
>>
>> jmeter/trunk/src/components/org/apache/jmeter/visualizers/PropertyControlGui.java
>>
>> jmeter/trunk/src/components/org/apache/jmeter/visualizers/SamplerResultTab.java
>>
>> jmeter/trunk/src/components/org/apache/jmeter/visualizers/StatGraphVisualizer.java
>>
>> jmeter/trunk/src/components/org/apache/jmeter/visualizers/StatVisualizer.java
>>
>> jmeter/trunk/src/components/org/apache/jmeter/visualizers/SummaryReport.java
>>
>> jmeter/trunk/src/components/org/apache/jmeter/visualizers/TableVisualizer.java
>>      jmeter/trunk/src/core/org/apache/jmeter/config/gui/ArgumentsPanel.java
>>      jmeter/trunk/src/core/org/apache/jmeter/config/gui/SimpleConfigGui.java
>>      jmeter/trunk/src/core/org/apache/jmeter/gui/util/FileListPanel.java
>>      jmeter/trunk/src/core/org/apache/jmeter/testbeans/gui/TableEditor.java
>>      jmeter/trunk/src/core/org/apache/jmeter/util/JMeterUtils.java
>>
>> jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/gui/AuthPanel.java
>>
>> jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/gui/CookiePanel.java
>>
>> jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/gui/DNSCachePanel.java
>>
>> jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/gui/HTTPFileArgsPanel.java
>>
>> jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/gui/HeaderPanel.java
>>
>> jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/gui/ProxyControlGui.java
>>
>> jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/visualizers/RequestViewHTTP.java
>>
>> jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/control/gui/JMSPropertiesPanel.java
>>
>> jmeter/trunk/src/protocol/ldap/org/apache/jmeter/protocol/ldap/config/gui/LDAPArgumentsPanel.java
>>
>> Modified:
>> jmeter/trunk/src/components/org/apache/jmeter/modifiers/gui/UserParametersGui.java
>> URL:
>> http://svn.apache.org/viewvc/jmeter/trunk/src/components/org/apache/jmeter/modifiers/gui/UserParametersGui.java?rev=1733756&r1=1733755&r2=1733756&view=diff
>>
>> ==============================================================================
>> ---
>> jmeter/trunk/src/components/org/apache/jmeter/modifiers/gui/UserParametersGui.java
>> (original)
>> +++
>> jmeter/trunk/src/components/org/apache/jmeter/modifiers/gui/UserParametersGui.java
>> Sat Mar  5 18:50:43 2016
>> @@ -206,10 +206,7 @@ public class UserParametersGui extends A
>>           // paramTable.setCellSelectionEnabled(true);
>>           // paramTable.setPreferredScrollableViewportSize(new
>> Dimension(100,
>>           // 70));
>> -        // HiDPI mode management
>> -        if (JMeterUtils.getHiDPIMode()) {
>> -            paramTable.setRowHeight((int)
>> Math.round(paramTable.getRowHeight() * JMeterUtils.getHiDPIScaleFactor()));
>> -        }
>> +        JMeterUtils.applyHiDPI(paramTable);
>>
>>           paramPanel = new JPanel(new BorderLayout());
>>           paramPanel.add(tableLabel, BorderLayout.NORTH);
>>
>> Modified:
>> jmeter/trunk/src/components/org/apache/jmeter/visualizers/PropertyControlGui.java
>> URL:
>> http://svn.apache.org/viewvc/jmeter/trunk/src/components/org/apache/jmeter/visualizers/PropertyControlGui.java?rev=1733756&r1=1733755&r2=1733756&view=diff
>>
>> ==============================================================================
>> ---
>> jmeter/trunk/src/components/org/apache/jmeter/visualizers/PropertyControlGui.java
>> (original)
>> +++
>> jmeter/trunk/src/components/org/apache/jmeter/visualizers/PropertyControlGui.java
>> Sat Mar  5 18:50:43 2016
>> @@ -160,10 +160,7 @@ public class PropertyControlGui extends
>>           table = new JTable(tableModel);
>>           table.getTableHeader().setDefaultRenderer(new
>> HeaderAsPropertyRenderer());
>>           table.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
>> -        // HiDPI mode management
>> -        if (JMeterUtils.getHiDPIMode()) {
>> -            table.setRowHeight((int) Math.round(table.getRowHeight() *
>> JMeterUtils.getHiDPIScaleFactor()));
>> -        }
>> +        JMeterUtils.applyHiDPI(table);
>>           return makeScrollPane(table);
>>       }
>>
>>
>> Modified:
>> jmeter/trunk/src/components/org/apache/jmeter/visualizers/SamplerResultTab.java
>> URL:
>> http://svn.apache.org/viewvc/jmeter/trunk/src/components/org/apache/jmeter/visualizers/SamplerResultTab.java?rev=1733756&r1=1733755&r2=1733756&view=diff
>>
>> ==============================================================================
>> ---
>> jmeter/trunk/src/components/org/apache/jmeter/visualizers/SamplerResultTab.java
>> (original)
>> +++
>> jmeter/trunk/src/components/org/apache/jmeter/visualizers/SamplerResultTab.java
>> Sat Mar  5 18:50:43 2016
>> @@ -404,10 +404,7 @@ public abstract class SamplerResultTab i
>>
>>           // Set up the 1st table Result with empty headers
>>           tableResult = new JTable(resultModel);
>> -        // HiDPI mode management
>> -        if (JMeterUtils.getHiDPIMode()) {
>> -            tableResult.setRowHeight((int)
>> Math.round(tableResult.getRowHeight() * JMeterUtils.getHiDPIScaleFactor()));
>> -        }
>> +        JMeterUtils.applyHiDPI(tableResult);
>>
>>   tableResult.setToolTipText(JMeterUtils.getResString("textbox_tooltip_cell"));
>> // $NON-NLS-1$
>>           tableResult.addMouseListener(new TextBoxDoubleClick(tableResult));
>>           setFirstColumnPreferredSize(tableResult);
>> @@ -415,10 +412,7 @@ public abstract class SamplerResultTab i
>>
>>           // Set up the 2nd table
>>           tableResHeaders = new JTable(resHeadersModel);
>> -        // HiDPI mode management
>> -        if (JMeterUtils.getHiDPIMode()) {
>> -            tableResHeaders.setRowHeight((int)
>> Math.round(tableResHeaders.getRowHeight() *
>> JMeterUtils.getHiDPIScaleFactor()));
>> -        }
>> +        JMeterUtils.applyHiDPI(tableResHeaders);
>>
>>   tableResHeaders.setToolTipText(JMeterUtils.getResString("textbox_tooltip_cell"));
>> // $NON-NLS-1$
>>           tableResHeaders.addMouseListener(new
>> TextBoxDoubleClick(tableResHeaders));
>>           setFirstColumnPreferredSize(tableResHeaders);
>> @@ -428,10 +422,7 @@ public abstract class SamplerResultTab i
>>
>>           // Set up the 3rd table
>>           tableResFields = new JTable(resFieldsModel);
>> -        // HiDPI mode management
>> -        if (JMeterUtils.getHiDPIMode()) {
>> -            tableResFields.setRowHeight((int)
>> Math.round(tableResFields.getRowHeight() *
>> JMeterUtils.getHiDPIScaleFactor()));
>> -        }
>> +        JMeterUtils.applyHiDPI(tableResFields);
>>
>>   tableResFields.setToolTipText(JMeterUtils.getResString("textbox_tooltip_cell"));
>> // $NON-NLS-1$
>>           tableResFields.addMouseListener(new
>> TextBoxDoubleClick(tableResFields));
>>           setFirstColumnPreferredSize(tableResFields);
>>
>> 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=1733756&r1=1733755&r2=1733756&view=diff
>>
>> ==============================================================================
>> ---
>> jmeter/trunk/src/components/org/apache/jmeter/visualizers/StatGraphVisualizer.java
>> (original)
>> +++
>> jmeter/trunk/src/components/org/apache/jmeter/visualizers/StatGraphVisualizer.java
>> Sat Mar  5 18:50:43 2016
>> @@ -413,10 +413,7 @@ public class StatGraphVisualizer extends
>>           mainPanel.add(makeTitlePanel());
>>
>>           myJTable = new JTable(model);
>> -        // HiDPI mode management
>> -        if (JMeterUtils.getHiDPIMode()) {
>> -            myJTable.setRowHeight((int)
>> Math.round(myJTable.getRowHeight() * JMeterUtils.getHiDPIScaleFactor()));
>> -        }
>> +        JMeterUtils.applyHiDPI(myJTable);
>>           // Fix centering of titles
>>           myJTable.getTableHeader().setDefaultRenderer(new
>> HeaderAsPropertyRenderer(COLUMNS_MSG_PARAMETERS));
>>           myJTable.setPreferredScrollableViewportSize(new Dimension(500,
>> 70));
>>
>> Modified:
>> jmeter/trunk/src/components/org/apache/jmeter/visualizers/StatVisualizer.java
>> URL:
>> http://svn.apache.org/viewvc/jmeter/trunk/src/components/org/apache/jmeter/visualizers/StatVisualizer.java?rev=1733756&r1=1733755&r2=1733756&view=diff
>>
>> ==============================================================================
>> ---
>> jmeter/trunk/src/components/org/apache/jmeter/visualizers/StatVisualizer.java
>> (original)
>> +++
>> jmeter/trunk/src/components/org/apache/jmeter/visualizers/StatVisualizer.java
>> Sat Mar  5 18:50:43 2016
>> @@ -173,10 +173,7 @@ public class StatVisualizer extends Abst
>>           // SortFilterModel mySortedModel =
>>           // new SortFilterModel(myStatTableModel);
>>           myJTable = new JTable(model);
>> -        // HiDPI mode management
>> -        if (JMeterUtils.getHiDPIMode()) {
>> -            myJTable.setRowHeight((int)
>> Math.round(myJTable.getRowHeight() * JMeterUtils.getHiDPIScaleFactor()));
>> -        }
>> +        JMeterUtils.applyHiDPI(myJTable);
>>           myJTable.getTableHeader().setDefaultRenderer(new
>> HeaderAsPropertyRenderer(StatGraphVisualizer.COLUMNS_MSG_PARAMETERS));
>>           myJTable.setPreferredScrollableViewportSize(new Dimension(500,
>> 70));
>>           RendererUtils.applyRenderers(myJTable,
>> StatGraphVisualizer.RENDERERS);
>>
>> Modified:
>> jmeter/trunk/src/components/org/apache/jmeter/visualizers/SummaryReport.java
>> URL:
>> http://svn.apache.org/viewvc/jmeter/trunk/src/components/org/apache/jmeter/visualizers/SummaryReport.java?rev=1733756&r1=1733755&r2=1733756&view=diff
>>
>> ==============================================================================
>> ---
>> jmeter/trunk/src/components/org/apache/jmeter/visualizers/SummaryReport.java
>> (original)
>> +++
>> jmeter/trunk/src/components/org/apache/jmeter/visualizers/SummaryReport.java
>> Sat Mar  5 18:50:43 2016
>> @@ -234,10 +234,7 @@ public class SummaryReport extends Abstr
>>           mainPanel.add(makeTitlePanel());
>>
>>           myJTable = new JTable(model);
>> -        // HiDPI mode management
>> -        if (JMeterUtils.getHiDPIMode()) {
>> -            myJTable.setRowHeight((int)
>> Math.round(myJTable.getRowHeight() * JMeterUtils.getHiDPIScaleFactor()));
>> -        }
>> +        JMeterUtils.applyHiDPI(myJTable);
>>           myJTable.getTableHeader().setDefaultRenderer(new
>> HeaderAsPropertyRenderer());
>>           myJTable.setPreferredScrollableViewportSize(new Dimension(500,
>> 70));
>>           RendererUtils.applyRenderers(myJTable, RENDERERS);
>>
>> Modified:
>> jmeter/trunk/src/components/org/apache/jmeter/visualizers/TableVisualizer.java
>> URL:
>> http://svn.apache.org/viewvc/jmeter/trunk/src/components/org/apache/jmeter/visualizers/TableVisualizer.java?rev=1733756&r1=1733755&r2=1733756&view=diff
>>
>> ==============================================================================
>> ---
>> jmeter/trunk/src/components/org/apache/jmeter/visualizers/TableVisualizer.java
>> (original)
>> +++
>> jmeter/trunk/src/components/org/apache/jmeter/visualizers/TableVisualizer.java
>> Sat Mar  5 18:50:43 2016
>> @@ -237,10 +237,7 @@ public class TableVisualizer extends Abs
>>
>>           // Set up the table itself
>>           table = new JTable(model);
>> -        // HiDPI mode management
>> -        if (JMeterUtils.getHiDPIMode()) {
>> -            table.setRowHeight((int) Math.round(table.getRowHeight() *
>> JMeterUtils.getHiDPIScaleFactor()));
>> -        }
>> +        JMeterUtils.applyHiDPI(table);
>>           table.getTableHeader().setDefaultRenderer(new
>> HeaderAsPropertyRenderer());
>>           // table.getTableHeader().setReorderingAllowed(false);
>>           RendererUtils.applyRenderers(table, RENDERERS);
>>
>> Modified:
>> jmeter/trunk/src/core/org/apache/jmeter/config/gui/ArgumentsPanel.java
>> URL:
>> http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/config/gui/ArgumentsPanel.java?rev=1733756&r1=1733755&r2=1733756&view=diff
>>
>> ==============================================================================
>> --- jmeter/trunk/src/core/org/apache/jmeter/config/gui/ArgumentsPanel.java
>> (original)
>> +++ jmeter/trunk/src/core/org/apache/jmeter/config/gui/ArgumentsPanel.java
>> Sat Mar  5 18:50:43 2016
>> @@ -644,10 +644,7 @@ public class ArgumentsPanel extends Abst
>>           if (this.background != null) {
>>               table.setBackground(this.background);
>>           }
>> -        // HiDPI mode management
>> -        if (JMeterUtils.getHiDPIMode()) {
>> -            table.setRowHeight((int) Math.round(table.getRowHeight() *
>> JMeterUtils.getHiDPIScaleFactor()));
>> -        }
>> +        JMeterUtils.applyHiDPI(table);
>>           return makeScrollPane(table);
>>       }
>>
>>
>> Modified:
>> jmeter/trunk/src/core/org/apache/jmeter/config/gui/SimpleConfigGui.java
>> URL:
>> http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/config/gui/SimpleConfigGui.java?rev=1733756&r1=1733755&r2=1733756&view=diff
>>
>> ==============================================================================
>> ---
>> jmeter/trunk/src/core/org/apache/jmeter/config/gui/SimpleConfigGui.java
>> (original)
>> +++
>> jmeter/trunk/src/core/org/apache/jmeter/config/gui/SimpleConfigGui.java Sat
>> Mar  5 18:50:43 2016
>> @@ -203,10 +203,7 @@ public class SimpleConfigGui extends Abs
>>                   new Class[] { String.class, String.class });
>>
>>           table = new JTable(tableModel);
>> -        // HiDPI mode management
>> -        if (JMeterUtils.getHiDPIMode()) {
>> -            table.setRowHeight((int) Math.round(table.getRowHeight() *
>> JMeterUtils.getHiDPIScaleFactor()));
>> -        }
>> +        JMeterUtils.applyHiDPI(table);
>>           table.getTableHeader().setDefaultRenderer(new
>> HeaderAsPropertyRenderer());
>>           table.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
>>           return makeScrollPane(table);
>>
>> Modified:
>> jmeter/trunk/src/core/org/apache/jmeter/gui/util/FileListPanel.java
>> URL:
>> http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/gui/util/FileListPanel.java?rev=1733756&r1=1733755&r2=1733756&view=diff
>>
>> ==============================================================================
>> --- jmeter/trunk/src/core/org/apache/jmeter/gui/util/FileListPanel.java
>> (original)
>> +++ jmeter/trunk/src/core/org/apache/jmeter/gui/util/FileListPanel.java
>> Sat Mar  5 18:50:43 2016
>> @@ -115,10 +115,7 @@ public class FileListPanel extends JPane
>>
>>           this.initializeTableModel();
>>           files = new JTable(tableModel);
>> -        // HiDPI mode management
>> -        if (JMeterUtils.getHiDPIMode()) {
>> -            files.setRowHeight((int) Math.round(files.getRowHeight() *
>> JMeterUtils.getHiDPIScaleFactor()));
>> -        }
>> +        JMeterUtils.applyHiDPI(files);
>>
>>   files.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
>>           files.revalidate();
>>
>>
>> Modified:
>> jmeter/trunk/src/core/org/apache/jmeter/testbeans/gui/TableEditor.java
>> URL:
>> http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/testbeans/gui/TableEditor.java?rev=1733756&r1=1733755&r2=1733756&view=diff
>>
>> ==============================================================================
>> --- jmeter/trunk/src/core/org/apache/jmeter/testbeans/gui/TableEditor.java
>> (original)
>> +++ jmeter/trunk/src/core/org/apache/jmeter/testbeans/gui/TableEditor.java
>> Sat Mar  5 18:50:43 2016
>> @@ -215,10 +215,7 @@ public class TableEditor extends Propert
>>           }
>>           model.addTableModelListener(this);
>>           table = new JTable(model);
>> -        // HiDPI mode management
>> -        if (JMeterUtils.getHiDPIMode()) {
>> -            table.setRowHeight((int) Math.round(table.getRowHeight() *
>> JMeterUtils.getHiDPIScaleFactor()));
>> -        }
>> +        JMeterUtils.applyHiDPI(table);
>>           table.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
>>           table.addFocusListener(this);
>>       }
>>
>> Modified: jmeter/trunk/src/core/org/apache/jmeter/util/JMeterUtils.java
>> URL:
>> http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/util/JMeterUtils.java?rev=1733756&r1=1733755&r2=1733756&view=diff
>>
>> ==============================================================================
>> --- jmeter/trunk/src/core/org/apache/jmeter/util/JMeterUtils.java
>> (original)
>> +++ jmeter/trunk/src/core/org/apache/jmeter/util/JMeterUtils.java Sat Mar
>> 5 18:50:43 2016
>> @@ -46,6 +46,7 @@ import javax.swing.ImageIcon;
>>   import javax.swing.JButton;
>>   import javax.swing.JComboBox;
>>   import javax.swing.JOptionPane;
>> +import javax.swing.JTable;
>>   import javax.swing.SwingUtilities;
>>
>>   import org.apache.commons.io.IOUtils;
>> @@ -1370,7 +1371,15 @@ public class JMeterUtils implements Unit
>>        */
>>       public static double getHiDPIScaleFactor() {
>>           return
>> Double.valueOf(JMeterUtils.getPropDefault("jmeter.hidpi.scale.factor",
>> "1.0"));  // $NON-NLS-1$  $NON-NLS-2$
>> -
>> +    }
>> +
>> +    /*
>> +     * HiDPI mode management
>> +     */
>> +    public static void applyHiDPI(JTable table) {
>> +        if (JMeterUtils.getHiDPIMode()) {
>> +            table.setRowHeight((int) Math.round(table.getRowHeight() *
>> JMeterUtils.getHiDPIScaleFactor()));
>> +        }
>>       }
>>
>>   }
>>
>> Modified:
>> jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/gui/AuthPanel.java
>> URL:
>> http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/gui/AuthPanel.java?rev=1733756&r1=1733755&r2=1733756&view=diff
>>
>> ==============================================================================
>> ---
>> jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/gui/AuthPanel.java
>> (original)
>> +++
>> jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/gui/AuthPanel.java
>> Sat Mar  5 18:50:43 2016
>> @@ -269,10 +269,7 @@ public class AuthPanel extends AbstractC
>>       public JPanel createAuthTablePanel() {
>>           // create the JTable that holds auth per row
>>           authTable = new JTable(tableModel);
>> -        // HiDPI mode management
>> -        if (JMeterUtils.getHiDPIMode()) {
>> -            authTable.setRowHeight((int)
>> Math.round(authTable.getRowHeight() * JMeterUtils.getHiDPIScaleFactor()));
>> -        }
>> +        JMeterUtils.applyHiDPI(authTable);
>>           authTable.getTableHeader().setDefaultRenderer(new
>> HeaderAsPropertyRenderer());
>>           authTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
>>           authTable.setPreferredScrollableViewportSize(new Dimension(100,
>> 70));
>>
>> Modified:
>> jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/gui/CookiePanel.java
>> URL:
>> http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/gui/CookiePanel.java?rev=1733756&r1=1733755&r2=1733756&view=diff
>>
>> ==============================================================================
>> ---
>> jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/gui/CookiePanel.java
>> (original)
>> +++
>> jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/gui/CookiePanel.java
>> Sat Mar  5 18:50:43 2016
>> @@ -368,10 +368,7 @@ public class CookiePanel extends Abstrac
>>       public JPanel createCookieTablePanel() {
>>           // create the JTable that holds one cookie per row
>>           cookieTable = new JTable(tableModel);
>> -        // HiDPI mode management
>> -        if (JMeterUtils.getHiDPIMode()) {
>> -            cookieTable.setRowHeight((int)
>> Math.round(cookieTable.getRowHeight() * JMeterUtils.getHiDPIScaleFactor()));
>> -        }
>> +        JMeterUtils.applyHiDPI(cookieTable);
>>           cookieTable.getTableHeader().setDefaultRenderer(new
>> HeaderAsPropertyRenderer());
>>           cookieTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
>>           cookieTable.setPreferredScrollableViewportSize(new Dimension(100,
>> 70));
>>
>> Modified:
>> jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/gui/DNSCachePanel.java
>> URL:
>> http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/gui/DNSCachePanel.java?rev=1733756&r1=1733755&r2=1733756&view=diff
>>
>> ==============================================================================
>> ---
>> jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/gui/DNSCachePanel.java
>> (original)
>> +++
>> jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/gui/DNSCachePanel.java
>> Sat Mar  5 18:50:43 2016
>> @@ -199,10 +199,7 @@ public class DNSCachePanel extends Abstr
>>       public JPanel createDnsServersTablePanel() {
>>           // create the JTable that holds header per row
>>           dnsServersTable = new JTable(dnsServersTableModel);
>> -        // HiDPI mode management
>> -        if (JMeterUtils.getHiDPIMode()) {
>> -            dnsServersTable.setRowHeight((int)
>> Math.round(dnsServersTable.getRowHeight() *
>> JMeterUtils.getHiDPIScaleFactor()));
>> -        }
>> +        JMeterUtils.applyHiDPI(dnsServersTable);
>>
>>   dnsServersTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
>>           dnsServersTable.setPreferredScrollableViewportSize(new
>> Dimension(400, 100));
>>
>>
>> Modified:
>> jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/gui/HTTPFileArgsPanel.java
>> URL:
>> http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/gui/HTTPFileArgsPanel.java?rev=1733756&r1=1733755&r2=1733756&view=diff
>>
>> ==============================================================================
>> ---
>> jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/gui/HTTPFileArgsPanel.java
>> (original)
>> +++
>> jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/gui/HTTPFileArgsPanel.java
>> Sat Mar  5 18:50:43 2016
>> @@ -344,10 +344,7 @@ public class HTTPFileArgsPanel extends J
>>       private Component makeMainPanel() {
>>           initializeTableModel();
>>           table = new JTable(tableModel);
>> -        // HiDPI mode management
>> -        if (JMeterUtils.getHiDPIMode()) {
>> -            table.setRowHeight((int) Math.round(table.getRowHeight() *
>> JMeterUtils.getHiDPIScaleFactor()));
>> -        }
>> +        JMeterUtils.applyHiDPI(table);
>>           table.getTableHeader().setDefaultRenderer(new
>> HeaderAsPropertyRenderer());
>>           table.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
>>           return makeScrollPane(table);
>>
>> Modified:
>> jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/gui/HeaderPanel.java
>> URL:
>> http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/gui/HeaderPanel.java?rev=1733756&r1=1733755&r2=1733756&view=diff
>>
>> ==============================================================================
>> ---
>> jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/gui/HeaderPanel.java
>> (original)
>> +++
>> jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/gui/HeaderPanel.java
>> Sat Mar  5 18:50:43 2016
>> @@ -279,10 +279,7 @@ public class HeaderPanel extends Abstrac
>>       public JPanel createHeaderTablePanel() {
>>           // create the JTable that holds header per row
>>           headerTable = new JTable(tableModel);
>> -        // HiDPI mode management
>> -        if (JMeterUtils.getHiDPIMode()) {
>> -            headerTable.setRowHeight((int)
>> Math.round(headerTable.getRowHeight() * JMeterUtils.getHiDPIScaleFactor()));
>> -        }
>> +        JMeterUtils.applyHiDPI(headerTable);
>>           headerTable.getTableHeader().setDefaultRenderer(new
>> HeaderAsPropertyRenderer());
>>           headerTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
>>           headerTable.setPreferredScrollableViewportSize(new Dimension(100,
>> 70));
>>
>> 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=1733756&r1=1733755&r2=1733756&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 Mar  5 18:50:43 2016
>> @@ -861,10 +861,7 @@ public class ProxyControlGui extends Log
>>       private JPanel createIncludePanel() {
>>           includeModel = new PowerTableModel(new String[] { INCLUDE_COL },
>> new Class[] { String.class });
>>           includeTable = new JTable(includeModel);
>> -        // HiDPI mode management
>> -        if (JMeterUtils.getHiDPIMode()) {
>> -            includeTable.setRowHeight((int)
>> Math.round(includeTable.getRowHeight() *
>> JMeterUtils.getHiDPIScaleFactor()));
>> -        }
>> +        JMeterUtils.applyHiDPI(includeTable);
>>           includeTable.getTableHeader().setDefaultRenderer(new
>> HeaderAsPropertyRenderer());
>>           includeTable.setPreferredScrollableViewportSize(new
>> Dimension(100, 30));
>>
>> @@ -881,10 +878,7 @@ public class ProxyControlGui extends Log
>>       private JPanel createExcludePanel() {
>>           excludeModel = new PowerTableModel(new String[] { EXCLUDE_COL },
>> new Class[] { String.class });
>>           excludeTable = new JTable(excludeModel);
>> -        // HiDPI mode management
>> -        if (JMeterUtils.getHiDPIMode()) {
>> -            excludeTable.setRowHeight((int)
>> Math.round(excludeTable.getRowHeight() *
>> JMeterUtils.getHiDPIScaleFactor()));
>> -        }
>> +        JMeterUtils.applyHiDPI(excludeTable);
>>           excludeTable.getTableHeader().setDefaultRenderer(new
>> HeaderAsPropertyRenderer());
>>           excludeTable.setPreferredScrollableViewportSize(new
>> Dimension(100, 30));
>>
>>
>> Modified:
>> jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/visualizers/RequestViewHTTP.java
>> URL:
>> http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/visualizers/RequestViewHTTP.java?rev=1733756&r1=1733755&r2=1733756&view=diff
>>
>> ==============================================================================
>> ---
>> jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/visualizers/RequestViewHTTP.java
>> (original)
>> +++
>> jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/visualizers/RequestViewHTTP.java
>> Sat Mar  5 18:50:43 2016
>> @@ -370,10 +370,7 @@ public class RequestViewHTTP implements
>>       private Component createRequestPane() {
>>           // Set up the 1st table Result with empty headers
>>           tableRequest = new JTable(requestModel);
>> -        // HiDPI mode management
>> -        if (JMeterUtils.getHiDPIMode()) {
>> -            tableRequest.setRowHeight((int)
>> Math.round(tableRequest.getRowHeight() *
>> JMeterUtils.getHiDPIScaleFactor()));
>> -        }
>> +        JMeterUtils.applyHiDPI(tableRequest);
>>
>>   tableRequest.setToolTipText(JMeterUtils.getResString("textbox_tooltip_cell"));
>> // $NON-NLS-1$
>>           tableRequest.addMouseListener(new
>> TextBoxDoubleClick(tableRequest));
>>
>> @@ -382,10 +379,7 @@ public class RequestViewHTTP implements
>>
>>           // Set up the 2nd table
>>           tableParams = new JTable(paramsModel);
>> -        // HiDPI mode management
>> -        if (JMeterUtils.getHiDPIMode()) {
>> -            tableParams.setRowHeight((int)
>> Math.round(tableParams.getRowHeight() * JMeterUtils.getHiDPIScaleFactor()));
>> -        }
>> +        JMeterUtils.applyHiDPI(tableParams);
>>
>>   tableParams.setToolTipText(JMeterUtils.getResString("textbox_tooltip_cell"));
>> // $NON-NLS-1$
>>           tableParams.addMouseListener(new TextBoxDoubleClick(tableParams));
>>           TableColumn column = tableParams.getColumnModel().getColumn(0);
>> @@ -395,10 +389,7 @@ public class RequestViewHTTP implements
>>
>>           // Set up the 3rd table
>>           tableHeaders = new JTable(headersModel);
>> -        // HiDPI mode management
>> -        if (JMeterUtils.getHiDPIMode()) {
>> -            tableHeaders.setRowHeight((int)
>> Math.round(tableHeaders.getRowHeight() *
>> JMeterUtils.getHiDPIScaleFactor()));
>> -        }
>> +        JMeterUtils.applyHiDPI(tableHeaders);
>>
>>   tableHeaders.setToolTipText(JMeterUtils.getResString("textbox_tooltip_cell"));
>> // $NON-NLS-1$
>>           tableHeaders.addMouseListener(new
>> TextBoxDoubleClick(tableHeaders));
>>           setFirstColumnPreferredAndMaxWidth(tableHeaders);
>>
>> Modified:
>> jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/control/gui/JMSPropertiesPanel.java
>> URL:
>> http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/control/gui/JMSPropertiesPanel.java?rev=1733756&r1=1733755&r2=1733756&view=diff
>>
>> ==============================================================================
>> ---
>> jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/control/gui/JMSPropertiesPanel.java
>> (original)
>> +++
>> jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/control/gui/JMSPropertiesPanel.java
>> Sat Mar  5 18:50:43 2016
>> @@ -190,10 +190,7 @@ public class JMSPropertiesPanel extends
>>       public JPanel createPropertiesPanel() {
>>           // create the JTable that holds JMSProperty per row
>>           jmsPropertiesTable = new JTable(tableModel);
>> -        // HiDPI mode management
>> -        if (JMeterUtils.getHiDPIMode()) {
>> -            jmsPropertiesTable.setRowHeight((int)
>> Math.round(jmsPropertiesTable.getRowHeight() *
>> JMeterUtils.getHiDPIScaleFactor()));
>> -        }
>> +        JMeterUtils.applyHiDPI(jmsPropertiesTable);
>>           jmsPropertiesTable.getTableHeader().setDefaultRenderer(new
>> HeaderAsPropertyRenderer());
>>
>>   jmsPropertiesTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
>>           jmsPropertiesTable.setPreferredScrollableViewportSize(new
>> Dimension(100, 70));
>>
>> Modified:
>> jmeter/trunk/src/protocol/ldap/org/apache/jmeter/protocol/ldap/config/gui/LDAPArgumentsPanel.java
>> URL:
>> http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/ldap/org/apache/jmeter/protocol/ldap/config/gui/LDAPArgumentsPanel.java?rev=1733756&r1=1733755&r2=1733756&view=diff
>>
>> ==============================================================================
>> ---
>> jmeter/trunk/src/protocol/ldap/org/apache/jmeter/protocol/ldap/config/gui/LDAPArgumentsPanel.java
>> (original)
>> +++
>> jmeter/trunk/src/protocol/ldap/org/apache/jmeter/protocol/ldap/config/gui/LDAPArgumentsPanel.java
>> Sat Mar  5 18:50:43 2016
>> @@ -290,10 +290,7 @@ public class LDAPArgumentsPanel extends
>>       private Component makeMainPanel() {
>>           initializeTableModel();
>>           table = new JTable(tableModel);
>> -        // HiDPI mode management
>> -        if (JMeterUtils.getHiDPIMode()) {
>> -            table.setRowHeight((int) Math.round(table.getRowHeight() *
>> JMeterUtils.getHiDPIScaleFactor()));
>> -        }
>> +        JMeterUtils.applyHiDPI(table);
>>           table.getTableHeader().setDefaultRenderer(new
>> HeaderAsPropertyRenderer());
>>           table.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
>>           return makeScrollPane(table);
>>
>>
>>
>


Mime
View raw message