OSDN Git Service

フィールド宣言準変更
[coroid/inqubus.git] / frontend / src / yukihane / inqubus / gui / ConfigDialog.java
1 /*
2  * Properties.java
3  *
4  * Created on 2011/08/20, 16:33:03
5  */
6 package yukihane.inqubus.gui;
7
8 import java.util.Arrays;
9 import java.util.List;
10 import javax.swing.BorderFactory;
11 import javax.swing.ButtonGroup;
12 import javax.swing.DefaultComboBoxModel;
13 import javax.swing.DefaultListModel;
14 import javax.swing.GroupLayout;
15 import javax.swing.GroupLayout.Alignment;
16 import javax.swing.JButton;
17 import javax.swing.JCheckBox;
18 import javax.swing.JComboBox;
19 import javax.swing.JDialog;
20 import javax.swing.JFrame;
21 import javax.swing.JLabel;
22 import javax.swing.JList;
23 import javax.swing.JPanel;
24 import javax.swing.JRadioButton;
25 import javax.swing.JScrollPane;
26 import javax.swing.JTabbedPane;
27 import javax.swing.JTextField;
28 import javax.swing.LayoutStyle.ComponentPlacement;
29 import javax.swing.UIManager;
30 import javax.swing.UnsupportedLookAndFeelException;
31 import javax.swing.WindowConstants;
32 import yukihane.inqubus.Config;
33
34 /**
35  *
36  * @author yuki
37  */
38 public class ConfigDialog extends JDialog {
39     private static final long serialVersionUID = 1L;
40
41     /** Creates new form Properties */
42     public ConfigDialog() {
43         this(null);
44     }
45
46     public ConfigDialog(JFrame owner){
47         super(owner);
48
49         final ButtonGroup buttonGroup1 = new ButtonGroup();
50         final JTabbedPane tabbedPane = new JTabbedPane();
51         final JPanel pnlNetwork = new JPanel();
52         final JPanel pnlAccount = new JPanel();
53         final JLabel lblMail = new JLabel();
54         fldMail = new JTextField();
55         final JLabel lblPassword = new JLabel();
56         fldPassword = new JTextField();
57         final JPanel pnlProxy = new JPanel();
58         cbProxyUse = new JCheckBox();
59         final JLabel lblProxyHost = new JLabel();
60         final JLabel lblProxyPort = new JLabel();
61         fldProxyHost = new JTextField();
62         fldProxyPort = new JTextField();
63         final JPanel pnlFile = new JPanel();
64         final JPanel pnlFileVideo = new JPanel();
65         final JLabel lblVideoDir = new JLabel();
66         final JLabel lblVideoFileNamepattern = new JLabel();
67         fldVideoDir = new JTextField();
68         fldVideoFileNamePattern = new JTextField();
69         btnVideoDir = new JButton();
70         cbVideoLocal = new JCheckBox();
71         final JPanel pnlFileComment = new JPanel();
72         final JLabel lblCommentDir = new JLabel();
73         final JLabel lblCommentFileNamePattern = new JLabel();
74         fldCommentDir = new JTextField();
75         fldCommentFileNamePattern = new JTextField();
76         btnCommentDir = new JButton();
77         cbCommentLocal = new JCheckBox();
78         final JPanel pnlFileOutput = new JPanel();
79         final JLabel lblOutputDir = new JLabel();
80         final JLabel lblOutputFileNamePattern = new JLabel();
81         fldOutputDir = new JTextField();
82         fldOutputFileNamePattern = new JTextField();
83         btnOutputDir = new JButton();
84         cbOutputEnable = new JCheckBox();
85         cbOutputCommentOverlay = new JCheckBox();
86         cbOutputDisplayProgress = new JCheckBox();
87         final JPanel pnlComment = new JPanel();
88         final JPanel pnlCommentStandard = new JPanel();
89         final JLabel lblCommentSize = new JLabel();
90         cbCommentSizeAuto = new JCheckBox();
91         final JLabel lblCommentSizeManual = new JLabel();
92         fldCommentSizeManual = new JTextField();
93         final JLabel lblCommentMinSize = new JLabel();
94         cbCommentMinSizeAuto = new JCheckBox();
95         fldCommentMinSizeManual = new JTextField();
96         final JLabel lblCommentMinSizeManual = new JLabel();
97         final JLabel lblCommentDisplayMax = new JLabel();
98         cbCommentDisplaySizeDefault = new JCheckBox();
99         final JLabel lblCommentDisplayMaxManual = new JLabel();
100         fldCommentDisplaySizeManual = new JTextField();
101         final JPanel pnlCommentAdvanced = new JPanel();
102         final JLabel lblFontPath = new JLabel();
103         cbFontSizeArrangeDisable = new JCheckBox();
104         cbCommentOpaque = new JCheckBox();
105         fldFontPath = new JTextField();
106         btnFontPath = new JButton();
107         final JLabel lblFontIndex = new JLabel();
108         final JLabel lblFontShadow = new JLabel();
109         fldFontIndex = new JTextField();
110         fldFontShadow = new JTextField();
111         final JPanel pnlFfmpeg = new JPanel();
112         final JPanel jPanel10 = new JPanel();
113         final JLabel lblFfmpegPath = new JLabel();
114         final JLabel lblFfmpegDllPath = new JLabel();
115         fldFfmpegPath = new JTextField();
116         fldFfmpegDllPath = new JTextField();
117         btnFfmpegPath = new JButton();
118         btnFfmpegDllPath = new JButton();
119         final JPanel pnlFfmpegParam = new JPanel();
120         rbFfmpegOptionFile = new JRadioButton();
121         rbFfmpegOptionDirectInput = new JRadioButton();
122         cmbFfmpegOptionFile = new JComboBox();
123         final JPanel pnlFfmpegParamOption = new JPanel();
124         final JLabel lblFfmpegOptionExtension = new JLabel();
125         final JLabel lblFfmpegOptionMain = new JLabel();
126         final JLabel lblFfmpegOptionIn = new JLabel();
127         final JLabel lblFfmpegOptionOut = new JLabel();
128         final JLabel lblFfmpegOptionAvfilter = new JLabel();
129         cbFfmpegOptionResize = new JCheckBox();
130         final JLabel lblFfmpegOptionResizeWidth = new JLabel();
131         fldFfmpegOptionResizeWidth = new JTextField();
132         final JLabel lblFfmpegOptionResizeHeight = new JLabel();
133         fldFfmpegOptionResizeHeight = new JTextField();
134         cbFfmpegOptionKeepAspect = new JCheckBox();
135         fldFfmpegOptionExtension = new JTextField();
136         fldFfmpegOptionMain = new JTextField();
137         fldFfmpegOptionIn = new JTextField();
138         fldFfmpegOptionOut = new JTextField();
139         fldFfmpegOptionAv = new JTextField();
140         final JPanel pnlNgSetting = new JPanel();
141         final JPanel pnlNgWord = new JPanel();
142         final JScrollPane scrNgWord = new JScrollPane();
143         lstNgWord = new JList<>();
144         fldNgWord = new JTextField();
145         btnNgWordAdd = new JButton();
146         btnNgWordDel = new JButton();
147         final JPanel pnlNgId = new JPanel();
148         final JScrollPane scrNgId = new JScrollPane();
149         lstNgId = new JList<>();
150         fldNgId = new JTextField();
151         btnNgIdAdd = new JButton();
152         btnNgIdDel = new JButton();
153         final JPanel pnlSearch = new JPanel();
154         final JPanel pnlSearchVideo = new JPanel();
155         final JScrollPane srcSearchVideo = new JScrollPane();
156         lstSearchVideo = new JList<>();
157         btnSearchVideoAdd = new JButton();
158         btnSearchVideoDel = new JButton();
159         final JPanel pnlSearchComment = new JPanel();
160         final JScrollPane srcSearchComment = new JScrollPane();
161         lstSearchComment = new JList<>();
162         btnSearchCommentAdd = new JButton();
163         btnSearchCommentDel = new JButton();
164         final JPanel pnlSearchCache = new JPanel();
165         final JLabel lblSearchCache = new JLabel();
166         fldSearchCache = new JTextField();
167
168         setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
169
170         pnlNetwork.setBorder(BorderFactory.createEmptyBorder(1, 1, 1, 1));
171
172         pnlAccount.setBorder(BorderFactory.createTitledBorder("アカウント"));
173
174         lblMail.setText("ID(メールアドレス)");
175
176         lblPassword.setText("パスワード");
177
178         GroupLayout gl_pnlAccount = new GroupLayout(pnlAccount);
179         pnlAccount.setLayout(gl_pnlAccount);
180         gl_pnlAccount.setHorizontalGroup(
181             gl_pnlAccount.createParallelGroup(GroupLayout.Alignment.LEADING)
182             .addGroup(gl_pnlAccount.createSequentialGroup()
183                 .addContainerGap()
184                 .addGroup(gl_pnlAccount.createParallelGroup(GroupLayout.Alignment.LEADING)
185                     .addComponent(lblMail)
186                     .addComponent(lblPassword))
187                 .addPreferredGap(ComponentPlacement.RELATED)
188                 .addGroup(gl_pnlAccount.createParallelGroup(GroupLayout.Alignment.LEADING)
189                     .addComponent(fldPassword, GroupLayout.DEFAULT_SIZE, 306, Short.MAX_VALUE)
190                     .addComponent(fldMail, GroupLayout.DEFAULT_SIZE, 306, Short.MAX_VALUE))
191                 .addContainerGap())
192         );
193         gl_pnlAccount.setVerticalGroup(
194             gl_pnlAccount.createParallelGroup(GroupLayout.Alignment.LEADING)
195             .addGroup(gl_pnlAccount.createSequentialGroup()
196                 .addContainerGap()
197                 .addGroup(gl_pnlAccount.createParallelGroup(GroupLayout.Alignment.BASELINE)
198                     .addComponent(lblMail)
199                     .addComponent(fldMail, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
200                 .addPreferredGap(ComponentPlacement.RELATED)
201                 .addGroup(gl_pnlAccount.createParallelGroup(GroupLayout.Alignment.BASELINE)
202                     .addComponent(lblPassword)
203                     .addComponent(fldPassword, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
204                 .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
205         );
206
207         pnlProxy.setBorder(BorderFactory.createTitledBorder("プロキシ"));
208
209         cbProxyUse.setText("プロキシを使用する");
210
211         lblProxyHost.setText("ホスト名");
212
213         lblProxyPort.setText("ポート番号");
214
215         GroupLayout gl_pnlProxy = new GroupLayout(pnlProxy);
216         pnlProxy.setLayout(gl_pnlProxy);
217         gl_pnlProxy.setHorizontalGroup(
218             gl_pnlProxy.createParallelGroup(GroupLayout.Alignment.LEADING)
219             .addGroup(gl_pnlProxy.createSequentialGroup()
220                 .addContainerGap()
221                 .addGroup(gl_pnlProxy.createParallelGroup(GroupLayout.Alignment.LEADING)
222                     .addComponent(cbProxyUse)
223                     .addGroup(gl_pnlProxy.createSequentialGroup()
224                         .addComponent(lblProxyHost)
225                         .addGap(18, 18, 18)
226                         .addComponent(fldProxyHost, GroupLayout.PREFERRED_SIZE, 168, GroupLayout.PREFERRED_SIZE))
227                     .addGroup(gl_pnlProxy.createSequentialGroup()
228                         .addComponent(lblProxyPort)
229                         .addPreferredGap(ComponentPlacement.RELATED)
230                         .addComponent(fldProxyPort, GroupLayout.PREFERRED_SIZE, 76, GroupLayout.PREFERRED_SIZE)))
231                 .addContainerGap(181, Short.MAX_VALUE))
232         );
233         gl_pnlProxy.setVerticalGroup(
234             gl_pnlProxy.createParallelGroup(GroupLayout.Alignment.LEADING)
235             .addGroup(gl_pnlProxy.createSequentialGroup()
236                 .addContainerGap()
237                 .addComponent(cbProxyUse)
238                 .addPreferredGap(ComponentPlacement.RELATED)
239                 .addGroup(gl_pnlProxy.createParallelGroup(GroupLayout.Alignment.BASELINE)
240                     .addComponent(lblProxyHost)
241                     .addComponent(fldProxyHost, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
242                 .addPreferredGap(ComponentPlacement.RELATED)
243                 .addGroup(gl_pnlProxy.createParallelGroup(GroupLayout.Alignment.BASELINE)
244                     .addComponent(lblProxyPort)
245                     .addComponent(fldProxyPort, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
246                 .addContainerGap(39, Short.MAX_VALUE))
247         );
248
249         GroupLayout gl_pnlNetwork = new GroupLayout(pnlNetwork);
250         pnlNetwork.setLayout(gl_pnlNetwork);
251         gl_pnlNetwork.setHorizontalGroup(
252             gl_pnlNetwork.createParallelGroup(GroupLayout.Alignment.LEADING)
253             .addGroup(GroupLayout.Alignment.TRAILING, gl_pnlNetwork.createSequentialGroup()
254                 .addContainerGap()
255                 .addGroup(gl_pnlNetwork.createParallelGroup(GroupLayout.Alignment.TRAILING)
256                     .addComponent(pnlProxy, GroupLayout.Alignment.LEADING, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
257                     .addComponent(pnlAccount, GroupLayout.Alignment.LEADING, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
258                 .addContainerGap())
259         );
260         gl_pnlNetwork.setVerticalGroup(
261             gl_pnlNetwork.createParallelGroup(GroupLayout.Alignment.LEADING)
262             .addGroup(gl_pnlNetwork.createSequentialGroup()
263                 .addContainerGap()
264                 .addComponent(pnlAccount, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
265                 .addPreferredGap(ComponentPlacement.RELATED)
266                 .addComponent(pnlProxy, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
267                 .addContainerGap(178, Short.MAX_VALUE))
268         );
269
270         tabbedPane.addTab("ネットワーク", pnlNetwork);
271
272         pnlFileVideo.setBorder(BorderFactory.createTitledBorder("動画"));
273
274         lblVideoDir.setText("保存フォルダ");
275
276         lblVideoFileNamepattern.setText("ファイル名規則");
277
278         btnVideoDir.setText("...");
279
280         cbVideoLocal.setText("local");
281
282         GroupLayout gl_pnlFileVideo = new GroupLayout(pnlFileVideo);
283         pnlFileVideo.setLayout(gl_pnlFileVideo);
284         gl_pnlFileVideo.setHorizontalGroup(
285             gl_pnlFileVideo.createParallelGroup(GroupLayout.Alignment.LEADING)
286             .addGroup(GroupLayout.Alignment.TRAILING, gl_pnlFileVideo.createSequentialGroup()
287                 .addContainerGap()
288                 .addGroup(gl_pnlFileVideo.createParallelGroup(GroupLayout.Alignment.LEADING)
289                     .addComponent(lblVideoFileNamepattern)
290                     .addComponent(lblVideoDir))
291                 .addPreferredGap(ComponentPlacement.RELATED)
292                 .addGroup(gl_pnlFileVideo.createParallelGroup(GroupLayout.Alignment.LEADING)
293                     .addGroup(gl_pnlFileVideo.createSequentialGroup()
294                         .addComponent(fldVideoDir, GroupLayout.DEFAULT_SIZE, 262, Short.MAX_VALUE)
295                         .addPreferredGap(ComponentPlacement.RELATED)
296                         .addComponent(btnVideoDir))
297                     .addGroup(GroupLayout.Alignment.TRAILING, gl_pnlFileVideo.createSequentialGroup()
298                         .addComponent(fldVideoFileNamePattern, GroupLayout.PREFERRED_SIZE, 165, GroupLayout.PREFERRED_SIZE)
299                         .addPreferredGap(ComponentPlacement.RELATED, 94, Short.MAX_VALUE)
300                         .addComponent(cbVideoLocal)))
301                 .addContainerGap())
302         );
303         gl_pnlFileVideo.setVerticalGroup(
304             gl_pnlFileVideo.createParallelGroup(GroupLayout.Alignment.LEADING)
305             .addGroup(gl_pnlFileVideo.createSequentialGroup()
306                 .addGroup(gl_pnlFileVideo.createParallelGroup(GroupLayout.Alignment.BASELINE)
307                     .addComponent(lblVideoDir)
308                     .addComponent(fldVideoDir, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
309                     .addComponent(btnVideoDir))
310                 .addPreferredGap(ComponentPlacement.RELATED)
311                 .addGroup(gl_pnlFileVideo.createParallelGroup(GroupLayout.Alignment.BASELINE)
312                     .addComponent(lblVideoFileNamepattern)
313                     .addComponent(fldVideoFileNamePattern, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
314                     .addComponent(cbVideoLocal))
315                 .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
316         );
317
318         pnlFileComment.setBorder(BorderFactory.createTitledBorder("コメント"));
319
320         lblCommentDir.setText("保存フォルダ");
321
322         lblCommentFileNamePattern.setText("ファイル名規則");
323
324         btnCommentDir.setText("...");
325
326         cbCommentLocal.setText("local");
327
328         GroupLayout gl_pnlFileComment = new GroupLayout(pnlFileComment);
329         pnlFileComment.setLayout(gl_pnlFileComment);
330         gl_pnlFileComment.setHorizontalGroup(
331             gl_pnlFileComment.createParallelGroup(GroupLayout.Alignment.LEADING)
332             .addGroup(gl_pnlFileComment.createSequentialGroup()
333                 .addContainerGap()
334                 .addGroup(gl_pnlFileComment.createParallelGroup(GroupLayout.Alignment.LEADING)
335                     .addComponent(lblCommentFileNamePattern)
336                     .addComponent(lblCommentDir))
337                 .addPreferredGap(ComponentPlacement.RELATED)
338                 .addGroup(gl_pnlFileComment.createParallelGroup(GroupLayout.Alignment.LEADING)
339                     .addGroup(gl_pnlFileComment.createSequentialGroup()
340                         .addComponent(fldCommentFileNamePattern, GroupLayout.PREFERRED_SIZE, 166, GroupLayout.PREFERRED_SIZE)
341                         .addPreferredGap(ComponentPlacement.RELATED, 93, Short.MAX_VALUE)
342                         .addComponent(cbCommentLocal))
343                     .addGroup(gl_pnlFileComment.createSequentialGroup()
344                         .addComponent(fldCommentDir, GroupLayout.DEFAULT_SIZE, 262, Short.MAX_VALUE)
345                         .addPreferredGap(ComponentPlacement.RELATED)
346                         .addComponent(btnCommentDir)))
347                 .addContainerGap())
348         );
349         gl_pnlFileComment.setVerticalGroup(
350             gl_pnlFileComment.createParallelGroup(GroupLayout.Alignment.LEADING)
351             .addGroup(gl_pnlFileComment.createSequentialGroup()
352                 .addGroup(gl_pnlFileComment.createParallelGroup(GroupLayout.Alignment.BASELINE)
353                     .addComponent(lblCommentDir)
354                     .addComponent(fldCommentDir, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
355                     .addComponent(btnCommentDir))
356                 .addPreferredGap(ComponentPlacement.RELATED)
357                 .addGroup(gl_pnlFileComment.createParallelGroup(GroupLayout.Alignment.BASELINE)
358                     .addComponent(lblCommentFileNamePattern)
359                     .addComponent(fldCommentFileNamePattern, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
360                     .addComponent(cbCommentLocal))
361                 .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
362         );
363
364         pnlFileOutput.setBorder(BorderFactory.createTitledBorder("変換動画"));
365
366         lblOutputDir.setText("保存フォルダ");
367
368         lblOutputFileNamePattern.setText("ファイル名規則");
369
370         btnOutputDir.setText("...");
371
372         cbOutputEnable.setText("変換");
373
374         cbOutputCommentOverlay.setText("コメント付与");
375
376         cbOutputDisplayProgress.setText("変換中動画表示");
377
378         GroupLayout gl_pnlFileOutput = new GroupLayout(pnlFileOutput);
379         pnlFileOutput.setLayout(gl_pnlFileOutput);
380         gl_pnlFileOutput.setHorizontalGroup(
381             gl_pnlFileOutput.createParallelGroup(GroupLayout.Alignment.LEADING)
382             .addGroup(gl_pnlFileOutput.createSequentialGroup()
383                 .addContainerGap()
384                 .addGroup(gl_pnlFileOutput.createParallelGroup(GroupLayout.Alignment.LEADING)
385                     .addComponent(lblOutputFileNamePattern)
386                     .addComponent(lblOutputDir))
387                 .addPreferredGap(ComponentPlacement.RELATED)
388                 .addGroup(gl_pnlFileOutput.createParallelGroup(GroupLayout.Alignment.LEADING)
389                     .addGroup(gl_pnlFileOutput.createSequentialGroup()
390                         .addComponent(fldOutputDir, GroupLayout.DEFAULT_SIZE, 262, Short.MAX_VALUE)
391                         .addPreferredGap(ComponentPlacement.RELATED)
392                         .addComponent(btnOutputDir)
393                         .addContainerGap())
394                     .addGroup(GroupLayout.Alignment.TRAILING, gl_pnlFileOutput.createSequentialGroup()
395                         .addComponent(fldOutputFileNamePattern, GroupLayout.PREFERRED_SIZE, 167, GroupLayout.PREFERRED_SIZE)
396                         .addPreferredGap(ComponentPlacement.RELATED, 23, Short.MAX_VALUE)
397                         .addGroup(gl_pnlFileOutput.createParallelGroup(GroupLayout.Alignment.LEADING)
398                             .addComponent(cbOutputDisplayProgress)
399                             .addGroup(gl_pnlFileOutput.createSequentialGroup()
400                                 .addComponent(cbOutputEnable)
401                                 .addPreferredGap(ComponentPlacement.RELATED)
402                                 .addComponent(cbOutputCommentOverlay))))))
403         );
404         gl_pnlFileOutput.setVerticalGroup(
405             gl_pnlFileOutput.createParallelGroup(GroupLayout.Alignment.LEADING)
406             .addGroup(gl_pnlFileOutput.createSequentialGroup()
407                 .addGroup(gl_pnlFileOutput.createParallelGroup(GroupLayout.Alignment.BASELINE)
408                     .addComponent(lblOutputDir)
409                     .addComponent(fldOutputDir, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
410                     .addComponent(btnOutputDir))
411                 .addPreferredGap(ComponentPlacement.RELATED)
412                 .addGroup(gl_pnlFileOutput.createParallelGroup(GroupLayout.Alignment.BASELINE)
413                     .addComponent(lblOutputFileNamePattern)
414                     .addComponent(fldOutputFileNamePattern, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
415                     .addComponent(cbOutputCommentOverlay)
416                     .addComponent(cbOutputEnable))
417                 .addPreferredGap(ComponentPlacement.RELATED)
418                 .addComponent(cbOutputDisplayProgress)
419                 .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
420         );
421
422         GroupLayout gl_pnlFile = new GroupLayout(pnlFile);
423         pnlFile.setLayout(gl_pnlFile);
424         gl_pnlFile.setHorizontalGroup(
425             gl_pnlFile.createParallelGroup(GroupLayout.Alignment.LEADING)
426             .addGroup(GroupLayout.Alignment.TRAILING, gl_pnlFile.createSequentialGroup()
427                 .addContainerGap()
428                 .addGroup(gl_pnlFile.createParallelGroup(GroupLayout.Alignment.TRAILING)
429                     .addComponent(pnlFileOutput, GroupLayout.Alignment.LEADING, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
430                     .addComponent(pnlFileVideo, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
431                     .addComponent(pnlFileComment, GroupLayout.Alignment.LEADING, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
432                 .addContainerGap())
433         );
434         gl_pnlFile.setVerticalGroup(
435             gl_pnlFile.createParallelGroup(GroupLayout.Alignment.LEADING)
436             .addGroup(gl_pnlFile.createSequentialGroup()
437                 .addContainerGap()
438                 .addComponent(pnlFileVideo, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
439                 .addPreferredGap(ComponentPlacement.RELATED)
440                 .addComponent(pnlFileComment, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
441                 .addPreferredGap(ComponentPlacement.RELATED)
442                 .addComponent(pnlFileOutput, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
443                 .addContainerGap())
444         );
445
446         tabbedPane.addTab("ファイル", pnlFile);
447
448         pnlCommentStandard.setBorder(BorderFactory.createTitledBorder(""));
449
450         lblCommentSize.setText("再生時間に応じたコメントの取得数");
451
452         cbCommentSizeAuto.setText("自動調整");
453
454         lblCommentSizeManual.setText("手動取得");
455
456         lblCommentMinSize.setText("1分当たりのコメント取得数");
457
458         cbCommentMinSizeAuto.setText("自動調整");
459
460         lblCommentMinSizeManual.setText("手動取得");
461
462         lblCommentDisplayMax.setText("1画面に表示する最大コメント数");
463
464         cbCommentDisplaySizeDefault.setText("標準(30)");
465
466         lblCommentDisplayMaxManual.setText("手動設定");
467
468         GroupLayout gl_pnlCommentStandard = new GroupLayout(pnlCommentStandard);
469         pnlCommentStandard.setLayout(gl_pnlCommentStandard);
470         gl_pnlCommentStandard.setAutoCreateContainerGaps(true);
471         gl_pnlCommentStandard.setAutoCreateGaps(true);
472         gl_pnlCommentStandard.setHorizontalGroup(
473             gl_pnlCommentStandard.createSequentialGroup()
474                 .addGroup(gl_pnlCommentStandard.createParallelGroup(GroupLayout.Alignment.LEADING)
475                     .addComponent(lblCommentSize)
476                     .addComponent(lblCommentMinSize)
477                     .addComponent(lblCommentDisplayMax))
478                 .addGroup(gl_pnlCommentStandard.createParallelGroup(GroupLayout.Alignment.LEADING)
479                     .addComponent(cbCommentSizeAuto)
480                     .addComponent(cbCommentMinSizeAuto)
481                     .addComponent(cbCommentDisplaySizeDefault))
482                 .addGroup(gl_pnlCommentStandard.createParallelGroup(GroupLayout.Alignment.LEADING)
483                     .addComponent(lblCommentSizeManual)
484                     .addComponent(lblCommentMinSizeManual)
485                     .addComponent(lblCommentDisplayMaxManual))
486                 .addGroup(gl_pnlCommentStandard.createParallelGroup(GroupLayout.Alignment.LEADING)
487                     .addComponent(fldCommentSizeManual, 48, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
488                     .addComponent(fldCommentMinSizeManual, 48, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
489                     .addComponent(fldCommentDisplaySizeManual, 48, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
490         );
491         gl_pnlCommentStandard.setVerticalGroup(
492             gl_pnlCommentStandard.createSequentialGroup()
493                 .addGroup(gl_pnlCommentStandard.createParallelGroup(GroupLayout.Alignment.BASELINE)
494                     .addComponent(lblCommentSize)
495                     .addComponent(cbCommentSizeAuto)
496                     .addComponent(lblCommentSizeManual)
497                     .addComponent(fldCommentSizeManual))
498                 .addGroup(gl_pnlCommentStandard.createParallelGroup(GroupLayout.Alignment.BASELINE)
499                     .addComponent(lblCommentMinSize)
500                     .addComponent(cbCommentMinSizeAuto)
501                     .addComponent(lblCommentMinSizeManual)
502                     .addComponent(fldCommentMinSizeManual))
503                 .addGroup(gl_pnlCommentStandard.createParallelGroup(GroupLayout.Alignment.BASELINE)
504                     .addComponent(lblCommentDisplayMax)
505                     .addComponent(cbCommentDisplaySizeDefault)
506                     .addComponent(lblCommentDisplayMaxManual)
507                     .addComponent(fldCommentDisplaySizeManual))
508         );
509
510         pnlCommentAdvanced.setBorder(BorderFactory.createTitledBorder("高度な設定"));
511
512         lblFontPath.setText("フォントパス");
513
514         cbFontSizeArrangeDisable.setText("フォントサイズ調整を行わない");
515
516         cbCommentOpaque.setText("コメント透明化を行わない");
517
518         btnFontPath.setText("...");
519
520         lblFontIndex.setText("フォント番号");
521
522         lblFontShadow.setText("影の種類");
523
524         GroupLayout gl_pnlCommentAdvanced = new GroupLayout(pnlCommentAdvanced);
525         pnlCommentAdvanced.setLayout(gl_pnlCommentAdvanced);
526         gl_pnlCommentAdvanced.setHorizontalGroup(
527             gl_pnlCommentAdvanced.createParallelGroup(GroupLayout.Alignment.LEADING)
528             .addGroup(gl_pnlCommentAdvanced.createSequentialGroup()
529                 .addContainerGap()
530                 .addGroup(gl_pnlCommentAdvanced.createParallelGroup(GroupLayout.Alignment.LEADING)
531                     .addComponent(cbCommentOpaque)
532                     .addGroup(gl_pnlCommentAdvanced.createSequentialGroup()
533                         .addGroup(gl_pnlCommentAdvanced.createParallelGroup(GroupLayout.Alignment.LEADING)
534                             .addComponent(lblFontPath)
535                             .addComponent(lblFontIndex)
536                             .addComponent(lblFontShadow))
537                         .addGap(18, 18, 18)
538                         .addGroup(gl_pnlCommentAdvanced.createParallelGroup(GroupLayout.Alignment.LEADING)
539                             .addComponent(fldFontPath, GroupLayout.DEFAULT_SIZE, 275, Short.MAX_VALUE)
540                             .addGroup(gl_pnlCommentAdvanced.createParallelGroup(GroupLayout.Alignment.TRAILING, false)
541                                 .addComponent(fldFontShadow, GroupLayout.Alignment.LEADING)
542                                 .addComponent(fldFontIndex, GroupLayout.Alignment.LEADING, GroupLayout.DEFAULT_SIZE, 48, Short.MAX_VALUE)))
543                         .addPreferredGap(ComponentPlacement.RELATED)
544                         .addComponent(btnFontPath))
545                     .addComponent(cbFontSizeArrangeDisable))
546                 .addContainerGap())
547         );
548         gl_pnlCommentAdvanced.setVerticalGroup(
549             gl_pnlCommentAdvanced.createParallelGroup(GroupLayout.Alignment.LEADING)
550             .addGroup(gl_pnlCommentAdvanced.createSequentialGroup()
551                 .addGroup(gl_pnlCommentAdvanced.createParallelGroup(GroupLayout.Alignment.BASELINE)
552                     .addComponent(lblFontPath)
553                     .addComponent(fldFontPath, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
554                     .addComponent(btnFontPath))
555                 .addPreferredGap(ComponentPlacement.RELATED)
556                 .addGroup(gl_pnlCommentAdvanced.createParallelGroup(GroupLayout.Alignment.BASELINE)
557                     .addComponent(lblFontIndex)
558                     .addComponent(fldFontIndex, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
559                 .addPreferredGap(ComponentPlacement.RELATED)
560                 .addGroup(gl_pnlCommentAdvanced.createParallelGroup(GroupLayout.Alignment.BASELINE)
561                     .addComponent(lblFontShadow)
562                     .addComponent(fldFontShadow, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
563                 .addPreferredGap(ComponentPlacement.RELATED)
564                 .addComponent(cbFontSizeArrangeDisable)
565                 .addPreferredGap(ComponentPlacement.RELATED)
566                 .addComponent(cbCommentOpaque)
567                 .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
568         );
569
570         GroupLayout gl_pnlComment = new GroupLayout(pnlComment);
571         pnlComment.setLayout(gl_pnlComment);
572         gl_pnlComment.setHorizontalGroup(
573             gl_pnlComment.createParallelGroup(GroupLayout.Alignment.LEADING)
574             .addGroup(GroupLayout.Alignment.TRAILING, gl_pnlComment.createSequentialGroup()
575                 .addContainerGap()
576                 .addGroup(gl_pnlComment.createParallelGroup(GroupLayout.Alignment.TRAILING)
577                     .addComponent(pnlCommentAdvanced, GroupLayout.Alignment.LEADING, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
578                     .addComponent(pnlCommentStandard, GroupLayout.Alignment.LEADING, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
579                 .addContainerGap())
580         );
581         gl_pnlComment.setVerticalGroup(
582             gl_pnlComment.createParallelGroup(GroupLayout.Alignment.LEADING)
583             .addGroup(gl_pnlComment.createSequentialGroup()
584                 .addContainerGap()
585                 .addComponent(pnlCommentStandard, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
586                 .addPreferredGap(ComponentPlacement.RELATED)
587                 .addComponent(pnlCommentAdvanced, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
588                 .addContainerGap(168, Short.MAX_VALUE))
589         );
590
591         tabbedPane.addTab("コメント", pnlComment);
592
593         jPanel10.setBorder(BorderFactory.createTitledBorder("ファイルパス"));
594
595         lblFfmpegPath.setText("ffmpeg");
596
597         lblFfmpegDllPath.setText("拡張ライブラリ");
598
599         btnFfmpegPath.setText("...");
600
601         btnFfmpegDllPath.setText("...");
602
603         GroupLayout gl_jPanel10 = new GroupLayout(jPanel10);
604         jPanel10.setLayout(gl_jPanel10);
605         gl_jPanel10.setHorizontalGroup(
606             gl_jPanel10.createParallelGroup(GroupLayout.Alignment.LEADING)
607             .addGroup(gl_jPanel10.createSequentialGroup()
608                 .addContainerGap()
609                 .addGroup(gl_jPanel10.createParallelGroup(GroupLayout.Alignment.LEADING)
610                     .addComponent(lblFfmpegDllPath)
611                     .addComponent(lblFfmpegPath))
612                 .addPreferredGap(ComponentPlacement.RELATED)
613                 .addGroup(gl_jPanel10.createParallelGroup(GroupLayout.Alignment.LEADING)
614                     .addComponent(fldFfmpegDllPath, GroupLayout.Alignment.TRAILING, GroupLayout.DEFAULT_SIZE, 280, Short.MAX_VALUE)
615                     .addComponent(fldFfmpegPath, GroupLayout.Alignment.TRAILING, GroupLayout.DEFAULT_SIZE, 280, Short.MAX_VALUE))
616                 .addPreferredGap(ComponentPlacement.RELATED)
617                 .addGroup(gl_jPanel10.createParallelGroup(GroupLayout.Alignment.LEADING)
618                     .addComponent(btnFfmpegPath, GroupLayout.Alignment.TRAILING)
619                     .addComponent(btnFfmpegDllPath, GroupLayout.Alignment.TRAILING))
620                 .addContainerGap())
621         );
622         gl_jPanel10.setVerticalGroup(
623             gl_jPanel10.createParallelGroup(GroupLayout.Alignment.LEADING)
624             .addGroup(gl_jPanel10.createSequentialGroup()
625                 .addGroup(gl_jPanel10.createParallelGroup(GroupLayout.Alignment.BASELINE)
626                     .addComponent(lblFfmpegPath)
627                     .addComponent(fldFfmpegPath, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
628                     .addComponent(btnFfmpegPath))
629                 .addPreferredGap(ComponentPlacement.RELATED)
630                 .addGroup(gl_jPanel10.createParallelGroup(GroupLayout.Alignment.BASELINE)
631                     .addComponent(lblFfmpegDllPath)
632                     .addComponent(fldFfmpegDllPath, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
633                     .addComponent(btnFfmpegDllPath))
634                 .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
635         );
636
637         pnlFfmpegParam.setBorder(BorderFactory.createTitledBorder("ffmpegパラメータ"));
638
639         buttonGroup1.add(rbFfmpegOptionFile);
640         rbFfmpegOptionFile.setText("オプションファイル");
641
642         buttonGroup1.add(rbFfmpegOptionDirectInput);
643         rbFfmpegOptionDirectInput.setText("直接入力");
644
645         cmbFfmpegOptionFile.setModel(new DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
646
647         pnlFfmpegParamOption.setBorder(BorderFactory.createEtchedBorder());
648
649         lblFfmpegOptionExtension.setText("出力動画の拡張子");
650
651         lblFfmpegOptionMain.setText("メインオプション");
652
653         lblFfmpegOptionIn.setText("入力オプション");
654
655         lblFfmpegOptionOut.setText("出力オプション");
656
657         lblFfmpegOptionAvfilter.setText("avfilterオプション");
658
659         cbFfmpegOptionResize.setText("次のサイズに収まるよう縮小(-s)");
660
661         lblFfmpegOptionResizeWidth.setText("横");
662
663         lblFfmpegOptionResizeHeight.setText("縦");
664
665         cbFfmpegOptionKeepAspect.setText("アスペクト比を維持");
666
667         GroupLayout gl_pnlFfmpegParamOption = new GroupLayout(pnlFfmpegParamOption);
668         pnlFfmpegParamOption.setLayout(gl_pnlFfmpegParamOption);
669         gl_pnlFfmpegParamOption.setHorizontalGroup(
670             gl_pnlFfmpegParamOption.createParallelGroup(GroupLayout.Alignment.LEADING)
671             .addGroup(gl_pnlFfmpegParamOption.createSequentialGroup()
672                 .addGroup(gl_pnlFfmpegParamOption.createParallelGroup(GroupLayout.Alignment.LEADING)
673                     .addGroup(gl_pnlFfmpegParamOption.createSequentialGroup()
674                         .addContainerGap()
675                         .addGroup(gl_pnlFfmpegParamOption.createParallelGroup(GroupLayout.Alignment.LEADING)
676                             .addComponent(lblFfmpegOptionAvfilter)
677                             .addComponent(lblFfmpegOptionExtension)
678                             .addComponent(lblFfmpegOptionMain)
679                             .addComponent(lblFfmpegOptionIn)
680                             .addComponent(lblFfmpegOptionOut))
681                         .addPreferredGap(ComponentPlacement.RELATED)
682                         .addGroup(gl_pnlFfmpegParamOption.createParallelGroup(GroupLayout.Alignment.LEADING)
683                             .addComponent(fldFfmpegOptionExtension, GroupLayout.PREFERRED_SIZE, 51, GroupLayout.PREFERRED_SIZE)
684                             .addComponent(fldFfmpegOptionMain, GroupLayout.DEFAULT_SIZE, 268, Short.MAX_VALUE)
685                             .addComponent(fldFfmpegOptionIn, GroupLayout.DEFAULT_SIZE, 268, Short.MAX_VALUE)
686                             .addComponent(fldFfmpegOptionOut, GroupLayout.DEFAULT_SIZE, 268, Short.MAX_VALUE)
687                             .addComponent(fldFfmpegOptionAv, GroupLayout.DEFAULT_SIZE, 268, Short.MAX_VALUE)))
688                     .addGroup(gl_pnlFfmpegParamOption.createSequentialGroup()
689                         .addGap(12, 12, 12)
690                         .addComponent(cbFfmpegOptionResize)
691                         .addPreferredGap(ComponentPlacement.UNRELATED)
692                         .addComponent(lblFfmpegOptionResizeWidth)
693                         .addPreferredGap(ComponentPlacement.RELATED)
694                         .addComponent(fldFfmpegOptionResizeWidth, GroupLayout.PREFERRED_SIZE, 48, GroupLayout.PREFERRED_SIZE)
695                         .addGap(12, 12, 12)
696                         .addComponent(lblFfmpegOptionResizeHeight)
697                         .addPreferredGap(ComponentPlacement.RELATED)
698                         .addComponent(fldFfmpegOptionResizeHeight, GroupLayout.PREFERRED_SIZE, 48, GroupLayout.PREFERRED_SIZE))
699                     .addGroup(gl_pnlFfmpegParamOption.createSequentialGroup()
700                         .addGap(33, 33, 33)
701                         .addComponent(cbFfmpegOptionKeepAspect)))
702                 .addContainerGap())
703         );
704         gl_pnlFfmpegParamOption.setVerticalGroup(
705             gl_pnlFfmpegParamOption.createParallelGroup(GroupLayout.Alignment.LEADING)
706             .addGroup(gl_pnlFfmpegParamOption.createSequentialGroup()
707                 .addContainerGap()
708                 .addGroup(gl_pnlFfmpegParamOption.createParallelGroup(GroupLayout.Alignment.BASELINE)
709                     .addComponent(lblFfmpegOptionExtension)
710                     .addComponent(fldFfmpegOptionExtension, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
711                 .addPreferredGap(ComponentPlacement.RELATED)
712                 .addGroup(gl_pnlFfmpegParamOption.createParallelGroup(GroupLayout.Alignment.BASELINE)
713                     .addComponent(lblFfmpegOptionMain)
714                     .addComponent(fldFfmpegOptionMain, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
715                 .addPreferredGap(ComponentPlacement.RELATED)
716                 .addGroup(gl_pnlFfmpegParamOption.createParallelGroup(GroupLayout.Alignment.BASELINE)
717                     .addComponent(lblFfmpegOptionIn)
718                     .addComponent(fldFfmpegOptionIn, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
719                 .addPreferredGap(ComponentPlacement.RELATED)
720                 .addGroup(gl_pnlFfmpegParamOption.createParallelGroup(GroupLayout.Alignment.BASELINE)
721                     .addComponent(lblFfmpegOptionOut)
722                     .addComponent(fldFfmpegOptionOut, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
723                 .addPreferredGap(ComponentPlacement.RELATED)
724                 .addGroup(gl_pnlFfmpegParamOption.createParallelGroup(GroupLayout.Alignment.BASELINE)
725                     .addComponent(lblFfmpegOptionAvfilter)
726                     .addComponent(fldFfmpegOptionAv, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
727                 .addPreferredGap(ComponentPlacement.RELATED)
728                 .addGroup(gl_pnlFfmpegParamOption.createParallelGroup(GroupLayout.Alignment.BASELINE)
729                     .addComponent(cbFfmpegOptionResize)
730                     .addComponent(lblFfmpegOptionResizeWidth)
731                     .addComponent(fldFfmpegOptionResizeWidth, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
732                     .addComponent(lblFfmpegOptionResizeHeight)
733                     .addComponent(fldFfmpegOptionResizeHeight, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
734                 .addPreferredGap(ComponentPlacement.RELATED)
735                 .addComponent(cbFfmpegOptionKeepAspect)
736                 .addContainerGap())
737         );
738
739         GroupLayout gl_pnlFfmpegParam = new GroupLayout(pnlFfmpegParam);
740         pnlFfmpegParam.setLayout(gl_pnlFfmpegParam);
741         gl_pnlFfmpegParam.setHorizontalGroup(
742             gl_pnlFfmpegParam.createParallelGroup(Alignment.LEADING)
743             .addGroup(gl_pnlFfmpegParam.createSequentialGroup()
744                 .addContainerGap()
745                 .addGroup(gl_pnlFfmpegParam.createParallelGroup(Alignment.LEADING)
746                     .addComponent(pnlFfmpegParamOption, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
747                     .addGroup(gl_pnlFfmpegParam.createSequentialGroup()
748                         .addComponent(rbFfmpegOptionFile)
749                         .addPreferredGap(ComponentPlacement.RELATED)
750                         .addComponent(cmbFfmpegOptionFile, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
751                     .addComponent(rbFfmpegOptionDirectInput))
752                 .addContainerGap())
753         );
754         gl_pnlFfmpegParam.setVerticalGroup(
755             gl_pnlFfmpegParam.createParallelGroup(Alignment.LEADING)
756             .addGroup(gl_pnlFfmpegParam.createSequentialGroup()
757                 .addContainerGap()
758                 .addGroup(gl_pnlFfmpegParam.createParallelGroup(Alignment.BASELINE)
759                     .addComponent(rbFfmpegOptionFile)
760                     .addComponent(cmbFfmpegOptionFile, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
761                 .addPreferredGap(ComponentPlacement.RELATED)
762                 .addComponent(rbFfmpegOptionDirectInput)
763                 .addPreferredGap(ComponentPlacement.RELATED)
764                 .addComponent(pnlFfmpegParamOption, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
765                 .addContainerGap())
766         );
767
768         GroupLayout gl_pnlFfmpeg = new GroupLayout(pnlFfmpeg);
769         pnlFfmpeg.setLayout(gl_pnlFfmpeg);
770         gl_pnlFfmpeg.setHorizontalGroup(
771             gl_pnlFfmpeg.createParallelGroup(GroupLayout.Alignment.LEADING)
772             .addGroup(GroupLayout.Alignment.TRAILING, gl_pnlFfmpeg.createSequentialGroup()
773                 .addContainerGap()
774                 .addGroup(gl_pnlFfmpeg.createParallelGroup(GroupLayout.Alignment.TRAILING)
775                     .addComponent(pnlFfmpegParam, GroupLayout.Alignment.LEADING, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
776                     .addComponent(jPanel10, GroupLayout.Alignment.LEADING, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
777                 .addContainerGap())
778         );
779         gl_pnlFfmpeg.setVerticalGroup(
780             gl_pnlFfmpeg.createParallelGroup(GroupLayout.Alignment.LEADING)
781             .addGroup(gl_pnlFfmpeg.createSequentialGroup()
782                 .addContainerGap()
783                 .addComponent(jPanel10, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
784                 .addPreferredGap(ComponentPlacement.RELATED)
785                 .addComponent(pnlFfmpegParam, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
786                 .addContainerGap())
787         );
788
789         tabbedPane.addTab("ffmpeg", pnlFfmpeg);
790
791         pnlNgWord.setBorder(BorderFactory.createTitledBorder("NGワード"));
792
793         lstNgWord.setModel(mdlNgWord);
794         scrNgWord.setViewportView(lstNgWord);
795
796         btnNgWordAdd.setText("追加");
797
798         btnNgWordDel.setText("削除");
799
800         GroupLayout gl_pnlNgWord = new GroupLayout(pnlNgWord);
801         pnlNgWord.setLayout(gl_pnlNgWord);
802         gl_pnlNgWord.setHorizontalGroup(
803             gl_pnlNgWord.createParallelGroup(GroupLayout.Alignment.LEADING)
804             .addGroup(gl_pnlNgWord.createSequentialGroup()
805                 .addContainerGap()
806                 .addGroup(gl_pnlNgWord.createParallelGroup(GroupLayout.Alignment.LEADING)
807                     .addComponent(scrNgWord, GroupLayout.DEFAULT_SIZE, 395, Short.MAX_VALUE)
808                     .addGroup(gl_pnlNgWord.createSequentialGroup()
809                         .addComponent(fldNgWord, GroupLayout.DEFAULT_SIZE, 256, Short.MAX_VALUE)
810                         .addPreferredGap(ComponentPlacement.RELATED)
811                         .addComponent(btnNgWordAdd)
812                         .addGap(18, 18, 18)
813                         .addComponent(btnNgWordDel)))
814                 .addContainerGap())
815         );
816         gl_pnlNgWord.setVerticalGroup(
817             gl_pnlNgWord.createParallelGroup(GroupLayout.Alignment.LEADING)
818             .addGroup(gl_pnlNgWord.createSequentialGroup()
819                 .addComponent(scrNgWord, GroupLayout.PREFERRED_SIZE, 100, GroupLayout.PREFERRED_SIZE)
820                 .addPreferredGap(ComponentPlacement.RELATED)
821                 .addGroup(gl_pnlNgWord.createParallelGroup(GroupLayout.Alignment.BASELINE)
822                     .addComponent(fldNgWord, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
823                     .addComponent(btnNgWordDel)
824                     .addComponent(btnNgWordAdd))
825                 .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
826         );
827
828         pnlNgId.setBorder(BorderFactory.createTitledBorder("NGID"));
829
830         lstNgId.setModel(mdlNgId);
831         scrNgId.setViewportView(lstNgId);
832
833         btnNgIdAdd.setText("追加");
834
835         btnNgIdDel.setText("削除");
836
837         GroupLayout gl_pnlNgId = new GroupLayout(pnlNgId);
838         pnlNgId.setLayout(gl_pnlNgId);
839         gl_pnlNgId.setHorizontalGroup(
840             gl_pnlNgId.createParallelGroup(GroupLayout.Alignment.LEADING)
841             .addGroup(gl_pnlNgId.createSequentialGroup()
842                 .addContainerGap()
843                 .addGroup(gl_pnlNgId.createParallelGroup(GroupLayout.Alignment.LEADING)
844                     .addComponent(scrNgId, GroupLayout.DEFAULT_SIZE, 395, Short.MAX_VALUE)
845                     .addGroup(GroupLayout.Alignment.TRAILING, gl_pnlNgId.createSequentialGroup()
846                         .addComponent(fldNgId, GroupLayout.DEFAULT_SIZE, 256, Short.MAX_VALUE)
847                         .addPreferredGap(ComponentPlacement.RELATED)
848                         .addComponent(btnNgIdAdd)
849                         .addGap(18, 18, 18)
850                         .addComponent(btnNgIdDel)))
851                 .addContainerGap())
852         );
853         gl_pnlNgId.setVerticalGroup(
854             gl_pnlNgId.createParallelGroup(GroupLayout.Alignment.LEADING)
855             .addGroup(gl_pnlNgId.createSequentialGroup()
856                 .addComponent(scrNgId, GroupLayout.PREFERRED_SIZE, 100, GroupLayout.PREFERRED_SIZE)
857                 .addPreferredGap(ComponentPlacement.RELATED)
858                 .addGroup(gl_pnlNgId.createParallelGroup(GroupLayout.Alignment.BASELINE)
859                     .addComponent(fldNgId, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
860                     .addComponent(btnNgIdDel)
861                     .addComponent(btnNgIdAdd))
862                 .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
863         );
864
865         GroupLayout gl_pnlNgSetting = new GroupLayout(pnlNgSetting);
866         pnlNgSetting.setLayout(gl_pnlNgSetting);
867         gl_pnlNgSetting.setHorizontalGroup(
868             gl_pnlNgSetting.createParallelGroup(GroupLayout.Alignment.LEADING)
869             .addGroup(GroupLayout.Alignment.TRAILING, gl_pnlNgSetting.createSequentialGroup()
870                 .addContainerGap()
871                 .addGroup(gl_pnlNgSetting.createParallelGroup(GroupLayout.Alignment.TRAILING)
872                     .addComponent(pnlNgId, GroupLayout.Alignment.LEADING, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
873                     .addComponent(pnlNgWord, GroupLayout.Alignment.LEADING, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
874                 .addContainerGap())
875         );
876         gl_pnlNgSetting.setVerticalGroup(
877             gl_pnlNgSetting.createParallelGroup(GroupLayout.Alignment.LEADING)
878             .addGroup(gl_pnlNgSetting.createSequentialGroup()
879                 .addContainerGap()
880                 .addComponent(pnlNgWord, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
881                 .addPreferredGap(ComponentPlacement.RELATED)
882                 .addComponent(pnlNgId, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
883                 .addContainerGap(82, Short.MAX_VALUE))
884         );
885
886         tabbedPane.addTab("NG設定", pnlNgSetting);
887
888         pnlSearchVideo.setBorder(BorderFactory.createTitledBorder("動画検索対象フォルダ"));
889
890         lstSearchVideo.setModel(mdlSearchVideo);
891         srcSearchVideo.setViewportView(lstSearchVideo);
892
893         btnSearchVideoAdd.setText("追加...");
894
895         btnSearchVideoDel.setText("削除");
896
897         GroupLayout gl_pnlSearchVideo = new GroupLayout(pnlSearchVideo);
898         pnlSearchVideo.setLayout(gl_pnlSearchVideo);
899         gl_pnlSearchVideo.setHorizontalGroup(
900             gl_pnlSearchVideo.createParallelGroup(GroupLayout.Alignment.LEADING)
901             .addComponent(srcSearchVideo, GroupLayout.DEFAULT_SIZE, 419, Short.MAX_VALUE)
902             .addGroup(GroupLayout.Alignment.TRAILING, gl_pnlSearchVideo.createSequentialGroup()
903                 .addContainerGap(269, Short.MAX_VALUE)
904                 .addComponent(btnSearchVideoAdd)
905                 .addGap(18, 18, 18)
906                 .addComponent(btnSearchVideoDel)
907                 .addContainerGap())
908         );
909         gl_pnlSearchVideo.setVerticalGroup(
910             gl_pnlSearchVideo.createParallelGroup(GroupLayout.Alignment.LEADING)
911             .addGroup(gl_pnlSearchVideo.createSequentialGroup()
912                 .addComponent(srcSearchVideo, GroupLayout.PREFERRED_SIZE, 100, GroupLayout.PREFERRED_SIZE)
913                 .addPreferredGap(ComponentPlacement.RELATED)
914                 .addGroup(gl_pnlSearchVideo.createParallelGroup(GroupLayout.Alignment.BASELINE)
915                     .addComponent(btnSearchVideoDel)
916                     .addComponent(btnSearchVideoAdd))
917                 .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
918         );
919
920         pnlSearchComment.setBorder(BorderFactory.createTitledBorder("コメント検索対象フォルダ"));
921
922         lstSearchComment.setModel(mdlSearchComment);
923         srcSearchComment.setViewportView(lstSearchComment);
924
925         btnSearchCommentAdd.setText("追加...");
926
927         btnSearchCommentDel.setText("削除");
928
929         GroupLayout gl_pnlSearchComment = new GroupLayout(pnlSearchComment);
930         pnlSearchComment.setLayout(gl_pnlSearchComment);
931         gl_pnlSearchComment.setHorizontalGroup(
932             gl_pnlSearchComment.createParallelGroup(GroupLayout.Alignment.LEADING)
933             .addComponent(srcSearchComment, GroupLayout.DEFAULT_SIZE, 419, Short.MAX_VALUE)
934             .addGroup(GroupLayout.Alignment.TRAILING, gl_pnlSearchComment.createSequentialGroup()
935                 .addContainerGap(269, Short.MAX_VALUE)
936                 .addComponent(btnSearchCommentAdd)
937                 .addGap(18, 18, 18)
938                 .addComponent(btnSearchCommentDel)
939                 .addContainerGap())
940         );
941         gl_pnlSearchComment.setVerticalGroup(
942             gl_pnlSearchComment.createParallelGroup(GroupLayout.Alignment.LEADING)
943             .addGroup(gl_pnlSearchComment.createSequentialGroup()
944                 .addComponent(srcSearchComment, GroupLayout.PREFERRED_SIZE, 100, GroupLayout.PREFERRED_SIZE)
945                 .addPreferredGap(ComponentPlacement.RELATED)
946                 .addGroup(gl_pnlSearchComment.createParallelGroup(GroupLayout.Alignment.BASELINE)
947                     .addComponent(btnSearchCommentDel)
948                     .addComponent(btnSearchCommentAdd))
949                 .addContainerGap(16, Short.MAX_VALUE))
950         );
951
952         pnlSearchCache.setBorder(BorderFactory.createEtchedBorder());
953
954         lblSearchCache.setText("キャッシュ更新(秒)");
955
956         GroupLayout gl_pnlSearchCache = new GroupLayout(pnlSearchCache);
957         pnlSearchCache.setLayout(gl_pnlSearchCache);
958         gl_pnlSearchCache.setHorizontalGroup(
959             gl_pnlSearchCache.createParallelGroup(GroupLayout.Alignment.LEADING)
960             .addGroup(gl_pnlSearchCache.createSequentialGroup()
961                 .addContainerGap()
962                 .addComponent(lblSearchCache)
963                 .addPreferredGap(ComponentPlacement.RELATED)
964                 .addComponent(fldSearchCache, GroupLayout.PREFERRED_SIZE, 55, GroupLayout.PREFERRED_SIZE)
965                 .addContainerGap(269, Short.MAX_VALUE))
966         );
967         gl_pnlSearchCache.setVerticalGroup(
968             gl_pnlSearchCache.createParallelGroup(GroupLayout.Alignment.LEADING)
969             .addGroup(gl_pnlSearchCache.createSequentialGroup()
970                 .addContainerGap()
971                 .addGroup(gl_pnlSearchCache.createParallelGroup(GroupLayout.Alignment.BASELINE)
972                     .addComponent(lblSearchCache)
973                     .addComponent(fldSearchCache, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
974                 .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
975         );
976
977         GroupLayout gl_pnlSearch = new GroupLayout(pnlSearch);
978         pnlSearch.setLayout(gl_pnlSearch);
979         gl_pnlSearch.setHorizontalGroup(
980             gl_pnlSearch.createParallelGroup(GroupLayout.Alignment.LEADING)
981             .addGroup(GroupLayout.Alignment.TRAILING, gl_pnlSearch.createSequentialGroup()
982                 .addContainerGap()
983                 .addGroup(gl_pnlSearch.createParallelGroup(GroupLayout.Alignment.TRAILING)
984                     .addComponent(pnlSearchCache, GroupLayout.Alignment.LEADING, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
985                     .addComponent(pnlSearchComment, GroupLayout.Alignment.LEADING, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
986                     .addComponent(pnlSearchVideo, GroupLayout.Alignment.LEADING, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
987                 .addContainerGap())
988         );
989         gl_pnlSearch.setVerticalGroup(
990             gl_pnlSearch.createParallelGroup(GroupLayout.Alignment.LEADING)
991             .addGroup(gl_pnlSearch.createSequentialGroup()
992                 .addContainerGap()
993                 .addComponent(pnlSearchVideo, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
994                 .addPreferredGap(ComponentPlacement.RELATED)
995                 .addComponent(pnlSearchComment, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
996                 .addPreferredGap(ComponentPlacement.RELATED)
997                 .addComponent(pnlSearchCache, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
998                 .addContainerGap(27, Short.MAX_VALUE))
999         );
1000
1001         tabbedPane.addTab("検索", pnlSearch);
1002
1003         final JPanel pnlButton = new JPanel();
1004         final JButton btnOk = new JButton("OK");
1005         final JButton btnCancel = new JButton("Cancel");
1006         pnlButton.add(btnOk);
1007         pnlButton.add(btnCancel);
1008
1009         GroupLayout layout = new GroupLayout(getContentPane());
1010         getContentPane().setLayout(layout);
1011         layout.setHorizontalGroup(
1012             layout.createParallelGroup(GroupLayout.Alignment.LEADING)
1013             .addComponent(tabbedPane, GroupLayout.DEFAULT_SIZE, 460, Short.MAX_VALUE)
1014             .addComponent(pnlButton)
1015         );
1016         layout.setVerticalGroup(
1017             layout.createSequentialGroup()
1018                 .addComponent(tabbedPane,GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE)
1019                 .addComponent(pnlButton)
1020         );
1021
1022         pack();
1023         setResizable(false);
1024         loadConfig();
1025     }
1026
1027     /**
1028      * @param args the command line arguments
1029      */
1030     public static void main(String args[]) {
1031         /* Set the Nimbus look and feel */
1032         //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
1033         /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
1034          * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
1035          */
1036         try {
1037             for (UIManager.LookAndFeelInfo info : UIManager.getInstalledLookAndFeels()) {
1038                 if ("Nimbus".equals(info.getName())) {
1039                     UIManager.setLookAndFeel(info.getClassName());
1040                     break;
1041                 }
1042             }
1043         } catch (ClassNotFoundException ex) {
1044             java.util.logging.Logger.getLogger(ConfigDialog.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
1045         } catch (InstantiationException ex) {
1046             java.util.logging.Logger.getLogger(ConfigDialog.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
1047         } catch (IllegalAccessException ex) {
1048             java.util.logging.Logger.getLogger(ConfigDialog.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
1049         } catch (UnsupportedLookAndFeelException ex) {
1050             java.util.logging.Logger.getLogger(ConfigDialog.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
1051         }
1052         //</editor-fold>
1053
1054         /* Create and display the form */
1055         java.awt.EventQueue.invokeLater(new Runnable() {
1056
1057             @Override
1058             public void run() {
1059                 new ConfigDialog().setVisible(true);
1060             }
1061         });
1062     }
1063     // Variables declaration - do not modify//GEN-BEGIN:variables
1064
1065     // ネットワーク
1066     // ネットワーク - アカウント
1067     private final JTextField fldMail;
1068     private final JTextField fldPassword;
1069     // ネットワーク - プロキシ
1070     private final JCheckBox cbProxyUse;
1071     private final JTextField fldProxyHost;
1072     private final JTextField fldProxyPort;
1073     // ファイル
1074     // ファイル - 動画
1075     private final JTextField fldVideoDir;
1076     private final JButton btnVideoDir;
1077     private final JTextField fldVideoFileNamePattern;
1078     private final JCheckBox cbVideoLocal;
1079     // ファイル - コメント
1080     private final JTextField fldCommentDir;
1081     private final JButton btnCommentDir;
1082     private final JTextField fldCommentFileNamePattern;
1083     private final JCheckBox cbCommentLocal;
1084     // ファイル - 変換動画
1085     private final JTextField fldOutputDir;
1086     private final JTextField fldOutputFileNamePattern;
1087     private final JButton btnOutputDir;
1088     private final JCheckBox cbOutputEnable;
1089     private final JCheckBox cbOutputCommentOverlay;
1090     private final JCheckBox cbOutputDisplayProgress;
1091     // コメント
1092     // コメント
1093     private final JCheckBox cbCommentSizeAuto;
1094     private final JTextField fldCommentSizeManual;
1095     private final JCheckBox cbCommentMinSizeAuto;
1096     private final JTextField fldCommentMinSizeManual;
1097     private final JCheckBox cbCommentDisplaySizeDefault;
1098     private final JTextField fldCommentDisplaySizeManual;
1099     // コメント - 高度な設定
1100     private final JTextField fldFontPath;
1101     private final JButton btnFontPath;
1102     private final JTextField fldFontIndex;
1103     private final JTextField fldFontShadow;
1104     private final JCheckBox cbFontSizeArrangeDisable;
1105     private final JCheckBox cbCommentOpaque;
1106     // ffmpeg
1107     // ffmpeg - ファイルパス
1108     private final JTextField fldFfmpegPath;
1109     private final JButton btnFfmpegPath;
1110     private final JTextField fldFfmpegDllPath;
1111     private final JButton btnFfmpegDllPath;
1112     // ffmpeg - ffmpegパラメータ
1113     private final JRadioButton rbFfmpegOptionFile;
1114     private final JRadioButton rbFfmpegOptionDirectInput;
1115     private final JComboBox cmbFfmpegOptionFile;
1116     private final JTextField fldFfmpegOptionExtension;
1117     private final JTextField fldFfmpegOptionMain;
1118     private final JTextField fldFfmpegOptionIn;
1119     private final JTextField fldFfmpegOptionOut;
1120     private final JTextField fldFfmpegOptionAv;
1121     private final JCheckBox cbFfmpegOptionResize;
1122     private final JTextField fldFfmpegOptionResizeWidth;
1123     private final JTextField fldFfmpegOptionResizeHeight;
1124     private final JCheckBox cbFfmpegOptionKeepAspect;
1125     // NG設定
1126     // NG設定 - NGワード
1127     private final JList<String> lstNgWord;
1128     private final DefaultListModel<String> mdlNgWord = new DefaultListModel<>();
1129     private final JTextField fldNgWord;
1130     private final JButton btnNgWordAdd;
1131     private final JButton btnNgWordDel;
1132     // NG設定 - NGID
1133     private final JList<String> lstNgId;
1134     private final DefaultListModel<String> mdlNgId = new DefaultListModel<>();
1135     private final JTextField fldNgId;
1136     private final JButton btnNgIdAdd;
1137     private final JButton btnNgIdDel;
1138     // 検索
1139     // 検索 - 動画検索対象フォルダ
1140     private final JList<String> lstSearchVideo;
1141     private final DefaultListModel<String> mdlSearchVideo = new DefaultListModel<>();
1142     private final JButton btnSearchVideoAdd;
1143     private final JButton btnSearchVideoDel;
1144     // 検索 - コメント検索対象フォルダ
1145     private final JList<String> lstSearchComment;
1146     private final DefaultListModel<String> mdlSearchComment = new DefaultListModel<>();
1147     private final JButton btnSearchCommentAdd;
1148     private final JButton btnSearchCommentDel;
1149     // 検索 - キャッシュ更新(秒)
1150     private final JTextField fldSearchCache;
1151
1152
1153     // End of variables declaration//GEN-END:variables
1154
1155     private void loadConfig() {
1156         final Config p = Config.INSTANCE;
1157
1158         /*
1159          * ネットワーク - アカウント
1160          */
1161         fldMail.setText(p.getId());
1162         fldPassword.setText(p.getPassword());
1163
1164         /*
1165          * ネットワーク - プロキシ
1166          */
1167         cbProxyUse.setSelected(p.getProxyUse());
1168         fldProxyHost.setText(p.getProxyHost());
1169         fldProxyPort.setText(p.getProxyPort());
1170
1171         /*
1172          * ファイル - 動画
1173          */
1174         fldVideoDir.setText(p.getVideoDir());
1175         fldVideoFileNamePattern.setText(p.getVideoFileNamePattern());
1176         cbVideoLocal.setSelected(p.getVideoUseLocal());
1177
1178         /*
1179          * ファイル - コメント
1180          */
1181         fldCommentDir.setText(p.getCommentDir());
1182         fldCommentFileNamePattern.setText(p.getCommentFileNamePattern());
1183         cbCommentLocal.setSelected(p.getCommentUseLocal());
1184
1185         /*
1186          * ファイル - 変換動画
1187          */
1188         fldOutputDir.setText(p.getOutputDir());
1189         fldOutputFileNamePattern.setText(p.getOutputFileNamePattern());
1190         cbOutputEnable.setSelected(p.getOutputEnable());
1191         cbOutputCommentOverlay.setSelected(p.getOutputCommentOverlay());
1192         cbOutputDisplayProgress.setSelected(p.getOutputDisplayProgress());
1193
1194         /**
1195          * コメント
1196          */
1197         cbCommentSizeAuto.setSelected(p.getCommentSizeAutosize());
1198         fldCommentSizeManual.setText(p.getCommentSizeManual());
1199         cbCommentMinSizeAuto.setSelected(p.getCommentMinSizeAutosize());
1200         fldCommentSizeManual.setText(p.getCommentMinSizeManual());
1201         cbCommentDisplaySizeDefault.setSelected(p.getCommentDisplaySizeDefault());
1202         fldCommentDisplaySizeManual.setText(p.getCommentDisplaySizeManual());
1203
1204         /**
1205          * コメント - 高度な設定
1206          */
1207         fldFontPath.setText(p.getFontPath());
1208         fldFontIndex.setText(p.getFontIndex());
1209         // TODO 影の種類はコンボボックス
1210         cbFontSizeArrangeDisable.setSelected(p.getFontSizeArrangeDisable());
1211         cbCommentOpaque.setSelected(p.getCommentOpaque());
1212
1213         /*
1214          * ffmpeg - ファイルパス
1215          */
1216         fldFfmpegPath.setText(p.getFfmpegPath());
1217         fldFfmpegDllPath.setText(p.getFfmpegDllPath());
1218
1219         /*
1220          * ffmpeg - ffmpegパラメータ
1221          */
1222         rbFfmpegOptionFile.setSelected(!p.getFfmpegParamInputDirect());
1223         rbFfmpegOptionDirectInput.setSelected(p.getFfmpegParamInputDirect());
1224         // TODO cmbFfmpegOptionFile
1225         fldFfmpegOptionExtension.setText(p.getFfmpegExtension());
1226         fldFfmpegOptionMain.setText(p.getFfmpegMainOption());
1227         fldFfmpegOptionIn.setText(p.getFfmpegInOption());
1228         fldFfmpegOptionOut.setText(p.getFfmpegOutOption());
1229         fldFfmpegOptionAv.setText(p.getFfmpegAvOption());
1230         cbFfmpegOptionResize.setSelected(p.getFfmpegResizeEnable());
1231         fldFfmpegOptionResizeWidth.setText(p.getFfmpegResizeWidth());
1232         fldFfmpegOptionResizeHeight.setText(p.getFfmpegResizeHeight());
1233         cbFfmpegOptionKeepAspect.setSelected(p.getFfmpegKeepAspect());
1234
1235         /*
1236          * NG 設定
1237          */
1238         final List<String> ngWords = p.getNgWords();
1239         for (String s : ngWords) {
1240             mdlNgWord.addElement(s);
1241         }
1242         final List<String> ngIds = p.getNgIds();
1243         for (String s : ngIds) {
1244             mdlNgId.addElement(s);
1245         }
1246     }
1247     private void saveConfig() {
1248         final Config p = Config.INSTANCE;
1249
1250         /*
1251          * ネットワーク - アカウント
1252          */
1253
1254         p.setId(fldMail.getText());
1255         p.setPassword(fldPassword.getText());
1256
1257         /*
1258          * ネットワーク - プロキシ
1259          */
1260         p.setProxyUse(cbProxyUse.isSelected());
1261         p.setProxyHost(fldProxyHost.getText());
1262         p.setProxyPort(fldProxyPort.getText());
1263
1264         /*
1265          * ファイル - 動画
1266          */
1267         p.setVideoDir(fldVideoDir.getText());
1268         p.setVideoFileNamePattern(fldVideoFileNamePattern.getText());
1269         p.setVideoUseLocal(cbVideoLocal.isSelected());
1270
1271         /*
1272          * ファイル - コメント
1273          */
1274         p.setCommentDir(fldCommentDir.getText());
1275         p.setCommentFileNamePattern(fldCommentFileNamePattern.getText());
1276         p.setCommentUseLocal(cbCommentLocal.isSelected());
1277
1278         /*
1279          * ファイル - 変換動画
1280          */
1281         p.setOutputDir(fldOutputDir.getText());
1282         p.setOutputFileNamePattern(fldOutputFileNamePattern.getText());
1283         p.setOutputEnable(cbOutputEnable.isSelected());
1284         p.setOutputCommentOverlay(cbOutputCommentOverlay.isSelected());
1285         p.setOutputDisplayProgress(cbOutputDisplayProgress.isSelected());
1286
1287         /**
1288          * コメント
1289          */
1290         p.setCommentSizeAutosize(cbCommentSizeAuto.isSelected());
1291         p.setCommentSizeManual(fldCommentSizeManual.getText());
1292         p.setCommentMinSizeAutosize(cbCommentMinSizeAuto.isSelected());
1293         p.setCommentMinSizeManual(fldCommentSizeManual.getText());
1294         p.setCommentDisplaySizeDefault(cbCommentDisplaySizeDefault.isSelected());
1295         p.setCommentDisplaySizeManual(fldCommentDisplaySizeManual.getText());
1296
1297         /**
1298          * コメント - 高度な設定
1299          */
1300         p.setFontPath(fldFontPath.getText());
1301         p.setFontIndex(fldFontIndex.getText());
1302         // TODO 影の種類はコンボボックス
1303         p.setFontSizeArrangeDisable(cbFontSizeArrangeDisable.isSelected());
1304         p.setCommentOpaque(cbCommentOpaque.isSelected());
1305
1306         /*
1307          * ffmpeg - ファイルパス
1308          */
1309         p.setFfmpegPath(fldFfmpegPath.getText());
1310         p.setFfmpegDllPath(fldFfmpegDllPath.getText());
1311
1312         /*
1313          * ffmpeg - ffmpegパラメータ
1314          */
1315         p.setFfmpegParamInputDirect(rbFfmpegOptionDirectInput.isSelected());
1316         // TODO cmbFfmpegOptionFile
1317         p.setFfmpegExtension(fldFfmpegOptionExtension.getText());
1318         p.setFfmpegMainOption(fldFfmpegOptionMain.getText());
1319         p.setFfmpegInOption(fldFfmpegOptionIn.getText());
1320         p.setFfmpegOutOption(fldFfmpegOptionOut.getText());
1321         p.setFfmpegAvOption(fldFfmpegOptionAv.getText());
1322         p.setFfmpegResizeEnable(cbFfmpegOptionResize.isSelected());
1323         p.setFfmpegResizeWidth(fldFfmpegOptionResizeWidth.getText());
1324         p.setFfmpegResizeHeight(fldFfmpegOptionResizeHeight.getText());
1325         p.setFfmpegKeepAspect(cbFfmpegOptionKeepAspect.isSelected());
1326
1327         /*
1328          * NG 設定
1329          */
1330         p.setNgWords(Arrays.asList((String[]) mdlNgWord.toArray()));
1331         p.setNgIds(Arrays.asList((String[])mdlNgId.toArray()));
1332
1333     }
1334 }