Author: sebb
Date: Tue Nov 11 18:25:37 2008
New Revision: 713246

URL: http://svn.apache.org/viewvc?rev=713246&view=rev
Log:
Enhance ObjectTableModel to support header resource names; use this to fix 
locale changes in various GUI elements

Modified:
    
jakarta/jmeter/trunk/src/components/org/apache/jmeter/visualizers/PropertyControlGui.java
    
jakarta/jmeter/trunk/src/components/org/apache/jmeter/visualizers/StatGraphVisualizer.java
    
jakarta/jmeter/trunk/src/components/org/apache/jmeter/visualizers/StatVisualizer.java
    
jakarta/jmeter/trunk/src/components/org/apache/jmeter/visualizers/SummaryReport.java
    
jakarta/jmeter/trunk/src/components/org/apache/jmeter/visualizers/TableVisualizer.java
    
jakarta/jmeter/trunk/src/core/org/apache/jmeter/config/gui/ArgumentsPanel.java
    jakarta/jmeter/trunk/src/core/org/apache/jmeter/gui/util/FileListPanel.java
    
jakarta/jmeter/trunk/src/jorphan/org/apache/jorphan/gui/ObjectTableModel.java
    
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/gui/HTTPArgumentsPanel.java
    
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/gui/HTTPFileArgsPanel.java
    
jakarta/jmeter/trunk/src/protocol/ldap/org/apache/jmeter/protocol/ldap/config/gui/LDAPArgumentsPanel.java
    jakarta/jmeter/trunk/xdocs/changes.xml

Modified: 
jakarta/jmeter/trunk/src/components/org/apache/jmeter/visualizers/PropertyControlGui.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/components/org/apache/jmeter/visualizers/PropertyControlGui.java?rev=713246&r1=713245&r2=713246&view=diff
==============================================================================
--- 
jakarta/jmeter/trunk/src/components/org/apache/jmeter/visualizers/PropertyControlGui.java
 (original)
+++ 
jakarta/jmeter/trunk/src/components/org/apache/jmeter/visualizers/PropertyControlGui.java
 Tue Nov 11 18:25:37 2008
@@ -58,9 +58,9 @@
 
     private static final long serialVersionUID = 1L;
 
-    private static final String COLUMN_NAMES_0 = 
JMeterUtils.getResString("name"); // $NON-NLS-1$
+    private static final String COLUMN_NAMES_0 = "name"; // $NON-NLS-1$
 
-    private static final String COLUMN_NAMES_1 = 
JMeterUtils.getResString("value"); // $NON-NLS-1$
+    private static final String COLUMN_NAMES_1 = "value"; // $NON-NLS-1$
 
     // TODO: add and delete not currently supported
     private static final String ADD = "add"; // $NON-NLS-1$
@@ -124,7 +124,7 @@
     }
 
     public TestElement createTestElement() {
-        TestElement el = new ConfigTestElement();// TODO replace with simpler 
version?
+        TestElement el = new ConfigTestElement();
         modifyTestElement(el);
         return el;
     }
@@ -247,6 +247,6 @@
                 null, //new Functor("setName"), // $NON-NLS-1$
                 new Functor(Map.Entry.class,"setValue", new Class[] { 
Object.class }) // $NON-NLS-1$
             },
-                new Class[] { String.class, String.class });
+                new Class[] { String.class, String.class }, true);
     }
 }
\ No newline at end of file

Modified: 
jakarta/jmeter/trunk/src/components/org/apache/jmeter/visualizers/StatGraphVisualizer.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/components/org/apache/jmeter/visualizers/StatGraphVisualizer.java?rev=713246&r1=713245&r2=713246&view=diff
==============================================================================
--- 
jakarta/jmeter/trunk/src/components/org/apache/jmeter/visualizers/StatGraphVisualizer.java
 (original)
