<commit_before>package org.wiztools.restclient.ui.reqbody;

import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.Font;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.ArrayList;
import java.util.List;
import javax.annotation.PostConstruct;
import javax.inject.Inject;
import javax.swing.JComboBox;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import org.wiztools.restclient.bean.*;
import org.wiztools.restclient.ui.FontableEditor;
import org.wiztools.restclient.ui.RESTUserInterface;
import org.wiztools.restclient.ui.RESTView;

/**
 *
 * @author subwiz
 */
public class ReqBodyPanelImpl extends JPanel implements ReqBodyPanel, FontableEditor {
    @Inject RESTView view;
    @Inject RESTUserInterface rest_ui;
    
    @Inject private ReqBodyPanelNone jp_body_none;
    @Inject private ReqBodyPanelString jp_req_body_string;
    @Inject private ReqBodyPanelFile jp_req_body_file;
    @Inject private ReqBodyPanelByteArray jp_req_body_byte_array;
    @Inject private ReqBodyPanelMultipart jp_req_body_multipart;
    
    private final List<ReqBodyPanel> allPanels = new ArrayList<ReqBodyPanel>();
    
    private static final String NONE_BODY = "None";
    private static final String STRING_BODY = "String body";
    private static final String FILE_BODY = "File body";
    private static final String BYTE_ARRAY_BODY = "Byte-array body";
    private static final String MULTIPART_BODY = "Multipart body";
    
    
    private static final String[] comboValues = new String[]{NONE_BODY, STRING_BODY, FILE_BODY, BYTE_ARRAY_BODY, MULTIPART_BODY};
    private JComboBox jcb_body_type = new JComboBox(comboValues);
    
    private JPanel getPanelFromSelection() {
        if(jcb_body_type.getSelectedItem().equals(NONE_BODY)) {
            return jp_body_none;
        }
        else if(jcb_body_type.getSelectedItem().equals(STRING_BODY)) {
            return jp_req_body_string;<commit_msg>removing multipart option for release purposes.<commit_after>package org.wiztools.restclient.ui.reqbody;

import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.Font;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.ArrayList;
import java.util.List;
import javax.annotation.PostConstruct;
import javax.inject.Inject;
import javax.swing.JComboBox;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import org.wiztools.restclient.bean.*;
import org.wiztools.restclient.ui.FontableEditor;
import org.wiztools.restclient.ui.RESTUserInterface;
import org.wiztools.restclient.ui.RESTView;

/**
 *
 * @author subwiz
 */
public class ReqBodyPanelImpl extends JPanel implements ReqBodyPanel, FontableEditor {
    @Inject RESTView view;
    @Inject RESTUserInterface rest_ui;
    
    @Inject private ReqBodyPanelNone jp_body_none;
    @Inject private ReqBodyPanelString jp_req_body_string;
    @Inject private ReqBodyPanelFile jp_req_body_file;
    @Inject private ReqBodyPanelByteArray jp_req_body_byte_array;
    @Inject private ReqBodyPanelMultipart jp_req_body_multipart;
    
    private final List<ReqBodyPanel> allPanels = new ArrayList<ReqBodyPanel>();
    
    private static final String NONE_BODY = "None";
    private static final String STRING_BODY = "String body";
    private static final String FILE_BODY = "File body";
    private static final String BYTE_ARRAY_BODY = "Byte-array body";
    private static final String MULTIPART_BODY = "Multipart body";
    
    
    private static final String[] comboValues = new String[]{NONE_BODY, STRING_BODY, FILE_BODY, BYTE_ARRAY_BODY};
    private JComboBox jcb_body_type = new JComboBox(comboValues);
    
    private JPanel getPanelFromSelection() {
        if(jcb_body_type.getSelectedItem().equals(NONE_BODY)) {
            return jp_body_none;
        }
        else if(jcb_body_type.getSelectedItem().equals(STRING_BODY)) {
            return jp_req_body_string;
{'fraction_non_alphanumeric': 0.08088978766430738, 'fraction_numerical': 0.0, 'mean_word_length': 4.573239436619718, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1797263', 'n_tokens_mistral': 1265, 'n_tokens_neox': 1246, 'n_words': 275}