1 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 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 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 jndiConfigGui = new JndiConfigGui(false); 81 jndiConfigGui.setModel(model.getDefaultJndiConfig()); 82 mainPanel.add(jndiConfigGui); 83 84 this.add(mainPanel); 85 } 86 } 87 | Popular Tags |