01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * 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: public class XMLAssertionGui extends AbstractAssertionGui {
26: /**
27: * The constructor.
28: */
29: public XMLAssertionGui() {
30: init();
31: }
32:
33: /**
34: * Returns the label to be shown within the JTree-Component.
35: */
36: public String getLabelResource() {
37: return "xml_assertion_title"; // $NON-NLS-1$
38: }
39:
40: public TestElement createTestElement() {
41: XMLAssertion el = new XMLAssertion();
42: modifyTestElement(el);
43: return el;
44: }
45:
46: /**
47: * Modifies a given TestElement to mirror the data in the gui components.
48: *
49: * @see org.apache.jmeter.gui.JMeterGUIComponent#modifyTestElement(TestElement)
50: */
51: public void modifyTestElement(TestElement el) {
52: configureTestElement(el);
53: }
54:
55: /**
56: * Configures the associated test element.
57: *
58: * @param el
59: */
60: public void configure(TestElement el) {
61: super .configure(el);
62: }
63:
64: /**
65: * Inits the GUI.
66: */
67: private void init() {
68: setLayout(new VerticalLayout(5, VerticalLayout.BOTH,
69: VerticalLayout.TOP));
70: setBorder(makeBorder());
71:
72: add(makeTitlePanel());
73: }
74: }
|