KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > jmeter > assertions > gui > XMLAssertionGui


1 // $Header: /home/cvs/jakarta-jmeter/src/components/org/apache/jmeter/assertions/gui/XMLAssertionGui.java,v 1.5 2004/03/05 01:32:13 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.assertions.gui;
20
21 import org.apache.jmeter.assertions.XMLAssertion;
22 import org.apache.jmeter.testelement.TestElement;
23 import org.apache.jorphan.gui.layout.VerticalLayout;
24
25
26 /**
27  * @version $Revision: 1.5 $, $Date: 2004/03/05 01:32:13 $
28  */

29 public class XMLAssertionGui extends AbstractAssertionGui
30 {
31     /**
32      * The constructor.
33      */

34     public XMLAssertionGui()
35     {
36         init();
37     }
38
39     /**
40      * Returns the label to be shown within the JTree-Component.
41      */

42     public String JavaDoc getLabelResource()
43     {
44         return "xml_assertion_title";
45     }
46
47     public TestElement createTestElement()
48     {
49         XMLAssertion el = new XMLAssertion();
50         modifyTestElement(el);
51         return el;
52     }
53
54     /**
55      * Modifies a given TestElement to mirror the data in the gui components.
56      *
57      * @see org.apache.jmeter.gui.JMeterGUIComponent#modifyTestElement(TestElement)
58      */

59     public void modifyTestElement(TestElement el)
60     {
61         configureTestElement(el);
62     }
63
64     /**
65      * Configures the associated test element.
66      * @param el
67      */

68     public void configure(TestElement el)
69     {
70         super.configure(el);
71     }
72
73
74     /**
75      * Inits the GUI.
76      */

77     private void init()
78     {
79         setLayout(
80             new VerticalLayout(5, VerticalLayout.LEFT, VerticalLayout.TOP));
81         setBorder(makeBorder());
82
83         add(makeTitlePanel());
84     }
85 }
86
Popular Tags