}
// imageeditor exist?
final File f = new File(YAamsCore.programPath, "imageeditor.jar");
YProgressWindowRepeat y = new YProgressWindowRepeat("Starting " + f.getAbsolutePath(), "imageeditor");
if (!f.exists()) {
// dl it
NetHelper.downloadFile(f, "http://www.yaams.de/file/plugins/ImageEditor.jar");
}
// check file
if (RessRess.endWithExtention(file, new String[] { "ie", "jpg", "jpeg", "jpe", "gif", "png", "psd", "bmp", "pict", "tga",
"ras", "pcx" })
|| !RessRess.endWithExtention(file, new String[] { "ie", "jpg", "jpeg", "jpe", "gif", "png", "psd", "bmp", "pict",
"tga", "ras", "pcx" })
&& YDialog.askUser(I18N.t("Bild {0} wird nicht unterstützt.", file.getName()), "ress.imageeditor",
"imageeditor_warn",
I18N.t("Wahrscheinlich kann ImageEditor die Datei nicht öffnen. Soll Sie dennoch geöffnet werden?"),
I18N.t("Trotzdem öffnen"), I18N.CANCEL, "imageeditor_ok", "cancel")) {
// run it
SystemHelper.runExternal(
new String[] { "java", "-jar", "-Xms128m", "-Xmx512M", f.getAbsolutePath(), file.getAbsolutePath() }, true);
}
y.close();
}
}));
imagepanel.add(bar, BorderLayout.NORTH);
}