/*
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You under the Apache License, Version 2.0
 * (the "License"); you may not use this file except in compliance with
 * the License.  You may obtain a copy of the License at
 * 
 * http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations
 * under the License.
 *  
 */

package org.apache.jmeter.config.gui;

import java.awt.BorderLayout;

import javax.swing.JLabel;

import org.apache.jmeter.testelement.TestElement;
import org.apache.jmeter.util.JMeterUtils;

/**
 * Default config gui for Configuration Element.
 */
public class ObsoleteGui extends AbstractConfigGui {

	private JLabel obsoleteMessage = 
		new JLabel(JMeterUtils.getResString("obsolete_test_element")); // $NON-NLS-1$

	public ObsoleteGui(){
		init();
	}
	
	private void init() {
		setLayout(new BorderLayout(0, 10));
		setBorder(makeBorder());
		add(makeTitlePanel(), BorderLayout.NORTH);
		add(obsoleteMessage,BorderLayout.WEST);
	}

	public TestElement createTestElement() {
		return null;
	}

	public void modifyTestElement(TestElement element) {	
	}

	public String getLabelResource() {
		return "obsolete_test_element"; // $NON-NLS-1$
	}
}

@@ -872,36 +872,314 @@
 ut;%0A
-%0Aimport javax.swing.JLabel;%0A
+import java.util.Collection;%0A%0Aimport javax.swing.JLabel;%0Aimport javax.swing.JPanel;%0Aimport javax.swing.JPopupMenu;%0Aimport javax.swing.tree.TreeNode;%0A%0Aimport org.apache.jmeter.config.ConfigTestElement;%0Aimport org.apache.jmeter.gui.AbstractJMeterGuiComponent;%0Aimport org.apache.jmeter.gui.JMeterGUIComponent;
 %0Aimp
@@ -1371,17 +1371,26 @@
 ract
-ConfigGui
+JMeterGuiComponent
  %7B%0A%0A
@@ -1629,24 +1629,26 @@
 order());%0A%09%09
+//
 add(makeTitl
@@ -1720,24 +1720,113 @@
 .WEST);%0A%09%7D%0A%0A
+%09public String getLabelResource() %7B%0A%09%09return %22obsolete_test_element%22; // $NON-NLS-1$%0A%09%7D%0A%0A
 %09public Test
@@ -1869,11 +1869,30 @@
 rn n
-ull
+ew ConfigTestElement()
 ;%0A%09%7D
@@ -1964,86 +1964,116 @@
 lic 
-String getLabelResource() %7B%0A%09%09return %22obsolete_test_element%22; // $NON-NLS-1$
+JPopupMenu createPopupMenu() %7B%0A%09%09return null;%0A%09%7D%0A%0A%09public Collection getMenuCategories() %7B%0A%09%09return null;
 %0A%09%7D%0A
+%0A
 %7D%0A

Exclude ObsoleteGui from Menus