+++ 
jakarta/jmeter/trunk/src/components/org/apache/jmeter/visualizers/StatGraphVisualizer.java
 Tue Nov 11 18:25:37 2008
@@ -77,16 +77,18 @@
 ActionListener {
     private static final Logger log = LoggingManager.getLoggerForClass();
 
-    private final String[] COLUMNS = { 
JMeterUtils.getResString("sampler_label"), //$NON-NLS-1$
-            JMeterUtils.getResString("aggregate_report_count"),         
//$NON-NLS-1$
-            JMeterUtils.getResString("average"),                        
//$NON-NLS-1$
-            JMeterUtils.getResString("aggregate_report_median"),        
//$NON-NLS-1$
-            JMeterUtils.getResString("aggregate_report_90%_line"),      
//$NON-NLS-1$
-            JMeterUtils.getResString("aggregate_report_min"),           
//$NON-NLS-1$
-            JMeterUtils.getResString("aggregate_report_max"),           
//$NON-NLS-1$
-            JMeterUtils.getResString("aggregate_report_error%"),        
//$NON-NLS-1$
-            JMeterUtils.getResString("aggregate_report_rate"),          
//$NON-NLS-1$
-            JMeterUtils.getResString("aggregate_report_bandwidth") };   
//$NON-NLS-1$
+    // Column resource names
+    private static final String[] COLUMNS = {
+            "sampler_label",                  //$NON-NLS-1$
+            "aggregate_report_count",         //$NON-NLS-1$
+            "average",                        //$NON-NLS-1$
+            "aggregate_report_median",        //$NON-NLS-1$
+            "aggregate_report_90%_line",      //$NON-NLS-1$
+            "aggregate_report_min",           //$NON-NLS-1$
+            "aggregate_report_max",           //$NON-NLS-1$
+            "aggregate_report_error%",        //$NON-NLS-1$
+            "aggregate_report_rate",          //$NON-NLS-1$
+            "aggregate_report_bandwidth" };   //$NON-NLS-1$
 
     private final String[] GRAPH_COLUMNS = 
{JMeterUtils.getResString("average"),//$NON-NLS-1$
             JMeterUtils.getResString("aggregate_report_median"),        
//$NON-NLS-1$
@@ -319,7 +321,7 @@
     public double[][] getData() {
         if (model.getRowCount() > 1) {
             int count = model.getRowCount() -1;
-            int col = model.findColumn(columns.getText());
+            int col = model.findColumn(columns.getText()); // TODO is this 
locale-safe?
             double[][] data = new double[1][count];
             for (int idx=0; idx < count; idx++) {
                 data[0][idx] = 
((Number)model.getValueAt(idx,col)).doubleValue();
@@ -384,7 +386,7 @@
             try {
                 writer = new FileWriter(chooser.getSelectedFile());
                 Vector data = this.getAllTableData();
-                
CSVSaveService.saveCSVStats(data,writer,saveHeaders.isSelected() ? COLUMNS : 
null);
+                
CSVSaveService.saveCSVStats(data,writer,saveHeaders.isSelected() ? 
model.getColumnNames() : null);
             } catch (FileNotFoundException e) {
                 log.warn(e.getMessage());
             } catch (IOException e) {

Modified: 
jakarta/jmeter/trunk/src/components/org/apache/jmeter/visualizers/StatVisualizer.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/components/org/apache/jmeter/visualizers/StatVisualizer.java?rev=713246&r1=713245&r2=713246&view=diff
==============================================================================
--- 
jakarta/jmeter/trunk/src/components/org/apache/jmeter/visualizers/StatVisualizer.java
 (original)
+++ 
jakarta/jmeter/trunk/src/components/org/apache/jmeter/visualizers/StatVisualizer.java
 Tue Nov 11 18:25:37 2008
@@ -71,17 +71,17 @@
 
     private static final Logger log = LoggingManager.getLoggerForClass();
 
-    private final String[] COLUMNS = {
-            JMeterUtils.getResString("sampler_label"),  //$NON-NLS-1$
-            JMeterUtils.getResString("aggregate_report_count"),  //$NON-NLS-1$
-            JMeterUtils.getResString("average"),  //$NON-NLS-1$
-            JMeterUtils.getResString("aggregate_report_median"),  //$NON-NLS-1$
-            JMeterUtils.getResString("aggregate_report_90%_line"),  
//$NON-NLS-1$
-            JMeterUtils.getResString("aggregate_report_min"),  //$NON-NLS-1$
-            JMeterUtils.getResString("aggregate_report_max"),  //$NON-NLS-1$
-            JMeterUtils.getResString("aggregate_report_error%"),  //$NON-NLS-1$
-            JMeterUtils.getResString("aggregate_report_rate"),  //$NON-NLS-1$
-            JMeterUtils.getResString("aggregate_report_bandwidth") };  
//$NON-NLS-1$
+    private static final String[] COLUMNS = {
+            "sampler_label",                 //$NON-NLS-1$
+            "aggregate_report_count",        //$NON-NLS-1$
+            "average",                       //$NON-NLS-1$
+            "aggregate_report_median",       //$NON-NLS-1$
+            "aggregate_report_90%_line",     //$NON-NLS-1$
+            "aggregate_report_min",          //$NON-NLS-1$
+            "aggregate_report_max",          //$NON-NLS-1$
+            "aggregate_report_error%",       //$NON-NLS-1$
+            "aggregate_report_rate",         //$NON-NLS-1$
+            "aggregate_report_bandwidth" };  //$NON-NLS-1$
 
     private final String TOTAL_ROW_LABEL
         = JMeterUtils.getResString("aggregate_report_total_label");  
//$NON-NLS-1$
@@ -119,7 +119,7 @@
                 },
                 new Functor[] { null, null, null, null, null, null, null, 
null, null, null },
                 new Class[] { String.class, Long.class, Long.class, 
Long.class, Long.class,
-                              Long.class, Long.class, String.class, 
String.class, String.class });
+                              Long.class, Long.class, String.class, 
String.class, String.class }, true);
         clearData();
         init();
     }

Modified: 
jakarta/jmeter/trunk/src/components/org/apache/jmeter/visualizers/SummaryReport.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/components/org/apache/jmeter/visualizers/SummaryReport.java?rev=713246&r1=713245&r2=713246&view=diff
==============================================================================
--- 
jakarta/jmeter/trunk/src/components/org/apache/jmeter/visualizers/SummaryReport.java
 (original)
+++ 
jakarta/jmeter/trunk/src/components/org/apache/jmeter/visualizers/SummaryReport.java
 Tue Nov 11 18:25:37 2008
@@ -64,17 +64,17 @@
 
     private static final Logger log = LoggingManager.getLoggerForClass();
 
-    private final String[] COLUMNS = {
-            JMeterUtils.getResString("sampler_label"),               
//$NON-NLS-1$
-            JMeterUtils.getResString("aggregate_report_count"),      
//$NON-NLS-1$
-            JMeterUtils.getResString("average"),                     
//$NON-NLS-1$
-            JMeterUtils.getResString("aggregate_report_min"),        
//$NON-NLS-1$
-            JMeterUtils.getResString("aggregate_report_max"),        
//$NON-NLS-1$
-            JMeterUtils.getResString("aggregate_report_stddev"),     
//$NON-NLS-1$
-            JMeterUtils.getResString("aggregate_report_error%"),     
//$NON-NLS-1$
-            JMeterUtils.getResString("aggregate_report_rate"),       
//$NON-NLS-1$
-            JMeterUtils.getResString("aggregate_report_bandwidth"),  
//$NON-NLS-1$
-            JMeterUtils.getResString("average_bytes"),               
//$NON-NLS-1$
+    private static final String[] COLUMNS = {
+            "sampler_label",               //$NON-NLS-1$
+            "aggregate_report_count",      //$NON-NLS-1$
+            "average",                     //$NON-NLS-1$
+            "aggregate_report_min",        //$NON-NLS-1$
+            "aggregate_report_max",        //$NON-NLS-1$
+            "aggregate_report_stddev",     //$NON-NLS-1$
+            "aggregate_report_error%",     //$NON-NLS-1$
+            "aggregate_report_rate",       //$NON-NLS-1$
+            "aggregate_report_bandwidth",  //$NON-NLS-1$
+            "average_bytes",               //$NON-NLS-1$
             };
 
     private final String TOTAL_ROW_LABEL
@@ -127,7 +127,7 @@
                 },
                 new Functor[] { null, null, null, null, null, null, null, null 
, null, null },
                 new Class[] { String.class, Long.class, Long.class, 
Long.class, Long.class,
-                              String.class, String.class, String.class, 
String.class, String.class });
+                              String.class, String.class, String.class, 
String.class, String.class }, true);
         clearData();
         init();
     }

