release v1.7.5

This commit is contained in:
wyq 2019-02-27 16:42:43 +08:00
parent d441b05b05
commit 268d29c9c7
8 changed files with 195 additions and 49 deletions

0
.gitignore vendored Normal file
View File

View File

@ -15,4 +15,32 @@
<jpda.listen>true</jpda.listen>
</properties>
</action>
<action>
<actionName>run</actionName>
<packagings>
<packaging>jar</packaging>
</packagings>
<goals>
<goal>process-classes</goal>
<goal>org.codehaus.mojo:exec-maven-plugin:1.5.0:exec</goal>
</goals>
<properties>
<exec.args>-classpath %classpath org.meteoinfo.laboratory.MeteoInfoLab</exec.args>
<exec.executable>java</exec.executable>
</properties>
</action>
<action>
<actionName>profile</actionName>
<packagings>
<packaging>jar</packaging>
</packagings>
<goals>
<goal>process-classes</goal>
<goal>org.codehaus.mojo:exec-maven-plugin:1.5.0:exec</goal>
</goals>
<properties>
<exec.args>-classpath %classpath org.meteoinfo.laboratory.MeteoInfoLab</exec.args>
<exec.executable>java</exec.executable>
</properties>
</action>
</actions>

View File

@ -34,4 +34,40 @@
<maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.1.1</version>
<configuration>
<archive>
<manifest>
<mainClass>org.meteoinfo.laboratory.MeteoInfoLab</mainClass>
<addClasspath>true</addClasspath>
<classpathPrefix>lib/</classpathPrefix>
</manifest>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.1.1</version>
<executions>
<execution>
<id>copy-dependencies</id>
<phase>package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/lib</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

View File

