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.ComboBoxModel;
13 import javax.swing.DefaultComboBoxModel;
14 import javax.swing.DefaultListModel;
15 import javax.swing.GroupLayout;
16 import javax.swing.GroupLayout.Alignment;
17 import javax.swing.JButton;
18 import javax.swing.JCheckBox;
19 import javax.swing.JComboBox;
20 import javax.swing.JDialog;
21 import javax.swing.JFrame;
22 import javax.swing.JLabel;
23 import javax.swing.JList;
24 import javax.swing.JPanel;
25 import javax.swing.JRadioButton;
26 import javax.swing.JScrollPane;
27 import javax.swing.JTabbedPane;
28 import javax.swing.JTextField;
29 import javax.swing.LayoutStyle.ComponentPlacement;
30 import javax.swing.UIManager;
31 import javax.swing.UnsupportedLookAndFeelException;
32 import javax.swing.WindowConstants;
33 import yukihane.inqubus.Config;
34
35 /**
36  *
37  * @author yuki
38  */
39 public class ConfigDialog extends JDialog {
40     private static final long serialVersionUID = 1L;
41
42     /** Creates new form Properties */
43     public ConfigDialog() {
44         this(null);
45     }
46
47     public ConfigDialog(JFrame owner){
48         super(owner);
49
50         final ButtonGroup buttonGroup1 = new ButtonGroup();
51         final JTabbedPane tabbedPane = new JTabbedPane();
52         final JPanel pnlNetwork = new JPanel();
53         final JPanel pnlAccount = new JPanel();
54         final JLabel lblMail = new JLabel();
55         fldMail = new JTextField();
56         final JLabel lblPassword = new JLabel();
57         fldPassword = new JTextField();
58         final JPanel pnlProxy = new JPanel();
59         cbProxyUse = new JCheckBox();
60         final JLabel lblProxyHost = new JLabel();
61         final JLabel lblProxyPort = new JLabel();
62         fldProxyHost = new JTextField();
63         fldProxyPort = new JTextField();
64         final JPanel pnlFile = new JPanel();
65         final JPanel pnlFileVideo = new JPanel();
66         final JLabel lblVideoDir = new JLabel();
67         final JLabel lblVideoFileNamepattern = new JLabel();
68         fldVideoDir = new JTextField();
69         fldVideoFileNamePattern = new JTextField();
70         btnVideoDir = new JButton();
71         cbVideoLocal = new JCheckBox();
72         final JPanel pnlFileComment = new JPanel();
73         final JLabel lblCommentDir = new JLabel();
74         final JLabel lblCommentFileNamePattern = new JLabel();
75         fldCommentDir = new JTextField();
76         fldCommentFileNamePattern = new JTextField();
77         btnCommentDir = new JButton();
78         cbCommentLocal = new JCheckBox();
79         final JPanel pnlFileOutput = new JPanel();
80         final JLabel lblOutputDir = new JLabel();
81         final JLabel lblOutputFileNamePattern = new JLabel();
82         fldOutputDir = new JTextField();
83         fldOutputFileNamePattern = new JTextField();
84         btnOutputDir = new JButton();
85         cbOutputEnable = new JCheckBox();
86         cbOutputCommentOverlay = new JCheckBox();
87         cbOutputDisplayProgress = new JCheckBox();
88         final JPanel pnlComment = new JPanel();
89         final JPanel pnlCommentStandard = new JPanel();
90         final JLabel lblCommentSize = new JLabel();
91         cbCommentSizeAuto = new JCheckBox();
92         final JLabel lblCommentSizeManual = new JLabel();
93         fldCommentSizeManual = new JTextField();
94         final JLabel lblCommentMinSize = new JLabel();
95         cbCommentMinSizeAuto = new JCheckBox();
96         fldCommentMinSizeManual = new JTextField();
97         final JLabel lblCommentMinSizeManual = new JLabel();
98         final JLabel lblCommentDisplayMax = new JLabel();
99         cbCommentDisplaySizeDefault = new JCheckBox();
100         final JLabel lblCommentDisplayMaxManual = new JLabel();
101         fldCommentDisplaySizeManual = new JTextField();
102         final JPanel pnlCommentAdvanced = new JPanel();
103         final JLabel lblFontPath = new JLabel();
104         cbFontSizeArrangeDisable = new JCheckBox();
105         cbCommentOpaque = new JCheckBox();
106         fldFontPath = new JTextField();
107         btnFontPath = new JButton();
108         final JLabel lblFontIndex = new JLabel();
109         final JLabel lblFontShadow = new JLabel();
110         fldFontIndex = 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         final JPanel pnlFileProhibit = new JPanel();
423         pnlFileProhibit.setBorder(BorderFactory.createTitledBorder("禁則文字"));
424         final JLabel lblReplaceFrom = new JLabel("置換対象文字");
425         final JLabel lblReplaceTo = new JLabel("置換後文字");
426
427         final GroupLayout glProhibit = new GroupLayout(pnlFileProhibit);
428         glProhibit.setAutoCreateContainerGaps(true);
429         glProhibit.setAutoCreateGaps(true);
430         pnlFileProhibit.setLayout(glProhibit);
431
432         glProhibit.setHorizontalGroup(glProhibit.createSequentialGroup()
433             .addGroup(glProhibit.createParallelGroup()
434                 .addComponent(lblReplaceFrom)
435                 .addComponent(lblReplaceTo)
436             )
437             .addGroup(glProhibit.createParallelGroup()
438                 .addComponent(fldReplaceFrom)
439                 .addComponent(fldReplaceTo)
440             )
441         );
442
443         glProhibit.setVerticalGroup(glProhibit.createSequentialGroup()
444             .addGroup(glProhibit.createParallelGroup(Alignment.BASELINE)
445                 .addComponent(lblReplaceFrom)
446                 .addComponent(fldReplaceFrom)
447             )
448             .addGroup(glProhibit.createParallelGroup(Alignment.BASELINE)
449                 .addComponent(lblReplaceTo)
450                 .addComponent(fldReplaceTo)
451             )
452         );
453
454         GroupLayout gl_pnlFile = new GroupLayout(pnlFile);
455         pnlFile.setLayout(gl_pnlFile);
456         gl_pnlFile.setHorizontalGroup(
457             gl_pnlFile.createParallelGroup(GroupLayout.Alignment.LEADING)
458             .addGroup(GroupLayout.Alignment.TRAILING, gl_pnlFile.createSequentialGroup()
459                 .addContainerGap()
460                 .addGroup(gl_pnlFile.createParallelGroup(GroupLayout.Alignment.TRAILING)
461                     .addComponent(pnlFileOutput, GroupLayout.Alignment.LEADING, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
462                     .addComponent(pnlFileVideo, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
463                     .addComponent(pnlFileComment, GroupLayout.Alignment.LEADING, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
464                     .addComponent(pnlFileProhibit, GroupLayout.Alignment.LEADING, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
465                 )
466                 .addContainerGap())
467         );
468         gl_pnlFile.setVerticalGroup(
469             gl_pnlFile.createParallelGroup(GroupLayout.Alignment.LEADING)
470             .addGroup(gl_pnlFile.createSequentialGroup()
471                 .addContainerGap()
472                 .addComponent(pnlFileVideo, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
473                 .addPreferredGap(ComponentPlacement.RELATED)
474                 .addComponent(pnlFileComment, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
475                 .addPreferredGap(ComponentPlacement.RELATED)
476                 .addComponent(pnlFileOutput, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
477                 .addPreferredGap(ComponentPlacement.RELATED)
478                 .addComponent(pnlFileProhibit, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
479                 .addContainerGap())
480         );
481
482         tabbedPane.addTab("ファイル", pnlFile);
483
484         pnlCommentStandard.setBorder(BorderFactory.createTitledBorder(""));
485
486         lblCommentSize.setText("再生時間に応じたコメントの取得数");
487
488         cbCommentSizeAuto.setText("自動調整");
489
490         lblCommentSizeManual.setText("手動取得");
491
492         lblCommentMinSize.setText("1分当たりのコメント取得数");
493
494         cbCommentMinSizeAuto.setText("自動調整");
495
496         lblCommentMinSizeManual.setText("手動取得");
497
498         lblCommentDisplayMax.setText("1画面に表示する最大コメント数");
499
500         cbCommentDisplaySizeDefault.setText("標準(30)");
501
502         lblCommentDisplayMaxManual.setText("手動設定");
503
504         GroupLayout gl_pnlCommentStandard = new GroupLayout(pnlCommentStandard);
505         pnlCommentStandard.setLayout(gl_pnlCommentStandard);
506         gl_pnlCommentStandard.setAutoCreateContainerGaps(true);
507         gl_pnlCommentStandard.setAutoCreateGaps(true);
508         gl_pnlCommentStandard.setHorizontalGroup(
509             gl_pnlCommentStandard.createSequentialGroup()
510                 .addGroup(gl_pnlCommentStandard.createParallelGroup(GroupLayout.Alignment.LEADING)
511                     .addComponent(lblCommentSize)
512                     .addComponent(lblCommentMinSize)
513                     .addComponent(lblCommentDisplayMax))
514                 .addGroup(gl_pnlCommentStandard.createParallelGroup(GroupLayout.Alignment.LEADING)
515                     .addComponent(cbCommentSizeAuto)
516                     .addComponent(cbCommentMinSizeAuto)
517                     .addComponent(cbCommentDisplaySizeDefault))
518                 .addGroup(gl_pnlCommentStandard.createParallelGroup(GroupLayout.Alignment.LEADING)
519                     .addComponent(lblCommentSizeManual)
520                     .addComponent(lblCommentMinSizeManual)
521                     .addComponent(lblCommentDisplayMaxManual))
522                 .addGroup(gl_pnlCommentStandard.createParallelGroup(GroupLayout.Alignment.LEADING)
523                     .addComponent(fldCommentSizeManual, 48, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
524                     .addComponent(fldCommentMinSizeManual, 48, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
525                     .addComponent(fldCommentDisplaySizeManual, 48, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
526         );
527         gl_pnlCommentStandard.setVerticalGroup(
528             gl_pnlCommentStandard.createSequentialGroup()
529                 .addGroup(gl_pnlCommentStandard.createParallelGroup(GroupLayout.Alignment.BASELINE)
530                     .addComponent(lblCommentSize)
531                     .addComponent(cbCommentSizeAuto)
532                     .addComponent(lblCommentSizeManual)
533                     .addComponent(fldCommentSizeManual))
534                 .addGroup(gl_pnlCommentStandard.createParallelGroup(GroupLayout.Alignment.BASELINE)
535                     .addComponent(lblCommentMinSize)
536                     .addComponent(cbCommentMinSizeAuto)
537                     .addComponent(lblCommentMinSizeManual)
538                     .addComponent(fldCommentMinSizeManual))
539                 .addGroup(gl_pnlCommentStandard.createParallelGroup(GroupLayout.Alignment.BASELINE)
540                     .addComponent(lblCommentDisplayMax)
541                     .addComponent(cbCommentDisplaySizeDefault)
542                     .addComponent(lblCommentDisplayMaxManual)
543                     .addComponent(fldCommentDisplaySizeManual))
544         );
545
546         pnlCommentAdvanced.setBorder(BorderFactory.createTitledBorder("高度な設定"));
547
548         lblFontPath.setText("フォントパス");
549
550         cbFontSizeArrangeDisable.setText("フォントサイズ調整を行わない");
551
552         cbCommentOpaque.setText("コメント透明化を行わない");
553
554         btnFontPath.setText("...");
555
556         lblFontIndex.setText("フォント番号");
557
558         lblFontShadow.setText("影の種類");
559         final ComboBoxModel<String> cbmFontShadow
560                 = new DefaultComboBoxModel<>(new String[]{"0:なし", "1:ニコニコ動画風", "2:右下", "3:囲い込み"});
561         cmbFontShadow.setModel(cbmFontShadow);
562
563         GroupLayout gl_pnlCommentAdvanced = new GroupLayout(pnlCommentAdvanced);
564         pnlCommentAdvanced.setLayout(gl_pnlCommentAdvanced);
565         gl_pnlCommentAdvanced.setHorizontalGroup(
566             gl_pnlCommentAdvanced.createParallelGroup(GroupLayout.Alignment.LEADING)
567             .addGroup(gl_pnlCommentAdvanced.createSequentialGroup()
568                 .addContainerGap()
569                 .addGroup(gl_pnlCommentAdvanced.createParallelGroup(GroupLayout.Alignment.LEADING)
570                     .addComponent(cbCommentOpaque)
571                     .addGroup(gl_pnlCommentAdvanced.createSequentialGroup()
572                         .addGroup(gl_pnlCommentAdvanced.createParallelGroup(GroupLayout.Alignment.LEADING)
573                             .addComponent(lblFontPath)
574                             .addComponent(lblFontIndex)
575                             .addComponent(lblFontShadow))
576                         .addGap(18, 18, 18)
577                         .addGroup(gl_pnlCommentAdvanced.createParallelGroup(GroupLayout.Alignment.LEADING)
578                             .addComponent(fldFontPath, GroupLayout.DEFAULT_SIZE, 275, Short.MAX_VALUE)
579                             .addGroup(gl_pnlCommentAdvanced.createParallelGroup(GroupLayout.Alignment.TRAILING, false)
580                                 .addComponent(cmbFontShadow, GroupLayout.Alignment.LEADING)
581                                 .addComponent(fldFontIndex, GroupLayout.Alignment.LEADING, GroupLayout.DEFAULT_SIZE, 48, Short.MAX_VALUE)))
582                         .addPreferredGap(ComponentPlacement.RELATED)
583                         .addComponent(btnFontPath))
584                     .addComponent(cbFontSizeArrangeDisable))
585                 .addContainerGap())
586         );
587         gl_pnlCommentAdvanced.setVerticalGroup(
588             gl_pnlCommentAdvanced.createParallelGroup(GroupLayout.Alignment.LEADING)
589             .addGroup(gl_pnlCommentAdvanced.createSequentialGroup()
590                 .addGroup(gl_pnlCommentAdvanced.createParallelGroup(GroupLayout.Alignment.BASELINE)
591                     .addComponent(lblFontPath)
592                     .addComponent(fldFontPath, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
593                     .addComponent(btnFontPath))
594                 .addPreferredGap(ComponentPlacement.RELATED)
595                 .addGroup(gl_pnlCommentAdvanced.createParallelGroup(GroupLayout.Alignment.BASELINE)
596                     .addComponent(lblFontIndex)
597                     .addComponent(fldFontIndex, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
598                 .addPreferredGap(ComponentPlacement.RELATED)
599                 .addGroup(gl_pnlCommentAdvanced.createParallelGroup(GroupLayout.Alignment.BASELINE)
600                     .addComponent(lblFontShadow)
601                     .addComponent(cmbFontShadow, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
602                 .addPreferredGap(ComponentPlacement.RELATED)
603                 .addComponent(cbFontSizeArrangeDisable)
604                 .addPreferredGap(ComponentPlacement.RELATED)
605                 .addComponent(cbCommentOpaque)
606                 .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
607         );
608
609         GroupLayout gl_pnlComment = new GroupLayout(pnlComment);
610         pnlComment.setLayout(gl_pnlComment);
611         gl_pnlComment.setHorizontalGroup(
612             gl_pnlComment.createParallelGroup(GroupLayout.Alignment.LEADING)
613             .addGroup(GroupLayout.Alignment.TRAILING, gl_pnlComment.createSequentialGroup()
614                 .addContainerGap()
615                 .addGroup(gl_pnlComment.createParallelGroup(GroupLayout.Alignment.TRAILING)
616                     .addComponent(pnlCommentAdvanced, GroupLayout.Alignment.LEADING, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
617                     .addComponent(pnlCommentStandard, GroupLayout.Alignment.LEADING, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
618                 .addContainerGap())
619         );
620         gl_pnlComment.setVerticalGroup(
621             gl_pnlComment.createParallelGroup(GroupLayout.Alignment.LEADING)
622             .addGroup(gl_pnlComment.createSequentialGroup()
623                 .addContainerGap()
624                 .addComponent(pnlCommentStandard, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
625                 .addPreferredGap(ComponentPlacement.RELATED)
626                 .addComponent(pnlCommentAdvanced, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
627                 .addContainerGap(168, Short.MAX_VALUE))
628         );
629
630         tabbedPane.addTab("コメント", pnlComment);
631
632         jPanel10.setBorder(BorderFactory.createTitledBorder("ファイルパス"));
633
634         lblFfmpegPath.setText("ffmpeg");
635
636         lblFfmpegDllPath.setText("拡張ライブラリ");
637
638         btnFfmpegPath.setText("...");
639
640         btnFfmpegDllPath.setText("...");
641
642         GroupLayout gl_jPanel10 = new GroupLayout(jPanel10);
643         jPanel10.setLayout(gl_jPanel10);
644         gl_jPanel10.setHorizontalGroup(
645             gl_jPanel10.createParallelGroup(GroupLayout.Alignment.LEADING)
646             .addGroup(gl_jPanel10.createSequentialGroup()
647                 .addContainerGap()
648                 .addGroup(gl_jPanel10.createParallelGroup(GroupLayout.Alignment.LEADING)
649                     .addComponent(lblFfmpegDllPath)
650                     .addComponent(lblFfmpegPath))
651                 .addPreferredGap(ComponentPlacement.RELATED)
652                 .addGroup(gl_jPanel10.createParallelGroup(GroupLayout.Alignment.LEADING)
653                     .addComponent(fldFfmpegDllPath, GroupLayout.Alignment.TRAILING, GroupLayout.DEFAULT_SIZE, 280, Short.MAX_VALUE)
654                     .addComponent(fldFfmpegPath, GroupLayout.Alignment.TRAILING, GroupLayout.DEFAULT_SIZE, 280, Short.MAX_VALUE))
655                 .addPreferredGap(ComponentPlacement.RELATED)
656                 .addGroup(gl_jPanel10.createParallelGroup(GroupLayout.Alignment.LEADING)
657                     .addComponent(btnFfmpegPath, GroupLayout.Alignment.TRAILING)
658                     .addComponent(btnFfmpegDllPath, GroupLayout.Alignment.TRAILING))
659                 .addContainerGap())
660         );
661         gl_jPanel10.setVerticalGroup(
662             gl_jPanel10.createParallelGroup(GroupLayout.Alignment.LEADING)
663             .addGroup(gl_jPanel10.createSequentialGroup()
664                 .addGroup(gl_jPanel10.createParallelGroup(GroupLayout.Alignment.BASELINE)
665                     .addComponent(lblFfmpegPath)
666                     .addComponent(fldFfmpegPath, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
667                     .addComponent(btnFfmpegPath))
668                 .addPreferredGap(ComponentPlacement.RELATED)
669                 .addGroup(gl_jPanel10.createParallelGroup(GroupLayout.Alignment.BASELINE)
670                     .addComponent(lblFfmpegDllPath)
671                     .addComponent(fldFfmpegDllPath, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
672                     .addComponent(btnFfmpegDllPath))
673                 .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
674         );
675
676         pnlFfmpegParam.setBorder(BorderFactory.createTitledBorder("ffmpegパラメータ"));
677
678         buttonGroup1.add(rbFfmpegOptionFile);
679         rbFfmpegOptionFile.setText("オプションファイル");
680
681         buttonGroup1.add(rbFfmpegOptionDirectInput);
682         rbFfmpegOptionDirectInput.setText("直接入力");
683
684         cmbFfmpegOptionFile.setModel(new DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
685
686         pnlFfmpegParamOption.setBorder(BorderFactory.createEtchedBorder());
687
688         lblFfmpegOptionExtension.setText("出力動画の拡張子");
689
690         lblFfmpegOptionMain.setText("メインオプション");
691
692         lblFfmpegOptionIn.setText("入力オプション");
693
694         lblFfmpegOptionOut.setText("出力オプション");
695
696         lblFfmpegOptionAvfilter.setText("avfilterオプション");
697
698         cbFfmpegOptionResize.setText("次のサイズに収まるよう縮小(-s)");
699
700         lblFfmpegOptionResizeWidth.setText("横");
701
702         lblFfmpegOptionResizeHeight.setText("縦");
703
704         cbFfmpegOptionKeepAspect.setText("アスペクト比を維持");
705
706         GroupLayout gl_pnlFfmpegParamOption = new GroupLayout(pnlFfmpegParamOption);
707         pnlFfmpegParamOption.setLayout(gl_pnlFfmpegParamOption);
708         gl_pnlFfmpegParamOption.setHorizontalGroup(
709             gl_pnlFfmpegParamOption.createParallelGroup(GroupLayout.Alignment.LEADING)
710             .addGroup(gl_pnlFfmpegParamOption.createSequentialGroup()
711                 .addGroup(gl_pnlFfmpegParamOption.createParallelGroup(GroupLayout.Alignment.LEADING)
712                     .addGroup(gl_pnlFfmpegParamOption.createSequentialGroup()
713                         .addContainerGap()
714                         .addGroup(gl_pnlFfmpegParamOption.createParallelGroup(GroupLayout.Alignment.LEADING)
715                             .addComponent(lblFfmpegOptionAvfilter)
716                             .addComponent(lblFfmpegOptionExtension)
717                             .addComponent(lblFfmpegOptionMain)
718                             .addComponent(lblFfmpegOptionIn)
719                             .addComponent(lblFfmpegOptionOut))
720                         .addPreferredGap(ComponentPlacement.RELATED)
721                         .addGroup(gl_pnlFfmpegParamOption.createParallelGroup(GroupLayout.Alignment.LEADING)
722                             .addComponent(fldFfmpegOptionExtension, GroupLayout.PREFERRED_SIZE, 51, GroupLayout.PREFERRED_SIZE)
723                             .addComponent(fldFfmpegOptionMain, GroupLayout.DEFAULT_SIZE, 268, Short.MAX_VALUE)
724                             .addComponent(fldFfmpegOptionIn, GroupLayout.DEFAULT_SIZE, 268, Short.MAX_VALUE)
725                             .addComponent(fldFfmpegOptionOut, GroupLayout.DEFAULT_SIZE, 268, Short.MAX_VALUE)
726                             .addComponent(fldFfmpegOptionAv, GroupLayout.DEFAULT_SIZE, 268, Short.MAX_VALUE)))
727                     .addGroup(gl_pnlFfmpegParamOption.createSequentialGroup()
728                         .addGap(12, 12, 12)
729                         .addComponent(cbFfmpegOptionResize)
730                         .addPreferredGap(ComponentPlacement.UNRELATED)
731                         .addComponent(lblFfmpegOptionResizeWidth)
732                         .addPreferredGap(ComponentPlacement.RELATED)
733                         .addComponent(fldFfmpegOptionResizeWidth, GroupLayout.PREFERRED_SIZE, 48, GroupLayout.PREFERRED_SIZE)
734                         .addGap(12, 12, 12)
735                         .addComponent(lblFfmpegOptionResizeHeight)
736                         .addPreferredGap(ComponentPlacement.RELATED)
737                         .addComponent(fldFfmpegOptionResizeHeight, GroupLayout.PREFERRED_SIZE, 48, GroupLayout.PREFERRED_SIZE))
738                     .addGroup(gl_pnlFfmpegParamOption.createSequentialGroup()
739                         .addGap(33, 33, 33)
740                         .addComponent(cbFfmpegOptionKeepAspect)))
741                 .addContainerGap())
742         );
743         gl_pnlFfmpegParamOption.setVerticalGroup(
744             gl_pnlFfmpegParamOption.createParallelGroup(GroupLayout.Alignment.LEADING)
745             .addGroup(gl_pnlFfmpegParamOption.createSequentialGroup()
746                 .addContainerGap()
747                 .addGroup(gl_pnlFfmpegParamOption.createParallelGroup(GroupLayout.Alignment.BASELINE)
748                     .addComponent(lblFfmpegOptionExtension)
749                     .addComponent(fldFfmpegOptionExtension, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
750                 .addPreferredGap(ComponentPlacement.RELATED)
751                 .addGroup(gl_pnlFfmpegParamOption.createParallelGroup(GroupLayout.Alignment.BASELINE)
752                     .addComponent(lblFfmpegOptionMain)
753                     .addComponent(fldFfmpegOptionMain, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
754                 .addPreferredGap(ComponentPlacement.RELATED)
755                 .addGroup(gl_pnlFfmpegParamOption.createParallelGroup(GroupLayout.Alignment.BASELINE)
756                     .addComponent(lblFfmpegOptionIn)
757                     .addComponent(fldFfmpegOptionIn, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
758                 .addPreferredGap(ComponentPlacement.RELATED)
759                 .addGroup(gl_pnlFfmpegParamOption.createParallelGroup(GroupLayout.Alignment.BASELINE)
760                     .addComponent(lblFfmpegOptionOut)
761                     .addComponent(fldFfmpegOptionOut, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
762                 .addPreferredGap(ComponentPlacement.RELATED)
763                 .addGroup(gl_pnlFfmpegParamOption.createParallelGroup(GroupLayout.Alignment.BASELINE)
764                     .addComponent(lblFfmpegOptionAvfilter)
765                     .addComponent(fldFfmpegOptionAv, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
766                 .addPreferredGap(ComponentPlacement.RELATED)
767                 .addGroup(gl_pnlFfmpegParamOption.createParallelGroup(GroupLayout.Alignment.BASELINE)
768                     .addComponent(cbFfmpegOptionResize)
769                     .addComponent(lblFfmpegOptionResizeWidth)
770                     .addComponent(fldFfmpegOptionResizeWidth, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
771                     .addComponent(lblFfmpegOptionResizeHeight)
772                     .addComponent(fldFfmpegOptionResizeHeight, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
773                 .addPreferredGap(ComponentPlacement.RELATED)
774                 .addComponent(cbFfmpegOptionKeepAspect)
775                 .addContainerGap())
776         );
777
778         GroupLayout gl_pnlFfmpegParam = new GroupLayout(pnlFfmpegParam);
779         pnlFfmpegParam.setLayout(gl_pnlFfmpegParam);
780         gl_pnlFfmpegParam.setHorizontalGroup(
781             gl_pnlFfmpegParam.createParallelGroup(Alignment.LEADING)
782             .addGroup(gl_pnlFfmpegParam.createSequentialGroup()
783                 .addContainerGap()
784                 .addGroup(gl_pnlFfmpegParam.createParallelGroup(Alignment.LEADING)
785                     .addComponent(pnlFfmpegParamOption, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
786                     .addGroup(gl_pnlFfmpegParam.createSequentialGroup()
787                         .addComponent(rbFfmpegOptionFile)
788                         .addPreferredGap(ComponentPlacement.RELATED)
789                         .addComponent(cmbFfmpegOptionFile, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
790                     .addComponent(rbFfmpegOptionDirectInput))
791                 .addContainerGap())
792         );
793         gl_pnlFfmpegParam.setVerticalGroup(
794             gl_pnlFfmpegParam.createParallelGroup(Alignment.LEADING)
795             .addGroup(gl_pnlFfmpegParam.createSequentialGroup()
796                 .addContainerGap()
797                 .addGroup(gl_pnlFfmpegParam.createParallelGroup(Alignment.BASELINE)
798                     .addComponent(rbFfmpegOptionFile)
799                     .addComponent(cmbFfmpegOptionFile, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
800                 .addPreferredGap(ComponentPlacement.RELATED)
801                 .addComponent(rbFfmpegOptionDirectInput)
802                 .addPreferredGap(ComponentPlacement.RELATED)
803                 .addComponent(pnlFfmpegParamOption, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
804                 .addContainerGap())
805         );
806
807         GroupLayout gl_pnlFfmpeg = new GroupLayout(pnlFfmpeg);
808         pnlFfmpeg.setLayout(gl_pnlFfmpeg);
809         gl_pnlFfmpeg.setHorizontalGroup(
810             gl_pnlFfmpeg.createParallelGroup(GroupLayout.Alignment.LEADING)
811             .addGroup(GroupLayout.Alignment.TRAILING, gl_pnlFfmpeg.createSequentialGroup()
812                 .addContainerGap()
813                 .addGroup(gl_pnlFfmpeg.createParallelGroup(GroupLayout.Alignment.TRAILING)
814                     .addComponent(pnlFfmpegParam, GroupLayout.Alignment.LEADING, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
815                     .addComponent(jPanel10, GroupLayout.Alignment.LEADING, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
816                 .addContainerGap())
817         );
818         gl_pnlFfmpeg.setVerticalGroup(
819             gl_pnlFfmpeg.createParallelGroup(GroupLayout.Alignment.LEADING)
820             .addGroup(gl_pnlFfmpeg.createSequentialGroup()
821                 .addContainerGap()
822                 .addComponent(jPanel10, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
823                 .addPreferredGap(ComponentPlacement.RELATED)
824                 .addComponent(pnlFfmpegParam, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
825                 .addContainerGap())
826         );
827
828         tabbedPane.addTab("ffmpeg", pnlFfmpeg);
829
830         pnlNgWord.setBorder(BorderFactory.createTitledBorder("NGワード"));
831
832         lstNgWord.setModel(mdlNgWord);
833         scrNgWord.setViewportView(lstNgWord);
834
835         btnNgWordAdd.setText("追加");
836
837         btnNgWordDel.setText("削除");
838
839         GroupLayout gl_pnlNgWord = new GroupLayout(pnlNgWord);
840         pnlNgWord.setLayout(gl_pnlNgWord);
841         gl_pnlNgWord.setHorizontalGroup(
842             gl_pnlNgWord.createParallelGroup(GroupLayout.Alignment.LEADING)
843             .addGroup(gl_pnlNgWord.createSequentialGroup()
844                 .addContainerGap()
845                 .addGroup(gl_pnlNgWord.createParallelGroup(GroupLayout.Alignment.LEADING)
846                     .addComponent(scrNgWord, GroupLayout.DEFAULT_SIZE, 395, Short.MAX_VALUE)
847                     .addGroup(gl_pnlNgWord.createSequentialGroup()
848                         .addComponent(fldNgWord, GroupLayout.DEFAULT_SIZE, 256, Short.MAX_VALUE)
849                         .addPreferredGap(ComponentPlacement.RELATED)
850                         .addComponent(btnNgWordAdd)
851                         .addGap(18, 18, 18)
852                         .addComponent(btnNgWordDel)))
853                 .addContainerGap())
854         );
855         gl_pnlNgWord.setVerticalGroup(
856             gl_pnlNgWord.createParallelGroup(GroupLayout.Alignment.LEADING)
857             .addGroup(gl_pnlNgWord.createSequentialGroup()
858                 .addComponent(scrNgWord, GroupLayout.PREFERRED_SIZE, 100, GroupLayout.PREFERRED_SIZE)
859                 .addPreferredGap(ComponentPlacement.RELATED)
860                 .addGroup(gl_pnlNgWord.createParallelGroup(GroupLayout.Alignment.BASELINE)
861                     .addComponent(fldNgWord, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
862                     .addComponent(btnNgWordDel)
863                     .addComponent(btnNgWordAdd))
864                 .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
865         );
866
867         pnlNgId.setBorder(BorderFactory.createTitledBorder("NGID"));
868
869         lstNgId.setModel(mdlNgId);
870         scrNgId.setViewportView(lstNgId);
871
872         btnNgIdAdd.setText("追加");
873
874         btnNgIdDel.setText("削除");
875
876         GroupLayout gl_pnlNgId = new GroupLayout(pnlNgId);
877         pnlNgId.setLayout(gl_pnlNgId);
878         gl_pnlNgId.setHorizontalGroup(
879             gl_pnlNgId.createParallelGroup(GroupLayout.Alignment.LEADING)
880             .addGroup(gl_pnlNgId.createSequentialGroup()
881                 .addContainerGap()
882                 .addGroup(gl_pnlNgId.createParallelGroup(GroupLayout.Alignment.LEADING)
883                     .addComponent(scrNgId, GroupLayout.DEFAULT_SIZE, 395, Short.MAX_VALUE)
884                     .addGroup(GroupLayout.Alignment.TRAILING, gl_pnlNgId.createSequentialGroup()
885                         .addComponent(fldNgId, GroupLayout.DEFAULT_SIZE, 256, Short.MAX_VALUE)
886                         .addPreferredGap(ComponentPlacement.RELATED)
887                         .addComponent(btnNgIdAdd)
888                         .addGap(18, 18, 18)
889                         .addComponent(btnNgIdDel)))
890                 .addContainerGap())
891         );
892         gl_pnlNgId.setVerticalGroup(
893             gl_pnlNgId.createParallelGroup(GroupLayout.Alignment.LEADING)
894             .addGroup(gl_pnlNgId.createSequentialGroup()
895                 .addComponent(scrNgId, GroupLayout.PREFERRED_SIZE, 100, GroupLayout.PREFERRED_SIZE)
896                 .addPreferredGap(ComponentPlacement.RELATED)
897                 .addGroup(gl_pnlNgId.createParallelGroup(GroupLayout.Alignment.BASELINE)
898                     .addComponent(fldNgId, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
899                     .addComponent(btnNgIdDel)
900                     .addComponent(btnNgIdAdd))
901                 .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
902         );
903
904         GroupLayout gl_pnlNgSetting = new GroupLayout(pnlNgSetting);
905         pnlNgSetting.setLayout(gl_pnlNgSetting);
906         gl_pnlNgSetting.setHorizontalGroup(
907             gl_pnlNgSetting.createParallelGroup(GroupLayout.Alignment.LEADING)
908             .addGroup(GroupLayout.Alignment.TRAILING, gl_pnlNgSetting.createSequentialGroup()
909                 .addContainerGap()
910                 .addGroup(gl_pnlNgSetting.createParallelGroup(GroupLayout.Alignment.TRAILING)
911                     .addComponent(pnlNgId, GroupLayout.Alignment.LEADING, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
912                     .addComponent(pnlNgWord, GroupLayout.Alignment.LEADING, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
913                 .addContainerGap())
914         );
915         gl_pnlNgSetting.setVerticalGroup(
916             gl_pnlNgSetting.createParallelGroup(GroupLayout.Alignment.LEADING)
917             .addGroup(gl_pnlNgSetting.createSequentialGroup()
918                 .addContainerGap()
919                 .addComponent(pnlNgWord, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
920                 .addPreferredGap(ComponentPlacement.RELATED)
921                 .addComponent(pnlNgId, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
922                 .addContainerGap(82, Short.MAX_VALUE))
923         );
924
925         tabbedPane.addTab("NG設定", pnlNgSetting);
926
927         pnlSearchVideo.setBorder(BorderFactory.createTitledBorder("動画検索対象フォルダ"));
928
929         lstSearchVideo.setModel(mdlSearchVideo);
930         srcSearchVideo.setViewportView(lstSearchVideo);
931
932         btnSearchVideoAdd.setText("追加...");
933
934         btnSearchVideoDel.setText("削除");
935
936         GroupLayout gl_pnlSearchVideo = new GroupLayout(pnlSearchVideo);
937         pnlSearchVideo.setLayout(gl_pnlSearchVideo);
938         gl_pnlSearchVideo.setHorizontalGroup(
939             gl_pnlSearchVideo.createParallelGroup(GroupLayout.Alignment.LEADING)
940             .addComponent(srcSearchVideo, GroupLayout.DEFAULT_SIZE, 419, Short.MAX_VALUE)
941             .addGroup(GroupLayout.Alignment.TRAILING, gl_pnlSearchVideo.createSequentialGroup()
942                 .addContainerGap(269, Short.MAX_VALUE)
943                 .addComponent(btnSearchVideoAdd)
944                 .addGap(18, 18, 18)
945                 .addComponent(btnSearchVideoDel)
946                 .addContainerGap())
947         );
948         gl_pnlSearchVideo.setVerticalGroup(
949             gl_pnlSearchVideo.createParallelGroup(GroupLayout.Alignment.LEADING)
950             .addGroup(gl_pnlSearchVideo.createSequentialGroup()
951                 .addComponent(srcSearchVideo, GroupLayout.PREFERRED_SIZE, 100, GroupLayout.PREFERRED_SIZE)
952                 .addPreferredGap(ComponentPlacement.RELATED)
953                 .addGroup(gl_pnlSearchVideo.createParallelGroup(GroupLayout.Alignment.BASELINE)
954                     .addComponent(btnSearchVideoDel)
955                     .addComponent(btnSearchVideoAdd))
956                 .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
957         );
958
959         pnlSearchComment.setBorder(BorderFactory.createTitledBorder("コメント検索対象フォルダ"));
960
961         lstSearchComment.setModel(mdlSearchComment);
962         srcSearchComment.setViewportView(lstSearchComment);
963
964         btnSearchCommentAdd.setText("追加...");
965
966         btnSearchCommentDel.setText("削除");
967
968         GroupLayout gl_pnlSearchComment = new GroupLayout(pnlSearchComment);
969         pnlSearchComment.setLayout(gl_pnlSearchComment);
970         gl_pnlSearchComment.setHorizontalGroup(
971             gl_pnlSearchComment.createParallelGroup(GroupLayout.Alignment.LEADING)
972             .addComponent(srcSearchComment, GroupLayout.DEFAULT_SIZE, 419, Short.MAX_VALUE)
973             .addGroup(GroupLayout.Alignment.TRAILING, gl_pnlSearchComment.createSequentialGroup()
974                 .addContainerGap(269, Short.MAX_VALUE)
975                 .addComponent(btnSearchCommentAdd)
976                 .addGap(18, 18, 18)
977                 .addComponent(btnSearchCommentDel)
978                 .addContainerGap())
979         );
980         gl_pnlSearchComment.setVerticalGroup(
981             gl_pnlSearchComment.createParallelGroup(GroupLayout.Alignment.LEADING)
982             .addGroup(gl_pnlSearchComment.createSequentialGroup()
983                 .addComponent(srcSearchComment, GroupLayout.PREFERRED_SIZE, 100, GroupLayout.PREFERRED_SIZE)
984                 .addPreferredGap(ComponentPlacement.RELATED)
985                 .addGroup(gl_pnlSearchComment.createParallelGroup(GroupLayout.Alignment.BASELINE)
986                     .addComponent(btnSearchCommentDel)
987                     .addComponent(btnSearchCommentAdd))
988                 .addContainerGap(16, Short.MAX_VALUE))
989         );
990
991         pnlSearchCache.setBorder(BorderFactory.createEtchedBorder());
992
993         lblSearchCache.setText("キャッシュ更新(秒)");
994
995         GroupLayout gl_pnlSearchCache = new GroupLayout(pnlSearchCache);
996         pnlSearchCache.setLayout(gl_pnlSearchCache);
997         gl_pnlSearchCache.setHorizontalGroup(
998             gl_pnlSearchCache.createParallelGroup(GroupLayout.Alignment.LEADING)
999             .addGroup(gl_pnlSearchCache.createSequentialGroup()
1000                 .addContainerGap()
1001                 .addComponent(lblSearchCache)
1002                 .addPreferredGap(ComponentPlacement.RELATED)
1003                 .addComponent(fldSearchCache, GroupLayout.PREFERRED_SIZE, 55, GroupLayout.PREFERRED_SIZE)
1004                 .addContainerGap(269, Short.MAX_VALUE))
1005         );
1006         gl_pnlSearchCache.setVerticalGroup(
1007             gl_pnlSearchCache.createParallelGroup(GroupLayout.Alignment.LEADING)
1008             .addGroup(gl_pnlSearchCache.createSequentialGroup()
1009                 .addContainerGap()
1010                 .addGroup(gl_pnlSearchCache.createParallelGroup(GroupLayout.Alignment.BASELINE)
1011                     .addComponent(lblSearchCache)
1012                     .addComponent(fldSearchCache, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
1013                 .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
1014         );
1015
1016         GroupLayout gl_pnlSearch = new GroupLayout(pnlSearch);
1017         pnlSearch.setLayout(gl_pnlSearch);
1018         gl_pnlSearch.setHorizontalGroup(
1019             gl_pnlSearch.createParallelGroup(GroupLayout.Alignment.LEADING)
1020             .addGroup(GroupLayout.Alignment.TRAILING, gl_pnlSearch.createSequentialGroup()
1021                 .addContainerGap()
1022                 .addGroup(gl_pnlSearch.createParallelGroup(GroupLayout.Alignment.TRAILING)
1023                     .addComponent(pnlSearchCache, GroupLayout.Alignment.LEADING, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
1024                     .addComponent(pnlSearchComment, GroupLayout.Alignment.LEADING, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
1025                     .addComponent(pnlSearchVideo, GroupLayout.Alignment.LEADING, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
1026                 .addContainerGap())
1027         );
1028         gl_pnlSearch.setVerticalGroup(
1029             gl_pnlSearch.createParallelGroup(GroupLayout.Alignment.LEADING)
1030             .addGroup(gl_pnlSearch.createSequentialGroup()
1031                 .addContainerGap()
1032                 .addComponent(pnlSearchVideo, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
1033                 .addPreferredGap(ComponentPlacement.RELATED)
1034                 .addComponent(pnlSearchComment, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
1035                 .addPreferredGap(ComponentPlacement.RELATED)
1036                 .addComponent(pnlSearchCache, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
1037                 .addContainerGap(27, Short.MAX_VALUE))
1038         );
1039
1040         tabbedPane.addTab("検索", pnlSearch);
1041
1042         final JPanel pnlButton = new JPanel();
1043         final JButton btnOk = new JButton("OK");
1044         final JButton btnCancel = new JButton("Cancel");
1045         pnlButton.add(btnOk);
1046         pnlButton.add(btnCancel);
1047
1048         GroupLayout layout = new GroupLayout(getContentPane());
1049         getContentPane().setLayout(layout);
1050         layout.setHorizontalGroup(
1051             layout.createParallelGroup(GroupLayout.Alignment.LEADING)
1052             .addComponent(tabbedPane, GroupLayout.DEFAULT_SIZE, 460, Short.MAX_VALUE)
1053             .addComponent(pnlButton)
1054         );
1055         layout.setVerticalGroup(
1056             layout.createSequentialGroup()
1057                 .addComponent(tabbedPane,GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE)
1058                 .addComponent(pnlButton)
1059         );
1060
1061         pack();
1062         setResizable(false);
1063         loadConfig();
1064     }
1065
1066     /**
1067      * @param args the command line arguments
1068      */
1069     public static void main(String args[]) {
1070         /* Set the Nimbus look and feel */
1071         //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
1072         /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
1073          * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
1074          */
1075         try {
1076             for (UIManager.LookAndFeelInfo info : UIManager.getInstalledLookAndFeels()) {
1077                 if ("Nimbus".equals(info.getName())) {
1078                     UIManager.setLookAndFeel(info.getClassName());
1079                     break;
1080                 }
1081             }
1082         } catch (ClassNotFoundException ex) {
1083             java.util.logging.Logger.getLogger(ConfigDialog.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
1084         } catch (InstantiationException ex) {
1085             java.util.logging.Logger.getLogger(ConfigDialog.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
1086         } catch (IllegalAccessException ex) {
1087             java.util.logging.Logger.getLogger(ConfigDialog.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
1088         } catch (UnsupportedLookAndFeelException ex) {
1089             java.util.logging.Logger.getLogger(ConfigDialog.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
1090         }
1091         //</editor-fold>
1092
1093         /* Create and display the form */
1094         java.awt.EventQueue.invokeLater(new Runnable() {
1095
1096             @Override
1097             public void run() {
1098                 new ConfigDialog().setVisible(true);
1099             }
1100         });
1101     }
1102     // Variables declaration - do not modify//GEN-BEGIN:variables
1103
1104     // ネットワーク
1105     // ネットワーク - アカウント
1106     private final JTextField fldMail;
1107     private final JTextField fldPassword;
1108     // ネットワーク - プロキシ
1109     private final JCheckBox cbProxyUse;
1110     private final JTextField fldProxyHost;
1111     private final JTextField fldProxyPort;
1112     // ファイル
1113     // ファイル - 動画
1114     private final JTextField fldVideoDir;
1115     private final JButton btnVideoDir;
1116     private final JTextField fldVideoFileNamePattern;
1117     private final JCheckBox cbVideoLocal;
1118     // ファイル - コメント
1119     private final JTextField fldCommentDir;
1120     private final JButton btnCommentDir;
1121     private final JTextField fldCommentFileNamePattern;
1122     private final JCheckBox cbCommentLocal;
1123     // ファイル - 変換動画
1124     private final JTextField fldOutputDir;
1125     private final JTextField fldOutputFileNamePattern;
1126     private final JButton btnOutputDir;
1127     private final JCheckBox cbOutputEnable;
1128     private final JCheckBox cbOutputCommentOverlay;
1129     private final JCheckBox cbOutputDisplayProgress;
1130     // ファイル - 禁則文字
1131     private final JTextField fldReplaceFrom = new JTextField();
1132     private final JTextField fldReplaceTo = new JTextField();
1133     // コメント
1134     // コメント
1135     private final JCheckBox cbCommentSizeAuto;
1136     private final JTextField fldCommentSizeManual;
1137     private final JCheckBox cbCommentMinSizeAuto;
1138     private final JTextField fldCommentMinSizeManual;
1139     private final JCheckBox cbCommentDisplaySizeDefault;
1140     private final JTextField fldCommentDisplaySizeManual;
1141     // コメント - 高度な設定
1142     private final JTextField fldFontPath;
1143     private final JButton btnFontPath;
1144     private final JTextField fldFontIndex;
1145     private final JComboBox<String> cmbFontShadow = new JComboBox<>();
1146     private final JCheckBox cbFontSizeArrangeDisable;
1147     private final JCheckBox cbCommentOpaque;
1148     // ffmpeg
1149     // ffmpeg - ファイルパス
1150     private final JTextField fldFfmpegPath;
1151     private final JButton btnFfmpegPath;
1152     private final JTextField fldFfmpegDllPath;
1153     private final JButton btnFfmpegDllPath;
1154     // ffmpeg - ffmpegパラメータ
1155     private final JRadioButton rbFfmpegOptionFile;
1156     private final JRadioButton rbFfmpegOptionDirectInput;
1157     private final JComboBox cmbFfmpegOptionFile;
1158     private final JTextField fldFfmpegOptionExtension;
1159     private final JTextField fldFfmpegOptionMain;
1160     private final JTextField fldFfmpegOptionIn;
1161     private final JTextField fldFfmpegOptionOut;
1162     private final JTextField fldFfmpegOptionAv;
1163     private final JCheckBox cbFfmpegOptionResize;
1164     private final JTextField fldFfmpegOptionResizeWidth;
1165     private final JTextField fldFfmpegOptionResizeHeight;
1166     private final JCheckBox cbFfmpegOptionKeepAspect;
1167     // NG設定
1168     // NG設定 - NGワード
1169     private final JList<String> lstNgWord;
1170     private final DefaultListModel<String> mdlNgWord = new DefaultListModel<>();
1171     private final JTextField fldNgWord;
1172     private final JButton btnNgWordAdd;
1173     private final JButton btnNgWordDel;
1174     // NG設定 - NGID
1175     private final JList<String> lstNgId;
1176     private final DefaultListModel<String> mdlNgId = new DefaultListModel<>();
1177     private final JTextField fldNgId;
1178     private final JButton btnNgIdAdd;
1179     private final JButton btnNgIdDel;
1180     // 検索
1181     // 検索 - 動画検索対象フォルダ
1182     private final JList<String> lstSearchVideo;
1183     private final DefaultListModel<String> mdlSearchVideo = new DefaultListModel<>();
1184     private final JButton btnSearchVideoAdd;
1185     private final JButton btnSearchVideoDel;
1186     // 検索 - コメント検索対象フォルダ
1187     private final JList<String> lstSearchComment;
1188     private final DefaultListModel<String> mdlSearchComment = new DefaultListModel<>();
1189     private final JButton btnSearchCommentAdd;
1190     private final JButton btnSearchCommentDel;
1191     // 検索 - キャッシュ更新(秒)
1192     private final JTextField fldSearchCache;
1193
1194
1195     // End of variables declaration//GEN-END:variables
1196
1197     private void loadConfig() {
1198         final Config p = Config.INSTANCE;
1199
1200         /*
1201          * ネットワーク - アカウント
1202          */
1203         fldMail.setText(p.getId());
1204         fldPassword.setText(p.getPassword());
1205
1206         /*
1207          * ネットワーク - プロキシ
1208          */
1209         cbProxyUse.setSelected(p.getProxyUse());
1210         fldProxyHost.setText(p.getProxyHost());
1211         fldProxyPort.setText(p.getProxyPort());
1212
1213         /*
1214          * ファイル - 動画
1215          */
1216         fldVideoDir.setText(p.getVideoDir());
1217         fldVideoFileNamePattern.setText(p.getVideoFileNamePattern());
1218         cbVideoLocal.setSelected(p.getVideoUseLocal());
1219
1220         /*
1221          * ファイル - コメント
1222          */
1223         fldCommentDir.setText(p.getCommentDir());
1224         fldCommentFileNamePattern.setText(p.getCommentFileNamePattern());
1225         cbCommentLocal.setSelected(p.getCommentUseLocal());
1226
1227         /*
1228          * ファイル - 変換動画
1229          */
1230         fldOutputDir.setText(p.getOutputDir());
1231         fldOutputFileNamePattern.setText(p.getOutputFileNamePattern());
1232         cbOutputEnable.setSelected(p.getOutputEnable());
1233         cbOutputCommentOverlay.setSelected(p.getOutputCommentOverlay());
1234         cbOutputDisplayProgress.setSelected(p.getOutputDisplayProgress());
1235
1236         /*
1237          * ファイル - 禁則文字
1238          */
1239         // TODO ファイル - 禁則文字
1240
1241         /**
1242          * コメント
1243          */
1244         cbCommentSizeAuto.setSelected(p.getCommentSizeAutosize());
1245         fldCommentSizeManual.setText(p.getCommentSizeManual());
1246         cbCommentMinSizeAuto.setSelected(p.getCommentMinSizeAutosize());
1247         fldCommentSizeManual.setText(p.getCommentMinSizeManual());
1248         cbCommentDisplaySizeDefault.setSelected(p.getCommentDisplaySizeDefault());
1249         fldCommentDisplaySizeManual.setText(p.getCommentDisplaySizeManual());
1250
1251         /**
1252          * コメント - 高度な設定
1253          */
1254         fldFontPath.setText(p.getFontPath());
1255         fldFontIndex.setText(p.getFontIndex());
1256         cmbFontShadow.setSelectedIndex(p.getFontShadow());
1257         cbFontSizeArrangeDisable.setSelected(p.getFontSizeArrangeDisable());
1258         cbCommentOpaque.setSelected(p.getCommentOpaque());
1259
1260         /*
1261          * ffmpeg - ファイルパス
1262          */
1263         fldFfmpegPath.setText(p.getFfmpegPath());
1264         fldFfmpegDllPath.setText(p.getFfmpegDllPath());
1265
1266         /*
1267          * ffmpeg - ffmpegパラメータ
1268          */
1269         rbFfmpegOptionFile.setSelected(!p.getFfmpegParamInputDirect());
1270         rbFfmpegOptionDirectInput.setSelected(p.getFfmpegParamInputDirect());
1271         // TODO cmbFfmpegOptionFile
1272         fldFfmpegOptionExtension.setText(p.getFfmpegExtension());
1273         fldFfmpegOptionMain.setText(p.getFfmpegMainOption());
1274         fldFfmpegOptionIn.setText(p.getFfmpegInOption());
1275         fldFfmpegOptionOut.setText(p.getFfmpegOutOption());
1276         fldFfmpegOptionAv.setText(p.getFfmpegAvOption());
1277         cbFfmpegOptionResize.setSelected(p.getFfmpegResizeEnable());
1278         fldFfmpegOptionResizeWidth.setText(p.getFfmpegResizeWidth());
1279         fldFfmpegOptionResizeHeight.setText(p.getFfmpegResizeHeight());
1280         cbFfmpegOptionKeepAspect.setSelected(p.getFfmpegKeepAspect());
1281
1282         /*
1283          * NG 設定
1284          */
1285         final List<String> ngWords = p.getNgWords();
1286         for (String s : ngWords) {
1287             mdlNgWord.addElement(s);
1288         }
1289         final List<String> ngIds = p.getNgIds();
1290         for (String s : ngIds) {
1291             mdlNgId.addElement(s);
1292         }
1293     }
1294     private void saveConfig() {
1295         final Config p = Config.INSTANCE;
1296
1297         /*
1298          * ネットワーク - アカウント
1299          */
1300
1301         p.setId(fldMail.getText());
1302         p.setPassword(fldPassword.getText());
1303
1304         /*
1305          * ネットワーク - プロキシ
1306          */
1307         p.setProxyUse(cbProxyUse.isSelected());
1308         p.setProxyHost(fldProxyHost.getText());
1309         p.setProxyPort(fldProxyPort.getText());
1310
1311         /*
1312          * ファイル - 動画
1313          */
1314         p.setVideoDir(fldVideoDir.getText());
1315         p.setVideoFileNamePattern(fldVideoFileNamePattern.getText());
1316         p.setVideoUseLocal(cbVideoLocal.isSelected());
1317
1318         /*
1319          * ファイル - コメント
1320          */
1321         p.setCommentDir(fldCommentDir.getText());
1322         p.setCommentFileNamePattern(fldCommentFileNamePattern.getText());
1323         p.setCommentUseLocal(cbCommentLocal.isSelected());
1324
1325         /*
1326          * ファイル - 変換動画
1327          */
1328         p.setOutputDir(fldOutputDir.getText());
1329         p.setOutputFileNamePattern(fldOutputFileNamePattern.getText());
1330         p.setOutputEnable(cbOutputEnable.isSelected());
1331         p.setOutputCommentOverlay(cbOutputCommentOverlay.isSelected());
1332         p.setOutputDisplayProgress(cbOutputDisplayProgress.isSelected());
1333
1334         /**
1335          * コメント
1336          */
1337         p.setCommentSizeAutosize(cbCommentSizeAuto.isSelected());
1338         p.setCommentSizeManual(fldCommentSizeManual.getText());
1339         p.setCommentMinSizeAutosize(cbCommentMinSizeAuto.isSelected());
1340         p.setCommentMinSizeManual(fldCommentSizeManual.getText());
1341         p.setCommentDisplaySizeDefault(cbCommentDisplaySizeDefault.isSelected());
1342         p.setCommentDisplaySizeManual(fldCommentDisplaySizeManual.getText());
1343
1344         /**
1345          * コメント - 高度な設定
1346          */
1347         p.setFontPath(fldFontPath.getText());
1348         p.setFontIndex(fldFontIndex.getText());
1349         // TODO 影の種類はコンボボックス
1350         p.setFontSizeArrangeDisable(cbFontSizeArrangeDisable.isSelected());
1351         p.setCommentOpaque(cbCommentOpaque.isSelected());
1352
1353         /*
1354          * ffmpeg - ファイルパス
1355          */
1356         p.setFfmpegPath(fldFfmpegPath.getText());
1357         p.setFfmpegDllPath(fldFfmpegDllPath.getText());
1358
1359         /*
1360          * ffmpeg - ffmpegパラメータ
1361          */
1362         p.setFfmpegParamInputDirect(rbFfmpegOptionDirectInput.isSelected());
1363         // TODO cmbFfmpegOptionFile
1364         p.setFfmpegExtension(fldFfmpegOptionExtension.getText());
1365         p.setFfmpegMainOption(fldFfmpegOptionMain.getText());
1366         p.setFfmpegInOption(fldFfmpegOptionIn.getText());
1367         p.setFfmpegOutOption(fldFfmpegOptionOut.getText());
1368         p.setFfmpegAvOption(fldFfmpegOptionAv.getText());
1369         p.setFfmpegResizeEnable(cbFfmpegOptionResize.isSelected());
1370         p.setFfmpegResizeWidth(fldFfmpegOptionResizeWidth.getText());
1371         p.setFfmpegResizeHeight(fldFfmpegOptionResizeHeight.getText());
1372         p.setFfmpegKeepAspect(cbFfmpegOptionKeepAspect.isSelected());
1373
1374         /*
1375          * NG 設定
1376          */
1377         p.setNgWords(Arrays.asList((String[]) mdlNgWord.toArray()));
1378         p.setNgIds(Arrays.asList((String[])mdlNgId.toArray()));
1379
1380     }
1381 }