Modified: 
jakarta/jmeter/trunk/src/components/org/apache/jmeter/visualizers/TableVisualizer.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/components/org/apache/jmeter/visualizers/TableVisualizer.java?rev=713246&r1=713245&r2=713246&view=diff
==============================================================================
--- 
jakarta/jmeter/trunk/src/components/org/apache/jmeter/visualizers/TableVisualizer.java
 (original)
+++ 
jakarta/jmeter/trunk/src/components/org/apache/jmeter/visualizers/TableVisualizer.java
 Tue Nov 11 18:25:37 2008
@@ -44,9 +44,7 @@
 import org.apache.jorphan.gui.RendererUtils;
 import org.apache.jorphan.gui.RightAlignRenderer;
 import org.apache.jorphan.gui.layout.VerticalLayout;
-import org.apache.jorphan.logging.LoggingManager;
 import org.apache.jorphan.reflect.Functor;
-import org.apache.log.Logger;
 
 /**
  * This class implements a statistical analyser that calculates both the 
average
@@ -57,26 +55,27 @@
  *
  */
 public class TableVisualizer extends AbstractVisualizer implements Clearable {
-    private static final Logger log = LoggingManager.getLoggerForClass();
 
+    // Note: the resource string won't respond to locale-changes,
+    // however this does not matter as it is only used when pasting to the 
clipboard
     private static final ImageIcon imageSuccess = JMeterUtils.getImage(
             JMeterUtils.getPropDefault("viewResultsTree.success",  
//$NON-NLS-1$
-                    "icon_success_sml.gif"), //$NON-NLS-1$
+                                       "icon_success_sml.gif"),    
//$NON-NLS-1$
             JMeterUtils.getResString("table_visualizer_success")); 
