<groupId>AdjustTime</groupId>
<artifactId>AdjustTime</artifactId>
<version>3.1.3-SNAPSHOT</version>
-
+
+ <distributionManagement>
+ <repository>
+ <id>hayashi_repository</id>
+ <url>http://surveyor.mydns.jp/archiva/repository/hayashi_repository/</url>
+ </repository>
+ </distributionManagement>
+
+ <repositories>
+ <repository>
+ <id>hayashi_repository</id>
+ <name>Hayashi Repository</name>
+ <url>http://surveyor.mydns.jp/archiva/repository/hayashi_repository/</url>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ <snapshots>
+ <enabled>false</enabled>
+ </snapshots>
+ </repository>
+ </repositories>
+ <pluginRepositories>
+ <pluginRepository>
+ <id>hayashi_repository</id>
+ <name>Hayashi Repository</name>
+ <url>http://surveyor.mydns.jp/archiva/repository/hayashi_repository/</url>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ <snapshots>
+ <enabled>false</enabled>
+ </snapshots>
+ </pluginRepository>
+ </pluginRepositories>
+
<properties>
<!-- configurations -->
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
public class Complementation {
public static final Double R = (6378137D + 6356752.314D)/2D; // 6367444.657m
- //public static final double dLat = 0.00453D; // 1km距離を表す緯度(差分)
- //public static final double dLon = 0.005588D; // 1km距離を表す経度(差分)
public TagTrkpt imaTag = null;
public TagTrkpt maeTag = null;
/**
* @param imaE
* @param maeE
+ * @throws java.text.ParseException
* @code{
* <trkpt lat="34.976635" lon="138.466228">
* <ele>267.291</ele>
/**
* 拡張put value:ElementをputするとElement内のtimeを読み取ってkeyとしてthis.put(key,value)する。
* @param tag
+ * @return
+ * @throws java.text.ParseException
* @code{
* <trkpt lat="36.4260153752" lon="138.0117778201">
* <ele>614.90</ele>
/**
* GPXファイルをパースする
+ * @param gpxFile
* @code{
* <gpx>
* <trk>
public String format(final LogRecord argLogRecord) {\r
final StringBuffer buf = new StringBuffer();\r
\r
- buf.append(sdFormat.format(new Date(argLogRecord.getMillis())) +" ");\r
+ buf.append(sdFormat.format(new Date(argLogRecord.getMillis()))).append(" ");\r
\r
if (argLogRecord.getLevel() == Level.FINEST) {\r
buf.append("[FINEST]");\r
buf.append("[SEVERE]");\r
}\r
else {\r
- buf.append(Integer.toString(argLogRecord.getLevel().intValue()) +" ");\r
+ buf.append(Integer.toString(argLogRecord.getLevel().intValue())).append(" ");\r
}\r
- buf.append(" "+ /* argLogRecord.getLoggerName() +" - "+ */ argLogRecord.getMessage() +"\n");\r
+ buf.append(" ").append(argLogRecord.getMessage()).append("\n");\r
return buf.toString();\r
}\r
}
\ No newline at end of file
/**
* コマンドパラメータの設定
- * @param folder
+ * @param args
*/
public void setArgs(String[] args) {
this.args = args;
if (extension != null) {
switch (extension) {
- case Utils.jpeg:
- case Utils.jpg:
+ case Utils.JPEG:
+ case Utils.JPG:
type = "JPEG Image";
break;
- case Utils.gif:
+ case Utils.GIF:
type = "GIF Image";
break;
- case Utils.tiff:
- case Utils.tif:
+ case Utils.TIFF:
+ case Utils.TIF:
type = "TIFF Image";
break;
- case Utils.png:
+ case Utils.PNG:
type = "PNG Image";
break;
default:
if (extension != null) {
switch (extension) {
- case Utils.jpeg:
- case Utils.jpg:
+ case Utils.JPEG:
+ case Utils.JPG:
icon = jpgIcon;
break;
- case Utils.gif:
+ case Utils.GIF:
icon = gifIcon;
break;
- case Utils.tiff:
- case Utils.tif:
+ case Utils.TIFF:
+ case Utils.TIF:
icon = tiffIcon;
break;
- case Utils.png:
+ case Utils.PNG:
icon = pngIcon;
break;
default:
String extension = Utils.getExtension(f);
if (extension != null) {
- return extension.equals(Utils.tiff) ||
- extension.equals(Utils.tif) ||
- extension.equals(Utils.gif) ||
- extension.equals(Utils.jpeg) ||
- extension.equals(Utils.jpg) ||
- extension.equals(Utils.png);
+ return extension.equals(Utils.TIFF) ||
+ extension.equals(Utils.TIF) ||
+ extension.equals(Utils.GIF) ||
+ extension.equals(Utils.JPEG) ||
+ extension.equals(Utils.JPG) ||
+ extension.equals(Utils.PNG);
}
return false;
}
//because the image we're trying to load is probably not one
//of this program's own resources.
ImageIcon tmpIcon = new ImageIcon(file.getPath());
- if (tmpIcon != null) {
- if (tmpIcon.getIconWidth() > IMAGE_SIZE_X) {
- thumbnail = new ImageIcon(tmpIcon.getImage().
- getScaledInstance(IMAGE_SIZE_X, -1, Image.SCALE_DEFAULT));
- } else { //no need to miniaturize
- thumbnail = tmpIcon;
- }
+ if (tmpIcon.getIconWidth() > IMAGE_SIZE_X) {
+ thumbnail = new ImageIcon(tmpIcon.getImage().
+ getScaledInstance(IMAGE_SIZE_X, -1, Image.SCALE_DEFAULT));
+ } else { //no need to miniaturize
+ thumbnail = tmpIcon;
}
}
import java.awt.Window;
import java.awt.event.ActionEvent;
import java.io.File;
+import java.io.IOException;
import java.text.DateFormat;
+import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import javax.swing.ButtonGroup;
import javax.swing.JButton;
import javax.swing.JRadioButton;
+import org.apache.commons.imaging.ImageReadException;
import org.apache.commons.imaging.Imaging;
import org.apache.commons.imaging.common.ImageMetadata;
import org.apache.commons.imaging.formats.jpeg.JpegImageMetadata;
}
}
}
- catch (Exception ex) {}
+ catch (IOException | ParseException | ImageReadException ex) {}
}
else {
long lastModified = timeFile.lastModified();
sdf.parse(text);
return true;
}
- catch (Exception e) {
+ catch (ParseException e) {
return false;
}
}
/* Utils.java is used by FileChooserDemo2.java. */
public class Utils {
- public final static String jpeg = "jpeg";
- public final static String jpg = "jpg";
- public final static String gif = "gif";
- public final static String tiff = "tiff";
- public final static String tif = "tif";
- public final static String png = "png";
+
+ /**
+ *
+ */
+ public final static String JPEG = "jpeg";
+ public final static String JPG = "jpg";
+ public final static String GIF = "gif";
+ public final static String TIFF = "tiff";
+ public final static String TIF = "tif";
+ public final static String PNG = "png";
/*
* Get the extension of a file.
package osm.jp.gpx.matchtime.gui.restamp;
import java.awt.*;
import java.io.IOException;
-import java.util.Observable;
-import java.util.Observer;
import javax.swing.*;
import javax.swing.event.DocumentEvent;
import osm.jp.gpx.AppParameters;
import osm.jp.gpx.matchtime.gui.SimpleDocumentListener;
@SuppressWarnings("serial")
-public class RestampDialog extends JDialog implements Observer
+public class RestampDialog extends JDialog
{
//{{DECLARE_CONTROLS
java.awt.Button closeButton;
AppParameters params;
//}}
- /**
- *
- * @param arg0
- * @param arg1
- */
- @Override
- public void update(Observable arg0, Object arg1) {
- String str = (String) arg1;
- System.out.println("私はAです。観察対象の通知を検知したよ。" + str);
- }
-
class SymWindow extends java.awt.event.WindowAdapter
{
@Override