package saccubus;
-import java.awt.*;
+import java.io.IOException;
+import saccubus.converter.Converter;
+import java.awt.BorderLayout;
+import java.awt.Dimension;
+import java.awt.GridBagConstraints;
+import java.awt.GridBagLayout;
+import java.awt.GridLayout;
+import java.awt.Image;
+import java.awt.Insets;
+import java.awt.Toolkit;
import java.awt.dnd.DnDConstants;
import java.awt.dnd.DropTarget;
-import java.awt.event.*;
-import javax.swing.*;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.KeyEvent;
+import java.awt.event.WindowAdapter;
+import java.awt.event.WindowEvent;
import java.io.File;
-import saccubus.util.FileDropTarget;
-import saccubus.util.PopupRightClick;
-
-import java.awt.GridBagLayout;
-import java.awt.GridBagConstraints;
-import java.awt.Insets;
import javax.swing.BorderFactory;
+import javax.swing.ButtonGroup;
+import javax.swing.JButton;
import javax.swing.JCheckBox;
-import javax.swing.JPanel;
-import javax.swing.border.EtchedBorder;
-import javax.swing.border.TitledBorder;
-import java.awt.Font;
-import java.awt.Color;
-import javax.swing.JTabbedPane;
import javax.swing.JComboBox;
-import javax.swing.JButton;
+import javax.swing.JFileChooser;
+import javax.swing.JFrame;
import javax.swing.JLabel;
+import javax.swing.JMenu;
+import javax.swing.JMenuBar;
+import javax.swing.JMenuItem;
+import javax.swing.JOptionPane;
+import javax.swing.JPanel;
+import javax.swing.JPasswordField;
+import javax.swing.JRadioButton;
+import javax.swing.JTabbedPane;
import javax.swing.JTextField;
-import java.awt.event.KeyEvent;
+import javax.swing.SwingUtilities;
import nicobrowser.entity.NicoContent;
+import org.apache.commons.lang.StringUtils;
+import saccubus.ConvertStopFlag.State;
+import saccubus.converter.profile.FfmpegOption;
+import saccubus.converter.profile.NgSetting;
+import saccubus.net.TextProgressListener;
+import saccubus.properties.BasicSetting;
+import saccubus.properties.ConvertSetting;
+import saccubus.properties.InputCommentSetting;
+import saccubus.properties.InputVideoSetting;
+import saccubus.properties.SProperties;
+import saccubus.properties.InputTcommentSetting;
+import saccubus.properties.MovieSetting;
+import saccubus.properties.OutputVideoSetting;
+import saccubus.util.FileDropTarget;
+import saccubus.util.PopupRightClick;
import yukihane.nicovideo.NicoDBFinder;
/**
* @version 1.0
*/
public class MainFrame extends JFrame {
- private static final long serialVersionUID = 2564486741331062989L;
- public static final String VERSION = "1.22r NicoBrowser\8ag\92£ 0.0.1";
-
- public static final Image WinIcon = Toolkit.getDefaultToolkit()
- .createImage(saccubus.MainFrame.class.getResource("icon32.png"));
-
-
- JPanel contentPane;
-
- BorderLayout borderLayout1 = new BorderLayout();
-
- JMenuBar jMenuBar1 = new JMenuBar();
-
- JMenu jMenuFile = new JMenu();
-
- JMenuItem jMenuFileExit = new JMenuItem();
-
- JMenu jMenuHelp = new JMenu();
-
- JMenuItem jMenuHelpAbout = new JMenuItem();
-
- JLabel statusBar = new JLabel();
-
- JTabbedPane MainTabbedPane = new JTabbedPane();
-
- JPanel SavingInfoTabPanel = new JPanel();
-
- JPanel FFMpegTabPanel = new JPanel();
-
- JPanel VideoInfoPanel = new JPanel();
-
- JTextField VideoID_TextField = new JTextField();
-
- JButton DoButton = new JButton();
-
- public static final String DoButtonDefString = "\95Ï\8a·";
-
- public static final String DoButtonStopString = "\92â\8e~";
-
- public static final String DoButtonWaitString = "\91Ò\8b@";
-
- GridBagLayout gridBagLayout2 = new GridBagLayout();
- JPanel UserInfoPanel = new JPanel();
-
- GridBagLayout gridBagLayout3 = new GridBagLayout();
-
- JLabel MailAddrLabel = new JLabel();
-
- JTextField MailAddrField = new JTextField();
-
- JLabel PasswordLabel = new JLabel();
-
- JPasswordField PasswordField = new JPasswordField();
-
- JPanel CommentSaveInfoPanel = new JPanel();
-
- GridBagLayout gridBagLayout4 = new GridBagLayout();
+ private static final long serialVersionUID = 2564486741331062989L;
+ public static final String VERSION = "1.22r NicoBrowser\8ag\92£ 1.3.4";
+ public static final Image WinIcon = Toolkit.getDefaultToolkit().createImage(saccubus.MainFrame.class.getResource(
+ "icon32.png"));
+ JPanel contentPane;
+ BorderLayout borderLayout1 = new BorderLayout();
+ JMenuBar jMenuBar1 = new JMenuBar();
+ JMenu jMenuFile = new JMenu();
+ JMenuItem jMenuFileExit = new JMenuItem();
+ JMenu jMenuHelp = new JMenu();
+ JMenuItem jMenuHelpAbout = new JMenuItem();
+ JLabel statusBar = new JLabel();
+ JTabbedPane MainTabbedPane = new JTabbedPane();
+ JPanel SavingInfoTabPanel = new JPanel();
+ JPanel FFMpegTabPanel = new JPanel();
+ JPanel VideoInfoPanel = new JPanel();
+ JTextField VideoID_TextField = new JTextField();
+ JButton DoButton = new JButton();
+ public static final String DoButtonDefString = "\95Ï\8a·";
+ public static final String DoButtonStopString = "\92â\8e~";
+ public static final String DoButtonWaitString = "\91Ò\8b@";
+ JPanel UserInfoPanel = new JPanel();
+ GridBagLayout gridBagLayout3 = new GridBagLayout();
+ JLabel MailAddrLabel = new JLabel();
+ JTextField MailAddrField = new JTextField();
+ JLabel PasswordLabel = new JLabel();
+ JPasswordField PasswordField = new JPasswordField();
+ GridBagLayout gridBagLayout4 = new GridBagLayout();
+ GridBagLayout gridBagLayout6 = new GridBagLayout();
+ ButtonGroup CommentSaveButtonGroup = new ButtonGroup();
+ ButtonGroup ConvSaveButtonGroup = new ButtonGroup();
+
+ public MainFrame() {
+ videoSaveInfoPanel = savePanel.getVideoSaveInfoPanel();
+
+ try {
+ setDefaultCloseOperation(EXIT_ON_CLOSE);
+ jbInit();
+ setPopup();
+ setDropTarget();
+ SProperties setting = SProperties.loadSetting(null,
+ null);
+ this.setSetting(setting);
+ } catch (Exception exception) {
+ exception.printStackTrace();
+ }
+ }
- JCheckBox SavingCommentCheckBox = new JCheckBox();
+ /**
+ * \83R\83\93\83|\81[\83l\83\93\83g\82Ì\8f\89\8aú\89»\81B
+ *
+ * @throws java.lang.Exception
+ */
+ private void jbInit() throws Exception {
+ GridBagConstraints gridBagConstraints74 = new GridBagConstraints(1, 1, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER,
+ GridBagConstraints.BOTH, new Insets(0, 0, 0, 5), 0, 0);
+ gridBagConstraints74.gridwidth = 2;
+ GridBagConstraints gridBagConstraints73 = new GridBagConstraints();
+ gridBagConstraints73.fill = GridBagConstraints.HORIZONTAL;
+ gridBagConstraints73.gridy = 6;
+ gridBagConstraints73.weightx = 1.0;
+ gridBagConstraints73.gridwidth = 4;
+ gridBagConstraints73.insets = new Insets(0, 0, 0, 5);
+ gridBagConstraints73.gridx = 1;
+ GridBagConstraints gridBagConstraints72 = new GridBagConstraints();
+ gridBagConstraints72.gridx = 0;
+ gridBagConstraints72.anchor = GridBagConstraints.WEST;
+ gridBagConstraints72.insets = new Insets(0, 5, 0, 5);
+ gridBagConstraints72.fill = GridBagConstraints.NONE;
+ gridBagConstraints72.gridwidth = 1;
+ gridBagConstraints72.gridy = 6;
+ ShadowKindLabel = new JLabel();
+ ShadowKindLabel.setText("\89e\82Ì\8eí\97Þ");
+ ShadowKindLabel.setDisplayedMnemonic(KeyEvent.VK_UNDEFINED);
+ GridBagConstraints gridBagConstraints71 = new GridBagConstraints(1, 0, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER,
+ GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 6);
+ gridBagConstraints71.fill = GridBagConstraints.BOTH;
+ gridBagConstraints71.ipady = 0;
+ GridBagConstraints gridBagConstraints70 = new GridBagConstraints();
+ gridBagConstraints70.fill = GridBagConstraints.HORIZONTAL;
+ gridBagConstraints70.gridy = 1;
+ gridBagConstraints70.ipadx = 0;
+ gridBagConstraints70.ipady = 0;
+ gridBagConstraints70.weightx = 1.0;
+ gridBagConstraints70.insets = new Insets(0, 0, 0, 0);
+ gridBagConstraints70.gridx = 1;
+ GridBagConstraints gridBagConstraints69 = new GridBagConstraints();
+ gridBagConstraints69.gridx = 0;
+ gridBagConstraints69.ipadx = 0;
+ gridBagConstraints69.ipady = 0;
+ gridBagConstraints69.insets = new Insets(0, 5, 0, 5);
+ gridBagConstraints69.anchor = GridBagConstraints.WEST;
+ gridBagConstraints69.gridy = 1;
+ GridBagConstraints gridBagConstraints68 = new GridBagConstraints();
+ gridBagConstraints68.fill = GridBagConstraints.BOTH;
+ gridBagConstraints68.gridy = 0;
+ gridBagConstraints68.ipady = 0;
+ gridBagConstraints68.weightx = 1.0;
+ gridBagConstraints68.insets = new Insets(0, 0, 0, 0);
+ gridBagConstraints68.gridx = 1;
+ GridBagConstraints gridBagConstraints67 = new GridBagConstraints();
+ gridBagConstraints67.gridx = 0;
+ gridBagConstraints67.ipadx = 0;
+ gridBagConstraints67.ipady = 0;
+ gridBagConstraints67.insets = new Insets(0, 5, 0, 5);
+ gridBagConstraints67.anchor = GridBagConstraints.WEST;
+ gridBagConstraints67.gridy = 0;
+ GridBagConstraints gridBagConstraints66 = new GridBagConstraints();
+ gridBagConstraints66.gridx = 0;
+ gridBagConstraints66.insets = new Insets(0, 5, 5, 5);
+ gridBagConstraints66.anchor = GridBagConstraints.WEST;
+ gridBagConstraints66.gridwidth = 2;
+ gridBagConstraints66.gridy = 1;
+ ViewCommentLabel = new JLabel();
+ ViewCommentLabel.setText("\95\\8e¦\83R\83\81\83\93\83g\90\94");
+ GridBagConstraints gridBagConstraints65 = new GridBagConstraints();
+ gridBagConstraints65.fill = GridBagConstraints.HORIZONTAL;
+ gridBagConstraints65.gridy = 1;
+ gridBagConstraints65.weightx = 1.0;
+ gridBagConstraints65.gridwidth = 6;
+ gridBagConstraints65.insets = new Insets(0, 5, 5, 5);
+ gridBagConstraints65.gridx = 3;
+ GridBagConstraints gridBagConstraints64 = new GridBagConstraints(1, 1,
+ 1, 1, 0.0, 0.0, GridBagConstraints.CENTER,
+ GridBagConstraints.BOTH, new Insets(0, 0, 0, 5), 0, 0);
+ gridBagConstraints64.gridy = 3;
+ gridBagConstraints64.fill = GridBagConstraints.HORIZONTAL;
+ gridBagConstraints64.gridx = 4;
+ GridBagConstraints gridBagConstraints63 = new GridBagConstraints(0, 4,
+ 2, 1, 1.0, 0.0, GridBagConstraints.CENTER,
+ GridBagConstraints.HORIZONTAL, new Insets(0, 5, 0, 5), 0, 0);
+ gridBagConstraints63.gridy = 7;
+ gridBagConstraints63.gridx = 0;
+ gridBagConstraints63.gridwidth = 5;
+ GridBagConstraints gridBagConstraints62 = new GridBagConstraints(0, 3,
+ 2, 1, 1.0, 0.0, GridBagConstraints.CENTER,
+ GridBagConstraints.BOTH, new Insets(0, 5, 5, 5), 0, 0);
+ gridBagConstraints62.gridy = 5;
+ gridBagConstraints62.gridx = 1;
+ gridBagConstraints62.fill = GridBagConstraints.HORIZONTAL;
+ gridBagConstraints62.insets = new Insets(0, 0, 5, 5);
+ gridBagConstraints62.gridwidth = 4;
+ GridBagConstraints gridBagConstraints61 = new GridBagConstraints(0, 2,
+ 1, 1, 0.0, 0.0, GridBagConstraints.CENTER,
+ GridBagConstraints.BOTH, new Insets(5, 5, 5, 5), 0, 0);
+ gridBagConstraints61.gridy = 5;
+ gridBagConstraints61.gridx = 0;
+ gridBagConstraints61.fill = GridBagConstraints.VERTICAL;
+ gridBagConstraints61.anchor = GridBagConstraints.WEST;
+ gridBagConstraints61.gridwidth = 1;
+ GridBagConstraints gridBagConstraints60 = new GridBagConstraints(0, 1,
+ 1, 1, 1.0, 0.0, GridBagConstraints.CENTER,
+ GridBagConstraints.BOTH, new Insets(0, 5, 0, 5), 0, 0);
+ gridBagConstraints60.gridy = 3;
+ gridBagConstraints60.gridx = 1;
+ gridBagConstraints60.fill = GridBagConstraints.HORIZONTAL;
+ gridBagConstraints60.insets = new Insets(0, 0, 0, 5);
+ gridBagConstraints60.gridwidth = 3;
+ GridBagConstraints gridBagConstraints59 = new GridBagConstraints(0, 0,
+ 2, 1, 1.0, 0.0, GridBagConstraints.CENTER,
+ GridBagConstraints.HORIZONTAL, new Insets(0, 5, 5, 5), 0, 0);
+ gridBagConstraints59.gridy = 3;
+ gridBagConstraints59.insets = new Insets(5, 5, 5, 5);
+ gridBagConstraints59.gridx = 0;
+ gridBagConstraints59.fill = GridBagConstraints.NONE;
+ gridBagConstraints59.anchor = GridBagConstraints.WEST;
+ gridBagConstraints59.weightx = 0.0;
+ gridBagConstraints59.gridwidth = 1;
+ GridBagConstraints gridBagConstraints58 = new GridBagConstraints();
+ gridBagConstraints58.gridx = 0;
+ gridBagConstraints58.anchor = GridBagConstraints.WEST;
+ gridBagConstraints58.insets = new Insets(0, 5, 5, 5);
+ gridBagConstraints58.gridwidth = 5;
+ gridBagConstraints58.weightx = 1.0;
+ gridBagConstraints58.fill = GridBagConstraints.HORIZONTAL;
+ gridBagConstraints58.gridy = 0;
+ GridBagConstraints gridBagConstraints57 = new GridBagConstraints();
+ gridBagConstraints57.fill = GridBagConstraints.BOTH;
+ gridBagConstraints57.gridy = 2;
+ gridBagConstraints57.weightx = 1.0;
+ gridBagConstraints57.insets = new Insets(0, 0, 5, 5);
+ gridBagConstraints57.gridx = 1;
+ GridBagConstraints gridBagConstraints56 = new GridBagConstraints();
+ gridBagConstraints56.gridx = 0;
+ gridBagConstraints56.insets = new Insets(0, 5, 5, 5);
+ gridBagConstraints56.anchor = GridBagConstraints.WEST;
+ gridBagConstraints56.gridy = 2;
+ ExtOptionLabel = new JLabel();
+ ExtOptionLabel.setText("\8fo\97Í\93®\89æ\82Ì\8ag\92£\8eq");
+ GridBagConstraints gridBagConstraints55 = new GridBagConstraints();
+ gridBagConstraints55.gridx = 0;
+ gridBagConstraints55.fill = GridBagConstraints.HORIZONTAL;
+ gridBagConstraints55.weightx = 1.0;
+ gridBagConstraints55.gridwidth = 2;
+ gridBagConstraints55.gridy = 1;
+ GridBagConstraints gridBagConstraints54 = new GridBagConstraints(0, 2,
+ 2, 1, 1.0, 0.0, GridBagConstraints.CENTER,
+ GridBagConstraints.BOTH, new Insets(5, 5, 5, 5), 0, 0);
+ gridBagConstraints54.gridwidth = 3;
+ GridBagConstraints gridBagConstraints53 = new GridBagConstraints(1, 3,
+ 2, 1, 1.0, 0.0, GridBagConstraints.CENTER,
+ GridBagConstraints.BOTH, new Insets(0, 0, 5, 5), 0, 0);
+ gridBagConstraints53.gridy = 5;
+ gridBagConstraints53.gridheight = 1;
+ gridBagConstraints53.weightx = 1.0;
+ gridBagConstraints53.gridwidth = 1;
+ GridBagConstraints gridBagConstraints52 = new GridBagConstraints(2, 2,
+ 1, 1, 1.0, 0.0, GridBagConstraints.CENTER,
+ GridBagConstraints.BOTH, new Insets(0, 0, 5, 5), 0, 0);
+ gridBagConstraints52.gridy = 4;
+ gridBagConstraints52.gridwidth = 1;
+ gridBagConstraints52.weightx = 1.0;
+ gridBagConstraints52.gridx = 1;
+ GridBagConstraints gridBagConstraints51 = new GridBagConstraints(2, 1,
+ 1, 1, 1.0, 0.0, GridBagConstraints.CENTER,
+ GridBagConstraints.BOTH, new Insets(0, 0, 5, 5), 0, 0);
+ gridBagConstraints51.gridy = 3;
+ gridBagConstraints51.gridwidth = 1;
+ gridBagConstraints51.weightx = 1.0;
+ gridBagConstraints51.gridx = 1;
+ GridBagConstraints gridBagConstraints50 = new GridBagConstraints(0, 3,
+ 1, 1, 0.0, 0.0, GridBagConstraints.WEST,
+ GridBagConstraints.BOTH, new Insets(0, 5, 5, 5), 0, 0);
+ gridBagConstraints50.gridy = 5;
+ GridBagConstraints gridBagConstraints49 = new GridBagConstraints(0, 2,
+ 2, 1, 0.0, 0.0, GridBagConstraints.WEST,
+ GridBagConstraints.BOTH, new Insets(0, 5, 5, 5), 0, 0);
+ gridBagConstraints49.gridy = 4;
+ gridBagConstraints49.gridwidth = 1;
+ GridBagConstraints gridBagConstraints48 = new GridBagConstraints(0, 1,
+ 1, 1, 0.0, 0.0, GridBagConstraints.WEST,
+ GridBagConstraints.BOTH, new Insets(0, 5, 5, 5), 0, 0);
+ gridBagConstraints48.gridy = 3;
+
+ GridBagConstraints gridBagConstraints33 = new GridBagConstraints();
+ gridBagConstraints33.gridx = 0;
+ gridBagConstraints33.fill = GridBagConstraints.HORIZONTAL;
+ gridBagConstraints33.weightx = 1.0;
+ gridBagConstraints33.insets = new Insets(0, 5, 5, 5);
+ gridBagConstraints33.gridwidth = 5;
+ gridBagConstraints33.gridy = 9;
+
+ GridBagConstraints gridBagConstraints14 = new GridBagConstraints();
+ gridBagConstraints14.gridx = 0;
+ gridBagConstraints14.anchor = GridBagConstraints.WEST;
+ gridBagConstraints14.fill = GridBagConstraints.HORIZONTAL;
+ gridBagConstraints14.weightx = 1.0;
+ gridBagConstraints14.gridwidth = 5;
+ gridBagConstraints14.insets = new Insets(0, 5, 0, 5);
+ gridBagConstraints14.gridy = 8;
+ GridBagConstraints gridBagConstraints7 = new GridBagConstraints(0, 0,
+ 1, 1, 1.0, 1.0, GridBagConstraints.NORTH,
+ GridBagConstraints.HORIZONTAL, new Insets(0, 5, 0, 5), 0, 0);
+ gridBagConstraints7.weighty = 0.0;
+ GridBagConstraints gridBagConstraints6 = new GridBagConstraints();
+ gridBagConstraints6.gridx = 0;
+ gridBagConstraints6.weighty = 1.0;
+ gridBagConstraints6.weightx = 1.0;
+ gridBagConstraints6.insets = new Insets(0, 5, 0, 5);
+ gridBagConstraints6.fill = GridBagConstraints.HORIZONTAL;
+ gridBagConstraints6.anchor = GridBagConstraints.NORTH;
+ gridBagConstraints6.gridy = 1;
+ GridBagConstraints gridBagConstraints1 = new GridBagConstraints(0, 1,
+ 1, 1, 1.0, 0.0, GridBagConstraints.CENTER,
+ GridBagConstraints.HORIZONTAL, new Insets(0, 5, 0, 5), 0, 0);
+ gridBagConstraints1.fill = GridBagConstraints.HORIZONTAL;
+ gridBagConstraints1.anchor = GridBagConstraints.NORTH;
+ gridBagConstraints1.weighty = 1.0;
+ this.setIconImage(WinIcon);
+ contentPane = (JPanel) this.getContentPane();
+ contentPane.setLayout(borderLayout1);
+ setSize(new Dimension(400, 450));
+ setTitle("\82³\82«\82ã\82Î\82· " + VERSION);
+ this.addWindowListener(new MainFrame_this_windowAdapter(this));
+ statusBar.setText(" ");
+ jMenuFile.setText("\83t\83@\83C\83\8b");
+ jMenuFileExit.setText("\8fI\97¹");
+ jMenuFileExit.addActionListener(new MainFrame_jMenuFileExit_ActionAdapter(
+ this));
+ jMenuHelp.setText("\83w\83\8b\83v");
+ jMenuHelpAbout.setText("\83o\81[\83W\83\87\83\93\8fî\95ñ");
+ jMenuHelpAbout.addActionListener(new MainFrame_jMenuHelpAbout_ActionAdapter(
+ this));
+ VideoInfoPanel.setLayout(gridBagLayout1);
+ VideoID_TextField.setText("http://www.nicovideo.jp/watch/");
+ DoButton.setText(DoButtonDefString);
+ DoButton.addActionListener(new MainFrame_DoButton_actionAdapter(this));
+ SavingInfoTabPanel.setLayout(new GridLayout());
+ UserInfoPanel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), "\83\86\81[\83U\90Ý\92è"));
+ UserInfoPanel.setLayout(gridBagLayout3);
+ MailAddrLabel.setText("\83\81\81[\83\8b\83A\83h\83\8c\83X");
+ PasswordLabel.setText("\83p\83X\83\8f\81[\83h");
+
+ setListenerToSavePanelButton();
+
+ FFMpegTabPanel.setLayout(gridBagLayout6);
+ PathSettingPanel.setBorder(BorderFactory.createTitledBorder(
+ BorderFactory.createEtchedBorder(), "\83v\83\8d\83O\83\89\83\80\82Ì\88Ê\92u\82Ì\90Ý\92è"));
+ PathSettingPanel.setLayout(gridBagLayout7);
+ FFmpegPathLabel.setText("FFmpeg");
+ SettingFFmpegPathButton.setText("\8eQ\8fÆ");
+ SettingFFmpegPathButton.addActionListener(new MainFrame_SettingFFmpegPathButton_actionAdapter(
+ this));
+ VhookPathLabel.setText("\8ag\92£vhook\83\89\83C\83u\83\89\83\8a");
+ SettingVhookPathButton.setText("\8eQ\8fÆ");
+ SettingVhookPathButton.addActionListener(new MainFrame_SettingVhookPathButton_actionAdapter(
+ this));
+ VhookSettingPanel.setLayout(gridBagLayout8);
+ VhookSettingPanel.setBorder(BorderFactory.createTitledBorder(
+ BorderFactory.createEtchedBorder(), "\8ag\92£vhook\83\89\83C\83u\83\89\83\8a\82Ì\90Ý\92è"));
+ FFmpegSettingPanel.setBorder(BorderFactory.createTitledBorder(
+ BorderFactory.createEtchedBorder(), "FFmpeg\82Ì\90Ý\92è"));
+ FFmpegSettingPanel.setLayout(gridBagLayout9);
+ FontPathLabel.setText("\83t\83H\83\93\83g\83p\83X");
+ SettingFontPathButton.setText("\8eQ\8fÆ");
+ SettingFontPathButton.addActionListener(new MainFrame_SettingFontPathButton_actionAdapter(
+ this));
+ ShowConvVideoCheckBox.setText("\95Ï\8a·\92\86\82Ì\89æ\91\9c\82ð\95\\8e¦\82·\82é");
+ InLabel.setText("\93ü\97Í\83I\83v\83V\83\87\83\93");
+ OutLabel.setText("\8fo\97Í\83I\83v\83V\83\87\83\93");
+ MainOptionLabel.setText("\83\81\83C\83\93\83I\83v\83V\83\87\83\93");
+ FontIndexLabel.setText("\83t\83H\83\93\83g\94Ô\8d\86");
+ VideoID_Label.setText("URL/ID");
+ WayBackLabel.setText("\89ß\8b\8e\83\8d\83O");
+ OpPanel.setLayout(new GridBagLayout());
+
+ BasicInfoTabPanel.setLayout(gridBagLayout12);
+ jMenuBar1.add(jMenuFile);
+ jMenuFile.add(jMenuFileExit);
+ jMenuBar1.add(jMenuHelp);
+ jMenuHelp.add(jMenuHelpAbout);
+ setJMenuBar(jMenuBar1);
+
+ contentPane.add(statusBar, BorderLayout.SOUTH);
+ contentPane.add(MainTabbedPane, java.awt.BorderLayout.CENTER);
+ contentPane.add(VideoInfoPanel, java.awt.BorderLayout.NORTH);
+ UserInfoPanel.add(PasswordField, new GridBagConstraints(1, 1, 1, 1,
+ 1.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH,
+ new Insets(0, 5, 5, 5), 0, 0));
+ UserInfoPanel.add(MailAddrField, new GridBagConstraints(1, 0, 1, 1,
+ 1.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH,
+ new Insets(0, 5, 5, 5), 0, 0));
+ UserInfoPanel.add(PasswordLabel, new GridBagConstraints(0, 1, 1, 1,
+ 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.NONE,
+ new Insets(0, 5, 5, 0), 0, 0));
+ UserInfoPanel.add(MailAddrLabel, new GridBagConstraints(0, 0, 1, 1,
+ 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.NONE,
+ new Insets(0, 5, 5, 0), 0, 0));
+ PathSettingPanel.add(FFmpegPathField, new GridBagConstraints(0, 1, 1,
+ 1, 1.0, 0.0, GridBagConstraints.CENTER,
+ GridBagConstraints.BOTH, new Insets(0, 5, 0, 5), 0, 0));
+ PathSettingPanel.add(SettingFFmpegPathButton, gridBagConstraints74);
+ PathSettingPanel.add(FFmpegPathLabel, new GridBagConstraints(0, 0, 2,
+ 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE,
+ new Insets(0, 5, 5, 5), 0, 0));
+ PathSettingPanel.add(VhookPathField, new GridBagConstraints(0, 3, 1, 1,
+ 1.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH,
+ new Insets(0, 5, 5, 5), 0, 0));
+ PathSettingPanel.add(SettingVhookPathButton, new GridBagConstraints(1,
+ 3, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER,
+ GridBagConstraints.BOTH, new Insets(0, 0, 5, 5), 0, 0));
+ PathSettingPanel.add(VhookPathLabel, gridBagConstraints54);
+ FFmpegSettingPanel.add(CommandLineOutOptionField, gridBagConstraints53);
+ FFmpegSettingPanel.add(CommandLineInOptionField, gridBagConstraints52);
+ FFmpegSettingPanel.add(MainOptionField, gridBagConstraints51);
+ FFmpegSettingPanel.add(MainOptionLabel, gridBagConstraints48);
+ FFmpegSettingPanel.add(InLabel, gridBagConstraints49);
+ FFmpegSettingPanel.add(OutLabel, gridBagConstraints50);
+ FFmpegSettingPanel.add(getFFmpegOptionComboBoxPanel(),
+ gridBagConstraints55);
+ FFmpegSettingPanel.add(ExtOptionLabel, gridBagConstraints56);
+ FFmpegSettingPanel.add(getExtOptionField(), gridBagConstraints57);
+ VideoInfoPanel.add(DoButton, gridBagConstraints71);
+ VideoInfoPanel.add(OpPanel, new GridBagConstraints(0, 0, 1, 1, 1.0,
+ 0.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH,
+ new Insets(0, 0, 0, 0), 0, 0));
+ OpPanel.add(VideoID_Label, gridBagConstraints67);
+ OpPanel.add(VideoID_TextField, gridBagConstraints68);
+ OpPanel.add(WayBackLabel, gridBagConstraints69);
+ OpPanel.add(WayBackField, gridBagConstraints70);
+
+ MainTabbedPane.add(BasicInfoTabPanel, "\8aî\96{\90Ý\92è");
+ MainTabbedPane.add(SavingInfoTabPanel, "\95Û\91¶\90Ý\92è");
+ MainTabbedPane.add(FFMpegTabPanel, "\93®\89æ\90Ý\92è");
+ MainTabbedPane.addTab("\95Ï\8a·\90Ý\92è", null, getConvertingSettingPanel(), null);
+ SavingInfoTabPanel.add(savePanel);
+ BasicInfoTabPanel.add(UserInfoPanel, gridBagConstraints7);
+ BasicInfoTabPanel.add(getProxyInfoPanel(), gridBagConstraints6);
+ VhookSettingPanel.add(FontPathLabel, gridBagConstraints59);
+ VhookSettingPanel.add(ShowConvVideoCheckBox, gridBagConstraints63);
+ VhookSettingPanel.add(FontPathField, gridBagConstraints60);
+ VhookSettingPanel.add(FontIndexField, gridBagConstraints62);
+ VhookSettingPanel.add(FontIndexLabel, gridBagConstraints61);
+ VhookSettingPanel.add(SettingFontPathButton, gridBagConstraints64);
+ VhookSettingPanel.add(getFixFontSizeCheckBox(), gridBagConstraints14);
+ VhookSettingPanel.add(getOpaqueCommentCheckBox(), gridBagConstraints33);
+ VhookSettingPanel.add(getNotUseVhookCheckBox(), gridBagConstraints58);
+ VhookSettingPanel.add(getViewCommentField(), gridBagConstraints65);
+ VhookSettingPanel.add(ViewCommentLabel, gridBagConstraints66);
+ VhookSettingPanel.add(ShadowKindLabel, gridBagConstraints72);
+ VhookSettingPanel.add(getShadowComboBox(), gridBagConstraints73);
+
+ FFMpegTabPanel.add(PathSettingPanel, new GridBagConstraints(0, 0, 1, 1,
+ 1.0, 0.0, GridBagConstraints.NORTHEAST,
+ GridBagConstraints.HORIZONTAL, new Insets(0, 5, 0, 5), 0, 0));
+ FFMpegTabPanel.add(FFmpegSettingPanel, gridBagConstraints1);
+ }
- JTextField CommentSavedFileField = new JTextField();
+ /**
+ * \95Û\91¶\90Ý\92è\83p\83l\83\8b\93à\82Ì\83{\83^\83\93\82É\83A\83N\83V\83\87\83\93\83\8a\83X\83i\82ð\8a\84\82è\93\96\82Ä\82é.
+ */
+ private void setListenerToSavePanelButton() {
+ ActionListener al;
+ al = new InputVideoPanelButtonListener();
+ videoSaveInfoPanel.getShowSavingVideoFolderDialogButton().addActionListener(al);
+ videoSaveInfoPanel.getShowSavingVideoFileDialogButton().addActionListener(al);
+ videoSaveInfoPanel.getNibrFileChooserButton().addActionListener(al);
+
+ al = new VideoUseRadioButtonListener();
+ videoSaveInfoPanel.getVideoNoSaveButton().addActionListener(al);
+ videoSaveInfoPanel.getVideoSaveButton().addActionListener(al);
+ videoSaveInfoPanel.getVideoUseNiBrButton().addActionListener(al);
+
+ al = new InputCommentPanelButtonListener();
+ savePanel.getShowSavingCommentFolderDialogButton().addActionListener(al);
+ savePanel.getShowSavingCommentFileDialogButton().addActionListener(al);
+
+ al = new OutputVideoPanelButtonListener();
+ savePanel.getShowSavingConvertedVideoFolderDialogButton().addActionListener(al);
+ savePanel.getShowSavingConvertedVideoFileDialogButton().addActionListener(al);
+ }
- JButton ShowSavingCommentFileDialogButton = new JButton();
-
- JPanel ConvertedVideoSavingInfoPanel = new JPanel();
-
- GridBagLayout gridBagLayout5 = new GridBagLayout();
-
- JCheckBox SavingConvertedVideoCheckBox = new JCheckBox();
-
- JTextField ConvertedVideoSavedFileField = new JTextField();
-
- JButton ShowSavingConvertedVideoFileDialogButton = new JButton();
-
- GridBagLayout gridBagLayout6 = new GridBagLayout();
-
- ButtonGroup CommentSaveButtonGroup = new ButtonGroup();
-
- ButtonGroup ConvSaveButtonGroup = new ButtonGroup();
-
- public MainFrame() {
- try {
- setDefaultCloseOperation(EXIT_ON_CLOSE);
- jbInit();
- setPopup();
- setDropTarget();
- ConvertingSetting setting = ConvertingSetting.loadSetting(null,
- null);
- this.setSetting(setting);
- } catch (Exception exception) {
- exception.printStackTrace();
- }
- }
-
- /**
- * \83R\83\93\83|\81[\83l\83\93\83g\82Ì\8f\89\8aú\89»\81B
- *
- * @throws java.lang.Exception
- */
- private void jbInit() throws Exception {
- GridBagConstraints gridBagConstraints74 = new GridBagConstraints(1, 1, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 0, 5), 0, 0);
- gridBagConstraints74.gridwidth = 2;
- GridBagConstraints gridBagConstraints73 = new GridBagConstraints();
- gridBagConstraints73.fill = GridBagConstraints.HORIZONTAL;
- gridBagConstraints73.gridy = 6;
- gridBagConstraints73.weightx = 1.0;
- gridBagConstraints73.gridwidth = 4;
- gridBagConstraints73.insets = new Insets(0, 0, 0, 5);
- gridBagConstraints73.gridx = 1;
- GridBagConstraints gridBagConstraints72 = new GridBagConstraints();
- gridBagConstraints72.gridx = 0;
- gridBagConstraints72.anchor = GridBagConstraints.WEST;
- gridBagConstraints72.insets = new Insets(0, 5, 0, 5);
- gridBagConstraints72.fill = GridBagConstraints.NONE;
- gridBagConstraints72.gridwidth = 1;
- gridBagConstraints72.gridy = 6;
- ShadowKindLabel = new JLabel();
- ShadowKindLabel.setText("\89e\82Ì\8eí\97Þ");
- ShadowKindLabel.setDisplayedMnemonic(KeyEvent.VK_UNDEFINED);
- GridBagConstraints gridBagConstraints71 = new GridBagConstraints(1, 0, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 6);
- gridBagConstraints71.fill = GridBagConstraints.BOTH;
- gridBagConstraints71.ipady = 0;
- GridBagConstraints gridBagConstraints70 = new GridBagConstraints();
- gridBagConstraints70.fill = GridBagConstraints.HORIZONTAL;
- gridBagConstraints70.gridy = 1;
- gridBagConstraints70.ipadx = 0;
- gridBagConstraints70.ipady = 0;
- gridBagConstraints70.weightx = 1.0;
- gridBagConstraints70.insets = new Insets(0, 0, 0, 0);
- gridBagConstraints70.gridx = 1;
- GridBagConstraints gridBagConstraints69 = new GridBagConstraints();
- gridBagConstraints69.gridx = 0;
- gridBagConstraints69.ipadx = 0;
- gridBagConstraints69.ipady = 0;
- gridBagConstraints69.insets = new Insets(0, 5, 0, 5);
- gridBagConstraints69.anchor = GridBagConstraints.WEST;
- gridBagConstraints69.gridy = 1;
- GridBagConstraints gridBagConstraints68 = new GridBagConstraints();
- gridBagConstraints68.fill = GridBagConstraints.BOTH;
- gridBagConstraints68.gridy = 0;
- gridBagConstraints68.ipady = 0;
- gridBagConstraints68.weightx = 1.0;
- gridBagConstraints68.insets = new Insets(0, 0, 0, 0);
- gridBagConstraints68.gridx = 1;
- GridBagConstraints gridBagConstraints67 = new GridBagConstraints();
- gridBagConstraints67.gridx = 0;
- gridBagConstraints67.ipadx = 0;
- gridBagConstraints67.ipady = 0;
- gridBagConstraints67.insets = new Insets(0, 5, 0, 5);
- gridBagConstraints67.anchor = GridBagConstraints.WEST;
- gridBagConstraints67.gridy = 0;
- GridBagConstraints gridBagConstraints66 = new GridBagConstraints();
- gridBagConstraints66.gridx = 0;
- gridBagConstraints66.insets = new Insets(0, 5, 5, 5);
- gridBagConstraints66.anchor = GridBagConstraints.WEST;
- gridBagConstraints66.gridwidth = 2;
- gridBagConstraints66.gridy = 1;
- ViewCommentLabel = new JLabel();
- ViewCommentLabel.setText("\95\\8e¦\83R\83\81\83\93\83g\90\94");
- GridBagConstraints gridBagConstraints65 = new GridBagConstraints();
- gridBagConstraints65.fill = GridBagConstraints.HORIZONTAL;
- gridBagConstraints65.gridy = 1;
- gridBagConstraints65.weightx = 1.0;
- gridBagConstraints65.gridwidth = 6;
- gridBagConstraints65.insets = new Insets(0, 5, 5, 5);
- gridBagConstraints65.gridx = 3;
- GridBagConstraints gridBagConstraints64 = new GridBagConstraints(1, 1,
- 1, 1, 0.0, 0.0, GridBagConstraints.CENTER,
- GridBagConstraints.BOTH, new Insets(0, 0, 0, 5), 0, 0);
- gridBagConstraints64.gridy = 3;
- gridBagConstraints64.fill = GridBagConstraints.HORIZONTAL;
- gridBagConstraints64.gridx = 4;
- GridBagConstraints gridBagConstraints63 = new GridBagConstraints(0, 4,
- 2, 1, 1.0, 0.0, GridBagConstraints.CENTER,
- GridBagConstraints.HORIZONTAL, new Insets(0, 5, 0, 5), 0, 0);
- gridBagConstraints63.gridy = 7;
- gridBagConstraints63.gridx = 0;
- gridBagConstraints63.gridwidth = 5;
- GridBagConstraints gridBagConstraints62 = new GridBagConstraints(0, 3,
- 2, 1, 1.0, 0.0, GridBagConstraints.CENTER,
- GridBagConstraints.BOTH, new Insets(0, 5, 5, 5), 0, 0);
- gridBagConstraints62.gridy = 5;
- gridBagConstraints62.gridx = 1;
- gridBagConstraints62.fill = GridBagConstraints.HORIZONTAL;
- gridBagConstraints62.insets = new Insets(0, 0, 5, 5);
- gridBagConstraints62.gridwidth = 4;
- GridBagConstraints gridBagConstraints61 = new GridBagConstraints(0, 2,
- 1, 1, 0.0, 0.0, GridBagConstraints.CENTER,
- GridBagConstraints.BOTH, new Insets(5, 5, 5, 5), 0, 0);
- gridBagConstraints61.gridy = 5;
- gridBagConstraints61.gridx = 0;
- gridBagConstraints61.fill = GridBagConstraints.VERTICAL;
- gridBagConstraints61.anchor = GridBagConstraints.WEST;
- gridBagConstraints61.gridwidth = 1;
- GridBagConstraints gridBagConstraints60 = new GridBagConstraints(0, 1,
- 1, 1, 1.0, 0.0, GridBagConstraints.CENTER,
- GridBagConstraints.BOTH, new Insets(0, 5, 0, 5), 0, 0);
- gridBagConstraints60.gridy = 3;
- gridBagConstraints60.gridx = 1;
- gridBagConstraints60.fill = GridBagConstraints.HORIZONTAL;
- gridBagConstraints60.insets = new Insets(0, 0, 0, 5);
- gridBagConstraints60.gridwidth = 3;
- GridBagConstraints gridBagConstraints59 = new GridBagConstraints(0, 0,
- 2, 1, 1.0, 0.0, GridBagConstraints.CENTER,
- GridBagConstraints.HORIZONTAL, new Insets(0, 5, 5, 5), 0, 0);
- gridBagConstraints59.gridy = 3;
- gridBagConstraints59.insets = new Insets(5, 5, 5, 5);
- gridBagConstraints59.gridx = 0;
- gridBagConstraints59.fill = GridBagConstraints.NONE;
- gridBagConstraints59.anchor = GridBagConstraints.WEST;
- gridBagConstraints59.weightx = 0.0;
- gridBagConstraints59.gridwidth = 1;
- GridBagConstraints gridBagConstraints58 = new GridBagConstraints();
- gridBagConstraints58.gridx = 0;
- gridBagConstraints58.anchor = GridBagConstraints.WEST;
- gridBagConstraints58.insets = new Insets(0, 5, 5, 5);
- gridBagConstraints58.gridwidth = 5;
- gridBagConstraints58.weightx = 1.0;
- gridBagConstraints58.fill = GridBagConstraints.HORIZONTAL;
- gridBagConstraints58.gridy = 0;
- GridBagConstraints gridBagConstraints57 = new GridBagConstraints();
- gridBagConstraints57.fill = GridBagConstraints.BOTH;
- gridBagConstraints57.gridy = 2;
- gridBagConstraints57.weightx = 1.0;
- gridBagConstraints57.insets = new Insets(0, 0, 5, 5);
- gridBagConstraints57.gridx = 1;
- GridBagConstraints gridBagConstraints56 = new GridBagConstraints();
- gridBagConstraints56.gridx = 0;
- gridBagConstraints56.insets = new Insets(0, 5, 5, 5);
- gridBagConstraints56.anchor = GridBagConstraints.WEST;
- gridBagConstraints56.gridy = 2;
- ExtOptionLabel = new JLabel();
- ExtOptionLabel.setText("\8fo\97Í\93®\89æ\82Ì\8ag\92£\8eq");
- GridBagConstraints gridBagConstraints55 = new GridBagConstraints();
- gridBagConstraints55.gridx = 0;
- gridBagConstraints55.fill = GridBagConstraints.HORIZONTAL;
- gridBagConstraints55.weightx = 1.0;
- gridBagConstraints55.gridwidth = 2;
- gridBagConstraints55.gridy = 1;
- GridBagConstraints gridBagConstraints54 = new GridBagConstraints(0, 2,
- 2, 1, 1.0, 0.0, GridBagConstraints.CENTER,
- GridBagConstraints.BOTH, new Insets(5, 5, 5, 5), 0, 0);
- gridBagConstraints54.gridwidth = 3;
- GridBagConstraints gridBagConstraints53 = new GridBagConstraints(1, 3,
- 2, 1, 1.0, 0.0, GridBagConstraints.CENTER,
- GridBagConstraints.BOTH, new Insets(0, 0, 5, 5), 0, 0);
- gridBagConstraints53.gridy = 5;
- gridBagConstraints53.gridheight = 1;
- gridBagConstraints53.weightx = 1.0;
- gridBagConstraints53.gridwidth = 1;
- GridBagConstraints gridBagConstraints52 = new GridBagConstraints(2, 2,
- 1, 1, 1.0, 0.0, GridBagConstraints.CENTER,
- GridBagConstraints.BOTH, new Insets(0, 0, 5, 5), 0, 0);
- gridBagConstraints52.gridy = 4;
- gridBagConstraints52.gridwidth = 1;
- gridBagConstraints52.weightx = 1.0;
- gridBagConstraints52.gridx = 1;
- GridBagConstraints gridBagConstraints51 = new GridBagConstraints(2, 1,
- 1, 1, 1.0, 0.0, GridBagConstraints.CENTER,
- GridBagConstraints.BOTH, new Insets(0, 0, 5, 5), 0, 0);
- gridBagConstraints51.gridy = 3;
- gridBagConstraints51.gridwidth = 1;
- gridBagConstraints51.weightx = 1.0;
- gridBagConstraints51.gridx = 1;
- GridBagConstraints gridBagConstraints50 = new GridBagConstraints(0, 3,
- 1, 1, 0.0, 0.0, GridBagConstraints.WEST,
- GridBagConstraints.BOTH, new Insets(0, 5, 5, 5), 0, 0);
- gridBagConstraints50.gridy = 5;
- GridBagConstraints gridBagConstraints49 = new GridBagConstraints(0, 2,
- 2, 1, 0.0, 0.0, GridBagConstraints.WEST,
- GridBagConstraints.BOTH, new Insets(0, 5, 5, 5), 0, 0);
- gridBagConstraints49.gridy = 4;
- gridBagConstraints49.gridwidth = 1;
- GridBagConstraints gridBagConstraints48 = new GridBagConstraints(0, 1,
- 1, 1, 0.0, 0.0, GridBagConstraints.WEST,
- GridBagConstraints.BOTH, new Insets(0, 5, 5, 5), 0, 0);
- gridBagConstraints48.gridy = 3;
- GridBagConstraints gridBagConstraints45 = new GridBagConstraints(3, 5,
- 1, 1, 0.0, 0.0, GridBagConstraints.CENTER,
- GridBagConstraints.NONE, new Insets(0, 0, 5, 5), 0, 0);
- gridBagConstraints45.gridy = 7;
- GridBagConstraints gridBagConstraints44 = new GridBagConstraints(3, 3,
- 1, 1, 0.0, 0.0, GridBagConstraints.CENTER,
- GridBagConstraints.NONE, new Insets(0, 0, 0, 5), 0, 0);
- gridBagConstraints44.gridy = 5;
- GridBagConstraints gridBagConstraints43 = new GridBagConstraints(0, 5,
- 3, 1, 1.0, 0.0, GridBagConstraints.CENTER,
- GridBagConstraints.BOTH, new Insets(3, 50, 5, 5), 0, 0);
- gridBagConstraints43.gridy = 7;
- GridBagConstraints gridBagConstraints42 = new GridBagConstraints(0, 4,
- 4, 1, 1.0, 0.0, GridBagConstraints.WEST,
- GridBagConstraints.NONE, new Insets(0, 25, 0, 5), 0, 0);
- gridBagConstraints42.gridy = 6;
- GridBagConstraints gridBagConstraints41 = new GridBagConstraints(0, 3,
- 3, 1, 0.0, 0.0, GridBagConstraints.CENTER,
- GridBagConstraints.BOTH, new Insets(0, 50, 0, 5), 0, 0);
- gridBagConstraints41.gridy = 5;
- GridBagConstraints gridBagConstraints40 = new GridBagConstraints(0, 2,
- 4, 1, 1.0, 0.0, GridBagConstraints.WEST,
- GridBagConstraints.NONE, new Insets(0, 25, 0, 5), 0, 0);
- gridBagConstraints40.gridy = 3;
- GridBagConstraints gridBagConstraints39 = new GridBagConstraints();
- gridBagConstraints39.gridx = 0;
- gridBagConstraints39.insets = new Insets(0, 50, 0, 0);
- gridBagConstraints39.fill = GridBagConstraints.HORIZONTAL;
- gridBagConstraints39.weightx = 1.0;
- gridBagConstraints39.gridwidth = 4;
- gridBagConstraints39.gridy = 4;
- GridBagConstraints gridBagConstraints35 = new GridBagConstraints();
- gridBagConstraints35.fill = GridBagConstraints.BOTH;
- gridBagConstraints35.weighty = 1.0;
- gridBagConstraints35.weightx = 1.0;
- GridBagConstraints gridBagConstraints33 = new GridBagConstraints();
- gridBagConstraints33.gridx = 0;
- gridBagConstraints33.fill = GridBagConstraints.HORIZONTAL;
- gridBagConstraints33.weightx = 1.0;
- gridBagConstraints33.insets = new Insets(0, 5, 5, 5);
- gridBagConstraints33.gridwidth = 5;
- gridBagConstraints33.gridy = 9;
- GridBagConstraints gridBagConstraints26 = new GridBagConstraints();
- gridBagConstraints26.gridx = 0;
- gridBagConstraints26.gridwidth = 4;
- gridBagConstraints26.insets = new Insets(0, 25, 0, 5);
- gridBagConstraints26.weightx = 1.0;
- gridBagConstraints26.fill = GridBagConstraints.HORIZONTAL;
- gridBagConstraints26.gridy = 9;
- GridBagConstraints gridBagConstraints25 = new GridBagConstraints();
- gridBagConstraints25.gridx = 0;
- gridBagConstraints25.gridwidth = 4;
- gridBagConstraints25.fill = GridBagConstraints.HORIZONTAL;
- gridBagConstraints25.insets = new Insets(0, 25, 0, 5);
- gridBagConstraints25.weightx = 1.0;
- gridBagConstraints25.gridy = 8;
- GridBagConstraints gridBagConstraints24 = new GridBagConstraints(3, 10,
- 1, 1, 0.0, 0.0, GridBagConstraints.CENTER,
- GridBagConstraints.NONE, new Insets(0, 0, 5, 5), 0, 0);
- gridBagConstraints24.gridy = 14;
- GridBagConstraints gridBagConstraints23 = new GridBagConstraints(3, 8,
- 1, 1, 0.0, 0.0, GridBagConstraints.CENTER,
- GridBagConstraints.NONE, new Insets(0, 0, 0, 5), 0, 0);
- gridBagConstraints23.gridy = 12;
- GridBagConstraints gridBagConstraints22 = new GridBagConstraints(1, 6,
- 4, 1, 1.0, 0.0, GridBagConstraints.CENTER,
- GridBagConstraints.BOTH, new Insets(0, 0, 0, 5), 0, 0);
- gridBagConstraints22.gridy = 10;
- GridBagConstraints gridBagConstraints21 = new GridBagConstraints(0, 10,
- 3, 1, 1.0, 0.0, GridBagConstraints.CENTER,
- GridBagConstraints.BOTH, new Insets(0, 50, 5, 5), 0, 0);
- gridBagConstraints21.gridy = 14;
- GridBagConstraints gridBagConstraints20 = new GridBagConstraints(0, 9,
- 4, 1, 1.0, 0.0, GridBagConstraints.WEST,
- GridBagConstraints.HORIZONTAL, new Insets(0, 25, 0, 5), 0, 0);
- gridBagConstraints20.gridy = 13;
- GridBagConstraints gridBagConstraints19 = new GridBagConstraints(0, 8,
- 3, 1, 1.0, 0.0, GridBagConstraints.CENTER,
- GridBagConstraints.BOTH, new Insets(0, 50, 0, 5), 0, 0);
- gridBagConstraints19.gridy = 12;
- GridBagConstraints gridBagConstraints18 = new GridBagConstraints(0, 7,
- 4, 1, 1.0, 0.0, GridBagConstraints.CENTER,
- GridBagConstraints.HORIZONTAL, new Insets(0, 25, 0, 5), 0, 0);
- gridBagConstraints18.gridy = 11;
- GridBagConstraints gridBagConstraints17 = new GridBagConstraints(0, 6,
- 1, 1, 0.0, 0.0, GridBagConstraints.CENTER,
- GridBagConstraints.BOTH, new Insets(0, 5, 0, 5), 0, 0);
- gridBagConstraints17.gridy = 10;
- gridBagConstraints17.insets = new Insets(0, 50, 0, 5);
- GridBagConstraints gridBagConstraints16 = new GridBagConstraints(0, 5,
- 4, 1, 1.0, 0.0, GridBagConstraints.WEST,
- GridBagConstraints.BOTH, new Insets(5, 5, 5, 5), 0, 0);
- gridBagConstraints16.gridy = 7;
- GridBagConstraints gridBagConstraints14 = new GridBagConstraints();
- gridBagConstraints14.gridx = 0;
- gridBagConstraints14.anchor = GridBagConstraints.WEST;
- gridBagConstraints14.fill = GridBagConstraints.HORIZONTAL;
- gridBagConstraints14.weightx = 1.0;
- gridBagConstraints14.gridwidth = 5;
- gridBagConstraints14.insets = new Insets(0, 5, 0, 5);
- gridBagConstraints14.gridy = 8;
- GridBagConstraints gridBagConstraints7 = new GridBagConstraints(0, 0,
- 1, 1, 1.0, 1.0, GridBagConstraints.NORTH,
- GridBagConstraints.HORIZONTAL, new Insets(0, 5, 0, 5), 0, 0);
- gridBagConstraints7.weighty = 0.0;
- GridBagConstraints gridBagConstraints6 = new GridBagConstraints();
- gridBagConstraints6.gridx = 0;
- gridBagConstraints6.weighty = 1.0;
- gridBagConstraints6.weightx = 1.0;
- gridBagConstraints6.insets = new Insets(0, 5, 0, 5);
- gridBagConstraints6.fill = GridBagConstraints.HORIZONTAL;
- gridBagConstraints6.anchor = GridBagConstraints.NORTH;
- gridBagConstraints6.gridy = 1;
- GridBagConstraints gridBagConstraints1 = new GridBagConstraints(0, 1,
- 1, 1, 1.0, 0.0, GridBagConstraints.CENTER,
- GridBagConstraints.HORIZONTAL, new Insets(0, 5, 0, 5), 0, 0);
- gridBagConstraints1.fill = GridBagConstraints.HORIZONTAL;
- gridBagConstraints1.anchor = GridBagConstraints.NORTH;
- gridBagConstraints1.weighty = 1.0;
- this.setIconImage(WinIcon);
- contentPane = (JPanel) this.getContentPane();
- contentPane.setLayout(borderLayout1);
- setSize(new Dimension(400, 630));
- setTitle("\82³\82«\82ã\82Î\82· " + VERSION);
- this.addWindowListener(new MainFrame_this_windowAdapter(this));
- statusBar.setText(" ");
- jMenuFile.setText("\83t\83@\83C\83\8b");
- jMenuFileExit.setText("\8fI\97¹");
- jMenuFileExit
- .addActionListener(new MainFrame_jMenuFileExit_ActionAdapter(
- this));
- jMenuHelp.setText("\83w\83\8b\83v");
- jMenuHelpAbout.setText("\83o\81[\83W\83\87\83\93\8fî\95ñ");
- jMenuHelpAbout
- .addActionListener(new MainFrame_jMenuHelpAbout_ActionAdapter(
- this));
- VideoInfoPanel.setLayout(gridBagLayout1);
- VideoID_TextField.setText("http://www.nicovideo.jp/watch/");
- DoButton.setText(DoButtonDefString);
- DoButton.addActionListener(new MainFrame_DoButton_actionAdapter(this));
- SavingInfoTabPanel.setLayout(gridBagLayout2);
- UserInfoPanel.setBorder(BorderFactory.createTitledBorder(BorderFactory
- .createEtchedBorder(), "\83\86\81[\83U\90Ý\92è"));
- UserInfoPanel.setLayout(gridBagLayout3);
- MailAddrLabel.setText("\83\81\81[\83\8b\83A\83h\83\8c\83X");
- PasswordLabel.setText("\83p\83X\83\8f\81[\83h");
- CommentSaveInfoPanel.setBorder(BorderFactory.createTitledBorder(
- BorderFactory.createEtchedBorder(EtchedBorder.LOWERED),
- "\83R\83\81\83\93\83g\95Û\91¶\90Ý\92è", TitledBorder.LEADING, TitledBorder.TOP, new Font(
- "MS UI Gothic", Font.PLAIN, 12), Color.black));
- CommentSaveInfoPanel.setLayout(gridBagLayout4);
-
- final ActionListener videoSavePanelButtonListener = new VideoSavePanelButtonListener();
- videoSaveInfoPanel.getShowSavingVideoFolderDialogButton().addActionListener(videoSavePanelButtonListener);
- videoSaveInfoPanel.getShowSavingVideoFileDialogButton().addActionListener(videoSavePanelButtonListener);
- videoSaveInfoPanel.getNibrFileChooserButton().addActionListener(videoSavePanelButtonListener);
-
- final ActionListener videoUseRadioButtonListener = new VideoUseRadioButtonListener();
- videoSaveInfoPanel.getVideoNoSaveButton().addActionListener(videoUseRadioButtonListener);
- videoSaveInfoPanel.getVideoSaveButton().addActionListener(videoUseRadioButtonListener);
- videoSaveInfoPanel.getVideoUseNiBrButton().addActionListener(videoUseRadioButtonListener);
-
- SavingCommentCheckBox.setText("\83R\83\81\83\93\83g\82ð\83_\83E\83\93\83\8d\81[\83h\82·\82é");
- ShowSavingCommentFileDialogButton.setText("\8eQ\8fÆ");
- ShowSavingCommentFileDialogButton
- .addActionListener(new MainFrame_ShowSavingCommentDialogButton_actionAdapter(
- this));
- ConvertedVideoSavingInfoPanel.setBorder(BorderFactory
- .createTitledBorder(BorderFactory.createEtchedBorder(),
- "\83R\83\81\83\93\83g\95t\82«\93®\89æ\95Û\91¶\90Ý\92è"));
- ConvertedVideoSavingInfoPanel.setLayout(gridBagLayout5);
- SavingConvertedVideoCheckBox.setText("\83R\83\81\83\93\83g\95t\82«\93®\89æ\82É\95Ï\8a·\82·\82é");
- ShowSavingConvertedVideoFileDialogButton.setText("\8eQ\8fÆ");
- ShowSavingConvertedVideoFileDialogButton
- .addActionListener(new MainFrame_ShowSavingConvertedVideoDialogButton_actionAdapter(
- this));
- FFMpegTabPanel.setLayout(gridBagLayout6);
- PathSettingPanel.setBorder(BorderFactory.createTitledBorder(
- BorderFactory.createEtchedBorder(), "\83v\83\8d\83O\83\89\83\80\82Ì\88Ê\92u\82Ì\90Ý\92è"));
- PathSettingPanel.setLayout(gridBagLayout7);
- FFmpegPathLabel.setText("FFmpeg");
- SettingFFmpegPathButton.setText("\8eQ\8fÆ");
- SettingFFmpegPathButton
- .addActionListener(new MainFrame_SettingFFmpegPathButton_actionAdapter(
- this));
- VhookPathLabel.setText("\8ag\92£vhook\83\89\83C\83u\83\89\83\8a");
- SettingVhookPathButton.setText("\8eQ\8fÆ");
- SettingVhookPathButton
- .addActionListener(new MainFrame_SettingVhookPathButton_actionAdapter(
- this));
- VhookSettingPanel.setLayout(gridBagLayout8);
- VhookSettingPanel.setBorder(BorderFactory.createTitledBorder(
- BorderFactory.createEtchedBorder(), "\8ag\92£vhook\83\89\83C\83u\83\89\83\8a\82Ì\90Ý\92è"));
- FFmpegSettingPanel.setBorder(BorderFactory.createTitledBorder(
- BorderFactory.createEtchedBorder(), "FFmpeg\82Ì\90Ý\92è"));
- FFmpegSettingPanel.setLayout(gridBagLayout9);
- FontPathLabel.setText("\83t\83H\83\93\83g\83p\83X");
- SettingFontPathButton.setText("\8eQ\8fÆ");
- SettingFontPathButton
- .addActionListener(new MainFrame_SettingFontPathButton_actionAdapter(
- this));
- ShowConvVideoCheckBox.setText("\95Ï\8a·\92\86\82Ì\89æ\91\9c\82ð\95\\8e¦\82·\82é");
- InLabel.setText("\93ü\97Í\83I\83v\83V\83\87\83\93");
- OutLabel.setText("\8fo\97Í\83I\83v\83V\83\87\83\93");
- CommentNumLabel.setText("\8eæ\93¾\83R\83\81\83\93\83g\90\94");
- MainOptionLabel.setText("\83\81\83C\83\93\83I\83v\83V\83\87\83\93");
- FontIndexLabel.setText("\83t\83H\83\93\83g\94Ô\8d\86");
- VideoID_Label.setText("URL/ID");
- WayBackLabel.setText("\89ß\8b\8e\83\8d\83O");
- OpPanel.setLayout(new GridBagLayout());
- Conv_SaveFileRadioButton.setText("\95Û\91¶\82·\82é\83t\83@\83C\83\8b\96¼\82ð\8ew\92è\82·\82é");
- Conv_SaveFolderRadioButton.setText("\95Û\91¶\82·\82é\83t\83H\83\8b\83_\82ð\8ew\92è\82µ\81A\83t\83@\83C\83\8b\96¼\82Í\8e©\93®\82Å\8c\88\92è\82·\82é");
- ShowSavingConvertedVideoFolderDialogButton.setText("\8eQ\8fÆ");
- ShowSavingConvertedVideoFolderDialogButton
- .addActionListener(new MainFrame_ShowSavingConvertedVideoFolderDialogButton_actionAdapter(
- this));
- Comment_SaveFileRadioButton.setText("\95Û\91¶\82·\82é\83t\83@\83C\83\8b\96¼\82ð\8ew\92è\82·\82é");
- ShowSavingCommentFolderDialogButton.setText("\8eQ\8fÆ");
- ShowSavingCommentFolderDialogButton
- .addActionListener(new MainFrame_ShowSavingCommentFolderDialogButton_actionAdapter(
- this));
- Comment_SaveFolderRadioButton.setText("\95Û\91¶\82·\82é\83t\83H\83\8b\83_\82ð\8ew\92è\82µ\81A\83t\83@\83C\83\8b\96¼\82Í\8e©\93®\82Å\8c\88\92è\82·\82é");
- BasicInfoTabPanel.setLayout(gridBagLayout12);
- jMenuBar1.add(jMenuFile);
- jMenuFile.add(jMenuFileExit);
- jMenuBar1.add(jMenuHelp);
- jMenuHelp.add(jMenuHelpAbout);
- setJMenuBar(jMenuBar1);
-
- CommentSaveButtonGroup.add(Comment_SaveFileRadioButton);
- CommentSaveButtonGroup.add(Comment_SaveFolderRadioButton);
-
- ConvSaveButtonGroup.add(Conv_SaveFileRadioButton);
- ConvSaveButtonGroup.add(Conv_SaveFolderRadioButton);
-
- contentPane.add(statusBar, BorderLayout.SOUTH);
- contentPane.add(MainTabbedPane, java.awt.BorderLayout.CENTER);
- contentPane.add(VideoInfoPanel, java.awt.BorderLayout.NORTH);
- UserInfoPanel.add(PasswordField, new GridBagConstraints(1, 1, 1, 1,
- 1.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH,
- new Insets(0, 5, 5, 5), 0, 0));
- UserInfoPanel.add(MailAddrField, new GridBagConstraints(1, 0, 1, 1,
- 1.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH,
- new Insets(0, 5, 5, 5), 0, 0));
- UserInfoPanel.add(PasswordLabel, new GridBagConstraints(0, 1, 1, 1,
- 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.NONE,
- new Insets(0, 5, 5, 0), 0, 0));
- UserInfoPanel.add(MailAddrLabel, new GridBagConstraints(0, 0, 1, 1,
- 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.NONE,
- new Insets(0, 5, 5, 0), 0, 0));
- PathSettingPanel.add(FFmpegPathField, new GridBagConstraints(0, 1, 1,
- 1, 1.0, 0.0, GridBagConstraints.CENTER,
- GridBagConstraints.BOTH, new Insets(0, 5, 0, 5), 0, 0));
- PathSettingPanel.add(SettingFFmpegPathButton, gridBagConstraints74);
- PathSettingPanel.add(FFmpegPathLabel, new GridBagConstraints(0, 0, 2,
- 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE,
- new Insets(0, 5, 5, 5), 0, 0));
- PathSettingPanel.add(VhookPathField, new GridBagConstraints(0, 3, 1, 1,
- 1.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH,
- new Insets(0, 5, 5, 5), 0, 0));
- PathSettingPanel.add(SettingVhookPathButton, new GridBagConstraints(1,
- 3, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER,
- GridBagConstraints.BOTH, new Insets(0, 0, 5, 5), 0, 0));
- PathSettingPanel.add(VhookPathLabel, gridBagConstraints54);
- FFmpegSettingPanel.add(CommandLineOutOptionField, gridBagConstraints53);
- FFmpegSettingPanel.add(CommandLineInOptionField, gridBagConstraints52);
- FFmpegSettingPanel.add(MainOptionField, gridBagConstraints51);
- FFmpegSettingPanel.add(MainOptionLabel, gridBagConstraints48);
- FFmpegSettingPanel.add(InLabel, gridBagConstraints49);
- FFmpegSettingPanel.add(OutLabel, gridBagConstraints50);
- FFmpegSettingPanel.add(getFFmpegOptionComboBoxPanel(),
- gridBagConstraints55);
- FFmpegSettingPanel.add(ExtOptionLabel, gridBagConstraints56);
- FFmpegSettingPanel.add(getExtOptionField(), gridBagConstraints57);
- VideoInfoPanel.add(DoButton, gridBagConstraints71);
- VideoInfoPanel.add(OpPanel, new GridBagConstraints(0, 0, 1, 1, 1.0,
- 0.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH,
- new Insets(0, 0, 0, 0), 0, 0));
- OpPanel.add(VideoID_Label, gridBagConstraints67);
- OpPanel.add(VideoID_TextField, gridBagConstraints68);
- OpPanel.add(WayBackLabel, gridBagConstraints69);
- OpPanel.add(WayBackField, gridBagConstraints70);
- ConvertedVideoSavingInfoPanel.add(SavingConvertedVideoCheckBox,
- new GridBagConstraints(0, 0, 3, 1, 1.0, 0.0,
- GridBagConstraints.CENTER, GridBagConstraints.BOTH,
- new Insets(0, 5, 0, 5), 0, 0));
- MainTabbedPane.add(BasicInfoTabPanel, "\8aî\96{\90Ý\92è");
- MainTabbedPane.add(SavingInfoTabPanel, "\95Û\91¶\90Ý\92è");
- MainTabbedPane.add(FFMpegTabPanel, "\93®\89æ\90Ý\92è");
- MainTabbedPane.addTab("\95Ï\8a·\90Ý\92è", null, getConvertingSettingPanel(), null);
- SavingInfoTabPanel.add(getSaveInfoTabPaneEach(), gridBagConstraints35);
- BasicInfoTabPanel.add(UserInfoPanel, gridBagConstraints7);
- BasicInfoTabPanel.add(getProxyInfoPanel(), gridBagConstraints6);
- VhookSettingPanel.add(FontPathLabel, gridBagConstraints59);
- VhookSettingPanel.add(ShowConvVideoCheckBox, gridBagConstraints63);
- VhookSettingPanel.add(FontPathField, gridBagConstraints60);
- VhookSettingPanel.add(FontIndexField, gridBagConstraints62);
- VhookSettingPanel.add(FontIndexLabel, gridBagConstraints61);
- VhookSettingPanel.add(SettingFontPathButton, gridBagConstraints64);
- VhookSettingPanel.add(getFixFontSizeCheckBox(), gridBagConstraints14);
- VhookSettingPanel.add(getOpaqueCommentCheckBox(), gridBagConstraints33);
- VhookSettingPanel.add(getNotUseVhookCheckBox(), gridBagConstraints58);
- VhookSettingPanel.add(getViewCommentField(), gridBagConstraints65);
- VhookSettingPanel.add(ViewCommentLabel, gridBagConstraints66);
- VhookSettingPanel.add(ShadowKindLabel, gridBagConstraints72);
- VhookSettingPanel.add(getShadowComboBox(), gridBagConstraints73);
- CommentSaveInfoPanel.add(CommentNumLabel, gridBagConstraints17);
- CommentSaveInfoPanel.add(SavingCommentCheckBox, gridBagConstraints16);
- ConvertedVideoSavingInfoPanel.add(Conv_SaveFolderRadioButton,
- gridBagConstraints40);
- CommentSaveInfoPanel.add(CommentNumField, gridBagConstraints22);
- CommentSaveInfoPanel.add(Comment_SaveFolderRadioButton,
- gridBagConstraints18);
- CommentSaveInfoPanel.add(Comment_SaveFileRadioButton,
- gridBagConstraints20);
- CommentSaveInfoPanel.add(CommentSavedFolderField, gridBagConstraints19);
- CommentSaveInfoPanel.add(ShowSavingCommentFolderDialogButton,
- gridBagConstraints23);
- CommentSaveInfoPanel.add(CommentSavedFileField, gridBagConstraints21);
- CommentSaveInfoPanel.add(ShowSavingCommentFileDialogButton,
- gridBagConstraints24);
- CommentSaveInfoPanel.add(getDelCommentCheckBox(), gridBagConstraints25);
- CommentSaveInfoPanel.add(getFixCommentNumCheckBox(),
- gridBagConstraints26);
- ConvertedVideoSavingInfoPanel.add(Conv_SaveFileRadioButton,
- gridBagConstraints42);
- ConvertedVideoSavingInfoPanel.add(ConvertedVideoSavedFolderField,
- gridBagConstraints41);
- ConvertedVideoSavingInfoPanel.add(
- ShowSavingConvertedVideoFolderDialogButton,
- gridBagConstraints44);
- ConvertedVideoSavingInfoPanel.add(ConvertedVideoSavedFileField,
- gridBagConstraints43);
- ConvertedVideoSavingInfoPanel.add(
- ShowSavingConvertedVideoFileDialogButton, gridBagConstraints45);
- ConvertedVideoSavingInfoPanel.add(getNotAddVideoID_ConvVideoCheckBox(),
- gridBagConstraints39);
- FFMpegTabPanel.add(PathSettingPanel, new GridBagConstraints(0, 0, 1, 1,
- 1.0, 0.0, GridBagConstraints.NORTHEAST,
- GridBagConstraints.HORIZONTAL, new Insets(0, 5, 0, 5), 0, 0));
- FFMpegTabPanel.add(FFmpegSettingPanel, gridBagConstraints1);
- }
-
- private void setPopup() {
- MainOptionField.addMouseListener(new PopupRightClick(
- this.MainOptionField));
- CommandLineInOptionField.addMouseListener(new PopupRightClick(
- this.CommandLineInOptionField));
- CommandLineOutOptionField.addMouseListener(new PopupRightClick(
- this.CommandLineOutOptionField));
- CommentNumField.addMouseListener(new PopupRightClick(
- this.CommentNumField));
-
- CommentSavedFileField.addMouseListener(new PopupRightClick(
- this.CommentSavedFileField));
- CommentSavedFolderField.addMouseListener(new PopupRightClick(
- this.CommentSavedFolderField));
-
- ConvertedVideoSavedFileField.addMouseListener(new PopupRightClick(
- this.ConvertedVideoSavedFileField));
- ConvertedVideoSavedFolderField.addMouseListener(new PopupRightClick(
- this.ConvertedVideoSavedFolderField));
+ private void setPopup() {
+ MainOptionField.addMouseListener(new PopupRightClick(
+ this.MainOptionField));
+ CommandLineInOptionField.addMouseListener(new PopupRightClick(
+ this.CommandLineInOptionField));
+ CommandLineOutOptionField.addMouseListener(new PopupRightClick(
+ this.CommandLineOutOptionField));
+ savePanel.getCommentNumField().addMouseListener(new PopupRightClick(
+ savePanel.getCommentNumField()));
+
+ savePanel.getCommentSavedFileField().addMouseListener(new PopupRightClick(
+ savePanel.getCommentSavedFileField()));
+ savePanel.getCommentSavedFolderField().addMouseListener(new PopupRightClick(
+ savePanel.getCommentSavedFolderField()));
+
+ savePanel.getConvertedVideoSavedFileField().addMouseListener(new PopupRightClick(
+ savePanel.getConvertedVideoSavedFileField()));
+ savePanel.getConvertedVideoSavedFolderField().addMouseListener(new PopupRightClick(
+ savePanel.getConvertedVideoSavedFolderField()));
videoSaveInfoPanel.getVideoSavedFileField().addMouseListener(new PopupRightClick(
videoSaveInfoPanel.getVideoSavedFileField()));
videoSaveInfoPanel.getNibrFileField().addMouseListener(
new PopupRightClick(videoSaveInfoPanel.getNibrFileField()));
- FFmpegPathField.addMouseListener(new PopupRightClick(
- this.FFmpegPathField));
- VhookPathField
- .addMouseListener(new PopupRightClick(this.VhookPathField));
- VideoID_TextField.addMouseListener(new PopupRightClick(
- this.VideoID_TextField));
- ViewCommentField.addMouseListener(new PopupRightClick(
- this.ViewCommentField));
- FontPathField.addMouseListener(new PopupRightClick(this.FontPathField));
- MailAddrField.addMouseListener(new PopupRightClick(this.MailAddrField));
- PasswordField.addMouseListener(new PopupRightClick(this.PasswordField));
- WayBackField.addMouseListener(new PopupRightClick(this.WayBackField));
-
- ProxyTextField
- .addMouseListener(new PopupRightClick(this.ProxyTextField));
- ProxyPortTextField.addMouseListener(new PopupRightClick(
- this.ProxyPortTextField));
-
- FontIndexField
- .addMouseListener(new PopupRightClick(this.FontIndexField));
-
- NGWordTextField.addMouseListener(new PopupRightClick(
- this.NGWordTextField));
- NGIDTextField.addMouseListener(new PopupRightClick(this.NGIDTextField));
- }
-
- private void setDropTarget() {
- addTarget(videoSaveInfoPanel.getVideoSavedFileField(), false);
+ FFmpegPathField.addMouseListener(new PopupRightClick(
+ this.FFmpegPathField));
+ VhookPathField.addMouseListener(new PopupRightClick(this.VhookPathField));
+ VideoID_TextField.addMouseListener(new PopupRightClick(
+ this.VideoID_TextField));
+ ViewCommentField.addMouseListener(new PopupRightClick(
+ this.ViewCommentField));
+ FontPathField.addMouseListener(new PopupRightClick(this.FontPathField));
+ MailAddrField.addMouseListener(new PopupRightClick(this.MailAddrField));
+ PasswordField.addMouseListener(new PopupRightClick(this.PasswordField));
+ WayBackField.addMouseListener(new PopupRightClick(this.WayBackField));
+
+ ProxyTextField.addMouseListener(new PopupRightClick(this.ProxyTextField));
+ ProxyPortTextField.addMouseListener(new PopupRightClick(
+ this.ProxyPortTextField));
+
+ FontIndexField.addMouseListener(new PopupRightClick(this.FontIndexField));
+
+ NGWordTextField.addMouseListener(new PopupRightClick(
+ this.NGWordTextField));
+ NGIDTextField.addMouseListener(new PopupRightClick(this.NGIDTextField));
+ }
+
+ private void setDropTarget() {
+ addTarget(videoSaveInfoPanel.getVideoSavedFileField(), false);
addTarget(videoSaveInfoPanel.getVideoSavedFolderField(), true);
addTarget(videoSaveInfoPanel.getNibrFileField(), false);
- addTarget(CommentSavedFileField, false);
- addTarget(CommentSavedFolderField, true);
+ addTarget(savePanel.getCommentSavedFileField(), false);
+ addTarget(savePanel.getCommentSavedFolderField(), true);
- addTarget(ConvertedVideoSavedFileField, false);
- addTarget(ConvertedVideoSavedFolderField, true);
+ addTarget(savePanel.getConvertedVideoSavedFileField(), false);
+ addTarget(savePanel.getConvertedVideoSavedFolderField(), true);
- addTarget(FFmpegPathField, false);
- addTarget(VhookPathField, false);
- addTarget(FontPathField, false);
+ addTarget(FFmpegPathField, false);
+ addTarget(VhookPathField, false);
+ addTarget(FontPathField, false);
- }
+ }
/**
* \83e\83L\83X\83g\83t\83B\81[\83\8b\83h\82É\91Î\82µ\83h\83\8d\83b\83v\82ð\8ds\82Á\82½\8fê\8d\87\82É\83t\83@\83C\83\8b\82à\82µ\82\82Í\83f\83B\83\8c\83N\83g\83\8a\82Ì\95¶\8e\9a\97ñ\82ð\90Ý\92è\82Å\82«\82é\82æ\82¤\82É\82·\82é.
* @param isDir \83f\83B\83\8c\83N\83g\83\8a\82ð\90Ý\92è\82·\82é\8fê\8d\87\82Ítrue, \83t\83@\83C\83\8b\82Ì\8fê\8d\87\82Ífalse.
* @return \83h\83\8d\83b\83v\83^\81[\83Q\83b\83g(\97p\93r\96³\82µ).
*/
- private DropTarget addTarget(JTextField c, boolean isDir) {
- return new DropTarget(c, DnDConstants.ACTION_COPY, new FileDropTarget(
- c, isDir), true);
- }
-
- private File CurrentDir = new File(".");
-
- JPanel PathSettingPanel = new JPanel();
-
- JLabel FFmpegPathLabel = new JLabel();
-
- GridBagLayout gridBagLayout7 = new GridBagLayout();
-
- JTextField FFmpegPathField = new JTextField();
-
- JButton SettingFFmpegPathButton = new JButton();
-
- JLabel VhookPathLabel = new JLabel();
-
- JTextField VhookPathField = new JTextField();
-
- JButton SettingVhookPathButton = new JButton();
-
- JPanel VhookSettingPanel = new JPanel();
-
- GridBagLayout gridBagLayout8 = new GridBagLayout();
-
- JPanel FFmpegSettingPanel = new JPanel();
-
- GridBagLayout gridBagLayout9 = new GridBagLayout();
-
- JLabel FontPathLabel = new JLabel();
-
- JTextField FontPathField = new JTextField();
-
- JButton SettingFontPathButton = new JButton();
-
- JCheckBox ShowConvVideoCheckBox = new JCheckBox();
-
- JTextField CommandLineOutOptionField = new JTextField();
-
- private void showSaveDialog(String title, JTextField field, boolean isSave,
- boolean isDir) {
- JFileChooser chooser = new JFileChooser(CurrentDir);
- chooser.setDialogTitle(title);
- int code = 0;
- if (isDir) {
- chooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
- }
- if (isSave) {
- code = chooser.showSaveDialog(this);
- } else {
- code = chooser.showOpenDialog(this);
- }
- if (code == JFileChooser.APPROVE_OPTION) {
- if (isDir) {
- CurrentDir = chooser.getCurrentDirectory();
- field.setText(CurrentDir.getAbsolutePath());
- } else {
- File selected = chooser.getSelectedFile();
- CurrentDir = chooser.getCurrentDirectory();
- field.setText(selected.getAbsolutePath());
- }
- }
- }
+ private DropTarget addTarget(JTextField c, boolean isDir) {
+ return new DropTarget(c, DnDConstants.ACTION_COPY, new FileDropTarget(
+ c, isDir), true);
+ }
+ private File CurrentDir = new File(".");
+ JPanel PathSettingPanel = new JPanel();
+ JLabel FFmpegPathLabel = new JLabel();
+ GridBagLayout gridBagLayout7 = new GridBagLayout();
+ JTextField FFmpegPathField = new JTextField();
+ JButton SettingFFmpegPathButton = new JButton();
+ JLabel VhookPathLabel = new JLabel();
+ JTextField VhookPathField = new JTextField();
+ JButton SettingVhookPathButton = new JButton();
+ JPanel VhookSettingPanel = new JPanel();
+ GridBagLayout gridBagLayout8 = new GridBagLayout();
+ JPanel FFmpegSettingPanel = new JPanel();
+ GridBagLayout gridBagLayout9 = new GridBagLayout();
+ JLabel FontPathLabel = new JLabel();
+ JTextField FontPathField = new JTextField();
+ JButton SettingFontPathButton = new JButton();
+ JCheckBox ShowConvVideoCheckBox = new JCheckBox();
+ JTextField CommandLineOutOptionField = new JTextField();
+
+ private void showSaveDialog(String title, JTextField field, boolean isSave,
+ boolean isDir) {
+ JFileChooser chooser = new JFileChooser(CurrentDir);
+ chooser.setDialogTitle(title);
+ int code = 0;
+ if (isDir) {
+ chooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
+ }
+ if (isSave) {
+ code = chooser.showSaveDialog(this);
+ } else {
+ code = chooser.showOpenDialog(this);
+ }
+ if (code == JFileChooser.APPROVE_OPTION) {
+ if (isDir) {
+ CurrentDir = chooser.getCurrentDirectory();
+ field.setText(CurrentDir.getAbsolutePath());
+ } else {
+ File selected = chooser.getSelectedFile();
+ CurrentDir = chooser.getCurrentDirectory();
+ field.setText(selected.getAbsolutePath());
+ }
+ }
+ }
- private ConvertingSetting getSetting() {
- int back_comment;
- try {
- back_comment = Integer.parseInt(CommentNumField.getText());
- } catch (NumberFormatException ex) {
- back_comment = 500;
- }
- int proxy_port;
- try {
- proxy_port = Integer.parseInt(ProxyPortTextField.getText());
- } catch (NumberFormatException e) {
- proxy_port = -1;
- }
+ private SProperties getSetting() {
+ SProperties setting = new SProperties(
+ getBasicSetting(),
+ getInputVideoSetting(),
+ getInputCommentSetting(),
+ getTcommentSetting(),
+ getOutputVideoSetting(),
+ getMovieSetting(),
+ getConvertSetting());
+ return setting;
+ }
- VideoSaveKind kind;
- String savedFileName;
- if (videoSaveInfoPanel.getVideoNoSaveButton().isSelected() == true) {
- kind = VideoSaveKind.NO_SAVE;
- savedFileName = videoSaveInfoPanel.getVideoSavedFileField().getText();
- } else if (videoSaveInfoPanel.getVideoUseNiBrButton().isSelected() == true) {
- kind = VideoSaveKind.NICOBROWSER;
- savedFileName = videoSaveInfoPanel.getNibrFileField().getText();
+ /**
+ * \90Ý\92è\82ð\89æ\96Ê\82É\94½\89f\82·\82é.
+ * @param setting \94½\89f\82·\82é\90Ý\92è.
+ */
+ private void setSetting(SProperties setting) {
+ // \8aî\96{\90Ý\92è
+ final BasicSetting basic = setting.getBasicSetting();
+ MailAddrField.setText(basic.getUser().getMail());
+ PasswordField.setText(basic.getUser().getPassword());
+ // \83v\83\8d\83L\83V\8aÖ\98A
+ UseProxyCheckBox.setSelected(basic.isProxyUse());
+ ProxyTextField.setText(basic.getProxyHost());
+ int proxy_port = basic.getProxyPort();
+ if (proxy_port >= 0 && proxy_port <= 65535) {
+ ProxyPortTextField.setText(Integer.toString(proxy_port));
} else {
- kind = VideoSaveKind.SAVE;
- savedFileName = videoSaveInfoPanel.getVideoSavedFileField().getText();
+ ProxyPortTextField.setText("");
}
- ConvertingSetting setting = new ConvertingSetting(MailAddrField
- .getText(), new String(PasswordField.getPassword()),
- kind,
- savedFileName, SavingCommentCheckBox
- .isSelected(), CommentSavedFileField.getText(),
- SavingConvertedVideoCheckBox.isSelected(),
- ConvertedVideoSavedFileField.getText(), ViewCommentField
- .getText(), FFmpegPathField.getText(), VhookPathField
- .getText(), ExtOptionField.getText(), MainOptionField
- .getText(), CommandLineInOptionField.getText(),
- CommandLineOutOptionField.getText(), Integer
- .toString(back_comment), FontPathField.getText(),
- Integer.parseInt(FontIndexField.getText()),
- ShowConvVideoCheckBox.isSelected(), videoSaveInfoPanel.getDelVideoCheckBox()
- .isSelected(),
- videoSaveInfoPanel.getSaveFolderRadioButton().isSelected(),
- videoSaveInfoPanel.getVideoSavedFolderField().getText(),
- DelCommentCheckBox.isSelected(),
- Comment_SaveFolderRadioButton.isSelected(),
- CommentSavedFolderField.getText(),
- NotAddVideoID_ConvVideoCheckBox.isSelected(),
- Conv_SaveFolderRadioButton.isSelected(),
- ConvertedVideoSavedFolderField.getText(), NGWordTextField
- .getText(), NGIDTextField.getText(), UseProxyCheckBox
- .isSelected(), ProxyTextField.getText(), proxy_port,
- FixFontSizeCheckBox.isSelected(), FixCommentNumCheckBox
- .isSelected(), OpaqueCommentCheckBox.isSelected(),
- FFmpegOptionModel.getSelectedFile(), NotUseVhookCheckBox
- .isSelected(),ShadowComboBox.getSelectedIndex());
- return setting;
- }
-
- private void setSetting(ConvertingSetting setting) {
- MailAddrField.setText(setting.getMailAddress());
- PasswordField.setText(setting.getPassword());
-
+ // \95Û\91¶\90Ý\92è - \93ü\97Í\93®\89æ
+ final InputVideoSetting inVideo = setting.getInputVideoSetting();
JRadioButton activeButton;
- switch (setting.getVideoSaveKind()) {
+ switch (inVideo.getProcessKind()) {
case NO_SAVE:
activeButton = videoSaveInfoPanel.getVideoNoSaveButton();
break;
activeButton = videoSaveInfoPanel.getVideoSaveButton();
break;
}
- activeButton.setSelected(true);
- ActionListener[] listeners = activeButton.getActionListeners();
- for (ActionListener l : listeners) {
- l.actionPerformed(new ActionEvent(activeButton, ActionEvent.ACTION_PERFORMED, activeButton.getText()));
- }
-
+ activeButton.doClick();
- videoSaveInfoPanel.getVideoSavedFileField().setText(setting.getVideoFile().getPath());
- SavingCommentCheckBox.setSelected(setting.isSaveComment());
- CommentSavedFileField.setText(setting.getCommentFile().getPath());
- SavingConvertedVideoCheckBox.setSelected(setting.isSaveConverted());
- ConvertedVideoSavedFileField.setText(setting.getConvertedVideoFile()
- .getPath());
- ViewCommentField.setText(setting.getVideoShowNum());
- FFmpegPathField.setText(setting.getFFmpegPath());
- VhookPathField.setText(setting.getVhookPath());
- ExtOptionField.setText(setting.getCmdLineOptionExt());
- MainOptionField.setText(setting.getCmdLineOptionMain());
- CommandLineOutOptionField.setText(setting.getCmdLineOptionOut());
- CommandLineInOptionField.setText(setting.getCmdLineOptionIn());
- CommentNumField.setText(setting.getBackComment());
- FontPathField.setText(setting.getFontPath());
- FontIndexField.setText(setting.getFontIndex());
- ShowConvVideoCheckBox
- .setSelected(setting.isVhook_ShowConvertingVideo());
- videoSaveInfoPanel.getVideoSavedFolderField().setText(setting.getVideoFixFileNameFolder()
- .getPath());
- CommentSavedFolderField.setText(setting.getCommentFixFileNameFolder()
- .getPath());
- ConvertedVideoSavedFolderField.setText(setting
- .getConvFixFileNameFolder().getPath());
- videoSaveInfoPanel.getDelVideoCheckBox().setSelected(setting.isDeleteVideoAfterConverting());
- DelCommentCheckBox
- .setSelected(setting.isDeleteCommentAfterConverting());
- NotAddVideoID_ConvVideoCheckBox.setSelected(setting
- .isNotAddVideoID_Conv());
-
- boolean videoFixName = setting.isVideoFixFileName();
+ videoSaveInfoPanel.getVideoSavedFileField().setText(inVideo.getFile().getPath());
+ videoSaveInfoPanel.getVideoSavedFolderField().setText(inVideo.getFolder().getPath());
+ videoSaveInfoPanel.getDelVideoCheckBox().setSelected(inVideo.isDeleteAfterConvert());
+ final boolean videoFixName = inVideo.isAutoNaming();
videoSaveInfoPanel.getSaveFileRadioButton().setSelected(!videoFixName);
videoSaveInfoPanel.getSaveFolderRadioButton().setSelected(videoFixName);
+ videoSaveInfoPanel.getNibrFileField().setText(inVideo.getNicoBrowserFile().getPath());
+
+ // \95Û\91¶\90Ý\92è - \93ü\97Í\83R\83\81\83\93\83g
+ final InputCommentSetting inputComment = setting.getInputCommentSetting();
+ savePanel.getSavingCommentCheckBox().setSelected(inputComment.getProcessKind());
+ savePanel.getCommentSavedFileField().setText(inputComment.getFile().getPath());
+ savePanel.getDelCommentCheckBox().setSelected(inputComment.isDeleteAfterConvert());
+ savePanel.getCommentSavedFolderField().setText(inputComment.getFolder().getPath());
+ savePanel.getCommentNumField().setText(Integer.toString(inputComment.getNumOfComment()));
+ savePanel.getFixCommentNumCheckBox().setSelected(inputComment.isSelfAdjustNumOfComment());
+ boolean commentFixName = inputComment.isAutoNaming();
+ savePanel.getCommentSaveFileRadioButton().setSelected(!commentFixName);
+ savePanel.getCommentSaveFolderRadioButton().setSelected(commentFixName);
+
+ // \93\8a\8de\8eÒ\83R\83\81\83\93\83g
+ InputTcommentSetting tcom = setting.getInputTcommentSetting();
+ savePanel.setTcommentDownload(tcom.getProcessKind());
+ savePanel.setTcommentDelete(tcom.isDeleteAfterConvert());
+ savePanel.setTcommentAutoFileName(tcom.isAutoNaming());
+ savePanel.setTcommentDirectoryName(tcom.getFolder().getPath());
+ savePanel.setTcommentFileName(tcom.getFile().getPath());
+
+ // \95Û\91¶\90Ý\92è - \8fo\97Í\83R\83\81\83\93\83g\95t\82«\93®\89æ
+ final OutputVideoSetting outputVideo = setting.getOutputVideoSetting();
+ savePanel.getSavingConvertedVideoCheckBox().setSelected(outputVideo.getProcessKind());
+ savePanel.getAddCommentCheckBox().setSelected(outputVideo.isAddComment());
+ savePanel.getAddTcommentCheckBox().setSelected(outputVideo.isAddTcomment());
+ savePanel.getConvertedVideoSavedFileField().setText(outputVideo.getFile().getPath());
+ savePanel.getConvertedVideoSavedFolderField().setText(outputVideo.getFolder().getPath());
+ savePanel.getNotAddVideoIdConvVideoCheckBox().setSelected(outputVideo.isCutIdName());
+ boolean convFixName = outputVideo.isAutoNaming();
+ savePanel.getConvSaveFileRadioButton().setSelected(!convFixName);
+ savePanel.getConvSaveFolderRadioButton().setSelected(convFixName);
+
+ // \93®\89æ\90Ý\92è
+ final MovieSetting movie = setting.getMovieSetting();
+ FFmpegPathField.setText(movie.getFfmpeg().toString());
+ VhookPathField.setText(movie.getVhook().toString());
+ ExtOptionField.setText(movie.getFfmpegOption().getExtOption());
+ MainOptionField.setText(movie.getFfmpegOption().getMainOption());
+ CommandLineOutOptionField.setText(movie.getFfmpegOption().getOutOption());
+ CommandLineInOptionField.setText(movie.getFfmpegOption().getInOption());
+ FFmpegOptionModel.reload(movie.getOptionFile());
+
+ // \95Ï\8a·\90Ý\92è
+ final ConvertSetting conv = setting.getConvertSetting();
+ NotUseVhookCheckBox.setSelected(conv.isVhookDisabled());
+ ViewCommentField.setText(Integer.toString(conv.getMaxNumOfComment()));
+ FontPathField.setText(conv.getFont().toString());
+ FontIndexField.setText(Integer.toString(conv.getFontIndex()));
+ ShadowComboBox.setSelectedIndex(conv.getShadowIndex());
+ ShowConvVideoCheckBox.setSelected(conv.isShowConverting());
+ FixFontSizeCheckBox.setSelected(conv.isSelfAdjustFontSize());
+ OpaqueCommentCheckBox.setSelected(conv.isCommentOpaque());
+ NGWordTextField.setText(conv.getNgSetting().getWord());
+ NGIDTextField.setText(conv.getNgSetting().getId());
+ }
- if (setting.isCommentFixFileName()) {
- Comment_SaveFileRadioButton.setSelected(false);
- Comment_SaveFolderRadioButton.setSelected(true);
- } else {
- Comment_SaveFileRadioButton.setSelected(true);
- Comment_SaveFolderRadioButton.setSelected(false);
- }
- if (setting.isConvFixFileName()) {
- Conv_SaveFileRadioButton.setSelected(false);
- Conv_SaveFolderRadioButton.setSelected(true);
- } else {
- Conv_SaveFileRadioButton.setSelected(true);
- Conv_SaveFolderRadioButton.setSelected(false);
- }
- NGWordTextField.setText(setting.getNG_Word());
- NGIDTextField.setText(setting.getNG_ID());
- // \83v\83\8d\83L\83V\8aÖ\98A
- UseProxyCheckBox.setSelected(setting.useProxy());
- ProxyTextField.setText(setting.getProxy());
- int proxy_port = setting.getProxyPort();
- if (proxy_port >= 0 && proxy_port <= 65535) {
- ProxyPortTextField.setText(Integer.toString(proxy_port));
- } else {
- ProxyPortTextField.setText("");
- }
- FixFontSizeCheckBox.setSelected(setting.isFixFontSize());
- FixCommentNumCheckBox.setSelected(setting.isFixCommentNum());
- OpaqueCommentCheckBox.setSelected(setting.isOpaqueComment());
- FFmpegOptionModel.reload(setting.getOptionFile());
- NotUseVhookCheckBox.setSelected(setting.isVhookDisabled());
- ShadowComboBox.setSelectedIndex(setting.getShadowIndex());
- }
-
- /**
- * [\83t\83@\83C\83\8b|\8fI\97¹] \83A\83N\83V\83\87\83\93\82ª\8eÀ\8ds\82³\82ê\82Ü\82µ\82½\81B
- *
- * @param actionEvent
- * ActionEvent
- */
- void jMenuFileExit_actionPerformed(ActionEvent actionEvent) {
- ConvertingSetting setting = this.getSetting();
- ConvertingSetting.saveSetting(setting);
- System.exit(0);
- }
-
- /**
- * [\83w\83\8b\83v|\83o\81[\83W\83\87\83\93\8fî\95ñ] \83A\83N\83V\83\87\83\93\82ª\8eÀ\8ds\82³\82ê\82Ü\82µ\82½\81B
- *
- * @param actionEvent
- * ActionEvent
- */
- void jMenuHelpAbout_actionPerformed(ActionEvent actionEvent) {
- MainFrame_AboutBox dlg = new MainFrame_AboutBox(this);
- dlg.pack();
- dlg.setLocationRelativeTo(this);
- dlg.setVisible(true);
- }
-
- /* \95Ï\8a·\81E\95Û\91¶\82·\82é */
- Converter Converter = null;
-
- JTextField CommandLineInOptionField = new JTextField();
-
- JLabel InLabel = new JLabel();
-
- JLabel OutLabel = new JLabel();
-
- JLabel CommentNumLabel = new JLabel();
-
- JTextField CommentNumField = new JTextField();
-
- JLabel MainOptionLabel = new JLabel();
-
- JTextField MainOptionField = new JTextField();
-
- JLabel FontIndexLabel = new JLabel();
-
- JTextField FontIndexField = new JTextField();
-
- JLabel VideoID_Label = new JLabel();
-
- JLabel WayBackLabel = new JLabel();
-
- JTextField WayBackField = new JTextField();
-
- GridBagLayout gridBagLayout10 = new GridBagLayout();
+ /**
+ * [\83t\83@\83C\83\8b|\8fI\97¹] \83A\83N\83V\83\87\83\93\82ª\8eÀ\8ds\82³\82ê\82Ü\82µ\82½\81B
+ *
+ * @param actionEvent
+ * ActionEvent
+ */
+ void jMenuFileExit_actionPerformed(ActionEvent actionEvent) {
+ SProperties setting = getSetting();
+ SProperties.saveSetting(setting);
+ System.exit(0);
+ }
- GridBagLayout gridBagLayout11 = new GridBagLayout();
+ /**
+ * [\83w\83\8b\83v|\83o\81[\83W\83\87\83\93\8fî\95ñ] \83A\83N\83V\83\87\83\93\82ª\8eÀ\8ds\82³\82ê\82Ü\82µ\82½\81B
+ *
+ * @param actionEvent
+ * ActionEvent
+ */
+ void jMenuHelpAbout_actionPerformed(ActionEvent actionEvent) {
+ MainFrame_AboutBox dlg = new MainFrame_AboutBox(this);
+ dlg.pack();
+ dlg.setLocationRelativeTo(this);
+ dlg.setVisible(true);
+ }
- GridBagLayout gridBagLayout1 = new GridBagLayout();
+ /* \95Ï\8a·\81E\95Û\91¶\82·\82é */
+ Converter Converter = null;
+ JTextField CommandLineInOptionField = new JTextField();
+ JLabel InLabel = new JLabel();
+ JLabel OutLabel = new JLabel();
+ JLabel MainOptionLabel = new JLabel();
+ JTextField MainOptionField = new JTextField();
+ JLabel FontIndexLabel = new JLabel();
+ JTextField FontIndexField = new JTextField();
+ JLabel VideoID_Label = new JLabel();
+ JLabel WayBackLabel = new JLabel();
+ JTextField WayBackField = new JTextField();
+ GridBagLayout gridBagLayout10 = new GridBagLayout();
+ GridBagLayout gridBagLayout11 = new GridBagLayout();
+ GridBagLayout gridBagLayout1 = new GridBagLayout();
+ JPanel OpPanel = new JPanel();
+ GridLayout gridLayout1 = new GridLayout();
+ JPanel BasicInfoTabPanel = new JPanel();
+ GridBagLayout gridBagLayout12 = new GridBagLayout();
+ private JPanel ConvertingSettingPanel = null;
+ private JPanel NGWordSettingPanel = null;
+ private JLabel NGWordLavel = null;
+ private JTextField NGWordTextField = null;
+ private JLabel NGIDLabel = null;
+ private JTextField NGIDTextField = null;
+ private JPanel ProxyInfoPanel = null;
+ private JLabel ProxyLabel = null;
+ private JTextField ProxyTextField = null;
+ private JLabel ProxyPortLabel = null;
+ private JTextField ProxyPortTextField = null;
+ private JCheckBox UseProxyCheckBox = null;
+ private JCheckBox FixFontSizeCheckBox = null;
+ private JCheckBox OpaqueCommentCheckBox = null;
+ private final SavePanel savePanel = new SavePanel();
+ private final VideoSaveInfoPanel videoSaveInfoPanel;
+ private JComboBox FFmpegOptionComboBox = null;
+ private JButton FFmpegOptionReloadButton = null;
+ private JPanel FFmpegOptionComboBoxPanel = null;
+
+ public void DoButton_actionPerformed(ActionEvent e) {
+ if (Converter == null || Converter.isConverted()) {
+ try {
+ executeConvert();
+ } catch (Exception ex) {
+ String text = ex.getMessage();
+ if (StringUtils.isEmpty(text)) {
+ text = "\97\\8aú\82µ\82È\82¢\83G\83\89\81[\82Ì\82½\82ß\92\86\92f\82µ\82Ü\82µ\82½\81B";
+ }
+ statusBar.setText(text);
+ }
+ } else { /* \8aJ\8en\82µ\82Ä\82¢\82é\82Ì\82Å\81A\83X\83g\83b\83v\82·\82é\81B */
+ final ConvertStopFlag flag = Converter.getStopFlag();
+ if (!flag.needStop()) { /* \82Ü\82¾\83X\83g\83b\83v\82µ\82Ä\82¢\82È\82¢\81B */
+ flag.requestStop();
+ }
+ }
+ }
- JPanel OpPanel = new JPanel();
+ private void executeConvert() throws IOException {
+ String url;
+
+ // NicoBrowser\83t\83@\83C\83\8b\82ð\97\98\97p\82·\82é\8fê\8d\87\82Í\81A\83t\83@\83C\83\8b\96¼\82©\82ç\83r\83f\83IID\82ð\93Á\92è.
+ if (videoSaveInfoPanel.getVideoUseNiBrButton().isSelected()) {
+ try {
+ String fileName = videoSaveInfoPanel.getNibrFileField().getText();
+ NicoDBFinder finder = NicoDBFinder.getInstance();
+ NicoContent info = finder.findNicoContent(fileName);
+ if (info != null) {
+ url = info.getNicoId();
+ } else {
+ url = "";
+ }
+ } catch (Exception ex) {
+ JOptionPane.showMessageDialog(this, ex.getMessage(), "\83G\83\89\81[", JOptionPane.ERROR_MESSAGE);
+ return;
+ }
+ } else {
+ url = VideoID_TextField.getText();
+ }
- GridLayout gridLayout1 = new GridLayout();
+ TextProgressListener sl = new TextProgressListener() {
- JRadioButton Conv_SaveFileRadioButton = new JRadioButton();
+ public void setText(final String text) {
+ SwingUtilities.invokeLater(new Runnable() {
- JRadioButton Conv_SaveFolderRadioButton = new JRadioButton();
+ public void run() {
+ statusBar.setText(text);
+ }
+ });
+ }
+ };
- JTextField ConvertedVideoSavedFolderField = new JTextField();
+ ConvertStopFlag.StateChangeListener scl = new ConvertStopFlag.StateChangeListener() {
- JButton ShowSavingConvertedVideoFolderDialogButton = new JButton();
+ public void changeState(final State s) {
+ SwingUtilities.invokeLater(new Runnable() {
- JRadioButton Comment_SaveFileRadioButton = new JRadioButton();
+ public void run() {
+ switch (s) {
+ case STOPPING:
+ DoButton.setText(DoButtonWaitString);
+ break;
+ case FINISHED:
+ DoButton.setText(DoButtonDefString);
+ }
+ }
+ });
+ }
+ };
- JTextField CommentSavedFolderField = new JTextField();
+ Converter = new Converter(url, WayBackField.getText(), getSetting().toProfile(), sl,
+ new ConvertStopFlag(scl));
+ DoButton.setText(DoButtonStopString);
+ new Thread(Converter).start();
- JButton ShowSavingCommentFolderDialogButton = new JButton();
+ }
- JRadioButton Comment_SaveFolderRadioButton = new JRadioButton();
+ /* FFmpeg\82Ö\82Ì\83p\83X */
+ public void SettingFFmpegPathButton_actionPerformed(ActionEvent e) {
+ showSaveDialog("FFmpeg\82Ö\82Ì\83p\83X", FFmpegPathField, false, false);
+ }
- JPanel BasicInfoTabPanel = new JPanel();
+ public void SettingVhookPathButton_actionPerformed(ActionEvent e) {
+ showSaveDialog("\8ag\92£vhook\83\89\83C\83u\83\89\83\8a\82Ö\82Ì\83p\83X", VhookPathField, false, false);
+ }
- GridBagLayout gridBagLayout12 = new GridBagLayout();
+ public void SettingFontPathButton_actionPerformed(ActionEvent e) {
+ showSaveDialog("\83t\83H\83\93\83g\82Ö\82Ì\83p\83X", FontPathField, false, false);
+ }
- private JPanel ConvertingSettingPanel = null;
+ public void this_windowClosing(WindowEvent e) {
+ this.jMenuFileExit_actionPerformed(null);
+ }
- private JPanel NGWordSettingPanel = null;
+ /**
+ * This method initializes ConvertingSettingPanel
+ *
+ * @return javax.swing.JPanel
+ */
+ private JPanel getConvertingSettingPanel() {
+ if (ConvertingSettingPanel == null) {
+ GridBagConstraints gridBagConstraints11 = new GridBagConstraints();
+ gridBagConstraints11.weighty = 1.0;
+ gridBagConstraints11.weightx = 1.0;
+ gridBagConstraints11.insets = new Insets(0, 5, 0, 5);
+ gridBagConstraints11.gridy = 1;
+ gridBagConstraints11.gridx = 0;
+ gridBagConstraints11.anchor = GridBagConstraints.NORTH;
+ gridBagConstraints11.fill = GridBagConstraints.HORIZONTAL;
+ GridBagConstraints gridBagConstraints = new GridBagConstraints(0,
+ 2, 1, 1, 1.0, 1.0, GridBagConstraints.NORTH,
+ GridBagConstraints.HORIZONTAL, new Insets(0, 5, 0, 5), 0, 0);
+ gridBagConstraints.gridx = 0;
+ gridBagConstraints.anchor = GridBagConstraints.CENTER;
+ gridBagConstraints.weighty = 0.0;
+ gridBagConstraints.gridy = 0;
+ ConvertingSettingPanel = new JPanel();
+ ConvertingSettingPanel.setLayout(new GridBagLayout());
+ ConvertingSettingPanel.add(getNGWordSettingPanel(),
+ gridBagConstraints11);
+ ConvertingSettingPanel.add(VhookSettingPanel, gridBagConstraints);
+ }
+ return ConvertingSettingPanel;
+ }
- private JLabel NGWordLavel = null;
+ /**
+ * This method initializes NGWordSettingPanel
+ *
+ * @return javax.swing.JPanel
+ */
+ private JPanel getNGWordSettingPanel() {
+ if (NGWordSettingPanel == null) {
+ GridBagConstraints gridBagConstraints5 = new GridBagConstraints();
+ gridBagConstraints5.fill = GridBagConstraints.HORIZONTAL;
+ gridBagConstraints5.gridy = 1;
+ gridBagConstraints5.weightx = 1.0;
+ gridBagConstraints5.insets = new Insets(0, 5, 5, 5);
+ gridBagConstraints5.gridx = 1;
+ GridBagConstraints gridBagConstraints4 = new GridBagConstraints();
+ gridBagConstraints4.gridx = 0;
+ gridBagConstraints4.anchor = GridBagConstraints.WEST;
+ gridBagConstraints4.insets = new Insets(0, 5, 5, 0);
+ gridBagConstraints4.gridy = 1;
+ NGIDLabel = new JLabel();
+ NGIDLabel.setText("NG ID");
+ GridBagConstraints gridBagConstraints3 = new GridBagConstraints();
+ gridBagConstraints3.fill = GridBagConstraints.HORIZONTAL;
+ gridBagConstraints3.gridy = 0;
+ gridBagConstraints3.weightx = 1.0;
+ gridBagConstraints3.insets = new Insets(0, 5, 5, 5);
+ gridBagConstraints3.gridx = 1;
+ GridBagConstraints gridBagConstraints2 = new GridBagConstraints();
+ gridBagConstraints2.gridx = 0;
+ gridBagConstraints2.insets = new Insets(0, 5, 5, 0);
+ gridBagConstraints2.gridy = 0;
+ NGWordLavel = new JLabel();
+ NGWordLavel.setText("NG\83\8f\81[\83h");
+ NGWordSettingPanel = new JPanel();
+ NGWordSettingPanel.setLayout(new GridBagLayout());
+ NGWordSettingPanel.setBorder(BorderFactory.createTitledBorder(null,
+ "NG\83\8f\81[\83h\81EID\90Ý\92è"));
+ NGWordSettingPanel.add(NGWordLavel, gridBagConstraints2);
+ NGWordSettingPanel.add(getNGWordTextField(), gridBagConstraints3);
+ NGWordSettingPanel.add(NGIDLabel, gridBagConstraints4);
+ NGWordSettingPanel.add(getNGIDTextField(), gridBagConstraints5);
+ }
+ return NGWordSettingPanel;
+ }
- private JTextField NGWordTextField = null;
+ /**
+ * This method initializes NGWordTextField
+ *
+ * @return javax.swing.JTextField
+ */
+ private JTextField getNGWordTextField() {
+ if (NGWordTextField == null) {
+ NGWordTextField = new JTextField();
+ }
+ return NGWordTextField;
+ }
- private JLabel NGIDLabel = null;
+ /**
+ * This method initializes NGIDTextField
+ *
+ * @return javax.swing.JTextField
+ */
+ private JTextField getNGIDTextField() {
+ if (NGIDTextField == null) {
+ NGIDTextField = new JTextField();
+ }
+ return NGIDTextField;
+ }
- private JTextField NGIDTextField = null;
+ /**
+ * This method initializes ProxyInfoPanel
+ *
+ * @return javax.swing.JPanel
+ */
+ private JPanel getProxyInfoPanel() {
+ if (ProxyInfoPanel == null) {
+ GridBagConstraints gridBagConstraints13 = new GridBagConstraints();
+ gridBagConstraints13.gridx = 0;
+ gridBagConstraints13.gridwidth = 2;
+ gridBagConstraints13.weightx = 1.0;
+ gridBagConstraints13.fill = GridBagConstraints.HORIZONTAL;
+ gridBagConstraints13.insets = new Insets(0, 5, 0, 5);
+ gridBagConstraints13.gridy = 0;
+ GridBagConstraints gridBagConstraints12 = new GridBagConstraints();
+ gridBagConstraints12.fill = GridBagConstraints.HORIZONTAL;
+ gridBagConstraints12.gridy = 2;
+ gridBagConstraints12.weightx = 1.0;
+ gridBagConstraints12.insets = new Insets(5, 0, 5, 5);
+ gridBagConstraints12.gridx = 1;
+ GridBagConstraints gridBagConstraints10 = new GridBagConstraints();
+ gridBagConstraints10.gridx = 0;
+ gridBagConstraints10.insets = new Insets(5, 5, 5, 5);
+ gridBagConstraints10.gridy = 2;
+ ProxyPortLabel = new JLabel();
+ ProxyPortLabel.setText("\83|\81[\83g\94Ô\8d\86");
+ GridBagConstraints gridBagConstraints9 = new GridBagConstraints();
+ gridBagConstraints9.fill = GridBagConstraints.BOTH;
+ gridBagConstraints9.gridy = 1;
+ gridBagConstraints9.weightx = 1.0;
+ gridBagConstraints9.insets = new Insets(0, 0, 0, 5);
+ gridBagConstraints9.gridx = 1;
+ GridBagConstraints gridBagConstraints8 = new GridBagConstraints();
+ gridBagConstraints8.gridx = 0;
+ gridBagConstraints8.insets = new Insets(0, 5, 0, 5);
+ gridBagConstraints8.fill = GridBagConstraints.NONE;
+ gridBagConstraints8.anchor = GridBagConstraints.EAST;
+ gridBagConstraints8.gridy = 1;
+ ProxyLabel = new JLabel();
+ ProxyLabel.setText("\83v\83\8d\83L\83V");
+ ProxyInfoPanel = new JPanel();
+ ProxyInfoPanel.setLayout(new GridBagLayout());
+ ProxyInfoPanel.setBorder(BorderFactory.createTitledBorder(null,
+ "\83v\83\8d\83L\83V\90Ý\92è"));
+ ProxyInfoPanel.add(ProxyLabel, gridBagConstraints8);
+ ProxyInfoPanel.add(getProxyTextField(), gridBagConstraints9);
+ ProxyInfoPanel.add(ProxyPortLabel, gridBagConstraints10);
+ ProxyInfoPanel.add(getProxyPortTextField(), gridBagConstraints12);
+ ProxyInfoPanel.add(getUseProxyCheckBox(), gridBagConstraints13);
+ }
+ return ProxyInfoPanel;
+ }
- private JPanel ProxyInfoPanel = null;
+ /**
+ * This method initializes ProxyTextField
+ *
+ * @return javax.swing.JTextField
+ */
+ private JTextField getProxyTextField() {
+ if (ProxyTextField == null) {
+ ProxyTextField = new JTextField();
+ }
+ return ProxyTextField;
+ }
- private JLabel ProxyLabel = null;
+ /**
+ * This method initializes ProxyPortTextField
+ *
+ * @return javax.swing.JTextField
+ */
+ private JTextField getProxyPortTextField() {
+ if (ProxyPortTextField == null) {
+ ProxyPortTextField = new JTextField();
+ }
+ return ProxyPortTextField;
+ }
- private JTextField ProxyTextField = null;
+ /**
+ * This method initializes UseProxyCheckBox
+ *
+ * @return javax.swing.JCheckBox
+ */
+ private JCheckBox getUseProxyCheckBox() {
+ if (UseProxyCheckBox == null) {
+ UseProxyCheckBox = new JCheckBox();
+ UseProxyCheckBox.setText("\83v\83\8d\83L\83V\82ð\8eg\82¤");
+ }
+ return UseProxyCheckBox;
+ }
- private JLabel ProxyPortLabel = null;
+ /**
+ * This method initializes FixFontSizeCheckBox
+ *
+ * @return javax.swing.JCheckBox
+ */
+ private JCheckBox getFixFontSizeCheckBox() {
+ if (FixFontSizeCheckBox == null) {
+ FixFontSizeCheckBox = new JCheckBox();
+ FixFontSizeCheckBox.setText("\83t\83H\83\93\83g\83T\83C\83Y\82ð\89æ\96Ê\82É\82 \82í\82¹\82Ä\8e©\93®\92²\90®\82·\82é");
+ }
+ return FixFontSizeCheckBox;
+ }
- private JTextField ProxyPortTextField = null;
+ /**
+ * This method initializes OpaqueCommentCheckBox
+ *
+ * @return javax.swing.JCheckBox
+ */
+ private JCheckBox getOpaqueCommentCheckBox() {
+ if (OpaqueCommentCheckBox == null) {
+ OpaqueCommentCheckBox = new JCheckBox();
+ OpaqueCommentCheckBox.setText("\91S\82Ä\82Ì\83R\83\81\83\93\83g\82ð\95s\93§\96¾\82É\82·\82é");
+ }
+ return OpaqueCommentCheckBox;
+ }
+ /**
+ * This method initializes FFmpegOptionComboBox
+ *
+ * @return javax.swing.JComboBox
+ */
+ private final OptionComboBoxModel FFmpegOptionModel = new OptionComboBoxModel();
+ private JLabel ExtOptionLabel = null;
+ private JTextField ExtOptionField = null;
+ private JCheckBox NotUseVhookCheckBox = null;
+ private JTextField ViewCommentField = null;
+ private JLabel ViewCommentLabel = null;
+ private JLabel ShadowKindLabel = null;
+ private JComboBox ShadowComboBox = null;
+
+ private JComboBox getFFmpegOptionComboBox() {
+ if (FFmpegOptionComboBox == null) {
+ FFmpegOptionComboBox = new JComboBox(FFmpegOptionModel);
+ FFmpegOptionComboBox.addActionListener(new java.awt.event.ActionListener() {
+
+ public void actionPerformed(java.awt.event.ActionEvent e) {
+ if (FFmpegOptionModel.isFile()) {// \83t\83@\83C\83\8b
+ ExtOptionField.setEnabled(false);
+ MainOptionField.setEnabled(false);
+ CommandLineInOptionField.setEnabled(false);
+ CommandLineOutOptionField.setEnabled(false);
+ } else {// \83t\83@\83C\83\8b\82Å\82È\82¢
+ ExtOptionField.setEnabled(true);
+ MainOptionField.setEnabled(true);
+ CommandLineInOptionField.setEnabled(true);
+ CommandLineOutOptionField.setEnabled(true);
+ }
+ }
+ });
+ }
+ return FFmpegOptionComboBox;
+ }
- private JCheckBox UseProxyCheckBox = null;
+ /**
+ * This method initializes FFmpegOptionReloadButton
+ *
+ * @return javax.swing.JButton
+ */
+ private JButton getFFmpegOptionReloadButton() {
+ if (FFmpegOptionReloadButton == null) {
+ FFmpegOptionReloadButton = new JButton();
+ FFmpegOptionReloadButton.setText("\8dX\90V");
+ FFmpegOptionReloadButton.addActionListener(new java.awt.event.ActionListener() {
+
+ public void actionPerformed(java.awt.event.ActionEvent e) {
+ FFmpegOptionModel.reload();
+ }
+ });
+ }
+ return FFmpegOptionReloadButton;
+ }
- private JCheckBox FixFontSizeCheckBox = null;
+ /**
+ * This method initializes FFmpegOptionComboBoxPanel
+ *
+ * @return javax.swing.JPanel
+ */
+ private JPanel getFFmpegOptionComboBoxPanel() {
+ if (FFmpegOptionComboBoxPanel == null) {
+ GridBagConstraints gridBagConstraints47 = new GridBagConstraints();
+ gridBagConstraints47.fill = GridBagConstraints.BOTH;
+ gridBagConstraints47.gridx = -1;
+ gridBagConstraints47.gridy = -1;
+ gridBagConstraints47.insets = new Insets(0, 0, 5, 5);
+ GridBagConstraints gridBagConstraints46 = new GridBagConstraints();
+ gridBagConstraints46.fill = GridBagConstraints.HORIZONTAL;
+ gridBagConstraints46.gridwidth = 3;
+ gridBagConstraints46.gridx = -1;
+ gridBagConstraints46.gridy = -1;
+ gridBagConstraints46.weightx = 1.0;
+ gridBagConstraints46.insets = new Insets(0, 5, 5, 5);
+ FFmpegOptionComboBoxPanel = new JPanel();
+ FFmpegOptionComboBoxPanel.setLayout(new GridBagLayout());
+ FFmpegOptionComboBoxPanel.add(getFFmpegOptionComboBox(),
+ gridBagConstraints46);
+ FFmpegOptionComboBoxPanel.add(getFFmpegOptionReloadButton(),
+ gridBagConstraints47);
+ }
+ return FFmpegOptionComboBoxPanel;
+ }
- private JCheckBox DelCommentCheckBox = null;
+ /**
+ * This method initializes ExtOptionField
+ *
+ * @return javax.swing.JTextField
+ */
+ private JTextField getExtOptionField() {
+ if (ExtOptionField == null) {
+ ExtOptionField = new JTextField();
+ }
+ return ExtOptionField;
+ }
- private JCheckBox FixCommentNumCheckBox = null;
+ /**
+ * This method initializes NotUseVhookCheckBox
+ *
+ * @return javax.swing.JCheckBox
+ */
+ private JCheckBox getNotUseVhookCheckBox() {
+ if (NotUseVhookCheckBox == null) {
+ NotUseVhookCheckBox = new JCheckBox();
+ NotUseVhookCheckBox.setText("\8ag\92£vhook\83\89\83C\83u\83\89\83\8a\82ð\96³\8cø\82É\82·\82é\81i\83f\83o\83b\83O\97p\81j");
+ }
+ return NotUseVhookCheckBox;
+ }
- private JCheckBox OpaqueCommentCheckBox = null;
+ /**
+ * This method initializes ViewCommentField
+ *
+ * @return javax.swing.JTextField
+ */
+ private JTextField getViewCommentField() {
+ if (ViewCommentField == null) {
+ ViewCommentField = new JTextField();
+ }
+ return ViewCommentField;
+ }
- private VideoSaveInfoPanel videoSaveInfoPanel = new VideoSaveInfoPanel();
+ /**
+ * This method initializes ShadowComboBox
+ *
+ * @return javax.swing.JComboBox
+ */
+ private JComboBox getShadowComboBox() {
+ if (ShadowComboBox == null) {
+ ShadowComboBox = new JComboBox(SProperties.ShadowKindArray);
+ }
+ return ShadowComboBox;
+ }
- private JTabbedPane SaveInfoTabPaneEach = null;
+ private BasicSetting getBasicSetting() {
+ String mail = MailAddrField.getText();
+ String pass = String.valueOf(PasswordField.getPassword());
+ boolean proxyUse = UseProxyCheckBox.isSelected();
+ String proxyHost = ProxyTextField.getText();
+ int proxyPort;
+ try {
+ proxyPort = Integer.parseInt(ProxyPortTextField.getText());
+ } catch (NumberFormatException e) {
+ proxyPort = -1;
+ }
+ return new BasicSetting(mail, pass, proxyUse, proxyHost, proxyPort);
+ }
- private JPanel VideoSavingTabbedPanel = null;
+ private InputVideoSetting getInputVideoSetting() {
+ VideoSaveKind kind;
+ if (videoSaveInfoPanel.getVideoNoSaveButton().isSelected() == true) {
+ kind = VideoSaveKind.NO_SAVE;
+ } else if (videoSaveInfoPanel.getVideoUseNiBrButton().isSelected() == true) {
+ kind = VideoSaveKind.NICOBROWSER;
+ } else {
+ kind = VideoSaveKind.SAVE;
+ }
+ boolean autoNaming = videoSaveInfoPanel.getSaveFolderRadioButton().isSelected();
+ String folder = videoSaveInfoPanel.getVideoSavedFolderField().getText();
+ String file = videoSaveInfoPanel.getVideoSavedFileField().getText();
+ boolean delete = videoSaveInfoPanel.getDelVideoCheckBox().isSelected();
+ String nibrFile = videoSaveInfoPanel.getNibrFileField().getText();
- private JPanel ConvertedVideoSavingTabbedPanel = null;
+ return new InputVideoSetting(kind, autoNaming, new File(folder), new File(file), delete, new File(nibrFile));
+ }
- private JCheckBox NotAddVideoID_ConvVideoCheckBox = null;
+ private InputCommentSetting getInputCommentSetting() {
+ boolean download = savePanel.getSavingCommentCheckBox().isSelected();
+ String file = savePanel.getCommentSavedFileField().getText();
+ int back_comment;
+ try {
+ back_comment = Integer.parseInt(savePanel.getCommentNumField().getText());
+ } catch (NumberFormatException ex) {
+ back_comment = 500;
+ }
+ boolean delete = savePanel.getDelCommentCheckBox().isSelected();
+ boolean autoNaming = savePanel.getCommentSaveFolderRadioButton().isSelected();
+ String folder = savePanel.getCommentSavedFolderField().getText();
+ boolean adjustNumOfCom = savePanel.getFixCommentNumCheckBox().isSelected();
- private JComboBox FFmpegOptionComboBox = null;
+ return new InputCommentSetting(download, autoNaming, new File(folder), new File(file), delete, adjustNumOfCom,
+ back_comment);
+ }
- private JButton FFmpegOptionReloadButton = null;
+ /**
+ * \89æ\96Ê\93ü\97Í\92l\82©\82ç\93\8a\8de\8eÒ\83R\83\81\83\93\83g\90Ý\92è\82ð\8dì\90¬\82·\82é.
+ * @return \8dì\90¬\82µ\82½\93\8a\8de\8eÒ\83R\83\81\83\93\83g\90Ý\92è.
+ */
+ private InputTcommentSetting getTcommentSetting() {
+ boolean down = savePanel.isTcommentDownload();
+ boolean del = savePanel.isTcommentDelete();
+ boolean naming = savePanel.isTcommentAutoFileName();
+ String dir = savePanel.getTcommentDirectoryName();
+ String f = savePanel.getTcommentFileName();
+ return new InputTcommentSetting(down, naming, dir, f, del);
+ }
- private JPanel FFmpegOptionComboBoxPanel = null;
+ private OutputVideoSetting getOutputVideoSetting() {
+ boolean process = savePanel.getSavingConvertedVideoCheckBox().isSelected();
+ boolean addComment = savePanel.getAddCommentCheckBox().isSelected();
+ boolean addTcomment = savePanel.getAddTcommentCheckBox().isSelected();
+ String file = savePanel.getConvertedVideoSavedFileField().getText();
+ boolean cutId = savePanel.getNotAddVideoIdConvVideoCheckBox().isSelected();
+ boolean autoNaming = savePanel.getConvSaveFolderRadioButton().isSelected();
+ String folder = savePanel.getConvertedVideoSavedFolderField().getText();
+
+ return new OutputVideoSetting(process, autoNaming, new File(folder), new File(file), cutId, addComment,
+ addTcomment);
+ }
- public void DoButton_actionPerformed(ActionEvent e) {
- if (Converter == null || Converter.isConverted()) {
- String url;
+ private MovieSetting getMovieSetting() {
+ String ffmpeg = FFmpegPathField.getText();
+ String vhook = VhookPathField.getText();
+ String ext = ExtOptionField.getText();
+ String main = MainOptionField.getText();
+ String in = CommandLineInOptionField.getText();
+ String out = CommandLineOutOptionField.getText();
+ File optionFile = FFmpegOptionModel.getSelectedFile();
+
+ FfmpegOption opt = new FfmpegOption(ext, main, in, out);
+ return new MovieSetting(new File(ffmpeg), new File(vhook), optionFile, opt);
+ }
- // NicoBrowser\83t\83@\83C\83\8b\82ð\97\98\97p\82·\82é\8fê\8d\87\82Í\81A\83t\83@\83C\83\8b\96¼\82©\82ç\83r\83f\83IID\82ð\93Á\92è.
- if(videoSaveInfoPanel.getVideoUseNiBrButton().isSelected()){
- try {
- String fileName = videoSaveInfoPanel.getNibrFileField().getText();
- NicoDBFinder finder = NicoDBFinder.getInstance();
- NicoContent info = finder.findNicoContent(fileName);
- if (info != null) {
- url = info.getNicoId();
- } else {
- url = "";
- }
- } catch (Exception ex) {
- JOptionPane.showMessageDialog(this, ex.getMessage(), "\83G\83\89\81[", JOptionPane.ERROR_MESSAGE);
- return;
- }
- }else{
- url = VideoID_TextField.getText();
- }
+ private ConvertSetting getConvertSetting() {
+ boolean vhookDisabled = NotUseVhookCheckBox.isSelected();
+ int maxComment = 30;
+ try {
+ maxComment = Integer.parseInt(ViewCommentField.getText());
+ } catch (NumberFormatException ex) {
+ }
+ File font = new File(FontPathField.getText());
+ int fontIndex = Integer.parseInt(FontIndexField.getText());
+ int shadowIndex = ShadowComboBox.getSelectedIndex();
+ boolean showConv = ShowConvVideoCheckBox.isSelected();
+ boolean adjustFont = FixFontSizeCheckBox.isSelected();
+ boolean commentOpaque = OpaqueCommentCheckBox.isSelected();
+ NgSetting ngSetting = new NgSetting(NGWordTextField.getText(), NGIDTextField.getText());
+
+ return new ConvertSetting(vhookDisabled, maxComment, font, fontIndex, shadowIndex, showConv, adjustFont,
+ commentOpaque, ngSetting);
+ }
- Converter = new Converter(url, WayBackField
- .getText(), this.getSetting(), this.statusBar,
- new ConvertStopFlag(this.DoButton, DoButtonStopString,
- DoButtonWaitString, DoButtonDefString));
- Converter.start();
- } else { /* \8aJ\8en\82µ\82Ä\82¢\82é\82Ì\82Å\81A\83X\83g\83b\83v\82·\82é\81B */
- final ConvertStopFlag flag = Converter.getStopFlag();
- if (!flag.needStop()) { /* \82Ü\82¾\83X\83g\83b\83v\82µ\82Ä\82¢\82È\82¢\81B */
- flag.stop();
- }
- }
- }
-
- /* \83R\83\81\83\93\83g\81E\83Z\81[\83u\83_\83C\83A\83\8d\83O */
- public void ShowSavingCommentDialogButton_actionPerformed(ActionEvent e) {
- showSaveDialog("\83R\83\81\83\93\83g\82Ì\95Û\91¶\90æ(\83t\83@\83C\83\8b)", CommentSavedFileField, true, false);
- }
-
- /* \83R\83\81\83\93\83g\95t\82«\83r\83f\83I\81E\83Z\81[\83u\83_\83C\83A\83\8d\83O */
- public void ShowSavingConvertedVideoDialogButton_actionPerformed(
- ActionEvent e) {
- showSaveDialog("\83R\83\81\83\93\83g\95t\82«\93®\89æ\82Ì\95Û\91¶\90æ(\83t\83@\83C\83\8b)", ConvertedVideoSavedFileField,
- true, false);
- }
-
- /* FFmpeg\82Ö\82Ì\83p\83X */
- public void SettingFFmpegPathButton_actionPerformed(ActionEvent e) {
- showSaveDialog("FFmpeg\82Ö\82Ì\83p\83X", FFmpegPathField, false, false);
- }
-
- public void SettingVhookPathButton_actionPerformed(ActionEvent e) {
- showSaveDialog("\8ag\92£vhook\83\89\83C\83u\83\89\83\8a\82Ö\82Ì\83p\83X", VhookPathField, false, false);
- }
-
- public void SettingFontPathButton_actionPerformed(ActionEvent e) {
- showSaveDialog("\83t\83H\83\93\83g\82Ö\82Ì\83p\83X", FontPathField, false, false);
- }
-
- public void this_windowClosing(WindowEvent e) {
- this.jMenuFileExit_actionPerformed(null);
- }
-
- public void ShowSavingConvertedVideoFolderDialogButton_actionPerformed(
- ActionEvent e) {
- /* \83t\83H\83\8b\83_ */
- showSaveDialog("\83R\83\81\83\93\83g\95t\82«\93®\89æ\82Ì\95Û\91¶\90æ(\83t\83H\83\8b\83_)", ConvertedVideoSavedFolderField,
- true, true);
- }
-
- public void ShowSavingCommentFolderDialogButton_actionPerformed(
- ActionEvent e) {
- showSaveDialog("\83R\83\81\83\93\83g\82Ì\95Û\91¶\90æ(\83t\83H\83\8b\83_)", CommentSavedFolderField, true, true);
- }
-
- /**
- * This method initializes ConvertingSettingPanel
- *
- * @return javax.swing.JPanel
- */
- private JPanel getConvertingSettingPanel() {
- if (ConvertingSettingPanel == null) {
- GridBagConstraints gridBagConstraints11 = new GridBagConstraints();
- gridBagConstraints11.weighty = 1.0;
- gridBagConstraints11.weightx = 1.0;
- gridBagConstraints11.insets = new Insets(0, 5, 0, 5);
- gridBagConstraints11.gridy = 1;
- gridBagConstraints11.gridx = 0;
- gridBagConstraints11.anchor = GridBagConstraints.NORTH;
- gridBagConstraints11.fill = GridBagConstraints.HORIZONTAL;
- GridBagConstraints gridBagConstraints = new GridBagConstraints(0,
- 2, 1, 1, 1.0, 1.0, GridBagConstraints.NORTH,
- GridBagConstraints.HORIZONTAL, new Insets(0, 5, 0, 5), 0, 0);
- gridBagConstraints.gridx = 0;
- gridBagConstraints.anchor = GridBagConstraints.CENTER;
- gridBagConstraints.weighty = 0.0;
- gridBagConstraints.gridy = 0;
- ConvertingSettingPanel = new JPanel();
- ConvertingSettingPanel.setLayout(new GridBagLayout());
- ConvertingSettingPanel.add(getNGWordSettingPanel(),
- gridBagConstraints11);
- ConvertingSettingPanel.add(VhookSettingPanel, gridBagConstraints);
- }
- return ConvertingSettingPanel;
- }
-
- /**
- * This method initializes NGWordSettingPanel
- *
- * @return javax.swing.JPanel
- */
- private JPanel getNGWordSettingPanel() {
- if (NGWordSettingPanel == null) {
- GridBagConstraints gridBagConstraints5 = new GridBagConstraints();
- gridBagConstraints5.fill = GridBagConstraints.HORIZONTAL;
- gridBagConstraints5.gridy = 1;
- gridBagConstraints5.weightx = 1.0;
- gridBagConstraints5.insets = new Insets(0, 5, 5, 5);
- gridBagConstraints5.gridx = 1;
- GridBagConstraints gridBagConstraints4 = new GridBagConstraints();
- gridBagConstraints4.gridx = 0;
- gridBagConstraints4.anchor = GridBagConstraints.WEST;
- gridBagConstraints4.insets = new Insets(0, 5, 5, 0);
- gridBagConstraints4.gridy = 1;
- NGIDLabel = new JLabel();
- NGIDLabel.setText("NG ID");
- GridBagConstraints gridBagConstraints3 = new GridBagConstraints();
- gridBagConstraints3.fill = GridBagConstraints.HORIZONTAL;
- gridBagConstraints3.gridy = 0;
- gridBagConstraints3.weightx = 1.0;
- gridBagConstraints3.insets = new Insets(0, 5, 5, 5);
- gridBagConstraints3.gridx = 1;
- GridBagConstraints gridBagConstraints2 = new GridBagConstraints();
- gridBagConstraints2.gridx = 0;
- gridBagConstraints2.insets = new Insets(0, 5, 5, 0);
- gridBagConstraints2.gridy = 0;
- NGWordLavel = new JLabel();
- NGWordLavel.setText("NG\83\8f\81[\83h");
- NGWordSettingPanel = new JPanel();
- NGWordSettingPanel.setLayout(new GridBagLayout());
- NGWordSettingPanel.setBorder(BorderFactory.createTitledBorder(null,
- "NG\83\8f\81[\83h\81EID\90Ý\92è"));
- NGWordSettingPanel.add(NGWordLavel, gridBagConstraints2);
- NGWordSettingPanel.add(getNGWordTextField(), gridBagConstraints3);
- NGWordSettingPanel.add(NGIDLabel, gridBagConstraints4);
- NGWordSettingPanel.add(getNGIDTextField(), gridBagConstraints5);
- }
- return NGWordSettingPanel;
- }
-
- /**
- * This method initializes NGWordTextField
- *
- * @return javax.swing.JTextField
- */
- private JTextField getNGWordTextField() {
- if (NGWordTextField == null) {
- NGWordTextField = new JTextField();
- }
- return NGWordTextField;
- }
-
- /**
- * This method initializes NGIDTextField
- *
- * @return javax.swing.JTextField
- */
- private JTextField getNGIDTextField() {
- if (NGIDTextField == null) {
- NGIDTextField = new JTextField();
- }
- return NGIDTextField;
- }
-
- /**
- * This method initializes ProxyInfoPanel
- *
- * @return javax.swing.JPanel
- */
- private JPanel getProxyInfoPanel() {
- if (ProxyInfoPanel == null) {
- GridBagConstraints gridBagConstraints13 = new GridBagConstraints();
- gridBagConstraints13.gridx = 0;
- gridBagConstraints13.gridwidth = 2;
- gridBagConstraints13.weightx = 1.0;
- gridBagConstraints13.fill = GridBagConstraints.HORIZONTAL;
- gridBagConstraints13.insets = new Insets(0, 5, 0, 5);
- gridBagConstraints13.gridy = 0;
- GridBagConstraints gridBagConstraints12 = new GridBagConstraints();
- gridBagConstraints12.fill = GridBagConstraints.HORIZONTAL;
- gridBagConstraints12.gridy = 2;
- gridBagConstraints12.weightx = 1.0;
- gridBagConstraints12.insets = new Insets(5, 0, 5, 5);
- gridBagConstraints12.gridx = 1;
- GridBagConstraints gridBagConstraints10 = new GridBagConstraints();
- gridBagConstraints10.gridx = 0;
- gridBagConstraints10.insets = new Insets(5, 5, 5, 5);
- gridBagConstraints10.gridy = 2;
- ProxyPortLabel = new JLabel();
- ProxyPortLabel.setText("\83|\81[\83g\94Ô\8d\86");
- GridBagConstraints gridBagConstraints9 = new GridBagConstraints();
- gridBagConstraints9.fill = GridBagConstraints.BOTH;
- gridBagConstraints9.gridy = 1;
- gridBagConstraints9.weightx = 1.0;
- gridBagConstraints9.insets = new Insets(0, 0, 0, 5);
- gridBagConstraints9.gridx = 1;
- GridBagConstraints gridBagConstraints8 = new GridBagConstraints();
- gridBagConstraints8.gridx = 0;
- gridBagConstraints8.insets = new Insets(0, 5, 0, 5);
- gridBagConstraints8.fill = GridBagConstraints.NONE;
- gridBagConstraints8.anchor = GridBagConstraints.EAST;
- gridBagConstraints8.gridy = 1;
- ProxyLabel = new JLabel();
- ProxyLabel.setText("\83v\83\8d\83L\83V");
- ProxyInfoPanel = new JPanel();
- ProxyInfoPanel.setLayout(new GridBagLayout());
- ProxyInfoPanel.setBorder(BorderFactory.createTitledBorder(null,
- "\83v\83\8d\83L\83V\90Ý\92è"));
- ProxyInfoPanel.add(ProxyLabel, gridBagConstraints8);
- ProxyInfoPanel.add(getProxyTextField(), gridBagConstraints9);
- ProxyInfoPanel.add(ProxyPortLabel, gridBagConstraints10);
- ProxyInfoPanel.add(getProxyPortTextField(), gridBagConstraints12);
- ProxyInfoPanel.add(getUseProxyCheckBox(), gridBagConstraints13);
- }
- return ProxyInfoPanel;
- }
-
- /**
- * This method initializes ProxyTextField
- *
- * @return javax.swing.JTextField
- */
- private JTextField getProxyTextField() {
- if (ProxyTextField == null) {
- ProxyTextField = new JTextField();
- }
- return ProxyTextField;
- }
-
- /**
- * This method initializes ProxyPortTextField
- *
- * @return javax.swing.JTextField
- */
- private JTextField getProxyPortTextField() {
- if (ProxyPortTextField == null) {
- ProxyPortTextField = new JTextField();
- }
- return ProxyPortTextField;
- }
-
- /**
- * This method initializes UseProxyCheckBox
- *
- * @return javax.swing.JCheckBox
- */
- private JCheckBox getUseProxyCheckBox() {
- if (UseProxyCheckBox == null) {
- UseProxyCheckBox = new JCheckBox();
- UseProxyCheckBox.setText("\83v\83\8d\83L\83V\82ð\8eg\82¤");
- }
- return UseProxyCheckBox;
- }
-
- /**
- * This method initializes FixFontSizeCheckBox
- *
- * @return javax.swing.JCheckBox
- */
- private JCheckBox getFixFontSizeCheckBox() {
- if (FixFontSizeCheckBox == null) {
- FixFontSizeCheckBox = new JCheckBox();
- FixFontSizeCheckBox.setText("\83t\83H\83\93\83g\83T\83C\83Y\82ð\89æ\96Ê\82É\82 \82í\82¹\82Ä\8e©\93®\92²\90®\82·\82é");
- }
- return FixFontSizeCheckBox;
- }
-
- /**
- * This method initializes DelCommentCheckBox
- *
- * @return javax.swing.JCheckBox
- */
- private JCheckBox getDelCommentCheckBox() {
- if (DelCommentCheckBox == null) {
- DelCommentCheckBox = new JCheckBox();
- DelCommentCheckBox.setText("\95Ï\8a·\8cã\82É\83R\83\81\83\93\83g\83t\83@\83C\83\8b\82ð\8dí\8f\9c\82·\82é");
- }
- return DelCommentCheckBox;
- }
-
- /**
- * This method initializes FixCommentNumCheckBox
- *
- * @return javax.swing.JCheckBox
- */
- private JCheckBox getFixCommentNumCheckBox() {
- if (FixCommentNumCheckBox == null) {
- FixCommentNumCheckBox = new JCheckBox();
- FixCommentNumCheckBox.setText("\83R\83\81\83\93\83g\8eæ\93¾\90\94\82Í\8e©\93®\82Å\92²\90®\82·\82é");
- }
- return FixCommentNumCheckBox;
- }
-
- /**
- * This method initializes OpaqueCommentCheckBox
- *
- * @return javax.swing.JCheckBox
- */
- private JCheckBox getOpaqueCommentCheckBox() {
- if (OpaqueCommentCheckBox == null) {
- OpaqueCommentCheckBox = new JCheckBox();
- OpaqueCommentCheckBox.setText("\91S\82Ä\82Ì\83R\83\81\83\93\83g\82ð\95s\93§\96¾\82É\82·\82é");
- }
- return OpaqueCommentCheckBox;
- }
-
- /**
- * This method initializes SaveInfoTabPaneEach
- *
- * @return javax.swing.JTabbedPane
- */
- private JTabbedPane getSaveInfoTabPaneEach() {
- if (SaveInfoTabPaneEach == null) {
- SaveInfoTabPaneEach = new JTabbedPane();
- SaveInfoTabPaneEach.addTab("\93®\89æ\81E\83R\83\81\83\93\83g", null,
- getVideoSavingTabbedPanel(), null);
- SaveInfoTabPaneEach.addTab("\83R\83\81\83\93\83g\95t\82«\93®\89æ", null,
- getConvertedVideoSavingTabbedPanel(), null);
- }
- return SaveInfoTabPaneEach;
- }
-
- /**
- * This method initializes VideoSavingTabbedPanel
- *
- * @return javax.swing.JPanel
- */
- private JPanel getVideoSavingTabbedPanel() {
- if (VideoSavingTabbedPanel == null) {
- GridBagConstraints gridBagConstraints36 = new GridBagConstraints();
- gridBagConstraints36.weighty = 0.0;
- gridBagConstraints36.weightx = 1.0;
- gridBagConstraints36.fill = GridBagConstraints.HORIZONTAL;
- gridBagConstraints36.insets = new Insets(0, 5, 0, 5);
- gridBagConstraints36.anchor = GridBagConstraints.NORTH;
- GridBagConstraints gridBagConstraints37 = new GridBagConstraints(0,
- 1, 1, 1, 1.0, 0.0, GridBagConstraints.CENTER,
- GridBagConstraints.BOTH, new Insets(0, 5, 0, 5), 0, 0);
- gridBagConstraints37.anchor = GridBagConstraints.NORTH;
- gridBagConstraints37.gridx = 0;
- gridBagConstraints37.gridy = 1;
- gridBagConstraints37.weighty = 1.0;
- gridBagConstraints37.fill = GridBagConstraints.HORIZONTAL;
- VideoSavingTabbedPanel = new JPanel();
- VideoSavingTabbedPanel.setLayout(new GridBagLayout());
- VideoSavingTabbedPanel.add(videoSaveInfoPanel,
- gridBagConstraints36);
- VideoSavingTabbedPanel.add(CommentSaveInfoPanel,
- gridBagConstraints37);
- }
- return VideoSavingTabbedPanel;
- }
-
- /**
- * This method initializes ConvertedVideoSavingTabbedPanel
- *
- * @return javax.swing.JPanel
- */
- private JPanel getConvertedVideoSavingTabbedPanel() {
- if (ConvertedVideoSavingTabbedPanel == null) {
- GridBagConstraints gridBagConstraints38 = new GridBagConstraints(0,
- 2, 1, 1, 1.0, 1.0, GridBagConstraints.NORTH,
- GridBagConstraints.HORIZONTAL, new Insets(0, 5, 0, 5), 0, 0);
- gridBagConstraints38.gridx = -1;
- gridBagConstraints38.fill = GridBagConstraints.HORIZONTAL;
- gridBagConstraints38.gridy = -1;
- ConvertedVideoSavingTabbedPanel = new JPanel();
- ConvertedVideoSavingTabbedPanel.setLayout(new GridBagLayout());
- ConvertedVideoSavingTabbedPanel.add(ConvertedVideoSavingInfoPanel,
- gridBagConstraints38);
- }
- return ConvertedVideoSavingTabbedPanel;
- }
-
- /**
- * This method initializes NotAddVideoID_ConvVideoCheckBox
- *
- * @return javax.swing.JCheckBox
- */
- private JCheckBox getNotAddVideoID_ConvVideoCheckBox() {
- if (NotAddVideoID_ConvVideoCheckBox == null) {
- NotAddVideoID_ConvVideoCheckBox = new JCheckBox();
- NotAddVideoID_ConvVideoCheckBox.setText("\83t\83@\83C\83\8b\96¼\82É\93®\89æID\82ð\95t\89Á\82µ\82È\82¢");
- }
- return NotAddVideoID_ConvVideoCheckBox;
- }
-
- /**
- * This method initializes FFmpegOptionComboBox
- *
- * @return javax.swing.JComboBox
- */
- private final OptionComboBoxModel FFmpegOptionModel = new OptionComboBoxModel();
-
- private JLabel ExtOptionLabel = null;
-
- private JTextField ExtOptionField = null;
-
- private JCheckBox NotUseVhookCheckBox = null;
-
- private JTextField ViewCommentField = null;
-
- private JLabel ViewCommentLabel = null;
-
- private JLabel ShadowKindLabel = null;
-
- private JComboBox ShadowComboBox = null;
-
- private JComboBox getFFmpegOptionComboBox() {
- if (FFmpegOptionComboBox == null) {
- FFmpegOptionComboBox = new JComboBox(FFmpegOptionModel);
- FFmpegOptionComboBox
- .addActionListener(new java.awt.event.ActionListener() {
- public void actionPerformed(java.awt.event.ActionEvent e) {
- if (FFmpegOptionModel.isFile()) {// \83t\83@\83C\83\8b
- ExtOptionField.setEnabled(false);
- MainOptionField.setEnabled(false);
- CommandLineInOptionField.setEnabled(false);
- CommandLineOutOptionField.setEnabled(false);
- } else {// \83t\83@\83C\83\8b\82Å\82È\82¢
- ExtOptionField.setEnabled(true);
- MainOptionField.setEnabled(true);
- CommandLineInOptionField.setEnabled(true);
- CommandLineOutOptionField.setEnabled(true);
- }
- }
- });
- }
- return FFmpegOptionComboBox;
- }
-
- /**
- * This method initializes FFmpegOptionReloadButton
- *
- * @return javax.swing.JButton
- */
- private JButton getFFmpegOptionReloadButton() {
- if (FFmpegOptionReloadButton == null) {
- FFmpegOptionReloadButton = new JButton();
- FFmpegOptionReloadButton.setText("\8dX\90V");
- FFmpegOptionReloadButton
- .addActionListener(new java.awt.event.ActionListener() {
- public void actionPerformed(java.awt.event.ActionEvent e) {
- FFmpegOptionModel.reload();
- }
- });
- }
- return FFmpegOptionReloadButton;
- }
-
- /**
- * This method initializes FFmpegOptionComboBoxPanel
- *
- * @return javax.swing.JPanel
- */
- private JPanel getFFmpegOptionComboBoxPanel() {
- if (FFmpegOptionComboBoxPanel == null) {
- GridBagConstraints gridBagConstraints47 = new GridBagConstraints();
- gridBagConstraints47.fill = GridBagConstraints.BOTH;
- gridBagConstraints47.gridx = -1;
- gridBagConstraints47.gridy = -1;
- gridBagConstraints47.insets = new Insets(0, 0, 5, 5);
- GridBagConstraints gridBagConstraints46 = new GridBagConstraints();
- gridBagConstraints46.fill = GridBagConstraints.HORIZONTAL;
- gridBagConstraints46.gridwidth = 3;
- gridBagConstraints46.gridx = -1;
- gridBagConstraints46.gridy = -1;
- gridBagConstraints46.weightx = 1.0;
- gridBagConstraints46.insets = new Insets(0, 5, 5, 5);
- FFmpegOptionComboBoxPanel = new JPanel();
- FFmpegOptionComboBoxPanel.setLayout(new GridBagLayout());
- FFmpegOptionComboBoxPanel.add(getFFmpegOptionComboBox(),
- gridBagConstraints46);
- FFmpegOptionComboBoxPanel.add(getFFmpegOptionReloadButton(),
- gridBagConstraints47);
- }
- return FFmpegOptionComboBoxPanel;
- }
-
- /**
- * This method initializes ExtOptionField
- *
- * @return javax.swing.JTextField
- */
- private JTextField getExtOptionField() {
- if (ExtOptionField == null) {
- ExtOptionField = new JTextField();
- }
- return ExtOptionField;
- }
-
- /**
- * This method initializes NotUseVhookCheckBox
- *
- * @return javax.swing.JCheckBox
- */
- private JCheckBox getNotUseVhookCheckBox() {
- if (NotUseVhookCheckBox == null) {
- NotUseVhookCheckBox = new JCheckBox();
- NotUseVhookCheckBox.setText("\8ag\92£vhook\83\89\83C\83u\83\89\83\8a\82ð\96³\8cø\82É\82·\82é\81i\83f\83o\83b\83O\97p\81j");
- }
- return NotUseVhookCheckBox;
- }
-
- /**
- * This method initializes ViewCommentField
- *
- * @return javax.swing.JTextField
- */
- private JTextField getViewCommentField() {
- if (ViewCommentField == null) {
- ViewCommentField = new JTextField();
- }
- return ViewCommentField;
- }
-
- /**
- * This method initializes ShadowComboBox
- *
- * @return javax.swing.JComboBox
- */
-
- private JComboBox getShadowComboBox() {
- if (ShadowComboBox == null) {
- ShadowComboBox = new JComboBox(ConvertingSetting.ShadowKindArray);
- }
- return ShadowComboBox;
- }
-
- private class VideoSavePanelButtonListener implements ActionListener {
+ private class InputVideoPanelButtonListener implements ActionListener {
public void actionPerformed(ActionEvent e) {
final Object source = e.getSource();
}
}
+ private class InputCommentPanelButtonListener implements ActionListener {
+
+ public void actionPerformed(ActionEvent e) {
+ final Object source = e.getSource();
+ String title;
+ JTextField field;
+ boolean isSave;
+ boolean isDir;
+ if (source == savePanel.getShowSavingCommentFolderDialogButton()) {
+ title = "\83R\83\81\83\93\83g\82Ì\95Û\91¶\90æ(\83t\83H\83\8b\83_)";
+ field = savePanel.getCommentSavedFolderField();
+ isSave = true;
+ isDir = true;
+ } else if (source == savePanel.getShowSavingCommentFolderDialogButton()) {
+ title = "\83R\83\81\83\93\83g\82Ì\95Û\91¶\90æ(\83t\83@\83C\83\8b)";
+ field = savePanel.getCommentSavedFileField();
+ isSave = true;
+ isDir = false;
+ } else {
+ return;
+ }
+ showSaveDialog(title, field, isSave, isDir);
+ }
+ }
+
+ private class OutputVideoPanelButtonListener implements ActionListener {
+
+ public void actionPerformed(ActionEvent e) {
+ final Object source = e.getSource();
+ String title;
+ JTextField field;
+ boolean isSave;
+ boolean isDir;
+ if (source == savePanel.getShowSavingConvertedVideoFolderDialogButton()) {
+ title = "\83R\83\81\83\93\83g\95t\82«\93®\89æ\82Ì\95Û\91¶\90æ(\83t\83H\83\8b\83_)";
+ field = savePanel.getConvertedVideoSavedFolderField();
+ isSave = true;
+ isDir = true;
+ } else if (source == savePanel.getShowSavingConvertedVideoFileDialogButton()) {
+ title = "\83R\83\81\83\93\83g\95t\82«\93®\89æ\82Ì\95Û\91¶\90æ(\83t\83@\83C\83\8b)";
+ field = savePanel.getConvertedVideoSavedFileField();
+ isSave = true;
+ isDir = false;
+ } else {
+ return;
+ }
+ showSaveDialog(title, field, isSave, isDir);
+ }
+ }
+
private class VideoUseRadioButtonListener implements ActionListener {
public void actionPerformed(ActionEvent e) {
}
}
-class MainFrame_ShowSavingCommentFolderDialogButton_actionAdapter implements
- ActionListener {
- private MainFrame adaptee;
-
- MainFrame_ShowSavingCommentFolderDialogButton_actionAdapter(
- MainFrame adaptee) {
- this.adaptee = adaptee;
- }
-
- public void actionPerformed(ActionEvent e) {
- adaptee.ShowSavingCommentFolderDialogButton_actionPerformed(e);
- }
-}
-
-class MainFrame_ShowSavingConvertedVideoFolderDialogButton_actionAdapter
- implements ActionListener {
- private MainFrame adaptee;
-
- MainFrame_ShowSavingConvertedVideoFolderDialogButton_actionAdapter(
- MainFrame adaptee) {
- this.adaptee = adaptee;
- }
-
- public void actionPerformed(ActionEvent e) {
- adaptee.ShowSavingConvertedVideoFolderDialogButton_actionPerformed(e);
- }
-}
-
class MainFrame_this_windowAdapter extends WindowAdapter {
- private MainFrame adaptee;
- MainFrame_this_windowAdapter(MainFrame adaptee) {
- this.adaptee = adaptee;
- }
+ private MainFrame adaptee;
+
+ MainFrame_this_windowAdapter(MainFrame adaptee) {
+ this.adaptee = adaptee;
+ }
@Override
- public void windowClosing(WindowEvent e) {
- adaptee.this_windowClosing(e);
- }
+ public void windowClosing(WindowEvent e) {
+ adaptee.this_windowClosing(e);
+ }
}
class MainFrame_SettingFontPathButton_actionAdapter implements ActionListener {
- private MainFrame adaptee;
- MainFrame_SettingFontPathButton_actionAdapter(MainFrame adaptee) {
- this.adaptee = adaptee;
- }
+ private MainFrame adaptee;
- public void actionPerformed(ActionEvent e) {
- adaptee.SettingFontPathButton_actionPerformed(e);
- }
+ MainFrame_SettingFontPathButton_actionAdapter(MainFrame adaptee) {
+ this.adaptee = adaptee;
+ }
+
+ public void actionPerformed(ActionEvent e) {
+ adaptee.SettingFontPathButton_actionPerformed(e);
+ }
}
class MainFrame_SettingVhookPathButton_actionAdapter implements ActionListener {
- private MainFrame adaptee;
-
- MainFrame_SettingVhookPathButton_actionAdapter(MainFrame adaptee) {
- this.adaptee = adaptee;
- }
-
- public void actionPerformed(ActionEvent e) {
- adaptee.SettingVhookPathButton_actionPerformed(e);
- }
-}
-class MainFrame_SettingFFmpegPathButton_actionAdapter implements ActionListener {
- private MainFrame adaptee;
+ private MainFrame adaptee;
- MainFrame_SettingFFmpegPathButton_actionAdapter(MainFrame adaptee) {
- this.adaptee = adaptee;
- }
+ MainFrame_SettingVhookPathButton_actionAdapter(MainFrame adaptee) {
+ this.adaptee = adaptee;
+ }
- public void actionPerformed(ActionEvent e) {
- adaptee.SettingFFmpegPathButton_actionPerformed(e);
- }
+ public void actionPerformed(ActionEvent e) {
+ adaptee.SettingVhookPathButton_actionPerformed(e);
+ }
}
-class MainFrame_ShowSavingConvertedVideoDialogButton_actionAdapter implements
- ActionListener {
- private MainFrame adaptee;
-
- MainFrame_ShowSavingConvertedVideoDialogButton_actionAdapter(
- MainFrame adaptee) {
- this.adaptee = adaptee;
- }
-
- public void actionPerformed(ActionEvent e) {
- adaptee.ShowSavingConvertedVideoDialogButton_actionPerformed(e);
- }
-}
+class MainFrame_SettingFFmpegPathButton_actionAdapter implements ActionListener {
-class MainFrame_ShowSavingCommentDialogButton_actionAdapter implements
- ActionListener {
- private MainFrame adaptee;
+ private MainFrame adaptee;
- MainFrame_ShowSavingCommentDialogButton_actionAdapter(MainFrame adaptee) {
- this.adaptee = adaptee;
- }
+ MainFrame_SettingFFmpegPathButton_actionAdapter(MainFrame adaptee) {
+ this.adaptee = adaptee;
+ }
- public void actionPerformed(ActionEvent e) {
- adaptee.ShowSavingCommentDialogButton_actionPerformed(e);
- }
+ public void actionPerformed(ActionEvent e) {
+ adaptee.SettingFFmpegPathButton_actionPerformed(e);
+ }
}
class MainFrame_DoButton_actionAdapter implements ActionListener {
- private MainFrame adaptee;
- MainFrame_DoButton_actionAdapter(MainFrame adaptee) {
- this.adaptee = adaptee;
- }
+ private MainFrame adaptee;
- public void actionPerformed(ActionEvent e) {
- adaptee.DoButton_actionPerformed(e);
- }
+ MainFrame_DoButton_actionAdapter(MainFrame adaptee) {
+ this.adaptee = adaptee;
+ }
+
+ public void actionPerformed(ActionEvent e) {
+ adaptee.DoButton_actionPerformed(e);
+ }
}
class MainFrame_jMenuFileExit_ActionAdapter implements ActionListener {
- MainFrame adaptee;
- MainFrame_jMenuFileExit_ActionAdapter(MainFrame adaptee) {
- this.adaptee = adaptee;
- }
+ MainFrame adaptee;
+
+ MainFrame_jMenuFileExit_ActionAdapter(MainFrame adaptee) {
+ this.adaptee = adaptee;
+ }
- public void actionPerformed(ActionEvent actionEvent) {
- adaptee.jMenuFileExit_actionPerformed(actionEvent);
- }
+ public void actionPerformed(ActionEvent actionEvent) {
+ adaptee.jMenuFileExit_actionPerformed(actionEvent);
+ }
}
class MainFrame_jMenuHelpAbout_ActionAdapter implements ActionListener {
- MainFrame adaptee;
- MainFrame_jMenuHelpAbout_ActionAdapter(MainFrame adaptee) {
- this.adaptee = adaptee;
- }
+ MainFrame adaptee;
+
+ MainFrame_jMenuHelpAbout_ActionAdapter(MainFrame adaptee) {
+ this.adaptee = adaptee;
+ }
- public void actionPerformed(ActionEvent actionEvent) {
- adaptee.jMenuHelpAbout_actionPerformed(actionEvent);
- }
+ public void actionPerformed(ActionEvent actionEvent) {
+ adaptee.jMenuHelpAbout_actionPerformed(actionEvent);
+ }
}