@ -207,6 +207,10 @@ public class Options {
* @throws javax.xml.parsers.ParserConfigurationException
*/
public void saveConfigFile(String fileName) throws ParserConfigurationException {
if (fileName == null) {
return;
}
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
DocumentBuilder builder = factory.newDocumentBuilder();
Document doc = builder.newDocument();

View File

@ -119,14 +119,16 @@ public class FrmMain extends javax.swing.JFrame implements IApplication {
}
}
String cf = this.options.getCurrentFolder();
if (!new File(cf).isDirectory()) {
cf = this.startupPath;
this.options.setCurrentFolder(cf);
if (cf != null) {
if (!new File(cf).isDirectory()) {
cf = this.startupPath;
this.options.setCurrentFolder(cf);
}
if (!this.options.getRecentFolders().contains(cf)) {
this.jComboBox_CurrentFolder.addItem(cf);
}
this.jComboBox_CurrentFolder.setSelectedItem(cf);
}
if (!this.options.getRecentFolders().contains(cf)) {
this.jComboBox_CurrentFolder.addItem(cf);
}
this.jComboBox_CurrentFolder.setSelectedItem(cf);
//Add dockable panels
CControl control = new CControl(this);
@ -152,22 +154,24 @@ public class FrmMain extends javax.swing.JFrame implements IApplication {
toolboxPath = "D:/MyProgram/Java/MeteoInfoDev/toolbox";
}
String appConfFn = toolboxPath + File.separator + "apps.xml";
try {
this.apps.setPluginPath(toolboxPath);
this.apps.loadConfigFile(appConfFn);
if (this.apps.size() > 0) {
for (Application app : apps) {
if (app.isLoad()) {
this.loadApplication(app);
if (new File(appConfFn).exists()) {
try {
this.apps.setPluginPath(toolboxPath);
this.apps.loadConfigFile(appConfFn);
if (this.apps.size() > 0) {
for (Application app : apps) {
if (app.isLoad()) {
this.loadApplication(app);
}
}
}
} catch (MalformedURLException ex) {
Logger.getLogger(FrmMain.class.getName()).log(Level.SEVERE, null, ex);
} catch (IOException ex) {
Logger.getLogger(FrmMain.class.getName()).log(Level.SEVERE, null, ex);
} catch (ParserConfigurationException | SAXException ex) {
Logger.getLogger(FrmMain.class.getName()).log(Level.SEVERE, null, ex);
}
} catch (MalformedURLException ex) {
Logger.getLogger(FrmMain.class.getName()).log(Level.SEVERE, null, ex);
} catch (IOException ex) {
Logger.getLogger(FrmMain.class.getName()).log(Level.SEVERE, null, ex);
} catch (ParserConfigurationException | SAXException ex) {
Logger.getLogger(FrmMain.class.getName()).log(Level.SEVERE, null, ex);
}
final PythonInteractiveInterpreter interp = this.consoleDock.getInterpreter();
@ -262,7 +266,9 @@ public class FrmMain extends javax.swing.JFrame implements IApplication {
figuresDock = new FigureDockable(this, "Figures", "Figures");
this.variableDock = new VariableDockable("Variables", "Variable explorer");
this.fileDock = new FileDockable("Files", "File explorer");
this.fileDock.setPath(new File(cf));
if (cf != null) {
this.fileDock.setPath(new File(cf));
}
this.fileDock.getFileExplorer().addCurrentPathChangedListener(new ICurrentPathChangedListener() {
@Override
public void currentPathChangedEvent(CurrentPathChangedEvent event) {

View File

@ -1,36 +1,38 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.meteothink</groupId>
<artifactId>MeteoInfo</artifactId>
<version>1.7.5</version>
</parent>
<artifactId>MeteoInfoLib</artifactId>
<packaging>jar</packaging>
<repositories>
<repository>
<id>freehep</id>
<name>freehep</name>
<url>http://java.freehep.org/maven2/</url>
</repository>
<repository>
<id>boundless</id>
<name>boundlessgeo</name>
<url>http://repo.boundlessgeo.com/main/</url>
</repository>
<repository>
<id>central</id>
<name>Maven Central</name>
<url>http://repo1.maven.org/maven2/</url>
</repository>
<repository>
<id>ebi</id>
<name>ebiRepo</name>
<url>http://www.ebi.ac.uk/intact/maven/nexus/content/repositories/ebi-repo/</url>
</repository>
</repositories>
<repository>
<id>freehep</id>
<name>freehep</name>
<url>http://java.freehep.org/maven2/</url>
</repository>
<repository>
<id>boundless</id>
<name>boundlessgeo</name>
<url>http://repo.boundlessgeo.com/main/</url>
</repository>
<repository>
<id>central</id>
<name>Maven Central</name>
<url>http://repo1.maven.org/maven2/</url>
</repository>
<repository>
<id>ebi</id>
<name>ebiRepo</name>
<url>http://www.ebi.ac.uk/intact/maven/nexus/content/repositories/ebi-repo/</url>
</repository>
</repositories>
<dependencies>
<dependency>
@ -46,7 +48,7 @@
<dependency>
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
<version>2.2</version>
<version>2.10</version>
</dependency>
<dependency>
<groupId>org.freehep</groupId>
@ -118,10 +120,44 @@
<artifactId>wContour</artifactId>
<version>1.6.1</version>
</dependency>
<dependency>
<groupId>org.freehep</groupId>
<artifactId>freehep-util</artifactId>
<version>2.0.2</version>
</dependency>
</dependencies>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.1.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.1.1</version>
<executions>
<execution>
<id>copy-dependencies</id>
<phase>package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/lib</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<MeteoInfo File="config.xml" Type="configurefile">
<Path OpenPath="D:\Temp\grads"/>
<Path OpenPath="D:\Temp\micaps"/>
<Font>
<TextFont FontName="宋体" FontSize="15"/>
<LegendFont FontName="宋体" FontSize="12"/>

View File

@ -9,11 +9,6 @@
<artifactId>MeteoInfoMap</artifactId>
<packaging>jar</packaging>
<dependencies>
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-all</artifactId>
<version>2.4.14</version>
</dependency>
<dependency>
<groupId>com.sun.woodstock.dependlibs</groupId>
<artifactId>jhall</artifactId>
@ -29,9 +24,50 @@
<artifactId>MeteoInfoLib</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-all</artifactId>
<version>2.1.4</version>
</dependency>
</dependencies>
<properties>
<maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.1.1</version>
<configuration>
<archive>
<manifest>
<mainClass>org.meteoinfo.desktop.forms.Program</mainClass>
<addClasspath>true</addClasspath>
<classpathPrefix>lib/</classpathPrefix>
</manifest>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.1.1</version>
<executions>
<execution>
<id>copy-dependencies</id>
<phase>package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/lib</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>