1 package osm.jp.gpx.matchtime.gui;
4 import java.awt.event.ActionEvent;
6 import java.io.IOException;
7 import java.text.SimpleDateFormat;
9 import java.util.ResourceBundle;
10 import java.util.TimeZone;
13 import org.apache.commons.imaging.Imaging;
14 import org.apache.commons.imaging.common.ImageMetadata;
15 import org.apache.commons.imaging.formats.jpeg.JpegImageMetadata;
16 import org.apache.commons.imaging.formats.tiff.TiffImageMetadata;
17 import org.apache.commons.imaging.formats.tiff.constants.ExifTagConstants;
22 @SuppressWarnings("serial")
23 public class AdjustTime extends JFrame
25 public static final String PROGRAM_NAME = "AdjustTime for JOSM";
26 public static final String PROGRAM_VARSION = "4.01";
27 public static final String PROGRAM_UPDATE = "2018/09/17";
30 SimpleDateFormat dfjp = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss Z");
32 // Used for addNotify check.
33 boolean fComponentsAdjusted = false;
34 public ResourceBundle i18n = ResourceBundle.getBundle("i18n");
37 JPanel cardPanel; // ウィザード形式パネル(カード型)
40 JPanel argsPanel; // パラメータ設定パネル (上部)
41 JScrollPane imageSPane; // スクロールパネル
42 JLabel imageLabel; // 基準時刻画像表示
43 ButtonGroup baseTimeGroup; // 基準時刻の指定グループ
44 JRadioButton exifBase; // EXIF日時を基準にする/ !(ファイル更新日時を基準にする)
45 JRadioButton fupdateBase; // File更新日時を基準にする/ !(EXIF日時を基準にする)
46 JCheckBox noFirstNode; // GPX: <trkseg>セグメントの最初の1ノードは無視する。 {ON | OFF}
47 JCheckBox gpxReuse; // 生成されたGPXファイル(ファイル名が'_.gpx'で終わるもの)も対象にする。 {ON | OFF}
48 JTextArea textArea; // 実行結果表示領域
49 //ImagePreview imagePane; // 基準時刻画像表示
50 ParameterPanelFolder arg1_srcFolder;
51 ParameterPanelImageFile arg2_baseTimeImg;
52 ParameterPanel arg3_basetime; // 基準時刻:
53 JCheckBox outputIMG; // IMGの変換 する/しない
54 JCheckBox outputIMG_all; // 'out of GPX time'でもIMGの変換をする {ON | OFF}
55 JCheckBox exifON; // EXIF 書き出しモード / !(EXIFの書き換えはしない)
56 JCheckBox gpxOutputWpt; // GPXに<WPT>を書き出す
57 JCheckBox gpxOverwriteMagvar; // ソースGPXの<MAGVAR>を無視する
58 JCheckBox gpxOutputSpeed; // GPXに<SPEED>を書き出す
59 ParameterPanelFolder arg5_outputFolder; // EXIF 書き出しフォルダ
60 ParameterPanelGpx arg4_gpxFolder; // GPXファイル・フォルダ
62 JPanel buttonPanel; // ボタンパネル (下部)
63 JButton openButton; // [Fit]ボタン
64 JButton zoomInButton; // [Zoom in]ボタン
65 JButton zoomOutButton; // [Zoom out]ボタン
67 JButton nextButton; // [次へ]ボタン
68 JButton backButton; // [戻る]ボタン
69 JButton doButton; // [処理実行]ボタン
73 java.awt.MenuBar mainMenuBar;
75 java.awt.MenuItem miDoNewFileList;
76 java.awt.MenuItem miDoDirSize;
77 java.awt.MenuItem miDoReadXML;
78 java.awt.MenuItem miExit;
80 java.awt.MenuItem miAbout;
83 class SymWindow extends java.awt.event.WindowAdapter {
86 * このパネルが閉じられたら、このアプリケーションも終了させる。
89 public void windowClosing(java.awt.event.WindowEvent event) {
90 Object object = event.getSource();
91 if (object == AdjustTime.this) {
92 DbMang_WindowClosing(event);
97 class SymAction implements java.awt.event.ActionListener {
99 public void actionPerformed(java.awt.event.ActionEvent event) {
100 Object object = event.getSource();
101 if (object == miAbout) {
102 miAbout_Action(event);
104 else if (object == miExit) {
105 miExit_Action(event);
107 else if (object == openButton) {
108 imageView_Action(event);
110 else if (object == zoomInButton) {
111 zoomin_Action(event);
113 else if (object == zoomOutButton) {
114 zoomout_Action(event);
116 else if (object == arg2_baseTimeImg.argField) {
117 imageView_Action(event);
119 else if (object == arg2_baseTimeImg.openButton) {
120 selectImage_Action(event);
121 imageView_Action(event);
123 else if (object == outputIMG) {
124 outputIMG_Action(event);
126 else if (object == outputIMG_all) {
127 outputIMGall_Action(event);
129 else if (object == exifON) {
130 exifON_Action(event);
132 else if (object == gpxOutputWpt) {
133 gpxOutputWpt_Action(event);
135 else if (object == gpxOutputSpeed) {
136 gpxOutputSpeed_Action(event);
138 else if (object == doButton) {
139 doButton_Action(event);
141 else if (object == nextButton) {
142 nextButton_Action(event);
144 else if (object == backButton) {
145 backButton_Action(event);
151 * データベース内のテーブルを一覧で表示するFrame
152 * @throws IOException
154 @SuppressWarnings("OverridableMethodCallInConstructor")
155 public AdjustTime() throws IOException
157 dfjp.setTimeZone(TimeZone.getTimeZone("JST"));
160 Container container = getContentPane();
161 container.setLayout(new BorderLayout());
163 getInsets().left + getInsets().right + 720,
164 getInsets().top + getInsets().bottom + 480
166 setTitle(AdjustTime.PROGRAM_NAME +" v"+ AdjustTime.PROGRAM_VARSION);
169 JPanel mainPanel = new JPanel();
170 mainPanel.setLayout(new BorderLayout());
171 container.add(mainPanel, BorderLayout.CENTER);
174 JPanel southPanel = new JPanel(new BorderLayout());
175 southPanel.add(Box.createVerticalStrut(10), BorderLayout.SOUTH);
176 southPanel.add(Box.createVerticalStrut(10), BorderLayout.NORTH);
177 container.add(southPanel, BorderLayout.SOUTH);
180 container.add(Box.createVerticalStrut(30), BorderLayout.NORTH);
181 container.add(Box.createHorizontalStrut(10), BorderLayout.WEST);
182 container.add(Box.createHorizontalStrut(10), BorderLayout.EAST);
184 params = new AppParameters();
186 //---------------------------------------------------------------------
187 cardPanel = new JPanel();
188 cardPanel.setLayout(new CardLayout());
189 mainPanel.add(cardPanel, BorderLayout.CENTER);
191 nextButton = new JButton(i18n.getString("button.next"));
192 southPanel.add(nextButton, BorderLayout.EAST);
194 backButton = new JButton(i18n.getString("button.previous"));
195 southPanel.add(backButton, BorderLayout.WEST);
197 cards = new JPanel[5];
198 for (int i=0; i < 5; i++) {
199 cards[i] = new JPanel();
200 cardPanel.add(cards[i], String.valueOf(i));
204 //---------------------------------------------------------------------
207 cards[cardNo].setLayout(new BorderLayout());
208 JLabel label1 = new JLabel();
209 label1.setText(i18n.getString("label.100"));
210 cards[cardNo].add(label1, BorderLayout.NORTH);
212 argsPanel = new JPanel();
213 argsPanel.setLayout(new BoxLayout(argsPanel, BoxLayout.Y_AXIS));
214 arg1_srcFolder = new ParameterPanelFolder(i18n.getString("label.110") +": ", params.getProperty(AppParameters.IMG_SOURCE_FOLDER));
215 argsPanel.add(arg1_srcFolder);
216 cards[cardNo].add(argsPanel, BorderLayout.CENTER);
218 //---------------------------------------------------------------------
221 cards[cardNo].setLayout(new BorderLayout());
222 JLabel label2 = new JLabel();
223 label2.setText(i18n.getString("label.200"));
224 cards[cardNo].add(label2, BorderLayout.NORTH);
226 argsPanel = new JPanel();
229 argsPanel.setLayout(new BoxLayout(argsPanel, BoxLayout.Y_AXIS));
230 arg2_baseTimeImg = new ParameterPanelImageFile(i18n.getString("label.210") +": ", params.getProperty(AppParameters.IMG_BASE_FILE), arg1_srcFolder);
231 argsPanel.add(arg2_baseTimeImg);
233 baseTimeGroup = new ButtonGroup();
236 exifBase = new JRadioButton(i18n.getString("label.220"));
239 fupdateBase = new JRadioButton(i18n.getString("label.230"));
240 baseTimeGroup.add(exifBase);
241 baseTimeGroup.add(fupdateBase);
242 argsPanel.add(exifBase);
243 argsPanel.add(fupdateBase);
244 if (params.getProperty(AppParameters.GPX_BASETIME).equals("EXIF_TIME")) {
245 fupdateBase.setSelected(false);
246 exifBase.setSelected(true);
249 fupdateBase.setSelected(true);
250 exifBase.setSelected(false);
252 cards[cardNo].add(argsPanel, BorderLayout.CENTER);
254 //---------------------------------------------------------------------
257 cards[cardNo].setLayout(new BorderLayout());
258 argsPanel = new JPanel();
259 argsPanel.setLayout(new GridLayout(2, 1));
261 // 3. 正確な撮影時刻を入力してください。
262 // カメラの時計が正確ならば、設定を変更する必要はありません。
263 JLabel label3 = new JLabel();
264 label3.setText(i18n.getString("label.300"));
265 argsPanel.add(label3);
268 String str310 = String.format(" %s: ", i18n.getString("label.310"));
269 arg3_basetime = new ParameterPanel(str310, ImportPicture.TIME_FORMAT_STRING);
270 argsPanel.add(arg3_basetime);
271 cards[cardNo].add(argsPanel, BorderLayout.NORTH);
274 imageLabel = new JLabel();
275 imageSPane = new JScrollPane(imageLabel);
276 cards[cardNo].add(imageSPane, BorderLayout.CENTER);
278 // 画像ファイル選択ダイアログを起動するボタン
279 buttonPanel = new JPanel();
280 buttonPanel.setLayout(new BoxLayout(buttonPanel, BoxLayout.X_AXIS));
281 openButton = new JButton(createImageIcon("images/Fit16.gif"));
282 buttonPanel.add(openButton);
283 zoomInButton = new JButton(createImageIcon("images/ZoomIn16.gif"));
284 buttonPanel.add(zoomInButton);
285 zoomOutButton = new JButton(createImageIcon("images/ZoomOut16.gif"));
286 buttonPanel.add(zoomOutButton);
287 cards[cardNo].add(buttonPanel, BorderLayout.SOUTH);
289 //---------------------------------------------------------------------
292 cards[cardNo].setLayout(new BorderLayout());
294 // 4. ヒモ付を行うGPXファイルを選択してください。
295 // - フォルダを指定すると、フォルダ内のすべてのGPXファイルを対象とします。
296 JLabel label4 = new JLabel();
297 label4.setText(i18n.getString("label.400"));
298 cards[cardNo].add(label4, BorderLayout.NORTH);
300 JPanel tmpPanel4a = new JPanel();
301 tmpPanel4a.setLayout(new BoxLayout(tmpPanel4a, BoxLayout.Y_AXIS));
304 arg4_gpxFolder = new ParameterPanelGpx(
305 i18n.getString("label.410") + ": ",
306 params.getProperty(AppParameters.GPX_SOURCE_FOLDER)
308 tmpPanel4a.add(arg4_gpxFolder);
310 // "セグメント'trkseg'の最初の1ノードは無視する。"
311 noFirstNode = new JCheckBox(
312 i18n.getString("label.420"),
313 params.getProperty(AppParameters.GPX_NO_FIRST_NODE).equals("ON")
315 tmpPanel4a.add(noFirstNode);
317 // "生成されたGPXファイル(ファイル名が'_.gpx'で終わるもの)も変換の対象にする"
318 gpxReuse = new JCheckBox(
319 i18n.getString("label.430"),
320 params.getProperty(AppParameters.GPX_REUSE).equals("ON")
322 gpxReuse.setEnabled(true);
323 tmpPanel4a.add(gpxReuse);
324 cards[cardNo].add(tmpPanel4a, BorderLayout.CENTER);
326 //---------------------------------------------------------------------
329 cards[cardNo].setLayout(new BorderLayout());
331 // 5. EXIF変換を行うかどうかを選択してください。
332 // - EXIF変換を行う場合には、変換ファイルを出力するフォルダも指定する必要があります。
333 // - 出力フォルダには、書き込み権限と、十分な空き容量が必要です。
334 JLabel label5 = new JLabel();
337 "<html><p>5. %s</p><ul><li>%s</li><li>%s</li></ul>",
338 i18n.getString("label.500"),
339 i18n.getString("label.501"),
340 i18n.getString("label.502")
343 cards[cardNo].add(label5, BorderLayout.NORTH);
345 JPanel tmpPanel5 = new JPanel();
346 tmpPanel5.setLayout(new BoxLayout(tmpPanel5, BoxLayout.Y_AXIS));
349 outputIMG = new JCheckBox(
350 i18n.getString("label.510"),
351 Boolean.parseBoolean(params.getProperty(AppParameters.IMG_OUTPUT))
353 tmpPanel5.add(outputIMG);
355 // "GPXファイル時間外のファイルもコピーする"
356 outputIMG_all = new JCheckBox(
357 i18n.getString("label.520"),
358 Boolean.parseBoolean(params.getProperty(AppParameters.IMG_OUTPUT_ALL))
360 tmpPanel5.add(outputIMG_all);
363 arg5_outputFolder = new ParameterPanelFolder(
364 i18n.getString("label.530") + ": ",
365 params.getProperty(AppParameters.IMG_OUTPUT_FOLDER)
367 tmpPanel5.add(arg5_outputFolder);
370 exifON = new JCheckBox(
371 i18n.getString("label.540"),
372 Boolean.parseBoolean(params.getProperty(AppParameters.IMG_OUTPUT_EXIF))
374 tmpPanel5.add(exifON);
376 // "ポイントマーカー<WPT>をGPXファイルに出力する"
377 gpxOutputWpt = new JCheckBox(
378 i18n.getString("label.550"),
379 Boolean.parseBoolean(params.getProperty(AppParameters.GPX_OUTPUT_WPT))
381 gpxOutputWpt.setEnabled(true);
382 tmpPanel5.add(gpxOutputWpt);
384 // "ソースGPXの<MAGVAR>を無視する"
385 gpxOverwriteMagvar = new JCheckBox(
386 i18n.getString("label.560"),
387 Boolean.parseBoolean(params.getProperty(AppParameters.GPX_OVERWRITE_MAGVAR))
389 gpxOverwriteMagvar.setEnabled(true);
390 tmpPanel5.add(gpxOverwriteMagvar);
392 // "出力GPXに<SPEED>を上書きする"
393 gpxOutputSpeed = new JCheckBox(
394 i18n.getString("label.570"),
395 Boolean.parseBoolean(params.getProperty(AppParameters.GPX_OUTPUT_SPEED))
397 gpxOutputSpeed.setEnabled(true);
398 tmpPanel5.add(gpxOutputSpeed);
400 cards[cardNo].add(tmpPanel5, BorderLayout.CENTER);
403 doButton = new JButton(
404 i18n.getString("button.execute"),
405 AdjustTime.createImageIcon("images/media_playback_start.png")
407 cards[cardNo].add(doButton, BorderLayout.SOUTH);
410 //---------------------------------------------------------------------
412 menu1 = new java.awt.Menu("File");
413 miExit = new java.awt.MenuItem(i18n.getString("menu.quit"));
414 miExit.setFont(new Font("Dialog", Font.PLAIN, 12));
417 miAbout = new java.awt.MenuItem("About...");
418 miAbout.setFont(new Font("Dialog", Font.PLAIN, 12));
420 menu3 = new java.awt.Menu("Help");
421 menu3.setFont(new Font("Dialog", Font.PLAIN, 12));
424 mainMenuBar = new java.awt.MenuBar();
425 mainMenuBar.setHelpMenu(menu3);
426 mainMenuBar.add(menu1);
427 mainMenuBar.add(menu3);
428 setMenuBar(mainMenuBar);
430 //{{REGISTER_LISTENERS
431 SymWindow aSymWindow = new SymWindow();
432 this.addWindowListener(aSymWindow);
433 SymAction lSymAction = new SymAction();
434 miAbout.addActionListener(lSymAction);
435 miExit.addActionListener(lSymAction);
436 openButton.addActionListener(lSymAction);
437 zoomOutButton.addActionListener(lSymAction);
438 zoomInButton.addActionListener(lSymAction);
439 arg2_baseTimeImg.argField.addActionListener(lSymAction);
440 arg2_baseTimeImg.openButton.addActionListener(lSymAction);
441 doButton.addActionListener(lSymAction);
442 outputIMG_all.addActionListener(lSymAction);
443 exifON.addActionListener(lSymAction);
444 gpxOutputSpeed.addActionListener(lSymAction);
445 noFirstNode.addActionListener(lSymAction);
446 gpxReuse.addActionListener(lSymAction);
447 //arg1Panel_4.field.addActionListener(lSymAction);
448 nextButton.addActionListener(lSymAction);
449 backButton.addActionListener(lSymAction);
454 * Shows or hides the component depending on the boolean flag b.
455 * @param b trueのときコンポーネントを表示; その他のとき, componentを隠す.
456 * @see java.awt.Component#isVisible
459 public void setVisible(boolean b) {
467 * このクラスをインスタンスを生成して表示する。
471 @SuppressWarnings("UseSpecificCatch")
472 static public void main(String args[]) {
473 SwingUtilities.invokeLater(() -> {
476 } catch (Exception e) {
481 private static void createAndShowGUI() throws IOException {
482 (new AdjustTime()).setVisible(true);
486 public void addNotify() {
487 // Record the size of the window prior to calling parents addNotify.
488 Dimension d = getSize();
492 if (fComponentsAdjusted)
495 // Adjust components according to the insets
496 setSize(getInsets().left + getInsets().right + d.width, getInsets().top + getInsets().bottom + d.height);
497 Component components[] = getComponents();
498 for (Component component : components) {
499 Point p = component.getLocation();
500 p.translate(getInsets().left, getInsets().top);
501 component.setLocation(p);
503 fComponentsAdjusted = true;
506 void DbMang_WindowClosing(java.awt.event.WindowEvent event) {
507 setVisible(false); // hide the Manager
508 dispose(); // free the system resources
509 System.exit(0); // close the application
512 void miAbout_Action(java.awt.event.ActionEvent event) {
513 // Action from About Create and show as modal
514 (new AboutDialog(this, true)).setVisible(true);
517 void miExit_Action(java.awt.event.ActionEvent event) {
518 // Action from Exit Create and show as modal
519 //(new hayashi.yuu.tools.gui.QuitDialog(this, true)).setVisible(true);
520 (new QuitDialog(this, true)).setVisible(true);
527 * 基準画像ボタンがクリックされた時に、基準時刻フィールドに基準画像の作成日時を設定する。
530 @SuppressWarnings("UseSpecificCatch")
531 public void imageView_Action(ActionEvent ev) {
532 String path = (new File(arg1_srcFolder.getText(), arg2_baseTimeImg.getText())).getPath();
534 File timeFile = new File(path);
535 if (exifBase.isSelected()) {
537 ImageMetadata meta = Imaging.getMetadata(timeFile);
538 JpegImageMetadata jpegMetadata = (JpegImageMetadata)meta;
539 if (jpegMetadata != null) {
540 TiffImageMetadata exif = jpegMetadata.getExif();
542 String dateTimeOriginal = exif.getFieldValue(ExifTagConstants.EXIF_TAG_DATE_TIME_ORIGINAL)[0];
543 long lastModifyTime = (new SimpleDateFormat("yyyy:MM:dd HH:mm:ss")).parse(dateTimeOriginal).getTime();
544 arg3_basetime.argField.setText(dfjp.format(new Date(lastModifyTime)));
547 arg3_basetime.argField.setText("exif == null");
551 catch (Exception e) {}
554 long lastModifyTime = timeFile.lastModified();
555 arg3_basetime.argField.setText(dfjp.format(new Date(lastModifyTime)));
558 int size_x = imageSPane.getWidth() - 8;
559 ImageIcon tmpIcon = new ImageIcon(path);
561 if (tmpIcon.getIconWidth() > size_x) {
562 refImage = new ImageIcon(tmpIcon.getImage().getScaledInstance(size_x, -1, Image.SCALE_DEFAULT));
564 imageLabel.setIcon(refImage);
568 public void zoomin_Action(ActionEvent ev) {
569 if (refImage != null) {
570 int size_x = imageLabel.getWidth();
571 String path = (new File(arg1_srcFolder.getText(), arg2_baseTimeImg.getText())).getPath();
572 ImageIcon tmpIcon = new ImageIcon(path);
573 refImage = new ImageIcon(tmpIcon.getImage().getScaledInstance(size_x * 2, -1, Image.SCALE_DEFAULT));
574 imageLabel.setIcon(refImage);
579 public void zoomout_Action(ActionEvent ev) {
580 if (refImage != null) {
581 int size_x = imageLabel.getWidth();
582 ImageIcon tmpIcon = refImage;
583 refImage = new ImageIcon(tmpIcon.getImage().getScaledInstance(size_x / 2, -1, Image.SCALE_DEFAULT));
584 imageLabel.setIcon(refImage);
590 * ソースディレクトリが選択された時のアクション
591 * → AdjustTime.ini に書き込む
594 public void selectSource_Action(ActionEvent ev) {
597 public void selectImage_Action(ActionEvent ev) {
600 //Set up the file chooser.
601 File sdir = new File(arg1_srcFolder.getText());
602 System.out.println(sdir.getPath());
603 if (sdir.isDirectory()) {
604 fc = new JFileChooser(sdir);
607 fc = new JFileChooser();
610 //Add a custom file filter and disable the default
611 //(Accept All) file filter.
612 fc.addChoosableFileFilter(new ImageFilter());
613 fc.setAcceptAllFileFilterUsed(false);
615 //Add custom icons for file types.
616 fc.setFileView(new ImageFileView());
618 //Add the preview pane.
619 fc.setAccessory(new ImagePreview(fc));
622 int returnVal = fc.showDialog(this, i18n.getString("dialog.select"));
624 //Process the results.
625 if (returnVal == JFileChooser.APPROVE_OPTION) {
626 File file = fc.getSelectedFile();
627 arg2_baseTimeImg.argField.setText(file.getName());
630 //Reset the file chooser for the next time it's shown.
631 fc.setSelectedFile(null);
634 /** Returns an ImageIcon, or null if the path was invalid.
637 public static ImageIcon createImageIcon(String path) {
638 java.net.URL imgURL = AdjustTime.class.getResource(path);
639 if (imgURL != null) {
640 return new ImageIcon(imgURL);
642 System.err.println("Couldn't find file: " + path);
648 * checkbox[IMG変換]を変更した場合のアクション
649 * ON ー> IMG出力フォルダのフィールドを有効にする
650 * OFF -> IMG出力フォルダのフィールドを無効にする
653 void outputIMG_Action (ActionEvent event) {
654 arg5_outputFolder.setEnabled(outputIMG.isEnabled());
658 * checkbox[GPXファイル時間外のファイルもコピーする]を変更した場合のアクション
661 void outputIMGall_Action (ActionEvent event) {
665 * checkbox[EXIF書き出し]を変更した場合のアクション
668 void exifON_Action (ActionEvent event) {
672 * checkbox[GPXの<WPT>を出力する]を変更した場合のアクション
675 void gpxOutputWpt_Action (ActionEvent event) {
679 * checkbox[GPXの<SPPED>を書き換える]を変更した場合のアクション
682 void gpxOutputSpeed_Action (ActionEvent event) {
686 * [実行]ボタンをクリックしたときの動作
689 @SuppressWarnings("UseSpecificCatch")
690 void doButton_Action(java.awt.event.ActionEvent event) {
691 doButton.setEnabled(false);
693 String[] argv = new String[0];
695 argv[0] = arg1_srcFolder.getText();
696 argv[1] = arg2_baseTimeImg.getText();
697 argv[2] = arg3_basetiome.getText();
698 argv[3] = arg5_outputFolder.getText();
699 argv[4] = arg4_gpxFolder.getText();
701 this.params.setProperty(AppParameters.GPX_NO_FIRST_NODE, String.valueOf(noFirstNode.isSelected()));
702 this.params.setProperty(AppParameters.GPX_REUSE, String.valueOf(gpxReuse.isSelected()));
703 this.params.setProperty(AppParameters.GPX_SOURCE_FOLDER, arg4_gpxFolder.getText());
705 if (exifBase.isSelected()) {
706 this.params.setProperty(AppParameters.GPX_BASETIME, "EXIF_TIME");
709 this.params.setProperty(AppParameters.GPX_BASETIME, "FILE_UPDATE");
712 this.params.setProperty(AppParameters.IMG_SOURCE_FOLDER, arg1_srcFolder.getText());
713 this.params.setProperty(AppParameters.IMG_BASE_FILE, arg2_baseTimeImg.getText());
714 this.params.setProperty(AppParameters.IMG_TIME, ImportPicture.toUTCString(dfjp.parse(arg3_basetime.getText())));
715 this.params.setProperty(AppParameters.IMG_OUTPUT, String.valueOf(outputIMG.isSelected()));
716 this.params.setProperty(AppParameters.IMG_OUTPUT_FOLDER, arg5_outputFolder.getText());
717 this.params.setProperty(AppParameters.IMG_OUTPUT_ALL, String.valueOf(outputIMG_all.isSelected()));
718 this.params.setProperty(AppParameters.IMG_OUTPUT_EXIF, String.valueOf(exifON.isSelected()));
719 this.params.setProperty(AppParameters.GPX_OVERWRITE_MAGVAR, String.valueOf(gpxOverwriteMagvar.isSelected()));
720 this.params.setProperty(AppParameters.GPX_OUTPUT_SPEED, String.valueOf(gpxOutputSpeed.isSelected()));
721 this.params.setProperty(AppParameters.GPX_OUTPUT_WPT, String.valueOf(gpxOutputWpt.isSelected()));
728 (new DoDialog(this, argv)).setVisible(true);
730 doButton.setEnabled(true);
737 void nextButton_Action(ActionEvent event) {
738 if ((cardPanelNo + 1) < cards.length) {
740 CardLayout cl = (CardLayout)(cardPanel.getLayout());
741 cl.show(cardPanel, String.valueOf(cardPanelNo));
749 void backButton_Action(ActionEvent event) {
750 if ((cardPanelNo - 1) >= 0) {
752 CardLayout cl = (CardLayout)(cardPanel.getLayout());
753 cl.show(cardPanel, String.valueOf(cardPanelNo));