//$NON-NLS-1$
 
     private static final ImageIcon imageFailure = JMeterUtils.getImage(
             JMeterUtils.getPropDefault("viewResultsTree.failure",  
//$NON-NLS-1$
-                    "icon_warning_sml.gif"), //$NON-NLS-1$
+                                       "icon_warning_sml.gif"),    
//$NON-NLS-1$
             JMeterUtils.getResString("table_visualizer_warning")); 
//$NON-NLS-1$
 
-    private final String[] COLUMNS = new String[] {
-            JMeterUtils.getResString("table_visualizer_sample_num"), // 
$NON-NLS-1$
-            JMeterUtils.getResString("table_visualizer_start_time"), // 
$NON-NLS-1$
-            JMeterUtils.getResString("table_visualizer_thread_name"),// 
$NON-NLS-1$
-            JMeterUtils.getResString("sampler_label"),  // $NON-NLS-1$
-            JMeterUtils.getResString("table_visualizer_sample_time"), // 
$NON-NLS-1$
-            JMeterUtils.getResString("table_visualizer_status"),  // 
$NON-NLS-1$
-            JMeterUtils.getResString("table_visualizer_bytes") }; // 
$NON-NLS-1$
+    private static final String[] COLUMNS = new String[] {
+            "table_visualizer_sample_num",  // $NON-NLS-1$
+            "table_visualizer_start_time",  // $NON-NLS-1$
+            "table_visualizer_thread_name", // $NON-NLS-1$
+            "sampler_label",                // $NON-NLS-1$
+            "table_visualizer_sample_time", // $NON-NLS-1$
+            "table_visualizer_status",      // $NON-NLS-1$
+            "table_visualizer_bytes" };     // $NON-NLS-1$
 
     private ObjectTableModel model = null;
 

