Dear Wiki user, You have subscribed to a wiki page or wiki category on "Jakarta-jmeter Wiki" for change notification.
The "DeveloperManual/JMeterGuiBasics" page has been changed by PatrickDaulton. http://wiki.apache.org/jakarta-jmeter/DeveloperManual/JMeterGuiBasics?action=diff&rev1=3&rev2=4 -------------------------------------------------- 1. Some standard gui stuff should be added to all Jmeter gui components: 1. call setBorder(makeBorder()) for your class. This will give it the standard Jmeter border 1. add the title pane via makeTitlePanel(). Usually this is the first thing added to your gui, and should be done in a Box vertical layout scheme, or with Jmeter's VerticalLayout class. Here is an example init() method: + {{{ - {{{private void init() + private void init() { setLayout(new BorderLayout()); setBorder(makeBorder()); @@ -43, +44 @@ 1.#3 Implement public void configure(TestElement el) 1. Be sure to call super.configure(e). This will populate some of the data for you, like the name of the element. 1. Use this method to set data into your gui elements. Example: + {{{ - {{{public void configure(TestElement el) + public void configure(TestElement el) { super.configure(el); useHeaders.setSelected(el.getPropertyAsBoolean(RegexExtractor.USEHEADERS)); @@ -58, +60 @@ 1.#4 implement public void modifyTestElement(TestElement e). This is where you move the data from your gui elements to the TestElement. It is the logical reverse of the previous method. 1. Call super.configureTestElement(e). This will take care of some default data for you. 1. Example: + {{{ - {{{public void modifyTestElement(TestElement e) + public void modifyTestElement(TestElement e) { super.configureTestElement(e); e.setProperty(new BooleanProperty(RegexExtractor.USEHEADERS,useHeaders.isSelected())); @@ -74, +77 @@ } }}} 1.#5 implement public TestElement createTestElement(). This method should create a new instance of your TestElement class, and then pass it to the modifyTestElement(TestElement) method you made above. + {{{ - {{{public TestElement createTestElement() + public TestElement createTestElement() { RegexExtractor extractor = new RegexExtractor(); modifyTestElement(extractor); --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
