1 18 19 package org.apache.jmeter.reporters.gui; 20 21 import java.awt.BorderLayout ; 22 23 import javax.swing.Box ; 24 25 import org.apache.jmeter.reporters.ResultAction; 26 import org.apache.jmeter.gui.OnErrorPanel; 27 import org.apache.jmeter.processor.gui.AbstractPostProcessorGui; 28 import org.apache.jmeter.testelement.OnErrorTestElement; 29 import org.apache.jmeter.testelement.TestElement; 30 31 36 public class ResultActionGui extends AbstractPostProcessorGui 37 { 38 39 private OnErrorPanel errorPanel; 40 41 public ResultActionGui() 42 { 43 super(); 44 init(); 45 } 46 47 50 public String getLabelResource() 51 { 52 return "resultaction_title"; 53 } 54 55 58 public void configure(TestElement el) 59 { 60 super.configure(el); 61 errorPanel.configure(((OnErrorTestElement)el).getErrorAction()); 62 } 63 64 67 public TestElement createTestElement() 68 { 69 ResultAction resultAction = new ResultAction(); 70 modifyTestElement(resultAction); 71 return resultAction; 72 } 73 74 78 public void modifyTestElement(TestElement te) 79 { 80 super.configureTestElement(te); 81 ((OnErrorTestElement) te).setErrorAction(errorPanel.getOnErrorSetting()); 82 } 83 84 private void init() 85 { 86 setLayout(new BorderLayout ()); 87 setBorder(makeBorder()); 88 Box box = Box.createVerticalBox(); 89 box.add(makeTitlePanel()); 90 errorPanel = new OnErrorPanel(); 91 box.add(errorPanel); 92 add(box,BorderLayout.NORTH); 93 } 94 } 95 | Popular Tags |