本文整理汇总了Java中org.apache.jmeter.util.JMeterUtils.getResString方法的典型用法代码示例。如果您正苦于以下问题:Java JMeterUtils.getResString方法的具体用法?Java JMeterUtils.getResString怎么用?Java JMeterUtils.getResString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.jmeter.util.JMeterUtils
的用法示例。
在下文中一共展示了JMeterUtils.getResString方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createLeftPanel
import org.apache.jmeter.util.JMeterUtils; //导入方法依赖的package包/类
private synchronized Component createLeftPanel() {
SampleResult rootSampleResult = new SampleResult();
rootSampleResult.setSampleLabel("Root");
rootSampleResult.setSuccessful(true);
root = new SearchableTreeNode(rootSampleResult, null);
treeModel = new DefaultTreeModel(root);
jTree = new JTree(treeModel);
jTree.setCellRenderer(new ResultsNodeRenderer());
jTree.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION);
jTree.addTreeSelectionListener(this);
jTree.setRootVisible(false);
jTree.setShowsRootHandles(true);
JScrollPane treePane = new JScrollPane(jTree);
treePane.setPreferredSize(new Dimension(200, 300));
VerticalPanel leftPane = new VerticalPanel();
leftPane.add(treePane, BorderLayout.CENTER);
leftPane.add(createComboRender(), BorderLayout.NORTH);
autoScrollCB = new JCheckBox(JMeterUtils.getResString("view_results_autoscroll")); // $NON-NLS-1$
autoScrollCB.setSelected(false);
autoScrollCB.addItemListener(this);
leftPane.add(autoScrollCB, BorderLayout.SOUTH);
return leftPane;
}
示例2: createEmbeddedRsrcPanel
import org.apache.jmeter.util.JMeterUtils; //导入方法依赖的package包/类
protected JPanel createEmbeddedRsrcPanel() {
// retrieve Embedded resources
retrieveEmbeddedResources = new JCheckBox(JMeterUtils.getResString("web_testing_retrieve_images")); // $NON-NLS-1$
final JPanel embeddedRsrcPanel = new HorizontalPanel();
embeddedRsrcPanel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), JMeterUtils
.getResString("web_testing_retrieve_title"))); // $NON-NLS-1$
embeddedRsrcPanel.add(retrieveEmbeddedResources);
// Embedded URL match regex
embeddedRE = new JLabeledTextField(JMeterUtils.getResString("web_testing_embedded_url_pattern"),20); // $NON-NLS-1$
embeddedRsrcPanel.add(embeddedRE);
return embeddedRsrcPanel;
}
示例3: createTypePanel
import org.apache.jmeter.util.JMeterUtils; //导入方法依赖的package包/类
/**
* Create a panel allowing the user to choose what type of test should be
* performed.
*
* @return a new panel for selecting the type of assertion test
*/
private JPanel createTypePanel() {
JPanel panel = new JPanel();
panel.setBorder(BorderFactory.createTitledBorder("Payload Matching Rules")); //$NON-NLS-1$
ButtonGroup group = new ButtonGroup();
containsBox = new JRadioButton(JMeterUtils.getResString("assertion_contains")); //$NON-NLS-1$
group.add(containsBox);
containsBox.setSelected(true);
panel.add(containsBox);
matchesBox = new JRadioButton(JMeterUtils.getResString("assertion_matches")); //$NON-NLS-1$
group.add(matchesBox);
panel.add(matchesBox);
equalsBox = new JRadioButton(JMeterUtils.getResString("assertion_equals")); //$NON-NLS-1$
group.add(equalsBox);
panel.add(equalsBox);
notBox = new JCheckBox(JMeterUtils.getResString("assertion_not")); //$NON-NLS-1$
panel.add(notBox);
return panel;
}
示例4: createOptionalTasksPanel
import org.apache.jmeter.util.JMeterUtils; //导入方法依赖的package包/类
private JPanel createOptionalTasksPanel() {
// OPTIONAL TASKS
JPanel optionalTasksPanel = new VerticalPanel();
optionalTasksPanel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(),
JMeterUtils.getResString("optional_tasks"))); //$NON-NLS-1$
JPanel checkBoxPanel = new HorizontalPanel();
// RETRIEVE IMAGES
getImages = new JCheckBox(JMeterUtils.getResString("web_testing_retrieve_images")); //$NON-NLS-1$
// Is monitor
isMon = new JCheckBox(JMeterUtils.getResString("monitor_is_title")); //$NON-NLS-1$
// Use MD5
useMD5 = new JCheckBox(JMeterUtils.getResString("response_save_as_md5")); //$NON-NLS-1$
checkBoxPanel.add(getImages);
checkBoxPanel.add(isMon);
checkBoxPanel.add(useMD5);
optionalTasksPanel.add(checkBoxPanel);
// Embedded URL match regex
embeddedRE = new JLabeledTextField(JMeterUtils.getResString("web_testing_embedded_url_pattern"),30); //$NON-NLS-1$
optionalTasksPanel.add(embeddedRE);
return optionalTasksPanel;
}
示例5: makeCommandPanel
import org.apache.jmeter.util.JMeterUtils; //导入方法依赖的package包/类
/**
* @return JPanel Command + directory
*/
private JPanel makeCommandPanel() {
JPanel cmdPanel = new JPanel();
cmdPanel.setLayout(new BoxLayout(cmdPanel, BoxLayout.X_AXIS));
JPanel cmdWkDirPane = new JPanel(new BorderLayout());
command = new JLabeledTextField(JMeterUtils.getResString("command_field_title")); // $NON-NLS-1$
cmdWkDirPane.add(command, BorderLayout.CENTER);
directory = new JLabeledTextField(JMeterUtils.getResString("directory_field_title")); // $NON-NLS-1$
cmdWkDirPane.add(directory, BorderLayout.EAST);
cmdPanel.add(cmdWkDirPane);
JPanel panel = new VerticalPanel();
panel.setBorder(BorderFactory.createTitledBorder(
BorderFactory.createEtchedBorder(),
JMeterUtils.getResString("command_config_box_title"))); // $NON-NLS-1$
panel.add(cmdPanel, BorderLayout.NORTH);
panel.add(makeArgumentsPanel(), BorderLayout.CENTER);
panel.add(makeEnvironmentPanel(), BorderLayout.SOUTH);
return panel;
}
示例6: actionMakeGraph
import org.apache.jmeter.util.JMeterUtils; //导入方法依赖的package包/类
private void actionMakeGraph() {
String msgErr = null;
// Calculate the test duration. Needs to xAxis Labels and getData.
durationTest = maxStartTime - minStartTime;
if (seriesNames.size() <= 0) {
msgErr = JMeterUtils.getResString("aggregate_graph_no_values_to_graph"); // $NON-NLS-1$
} else if (durationTest < 1) {
msgErr = JMeterUtils.getResString("graph_resp_time_not_enough_data"); // $NON-NLS-1$
}
if (msgErr == null) {
makeGraph();
tabbedGraph.setSelectedIndex(1);
} else {
tabbedGraph.setSelectedIndex(0);
JOptionPane.showMessageDialog(null, msgErr, msgErr, JOptionPane.WARNING_MESSAGE);
}
}
示例7: createSearchPanel
import org.apache.jmeter.util.JMeterUtils; //导入方法依赖的package包/类
/***************************************************************************
* This will create the Search panel in the LdapConfigGui
**************************************************************************/
private JPanel createSearchPanel() {
VerticalPanel searchPanel = new VerticalPanel();
JPanel searchBPanel = new JPanel(new BorderLayout(5, 0));
JLabel label = new JLabel(JMeterUtils.getResString("searchbase")); // $NON-NLS-1$
label.setLabelFor(searchbase);
searchBPanel.add(label, BorderLayout.WEST);
searchBPanel.add(searchbase, BorderLayout.CENTER);
JPanel searchFPanel = new JPanel(new BorderLayout(5, 0));
JLabel label20 = new JLabel(JMeterUtils.getResString("searchfilter")); // $NON-NLS-1$
label20.setLabelFor(searchfilter);
searchFPanel.add(label20, BorderLayout.WEST);
searchFPanel.add(searchfilter, BorderLayout.CENTER);
searchPanel.add(searchBPanel);
searchPanel.add(searchFPanel);
searchPanel.add(createSCPanel());
return searchPanel;
}
示例8: createEmbeddedRsrcPanel
import org.apache.jmeter.util.JMeterUtils; //导入方法依赖的package包/类
protected JPanel createEmbeddedRsrcPanel() {
// retrieve Embedded resources
retrieveEmbeddedResources = new JCheckBox(JMeterUtils.getResString("web_testing_retrieve_images")); // $NON-NLS-1$
final JPanel embeddedRsrcPanel = new HorizontalPanel();
embeddedRsrcPanel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), JMeterUtils
.getResString("web_testing_retrieve_title"))); // $NON-NLS-1$
embeddedRsrcPanel.add(retrieveEmbeddedResources);
// Embedded URL match regex
embeddedRE = new JLabeledTextField(JMeterUtils.getResString("web_testing_embedded_url_pattern"),20); // $NON-NLS-1$
embeddedRsrcPanel.add(embeddedRE);
return embeddedRsrcPanel;
}
示例9: createOptionalTasksPanel
import org.apache.jmeter.util.JMeterUtils; //导入方法依赖的package包/类
protected JPanel createOptionalTasksPanel() {
// OPTIONAL TASKS
final JPanel checkBoxPanel = new VerticalPanel();
checkBoxPanel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), JMeterUtils
.getResString("optional_tasks"))); // $NON-NLS-1$
// Use MD5
useMD5 = new JCheckBox(JMeterUtils.getResString("response_save_as_md5")); // $NON-NLS-1$
checkBoxPanel.add(useMD5);
return checkBoxPanel;
}
示例10: compareSize
import org.apache.jmeter.util.JMeterUtils; //导入方法依赖的package包/类
/**
* Compares the the size of a return result to the set allowed size using a
* logical comparator set in setLogicalComparator().
*
* Possible values are: equal, not equal, greater than, less than, greater
* than equal, less than equal.
*
*/
private String compareSize(long resultSize) {
String comparatorErrorMessage;
long allowedSize = Long.parseLong(getAllowedSize());
boolean result = false;
int comp = getCompOper();
switch (comp) {
case EQUAL:
result = (resultSize == allowedSize);
comparatorErrorMessage = JMeterUtils.getResString("size_assertion_comparator_error_equal"); //$NON-NLS-1$
break;
case NOTEQUAL:
result = (resultSize != allowedSize);
comparatorErrorMessage = JMeterUtils.getResString("size_assertion_comparator_error_notequal"); //$NON-NLS-1$
break;
case GREATERTHAN:
result = (resultSize > allowedSize);
comparatorErrorMessage = JMeterUtils.getResString("size_assertion_comparator_error_greater"); //$NON-NLS-1$
break;
case LESSTHAN:
result = (resultSize < allowedSize);
comparatorErrorMessage = JMeterUtils.getResString("size_assertion_comparator_error_less"); //$NON-NLS-1$
break;
case GREATERTHANEQUAL:
result = (resultSize >= allowedSize);
comparatorErrorMessage = JMeterUtils.getResString("size_assertion_comparator_error_greaterequal"); //$NON-NLS-1$
break;
case LESSTHANEQUAL:
result = (resultSize <= allowedSize);
comparatorErrorMessage = JMeterUtils.getResString("size_assertion_comparator_error_lessequal"); //$NON-NLS-1$
break;
default:
result = false;
comparatorErrorMessage = "ERROR - invalid condition";
break;
}
return result ? "" : comparatorErrorMessage;
}
示例11: setErrorThreshold
import org.apache.jmeter.util.JMeterUtils; //导入方法依赖的package包/类
/**
* Sets the threshold on error level
*
* @param inErrorThreshold
* The max number of parse errors which are to be tolerated
* @throws IllegalArgumentException
* if <code>inErrorThreshold</code> is less or equals zero
*/
public void setErrorThreshold(long inErrorThreshold) {
if (inErrorThreshold < 0L) {
throw new IllegalArgumentException(JMeterUtils.getResString("argument_must_not_be_negative")); //$NON-NLS-1$
}
if (inErrorThreshold == Long.MAX_VALUE) {
setProperty(new LongProperty(ERROR_THRESHOLD_KEY, 0));
} else {
setProperty(new LongProperty(ERROR_THRESHOLD_KEY, inErrorThreshold));
}
}
示例12: setWarningThreshold
import org.apache.jmeter.util.JMeterUtils; //导入方法依赖的package包/类
/**
* Sets the threshold on warning level
*
* @param inWarningThreshold
* The max number of warnings which are to be tolerated
* @throws IllegalArgumentException
* if <code>inWarningThreshold</code> is less or equal zero
*/
public void setWarningThreshold(long inWarningThreshold) {
if (inWarningThreshold < 0L) {
throw new IllegalArgumentException(JMeterUtils.getResString("argument_must_not_be_negative")); //$NON-NLS-1$
}
if (inWarningThreshold == Long.MAX_VALUE) {
setProperty(new LongProperty(WARNING_THRESHOLD_KEY, 0));
} else {
setProperty(new LongProperty(WARNING_THRESHOLD_KEY, inWarningThreshold));
}
}
示例13: getSourceTypeList
import org.apache.jmeter.util.JMeterUtils; //导入方法依赖的package包/类
public static String[] getSourceTypeList() {
final SourceType[] types = SourceType.values();
final String[] displayStrings = new String[types.length];
for(int i = 0; i < types.length; i++) {
displayStrings[i] = JMeterUtils.getResString(types[i].propertyName);
}
return displayStrings;
}
示例14: createButtonPanel
import org.apache.jmeter.util.JMeterUtils; //导入方法依赖的package包/类
/**
* Create a panel with buttons to add and delete string patterns.
*
* @return the new panel with add and delete buttons
*/
private JPanel createButtonPanel() {
addPattern = new JButton(JMeterUtils.getResString("add")); //$NON-NLS-1$
addPattern.addActionListener(new AddPatternListener());
deletePattern = new JButton(JMeterUtils.getResString("delete")); //$NON-NLS-1$
deletePattern.addActionListener(new ClearPatternsListener());
deletePattern.setEnabled(false);
JPanel buttonPanel = new JPanel();
buttonPanel.add(addPattern);
buttonPanel.add(deletePattern);
return buttonPanel;
}
示例15: createClassPanel
import org.apache.jmeter.util.JMeterUtils; //导入方法依赖的package包/类
private JPanel createClassPanel()
{
JLabel label =
new JLabel(JMeterUtils.getResString("protocol_java_classname")); //$NON-NLS-1$
classnameCombo = new JComboBox();
classnameCombo.addActionListener(this);
classnameCombo.setEditable(false);
label.setLabelFor(classnameCombo);
methodName = new JComboBox();
methodName.addActionListener(this);
methodLabel.setLabelFor(methodName);
setupClasslist();
VerticalPanel panel = new VerticalPanel();
panel.add(filterpkg);
filterpkg.addChangeListener(this);
panel.add(label);
panel.add(classnameCombo);
constructorLabel.setText("");
panel.add(constructorLabel);
panel.add(methodLabel);
panel.add(methodName);
panel.add(successMsg);
panel.add(successCode);
panel.add(failureMsg);
panel.add(failureCode);
panel.add(errorMsg);
panel.add(errorCode);
panel.add(doSetup);
panel.add(appendError);
panel.add(appendExc);
panel.add(createInstancePerSample);
return panel;
}