<h3>機能</h3>\r
<h4>基本機能</h4>\r
<ul>\r
- <li>さきゅばすver1.22rの全機能 </li>\r
+ <li>さきゅばすver1.22rの全機能</li>\r
+ <li>投稿者コメントのダウンロード、動画への付与。</li>\r
<li>nmから始まる動画(swf動画)のダウンロード\r
<ul>\r
<li>ただし、変換自体を正しく行えるものは少ないはず(<a href="http://www5.ssw.co.jp/nmm/">ニ\r
</ul>\r
<p><br>\r
</p>\r
-<h3> 更新履歴<br>\r
-</h3>\r
+<h3> 更新履歴</h3>\r
+<p>2009/12/09 ver.1.0.0<br>\r
+投稿者コメントのダウンロード、変換対応。<br>\r
+UIの見直し。<br>\r
+</p>\r
<p>2009/12/03 ver.0.0.1<br>\r
動画を保存する/しないのラジオボタンが逆転していた不具合を修正。<br>\r
</p>\r
application.title=Saccubus\r
application.vendor=yuki\r
build.classes.dir=${build.dir}/classes\r
-build.classes.excludes=\r
+build.classes.excludes=**/*.java,**/*.form\r
# This directory is removed when the project is cleaned:\r
build.dir=build\r
build.generated.dir=${build.dir}/generated\r
package saccubus;
-import javax.swing.JButton;
-
/**
* <p>
* \83^\83C\83g\83\8b: \82³\82«\82ã\82Î\82·
* @version 1.0
*/
public class ConvertStopFlag {
- private boolean Flag = false;
- private boolean Finished = false;
+ public interface StateChangeListener {
- private final JButton Button;
+ void changeState(State s);
+ }
- private final String WaitText;
+ public enum State {
- private final String DoneText;
+ PROCESSING, STOPPING, FINISHED;
+ }
+ private volatile boolean needStop = false;
+ private volatile boolean finished = false;
+ private final StateChangeListener listener;
- public ConvertStopFlag(final JButton button, final String stop_text,
- final String wait_text, final String done_text) {
- Flag = false;
- Finished = false;
- Button = button;
- if (button != null && stop_text != null) {
- button.setText(stop_text);
- }
- DoneText = done_text;
- WaitText = wait_text;
- }
+ public ConvertStopFlag(StateChangeListener listener) {
+ this.listener = listener;
+ listener.changeState(State.PROCESSING);
+ }
- public void stop() {
- Flag = true;
- if (Button != null && WaitText != null) {
- Button.setText(WaitText);
- Button.setEnabled(false);
- }
- }
+ public void requestStop() {
+ needStop = true;
+ listener.changeState(State.STOPPING);
+ }
- public boolean needStop() {
- return Flag;
- }
+ public boolean needStop() {
+ return needStop;
+ }
- public boolean isConverted() {
- return Finished;
- }
+ public boolean isFinished() {
+ return finished;
+ }
- public void finished() {
- Finished = true;
- if (Button != null && DoneText != null) {
- Button.setText(DoneText);
- Button.setEnabled(true);
- }
- }
+ public void finished() {
+ finished = true;
+ listener.changeState(State.FINISHED);
+ }
}
package saccubus;
-import javax.swing.JLabel;
-import saccubus.net.NicoClient;
-import java.io.*;
-
-import saccubus.conv.ConvertToVideoHook;
+import saccubus.filegetter.LoginInfo;
+import saccubus.filegetter.FileInstanciator;
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.util.Properties;
+import saccubus.conv.ConvertToVideoHook;
+import saccubus.net.TextProgressListener;
import yukihane.swf.Cws2Fws;
/**
* @version 1.0
*/
public class Converter extends Thread {
- private final ConvertingSetting Setting;
-
- private final String Tag;
-
- private final String VideoID;
-
- private String VideoTitle;
-
- private final String Time;
-
- private JLabel Status;
- private final ConvertStopFlag StopFlag;
+ private static final String VIDEO_URL_PARSER = "http://www.nicovideo.jp/watch/";
+ private static final String TMP_CWS = "fws_tmp.swf";
+ private final ConvertingSetting Setting;
+ private final String Tag;
+ private final String Time;
+ private final TextProgressListener listener;
+ private final ConvertStopFlag StopFlag;
+ private final File commentMiddleFile = new File("./vhook.tmp");
+ private final File tcommMiddleFile = new File("./tcomment.tmp");
+
+ public Converter(String url, String time, ConvertingSetting setting,
+ TextProgressListener listener, ConvertStopFlag flag) {
+ url = url.trim();
+ if (url.startsWith(VIDEO_URL_PARSER)) {
+ int index = url.indexOf('?', VIDEO_URL_PARSER.length());
+ if (index >= 0) {
+ Tag = url.substring(VIDEO_URL_PARSER.length(), index);
+ } else {
+ Tag = url.substring(VIDEO_URL_PARSER.length());
+ }
+ } else {
+ Tag = url;
+ }
+ Time = time;
+ Setting = setting;
+ this.listener = listener;
+ StopFlag = flag;
+ }
- private static final String TMP_COMMENT_MIDDLE_FILE = "./vhook.tmp";
- private static final String VIDEO_URL_PARSER = "http://www.nicovideo.jp/watch/";
-
- public Converter(String url, String time, ConvertingSetting setting,
- JLabel status, ConvertStopFlag flag) {
- url = url.trim();
- if(url.startsWith(VIDEO_URL_PARSER)){
- int index = url.indexOf('?',VIDEO_URL_PARSER.length());
- if(index >= 0){
- Tag = url.substring(VIDEO_URL_PARSER.length(),index);
- }else{
- Tag = url.substring(VIDEO_URL_PARSER.length());
- }
- }else{
- Tag = url;
- }
- VideoID = "[" + Tag + "]";
- Time = time;
- Setting = setting;
- Status = status;
- StopFlag = flag;
- }
-
- private File VideoFile = null;
-
- private File CommentFile = null;
-
- private File ConvertedVideoFile = null;
+ @Override
+ public void run() {
+ try {
+ runConvert();
+ } catch (Exception ex) {
+ sendText(ex.getMessage());
+ ex.printStackTrace();
+ } finally {
+ if (commentMiddleFile.exists()) {
+ commentMiddleFile.delete();
+ }
+ if (tcommMiddleFile.exists()) {
+ tcommMiddleFile.delete();
+ }
+ StopFlag.finished();
+ }
+ }
+
+ private void runConvert() throws IOException, InterruptedException {
+ if (!shouldRun()) {
+ sendText("\89½\82à\82·\82é\82±\82Æ\82ª\82 \82è\82Ü\82¹\82ñ");
+ return;
+ }
+
+ validSetting();
+ final OptionValue ov = detectOption();
+
+ sendText("\83\8d\83O\83C\83\93\92\86");
+
+ final FileInstanciator fi = createInstanciator();
+
+ stopFlagReturn();
+
+ final File videoFile = fi.getVideoFile(listener);
+
+ stopFlagReturn();
+
+ final File commentFile = fi.getCommentFile(listener);
+
+ stopFlagReturn();
+
+ final File tcommFile = fi.getTcommFile(listener);
+
+ if (!Setting.isSaveConverted()) {
+ sendText("\93®\89æ\81E\83R\83\81\83\93\83g\82ð\95Û\91¶\82µ\81A\95Ï\8a·\82Í\8ds\82¢\82Ü\82¹\82ñ\82Å\82µ\82½\81B");
+ return;
+ }
+
+ if (Setting.getAddComment()) {
+ sendText("\83R\83\81\83\93\83g\82Ì\92\86\8aÔ\83t\83@\83C\83\8b\82Ö\82Ì\95Ï\8a·\92\86");
+
+ boolean conv = ConvertToVideoHook.convert(commentFile, commentMiddleFile,
+ Setting.getNG_ID(), Setting.getNG_Word());
+ if (!conv) {
+ sendText("\83R\83\81\83\93\83g\95Ï\8a·\82É\8e¸\94s\81B\82¨\82»\82ç\82\90³\8bK\95\\8c»\82Ì\8aÔ\88á\82¢\81H");
+ return;
+ }
+ }
+
+ stopFlagReturn();
+
+ if (Setting.getAddTcomment()) {
+ sendText("\93\8a\8de\8eÒ\83R\83\81\83\93\83g\82Ì\92\86\8aÔ\83t\83@\83C\83\8b\82Ö\82Ì\95Ï\8a·\92\86");
+
+ boolean conv = ConvertToVideoHook.convert(tcommFile, tcommMiddleFile,
+ Setting.getNG_ID(), Setting.getNG_Word());
+ if (!conv) {
+ sendText("\83R\83\81\83\93\83g\95Ï\8a·\82É\8e¸\94s\81B\82¨\82»\82ç\82\90³\8bK\95\\8c»\82Ì\8aÔ\88á\82¢\81H");
+ return;
+ }
+ }
+
+ stopFlagReturn();
+
+ sendText("\93®\89æ\82Ì\95Ï\8a·\82ð\8aJ\8en");
+ /*\83r\83f\83I\96¼\82Ì\8am\92è*/
+ File convertedVideoFile;
+ if (Setting.isConvFixFileName()) {
+ if (fi.getVideoTitle() == null) {
+ sendText("\95Ï\8a·\8cã\82Ì\83r\83f\83I\83t\83@\83C\83\8b\96¼\82ª\8am\92è\82Å\82«\82Ü\82¹\82ñ\81B");
+ return;
+ }
+ Setting.getConvFixFileNameFolder().mkdir();
+ String conv_name = fi.getVideoTitle();
+ if (!Setting.isNotAddVideoID_Conv()) {//\95t\89Á\82µ\82È\82¢\82È\82ç
+ conv_name = getVideoIDWithBracket() + conv_name;
+ }
+ convertedVideoFile = new File(Setting.getConvFixFileNameFolder(), conv_name + ov.getExtOption());
+ } else {
+ String filename = Setting.getConvertedVideoFile().getPath();
+ if (!filename.endsWith(ov.getExtOption())) {
+ filename = filename.substring(0, filename.lastIndexOf('.'))
+ + ov.getExtOption();
+ convertedVideoFile = new File(filename);
+ } else {
+ convertedVideoFile = Setting.getConvertedVideoFile();
+ }
+ }
+ int code;
+ if ((code = converting_video(videoFile, convertedVideoFile, Setting.getAddComment(), commentMiddleFile.getPath(),
+ Setting.getAddTcomment(), tcommMiddleFile.getPath(), ov)) == 0) {
+ sendText("\95Ï\8a·\82ª\90³\8fí\82É\8fI\97¹\82µ\82Ü\82µ\82½\81B");
+ if (Setting.isDeleteCommentAfterConverting()) {
+ commentFile.delete();
+ }
+ if (Setting.isDeleteVideoAfterConverting()) {
+ videoFile.delete();
+ }
+ } else {
+ sendText("\95Ï\8a·\83G\83\89\81[");
+ }
+ }
+
+ private FileInstanciator createInstanciator() throws IOException {
+ FileInstanciator fi;
+ LoginInfo li = new LoginInfo(Setting.getMailAddress(), Setting.getPassword(), Setting.useProxy(),
+ Setting.getProxy(), Setting.getProxyPort());
+
+ File initVFileName;
+ File vDir;
+ final boolean autoVNaming = Setting.isVideoFixFileName();
+ if (autoVNaming) {
+ initVFileName = Setting.getVideoFixFileNameFolder();
+ vDir = initVFileName;
+ } else {
+ initVFileName = Setting.getVideoFile();
+ vDir = initVFileName.getAbsoluteFile().getParentFile();
+ }
+ if (vDir == null || !vDir.isDirectory()) {
+ throw new IllegalArgumentException("\93ü\97Í\93®\89æ\83f\83B\83\8c\83N\83g\83\8a\82ª\91¶\8dÝ\82µ\82Ü\82¹\82ñ: " + vDir);
+ }
+ FileInstanciator.InstanciationType<VideoSaveKind> videoType = new FileInstanciator.InstanciationType<VideoSaveKind>(Setting.
+ getVideoSaveKind(), autoVNaming, initVFileName);
+
+ File initCFileName;
+ File cDir;
+ final boolean autoCNaming = Setting.isCommentFixFileName();
+ if (autoCNaming) {
+ initCFileName = Setting.getCommentFixFileNameFolder();
+ cDir = initCFileName;
+ } else {
+ initCFileName = Setting.getCommentFile();
+ cDir = initCFileName.getAbsoluteFile().getParentFile();
+ }
+ if (cDir == null || !cDir.isDirectory()) {
+ throw new IllegalArgumentException("\93ü\97Í\83R\83\81\83\93\83g\83f\83B\83\8c\83N\83g\83\8a\82ª\91¶\8dÝ\82µ\82Ü\82¹\82ñ: " + cDir);
+ }
+ FileInstanciator.CommentInstanciationType commentType = new FileInstanciator.CommentInstanciationType(Setting.
+ isSaveComment(), autoCNaming, initCFileName, Setting.isFixCommentNum(), Setting.getBackComment());
+
+ File initTFileName;
+ File tDir;
+ final boolean autoTNaming = Setting.getTcommentSetting().isAutoFileName();
+ tDir = Setting.getTcommentSetting().getDirectory();
+ if (!tDir.isDirectory()) {
+ throw new IllegalArgumentException("\93ü\97Í\93\8a\8de\8eÒ\83R\83\81\83\93\83g\83f\83B\83\8c\83N\83g\83\8a\82ª\91¶\8dÝ\82µ\82Ü\82¹\82ñ: " + tDir);
+ }
+ if (autoTNaming) {
+ initTFileName = tDir;
+ } else {
+ initTFileName = new File(tDir, Setting.getTcommentSetting().getFileName());
+ }
+ FileInstanciator.InstanciationType<Boolean> tcommType = new FileInstanciator.InstanciationType<Boolean>(
+ Setting.getTcommentSetting().isDownload(), autoTNaming, initTFileName);
+
+ fi = FileInstanciator.create(StopFlag, videoType, commentType, tcommType, li, Tag, Time);
+ return fi;
+ }
+
+ /**
+ * (\83l\83b\83g\83\8f\81[\83N\90Ý\92è\88È\8aO\82Ì)\90Ý\92è\82ð\8c\9f\8fØ\82·\82é.
+ * @throws IllegalArgumentException \90Ý\92è\82É\95s\94õ\82ª\82 \82é\8fê\8d\87.
+ */
+ private void validSetting() {
+ if (Setting.isSaveConverted()) {
+ File a = new File(Setting.getFFmpegPath());
+ if (!a.canRead()) {
+ throw new IllegalArgumentException("FFmpeg\82ª\8c©\82Â\82©\82è\82Ü\82¹\82ñ\81B");
+ }
+ if (Setting.getVhookPath().indexOf(' ') >= 0) {
+ throw new IllegalArgumentException("\82·\82¢\82Ü\82¹\82ñ\81B\8c»\8dÝvhook\83\89\83C\83u\83\89\83\8a\82É\82Í\94¼\8ap\8bó\94\92\82Í\8eg\82¦\82Ü\82¹\82ñ\81B");
+ }
+ a = new File(Setting.getVhookPath());
+ if (!a.canRead()) {
+ throw new IllegalArgumentException("Vhook\83\89\83C\83u\83\89\83\8a\82ª\8c©\82Â\82©\82è\82Ü\82¹\82ñ\81B");
+ }
+ a = new File(Setting.getFontPath());
+ if (!a.canRead()) {
+ throw new IllegalArgumentException("\83t\83H\83\93\83g\82ª\8c©\82Â\82©\82è\82Ü\82¹\82ñ\81B");
+ }
+ } else {
+ if (Setting.isDeleteVideoAfterConverting()) {
+ throw new IllegalArgumentException("\95Ï\8a·\82µ\82È\82¢\82Ì\82É\81A\93®\89æ\8dí\8f\9c\82µ\82¿\82á\82Á\82Ä\97Ç\82¢\82ñ\82Å\82·\82©\81H");
+ }
+ if (Setting.isDeleteCommentAfterConverting()) {
+ throw new IllegalArgumentException("\95Ï\8a·\82µ\82È\82¢\82Ì\82É\81A\83R\83\81\83\93\83g\8dí\8f\9c\82µ\82¿\82á\82Á\82Ä\97Ç\82¢\82ñ\82Å\82·\82©\81H");
+ }
+ }
+ }
+
+ /** @return \89½\82©\8eÀ\8ds\82·\82×\82«\8f\88\97\9d\82ª\82 \82ê\82Îtrue. */
+ private boolean shouldRun() {
+ return Setting.isSaveConverted() || needsDownload();
+ }
+
+ /** @return \89½\82©\83_\83E\83\93\83\8d\81[\83h\82·\82é\82à\82Ì\82ª\82 \82ê\82Îtrue. */
+ private boolean needsDownload() {
+ return (Setting.getVideoSaveKind() == VideoSaveKind.SAVE) || Setting.isSaveComment();
+ }
+
+ private void sendText(String text) {
+ listener.setText(text);
+ }
+
+ private int converting_video(File videoFile, File convertedVideoFile, boolean addComment, String vhook_path,
+ boolean addTcomment, String tcommPath, OptionValue ov) throws InterruptedException, IOException {
+ File fwsFile = Cws2Fws.createFws(videoFile, new File(TMP_CWS));
+
+ StringBuffer sb = new StringBuffer();
+ sb.append("\"");
+ sb.append(Setting.getFFmpegPath().replace("\\", "\\\\"));
+ sb.append("\"");
+ sb.append(" -y ");
+ sb.append(ov.getMainOption());
+ sb.append(" ");
+ sb.append(ov.getInOption());
+ sb.append(" -i ");
+ if (fwsFile == null) {
+ sb.append("\"");
+ sb.append(videoFile.getPath().replace("\\", "\\\\"));
+ sb.append("\"");
+ } else {
+ sb.append(fwsFile.getPath().replace("\\", "\\\\"));
+ }
+ sb.append(" ");
+ sb.append(ov.getOutOption());
+ sb.append(" \"");
+ sb.append(convertedVideoFile.getPath().replace("\\", "\\\\"));
+ sb.append("\"");
+ if (!Setting.isVhookDisabled()) {
+ if (!addVhookSetting(sb, addComment, vhook_path, addTcomment, tcommPath)) {
+ return -1;
+ }
+ }
+ String cmd = sb.substring(0);
+ System.out.println("arg:" + cmd);
+ try {
+ System.out.println("\n\n----\nProcessing FFmpeg...\n----\n\n");
+ Process process = Runtime.getRuntime().exec(cmd);
+ BufferedReader ebr = new BufferedReader(new InputStreamReader(
+ process.getErrorStream()));
+ String e;
+ while ((e = ebr.readLine()) != null) {
+ String state = e;
+ if (state.startsWith("frame=")) {
+ sendText(state);
+ } else if (!state.endsWith("No accelerated colorspace conversion found")) {
+ System.out.println(e);
+ }
- private File CommentMiddleFile = null;
+ try {
+ stopFlagReturn();
+ } catch (InterruptedException ex) {
+ process.destroy();
+ throw ex;
+ }
- @Override
- public void run() {
- boolean converted = false;
- try {
- if (!Setting.isSaveConverted() && !Setting.isSaveComment()
- && (Setting.getVideoSaveKind() != VideoSaveKind.SAVE)) {
- Status.setText("\89½\82à\82·\82é\82±\82Æ\82ª\82 \82è\82Ü\82¹\82ñ");
- return;
- }
- if (Setting.isSaveConverted()) {
- File a = new File(Setting.getFFmpegPath());
- if (!a.canRead()) {
- Status.setText("FFmpeg\82ª\8c©\82Â\82©\82è\82Ü\82¹\82ñ\81B");
- return;
- }
- if (Setting.getVhookPath().indexOf(' ') >= 0) {
- Status.setText("\82·\82¢\82Ü\82¹\82ñ\81B\8c»\8dÝvhook\83\89\83C\83u\83\89\83\8a\82É\82Í\94¼\8ap\8bó\94\92\82Í\8eg\82¦\82Ü\82¹\82ñ\81B");
- return;
- }
- a = new File(Setting.getVhookPath());
- if (!a.canRead()) {
- Status.setText("Vhook\83\89\83C\83u\83\89\83\8a\82ª\8c©\82Â\82©\82è\82Ü\82¹\82ñ\81B");
- return;
- }
- a = new File(Setting.getFontPath());
- if (!a.canRead()) {
- Status.setText("\83t\83H\83\93\83g\82ª\8c©\82Â\82©\82è\82Ü\82¹\82ñ\81B");
- return;
- }
- if (!detectOption()) {
- Status.setText("\95Ï\8a·\83I\83v\83V\83\87\83\93\83t\83@\83C\83\8b\82Ì\93Ç\82Ý\8d\9e\82Ý\82É\8e¸\94s\82µ\82Ü\82µ\82½\81B");
- return;
- }
- } else {
- if (Setting.isDeleteVideoAfterConverting()) {
- Status.setText("\95Ï\8a·\82µ\82È\82¢\82Ì\82É\81A\93®\89æ\8dí\8f\9c\82µ\82¿\82á\82Á\82Ä\97Ç\82¢\82ñ\82Å\82·\82©\81H");
- return;
- }
- if (Setting.isDeleteCommentAfterConverting()) {
- Status.setText("\95Ï\8a·\82µ\82È\82¢\82Ì\82É\81A\83R\83\81\83\93\83g\8dí\8f\9c\82µ\82¿\82á\82Á\82Ä\97Ç\82¢\82ñ\82Å\82·\82©\81H");
- return;
- }
- }
- NicoClient client = null;
- if ((Setting.getVideoSaveKind() == VideoSaveKind.SAVE) || Setting.isSaveComment()) {
- if (Setting.getMailAddress() == null
- || Setting.getPassword() == null
- || Setting.getMailAddress().equals("")
- || Setting.getPassword().equals("")) {
- Status.setText("\83\81\81[\83\8b\83A\83h\83\8c\83X\82©\83p\83X\83\8f\81[\83h\82ª\8bó\94\92\82Å\82·\81B");
- return;
- }
- if (Setting.useProxy()
- && (Setting.getProxy() == null || Setting.getProxy()
- .length() <= 0)
- && (Setting.getProxyPort() < 0 || Setting
- .getProxyPort() > 65535)) {
- Status.setText("\83v\83\8d\83L\83V\82Ì\90Ý\92è\82ª\95s\90³\82Å\82·\81B");
- return;
- }
- if (stopFlagReturn()) {
- return;
- }
- Status.setText("\83\8d\83O\83C\83\93\92\86");
- String proxy;
- int proxy_port;
- if (Setting.useProxy()) {
- proxy = Setting.getProxy();
- proxy_port = Setting.getProxyPort();
- } else {
- proxy = null;
- proxy_port = -1;
- }
- client = new NicoClient(Setting.getMailAddress(), Setting
- .getPassword(), StopFlag, proxy, proxy_port);
-
- if (!client.isLoggedIn()) {
- Status.setText("\83\8d\83O\83C\83\93\82É\8e¸\94s");
- return;
- }
- if (stopFlagReturn()) {
- return;
- }
- /*\93®\89æ\82Ì\95Û\91¶*/
- if (!client.getVideoInfo(Tag, Time)) {
- Status.setText(Tag + "\82Ì\8fî\95ñ\82Ì\8eæ\93¾\82É\8e¸\94s");
- return;
- }
- if (stopFlagReturn()) {
- return;
- }
- VideoTitle = client.getVideoTitle();
- }
- if (Setting.getVideoSaveKind() == VideoSaveKind.SAVE) {
- if (Setting.isVideoFixFileName()) {
- Setting.getVideoFixFileNameFolder().mkdir();
- VideoFile = new File(Setting.getVideoFixFileNameFolder(),
- VideoID + VideoTitle + ".flv");
- } else {
- VideoFile = Setting.getVideoFile();
- }
- Status.setText("\93®\89æ\82Ì\83_\83E\83\93\83\8d\81[\83h\8aJ\8en\92\86");
- VideoFile = client.getVideo(VideoFile, Status);
- if (stopFlagReturn()) {
- return;
- }
- if (VideoFile == null) {
- Status.setText("\93®\89æ\82Ì\83_\83E\83\93\83\8d\81[\83h\82É\8e¸\94s");
- return;
- }
- } else {
- if (Setting.isSaveConverted()) {
- if (Setting.getVideoSaveKind() == VideoSaveKind.NO_SAVE) {
- if (Setting.isVideoFixFileName()) {
- if (!detectVideoTitle(Setting.getVideoFixFileNameFolder())) {
- Status.setText("\93®\89æ\83t\83@\83C\83\8b\82ª\91¶\8dÝ\82µ\82Ü\82¹\82ñ\81B");
- return;
- }
- VideoFile = new File(Setting.getVideoFixFileNameFolder(), VideoID
- + VideoTitle + ".flv");
- if (!VideoFile.canRead()) {
- Status.setText("\93®\89æ\83t\83@\83C\83\8b\82ª\93Ç\82Ý\8d\9e\82ß\82Ü\82¹\82ñ\81B");
- return;
- }
- } else {
- VideoFile = Setting.getVideoFile();
- if (!VideoFile.exists()) {
- Status.setText("\93®\89æ\83t\83@\83C\83\8b\82ª\91¶\8dÝ\82µ\82Ü\82¹\82ñ\81B");
- return;
- }
- }
- } else if (Setting.getVideoSaveKind() == VideoSaveKind.NICOBROWSER) {
- VideoFile = Setting.getVideoFile();
- if (!VideoFile.isFile()) {
- Status.setText("\93®\89æ\83t\83@\83C\83\8b\82ª\91¶\8dÝ\82µ\82Ü\82¹\82ñ\81B");
- return;
- }
- }
+ }
+ process.waitFor();
+ return process.exitValue();
+ } finally {
+ if (fwsFile != null) {
+ fwsFile.delete();
+ }
+ }
+ }
+
+ private boolean addVhookSetting(StringBuffer sb, boolean addComment, String vhook_path, boolean addTcomment,
+ String tcommPath) {
+ try {
+ sb.append(" -vfilters \"vhext=");
+ sb.append(Setting.getVhookPath().replace("\\", "/"));
+ if (addComment) {
+ sb.append("|");
+ sb.append("--data-user:");
+ sb.append(URLEncoder.encode(vhook_path.replace("\\", "/"), "Shift_JIS"));
+ }
+ if (addTcomment) {
+ sb.append("|");
+ sb.append("--data-owner:");
+ sb.append(URLEncoder.encode(tcommPath.replace("\\", "/"), "Shift_JIS"));
+ }
+ sb.append("|");
+ sb.append("--font:");
+ sb.append(URLEncoder.encode(
+ Setting.getFontPath().replace("\\", "/"), "Shift_JIS"));
+ sb.append("|");
+ sb.append("--font-index:");
+ sb.append(Setting.getFontIndex());
+ sb.append("|");
+ sb.append("--show-user:");
+ sb.append(Setting.getVideoShowNum());
+ sb.append("|");
+ sb.append("--shadow:");
+ sb.append(Setting.getShadowIndex());
+ sb.append("|");
+ if (Setting.isVhook_ShowConvertingVideo()) {
+ sb.append("--enable-show-video");
+ sb.append("|");
+ }
+ if (Setting.isFixFontSize()) {
+ sb.append("--enable-fix-font-size");
+ sb.append("|");
+ }
+ if (Setting.isOpaqueComment()) {
+ sb.append("--enable-opaque-comment");
+ }
+ sb.append("\"");
+ return true;
+ } catch (UnsupportedEncodingException e) {
+ e.printStackTrace();
+ return false;
+ }
+ }
+
+ public boolean isConverted() {
+ return StopFlag.isFinished();
+ }
+
+ private void stopFlagReturn() throws InterruptedException {
+ if (StopFlag.needStop()) {
+ throw new InterruptedException("\92\86\8e~\82µ\82Ü\82µ\82½\81B");
+ }
+ }
+
+ public ConvertStopFlag getStopFlag() {
+ return this.StopFlag;
+ }
+
+ private OptionValue detectOption() {
+ String extOption;
+ String inOption;
+ String outOption;
+ String mainOption;
+ if (Setting.getOptionFile() != null) {
+ try {
+ Properties prop = new Properties();
+ prop.loadFromXML(new FileInputStream(Setting.getOptionFile()));
+ extOption = prop.getProperty("EXT", null);
+ inOption = prop.getProperty("IN", null);
+ outOption = prop.getProperty("OUT", null);
+ mainOption = prop.getProperty("MAIN", null);
+ if (extOption != null && inOption != null && outOption != null
+ && mainOption != null) {
+ } else {
+ throw new IllegalArgumentException("\95Ï\8a·\83I\83v\83V\83\87\83\93\83t\83@\83C\83\8b\82Ì\93Ç\82Ý\8d\9e\82Ý\82É\8e¸\94s\82µ\82Ü\82µ\82½\81B");
}
- }
-
- if (stopFlagReturn()) {
- return;
- }
-
- if (Setting.isSaveComment()) {
- if (Setting.isCommentFixFileName()) {
- Setting.getCommentFixFileNameFolder().mkdir();
- CommentFile = new File(Setting
- .getCommentFixFileNameFolder(), VideoID
- + VideoTitle + ".xml");
- } else {
- CommentFile = Setting.getCommentFile();
- }
- String back_comment = Setting.getBackComment();
- if (Setting.isFixCommentNum()) {
- back_comment = client
- .getBackCommentFromLength(back_comment);
- }
- Status.setText("\83R\83\81\83\93\83g\82Ì\83_\83E\83\93\83\8d\81[\83h\8aJ\8en\92\86");
- CommentFile = client.getComment(CommentFile, Status,
- back_comment);
- if (stopFlagReturn()) {
- return;
- }
- if (CommentFile == null) {
- Status.setText("\83R\83\81\83\93\83g\82Ì\83_\83E\83\93\83\8d\81[\83h\82É\8e¸\94s");
- return;
- }
- } else {
- if (Setting.isSaveConverted()) {
- if (Setting.isCommentFixFileName()) {
- if(!detectVideoTitle(Setting.getCommentFixFileNameFolder())){
- Status.setText("\83R\83\81\83\93\83g\83t\83@\83C\83\8b\82ª\91¶\8dÝ\82µ\82Ü\82¹\82ñ\81B");
- return;
- }
- CommentFile = new File(Setting
- .getCommentFixFileNameFolder(), VideoID
- + VideoTitle + ".xml");
- if (!CommentFile.canRead()) {
- Status.setText("\83R\83\81\83\93\83g\83t\83@\83C\83\8b\82ª\93Ç\82Ý\8d\9e\82ß\82Ü\82¹\82ñ\81B");
- return;
- }
- } else {
- CommentFile = Setting.getCommentFile();
- if (!CommentFile.exists()) {
- Status.setText("\83R\83\81\83\93\83g\83t\83@\83C\83\8b\82ª\91¶\8dÝ\82µ\82Ü\82¹\82ñ\81B");
- return;
- }
- }
- }
- }
-
- if (stopFlagReturn()) {
- return;
- }
-
- if (!Setting.isSaveConverted()) {
- Status.setText("\93®\89æ\81E\83R\83\81\83\93\83g\82ð\95Û\91¶\82µ\81A\95Ï\8a·\82Í\8ds\82¢\82Ü\82¹\82ñ\82Å\82µ\82½\81B");
- return;
- }
- CommentMiddleFile = new File(TMP_COMMENT_MIDDLE_FILE);
- Status.setText("\83R\83\81\83\93\83g\82Ì\92\86\8aÔ\83t\83@\83C\83\8b\82Ö\82Ì\95Ï\8a·\92\86");
- boolean conv = ConvertToVideoHook
- .convert(CommentFile, CommentMiddleFile,
- Setting.getNG_ID(), Setting.getNG_Word());
- if (!conv) {
- Status.setText("\83R\83\81\83\93\83g\95Ï\8a·\82É\8e¸\94s\81B\82¨\82»\82ç\82\90³\8bK\95\\8c»\82Ì\8aÔ\88á\82¢\81H");
- return;
- }
- if (stopFlagReturn()) {
- return;
- }
- Status.setText("\93®\89æ\82Ì\95Ï\8a·\82ð\8aJ\8en");
- /*\83r\83f\83I\96¼\82Ì\8am\92è*/
- if (Setting.isConvFixFileName()) {
- if (VideoTitle == null) {
- Status.setText("\95Ï\8a·\8cã\82Ì\83r\83f\83I\83t\83@\83C\83\8b\96¼\82ª\8am\92è\82Å\82«\82Ü\82¹\82ñ\81B");
- return;
- }
- Setting.getConvFixFileNameFolder().mkdir();
- String conv_name = VideoTitle;
- if (!Setting.isNotAddVideoID_Conv()) {//\95t\89Á\82µ\82È\82¢\82È\82ç
- conv_name = VideoID + conv_name;
- }
- ConvertedVideoFile = new File(Setting
- .getConvFixFileNameFolder(), conv_name + ExtOption);
- } else {
- String filename = Setting.getConvertedVideoFile().getPath();
- if (!filename.endsWith(ExtOption)) {
- filename = filename.substring(0, filename.lastIndexOf('.'))
- + ExtOption;
- ConvertedVideoFile = new File(filename);
- } else {
- ConvertedVideoFile = Setting.getConvertedVideoFile();
- }
- }
- int code;
- if ((code = converting_video(TMP_COMMENT_MIDDLE_FILE)) == 0) {
- converted = true;
- Status.setText("\95Ï\8a·\82ª\90³\8fí\82É\8fI\97¹\82µ\82Ü\82µ\82½\81B");
- } else if (code == CODE_CONVERTING_ABORTED) { /*\92\86\92f*/
-
- } else {
- Status.setText("\95Ï\8a·\83G\83\89\81[\81F" + LastError);
- }
-
- } finally {
- StopFlag.finished();
- if (CommentMiddleFile != null) {
- CommentMiddleFile.delete();
- }
- if (converted) {
- if (Setting.isDeleteCommentAfterConverting()
- && CommentFile != null) {
- CommentFile.delete();
- }
- if (Setting.isDeleteVideoAfterConverting() && VideoFile != null) {
- VideoFile.delete();
- }
- }
- }
- }
-
- String LastError;
-
- private static final int CODE_CONVERTING_ABORTED = 100;
-
- private int converting_video(String vhook_path) {
- File fwsFile = Cws2Fws.createFws(VideoFile, new File("fws_tmp.swf"));
-
- StringBuffer sb = new StringBuffer();
- sb.append("\"");
- sb.append(Setting.getFFmpegPath().replace("\\", "\\\\"));
- sb.append("\"");
- sb.append(" -y ");
- sb.append(MainOption);
- sb.append(" ");
- sb.append(InOption);
- sb.append(" -i ");
- if (fwsFile == null) {
- sb.append("\"");
- sb.append(VideoFile.getPath().replace("\\", "\\\\"));
- sb.append("\"");
- } else {
- sb.append(fwsFile.getPath().replace("\\", "\\\\"));
- }
- sb.append(" ");
- sb.append(OutOption);
- sb.append(" \"");
- sb.append(ConvertedVideoFile.getPath().replace("\\", "\\\\"));
- sb.append("\"");
- if (!Setting.isVhookDisabled()) {
- if(!addVhookSetting(sb, vhook_path)){
- return -1;
- }
- }
- String cmd = sb.substring(0);
- System.out.println("arg:" + cmd);
- try {
- System.out.println("\n\n----\nProcessing FFmpeg...\n----\n\n");
- Process process = Runtime.getRuntime().exec(cmd);
- BufferedReader ebr = new BufferedReader(new InputStreamReader(
- process.getErrorStream()));
- String e;
- while ((e = ebr.readLine()) != null) {
- LastError = e;
- if (LastError.startsWith("frame=")) { //
- Status.setText(LastError);
- } else if(!LastError.endsWith("No accelerated colorspace conversion found")){
- System.out.println(e);
- }
- if (stopFlagReturn()) {
- process.destroy();
- return CODE_CONVERTING_ABORTED;
- }
- }
- process.waitFor();
- return process.exitValue();
- } catch (InterruptedException ex) {
- ex.printStackTrace();
- return -1;
- } catch (IOException ex) {
- ex.printStackTrace();
- return -1;
- } finally {
- if (fwsFile != null) {
- fwsFile.delete();
- }
- }
- }
-
- private boolean addVhookSetting(StringBuffer sb, String vhook_path) {
- try {
- sb.append(" -vfilters \"vhext=");
- sb.append(Setting.getVhookPath().replace("\\", "/"));
- sb.append("|");
- sb.append("--data-user:");
- sb.append(URLEncoder.encode(vhook_path.replace("\\","/"),
- "Shift_JIS"));
- sb.append("|");
- sb.append("--font:");
- sb.append(URLEncoder.encode(
- Setting.getFontPath().replace("\\","/"), "Shift_JIS"));
- sb.append("|");
- sb.append("--font-index:");
- sb.append(Setting.getFontIndex());
- sb.append("|");
- sb.append("--show-user:");
- sb.append(Setting.getVideoShowNum());
- sb.append("|");
- sb.append("--shadow:");
- sb.append(Setting.getShadowIndex());
- sb.append("|");
- if (Setting.isVhook_ShowConvertingVideo()) {
- sb.append("--enable-show-video");
- sb.append("|");
- }
- if (Setting.isFixFontSize()) {
- sb.append("--enable-fix-font-size");
- sb.append("|");
- }
- if (Setting.isOpaqueComment()) {
- sb.append("--enable-opaque-comment");
- }
- sb.append("\"");
- return true;
- } catch (UnsupportedEncodingException e) {
- e.printStackTrace();
- return false;
- }
- }
-
- public boolean isConverted() {
- return StopFlag.isConverted();
- }
-
- private boolean stopFlagReturn() {
- if (StopFlag.needStop()) {
- this.Status.setText("\92\86\8e~\82µ\82Ü\82µ\82½\81B");
- return true;
- }
- return false;
- }
-
- public ConvertStopFlag getStopFlag() {
- return this.StopFlag;
- }
-
- private String ExtOption;
-
- private String InOption;
-
- private String OutOption;
-
- private String MainOption;
-
- private boolean detectOption() {
- boolean ret;
- if (Setting.getOptionFile() != null) {
- try {
- Properties prop = new Properties();
- prop.loadFromXML(new FileInputStream(Setting.getOptionFile()));
- ExtOption = prop.getProperty("EXT", null);
- InOption = prop.getProperty("IN", null);
- OutOption = prop.getProperty("OUT", null);
- MainOption = prop.getProperty("MAIN", null);
- if (ExtOption != null && InOption != null && OutOption != null
- && MainOption != null) {
- ret = true;
- } else {
- ret = false;
- }
- } catch (IOException ex) {
- ex.printStackTrace();
- ret = false;
- }
- } else {
- ExtOption = Setting.getCmdLineOptionExt();
- InOption = Setting.getCmdLineOptionIn();
- OutOption = Setting.getCmdLineOptionOut();
- MainOption = Setting.getCmdLineOptionMain();
- ret = true;
- }
- //\83I\83v\83V\83\87\83\93\82É\8ag\92£\8eq\82ð\8aÜ\82ñ\82Å\82µ\82Ü\82Á\82½\8fê\8d\87\82É\82à\91Î\89\9e\81\99
- if(!ExtOption.startsWith(".")){
- ExtOption = "."+ExtOption;
- }
- return ret;
- }
- private boolean detectVideoTitle(File dir){
- String list[] = dir.list();
- if(list == null){
- return false;
- }
- for (int i = 0; i < list.length; i++) {
- if (list[i].startsWith(VideoID)) {
- VideoTitle = list[i].substring(VideoID.length(),
- list[i].lastIndexOf("."));
- return true;
- }
- }
- return false;
- }
+ } catch (IOException ex) {
+ ex.printStackTrace();
+ throw new IllegalArgumentException("\95Ï\8a·\83I\83v\83V\83\87\83\93\83t\83@\83C\83\8b\82Ì\93Ç\82Ý\8d\9e\82Ý\82É\8e¸\94s\82µ\82Ü\82µ\82½\81B");
+ }
+ } else {
+ extOption = Setting.getCmdLineOptionExt();
+ inOption = Setting.getCmdLineOptionIn();
+ outOption = Setting.getCmdLineOptionOut();
+ mainOption = Setting.getCmdLineOptionMain();
+ } //\83I\83v\83V\83\87\83\93\82É\8ag\92£\8eq\82ð\8aÜ\82ñ\82Å\82µ\82Ü\82Á\82½\8fê\8d\87\82É\82à\91Î\89\9e\81\99
+ if (!extOption.startsWith(".")) {
+ extOption = "." + extOption;
+ }
+ return new OptionValue(extOption, inOption, outOption, mainOption);
+ }
+
+ private String getVideoIDWithBracket() {
+ return "[" + Tag + "]";
+ }
}
import java.io.FileOutputStream;
import java.io.FileInputStream;
import java.io.File;
+import org.apache.commons.io.FilenameUtils;
/**
* <p>
* @version 1.0
*/
public class ConvertingSetting {
- public static final String[] ShadowKindArray = {
- "00:\82È\82µ",
- "01:\83j\83R\83j\83R\93®\89æ\95\97",
- "02:\89E\89º",
- "03:\88Í\82¢\8d\9e\82Ý"
- };
- private String MailAddress;
-
- private String Password;
-
- private VideoSaveKind saveVideo;
-
- private File VideoFile;
-
- private boolean SaveComment;
-
- private File CommentFile;
-
- private boolean SaveConverted;
-
- private File ConvertedVideoFile;
-
- private String FFmpegPath;
-
- private String VhookPath;
-
- private String CmdLineOptionExt;
-
- private String CmdLineOptionIn;
-
- private String CmdLineOptionOut;
-
- private String CmdLineOptionMain;
-
- private String FontPath;
-
- private int FontIndex;
-
- private String BackComment;
-
- private boolean Vhook_ShowConvertingVideo;
-
- private int VideoShowNum;
-
- private boolean DeleteVideoAfterConverting;
-
- private boolean VideoFixFileName;
-
- private File VideoFixFileNameFolder;
-
- private boolean DeleteCommentAfterConverting;
-
- private boolean CommentFixFileName;
-
- private File CommentFixFileNameFolder;
+ public static final String[] ShadowKindArray = {
+ "00:\82È\82µ",
+ "01:\83j\83R\83j\83R\93®\89æ\95\97",
+ "02:\89E\89º",
+ "03:\88Í\82¢\8d\9e\82Ý"
+ };
+ private final String MailAddress;
+ private final String Password;
+ private final VideoSaveKind saveVideo;
+ private final File VideoFile;
+ private final boolean SaveComment;
+ private final File CommentFile;
+ private final boolean SaveConverted;
+ private final boolean addComment;
+ private final boolean addTcomment;
+ private final File ConvertedVideoFile;
+ private final String FFmpegPath;
+ private final String VhookPath;
+ private final String CmdLineOptionExt;
+ private final String CmdLineOptionIn;
+ private final String CmdLineOptionOut;
+ private final String CmdLineOptionMain;
+ private final String FontPath;
+ private final int FontIndex;
+ private final String BackComment;
+ private final boolean Vhook_ShowConvertingVideo;
+ private final int VideoShowNum;
+ private final boolean DeleteVideoAfterConverting;
+ private final boolean VideoFixFileName;
+ private final File VideoFixFileNameFolder;
+ private final boolean DeleteCommentAfterConverting;
+ private final boolean CommentFixFileName;
+ private final File CommentFixFileNameFolder;
+ private final TcommentSetting tcommentSetting;
+ private final boolean ConvFixFileName;
+ private final File ConvFixFileNameFolder;
+ private final String NG_Word;
+ private final String NG_ID;
+ private final boolean UseProxy;
+ private final String Proxy;
+ private final int ProxyPort;
+ private final boolean FixFontSize;
+ private final boolean FixCommentNum;
+ private final boolean OpaqueComment;
+ private final boolean NotAddVideoID_Conv;
+ private final File OptionFile;
+ private final boolean DisableVhook;
+ private final int ShadowIndex;
+
+ public ConvertingSetting(
+ String mailaddress,
+ String password,
+ VideoSaveKind savevideo,
+ String videofile,
+ boolean savecomment,
+ String commentfile,
+ boolean saveconverted,
+ boolean addComment,
+ boolean addTcomment,
+ String convvideofile,
+ String videoshownum,
+ String ffmpegpath,
+ String vhookpath,
+ String cmdlineoption_ext,
+ String cmdlineoption_main,
+ String cmdlineoption_in,
+ String cmdlineoption_out,
+ String backcomment,
+ String fontpath,
+ int font_index,
+ boolean showconvvideo,
+ boolean delete_video_after_conv,
+ boolean video_fix_file_name,
+ String video_fix_file_name_folder,
+ boolean delete_comment_after_conv,
+ boolean comment_fix_file_name,
+ String comment_fix_file_name_folder,
+ TcommentSetting tcommentSetting,
+ boolean not_add_videoid_conv,
+ boolean conv_fix_file_name,
+ String conv_fix_file_name_folder,
+ String ngword,
+ String ngid,
+ boolean use_proxy,
+ String proxy,
+ int proxy_port,
+ boolean fix_font_size,
+ boolean fix_comment_num,
+ boolean opaque_comment,
+ File option_file, boolean disable_vhook,
+ int shadow_index) {
+ MailAddress = mailaddress;
+ Password = password;
+ this.saveVideo = savevideo;
+ if (videofile.lastIndexOf(".") < videofile.lastIndexOf("\\")) {
+ videofile += ".flv";
+ }
+ VideoFile = new File(videofile);
+ SaveComment = savecomment;
+ if (commentfile.lastIndexOf(".") < commentfile.lastIndexOf("\\")) {
+ commentfile += ".xml";
+ }
+ CommentFile = new File(commentfile);
+ SaveConverted = saveconverted;
+ this.addComment = addComment;
+ this.addTcomment = addTcomment;
+ if (convvideofile.lastIndexOf(".") < convvideofile.lastIndexOf("\\")) {
+ convvideofile += ".avi";
+ }
+ ConvertedVideoFile = new File(convvideofile);
+ int num = 30;
+ try {
+ num = Integer.parseInt(videoshownum);
+ } catch (NumberFormatException ex) {
+ }
+ VideoShowNum = num;
+ FFmpegPath = ffmpegpath;
+ VhookPath = vhookpath;
+ CmdLineOptionExt = cmdlineoption_ext;
+ CmdLineOptionMain = cmdlineoption_main;
+ CmdLineOptionIn = cmdlineoption_in;
+ CmdLineOptionOut = cmdlineoption_out;
+ BackComment = backcomment;
+ FontPath = fontpath;
+ FontIndex = font_index;
+ Vhook_ShowConvertingVideo = showconvvideo;
+ DeleteVideoAfterConverting = delete_video_after_conv;
+ VideoFixFileName = video_fix_file_name;
+ VideoFixFileNameFolder = new File(video_fix_file_name_folder, "");
+ DeleteCommentAfterConverting = delete_comment_after_conv;
+ CommentFixFileName = comment_fix_file_name;
+ CommentFixFileNameFolder = new File(comment_fix_file_name_folder, "");
+ this.tcommentSetting = tcommentSetting;
+ NotAddVideoID_Conv = not_add_videoid_conv;
+ ConvFixFileName = conv_fix_file_name;
+ ConvFixFileNameFolder = new File(conv_fix_file_name_folder, "");
+ NG_Word = ngword;
+ NG_ID = ngid;
+ UseProxy = use_proxy;
+ Proxy = proxy;
+ ProxyPort = proxy_port;
+ FixFontSize = fix_font_size;
+ FixCommentNum = fix_comment_num;
+ OpaqueComment = opaque_comment;
+ OptionFile = option_file;
+ DisableVhook = disable_vhook;
+ ShadowIndex = shadow_index;
+ }
- private boolean ConvFixFileName;
+ public File getVideoFile() {
+ return VideoFile;
+ }
- private File ConvFixFileNameFolder;
+ public File getCommentFile() {
+ return CommentFile;
+ }
- private String NG_Word;
+ public File getConvertedVideoFile() {
+ return ConvertedVideoFile;
+ }
- private String NG_ID;
+ public String getFFmpegPath() {
+ return FFmpegPath;
+ }
- private boolean UseProxy;
+ public String getVhookPath() {
+ return VhookPath;
+ }
- private String Proxy;
+ public String getCmdLineOptionIn() {
+ return CmdLineOptionIn;
+ }
- private int ProxyPort;
+ public String getFontPath() {
+ return FontPath;
+ }
- private boolean FixFontSize;
+ public String getFontIndex() {
+ return Integer.toString(FontIndex);
+ }
- private boolean FixCommentNum;
+ public boolean isVhook_ShowConvertingVideo() {
+ return Vhook_ShowConvertingVideo;
+ }
- private boolean OpaqueComment;
+ public String getMailAddress() {
+ return MailAddress;
+ }
- private boolean NotAddVideoID_Conv;
+ public String getPassword() {
+ return Password;
+ }
- private boolean UseOptionFile;
+ public VideoSaveKind getVideoSaveKind() {
+ return saveVideo;
+ }
- private File OptionFile;
+ public boolean isSaveComment() {
+ return SaveComment;
+ }
- private boolean DisableVhook;
-
- private int ShadowIndex;
+ /** @return \81u\83R\83\81\83\93\83g\95t\82«\93®\89æ\82É\95Ï\8a·\82·\82é\81v\82È\82çtrue. */
+ public boolean isSaveConverted() {
+ return SaveConverted;
+ }
+ /** @return \95Ï\8a·\93®\89æ\82É\83R\83\81\83\93\83g\82ð\82Â\82¯\82é\82È\82çtrue. */
+ public boolean getAddComment() {
+ return addComment;
+ }
- public ConvertingSetting(String mailaddress, String password,
- VideoSaveKind savevideo, String videofile, boolean savecomment,
- String commentfile, boolean saveconverted, String convvideofile,
- String videoshownum, String ffmpegpath, String vhookpath,
- String cmdlineoption_ext, String cmdlineoption_main,
- String cmdlineoption_in, String cmdlineoption_out,
- String backcomment, String fontpath, int font_index,
- boolean showconvvideo, boolean delete_video_after_conv,
- boolean video_fix_file_name, String video_fix_file_name_folder,
- boolean delete_comment_after_conv, boolean comment_fix_file_name,
- String comment_fix_file_name_folder, boolean not_add_videoid_conv,
- boolean conv_fix_file_name, String conv_fix_file_name_folder,
- String ngword, String ngid, boolean use_proxy, String proxy,
- int proxy_port, boolean fix_font_size, boolean fix_comment_num,
- boolean opaque_comment, File option_file, boolean disable_vhook,
- int shadow_index) {
- MailAddress = mailaddress;
- Password = password;
- this.saveVideo = savevideo;
- if (videofile.lastIndexOf(".") < videofile.lastIndexOf("\\")) {
- videofile += ".flv";
- }
- VideoFile = new File(videofile);
- SaveComment = savecomment;
- if (commentfile.lastIndexOf(".") < commentfile.lastIndexOf("\\")) {
- commentfile += ".xml";
- }
- CommentFile = new File(commentfile);
- SaveConverted = saveconverted;
- if (convvideofile.lastIndexOf(".") < convvideofile.lastIndexOf("\\")) {
- convvideofile += ".avi";
- }
- ConvertedVideoFile = new File(convvideofile);
- try {
- VideoShowNum = Integer.parseInt(videoshownum);
- } catch (NumberFormatException ex) {
- VideoShowNum = 30;
- }
- FFmpegPath = ffmpegpath;
- VhookPath = vhookpath;
- CmdLineOptionExt = cmdlineoption_ext;
- CmdLineOptionMain = cmdlineoption_main;
- CmdLineOptionIn = cmdlineoption_in;
- CmdLineOptionOut = cmdlineoption_out;
- BackComment = backcomment;
- FontPath = fontpath;
- FontIndex = font_index;
- Vhook_ShowConvertingVideo = showconvvideo;
- DeleteVideoAfterConverting = delete_video_after_conv;
- VideoFixFileName = video_fix_file_name;
- VideoFixFileNameFolder = new File(video_fix_file_name_folder, "");
- DeleteCommentAfterConverting = delete_comment_after_conv;
- CommentFixFileName = comment_fix_file_name;
- CommentFixFileNameFolder = new File(comment_fix_file_name_folder, "");
- NotAddVideoID_Conv = not_add_videoid_conv;
- ConvFixFileName = conv_fix_file_name;
- ConvFixFileNameFolder = new File(conv_fix_file_name_folder, "");
- NG_Word = ngword;
- NG_ID = ngid;
- UseProxy = use_proxy;
- Proxy = proxy;
- ProxyPort = proxy_port;
- FixFontSize = fix_font_size;
- FixCommentNum = fix_comment_num;
- OpaqueComment = opaque_comment;
- OptionFile = option_file;
- DisableVhook = disable_vhook;
- ShadowIndex = shadow_index;
- }
-
- public File getVideoFile() {
- return VideoFile;
- }
-
- public File getCommentFile() {
- return CommentFile;
- }
-
- public File getConvertedVideoFile() {
- return ConvertedVideoFile;
- }
-
- public String getFFmpegPath() {
- return FFmpegPath;
- }
-
- public String getVhookPath() {
- return VhookPath;
- }
-
- public String getCmdLineOptionIn() {
- return CmdLineOptionIn;
- }
-
- public String getFontPath() {
- return FontPath;
- }
-
- public String getFontIndex() {
- return Integer.toString(FontIndex);
- }
-
- public boolean isVhook_ShowConvertingVideo() {
- return Vhook_ShowConvertingVideo;
- }
-
- public String getMailAddress() {
- return MailAddress;
- }
-
- public String getPassword() {
- return Password;
- }
-
- public VideoSaveKind getVideoSaveKind() {
- return saveVideo;
- }
-
- public boolean isSaveComment() {
- return SaveComment;
- }
+ /** @return \95Ï\8a·\93®\89æ\82É\93\8a\8de\8eÒ\83R\83\81\83\93\83g\82ð\82Â\82¯\82é\82È\82çtrue. */
+ public boolean getAddTcomment() {
+ return addTcomment;
+ }
- /** @return \81u\83R\83\81\83\93\83g\95t\82«\93®\89æ\82É\95Ï\8a·\82·\82é\81v\82È\82çtrue. */
- public boolean isSaveConverted() {
- return SaveConverted;
- }
- public String getCmdLineOptionOut() {
- return CmdLineOptionOut;
- }
+ public String getCmdLineOptionOut() {
+ return CmdLineOptionOut;
+ }
- public String getBackComment() {
- return BackComment;
- }
+ public String getBackComment() {
+ return BackComment;
+ }
- public String getVideoShowNum() {
- return Integer.toString(VideoShowNum);
- }
+ public String getVideoShowNum() {
+ return Integer.toString(VideoShowNum);
+ }
- public String getCmdLineOptionExt() {
- return CmdLineOptionExt;
- }
+ public String getCmdLineOptionExt() {
+ return CmdLineOptionExt;
+ }
- public String getCmdLineOptionMain() {
- return CmdLineOptionMain;
- }
+ public String getCmdLineOptionMain() {
+ return CmdLineOptionMain;
+ }
/**
* @return \93®\89æ\95Û\91¶\90Ý\92è\82Å\81u\95Û\91¶\82·\82é\83t\83H\83\8b\83_\82ð\8ew\92è\82µ\81A\83t\83@\83C\83\8b\96¼\82Í\8e©\93®\82Å\8c\88\92è\82·\82é\81v\82Ì\82Å\82 \82ê\82Îtrue.
* \81u\95Û\91¶\82·\82é\83t\83@\83C\83\8b\96¼\82ð\8ew\92è\82·\82é\81v\82Ì\82Å\82 \82ê\82Îfalse.
*/
- public boolean isVideoFixFileName() {
- return VideoFixFileName;
- }
-
- public boolean isDeleteVideoAfterConverting() {
- return DeleteVideoAfterConverting;
- }
-
- public File getVideoFixFileNameFolder() {
- return VideoFixFileNameFolder;
- }
-
- public boolean isCommentFixFileName() {
- return CommentFixFileName;
- }
-
- public boolean isDeleteCommentAfterConverting() {
- return DeleteCommentAfterConverting;
- }
-
- public File getCommentFixFileNameFolder() {
- return CommentFixFileNameFolder;
- }
-
- public boolean isNotAddVideoID_Conv() {
- return NotAddVideoID_Conv;
- }
-
- public boolean isConvFixFileName() {
- return ConvFixFileName;
- }
-
- public File getConvFixFileNameFolder() {
- return ConvFixFileNameFolder;
- }
-
- public String getNG_Word() {
- return NG_Word;
- }
-
- public String getNG_ID() {
- return NG_ID;
- }
-
- public boolean useProxy() {
- return UseProxy;
- }
-
- public String getProxy() {
- return Proxy;
- }
-
- public int getProxyPort() {
- return ProxyPort;
- }
-
- public boolean isFixFontSize() {
- return FixFontSize;
- }
-
- public boolean isFixCommentNum() {
- return FixCommentNum;
- }
-
- public boolean isOpaqueComment() {
- return OpaqueComment;
- }
-
- public boolean useOptionFile() {
- return UseOptionFile;
- }
-
- public File getOptionFile() {
- return OptionFile;
- }
-
- public boolean isVhookDisabled() {
- return DisableVhook;
- }
- public int getShadowIndex(){
- return ShadowIndex;
- }
-
- private static final String PROP_FILE = "./saccubus.xml";
-
- private static final String PROP_MAILADDR = "MailAddress";
- private static final String PROP_PASSWORD = "Password";
-
- private static final String PROP_SAVE_VIDEO = "SaveVideoFile";
-
- private static final String PROP_VIDEO_FILE = "VideoFile";
-
- private static final String PROP_SAVE_COMMENT = "SaveCommentFile";
-
- private static final String PROP_COMMENT_FILE = "CommentFile";
-
- private static final String PROP_SAVE_CONVERTED = "SaveConvertedFile";
-
- private static final String PROP_CONVERTED_FILE = "ConvertedFile";
-
- private static final String PROP_FFMPEG_PATH = "FFnpegPath";
-
- private static final String PROP_VHOOK_PATH = "VhookPath";
-
- private static final String PROP_FONT_PATH = "FontPath";
-
- private static final String PROP_FONT_INDEX = "FontIndex";
-
- private static final String PROP_CMDLINE_EXT = "CMD_EXT";
-
- private static final String PROP_CMDLINE_MAIN = "CMD_MAIN";
-
- private static final String PROP_CMDLINE_IN = "CMD_IN";
-
- private static final String PROP_CMDLINE_OUT = "CMD_OUT";
-
- private static final String PROP_BACK_COMMENT = "BackComment";
-
- private static final String PROP_SHOW_VIDEO = "ShowVideo";
-
- private static final String PROP_SHOW_COMMENT = "ShowCommentNum";
-
- private static final String PROP_VIDEO_FIX_FILE_NAME = "VideoFixFileName";
+ public boolean isVideoFixFileName() {
+ return VideoFixFileName;
+ }
- private static final String PROP_DEL_VIDEO_AFTER_CONV = "DeleteVideoAfterConv";
+ public boolean isDeleteVideoAfterConverting() {
+ return DeleteVideoAfterConverting;
+ }
- private static final String PROP_VIDEO_FIX_FILE_NAME_FOLDER = "VideoFixFileNameFolder";
+ public File getVideoFixFileNameFolder() {
+ return VideoFixFileNameFolder;
+ }
- private static final String PROP_DEL_COMMENT_AFTER_CONV = "DeleteCommentAfterConv";
+ public boolean isCommentFixFileName() {
+ return CommentFixFileName;
+ }
- private static final String PROP_COMMENT_FIX_FILE_NAME = "CommentFixFileName";
+ public boolean isDeleteCommentAfterConverting() {
+ return DeleteCommentAfterConverting;
+ }
- private static final String PROP_COMMENT_FIX_FILE_NAME_FOLDER = "CommentFixFileNameFolder";
+ public File getCommentFixFileNameFolder() {
+ return CommentFixFileNameFolder;
+ }
- private static final String PROP_NOT_ADD_VIDEOID_CONV = "NotAddVideoIDtoConverted";
+ public boolean isNotAddVideoID_Conv() {
+ return NotAddVideoID_Conv;
+ }
- private static final String PROP_CONV_FIX_FILE_NAME = "ConvFixFileName";
+ public boolean isConvFixFileName() {
+ return ConvFixFileName;
+ }
- private static final String PROP_CONV_FIX_FILE_NAME_FOLDER = "ConvFixFileNameFolder";
+ public File getConvFixFileNameFolder() {
+ return ConvFixFileNameFolder;
+ }
- private static final String PROP_NG_WORD = "NG_Word";
+ public String getNG_Word() {
+ return NG_Word;
+ }
- private static final String PROP_NG_ID = "NG_ID";
+ public String getNG_ID() {
+ return NG_ID;
+ }
- private static final String PROP_USE_PROXY = "UseProxy";
+ public boolean useProxy() {
+ return UseProxy;
+ }
- private static final String PROP_PROXY = "Proxy";
+ public String getProxy() {
+ return Proxy;
+ }
- private static final String PROP_PROXY_PORT = "ProxyPort";
+ public int getProxyPort() {
+ return ProxyPort;
+ }
- private static final String PROP_FIX_FONT_SIZE = "FixFontSize";
+ public boolean isFixFontSize() {
+ return FixFontSize;
+ }
- private static final String PROP_FIX_COMMENT_NUM = "FixCommentSize";
+ public boolean isFixCommentNum() {
+ return FixCommentNum;
+ }
- private static final String PROP_OPAQUE_COMMENT = "OpaqueComment";
+ public boolean isOpaqueComment() {
+ return OpaqueComment;
+ }
- private static final String PROP_OPTION_FILE = "OptionFile";
+ public File getOptionFile() {
+ return OptionFile;
+ }
- private static final String PROP_DISABLE_VHOOK = "VhookDisabled";
-
- private static final String PROP_SHADOW_INDEX = "ShadowIndex";
+ public boolean isVhookDisabled() {
+ return DisableVhook;
+ }
- public static void saveSetting(ConvertingSetting setting) {
- Properties prop = new Properties();
- prop.setProperty(PROP_MAILADDR, setting.getMailAddress());
- prop.setProperty(PROP_PASSWORD, setting.getPassword());
+ public int getShadowIndex() {
+ return ShadowIndex;
+ }
+ private static final String PROP_FILE = "./saccubus.xml";
+ private static final String PROP_MAILADDR = "MailAddress";
+ private static final String PROP_PASSWORD = "Password";
+ private static final String PROP_SAVE_VIDEO = "SaveVideoFile";
+ private static final String PROP_VIDEO_FILE = "VideoFile";
+ private static final String PROP_SAVE_COMMENT = "SaveCommentFile";
+ private static final String PROP_COMMENT_FILE = "CommentFile";
+ private static final String PROP_SAVE_CONVERTED = "SaveConvertedFile";
+ private static final String PROP_ADD_COMMENT = "AddComment";
+ private static final String PROP_ADD_TCOMMENT = "AddTcomment";
+ private static final String PROP_CONVERTED_FILE = "ConvertedFile";
+ private static final String PROP_FFMPEG_PATH = "FFnpegPath";
+ private static final String PROP_VHOOK_PATH = "VhookPath";
+ private static final String PROP_FONT_PATH = "FontPath";
+ private static final String PROP_FONT_INDEX = "FontIndex";
+ private static final String PROP_CMDLINE_EXT = "CMD_EXT";
+ private static final String PROP_CMDLINE_MAIN = "CMD_MAIN";
+ private static final String PROP_CMDLINE_IN = "CMD_IN";
+ private static final String PROP_CMDLINE_OUT = "CMD_OUT";
+ private static final String PROP_BACK_COMMENT = "BackComment";
+ private static final String PROP_SHOW_VIDEO = "ShowVideo";
+ private static final String PROP_SHOW_COMMENT = "ShowCommentNum";
+ private static final String PROP_VIDEO_FIX_FILE_NAME = "VideoFixFileName";
+ private static final String PROP_DEL_VIDEO_AFTER_CONV = "DeleteVideoAfterConv";
+ private static final String PROP_VIDEO_FIX_FILE_NAME_FOLDER = "VideoFixFileNameFolder";
+ private static final String PROP_DEL_COMMENT_AFTER_CONV = "DeleteCommentAfterConv";
+ private static final String PROP_COMMENT_FIX_FILE_NAME = "CommentFixFileName";
+ private static final String PROP_COMMENT_FIX_FILE_NAME_FOLDER = "CommentFixFileNameFolder";
+ private static final String PROP_NOT_ADD_VIDEOID_CONV = "NotAddVideoIDtoConverted";
+ private static final String PROP_CONV_FIX_FILE_NAME = "ConvFixFileName";
+ private static final String PROP_CONV_FIX_FILE_NAME_FOLDER = "ConvFixFileNameFolder";
+ private static final String PROP_NG_WORD = "NG_Word";
+ private static final String PROP_NG_ID = "NG_ID";
+ private static final String PROP_USE_PROXY = "UseProxy";
+ private static final String PROP_PROXY = "Proxy";
+ private static final String PROP_PROXY_PORT = "ProxyPort";
+ private static final String PROP_FIX_FONT_SIZE = "FixFontSize";
+ private static final String PROP_FIX_COMMENT_NUM = "FixCommentSize";
+ private static final String PROP_OPAQUE_COMMENT = "OpaqueComment";
+ private static final String PROP_OPTION_FILE = "OptionFile";
+ private static final String PROP_DISABLE_VHOOK = "VhookDisabled";
+ private static final String PROP_SHADOW_INDEX = "ShadowIndex";
+
+ public static void saveSetting(ConvertingSetting setting) {
+ Properties prop = new Properties();
+ prop.setProperty(PROP_MAILADDR, setting.getMailAddress());
+ prop.setProperty(PROP_PASSWORD, setting.getPassword());
prop.setProperty(PROP_SAVE_VIDEO, setting.getVideoSaveKind().toString());
- prop.setProperty(PROP_VIDEO_FILE, setting.getVideoFile().getPath());
- prop.setProperty(PROP_SAVE_COMMENT, Boolean.toString(setting
- .isSaveComment()));
- prop.setProperty(PROP_COMMENT_FILE, setting.getCommentFile().getPath());
- prop.setProperty(PROP_SAVE_CONVERTED, Boolean.toString(setting
- .isSaveConverted()));
- prop.setProperty(PROP_SHOW_COMMENT, setting.getVideoShowNum());
- prop.setProperty(PROP_CONVERTED_FILE, setting.getConvertedVideoFile()
- .getPath());
- prop.setProperty(PROP_FFMPEG_PATH, setting.getFFmpegPath());
- prop.setProperty(PROP_VHOOK_PATH, setting.getVhookPath());
- prop.setProperty(PROP_FONT_PATH, setting.getFontPath());
- prop.setProperty(PROP_FONT_INDEX, setting.getFontIndex());
- prop.setProperty(PROP_CMDLINE_EXT, setting.getCmdLineOptionExt());
- prop.setProperty(PROP_CMDLINE_MAIN, setting.getCmdLineOptionMain());
- prop.setProperty(PROP_CMDLINE_IN, setting.getCmdLineOptionIn());
- prop.setProperty(PROP_CMDLINE_OUT, setting.getCmdLineOptionOut());
- prop.setProperty(PROP_BACK_COMMENT, setting.getBackComment());
- prop.setProperty(PROP_SHOW_VIDEO, Boolean.toString((setting
- .isVhook_ShowConvertingVideo())));
- prop.setProperty(PROP_DEL_VIDEO_AFTER_CONV, Boolean.toString(setting
- .isDeleteVideoAfterConverting()));
- prop.setProperty(PROP_VIDEO_FIX_FILE_NAME, Boolean.toString(setting
- .isVideoFixFileName()));
- prop.setProperty(PROP_VIDEO_FIX_FILE_NAME_FOLDER, setting
- .getVideoFixFileNameFolder().getPath());
- prop.setProperty(PROP_DEL_COMMENT_AFTER_CONV, Boolean.toString(setting
- .isDeleteCommentAfterConverting()));
- prop.setProperty(PROP_COMMENT_FIX_FILE_NAME, Boolean.toString(setting
- .isCommentFixFileName()));
- prop.setProperty(PROP_COMMENT_FIX_FILE_NAME_FOLDER, setting
- .getCommentFixFileNameFolder().getPath());
-
- prop.setProperty(PROP_NOT_ADD_VIDEOID_CONV, Boolean.toString(setting
- .isNotAddVideoID_Conv()));
-
- prop.setProperty(PROP_CONV_FIX_FILE_NAME, (new Boolean(setting
- .isConvFixFileName())).toString());
- prop.setProperty(PROP_CONV_FIX_FILE_NAME_FOLDER, setting
- .getConvFixFileNameFolder().getPath());
-
- prop.setProperty(PROP_NG_WORD, setting.getNG_Word());
- prop.setProperty(PROP_NG_ID, setting.getNG_ID());
- prop.setProperty(PROP_USE_PROXY, Boolean.toString(setting.useProxy()));
- prop.setProperty(PROP_PROXY, setting.getProxy());
- prop.setProperty(PROP_PROXY_PORT, Integer.toString(setting
- .getProxyPort()));
- prop.setProperty(PROP_FIX_FONT_SIZE, Boolean.toString(setting
- .isFixFontSize()));
- prop.setProperty(PROP_FIX_COMMENT_NUM, Boolean.toString(setting
- .isFixCommentNum()));
- prop.setProperty(PROP_OPAQUE_COMMENT, Boolean.toString(setting
- .isOpaqueComment()));
- if (setting.getOptionFile() != null) {
- prop.setProperty(PROP_OPTION_FILE, setting.getOptionFile()
- .getPath());
- }
- prop.setProperty(PROP_DISABLE_VHOOK, Boolean.toString(setting
- .isVhookDisabled()));
- prop.setProperty(PROP_SHADOW_INDEX, Integer.toString(setting.getShadowIndex()));
- try {
- prop.storeToXML(new FileOutputStream(PROP_FILE), "settings");
- } catch (IOException ex) {
- ex.printStackTrace();
- }
- }
+ prop.setProperty(PROP_VIDEO_FILE, setting.getVideoFile().getPath());
+ prop.setProperty(PROP_SAVE_COMMENT, Boolean.toString(setting.isSaveComment()));
+ prop.setProperty(PROP_COMMENT_FILE, setting.getCommentFile().getPath());
+ prop.setProperty(PROP_SAVE_CONVERTED, Boolean.toString(setting.isSaveConverted()));
+ prop.setProperty(PROP_ADD_COMMENT, Boolean.toString(setting.getAddComment()));
+ prop.setProperty(PROP_ADD_TCOMMENT, Boolean.toString(setting.getAddTcomment()));
+ prop.setProperty(PROP_SHOW_COMMENT, setting.getVideoShowNum());
+ prop.setProperty(PROP_CONVERTED_FILE, setting.getConvertedVideoFile().getPath());
+ prop.setProperty(PROP_FFMPEG_PATH, setting.getFFmpegPath());
+ prop.setProperty(PROP_VHOOK_PATH, setting.getVhookPath());
+ prop.setProperty(PROP_FONT_PATH, setting.getFontPath());
+ prop.setProperty(PROP_FONT_INDEX, setting.getFontIndex());
+ prop.setProperty(PROP_CMDLINE_EXT, setting.getCmdLineOptionExt());
+ prop.setProperty(PROP_CMDLINE_MAIN, setting.getCmdLineOptionMain());
+ prop.setProperty(PROP_CMDLINE_IN, setting.getCmdLineOptionIn());
+ prop.setProperty(PROP_CMDLINE_OUT, setting.getCmdLineOptionOut());
+ prop.setProperty(PROP_BACK_COMMENT, setting.getBackComment());
+ prop.setProperty(PROP_SHOW_VIDEO, Boolean.toString((setting.isVhook_ShowConvertingVideo())));
+ prop.setProperty(PROP_DEL_VIDEO_AFTER_CONV, Boolean.toString(setting.isDeleteVideoAfterConverting()));
+ prop.setProperty(PROP_VIDEO_FIX_FILE_NAME, Boolean.toString(setting.isVideoFixFileName()));
+ prop.setProperty(PROP_VIDEO_FIX_FILE_NAME_FOLDER, setting.getVideoFixFileNameFolder().getPath());
+ prop.setProperty(PROP_DEL_COMMENT_AFTER_CONV, Boolean.toString(setting.isDeleteCommentAfterConverting()));
+ prop.setProperty(PROP_COMMENT_FIX_FILE_NAME, Boolean.toString(setting.isCommentFixFileName()));
+ prop.setProperty(PROP_COMMENT_FIX_FILE_NAME_FOLDER, setting.getCommentFixFileNameFolder().getPath());
+
+ setting.getTcommentSetting().save(prop);
+
+ prop.setProperty(PROP_NOT_ADD_VIDEOID_CONV, Boolean.toString(setting.isNotAddVideoID_Conv()));
+
+ prop.setProperty(PROP_CONV_FIX_FILE_NAME, (new Boolean(setting.isConvFixFileName())).toString());
+ prop.setProperty(PROP_CONV_FIX_FILE_NAME_FOLDER, setting.getConvFixFileNameFolder().getPath());
+
+ prop.setProperty(PROP_NG_WORD, setting.getNG_Word());
+ prop.setProperty(PROP_NG_ID, setting.getNG_ID());
+ prop.setProperty(PROP_USE_PROXY, Boolean.toString(setting.useProxy()));
+ prop.setProperty(PROP_PROXY, setting.getProxy());
+ prop.setProperty(PROP_PROXY_PORT, Integer.toString(setting.getProxyPort()));
+ prop.setProperty(PROP_FIX_FONT_SIZE, Boolean.toString(setting.isFixFontSize()));
+ prop.setProperty(PROP_FIX_COMMENT_NUM, Boolean.toString(setting.isFixCommentNum()));
+ prop.setProperty(PROP_OPAQUE_COMMENT, Boolean.toString(setting.isOpaqueComment()));
+ if (setting.getOptionFile() != null) {
+ prop.setProperty(PROP_OPTION_FILE, setting.getOptionFile().getPath());
+ }
+ prop.setProperty(PROP_DISABLE_VHOOK, Boolean.toString(setting.isVhookDisabled()));
+ prop.setProperty(PROP_SHADOW_INDEX, Integer.toString(setting.getShadowIndex()));
+ try {
+ prop.storeToXML(new FileOutputStream(PROP_FILE), "settings");
+ } catch (IOException ex) {
+ ex.printStackTrace();
+ }
+ }
/** \96{\89Æ\82³\82«\82ã\82Î\82·\82Å\95Û\91¶\82µ\82Ä\82¢\82½\8fê\8d\87\81APROP_SAVE_VIDEO\82Ítrue/false\82È\82Ì\82Å\95Ï\8a·\82·\82é. */
private static VideoSaveKind convertVideoSaveKind(Properties prop) {
return kind;
}
- public static ConvertingSetting loadSetting(String user, String password) {
- Properties prop = new Properties();
- try {
- prop.loadFromXML(new FileInputStream(PROP_FILE));
- } catch (IOException ex) {
- ex.printStackTrace();
- }
- if (user == null) {
- user = prop.getProperty(PROP_MAILADDR, "");
- }
- if (password == null) {
- password = prop.getProperty(PROP_PASSWORD, "");
- }
- String option_file_name = prop.getProperty(PROP_OPTION_FILE, null);
- File option_file = null;
- if (option_file_name != null) {
- option_file = new File(option_file_name);
- }
- String win_dir = System.getenv("windir");
- if(!win_dir.endsWith("\\")){
- win_dir = win_dir+"\\";
- }
+ public static ConvertingSetting loadSetting(String user, String password) {
+ Properties prop = new Properties();
+ try {
+ prop.loadFromXML(new FileInputStream(PROP_FILE));
+ } catch (IOException ex) {
+ ex.printStackTrace();
+ }
+ if (user == null) {
+ user = prop.getProperty(PROP_MAILADDR, "");
+ }
+ if (password == null) {
+ password = prop.getProperty(PROP_PASSWORD, "");
+ }
+ String option_file_name = prop.getProperty(PROP_OPTION_FILE, null);
+ File option_file = null;
+ if (option_file_name != null) {
+ option_file = new File(option_file_name);
+ }
+ String win_dir = System.getenv("windir");
+ if (!win_dir.endsWith("\\")) {
+ win_dir = win_dir + "\\";
+ }
final VideoSaveKind kind = convertVideoSaveKind(prop);
- return new ConvertingSetting(user, password,
+ return new ConvertingSetting(
+ user,
+ password,
kind,
- prop.getProperty(PROP_VIDEO_FILE, ".\\video.flv"),
- Boolean.parseBoolean(prop.getProperty(PROP_SAVE_COMMENT, "true")),
- prop.getProperty(PROP_COMMENT_FILE, ".\\comment.xml"),
- Boolean.parseBoolean(prop.getProperty(PROP_SAVE_CONVERTED, "true")),
- prop.getProperty(PROP_CONVERTED_FILE, ".\\video.avi"),
- prop.getProperty(PROP_SHOW_COMMENT, "30"),
- prop.getProperty(PROP_FFMPEG_PATH,".\\bin\\ffmpeg.exe"),
- prop.getProperty(PROP_VHOOK_PATH,".\\bin\\nicovideo.dll"),
- prop.getProperty(PROP_CMDLINE_EXT, "avi"),
- prop.getProperty(PROP_CMDLINE_MAIN,""),
- prop.getProperty(PROP_CMDLINE_IN, ""),
- prop.getProperty(PROP_CMDLINE_OUT,"-s 512x384 -acodec libmp3lame -ab 128k -ar 44100 -ac 2 -vcodec libxvid -qscale 3 -async 1"),
- prop.getProperty(PROP_BACK_COMMENT, "500"),
- prop.getProperty(PROP_FONT_PATH, win_dir+"Fonts\\msgothic.ttc"),
- Integer.parseInt(prop.getProperty(PROP_FONT_INDEX, "1")),
- Boolean.parseBoolean(prop.getProperty(PROP_SHOW_VIDEO, "true")),
- Boolean.parseBoolean(prop.getProperty(PROP_DEL_VIDEO_AFTER_CONV, "false")),
- Boolean.parseBoolean(prop.getProperty(PROP_VIDEO_FIX_FILE_NAME, "true")),
- prop.getProperty(PROP_VIDEO_FIX_FILE_NAME_FOLDER,".\\[out]video\\"),
- Boolean.parseBoolean(prop.getProperty(PROP_DEL_COMMENT_AFTER_CONV, "false")),
- Boolean.parseBoolean(prop.getProperty(PROP_COMMENT_FIX_FILE_NAME, "true")),
- prop.getProperty(PROP_COMMENT_FIX_FILE_NAME_FOLDER, ".\\[out]comment\\"),
- Boolean.parseBoolean(prop.getProperty(PROP_NOT_ADD_VIDEOID_CONV, "false")),
- Boolean.parseBoolean(prop.getProperty(PROP_CONV_FIX_FILE_NAME,"true")),
- prop.getProperty(PROP_CONV_FIX_FILE_NAME_FOLDER, ".\\[out]converted\\"),
- prop.getProperty(PROP_NG_WORD, ""),
- prop.getProperty(PROP_NG_ID, ""),
- Boolean.parseBoolean(prop.getProperty(PROP_USE_PROXY, "false")),
- prop.getProperty(PROP_PROXY,""),
- Integer.parseInt(prop.getProperty(PROP_PROXY_PORT,"-1")),
- Boolean.parseBoolean(prop.getProperty(PROP_FIX_FONT_SIZE, "true")),
- Boolean.parseBoolean(prop.getProperty(PROP_FIX_COMMENT_NUM, "true")),
- Boolean.parseBoolean(prop.getProperty(PROP_OPAQUE_COMMENT,"false")),
- option_file, Boolean.parseBoolean(prop.getProperty(PROP_DISABLE_VHOOK,"false")),
- Integer.parseInt(prop.getProperty(PROP_SHADOW_INDEX,"1"),
- 10)
- );
- }
+ prop.getProperty(PROP_VIDEO_FILE, ".\\video.flv"),
+ Boolean.parseBoolean(prop.getProperty(PROP_SAVE_COMMENT, "true")),
+ prop.getProperty(PROP_COMMENT_FILE, ".\\comment.xml"),
+ Boolean.parseBoolean(prop.getProperty(PROP_SAVE_CONVERTED, "true")),
+ Boolean.valueOf(prop.getProperty(PROP_ADD_COMMENT, "true")),
+ Boolean.valueOf(prop.getProperty(PROP_ADD_TCOMMENT, "false")),
+ prop.getProperty(PROP_CONVERTED_FILE, ".\\video.avi"),
+ prop.getProperty(PROP_SHOW_COMMENT, "30"),
+ prop.getProperty(PROP_FFMPEG_PATH, ".\\bin\\ffmpeg.exe"),
+ prop.getProperty(PROP_VHOOK_PATH, ".\\bin\\nicovideo.dll"),
+ prop.getProperty(PROP_CMDLINE_EXT, "avi"),
+ prop.getProperty(PROP_CMDLINE_MAIN, ""),
+ prop.getProperty(PROP_CMDLINE_IN, ""),
+ prop.getProperty(PROP_CMDLINE_OUT, "-f ipod"),
+ prop.getProperty(PROP_BACK_COMMENT, "500"),
+ prop.getProperty(PROP_FONT_PATH, win_dir + "Fonts\\msgothic.ttc"),
+ Integer.parseInt(prop.getProperty(PROP_FONT_INDEX, "1")),
+ Boolean.parseBoolean(prop.getProperty(PROP_SHOW_VIDEO, "true")),
+ Boolean.parseBoolean(prop.getProperty(PROP_DEL_VIDEO_AFTER_CONV, "false")),
+ Boolean.parseBoolean(prop.getProperty(PROP_VIDEO_FIX_FILE_NAME, "true")),
+ prop.getProperty(PROP_VIDEO_FIX_FILE_NAME_FOLDER, ".\\[in]video\\"),
+ Boolean.parseBoolean(prop.getProperty(PROP_DEL_COMMENT_AFTER_CONV, "false")),
+ Boolean.parseBoolean(prop.getProperty(PROP_COMMENT_FIX_FILE_NAME, "true")),
+ prop.getProperty(PROP_COMMENT_FIX_FILE_NAME_FOLDER, ".\\[in]comment\\"),
+ TcommentSetting.load(prop),
+ Boolean.parseBoolean(prop.getProperty(PROP_NOT_ADD_VIDEOID_CONV, "false")),
+ Boolean.parseBoolean(prop.getProperty(PROP_CONV_FIX_FILE_NAME, "true")),
+ prop.getProperty(PROP_CONV_FIX_FILE_NAME_FOLDER, ".\\[out]converted\\"),
+ prop.getProperty(PROP_NG_WORD, ""),
+ prop.getProperty(PROP_NG_ID, ""),
+ Boolean.parseBoolean(prop.getProperty(PROP_USE_PROXY, "false")),
+ prop.getProperty(PROP_PROXY, ""),
+ Integer.parseInt(prop.getProperty(PROP_PROXY_PORT, "-1")),
+ Boolean.parseBoolean(prop.getProperty(PROP_FIX_FONT_SIZE, "true")),
+ Boolean.parseBoolean(prop.getProperty(PROP_FIX_COMMENT_NUM, "true")),
+ Boolean.parseBoolean(prop.getProperty(PROP_OPAQUE_COMMENT, "false")),
+ option_file, Boolean.parseBoolean(prop.getProperty(PROP_DISABLE_VHOOK, "false")),
+ Integer.parseInt(prop.getProperty(PROP_SHADOW_INDEX, "1"),
+ 10));
+ }
+
+ public TcommentSetting getTcommentSetting() {
+ return tcommentSetting;
+ }
+
+ public static class TcommentSetting {
+
+ private final boolean download;
+ private final boolean delete;
+ private final boolean autoFileName;
+ private final String inputDirectory;
+ private final String inputFile;
+
+ public boolean isAutoFileName() {
+ return autoFileName;
+ }
+ public boolean isDelete() {
+ return delete;
+ }
+
+ public boolean isDownload() {
+ return download;
+ }
+
+ /** @return \83\86\81[\83U\82ª\81u\95Û\91¶\82·\82é\83t\83H\83\8b\83_\82ð\8ew\92è\82µ\81A\83t\83@\83C\83\8b\96¼\82Í\8e©\93®\82Å\8c\88\92è\82·\82é\81v\83e\83L\83X\83g\83t\83B\81[\83\8b\83h\82É\93ü\97Í\82µ\82½\92l. */
+ public String getInputDirectory() {
+ return inputDirectory;
+ }
+
+ /** @return \83\86\81[\83U\82ª\81u\95Û\91¶\82·\82é\83t\83@\83C\83\8b\96¼\82ð\8ew\92è\82·\82é\81v\83e\83L\83X\83g\83t\83B\81[\83\8b\83h\82É\93ü\97Í\82µ\82½\92l. */
+ public String getInputFile() {
+ return inputFile;
+ }
+
+ /** @return \95Û\91¶\90æ\83f\83B\83\8c\83N\83g\83\8a. autoFileName\82ªfalse\82Ì\8fê\8d\87\82à, \83t\83@\83C\83\8b\96¼\82Í\93ü\82ç\82È\82¢\82±\82Æ\82É\92\8d\88Ó. */
+ public File getDirectory() {
+ if (autoFileName) {
+ return new File(inputDirectory);
+ } else {
+ File parent = new File(inputFile).getParentFile();
+ if (parent == null) {
+ parent = new File("");
+ }
+ return parent;
+ }
+ }
+
+ /** @return \95Û\91¶\83t\83@\83C\83\8b\96¼. autoFileName\82ªtrue\82È\82ç\8fí\82Énull. */
+ public String getFileName() {
+ return FilenameUtils.getName(inputFile.toString());
+ }
+
+ /**
+ * \81u\93ü\97Í\93\8a\8de\8eÒ\83R\83\81\83\93\83g\81v\83p\83l\83\8b\82Ì\90Ý\92è.
+ * @param download \83_\83E\83\93\83\8d\81[\83h\82·\82é\95K\97v\82ª\82 \82ê\82Îtrue. \83\8d\81[\83J\83\8b\82É\82 \82é\83t\83@\83C\83\8b\82ð\97p\82¢\82é\82Ì\82Å\82 \82ê\82Îfalse.
+ * @param delete \8f\88\97\9d\8fI\97¹\8cã\83t\83@\83C\83\8b\82ð\8dí\8f\9c\82·\82é\82Ì\82Å\82 \82ê\82Îtrue. \8ec\82µ\82½\82Ü\82Ü\82Å\82 \82ê\82Îfalse.
+ * @param inputDirectory \83\86\81[\83U\82ª\81u\95Û\91¶\82·\82é\83t\83H\83\8b\83_\82ð\8ew\92è\82µ\81A\83t\83@\83C\83\8b\96¼\82Í\8e©\93®\82Å\8c\88\92è\82·\82é\81v\83e\83L\83X\83g\83t\83B\81[\83\8b\83h\82É\93ü\97Í\82µ\82½\92l.
+ * @param inputFile \83\86\81[\83U\82ª\81u\95Û\91¶\82·\82é\83t\83@\83C\83\8b\96¼\82ð\8ew\92è\82·\82é\81v\83e\83L\83X\83g\83t\83B\81[\83\8b\83h\82É\93ü\97Í\82µ\82½\92l.
+ */
+ public TcommentSetting(boolean download, boolean delete, boolean autoFileName, String inputDirectory,
+ String inputFile) {
+ this.download = download;
+ this.delete = delete;
+ this.autoFileName = autoFileName;
+ this.inputDirectory = inputDirectory;
+ this.inputFile = inputFile;
+ }
+
+ public static TcommentSetting load(Properties prop) {
+ String str;
+ str = prop.getProperty(PROP_DOWNLOAD, Boolean.toString(true));
+ boolean down = Boolean.valueOf(str);
+ str = prop.getProperty(PROP_DELETE, Boolean.toString(false));
+ boolean del = Boolean.valueOf(str);
+ str = prop.getProperty(PROP_AUTOFILENAME, Boolean.toString(true));
+ boolean naming = Boolean.valueOf(str);
+ String dir = prop.getProperty(PROP_DIRECTORYNAME, ".\\[in]tcomment");
+ String f = prop.getProperty(PROP_FILENAME, ".\\tcomment.xml");
+ return new TcommentSetting(down, del, naming, dir, f);
+ }
+
+ public void save(Properties prop) {
+ prop.setProperty(PROP_DOWNLOAD, Boolean.toString(download));
+ prop.setProperty(PROP_DELETE, Boolean.toString(delete));
+ prop.setProperty(PROP_AUTOFILENAME, Boolean.toString(autoFileName));
+ prop.setProperty(PROP_DIRECTORYNAME, inputDirectory.toString());
+ prop.setProperty(PROP_FILENAME, inputFile.toString());
+ }
+ private static final String PROP_DOWNLOAD = "TCDownload";
+ private static final String PROP_DELETE = "TCDelete";
+ private static final String PROP_AUTOFILENAME = "TCAutoNaming";
+ private static final String PROP_DIRECTORYNAME = "TCDirectory";
+ private static final String PROP_FILENAME = "TCFileName";
+ }
}
package saccubus;
-import java.awt.*;
+import java.awt.BorderLayout;
+import java.awt.Dimension;
+import java.awt.GridBagConstraints;
+import java.awt.GridBagLayout;
+import java.awt.GridLayout;
+import java.awt.Image;
+import java.awt.Insets;
+import java.awt.Toolkit;
import java.awt.dnd.DnDConstants;
import java.awt.dnd.DropTarget;
-import java.awt.event.*;
-import javax.swing.*;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.KeyEvent;
+import java.awt.event.WindowAdapter;
+import java.awt.event.WindowEvent;
import java.io.File;
-import saccubus.util.FileDropTarget;
-import saccubus.util.PopupRightClick;
-
-import java.awt.GridBagLayout;
-import java.awt.GridBagConstraints;
-import java.awt.Insets;
import javax.swing.BorderFactory;
+import javax.swing.ButtonGroup;
+import javax.swing.JButton;
import javax.swing.JCheckBox;
-import javax.swing.JPanel;
-import javax.swing.border.EtchedBorder;
-import javax.swing.border.TitledBorder;
-import java.awt.Font;
-import java.awt.Color;
-import javax.swing.JTabbedPane;
import javax.swing.JComboBox;
-import javax.swing.JButton;
+import javax.swing.JFileChooser;
+import javax.swing.JFrame;
import javax.swing.JLabel;
+import javax.swing.JMenu;
+import javax.swing.JMenuBar;
+import javax.swing.JMenuItem;
+import javax.swing.JOptionPane;
+import javax.swing.JPanel;
+import javax.swing.JPasswordField;
+import javax.swing.JRadioButton;
+import javax.swing.JTabbedPane;
import javax.swing.JTextField;
-import java.awt.event.KeyEvent;
+import javax.swing.SwingUtilities;
import nicobrowser.entity.NicoContent;
+import org.apache.commons.io.FilenameUtils;
+import saccubus.ConvertStopFlag.State;
+import saccubus.ConvertingSetting.TcommentSetting;
+import saccubus.net.TextProgressListener;
+import saccubus.util.FileDropTarget;
+import saccubus.util.PopupRightClick;
import yukihane.nicovideo.NicoDBFinder;
/**
* @version 1.0
*/
public class MainFrame extends JFrame {
- private static final long serialVersionUID = 2564486741331062989L;
- public static final String VERSION = "1.22r NicoBrowser\8ag\92£ 0.0.1";
-
- public static final Image WinIcon = Toolkit.getDefaultToolkit()
- .createImage(saccubus.MainFrame.class.getResource("icon32.png"));
-
-
- JPanel contentPane;
-
- BorderLayout borderLayout1 = new BorderLayout();
-
- JMenuBar jMenuBar1 = new JMenuBar();
-
- JMenu jMenuFile = new JMenu();
-
- JMenuItem jMenuFileExit = new JMenuItem();
-
- JMenu jMenuHelp = new JMenu();
-
- JMenuItem jMenuHelpAbout = new JMenuItem();
-
- JLabel statusBar = new JLabel();
-
- JTabbedPane MainTabbedPane = new JTabbedPane();
-
- JPanel SavingInfoTabPanel = new JPanel();
-
- JPanel FFMpegTabPanel = new JPanel();
-
- JPanel VideoInfoPanel = new JPanel();
-
- JTextField VideoID_TextField = new JTextField();
-
- JButton DoButton = new JButton();
-
- public static final String DoButtonDefString = "\95Ï\8a·";
-
- public static final String DoButtonStopString = "\92â\8e~";
-
- public static final String DoButtonWaitString = "\91Ò\8b@";
-
- GridBagLayout gridBagLayout2 = new GridBagLayout();
-
- JPanel UserInfoPanel = new JPanel();
-
- GridBagLayout gridBagLayout3 = new GridBagLayout();
- JLabel MailAddrLabel = new JLabel();
-
- JTextField MailAddrField = new JTextField();
-
- JLabel PasswordLabel = new JLabel();
-
- JPasswordField PasswordField = new JPasswordField();
-
- JPanel CommentSaveInfoPanel = new JPanel();
-
- GridBagLayout gridBagLayout4 = new GridBagLayout();
+ private static final long serialVersionUID = 2564486741331062989L;
+ public static final String VERSION = "1.22r NicoBrowser\8ag\92£ 1.0.0";
+ public static final Image WinIcon = Toolkit.getDefaultToolkit().createImage(saccubus.MainFrame.class.getResource(
+ "icon32.png"));
+ JPanel contentPane;
+ BorderLayout borderLayout1 = new BorderLayout();
+ JMenuBar jMenuBar1 = new JMenuBar();
+ JMenu jMenuFile = new JMenu();
+ JMenuItem jMenuFileExit = new JMenuItem();
+ JMenu jMenuHelp = new JMenu();
+ JMenuItem jMenuHelpAbout = new JMenuItem();
+ JLabel statusBar = new JLabel();
+ JTabbedPane MainTabbedPane = new JTabbedPane();
+ JPanel SavingInfoTabPanel = new JPanel();
+ JPanel FFMpegTabPanel = new JPanel();
+ JPanel VideoInfoPanel = new JPanel();
+ JTextField VideoID_TextField = new JTextField();
+ JButton DoButton = new JButton();
+ public static final String DoButtonDefString = "\95Ï\8a·";
+ public static final String DoButtonStopString = "\92â\8e~";
+ public static final String DoButtonWaitString = "\91Ò\8b@";
+ JPanel UserInfoPanel = new JPanel();
+ GridBagLayout gridBagLayout3 = new GridBagLayout();
+ JLabel MailAddrLabel = new JLabel();
+ JTextField MailAddrField = new JTextField();
+ JLabel PasswordLabel = new JLabel();
+ JPasswordField PasswordField = new JPasswordField();
+ GridBagLayout gridBagLayout4 = new GridBagLayout();
+ GridBagLayout gridBagLayout6 = new GridBagLayout();
+ ButtonGroup CommentSaveButtonGroup = new ButtonGroup();
+ ButtonGroup ConvSaveButtonGroup = new ButtonGroup();
+
+ public MainFrame() {
+ videoSaveInfoPanel = savePanel.getVideoSaveInfoPanel();
+
+ try {
+ setDefaultCloseOperation(EXIT_ON_CLOSE);
+ jbInit();
+ setPopup();
+ setDropTarget();
+ ConvertingSetting setting = ConvertingSetting.loadSetting(null,
+ null);
+ this.setSetting(setting);
+ } catch (Exception exception) {
+ exception.printStackTrace();
+ }
+ }
- JCheckBox SavingCommentCheckBox = new JCheckBox();
+ /**
+ * \83R\83\93\83|\81[\83l\83\93\83g\82Ì\8f\89\8aú\89»\81B
+ *
+ * @throws java.lang.Exception
+ */
+ private void jbInit() throws Exception {
+ GridBagConstraints gridBagConstraints74 = new GridBagConstraints(1, 1, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER,
+ GridBagConstraints.BOTH, new Insets(0, 0, 0, 5), 0, 0);
+ gridBagConstraints74.gridwidth = 2;
+ GridBagConstraints gridBagConstraints73 = new GridBagConstraints();
+ gridBagConstraints73.fill = GridBagConstraints.HORIZONTAL;
+ gridBagConstraints73.gridy = 6;
+ gridBagConstraints73.weightx = 1.0;
+ gridBagConstraints73.gridwidth = 4;
+ gridBagConstraints73.insets = new Insets(0, 0, 0, 5);
+ gridBagConstraints73.gridx = 1;
+ GridBagConstraints gridBagConstraints72 = new GridBagConstraints();
+ gridBagConstraints72.gridx = 0;
+ gridBagConstraints72.anchor = GridBagConstraints.WEST;
+ gridBagConstraints72.insets = new Insets(0, 5, 0, 5);
+ gridBagConstraints72.fill = GridBagConstraints.NONE;
+ gridBagConstraints72.gridwidth = 1;
+ gridBagConstraints72.gridy = 6;
+ ShadowKindLabel = new JLabel();
+ ShadowKindLabel.setText("\89e\82Ì\8eí\97Þ");
+ ShadowKindLabel.setDisplayedMnemonic(KeyEvent.VK_UNDEFINED);
+ GridBagConstraints gridBagConstraints71 = new GridBagConstraints(1, 0, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER,
+ GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 6);
+ gridBagConstraints71.fill = GridBagConstraints.BOTH;
+ gridBagConstraints71.ipady = 0;
+ GridBagConstraints gridBagConstraints70 = new GridBagConstraints();
+ gridBagConstraints70.fill = GridBagConstraints.HORIZONTAL;
+ gridBagConstraints70.gridy = 1;
+ gridBagConstraints70.ipadx = 0;
+ gridBagConstraints70.ipady = 0;
+ gridBagConstraints70.weightx = 1.0;
+ gridBagConstraints70.insets = new Insets(0, 0, 0, 0);
+ gridBagConstraints70.gridx = 1;
+ GridBagConstraints gridBagConstraints69 = new GridBagConstraints();
+ gridBagConstraints69.gridx = 0;
+ gridBagConstraints69.ipadx = 0;
+ gridBagConstraints69.ipady = 0;
+ gridBagConstraints69.insets = new Insets(0, 5, 0, 5);
+ gridBagConstraints69.anchor = GridBagConstraints.WEST;
+ gridBagConstraints69.gridy = 1;
+ GridBagConstraints gridBagConstraints68 = new GridBagConstraints();
+ gridBagConstraints68.fill = GridBagConstraints.BOTH;
+ gridBagConstraints68.gridy = 0;
+ gridBagConstraints68.ipady = 0;
+ gridBagConstraints68.weightx = 1.0;
+ gridBagConstraints68.insets = new Insets(0, 0, 0, 0);
+ gridBagConstraints68.gridx = 1;
+ GridBagConstraints gridBagConstraints67 = new GridBagConstraints();
+ gridBagConstraints67.gridx = 0;
+ gridBagConstraints67.ipadx = 0;
+ gridBagConstraints67.ipady = 0;
+ gridBagConstraints67.insets = new Insets(0, 5, 0, 5);
+ gridBagConstraints67.anchor = GridBagConstraints.WEST;
+ gridBagConstraints67.gridy = 0;
+ GridBagConstraints gridBagConstraints66 = new GridBagConstraints();
+ gridBagConstraints66.gridx = 0;
+ gridBagConstraints66.insets = new Insets(0, 5, 5, 5);
+ gridBagConstraints66.anchor = GridBagConstraints.WEST;
+ gridBagConstraints66.gridwidth = 2;
+ gridBagConstraints66.gridy = 1;
+ ViewCommentLabel = new JLabel();
+ ViewCommentLabel.setText("\95\\8e¦\83R\83\81\83\93\83g\90\94");
+ GridBagConstraints gridBagConstraints65 = new GridBagConstraints();
+ gridBagConstraints65.fill = GridBagConstraints.HORIZONTAL;
+ gridBagConstraints65.gridy = 1;
+ gridBagConstraints65.weightx = 1.0;
+ gridBagConstraints65.gridwidth = 6;
+ gridBagConstraints65.insets = new Insets(0, 5, 5, 5);
+ gridBagConstraints65.gridx = 3;
+ GridBagConstraints gridBagConstraints64 = new GridBagConstraints(1, 1,
+ 1, 1, 0.0, 0.0, GridBagConstraints.CENTER,
+ GridBagConstraints.BOTH, new Insets(0, 0, 0, 5), 0, 0);
+ gridBagConstraints64.gridy = 3;
+ gridBagConstraints64.fill = GridBagConstraints.HORIZONTAL;
+ gridBagConstraints64.gridx = 4;
+ GridBagConstraints gridBagConstraints63 = new GridBagConstraints(0, 4,
+ 2, 1, 1.0, 0.0, GridBagConstraints.CENTER,
+ GridBagConstraints.HORIZONTAL, new Insets(0, 5, 0, 5), 0, 0);
+ gridBagConstraints63.gridy = 7;
+ gridBagConstraints63.gridx = 0;
+ gridBagConstraints63.gridwidth = 5;
+ GridBagConstraints gridBagConstraints62 = new GridBagConstraints(0, 3,
+ 2, 1, 1.0, 0.0, GridBagConstraints.CENTER,
+ GridBagConstraints.BOTH, new Insets(0, 5, 5, 5), 0, 0);
+ gridBagConstraints62.gridy = 5;
+ gridBagConstraints62.gridx = 1;
+ gridBagConstraints62.fill = GridBagConstraints.HORIZONTAL;
+ gridBagConstraints62.insets = new Insets(0, 0, 5, 5);
+ gridBagConstraints62.gridwidth = 4;
+ GridBagConstraints gridBagConstraints61 = new GridBagConstraints(0, 2,
+ 1, 1, 0.0, 0.0, GridBagConstraints.CENTER,
+ GridBagConstraints.BOTH, new Insets(5, 5, 5, 5), 0, 0);
+ gridBagConstraints61.gridy = 5;
+ gridBagConstraints61.gridx = 0;
+ gridBagConstraints61.fill = GridBagConstraints.VERTICAL;
+ gridBagConstraints61.anchor = GridBagConstraints.WEST;
+ gridBagConstraints61.gridwidth = 1;
+ GridBagConstraints gridBagConstraints60 = new GridBagConstraints(0, 1,
+ 1, 1, 1.0, 0.0, GridBagConstraints.CENTER,
+ GridBagConstraints.BOTH, new Insets(0, 5, 0, 5), 0, 0);
+ gridBagConstraints60.gridy = 3;
+ gridBagConstraints60.gridx = 1;
+ gridBagConstraints60.fill = GridBagConstraints.HORIZONTAL;
+ gridBagConstraints60.insets = new Insets(0, 0, 0, 5);
+ gridBagConstraints60.gridwidth = 3;
+ GridBagConstraints gridBagConstraints59 = new GridBagConstraints(0, 0,
+ 2, 1, 1.0, 0.0, GridBagConstraints.CENTER,
+ GridBagConstraints.HORIZONTAL, new Insets(0, 5, 5, 5), 0, 0);
+ gridBagConstraints59.gridy = 3;
+ gridBagConstraints59.insets = new Insets(5, 5, 5, 5);
+ gridBagConstraints59.gridx = 0;
+ gridBagConstraints59.fill = GridBagConstraints.NONE;
+ gridBagConstraints59.anchor = GridBagConstraints.WEST;
+ gridBagConstraints59.weightx = 0.0;
+ gridBagConstraints59.gridwidth = 1;
+ GridBagConstraints gridBagConstraints58 = new GridBagConstraints();
+ gridBagConstraints58.gridx = 0;
+ gridBagConstraints58.anchor = GridBagConstraints.WEST;
+ gridBagConstraints58.insets = new Insets(0, 5, 5, 5);
+ gridBagConstraints58.gridwidth = 5;
+ gridBagConstraints58.weightx = 1.0;
+ gridBagConstraints58.fill = GridBagConstraints.HORIZONTAL;
+ gridBagConstraints58.gridy = 0;
+ GridBagConstraints gridBagConstraints57 = new GridBagConstraints();
+ gridBagConstraints57.fill = GridBagConstraints.BOTH;
+ gridBagConstraints57.gridy = 2;
+ gridBagConstraints57.weightx = 1.0;
+ gridBagConstraints57.insets = new Insets(0, 0, 5, 5);
+ gridBagConstraints57.gridx = 1;
+ GridBagConstraints gridBagConstraints56 = new GridBagConstraints();
+ gridBagConstraints56.gridx = 0;
+ gridBagConstraints56.insets = new Insets(0, 5, 5, 5);
+ gridBagConstraints56.anchor = GridBagConstraints.WEST;
+ gridBagConstraints56.gridy = 2;
+ ExtOptionLabel = new JLabel();
+ ExtOptionLabel.setText("\8fo\97Í\93®\89æ\82Ì\8ag\92£\8eq");
+ GridBagConstraints gridBagConstraints55 = new GridBagConstraints();
+ gridBagConstraints55.gridx = 0;
+ gridBagConstraints55.fill = GridBagConstraints.HORIZONTAL;
+ gridBagConstraints55.weightx = 1.0;
+ gridBagConstraints55.gridwidth = 2;
+ gridBagConstraints55.gridy = 1;
+ GridBagConstraints gridBagConstraints54 = new GridBagConstraints(0, 2,
+ 2, 1, 1.0, 0.0, GridBagConstraints.CENTER,
+ GridBagConstraints.BOTH, new Insets(5, 5, 5, 5), 0, 0);
+ gridBagConstraints54.gridwidth = 3;
+ GridBagConstraints gridBagConstraints53 = new GridBagConstraints(1, 3,
+ 2, 1, 1.0, 0.0, GridBagConstraints.CENTER,
+ GridBagConstraints.BOTH, new Insets(0, 0, 5, 5), 0, 0);
+ gridBagConstraints53.gridy = 5;
+ gridBagConstraints53.gridheight = 1;
+ gridBagConstraints53.weightx = 1.0;
+ gridBagConstraints53.gridwidth = 1;
+ GridBagConstraints gridBagConstraints52 = new GridBagConstraints(2, 2,
+ 1, 1, 1.0, 0.0, GridBagConstraints.CENTER,
+ GridBagConstraints.BOTH, new Insets(0, 0, 5, 5), 0, 0);
+ gridBagConstraints52.gridy = 4;
+ gridBagConstraints52.gridwidth = 1;
+ gridBagConstraints52.weightx = 1.0;
+ gridBagConstraints52.gridx = 1;
+ GridBagConstraints gridBagConstraints51 = new GridBagConstraints(2, 1,
+ 1, 1, 1.0, 0.0, GridBagConstraints.CENTER,
+ GridBagConstraints.BOTH, new Insets(0, 0, 5, 5), 0, 0);
+ gridBagConstraints51.gridy = 3;
+ gridBagConstraints51.gridwidth = 1;
+ gridBagConstraints51.weightx = 1.0;
+ gridBagConstraints51.gridx = 1;
+ GridBagConstraints gridBagConstraints50 = new GridBagConstraints(0, 3,
+ 1, 1, 0.0, 0.0, GridBagConstraints.WEST,
+ GridBagConstraints.BOTH, new Insets(0, 5, 5, 5), 0, 0);
+ gridBagConstraints50.gridy = 5;
+ GridBagConstraints gridBagConstraints49 = new GridBagConstraints(0, 2,
+ 2, 1, 0.0, 0.0, GridBagConstraints.WEST,
+ GridBagConstraints.BOTH, new Insets(0, 5, 5, 5), 0, 0);
+ gridBagConstraints49.gridy = 4;
+ gridBagConstraints49.gridwidth = 1;
+ GridBagConstraints gridBagConstraints48 = new GridBagConstraints(0, 1,
+ 1, 1, 0.0, 0.0, GridBagConstraints.WEST,
+ GridBagConstraints.BOTH, new Insets(0, 5, 5, 5), 0, 0);
+ gridBagConstraints48.gridy = 3;
+
+ GridBagConstraints gridBagConstraints33 = new GridBagConstraints();
+ gridBagConstraints33.gridx = 0;
+ gridBagConstraints33.fill = GridBagConstraints.HORIZONTAL;
+ gridBagConstraints33.weightx = 1.0;
+ gridBagConstraints33.insets = new Insets(0, 5, 5, 5);
+ gridBagConstraints33.gridwidth = 5;
+ gridBagConstraints33.gridy = 9;
+
+ GridBagConstraints gridBagConstraints14 = new GridBagConstraints();
+ gridBagConstraints14.gridx = 0;
+ gridBagConstraints14.anchor = GridBagConstraints.WEST;
+ gridBagConstraints14.fill = GridBagConstraints.HORIZONTAL;
+ gridBagConstraints14.weightx = 1.0;
+ gridBagConstraints14.gridwidth = 5;
+ gridBagConstraints14.insets = new Insets(0, 5, 0, 5);
+ gridBagConstraints14.gridy = 8;
+ GridBagConstraints gridBagConstraints7 = new GridBagConstraints(0, 0,
+ 1, 1, 1.0, 1.0, GridBagConstraints.NORTH,
+ GridBagConstraints.HORIZONTAL, new Insets(0, 5, 0, 5), 0, 0);
+ gridBagConstraints7.weighty = 0.0;
+ GridBagConstraints gridBagConstraints6 = new GridBagConstraints();
+ gridBagConstraints6.gridx = 0;
+ gridBagConstraints6.weighty = 1.0;
+ gridBagConstraints6.weightx = 1.0;
+ gridBagConstraints6.insets = new Insets(0, 5, 0, 5);
+ gridBagConstraints6.fill = GridBagConstraints.HORIZONTAL;
+ gridBagConstraints6.anchor = GridBagConstraints.NORTH;
+ gridBagConstraints6.gridy = 1;
+ GridBagConstraints gridBagConstraints1 = new GridBagConstraints(0, 1,
+ 1, 1, 1.0, 0.0, GridBagConstraints.CENTER,
+ GridBagConstraints.HORIZONTAL, new Insets(0, 5, 0, 5), 0, 0);
+ gridBagConstraints1.fill = GridBagConstraints.HORIZONTAL;
+ gridBagConstraints1.anchor = GridBagConstraints.NORTH;
+ gridBagConstraints1.weighty = 1.0;
+ this.setIconImage(WinIcon);
+ contentPane = (JPanel) this.getContentPane();
+ contentPane.setLayout(borderLayout1);
+ setSize(new Dimension(400, 450));
+ setTitle("\82³\82«\82ã\82Î\82· " + VERSION);
+ this.addWindowListener(new MainFrame_this_windowAdapter(this));
+ statusBar.setText(" ");
+ jMenuFile.setText("\83t\83@\83C\83\8b");
+ jMenuFileExit.setText("\8fI\97¹");
+ jMenuFileExit.addActionListener(new MainFrame_jMenuFileExit_ActionAdapter(
+ this));
+ jMenuHelp.setText("\83w\83\8b\83v");
+ jMenuHelpAbout.setText("\83o\81[\83W\83\87\83\93\8fî\95ñ");
+ jMenuHelpAbout.addActionListener(new MainFrame_jMenuHelpAbout_ActionAdapter(
+ this));
+ VideoInfoPanel.setLayout(gridBagLayout1);
+ VideoID_TextField.setText("http://www.nicovideo.jp/watch/");
+ DoButton.setText(DoButtonDefString);
+ DoButton.addActionListener(new MainFrame_DoButton_actionAdapter(this));
+ SavingInfoTabPanel.setLayout(new GridLayout());
+ UserInfoPanel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), "\83\86\81[\83U\90Ý\92è"));
+ UserInfoPanel.setLayout(gridBagLayout3);
+ MailAddrLabel.setText("\83\81\81[\83\8b\83A\83h\83\8c\83X");
+ PasswordLabel.setText("\83p\83X\83\8f\81[\83h");
+
+ setListenerToSavePanelButton();
+
+ FFMpegTabPanel.setLayout(gridBagLayout6);
+ PathSettingPanel.setBorder(BorderFactory.createTitledBorder(
+ BorderFactory.createEtchedBorder(), "\83v\83\8d\83O\83\89\83\80\82Ì\88Ê\92u\82Ì\90Ý\92è"));
+ PathSettingPanel.setLayout(gridBagLayout7);
+ FFmpegPathLabel.setText("FFmpeg");
+ SettingFFmpegPathButton.setText("\8eQ\8fÆ");
+ SettingFFmpegPathButton.addActionListener(new MainFrame_SettingFFmpegPathButton_actionAdapter(
+ this));
+ VhookPathLabel.setText("\8ag\92£vhook\83\89\83C\83u\83\89\83\8a");
+ SettingVhookPathButton.setText("\8eQ\8fÆ");
+ SettingVhookPathButton.addActionListener(new MainFrame_SettingVhookPathButton_actionAdapter(
+ this));
+ VhookSettingPanel.setLayout(gridBagLayout8);
+ VhookSettingPanel.setBorder(BorderFactory.createTitledBorder(
+ BorderFactory.createEtchedBorder(), "\8ag\92£vhook\83\89\83C\83u\83\89\83\8a\82Ì\90Ý\92è"));
+ FFmpegSettingPanel.setBorder(BorderFactory.createTitledBorder(
+ BorderFactory.createEtchedBorder(), "FFmpeg\82Ì\90Ý\92è"));
+ FFmpegSettingPanel.setLayout(gridBagLayout9);
+ FontPathLabel.setText("\83t\83H\83\93\83g\83p\83X");
+ SettingFontPathButton.setText("\8eQ\8fÆ");
+ SettingFontPathButton.addActionListener(new MainFrame_SettingFontPathButton_actionAdapter(
+ this));
+ ShowConvVideoCheckBox.setText("\95Ï\8a·\92\86\82Ì\89æ\91\9c\82ð\95\\8e¦\82·\82é");
+ InLabel.setText("\93ü\97Í\83I\83v\83V\83\87\83\93");
+ OutLabel.setText("\8fo\97Í\83I\83v\83V\83\87\83\93");
+ MainOptionLabel.setText("\83\81\83C\83\93\83I\83v\83V\83\87\83\93");
+ FontIndexLabel.setText("\83t\83H\83\93\83g\94Ô\8d\86");
+ VideoID_Label.setText("URL/ID");
+ WayBackLabel.setText("\89ß\8b\8e\83\8d\83O");
+ OpPanel.setLayout(new GridBagLayout());
+
+ BasicInfoTabPanel.setLayout(gridBagLayout12);
+ jMenuBar1.add(jMenuFile);
+ jMenuFile.add(jMenuFileExit);
+ jMenuBar1.add(jMenuHelp);
+ jMenuHelp.add(jMenuHelpAbout);
+ setJMenuBar(jMenuBar1);
+
+ contentPane.add(statusBar, BorderLayout.SOUTH);
+ contentPane.add(MainTabbedPane, java.awt.BorderLayout.CENTER);
+ contentPane.add(VideoInfoPanel, java.awt.BorderLayout.NORTH);
+ UserInfoPanel.add(PasswordField, new GridBagConstraints(1, 1, 1, 1,
+ 1.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH,
+ new Insets(0, 5, 5, 5), 0, 0));
+ UserInfoPanel.add(MailAddrField, new GridBagConstraints(1, 0, 1, 1,
+ 1.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH,
+ new Insets(0, 5, 5, 5), 0, 0));
+ UserInfoPanel.add(PasswordLabel, new GridBagConstraints(0, 1, 1, 1,
+ 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.NONE,
+ new Insets(0, 5, 5, 0), 0, 0));
+ UserInfoPanel.add(MailAddrLabel, new GridBagConstraints(0, 0, 1, 1,
+ 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.NONE,
+ new Insets(0, 5, 5, 0), 0, 0));
+ PathSettingPanel.add(FFmpegPathField, new GridBagConstraints(0, 1, 1,
+ 1, 1.0, 0.0, GridBagConstraints.CENTER,
+ GridBagConstraints.BOTH, new Insets(0, 5, 0, 5), 0, 0));
+ PathSettingPanel.add(SettingFFmpegPathButton, gridBagConstraints74);
+ PathSettingPanel.add(FFmpegPathLabel, new GridBagConstraints(0, 0, 2,
+ 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE,
+ new Insets(0, 5, 5, 5), 0, 0));
+ PathSettingPanel.add(VhookPathField, new GridBagConstraints(0, 3, 1, 1,
+ 1.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH,
+ new Insets(0, 5, 5, 5), 0, 0));
+ PathSettingPanel.add(SettingVhookPathButton, new GridBagConstraints(1,
+ 3, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER,
+ GridBagConstraints.BOTH, new Insets(0, 0, 5, 5), 0, 0));
+ PathSettingPanel.add(VhookPathLabel, gridBagConstraints54);
+ FFmpegSettingPanel.add(CommandLineOutOptionField, gridBagConstraints53);
+ FFmpegSettingPanel.add(CommandLineInOptionField, gridBagConstraints52);
+ FFmpegSettingPanel.add(MainOptionField, gridBagConstraints51);
+ FFmpegSettingPanel.add(MainOptionLabel, gridBagConstraints48);
+ FFmpegSettingPanel.add(InLabel, gridBagConstraints49);
+ FFmpegSettingPanel.add(OutLabel, gridBagConstraints50);
+ FFmpegSettingPanel.add(getFFmpegOptionComboBoxPanel(),
+ gridBagConstraints55);
+ FFmpegSettingPanel.add(ExtOptionLabel, gridBagConstraints56);
+ FFmpegSettingPanel.add(getExtOptionField(), gridBagConstraints57);
+ VideoInfoPanel.add(DoButton, gridBagConstraints71);
+ VideoInfoPanel.add(OpPanel, new GridBagConstraints(0, 0, 1, 1, 1.0,
+ 0.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH,
+ new Insets(0, 0, 0, 0), 0, 0));
+ OpPanel.add(VideoID_Label, gridBagConstraints67);
+ OpPanel.add(VideoID_TextField, gridBagConstraints68);
+ OpPanel.add(WayBackLabel, gridBagConstraints69);
+ OpPanel.add(WayBackField, gridBagConstraints70);
+
+ MainTabbedPane.add(BasicInfoTabPanel, "\8aî\96{\90Ý\92è");
+ MainTabbedPane.add(SavingInfoTabPanel, "\95Û\91¶\90Ý\92è");
+ MainTabbedPane.add(FFMpegTabPanel, "\93®\89æ\90Ý\92è");
+ MainTabbedPane.addTab("\95Ï\8a·\90Ý\92è", null, getConvertingSettingPanel(), null);
+ SavingInfoTabPanel.add(savePanel);
+ BasicInfoTabPanel.add(UserInfoPanel, gridBagConstraints7);
+ BasicInfoTabPanel.add(getProxyInfoPanel(), gridBagConstraints6);
+ VhookSettingPanel.add(FontPathLabel, gridBagConstraints59);
+ VhookSettingPanel.add(ShowConvVideoCheckBox, gridBagConstraints63);
+ VhookSettingPanel.add(FontPathField, gridBagConstraints60);
+ VhookSettingPanel.add(FontIndexField, gridBagConstraints62);
+ VhookSettingPanel.add(FontIndexLabel, gridBagConstraints61);
+ VhookSettingPanel.add(SettingFontPathButton, gridBagConstraints64);
+ VhookSettingPanel.add(getFixFontSizeCheckBox(), gridBagConstraints14);
+ VhookSettingPanel.add(getOpaqueCommentCheckBox(), gridBagConstraints33);
+ VhookSettingPanel.add(getNotUseVhookCheckBox(), gridBagConstraints58);
+ VhookSettingPanel.add(getViewCommentField(), gridBagConstraints65);
+ VhookSettingPanel.add(ViewCommentLabel, gridBagConstraints66);
+ VhookSettingPanel.add(ShadowKindLabel, gridBagConstraints72);
+ VhookSettingPanel.add(getShadowComboBox(), gridBagConstraints73);
+
+ FFMpegTabPanel.add(PathSettingPanel, new GridBagConstraints(0, 0, 1, 1,
+ 1.0, 0.0, GridBagConstraints.NORTHEAST,
+ GridBagConstraints.HORIZONTAL, new Insets(0, 5, 0, 5), 0, 0));
+ FFMpegTabPanel.add(FFmpegSettingPanel, gridBagConstraints1);
+ }
- JTextField CommentSavedFileField = new JTextField();
+ /**
+ * \95Û\91¶\90Ý\92è\83p\83l\83\8b\93à\82Ì\83{\83^\83\93\82É\83A\83N\83V\83\87\83\93\83\8a\83X\83i\82ð\8a\84\82è\93\96\82Ä\82é.
+ */
+ private void setListenerToSavePanelButton() {
+ ActionListener al;
+ al = new InputVideoPanelButtonListener();
+ videoSaveInfoPanel.getShowSavingVideoFolderDialogButton().addActionListener(al);
+ videoSaveInfoPanel.getShowSavingVideoFileDialogButton().addActionListener(al);
+ videoSaveInfoPanel.getNibrFileChooserButton().addActionListener(al);
+
+ al = new VideoUseRadioButtonListener();
+ videoSaveInfoPanel.getVideoNoSaveButton().addActionListener(al);
+ videoSaveInfoPanel.getVideoSaveButton().addActionListener(al);
+ videoSaveInfoPanel.getVideoUseNiBrButton().addActionListener(al);
+
+ al = new InputCommentPanelButtonListener();
+ savePanel.getShowSavingCommentFolderDialogButton().addActionListener(al);
+ savePanel.getShowSavingCommentFileDialogButton().addActionListener(al);
+
+ al = new OutputVideoPanelButtonListener();
+ savePanel.getShowSavingConvertedVideoFolderDialogButton().addActionListener(al);
+ savePanel.getShowSavingConvertedVideoFileDialogButton().addActionListener(al);
+ }
- JButton ShowSavingCommentFileDialogButton = new JButton();
-
- JPanel ConvertedVideoSavingInfoPanel = new JPanel();
-
- GridBagLayout gridBagLayout5 = new GridBagLayout();
-
- JCheckBox SavingConvertedVideoCheckBox = new JCheckBox();
-
- JTextField ConvertedVideoSavedFileField = new JTextField();
-
- JButton ShowSavingConvertedVideoFileDialogButton = new JButton();
-
- GridBagLayout gridBagLayout6 = new GridBagLayout();
-
- ButtonGroup CommentSaveButtonGroup = new ButtonGroup();
-
- ButtonGroup ConvSaveButtonGroup = new ButtonGroup();
-
- public MainFrame() {
- try {
- setDefaultCloseOperation(EXIT_ON_CLOSE);
- jbInit();
- setPopup();
- setDropTarget();
- ConvertingSetting setting = ConvertingSetting.loadSetting(null,
- null);
- this.setSetting(setting);
- } catch (Exception exception) {
- exception.printStackTrace();
- }
- }
-
- /**
- * \83R\83\93\83|\81[\83l\83\93\83g\82Ì\8f\89\8aú\89»\81B
- *
- * @throws java.lang.Exception
- */
- private void jbInit() throws Exception {
- GridBagConstraints gridBagConstraints74 = new GridBagConstraints(1, 1, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 0, 5), 0, 0);
- gridBagConstraints74.gridwidth = 2;
- GridBagConstraints gridBagConstraints73 = new GridBagConstraints();
- gridBagConstraints73.fill = GridBagConstraints.HORIZONTAL;
- gridBagConstraints73.gridy = 6;
- gridBagConstraints73.weightx = 1.0;
- gridBagConstraints73.gridwidth = 4;
- gridBagConstraints73.insets = new Insets(0, 0, 0, 5);
- gridBagConstraints73.gridx = 1;
- GridBagConstraints gridBagConstraints72 = new GridBagConstraints();
- gridBagConstraints72.gridx = 0;
- gridBagConstraints72.anchor = GridBagConstraints.WEST;
- gridBagConstraints72.insets = new Insets(0, 5, 0, 5);
- gridBagConstraints72.fill = GridBagConstraints.NONE;
- gridBagConstraints72.gridwidth = 1;
- gridBagConstraints72.gridy = 6;
- ShadowKindLabel = new JLabel();
- ShadowKindLabel.setText("\89e\82Ì\8eí\97Þ");
- ShadowKindLabel.setDisplayedMnemonic(KeyEvent.VK_UNDEFINED);
- GridBagConstraints gridBagConstraints71 = new GridBagConstraints(1, 0, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 6);
- gridBagConstraints71.fill = GridBagConstraints.BOTH;
- gridBagConstraints71.ipady = 0;
- GridBagConstraints gridBagConstraints70 = new GridBagConstraints();
- gridBagConstraints70.fill = GridBagConstraints.HORIZONTAL;
- gridBagConstraints70.gridy = 1;
- gridBagConstraints70.ipadx = 0;
- gridBagConstraints70.ipady = 0;
- gridBagConstraints70.weightx = 1.0;
- gridBagConstraints70.insets = new Insets(0, 0, 0, 0);
- gridBagConstraints70.gridx = 1;
- GridBagConstraints gridBagConstraints69 = new GridBagConstraints();
- gridBagConstraints69.gridx = 0;
- gridBagConstraints69.ipadx = 0;
- gridBagConstraints69.ipady = 0;
- gridBagConstraints69.insets = new Insets(0, 5, 0, 5);
- gridBagConstraints69.anchor = GridBagConstraints.WEST;
- gridBagConstraints69.gridy = 1;
- GridBagConstraints gridBagConstraints68 = new GridBagConstraints();
- gridBagConstraints68.fill = GridBagConstraints.BOTH;
- gridBagConstraints68.gridy = 0;
- gridBagConstraints68.ipady = 0;
- gridBagConstraints68.weightx = 1.0;
- gridBagConstraints68.insets = new Insets(0, 0, 0, 0);
- gridBagConstraints68.gridx = 1;
- GridBagConstraints gridBagConstraints67 = new GridBagConstraints();
- gridBagConstraints67.gridx = 0;
- gridBagConstraints67.ipadx = 0;
- gridBagConstraints67.ipady = 0;
- gridBagConstraints67.insets = new Insets(0, 5, 0, 5);
- gridBagConstraints67.anchor = GridBagConstraints.WEST;
- gridBagConstraints67.gridy = 0;
- GridBagConstraints gridBagConstraints66 = new GridBagConstraints();
- gridBagConstraints66.gridx = 0;
- gridBagConstraints66.insets = new Insets(0, 5, 5, 5);
- gridBagConstraints66.anchor = GridBagConstraints.WEST;
- gridBagConstraints66.gridwidth = 2;
- gridBagConstraints66.gridy = 1;
- ViewCommentLabel = new JLabel();
- ViewCommentLabel.setText("\95\\8e¦\83R\83\81\83\93\83g\90\94");
- GridBagConstraints gridBagConstraints65 = new GridBagConstraints();
- gridBagConstraints65.fill = GridBagConstraints.HORIZONTAL;
- gridBagConstraints65.gridy = 1;
- gridBagConstraints65.weightx = 1.0;
- gridBagConstraints65.gridwidth = 6;
- gridBagConstraints65.insets = new Insets(0, 5, 5, 5);
- gridBagConstraints65.gridx = 3;
- GridBagConstraints gridBagConstraints64 = new GridBagConstraints(1, 1,
- 1, 1, 0.0, 0.0, GridBagConstraints.CENTER,
- GridBagConstraints.BOTH, new Insets(0, 0, 0, 5), 0, 0);
- gridBagConstraints64.gridy = 3;
- gridBagConstraints64.fill = GridBagConstraints.HORIZONTAL;
- gridBagConstraints64.gridx = 4;
- GridBagConstraints gridBagConstraints63 = new GridBagConstraints(0, 4,
- 2, 1, 1.0, 0.0, GridBagConstraints.CENTER,
- GridBagConstraints.HORIZONTAL, new Insets(0, 5, 0, 5), 0, 0);
- gridBagConstraints63.gridy = 7;
- gridBagConstraints63.gridx = 0;
- gridBagConstraints63.gridwidth = 5;
- GridBagConstraints gridBagConstraints62 = new GridBagConstraints(0, 3,
- 2, 1, 1.0, 0.0, GridBagConstraints.CENTER,
- GridBagConstraints.BOTH, new Insets(0, 5, 5, 5), 0, 0);
- gridBagConstraints62.gridy = 5;
- gridBagConstraints62.gridx = 1;
- gridBagConstraints62.fill = GridBagConstraints.HORIZONTAL;
- gridBagConstraints62.insets = new Insets(0, 0, 5, 5);
- gridBagConstraints62.gridwidth = 4;
- GridBagConstraints gridBagConstraints61 = new GridBagConstraints(0, 2,
- 1, 1, 0.0, 0.0, GridBagConstraints.CENTER,
- GridBagConstraints.BOTH, new Insets(5, 5, 5, 5), 0, 0);
- gridBagConstraints61.gridy = 5;
- gridBagConstraints61.gridx = 0;
- gridBagConstraints61.fill = GridBagConstraints.VERTICAL;
- gridBagConstraints61.anchor = GridBagConstraints.WEST;
- gridBagConstraints61.gridwidth = 1;
- GridBagConstraints gridBagConstraints60 = new GridBagConstraints(0, 1,
- 1, 1, 1.0, 0.0, GridBagConstraints.CENTER,
- GridBagConstraints.BOTH, new Insets(0, 5, 0, 5), 0, 0);
- gridBagConstraints60.gridy = 3;
- gridBagConstraints60.gridx = 1;
- gridBagConstraints60.fill = GridBagConstraints.HORIZONTAL;
- gridBagConstraints60.insets = new Insets(0, 0, 0, 5);
- gridBagConstraints60.gridwidth = 3;
- GridBagConstraints gridBagConstraints59 = new GridBagConstraints(0, 0,
- 2, 1, 1.0, 0.0, GridBagConstraints.CENTER,
- GridBagConstraints.HORIZONTAL, new Insets(0, 5, 5, 5), 0, 0);
- gridBagConstraints59.gridy = 3;
- gridBagConstraints59.insets = new Insets(5, 5, 5, 5);
- gridBagConstraints59.gridx = 0;
- gridBagConstraints59.fill = GridBagConstraints.NONE;
- gridBagConstraints59.anchor = GridBagConstraints.WEST;
- gridBagConstraints59.weightx = 0.0;
- gridBagConstraints59.gridwidth = 1;
- GridBagConstraints gridBagConstraints58 = new GridBagConstraints();
- gridBagConstraints58.gridx = 0;
- gridBagConstraints58.anchor = GridBagConstraints.WEST;
- gridBagConstraints58.insets = new Insets(0, 5, 5, 5);
- gridBagConstraints58.gridwidth = 5;
- gridBagConstraints58.weightx = 1.0;
- gridBagConstraints58.fill = GridBagConstraints.HORIZONTAL;
- gridBagConstraints58.gridy = 0;
- GridBagConstraints gridBagConstraints57 = new GridBagConstraints();
- gridBagConstraints57.fill = GridBagConstraints.BOTH;
- gridBagConstraints57.gridy = 2;
- gridBagConstraints57.weightx = 1.0;
- gridBagConstraints57.insets = new Insets(0, 0, 5, 5);
- gridBagConstraints57.gridx = 1;
- GridBagConstraints gridBagConstraints56 = new GridBagConstraints();
- gridBagConstraints56.gridx = 0;
- gridBagConstraints56.insets = new Insets(0, 5, 5, 5);
- gridBagConstraints56.anchor = GridBagConstraints.WEST;
- gridBagConstraints56.gridy = 2;
- ExtOptionLabel = new JLabel();
- ExtOptionLabel.setText("\8fo\97Í\93®\89æ\82Ì\8ag\92£\8eq");
- GridBagConstraints gridBagConstraints55 = new GridBagConstraints();
- gridBagConstraints55.gridx = 0;
- gridBagConstraints55.fill = GridBagConstraints.HORIZONTAL;
- gridBagConstraints55.weightx = 1.0;
- gridBagConstraints55.gridwidth = 2;
- gridBagConstraints55.gridy = 1;
- GridBagConstraints gridBagConstraints54 = new GridBagConstraints(0, 2,
- 2, 1, 1.0, 0.0, GridBagConstraints.CENTER,
- GridBagConstraints.BOTH, new Insets(5, 5, 5, 5), 0, 0);
- gridBagConstraints54.gridwidth = 3;
- GridBagConstraints gridBagConstraints53 = new GridBagConstraints(1, 3,
- 2, 1, 1.0, 0.0, GridBagConstraints.CENTER,
- GridBagConstraints.BOTH, new Insets(0, 0, 5, 5), 0, 0);
- gridBagConstraints53.gridy = 5;
- gridBagConstraints53.gridheight = 1;
- gridBagConstraints53.weightx = 1.0;
- gridBagConstraints53.gridwidth = 1;
- GridBagConstraints gridBagConstraints52 = new GridBagConstraints(2, 2,
- 1, 1, 1.0, 0.0, GridBagConstraints.CENTER,
- GridBagConstraints.BOTH, new Insets(0, 0, 5, 5), 0, 0);
- gridBagConstraints52.gridy = 4;
- gridBagConstraints52.gridwidth = 1;
- gridBagConstraints52.weightx = 1.0;
- gridBagConstraints52.gridx = 1;
- GridBagConstraints gridBagConstraints51 = new GridBagConstraints(2, 1,
- 1, 1, 1.0, 0.0, GridBagConstraints.CENTER,
- GridBagConstraints.BOTH, new Insets(0, 0, 5, 5), 0, 0);
- gridBagConstraints51.gridy = 3;
- gridBagConstraints51.gridwidth = 1;
- gridBagConstraints51.weightx = 1.0;
- gridBagConstraints51.gridx = 1;
- GridBagConstraints gridBagConstraints50 = new GridBagConstraints(0, 3,
- 1, 1, 0.0, 0.0, GridBagConstraints.WEST,
- GridBagConstraints.BOTH, new Insets(0, 5, 5, 5), 0, 0);
- gridBagConstraints50.gridy = 5;
- GridBagConstraints gridBagConstraints49 = new GridBagConstraints(0, 2,
- 2, 1, 0.0, 0.0, GridBagConstraints.WEST,
- GridBagConstraints.BOTH, new Insets(0, 5, 5, 5), 0, 0);
- gridBagConstraints49.gridy = 4;
- gridBagConstraints49.gridwidth = 1;
- GridBagConstraints gridBagConstraints48 = new GridBagConstraints(0, 1,
- 1, 1, 0.0, 0.0, GridBagConstraints.WEST,
- GridBagConstraints.BOTH, new Insets(0, 5, 5, 5), 0, 0);
- gridBagConstraints48.gridy = 3;
- GridBagConstraints gridBagConstraints45 = new GridBagConstraints(3, 5,
- 1, 1, 0.0, 0.0, GridBagConstraints.CENTER,
- GridBagConstraints.NONE, new Insets(0, 0, 5, 5), 0, 0);
- gridBagConstraints45.gridy = 7;
- GridBagConstraints gridBagConstraints44 = new GridBagConstraints(3, 3,
- 1, 1, 0.0, 0.0, GridBagConstraints.CENTER,
- GridBagConstraints.NONE, new Insets(0, 0, 0, 5), 0, 0);
- gridBagConstraints44.gridy = 5;
- GridBagConstraints gridBagConstraints43 = new GridBagConstraints(0, 5,
- 3, 1, 1.0, 0.0, GridBagConstraints.CENTER,
- GridBagConstraints.BOTH, new Insets(3, 50, 5, 5), 0, 0);
- gridBagConstraints43.gridy = 7;
- GridBagConstraints gridBagConstraints42 = new GridBagConstraints(0, 4,
- 4, 1, 1.0, 0.0, GridBagConstraints.WEST,
- GridBagConstraints.NONE, new Insets(0, 25, 0, 5), 0, 0);
- gridBagConstraints42.gridy = 6;
- GridBagConstraints gridBagConstraints41 = new GridBagConstraints(0, 3,
- 3, 1, 0.0, 0.0, GridBagConstraints.CENTER,
- GridBagConstraints.BOTH, new Insets(0, 50, 0, 5), 0, 0);
- gridBagConstraints41.gridy = 5;
- GridBagConstraints gridBagConstraints40 = new GridBagConstraints(0, 2,
- 4, 1, 1.0, 0.0, GridBagConstraints.WEST,
- GridBagConstraints.NONE, new Insets(0, 25, 0, 5), 0, 0);
- gridBagConstraints40.gridy = 3;
- GridBagConstraints gridBagConstraints39 = new GridBagConstraints();
- gridBagConstraints39.gridx = 0;
- gridBagConstraints39.insets = new Insets(0, 50, 0, 0);
- gridBagConstraints39.fill = GridBagConstraints.HORIZONTAL;
- gridBagConstraints39.weightx = 1.0;
- gridBagConstraints39.gridwidth = 4;
- gridBagConstraints39.gridy = 4;
- GridBagConstraints gridBagConstraints35 = new GridBagConstraints();
- gridBagConstraints35.fill = GridBagConstraints.BOTH;
- gridBagConstraints35.weighty = 1.0;
- gridBagConstraints35.weightx = 1.0;
- GridBagConstraints gridBagConstraints33 = new GridBagConstraints();
- gridBagConstraints33.gridx = 0;
- gridBagConstraints33.fill = GridBagConstraints.HORIZONTAL;
- gridBagConstraints33.weightx = 1.0;
- gridBagConstraints33.insets = new Insets(0, 5, 5, 5);
- gridBagConstraints33.gridwidth = 5;
- gridBagConstraints33.gridy = 9;
- GridBagConstraints gridBagConstraints26 = new GridBagConstraints();
- gridBagConstraints26.gridx = 0;
- gridBagConstraints26.gridwidth = 4;
- gridBagConstraints26.insets = new Insets(0, 25, 0, 5);
- gridBagConstraints26.weightx = 1.0;
- gridBagConstraints26.fill = GridBagConstraints.HORIZONTAL;
- gridBagConstraints26.gridy = 9;
- GridBagConstraints gridBagConstraints25 = new GridBagConstraints();
- gridBagConstraints25.gridx = 0;
- gridBagConstraints25.gridwidth = 4;
- gridBagConstraints25.fill = GridBagConstraints.HORIZONTAL;
- gridBagConstraints25.insets = new Insets(0, 25, 0, 5);
- gridBagConstraints25.weightx = 1.0;
- gridBagConstraints25.gridy = 8;
- GridBagConstraints gridBagConstraints24 = new GridBagConstraints(3, 10,
- 1, 1, 0.0, 0.0, GridBagConstraints.CENTER,
- GridBagConstraints.NONE, new Insets(0, 0, 5, 5), 0, 0);
- gridBagConstraints24.gridy = 14;
- GridBagConstraints gridBagConstraints23 = new GridBagConstraints(3, 8,
- 1, 1, 0.0, 0.0, GridBagConstraints.CENTER,
- GridBagConstraints.NONE, new Insets(0, 0, 0, 5), 0, 0);
- gridBagConstraints23.gridy = 12;
- GridBagConstraints gridBagConstraints22 = new GridBagConstraints(1, 6,
- 4, 1, 1.0, 0.0, GridBagConstraints.CENTER,
- GridBagConstraints.BOTH, new Insets(0, 0, 0, 5), 0, 0);
- gridBagConstraints22.gridy = 10;
- GridBagConstraints gridBagConstraints21 = new GridBagConstraints(0, 10,
- 3, 1, 1.0, 0.0, GridBagConstraints.CENTER,
- GridBagConstraints.BOTH, new Insets(0, 50, 5, 5), 0, 0);
- gridBagConstraints21.gridy = 14;
- GridBagConstraints gridBagConstraints20 = new GridBagConstraints(0, 9,
- 4, 1, 1.0, 0.0, GridBagConstraints.WEST,
- GridBagConstraints.HORIZONTAL, new Insets(0, 25, 0, 5), 0, 0);
- gridBagConstraints20.gridy = 13;
- GridBagConstraints gridBagConstraints19 = new GridBagConstraints(0, 8,
- 3, 1, 1.0, 0.0, GridBagConstraints.CENTER,
- GridBagConstraints.BOTH, new Insets(0, 50, 0, 5), 0, 0);
- gridBagConstraints19.gridy = 12;
- GridBagConstraints gridBagConstraints18 = new GridBagConstraints(0, 7,
- 4, 1, 1.0, 0.0, GridBagConstraints.CENTER,
- GridBagConstraints.HORIZONTAL, new Insets(0, 25, 0, 5), 0, 0);
- gridBagConstraints18.gridy = 11;
- GridBagConstraints gridBagConstraints17 = new GridBagConstraints(0, 6,
- 1, 1, 0.0, 0.0, GridBagConstraints.CENTER,
- GridBagConstraints.BOTH, new Insets(0, 5, 0, 5), 0, 0);
- gridBagConstraints17.gridy = 10;
- gridBagConstraints17.insets = new Insets(0, 50, 0, 5);
- GridBagConstraints gridBagConstraints16 = new GridBagConstraints(0, 5,
- 4, 1, 1.0, 0.0, GridBagConstraints.WEST,
- GridBagConstraints.BOTH, new Insets(5, 5, 5, 5), 0, 0);
- gridBagConstraints16.gridy = 7;
- GridBagConstraints gridBagConstraints14 = new GridBagConstraints();
- gridBagConstraints14.gridx = 0;
- gridBagConstraints14.anchor = GridBagConstraints.WEST;
- gridBagConstraints14.fill = GridBagConstraints.HORIZONTAL;
- gridBagConstraints14.weightx = 1.0;
- gridBagConstraints14.gridwidth = 5;
- gridBagConstraints14.insets = new Insets(0, 5, 0, 5);
- gridBagConstraints14.gridy = 8;
- GridBagConstraints gridBagConstraints7 = new GridBagConstraints(0, 0,
- 1, 1, 1.0, 1.0, GridBagConstraints.NORTH,
- GridBagConstraints.HORIZONTAL, new Insets(0, 5, 0, 5), 0, 0);
- gridBagConstraints7.weighty = 0.0;
- GridBagConstraints gridBagConstraints6 = new GridBagConstraints();
- gridBagConstraints6.gridx = 0;
- gridBagConstraints6.weighty = 1.0;
- gridBagConstraints6.weightx = 1.0;
- gridBagConstraints6.insets = new Insets(0, 5, 0, 5);
- gridBagConstraints6.fill = GridBagConstraints.HORIZONTAL;
- gridBagConstraints6.anchor = GridBagConstraints.NORTH;
- gridBagConstraints6.gridy = 1;
- GridBagConstraints gridBagConstraints1 = new GridBagConstraints(0, 1,
- 1, 1, 1.0, 0.0, GridBagConstraints.CENTER,
- GridBagConstraints.HORIZONTAL, new Insets(0, 5, 0, 5), 0, 0);
- gridBagConstraints1.fill = GridBagConstraints.HORIZONTAL;
- gridBagConstraints1.anchor = GridBagConstraints.NORTH;
- gridBagConstraints1.weighty = 1.0;
- this.setIconImage(WinIcon);
- contentPane = (JPanel) this.getContentPane();
- contentPane.setLayout(borderLayout1);
- setSize(new Dimension(400, 630));
- setTitle("\82³\82«\82ã\82Î\82· " + VERSION);
- this.addWindowListener(new MainFrame_this_windowAdapter(this));
- statusBar.setText(" ");
- jMenuFile.setText("\83t\83@\83C\83\8b");
- jMenuFileExit.setText("\8fI\97¹");
- jMenuFileExit
- .addActionListener(new MainFrame_jMenuFileExit_ActionAdapter(
- this));
- jMenuHelp.setText("\83w\83\8b\83v");
- jMenuHelpAbout.setText("\83o\81[\83W\83\87\83\93\8fî\95ñ");
- jMenuHelpAbout
- .addActionListener(new MainFrame_jMenuHelpAbout_ActionAdapter(
- this));
- VideoInfoPanel.setLayout(gridBagLayout1);
- VideoID_TextField.setText("http://www.nicovideo.jp/watch/");
- DoButton.setText(DoButtonDefString);
- DoButton.addActionListener(new MainFrame_DoButton_actionAdapter(this));
- SavingInfoTabPanel.setLayout(gridBagLayout2);
- UserInfoPanel.setBorder(BorderFactory.createTitledBorder(BorderFactory
- .createEtchedBorder(), "\83\86\81[\83U\90Ý\92è"));
- UserInfoPanel.setLayout(gridBagLayout3);
- MailAddrLabel.setText("\83\81\81[\83\8b\83A\83h\83\8c\83X");
- PasswordLabel.setText("\83p\83X\83\8f\81[\83h");
- CommentSaveInfoPanel.setBorder(BorderFactory.createTitledBorder(
- BorderFactory.createEtchedBorder(EtchedBorder.LOWERED),
- "\83R\83\81\83\93\83g\95Û\91¶\90Ý\92è", TitledBorder.LEADING, TitledBorder.TOP, new Font(
- "MS UI Gothic", Font.PLAIN, 12), Color.black));
- CommentSaveInfoPanel.setLayout(gridBagLayout4);
-
- final ActionListener videoSavePanelButtonListener = new VideoSavePanelButtonListener();
- videoSaveInfoPanel.getShowSavingVideoFolderDialogButton().addActionListener(videoSavePanelButtonListener);
- videoSaveInfoPanel.getShowSavingVideoFileDialogButton().addActionListener(videoSavePanelButtonListener);
- videoSaveInfoPanel.getNibrFileChooserButton().addActionListener(videoSavePanelButtonListener);
-
- final ActionListener videoUseRadioButtonListener = new VideoUseRadioButtonListener();
- videoSaveInfoPanel.getVideoNoSaveButton().addActionListener(videoUseRadioButtonListener);
- videoSaveInfoPanel.getVideoSaveButton().addActionListener(videoUseRadioButtonListener);
- videoSaveInfoPanel.getVideoUseNiBrButton().addActionListener(videoUseRadioButtonListener);
-
- SavingCommentCheckBox.setText("\83R\83\81\83\93\83g\82ð\83_\83E\83\93\83\8d\81[\83h\82·\82é");
- ShowSavingCommentFileDialogButton.setText("\8eQ\8fÆ");
- ShowSavingCommentFileDialogButton
- .addActionListener(new MainFrame_ShowSavingCommentDialogButton_actionAdapter(
- this));
- ConvertedVideoSavingInfoPanel.setBorder(BorderFactory
- .createTitledBorder(BorderFactory.createEtchedBorder(),
- "\83R\83\81\83\93\83g\95t\82«\93®\89æ\95Û\91¶\90Ý\92è"));
- ConvertedVideoSavingInfoPanel.setLayout(gridBagLayout5);
- SavingConvertedVideoCheckBox.setText("\83R\83\81\83\93\83g\95t\82«\93®\89æ\82É\95Ï\8a·\82·\82é");
- ShowSavingConvertedVideoFileDialogButton.setText("\8eQ\8fÆ");
- ShowSavingConvertedVideoFileDialogButton
- .addActionListener(new MainFrame_ShowSavingConvertedVideoDialogButton_actionAdapter(
- this));
- FFMpegTabPanel.setLayout(gridBagLayout6);
- PathSettingPanel.setBorder(BorderFactory.createTitledBorder(
- BorderFactory.createEtchedBorder(), "\83v\83\8d\83O\83\89\83\80\82Ì\88Ê\92u\82Ì\90Ý\92è"));
- PathSettingPanel.setLayout(gridBagLayout7);
- FFmpegPathLabel.setText("FFmpeg");
- SettingFFmpegPathButton.setText("\8eQ\8fÆ");
- SettingFFmpegPathButton
- .addActionListener(new MainFrame_SettingFFmpegPathButton_actionAdapter(
- this));
- VhookPathLabel.setText("\8ag\92£vhook\83\89\83C\83u\83\89\83\8a");
- SettingVhookPathButton.setText("\8eQ\8fÆ");
- SettingVhookPathButton
- .addActionListener(new MainFrame_SettingVhookPathButton_actionAdapter(
- this));
- VhookSettingPanel.setLayout(gridBagLayout8);
- VhookSettingPanel.setBorder(BorderFactory.createTitledBorder(
- BorderFactory.createEtchedBorder(), "\8ag\92£vhook\83\89\83C\83u\83\89\83\8a\82Ì\90Ý\92è"));
- FFmpegSettingPanel.setBorder(BorderFactory.createTitledBorder(
- BorderFactory.createEtchedBorder(), "FFmpeg\82Ì\90Ý\92è"));
- FFmpegSettingPanel.setLayout(gridBagLayout9);
- FontPathLabel.setText("\83t\83H\83\93\83g\83p\83X");
- SettingFontPathButton.setText("\8eQ\8fÆ");
- SettingFontPathButton
- .addActionListener(new MainFrame_SettingFontPathButton_actionAdapter(
- this));
- ShowConvVideoCheckBox.setText("\95Ï\8a·\92\86\82Ì\89æ\91\9c\82ð\95\\8e¦\82·\82é");
- InLabel.setText("\93ü\97Í\83I\83v\83V\83\87\83\93");
- OutLabel.setText("\8fo\97Í\83I\83v\83V\83\87\83\93");
- CommentNumLabel.setText("\8eæ\93¾\83R\83\81\83\93\83g\90\94");
- MainOptionLabel.setText("\83\81\83C\83\93\83I\83v\83V\83\87\83\93");
- FontIndexLabel.setText("\83t\83H\83\93\83g\94Ô\8d\86");
- VideoID_Label.setText("URL/ID");
- WayBackLabel.setText("\89ß\8b\8e\83\8d\83O");
- OpPanel.setLayout(new GridBagLayout());
- Conv_SaveFileRadioButton.setText("\95Û\91¶\82·\82é\83t\83@\83C\83\8b\96¼\82ð\8ew\92è\82·\82é");
- Conv_SaveFolderRadioButton.setText("\95Û\91¶\82·\82é\83t\83H\83\8b\83_\82ð\8ew\92è\82µ\81A\83t\83@\83C\83\8b\96¼\82Í\8e©\93®\82Å\8c\88\92è\82·\82é");
- ShowSavingConvertedVideoFolderDialogButton.setText("\8eQ\8fÆ");
- ShowSavingConvertedVideoFolderDialogButton
- .addActionListener(new MainFrame_ShowSavingConvertedVideoFolderDialogButton_actionAdapter(
- this));
- Comment_SaveFileRadioButton.setText("\95Û\91¶\82·\82é\83t\83@\83C\83\8b\96¼\82ð\8ew\92è\82·\82é");
- ShowSavingCommentFolderDialogButton.setText("\8eQ\8fÆ");
- ShowSavingCommentFolderDialogButton
- .addActionListener(new MainFrame_ShowSavingCommentFolderDialogButton_actionAdapter(
- this));
- Comment_SaveFolderRadioButton.setText("\95Û\91¶\82·\82é\83t\83H\83\8b\83_\82ð\8ew\92è\82µ\81A\83t\83@\83C\83\8b\96¼\82Í\8e©\93®\82Å\8c\88\92è\82·\82é");
- BasicInfoTabPanel.setLayout(gridBagLayout12);
- jMenuBar1.add(jMenuFile);
- jMenuFile.add(jMenuFileExit);
- jMenuBar1.add(jMenuHelp);
- jMenuHelp.add(jMenuHelpAbout);
- setJMenuBar(jMenuBar1);
-
- CommentSaveButtonGroup.add(Comment_SaveFileRadioButton);
- CommentSaveButtonGroup.add(Comment_SaveFolderRadioButton);
-
- ConvSaveButtonGroup.add(Conv_SaveFileRadioButton);
- ConvSaveButtonGroup.add(Conv_SaveFolderRadioButton);
-
- contentPane.add(statusBar, BorderLayout.SOUTH);
- contentPane.add(MainTabbedPane, java.awt.BorderLayout.CENTER);
- contentPane.add(VideoInfoPanel, java.awt.BorderLayout.NORTH);
- UserInfoPanel.add(PasswordField, new GridBagConstraints(1, 1, 1, 1,
- 1.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH,
- new Insets(0, 5, 5, 5), 0, 0));
- UserInfoPanel.add(MailAddrField, new GridBagConstraints(1, 0, 1, 1,
- 1.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH,
- new Insets(0, 5, 5, 5), 0, 0));
- UserInfoPanel.add(PasswordLabel, new GridBagConstraints(0, 1, 1, 1,
- 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.NONE,
- new Insets(0, 5, 5, 0), 0, 0));
- UserInfoPanel.add(MailAddrLabel, new GridBagConstraints(0, 0, 1, 1,
- 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.NONE,
- new Insets(0, 5, 5, 0), 0, 0));
- PathSettingPanel.add(FFmpegPathField, new GridBagConstraints(0, 1, 1,
- 1, 1.0, 0.0, GridBagConstraints.CENTER,
- GridBagConstraints.BOTH, new Insets(0, 5, 0, 5), 0, 0));
- PathSettingPanel.add(SettingFFmpegPathButton, gridBagConstraints74);
- PathSettingPanel.add(FFmpegPathLabel, new GridBagConstraints(0, 0, 2,
- 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE,
- new Insets(0, 5, 5, 5), 0, 0));
- PathSettingPanel.add(VhookPathField, new GridBagConstraints(0, 3, 1, 1,
- 1.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH,
- new Insets(0, 5, 5, 5), 0, 0));
- PathSettingPanel.add(SettingVhookPathButton, new GridBagConstraints(1,
- 3, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER,
- GridBagConstraints.BOTH, new Insets(0, 0, 5, 5), 0, 0));
- PathSettingPanel.add(VhookPathLabel, gridBagConstraints54);
- FFmpegSettingPanel.add(CommandLineOutOptionField, gridBagConstraints53);
- FFmpegSettingPanel.add(CommandLineInOptionField, gridBagConstraints52);
- FFmpegSettingPanel.add(MainOptionField, gridBagConstraints51);
- FFmpegSettingPanel.add(MainOptionLabel, gridBagConstraints48);
- FFmpegSettingPanel.add(InLabel, gridBagConstraints49);
- FFmpegSettingPanel.add(OutLabel, gridBagConstraints50);
- FFmpegSettingPanel.add(getFFmpegOptionComboBoxPanel(),
- gridBagConstraints55);
- FFmpegSettingPanel.add(ExtOptionLabel, gridBagConstraints56);
- FFmpegSettingPanel.add(getExtOptionField(), gridBagConstraints57);
- VideoInfoPanel.add(DoButton, gridBagConstraints71);
- VideoInfoPanel.add(OpPanel, new GridBagConstraints(0, 0, 1, 1, 1.0,
- 0.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH,
- new Insets(0, 0, 0, 0), 0, 0));
- OpPanel.add(VideoID_Label, gridBagConstraints67);
- OpPanel.add(VideoID_TextField, gridBagConstraints68);
- OpPanel.add(WayBackLabel, gridBagConstraints69);
- OpPanel.add(WayBackField, gridBagConstraints70);
- ConvertedVideoSavingInfoPanel.add(SavingConvertedVideoCheckBox,
- new GridBagConstraints(0, 0, 3, 1, 1.0, 0.0,
- GridBagConstraints.CENTER, GridBagConstraints.BOTH,
- new Insets(0, 5, 0, 5), 0, 0));
- MainTabbedPane.add(BasicInfoTabPanel, "\8aî\96{\90Ý\92è");
- MainTabbedPane.add(SavingInfoTabPanel, "\95Û\91¶\90Ý\92è");
- MainTabbedPane.add(FFMpegTabPanel, "\93®\89æ\90Ý\92è");
- MainTabbedPane.addTab("\95Ï\8a·\90Ý\92è", null, getConvertingSettingPanel(), null);
- SavingInfoTabPanel.add(getSaveInfoTabPaneEach(), gridBagConstraints35);
- BasicInfoTabPanel.add(UserInfoPanel, gridBagConstraints7);
- BasicInfoTabPanel.add(getProxyInfoPanel(), gridBagConstraints6);
- VhookSettingPanel.add(FontPathLabel, gridBagConstraints59);
- VhookSettingPanel.add(ShowConvVideoCheckBox, gridBagConstraints63);
- VhookSettingPanel.add(FontPathField, gridBagConstraints60);
- VhookSettingPanel.add(FontIndexField, gridBagConstraints62);
- VhookSettingPanel.add(FontIndexLabel, gridBagConstraints61);
- VhookSettingPanel.add(SettingFontPathButton, gridBagConstraints64);
- VhookSettingPanel.add(getFixFontSizeCheckBox(), gridBagConstraints14);
- VhookSettingPanel.add(getOpaqueCommentCheckBox(), gridBagConstraints33);
- VhookSettingPanel.add(getNotUseVhookCheckBox(), gridBagConstraints58);
- VhookSettingPanel.add(getViewCommentField(), gridBagConstraints65);
- VhookSettingPanel.add(ViewCommentLabel, gridBagConstraints66);
- VhookSettingPanel.add(ShadowKindLabel, gridBagConstraints72);
- VhookSettingPanel.add(getShadowComboBox(), gridBagConstraints73);
- CommentSaveInfoPanel.add(CommentNumLabel, gridBagConstraints17);
- CommentSaveInfoPanel.add(SavingCommentCheckBox, gridBagConstraints16);
- ConvertedVideoSavingInfoPanel.add(Conv_SaveFolderRadioButton,
- gridBagConstraints40);
- CommentSaveInfoPanel.add(CommentNumField, gridBagConstraints22);
- CommentSaveInfoPanel.add(Comment_SaveFolderRadioButton,
- gridBagConstraints18);
- CommentSaveInfoPanel.add(Comment_SaveFileRadioButton,
- gridBagConstraints20);
- CommentSaveInfoPanel.add(CommentSavedFolderField, gridBagConstraints19);
- CommentSaveInfoPanel.add(ShowSavingCommentFolderDialogButton,
- gridBagConstraints23);
- CommentSaveInfoPanel.add(CommentSavedFileField, gridBagConstraints21);
- CommentSaveInfoPanel.add(ShowSavingCommentFileDialogButton,
- gridBagConstraints24);
- CommentSaveInfoPanel.add(getDelCommentCheckBox(), gridBagConstraints25);
- CommentSaveInfoPanel.add(getFixCommentNumCheckBox(),
- gridBagConstraints26);
- ConvertedVideoSavingInfoPanel.add(Conv_SaveFileRadioButton,
- gridBagConstraints42);
- ConvertedVideoSavingInfoPanel.add(ConvertedVideoSavedFolderField,
- gridBagConstraints41);
- ConvertedVideoSavingInfoPanel.add(
- ShowSavingConvertedVideoFolderDialogButton,
- gridBagConstraints44);
- ConvertedVideoSavingInfoPanel.add(ConvertedVideoSavedFileField,
- gridBagConstraints43);
- ConvertedVideoSavingInfoPanel.add(
- ShowSavingConvertedVideoFileDialogButton, gridBagConstraints45);
- ConvertedVideoSavingInfoPanel.add(getNotAddVideoID_ConvVideoCheckBox(),
- gridBagConstraints39);
- FFMpegTabPanel.add(PathSettingPanel, new GridBagConstraints(0, 0, 1, 1,
- 1.0, 0.0, GridBagConstraints.NORTHEAST,
- GridBagConstraints.HORIZONTAL, new Insets(0, 5, 0, 5), 0, 0));
- FFMpegTabPanel.add(FFmpegSettingPanel, gridBagConstraints1);
- }
-
- private void setPopup() {
- MainOptionField.addMouseListener(new PopupRightClick(
- this.MainOptionField));
- CommandLineInOptionField.addMouseListener(new PopupRightClick(
- this.CommandLineInOptionField));
- CommandLineOutOptionField.addMouseListener(new PopupRightClick(
- this.CommandLineOutOptionField));
- CommentNumField.addMouseListener(new PopupRightClick(
- this.CommentNumField));
-
- CommentSavedFileField.addMouseListener(new PopupRightClick(
- this.CommentSavedFileField));
- CommentSavedFolderField.addMouseListener(new PopupRightClick(
- this.CommentSavedFolderField));
-
- ConvertedVideoSavedFileField.addMouseListener(new PopupRightClick(
- this.ConvertedVideoSavedFileField));
- ConvertedVideoSavedFolderField.addMouseListener(new PopupRightClick(
- this.ConvertedVideoSavedFolderField));
+ private void setPopup() {
+ MainOptionField.addMouseListener(new PopupRightClick(
+ this.MainOptionField));
+ CommandLineInOptionField.addMouseListener(new PopupRightClick(
+ this.CommandLineInOptionField));
+ CommandLineOutOptionField.addMouseListener(new PopupRightClick(
+ this.CommandLineOutOptionField));
+ savePanel.getCommentNumField().addMouseListener(new PopupRightClick(
+ savePanel.getCommentNumField()));
+
+ savePanel.getCommentSavedFileField().addMouseListener(new PopupRightClick(
+ savePanel.getCommentSavedFileField()));
+ savePanel.getCommentSavedFolderField().addMouseListener(new PopupRightClick(
+ savePanel.getCommentSavedFolderField()));
+
+ savePanel.getConvertedVideoSavedFileField().addMouseListener(new PopupRightClick(
+ savePanel.getConvertedVideoSavedFileField()));
+ savePanel.getConvertedVideoSavedFolderField().addMouseListener(new PopupRightClick(
+ savePanel.getConvertedVideoSavedFolderField()));
videoSaveInfoPanel.getVideoSavedFileField().addMouseListener(new PopupRightClick(
videoSaveInfoPanel.getVideoSavedFileField()));
videoSaveInfoPanel.getNibrFileField().addMouseListener(
new PopupRightClick(videoSaveInfoPanel.getNibrFileField()));
- FFmpegPathField.addMouseListener(new PopupRightClick(
- this.FFmpegPathField));
- VhookPathField
- .addMouseListener(new PopupRightClick(this.VhookPathField));
- VideoID_TextField.addMouseListener(new PopupRightClick(
- this.VideoID_TextField));
- ViewCommentField.addMouseListener(new PopupRightClick(
- this.ViewCommentField));
- FontPathField.addMouseListener(new PopupRightClick(this.FontPathField));
- MailAddrField.addMouseListener(new PopupRightClick(this.MailAddrField));
- PasswordField.addMouseListener(new PopupRightClick(this.PasswordField));
- WayBackField.addMouseListener(new PopupRightClick(this.WayBackField));
-
- ProxyTextField
- .addMouseListener(new PopupRightClick(this.ProxyTextField));
- ProxyPortTextField.addMouseListener(new PopupRightClick(
- this.ProxyPortTextField));
-
- FontIndexField
- .addMouseListener(new PopupRightClick(this.FontIndexField));
-
- NGWordTextField.addMouseListener(new PopupRightClick(
- this.NGWordTextField));
- NGIDTextField.addMouseListener(new PopupRightClick(this.NGIDTextField));
- }
-
- private void setDropTarget() {
- addTarget(videoSaveInfoPanel.getVideoSavedFileField(), false);
+ FFmpegPathField.addMouseListener(new PopupRightClick(
+ this.FFmpegPathField));
+ VhookPathField.addMouseListener(new PopupRightClick(this.VhookPathField));
+ VideoID_TextField.addMouseListener(new PopupRightClick(
+ this.VideoID_TextField));
+ ViewCommentField.addMouseListener(new PopupRightClick(
+ this.ViewCommentField));
+ FontPathField.addMouseListener(new PopupRightClick(this.FontPathField));
+ MailAddrField.addMouseListener(new PopupRightClick(this.MailAddrField));
+ PasswordField.addMouseListener(new PopupRightClick(this.PasswordField));
+ WayBackField.addMouseListener(new PopupRightClick(this.WayBackField));
+
+ ProxyTextField.addMouseListener(new PopupRightClick(this.ProxyTextField));
+ ProxyPortTextField.addMouseListener(new PopupRightClick(
+ this.ProxyPortTextField));
+
+ FontIndexField.addMouseListener(new PopupRightClick(this.FontIndexField));
+
+ NGWordTextField.addMouseListener(new PopupRightClick(
+ this.NGWordTextField));
+ NGIDTextField.addMouseListener(new PopupRightClick(this.NGIDTextField));
+ }
+
+ private void setDropTarget() {
+ addTarget(videoSaveInfoPanel.getVideoSavedFileField(), false);
addTarget(videoSaveInfoPanel.getVideoSavedFolderField(), true);
addTarget(videoSaveInfoPanel.getNibrFileField(), false);
- addTarget(CommentSavedFileField, false);
- addTarget(CommentSavedFolderField, true);
+ addTarget(savePanel.getCommentSavedFileField(), false);
+ addTarget(savePanel.getCommentSavedFolderField(), true);
- addTarget(ConvertedVideoSavedFileField, false);
- addTarget(ConvertedVideoSavedFolderField, true);
+ addTarget(savePanel.getConvertedVideoSavedFileField(), false);
+ addTarget(savePanel.getConvertedVideoSavedFolderField(), true);
- addTarget(FFmpegPathField, false);
- addTarget(VhookPathField, false);
- addTarget(FontPathField, false);
+ addTarget(FFmpegPathField, false);
+ addTarget(VhookPathField, false);
+ addTarget(FontPathField, false);
- }
+ }
/**
* \83e\83L\83X\83g\83t\83B\81[\83\8b\83h\82É\91Î\82µ\83h\83\8d\83b\83v\82ð\8ds\82Á\82½\8fê\8d\87\82É\83t\83@\83C\83\8b\82à\82µ\82\82Í\83f\83B\83\8c\83N\83g\83\8a\82Ì\95¶\8e\9a\97ñ\82ð\90Ý\92è\82Å\82«\82é\82æ\82¤\82É\82·\82é.
* @param isDir \83f\83B\83\8c\83N\83g\83\8a\82ð\90Ý\92è\82·\82é\8fê\8d\87\82Ítrue, \83t\83@\83C\83\8b\82Ì\8fê\8d\87\82Ífalse.
* @return \83h\83\8d\83b\83v\83^\81[\83Q\83b\83g(\97p\93r\96³\82µ).
*/
- private DropTarget addTarget(JTextField c, boolean isDir) {
- return new DropTarget(c, DnDConstants.ACTION_COPY, new FileDropTarget(
- c, isDir), true);
- }
-
- private File CurrentDir = new File(".");
-
- JPanel PathSettingPanel = new JPanel();
-
- JLabel FFmpegPathLabel = new JLabel();
-
- GridBagLayout gridBagLayout7 = new GridBagLayout();
-
- JTextField FFmpegPathField = new JTextField();
-
- JButton SettingFFmpegPathButton = new JButton();
-
- JLabel VhookPathLabel = new JLabel();
-
- JTextField VhookPathField = new JTextField();
-
- JButton SettingVhookPathButton = new JButton();
-
- JPanel VhookSettingPanel = new JPanel();
-
- GridBagLayout gridBagLayout8 = new GridBagLayout();
-
- JPanel FFmpegSettingPanel = new JPanel();
-
- GridBagLayout gridBagLayout9 = new GridBagLayout();
-
- JLabel FontPathLabel = new JLabel();
-
- JTextField FontPathField = new JTextField();
-
- JButton SettingFontPathButton = new JButton();
-
- JCheckBox ShowConvVideoCheckBox = new JCheckBox();
-
- JTextField CommandLineOutOptionField = new JTextField();
-
- private void showSaveDialog(String title, JTextField field, boolean isSave,
- boolean isDir) {
- JFileChooser chooser = new JFileChooser(CurrentDir);
- chooser.setDialogTitle(title);
- int code = 0;
- if (isDir) {
- chooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
- }
- if (isSave) {
- code = chooser.showSaveDialog(this);
- } else {
- code = chooser.showOpenDialog(this);
- }
- if (code == JFileChooser.APPROVE_OPTION) {
- if (isDir) {
- CurrentDir = chooser.getCurrentDirectory();
- field.setText(CurrentDir.getAbsolutePath());
- } else {
- File selected = chooser.getSelectedFile();
- CurrentDir = chooser.getCurrentDirectory();
- field.setText(selected.getAbsolutePath());
- }
- }
- }
+ private DropTarget addTarget(JTextField c, boolean isDir) {
+ return new DropTarget(c, DnDConstants.ACTION_COPY, new FileDropTarget(
+ c, isDir), true);
+ }
+ private File CurrentDir = new File(".");
+ JPanel PathSettingPanel = new JPanel();
+ JLabel FFmpegPathLabel = new JLabel();
+ GridBagLayout gridBagLayout7 = new GridBagLayout();
+ JTextField FFmpegPathField = new JTextField();
+ JButton SettingFFmpegPathButton = new JButton();
+ JLabel VhookPathLabel = new JLabel();
+ JTextField VhookPathField = new JTextField();
+ JButton SettingVhookPathButton = new JButton();
+ JPanel VhookSettingPanel = new JPanel();
+ GridBagLayout gridBagLayout8 = new GridBagLayout();
+ JPanel FFmpegSettingPanel = new JPanel();
+ GridBagLayout gridBagLayout9 = new GridBagLayout();
+ JLabel FontPathLabel = new JLabel();
+ JTextField FontPathField = new JTextField();
+ JButton SettingFontPathButton = new JButton();
+ JCheckBox ShowConvVideoCheckBox = new JCheckBox();
+ JTextField CommandLineOutOptionField = new JTextField();
+
+ private void showSaveDialog(String title, JTextField field, boolean isSave,
+ boolean isDir) {
+ JFileChooser chooser = new JFileChooser(CurrentDir);
+ chooser.setDialogTitle(title);
+ int code = 0;
+ if (isDir) {
+ chooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
+ }
+ if (isSave) {
+ code = chooser.showSaveDialog(this);
+ } else {
+ code = chooser.showOpenDialog(this);
+ }
+ if (code == JFileChooser.APPROVE_OPTION) {
+ if (isDir) {
+ CurrentDir = chooser.getCurrentDirectory();
+ field.setText(CurrentDir.getAbsolutePath());
+ } else {
+ File selected = chooser.getSelectedFile();
+ CurrentDir = chooser.getCurrentDirectory();
+ field.setText(selected.getAbsolutePath());
+ }
+ }
+ }
- private ConvertingSetting getSetting() {
- int back_comment;
- try {
- back_comment = Integer.parseInt(CommentNumField.getText());
- } catch (NumberFormatException ex) {
- back_comment = 500;
- }
- int proxy_port;
- try {
- proxy_port = Integer.parseInt(ProxyPortTextField.getText());
- } catch (NumberFormatException e) {
- proxy_port = -1;
- }
+ private ConvertingSetting getSetting() {
+ int back_comment;
+ try {
+ back_comment = Integer.parseInt(savePanel.getCommentNumField().getText());
+ } catch (NumberFormatException ex) {
+ back_comment = 500;
+ }
+ int proxy_port;
+ try {
+ proxy_port = Integer.parseInt(ProxyPortTextField.getText());
+ } catch (NumberFormatException e) {
+ proxy_port = -1;
+ }
VideoSaveKind kind;
String savedFileName;
savedFileName = videoSaveInfoPanel.getVideoSavedFileField().getText();
}
- ConvertingSetting setting = new ConvertingSetting(MailAddrField
- .getText(), new String(PasswordField.getPassword()),
+ final ConvertingSetting.TcommentSetting tcommentSetting = getTcommentSetting();
+
+ ConvertingSetting setting = new ConvertingSetting(
+ MailAddrField.getText(),
+ new String(PasswordField.getPassword()),
kind,
- savedFileName, SavingCommentCheckBox
- .isSelected(), CommentSavedFileField.getText(),
- SavingConvertedVideoCheckBox.isSelected(),
- ConvertedVideoSavedFileField.getText(), ViewCommentField
- .getText(), FFmpegPathField.getText(), VhookPathField
- .getText(), ExtOptionField.getText(), MainOptionField
- .getText(), CommandLineInOptionField.getText(),
- CommandLineOutOptionField.getText(), Integer
- .toString(back_comment), FontPathField.getText(),
- Integer.parseInt(FontIndexField.getText()),
- ShowConvVideoCheckBox.isSelected(), videoSaveInfoPanel.getDelVideoCheckBox()
- .isSelected(),
+ savedFileName,
+ savePanel.getSavingCommentCheckBox().isSelected(),
+ savePanel.getCommentSavedFileField().getText(),
+ savePanel.getSavingConvertedVideoCheckBox().isSelected(),
+ savePanel.getAddCommentCheckBox().isSelected(),
+ savePanel.getAddTcommentCheckBox().isSelected(),
+ savePanel.getConvertedVideoSavedFileField().getText(),
+ ViewCommentField.getText(),
+ FFmpegPathField.getText(),
+ VhookPathField.getText(),
+ ExtOptionField.getText(),
+ MainOptionField.getText(),
+ CommandLineInOptionField.getText(),
+ CommandLineOutOptionField.getText(),
+ Integer.toString(back_comment),
+ FontPathField.getText(),
+ Integer.parseInt(FontIndexField.getText()),
+ ShowConvVideoCheckBox.isSelected(),
+ videoSaveInfoPanel.getDelVideoCheckBox().isSelected(),
videoSaveInfoPanel.getSaveFolderRadioButton().isSelected(),
videoSaveInfoPanel.getVideoSavedFolderField().getText(),
- DelCommentCheckBox.isSelected(),
- Comment_SaveFolderRadioButton.isSelected(),
- CommentSavedFolderField.getText(),
- NotAddVideoID_ConvVideoCheckBox.isSelected(),
- Conv_SaveFolderRadioButton.isSelected(),
- ConvertedVideoSavedFolderField.getText(), NGWordTextField
- .getText(), NGIDTextField.getText(), UseProxyCheckBox
- .isSelected(), ProxyTextField.getText(), proxy_port,
- FixFontSizeCheckBox.isSelected(), FixCommentNumCheckBox
- .isSelected(), OpaqueCommentCheckBox.isSelected(),
- FFmpegOptionModel.getSelectedFile(), NotUseVhookCheckBox
- .isSelected(),ShadowComboBox.getSelectedIndex());
- return setting;
- }
-
- private void setSetting(ConvertingSetting setting) {
+ savePanel.getDelCommentCheckBox().isSelected(),
+ savePanel.getCommentSaveFolderRadioButton().isSelected(),
+ savePanel.getCommentSavedFolderField().getText(),
+ tcommentSetting,
+ savePanel.getNotAddVideoIdConvVideoCheckBox().isSelected(),
+ savePanel.getConvSaveFolderRadioButton().isSelected(),
+ savePanel.getConvertedVideoSavedFolderField().getText(),
+ NGWordTextField.getText(),
+ NGIDTextField.getText(),
+ UseProxyCheckBox.isSelected(),
+ ProxyTextField.getText(),
+ proxy_port,
+ FixFontSizeCheckBox.isSelected(),
+ savePanel.getFixCommentNumCheckBox().isSelected(),
+ OpaqueCommentCheckBox.isSelected(),
+ FFmpegOptionModel.getSelectedFile(),
+ NotUseVhookCheckBox.isSelected(),
+ ShadowComboBox.getSelectedIndex());
+ return setting;
+ }
+
+ /**
+ * \90Ý\92è\82ð\89æ\96Ê\82É\94½\89f\82·\82é.
+ * @param setting \94½\89f\82·\82é\90Ý\92è.
+ */
+ private void setSetting(ConvertingSetting setting) {
MailAddrField.setText(setting.getMailAddress());
PasswordField.setText(setting.getPassword());
videoSaveInfoPanel.getVideoSavedFileField().setText(setting.getVideoFile().getPath());
- SavingCommentCheckBox.setSelected(setting.isSaveComment());
- CommentSavedFileField.setText(setting.getCommentFile().getPath());
- SavingConvertedVideoCheckBox.setSelected(setting.isSaveConverted());
- ConvertedVideoSavedFileField.setText(setting.getConvertedVideoFile()
- .getPath());
- ViewCommentField.setText(setting.getVideoShowNum());
- FFmpegPathField.setText(setting.getFFmpegPath());
- VhookPathField.setText(setting.getVhookPath());
- ExtOptionField.setText(setting.getCmdLineOptionExt());
- MainOptionField.setText(setting.getCmdLineOptionMain());
- CommandLineOutOptionField.setText(setting.getCmdLineOptionOut());
- CommandLineInOptionField.setText(setting.getCmdLineOptionIn());
- CommentNumField.setText(setting.getBackComment());
- FontPathField.setText(setting.getFontPath());
- FontIndexField.setText(setting.getFontIndex());
- ShowConvVideoCheckBox
- .setSelected(setting.isVhook_ShowConvertingVideo());
- videoSaveInfoPanel.getVideoSavedFolderField().setText(setting.getVideoFixFileNameFolder()
- .getPath());
- CommentSavedFolderField.setText(setting.getCommentFixFileNameFolder()
- .getPath());
- ConvertedVideoSavedFolderField.setText(setting
- .getConvFixFileNameFolder().getPath());
+ savePanel.getSavingCommentCheckBox().setSelected(setting.isSaveComment());
+ savePanel.getCommentSavedFileField().setText(setting.getCommentFile().getPath());
+ savePanel.getSavingConvertedVideoCheckBox().setSelected(setting.isSaveConverted());
+ savePanel.getAddCommentCheckBox().setSelected(setting.getAddComment());
+ savePanel.getAddTcommentCheckBox().setSelected(setting.getAddTcomment());
+ savePanel.getConvertedVideoSavedFileField().setText(setting.getConvertedVideoFile().getPath());
+ ViewCommentField.setText(setting.getVideoShowNum());
+ FFmpegPathField.setText(setting.getFFmpegPath());
+ VhookPathField.setText(setting.getVhookPath());
+ ExtOptionField.setText(setting.getCmdLineOptionExt());
+ MainOptionField.setText(setting.getCmdLineOptionMain());
+ CommandLineOutOptionField.setText(setting.getCmdLineOptionOut());
+ CommandLineInOptionField.setText(setting.getCmdLineOptionIn());
+ savePanel.getCommentNumField().setText(setting.getBackComment());
+ FontPathField.setText(setting.getFontPath());
+ FontIndexField.setText(setting.getFontIndex());
+ ShowConvVideoCheckBox.setSelected(setting.isVhook_ShowConvertingVideo());
+ videoSaveInfoPanel.getVideoSavedFolderField().setText(setting.getVideoFixFileNameFolder().getPath());
+ savePanel.getCommentSavedFolderField().setText(setting.getCommentFixFileNameFolder().getPath());
+ savePanel.getConvertedVideoSavedFolderField().setText(setting.getConvFixFileNameFolder().getPath());
videoSaveInfoPanel.getDelVideoCheckBox().setSelected(setting.isDeleteVideoAfterConverting());
- DelCommentCheckBox
- .setSelected(setting.isDeleteCommentAfterConverting());
- NotAddVideoID_ConvVideoCheckBox.setSelected(setting
- .isNotAddVideoID_Conv());
+ savePanel.getDelCommentCheckBox().setSelected(setting.isDeleteCommentAfterConverting());
+ savePanel.getNotAddVideoIdConvVideoCheckBox().setSelected(setting.isNotAddVideoID_Conv());
boolean videoFixName = setting.isVideoFixFileName();
videoSaveInfoPanel.getSaveFileRadioButton().setSelected(!videoFixName);
videoSaveInfoPanel.getSaveFolderRadioButton().setSelected(videoFixName);
- if (setting.isCommentFixFileName()) {
- Comment_SaveFileRadioButton.setSelected(false);
- Comment_SaveFolderRadioButton.setSelected(true);
- } else {
- Comment_SaveFileRadioButton.setSelected(true);
- Comment_SaveFolderRadioButton.setSelected(false);
- }
- if (setting.isConvFixFileName()) {
- Conv_SaveFileRadioButton.setSelected(false);
- Conv_SaveFolderRadioButton.setSelected(true);
- } else {
- Conv_SaveFileRadioButton.setSelected(true);
- Conv_SaveFolderRadioButton.setSelected(false);
- }
- NGWordTextField.setText(setting.getNG_Word());
- NGIDTextField.setText(setting.getNG_ID());
- // \83v\83\8d\83L\83V\8aÖ\98A
- UseProxyCheckBox.setSelected(setting.useProxy());
- ProxyTextField.setText(setting.getProxy());
- int proxy_port = setting.getProxyPort();
- if (proxy_port >= 0 && proxy_port <= 65535) {
- ProxyPortTextField.setText(Integer.toString(proxy_port));
- } else {
- ProxyPortTextField.setText("");
- }
- FixFontSizeCheckBox.setSelected(setting.isFixFontSize());
- FixCommentNumCheckBox.setSelected(setting.isFixCommentNum());
- OpaqueCommentCheckBox.setSelected(setting.isOpaqueComment());
- FFmpegOptionModel.reload(setting.getOptionFile());
- NotUseVhookCheckBox.setSelected(setting.isVhookDisabled());
- ShadowComboBox.setSelectedIndex(setting.getShadowIndex());
- }
-
- /**
- * [\83t\83@\83C\83\8b|\8fI\97¹] \83A\83N\83V\83\87\83\93\82ª\8eÀ\8ds\82³\82ê\82Ü\82µ\82½\81B
- *
- * @param actionEvent
- * ActionEvent
- */
- void jMenuFileExit_actionPerformed(ActionEvent actionEvent) {
- ConvertingSetting setting = this.getSetting();
- ConvertingSetting.saveSetting(setting);
- System.exit(0);
- }
-
- /**
- * [\83w\83\8b\83v|\83o\81[\83W\83\87\83\93\8fî\95ñ] \83A\83N\83V\83\87\83\93\82ª\8eÀ\8ds\82³\82ê\82Ü\82µ\82½\81B
- *
- * @param actionEvent
- * ActionEvent
- */
- void jMenuHelpAbout_actionPerformed(ActionEvent actionEvent) {
- MainFrame_AboutBox dlg = new MainFrame_AboutBox(this);
- dlg.pack();
- dlg.setLocationRelativeTo(this);
- dlg.setVisible(true);
- }
-
- /* \95Ï\8a·\81E\95Û\91¶\82·\82é */
- Converter Converter = null;
-
- JTextField CommandLineInOptionField = new JTextField();
-
- JLabel InLabel = new JLabel();
-
- JLabel OutLabel = new JLabel();
-
- JLabel CommentNumLabel = new JLabel();
-
- JTextField CommentNumField = new JTextField();
-
- JLabel MainOptionLabel = new JLabel();
-
- JTextField MainOptionField = new JTextField();
-
- JLabel FontIndexLabel = new JLabel();
-
- JTextField FontIndexField = new JTextField();
-
- JLabel VideoID_Label = new JLabel();
-
- JLabel WayBackLabel = new JLabel();
-
- JTextField WayBackField = new JTextField();
-
- GridBagLayout gridBagLayout10 = new GridBagLayout();
-
- GridBagLayout gridBagLayout11 = new GridBagLayout();
-
- GridBagLayout gridBagLayout1 = new GridBagLayout();
-
- JPanel OpPanel = new JPanel();
-
- GridLayout gridLayout1 = new GridLayout();
-
- JRadioButton Conv_SaveFileRadioButton = new JRadioButton();
-
- JRadioButton Conv_SaveFolderRadioButton = new JRadioButton();
-
- JTextField ConvertedVideoSavedFolderField = new JTextField();
-
- JButton ShowSavingConvertedVideoFolderDialogButton = new JButton();
-
- JRadioButton Comment_SaveFileRadioButton = new JRadioButton();
-
- JTextField CommentSavedFolderField = new JTextField();
-
- JButton ShowSavingCommentFolderDialogButton = new JButton();
-
- JRadioButton Comment_SaveFolderRadioButton = new JRadioButton();
+ boolean commentFixName = setting.isCommentFixFileName();
+ savePanel.getCommentSaveFileRadioButton().setSelected(!commentFixName);
+ savePanel.getCommentSaveFolderRadioButton().setSelected(commentFixName);
+
+ boolean convFixName = setting.isConvFixFileName();
+ savePanel.getConvSaveFileRadioButton().setSelected(!convFixName);
+ savePanel.getConvSaveFolderRadioButton().setSelected(convFixName);
+
+ NGWordTextField.setText(setting.getNG_Word());
+ NGIDTextField.setText(setting.getNG_ID());
+ // \83v\83\8d\83L\83V\8aÖ\98A
+ UseProxyCheckBox.setSelected(setting.useProxy());
+ ProxyTextField.setText(setting.getProxy());
+ int proxy_port = setting.getProxyPort();
+ if (proxy_port >= 0 && proxy_port <= 65535) {
+ ProxyPortTextField.setText(Integer.toString(proxy_port));
+ } else {
+ ProxyPortTextField.setText("");
+ }
+ FixFontSizeCheckBox.setSelected(setting.isFixFontSize());
+ savePanel.getFixCommentNumCheckBox().setSelected(setting.isFixCommentNum());
+ OpaqueCommentCheckBox.setSelected(setting.isOpaqueComment());
+ FFmpegOptionModel.reload(setting.getOptionFile());
+ NotUseVhookCheckBox.setSelected(setting.isVhookDisabled());
+ ShadowComboBox.setSelectedIndex(setting.getShadowIndex());
+
+ // \93\8a\8de\8eÒ\83R\83\81\83\93\83g
+ TcommentSetting tcom = setting.getTcommentSetting();
+ savePanel.setTcommentDownload(tcom.isDownload());
+ savePanel.setTcommentDelete(tcom.isDelete());
+ savePanel.setTcommentAutoFileName(tcom.isAutoFileName());
+ savePanel.setTcommentDirectoryName(tcom.getInputDirectory());
+ savePanel.setTcommentFileName(tcom.getInputFile());
+ }
- JPanel BasicInfoTabPanel = new JPanel();
+ /**
+ * [\83t\83@\83C\83\8b|\8fI\97¹] \83A\83N\83V\83\87\83\93\82ª\8eÀ\8ds\82³\82ê\82Ü\82µ\82½\81B
+ *
+ * @param actionEvent
+ * ActionEvent
+ */
+ void jMenuFileExit_actionPerformed(ActionEvent actionEvent) {
+ ConvertingSetting setting = this.getSetting();
+ ConvertingSetting.saveSetting(setting);
+ System.exit(0);
+ }
- GridBagLayout gridBagLayout12 = new GridBagLayout();
+ /**
+ * [\83w\83\8b\83v|\83o\81[\83W\83\87\83\93\8fî\95ñ] \83A\83N\83V\83\87\83\93\82ª\8eÀ\8ds\82³\82ê\82Ü\82µ\82½\81B
+ *
+ * @param actionEvent
+ * ActionEvent
+ */
+ void jMenuHelpAbout_actionPerformed(ActionEvent actionEvent) {
+ MainFrame_AboutBox dlg = new MainFrame_AboutBox(this);
+ dlg.pack();
+ dlg.setLocationRelativeTo(this);
+ dlg.setVisible(true);
+ }
- private JPanel ConvertingSettingPanel = null;
+ /* \95Ï\8a·\81E\95Û\91¶\82·\82é */
+ Converter Converter = null;
+ JTextField CommandLineInOptionField = new JTextField();
+ JLabel InLabel = new JLabel();
+ JLabel OutLabel = new JLabel();
+ JLabel MainOptionLabel = new JLabel();
+ JTextField MainOptionField = new JTextField();
+ JLabel FontIndexLabel = new JLabel();
+ JTextField FontIndexField = new JTextField();
+ JLabel VideoID_Label = new JLabel();
+ JLabel WayBackLabel = new JLabel();
+ JTextField WayBackField = new JTextField();
+ GridBagLayout gridBagLayout10 = new GridBagLayout();
+ GridBagLayout gridBagLayout11 = new GridBagLayout();
+ GridBagLayout gridBagLayout1 = new GridBagLayout();
+ JPanel OpPanel = new JPanel();
+ GridLayout gridLayout1 = new GridLayout();
+ JPanel BasicInfoTabPanel = new JPanel();
+ GridBagLayout gridBagLayout12 = new GridBagLayout();
+ private JPanel ConvertingSettingPanel = null;
+ private JPanel NGWordSettingPanel = null;
+ private JLabel NGWordLavel = null;
+ private JTextField NGWordTextField = null;
+ private JLabel NGIDLabel = null;
+ private JTextField NGIDTextField = null;
+ private JPanel ProxyInfoPanel = null;
+ private JLabel ProxyLabel = null;
+ private JTextField ProxyTextField = null;
+ private JLabel ProxyPortLabel = null;
+ private JTextField ProxyPortTextField = null;
+ private JCheckBox UseProxyCheckBox = null;
+ private JCheckBox FixFontSizeCheckBox = null;
+ private JCheckBox OpaqueCommentCheckBox = null;
+ private final SavePanel savePanel = new SavePanel();
+ private final VideoSaveInfoPanel videoSaveInfoPanel;
+ private JComboBox FFmpegOptionComboBox = null;
+ private JButton FFmpegOptionReloadButton = null;
+ private JPanel FFmpegOptionComboBoxPanel = null;
+
+ public void DoButton_actionPerformed(ActionEvent e) {
+ if (Converter == null || Converter.isConverted()) {
+ String url;
- private JPanel NGWordSettingPanel = null;
+ // NicoBrowser\83t\83@\83C\83\8b\82ð\97\98\97p\82·\82é\8fê\8d\87\82Í\81A\83t\83@\83C\83\8b\96¼\82©\82ç\83r\83f\83IID\82ð\93Á\92è.
+ if (videoSaveInfoPanel.getVideoUseNiBrButton().isSelected()) {
+ try {
+ String fileName = videoSaveInfoPanel.getNibrFileField().getText();
+ NicoDBFinder finder = NicoDBFinder.getInstance();
+ NicoContent info = finder.findNicoContent(fileName);
+ if (info != null) {
+ url = info.getNicoId();
+ } else {
+ url = "";
+ }
+ } catch (Exception ex) {
+ JOptionPane.showMessageDialog(this, ex.getMessage(), "\83G\83\89\81[", JOptionPane.ERROR_MESSAGE);
+ return;
+ }
+ } else {
+ url = VideoID_TextField.getText();
+ }
- private JLabel NGWordLavel = null;
+ TextProgressListener sl = new TextProgressListener() {
- private JTextField NGWordTextField = null;
+ public void setText(final String text) {
+ SwingUtilities.invokeLater(new Runnable() {
- private JLabel NGIDLabel = null;
+ public void run() {
+ statusBar.setText(text);
+ }
+ });
+ }
+ };
+
+ ConvertStopFlag.StateChangeListener scl = new ConvertStopFlag.StateChangeListener() {
+
+ public void changeState(final State s) {
+ SwingUtilities.invokeLater(new Runnable() {
+
+ public void run() {
+ switch (s) {
+ case PROCESSING:
+ DoButton.setText(DoButtonStopString);
+ break;
+ case STOPPING:
+ DoButton.setText(DoButtonWaitString);
+ break;
+ case FINISHED:
+ DoButton.setText(DoButtonDefString);
+ }
+ }
+ });
+ }
+ };
+
+ Converter = new Converter(url, WayBackField.getText(), this.getSetting(), sl, new ConvertStopFlag(scl));
+// new ConvertStopFlag(this.DoButton, DoButtonStopString,
+// DoButtonWaitString, DoButtonDefString));
+ Converter.start();
+ } else { /* \8aJ\8en\82µ\82Ä\82¢\82é\82Ì\82Å\81A\83X\83g\83b\83v\82·\82é\81B */
+ final ConvertStopFlag flag = Converter.getStopFlag();
+ if (!flag.needStop()) { /* \82Ü\82¾\83X\83g\83b\83v\82µ\82Ä\82¢\82È\82¢\81B */
+ flag.requestStop();
+ }
+ }
+ }
- private JTextField NGIDTextField = null;
+ /* FFmpeg\82Ö\82Ì\83p\83X */
+ public void SettingFFmpegPathButton_actionPerformed(ActionEvent e) {
+ showSaveDialog("FFmpeg\82Ö\82Ì\83p\83X", FFmpegPathField, false, false);
+ }
- private JPanel ProxyInfoPanel = null;
+ public void SettingVhookPathButton_actionPerformed(ActionEvent e) {
+ showSaveDialog("\8ag\92£vhook\83\89\83C\83u\83\89\83\8a\82Ö\82Ì\83p\83X", VhookPathField, false, false);
+ }
- private JLabel ProxyLabel = null;
+ public void SettingFontPathButton_actionPerformed(ActionEvent e) {
+ showSaveDialog("\83t\83H\83\93\83g\82Ö\82Ì\83p\83X", FontPathField, false, false);
+ }
- private JTextField ProxyTextField = null;
+ public void this_windowClosing(WindowEvent e) {
+ this.jMenuFileExit_actionPerformed(null);
+ }
- private JLabel ProxyPortLabel = null;
+ /**
+ * This method initializes ConvertingSettingPanel
+ *
+ * @return javax.swing.JPanel
+ */
+ private JPanel getConvertingSettingPanel() {
+ if (ConvertingSettingPanel == null) {
+ GridBagConstraints gridBagConstraints11 = new GridBagConstraints();
+ gridBagConstraints11.weighty = 1.0;
+ gridBagConstraints11.weightx = 1.0;
+ gridBagConstraints11.insets = new Insets(0, 5, 0, 5);
+ gridBagConstraints11.gridy = 1;
+ gridBagConstraints11.gridx = 0;
+ gridBagConstraints11.anchor = GridBagConstraints.NORTH;
+ gridBagConstraints11.fill = GridBagConstraints.HORIZONTAL;
+ GridBagConstraints gridBagConstraints = new GridBagConstraints(0,
+ 2, 1, 1, 1.0, 1.0, GridBagConstraints.NORTH,
+ GridBagConstraints.HORIZONTAL, new Insets(0, 5, 0, 5), 0, 0);
+ gridBagConstraints.gridx = 0;
+ gridBagConstraints.anchor = GridBagConstraints.CENTER;
+ gridBagConstraints.weighty = 0.0;
+ gridBagConstraints.gridy = 0;
+ ConvertingSettingPanel = new JPanel();
+ ConvertingSettingPanel.setLayout(new GridBagLayout());
+ ConvertingSettingPanel.add(getNGWordSettingPanel(),
+ gridBagConstraints11);
+ ConvertingSettingPanel.add(VhookSettingPanel, gridBagConstraints);
+ }
+ return ConvertingSettingPanel;
+ }
- private JTextField ProxyPortTextField = null;
+ /**
+ * This method initializes NGWordSettingPanel
+ *
+ * @return javax.swing.JPanel
+ */
+ private JPanel getNGWordSettingPanel() {
+ if (NGWordSettingPanel == null) {
+ GridBagConstraints gridBagConstraints5 = new GridBagConstraints();
+ gridBagConstraints5.fill = GridBagConstraints.HORIZONTAL;
+ gridBagConstraints5.gridy = 1;
+ gridBagConstraints5.weightx = 1.0;
+ gridBagConstraints5.insets = new Insets(0, 5, 5, 5);
+ gridBagConstraints5.gridx = 1;
+ GridBagConstraints gridBagConstraints4 = new GridBagConstraints();
+ gridBagConstraints4.gridx = 0;
+ gridBagConstraints4.anchor = GridBagConstraints.WEST;
+ gridBagConstraints4.insets = new Insets(0, 5, 5, 0);
+ gridBagConstraints4.gridy = 1;
+ NGIDLabel = new JLabel();
+ NGIDLabel.setText("NG ID");
+ GridBagConstraints gridBagConstraints3 = new GridBagConstraints();
+ gridBagConstraints3.fill = GridBagConstraints.HORIZONTAL;
+ gridBagConstraints3.gridy = 0;
+ gridBagConstraints3.weightx = 1.0;
+ gridBagConstraints3.insets = new Insets(0, 5, 5, 5);
+ gridBagConstraints3.gridx = 1;
+ GridBagConstraints gridBagConstraints2 = new GridBagConstraints();
+ gridBagConstraints2.gridx = 0;
+ gridBagConstraints2.insets = new Insets(0, 5, 5, 0);
+ gridBagConstraints2.gridy = 0;
+ NGWordLavel = new JLabel();
+ NGWordLavel.setText("NG\83\8f\81[\83h");
+ NGWordSettingPanel = new JPanel();
+ NGWordSettingPanel.setLayout(new GridBagLayout());
+ NGWordSettingPanel.setBorder(BorderFactory.createTitledBorder(null,
+ "NG\83\8f\81[\83h\81EID\90Ý\92è"));
+ NGWordSettingPanel.add(NGWordLavel, gridBagConstraints2);
+ NGWordSettingPanel.add(getNGWordTextField(), gridBagConstraints3);
+ NGWordSettingPanel.add(NGIDLabel, gridBagConstraints4);
+ NGWordSettingPanel.add(getNGIDTextField(), gridBagConstraints5);
+ }
+ return NGWordSettingPanel;
+ }
- private JCheckBox UseProxyCheckBox = null;
+ /**
+ * This method initializes NGWordTextField
+ *
+ * @return javax.swing.JTextField
+ */
+ private JTextField getNGWordTextField() {
+ if (NGWordTextField == null) {
+ NGWordTextField = new JTextField();
+ }
+ return NGWordTextField;
+ }
- private JCheckBox FixFontSizeCheckBox = null;
+ /**
+ * This method initializes NGIDTextField
+ *
+ * @return javax.swing.JTextField
+ */
+ private JTextField getNGIDTextField() {
+ if (NGIDTextField == null) {
+ NGIDTextField = new JTextField();
+ }
+ return NGIDTextField;
+ }
- private JCheckBox DelCommentCheckBox = null;
+ /**
+ * This method initializes ProxyInfoPanel
+ *
+ * @return javax.swing.JPanel
+ */
+ private JPanel getProxyInfoPanel() {
+ if (ProxyInfoPanel == null) {
+ GridBagConstraints gridBagConstraints13 = new GridBagConstraints();
+ gridBagConstraints13.gridx = 0;
+ gridBagConstraints13.gridwidth = 2;
+ gridBagConstraints13.weightx = 1.0;
+ gridBagConstraints13.fill = GridBagConstraints.HORIZONTAL;
+ gridBagConstraints13.insets = new Insets(0, 5, 0, 5);
+ gridBagConstraints13.gridy = 0;
+ GridBagConstraints gridBagConstraints12 = new GridBagConstraints();
+ gridBagConstraints12.fill = GridBagConstraints.HORIZONTAL;
+ gridBagConstraints12.gridy = 2;
+ gridBagConstraints12.weightx = 1.0;
+ gridBagConstraints12.insets = new Insets(5, 0, 5, 5);
+ gridBagConstraints12.gridx = 1;
+ GridBagConstraints gridBagConstraints10 = new GridBagConstraints();
+ gridBagConstraints10.gridx = 0;
+ gridBagConstraints10.insets = new Insets(5, 5, 5, 5);
+ gridBagConstraints10.gridy = 2;
+ ProxyPortLabel = new JLabel();
+ ProxyPortLabel.setText("\83|\81[\83g\94Ô\8d\86");
+ GridBagConstraints gridBagConstraints9 = new GridBagConstraints();
+ gridBagConstraints9.fill = GridBagConstraints.BOTH;
+ gridBagConstraints9.gridy = 1;
+ gridBagConstraints9.weightx = 1.0;
+ gridBagConstraints9.insets = new Insets(0, 0, 0, 5);
+ gridBagConstraints9.gridx = 1;
+ GridBagConstraints gridBagConstraints8 = new GridBagConstraints();
+ gridBagConstraints8.gridx = 0;
+ gridBagConstraints8.insets = new Insets(0, 5, 0, 5);
+ gridBagConstraints8.fill = GridBagConstraints.NONE;
+ gridBagConstraints8.anchor = GridBagConstraints.EAST;
+ gridBagConstraints8.gridy = 1;
+ ProxyLabel = new JLabel();
+ ProxyLabel.setText("\83v\83\8d\83L\83V");
+ ProxyInfoPanel = new JPanel();
+ ProxyInfoPanel.setLayout(new GridBagLayout());
+ ProxyInfoPanel.setBorder(BorderFactory.createTitledBorder(null,
+ "\83v\83\8d\83L\83V\90Ý\92è"));
+ ProxyInfoPanel.add(ProxyLabel, gridBagConstraints8);
+ ProxyInfoPanel.add(getProxyTextField(), gridBagConstraints9);
+ ProxyInfoPanel.add(ProxyPortLabel, gridBagConstraints10);
+ ProxyInfoPanel.add(getProxyPortTextField(), gridBagConstraints12);
+ ProxyInfoPanel.add(getUseProxyCheckBox(), gridBagConstraints13);
+ }
+ return ProxyInfoPanel;
+ }
- private JCheckBox FixCommentNumCheckBox = null;
+ /**
+ * This method initializes ProxyTextField
+ *
+ * @return javax.swing.JTextField
+ */
+ private JTextField getProxyTextField() {
+ if (ProxyTextField == null) {
+ ProxyTextField = new JTextField();
+ }
+ return ProxyTextField;
+ }
- private JCheckBox OpaqueCommentCheckBox = null;
+ /**
+ * This method initializes ProxyPortTextField
+ *
+ * @return javax.swing.JTextField
+ */
+ private JTextField getProxyPortTextField() {
+ if (ProxyPortTextField == null) {
+ ProxyPortTextField = new JTextField();
+ }
+ return ProxyPortTextField;
+ }
- private VideoSaveInfoPanel videoSaveInfoPanel = new VideoSaveInfoPanel();
+ /**
+ * This method initializes UseProxyCheckBox
+ *
+ * @return javax.swing.JCheckBox
+ */
+ private JCheckBox getUseProxyCheckBox() {
+ if (UseProxyCheckBox == null) {
+ UseProxyCheckBox = new JCheckBox();
+ UseProxyCheckBox.setText("\83v\83\8d\83L\83V\82ð\8eg\82¤");
+ }
+ return UseProxyCheckBox;
+ }
- private JTabbedPane SaveInfoTabPaneEach = null;
+ /**
+ * This method initializes FixFontSizeCheckBox
+ *
+ * @return javax.swing.JCheckBox
+ */
+ private JCheckBox getFixFontSizeCheckBox() {
+ if (FixFontSizeCheckBox == null) {
+ FixFontSizeCheckBox = new JCheckBox();
+ FixFontSizeCheckBox.setText("\83t\83H\83\93\83g\83T\83C\83Y\82ð\89æ\96Ê\82É\82 \82í\82¹\82Ä\8e©\93®\92²\90®\82·\82é");
+ }
+ return FixFontSizeCheckBox;
+ }
- private JPanel VideoSavingTabbedPanel = null;
+ /**
+ * This method initializes OpaqueCommentCheckBox
+ *
+ * @return javax.swing.JCheckBox
+ */
+ private JCheckBox getOpaqueCommentCheckBox() {
+ if (OpaqueCommentCheckBox == null) {
+ OpaqueCommentCheckBox = new JCheckBox();
+ OpaqueCommentCheckBox.setText("\91S\82Ä\82Ì\83R\83\81\83\93\83g\82ð\95s\93§\96¾\82É\82·\82é");
+ }
+ return OpaqueCommentCheckBox;
+ }
+ /**
+ * This method initializes FFmpegOptionComboBox
+ *
+ * @return javax.swing.JComboBox
+ */
+ private final OptionComboBoxModel FFmpegOptionModel = new OptionComboBoxModel();
+ private JLabel ExtOptionLabel = null;
+ private JTextField ExtOptionField = null;
+ private JCheckBox NotUseVhookCheckBox = null;
+ private JTextField ViewCommentField = null;
+ private JLabel ViewCommentLabel = null;
+ private JLabel ShadowKindLabel = null;
+ private JComboBox ShadowComboBox = null;
+
+ private JComboBox getFFmpegOptionComboBox() {
+ if (FFmpegOptionComboBox == null) {
+ FFmpegOptionComboBox = new JComboBox(FFmpegOptionModel);
+ FFmpegOptionComboBox.addActionListener(new java.awt.event.ActionListener() {
+
+ public void actionPerformed(java.awt.event.ActionEvent e) {
+ if (FFmpegOptionModel.isFile()) {// \83t\83@\83C\83\8b
+ ExtOptionField.setEnabled(false);
+ MainOptionField.setEnabled(false);
+ CommandLineInOptionField.setEnabled(false);
+ CommandLineOutOptionField.setEnabled(false);
+ } else {// \83t\83@\83C\83\8b\82Å\82È\82¢
+ ExtOptionField.setEnabled(true);
+ MainOptionField.setEnabled(true);
+ CommandLineInOptionField.setEnabled(true);
+ CommandLineOutOptionField.setEnabled(true);
+ }
+ }
+ });
+ }
+ return FFmpegOptionComboBox;
+ }
- private JPanel ConvertedVideoSavingTabbedPanel = null;
+ /**
+ * This method initializes FFmpegOptionReloadButton
+ *
+ * @return javax.swing.JButton
+ */
+ private JButton getFFmpegOptionReloadButton() {
+ if (FFmpegOptionReloadButton == null) {
+ FFmpegOptionReloadButton = new JButton();
+ FFmpegOptionReloadButton.setText("\8dX\90V");
+ FFmpegOptionReloadButton.addActionListener(new java.awt.event.ActionListener() {
+
+ public void actionPerformed(java.awt.event.ActionEvent e) {
+ FFmpegOptionModel.reload();
+ }
+ });
+ }
+ return FFmpegOptionReloadButton;
+ }
- private JCheckBox NotAddVideoID_ConvVideoCheckBox = null;
+ /**
+ * This method initializes FFmpegOptionComboBoxPanel
+ *
+ * @return javax.swing.JPanel
+ */
+ private JPanel getFFmpegOptionComboBoxPanel() {
+ if (FFmpegOptionComboBoxPanel == null) {
+ GridBagConstraints gridBagConstraints47 = new GridBagConstraints();
+ gridBagConstraints47.fill = GridBagConstraints.BOTH;
+ gridBagConstraints47.gridx = -1;
+ gridBagConstraints47.gridy = -1;
+ gridBagConstraints47.insets = new Insets(0, 0, 5, 5);
+ GridBagConstraints gridBagConstraints46 = new GridBagConstraints();
+ gridBagConstraints46.fill = GridBagConstraints.HORIZONTAL;
+ gridBagConstraints46.gridwidth = 3;
+ gridBagConstraints46.gridx = -1;
+ gridBagConstraints46.gridy = -1;
+ gridBagConstraints46.weightx = 1.0;
+ gridBagConstraints46.insets = new Insets(0, 5, 5, 5);
+ FFmpegOptionComboBoxPanel = new JPanel();
+ FFmpegOptionComboBoxPanel.setLayout(new GridBagLayout());
+ FFmpegOptionComboBoxPanel.add(getFFmpegOptionComboBox(),
+ gridBagConstraints46);
+ FFmpegOptionComboBoxPanel.add(getFFmpegOptionReloadButton(),
+ gridBagConstraints47);
+ }
+ return FFmpegOptionComboBoxPanel;
+ }
- private JComboBox FFmpegOptionComboBox = null;
+ /**
+ * This method initializes ExtOptionField
+ *
+ * @return javax.swing.JTextField
+ */
+ private JTextField getExtOptionField() {
+ if (ExtOptionField == null) {
+ ExtOptionField = new JTextField();
+ }
+ return ExtOptionField;
+ }
- private JButton FFmpegOptionReloadButton = null;
+ /**
+ * This method initializes NotUseVhookCheckBox
+ *
+ * @return javax.swing.JCheckBox
+ */
+ private JCheckBox getNotUseVhookCheckBox() {
+ if (NotUseVhookCheckBox == null) {
+ NotUseVhookCheckBox = new JCheckBox();
+ NotUseVhookCheckBox.setText("\8ag\92£vhook\83\89\83C\83u\83\89\83\8a\82ð\96³\8cø\82É\82·\82é\81i\83f\83o\83b\83O\97p\81j");
+ }
+ return NotUseVhookCheckBox;
+ }
- private JPanel FFmpegOptionComboBoxPanel = null;
+ /**
+ * This method initializes ViewCommentField
+ *
+ * @return javax.swing.JTextField
+ */
+ private JTextField getViewCommentField() {
+ if (ViewCommentField == null) {
+ ViewCommentField = new JTextField();
+ }
+ return ViewCommentField;
+ }
- public void DoButton_actionPerformed(ActionEvent e) {
- if (Converter == null || Converter.isConverted()) {
- String url;
+ /**
+ * This method initializes ShadowComboBox
+ *
+ * @return javax.swing.JComboBox
+ */
+ private JComboBox getShadowComboBox() {
+ if (ShadowComboBox == null) {
+ ShadowComboBox = new JComboBox(ConvertingSetting.ShadowKindArray);
+ }
+ return ShadowComboBox;
+ }
- // NicoBrowser\83t\83@\83C\83\8b\82ð\97\98\97p\82·\82é\8fê\8d\87\82Í\81A\83t\83@\83C\83\8b\96¼\82©\82ç\83r\83f\83IID\82ð\93Á\92è.
- if(videoSaveInfoPanel.getVideoUseNiBrButton().isSelected()){
- try {
- String fileName = videoSaveInfoPanel.getNibrFileField().getText();
- NicoDBFinder finder = NicoDBFinder.getInstance();
- NicoContent info = finder.findNicoContent(fileName);
- if (info != null) {
- url = info.getNicoId();
- } else {
- url = "";
- }
- } catch (Exception ex) {
- JOptionPane.showMessageDialog(this, ex.getMessage(), "\83G\83\89\81[", JOptionPane.ERROR_MESSAGE);
- return;
- }
- }else{
- url = VideoID_TextField.getText();
- }
+ /**
+ * \89æ\96Ê\93ü\97Í\92l\82©\82ç\93\8a\8de\8eÒ\83R\83\81\83\93\83g\90Ý\92è\82ð\8dì\90¬\82·\82é.
+ * @return \8dì\90¬\82µ\82½\93\8a\8de\8eÒ\83R\83\81\83\93\83g\90Ý\92è.
+ */
+ private TcommentSetting getTcommentSetting() {
+// TcommentSetting res;
+ boolean down = savePanel.isTcommentDownload();
+ boolean del = savePanel.isTcommentDelete();
+ boolean naming = savePanel.isTcommentAutoFileName();
+ String dir = savePanel.getTcommentDirectoryName();
+ String f = savePanel.getTcommentFileName();
+ return new TcommentSetting(down, del, naming, dir, f);
+ }
- Converter = new Converter(url, WayBackField
- .getText(), this.getSetting(), this.statusBar,
- new ConvertStopFlag(this.DoButton, DoButtonStopString,
- DoButtonWaitString, DoButtonDefString));
- Converter.start();
- } else { /* \8aJ\8en\82µ\82Ä\82¢\82é\82Ì\82Å\81A\83X\83g\83b\83v\82·\82é\81B */
- final ConvertStopFlag flag = Converter.getStopFlag();
- if (!flag.needStop()) { /* \82Ü\82¾\83X\83g\83b\83v\82µ\82Ä\82¢\82È\82¢\81B */
- flag.stop();
- }
- }
- }
-
- /* \83R\83\81\83\93\83g\81E\83Z\81[\83u\83_\83C\83A\83\8d\83O */
- public void ShowSavingCommentDialogButton_actionPerformed(ActionEvent e) {
- showSaveDialog("\83R\83\81\83\93\83g\82Ì\95Û\91¶\90æ(\83t\83@\83C\83\8b)", CommentSavedFileField, true, false);
- }
-
- /* \83R\83\81\83\93\83g\95t\82«\83r\83f\83I\81E\83Z\81[\83u\83_\83C\83A\83\8d\83O */
- public void ShowSavingConvertedVideoDialogButton_actionPerformed(
- ActionEvent e) {
- showSaveDialog("\83R\83\81\83\93\83g\95t\82«\93®\89æ\82Ì\95Û\91¶\90æ(\83t\83@\83C\83\8b)", ConvertedVideoSavedFileField,
- true, false);
- }
-
- /* FFmpeg\82Ö\82Ì\83p\83X */
- public void SettingFFmpegPathButton_actionPerformed(ActionEvent e) {
- showSaveDialog("FFmpeg\82Ö\82Ì\83p\83X", FFmpegPathField, false, false);
- }
-
- public void SettingVhookPathButton_actionPerformed(ActionEvent e) {
- showSaveDialog("\8ag\92£vhook\83\89\83C\83u\83\89\83\8a\82Ö\82Ì\83p\83X", VhookPathField, false, false);
- }
-
- public void SettingFontPathButton_actionPerformed(ActionEvent e) {
- showSaveDialog("\83t\83H\83\93\83g\82Ö\82Ì\83p\83X", FontPathField, false, false);
- }
-
- public void this_windowClosing(WindowEvent e) {
- this.jMenuFileExit_actionPerformed(null);
- }
-
- public void ShowSavingConvertedVideoFolderDialogButton_actionPerformed(
- ActionEvent e) {
- /* \83t\83H\83\8b\83_ */
- showSaveDialog("\83R\83\81\83\93\83g\95t\82«\93®\89æ\82Ì\95Û\91¶\90æ(\83t\83H\83\8b\83_)", ConvertedVideoSavedFolderField,
- true, true);
- }
-
- public void ShowSavingCommentFolderDialogButton_actionPerformed(
- ActionEvent e) {
- showSaveDialog("\83R\83\81\83\93\83g\82Ì\95Û\91¶\90æ(\83t\83H\83\8b\83_)", CommentSavedFolderField, true, true);
- }
-
- /**
- * This method initializes ConvertingSettingPanel
- *
- * @return javax.swing.JPanel
- */
- private JPanel getConvertingSettingPanel() {
- if (ConvertingSettingPanel == null) {
- GridBagConstraints gridBagConstraints11 = new GridBagConstraints();
- gridBagConstraints11.weighty = 1.0;
- gridBagConstraints11.weightx = 1.0;
- gridBagConstraints11.insets = new Insets(0, 5, 0, 5);
- gridBagConstraints11.gridy = 1;
- gridBagConstraints11.gridx = 0;
- gridBagConstraints11.anchor = GridBagConstraints.NORTH;
- gridBagConstraints11.fill = GridBagConstraints.HORIZONTAL;
- GridBagConstraints gridBagConstraints = new GridBagConstraints(0,
- 2, 1, 1, 1.0, 1.0, GridBagConstraints.NORTH,
- GridBagConstraints.HORIZONTAL, new Insets(0, 5, 0, 5), 0, 0);
- gridBagConstraints.gridx = 0;
- gridBagConstraints.anchor = GridBagConstraints.CENTER;
- gridBagConstraints.weighty = 0.0;
- gridBagConstraints.gridy = 0;
- ConvertingSettingPanel = new JPanel();
- ConvertingSettingPanel.setLayout(new GridBagLayout());
- ConvertingSettingPanel.add(getNGWordSettingPanel(),
- gridBagConstraints11);
- ConvertingSettingPanel.add(VhookSettingPanel, gridBagConstraints);
- }
- return ConvertingSettingPanel;
- }
-
- /**
- * This method initializes NGWordSettingPanel
- *
- * @return javax.swing.JPanel
- */
- private JPanel getNGWordSettingPanel() {
- if (NGWordSettingPanel == null) {
- GridBagConstraints gridBagConstraints5 = new GridBagConstraints();
- gridBagConstraints5.fill = GridBagConstraints.HORIZONTAL;
- gridBagConstraints5.gridy = 1;
- gridBagConstraints5.weightx = 1.0;
- gridBagConstraints5.insets = new Insets(0, 5, 5, 5);
- gridBagConstraints5.gridx = 1;
- GridBagConstraints gridBagConstraints4 = new GridBagConstraints();
- gridBagConstraints4.gridx = 0;
- gridBagConstraints4.anchor = GridBagConstraints.WEST;
- gridBagConstraints4.insets = new Insets(0, 5, 5, 0);
- gridBagConstraints4.gridy = 1;
- NGIDLabel = new JLabel();
- NGIDLabel.setText("NG ID");
- GridBagConstraints gridBagConstraints3 = new GridBagConstraints();
- gridBagConstraints3.fill = GridBagConstraints.HORIZONTAL;
- gridBagConstraints3.gridy = 0;
- gridBagConstraints3.weightx = 1.0;
- gridBagConstraints3.insets = new Insets(0, 5, 5, 5);
- gridBagConstraints3.gridx = 1;
- GridBagConstraints gridBagConstraints2 = new GridBagConstraints();
- gridBagConstraints2.gridx = 0;
- gridBagConstraints2.insets = new Insets(0, 5, 5, 0);
- gridBagConstraints2.gridy = 0;
- NGWordLavel = new JLabel();
- NGWordLavel.setText("NG\83\8f\81[\83h");
- NGWordSettingPanel = new JPanel();
- NGWordSettingPanel.setLayout(new GridBagLayout());
- NGWordSettingPanel.setBorder(BorderFactory.createTitledBorder(null,
- "NG\83\8f\81[\83h\81EID\90Ý\92è"));
- NGWordSettingPanel.add(NGWordLavel, gridBagConstraints2);
- NGWordSettingPanel.add(getNGWordTextField(), gridBagConstraints3);
- NGWordSettingPanel.add(NGIDLabel, gridBagConstraints4);
- NGWordSettingPanel.add(getNGIDTextField(), gridBagConstraints5);
- }
- return NGWordSettingPanel;
- }
-
- /**
- * This method initializes NGWordTextField
- *
- * @return javax.swing.JTextField
- */
- private JTextField getNGWordTextField() {
- if (NGWordTextField == null) {
- NGWordTextField = new JTextField();
- }
- return NGWordTextField;
- }
-
- /**
- * This method initializes NGIDTextField
- *
- * @return javax.swing.JTextField
- */
- private JTextField getNGIDTextField() {
- if (NGIDTextField == null) {
- NGIDTextField = new JTextField();
- }
- return NGIDTextField;
- }
-
- /**
- * This method initializes ProxyInfoPanel
- *
- * @return javax.swing.JPanel
- */
- private JPanel getProxyInfoPanel() {
- if (ProxyInfoPanel == null) {
- GridBagConstraints gridBagConstraints13 = new GridBagConstraints();
- gridBagConstraints13.gridx = 0;
- gridBagConstraints13.gridwidth = 2;
- gridBagConstraints13.weightx = 1.0;
- gridBagConstraints13.fill = GridBagConstraints.HORIZONTAL;
- gridBagConstraints13.insets = new Insets(0, 5, 0, 5);
- gridBagConstraints13.gridy = 0;
- GridBagConstraints gridBagConstraints12 = new GridBagConstraints();
- gridBagConstraints12.fill = GridBagConstraints.HORIZONTAL;
- gridBagConstraints12.gridy = 2;
- gridBagConstraints12.weightx = 1.0;
- gridBagConstraints12.insets = new Insets(5, 0, 5, 5);
- gridBagConstraints12.gridx = 1;
- GridBagConstraints gridBagConstraints10 = new GridBagConstraints();
- gridBagConstraints10.gridx = 0;
- gridBagConstraints10.insets = new Insets(5, 5, 5, 5);
- gridBagConstraints10.gridy = 2;
- ProxyPortLabel = new JLabel();
- ProxyPortLabel.setText("\83|\81[\83g\94Ô\8d\86");
- GridBagConstraints gridBagConstraints9 = new GridBagConstraints();
- gridBagConstraints9.fill = GridBagConstraints.BOTH;
- gridBagConstraints9.gridy = 1;
- gridBagConstraints9.weightx = 1.0;
- gridBagConstraints9.insets = new Insets(0, 0, 0, 5);
- gridBagConstraints9.gridx = 1;
- GridBagConstraints gridBagConstraints8 = new GridBagConstraints();
- gridBagConstraints8.gridx = 0;
- gridBagConstraints8.insets = new Insets(0, 5, 0, 5);
- gridBagConstraints8.fill = GridBagConstraints.NONE;
- gridBagConstraints8.anchor = GridBagConstraints.EAST;
- gridBagConstraints8.gridy = 1;
- ProxyLabel = new JLabel();
- ProxyLabel.setText("\83v\83\8d\83L\83V");
- ProxyInfoPanel = new JPanel();
- ProxyInfoPanel.setLayout(new GridBagLayout());
- ProxyInfoPanel.setBorder(BorderFactory.createTitledBorder(null,
- "\83v\83\8d\83L\83V\90Ý\92è"));
- ProxyInfoPanel.add(ProxyLabel, gridBagConstraints8);
- ProxyInfoPanel.add(getProxyTextField(), gridBagConstraints9);
- ProxyInfoPanel.add(ProxyPortLabel, gridBagConstraints10);
- ProxyInfoPanel.add(getProxyPortTextField(), gridBagConstraints12);
- ProxyInfoPanel.add(getUseProxyCheckBox(), gridBagConstraints13);
- }
- return ProxyInfoPanel;
- }
-
- /**
- * This method initializes ProxyTextField
- *
- * @return javax.swing.JTextField
- */
- private JTextField getProxyTextField() {
- if (ProxyTextField == null) {
- ProxyTextField = new JTextField();
- }
- return ProxyTextField;
- }
-
- /**
- * This method initializes ProxyPortTextField
- *
- * @return javax.swing.JTextField
- */
- private JTextField getProxyPortTextField() {
- if (ProxyPortTextField == null) {
- ProxyPortTextField = new JTextField();
- }
- return ProxyPortTextField;
- }
-
- /**
- * This method initializes UseProxyCheckBox
- *
- * @return javax.swing.JCheckBox
- */
- private JCheckBox getUseProxyCheckBox() {
- if (UseProxyCheckBox == null) {
- UseProxyCheckBox = new JCheckBox();
- UseProxyCheckBox.setText("\83v\83\8d\83L\83V\82ð\8eg\82¤");
- }
- return UseProxyCheckBox;
- }
-
- /**
- * This method initializes FixFontSizeCheckBox
- *
- * @return javax.swing.JCheckBox
- */
- private JCheckBox getFixFontSizeCheckBox() {
- if (FixFontSizeCheckBox == null) {
- FixFontSizeCheckBox = new JCheckBox();
- FixFontSizeCheckBox.setText("\83t\83H\83\93\83g\83T\83C\83Y\82ð\89æ\96Ê\82É\82 \82í\82¹\82Ä\8e©\93®\92²\90®\82·\82é");
- }
- return FixFontSizeCheckBox;
- }
-
- /**
- * This method initializes DelCommentCheckBox
- *
- * @return javax.swing.JCheckBox
- */
- private JCheckBox getDelCommentCheckBox() {
- if (DelCommentCheckBox == null) {
- DelCommentCheckBox = new JCheckBox();
- DelCommentCheckBox.setText("\95Ï\8a·\8cã\82É\83R\83\81\83\93\83g\83t\83@\83C\83\8b\82ð\8dí\8f\9c\82·\82é");
- }
- return DelCommentCheckBox;
- }
-
- /**
- * This method initializes FixCommentNumCheckBox
- *
- * @return javax.swing.JCheckBox
- */
- private JCheckBox getFixCommentNumCheckBox() {
- if (FixCommentNumCheckBox == null) {
- FixCommentNumCheckBox = new JCheckBox();
- FixCommentNumCheckBox.setText("\83R\83\81\83\93\83g\8eæ\93¾\90\94\82Í\8e©\93®\82Å\92²\90®\82·\82é");
- }
- return FixCommentNumCheckBox;
- }
-
- /**
- * This method initializes OpaqueCommentCheckBox
- *
- * @return javax.swing.JCheckBox
- */
- private JCheckBox getOpaqueCommentCheckBox() {
- if (OpaqueCommentCheckBox == null) {
- OpaqueCommentCheckBox = new JCheckBox();
- OpaqueCommentCheckBox.setText("\91S\82Ä\82Ì\83R\83\81\83\93\83g\82ð\95s\93§\96¾\82É\82·\82é");
- }
- return OpaqueCommentCheckBox;
- }
-
- /**
- * This method initializes SaveInfoTabPaneEach
- *
- * @return javax.swing.JTabbedPane
- */
- private JTabbedPane getSaveInfoTabPaneEach() {
- if (SaveInfoTabPaneEach == null) {
- SaveInfoTabPaneEach = new JTabbedPane();
- SaveInfoTabPaneEach.addTab("\93®\89æ\81E\83R\83\81\83\93\83g", null,
- getVideoSavingTabbedPanel(), null);
- SaveInfoTabPaneEach.addTab("\83R\83\81\83\93\83g\95t\82«\93®\89æ", null,
- getConvertedVideoSavingTabbedPanel(), null);
- }
- return SaveInfoTabPaneEach;
- }
-
- /**
- * This method initializes VideoSavingTabbedPanel
- *
- * @return javax.swing.JPanel
- */
- private JPanel getVideoSavingTabbedPanel() {
- if (VideoSavingTabbedPanel == null) {
- GridBagConstraints gridBagConstraints36 = new GridBagConstraints();
- gridBagConstraints36.weighty = 0.0;
- gridBagConstraints36.weightx = 1.0;
- gridBagConstraints36.fill = GridBagConstraints.HORIZONTAL;
- gridBagConstraints36.insets = new Insets(0, 5, 0, 5);
- gridBagConstraints36.anchor = GridBagConstraints.NORTH;
- GridBagConstraints gridBagConstraints37 = new GridBagConstraints(0,
- 1, 1, 1, 1.0, 0.0, GridBagConstraints.CENTER,
- GridBagConstraints.BOTH, new Insets(0, 5, 0, 5), 0, 0);
- gridBagConstraints37.anchor = GridBagConstraints.NORTH;
- gridBagConstraints37.gridx = 0;
- gridBagConstraints37.gridy = 1;
- gridBagConstraints37.weighty = 1.0;
- gridBagConstraints37.fill = GridBagConstraints.HORIZONTAL;
- VideoSavingTabbedPanel = new JPanel();
- VideoSavingTabbedPanel.setLayout(new GridBagLayout());
- VideoSavingTabbedPanel.add(videoSaveInfoPanel,
- gridBagConstraints36);
- VideoSavingTabbedPanel.add(CommentSaveInfoPanel,
- gridBagConstraints37);
- }
- return VideoSavingTabbedPanel;
- }
-
- /**
- * This method initializes ConvertedVideoSavingTabbedPanel
- *
- * @return javax.swing.JPanel
- */
- private JPanel getConvertedVideoSavingTabbedPanel() {
- if (ConvertedVideoSavingTabbedPanel == null) {
- GridBagConstraints gridBagConstraints38 = new GridBagConstraints(0,
- 2, 1, 1, 1.0, 1.0, GridBagConstraints.NORTH,
- GridBagConstraints.HORIZONTAL, new Insets(0, 5, 0, 5), 0, 0);
- gridBagConstraints38.gridx = -1;
- gridBagConstraints38.fill = GridBagConstraints.HORIZONTAL;
- gridBagConstraints38.gridy = -1;
- ConvertedVideoSavingTabbedPanel = new JPanel();
- ConvertedVideoSavingTabbedPanel.setLayout(new GridBagLayout());
- ConvertedVideoSavingTabbedPanel.add(ConvertedVideoSavingInfoPanel,
- gridBagConstraints38);
- }
- return ConvertedVideoSavingTabbedPanel;
- }
-
- /**
- * This method initializes NotAddVideoID_ConvVideoCheckBox
- *
- * @return javax.swing.JCheckBox
- */
- private JCheckBox getNotAddVideoID_ConvVideoCheckBox() {
- if (NotAddVideoID_ConvVideoCheckBox == null) {
- NotAddVideoID_ConvVideoCheckBox = new JCheckBox();
- NotAddVideoID_ConvVideoCheckBox.setText("\83t\83@\83C\83\8b\96¼\82É\93®\89æID\82ð\95t\89Á\82µ\82È\82¢");
- }
- return NotAddVideoID_ConvVideoCheckBox;
- }
-
- /**
- * This method initializes FFmpegOptionComboBox
- *
- * @return javax.swing.JComboBox
- */
- private final OptionComboBoxModel FFmpegOptionModel = new OptionComboBoxModel();
-
- private JLabel ExtOptionLabel = null;
-
- private JTextField ExtOptionField = null;
-
- private JCheckBox NotUseVhookCheckBox = null;
-
- private JTextField ViewCommentField = null;
-
- private JLabel ViewCommentLabel = null;
-
- private JLabel ShadowKindLabel = null;
-
- private JComboBox ShadowComboBox = null;
-
- private JComboBox getFFmpegOptionComboBox() {
- if (FFmpegOptionComboBox == null) {
- FFmpegOptionComboBox = new JComboBox(FFmpegOptionModel);
- FFmpegOptionComboBox
- .addActionListener(new java.awt.event.ActionListener() {
- public void actionPerformed(java.awt.event.ActionEvent e) {
- if (FFmpegOptionModel.isFile()) {// \83t\83@\83C\83\8b
- ExtOptionField.setEnabled(false);
- MainOptionField.setEnabled(false);
- CommandLineInOptionField.setEnabled(false);
- CommandLineOutOptionField.setEnabled(false);
- } else {// \83t\83@\83C\83\8b\82Å\82È\82¢
- ExtOptionField.setEnabled(true);
- MainOptionField.setEnabled(true);
- CommandLineInOptionField.setEnabled(true);
- CommandLineOutOptionField.setEnabled(true);
- }
- }
- });
- }
- return FFmpegOptionComboBox;
- }
-
- /**
- * This method initializes FFmpegOptionReloadButton
- *
- * @return javax.swing.JButton
- */
- private JButton getFFmpegOptionReloadButton() {
- if (FFmpegOptionReloadButton == null) {
- FFmpegOptionReloadButton = new JButton();
- FFmpegOptionReloadButton.setText("\8dX\90V");
- FFmpegOptionReloadButton
- .addActionListener(new java.awt.event.ActionListener() {
- public void actionPerformed(java.awt.event.ActionEvent e) {
- FFmpegOptionModel.reload();
- }
- });
- }
- return FFmpegOptionReloadButton;
- }
-
- /**
- * This method initializes FFmpegOptionComboBoxPanel
- *
- * @return javax.swing.JPanel
- */
- private JPanel getFFmpegOptionComboBoxPanel() {
- if (FFmpegOptionComboBoxPanel == null) {
- GridBagConstraints gridBagConstraints47 = new GridBagConstraints();
- gridBagConstraints47.fill = GridBagConstraints.BOTH;
- gridBagConstraints47.gridx = -1;
- gridBagConstraints47.gridy = -1;
- gridBagConstraints47.insets = new Insets(0, 0, 5, 5);
- GridBagConstraints gridBagConstraints46 = new GridBagConstraints();
- gridBagConstraints46.fill = GridBagConstraints.HORIZONTAL;
- gridBagConstraints46.gridwidth = 3;
- gridBagConstraints46.gridx = -1;
- gridBagConstraints46.gridy = -1;
- gridBagConstraints46.weightx = 1.0;
- gridBagConstraints46.insets = new Insets(0, 5, 5, 5);
- FFmpegOptionComboBoxPanel = new JPanel();
- FFmpegOptionComboBoxPanel.setLayout(new GridBagLayout());
- FFmpegOptionComboBoxPanel.add(getFFmpegOptionComboBox(),
- gridBagConstraints46);
- FFmpegOptionComboBoxPanel.add(getFFmpegOptionReloadButton(),
- gridBagConstraints47);
- }
- return FFmpegOptionComboBoxPanel;
- }
-
- /**
- * This method initializes ExtOptionField
- *
- * @return javax.swing.JTextField
- */
- private JTextField getExtOptionField() {
- if (ExtOptionField == null) {
- ExtOptionField = new JTextField();
- }
- return ExtOptionField;
- }
-
- /**
- * This method initializes NotUseVhookCheckBox
- *
- * @return javax.swing.JCheckBox
- */
- private JCheckBox getNotUseVhookCheckBox() {
- if (NotUseVhookCheckBox == null) {
- NotUseVhookCheckBox = new JCheckBox();
- NotUseVhookCheckBox.setText("\8ag\92£vhook\83\89\83C\83u\83\89\83\8a\82ð\96³\8cø\82É\82·\82é\81i\83f\83o\83b\83O\97p\81j");
- }
- return NotUseVhookCheckBox;
- }
-
- /**
- * This method initializes ViewCommentField
- *
- * @return javax.swing.JTextField
- */
- private JTextField getViewCommentField() {
- if (ViewCommentField == null) {
- ViewCommentField = new JTextField();
- }
- return ViewCommentField;
- }
-
- /**
- * This method initializes ShadowComboBox
- *
- * @return javax.swing.JComboBox
- */
-
- private JComboBox getShadowComboBox() {
- if (ShadowComboBox == null) {
- ShadowComboBox = new JComboBox(ConvertingSetting.ShadowKindArray);
- }
- return ShadowComboBox;
- }
-
- private class VideoSavePanelButtonListener implements ActionListener {
+ private class InputVideoPanelButtonListener implements ActionListener {
public void actionPerformed(ActionEvent e) {
final Object source = e.getSource();
}
}
+ private class InputCommentPanelButtonListener implements ActionListener {
+
+ public void actionPerformed(ActionEvent e) {
+ final Object source = e.getSource();
+ String title;
+ JTextField field;
+ boolean isSave;
+ boolean isDir;
+ if (source == savePanel.getShowSavingCommentFolderDialogButton()) {
+ title = "\83R\83\81\83\93\83g\82Ì\95Û\91¶\90æ(\83t\83H\83\8b\83_)";
+ field = savePanel.getCommentSavedFolderField();
+ isSave = true;
+ isDir = true;
+ } else if (source == savePanel.getShowSavingCommentFolderDialogButton()) {
+ title = "\83R\83\81\83\93\83g\82Ì\95Û\91¶\90æ(\83t\83@\83C\83\8b)";
+ field = savePanel.getCommentSavedFileField();
+ isSave = true;
+ isDir = false;
+ } else {
+ return;
+ }
+ showSaveDialog(title, field, isSave, isDir);
+ }
+ }
+
+ private class OutputVideoPanelButtonListener implements ActionListener {
+
+ public void actionPerformed(ActionEvent e) {
+ final Object source = e.getSource();
+ String title;
+ JTextField field;
+ boolean isSave;
+ boolean isDir;
+ if (source == savePanel.getShowSavingConvertedVideoFolderDialogButton()) {
+ title = "\83R\83\81\83\93\83g\95t\82«\93®\89æ\82Ì\95Û\91¶\90æ(\83t\83H\83\8b\83_)";
+ field = savePanel.getConvertedVideoSavedFolderField();
+ isSave = true;
+ isDir = true;
+ } else if (source == savePanel.getShowSavingConvertedVideoFileDialogButton()) {
+ title = "\83R\83\81\83\93\83g\95t\82«\93®\89æ\82Ì\95Û\91¶\90æ(\83t\83@\83C\83\8b)";
+ field = savePanel.getConvertedVideoSavedFileField();
+ isSave = true;
+ isDir = false;
+ } else {
+ return;
+ }
+ showSaveDialog(title, field, isSave, isDir);
+ }
+ }
+
private class VideoUseRadioButtonListener implements ActionListener {
public void actionPerformed(ActionEvent e) {
}
}
-class MainFrame_ShowSavingCommentFolderDialogButton_actionAdapter implements
- ActionListener {
- private MainFrame adaptee;
-
- MainFrame_ShowSavingCommentFolderDialogButton_actionAdapter(
- MainFrame adaptee) {
- this.adaptee = adaptee;
- }
-
- public void actionPerformed(ActionEvent e) {
- adaptee.ShowSavingCommentFolderDialogButton_actionPerformed(e);
- }
-}
-
-class MainFrame_ShowSavingConvertedVideoFolderDialogButton_actionAdapter
- implements ActionListener {
- private MainFrame adaptee;
-
- MainFrame_ShowSavingConvertedVideoFolderDialogButton_actionAdapter(
- MainFrame adaptee) {
- this.adaptee = adaptee;
- }
-
- public void actionPerformed(ActionEvent e) {
- adaptee.ShowSavingConvertedVideoFolderDialogButton_actionPerformed(e);
- }
-}
-
class MainFrame_this_windowAdapter extends WindowAdapter {
- private MainFrame adaptee;
- MainFrame_this_windowAdapter(MainFrame adaptee) {
- this.adaptee = adaptee;
- }
+ private MainFrame adaptee;
+
+ MainFrame_this_windowAdapter(MainFrame adaptee) {
+ this.adaptee = adaptee;
+ }
@Override
- public void windowClosing(WindowEvent e) {
- adaptee.this_windowClosing(e);
- }
+ public void windowClosing(WindowEvent e) {
+ adaptee.this_windowClosing(e);
+ }
}
class MainFrame_SettingFontPathButton_actionAdapter implements ActionListener {
- private MainFrame adaptee;
- MainFrame_SettingFontPathButton_actionAdapter(MainFrame adaptee) {
- this.adaptee = adaptee;
- }
+ private MainFrame adaptee;
- public void actionPerformed(ActionEvent e) {
- adaptee.SettingFontPathButton_actionPerformed(e);
- }
+ MainFrame_SettingFontPathButton_actionAdapter(MainFrame adaptee) {
+ this.adaptee = adaptee;
+ }
+
+ public void actionPerformed(ActionEvent e) {
+ adaptee.SettingFontPathButton_actionPerformed(e);
+ }
}
class MainFrame_SettingVhookPathButton_actionAdapter implements ActionListener {
- private MainFrame adaptee;
- MainFrame_SettingVhookPathButton_actionAdapter(MainFrame adaptee) {
- this.adaptee = adaptee;
- }
-
- public void actionPerformed(ActionEvent e) {
- adaptee.SettingVhookPathButton_actionPerformed(e);
- }
-}
+ private MainFrame adaptee;
-class MainFrame_SettingFFmpegPathButton_actionAdapter implements ActionListener {
- private MainFrame adaptee;
-
- MainFrame_SettingFFmpegPathButton_actionAdapter(MainFrame adaptee) {
- this.adaptee = adaptee;
- }
+ MainFrame_SettingVhookPathButton_actionAdapter(MainFrame adaptee) {
+ this.adaptee = adaptee;
+ }
- public void actionPerformed(ActionEvent e) {
- adaptee.SettingFFmpegPathButton_actionPerformed(e);
- }
+ public void actionPerformed(ActionEvent e) {
+ adaptee.SettingVhookPathButton_actionPerformed(e);
+ }
}
-class MainFrame_ShowSavingConvertedVideoDialogButton_actionAdapter implements
- ActionListener {
- private MainFrame adaptee;
-
- MainFrame_ShowSavingConvertedVideoDialogButton_actionAdapter(
- MainFrame adaptee) {
- this.adaptee = adaptee;
- }
-
- public void actionPerformed(ActionEvent e) {
- adaptee.ShowSavingConvertedVideoDialogButton_actionPerformed(e);
- }
-}
+class MainFrame_SettingFFmpegPathButton_actionAdapter implements ActionListener {
-class MainFrame_ShowSavingCommentDialogButton_actionAdapter implements
- ActionListener {
- private MainFrame adaptee;
+ private MainFrame adaptee;
- MainFrame_ShowSavingCommentDialogButton_actionAdapter(MainFrame adaptee) {
- this.adaptee = adaptee;
- }
+ MainFrame_SettingFFmpegPathButton_actionAdapter(MainFrame adaptee) {
+ this.adaptee = adaptee;
+ }
- public void actionPerformed(ActionEvent e) {
- adaptee.ShowSavingCommentDialogButton_actionPerformed(e);
- }
+ public void actionPerformed(ActionEvent e) {
+ adaptee.SettingFFmpegPathButton_actionPerformed(e);
+ }
}
class MainFrame_DoButton_actionAdapter implements ActionListener {
- private MainFrame adaptee;
- MainFrame_DoButton_actionAdapter(MainFrame adaptee) {
- this.adaptee = adaptee;
- }
+ private MainFrame adaptee;
- public void actionPerformed(ActionEvent e) {
- adaptee.DoButton_actionPerformed(e);
- }
+ MainFrame_DoButton_actionAdapter(MainFrame adaptee) {
+ this.adaptee = adaptee;
+ }
+
+ public void actionPerformed(ActionEvent e) {
+ adaptee.DoButton_actionPerformed(e);
+ }
}
class MainFrame_jMenuFileExit_ActionAdapter implements ActionListener {
- MainFrame adaptee;
- MainFrame_jMenuFileExit_ActionAdapter(MainFrame adaptee) {
- this.adaptee = adaptee;
- }
+ MainFrame adaptee;
+
+ MainFrame_jMenuFileExit_ActionAdapter(MainFrame adaptee) {
+ this.adaptee = adaptee;
+ }
- public void actionPerformed(ActionEvent actionEvent) {
- adaptee.jMenuFileExit_actionPerformed(actionEvent);
- }
+ public void actionPerformed(ActionEvent actionEvent) {
+ adaptee.jMenuFileExit_actionPerformed(actionEvent);
+ }
}
class MainFrame_jMenuHelpAbout_ActionAdapter implements ActionListener {
- MainFrame adaptee;
- MainFrame_jMenuHelpAbout_ActionAdapter(MainFrame adaptee) {
- this.adaptee = adaptee;
- }
+ MainFrame adaptee;
+
+ MainFrame_jMenuHelpAbout_ActionAdapter(MainFrame adaptee) {
+ this.adaptee = adaptee;
+ }
- public void actionPerformed(ActionEvent actionEvent) {
- adaptee.jMenuHelpAbout_actionPerformed(actionEvent);
- }
+ public void actionPerformed(ActionEvent actionEvent) {
+ adaptee.jMenuHelpAbout_actionPerformed(actionEvent);
+ }
}
--- /dev/null
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+package saccubus;
+
+/**
+ *
+ * @author yuki
+ */
+class OptionValue {
+
+ private final String extOption;
+ private final String inOption;
+ private final String outOption;
+ private final String mainOption;
+
+ OptionValue(String extOption, String inOption, String outOption, String mainOption) {
+ this.extOption = extOption;
+ this.inOption = inOption;
+ this.outOption = outOption;
+ this.mainOption = mainOption;
+ }
+
+ String getExtOption() {
+ return extOption;
+ }
+
+ String getInOption() {
+ return inOption;
+ }
+
+ String getMainOption() {
+ return mainOption;
+ }
+
+ String getOutOption() {
+ return outOption;
+ }
+}
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<Form version="1.3" maxVersion="1.7" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
+ <NonVisualComponents>
+ <Component class="javax.swing.ButtonGroup" name="inputCommentSaveGroup">
+ </Component>
+ <Component class="javax.swing.ButtonGroup" name="outputVideoSaveGroup">
+ </Component>
+ <Component class="javax.swing.ButtonGroup" name="inputTcommentSaveGroup">
+ </Component>
+ </NonVisualComponents>
+ <SyntheticProperties>
+ <SyntheticProperty name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,1,41,0,0,1,118"/>
+ </SyntheticProperties>
+ <AuxValues>
+ <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>
+ <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
+ <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
+ <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
+ <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/>
+ <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
+ <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
+ <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
+ <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
+ </AuxValues>
+
+ <Layout>
+ <DimensionLayout dim="0">
+ <Group type="103" groupAlignment="0" attributes="0">
+ <Component id="jTabbedPane1" alignment="0" pref="374" max="32767" attributes="0"/>
+ </Group>
+ </DimensionLayout>
+ <DimensionLayout dim="1">
+ <Group type="103" groupAlignment="0" attributes="0">
+ <Component id="jTabbedPane1" alignment="0" pref="297" max="32767" attributes="0"/>
+ </Group>
+ </DimensionLayout>
+ </Layout>
+ <SubComponents>
+ <Container class="javax.swing.JTabbedPane" name="jTabbedPane1">
+
+ <Layout class="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout"/>
+ <SubComponents>
+ <Container class="javax.swing.JPanel" name="inputVideoTab">
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout$JTabbedPaneConstraintsDescription">
+ <JTabbedPaneConstraints tabName="入力動画">
+ <Property name="tabTitle" type="java.lang.String" value="入力動画"/>
+ </JTabbedPaneConstraints>
+ </Constraint>
+ </Constraints>
+
+ <Layout>
+ <DimensionLayout dim="0">
+ <Group type="103" groupAlignment="0" attributes="0">
+ <EmptySpace min="0" pref="369" max="32767" attributes="0"/>
+ </Group>
+ </DimensionLayout>
+ <DimensionLayout dim="1">
+ <Group type="103" groupAlignment="0" attributes="0">
+ <EmptySpace min="0" pref="270" max="32767" attributes="0"/>
+ </Group>
+ </DimensionLayout>
+ </Layout>
+ </Container>
+ <Container class="javax.swing.JPanel" name="inputCommentTab">
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout$JTabbedPaneConstraintsDescription">
+ <JTabbedPaneConstraints tabName="入力コメント">
+ <Property name="tabTitle" type="java.lang.String" value="入力コメント"/>
+ </JTabbedPaneConstraints>
+ </Constraint>
+ </Constraints>
+
+ <Layout>
+ <DimensionLayout dim="0">
+ <Group type="103" groupAlignment="0" attributes="0">
+ <Group type="102" alignment="0" attributes="0">
+ <EmptySpace max="-2" attributes="0"/>
+ <Component id="commentSaveInfoPanel" max="32767" attributes="0"/>
+ <EmptySpace max="-2" attributes="0"/>
+ </Group>
+ </Group>
+ </DimensionLayout>
+ <DimensionLayout dim="1">
+ <Group type="103" groupAlignment="0" attributes="0">
+ <Group type="102" alignment="0" attributes="0">
+ <EmptySpace max="-2" attributes="0"/>
+ <Component id="commentSaveInfoPanel" min="-2" max="-2" attributes="0"/>
+ <EmptySpace pref="27" max="32767" attributes="0"/>
+ </Group>
+ </Group>
+ </DimensionLayout>
+ </Layout>
+ <SubComponents>
+ <Container class="javax.swing.JPanel" name="commentSaveInfoPanel">
+ <Properties>
+ <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
+ <Border info="org.netbeans.modules.form.compat2.border.TitledBorderInfo">
+ <TitledBorder title="コメント保存設定"/>
+ </Border>
+ </Property>
+ </Properties>
+
+ <Layout>
+ <DimensionLayout dim="0">
+ <Group type="103" groupAlignment="0" attributes="0">
+ <Group type="102" attributes="0">
+ <Component id="savingCommentCheckBox" min="-2" max="-2" attributes="0"/>
+ <EmptySpace min="-2" pref="79" max="-2" attributes="0"/>
+ </Group>
+ <Group type="102" alignment="0" attributes="0">
+ <EmptySpace min="21" pref="21" max="21" attributes="0"/>
+ <Component id="jPanel7" max="32767" attributes="0"/>
+ <EmptySpace max="-2" attributes="0"/>
+ </Group>
+ </Group>
+ </DimensionLayout>
+ <DimensionLayout dim="1">
+ <Group type="103" groupAlignment="0" attributes="0">
+ <Group type="102" alignment="0" attributes="0">
+ <Component id="savingCommentCheckBox" min="-2" max="-2" attributes="0"/>
+ <EmptySpace max="-2" attributes="0"/>
+ <Component id="jPanel7" min="-2" max="-2" attributes="0"/>
+ <EmptySpace max="32767" attributes="0"/>
+ </Group>
+ </Group>
+ </DimensionLayout>
+ </Layout>
+ <SubComponents>
+ <Component class="javax.swing.JCheckBox" name="savingCommentCheckBox">
+ <Properties>
+ <Property name="text" type="java.lang.String" value="コメントをダウンロードする"/>
+ </Properties>
+ </Component>
+ <Container class="javax.swing.JPanel" name="jPanel7">
+
+ <Layout>
+ <DimensionLayout dim="0">
+ <Group type="103" groupAlignment="0" attributes="0">
+ <Group type="102" alignment="0" attributes="0">
+ <Group type="103" groupAlignment="0" attributes="0">
+ <Group type="102" alignment="0" attributes="1">
+ <EmptySpace min="21" pref="21" max="21" attributes="0"/>
+ <Component id="jLabel1" min="-2" max="-2" attributes="0"/>
+ <EmptySpace max="-2" attributes="0"/>
+ <Component id="commentNumField" min="-2" pref="60" max="-2" attributes="0"/>
+ </Group>
+ <Component id="delCommentCheckBox" alignment="0" min="-2" max="-2" attributes="0"/>
+ <Component id="fixCommentNumCheckBox" alignment="0" min="-2" max="-2" attributes="0"/>
+ <Component id="commentSaveFolderRadioButton" alignment="0" min="-2" max="-2" attributes="0"/>
+ <Component id="commentSaveFileRadioButton" alignment="0" min="-2" max="-2" attributes="0"/>
+ <Group type="102" alignment="0" attributes="0">
+ <EmptySpace min="21" pref="21" max="-2" attributes="0"/>
+ <Group type="103" groupAlignment="0" attributes="0">
+ <Component id="commentSavedFileField" pref="194" max="32767" attributes="1"/>
+ <Component id="commentSavedFolderField" alignment="0" pref="194" max="32767" attributes="1"/>
+ </Group>
+ <EmptySpace max="-2" attributes="0"/>
+ <Group type="103" groupAlignment="1" attributes="0">
+ <Component id="showSavingCommentFolderDialogButton" min="-2" max="-2" attributes="0"/>
+ <Component id="showSavingCommentFileDialogButton" alignment="1" min="-2" max="-2" attributes="0"/>
+ </Group>
+ </Group>
+ </Group>
+ <EmptySpace max="-2" attributes="0"/>
+ </Group>
+ </Group>
+ </DimensionLayout>
+ <DimensionLayout dim="1">
+ <Group type="103" groupAlignment="0" attributes="0">
+ <Group type="102" alignment="0" attributes="0">
+ <EmptySpace max="-2" attributes="0"/>
+ <Component id="delCommentCheckBox" min="-2" max="-2" attributes="0"/>
+ <EmptySpace max="-2" attributes="0"/>
+ <Component id="fixCommentNumCheckBox" min="-2" max="-2" attributes="0"/>
+ <EmptySpace max="-2" attributes="0"/>
+ <Group type="103" groupAlignment="3" attributes="0">
+ <Component id="jLabel1" alignment="3" min="-2" max="-2" attributes="0"/>
+ <Component id="commentNumField" alignment="3" min="-2" max="-2" attributes="0"/>
+ </Group>
+ <EmptySpace max="-2" attributes="0"/>
+ <Component id="commentSaveFolderRadioButton" min="-2" max="-2" attributes="0"/>
+ <EmptySpace min="-2" max="-2" attributes="0"/>
+ <Group type="103" groupAlignment="3" attributes="0">
+ <Component id="commentSavedFolderField" alignment="3" min="-2" max="-2" attributes="0"/>
+ <Component id="showSavingCommentFolderDialogButton" alignment="3" min="-2" max="-2" attributes="0"/>
+ </Group>
+ <EmptySpace min="-2" max="-2" attributes="0"/>
+ <Component id="commentSaveFileRadioButton" min="-2" max="-2" attributes="0"/>
+ <EmptySpace min="-2" max="-2" attributes="0"/>
+ <Group type="103" groupAlignment="3" attributes="0">
+ <Component id="commentSavedFileField" alignment="3" min="-2" max="-2" attributes="0"/>
+ <Component id="showSavingCommentFileDialogButton" alignment="3" min="-2" max="-2" attributes="0"/>
+ </Group>
+ <EmptySpace min="-2" max="-2" attributes="0"/>
+ </Group>
+ </Group>
+ </DimensionLayout>
+ </Layout>
+ <SubComponents>
+ <Component class="javax.swing.JCheckBox" name="delCommentCheckBox">
+ <Properties>
+ <Property name="text" type="java.lang.String" value="変換後にコメントファイルを削除する"/>
+ </Properties>
+ </Component>
+ <Component class="javax.swing.JCheckBox" name="fixCommentNumCheckBox">
+ <Properties>
+ <Property name="text" type="java.lang.String" value="コメント取得数は自動で調整する"/>
+ </Properties>
+ </Component>
+ <Component class="javax.swing.JLabel" name="jLabel1">
+ <Properties>
+ <Property name="text" type="java.lang.String" value="取得コメント数"/>
+ </Properties>
+ </Component>
+ <Component class="javax.swing.JTextField" name="commentNumField">
+ </Component>
+ <Component class="javax.swing.JRadioButton" name="commentSaveFolderRadioButton">
+ <Properties>
+ <Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor">
+ <ComponentRef name="inputCommentSaveGroup"/>
+ </Property>
+ <Property name="text" type="java.lang.String" value="保存するフォルダを指定し、ファイル名は自動で決定する"/>
+ </Properties>
+ </Component>
+ <Component class="javax.swing.JTextField" name="commentSavedFolderField">
+ </Component>
+ <Component class="javax.swing.JButton" name="showSavingCommentFolderDialogButton">
+ <Properties>
+ <Property name="text" type="java.lang.String" value="参照..."/>
+ </Properties>
+ </Component>
+ <Component class="javax.swing.JRadioButton" name="commentSaveFileRadioButton">
+ <Properties>
+ <Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor">
+ <ComponentRef name="inputCommentSaveGroup"/>
+ </Property>
+ <Property name="text" type="java.lang.String" value="保存するファイル名を指定する"/>
+ </Properties>
+ </Component>
+ <Component class="javax.swing.JTextField" name="commentSavedFileField">
+ </Component>
+ <Component class="javax.swing.JButton" name="showSavingCommentFileDialogButton">
+ <Properties>
+ <Property name="text" type="java.lang.String" value="参照..."/>
+ </Properties>
+ </Component>
+ </SubComponents>
+ </Container>
+ </SubComponents>
+ </Container>
+ </SubComponents>
+ </Container>
+ <Container class="javax.swing.JPanel" name="inputTcommentTab">
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout$JTabbedPaneConstraintsDescription">
+ <JTabbedPaneConstraints tabName="入力投稿者コメント">
+ <Property name="tabTitle" type="java.lang.String" value="入力投稿者コメント"/>
+ </JTabbedPaneConstraints>
+ </Constraint>
+ </Constraints>
+
+ <Layout>
+ <DimensionLayout dim="0">
+ <Group type="103" groupAlignment="0" attributes="0">
+ <Group type="102" alignment="0" attributes="0">
+ <EmptySpace max="-2" attributes="0"/>
+ <Component id="tcommentSaveInfoPanel" max="32767" attributes="0"/>
+ <EmptySpace max="-2" attributes="0"/>
+ </Group>
+ </Group>
+ </DimensionLayout>
+ <DimensionLayout dim="1">
+ <Group type="103" groupAlignment="0" attributes="0">
+ <Group type="102" alignment="0" attributes="0">
+ <EmptySpace max="-2" attributes="0"/>
+ <Component id="tcommentSaveInfoPanel" min="-2" max="-2" attributes="0"/>
+ <EmptySpace pref="71" max="32767" attributes="0"/>
+ </Group>
+ </Group>
+ </DimensionLayout>
+ </Layout>
+ <SubComponents>
+ <Container class="javax.swing.JPanel" name="tcommentSaveInfoPanel">
+ <Properties>
+ <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
+ <Border info="org.netbeans.modules.form.compat2.border.TitledBorderInfo">
+ <TitledBorder title="投稿者コメント保存設定"/>
+ </Border>
+ </Property>
+ </Properties>
+
+ <Layout>
+ <DimensionLayout dim="0">
+ <Group type="103" groupAlignment="0" attributes="0">
+ <Group type="102" alignment="0" attributes="0">
+ <Component id="needDownloadTcomment" min="-2" max="-2" attributes="0"/>
+ <EmptySpace min="-2" pref="79" max="-2" attributes="0"/>
+ </Group>
+ <Group type="102" alignment="0" attributes="0">
+ <EmptySpace min="21" pref="21" max="21" attributes="0"/>
+ <Component id="jPanel8" max="32767" attributes="0"/>
+ <EmptySpace max="-2" attributes="0"/>
+ </Group>
+ </Group>
+ </DimensionLayout>
+ <DimensionLayout dim="1">
+ <Group type="103" groupAlignment="0" attributes="0">
+ <Group type="102" alignment="0" attributes="0">
+ <Component id="needDownloadTcomment" min="-2" max="-2" attributes="0"/>
+ <EmptySpace max="-2" attributes="0"/>
+ <Component id="jPanel8" min="-2" max="-2" attributes="0"/>
+ <EmptySpace max="32767" attributes="0"/>
+ </Group>
+ </Group>
+ </DimensionLayout>
+ </Layout>
+ <SubComponents>
+ <Component class="javax.swing.JCheckBox" name="needDownloadTcomment">
+ <Properties>
+ <Property name="text" type="java.lang.String" value="コメントをダウンロードする"/>
+ </Properties>
+ </Component>
+ <Container class="javax.swing.JPanel" name="jPanel8">
+
+ <Layout>
+ <DimensionLayout dim="0">
+ <Group type="103" groupAlignment="0" attributes="0">
+ <Group type="102" attributes="0">
+ <Group type="103" groupAlignment="0" attributes="0">
+ <Component id="delTcomment" alignment="0" min="-2" max="-2" attributes="0"/>
+ <Component id="tcommentSaveInFolder" alignment="0" min="-2" max="-2" attributes="0"/>
+ </Group>
+ <EmptySpace max="-2" attributes="0"/>
+ </Group>
+ <Group type="102" alignment="0" attributes="0">
+ <EmptySpace max="-2" attributes="0"/>
+ <Component id="tcommentFolder" pref="202" max="32767" attributes="1"/>
+ <EmptySpace min="-2" max="-2" attributes="0"/>
+ <Component id="tcoomentFolderChooserButton" min="-2" max="-2" attributes="0"/>
+ <EmptySpace min="-2" max="-2" attributes="0"/>
+ </Group>
+ <Group type="102" alignment="0" attributes="0">
+ <Component id="tcommentSaveToFile" min="-2" max="-2" attributes="0"/>
+ <EmptySpace max="-2" attributes="0"/>
+ </Group>
+ <Group type="102" alignment="0" attributes="0">
+ <EmptySpace max="-2" attributes="0"/>
+ <Component id="tcommentFile" pref="202" max="32767" attributes="1"/>
+ <EmptySpace min="-2" max="-2" attributes="0"/>
+ <Component id="tcommentFileChooserButton" min="-2" max="-2" attributes="0"/>
+ <EmptySpace min="-2" max="-2" attributes="0"/>
+ </Group>
+ </Group>
+ </DimensionLayout>
+ <DimensionLayout dim="1">
+ <Group type="103" groupAlignment="0" attributes="0">
+ <Group type="102" alignment="0" attributes="0">
+ <EmptySpace max="-2" attributes="0"/>
+ <Component id="delTcomment" min="-2" max="-2" attributes="0"/>
+ <EmptySpace max="-2" attributes="0"/>
+ <Component id="tcommentSaveInFolder" min="-2" max="-2" attributes="0"/>
+ <EmptySpace min="-2" max="-2" attributes="0"/>
+ <Group type="103" groupAlignment="3" attributes="0">
+ <Component id="tcommentFolder" alignment="3" min="-2" max="-2" attributes="0"/>
+ <Component id="tcoomentFolderChooserButton" alignment="3" min="-2" max="-2" attributes="0"/>
+ </Group>
+ <EmptySpace min="-2" max="-2" attributes="0"/>
+ <Component id="tcommentSaveToFile" min="-2" max="-2" attributes="0"/>
+ <EmptySpace min="-2" max="-2" attributes="0"/>
+ <Group type="103" groupAlignment="3" attributes="0">
+ <Component id="tcommentFile" alignment="3" min="-2" max="-2" attributes="0"/>
+ <Component id="tcommentFileChooserButton" alignment="3" min="-2" max="-2" attributes="0"/>
+ </Group>
+ <EmptySpace min="-2" max="-2" attributes="0"/>
+ </Group>
+ </Group>
+ </DimensionLayout>
+ </Layout>
+ <SubComponents>
+ <Component class="javax.swing.JCheckBox" name="delTcomment">
+ <Properties>
+ <Property name="text" type="java.lang.String" value="変換後にコメントファイルを削除する"/>
+ </Properties>
+ </Component>
+ <Component class="javax.swing.JRadioButton" name="tcommentSaveInFolder">
+ <Properties>
+ <Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor">
+ <ComponentRef name="inputTcommentSaveGroup"/>
+ </Property>
+ <Property name="text" type="java.lang.String" value="保存するフォルダを指定し、ファイル名は自動で決定する"/>
+ </Properties>
+ </Component>
+ <Component class="javax.swing.JTextField" name="tcommentFolder">
+ </Component>
+ <Component class="javax.swing.JButton" name="tcoomentFolderChooserButton">
+ <Properties>
+ <Property name="text" type="java.lang.String" value="参照..."/>
+ </Properties>
+ </Component>
+ <Component class="javax.swing.JRadioButton" name="tcommentSaveToFile">
+ <Properties>
+ <Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor">
+ <ComponentRef name="inputTcommentSaveGroup"/>
+ </Property>
+ <Property name="text" type="java.lang.String" value="保存するファイル名を指定する"/>
+ </Properties>
+ </Component>
+ <Component class="javax.swing.JTextField" name="tcommentFile">
+ </Component>
+ <Component class="javax.swing.JButton" name="tcommentFileChooserButton">
+ <Properties>
+ <Property name="text" type="java.lang.String" value="参照..."/>
+ </Properties>
+ </Component>
+ </SubComponents>
+ </Container>
+ </SubComponents>
+ </Container>
+ </SubComponents>
+ </Container>
+ <Container class="javax.swing.JPanel" name="outputVideoTab">
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout$JTabbedPaneConstraintsDescription">
+ <JTabbedPaneConstraints tabName="出力コメント付き動画">
+ <Property name="tabTitle" type="java.lang.String" value="出力コメント付き動画"/>
+ </JTabbedPaneConstraints>
+ </Constraint>
+ </Constraints>
+
+ <Layout>
+ <DimensionLayout dim="0">
+ <Group type="103" groupAlignment="0" attributes="0">
+ <Group type="102" alignment="0" attributes="0">
+ <EmptySpace max="-2" attributes="0"/>
+ <Component id="jPanel3" min="-2" max="-2" attributes="0"/>
+ <EmptySpace max="32767" attributes="0"/>
+ </Group>
+ </Group>
+ </DimensionLayout>
+ <DimensionLayout dim="1">
+ <Group type="103" groupAlignment="0" attributes="0">
+ <Group type="102" alignment="0" attributes="0">
+ <EmptySpace max="-2" attributes="0"/>
+ <Component id="jPanel3" min="-2" max="-2" attributes="0"/>
+ <EmptySpace pref="35" max="32767" attributes="0"/>
+ </Group>
+ </Group>
+ </DimensionLayout>
+ </Layout>
+ <SubComponents>
+ <Container class="javax.swing.JPanel" name="jPanel3">
+ <Properties>
+ <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
+ <Border info="org.netbeans.modules.form.compat2.border.TitledBorderInfo">
+ <TitledBorder title="コメント付き動画保存設定"/>
+ </Border>
+ </Property>
+ </Properties>
+
+ <Layout>
+ <DimensionLayout dim="0">
+ <Group type="103" groupAlignment="0" attributes="0">
+ <Group type="102" attributes="0">
+ <Group type="103" groupAlignment="0" attributes="0">
+ <Component id="savingConvertedVideoCheckBox" min="-2" max="-2" attributes="0"/>
+ <Group type="102" alignment="0" attributes="0">
+ <EmptySpace min="21" pref="21" max="21" attributes="0"/>
+ <Component id="jPanel5" min="-2" max="-2" attributes="0"/>
+ </Group>
+ </Group>
+ <EmptySpace min="-2" max="-2" attributes="0"/>
+ </Group>
+ </Group>
+ </DimensionLayout>
+ <DimensionLayout dim="1">
+ <Group type="103" groupAlignment="0" attributes="0">
+ <Group type="102" alignment="0" attributes="0">
+ <Component id="savingConvertedVideoCheckBox" min="-2" max="-2" attributes="0"/>
+ <EmptySpace max="-2" attributes="0"/>
+ <Component id="jPanel5" min="-2" max="-2" attributes="0"/>
+ <EmptySpace max="32767" attributes="0"/>
+ </Group>
+ </Group>
+ </DimensionLayout>
+ </Layout>
+ <SubComponents>
+ <Component class="javax.swing.JCheckBox" name="savingConvertedVideoCheckBox">
+ <Properties>
+ <Property name="text" type="java.lang.String" value="動画を変換する"/>
+ </Properties>
+ </Component>
+ <Container class="javax.swing.JPanel" name="jPanel5">
+
+ <Layout>
+ <DimensionLayout dim="0">
+ <Group type="103" groupAlignment="0" attributes="0">
+ <Group type="102" attributes="0">
+ <Group type="103" groupAlignment="0" attributes="0">
+ <Component id="addComment" alignment="0" min="-2" max="-2" attributes="0"/>
+ <Component id="addTcomment" alignment="0" min="-2" max="-2" attributes="0"/>
+ <Component id="convSaveFileRadioButton" alignment="0" min="-2" max="-2" attributes="0"/>
+ <Group type="102" alignment="1" attributes="0">
+ <EmptySpace min="-2" pref="21" max="-2" attributes="0"/>
+ <Component id="convertedVideoSavedFileField" pref="194" max="32767" attributes="0"/>
+ <EmptySpace max="-2" attributes="0"/>
+ <Component id="showSavingConvertedVideoFileDialogButton" min="-2" max="-2" attributes="0"/>
+ </Group>
+ <Group type="102" alignment="0" attributes="1">
+ <EmptySpace min="21" pref="21" max="21" attributes="0"/>
+ <Group type="103" groupAlignment="0" attributes="0">
+ <Group type="102" alignment="1" attributes="0">
+ <Component id="convertedVideoSavedFolderField" pref="194" max="32767" attributes="0"/>
+ <EmptySpace max="-2" attributes="0"/>
+ <Component id="showSavingConvertedVideoFolderDialogButton" min="-2" max="-2" attributes="0"/>
+ </Group>
+ <Component id="notAddVideoIdConvVideoCheckBox" alignment="0" min="-2" max="-2" attributes="0"/>
+ </Group>
+ </Group>
+ <Component id="convSaveFolderRadioButton" alignment="0" min="-2" max="-2" attributes="0"/>
+ </Group>
+ <EmptySpace max="-2" attributes="0"/>
+ </Group>
+ </Group>
+ </DimensionLayout>
+ <DimensionLayout dim="1">
+ <Group type="103" groupAlignment="0" attributes="0">
+ <Group type="102" alignment="0" attributes="0">
+ <Component id="addComment" min="-2" max="-2" attributes="0"/>
+ <EmptySpace max="-2" attributes="0"/>
+ <Component id="addTcomment" min="-2" max="-2" attributes="0"/>
+ <EmptySpace max="-2" attributes="0"/>
+ <Component id="convSaveFolderRadioButton" min="-2" max="-2" attributes="0"/>
+ <EmptySpace max="-2" attributes="0"/>
+ <Component id="notAddVideoIdConvVideoCheckBox" min="-2" max="-2" attributes="0"/>
+ <EmptySpace max="-2" attributes="0"/>
+ <Group type="103" groupAlignment="3" attributes="0">
+ <Component id="convertedVideoSavedFolderField" alignment="3" min="-2" max="-2" attributes="0"/>
+ <Component id="showSavingConvertedVideoFolderDialogButton" alignment="3" min="-2" max="-2" attributes="0"/>
+ </Group>
+ <EmptySpace max="-2" attributes="0"/>
+ <Component id="convSaveFileRadioButton" min="-2" max="-2" attributes="0"/>
+ <EmptySpace max="-2" attributes="0"/>
+ <Group type="103" groupAlignment="3" attributes="0">
+ <Component id="convertedVideoSavedFileField" alignment="3" min="-2" max="-2" attributes="0"/>
+ <Component id="showSavingConvertedVideoFileDialogButton" alignment="3" min="-2" max="-2" attributes="0"/>
+ </Group>
+ <EmptySpace max="32767" attributes="0"/>
+ </Group>
+ </Group>
+ </DimensionLayout>
+ </Layout>
+ <SubComponents>
+ <Component class="javax.swing.JCheckBox" name="addComment">
+ <Properties>
+ <Property name="text" type="java.lang.String" value="コメントをつける"/>
+ </Properties>
+ </Component>
+ <Component class="javax.swing.JCheckBox" name="addTcomment">
+ <Properties>
+ <Property name="text" type="java.lang.String" value="投稿者コメントをつける"/>
+ </Properties>
+ </Component>
+ <Component class="javax.swing.JRadioButton" name="convSaveFolderRadioButton">
+ <Properties>
+ <Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor">
+ <ComponentRef name="outputVideoSaveGroup"/>
+ </Property>
+ <Property name="text" type="java.lang.String" value="保存するフォルダを指定し、ファイル名は自動で決定する"/>
+ </Properties>
+ </Component>
+ <Component class="javax.swing.JCheckBox" name="notAddVideoIdConvVideoCheckBox">
+ <Properties>
+ <Property name="text" type="java.lang.String" value="ファイル名に動画IDを付加しない"/>
+ </Properties>
+ </Component>
+ <Component class="javax.swing.JTextField" name="convertedVideoSavedFolderField">
+ </Component>
+ <Component class="javax.swing.JButton" name="showSavingConvertedVideoFolderDialogButton">
+ <Properties>
+ <Property name="text" type="java.lang.String" value="参照..."/>
+ </Properties>
+ </Component>
+ <Component class="javax.swing.JRadioButton" name="convSaveFileRadioButton">
+ <Properties>
+ <Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor">
+ <ComponentRef name="outputVideoSaveGroup"/>
+ </Property>
+ <Property name="text" type="java.lang.String" value="保存するファイル名を指定する"/>
+ </Properties>
+ </Component>
+ <Component class="javax.swing.JTextField" name="convertedVideoSavedFileField">
+ </Component>
+ <Component class="javax.swing.JButton" name="showSavingConvertedVideoFileDialogButton">
+ <Properties>
+ <Property name="text" type="java.lang.String" value="参照..."/>
+ </Properties>
+ </Component>
+ </SubComponents>
+ </Container>
+ </SubComponents>
+ </Container>
+ </SubComponents>
+ </Container>
+ </SubComponents>
+ </Container>
+ </SubComponents>
+</Form>
--- /dev/null
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+
+/*
+ * SavePanel.java
+ *
+ * Created on 2009/12/04, 21:06:09
+ */
+package saccubus;
+
+import java.awt.GridLayout;
+import javax.swing.JButton;
+import javax.swing.JCheckBox;
+import javax.swing.JRadioButton;
+import javax.swing.JTextField;
+
+/**
+ *
+ * @author yuki
+ */
+public class SavePanel extends javax.swing.JPanel {
+
+ private final VideoSaveInfoPanel videoSaveInfoPanel = new VideoSaveInfoPanel();
+
+ /** Creates new form SavePanel */
+ public SavePanel() {
+ initComponents();
+ inputVideoTab.setLayout(new GridLayout());
+ inputVideoTab.add(videoSaveInfoPanel);
+ }
+
+ /** This method is called from within the constructor to
+ * initialize the form.
+ * WARNING: Do NOT modify this code. The content of this method is
+ * always regenerated by the Form Editor.
+ */
+ @SuppressWarnings("unchecked")
+ // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
+ private void initComponents() {
+
+ inputCommentSaveGroup = new javax.swing.ButtonGroup();
+ outputVideoSaveGroup = new javax.swing.ButtonGroup();
+ inputTcommentSaveGroup = new javax.swing.ButtonGroup();
+ jTabbedPane1 = new javax.swing.JTabbedPane();
+ inputVideoTab = new javax.swing.JPanel();
+ inputCommentTab = new javax.swing.JPanel();
+ commentSaveInfoPanel = new javax.swing.JPanel();
+ savingCommentCheckBox = new javax.swing.JCheckBox();
+ jPanel7 = new javax.swing.JPanel();
+ delCommentCheckBox = new javax.swing.JCheckBox();
+ fixCommentNumCheckBox = new javax.swing.JCheckBox();
+ jLabel1 = new javax.swing.JLabel();
+ commentNumField = new javax.swing.JTextField();
+ commentSaveFolderRadioButton = new javax.swing.JRadioButton();
+ commentSavedFolderField = new javax.swing.JTextField();
+ showSavingCommentFolderDialogButton = new javax.swing.JButton();
+ commentSaveFileRadioButton = new javax.swing.JRadioButton();
+ commentSavedFileField = new javax.swing.JTextField();
+ showSavingCommentFileDialogButton = new javax.swing.JButton();
+ inputTcommentTab = new javax.swing.JPanel();
+ tcommentSaveInfoPanel = new javax.swing.JPanel();
+ needDownloadTcomment = new javax.swing.JCheckBox();
+ jPanel8 = new javax.swing.JPanel();
+ delTcomment = new javax.swing.JCheckBox();
+ tcommentSaveInFolder = new javax.swing.JRadioButton();
+ tcommentFolder = new javax.swing.JTextField();
+ tcoomentFolderChooserButton = new javax.swing.JButton();
+ tcommentSaveToFile = new javax.swing.JRadioButton();
+ tcommentFile = new javax.swing.JTextField();
+ tcommentFileChooserButton = new javax.swing.JButton();
+ outputVideoTab = new javax.swing.JPanel();
+ jPanel3 = new javax.swing.JPanel();
+ savingConvertedVideoCheckBox = new javax.swing.JCheckBox();
+ jPanel5 = new javax.swing.JPanel();
+ addComment = new javax.swing.JCheckBox();
+ addTcomment = new javax.swing.JCheckBox();
+ convSaveFolderRadioButton = new javax.swing.JRadioButton();
+ notAddVideoIdConvVideoCheckBox = new javax.swing.JCheckBox();
+ convertedVideoSavedFolderField = new javax.swing.JTextField();
+ showSavingConvertedVideoFolderDialogButton = new javax.swing.JButton();
+ convSaveFileRadioButton = new javax.swing.JRadioButton();
+ convertedVideoSavedFileField = new javax.swing.JTextField();
+ showSavingConvertedVideoFileDialogButton = new javax.swing.JButton();
+
+ javax.swing.GroupLayout inputVideoTabLayout = new javax.swing.GroupLayout(inputVideoTab);
+ inputVideoTab.setLayout(inputVideoTabLayout);
+ inputVideoTabLayout.setHorizontalGroup(
+ inputVideoTabLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addGap(0, 369, Short.MAX_VALUE)
+ );
+ inputVideoTabLayout.setVerticalGroup(
+ inputVideoTabLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addGap(0, 270, Short.MAX_VALUE)
+ );
+
+ jTabbedPane1.addTab("\93ü\97Í\93®\89æ", inputVideoTab);
+
+ commentSaveInfoPanel.setBorder(javax.swing.BorderFactory.createTitledBorder("\83R\83\81\83\93\83g\95Û\91¶\90Ý\92è"));
+
+ savingCommentCheckBox.setText("\83R\83\81\83\93\83g\82ð\83_\83E\83\93\83\8d\81[\83h\82·\82é");
+
+ delCommentCheckBox.setText("\95Ï\8a·\8cã\82É\83R\83\81\83\93\83g\83t\83@\83C\83\8b\82ð\8dí\8f\9c\82·\82é");
+
+ fixCommentNumCheckBox.setText("\83R\83\81\83\93\83g\8eæ\93¾\90\94\82Í\8e©\93®\82Å\92²\90®\82·\82é");
+
+ jLabel1.setText("\8eæ\93¾\83R\83\81\83\93\83g\90\94");
+
+ inputCommentSaveGroup.add(commentSaveFolderRadioButton);
+ commentSaveFolderRadioButton.setText("\95Û\91¶\82·\82é\83t\83H\83\8b\83_\82ð\8ew\92è\82µ\81A\83t\83@\83C\83\8b\96¼\82Í\8e©\93®\82Å\8c\88\92è\82·\82é");
+
+ showSavingCommentFolderDialogButton.setText("\8eQ\8fÆ...");
+
+ inputCommentSaveGroup.add(commentSaveFileRadioButton);
+ commentSaveFileRadioButton.setText("\95Û\91¶\82·\82é\83t\83@\83C\83\8b\96¼\82ð\8ew\92è\82·\82é");
+
+ showSavingCommentFileDialogButton.setText("\8eQ\8fÆ...");
+
+ javax.swing.GroupLayout jPanel7Layout = new javax.swing.GroupLayout(jPanel7);
+ jPanel7.setLayout(jPanel7Layout);
+ jPanel7Layout.setHorizontalGroup(
+ jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addGroup(jPanel7Layout.createSequentialGroup()
+ .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addGroup(jPanel7Layout.createSequentialGroup()
+ .addGap(21, 21, 21)
+ .addComponent(jLabel1)
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+ .addComponent(commentNumField, javax.swing.GroupLayout.PREFERRED_SIZE, 60, javax.swing.GroupLayout.PREFERRED_SIZE))
+ .addComponent(delCommentCheckBox)
+ .addComponent(fixCommentNumCheckBox)
+ .addComponent(commentSaveFolderRadioButton)
+ .addComponent(commentSaveFileRadioButton)
+ .addGroup(jPanel7Layout.createSequentialGroup()
+ .addGap(21, 21, 21)
+ .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addComponent(commentSavedFileField, javax.swing.GroupLayout.DEFAULT_SIZE, 194, Short.MAX_VALUE)
+ .addComponent(commentSavedFolderField, javax.swing.GroupLayout.DEFAULT_SIZE, 194, Short.MAX_VALUE))
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+ .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
+ .addComponent(showSavingCommentFolderDialogButton)
+ .addComponent(showSavingCommentFileDialogButton))))
+ .addContainerGap())
+ );
+ jPanel7Layout.setVerticalGroup(
+ jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addGroup(jPanel7Layout.createSequentialGroup()
+ .addContainerGap()
+ .addComponent(delCommentCheckBox)
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+ .addComponent(fixCommentNumCheckBox)
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+ .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
+ .addComponent(jLabel1)
+ .addComponent(commentNumField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+ .addComponent(commentSaveFolderRadioButton)
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+ .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
+ .addComponent(commentSavedFolderField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addComponent(showSavingCommentFolderDialogButton))
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+ .addComponent(commentSaveFileRadioButton)
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+ .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
+ .addComponent(commentSavedFileField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addComponent(showSavingCommentFileDialogButton))
+ .addContainerGap())
+ );
+
+ javax.swing.GroupLayout commentSaveInfoPanelLayout = new javax.swing.GroupLayout(commentSaveInfoPanel);
+ commentSaveInfoPanel.setLayout(commentSaveInfoPanelLayout);
+ commentSaveInfoPanelLayout.setHorizontalGroup(
+ commentSaveInfoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addGroup(commentSaveInfoPanelLayout.createSequentialGroup()
+ .addComponent(savingCommentCheckBox)
+ .addGap(79, 79, 79))
+ .addGroup(commentSaveInfoPanelLayout.createSequentialGroup()
+ .addGap(21, 21, 21)
+ .addComponent(jPanel7, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
+ .addContainerGap())
+ );
+ commentSaveInfoPanelLayout.setVerticalGroup(
+ commentSaveInfoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addGroup(commentSaveInfoPanelLayout.createSequentialGroup()
+ .addComponent(savingCommentCheckBox)
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+ .addComponent(jPanel7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
+ );
+
+ javax.swing.GroupLayout inputCommentTabLayout = new javax.swing.GroupLayout(inputCommentTab);
+ inputCommentTab.setLayout(inputCommentTabLayout);
+ inputCommentTabLayout.setHorizontalGroup(
+ inputCommentTabLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addGroup(inputCommentTabLayout.createSequentialGroup()
+ .addContainerGap()
+ .addComponent(commentSaveInfoPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
+ .addContainerGap())
+ );
+ inputCommentTabLayout.setVerticalGroup(
+ inputCommentTabLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addGroup(inputCommentTabLayout.createSequentialGroup()
+ .addContainerGap()
+ .addComponent(commentSaveInfoPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addContainerGap(27, Short.MAX_VALUE))
+ );
+
+ jTabbedPane1.addTab("\93ü\97Í\83R\83\81\83\93\83g", inputCommentTab);
+
+ tcommentSaveInfoPanel.setBorder(javax.swing.BorderFactory.createTitledBorder("\93\8a\8de\8eÒ\83R\83\81\83\93\83g\95Û\91¶\90Ý\92è"));
+
+ needDownloadTcomment.setText("\83R\83\81\83\93\83g\82ð\83_\83E\83\93\83\8d\81[\83h\82·\82é");
+
+ delTcomment.setText("\95Ï\8a·\8cã\82É\83R\83\81\83\93\83g\83t\83@\83C\83\8b\82ð\8dí\8f\9c\82·\82é");
+
+ inputTcommentSaveGroup.add(tcommentSaveInFolder);
+ tcommentSaveInFolder.setText("\95Û\91¶\82·\82é\83t\83H\83\8b\83_\82ð\8ew\92è\82µ\81A\83t\83@\83C\83\8b\96¼\82Í\8e©\93®\82Å\8c\88\92è\82·\82é");
+
+ tcoomentFolderChooserButton.setText("\8eQ\8fÆ...");
+
+ inputTcommentSaveGroup.add(tcommentSaveToFile);
+ tcommentSaveToFile.setText("\95Û\91¶\82·\82é\83t\83@\83C\83\8b\96¼\82ð\8ew\92è\82·\82é");
+
+ tcommentFileChooserButton.setText("\8eQ\8fÆ...");
+
+ javax.swing.GroupLayout jPanel8Layout = new javax.swing.GroupLayout(jPanel8);
+ jPanel8.setLayout(jPanel8Layout);
+ jPanel8Layout.setHorizontalGroup(
+ jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addGroup(jPanel8Layout.createSequentialGroup()
+ .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addComponent(delTcomment)
+ .addComponent(tcommentSaveInFolder))
+ .addContainerGap())
+ .addGroup(jPanel8Layout.createSequentialGroup()
+ .addContainerGap()
+ .addComponent(tcommentFolder, javax.swing.GroupLayout.DEFAULT_SIZE, 202, Short.MAX_VALUE)
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+ .addComponent(tcoomentFolderChooserButton)
+ .addContainerGap())
+ .addGroup(jPanel8Layout.createSequentialGroup()
+ .addComponent(tcommentSaveToFile)
+ .addContainerGap())
+ .addGroup(jPanel8Layout.createSequentialGroup()
+ .addContainerGap()
+ .addComponent(tcommentFile, javax.swing.GroupLayout.DEFAULT_SIZE, 202, Short.MAX_VALUE)
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+ .addComponent(tcommentFileChooserButton)
+ .addContainerGap())
+ );
+ jPanel8Layout.setVerticalGroup(
+ jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addGroup(jPanel8Layout.createSequentialGroup()
+ .addContainerGap()
+ .addComponent(delTcomment)
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+ .addComponent(tcommentSaveInFolder)
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+ .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
+ .addComponent(tcommentFolder, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addComponent(tcoomentFolderChooserButton))
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+ .addComponent(tcommentSaveToFile)
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+ .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
+ .addComponent(tcommentFile, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addComponent(tcommentFileChooserButton))
+ .addContainerGap())
+ );
+
+ javax.swing.GroupLayout tcommentSaveInfoPanelLayout = new javax.swing.GroupLayout(tcommentSaveInfoPanel);
+ tcommentSaveInfoPanel.setLayout(tcommentSaveInfoPanelLayout);
+ tcommentSaveInfoPanelLayout.setHorizontalGroup(
+ tcommentSaveInfoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addGroup(tcommentSaveInfoPanelLayout.createSequentialGroup()
+ .addComponent(needDownloadTcomment)
+ .addGap(79, 79, 79))
+ .addGroup(tcommentSaveInfoPanelLayout.createSequentialGroup()
+ .addGap(21, 21, 21)
+ .addComponent(jPanel8, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
+ .addContainerGap())
+ );
+ tcommentSaveInfoPanelLayout.setVerticalGroup(
+ tcommentSaveInfoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addGroup(tcommentSaveInfoPanelLayout.createSequentialGroup()
+ .addComponent(needDownloadTcomment)
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+ .addComponent(jPanel8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
+ );
+
+ javax.swing.GroupLayout inputTcommentTabLayout = new javax.swing.GroupLayout(inputTcommentTab);
+ inputTcommentTab.setLayout(inputTcommentTabLayout);
+ inputTcommentTabLayout.setHorizontalGroup(
+ inputTcommentTabLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addGroup(inputTcommentTabLayout.createSequentialGroup()
+ .addContainerGap()
+ .addComponent(tcommentSaveInfoPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
+ .addContainerGap())
+ );
+ inputTcommentTabLayout.setVerticalGroup(
+ inputTcommentTabLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addGroup(inputTcommentTabLayout.createSequentialGroup()
+ .addContainerGap()
+ .addComponent(tcommentSaveInfoPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addContainerGap(71, Short.MAX_VALUE))
+ );
+
+ jTabbedPane1.addTab("\93ü\97Í\93\8a\8de\8eÒ\83R\83\81\83\93\83g", inputTcommentTab);
+
+ jPanel3.setBorder(javax.swing.BorderFactory.createTitledBorder("\83R\83\81\83\93\83g\95t\82«\93®\89æ\95Û\91¶\90Ý\92è"));
+
+ savingConvertedVideoCheckBox.setText("\93®\89æ\82ð\95Ï\8a·\82·\82é");
+
+ addComment.setText("\83R\83\81\83\93\83g\82ð\82Â\82¯\82é");
+
+ addTcomment.setText("\93\8a\8de\8eÒ\83R\83\81\83\93\83g\82ð\82Â\82¯\82é");
+
+ outputVideoSaveGroup.add(convSaveFolderRadioButton);
+ convSaveFolderRadioButton.setText("\95Û\91¶\82·\82é\83t\83H\83\8b\83_\82ð\8ew\92è\82µ\81A\83t\83@\83C\83\8b\96¼\82Í\8e©\93®\82Å\8c\88\92è\82·\82é");
+
+ notAddVideoIdConvVideoCheckBox.setText("\83t\83@\83C\83\8b\96¼\82É\93®\89æID\82ð\95t\89Á\82µ\82È\82¢");
+
+ showSavingConvertedVideoFolderDialogButton.setText("\8eQ\8fÆ...");
+
+ outputVideoSaveGroup.add(convSaveFileRadioButton);
+ convSaveFileRadioButton.setText("\95Û\91¶\82·\82é\83t\83@\83C\83\8b\96¼\82ð\8ew\92è\82·\82é");
+
+ showSavingConvertedVideoFileDialogButton.setText("\8eQ\8fÆ...");
+
+ javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);
+ jPanel5.setLayout(jPanel5Layout);
+ jPanel5Layout.setHorizontalGroup(
+ jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addGroup(jPanel5Layout.createSequentialGroup()
+ .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addComponent(addComment)
+ .addComponent(addTcomment)
+ .addComponent(convSaveFileRadioButton)
+ .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel5Layout.createSequentialGroup()
+ .addGap(21, 21, 21)
+ .addComponent(convertedVideoSavedFileField, javax.swing.GroupLayout.DEFAULT_SIZE, 194, Short.MAX_VALUE)
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+ .addComponent(showSavingConvertedVideoFileDialogButton))
+ .addGroup(jPanel5Layout.createSequentialGroup()
+ .addGap(21, 21, 21)
+ .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel5Layout.createSequentialGroup()
+ .addComponent(convertedVideoSavedFolderField, javax.swing.GroupLayout.DEFAULT_SIZE, 194, Short.MAX_VALUE)
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+ .addComponent(showSavingConvertedVideoFolderDialogButton))
+ .addComponent(notAddVideoIdConvVideoCheckBox)))
+ .addComponent(convSaveFolderRadioButton))
+ .addContainerGap())
+ );
+ jPanel5Layout.setVerticalGroup(
+ jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addGroup(jPanel5Layout.createSequentialGroup()
+ .addComponent(addComment)
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+ .addComponent(addTcomment)
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+ .addComponent(convSaveFolderRadioButton)
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+ .addComponent(notAddVideoIdConvVideoCheckBox)
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+ .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
+ .addComponent(convertedVideoSavedFolderField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addComponent(showSavingConvertedVideoFolderDialogButton))
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+ .addComponent(convSaveFileRadioButton)
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+ .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
+ .addComponent(convertedVideoSavedFileField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addComponent(showSavingConvertedVideoFileDialogButton))
+ .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
+ );
+
+ javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
+ jPanel3.setLayout(jPanel3Layout);
+ jPanel3Layout.setHorizontalGroup(
+ jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addGroup(jPanel3Layout.createSequentialGroup()
+ .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addComponent(savingConvertedVideoCheckBox)
+ .addGroup(jPanel3Layout.createSequentialGroup()
+ .addGap(21, 21, 21)
+ .addComponent(jPanel5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
+ .addContainerGap())
+ );
+ jPanel3Layout.setVerticalGroup(
+ jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addGroup(jPanel3Layout.createSequentialGroup()
+ .addComponent(savingConvertedVideoCheckBox)
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+ .addComponent(jPanel5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
+ );
+
+ javax.swing.GroupLayout outputVideoTabLayout = new javax.swing.GroupLayout(outputVideoTab);
+ outputVideoTab.setLayout(outputVideoTabLayout);
+ outputVideoTabLayout.setHorizontalGroup(
+ outputVideoTabLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addGroup(outputVideoTabLayout.createSequentialGroup()
+ .addContainerGap()
+ .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
+ );
+ outputVideoTabLayout.setVerticalGroup(
+ outputVideoTabLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addGroup(outputVideoTabLayout.createSequentialGroup()
+ .addContainerGap()
+ .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addContainerGap(35, Short.MAX_VALUE))
+ );
+
+ jTabbedPane1.addTab("\8fo\97Í\83R\83\81\83\93\83g\95t\82«\93®\89æ", outputVideoTab);
+
+ javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
+ this.setLayout(layout);
+ layout.setHorizontalGroup(
+ layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addComponent(jTabbedPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 374, Short.MAX_VALUE)
+ );
+ layout.setVerticalGroup(
+ layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addComponent(jTabbedPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 297, Short.MAX_VALUE)
+ );
+ }// </editor-fold>//GEN-END:initComponents
+ // Variables declaration - do not modify//GEN-BEGIN:variables
+ private javax.swing.JCheckBox addComment;
+ private javax.swing.JCheckBox addTcomment;
+ private javax.swing.JTextField commentNumField;
+ private javax.swing.JRadioButton commentSaveFileRadioButton;
+ private javax.swing.JRadioButton commentSaveFolderRadioButton;
+ private javax.swing.JPanel commentSaveInfoPanel;
+ private javax.swing.JTextField commentSavedFileField;
+ private javax.swing.JTextField commentSavedFolderField;
+ private javax.swing.JRadioButton convSaveFileRadioButton;
+ private javax.swing.JRadioButton convSaveFolderRadioButton;
+ private javax.swing.JTextField convertedVideoSavedFileField;
+ private javax.swing.JTextField convertedVideoSavedFolderField;
+ private javax.swing.JCheckBox delCommentCheckBox;
+ private javax.swing.JCheckBox delTcomment;
+ private javax.swing.JCheckBox fixCommentNumCheckBox;
+ private javax.swing.ButtonGroup inputCommentSaveGroup;
+ private javax.swing.JPanel inputCommentTab;
+ private javax.swing.ButtonGroup inputTcommentSaveGroup;
+ private javax.swing.JPanel inputTcommentTab;
+ private javax.swing.JPanel inputVideoTab;
+ private javax.swing.JLabel jLabel1;
+ private javax.swing.JPanel jPanel3;
+ private javax.swing.JPanel jPanel5;
+ private javax.swing.JPanel jPanel7;
+ private javax.swing.JPanel jPanel8;
+ private javax.swing.JTabbedPane jTabbedPane1;
+ private javax.swing.JCheckBox needDownloadTcomment;
+ private javax.swing.JCheckBox notAddVideoIdConvVideoCheckBox;
+ private javax.swing.ButtonGroup outputVideoSaveGroup;
+ private javax.swing.JPanel outputVideoTab;
+ private javax.swing.JCheckBox savingCommentCheckBox;
+ private javax.swing.JCheckBox savingConvertedVideoCheckBox;
+ private javax.swing.JButton showSavingCommentFileDialogButton;
+ private javax.swing.JButton showSavingCommentFolderDialogButton;
+ private javax.swing.JButton showSavingConvertedVideoFileDialogButton;
+ private javax.swing.JButton showSavingConvertedVideoFolderDialogButton;
+ private javax.swing.JTextField tcommentFile;
+ private javax.swing.JButton tcommentFileChooserButton;
+ private javax.swing.JTextField tcommentFolder;
+ private javax.swing.JRadioButton tcommentSaveInFolder;
+ private javax.swing.JPanel tcommentSaveInfoPanel;
+ private javax.swing.JRadioButton tcommentSaveToFile;
+ private javax.swing.JButton tcoomentFolderChooserButton;
+ // End of variables declaration//GEN-END:variables
+
+ /** @return \95Û\91¶\90Ý\92è-\93ü\97Í\83R\83\81\83\93\83g\81u\83R\83\81\83\93\83g\82ð\83_\83E\83\93\83\8d\81[\83h\82·\82é\81v\83`\83F\83b\83N\83{\83b\83N\83X. */
+ JCheckBox getSavingCommentCheckBox() {
+ return savingCommentCheckBox;
+ }
+
+ /** @return \95Û\91¶\90Ý\92è-\93ü\97Í\83R\83\81\83\93\83g\81u\95Ï\8a·\8cã\82É\83R\83\81\83\93\83g\83t\83@\83C\83\8b\82ð\8dí\8f\9c\82·\82é\81v\83`\83F\83b\83N\83{\83b\83N\83X. */
+ JCheckBox getDelCommentCheckBox() {
+ return delCommentCheckBox;
+ }
+
+ /** @return \95Û\91¶\90Ý\92è-\93ü\97Í\83R\83\81\83\93\83g\81u\83R\83\81\83\93\83g\8eæ\93¾\90\94\82Í\8e©\93®\82Å\92²\90®\82·\82é\81v\83`\83F\83b\83N\83{\83b\83N\83X. */
+ JCheckBox getFixCommentNumCheckBox() {
+ return fixCommentNumCheckBox;
+ }
+
+ /** @return \95Û\91¶\90Ý\92è-\93ü\97Í\83R\83\81\83\93\83g\81u\8eæ\93¾\83R\83\81\83\93\83g\90\94\81v\83e\83L\83X\83g\83t\83B\81[\83\8b\83h. */
+ JTextField getCommentNumField() {
+ return commentNumField;
+ }
+
+ /** @return \95Û\91¶\90Ý\92è-\93ü\97Í\83R\83\81\83\93\83g\81u\95Û\91¶\82·\82é\83t\83H\83\8b\83_\82ð\8ew\92è\82µ\81A\83t\83@\83C\83\8b\96¼\82Í\8e©\93®\82Å\8c\88\92è\82·\82é\81v\83\89\83W\83I\83{\83^\83\93. */
+ JRadioButton getCommentSaveFolderRadioButton() {
+ return commentSaveFolderRadioButton;
+ }
+
+ /** @return \95Û\91¶\90Ý\92è-\93ü\97Í\83R\83\81\83\93\83g\81u\83t\83@\83C\83\8b\96¼\82É\93®\89æID\82ð\95t\89Á\82µ\82È\82¢\81v\83`\83F\83b\83N\83{\83b\83N\83X. */
+ JCheckBox getNotAddVideoIdConvVideoCheckBox() {
+ return notAddVideoIdConvVideoCheckBox;
+ }
+
+ /** @return \95Û\91¶\90Ý\92è-\93ü\97Í\83R\83\81\83\93\83g\81u\95Û\91¶\82·\82é\83t\83H\83\8b\83_\82ð\8ew\92è\82µ\81A\83t\83@\83C\83\8b\96¼\82Í\8e©\93®\82Å\8c\88\92è\82·\82é\81v\83e\83L\83X\83g\83t\83B\81[\83\8b\83h. */
+ JTextField getCommentSavedFolderField() {
+ return commentSavedFolderField;
+ }
+
+ /** @return \95Û\91¶\90Ý\92è-\93ü\97Í\83R\83\81\83\93\83g\81u\95Û\91¶\82·\82é\83t\83H\83\8b\83_\82ð\8ew\92è\82µ\81A\83t\83@\83C\83\8b\96¼\82Í\8e©\93®\82Å\8c\88\92è\82·\82é\81v\83t\83@\83C\83\8b\83`\83\85\81[\83U\83{\83^\83\93. */
+ JButton getShowSavingCommentFolderDialogButton() {
+ return showSavingCommentFolderDialogButton;
+ }
+
+ /** @return \95Û\91¶\90Ý\92è-\93ü\97Í\83R\83\81\83\93\83g\81u\95Û\91¶\82·\82é\83t\83@\83C\83\8b\96¼\82ð\8ew\92è\82·\82é\81v\83\89\83W\83I\83{\83^\83\93. */
+ JRadioButton getCommentSaveFileRadioButton() {
+ return commentSaveFileRadioButton;
+ }
+
+ /** @return \95Û\91¶\90Ý\92è-\93ü\97Í\83R\83\81\83\93\83g\81u\95Û\91¶\82·\82é\83t\83@\83C\83\8b\96¼\82ð\8ew\92è\82·\82é\81v\83e\83L\83X\83g\83t\83B\81[\83\8b\83h. */
+ JTextField getCommentSavedFileField() {
+ return commentSavedFileField;
+ }
+
+ /** @return \95Û\91¶\90Ý\92è-\93ü\97Í\83R\83\81\83\93\83g\81u\95Û\91¶\82·\82é\83t\83@\83C\83\8b\96¼\82ð\8ew\92è\82·\82é\81v\83t\83@\83C\83\8b\83`\83\85\81[\83U\83{\83^\83\93. */
+ JButton getShowSavingCommentFileDialogButton() {
+ return showSavingCommentFileDialogButton;
+ }
+
+ /** @return \95Û\91¶\90Ý\92è-\8fo\97Í\83R\83\81\83\93\83g\95t\82«\93®\89æ\81u\93®\89æ\82ð\95Ï\8a·\82·\82é\81v\83`\83F\83b\83N\83{\83b\83N\83X. */
+ JCheckBox getSavingConvertedVideoCheckBox() {
+ return savingConvertedVideoCheckBox;
+ }
+
+ /** @return \95Û\91¶\90Ý\92è-\8fo\97Í\83R\83\81\83\93\83g\95t\82«\93®\89æ\81u\83R\83\81\83\93\83g\82ð\82Â\82¯\82é\81v\83`\83F\83b\83N\83{\83b\83N\83X. */
+ JCheckBox getAddCommentCheckBox() {
+ return addComment;
+ }
+
+ /** @return \95Û\91¶\90Ý\92è-\8fo\97Í\83R\83\81\83\93\83g\95t\82«\93®\89æ\81u\93\8a\8de\8eÒ\83R\83\81\83\93\83g\82ð\82Â\82¯\82é\81v\83`\83F\83b\83N\83{\83b\83N\83X. */
+ JCheckBox getAddTcommentCheckBox() {
+ return addTcomment;
+ }
+
+ /** @return \95Û\91¶\90Ý\92è-\8fo\97Í\83R\83\81\83\93\83g\95t\82«\93®\89æ\81u\95Û\91¶\82·\82é\83t\83H\83\8b\83_\82ð\8ew\92è\82µ\81A\83t\83@\83C\83\8b\96¼\82Í\8e©\93®\82Å\8c\88\92è\82·\82é\81v\83\89\83W\83I\83{\83^\83\93. */
+ JRadioButton getConvSaveFolderRadioButton() {
+ return convSaveFolderRadioButton;
+ }
+
+ /** @return \95Û\91¶\90Ý\92è-\8fo\97Í\83R\83\81\83\93\83g\95t\82«\93®\89æ\81u\95Û\91¶\82·\82é\83t\83H\83\8b\83_\82ð\8ew\92è\82µ\81A\83t\83@\83C\83\8b\96¼\82Í\8e©\93®\82Å\8c\88\92è\82·\82é\81v\83e\83L\83X\83g\83t\83B\81[\83\8b\83h. */
+ JTextField getConvertedVideoSavedFolderField() {
+ return convertedVideoSavedFolderField;
+ }
+
+ /** @return \95Û\91¶\90Ý\92è-\8fo\97Í\83R\83\81\83\93\83g\95t\82«\93®\89æ\81u\95Û\91¶\82·\82é\83t\83H\83\8b\83_\82ð\8ew\92è\82µ\81A\83t\83@\83C\83\8b\96¼\82Í\8e©\93®\82Å\8c\88\92è\82·\82é\81v\83t\83@\83C\83\8b\83`\83\85\81[\83U\83{\83^\83\93. */
+ JButton getShowSavingConvertedVideoFolderDialogButton() {
+ return showSavingConvertedVideoFolderDialogButton;
+ }
+
+ /** @return \95Û\91¶\90Ý\92è-\8fo\97Í\83R\83\81\83\93\83g\95t\82«\93®\89æ\81u\95Û\91¶\82·\82é\83t\83@\83C\83\8b\96¼\82ð\8ew\92è\82·\82é\81v\83\89\83W\83I\83{\83^\83\93. */
+ JRadioButton getConvSaveFileRadioButton() {
+ return convSaveFileRadioButton;
+ }
+
+ /** @return \95Û\91¶\90Ý\92è-\8fo\97Í\83R\83\81\83\93\83g\95t\82«\93®\89æ\81u\95Û\91¶\82·\82é\83t\83@\83C\83\8b\96¼\82ð\8ew\92è\82·\82é\81v\83e\83L\83X\83g\83t\83B\81[\83\8b\83h. */
+ JTextField getConvertedVideoSavedFileField() {
+ return convertedVideoSavedFileField;
+ }
+
+ /** @return \95Û\91¶\90Ý\92è-\8fo\97Í\83R\83\81\83\93\83g\95t\82«\93®\89æ\81u\95Û\91¶\82·\82é\83t\83@\83C\83\8b\96¼\82ð\8ew\92è\82·\82é\81v\83t\83@\83C\83\8b\83`\83\85\81[\83U\83{\83^\83\93. */
+ JButton getShowSavingConvertedVideoFileDialogButton() {
+ return showSavingConvertedVideoFileDialogButton;
+ }
+
+ VideoSaveInfoPanel getVideoSaveInfoPanel() {
+ return videoSaveInfoPanel;
+ }
+
+ /** @return \93\8a\8de\8eÒ\83R\83\81\83\93\83g\82ð\83_\83E\83\93\83\8d\81[\83h\82·\82é\82Ì\82Å\82 \82ê\82Îtrue. */
+ boolean isTcommentDownload() {
+ return needDownloadTcomment.isSelected();
+ }
+
+ /** \81u\93\8a\8de\8eÒ\83R\83\81\83\93\83g\82ð\83_\83E\83\93\83\8d\81[\83h\82·\82é\81v\82É\90Ý\92è\82ð\8ds\82¤. */
+ void setTcommentDownload(boolean b) {
+ needDownloadTcomment.setSelected(b);
+ }
+
+ /** @return \95Ï\8a·\8cã\82É\93\8a\8de\8eÒ\83R\83\81\83\93\83g\82ð\8dí\8f\9c\82·\82é\82Ì\82Å\82 \82ê\82Îtrue. */
+ boolean isTcommentDelete() {
+ return delTcomment.isSelected();
+ }
+
+ /** \81u\95Ï\8a·\8cã\82É\93\8a\8de\8eÒ\83R\83\81\83\93\83g\82ð\8dí\8f\9c\82·\82é\81v\82É\90Ý\92è\82ð\8ds\82¤. */
+ void setTcommentDelete(boolean b) {
+ delTcomment.setSelected(b);
+ }
+
+ /** @return \93\8a\8de\8eÒ\83R\83\81\83\93\83g\82Ì\83t\83@\83C\83\8b\96¼\82ð\8e©\93®\82Å\90Ý\92è\82·\82é\82Ì\82Å\82 \82ê\82Îtrue, \92¼\90Ú\8ew\92è\82·\82é\82Ì\82Å\82 \82ê\82Îfalse. */
+ boolean isTcommentAutoFileName() {
+ return tcommentSaveInFolder.isSelected();
+ }
+
+ /** @param b \93\8a\8de\8eÒ\83R\83\81\83\93\83g\82Ì\83t\83@\83C\83\8b\96¼\82ð\8e©\93®\82Å\90Ý\92è\82·\82é\82Ì\82Å\82 \82ê\82Îtrue, \92¼\90Ú\8ew\92è\82·\82é\82Ì\82Å\82 \82ê\82Îfalse. */
+ void setTcommentAutoFileName(boolean b) {
+ tcommentSaveInFolder.setSelected(b);
+ tcommentSaveToFile.setSelected(!b);
+ }
+
+ /** @return \93\8a\8de\8eÒ\83R\83\81\83\93\83g\82Ì\81u\95Û\91¶\82·\82é\83t\83H\83\8b\83_\82ð\8ew\92è\82µ\81A\83t\83@\83C\83\8b\96¼\82Í\8e©\93®\82Å\8c\88\92è\82·\82é\81v\82É\90Ý\92è\82µ\82Ä\82 \82é\95¶\8e\9a\97ñ. */
+ String getTcommentDirectoryName() {
+ return tcommentFolder.getText();
+ }
+
+ /** @param t \93\8a\8de\8eÒ\83R\83\81\83\93\83g\82Ì\81u\95Û\91¶\82·\82é\83t\83H\83\8b\83_\82ð\8ew\92è\82µ\81A\83t\83@\83C\83\8b\96¼\82Í\8e©\93®\82Å\8c\88\92è\82·\82é\81v\82É\90Ý\92è\82µ\82Ä\82 \82é\95¶\8e\9a\97ñ. */
+ void setTcommentDirectoryName(String t) {
+ tcommentFolder.setText(t);
+ }
+
+ /** @return \93\8a\8de\8eÒ\83R\83\81\83\93\83g\82Ì\81u\95Û\91¶\82·\82é\83t\83@\83C\83\8b\96¼\82ð\8ew\92è\82·\82é\81v\82É\90Ý\92è\82µ\82Ä\82 \82é\95¶\8e\9a\97ñ. */
+ String getTcommentFileName() {
+ return tcommentFile.getText();
+ }
+
+ /** @param b \93\8a\8de\8eÒ\83R\83\81\83\93\83g\82Ì\81u\95Û\91¶\82·\82é\83t\83@\83C\83\8b\96¼\82ð\8ew\92è\82·\82é\81v\82É\90Ý\92è\82µ\82Ä\82 \82é\95¶\8e\9a\97ñ. */
+ void setTcommentFileName(String t) {
+ tcommentFile.setText(t);
+ }
+}
* <p>
* \89ï\8eÐ\96¼:
* </p>
- *
+ * \92\86\8aÔ\83R\83\81\83\93\83g. write\83\81\83\\83b\83h\82É\82æ\82è\83t\83@\83C\83\8b\82É\8f\91\82«\8fo\82·.
* @author \96¢\93ü\97Í
* @version 1.0
*/
--- /dev/null
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+package saccubus.filegetter;
+
+import java.io.File;
+import saccubus.net.NicoClient;
+import saccubus.net.TextProgressListener;
+import saccubus.net.VideoInfo;
+
+/**
+ *
+ * @author yuki
+ */
+public class CommentFileWebGetter extends TcommFileWebGetter {
+
+ private final boolean autoCommentNum;
+ private final String backComment;
+
+ CommentFileWebGetter(NicoClient client, VideoInfo vi, boolean autoCommentNum, String backComment) {
+ super(client, vi);
+ this.autoCommentNum = autoCommentNum;
+ this.backComment = backComment;
+ }
+
+ @Override
+ public File get(File file, TextProgressListener listener) {
+ String com = this.backComment;
+ if (this.autoCommentNum) {
+ com = getClient().getBackCommentFromLength(getVideoInfo(), com);
+ }
+
+ return getClient().getComment(getVideoInfo(), file, listener, com);
+ }
+}
--- /dev/null
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+package saccubus.filegetter;
+
+import java.io.File;
+import saccubus.net.TextProgressListener;
+
+/**
+ *
+ * @author yuki
+ */
+public class FileGetter {
+
+ FileGetter() {
+ }
+
+ File get(File file, TextProgressListener listener) {
+ return file;
+ }
+}
--- /dev/null
+/* $Id$ */
+package saccubus.filegetter;
+
+import java.io.File;
+import java.io.IOException;
+import org.apache.commons.io.FilenameUtils;
+import saccubus.ConvertStopFlag;
+import saccubus.VideoSaveKind;
+import saccubus.net.TextProgressListener;
+
+/**
+ * \83_\83E\83\93\83\8d\81[\83h\8f\88\97\9d\82ð\91S\82\95K\97v\82Æ\82µ\82È\82¢\8fê\8d\87\82Ì\83t\83@\83C\83\8b\83C\83\93\83X\83^\83\93\83X\89»\83N\83\89\83X.
+ * @author yuki
+ */
+public class FileInstanciator {
+
+ private final InstanciationType<VideoSaveKind> videoType;
+ private final InstanciationType<Boolean> commentType;
+ private final InstanciationType<Boolean> tcommType;
+ private final String videoId;
+ private FileGetter videoFileGetter;
+ private FileGetter commentFileGetter;
+ private FileGetter tcommFileGetter;
+
+ protected void setVideoFileGetter(FileGetter getter) {
+ this.videoFileGetter = getter;
+ }
+
+ protected void setCommentFileGetter(FileGetter getter) {
+ this.commentFileGetter = getter;
+ }
+
+ protected void setTcommFileGetter(FileGetter getter) {
+ this.tcommFileGetter = getter;
+ }
+
+ public static FileInstanciator create(
+ ConvertStopFlag stopFlag,
+ InstanciationType<VideoSaveKind> videoType,
+ CommentInstanciationType commentType,
+ InstanciationType<Boolean> tcommType,
+ LoginInfo li,
+ String tag, String time) throws
+ IOException {
+ FileInstanciator getter;
+ if (videoType.getFileType() == VideoSaveKind.SAVE || commentType.getFileType().booleanValue() || tcommType.
+ getFileType().booleanValue()) {
+ getter = new WebFileInstanciator(stopFlag, videoType, commentType, tcommType, li, tag, time);
+ } else {
+ getter = new FileInstanciator(videoType, commentType, tcommType, tag);
+ }
+ return getter;
+ }
+
+ protected FileInstanciator(
+ InstanciationType<VideoSaveKind> videoType,
+ InstanciationType<Boolean> commentType,
+ InstanciationType<Boolean> tcommType,
+ String videoId) {
+ this.videoType = videoType;
+ this.commentType = commentType;
+ this.tcommType = tcommType;
+ this.videoId = videoId;
+ FileGetter getter = new FileGetter();
+ setVideoFileGetter(getter);
+ setCommentFileGetter(getter);
+ setTcommFileGetter(getter);
+ }
+
+ /** @return \93®\89æ\82Ì\83^\83C\83g\83\8b. \95ª\82©\82ç\82È\82¢\8fê\8d\87\82Ínull. */
+ public String getVideoTitle() {
+ String fileName = null;
+ if (!videoType.isAutoFileName() || videoType.getFileType() == VideoSaveKind.NICOBROWSER) {
+ // \93®\89æ\83t\83@\83C\83\8b\96¼\82ð\92¼\90Ú\8ew\92è\82µ\82Ä\82¢\82é\8fê\8d\87\82Í\81A\82»\82Ì\83t\83@\83C\83\8b\96¼\82ð\8aî\82É\83^\83C\83g\83\8b\82ð\8eæ\93¾\82·\82é.
+ fileName = videoType.getInitFile().toString();
+ } else {
+ // \8e©\93®\96½\96¼\82Ì\8fê\8d\87\82Í\81A\83f\83B\83\8c\83N\83g\83\8a\93à\82É\82 \82é\83t\83@\83C\83\8b\82©\82ç\83^\83C\83g\83\8b\96¼\82ð\97Þ\90\84\81B
+ String[] files = videoType.getInitFile().list();
+ if (files != null) {
+ for (String file : files) {
+ if (file.startsWith(getVideoIdWithBracket())) {
+ fileName = FilenameUtils.getBaseName(file);
+ break;
+ }
+ }
+ }
+ }
+
+ if (fileName == null) {
+ return null;
+ }
+ String baseName = FilenameUtils.getBaseName(fileName);
+ int s = baseName.indexOf(getVideoIdWithBracket());
+ return baseName.substring(s + 1);
+ }
+
+ /**
+ * \93®\89æ\83t\83@\83C\83\8b\82ð\8eæ\93¾\82µ\82Ü\82·.
+ * @param listener \90i\92»\92Ê\92m\82ð\8eó\82¯\8eæ\82é\82½\82ß\82Ì\83\8a\83X\83i.
+ * @return \93®\89æ\83t\83@\83C\83\8b.
+ * @throws IOException \93®\89æ\83t\83@\83C\83\8b\82ª\91¶\8dÝ\82µ\82È\82¢, \8eæ\93¾\82É\8e¸\94s\82µ\82½.
+ */
+ public final File getVideoFile(TextProgressListener listener) {
+ File file = new VideoFileLocator(videoType.getFileType(), videoType.isAutoFileName(), videoType.getInitFile(),
+ getVideoIdWithBracket(), getVideoTitle(), ".flv").getFile();
+ file = videoFileGetter.get(file, listener);
+ return file;
+ }
+
+ /**
+ * \83R\83\81\83\93\83g\83t\83@\83C\83\8b\82ð\8eæ\93¾\82µ\82Ü\82·.
+ * @param listener \90i\92»\92Ê\92m\82ð\8eó\82¯\8eæ\82é\82½\82ß\82Ì\83\8a\83X\83i.
+ * @return \83R\83\81\83\93\83g\83t\83@\83C\83\8b.
+ * @throws IOException \83R\83\81\83\93\83g\83t\83@\83C\83\8b\82ª\91¶\8dÝ\82µ\82È\82¢, \8eæ\93¾\82É\8e¸\94s\82µ\82½.
+ */
+ public final File getCommentFile(TextProgressListener listener) {
+ File file = new FileLocator(commentType.isAutoFileName(), commentType.getInitFile(), getVideoIdWithBracket(),
+ getVideoTitle(), ".xml").getFile();
+ file = commentFileGetter.get(file, listener);
+ return file;
+ }
+
+ /**
+ * \93\8a\8de\8eÒ\83R\83\81\83\93\83g\83t\83@\83C\83\8b\82ð\8eæ\93¾\82µ\82Ü\82·.
+ * @param listener \90i\92»\92Ê\92m\82ð\8eó\82¯\8eæ\82é\82½\82ß\82Ì\83\8a\83X\83i.
+ * @return \93\8a\8de\8eÒ\83R\83\81\83\93\83g\83t\83@\83C\83\8b.
+ * @throws IOException \83R\83\81\83\93\83g\83t\83@\83C\83\8b\82ª\91¶\8dÝ\82µ\82È\82¢, \8eæ\93¾\82É\8e¸\94s\82µ\82½.
+ */
+ public final File getTcommFile(TextProgressListener listener) {
+ File file = new FileLocator(tcommType.isAutoFileName(), tcommType.getInitFile(), getVideoIdWithBracket(),
+ getVideoTitle(), ".xml").getFile();
+ file = tcommFileGetter.get(file, listener);
+ return file;
+ }
+
+ private String getVideoIdWithBracket() {
+ return "[" + videoId + "]";
+ }
+
+ public static class InstanciationType<T> {
+
+ private final T fileType;
+ private final boolean autoFileName;
+ private final File initFile;
+
+ /**
+ * \83t\83@\83C\83\8b\82ð\83C\83\93\83X\83^\83\93\83X\89»\82·\82é\95û\96@\82ð\8ew\92è\82·\82é\83N\83\89\83X.
+ * @param fileType \83t\83@\83C\83\8b\82Ì\8eí\97Þ\82ð\8ew\92è\82·\82é.
+ * @param autoFileName \83t\83@\83C\83\8b\96¼\82ð\8e©\93®\96½\96¼\82·\82é\82È\82çtrue, \92¼\90Ú\8ew\92è\82·\82é\82È\82çfalse.
+ * @param initFileName \83t\83@\83C\83\8b\8fî\95ñ. autoFileName\82ªtrue\82Å\82 \82ê\82Î\95Û\91¶\82·\82é\83f\83B\83\8c\83N\83g\83\8a\96¼\82ð, false\82È\82ç\95Û\91¶\82·\82é\83t\83@\83C\83\8b\96¼\82ð\8ew\92è\82·\82é.
+ */
+ public InstanciationType(T fileType, boolean autoFileName, File initFileName) {
+ this.fileType = fileType;
+ this.autoFileName = autoFileName;
+ this.initFile = initFileName;
+ }
+
+ public T getFileType() {
+ return fileType;
+ }
+
+ public File getInitFile() {
+ return initFile;
+ }
+
+ public boolean isAutoFileName() {
+ return autoFileName;
+ }
+ }
+
+ public static class CommentInstanciationType extends InstanciationType<Boolean> {
+
+ private final boolean autoCommentNum;
+ private final String backComment;
+
+ public CommentInstanciationType(Boolean fileType, boolean autoFileName, File initFileName,
+ boolean autoCommentNum, String backComment) {
+ super(fileType, autoFileName, initFileName);
+ this.autoCommentNum = autoCommentNum;
+ this.backComment = backComment;
+ }
+
+ public boolean isAutoCommentNum() {
+ return autoCommentNum;
+ }
+
+ public String getBackComment() {
+ return backComment;
+ }
+ }
+}
--- /dev/null
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+package saccubus.filegetter;
+
+import java.io.File;
+
+/**
+ *
+ * @author yuki
+ */
+class FileLocator {
+
+ private final boolean autoFileName;
+ private final File initFile;
+ private final String prefix;
+ private final String title;
+ private final String suffix;
+
+ FileLocator(boolean autoFileName, File initFile, String prefix, String title, String suffix) {
+ this.autoFileName = autoFileName;
+ this.initFile = initFile;
+ this.prefix = prefix;
+ this.title = title;
+ this.suffix = suffix;
+ }
+
+ File getFile() {
+ if (!isAutoNaming()) {
+ return initFile;
+ } else {
+ return new File(initFile, prefix + title + suffix);
+ }
+ }
+
+ protected boolean isAutoNaming() {
+ return autoFileName;
+ }
+
+ protected final boolean getAutoFileName() {
+ return autoFileName;
+ }
+}
--- /dev/null
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+package saccubus.filegetter;
+
+/**
+ *
+ * @author yuki
+ */
+public class LoginInfo {
+
+ private final String mail;
+ private final String pass;
+ private final boolean useProxy;
+ private final String proxy;
+ private final int port;
+
+ public LoginInfo(String mail, String pass, boolean useProxy, String proxy, int port) {
+ this.mail = mail;
+ this.pass = pass;
+ this.useProxy = useProxy;
+ this.proxy = proxy;
+ this.port = port;
+ }
+
+ public String getMail() {
+ return mail;
+ }
+
+ public String getPass() {
+ return pass;
+ }
+
+ public boolean isUseProxy() {
+ return useProxy;
+ }
+
+ public String getProxy() {
+ return proxy;
+ }
+
+ public int getPort() {
+ return port;
+ }
+}
--- /dev/null
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+package saccubus.filegetter;
+
+import java.io.File;
+import saccubus.net.NicoClient;
+import saccubus.net.TextProgressListener;
+import saccubus.net.VideoInfo;
+
+/**
+ *
+ * @author yuki
+ */
+class TcommFileWebGetter extends FileGetter {
+
+ private final NicoClient client;
+ private final VideoInfo videoInfo;
+
+ protected final NicoClient getClient() {
+ return client;
+ }
+
+ protected final VideoInfo getVideoInfo() {
+ return videoInfo;
+ }
+
+ TcommFileWebGetter(NicoClient client, VideoInfo vi) {
+ this.client = client;
+ this.videoInfo = vi;
+ }
+
+ @Override
+ public File get(File file, TextProgressListener listener) {
+ return getClient().getTcomment(videoInfo, file, listener);
+ }
+}
--- /dev/null
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+package saccubus.filegetter;
+
+import java.io.File;
+import saccubus.VideoSaveKind;
+
+/**
+ *
+ * @author yuki
+ */
+public class VideoFileLocator extends FileLocator {
+
+ private final VideoSaveKind kind;
+
+ public VideoFileLocator(VideoSaveKind kind, boolean autoFileName, File initFile, String prefix, String title,
+ String suffix) {
+ super(autoFileName, initFile, prefix, title, suffix);
+ this.kind = kind;
+ }
+
+ @Override
+ protected boolean isAutoNaming() {
+ if (kind == VideoSaveKind.NICOBROWSER || !getAutoFileName()) {
+ return false;
+ }
+ return true;
+ }
+}
--- /dev/null
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+package saccubus.filegetter;
+
+import java.io.File;
+import saccubus.net.NicoClient;
+import saccubus.net.TextProgressListener;
+import saccubus.net.VideoInfo;
+
+/**
+ *
+ * @author yuki
+ */
+public class VideoFileWebGetter extends FileGetter {
+
+ private final NicoClient client;
+ private final VideoInfo videoInfo;
+
+ VideoFileWebGetter(NicoClient client, VideoInfo videoInfo) {
+ this.client = client;
+ this.videoInfo = videoInfo;
+ }
+
+ @Override
+ File get(File file, TextProgressListener listener) {
+ listener.setText("\93®\89æ\82Ì\83_\83E\83\93\83\8d\81[\83h\8aJ\8en\92\86");
+ return client.getVideo(videoInfo, file, listener);
+ }
+}
--- /dev/null
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+package saccubus.filegetter;
+
+import java.io.IOException;
+import saccubus.ConvertStopFlag;
+import saccubus.VideoSaveKind;
+import saccubus.net.NicoClient;
+import saccubus.net.VideoInfo;
+
+/**
+ * \93®\89æ\83t\83@\83C\83\8b, \83R\83\81\83\93\83g\83t\83@\83C\83\8b\82È\82Ç\95K\97v\82È\83t\83@\83C\83\8b\82Ì\82¤\82¿, 1\82Â\82Å\82à\83_\83E\83\93\83\8d\81[\83h\8f\88\97\9d\82ð\95K\97v\82Æ\82·\82é\8fê\8d\87\82Ì\83C\83\93\83X\83^\83\93\83X\89»\83N\83\89\83X.
+ * @author yuki
+ */
+public class WebFileInstanciator extends FileInstanciator {
+
+ private final NicoClient client;
+ private final VideoInfo videoInfo;
+
+ WebFileInstanciator(
+ ConvertStopFlag stopFlag,
+ InstanciationType<VideoSaveKind> videoType,
+ CommentInstanciationType commentType,
+ InstanciationType<Boolean> tcommType,
+ LoginInfo li,
+ String tag,
+ String time) throws IOException {
+ super(videoType, commentType, tcommType, tag);
+
+ if (li.getMail() == null || li.getPass() == null || li.getMail().equals("") || li.getPass().equals("")) {
+ throw new IllegalArgumentException("\83\81\81[\83\8b\83A\83h\83\8c\83X\82©\83p\83X\83\8f\81[\83h\82ª\8bó\94\92\82Å\82·\81B");
+ }
+ if (li.isUseProxy() && (li.getProxy() == null || li.getProxy().length() <= 0) && (li.getPort() < 0
+ || li.getPort() > 65535)) {
+ throw new IllegalArgumentException("\83v\83\8d\83L\83V\82Ì\90Ý\92è\82ª\95s\90³\82Å\82·\81B");
+ }
+
+ String proxy;
+ int port;
+ if (li.isUseProxy()) {
+ proxy = li.getProxy();
+ port = li.getPort();
+ } else {
+ proxy = null;
+ port = -1;
+ }
+ client = new NicoClient(li.getMail(), li.getPass(), stopFlag, proxy, port);
+
+ if (!client.isLoggedIn()) {
+ throw new IOException("\83\8d\83O\83C\83\93\82É\8e¸\94s");
+ }
+
+ try {
+ videoInfo = client.getVideoInfo(tag, time);
+ } catch (IOException ex) {
+ throw new IOException(tag + "\82Ì\8fî\95ñ\82Ì\8eæ\93¾\82É\8e¸\94s", ex);
+ }
+
+ if (videoType.getFileType() == VideoSaveKind.SAVE) {
+ setVideoFileGetter(new VideoFileWebGetter(client, videoInfo));
+ }
+
+ if (Boolean.TRUE.equals(commentType.getFileType())) {
+ setCommentFileGetter(new CommentFileWebGetter(client, videoInfo, commentType.isAutoCommentNum(),
+ commentType.getBackComment()));
+ }
+
+ if (Boolean.TRUE.equals(tcommType.getFileType())) {
+ setTcommFileGetter(new TcommFileWebGetter(client, videoInfo));
+ }
+ }
+
+ @Override
+ public String getVideoTitle() {
+ return videoInfo.getVideoTitle();
+ }
+}
package saccubus.net;
+import java.io.BufferedReader;
import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.OutputStream;
import java.net.URL;
-import java.io.*;
import java.net.HttpURLConnection;
import java.net.InetSocketAddress;
import java.net.Proxy;
import java.net.URLEncoder;
import java.net.URLDecoder;
-import javax.swing.JLabel;
import java.text.DateFormat;
+import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
-import java.text.*;
import javax.net.ssl.HttpsURLConnection;
import saccubus.ConvertStopFlag;
import saccubus.util.FileUtil;
private final ConvertStopFlag StopFlag;
private final Proxy ConProxy;
- private String VideoTitle = null;
- private int VideoLength = -1;
-
- private byte[] buf = new byte[1024 * 1024];
-
- private String VideoUrl = null;
- private String UserID = null;
- private String ThreadID = null;
- private String MsgUrl = null;
-
private String WayBackKey = "0";
private String WayBackTime = "0";
private final static String WAYBACKKEY_STR = "waybackkey=";
StopFlag = flag;
}
- public String getBackCommentFromLength(String def) {
- if (VideoLength < 0) {
+ public String getBackCommentFromLength(VideoInfo vi, String def) {
+ final int videoLength = vi.getVideoLength();
+ if (videoLength < 0) {
return def;
- } else if (VideoLength >= 0 && VideoLength < 60) {
+ } else if (videoLength >= 0 && videoLength < 60) {
return "100";
- } else if (VideoLength >= 60 && VideoLength < 300) {
+ } else if (videoLength >= 60 && videoLength < 300) {
return "250";
- } else if (VideoLength >= 300 && VideoLength < 600) {
+ } else if (videoLength >= 300 && videoLength < 600) {
return "500";
} else {
return "1000";
}
}
- public File getComment(final File file, final JLabel status,
- String back_comment) {
- System.out.print("Downloading comment size:" + back_comment + "...");
- try {
+ public File getComment(VideoInfo vi, final File file, final TextProgressListener status, String back_comment) {
+ return downloadComment(back_comment, file, vi, status, false);
+ }
+
+ /**
+ * \93\8a\8de\8eÒ\83R\83\81\83\93\83g\82ð\83_\83E\83\93\83\8d\81[\83h\82·\82é.
+ * @param vi \83r\83f\83I\8fî\95ñ.
+ * @param file \83_\83E\83\93\83\8d\81[\83h\90æ\83t\83@\83C\83\8b.
+ * @param status \90i\92»\92Ê\92m\83\8a\83X\83i.
+ * @return \83_\83E\83\93\83\8d\81[\83h\82³\82ê\82½\83t\83@\83C\83\8b. \83_\83E\83\93\83\8d\81[\83h\82Å\82«\82È\82¯\82ê\82Înull.
+ */
+ public File getTcomment(VideoInfo vi, final File file, final TextProgressListener status) {
+ return downloadComment("500", file, vi, status, true);
+ }
+
+ private File downloadComment(String back_comment, final File file, VideoInfo vi, final TextProgressListener status,
+ boolean isTcomm) throws NumberFormatException {
+ System.out.print("Downloading comment size:" + back_comment + "...");
+ try {
if (file.canRead()) { // \83t\83@\83C\83\8b\82ª\82·\82Å\82É\91¶\8dÝ\82·\82é\82È\82ç\8dí\8f\9c\82·\82é\81B
- file.delete();
- }
- OutputStream fos = new FileOutputStream(file);
- HttpURLConnection con = (HttpURLConnection) (new URL(MsgUrl))
+ file.delete();
+ }
+ OutputStream fos = new FileOutputStream(file);
+ HttpURLConnection con = (HttpURLConnection) (new URL(vi.getMsgUrl()))
.openConnection(ConProxy);
- con.setDoOutput(true);
- con.setDoInput(true);
- con.setRequestMethod("POST");
- con.addRequestProperty("Cookie", Cookie);
- con.addRequestProperty("Connection", "close");
- con.connect();
- OutputStream os = con.getOutputStream();
- String req = "<thread user_id=\"" + UserID + "\" when=\""
- + WayBackTime + "\" waybackkey=\"" + WayBackKey
- + "\" res_from=\"-" + back_comment
- + "\" version=\"20061206\" thread=\"" + ThreadID + "\" />";
- os.write(req.getBytes());
- os.flush();
- os.close();
- if (con.getResponseCode() != HttpURLConnection.HTTP_OK) {
- System.out.println("ng.\nCan't download comment:" + MsgUrl);
- return null;
- }
- InputStream is = con.getInputStream();
- int read = 0;
- int max_size = 0;
- String content_length_str = con.getHeaderField("Content-length");
- if (content_length_str != null && !content_length_str.equals("")) {
- max_size = Integer.parseInt(content_length_str);
- }
- int size = 0;
- while ((read = is.read(buf, 0, buf.length)) > 0) {
- fos.write(buf, 0, read);
- size += read;
- if (max_size != 0) {
- String per = Double.toString((((double) size) * 100)
- / max_size);
- per = per.substring(0, Math.min(per.indexOf(".") + 3, per
- .length()));
- status.setText("\83R\83\81\83\93\83g\83_\83E\83\93\83\8d\81[\83h\81F" + per + "\83p\81[\83Z\83\93\83g\8a®\97¹");
- } else {
- status.setText("\83R\83\81\83\93\83g\83_\83E\83\93\83\8d\81[\83h\92\86\81F"
- + Integer.toString(size >> 10) + "kbytes\83_\83E\83\93\83\8d\81[\83h");
- }
- if (StopFlag.needStop()) {
- System.out.println("Stopped.");
- is.close();
- os.flush();
- os.close();
- con.disconnect();
- file.delete();
- return null;
- }
- }
- System.out.println("ok.");
- is.close();
- fos.flush();
- fos.close();
- con.disconnect();
- return file;
- } catch (IOException ex) {
- ex.printStackTrace();
- }
-
- return null;
- }
+ con.setDoOutput(true);
+ con.setDoInput(true);
+ con.setRequestMethod("POST");
+ con.addRequestProperty("Cookie", Cookie);
+ con.addRequestProperty("Connection", "close");
+ con.connect();
+ OutputStream os = con.getOutputStream();
+ String tcommStr = (isTcomm) ? "fork=\"1\" " : "";
+ String req = "<thread user_id=\"" + vi.getUserId() + "\" when=\"" + WayBackTime + "\" waybackkey=\""
+ + WayBackKey + "\" res_from=\"-" + back_comment + "\" version=\"20061206\" thread=\"" + vi.
+ getThreadId() + "\" " + tcommStr + "/>";
+ os.write(req.getBytes());
+ os.flush();
+ os.close();
+ if (con.getResponseCode() != HttpURLConnection.HTTP_OK) {
+ System.out.println("ng.\nCan't download comment:" + vi.getMsgUrl());
+ return null;
+ }
+ InputStream is = con.getInputStream();
+ int read = 0;
+ int max_size = 0;
+ String content_length_str = con.getHeaderField("Content-length");
+ if (content_length_str != null && !content_length_str.equals("")) {
+ max_size = Integer.parseInt(content_length_str);
+ }
+ int size = 0;
+ final byte[] buf = new byte[1024 * 1024];
+ while ((read = is.read(buf, 0, buf.length)) > 0) {
+ fos.write(buf, 0, read);
+ size += read;
+ if (max_size != 0) {
+ String per = Double.toString((((double) size) * 100) / max_size);
+ per = per.substring(0, Math.min(per.indexOf(".") + 3, per.length()));
+ status.setText("\83R\83\81\83\93\83g\83_\83E\83\93\83\8d\81[\83h\81F" + per + "\83p\81[\83Z\83\93\83g\8a®\97¹");
+ } else {
+ status.setText("\83R\83\81\83\93\83g\83_\83E\83\93\83\8d\81[\83h\92\86\81F" + Integer.toString(size >> 10) + "kbytes\83_\83E\83\93\83\8d\81[\83h");
+ }
+ if (StopFlag.needStop()) {
+ System.out.println("Stopped.");
+ is.close();
+ os.flush();
+ os.close();
+ con.disconnect();
+ file.delete();
+ return null;
+ }
+ }
+ System.out.println("ok.");
+ is.close();
+ fos.flush();
+ fos.close();
+ con.disconnect();
+ return file;
+ } catch (IOException ex) {
+ ex.printStackTrace();
+ }
+ return null;
+ }
- public File getVideo(final File file, final JLabel status) {
- if (VideoUrl == null) {
+ public File getVideo(VideoInfo vi, final File file, final TextProgressListener status) {
+ if (vi.getVideoUrl() == null) {
System.out.println("Video url is not detected.");
return null;
}
if (file.canRead()) { // \83t\83@\83C\83\8b\82ª\82·\82Å\82É\91¶\8dÝ\82·\82é\82È\82ç\8dí\8f\9c\82·\82é\81B
file.delete();
}
- HttpURLConnection con = (HttpURLConnection) (new URL(VideoUrl))
+ HttpURLConnection con = (HttpURLConnection) (new URL(vi.getVideoUrl()))
.openConnection(ConProxy);
/* \8fo\97Í\82Ì\82Ý */
con.setDoInput(true);
con.addRequestProperty("Cookie", Cookie);
con.connect();
if (con.getResponseCode() != HttpURLConnection.HTTP_OK) {
- System.out.println("Can't get video:" + VideoUrl);
+ System.out.println("Can't get video:" + vi.getVideoUrl());
return null;
}
InputStream is = con.getInputStream();
int size = 0;
System.out.print("Downloading video...");
int read = 0;
+ final byte[] buf = new byte[1024 * 1024];
while ((read = is.read(buf, 0, buf.length)) > 0) {
size += read;
os.write(buf, 0, read);
return null;
}
- public boolean getVideoHistoryAndTitle(String tag) {
+ /** @return \83r\83f\83I\96¼ */
+ public String getVideoHistoryAndTitle(String tag) throws IOException {
String url = "http://www.nicovideo.jp/watch/" + tag;
System.out.print("Getting video history...");
String new_cookie = null;
- try {
- HttpURLConnection con = (HttpURLConnection) (new URL(url))
- .openConnection(ConProxy);
- /* \83\8a\83N\83G\83X\83g\82Ì\90Ý\92è */
- con.setRequestMethod("GET");
- con.addRequestProperty("Cookie", Cookie);
- con.addRequestProperty("Connection", "close");
- con.connect();
- if (con.getResponseCode() != HttpURLConnection.HTTP_OK) {
- System.out.println("Can't getVideoHistory:" + url);
- return false;
- }
- int i = 1;
- String key;
- String value;
- while ((key = con.getHeaderFieldKey(i)) != null) {
- if (key.equalsIgnoreCase("Set-Cookie")) {
- value = con.getHeaderField(i);
- if (value != null) {
- new_cookie = value.substring(0, value.indexOf(";"));
- }
- }
- i++;
- }
- BufferedReader br = new BufferedReader(new InputStreamReader(con
- .getInputStream(), "UTF-8"));
- String ret;
- int index = -1;
- while ((ret = br.readLine()) != null && index < 0) {
- if ((index = ret.indexOf(TITLE_PARSE_STR_START)) >= 0) {
- VideoTitle = ret.substring(index+TITLE_PARSE_STR_START.length(), ret.indexOf("\81]", index));
- VideoTitle = FileUtil.safeFileName(VideoTitle);
- }
- }
- br.close();
- con.disconnect();
- if (new_cookie == null) {
- System.out.println("Can't getVideoHistory: cannot get cookie.");
- return false;
- }
- System.out.println("ok.");
- Cookie += "; ";
- Cookie += new_cookie;
- } catch (IOException ex) {
- ex.printStackTrace();
- return false;
- }
+ String videoTitle = null;
- return true;
- }
+ HttpURLConnection con = (HttpURLConnection) (new URL(url)).openConnection(ConProxy);
+ /* \83\8a\83N\83G\83X\83g\82Ì\90Ý\92è */
+ con.setRequestMethod("GET");
+ con.addRequestProperty("Cookie", Cookie);
+ con.addRequestProperty("Connection", "close");
+ con.connect();
+ if (con.getResponseCode() != HttpURLConnection.HTTP_OK) {
+ throw new IOException("Can't getVideoHistory:" + url);
+ }
+ int i = 1;
+ String key;
+ String value;
+ while ((key = con.getHeaderFieldKey(i)) != null) {
+ if (key.equalsIgnoreCase("Set-Cookie")) {
+ value = con.getHeaderField(i);
+ if (value != null) {
+ new_cookie = value.substring(0, value.indexOf(";"));
+ }
+ }
+ i++;
+ }
+ BufferedReader br = new BufferedReader(new InputStreamReader(con.getInputStream(), "UTF-8"));
+ String ret;
+ int index = -1;
+ while ((ret = br.readLine()) != null && index < 0) {
+ if ((index = ret.indexOf(TITLE_PARSE_STR_START)) >= 0) {
+ videoTitle = ret.substring(index + TITLE_PARSE_STR_START.length(), ret.indexOf("\81]", index));
+ videoTitle = FileUtil.safeFileName(videoTitle);
+ }
+ }
+ br.close();
+ con.disconnect();
+ if (new_cookie == null) {
+ System.out.println("Can't getVideoHistory: cannot get cookie.");
+ return null;
+ }
+ System.out.println("ok.");
+ Cookie += "; ";
+ Cookie += new_cookie;
- public boolean getVideoInfo(String tag, String time) {
- if (!getVideoHistoryAndTitle(tag)) {
- return false;
- }
- try {
- String url = "http://www.nicovideo.jp/api/getflv/" + tag;
- if (tag.startsWith("nm")) {
- url += "?as3=1";
- }
- System.out.print("Getting video informations...");
- HttpURLConnection con = (HttpURLConnection) (new URL(url))
- .openConnection(ConProxy);
- /* \83\8a\83N\83G\83X\83g\82Ì\90Ý\92è */
- con.setRequestMethod("GET");
- con.addRequestProperty("Cookie", Cookie);
- con.addRequestProperty("Connection", "close");
- con.connect();
- if (con.getResponseCode() != HttpURLConnection.HTTP_OK) {
- System.out.println("Can't getVideoInfo:" + url);
- return false;
- }
- /* \96ß\82è\92l\82Ì\8eæ\93¾ */
- BufferedReader br = new BufferedReader(new InputStreamReader(con
- .getInputStream()));
- String ret = br.readLine();
- br.close();
- con.disconnect();
- ret = URLDecoder.decode(ret, "Shift_JIS");
- String[] array = ret.split("&");
- int cnt = 0;
- for (int i = 0; i < array.length; i++) {
- int idx = array[i].indexOf("=");
- if (idx < 0) {
- continue;
- }
- String key = array[i].substring(0, idx);
- String value = array[i].substring(idx + 1);
- if (ThreadID == null && key.equalsIgnoreCase("thread_id")) {
- ThreadID = value;
- cnt++;
- } else if (VideoUrl == null && key.equalsIgnoreCase("url")) {
- VideoUrl = value;
- cnt++;
- } else if (MsgUrl == null && key.equalsIgnoreCase("ms")) {
- MsgUrl = value;
- cnt++;
- } else if (UserID == null && key.equalsIgnoreCase("user_id")) {
- UserID = value;
- cnt++;
- } else if (VideoLength < 0 && key.equalsIgnoreCase("l")) {
- try {
- VideoLength = Integer.parseInt(value);
- } catch (NumberFormatException e) {
- VideoLength = -1;
- }
- }
- }
- if (cnt < 4) {
- System.out
- .println("ng.\nCan't getVideoInfo: Can't get video informations.");
- return false;
- }
- System.out.println("ok.");
- } catch (IOException ex) {
- ex.printStackTrace();
- return false;
- }
- if (!(time == null || time.equals("")) && !getWayBackKey(time)) { // WayBackKey
- return false;
- }
- return true;
+ return videoTitle;
}
- public String getVideoTitle() {
- return VideoTitle;
- }
+ public VideoInfo getVideoInfo(String tag, String time) throws IOException {
+ final String videoTitle = getVideoHistoryAndTitle(tag);
+ String threadId = null;
+ String videoUrl = null;
+ String msgUrl = null;
+ String userId = null;
+ int videoLength = -1;
+
+ String url = "http://www.nicovideo.jp/api/getflv/" + tag;
+ if (tag.startsWith("nm")) {
+ url += "?as3=1";
+ }
+ System.out.print("Getting video informations...");
+ HttpURLConnection con = (HttpURLConnection) (new URL(url)).openConnection(ConProxy);
+ /* \83\8a\83N\83G\83X\83g\82Ì\90Ý\92è */
+ con.setRequestMethod("GET");
+ con.addRequestProperty("Cookie", Cookie);
+ con.addRequestProperty("Connection", "close");
+ con.connect();
+ if (con.getResponseCode() != HttpURLConnection.HTTP_OK) {
+ throw new IOException("Can't getVideoInfo:" + url);
+ }
+ /* \96ß\82è\92l\82Ì\8eæ\93¾ */
+ BufferedReader br = new BufferedReader(new InputStreamReader(con.getInputStream()));
+ String ret = br.readLine();
+ br.close();
+ con.disconnect();
+ ret = URLDecoder.decode(ret, "Shift_JIS");
+ String[] array = ret.split("&");
+ int cnt = 0;
+ for (int i = 0; i < array.length; i++) {
+ int idx = array[i].indexOf("=");
+ if (idx < 0) {
+ continue;
+ }
+ String key = array[i].substring(0, idx);
+ String value = array[i].substring(idx + 1);
+ if (threadId == null && key.equalsIgnoreCase("thread_id")) {
+ threadId = value;
+ cnt++;
+ } else if (videoUrl == null && key.equalsIgnoreCase("url")) {
+ videoUrl = value;
+ cnt++;
+ } else if (msgUrl == null && key.equalsIgnoreCase("ms")) {
+ msgUrl = value;
+ cnt++;
+ } else if (userId == null && key.equalsIgnoreCase("user_id")) {
+ userId = value;
+ cnt++;
+ } else if (videoLength < 0 && key.equalsIgnoreCase("l")) {
+ try {
+ videoLength = Integer.parseInt(value);
+ } catch (NumberFormatException e) {
+ videoLength = -1;
+ }
+ }
+ }
+ if (cnt < 4) {
+ throw new IOException("ng.\nCan't getVideoInfo: Can't get video informations.");
+ }
+ System.out.println("ok.");
+
+ VideoInfo vi = new VideoInfo(videoTitle, threadId, videoUrl, msgUrl, userId, videoLength);
+
+ if (!(time == null || time.equals("")) && !getWayBackKey(vi, time)) { // WayBackKey
+ throw new IOException();
+ }
+ return vi;
+ }
- private boolean getWayBackKey(String time) {
+ private boolean getWayBackKey(VideoInfo vi, String time) {
System.out.print("Setting wayback time...");
Date date = null;
String waybacktime = "0";
}
System.out.print("Getting wayback key...");
String url = "http://www.nicovideo.jp/api/getwaybackkey?thread="
- + ThreadID;
+ + vi.getThreadId();
String ret = "";
try {
HttpURLConnection con = (HttpURLConnection) (new URL(url))
--- /dev/null
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+
+package saccubus.net;
+
+/**
+ *
+ * @author yuki
+ */
+public interface TextProgressListener {
+ void setText(String text);
+}
--- /dev/null
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+package saccubus.net;
+
+/**
+ *
+ * @author yuki
+ */
+public class VideoInfo {
+
+ private final String videoTitle;
+ private final String threadId;
+ private final String videoUrl;
+ private final String msgUrl;
+ private final String userId;
+ private final int videoLength;
+
+ VideoInfo(String videoTitle, String threadId, String videoUrl, String msgUrl, String userId, int videoLength) {
+ this.videoTitle = videoTitle;
+ this.threadId = threadId;
+ this.videoUrl = videoUrl;
+ this.msgUrl = msgUrl;
+ this.userId = userId;
+ this.videoLength = videoLength;
+ }
+
+ public String getMsgUrl() {
+ return msgUrl;
+ }
+
+ public String getThreadId() {
+ return threadId;
+ }
+
+ public String getUserId() {
+ return userId;
+ }
+
+ public int getVideoLength() {
+ return videoLength;
+ }
+
+ public String getVideoTitle() {
+ return videoTitle;
+ }
+
+ public String getVideoUrl() {
+ return videoUrl;
+ }
+}
package saccubus.prompt;
-import saccubus.*;
-import javax.swing.JLabel;
+import saccubus.ConvertStopFlag;
+import saccubus.ConvertStopFlag.State;
+import saccubus.Converter;
+import saccubus.ConvertingSetting;
+import saccubus.net.TextProgressListener;
/**
* <p>
*/
public class Prompt {
public static void main(String[] args) {
+ TextProgressListener sl = new TextProgressListener() {
+
+ public void setText(String text) {
+ }
+ };
+ ConvertStopFlag.StateChangeListener scl = new ConvertStopFlag.StateChangeListener() {
+
+ public void changeState(State s) {
+ }
+ };
String mail = args[0];
String pass = args[1];
String tag = args[2];
String time = args.length < 4 ? "" : args[3];
ConvertingSetting setting = ConvertingSetting.loadSetting(mail, pass);
- Converter conv = new Converter(tag, time, setting, new JLabel(),
- new ConvertStopFlag(null, null, null, null));
+ Converter conv = new Converter(tag, time, setting, sl, new ConvertStopFlag(scl));
System.out.println("-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-");
System.out.println("Saccubus on CUI");
System.out.println("-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-");