|
What this is
Other links
The source code
// $Header: /home/cvs/jakarta-jmeter/src/core/org/apache/jmeter/config/gui/SimpleConfigGui.java,v 1.8 2004/03/05 01:33:48 sebb Exp $
/*
* Copyright 2001-2004 The Apache Software Foundation.
*
* Licensed 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 java.awt.Component;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.Box;
import javax.swing.JButton;
import javax.swing.JPanel;
import javax.swing.JTable;
import javax.swing.ListSelectionModel;
import javax.swing.table.TableCellEditor;
import org.apache.jmeter.config.ConfigTestElement;
import org.apache.jmeter.gui.util.PowerTableModel;
import org.apache.jmeter.testelement.TestElement;
import org.apache.jmeter.testelement.property.JMeterProperty;
import org.apache.jmeter.testelement.property.PropertyIterator;
import org.apache.jmeter.testelement.property.StringProperty;
import org.apache.jmeter.util.JMeterUtils;
import org.apache.jorphan.collections.Data;
/**
* Default config gui for Configuration Element.
*
* @version $Revision: 1.8 $ on $Date: 2004/03/05 01:33:48 $
*/
public class SimpleConfigGui extends AbstractConfigGui implements ActionListener
{
/* This class created for enhancement Bug ID 9101. */
// TODO: This class looks a lot like ArgumentsPanel. What exactly is the
// difference? Could they be combined?
/** The table of configuration parameters. */
private JTable table;
/** The model for the parameter table. */
private PowerTableModel tableModel;
/** A button for adding new parameters to the table. */
private JButton add;
/** A button for removing parameters from the table. */
private JButton delete;
/** Command for adding a row to the table. */
private static final String ADD = "add";
/** Command for removing a row from the table. */
private static final String DELETE = "delete";
/**
* Boolean indicating whether or not this component should display its
* name. If true, this is a standalone component. If false, this component
* is intended to be used as a subpanel for another component.
*/
private boolean displayName = true;
/** The names of the columns in the table. */
public static final String[] COLUMN_NAMES = {
JMeterUtils.getResString("name"),
JMeterUtils.getResString("value"),
JMeterUtils.getResString("metadata")
};
/**
* Create a new standalone SimpleConfigGui.
*/
public SimpleConfigGui()
{
this(true);
}
/**
* Create a new SimpleConfigGui as either a standalone or an embedded
* component.
*
* @param displayName indicates whether or not this component should
* display its name. If true, this is a standalone
* component. If false, this component is intended
* to be used as a subpanel for another component.
*/
public SimpleConfigGui(boolean displayName)
{
this.displayName = displayName;
init();
}
public String getLabelResource()
{
return "simple_config_element";
}
/**
* A newly created component can be initialized with the contents of
* a Test Element object by calling this method. The component is
* responsible for querying the Test Element object for the
* relevant information to display in its GUI.
*
|
| ... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2024 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.