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.control.gui;
20:
21: import java.awt.BorderLayout;
22:
23: import org.apache.jmeter.control.GenericController;
24: import org.apache.jmeter.testelement.TestElement;
25:
26: /**
27: * A generic controller component.
28: *
29: */
30: public class LogicControllerGui extends AbstractControllerGui {
31: /**
32: * Create a new LogicControllerGui instance.
33: */
34: public LogicControllerGui() {
35: init();
36: }
37:
38: /* Implements JMeterGUIComponent.createTestElement() */
39: public TestElement createTestElement() {
40: GenericController lc = new GenericController();
41: configureTestElement(lc);
42: return lc;
43: }
44:
45: /* Implements JMeterGUIComponent.modifyTestElement(TestElement) */
46: public void modifyTestElement(TestElement el) {
47: configureTestElement(el);
48: }
49:
50: public String getLabelResource() {
51: return "logic_controller_title"; // $NON-NLS-1$
52: }
53:
54: /**
55: * Initialize the GUI components and layout for this component.
56: */
57: private void init() {
58: setLayout(new BorderLayout());
59: setBorder(makeBorder());
60: add(makeTitlePanel(), BorderLayout.NORTH);
61: }
62: }
|