Author: sebb
Date: Wed Nov 12 09:54:22 2008
New Revision: 713439

URL: http://svn.apache.org/viewvc?rev=713439&view=rev
Log:
Make HeaderManager Locale-aware

Modified:
    
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/HeaderManager.java
    
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/gui/HeaderPanel.java

Modified: 
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/HeaderManager.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/HeaderManager.java?rev=713439&r1=713438&r2=713439&view=diff
==============================================================================
--- 
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/HeaderManager.java
 (original)
+++ 
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/HeaderManager.java
 Wed Nov 12 09:54:22 2008
@@ -46,11 +46,13 @@
 
     public static final String HEADERS = "HeaderManager.headers";// $NON-NLS-1$
 
-    private final static int columnCount = 2;
+    private final static String[] COLUMN_RESOURCE_NAMES = {
+          "name",             // $NON-NLS-1$
+          "value"             // $NON-NLS-1$
+        };
+
+    private final static int COLUMN_COUNT = COLUMN_RESOURCE_NAMES.length;
 
-    private final static String[] columnNames
-    = { JMeterUtils.getResString("name")// $NON-NLS-1$
-        , JMeterUtils.getResString("value") };// $NON-NLS-1$
 
     /**
      * Apache SOAP driver does not provide an easy way to get and set the 
cookie
@@ -73,15 +75,15 @@
     }
 
     public int getColumnCount() {
-        return columnCount;
+        return COLUMN_COUNT;
     }
 
     public String getColumnName(int column) {
-        return columnNames[column];
+        return COLUMN_RESOURCE_NAMES[column];
     }
 
     public Class getColumnClass(int column) {
-        return columnNames[column].getClass();
+        return COLUMN_RESOURCE_NAMES[column].getClass();
     }
 
     public Header getHeader(int row) {

Modified: 
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/gui/HeaderPanel.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/gui/HeaderPanel.java?rev=713439&r1=713438&r2=713439&view=diff
==============================================================================
--- 
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/gui/HeaderPanel.java
 (original)
+++ 
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/gui/HeaderPanel.java
 Wed Nov 12 09:54:22 2008
@@ -36,6 +36,7 @@
 
 import org.apache.jmeter.config.gui.AbstractConfigGui;
 import org.apache.jmeter.gui.util.FileDialoger;
+import org.apache.jmeter.gui.util.HeaderAsPropertyRenderer;
 import org.apache.jmeter.protocol.http.control.Header;
 import org.apache.jmeter.protocol.http.control.HeaderManager;
 import org.apache.jmeter.testelement.TestElement;
@@ -225,6 +226,7 @@
     public JPanel createHeaderTablePanel() {
         // create the JTable that holds header per row
         headerTable = new JTable(tableModel);
+        headerTable.getTableHeader().setDefaultRenderer(new 
HeaderAsPropertyRenderer());
         headerTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
         headerTable.setPreferredScrollableViewportSize(new Dimension(100, 70));
 



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to