<commit_before>/*
 * Copyright 2012 <NAME> (mjuhasz)
 *
 * 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 bdsup2sub.gui.main;

import bdsup2sub.core.*;
import bdsup2sub.gui.support.ActionMenu;
import bdsup2sub.gui.support.EditPane;

import javax.swing.*;
import javax.swing.event.DocumentListener;
import javax.swing.text.BadLocationException;
import javax.swing.text.Document;
import java.awt.*;
import java.awt.datatransfer.Clipboard;
import java.awt.datatransfer.ClipboardOwner;
import java.awt.datatransfer.Transferable;
import java.awt.event.ActionListener;
import java.awt.event.MouseListener;
import java.awt.image.BufferedImage;
import java.util.List;

public class MainFrameView extends JFrame implements ClipboardOwner {

    private static final Logger logger = Logger.getInstance();

    private JPanel jContentPane;
    private JPanel jPanelTop;
    private JPanel jPanelInfoSource;
    private JLabel jLabelInfoSource;
    private JScrollPane jScrollPaneSource;
    private ZoomableGraphicsPanel jPanelSource;
    private JPanel jPanelInfoTarget;
    private JLabel jLabelInfoTarget;
    private JScrollPane jScrollPaneTarget;
    private ZoomableGraphicsPanel jPanelTarget;
    private JPanel jPanelBottom;
    private EditPane jLayoutPane;
    private JScrollPane jScrollPaneConsole;
    private JTextArea console;

    private JMenuBar jMenuBar;
    private ActionMenu jMenuFile;
    private JMenuItem jMenuItemLoad;
    private JMenu jMenuRecentFiles;
    private JMenuItem jMenuItemSave;
    private JMenuItem jMenuItemClose;
    private JMenuItem jMenuItemQuit;
    private ActionMenu jMenuEdit;
    private JMenuItem jMenuItemEditFrame;
    private JMenuItem jMenuItemEditDefaultDvdPalette;
    private JMenuItem jMenuItemEditImportedDvdPalette;
    private JMenuItem jMenuItemEditDvdFramePalette;
    private JMenuItem jMenuItemMoveAll;
    private JMenuItem jMenuItemResetCropOffset;
    private ActionMenu jMenuSettings;
    private JMenuItem jMenuItemConversionSettings;
    private JCheckBoxMenuItem jMenuItemSwapCrCb;
    private JCheckBoxMenuItem jMenuItemFixInvisibleFrames;
    private JCheckBoxMenuItem jMenuItemVerboseOutput;
    private ActionMenu jMenuAbout;
    private JMenuItem jMenuItemHelp;
    private JMenuItem jMenuItemAbout;

    private JComboBox jComboBoxSubNum;
    private JComboBox jComboBoxAlphaThreshold;
    private JComboBox jComboBoxMedLowThreshold;
    private JComboBox jComboBoxHiMedThreshold;
    private JComboBox jComboBoxOutputFormat;
    private JComboBox jComboBoxPalette;
    private JComboBox jComboBoxFilter;
    private JTextField jTextSubNum;
    private JTextField jTextAlphaThreshold;
    private JTextField jTextMedLowThreshold;
    private JTextField jTextHiMedThreshold;

    private JPopupMenu jPopupMenu;
    private JMenuItem jPopupMenuItemCopy;
    private JMenuItem jPopupMenuItemClear;

    private ActionListener recentFilesMenuActionListener;
    
    private final MainFrameModel model;

    public MainFrameView(MainFrameModel model) {
        super(Constants.APP_NAME + " " + Constants.APP_VERSION);
        this.model = model;

        initialize();

        logger.setMainFrame(this);

        printToConsole(Constants.APP_NAME + " " + Constants.APP_VERSION + " - a converter from Blu-Ray/HD-DVD SUP to DVD SUB/IDX and more\n");
        printToConsole("Created by " + Constants.DEVELOPERS + "\n");
        printToConsole("Official thread at Doom9: http://forum.doom9.org/showthread.php?t=145277\n\n");
        flushConsole();
    }

    private void initialize() {
        setSize(model.getMainWindowSize());
        setMinimumSize(new Dimension(700, 300));
        setJMenuBar(getjMenuBar());
        setContentPane(getJContentPane());
        getJPopupMenu();<commit_msg>Remove information from the log panel which was partly outdated and party included in the new About dialog.<commit_after>/*
 * Copyright 2012 <NAME> (mjuhasz)
 *
 * 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 bdsup2sub.gui.main;

import bdsup2sub.core.*;
import bdsup2sub.gui.support.ActionMenu;
import bdsup2sub.gui.support.EditPane;

import javax.swing.*;
import javax.swing.event.DocumentListener;
import javax.swing.text.BadLocationException;
import javax.swing.text.Document;
import java.awt.*;
import java.awt.datatransfer.Clipboard;
import java.awt.datatransfer.ClipboardOwner;
import java.awt.datatransfer.Transferable;
import java.awt.event.ActionListener;
import java.awt.event.MouseListener;
import java.awt.image.BufferedImage;
import java.util.List;

public class MainFrameView extends JFrame implements ClipboardOwner {

    private static final Logger logger = Logger.getInstance();

    private JPanel jContentPane;
    private JPanel jPanelTop;
    private JPanel jPanelInfoSource;
    private JLabel jLabelInfoSource;
    private JScrollPane jScrollPaneSource;
    private ZoomableGraphicsPanel jPanelSource;
    private JPanel jPanelInfoTarget;
    private JLabel jLabelInfoTarget;
    private JScrollPane jScrollPaneTarget;
    private ZoomableGraphicsPanel jPanelTarget;
    private JPanel jPanelBottom;
    private EditPane jLayoutPane;
    private JScrollPane jScrollPaneConsole;
    private JTextArea console;

    private JMenuBar jMenuBar;
    private ActionMenu jMenuFile;
    private JMenuItem jMenuItemLoad;
    private JMenu jMenuRecentFiles;
    private JMenuItem jMenuItemSave;
    private JMenuItem jMenuItemClose;
    private JMenuItem jMenuItemQuit;
    private ActionMenu jMenuEdit;
    private JMenuItem jMenuItemEditFrame;
    private JMenuItem jMenuItemEditDefaultDvdPalette;
    private JMenuItem jMenuItemEditImportedDvdPalette;
    private JMenuItem jMenuItemEditDvdFramePalette;
    private JMenuItem jMenuItemMoveAll;
    private JMenuItem jMenuItemResetCropOffset;
    private ActionMenu jMenuSettings;
    private JMenuItem jMenuItemConversionSettings;
    private JCheckBoxMenuItem jMenuItemSwapCrCb;
    private JCheckBoxMenuItem jMenuItemFixInvisibleFrames;
    private JCheckBoxMenuItem jMenuItemVerboseOutput;
    private ActionMenu jMenuAbout;
    private JMenuItem jMenuItemHelp;
    private JMenuItem jMenuItemAbout;

    private JComboBox jComboBoxSubNum;
    private JComboBox jComboBoxAlphaThreshold;
    private JComboBox jComboBoxMedLowThreshold;
    private JComboBox jComboBoxHiMedThreshold;
    private JComboBox jComboBoxOutputFormat;
    private JComboBox jComboBoxPalette;
    private JComboBox jComboBoxFilter;
    private JTextField jTextSubNum;
    private JTextField jTextAlphaThreshold;
    private JTextField jTextMedLowThreshold;
    private JTextField jTextHiMedThreshold;

    private JPopupMenu jPopupMenu;
    private JMenuItem jPopupMenuItemCopy;
    private JMenuItem jPopupMenuItemClear;

    private ActionListener recentFilesMenuActionListener;
    
    private final MainFrameModel model;

    public MainFrameView(MainFrameModel model) {
        super(Constants.APP_NAME + " " + Constants.APP_VERSION);
        this.model = model;
        initialize();
        logger.setMainFrame(this);
    }

    private void initialize() {
        setSize(model.getMainWindowSize());
        setMinimumSize(new Dimension(700, 300));
        setJMenuBar(getjMenuBar());
        setContentPane(getJContentPane());
        getJPopupMenu();
{'fraction_non_alphanumeric': 0.05880226533317267, 'fraction_numerical': 0.005301843595613929, 'mean_word_length': 4.382619974059663, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '3396046', 'n_tokens_mistral': 2280, 'n_tokens_neox': 2234, 'n_words': 646}