<commit_before>/*
 * EDACCSolverConfigEntry.java
 *
 * Created on 30.12.2009, 20:11:16
 */
package edacc.experiment.tabs.solver.gui;

import edacc.EDACCApp;
import edacc.JTableTooltipInformation;
import edacc.experiment.tabs.solver.EDACCSolverConfigEntryListener;
import edacc.experiment.tabs.solver.SolverConfigurationEntry;
import edacc.model.SolverBinaries;
import edacc.model.SolverConfiguration;
import java.awt.Color;
import java.awt.Component;
import java.awt.Graphics;
import java.sql.SQLException;
import java.util.LinkedList;
import javax.swing.JCheckBox;
import javax.swing.JLabel;
import javax.swing.JTable;
import javax.swing.SwingConstants;
import javax.swing.border.TitledBorder;
import javax.swing.event.TableModelEvent;
import javax.swing.event.TableModelListener;
import javax.swing.table.DefaultTableCellRenderer;
import org.jdesktop.application.Action;

/**
 * A simple JPanel which represents a Solver Configuration in the GUI.
 * @author simon
 * @see edacc.EDACCSolverConfigPanel
 */
public class EDACCSolverConfigEntry extends javax.swing.JPanel {

    private TitledBorder border;
    private boolean updateTableColumnWidth;
    private SolverConfigurationEntry model;
    private EDACCSolverConfigEntryListener listener;

    protected EDACCSolverConfigEntry(final SolverConfigurationEntry model, EDACCSolverConfigEntryListener listener) {
        if (model == null) {
            throw new IllegalArgumentException("Model cannot be null.");
        }
        if (listener == null) {
            throw new IllegalArgumentException("Listener cannot be null.");
        }
        
        this.model = model;
        initComponents();
        if (!model.getExperiment().isConfigurationExp()) {
            jLabel2.setVisible(false);
            txtHint.setVisible(false);
        }
        this.border = new TitledBorder("");
        this.setBorder(border);

        for (SolverBinaries sb : model.getSolver().getSolverBinaries()) {
            comboSolverBinaries.addItem(sb);
        }

        parameterTable.setRowSelectionAllowed(false);
        parameterTable.setCellSelectionEnabled(false);
        DefaultTableCellRenderer renderer = new DefaultTableCellRenderer() {
<commit_msg>terminate edit on focus lost<commit_after>/*
 * EDACCSolverConfigEntry.java
 *
 * Created on 30.12.2009, 20:11:16
 */
package edacc.experiment.tabs.solver.gui;

import edacc.EDACCApp;
import edacc.JTableTooltipInformation;
import edacc.experiment.tabs.solver.EDACCSolverConfigEntryListener;
import edacc.experiment.tabs.solver.SolverConfigurationEntry;
import edacc.model.SolverBinaries;
import edacc.model.SolverConfiguration;
import java.awt.Color;
import java.awt.Component;
import java.awt.Graphics;
import java.sql.SQLException;
import javax.swing.JCheckBox;
import javax.swing.JLabel;
import javax.swing.JTable;
import javax.swing.SwingConstants;
import javax.swing.border.TitledBorder;
import javax.swing.event.TableModelEvent;
import javax.swing.event.TableModelListener;
import javax.swing.table.DefaultTableCellRenderer;
import org.jdesktop.application.Action;

/**
 * A simple JPanel which represents a Solver Configuration in the GUI.
 * @author simon
 * @see edacc.EDACCSolverConfigPanel
 */
public class EDACCSolverConfigEntry extends javax.swing.JPanel {

    private TitledBorder border;
    private boolean updateTableColumnWidth;
    private SolverConfigurationEntry model;
    private EDACCSolverConfigEntryListener listener;

    protected EDACCSolverConfigEntry(final SolverConfigurationEntry model, EDACCSolverConfigEntryListener listener) {
        if (model == null) {
            throw new IllegalArgumentException("Model cannot be null.");
        }
        if (listener == null) {
            throw new IllegalArgumentException("Listener cannot be null.");
        }
        
        this.model = model;
        initComponents();
        if (!model.getExperiment().isConfigurationExp()) {
            jLabel2.setVisible(false);
            txtHint.setVisible(false);
        }
        this.border = new TitledBorder("");
        this.setBorder(border);

        for (SolverBinaries sb : model.getSolver().getSolverBinaries()) {
            comboSolverBinaries.addItem(sb);
        }
        parameterTable.putClientProperty("terminateEditOnFocusLost", Boolean.TRUE);
        parameterTable.setRowSelectionAllowed(false);
        parameterTable.setCellSelectionEnabled(false);
        DefaultTableCellRenderer renderer = new DefaultTableCellRenderer() {

{'fraction_non_alphanumeric': 0.0892896904920953, 'fraction_numerical': 0.006680026720106881, 'mean_word_length': 3.914660831509847, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '3522253', 'n_tokens_mistral': 1249, 'n_tokens_neox': 1222, 'n_words': 260}