Revision | fa5009851ff3e21882623c132887257ee2f360e7 (tree) |
---|---|
Time | 2019-08-25 21:28:00 |
Author | ![]() |
Commiter | haya4 |
タブパネルに変更
@@ -9,22 +9,26 @@ button.previous=Previous | ||
9 | 9 | button.execute=Execute |
10 | 10 | button.select=Selection... |
11 | 11 | |
12 | +tab.100=1. Source image Folder | |
12 | 13 | label.100=<html><p>1. Select image source folder.</p><ul><li>If you perform a copy operation, the file update time may be rewritten to the time the copy was executed. It is recommended to directly specify the folder in the camera SD card.</li></ul> |
13 | 14 | label.110=Image Folder |
14 | 15 | |
16 | +tab.200=2. Set correct shooting time | |
15 | 17 | 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> |
16 | 18 | label.210=Reference time image |
17 | 19 | label.220=Based on EXIF date and time |
18 | 20 | label.230=Based on FILE UPDATE time |
19 | - | |
21 | +tab.300=2a. Set correct shooting time | |
20 | 22 | label.300=<html><p>3. enter the correct shooting time.</p><ul><li>If the camera clock is accurate, you do not need to change the setting.</li></ul> |
21 | 23 | label.310=Reference time |
22 | 24 | |
25 | +tab.400=3. Select GPX files | |
23 | 26 | label.400=<html><p>4. Please select a GPX file to perform the matching.</p><ul><li>If you specify a folder, it will target all GPX files in the folder.</li></ul> |
24 | 27 | label.410=GPX folder |
25 | 28 | label.420=Ignore the first node of segment 'trkseg' |
26 | 29 | label.430=Also make the generated GPX file (the one whose filename ends with '_.gpx') as the target of conversion |
27 | 30 | |
31 | +tab.500=4. perform EXIF conversion | |
28 | 32 | label.500=Select whether to perform EXIF conversion |
29 | 33 | label.501=When performing EXIF conversion, you also need to specify the folder to output the converted file. |
30 | 34 | label.502=The output folder must have write permission and sufficient free space. |
@@ -9,22 +9,27 @@ button.previous=\u623b\u308b | ||
9 | 9 | button.execute=\u51e6\u7406\u5b9f\u884c |
10 | 10 | button.select=\u9078\u629e... |
11 | 11 | |
12 | +tab.100=1. \u753b\u50cf\u5143\u306e\u30d5\u30a1\u30a4\u30eb\u30d5\u30a9\u30eb\u30c0 | |
12 | 13 | label.100=<html><p>1. \u4f4d\u7f6e\u60c5\u5831\u3092\u4ed8\u52a0\u3057\u305f\u3044\u753b\u50cf\u30d5\u30a1\u30a4\u30eb\u304c\u683c\u7d0d\u3055\u308c\u3066\u3044\u308b\u30d5\u30a9\u30eb\u30c0\u3092\u9078\u629e\u3057\u3066\u304f\u3060\u3055\u3044\u3002</p><ul><li>\u30b3\u30d4\u30fc\u52d5\u4f5c\u3092\u884c\u3046\u3068\u3001\u30d5\u30a1\u30a4\u30eb\u66f4\u65b0\u6642\u523b\u304c\u30b3\u30d4\u30fc\u3092\u5b9f\u884c\u3057\u305f\u6642\u523b\u306b\u66f8\u304d\u63db\u308f\u3063\u3066\u3057\u307e\u3046\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u3002\u30ab\u30e1\u30e9SD\u30ab\u30fc\u30c9\u5185\u306e\u30d5\u30a9\u30eb\u30c0\u3092\u76f4\u63a5\u6307\u5b9a\u3059\u308b\u3053\u3068\u3092\u304a\u3059\u3059\u3081\u3057\u307e\u3059\u3002</li></ul> |
13 | 14 | label.110=\u5bfe\u8c61\u30d5\u30a9\u30eb\u30c0 |
14 | 15 | |
16 | +tab.200=2. \u57fa\u6e96\u3068\u3059\u308b\u753b\u50cf\u306e\u9078\u629e | |
15 | 17 | 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> |
16 | 18 | label.210=\u57fa\u6e96\u6642\u523b\u753b\u50cf |
17 | 19 | label.220=EXIF\u306e\u65e5\u6642\u3092\u57fa\u6e96\u306b\u3059\u308b |
18 | 20 | label.230=\u30d5\u30a1\u30a4\u30eb\u66f4\u65b0\u65e5\u6642\u3092\u57fa\u6e96\u306b\u3059\u308b |
19 | 21 | |
22 | +tab.300=2a. \u672c\u5f53\u306e\u6642\u523b\u3092\u8a2d\u5b9a | |
20 | 23 | 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> |
21 | 24 | label.310=\u57fa\u6e96\u6642\u523b |
22 | 25 | |
26 | +tab.400=3. GPX\u30d5\u30a1\u30a4\u30eb\u3092\u9078\u629e | |
23 | 27 | label.400=<html><p>4. \u30d2\u30e2\u4ed8\u3092\u884c\u3046GPX\u30d5\u30a1\u30a4\u30eb\u3092\u9078\u629e\u3057\u3066\u304f\u3060\u3055\u3044\u3002</p><ul><li>\u30d5\u30a9\u30eb\u30c0\u3092\u6307\u5b9a\u3059\u308b\u3068\u3001\u30d5\u30a9\u30eb\u30c0\u5185\u306b\u3042\u308b\u3059\u3079\u3066\u306eGPX\u30d5\u30a1\u30a4\u30eb\u3092\u5bfe\u8c61\u3068\u3057\u307e\u3059\u3002</li></ul> |
24 | 28 | label.410=GPX\u30d5\u30a9\u30eb\u30c0 |
25 | 29 | label.420=\u30bb\u30b0\u30e1\u30f3\u30c8'trkseg'\u306e\u6700\u521d\u306e\uff11\u30ce\u30fc\u30c9\u306f\u7121\u8996\u3059\u308b |
26 | 30 | label.430=\u751f\u6210\u3055\u308c\u305fGPX\u30d5\u30a1\u30a4\u30eb\uff08\u30d5\u30a1\u30a4\u30eb\u540d\u304c'_.gpx'\u3067\u7d42\u308f\u308b\u3082\u306e\uff09\u3082\u5909\u63db\u306e\u5bfe\u8c61\u306b\u3059\u308b |
27 | 31 | |
32 | +tab.500=4. EXIF\u5909\u63db\u306e\u5b9f\u884c | |
28 | 33 | label.500=EXIF\u5909\u63db\u3092\u884c\u3046\u304b\u3069\u3046\u304b\u3092\u9078\u629e\u3057\u3066\u304f\u3060\u3055\u3044 |
29 | 34 | label.501=EXIF\u5909\u63db\u3092\u884c\u3046\u5834\u5408\u306b\u306f\u3001\u5909\u63db\u30d5\u30a1\u30a4\u30eb\u3092\u51fa\u529b\u3059\u308b\u30d5\u30a9\u30eb\u30c0\u3082\u6307\u5b9a\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 |
30 | 35 | label.502=\u51fa\u529b\u30d5\u30a9\u30eb\u30c0\u306b\u306f\u3001\u66f8\u304d\u8fbc\u307f\u6a29\u9650\u3068\u3001\u5341\u5206\u306a\u7a7a\u304d\u5bb9\u91cf\u304c\u5fc5\u8981\u3067\u3059\u3002 |
@@ -23,8 +23,8 @@ import org.apache.commons.imaging.formats.tiff.constants.ExifTagConstants; | ||
23 | 23 | public class AdjustTime extends JFrame |
24 | 24 | { |
25 | 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"; | |
26 | + public static final String PROGRAM_VARSION = "5.01"; | |
27 | + public static final String PROGRAM_UPDATE = "2019/08/25"; | |
28 | 28 | |
29 | 29 | AppParameters params; |
30 | 30 | SimpleDateFormat dfjp = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss Z"); |
@@ -34,7 +34,7 @@ public class AdjustTime extends JFrame | ||
34 | 34 | public ResourceBundle i18n = ResourceBundle.getBundle("i18n"); |
35 | 35 | |
36 | 36 | //{{DECLARE_CONTROLS |
37 | - JPanel cardPanel; // ウィザード形式パネル(カード型) | |
37 | + JTabbedPane cardPanel; // ウィザード形式パネル(タブ型) | |
38 | 38 | JPanel[] cards; |
39 | 39 | int cardPanelNo = 0; |
40 | 40 | JPanel argsPanel; // パラメータ設定パネル (上部) |
@@ -46,7 +46,6 @@ public class AdjustTime extends JFrame | ||
46 | 46 | JCheckBox noFirstNode; // GPX: <trkseg>セグメントの最初の1ノードは無視する。 {ON | OFF} |
47 | 47 | JCheckBox gpxReuse; // 生成されたGPXファイル(ファイル名が'_.gpx'で終わるもの)も対象にする。 {ON | OFF} |
48 | 48 | JTextArea textArea; // 実行結果表示領域 |
49 | - //ImagePreview imagePane; // 基準時刻画像表示 | |
50 | 49 | ParameterPanelFolder arg1_srcFolder; |
51 | 50 | ParameterPanelImageFile arg2_baseTimeImg; |
52 | 51 | ParameterPanel arg3_basetime; // 基準時刻: |
@@ -64,8 +63,6 @@ public class AdjustTime extends JFrame | ||
64 | 63 | JButton zoomInButton; // [Zoom in]ボタン |
65 | 64 | JButton zoomOutButton; // [Zoom out]ボタン |
66 | 65 | |
67 | - JButton nextButton; // [次へ]ボタン | |
68 | - JButton backButton; // [戻る]ボタン | |
69 | 66 | JButton doButton; // [処理実行]ボタン |
70 | 67 | //}} |
71 | 68 |
@@ -138,12 +135,6 @@ public class AdjustTime extends JFrame | ||
138 | 135 | else if (object == doButton) { |
139 | 136 | doButton_Action(event); |
140 | 137 | } |
141 | - else if (object == nextButton) { | |
142 | - nextButton_Action(event); | |
143 | - } | |
144 | - else if (object == backButton) { | |
145 | - backButton_Action(event); | |
146 | - } | |
147 | 138 | } |
148 | 139 | } |
149 | 140 |
@@ -184,228 +175,239 @@ public class AdjustTime extends JFrame | ||
184 | 175 | params = new AppParameters(); |
185 | 176 | |
186 | 177 | //--------------------------------------------------------------------- |
187 | - cardPanel = new JPanel(); | |
188 | - cardPanel.setLayout(new CardLayout()); | |
178 | + cardPanel = new JTabbedPane(JTabbedPane.LEFT); | |
189 | 179 | mainPanel.add(cardPanel, BorderLayout.CENTER); |
190 | 180 | |
191 | - nextButton = new JButton(i18n.getString("button.next")); | |
192 | - southPanel.add(nextButton, BorderLayout.EAST); | |
193 | - | |
194 | - backButton = new JButton(i18n.getString("button.previous")); | |
195 | - southPanel.add(backButton, BorderLayout.WEST); | |
196 | - | |
197 | 181 | 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)); | |
201 | - } | |
202 | 182 | cardPanelNo = 0; |
203 | 183 | |
204 | 184 | //--------------------------------------------------------------------- |
205 | 185 | // 1.[対象フォルダ]設定パネル |
206 | 186 | int cardNo = 0; |
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); | |
211 | - | |
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); | |
187 | + { | |
188 | + Card card = new Card(cardPanel, i18n.getString("tab.100"), -1, 1); | |
189 | + cardPanel.addTab(card.getTitle(), card); | |
190 | + cards[cardNo] = card; | |
191 | + | |
192 | + JLabel label1 = new JLabel(); | |
193 | + label1.setText(i18n.getString("label.100")); | |
194 | + card.mainPanel.add(label1, BorderLayout.NORTH); | |
195 | + | |
196 | + argsPanel = new JPanel(); | |
197 | + argsPanel.setLayout(new BoxLayout(argsPanel, BoxLayout.Y_AXIS)); | |
198 | + arg1_srcFolder = new ParameterPanelFolder(i18n.getString("label.110") +": ", params.getProperty(AppParameters.IMG_SOURCE_FOLDER)); | |
199 | + argsPanel.add(arg1_srcFolder); | |
200 | + card.mainPanel.add(argsPanel, BorderLayout.CENTER); | |
201 | + } | |
217 | 202 | |
218 | 203 | //--------------------------------------------------------------------- |
219 | 204 | // 2.[基準時刻画像]設定パネル |
220 | 205 | cardNo++; |
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); | |
225 | - | |
226 | - argsPanel = new JPanel(); | |
227 | - | |
228 | - // 基準時刻画像 | |
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); | |
232 | - | |
233 | - baseTimeGroup = new ButtonGroup(); | |
234 | - | |
235 | - // EXIFの日時を基準にする | |
236 | - exifBase = new JRadioButton(i18n.getString("label.220")); | |
237 | - | |
238 | - // ファイル更新日時を基準にする | |
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); | |
247 | - } | |
248 | - else { | |
249 | - fupdateBase.setSelected(true); | |
250 | - exifBase.setSelected(false); | |
206 | + { | |
207 | + Card card = new Card(cardPanel, i18n.getString("tab.200"), 0, 2); | |
208 | + cardPanel.addTab(card.getTitle(), card); | |
209 | + cards[cardNo] = card; | |
210 | + | |
211 | + JLabel label2 = new JLabel(); | |
212 | + label2.setText(i18n.getString("label.200")); | |
213 | + card.mainPanel.add(label2, BorderLayout.NORTH); | |
214 | + | |
215 | + argsPanel = new JPanel(); | |
216 | + | |
217 | + // 基準時刻画像 | |
218 | + argsPanel.setLayout(new BoxLayout(argsPanel, BoxLayout.Y_AXIS)); | |
219 | + arg2_baseTimeImg = new ParameterPanelImageFile(i18n.getString("label.210") +": ", params.getProperty(AppParameters.IMG_BASE_FILE), arg1_srcFolder); | |
220 | + argsPanel.add(arg2_baseTimeImg); | |
221 | + | |
222 | + baseTimeGroup = new ButtonGroup(); | |
223 | + | |
224 | + // EXIFの日時を基準にする | |
225 | + exifBase = new JRadioButton(i18n.getString("label.220")); | |
226 | + | |
227 | + // ファイル更新日時を基準にする | |
228 | + fupdateBase = new JRadioButton(i18n.getString("label.230")); | |
229 | + baseTimeGroup.add(exifBase); | |
230 | + baseTimeGroup.add(fupdateBase); | |
231 | + argsPanel.add(exifBase); | |
232 | + argsPanel.add(fupdateBase); | |
233 | + if (params.getProperty(AppParameters.GPX_BASETIME).equals("EXIF_TIME")) { | |
234 | + fupdateBase.setSelected(false); | |
235 | + exifBase.setSelected(true); | |
236 | + } | |
237 | + else { | |
238 | + fupdateBase.setSelected(true); | |
239 | + exifBase.setSelected(false); | |
240 | + } | |
241 | + card.mainPanel.add(argsPanel, BorderLayout.CENTER); | |
251 | 242 | } |
252 | - cards[cardNo].add(argsPanel, BorderLayout.CENTER); | |
253 | 243 | |
254 | 244 | //--------------------------------------------------------------------- |
255 | - // 3.基準時刻の入力画面 | |
245 | + // 2a.基準時刻の入力画面 | |
256 | 246 | cardNo++; |
257 | - cards[cardNo].setLayout(new BorderLayout()); | |
258 | - argsPanel = new JPanel(); | |
259 | - argsPanel.setLayout(new GridLayout(2, 1)); | |
260 | - | |
261 | - // 3. 正確な撮影時刻を入力してください。 | |
262 | - // カメラの時計が正確ならば、設定を変更する必要はありません。 | |
263 | - JLabel label3 = new JLabel(); | |
264 | - label3.setText(i18n.getString("label.300")); | |
265 | - argsPanel.add(label3); | |
266 | - | |
267 | - // 基準時刻: | |
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); | |
272 | - | |
273 | - // 参考画像 | |
274 | - imageLabel = new JLabel(); | |
275 | - imageSPane = new JScrollPane(imageLabel); | |
276 | - cards[cardNo].add(imageSPane, BorderLayout.CENTER); | |
277 | - | |
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); | |
247 | + { | |
248 | + Card card = new Card(cardPanel, i18n.getString("tab.300"), 1, 3); | |
249 | + cardPanel.addTab(card.getTitle(), card); | |
250 | + cards[cardNo] = card; | |
251 | + | |
252 | + argsPanel = new JPanel(); | |
253 | + argsPanel.setLayout(new GridLayout(2, 1)); | |
254 | + | |
255 | + // 3. 正確な撮影時刻を入力してください。 | |
256 | + // カメラの時計が正確ならば、設定を変更する必要はありません。 | |
257 | + JLabel label3 = new JLabel(); | |
258 | + label3.setText(i18n.getString("label.300")); | |
259 | + argsPanel.add(label3); | |
260 | + | |
261 | + // 基準時刻: | |
262 | + String str310 = String.format(" %s: ", i18n.getString("label.310")); | |
263 | + arg3_basetime = new ParameterPanel(str310, ImportPicture.TIME_FORMAT_STRING); | |
264 | + argsPanel.add(arg3_basetime); | |
265 | + card.mainPanel.add(argsPanel, BorderLayout.NORTH); | |
266 | + | |
267 | + // 参考画像 | |
268 | + imageLabel = new JLabel(); | |
269 | + imageSPane = new JScrollPane(imageLabel); | |
270 | + card.mainPanel.add(imageSPane, BorderLayout.CENTER); | |
271 | + | |
272 | + // 画像ファイル選択ダイアログを起動するボタン | |
273 | + buttonPanel = new JPanel(); | |
274 | + buttonPanel.setLayout(new BoxLayout(buttonPanel, BoxLayout.X_AXIS)); | |
275 | + openButton = new JButton(createImageIcon("images/Fit16.gif")); | |
276 | + buttonPanel.add(openButton); | |
277 | + zoomInButton = new JButton(createImageIcon("images/ZoomIn16.gif")); | |
278 | + buttonPanel.add(zoomInButton); | |
279 | + zoomOutButton = new JButton(createImageIcon("images/ZoomOut16.gif")); | |
280 | + buttonPanel.add(zoomOutButton); | |
281 | + card.mainPanel.add(buttonPanel, BorderLayout.SOUTH); | |
282 | + } | |
288 | 283 | |
289 | 284 | //--------------------------------------------------------------------- |
290 | - // 4.GPXファイル設定画面 | |
285 | + // 3.GPXファイル設定画面 | |
291 | 286 | cardNo++; |
292 | - cards[cardNo].setLayout(new BorderLayout()); | |
293 | - | |
294 | - // 4. ヒモ付を行うGPXファイルを選択してください。 | |
295 | - // - フォルダを指定すると、フォルダ内のすべてのGPXファイルを対象とします。 | |
296 | - JLabel label4 = new JLabel(); | |
297 | - label4.setText(i18n.getString("label.400")); | |
298 | - cards[cardNo].add(label4, BorderLayout.NORTH); | |
299 | - | |
300 | - JPanel tmpPanel4a = new JPanel(); | |
301 | - tmpPanel4a.setLayout(new BoxLayout(tmpPanel4a, BoxLayout.Y_AXIS)); | |
302 | - | |
303 | - // "GPXフォルダ: " | |
304 | - arg4_gpxFolder = new ParameterPanelGpx( | |
305 | - i18n.getString("label.410") + ": ", | |
306 | - params.getProperty(AppParameters.GPX_SOURCE_FOLDER) | |
307 | - ); | |
308 | - tmpPanel4a.add(arg4_gpxFolder); | |
309 | - | |
310 | - // "セグメント'trkseg'の最初の1ノードは無視する。" | |
311 | - noFirstNode = new JCheckBox( | |
312 | - i18n.getString("label.420"), | |
313 | - params.getProperty(AppParameters.GPX_NO_FIRST_NODE).equals("ON") | |
314 | - ); | |
315 | - tmpPanel4a.add(noFirstNode); | |
316 | - | |
317 | - // "生成されたGPXファイル(ファイル名が'_.gpx'で終わるもの)も変換の対象にする" | |
318 | - gpxReuse = new JCheckBox( | |
319 | - i18n.getString("label.430"), | |
320 | - params.getProperty(AppParameters.GPX_REUSE).equals("ON") | |
321 | - ); | |
322 | - gpxReuse.setEnabled(true); | |
323 | - tmpPanel4a.add(gpxReuse); | |
324 | - cards[cardNo].add(tmpPanel4a, BorderLayout.CENTER); | |
287 | + { | |
288 | + Card card = new Card(cardPanel, i18n.getString("tab.400"), 2, 4); | |
289 | + cardPanel.addTab(card.getTitle(), card); | |
290 | + cards[cardNo] = card; | |
291 | + | |
292 | + // 4. ヒモ付を行うGPXファイルを選択してください。 | |
293 | + // - フォルダを指定すると、フォルダ内のすべてのGPXファイルを対象とします。 | |
294 | + JLabel label4 = new JLabel(); | |
295 | + label4.setText(i18n.getString("label.400")); | |
296 | + card.mainPanel.add(label4, BorderLayout.NORTH); | |
297 | + | |
298 | + JPanel tmpPanel4a = new JPanel(); | |
299 | + tmpPanel4a.setLayout(new BoxLayout(tmpPanel4a, BoxLayout.Y_AXIS)); | |
300 | + | |
301 | + // "GPXフォルダ: " | |
302 | + arg4_gpxFolder = new ParameterPanelGpx( | |
303 | + i18n.getString("label.410") + ": ", | |
304 | + params.getProperty(AppParameters.GPX_SOURCE_FOLDER) | |
305 | + ); | |
306 | + tmpPanel4a.add(arg4_gpxFolder); | |
307 | + | |
308 | + // "セグメント'trkseg'の最初の1ノードは無視する。" | |
309 | + noFirstNode = new JCheckBox( | |
310 | + i18n.getString("label.420"), | |
311 | + params.getProperty(AppParameters.GPX_NO_FIRST_NODE).equals("ON") | |
312 | + ); | |
313 | + tmpPanel4a.add(noFirstNode); | |
314 | + | |
315 | + // "生成されたGPXファイル(ファイル名が'_.gpx'で終わるもの)も変換の対象にする" | |
316 | + gpxReuse = new JCheckBox( | |
317 | + i18n.getString("label.430"), | |
318 | + params.getProperty(AppParameters.GPX_REUSE).equals("ON") | |
319 | + ); | |
320 | + gpxReuse.setEnabled(true); | |
321 | + tmpPanel4a.add(gpxReuse); | |
322 | + card.mainPanel.add(tmpPanel4a, BorderLayout.CENTER); | |
323 | + } | |
325 | 324 | |
326 | 325 | //--------------------------------------------------------------------- |
327 | - // 5.EXIF更新設定画面 | |
326 | + // 4.EXIF更新設定画面 | |
328 | 327 | cardNo++; |
329 | - cards[cardNo].setLayout(new BorderLayout()); | |
330 | - | |
331 | - // 5. EXIF変換を行うかどうかを選択してください。 | |
332 | - // - EXIF変換を行う場合には、変換ファイルを出力するフォルダも指定する必要があります。 | |
333 | - // - 出力フォルダには、書き込み権限と、十分な空き容量が必要です。 | |
334 | - JLabel label5 = new JLabel(); | |
335 | - label5.setText( | |
336 | - String.format( | |
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") | |
341 | - ) | |
342 | - ); | |
343 | - cards[cardNo].add(label5, BorderLayout.NORTH); | |
344 | - | |
345 | - JPanel tmpPanel5 = new JPanel(); | |
346 | - tmpPanel5.setLayout(new BoxLayout(tmpPanel5, BoxLayout.Y_AXIS)); | |
347 | - | |
348 | - // "IMGの変換をする" | |
349 | - outputIMG = new JCheckBox( | |
350 | - i18n.getString("label.510"), | |
351 | - Boolean.parseBoolean(params.getProperty(AppParameters.IMG_OUTPUT)) | |
352 | - ); | |
353 | - tmpPanel5.add(outputIMG); | |
354 | - | |
355 | - // "GPXファイル時間外のファイルもコピーする" | |
356 | - outputIMG_all = new JCheckBox( | |
357 | - i18n.getString("label.520"), | |
358 | - Boolean.parseBoolean(params.getProperty(AppParameters.IMG_OUTPUT_ALL)) | |
359 | - ); | |
360 | - tmpPanel5.add(outputIMG_all); | |
361 | - | |
362 | - // "出力フォルダ: " | |
363 | - arg5_outputFolder = new ParameterPanelFolder( | |
364 | - i18n.getString("label.530") + ": ", | |
365 | - params.getProperty(AppParameters.IMG_OUTPUT_FOLDER) | |
366 | - ); | |
367 | - tmpPanel5.add(arg5_outputFolder); | |
368 | - | |
369 | - // "EXIFの変換をする" | |
370 | - exifON = new JCheckBox( | |
371 | - i18n.getString("label.540"), | |
372 | - Boolean.parseBoolean(params.getProperty(AppParameters.IMG_OUTPUT_EXIF)) | |
373 | - ); | |
374 | - tmpPanel5.add(exifON); | |
375 | - | |
376 | - // "ポイントマーカー<WPT>をGPXファイルに出力する" | |
377 | - gpxOutputWpt = new JCheckBox( | |
378 | - i18n.getString("label.550"), | |
379 | - Boolean.parseBoolean(params.getProperty(AppParameters.GPX_OUTPUT_WPT)) | |
380 | - ); | |
381 | - gpxOutputWpt.setEnabled(true); | |
382 | - tmpPanel5.add(gpxOutputWpt); | |
383 | - | |
384 | - // "ソースGPXの<MAGVAR>を無視する" | |
385 | - gpxOverwriteMagvar = new JCheckBox( | |
386 | - i18n.getString("label.560"), | |
387 | - Boolean.parseBoolean(params.getProperty(AppParameters.GPX_OVERWRITE_MAGVAR)) | |
388 | - ); | |
389 | - gpxOverwriteMagvar.setEnabled(true); | |
390 | - tmpPanel5.add(gpxOverwriteMagvar); | |
391 | - | |
392 | - // "出力GPXに<SPEED>を上書きする" | |
393 | - gpxOutputSpeed = new JCheckBox( | |
394 | - i18n.getString("label.570"), | |
395 | - Boolean.parseBoolean(params.getProperty(AppParameters.GPX_OUTPUT_SPEED)) | |
396 | - ); | |
397 | - gpxOutputSpeed.setEnabled(true); | |
398 | - tmpPanel5.add(gpxOutputSpeed); | |
399 | - | |
400 | - cards[cardNo].add(tmpPanel5, BorderLayout.CENTER); | |
401 | - | |
402 | - // "処理実行" | |
403 | - doButton = new JButton( | |
404 | - i18n.getString("button.execute"), | |
405 | - AdjustTime.createImageIcon("images/media_playback_start.png") | |
406 | - ); | |
407 | - cards[cardNo].add(doButton, BorderLayout.SOUTH); | |
408 | - | |
328 | + { | |
329 | + Card card = new Card(cardPanel, i18n.getString("tab.500"), 3, -1); | |
330 | + cardPanel.addTab(card.getTitle(), card); | |
331 | + cards[cardNo] = card; | |
332 | + | |
333 | + // 5. EXIF変換を行うかどうかを選択してください。 | |
334 | + // - EXIF変換を行う場合には、変換ファイルを出力するフォルダも指定する必要があります。 | |
335 | + // - 出力フォルダには、書き込み権限と、十分な空き容量が必要です。 | |
336 | + JLabel label5 = new JLabel(); | |
337 | + label5.setText( | |
338 | + String.format( | |
339 | + "<html><p>5. %s</p><ul><li>%s</li><li>%s</li></ul>", | |
340 | + i18n.getString("label.500"), | |
341 | + i18n.getString("label.501"), | |
342 | + i18n.getString("label.502") | |
343 | + ) | |
344 | + ); | |
345 | + card.mainPanel.add(label5, BorderLayout.NORTH); | |
346 | + | |
347 | + JPanel tmpPanel5 = new JPanel(); | |
348 | + tmpPanel5.setLayout(new BoxLayout(tmpPanel5, BoxLayout.Y_AXIS)); | |
349 | + | |
350 | + // "IMGの変換をする" | |
351 | + outputIMG = new JCheckBox( | |
352 | + i18n.getString("label.510"), | |
353 | + Boolean.parseBoolean(params.getProperty(AppParameters.IMG_OUTPUT)) | |
354 | + ); | |
355 | + tmpPanel5.add(outputIMG); | |
356 | + | |
357 | + // "GPXファイル時間外のファイルもコピーする" | |
358 | + outputIMG_all = new JCheckBox( | |
359 | + i18n.getString("label.520"), | |
360 | + Boolean.parseBoolean(params.getProperty(AppParameters.IMG_OUTPUT_ALL)) | |
361 | + ); | |
362 | + tmpPanel5.add(outputIMG_all); | |
363 | + | |
364 | + // "出力フォルダ: " | |
365 | + arg5_outputFolder = new ParameterPanelFolder( | |
366 | + i18n.getString("label.530") + ": ", | |
367 | + params.getProperty(AppParameters.IMG_OUTPUT_FOLDER) | |
368 | + ); | |
369 | + tmpPanel5.add(arg5_outputFolder); | |
370 | + | |
371 | + // "EXIFの変換をする" | |
372 | + exifON = new JCheckBox( | |
373 | + i18n.getString("label.540"), | |
374 | + Boolean.parseBoolean(params.getProperty(AppParameters.IMG_OUTPUT_EXIF)) | |
375 | + ); | |
376 | + tmpPanel5.add(exifON); | |
377 | + | |
378 | + // "ポイントマーカー<WPT>をGPXファイルに出力する" | |
379 | + gpxOutputWpt = new JCheckBox( | |
380 | + i18n.getString("label.550"), | |
381 | + Boolean.parseBoolean(params.getProperty(AppParameters.GPX_OUTPUT_WPT)) | |
382 | + ); | |
383 | + gpxOutputWpt.setEnabled(true); | |
384 | + tmpPanel5.add(gpxOutputWpt); | |
385 | + | |
386 | + // "ソースGPXの<MAGVAR>を無視する" | |
387 | + gpxOverwriteMagvar = new JCheckBox( | |
388 | + i18n.getString("label.560"), | |
389 | + Boolean.parseBoolean(params.getProperty(AppParameters.GPX_OVERWRITE_MAGVAR)) | |
390 | + ); | |
391 | + gpxOverwriteMagvar.setEnabled(true); | |
392 | + tmpPanel5.add(gpxOverwriteMagvar); | |
393 | + | |
394 | + // "出力GPXに<SPEED>を上書きする" | |
395 | + gpxOutputSpeed = new JCheckBox( | |
396 | + i18n.getString("label.570"), | |
397 | + Boolean.parseBoolean(params.getProperty(AppParameters.GPX_OUTPUT_SPEED)) | |
398 | + ); | |
399 | + gpxOutputSpeed.setEnabled(true); | |
400 | + tmpPanel5.add(gpxOutputSpeed); | |
401 | + | |
402 | + card.mainPanel.add(tmpPanel5, BorderLayout.CENTER); | |
403 | + | |
404 | + // "処理実行" | |
405 | + doButton = new JButton( | |
406 | + i18n.getString("button.execute"), | |
407 | + AdjustTime.createImageIcon("images/media_playback_start.png") | |
408 | + ); | |
409 | + card.mainPanel.add(doButton, BorderLayout.SOUTH); | |
410 | + } | |
409 | 411 | |
410 | 412 | //--------------------------------------------------------------------- |
411 | 413 | // INIT_MENUS |
@@ -444,9 +446,6 @@ public class AdjustTime extends JFrame | ||
444 | 446 | gpxOutputSpeed.addActionListener(lSymAction); |
445 | 447 | noFirstNode.addActionListener(lSymAction); |
446 | 448 | gpxReuse.addActionListener(lSymAction); |
447 | - //arg1Panel_4.field.addActionListener(lSymAction); | |
448 | - nextButton.addActionListener(lSymAction); | |
449 | - backButton.addActionListener(lSymAction); | |
450 | 449 | //}} |
451 | 450 | } |
452 | 451 |
@@ -729,28 +728,4 @@ public class AdjustTime extends JFrame | ||
729 | 728 | |
730 | 729 | doButton.setEnabled(true); |
731 | 730 | } |
732 | - | |
733 | - /** | |
734 | - * [次へ]ボタンをクリックした時の動作 | |
735 | - * @param event | |
736 | - */ | |
737 | - void nextButton_Action(ActionEvent event) { | |
738 | - if ((cardPanelNo + 1) < cards.length) { | |
739 | - cardPanelNo++; | |
740 | - CardLayout cl = (CardLayout)(cardPanel.getLayout()); | |
741 | - cl.show(cardPanel, String.valueOf(cardPanelNo)); | |
742 | - } | |
743 | - } | |
744 | - | |
745 | - /** | |
746 | - * [戻る]ボタンをクリックした時の動作 | |
747 | - * @param event | |
748 | - */ | |
749 | - void backButton_Action(ActionEvent event) { | |
750 | - if ((cardPanelNo - 1) >= 0) { | |
751 | - cardPanelNo--; | |
752 | - CardLayout cl = (CardLayout)(cardPanel.getLayout()); | |
753 | - cl.show(cardPanel, String.valueOf(cardPanelNo)); | |
754 | - } | |
755 | - } | |
756 | 731 | } |
@@ -0,0 +1,94 @@ | ||
1 | +package osm.jp.gpx.matchtime.gui; | |
2 | + | |
3 | +import java.awt.BorderLayout; | |
4 | +import java.awt.event.ActionEvent; | |
5 | +import java.util.ResourceBundle; | |
6 | +import javax.swing.Box; | |
7 | +import javax.swing.JButton; | |
8 | +import javax.swing.JPanel; | |
9 | +import javax.swing.JTabbedPane; | |
10 | + | |
11 | +/** | |
12 | + * | |
13 | + * @author yuu | |
14 | + */ | |
15 | +public class Card extends JPanel { | |
16 | + public ResourceBundle i18n = ResourceBundle.getBundle("i18n"); | |
17 | + JTabbedPane tabbe; | |
18 | + public JPanel mainPanel; | |
19 | + String title; | |
20 | + int backNumber = -1; | |
21 | + int nextNumber = -1; | |
22 | + JButton nextButton; // [次へ]ボタン | |
23 | + JButton backButton; // [戻る]ボタン | |
24 | + | |
25 | + public Card(JTabbedPane tabbe, String title, int backNumber, int nextNumber) { | |
26 | + super(); | |
27 | + this.tabbe = tabbe; | |
28 | + this.title = title; | |
29 | + this.backNumber = backNumber; | |
30 | + this.nextNumber = nextNumber; | |
31 | + | |
32 | + // INIT_CONTROLS | |
33 | + this.setLayout(new BorderLayout()); | |
34 | + | |
35 | + //---- CENTER ----- | |
36 | + mainPanel = new JPanel(); | |
37 | + mainPanel.setLayout(new BorderLayout()); | |
38 | + this.add(mainPanel, BorderLayout.CENTER); | |
39 | + | |
40 | + //---- SOUTH ----- | |
41 | + JPanel buttonPanel = new JPanel(new BorderLayout()); | |
42 | + buttonPanel.add(Box.createVerticalStrut(10), BorderLayout.SOUTH); | |
43 | + buttonPanel.add(Box.createVerticalStrut(10), BorderLayout.NORTH); | |
44 | + this.add(buttonPanel, BorderLayout.SOUTH); | |
45 | + | |
46 | + //{{REGISTER_LISTENERS | |
47 | + SymAction lSymAction = new SymAction(); | |
48 | + if (nextNumber >= 0) { | |
49 | + nextButton = new JButton(i18n.getString("button.next")); | |
50 | + buttonPanel.add(nextButton, BorderLayout.EAST); | |
51 | + nextButton.addActionListener(lSymAction); | |
52 | + } | |
53 | + | |
54 | + if (backNumber >= 0) { | |
55 | + backButton = new JButton(i18n.getString("button.previous")); | |
56 | + buttonPanel.add(backButton, BorderLayout.WEST); | |
57 | + backButton.addActionListener(lSymAction); | |
58 | + } | |
59 | + //}} | |
60 | + } | |
61 | + | |
62 | + public String getTitle() { | |
63 | + return this.title; | |
64 | + } | |
65 | + | |
66 | + /** | |
67 | + * [次へ]ボタンをクリックした時の動作 | |
68 | + * @param event | |
69 | + */ | |
70 | + void nextButton_Action(ActionEvent event) { | |
71 | + this.tabbe.setSelectedIndex(this.nextNumber); | |
72 | + } | |
73 | + | |
74 | + /** | |
75 | + * [戻る]ボタンをクリックした時の動作 | |
76 | + * @param event | |
77 | + */ | |
78 | + void backButton_Action(ActionEvent event) { | |
79 | + this.tabbe.setSelectedIndex(this.backNumber); | |
80 | + } | |
81 | + | |
82 | + class SymAction implements java.awt.event.ActionListener { | |
83 | + @Override | |
84 | + public void actionPerformed(java.awt.event.ActionEvent event) { | |
85 | + Object object = event.getSource(); | |
86 | + if (object == nextButton) { | |
87 | + nextButton_Action(event); | |
88 | + } | |
89 | + else if (object == backButton) { | |
90 | + backButton_Action(event); | |
91 | + } | |
92 | + } | |
93 | + } | |
94 | +} |