diff --git a/src/main/java/osm/surveyor/matchtime/gui/ParameterPanelOutput.java b/src/main/java/osm/surveyor/matchtime/gui/ParameterPanelOutput.java index 47994af..ed3a72b 100644 --- a/src/main/java/osm/surveyor/matchtime/gui/ParameterPanelOutput.java +++ b/src/main/java/osm/surveyor/matchtime/gui/ParameterPanelOutput.java @@ -2,7 +2,6 @@ import javax.swing.JCheckBox; import javax.swing.JFileChooser; -import osm.surveyor.matchtime.AppParameters; @SuppressWarnings("serial") public class ParameterPanelOutput extends ParameterPanelFolder @@ -22,33 +21,28 @@ /** * チェックボックス "入力ファイルに上書きする" * @param label - * @param params */ - public void addCheckOverwriteToSource(String label, AppParameters params) { + public void addCheckOverwriteToSource(String label) { boolean selected = false; - if (params.getProperty(AppParameters.OUTPUT_OVERWRITE_TO_SOURCE).equals("true")) { - selected = true; - } outputOverwite = new JCheckBox(label, selected); outputOverwite.setEnabled(true); + outputOverwite.addActionListener(new ChangeOverwriteAction()); + this.add(outputOverwite); } /** * checkbox[入力ファイルに上書き]を変更した場合のアクション - * ON ー> IMG出力フォルダのフィールドを有効にする - * OFF -> IMG出力フォルダのフィールドを無効にする + * OFF → IMG出力フォルダのフィールドを有効にする + * ON → IMG出力フォルダのフィールドを無効にする * @param event */ - /* - class ChangeOverwriteAction implements java.awt.event.ActionListener { @Override public void actionPerformed(java.awt.event.ActionEvent event) { Object object = event.getSource(); if (object == outputOverwite) { - setEnabled(outputIMG.isEnabled()); + //setEnabled(outputIMG.isEnabled()); } } } - */ } \ No newline at end of file diff --git a/src/main/java/osm/surveyor/matchtime/gui/ReStamp.java b/src/main/java/osm/surveyor/matchtime/gui/ReStamp.java index 2622dc7..735d9fe 100644 --- a/src/main/java/osm/surveyor/matchtime/gui/ReStamp.java +++ b/src/main/java/osm/surveyor/matchtime/gui/ReStamp.java @@ -122,25 +122,95 @@ cards = new Card[4]; int cardNo = 0; - + //--------------------------------------------------------------------- // 1.[対象フォルダ]設定パネル { arg1_srcFolder = new ParameterPanelFolder( - i18n.getString("label.110") +": ", - params.getProperty(AppParameters.IMG_SOURCE_FOLDER) + i18n.getString("label.110") +": ", + params.getProperty(AppParameters.IMG_SOURCE_FOLDER) ); - arg1_srcFolder.argField - .getDocument() - .addDocumentListener( - new SimpleDocumentListener() { - @Override - public void update(DocumentEvent e) { - toEnable(0, arg1_srcFolder.isEnable()); - } + arg1_srcFolder.argField.getDocument().addDocumentListener( + new SimpleDocumentListener() { + @Override + public void update(DocumentEvent e) { + toEnable(0, arg1_srcFolder.isEnable()); } - ); + } + ); + } + //--------------------------------------------------------------------- + // 2a. 基準時刻画像 + { + arg2_baseTimeImg = new ParameterPanelImageFile( + i18n.getString("label.210") +": ", + null, + arg1_srcFolder + ); + + // 2a. 基準時刻: + arg2_basetime = new ParameterPanelTime( + i18n.getString("label.310"), + null, + arg2_baseTimeImg + ); + arg2_basetime.argField.getDocument().addDocumentListener( + new SimpleDocumentListener() { + @Override + public void update(DocumentEvent e) { + toEnable(1, arg2_basetime.isEnable()); + } + } + ); + } + + //--------------------------------------------------------------------- + // 3a. 基準時刻画像 + { + arg3_baseTimeImg = new ParameterPanelImageFile( + i18n.getString("label.210") +": ", + null, + arg1_srcFolder + ); + + // 3a. 基準時刻: + arg3_basetime = new ParameterPanelTime( + i18n.getString("label.310"), + null, + arg3_baseTimeImg + ); + arg3_basetime.argField.getDocument().addDocumentListener( + new SimpleDocumentListener() { + @Override + public void update(DocumentEvent e) { + toEnable(2, arg3_basetime.isEnable()); + } + } + ); + } + + //--------------------------------------------------------------------- + // 4. "出力フォルダ: " + { + arg4_output = new ParameterPanelOutput( + i18n.getString("label.530") + ": ", + params.getProperty(AppParameters.IMG_OUTPUT_FOLDER) + ); + arg4_output.addCheckOverwriteToSource(i18n.getString("label.110")); + arg4_output.argField.getDocument().addDocumentListener( + new SimpleDocumentListener() { + @Override + public void update(DocumentEvent e) { + toEnable(3, arg4_output.isEnable()); + } + } + ); + } + + //--------------------------------------------------------------------- + // 1.[対象フォルダ]設定パネル + { Card card = new CardSourceFolder(cardPanel, arg1_srcFolder); cardPanel.addTab(card.getTitle(), card); cardPanel.setEnabledAt(cardNo, true); @@ -153,28 +223,6 @@ // 2.[基準時刻画像]設定パネル // 2a.基準時刻の入力画面 { - // 基準時刻画像 - arg2_baseTimeImg = new ParameterPanelImageFile( - i18n.getString("label.210") +": ", - null, - arg1_srcFolder - ); - - // 2a. 基準時刻: - arg2_basetime = new ParameterPanelTime( - i18n.getString("label.310"), - null, - arg2_baseTimeImg - ); - arg2_basetime.argField.getDocument().addDocumentListener( - new SimpleDocumentListener() { - @Override - public void update(DocumentEvent e) { - toEnable(1, arg2_basetime.isEnable()); - } - } - ); - CardImageFile card = new CardImageFile( cardPanel, arg2_basetime, (Window)this, ReStamp.i18n.getString("tab.restamp.200"), 0, 2); @@ -187,28 +235,6 @@ //--------------------------------------------------------------------- // 3. 最終画像の本当の時刻を設定の入力画面 { - // 基準時刻画像 - arg3_baseTimeImg = new ParameterPanelImageFile( - i18n.getString("label.210") +": ", - null, - arg1_srcFolder - ); - - // 3a. 基準時刻: - arg3_basetime = new ParameterPanelTime( - i18n.getString("label.310"), - null, - arg3_baseTimeImg - ); - arg3_basetime.argField.getDocument().addDocumentListener( - new SimpleDocumentListener() { - @Override - public void update(DocumentEvent e) { - toEnable(2, arg3_basetime.isEnable()); - } - } - ); - CardImageFile card = new CardImageFile( cardPanel, arg3_basetime, (Window)this, ReStamp.i18n.getString("tab.restamp.250"), 1, 3 @@ -222,20 +248,6 @@ //--------------------------------------------------------------------- // 4. 実行画面 { - // 4. "出力フォルダ: " - arg4_output = new ParameterPanelOutput( - i18n.getString("label.530") + ": ", - params.getProperty(AppParameters.IMG_OUTPUT_FOLDER) - ); - arg4_output.argField.getDocument().addDocumentListener( - new SimpleDocumentListener() { - @Override - public void update(DocumentEvent e) { - toEnable(3, arg4_output.isEnable()); - } - } - ); - // パネル表示 CardPerformFile card = new CardPerformFile( cardPanel, diff --git a/src/main/resources/i18n.properties b/src/main/resources/i18n.properties index df9b53f..6e0372b 100644 --- a/src/main/resources/i18n.properties +++ b/src/main/resources/i18n.properties @@ -51,6 +51,7 @@ label.550=Output point marker to GPX file label.560=Ignoring of source GPX label.570=Overwrite in output GPX +label.580=Overwrite to source image file. tab.restamp.500=5. Do ReStamp label.restamp.500=5. Select whether to UpdateTime conversion diff --git a/src/main/resources/i18n_ja_JP.properties b/src/main/resources/i18n_ja_JP.properties index a77c64a..f39745e 100644 --- a/src/main/resources/i18n_ja_JP.properties +++ b/src/main/resources/i18n_ja_JP.properties @@ -51,6 +51,7 @@ label.550=\u30dd\u30a4\u30f3\u30c8\u30de\u30fc\u30ab\u30fc\u3092GPX\u30d5\u30a1\u30a4\u30eb\u306b\u51fa\u529b\u3059\u308b label.560=\u30bd\u30fc\u30b9GPX\u306e\u3092\u7121\u8996\u3059\u308b label.570=\u51fa\u529bGPX\u306b\u3092\u4e0a\u66f8\u304d\u3059\u308b +label.580=\u5165\u529b\u30d5\u30a1\u30a4\u30eb\u306b\u4e0a\u66f8\u304d\u3059\u308b tab.restamp.400=4. \u5909\u63db\u306e\u5b9f\u884c tab.restamp.500=5. \u5909\u63db\u306e\u5b9f\u884c