Modified: 
jakarta/jmeter/trunk/src/core/org/apache/jmeter/config/gui/ArgumentsPanel.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/core/org/apache/jmeter/config/gui/ArgumentsPanel.java?rev=713246&r1=713245&r2=713246&view=diff
==============================================================================
--- 
jakarta/jmeter/trunk/src/core/org/apache/jmeter/config/gui/ArgumentsPanel.java 
(original)
+++ 
jakarta/jmeter/trunk/src/core/org/apache/jmeter/config/gui/ArgumentsPanel.java 
Tue Nov 11 18:25:37 2008
@@ -84,12 +84,9 @@
     /** Command for removing a row from the table. */
     private static final String DELETE = "delete"; // $NON-NLS-1$
 
-    public static final String COLUMN_NAMES_0 = 
JMeterUtils.getResString("name"); // $NON-NLS-1$
+    public static final String COLUMN_RESOURCE_NAMES_0 = "name"; // $NON-NLS-1$
 
-    public static final String COLUMN_NAMES_1 = 
JMeterUtils.getResString("value"); // $NON-NLS-1$
-
-    // NOTUSED private static final String COLUMN_NAMES_2 =
-    // JMeterUtils.getResString("metadata");
+    public static final String COLUMN_RESOURCE_NAMES_1 = "value"; // 
$NON-NLS-1$
 
     /**
      * Create a new ArgumentsPanel as a standalone component.
@@ -344,7 +341,7 @@
      * Initialize the table model used for the arguments table.
      */
     protected void initializeTableModel() {
-        tableModel = new ObjectTableModel(new String[] { COLUMN_NAMES_0, 
COLUMN_NAMES_1 },
+        tableModel = new ObjectTableModel(new String[] { 
COLUMN_RESOURCE_NAMES_0, COLUMN_RESOURCE_NAMES_1 },
                 Argument.class,
                 new Functor[] {
                 new Functor("getName"), // $NON-NLS-1$
@@ -352,7 +349,7 @@
                 new Functor[] {
                 new Functor("setName"), // $NON-NLS-1$
                 new Functor("setValue") }, // $NON-NLS-1$
-                new Class[] { String.class, String.class });
+                new Class[] { String.class, String.class }, true);
     }
 
     public static boolean testFunctors(){

Modified: 
jakarta/jmeter/trunk/src/core/org/apache/jmeter/gui/util/FileListPanel.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/core/org/apache/jmeter/gui/util/FileListPanel.java?rev=713246&r1=713245&r2=713246&view=diff
==============================================================================
--- jakarta/jmeter/trunk/src/core/org/apache/jmeter/gui/util/FileListPanel.java 
(original)
+++ jakarta/jmeter/trunk/src/core/org/apache/jmeter/gui/util/FileListPanel.java 
Tue Nov 11 18:25:37 2008
@@ -189,7 +189,7 @@
     protected void initializeTableModel() {
         tableModel = new ObjectTableModel(new String[] { "Library" },
                 new Functor[0] , new Functor[0] , // i.e. bypass the Functors
-                new Class[] { String.class });
+                new Class[] { String.class }, false);
     }
 
     public void actionPerformed(ActionEvent e) {

Modified: 
jakarta/jmeter/trunk/src/jorphan/org/apache/jorphan/gui/ObjectTableModel.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/jorphan/org/apache/jorphan/gui/ObjectTableModel.java?rev=713246&r1=713245&r2=713246&view=diff
==============================================================================
--- 
jakarta/jmeter/trunk/src/jorphan/org/apache/jorphan/gui/ObjectTableModel.java 
(original)
+++ 
jakarta/jmeter/trunk/src/jorphan/org/apache/jorphan/gui/ObjectTableModel.java 
Tue Nov 11 18:25:37 2008
@@ -27,6 +27,7 @@
 import javax.swing.event.TableModelEvent;
 import javax.swing.table.DefaultTableModel;
 
+import org.apache.jmeter.util.JMeterUtils;
 import org.apache.jorphan.logging.LoggingManager;
 import org.apache.jorphan.reflect.Functor;
 import org.apache.log.Logger;
@@ -38,7 +39,7 @@
 public class ObjectTableModel extends DefaultTableModel {
     private static final Logger log = LoggingManager.getLoggerForClass();
 
-    private static final long serialVersionUID = 232L;
+    private static final long serialVersionUID = 233L;
 
     private transient ArrayList objects = new ArrayList();
 
@@ -51,6 +52,8 @@
     private transient ArrayList writeFunctors = new ArrayList();
 
     private transient Class objectClass = null; // if provided
+    
+    private final boolean useHeaderAsResource;
 
     /**
      * The ObjectTableModel is a TableModel whose rows are objects;
@@ -63,7 +66,23 @@
      * @param editorClasses - class for each column
      */
     public ObjectTableModel(String[] headers, Class _objClass, Functor[] 
readFunctors, Functor[] writeFunctors, Class[] editorClasses) {
-        this(headers, readFunctors, writeFunctors, editorClasses);
+        this(headers, _objClass, readFunctors, writeFunctors, editorClasses,
+                false);
+    }
+
+    /**
+     * The ObjectTableModel is a TableModel whose rows are objects;
+     * columns are defined as Functors on the object.
+     *
+     * @param headers - Column names
+     * @param _objClass - Object class that will be used
+     * @param readFunctors - used to get the values
+     * @param writeFunctors - used to set the values
+     * @param editorClasses - class for each column
+     * @param useHeaderAsResource - should headers be treated as resource 
names?
+     */
+    public ObjectTableModel(String[] headers, Class _objClass, Functor[] 
readFunctors, Functor[] writeFunctors, Class[] editorClasses, boolean 
useHeaderAsResource) {
+        this(headers, readFunctors, writeFunctors, editorClasses, false);
         this.objectClass=_objClass;
     }
 
@@ -77,11 +96,27 @@
      * @param editorClasses - class for each column
      */
     public ObjectTableModel(String[] headers, Functor[] readFunctors, 
Functor[] writeFunctors, Class[] editorClasses) {
+        this(headers, readFunctors, writeFunctors, editorClasses, false);
+    }
+
+    /**
+     * The ObjectTableModel is a TableModel whose rows are objects;
+     * columns are defined as Functors on the object.
+     *
+     * @param headers - Column names
+     * @param readFunctors - used to get the values
+     * @param writeFunctors - used to set the values
+     * @param editorClasses - class for each column
+     * @param useHeaderAsResource - should headers be treated as resource 
names?
+     */
+    public ObjectTableModel(String[] headers, Functor[] readFunctors, 
Functor[] writeFunctors, Class[] editorClasses, boolean useHeaderAsResource) {
         this.headers.addAll(Arrays.asList(headers));
         this.classes.addAll(Arrays.asList(editorClasses));
         this.readFunctors = new ArrayList(Arrays.asList(readFunctors));
         this.writeFunctors = new ArrayList(Arrays.asList(writeFunctors));
 
+        this.useHeaderAsResource = useHeaderAsResource;
+        
         int numHeaders = headers.length;
 
         int numClasses = classes.size();
@@ -101,6 +136,9 @@
         }
     }
 
+    /**
+     * @throws ObjectStreamException  
+     */
     private Object readResolve() throws ObjectStreamException{
         objects = new ArrayList();
         headers = new ArrayList();
@@ -146,10 +184,29 @@
     }
 
     /**
+     * Note: the column name will be localised if that option was selected.
+     * 
      * @see javax.swing.table.TableModel#getColumnName(int)
      */
     public String getColumnName(int col) {
-        return (String) headers.get(col);
+        String rawName = (String) headers.get(col);
+        if (useHeaderAsResource){
+            return JMeterUtils.getResString(rawName);
+        }
+        return rawName;
+    }
+
+    /**
+     * Get the list of column names, localised if that option was selected.
+     * @return column names
+     */
+    public String[] getColumnNames(){
+        int rowCount = getRowCount();
+        String[] names = new String[rowCount];
+        for (int i=0; i < rowCount; i++){
+            names[i]=getColumnName(i);
+        }
+        return names;
     }
 
     /**

Modified: 
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/gui/HTTPArgumentsPanel.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/gui/HTTPArgumentsPanel.java?rev=713246&r1=713245&r2=713246&view=diff
==============================================================================
--- 
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/gui/HTTPArgumentsPanel.java
 (original)
+++ 
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/gui/HTTPArgumentsPanel.java
 Tue Nov 11 18:25:37 2008
@@ -39,13 +39,13 @@
  */
 public class HTTPArgumentsPanel extends ArgumentsPanel {
 
-    private static final String ENCODE_OR_NOT = 
JMeterUtils.getResString("encode?"); //$NON-NLS-1$
+    private static final String ENCODE_OR_NOT = "encode?"; //$NON-NLS-1$
 
-    private static final String INCLUDE_EQUALS = 
JMeterUtils.getResString("include_equals"); //$NON-NLS-1$
+    private static final String INCLUDE_EQUALS = "include_equals"; 
//$NON-NLS-1$
 
     protected void initializeTableModel() {
         tableModel = new ObjectTableModel(new String[] {
-                ArgumentsPanel.COLUMN_NAMES_0, ArgumentsPanel.COLUMN_NAMES_1, 
ENCODE_OR_NOT, INCLUDE_EQUALS },
+                ArgumentsPanel.COLUMN_RESOURCE_NAMES_0, 
ArgumentsPanel.COLUMN_RESOURCE_NAMES_1, ENCODE_OR_NOT, INCLUDE_EQUALS },
                 HTTPArgument.class,
                 new Functor[] {
                 new Functor("getName"), //$NON-NLS-1$
@@ -57,7 +57,7 @@
                 new Functor("setValue"), //$NON-NLS-1$
                 new Functor("setAlwaysEncoded"), //$NON-NLS-1$
                 new Functor("setUseEquals") }, //$NON-NLS-1$
-                new Class[] {String.class, String.class, Boolean.class, 
Boolean.class });
+                new Class[] {String.class, String.class, Boolean.class, 
Boolean.class }, true);
     }
 
     public static boolean testFunctors(){

Modified: 
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/gui/HTTPFileArgsPanel.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/gui/HTTPFileArgsPanel.java?rev=713246&r1=713245&r2=713246&view=diff
==============================================================================
--- 
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/gui/HTTPFileArgsPanel.java
 (original)
+++ 
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/gui/HTTPFileArgsPanel.java
 Tue Nov 11 18:25:37 2008
@@ -84,14 +84,13 @@
     /** Command for removing a row from the table. */
     private static final String DELETE = "delete"; // $NON-NLS-1$
 
-    // Properties should not be static, otherwise language change does not work
-    private final String FILEPATH = 
JMeterUtils.getResString("send_file_filename_label"); // $NON-NLS-1$
+    private static final String FILEPATH = "send_file_filename_label"; // 
$NON-NLS-1$
 
     /** The parameter name column title of file table. */
-    private final String PARAMNAME = 
JMeterUtils.getResString("send_file_param_name_label"); //$NON-NLS-1$
+    private static final String PARAMNAME = "send_file_param_name_label"; 
//$NON-NLS-1$
 
     /** The mime type column title of file table. */
-    private final String MIMETYPE = 
JMeterUtils.getResString("send_file_mime_label"); //$NON-NLS-1$
+    private static final String MIMETYPE = "send_file_mime_label"; 
//$NON-NLS-1$
 
     public HTTPFileArgsPanel() {
         this(""); // required for unit tests
@@ -124,7 +123,7 @@
                 new Functor("setPath"), //$NON-NLS-1$
                 new Functor("setParamName"), //$NON-NLS-1$
                 new Functor("setMimeType")}, //$NON-NLS-1$
-            new Class[] {String.class, String.class, String.class});
+            new Class[] {String.class, String.class, String.class}, true);
     }
 
     public static boolean testFunctors(){

Modified: 
jakarta/jmeter/trunk/src/protocol/ldap/org/apache/jmeter/protocol/ldap/config/gui/LDAPArgumentsPanel.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/protocol/ldap/org/apache/jmeter/protocol/ldap/config/gui/LDAPArgumentsPanel.java?rev=713246&r1=713245&r2=713246&view=diff
==============================================================================
--- 
jakarta/jmeter/trunk/src/protocol/ldap/org/apache/jmeter/protocol/ldap/config/gui/LDAPArgumentsPanel.java
 (original)
+++ 
jakarta/jmeter/trunk/src/protocol/ldap/org/apache/jmeter/protocol/ldap/config/gui/LDAPArgumentsPanel.java
 Tue Nov 11 18:25:37 2008
@@ -75,10 +75,10 @@
     private static final String DELETE = "delete"; //$NON-NLS-1$
 
     private static final String[] COLUMN_NAMES = {
-            JMeterUtils.getResString("attribute"), //$NON-NLS-1$
-            JMeterUtils.getResString("value"),  //$NON-NLS-1$
-            JMeterUtils.getResString("opcode"),  //$NON-NLS-1$
-            JMeterUtils.getResString("metadata") }; //$NON-NLS-1$
+            "attribute", //$NON-NLS-1$
+            "value",  //$NON-NLS-1$
+            "opcode",  //$NON-NLS-1$
+            "metadata" }; //$NON-NLS-1$
 
     /**
      * Create a new LDAPArgumentsPanel, using the default title.
@@ -315,7 +315,7 @@
                 LDAPArgument.class,
                 new Functor[] { new Functor("getName"), new 
Functor("getValue"), new Functor("getOpcode") },
                 new Functor[] { new Functor("setName"), new 
Functor("setValue"), new Functor("setOpcode") },
-                new Class[] { String.class, String.class, String.class });
+                new Class[] { String.class, String.class, String.class }, 
true);
     }
 
     public static boolean testFunctors(){

Modified: jakarta/jmeter/trunk/xdocs/changes.xml
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/xdocs/changes.xml?rev=713246&r1=713245&r2=713246&view=diff
==============================================================================
--- jakarta/jmeter/trunk/xdocs/changes.xml (original)
+++ jakarta/jmeter/trunk/xdocs/changes.xml Tue Nov 11 18:25:37 2008
@@ -165,6 +165,7 @@
 <li>Various ReceiveSubscriber thread-safety fixes</li>
 <li>JMSPublisher and Subscriber fixes: thread-safety, support dynamic locale 
changes, locale independence for JMX attribute values</li>
 <li>Enhance PowerTableModel to support header resource names; use this to fix 
locale changes in Proxy, Response Assertion, Cookie Manager</li>
+<li>Enhance ObjectTableModel to support header resource names; use this to fix 
locale changes in various GUI elements</li>
 </ul>
 
 <h3>Improvements</h3>



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

Reply via email to