JPanel argsPanel; // パラメータ設定パネル (上部)
JScrollPane imageSPane; // スクロールパネル
JLabel imageLabel; // 基準時刻画像表示
- //ButtonGroup baseTimeGroup; // 基準時刻の指定グループ
- //JRadioButton exifBase; // EXIF日時を基準にする/ !(ファイル更新日時を基準にする)
- //JRadioButton fupdateBase; // File更新日時を基準にする/ !(EXIF日時を基準にする)
JCheckBox noFirstNode; // GPX: <trkseg>セグメントの最初の1ノードは無視する。 {ON | OFF}
JCheckBox gpxReuse; // 生成されたGPXファイル(ファイル名が'_.gpx'で終わるもの)も対象にする。 {ON | OFF}
JTextArea textArea; // 実行結果表示領域
ParameterPanelGpx arg4_gpxFolder; // GPXファイル・フォルダ
JPanel buttonPanel; // ボタンパネル (下部)
- //JButton openButton; // [Fit]ボタン
- //JButton zoomInButton; // [Zoom in]ボタン
- //JButton zoomOutButton; // [Zoom out]ボタン
JButton doButton; // [処理実行]ボタン
//}}
else if (object == miExit) {
miExit_Action(event);
}
- /*
- else if (object == openButton) {
- imageView_Action(event);
- }
- else if (object == zoomInButton) {
- zoomin_Action(event);
- }
- else if (object == zoomOutButton) {
- zoomout_Action(event);
- }
- else if (object == arg2_baseTimeImg.argField) {
- imageView_Action(event);
- }
- else if (object == arg2_baseTimeImg.openButton) {
- selectImage_Action(event);
- imageView_Action(event);
- }
- */
else if (object == outputIMG) {
outputIMG_Action(event);
}
// EXIFの日時を基準にする
arg2_basetime.addExifBase(i18n.getString("label.220"), params);
- //exifBase = new JRadioButton(i18n.getString("label.220"));
// ファイル更新日時を基準にする
arg2_basetime.addFileUpdate(i18n.getString("label.230"), params);
- //fupdateBase = new JRadioButton(i18n.getString("label.230"));
-
- //baseTimeGroup = new ButtonGroup();
- //baseTimeGroup.add(exifBase);
- //baseTimeGroup.add(fupdateBase);
- //argsPanel.add(exifBase);
- //argsPanel.add(fupdateBase);
- //if (params.getProperty(AppParameters.GPX_BASETIME).equals("EXIF_TIME")) {
- // fupdateBase.setSelected(false);
- // exifBase.setSelected(true);
- //}
- //else {
- // fupdateBase.setSelected(true);
- // exifBase.setSelected(false);
- //}
-
- //JLabel label2 = new JLabel();
- //label2.setText(i18n.getString("label.200"));
- //card.mainPanel.add(label2, BorderLayout.NORTH);
- //card.mainPanel.add(argsPanel, BorderLayout.CENTER);
CardImageFile card = new CardImageFile(
cardPanel, arg2_basetime, (Window)this,
}
//---------------------------------------------------------------------
- // 2a.基準時刻の入力画面
- {
- Card card = new Card(cardPanel, i18n.getString("tab.300"), 1, 3);
- cardPanel.addTab(card.getTitle(), card);
- cards[cardNo] = card;
-
- argsPanel = new JPanel();
- argsPanel.setLayout(new GridLayout(2, 1));
-
- // 3. 正確な撮影時刻を入力してください。
- // カメラの時計が正確ならば、設定を変更する必要はありません。
- /*
- JLabel label3 = new JLabel();
- label3.setText(i18n.getString("label.300"));
- argsPanel.add(label3);
- */
-
- // 基準時刻:
- /*
- String str310 = String.format(" %s: ", i18n.getString("label.310"));
- arg3_basetime = new ParameterPanelTime(
- str310,
- ImportPicture.TIME_FORMAT_STRING,
- arg2_baseTimeImg
- );
- argsPanel.add(arg3_basetime);
- card.mainPanel.add(argsPanel, BorderLayout.NORTH);
- */
-
- // 参考画像
- /*
- imageLabel = new JLabel();
- imageSPane = new JScrollPane(imageLabel);
- card.mainPanel.add(imageSPane, BorderLayout.CENTER);
- */
-
- // 画像ファイル選択ダイアログを起動するボタン
- /*
- buttonPanel = new JPanel();
- buttonPanel.setLayout(new BoxLayout(buttonPanel, BoxLayout.X_AXIS));
- openButton = new JButton(createImageIcon("images/Fit16.gif"));
- buttonPanel.add(openButton);
- zoomInButton = new JButton(createImageIcon("images/ZoomIn16.gif"));
- buttonPanel.add(zoomInButton);
- zoomOutButton = new JButton(createImageIcon("images/ZoomOut16.gif"));
- buttonPanel.add(zoomOutButton);
- card.mainPanel.add(buttonPanel, BorderLayout.SOUTH);
- */
- }
-
- //---------------------------------------------------------------------
// 3.GPXファイル設定画面
{
// 3. GPXファイルを選択
miAbout.addActionListener(lSymAction);
miRestamp.addActionListener(lSymAction);
miExit.addActionListener(lSymAction);
- /*
- openButton.addActionListener(lSymAction);
- zoomOutButton.addActionListener(lSymAction);
- zoomInButton.addActionListener(lSymAction);
- */
- //arg2_baseTimeImg.argField.addActionListener(lSymAction);
arg2_baseTimeImg.openButton.addActionListener(lSymAction);
doButton.addActionListener(lSymAction);
outputIMG_all.addActionListener(lSymAction);
ImageIcon refImage;
/**
- * 選択された画像ファイルを表示する
- * 基準画像ボタンがクリックされた時に、基準時刻フィールドに基準画像の作成日時を設定する。
- * @param ev
- */
- /*
- @SuppressWarnings("UseSpecificCatch")
- public void imageView_Action(ActionEvent ev) {
- String path = (new File(arg1_srcFolder.getText(), arg2_baseTimeImg.getText())).getPath();
-
- File timeFile = new File(path);
- if (exifBase.isSelected()) {
- try {
- ImageMetadata meta = Imaging.getMetadata(timeFile);
- JpegImageMetadata jpegMetadata = (JpegImageMetadata)meta;
- if (jpegMetadata != null) {
- TiffImageMetadata exif = jpegMetadata.getExif();
- if (exif != null) {
- String dateTimeOriginal = exif.getFieldValue(ExifTagConstants.EXIF_TAG_DATE_TIME_ORIGINAL)[0];
- long lastModifyTime = (new SimpleDateFormat("yyyy:MM:dd HH:mm:ss")).parse(dateTimeOriginal).getTime();
- arg3_basetime.argField.setText(dfjp.format(new Date(lastModifyTime)));
- }
- else {
- arg3_basetime.argField.setText("exif == null");
- }
- }
- }
- catch (Exception e) {}
- }
- else {
- long lastModifyTime = timeFile.lastModified();
- arg3_basetime.argField.setText(dfjp.format(new Date(lastModifyTime)));
- }
-
- int size_x = imageSPane.getWidth() - 8;
- ImageIcon tmpIcon = new ImageIcon(path);
- refImage = tmpIcon;
- if (tmpIcon.getIconWidth() > size_x) {
- refImage = new ImageIcon(tmpIcon.getImage().getScaledInstance(size_x, -1, Image.SCALE_DEFAULT));
- }
- imageLabel.setIcon(refImage);
- repaint();
- }
- */
-
- /*
- public void zoomin_Action(ActionEvent ev) {
- if (refImage != null) {
- int size_x = imageLabel.getWidth();
- String path = (new File(arg1_srcFolder.getText(), arg2_baseTimeImg.getText())).getPath();
- ImageIcon tmpIcon = new ImageIcon(path);
- refImage = new ImageIcon(tmpIcon.getImage().getScaledInstance(size_x * 2, -1, Image.SCALE_DEFAULT));
- imageLabel.setIcon(refImage);
- repaint();
- }
- }
- */
-
- /*
- public void zoomout_Action(ActionEvent ev) {
- if (refImage != null) {
- int size_x = imageLabel.getWidth();
- ImageIcon tmpIcon = refImage;
- refImage = new ImageIcon(tmpIcon.getImage().getScaledInstance(size_x / 2, -1, Image.SCALE_DEFAULT));
- imageLabel.setIcon(refImage);
- repaint();
- }
- }
- */
-
- /**
* ソースディレクトリが選択された時のアクション
* → AdjustTime.ini に書き込む
* @param ev
public void selectSource_Action(ActionEvent ev) {
}
- /*
- public void selectImage_Action(ActionEvent ev) {
- JFileChooser fc;
-
- //Set up the file chooser.
- File sdir = new File(arg1_srcFolder.getText());
- System.out.println(sdir.getPath());
- if (sdir.isDirectory()) {
- fc = new JFileChooser(sdir);
- }
- else {
- fc = new JFileChooser();
- }
-
- //Add a custom file filter and disable the default
- //(Accept All) file filter.
- fc.addChoosableFileFilter(new ImageFilter());
- fc.setAcceptAllFileFilterUsed(false);
-
- //Add custom icons for file types.
- fc.setFileView(new ImageFileView());
-
- //Add the preview pane.
- fc.setAccessory(new ImagePreview(fc));
-
- //Show it. "選択"
- int returnVal = fc.showDialog(this, i18n.getString("dialog.select"));
-
- //Process the results.
- if (returnVal == JFileChooser.APPROVE_OPTION) {
- File file = fc.getSelectedFile();
- arg2_baseTimeImg.argField.setText(file.getName());
- }
-
- //Reset the file chooser for the next time it's shown.
- fc.setSelectedFile(null);
- }
- */
-
/** Returns an ImageIcon, or null if the path was invalid.
* @param path
* @return */