Save This Page
Home » jakarta-jmeter-2.3.4_src » org.apache.jmeter.ejb.jndi.control.gui » [javadoc | source]
    1   // $Header: /home/cvs/jakarta-jmeter/src/protocol/jndi/control/gui/JndiTestSampleGui.java,v 1.4 2004/02/13 02:40:55 sebb Exp $
    2   /*
    3    * Copyright 2001-2004 The Apache Software Foundation.
    4    *
    5    * Licensed under the Apache License, Version 2.0 (the "License");
    6    * you may not use this file except in compliance with the License.
    7    * You may obtain a copy of the License at
    8    *
    9    *   http://www.apache.org/licenses/LICENSE-2.0
   10    *
   11    * Unless required by applicable law or agreed to in writing, software
   12    * distributed under the License is distributed on an "AS IS" BASIS,
   13    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   14    * See the License for the specific language governing permissions and
   15    * limitations under the License.
   16    * 
   17   */
   18   
   19   package org.apache.jmeter.ejb.jndi.control.gui;
   20   
   21   
   22   import javax.swing.border.Border;
   23   import javax.swing.border.EmptyBorder;
   24   import javax.swing.JLabel;
   25   import javax.swing.JPanel;
   26   
   27   import org.apache.jmeter.ejb.jndi.config.JndiConfig;
   28   import org.apache.jmeter.ejb.jndi.config.gui.JndiConfigGui;
   29   import org.apache.jmeter.ejb.jndi.control.JndiTestSample;
   30   import org.apache.jmeter.gui.ModelSupported;
   31   import org.apache.jmeter.gui.NamePanel;
   32   import org.apache.jmeter.gui.VerticalLayout;
   33   import org.apache.jmeter.util.JMeterUtils;
   34   
   35   /**
   36    * Provides the gui to configure JNDI sampling
   37    *
   38    * @author	Khor Soon Hin
   39    * Created	20 Dec 2001
   40    * @version $Revision: 1.4 $ Last Updated: $Date: 2004/02/13 02:40:55 $
   41    */
   42   public class JndiTestSampleGui extends JPanel implements ModelSupported
   43   {
   44     JndiTestSample model;
   45     NamePanel namePanel;
   46   
   47     JndiConfigGui jndiConfigGui;
   48   
   49     public JndiTestSampleGui()
   50     {
   51     }
   52   
   53     public void updateGui()
   54     {
   55       namePanel.updateGui();
   56       jndiConfigGui.updateGui();
   57     }
   58   
   59     public void setModel(Object model)
   60     {
   61       this.model = (JndiTestSample)model;
   62       init();
   63     }
   64   
   65     protected void init()
   66     {
   67       this.setLayout(new VerticalLayout(5, VerticalLayout.LEFT, 
   68   	VerticalLayout.TOP));
   69       
   70       // main panel
   71       JPanel mainPanel = new JPanel();
   72       Border margin = new EmptyBorder(10, 10, 5, 10);
   73       mainPanel.setBorder(margin);
   74       mainPanel.setLayout(new VerticalLayout(5, VerticalLayout.LEFT));
   75   
   76    
   77       mainPanel.add(makeTitlePanel());
   78   
   79       // jndi
   80       jndiConfigGui = new JndiConfigGui(false);
   81       jndiConfigGui.setModel(model.getDefaultJndiConfig());
   82       mainPanel.add(jndiConfigGui);
   83   
   84       this.add(mainPanel);
   85     }
   86   }

Save This Page
Home » jakarta-jmeter-2.3.4_src » org.apache.jmeter.ejb.jndi.control.gui » [javadoc | source]