You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jmeter-dev@jakarta.apache.org by ms...@apache.org on 2002/05/03 03:12:26 UTC

cvs commit: jakarta-jmeter/src_1/org/apache/jmeter/config/gui ArgumentsPanel.java

mstover1    02/05/02 18:12:26

  Modified:    src/org/apache/jmeter/config/gui ArgumentsPanel.java
               src_1/org/apache/jmeter/config/gui ArgumentsPanel.java
  Log:
  Fixing bug #5399
  
  Revision  Changes    Path
  1.13      +5 -19     jakarta-jmeter/src/org/apache/jmeter/config/gui/ArgumentsPanel.java
  
  Index: ArgumentsPanel.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jmeter/src/org/apache/jmeter/config/gui/ArgumentsPanel.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- ArgumentsPanel.java	22 Nov 2001 14:37:56 -0000	1.12
  +++ ArgumentsPanel.java	3 May 2002 01:12:25 -0000	1.13
  @@ -72,7 +72,7 @@
    *@version    1.0
    ***********************************************************/
   
  -public class ArgumentsPanel extends JPanel implements ModelSupported, KeyListener,
  +public class ArgumentsPanel extends JPanel implements ModelSupported, FocusListener,
   		ActionListener
   {
   	JTable table;
  @@ -129,23 +129,9 @@
   	 *
   	 *@param  e  Description of Parameter
   	 ***********************************************************/
  -	public void keyReleased(KeyEvent e)
  -	{
  -		if (tableModel.getRowCount() > 0)
  -		{
  -			tableModel.setValueAt(table.getValueAt(table.getSelectedRow(), table.getSelectedColumn()),
  -				table.getSelectedRow(), table.getSelectedColumn());
  -			this.repaint();
  -		}
  -	}
  -
  -	/************************************************************
  -	 *  Description of the Method
  -	 *
  -	 *@param  e  Description of Parameter
  -	 ***********************************************************/
  -	public void keyPressed(KeyEvent e)
  +	public void focusLost(FocusEvent e)
   	{
  +		table.getCellEditor().stopCellEditing();
   	}
   
   	/************************************************************
  @@ -153,7 +139,7 @@
   	 *
   	 *@param  e  Description of Parameter
   	 ***********************************************************/
  -	public void keyTyped(KeyEvent e)
  +	public void focusGained(FocusEvent e)
   	{
   	}
   
  @@ -232,7 +218,7 @@
   
   		table = new JTable(tableModel);
   		table.setEnabled(true);
  -		table.addKeyListener(this);
  +		table.addFocusListener(this);
   		table.setCellSelectionEnabled(true);
   		table.setRowSelectionAllowed(true);
   		table.setColumnSelectionAllowed(false);
  
  
  
  1.3       +7 -19     jakarta-jmeter/src_1/org/apache/jmeter/config/gui/ArgumentsPanel.java
  
  Index: ArgumentsPanel.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jmeter/src_1/org/apache/jmeter/config/gui/ArgumentsPanel.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ArgumentsPanel.java	29 Apr 2002 17:08:07 -0000	1.2
  +++ ArgumentsPanel.java	3 May 2002 01:12:26 -0000	1.3
  @@ -73,7 +73,7 @@
    *@version   1.0
    ***************************************/
   
  -public class ArgumentsPanel extends AbstractConfigGui implements KeyListener,
  +public class ArgumentsPanel extends AbstractConfigGui implements FocusListener,
   		ActionListener
   {
   	JTable table;
  @@ -167,14 +167,9 @@
   	 *
   	 *@param e  Description of Parameter
   	 ***************************************/
  -	public void keyReleased(KeyEvent e)
  +	public void focusLost(FocusEvent e)
   	{
  -		if(tableModel.getRowCount() > 0)
  -		{
  -			tableModel.setValueAt(table.getValueAt(table.getSelectedRow(), table.getSelectedColumn()),
  -					table.getSelectedRow(), table.getSelectedColumn());
  -			this.repaint();
  -		}
  +		table.getCellEditor().stopCellEditing();
   	}
   
   	/****************************************
  @@ -182,14 +177,7 @@
   	 *
   	 *@param e  Description of Parameter
   	 ***************************************/
  -	public void keyPressed(KeyEvent e) { }
  -
  -	/****************************************
  -	 * Description of the Method
  -	 *
  -	 *@param e  Description of Parameter
  -	 ***************************************/
  -	public void keyTyped(KeyEvent e) { }
  +	public void focusGained(FocusEvent e) { }
   
   	/****************************************
   	 * Description of the Method
  @@ -269,7 +257,7 @@
   
   		table = new JTable(tableModel);
   		table.setEnabled(true);
  -		table.addKeyListener(this);
  +		table.addFocusListener(this);
   		table.setCellSelectionEnabled(true);
   		table.setRowSelectionAllowed(true);
   		table.setColumnSelectionAllowed(false);
  @@ -347,8 +335,8 @@
   	 * Inner class to handle table model calls
   	 *
   	 *@author    $Author: mstover1 $
  -	 *@created   $Date: 2002/04/29 17:08:07 $
  -	 *@version   $Revision: 1.2 $
  +	 *@created   $Date: 2002/05/03 01:12:26 $
  +	 *@version   $Revision: 1.3 $
   	 ***************************************/
   	private class InnerTableModel extends DefaultTableModel
   	{
  
  
  

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>