import java.awt.event.ActionEvent;
import java.io.File;
import java.util.Date;
-
import javax.swing.*;
-
import osm.jp.gpx.ImportPicture;
/**
@SuppressWarnings("serial")
public class AdjustTime extends JFrame
{
- public static final String PROGRAM_NAME = "AdjustTime for JOSM";
- public static final String PROGRAM_VARSION = "2.0";
- public static final String PROGRAM_UPDATE = "2015/05/30";
+ public static final String PROGRAM_NAME = "AdjustTime for JOSM";
+ public static final String PROGRAM_VARSION = "3.0";
+ public static final String PROGRAM_UPDATE = "2015/07/26";
// Used for addNotify check.
boolean fComponentsAdjusted = false;
* このFrameが閉じられるときの動作。
* 終了確認のパネルを表示して、[OK]が押されたら終了する
*/
+ @Override
public void windowClosing(java.awt.event.WindowEvent event) {
Object object = event.getSource();
if (object == AdjustTime.this) {
}
class SymAction implements java.awt.event.ActionListener {
+ @Override
public void actionPerformed(java.awt.event.ActionEvent event) {
Object object = event.getSource();
if (object == miAbout) {
* @param b trueのときコンポーネントを表示; その他のとき, componentを隠す.
* @see java.awt.Component#isVisible
*/
+ @Override
public void setVisible(boolean b) {
if(b) {
setLocation(50, 50);
super.setVisible(b);
}
- /**
- * このクラスをインスタンスを生成して表示する。
- * コマンドラインの引数はありません。
- */
+ /**
+ * このクラスをインスタンスを生成して表示する。
+ * コマンドラインの引数はありません。
+ * @param args
+ */
static public void main(String args[]) {
- SwingUtilities.invokeLater(new Runnable() {
- public void run() {
- createAndShowGUI();
- }
+ SwingUtilities.invokeLater(() -> {
+ createAndShowGUI();
});
}
private static void createAndShowGUI() {
(new AdjustTime()).setVisible(true);
}
+ @Override
public void addNotify() {
// Record the size of the window prior to calling parents addNotify.
Dimension d = getSize();
// Adjust components according to the insets
setSize(getInsets().left + getInsets().right + d.width, getInsets().top + getInsets().bottom + d.height);
Component components[] = getComponents();
- for (int i = 0; i < components.length; i++){
- Point p = components[i].getLocation();
+ for (Component component : components) {
+ Point p = component.getLocation();
p.translate(getInsets().left, getInsets().top);
- components[i].setLocation(p);
+ component.setLocation(p);
}
fComponentsAdjusted = true;
}
fc.setSelectedFile(null);
}
- /** Returns an ImageIcon, or null if the path was invalid. */
+ /** Returns an ImageIcon, or null if the path was invalid.
+ * @param path
+ * @return */
public static ImageIcon createImageIcon(String path) {
java.net.URL imgURL = AdjustTime.class.getResource(path);
if (imgURL != null) {
arg1Panel_3.doButton.setEnabled(false);
String[] argv = new String[4];
- //argv[0] = "list.csv";
- argv[0] = arg1Panel_1.getText();
- argv[1] = arg1Panel_2.getText();
- argv[2] = arg1Panel_3.getText();
- String value = (String) arg1Panel_4.field.getSelectedItem();
- argv[3] = (value.equals("更新する") ? "EXIF" : "none");
-
- (new DoDialog(this, argv)).setVisible(true);
+ argv[0] = arg1Panel_1.getText();
+ argv[1] = arg1Panel_2.getText();
+ argv[2] = arg1Panel_3.getText();
+ String value = (String) arg1Panel_4.field.getSelectedItem();
+ argv[3] = (value.equals("更新する") ? "EXIF" : "none");
+
+ (new DoDialog(this, argv)).setVisible(true);
arg1Panel_3.doButton.setEnabled(true);
}