KickJava   Java API By Example, From Geeks To Geeks.

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


1 // $Header: /home/cvs/jakarta-jmeter/src/core/org/apache/jmeter/assertions/gui/AbstractAssertionGui.java,v 1.5 2004/02/14 03:34:30 sebb Exp $
2
/*
3  * Copyright 2002-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 java.util.Arrays JavaDoc;
22 import java.util.Collection JavaDoc;
23
24 import javax.swing.JPopupMenu JavaDoc;
25
26 import org.apache.jmeter.gui.AbstractJMeterGuiComponent;
27 import org.apache.jmeter.gui.util.MenuFactory;
28
29 /**
30  * This is the base class for JMeter GUI components which manage assertions.
31  *
32  * @author Michael Stover
33  * @version $Revision: 1.5 $
34  */

35 public abstract class AbstractAssertionGui extends AbstractJMeterGuiComponent
36 {
37     /**
38      * When a user right-clicks on the component in the test tree, or
39      * selects the edit menu when the component is selected, the
40      * component will be asked to return a JPopupMenu that provides
41      * all the options available to the user from this component.
42      * <p>
43      * This implementation returns menu items appropriate for most
44      * assertion components.
45      *
46      * @return a JPopupMenu appropriate for the component.
47      */

48     public JPopupMenu JavaDoc createPopupMenu()
49     {
50         return MenuFactory.getDefaultAssertionMenu();
51     }
52
53     /**
54      * This is the list of menu categories this gui component will be available
55      * under. This implementation returns
56      * {@link org.apache.jmeter.gui.util.MenuFactory#ASSERTIONS}, which
57      * is appropriate for most assertion components.
58      *
59      * @return a Collection of Strings, where each element is one of the
60      * constants defined in MenuFactory
61      */

62     public Collection JavaDoc getMenuCategories()
63     {
64         return Arrays.asList(new String JavaDoc[] { MenuFactory.ASSERTIONS });
65     }
66 }
Popular Tags