• R/O
  • HTTP
  • SSH
  • HTTPS

importpicture: Commit


Commit MetaInfo

Revisiond306702ac3cf27944a750ddea6526c5ad575ff8e (tree)
Time2019-10-14 15:05:41
Authorhaya4 <hayashi.yuu@gmai...>
Commiterhaya4

Log Message

Restamp 終了の画像選択と時刻の設定画面

Change Summary

Incremental Difference

--- a/src/i18n.properties
+++ b/src/i18n.properties
@@ -21,6 +21,7 @@ label.110=Image Folder
2121
2222 tab.200=2. Set correct shooting time
2323 tab.restamp.200=2. Set correct shooting time (start)
24+tab.restamp.250=3. Set correct shooting time (end)
2425 label.200=<html><p>2. Choose an image whose exact shooting time can be known.</p><ul><li>If the camera's clock is accurate, you can choose any image.</li></ul>
2526 label.210=Reference time image
2627 label.220=Based on EXIF date and time
--- a/src/i18n_ja_JP.properties
+++ b/src/i18n_ja_JP.properties
@@ -21,6 +21,7 @@ label.110=\u5bfe\u8c61\u30d5\u30a9\u30eb\u30c0
2121
2222 tab.200=2. \u57fa\u6e96\u3068\u3059\u308b\u753b\u50cf\u306e\u9078\u629e
2323 tab.restamp.200=2. \u57fa\u6e96\u3068\u3059\u308b\u753b\u50cf(\u958b\u59cb\u753b\u50cf)\u306e\u9078\u629e
24+tab.restamp.250=3. \u57fa\u6e96\u3068\u3059\u308b\u753b\u50cf(\u7d42\u4e86\u753b\u50cf)\u306e\u9078\u629e
2425 label.200=<html><p>2. \u6b63\u78ba\u306a\u64ae\u5f71\u6642\u523b\u304c\u5224\u660e\u3067\u304d\u308b\u753b\u50cf\u3092\u9078\u3093\u3067\u304f\u3060\u3055\u3044\u3002</p><ul><li>\u30b9\u30de\u30fc\u30c8\u30d5\u30a9\u30f3\u306e\u6642\u8a08\u753b\u9762\uff08\u79d2\u304c\u5224\u5225\u3067\u304d\u308b\u3053\u3068\uff09\u3092\u64ae\u5f71\u3057\u305f\u753b\u50cf</li><li>\u30ab\u30e1\u30e9\u306e\u6642\u8a08\u304c\u6b63\u78ba\u306a\u3089\u3070\u3001\u3069\u306e\u753b\u50cf\u3092\u9078\u3093\u3067\u3082\u69cb\u3044\u307e\u305b\u3093\u3002</li></ul>
2526 label.210=\u57fa\u6e96\u6642\u523b\u753b\u50cf
2627 label.220=EXIF\u306e\u65e5\u6642\u3092\u57fa\u6e96\u306b\u3059\u308b
@@ -28,6 +29,7 @@ label.230=\u30d5\u30a1\u30a4\u30eb\u66f4\u65b0\u65e5\u6642\u3092\u57fa\u6e96\u30
2829
2930 tab.300=2a. \u672c\u5f53\u306e\u6642\u523b\u3092\u8a2d\u5b9a
3031 tab.restamp.300=2a. \u958b\u59cb\u753b\u50cf\u306e\u672c\u5f53\u306e\u6642\u523b\u3092\u8a2d\u5b9a
32+tab.restamp.350=3a. \u7d42\u4e86\u753b\u50cf\u306e\u672c\u5f53\u306e\u6642\u523b\u3092\u8a2d\u5b9a
3133 label.300=<html><p>3. \u6b63\u78ba\u306a\u64ae\u5f71\u6642\u523b\u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002</p><ul><li>\u30ab\u30e1\u30e9\u306e\u6642\u8a08\u304c\u6b63\u78ba\u306a\u3089\u3070\u3001\u8a2d\u5b9a\u3092\u5909\u66f4\u3059\u308b\u5fc5\u8981\u306f\u3042\u308a\u307e\u305b\u3093\u3002</li></ul>
3234 label.310=\u57fa\u6e96\u6642\u523b
3335 label.restamp.310=\u57fa\u6e96\u6642\u523b(\u958b\u59cb\u753b\u50cf)
--- a/src/osm/jp/gpx/matchtime/gui/restamp/CardFirstFile.java
+++ b/src/osm/jp/gpx/matchtime/gui/restamp/CardFirstFile.java
@@ -1,28 +1,14 @@
11 package osm.jp.gpx.matchtime.gui.restamp;
22
3-import java.awt.BorderLayout;
4-import java.awt.Dimension;
53 import java.awt.Dialog;
6-import javax.swing.BoxLayout;
7-import javax.swing.JLabel;
8-import javax.swing.JPanel;
94 import javax.swing.JTabbedPane;
10-import osm.jp.gpx.matchtime.gui.AdjustTime;
11-import static osm.jp.gpx.matchtime.gui.AdjustTime.i18n;
12-import osm.jp.gpx.matchtime.gui.Card;
13-import osm.jp.gpx.matchtime.gui.PanelAction;
14-import osm.jp.gpx.matchtime.gui.ParameterPanelImageFile;
155 import osm.jp.gpx.matchtime.gui.ParameterPanelTime;
166
177 /**
188 * [基準画像(開始)]選択パネル
199 * @author yuu
2010 */
21-public class CardFirstFile extends Card implements PanelAction {
22- //JPanel argsPanel; // パラメータ設定パネル (上部)
23- ParameterPanelImageFile arg_baseTimeImg;
24- ParameterPanelTime arg_basetime;
25-
11+public class CardFirstFile extends CardImageFile {
2612 /**
2713 * コンストラクタ
2814 * @param tabbe parent panel
@@ -34,43 +20,6 @@ public class CardFirstFile extends Card implements PanelAction {
3420 ParameterPanelTime arg_basetime,
3521 Dialog owner
3622 ) {
37- super(tabbe, AdjustTime.i18n.getString("tab.restamp.200"), 0, 2);
38- arg_basetime.setOwner(owner);
39- this.arg_baseTimeImg = arg_basetime.getImageFile();
40- this.arg_basetime = arg_basetime;
41-
42- JPanel argsPanel = new JPanel();
43- argsPanel.setLayout(new BoxLayout(argsPanel, BoxLayout.PAGE_AXIS));
44- argsPanel.add(packLine(new JLabel(i18n.getString("label.200")), new JPanel()));
45- argsPanel.add(arg_baseTimeImg);
46-
47- JPanel separater = new JPanel();
48- separater.setMinimumSize(new Dimension(40, 20));
49- argsPanel.add(separater);
50-
51- argsPanel.add(packLine(new JLabel(i18n.getString("label.300")), new JPanel()));
52- argsPanel.add(arg_basetime);
53-
54- JPanel space = new JPanel();
55- space.setMinimumSize(new Dimension(40, 20));
56- space.setMaximumSize(new Dimension(40, Short.MAX_VALUE));
57- argsPanel.add(space);
58-
59- this.mainPanel.add(argsPanel, BorderLayout.CENTER);
60- }
61-
62- /**
63- * 入力条件が満たされているかどうか
64- * @return
65- */
66- @Override
67- public boolean isEnable() {
68- return (arg_baseTimeImg.isEnable() && arg_basetime.isEnable());
69- }
70-
71- @Override
72- @SuppressWarnings("empty-statement")
73- public void openAction() {
74- ; // 何もしない
23+ super(tabbe, arg_basetime, owner, true);
7524 }
7625 }
--- /dev/null
+++ b/src/osm/jp/gpx/matchtime/gui/restamp/CardImageFile.java
@@ -0,0 +1,83 @@
1+package osm.jp.gpx.matchtime.gui.restamp;
2+
3+import java.awt.BorderLayout;
4+import java.awt.Dimension;
5+import java.awt.Dialog;
6+import javax.swing.BoxLayout;
7+import javax.swing.JLabel;
8+import javax.swing.JPanel;
9+import javax.swing.JTabbedPane;
10+import osm.jp.gpx.matchtime.gui.AdjustTime;
11+import static osm.jp.gpx.matchtime.gui.AdjustTime.i18n;
12+import osm.jp.gpx.matchtime.gui.Card;
13+import osm.jp.gpx.matchtime.gui.PanelAction;
14+import osm.jp.gpx.matchtime.gui.ParameterPanelImageFile;
15+import osm.jp.gpx.matchtime.gui.ParameterPanelTime;
16+
17+/**
18+ * [基準画像(開始/終了)]選択パネル
19+ * @author yuu
20+ */
21+public class CardImageFile extends Card implements PanelAction {
22+ //JPanel argsPanel; // パラメータ設定パネル (上部)
23+ ParameterPanelImageFile arg_baseTimeImg;
24+ ParameterPanelTime arg_basetime;
25+
26+ /**
27+ * コンストラクタ
28+ * @param tabbe parent panel
29+ * @param arg_basetime // 開始画像の基準時刻:
30+ * @param owner
31+ * @param first // true=開始画像, false=終了画像
32+ */
33+ public CardImageFile(
34+ JTabbedPane tabbe,
35+ ParameterPanelTime arg_basetime,
36+ Dialog owner,
37+ boolean first
38+ ) {
39+ super(
40+ tabbe,
41+ AdjustTime.i18n.getString(first ? "tab.restamp.200" : "tab.restamp.250"),
42+ (first ? 0 : 1),
43+ (first ? 2 : 3)
44+ );
45+ arg_basetime.setOwner(owner);
46+ this.arg_baseTimeImg = arg_basetime.getImageFile();
47+ this.arg_basetime = arg_basetime;
48+
49+ JPanel argsPanel = new JPanel();
50+ argsPanel.setLayout(new BoxLayout(argsPanel, BoxLayout.PAGE_AXIS));
51+ argsPanel.add(packLine(new JLabel(i18n.getString("label.200")), new JPanel()));
52+ argsPanel.add(arg_baseTimeImg);
53+
54+ JPanel separater = new JPanel();
55+ separater.setMinimumSize(new Dimension(40, 20));
56+ argsPanel.add(separater);
57+
58+ argsPanel.add(packLine(new JLabel(i18n.getString("label.300")), new JPanel()));
59+ argsPanel.add(arg_basetime);
60+
61+ JPanel space = new JPanel();
62+ space.setMinimumSize(new Dimension(40, 20));
63+ space.setMaximumSize(new Dimension(40, Short.MAX_VALUE));
64+ argsPanel.add(space);
65+
66+ this.mainPanel.add(argsPanel, BorderLayout.CENTER);
67+ }
68+
69+ /**
70+ * 入力条件が満たされているかどうか
71+ * @return
72+ */
73+ @Override
74+ public boolean isEnable() {
75+ return (arg_baseTimeImg.isEnable() && arg_basetime.isEnable());
76+ }
77+
78+ @Override
79+ @SuppressWarnings("empty-statement")
80+ public void openAction() {
81+ ; // 何もしない
82+ }
83+}
--- a/src/osm/jp/gpx/matchtime/gui/restamp/RestampDialog.java
+++ b/src/osm/jp/gpx/matchtime/gui/restamp/RestampDialog.java
@@ -34,6 +34,8 @@ public class RestampDialog extends Dialog implements Observer
3434 ParameterPanelFolder arg1_srcFolder; // 対象フォルダ
3535 ParameterPanelImageFile arg2_baseTimeImg; // 開始画像ファイルパス
3636 ParameterPanelTime arg2_basetime; // 開始画像の基準時刻:
37+ ParameterPanelImageFile arg3_baseTimeImg; // 終了画像ファイルパス
38+ ParameterPanelTime arg3_basetime; // 終了画像の基準時刻:
3739 AppParameters params;
3840 //}}
3941
@@ -116,7 +118,7 @@ public class RestampDialog extends Dialog implements Observer
116118
117119 //---------------------------------------------------------------------
118120 params = new AppParameters();
119- cards = new Card[2];
121+ cards = new Card[3];
120122 cardPanel = new JTabbedPane(JTabbedPane.LEFT);
121123 mainPanel.add(cardPanel, BorderLayout.CENTER);
122124 int cardNo = 0;
@@ -171,7 +173,7 @@ public class RestampDialog extends Dialog implements Observer
171173 }
172174 );
173175
174- CardFirstFile card = new CardFirstFile(cardPanel, arg2_basetime, this);
176+ CardImageFile card = new CardImageFile(cardPanel, arg2_basetime, this, true);
175177 cardPanel.addTab(card.getTitle(), card);
176178 cardPanel.setEnabledAt(cardNo, false);
177179 cards[cardNo] = card;
@@ -179,16 +181,36 @@ public class RestampDialog extends Dialog implements Observer
179181 }
180182
181183 //---------------------------------------------------------------------
182- // 2a. 開始画像の本当の時刻を設定の入力画面
183- /*
184+ // 3. 最終画像の本当の時刻を設定の入力画面
184185 {
185- CardCorectTime card = new CardCorectTime(cardPanel, arg2_basetime);
186+ // 基準時刻画像
187+ arg3_baseTimeImg = new ParameterPanelImageFile(
188+ i18n.getString("label.210") +": ",
189+ null,
190+ arg1_srcFolder
191+ );
192+
193+ // 3a. 基準時刻:
194+ arg3_basetime = new ParameterPanelTime(
195+ i18n.getString("label.310"),
196+ null,
197+ arg3_baseTimeImg
198+ );
199+ arg3_basetime.argField.getDocument().addDocumentListener(
200+ new SimpleDocumentListener() {
201+ @Override
202+ public void update(DocumentEvent e) {
203+ toEnable(2, arg3_basetime.isEnable());
204+ }
205+ }
206+ );
207+
208+ CardImageFile card = new CardImageFile(cardPanel, arg3_basetime, this, false);
186209 cardPanel.addTab(card.getTitle(), card);
187210 cardPanel.setEnabledAt(cardNo, false);
188211 cards[cardNo] = card;
189212 cardNo++;
190213 }
191- */
192214
193215 //{{REGISTER_LISTENERS
194216 SymWindow aSymWindow = new SymWindow();
Show on old repository browser