khammond    01/09/29 08:14:32

  Modified:    src/org/apache/jmeter/control WorkBench.java
  Log:
  WorkBench now uses new WorkBenchGui.  Added instance variable "isRootNode" along 
with getter/setter. The Root and WorkBench nodes are the same class type, so this new 
field is used to distinguish between the two nodes.
  
  Revision  Changes    Path
  1.10      +26 -4     jakarta-jmeter/src/org/apache/jmeter/control/WorkBench.java
  
  Index: WorkBench.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jmeter/src/org/apache/jmeter/control/WorkBench.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- WorkBench.java    2001/08/28 21:28:31     1.9
  +++ WorkBench.java    2001/09/29 15:14:32     1.10
  @@ -55,9 +55,10 @@
   package org.apache.jmeter.control;
   
   import java.util.*;
  -
   import java.io.*;
  +
   import org.apache.jmeter.gui.*;
  +import org.apache.jmeter.control.gui.*;
   
   /************************************************************
    *  Title: JMeter Description: Copyright: Copyright (c) 2000 Company: Apache
  @@ -69,8 +70,8 @@
   
   public class WorkBench implements JMeterComponentModel,Serializable
   {
  -
        private String name;
  +     private boolean isRootNode;
        private static List itemsCanAdd = null;
   
        /************************************************************
  @@ -78,9 +79,10 @@
         *
         *@param  name  Description of Parameter
         ***********************************************************/
  -     public WorkBench(String name)
  +     public WorkBench(String name, boolean isRootNode)
        {
                this.name = name;
  +             this.isRootNode = isRootNode;
        }
   
        /************************************************************
  @@ -94,6 +96,16 @@
        }
   
        /************************************************************
  +      *  Sets the isRootNode attribute of the WorkBench object
  +      *
  +      *@param  name  The new isRootNode value
  +      ***********************************************************/
  +     public void setIsRootElement(boolean isRootNode)
  +     {
  +             this.isRootNode = isRootNode;
  +     }
  +
  +     /************************************************************
         *  Gets the Name attribute of the WorkBench object
         *
         *@return    The Name value
  @@ -104,6 +116,16 @@
        }
   
        /************************************************************
  +      *  Gets the isRootNode attribute of the WorkBench object
  +      *
  +      *@return    The isRootNode value
  +      ***********************************************************/
  +     public boolean isRootNode()
  +     {
  +             return this.isRootNode;
  +     }
  +
  +     /************************************************************
         *  Gets the ClassLabel attribute of the WorkBench object
         *
         *@return    The ClassLabel value
  @@ -131,7 +153,7 @@
         ***********************************************************/
        public Class getGuiClass()
        {
  -             return org.apache.jmeter.gui.NamePanel.class;
  +             return org.apache.jmeter.control.gui.WorkBenchGui.class;
        }
   
        /************************************************************
  
  
  

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

Reply via email to