diff --git a/src/main/java/osm/surveyor/matchtime/gui/ParameterPanelOutput.java b/src/main/java/osm/surveyor/matchtime/gui/ParameterPanelOutput.java index ed3a72b..fd5875e 100644 --- a/src/main/java/osm/surveyor/matchtime/gui/ParameterPanelOutput.java +++ b/src/main/java/osm/surveyor/matchtime/gui/ParameterPanelOutput.java @@ -6,7 +6,8 @@ @SuppressWarnings("serial") public class ParameterPanelOutput extends ParameterPanelFolder { - JCheckBox outputOverwite; // GPX_OVERWRITE_TO_SOURCE + public JCheckBox outputOverwite; // _OVERWRITE_TO_SOURCE + ParameterPanelFolder srcPanelFolder; /** * コンストラクタ @@ -20,14 +21,14 @@ /** * チェックボックス "入力ファイルに上書きする" - * @param label + * @param srcPanelFolder // */ - public void addCheckOverwriteToSource(String label) { + public void addCheckOverwriteToSource(ParameterPanelFolder srcPanelFolder) { + this.srcPanelFolder = srcPanelFolder; boolean selected = false; - outputOverwite = new JCheckBox(label, selected); + outputOverwite = new JCheckBox(i18n.getString("label.580"), selected); outputOverwite.setEnabled(true); outputOverwite.addActionListener(new ChangeOverwriteAction()); - this.add(outputOverwite); } /** @@ -41,7 +42,10 @@ public void actionPerformed(java.awt.event.ActionEvent event) { Object object = event.getSource(); if (object == outputOverwite) { - //setEnabled(outputIMG.isEnabled()); + if (outputOverwite.isSelected()) { + String text = srcPanelFolder.argField.getText(); + argField.setText(text); + } } } } diff --git a/src/main/java/osm/surveyor/matchtime/gui/ReStamp.java b/src/main/java/osm/surveyor/matchtime/gui/ReStamp.java index 735d9fe..f1a4075 100644 --- a/src/main/java/osm/surveyor/matchtime/gui/ReStamp.java +++ b/src/main/java/osm/surveyor/matchtime/gui/ReStamp.java @@ -194,10 +194,11 @@ // 4. "出力フォルダ: " { arg4_output = new ParameterPanelOutput( - i18n.getString("label.530") + ": ", - params.getProperty(AppParameters.IMG_OUTPUT_FOLDER) + i18n.getString("label.530") + ": ", "" ); - arg4_output.addCheckOverwriteToSource(i18n.getString("label.110")); + + // チェックボックス: "入力ファイルに上書きする" + arg4_output.addCheckOverwriteToSource(arg1_srcFolder); arg4_output.argField.getDocument().addDocumentListener( new SimpleDocumentListener() { @Override diff --git a/src/main/java/osm/surveyor/matchtime/gui/restamp/CardPerformFile.java b/src/main/java/osm/surveyor/matchtime/gui/restamp/CardPerformFile.java index 17e8a4f..3f3236d 100644 --- a/src/main/java/osm/surveyor/matchtime/gui/restamp/CardPerformFile.java +++ b/src/main/java/osm/surveyor/matchtime/gui/restamp/CardPerformFile.java @@ -65,6 +65,7 @@ ); argsPanel.add(packLine(label5, new JPanel())); argsPanel.add(arg_output); + argsPanel.add(arg_output.outputOverwite); // [処理実行]ボタン doButton = new JButton(