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.reporters.gui;
20:
21: import java.awt.BorderLayout;
22:
23: import org.apache.jmeter.reporters.Summariser;
24: import org.apache.jmeter.processor.gui.AbstractPostProcessorGui;
25: import org.apache.jmeter.testelement.TestElement;
26:
27: /**
28: * Create a summariser test element.
29: *
30: * Note: This is not really a PostProcessor, but that seems to be the closest of
31: * the existing types.
32: *
33: */
34: public class SummariserGui extends AbstractPostProcessorGui {
35:
36: public SummariserGui() {
37: super ();
38: init();
39: }
40:
41: public String getLabelResource() {
42: return "summariser_title"; //$NON-NLS-1$
43: }
44:
45: public void configure(TestElement el) {
46: super .configure(el);
47: }
48:
49: /**
50: * @see org.apache.jmeter.gui.JMeterGUIComponent#createTestElement()
51: */
52: public TestElement createTestElement() {
53: Summariser summariser = new Summariser();
54: modifyTestElement(summariser);
55: return summariser;
56: }
57:
58: /**
59: * Modifies a given TestElement to mirror the data in the gui components.
60: *
61: * @see org.apache.jmeter.gui.JMeterGUIComponent#modifyTestElement(TestElement)
62: */
63: public void modifyTestElement(TestElement summariser) {
64: super .configureTestElement(summariser);
65: }
66:
67: private void init() {
68: setLayout(new BorderLayout());
69: setBorder(makeBorder());
70:
71: add(makeTitlePanel(), BorderLayout.NORTH);
72: }
73: }
|