private void initializeFunctionList() { String[] functionNames = CompoundVariable.getFunctionNames(); Arrays.sort(functionNames, String::compareToIgnoreCase); functionList = new JLabeledChoice(JMeterUtils.getResString("choose_function"), functionNames); //$NON-NLS-1$ functionList.addChangeListener(this); }
possibleClasses.toArray(ArrayUtils.EMPTY_STRING_ARRAY), true, false); classNameLabeledChoice.addChangeListener(this);
private void init() { // WARNING: called from ctor so must not be overridden (i.e. must be private or final) templateList.setValues(TemplateManager.getInstance().getTemplateNames()); templateList.addChangeListener(this); reloadTemplateButton.addActionListener(this); reloadTemplateButton.setFont(FONT_SMALL); this.getContentPane().setLayout(new BorderLayout(10, 0)); JPanel templateBar = new JPanel(new BorderLayout()); templateBar.add(templateList, BorderLayout.CENTER); JPanel reloadBtnBar = new JPanel(); reloadBtnBar.add(reloadTemplateButton); templateBar.add(reloadBtnBar, BorderLayout.EAST); this.getContentPane().add(templateBar, BorderLayout.NORTH); helpDoc.setContentType("text/html"); //$NON-NLS-1$ helpDoc.setEditable(false); helpDoc.addHyperlinkListener(this); this.getContentPane().add(scroller, BorderLayout.CENTER); applyTemplateButton.addActionListener(this); cancelButton.addActionListener(this); // Bottom buttons bar JPanel actionBtnBar = new JPanel(new FlowLayout()); actionBtnBar.add(applyTemplateButton); actionBtnBar.add(cancelButton); this.getContentPane().add(actionBtnBar, BorderLayout.SOUTH); this.pack(); this.setMinimumSize(new Dimension(MINIMAL_BOX_WIDTH, MINIMAL_BOX_HEIGHT)); ComponentUtil.centerComponentInWindow(this, 50); // center position and 50% of screen size populateTemplatePage(); }
method = new JLabeledChoice(JMeterUtils.getResString("method"), // $NON-NLS-1$ HTTPSamplerBase.getValidMethodsAsArray(), true, false); method.addChangeListener(this);
automaticRedirect = new JCheckBox(JMeterUtils.getResString("follow_redirects")); httpMethods = new JLabeledChoice("Method", new String[]{"GET", "POST", "PUT", "DELETE", "PATCH"}); httpMethods.addChangeListener(new ChangeListener() { @Override public void stateChanged(ChangeEvent e) {
automaticRedirect = new JCheckBox(JMeterUtils.getResString("follow_redirects")); httpMethods = new JLabeledChoice("Method", new String[]{"GET", "POST", "PUT", "DELETE", "PATCH"}); httpMethods.addChangeListener(new ChangeListener() { @Override public void stateChanged(ChangeEvent e) {