|
From: <bma...@us...> - 2011-10-27 13:40:43
|
Revision: 6588
http://fudaa.svn.sourceforge.net/fudaa/?rev=6588&view=rev
Author: bmarchan
Date: 2011-10-27 13:40:36 +0000 (Thu, 27 Oct 2011)
Log Message:
-----------
pom : Inclusion package fudaa-common-save + jai_imageio non inclu dans le build assembly
Modified Paths:
--------------
trunk/soft/fudaa-lspiv/pom.xml
trunk/soft/fudaa-lspiv/src/main/assembly/assembly.xml
Modified: trunk/soft/fudaa-lspiv/pom.xml
===================================================================
--- trunk/soft/fudaa-lspiv/pom.xml 2011-10-27 13:16:10 UTC (rev 6587)
+++ trunk/soft/fudaa-lspiv/pom.xml 2011-10-27 13:40:36 UTC (rev 6588)
@@ -36,7 +36,13 @@
<groupId>org.fudaa.framework.fudaa</groupId>
<artifactId>fudaa-common</artifactId>
</dependency>
+ <!-- Pour la sauvegarde des propriétés graphiques au travers de db4o -->
<dependency>
+ <groupId>org.fudaa.framework.fudaa</groupId>
+ <artifactId>fudaa-common-save</artifactId>
+ <version>1.2-SNAPSHOT</version>
+ </dependency>
+ <dependency>
<groupId>com.jidesoft</groupId>
<artifactId>jide-oss</artifactId>
<version>2.9.4</version>
@@ -49,6 +55,7 @@
<groupId>com.sun.media</groupId>
<artifactId>jai_imageio</artifactId>
<version>1.1</version>
+ <!-- Cette dépendance ne sera pas incluse dans le build assembly -->
<scope>runtime</scope>
</dependency>
</dependencies>
Modified: trunk/soft/fudaa-lspiv/src/main/assembly/assembly.xml
===================================================================
--- trunk/soft/fudaa-lspiv/src/main/assembly/assembly.xml 2011-10-27 13:16:10 UTC (rev 6587)
+++ trunk/soft/fudaa-lspiv/src/main/assembly/assembly.xml 2011-10-27 13:40:36 UTC (rev 6588)
@@ -8,7 +8,7 @@
<dependencySet>
<!-- unpack les d\xE9pendances avant de les inclures dans le jar final de l'application -->
<unpack>true</unpack>
- <scope>runtime</scope>
+ <scope>compile</scope>
<useProjectArtifact>false</useProjectArtifact>
</dependencySet>
</dependencySets>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <bma...@us...> - 2011-11-03 09:31:33
|
Revision: 6608
http://fudaa.svn.sourceforge.net/fudaa/?rev=6608&view=rev
Author: bmarchan
Date: 2011-11-03 09:31:27 +0000 (Thu, 03 Nov 2011)
Log Message:
-----------
Modified Paths:
--------------
trunk/soft/fudaa-lspiv/pom.xml
trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/Piv.java
Modified: trunk/soft/fudaa-lspiv/pom.xml
===================================================================
--- trunk/soft/fudaa-lspiv/pom.xml 2011-11-03 09:28:22 UTC (rev 6607)
+++ trunk/soft/fudaa-lspiv/pom.xml 2011-11-03 09:31:27 UTC (rev 6608)
@@ -1,89 +1,118 @@
<?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>
+ <modelVersion>4.0.0</modelVersion>
- <properties>
- <fudaa-framework.version>1.2-SNAPSHOT</fudaa-framework.version>
- </properties>
+ <properties>
+ <fudaa-framework.version>1.2-SNAPSHOT</fudaa-framework.version>
+ <javaCompiler>1.6</javaCompiler>
+ <targetJdk>1.6</targetJdk>
+ </properties>
- <parent>
- <groupId>org.fudaa.pom</groupId>
- <artifactId>soft-pom</artifactId>
- <version>0.7</version>
- </parent>
- <groupId>org.fudaa.soft.fudaa-lspiv</groupId>
- <artifactId>fudaa-lspiv</artifactId>
- <version>1.1-SNAPSHOT</version>
- <name>Fudaa-Lspiv</name>
- <dependencyManagement>
- <dependencies>
- <dependency>
- <groupId>org.fudaa.framework</groupId>
- <artifactId>fudaa-framework</artifactId>
- <version>${fudaa-framework.version}</version>
- <type>pom</type>
- <scope>import</scope>
- </dependency>
- </dependencies>
- </dependencyManagement>
- <dependencies>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.fudaa.framework.fudaa</groupId>
- <artifactId>fudaa-common</artifactId>
- </dependency>
+ <parent>
+ <groupId>org.fudaa.pom</groupId>
+ <artifactId>soft-pom</artifactId>
+ <version>0.8</version>
+ </parent>
+ <groupId>org.fudaa.soft.fudaa-lspiv</groupId>
+ <artifactId>fudaa-lspiv</artifactId>
+ <version>1.1-SNAPSHOT</version>
+ <name>Fudaa-Lspiv</name>
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>org.fudaa.framework</groupId>
+ <artifactId>fudaa-framework</artifactId>
+ <version>${fudaa-framework.version}</version>
+ <type>pom</type>
+ <scope>import</scope>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.fudaa.framework.fudaa</groupId>
+ <artifactId>fudaa-common</artifactId>
+ </dependency>
<!-- Pour la sauvegarde des propriétés graphiques au travers de db4o -->
- <dependency>
- <groupId>org.fudaa.framework.fudaa</groupId>
- <artifactId>fudaa-common-save</artifactId>
- <version>1.2-SNAPSHOT</version>
- </dependency>
- <dependency>
- <groupId>com.jidesoft</groupId>
- <artifactId>jide-oss</artifactId>
- <version>2.9.4</version>
- </dependency>
- <dependency>
- <groupId>org.fudaa.framework.ebli</groupId>
- <artifactId>ebli-2d</artifactId>
- </dependency>
- <dependency>
- <groupId>com.sun.media</groupId>
- <artifactId>jai_imageio</artifactId>
- <version>1.1</version>
+ <dependency>
+ <groupId>org.fudaa.framework.fudaa</groupId>
+ <artifactId>fudaa-common-save</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>com.jidesoft</groupId>
+ <artifactId>jide-oss</artifactId>
+ <version>2.9.4</version>
+ </dependency>
+ <dependency>
+ <groupId>org.fudaa.framework.ebli</groupId>
+ <artifactId>ebli-2d</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>com.sun.media</groupId>
+ <artifactId>jai_imageio</artifactId>
+ <version>1.1</version>
<!-- Cette dépendance ne sera pas incluse dans le build assembly -->
- <scope>runtime</scope>
- </dependency>
- </dependencies>
-<build>
- <plugins>
- <plugin>
- <artifactId>maven-assembly-plugin</artifactId>
- <version>2.2-beta-2</version>
- <executions>
- <execution>
- <id>create-executable-jar</id>
- <phase>package</phase>
- <goals>
- <goal>single</goal>
- </goals>
+ <scope>runtime</scope>
+ </dependency>
+ </dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>create-executable-jar</id>
+ <phase>package</phase>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ <configuration>
+ <descriptors>
+ <descriptor>src/main/assembly/assembly.xml</descriptor>
+ </descriptors>
+ <archive>
+ <manifest>
+ <mainClass>org.fudaa.fudaa.piv.Piv</mainClass>
+ </manifest>
+ </archive>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ <pluginManagement>
+ <plugins>
+ <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
+ <plugin>
+ <groupId>org.eclipse.m2e</groupId>
+ <artifactId>lifecycle-mapping</artifactId>
+ <version>1.0.0</version>
<configuration>
- <descriptors>
- <descriptor>src/main/assembly/assembly.xml</descriptor>
- </descriptors>
- <archive>
- <manifest>
- <mainClass>org.fudaa.fudaa.piv.Piv</mainClass>
- </manifest>
- </archive>
+ <lifecycleMappingMetadata>
+ <pluginExecutions>
+ <pluginExecution>
+ <pluginExecutionFilter>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <versionRange>[1.3,)</versionRange>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </pluginExecutionFilter>
+ <action>
+ <ignore></ignore>
+ </action>
+ </pluginExecution>
+ </pluginExecutions>
+ </lifecycleMappingMetadata>
</configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
-</build>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ </build>
</project>
Modified: trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/Piv.java
===================================================================
--- trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/Piv.java 2011-11-03 09:28:22 UTC (rev 6607)
+++ trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/Piv.java 2011-11-03 09:31:27 UTC (rev 6608)
@@ -7,7 +7,6 @@
*/
package org.fudaa.fudaa.piv;
-import org.fudaa.ebli.commun.EbliPreferences;
import org.fudaa.fudaa.commun.impl.Fudaa;
/**
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <bma...@us...> - 2012-06-07 09:44:49
|
Revision: 7283
http://fudaa.svn.sourceforge.net/fudaa/?rev=7283&view=rev
Author: bmarchan
Date: 2012-06-07 09:44:38 +0000 (Thu, 07 Jun 2012)
Log Message:
-----------
Passage a Fudaa 1.3-SNAPSHOT
Modified Paths:
--------------
trunk/soft/fudaa-lspiv/pom.xml
trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/layer/PivInstantVelResultsModel.java
trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/layer/PivVelResultsModel.java
trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/metier/PivProject.java
Modified: trunk/soft/fudaa-lspiv/pom.xml
===================================================================
--- trunk/soft/fudaa-lspiv/pom.xml 2012-06-07 07:38:31 UTC (rev 7282)
+++ trunk/soft/fudaa-lspiv/pom.xml 2012-06-07 09:44:38 UTC (rev 7283)
@@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<properties>
- <fudaa-framework.version>1.2-SNAPSHOT</fudaa-framework.version>
+ <fudaa-framework.version>1.3-SNAPSHOT</fudaa-framework.version>
<javaCompiler>1.6</javaCompiler>
<targetJdk>1.6</targetJdk>
</properties>
@@ -11,7 +11,7 @@
<parent>
<groupId>org.fudaa.pom</groupId>
<artifactId>soft-pom</artifactId>
- <version>0.8</version>
+ <version>1.2</version>
</parent>
<groupId>org.fudaa.soft.fudaa-lspiv</groupId>
<artifactId>fudaa-lspiv</artifactId>
Modified: trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/layer/PivInstantVelResultsModel.java
===================================================================
--- trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/layer/PivInstantVelResultsModel.java 2012-06-07 07:38:31 UTC (rev 7282)
+++ trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/layer/PivInstantVelResultsModel.java 2012-06-07 09:44:38 UTC (rev 7283)
@@ -211,4 +211,8 @@
ptCache_.z_=0;
return ptCache_;
}
+
+ @Override
+ public void prepare() {
+ }
}
Modified: trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/layer/PivVelResultsModel.java
===================================================================
--- trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/layer/PivVelResultsModel.java 2012-06-07 07:38:31 UTC (rev 7282)
+++ trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/layer/PivVelResultsModel.java 2012-06-07 09:44:38 UTC (rev 7283)
@@ -195,4 +195,8 @@
ptCache_.initialiseAvec(prj_.getVelResults().getCoordinate(_ind));
return ptCache_;
}
+
+ @Override
+ public void prepare() {
+ }
}
Modified: trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/metier/PivProject.java
===================================================================
--- trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/metier/PivProject.java 2012-06-07 07:38:31 UTC (rev 7282)
+++ trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/metier/PivProject.java 2012-06-07 09:44:38 UTC (rev 7283)
@@ -1047,7 +1047,7 @@
File globalFile = new File(getOutputDir(), "global.xml");
FileReadOperationAbstract reader = new PivGlobalXmlReader();
CtuluIOOperationSynthese ret = reader.read(globalFile, _prog);
- if (ret.containsFatalError()) {
+ if (ret.containsSevereError()) {
return null;
}
return (PivGlobalXmlFileFormat.Param)ret.getSource();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <bma...@us...> - 2012-07-05 13:26:51
|
Revision: 7457
http://fudaa.svn.sourceforge.net/fudaa/?rev=7457&view=rev
Author: bmarchan
Date: 2012-07-05 13:26:40 +0000 (Thu, 05 Jul 2012)
Log Message:
-----------
Chgt de version -> 1.3.1
Modified Paths:
--------------
trunk/soft/fudaa-lspiv/pom.xml
trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/PivImplementation.java
Modified: trunk/soft/fudaa-lspiv/pom.xml
===================================================================
--- trunk/soft/fudaa-lspiv/pom.xml 2012-07-05 12:09:40 UTC (rev 7456)
+++ trunk/soft/fudaa-lspiv/pom.xml 2012-07-05 13:26:40 UTC (rev 7457)
@@ -15,7 +15,7 @@
</parent>
<groupId>org.fudaa.soft.fudaa-lspiv</groupId>
<artifactId>fudaa-lspiv</artifactId>
- <version>1.1-SNAPSHOT</version>
+ <version>1.3-SNAPSHOT</version>
<name>Fudaa-Lspiv</name>
<dependencyManagement>
<dependencies>
Modified: trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/PivImplementation.java
===================================================================
--- trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/PivImplementation.java 2012-07-05 12:09:40 UTC (rev 7456)
+++ trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/PivImplementation.java 2012-07-05 13:26:40 UTC (rev 7457)
@@ -81,8 +81,8 @@
protected static BuInformationsSoftware isPIV_ = new BuInformationsSoftware();
static {
isPIV_.name = "LSPIV";
- isPIV_.version = "1.3.1-beta";
- isPIV_.date = "2012-06-15";
+ isPIV_.version = "1.3.1";
+ isPIV_.date = "2012-07-03";
isPIV_.rights = PivResource.getS("Tous droits r\xE9serv\xE9s")+". CETMEF (c)1999-2012";
isPIV_.license = "GPL2";
isPIV_.languages = "en,fr";
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <bma...@us...> - 2015-01-23 14:32:29
|
Revision: 8994
http://sourceforge.net/p/fudaa/svn/8994
Author: bmarchan
Date: 2015-01-23 14:32:27 +0000 (Fri, 23 Jan 2015)
Log Message:
-----------
Acceptation de tout type de format d'image
Modified Paths:
--------------
trunk/soft/fudaa-lspiv/pom.xml
trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/PivImplementation.java
trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/action/PivOrthoLaunchAction.java
trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/io/PivExeLauncher.java
trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/metier/PivProject.java
trunk/soft/fudaa-lspiv/src/main/resources/org/fudaa/fudaa/piv/banniere.jpg
Added Paths:
-----------
trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/PivExportTranfFilesPanel.java
trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/action/PivExportTransfImagesAction.java
Modified: trunk/soft/fudaa-lspiv/pom.xml
===================================================================
--- trunk/soft/fudaa-lspiv/pom.xml 2015-01-22 08:33:35 UTC (rev 8993)
+++ trunk/soft/fudaa-lspiv/pom.xml 2015-01-23 14:32:27 UTC (rev 8994)
@@ -3,8 +3,8 @@
<modelVersion>4.0.0</modelVersion>
<properties>
- <fudaa-framework.version>1.4-SNAPSHOT</fudaa-framework.version>
- <fudaa-mesh.version>1.4-SNAPSHOT</fudaa-mesh.version>
+ <fudaa-framework.version>1.7-SNAPSHOT</fudaa-framework.version>
+ <fudaa-mesh.version>1.5-SNAPSHOT</fudaa-mesh.version>
<javaCompiler>1.6</javaCompiler>
<targetJdk>1.6</targetJdk>
</properties>
Added: trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/PivExportTranfFilesPanel.java
===================================================================
--- trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/PivExportTranfFilesPanel.java (rev 0)
+++ trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/PivExportTranfFilesPanel.java 2015-01-23 14:32:27 UTC (rev 8994)
@@ -0,0 +1,137 @@
+/*
+ * @creation 18 d\xE9c. 2008
+ * @modification $Date:$
+ * @license GNU General Public License 2
+ * @copyright (c)1998-2008 CETMEF 2 bd Gambetta F-60231 Compiegne
+ * @mail fud...@li...
+ */
+package org.fudaa.fudaa.piv;
+
+import java.io.File;
+
+import javax.swing.JFileChooser;
+import javax.swing.JLabel;
+
+import org.fudaa.ctulu.CtuluUI;
+import org.fudaa.ctulu.gui.CtuluCellTextRenderer;
+import org.fudaa.ctulu.gui.CtuluDialogPanel;
+import org.fudaa.ctulu.gui.CtuluFileChooser;
+import org.fudaa.ctulu.gui.CtuluFileChooserPanel;
+import org.fudaa.ctulu.gui.CtuluListEditorModel;
+import org.fudaa.ctulu.gui.CtuluListEditorPanel;
+
+import com.memoire.bu.BuVerticalLayout;
+
+/**
+ * Un panneau pour exporter les images transform\xE9es pgm ou autres vers un r\xE9pertoire choisi.
+ *
+ * @author mar...@de...
+ * @version $Id$
+ */
+public class PivExportTranfFilesPanel extends CtuluDialogPanel {
+
+ private CtuluUI ui_;
+ /** Le repertoire racine du projet */
+ private File prjRoot_;
+ /** Le repertoire d'export. */
+ private CtuluFileChooserPanel fcDirExport_;
+ /** Le mod\xE8le pour la liste des images */
+ private CtuluListEditorModel mdFiles_;
+
+ /**
+ * Constructeur.
+ * @param _ui Le parent pour la boite de dialogue.
+ */
+ public PivExportTranfFilesPanel(CtuluUI _ui) {
+ ui_=_ui;
+
+ setLayout(new BuVerticalLayout(5, true, true));
+ setHelpText(PivResource.getS("Selectionner les images que vous souhaitez exporter."));
+
+ fcDirExport_=new CtuluFileChooserPanel();
+ fcDirExport_.setFileSelectMode(JFileChooser.DIRECTORIES_ONLY);
+ add(fcDirExport_);
+
+ // Label images
+ add(new JLabel(PivResource.getS("Liste des images"),JLabel.LEFT));
+
+ // Liste des images
+ mdFiles_=new CtuluListEditorModel(true) {
+ @Override
+ public boolean isCellEditable(int _rowIndex, int _columnIndex) {
+ return false;
+ }
+ @Override
+ public Object createNewObject() {
+ return null;
+ }
+ };
+
+ CtuluListEditorPanel pnFiles=new CtuluListEditorPanel(mdFiles_, true, true, false) {
+ @Override
+ public void actionAdd() {
+ }
+ };
+
+ pnFiles.setValueListCellRenderer(new CtuluCellTextRenderer() {
+ @Override
+ public void setValue(Object _file) {
+ File f=(File)_file;
+ setText(f.getName());
+ if (f.getPath().startsWith(prjRoot_.getPath())) {
+ setToolTipText(PivResource.getS("Dans le projet"));
+ }
+ else {
+ setToolTipText(f.getPath());
+ }
+ }
+ });
+
+ add(pnFiles);
+ }
+
+ @Override
+ public void setValue(Object _files) {
+ if (!(_files instanceof File[]))
+ throw new IllegalArgumentException("bad type parameter");
+ setFiles((File[])_files);
+ }
+
+ @Override
+ public File[] getValue() {
+ return getFiles();
+ }
+
+ /**
+ * Definit la racine du projet, pour savoir si un fichier fait d\xE9j\xE0 partie du projet.
+ * @param _root La racine du projet.
+ */
+ public void setRootProject(File _root) {
+ prjRoot_=_root;
+ }
+
+ /**
+ * D\xE9finit l'utilitaire \xE0 modifier.
+ * @param _tool L'utilitaire
+ */
+ public void setFiles(File[] _files) {
+ if (_files==null) return;
+
+ mdFiles_.setData(_files);
+ }
+
+ /**
+ * @return Les fichiers image, comportant les anciens et nouveaux fichiers.
+ */
+ public File[] getFiles() {
+ File[] files=new File[mdFiles_.getRowCount()];
+ mdFiles_.getValues(files);
+
+ return files;
+ }
+
+ @Override
+ public boolean isDataValid() {
+ return true;
+ }
+}
Property changes on: trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/PivExportTranfFilesPanel.java
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/PivImplementation.java
===================================================================
--- trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/PivImplementation.java 2015-01-22 08:33:35 UTC (rev 8993)
+++ trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/PivImplementation.java 2015-01-23 14:32:27 UTC (rev 8994)
@@ -42,6 +42,7 @@
import org.fudaa.fudaa.piv.action.PivComputeFlowAction;
import org.fudaa.fudaa.piv.action.PivComputeLaunchAction;
import org.fudaa.fudaa.piv.action.PivComputeParamAction;
+import org.fudaa.fudaa.piv.action.PivExportTransfImagesAction;
import org.fudaa.fudaa.piv.action.PivFlowParamAction;
import org.fudaa.fudaa.piv.action.PivImportGRPAction;
import org.fudaa.fudaa.piv.action.PivImportGridAction;
@@ -81,14 +82,14 @@
protected static BuInformationsSoftware isPIV_ = new BuInformationsSoftware();
static {
isPIV_.name = "LSPIV";
- isPIV_.version = "1.3.2";
- isPIV_.date = "2013-02-14";
- isPIV_.rights = PivResource.getS("Tous droits r\xE9serv\xE9s")+". CETMEF (c)1999-2013";
+ isPIV_.version = "1.4.1";
+ isPIV_.date = "2014-12-10";
+ isPIV_.rights = PivResource.getS("Tous droits r\xE9serv\xE9s")+". CETMEF (c)1999-2014";
isPIV_.license = "GPL2";
isPIV_.languages = "en,fr";
isPIV_.authors=new String[]{"B.Marchand (mar...@de...)"};
isPIV_.contact="mag...@ed...\n jer...@ir...\n ale...@ed...";
- isPIV_.http="http://www.fudaa.fr/lspiv/";
+ isPIV_.http="http://forge.irstea.fr/projects/fudaa-lspiv";
isPIV_.logo = PivResource.PIV.getIcon("iconepiv.gif");
isPIV_.banner = PivResource.PIV.getIcon("banniere.jpg");
@@ -164,7 +165,7 @@
private void initStaticLanguageDependant() {
FILE_FLT_PROJ=new BuFileFilter("lspiv.zip",PivResource.getS("Fichier projet"));
FILE_FLT_PGM=new BuFileFilter("pgm",PivResource.getS("Fichiers images en niveaux de gris"));
- FILE_FLT_IMAGES=new BuFileFilter(new String[]{"jpg","gif","png","pgm"},PivResource.getS("Fichiers images"));
+ FILE_FLT_IMAGES=new BuFileFilter(new String[]{"jpg","jpeg","gif","png","pgm","tif","tiff","bmp"},PivResource.getS("Fichiers images"));
FILE_FLT_GRID=new BuFileFilter("dat",PivResource.getS("Fichier grid"));
FILE_FLT_GRP=new BuFileFilter("dat",PivResource.getS("Fichier GRP"));
FILE_FLT_BATHY=new BuFileFilter("dat",PivResource.getS("Fichier bathy"));
@@ -207,7 +208,7 @@
setEnabledForAction("CREATE_GRP", bprjOpen && bprjHasSrcImg);
setEnabledForAction("IMPORT_GRP", bprjOpen && bprjHasSrcImg);
setEnabledForAction("VERIFY_GRP", bprjOpen && project.getOrthoPoints()!=null);
- setEnabledForAction("DEFINE_ORTHO_PARAM", bprjOpen && project.getOrthoPoints()!=null && project.hasTransformableImages());
+ setEnabledForAction("DEFINE_ORTHO_PARAM", bprjOpen && project.getOrthoPoints()!=null && bprjHasSrcImg);
setEnabledForAction("COMPUTE_ORTHO", bprjOpen);
setEnabledForAction("DEFINE_PIV_PARAM", bprjOpen && bprjHasTransfImg);
setEnabledForAction("DEFINE_GRID", bprjOpen && bprjHasTransfImg);
@@ -220,6 +221,7 @@
setEnabledForAction("COMPUTE_AVERAGE", bprjOpen);
setEnabledForAction("SHOW_VELOCITIES_RESULTS", bprjOpen && project.getAverageResults()!=null);
setEnabledForAction("SHOW_FLOW_RESULTS", bprjOpen && project.getFlowResults()!=null);
+ setEnabledForAction("EXPORT_TRANSF_IMAGES", bprjOpen && bprjHasTransfImg);
refreshTitle();
}
@@ -815,6 +817,8 @@
BuMenuItem itExportImageToClip = new BuMenuItem();
super.initExportImageToClipborad(itExportImageToClip);
mnExport.add(itExportImageToClip);
+ mnExport.addSeparator();
+ mnExport.add(new PivExportTransfImagesAction(this));
}
/**
Added: trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/action/PivExportTransfImagesAction.java
===================================================================
--- trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/action/PivExportTransfImagesAction.java (rev 0)
+++ trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/action/PivExportTransfImagesAction.java 2015-01-23 14:32:27 UTC (rev 8994)
@@ -0,0 +1,126 @@
+/*
+ * @creation 3 juil. 2008
+ * @modification $Date:$
+ * @license GNU General Public License 2
+ * @copyright (c)1998-2008 CETMEF 2 bd Gambetta F-60231 Compiegne
+ * @mail fud...@li...
+ */
+package org.fudaa.fudaa.piv.action;
+
+import java.awt.event.ActionEvent;
+import java.io.File;
+
+import org.fudaa.ctulu.CtuluAnalyze;
+import org.fudaa.ctulu.gui.CtuluDialog;
+import org.fudaa.ctulu.gui.CtuluTaskOperationGUI;
+import org.fudaa.ebli.commun.EbliActionSimple;
+import org.fudaa.fudaa.piv.PivExePanel;
+import org.fudaa.fudaa.piv.PivExportTranfFilesPanel;
+import org.fudaa.fudaa.piv.PivImplementation;
+import org.fudaa.fudaa.piv.PivManageOriginalFilesPanel;
+import org.fudaa.fudaa.piv.PivPreferences;
+import org.fudaa.fudaa.piv.PivProgressionPanel;
+import org.fudaa.fudaa.piv.PivResource;
+import org.fudaa.fudaa.piv.PivVisuPanel;
+import org.fudaa.fudaa.piv.io.PivExeLauncher;
+
+/**
+ * Une action pour eporter les images transform\xE9es.
+ *
+ * @author Bertrand Marchand (mar...@de...)
+ * @version $Id$
+ */
+public class PivExportTransfImagesAction extends EbliActionSimple {
+ PivImplementation impl;
+ PivExportTranfFilesPanel pnExportImages;
+ CtuluDialog diProgress_;
+
+ /**
+ * Constructeur.
+ * @param _impl L'implementation.
+ */
+ public PivExportTransfImagesAction(PivImplementation _impl) {
+ super(PivResource.getS("Export des images transform\xE9es..."), null, "EXPORT_TRANSF_IMAGES");
+
+ impl=_impl;
+ setEnabled(false);
+ }
+
+ /**
+ * Exporte les images transform\xE9es au format pgm.
+ * @param _e L'evenement pour l'action.
+ */
+ @Override
+ public void actionPerformed(final ActionEvent _e) {
+ if (!isValide()) {
+ return;
+ }
+
+// if (!PivExeLauncher.instance().areExeOK()) {
+// PivExePanel pnExe = new PivExePanel();
+//
+// // TODO BM : Verifier que les nouvelles images sont compatibles avec les donn\xE9es d'ortho ou message.
+//
+// if (!pnExe.afficheModaleOk(impl.getFrame(), PivResource.getS("R\xE9pertoire contenant les executables"))) {
+// return;
+// }
+// }
+
+ // Selection des images
+ if (pnExportImages==null)
+ pnExportImages = new PivExportTranfFilesPanel(impl);
+ pnExportImages.setRootProject(impl.getCurrentProject().getRoot());
+ pnExportImages.setFiles(impl.getCurrentProject().getTransfImageFiles());
+ if (!pnExportImages.afficheModaleOk(impl.getFrame(), PivResource.getS("Export des images"), CtuluDialog.OK_CANCEL_OPTION)) {
+ return;
+ }
+
+ final File[] exportImgFiles=pnExportImages.getFiles();
+
+// // Le reconditionnement des images.
+// CtuluTaskOperationGUI r=new CtuluTaskOperationGUI(impl, PivResource.getS("Traitement des images sources")) {
+//
+// @Override
+// public void act() {
+// try {
+// CtuluAnalyze ana=new CtuluAnalyze();
+// ana.setDesc(getName());
+// impl.getCurrentProject().setSrcImagesFiles(exportImgFiles, this, ana);
+//
+// if (ana.containsErrorOrFatalError()) {
+// impl.error(ana.getResume());
+// return;
+// }
+//
+// }
+// finally {
+// diProgress_.dispose();
+// }
+//
+// impl.get2dFrame().getVisuPanel().setViewMode(PivVisuPanel.MODE_ORIGINAL_VIEW);
+//// impl.message(PivResource.getS("{0} images ont \xE9t\xE9 reconditionn\xE9es avec succ\xE8s",impl.getCurrentProject().getSrcImageFiles().length));
+// }
+// };
+//
+// PivProgressionPanel pnProgress_=new PivProgressionPanel(r);
+// diProgress_ = pnProgress_.createDialog(impl.getParentComponent());
+// diProgress_.setOption(CtuluDialog.ZERO_OPTION);
+// diProgress_.setDefaultCloseOperation(CtuluDialog.DO_NOTHING_ON_CLOSE);
+// diProgress_.setTitle(r.getName());
+//
+// r.start();
+// diProgress_.afficheDialogModal();
+ }
+
+ /**
+ * @return true Si toutes les donn\xE9es sont pr\xE9sentes pour un lancement.
+ */
+ public boolean isValide() {
+ return true;
+ }
+
+ @Override
+ public String getEnableCondition() {
+ return PivResource.getS("Les images transform\xE9es doivent exister");
+ }
+}
Property changes on: trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/action/PivExportTransfImagesAction.java
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/action/PivOrthoLaunchAction.java
===================================================================
--- trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/action/PivOrthoLaunchAction.java 2015-01-22 08:33:35 UTC (rev 8993)
+++ trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/action/PivOrthoLaunchAction.java 2015-01-23 14:32:27 UTC (rev 8994)
@@ -103,8 +103,8 @@
impl.error(PivResource.getS("Erreur"), PivResource.getS("Les param\xE8tres d'orthorectification n'ont pas \xE9t\xE9 donn\xE9s"));
return false;
}
- if (!impl.getCurrentProject().hasTransformableImages()) {
- impl.error(PivResource.getS("Erreur"), PivResource.getS("Le projet ne contient aucune image \xE0 transformer"));
+ if (!impl.getCurrentProject().hasSrcImages()) {
+ impl.error(PivResource.getS("Erreur"), PivResource.getS("Le projet ne contient aucune image source"));
return false;
}
Modified: trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/io/PivExeLauncher.java
===================================================================
--- trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/io/PivExeLauncher.java 2015-01-22 08:33:35 UTC (rev 8993)
+++ trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/io/PivExeLauncher.java 2015-01-23 14:32:27 UTC (rev 8994)
@@ -229,7 +229,7 @@
}
/**
- * Lance le calcul des images transform\xE9es a partir des coefficients
+ * Lance le calcul de transformation des images sources a partir des coefficients
* d'orthorectification.
*
* @param _ana L'analyse pour la tache ex\xE9cut\xE9e.
@@ -268,7 +268,7 @@
// copyFile(prjOutputs, exeOutputs, "coeff.dat");
// Les images
- File[] imgInp = _prj.getTransformableImageFiles();
+ File[] imgInp = _prj.getSrcImageFiles();
// Si une image1.pgm existe, on la renomme pour eviter qu'elle soit \xE9cras\xE9e.
int indImgInpExe=Arrays.asList(imgInp).indexOf(fimgInpExe);
@@ -290,6 +290,7 @@
new PivPGMWriter().write(new File(prjImgInp, fimgInpExe.getName()), buffer);
}
else {
+ // TODO : Ne devrait plus passer par la...
// Attention : Le nom ne doit pas etre le m\xEAme que les images d\xE9ja
// stock\xE9es
String srcFileName = imgInp[i].getName();
Modified: trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/metier/PivProject.java
===================================================================
--- trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/metier/PivProject.java 2015-01-22 08:33:35 UTC (rev 8993)
+++ trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/metier/PivProject.java 2015-01-23 14:32:27 UTC (rev 8994)
@@ -177,10 +177,6 @@
public boolean hasSrcImages() {
return getSrcImageFiles().length>0;
}
-
- public boolean hasTransformableImages() {
- return getTransformableImageFiles().length>0;
- }
/**
* Le projet contient-il des r\xE9sultats de vitesse brutes ?
@@ -235,19 +231,6 @@
}
/**
- * @return Le chemins des images transformables uniquement parmis les images sources, dans
- * l'ordre utilisateur.
- */
- public File[] getTransformableImageFiles() {
- List<File> files = new ArrayList<File>();
- for (File f : srcFiles_) {
- if (FLT_PGM_FILES.accept(f))
- files.add(f);
- }
- return files.toArray(new File[0]);
- }
-
- /**
* Reconstruit les caches si necessaire.
* @param _task La progression.
* @return false : Si un probl\xE8me s'est produit lors de la production.
Modified: trunk/soft/fudaa-lspiv/src/main/resources/org/fudaa/fudaa/piv/banniere.jpg
===================================================================
(Binary files differ)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <bma...@us...> - 2015-04-16 15:30:17
|
Revision: 9109
http://sourceforge.net/p/fudaa/svn/9109
Author: bmarchan
Date: 2015-04-16 15:30:15 +0000 (Thu, 16 Apr 2015)
Log Message:
-----------
Ajout de la visualisation 3D des transects
Modified Paths:
--------------
trunk/soft/fudaa-lspiv/pom.xml
trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/PivImplementation.java
Added Paths:
-----------
trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/PivShow3DTransectPanel.java
trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/action/PivShow3DTransectAction.java
Modified: trunk/soft/fudaa-lspiv/pom.xml
===================================================================
--- trunk/soft/fudaa-lspiv/pom.xml 2015-04-16 15:28:24 UTC (rev 9108)
+++ trunk/soft/fudaa-lspiv/pom.xml 2015-04-16 15:30:15 UTC (rev 9109)
@@ -86,6 +86,10 @@
<artifactId>fudaa-sig</artifactId>
<version>1.7-SNAPSHOT</version>
</dependency>
+ <dependency>
+ <groupId>org.fudaa.framework.ebli</groupId>
+ <artifactId>ebli-graphe-3D</artifactId>
+ </dependency>
</dependencies>
<build>
<plugins>
Modified: trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/PivImplementation.java
===================================================================
--- trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/PivImplementation.java 2015-04-16 15:28:24 UTC (rev 9108)
+++ trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/PivImplementation.java 2015-04-16 15:30:15 UTC (rev 9109)
@@ -56,6 +56,7 @@
import org.fudaa.fudaa.piv.action.PivOrthoParamAction;
import org.fudaa.fudaa.piv.action.PivOrthoVerifyGRPAction;
import org.fudaa.fudaa.piv.action.PivSelectImagesAction;
+import org.fudaa.fudaa.piv.action.PivShow3DTransectAction;
import org.fudaa.fudaa.piv.metier.PivProject;
import org.fudaa.fudaa.piv.metier.PivProjectStateListener;
@@ -808,6 +809,7 @@
mn.add(get2dFrame().getVisuPanel().getRealView().getParamsTransectAction().buildMenuItem(EbliComponentFactory.INSTANCE));
mn.add(new PivComputeFlowAction(this));
mn.add(get2dFrame().getVisuPanel().getShowFlowAction().buildMenuItem(EbliComponentFactory.INSTANCE));
+ mn.add(new PivShow3DTransectAction(this));
mn.addSeparator(PivResource.getS("Vue"));
ButtonGroup bg=new ButtonGroup();
Added: trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/PivShow3DTransectPanel.java
===================================================================
--- trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/PivShow3DTransectPanel.java (rev 0)
+++ trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/PivShow3DTransectPanel.java 2015-04-16 15:30:15 UTC (rev 9109)
@@ -0,0 +1,264 @@
+package org.fudaa.fudaa.piv;
+
+import java.awt.BorderLayout;
+import java.awt.Color;
+import java.awt.Dimension;
+
+import org.fudaa.ctulu.gui.CtuluDialogPanel;
+import org.fudaa.ebli.geometrie.GrPolyligne;
+import org.fudaa.ebli.graphe3D.EG3dGraph;
+import org.fudaa.ebli.graphe3D.data.EG3dLineModelAbstract;
+import org.fudaa.ebli.graphe3D.renderer.EG3dDefaultDataRenderer;
+import org.fudaa.ebli.graphe3D.ui.panel.EG3dGraphPanel;
+import org.fudaa.ebli.trace.TraceLigne;
+import org.fudaa.fudaa.piv.metier.PivFlowResults;
+import org.fudaa.fudaa.piv.metier.PivTransect;
+
+/**
+ * Un panneau de saisie des param\xE8tres du transect pour le calcul des d\xE9bits.
+ *
+ * @author Bertrand Marchand (mar...@de...)
+ * @version $Id$
+ */
+public class PivShow3DTransectPanel extends CtuluDialogPanel {
+ PivImplementation impl_;
+ EG3dGraph pnGraph_;
+ private EG3dDefaultDataRenderer transRenderer_;
+ private EG3dDefaultDataRenderer disRenderer_;
+
+ class TransectModel extends EG3dLineModelAbstract {
+ PivTransect trans_;
+ GrPolyligne pl_;
+
+ public TransectModel(PivTransect _trans) {
+ trans_=_trans;
+ pl_=trans_.getStraight();
+ }
+
+ @Override
+ public int getNbPoints() {
+ return pl_.nombre();
+ }
+
+ @Override
+ public float getX(int _idx) {
+ return (float)pl_.sommet(_idx).x_;
+ }
+
+ @Override
+ public float getY(int _idx) {
+ return (float)pl_.sommet(_idx).y_;
+ }
+
+ @Override
+ public float getZ(int _idx) {
+ return (float)pl_.sommet(_idx).z_;
+ }
+ }
+
+ class DischargeModel extends EG3dLineModelAbstract {
+ PivFlowResults res_;
+ PivTransect trans_;
+ double zniv_;
+ double ratio_;
+
+ public DischargeModel(PivTransect _trans, PivFlowResults _res, double _zniv) {
+ res_=_res;
+ trans_=_trans;
+ zniv_=_zniv;
+
+ double lgArrowMax=Double.NEGATIVE_INFINITY;
+ double vx;
+ double vy;
+ for (int i=0; i<_res.getNombre(); i++) {
+ vx=_res.getVx(i);
+ vy=_res.getVy(i);
+ lgArrowMax=Math.max(lgArrowMax,Math.sqrt(vx*vx+vy*vy));
+ }
+ ratio_=_trans.getStraight().longueurXY()/6./lgArrowMax;
+ }
+
+ // Le nombre est modifi\xE9 pour afficher les fleches + une ligne horizontale
+ @Override
+ public int getNbPoints() {
+ return res_.getNombre()*5+2;
+ }
+
+ @Override
+ public float getX(int _idx) {
+ // 1er point ligne horizontale
+ if (_idx==0) {
+ return (float)trans_.getStraight().sommet(0).x_;
+ }
+ // 2eme point ligne horizontale
+ if (_idx==1) {
+ return (float)trans_.getStraight().sommet(trans_.getStraight().nombre()-1).x_;
+ }
+ _idx-=2;
+
+ double vx;
+ double vy;
+ double lgFleche;
+
+ switch (_idx%5) {
+ // Point d'origine
+ case 0:
+ default:
+ return (float)res_.getX(_idx/5);
+ // Point extremit\xE9
+ case 1:
+ case 3:
+ return (float)(res_.getX(_idx/5)+res_.getVx(_idx/5)*ratio_);
+ // Point extremite 1 fleche
+ case 2:
+ vx=res_.getVx(_idx/5)*ratio_;
+ vy=res_.getVy(_idx/5)*ratio_;
+ lgFleche=Math.sqrt(vx*vx+vy*vy)/10.;
+ double angVit=Math.atan2(vy, vx);
+ double angFleche=angVit+5./6.*Math.PI;
+ return (float)(lgFleche*Math.cos(angFleche)+res_.getX(_idx/5)+vx);
+ // Point extremite 2 fleche
+ case 4:
+ vx=res_.getVx(_idx/5)*ratio_;
+ vy=res_.getVy(_idx/5)*ratio_;
+ lgFleche=Math.sqrt(vx*vx+vy*vy)/10.;
+ angVit=Math.atan2(vy,vx);
+ angFleche=angVit-5./6.*Math.PI;
+ return (float)(lgFleche*Math.cos(angFleche)+res_.getX(_idx/5)+vx);
+ }
+ }
+
+ @Override
+ public float getY(int _idx) {
+ // 1er point ligne horizontale
+ if (_idx==0) {
+ return (float)trans_.getStraight().sommet(0).y_;
+ }
+ // 2eme point ligne horizontale
+ else if (_idx==1) {
+ return (float)trans_.getStraight().sommet(trans_.getStraight().nombre()-1).y_;
+ }
+ _idx-=2;
+
+ double vx;
+ double vy;
+ double lgFleche;
+
+ switch (_idx%5) {
+ // Point d'origine
+ case 0:
+ default:
+ return (float)res_.getY(_idx/5);
+ // Point extremit\xE9
+ case 1:
+ case 3:
+ return (float)(res_.getY(_idx/5)+res_.getVy(_idx/5)*ratio_);
+ // Point extremite 1 fleche
+ case 2:
+ vx=res_.getVx(_idx/5)*ratio_;
+ vy=res_.getVy(_idx/5)*ratio_;
+ lgFleche=Math.sqrt(vx*vx+vy*vy)/10.;
+ double angVit=Math.atan2(vy, vx);
+ double angFleche=angVit+5./6.*Math.PI;
+ return (float)(lgFleche*Math.sin(angFleche)+res_.getY(_idx/5)+vy);
+ // Point extremite 2 fleche
+ case 4:
+ vx=res_.getVx(_idx/5)*ratio_;
+ vy=res_.getVy(_idx/5)*ratio_;
+ lgFleche=Math.sqrt(vx*vx+vy*vy)/10.;
+ angVit=Math.atan2(vy, vx);
+ angFleche=angVit-5./6.*Math.PI;
+ return (float)(lgFleche*Math.sin(angFleche)+res_.getY(_idx/5)+vy);
+ }
+ }
+
+ @Override
+ public float getZ(int _idx) {
+ return (float)zniv_;
+ }
+ }
+
+ /**
+ * Constructeur.
+ */
+ public PivShow3DTransectPanel(PivImplementation _impl) {
+ impl_=_impl;
+ customize();
+ }
+
+ private void customize() {
+ setLayout(new BorderLayout());
+
+ transRenderer_=new EG3dDefaultDataRenderer();
+ transRenderer_.setLineColor(0, Color.ORANGE);
+ transRenderer_.setLineThickness(0, 1.f);
+
+ disRenderer_=new EG3dDefaultDataRenderer() {
+ @Override
+ public int getLineStyle(int _idx) {
+ if (_idx==0)
+ return TraceLigne.TIRETE;
+ if (_idx==1)
+ return TraceLigne.INVISIBLE;
+
+ _idx-=2;
+ if (_idx%5==4)
+ return TraceLigne.INVISIBLE;
+ else
+ return lm.getTypeTrait();
+ }
+ };
+ disRenderer_.setLineColor(0, Color.BLUE.darker());
+ disRenderer_.setLineThickness(0, 1.f);
+
+ EG3dGraphPanel pn=new EG3dGraphPanel();
+ pn.setPreferredSize(new Dimension(700,500));
+
+ pn.getBtnPanel().showSurfaceButton(false);
+
+ pnGraph_=pn.getView();
+// pnGraph_.getViewRenderer().setDisplayGrids(true);
+ pnGraph_.getViewRenderer().getProjector().setDistance(100000.f);
+ pnGraph_.getViewRenderer().getProjector().setRotationAngle(160);
+ pnGraph_.getViewRenderer().getProjector().setElevationAngle(20);
+
+ this.add(pn,BorderLayout.CENTER);
+ setHelpText(PivResource.getS("Clic gauche : Rotation de la vue\nCtrl+clic gauche : D\xE9placement de la vue\nShift+clic gauche : Zoom de la vue"));
+ }
+
+ public void setSelectedTransects(int... _isels) {
+ pnGraph_.removeAllDatas();
+
+ PivTransect[] transects=impl_.getCurrentProject().getTransects();
+
+ for (int i=0; i<_isels.length; i++) {
+ TransectModel mdl=new TransectModel(transects[_isels[i]]);
+ pnGraph_.addData(mdl);
+ pnGraph_.setDataRenderer(i, transRenderer_);
+ }
+
+ PivFlowResults[] res=impl_.getCurrentProject().getFlowResults();
+ if (res!=null) {
+ for (int i=0; i<_isels.length; i++) {
+ DischargeModel mdl=new DischargeModel(transects[_isels[i]],res[_isels[i]], impl_.getCurrentProject().getOrthoParameters().getResolution());
+ pnGraph_.addData(mdl);
+ pnGraph_.setDataRenderer(i+_isels.length, disRenderer_);
+ }
+ }
+
+ // Retaillage des limites de boite pour un ratio identique sur X et Y
+ float[] xrange=pnGraph_.getRangeX();
+ float[] yrange=pnGraph_.getRangeY();
+ float delta=(xrange[1]-xrange[0])-(yrange[1]-yrange[0]);
+ if (delta>0) {
+ yrange[0]-=delta/2.;
+ yrange[1]+=delta/2.;
+ pnGraph_.setRangeY(yrange[0], yrange[1]);
+ }
+ else {
+ xrange[0]+=delta/2.;
+ xrange[1]-=delta/2.;
+ pnGraph_.setRangeX(xrange[0], xrange[1]);
+ }
+ }
+}
Property changes on: trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/PivShow3DTransectPanel.java
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/action/PivShow3DTransectAction.java
===================================================================
--- trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/action/PivShow3DTransectAction.java (rev 0)
+++ trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/action/PivShow3DTransectAction.java 2015-04-16 15:30:15 UTC (rev 9109)
@@ -0,0 +1,72 @@
+/*
+ * @creation 3 juil. 2008
+ * @modification $Date:$
+ * @license GNU General Public License 2
+ * @copyright (c)1998-2008 CETMEF 2 bd Gambetta F-60231 Compiegne
+ * @mail fud...@li...
+ */
+package org.fudaa.fudaa.piv.action;
+
+import java.awt.event.ActionEvent;
+
+import org.fudaa.ctulu.gui.CtuluDialog;
+import org.fudaa.ebli.calque.BCalque;
+import org.fudaa.ebli.calque.ZSelectionEvent;
+import org.fudaa.ebli.calque.ZSelectionListener;
+import org.fudaa.ebli.calque.edition.ZCalqueLigneBriseeEditable;
+import org.fudaa.ebli.commun.EbliActionSimple;
+import org.fudaa.fudaa.piv.PivImplementation;
+import org.fudaa.fudaa.piv.PivResource;
+import org.fudaa.fudaa.piv.PivShow3DTransectPanel;
+
+/**
+ * Une action pour afficher le transect selectionn\xE9 suivant un graphe 3D.
+ *
+ * @author Bertrand Marchand (mar...@de...)
+ * @version $Id$
+ */
+public class PivShow3DTransectAction extends EbliActionSimple implements ZSelectionListener {
+ PivImplementation impl;
+ PivShow3DTransectPanel pn;
+
+ public PivShow3DTransectAction(PivImplementation _impl) {
+ super(PivResource.getS("Graphe 3D du(des) transect(s)..."), null, "SHOW_3D_GRAPH_TRANS");
+ impl=_impl;
+ _impl.get2dFrame().getVisuPanel().getScene().addSelectionListener(this);
+
+ setEnabled(false);
+ }
+
+ /**
+ * Affiche le panneau des param\xE8tres de calcul.
+ * @param _e L'evenement pour l'action.
+ */
+ @Override
+ public void actionPerformed(final ActionEvent _e) {
+ int[] isels=impl.get2dFrame().getVisuPanel().getRealView().getTransectLayer().getSelectedIndex();
+//
+// if (pn==null)
+ pn=new PivShow3DTransectPanel(impl);
+ pn.setSelectedTransects(isels);
+//
+ pn.afficheModale(impl.getFrame(), PivResource.getS("Vue 3D du(des) transect(s)"),CtuluDialog.OK_OPTION);
+ }
+
+ @Override
+ public String getEnableCondition() {
+ return PivResource.getS("S\xE9lectionner au moins un transect");
+ }
+
+ @Override
+ public void selectionChanged(ZSelectionEvent _evt) {
+ boolean b=false;
+ BCalque cq=impl.get2dFrame().getVisuPanel().getCalqueActif();
+
+ if (cq==impl.get2dFrame().getVisuPanel().getRealView().getTransectLayer() &&
+ ((ZCalqueLigneBriseeEditable)cq).getLayerSelection() !=null &&
+ ((ZCalqueLigneBriseeEditable)cq).getLayerSelection().getNbSelectedIndex()>0) {
+ b=true;
+ }
+ super.setEnabled(b);
+ }
+}
Property changes on: trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/action/PivShow3DTransectAction.java
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <bma...@us...> - 2016-12-16 09:49:08
|
Revision: 9484
http://sourceforge.net/p/fudaa/svn/9484
Author: bmarchan
Date: 2016-12-16 09:49:05 +0000 (Fri, 16 Dec 2016)
Log Message:
-----------
Export de rapport de jaugeage (2ieme partie)
Modified Paths:
--------------
trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/PivExportGaugingReportFillValuesPanel.java
trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/PivShow3DTransectPanel.java
trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/action/PivExportGaugingReportAction.java
Added Paths:
-----------
trunk/soft/fudaa-lspiv/distrib/src/dist/templates/
trunk/soft/fudaa-lspiv/distrib/src/dist/templates/template_gauging_fr.xlsx
Added: trunk/soft/fudaa-lspiv/distrib/src/dist/templates/template_gauging_fr.xlsx
===================================================================
(Binary files differ)
Index: trunk/soft/fudaa-lspiv/distrib/src/dist/templates/template_gauging_fr.xlsx
===================================================================
--- trunk/soft/fudaa-lspiv/distrib/src/dist/templates/template_gauging_fr.xlsx 2016-12-13 14:39:50 UTC (rev 9483)
+++ trunk/soft/fudaa-lspiv/distrib/src/dist/templates/template_gauging_fr.xlsx 2016-12-16 09:49:05 UTC (rev 9484)
Property changes on: trunk/soft/fudaa-lspiv/distrib/src/dist/templates/template_gauging_fr.xlsx
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Modified: trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/PivExportGaugingReportFillValuesPanel.java
===================================================================
--- trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/PivExportGaugingReportFillValuesPanel.java 2016-12-13 14:39:50 UTC (rev 9483)
+++ trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/PivExportGaugingReportFillValuesPanel.java 2016-12-16 09:49:05 UTC (rev 9484)
@@ -26,7 +26,6 @@
import org.fudaa.fudaa.piv.action.PivExportGaugingReportAction;
import com.memoire.bu.BuVerticalLayout;
-import com.memoire.fu.FuLog;
/**
* Un panneau pour remplir les valeurs des cellules nomm\xE9es en vue d'exporter le rapport de jaugeage.
@@ -37,9 +36,9 @@
public class PivExportGaugingReportFillValuesPanel extends CtuluDialogPanel {
class ValuesTableModel extends AbstractTableModel {
- List<PivExportGaugingReportAction.CellExternalData> cells;
+ List<PivExportGaugingReportAction.UserCellData> cells;
- public ValuesTableModel(List<PivExportGaugingReportAction.CellExternalData> _cells) {
+ public ValuesTableModel(List<PivExportGaugingReportAction.UserCellData> _cells) {
cells=_cells;
}
@@ -59,7 +58,7 @@
return cells.get(rowIndex).description;
}
else {
- return cells.get(rowIndex).getValue();
+ return cells.get(rowIndex).getValue(0,0);
}
}
@@ -99,12 +98,12 @@
* Constructeur.
* @param _ui Le parent pour la boite de dialogue.
*/
- public PivExportGaugingReportFillValuesPanel(CtuluUI _ui, Collection<PivExportGaugingReportAction.CellExternalData> _cells) {
- ArrayList<PivExportGaugingReportAction.CellExternalData>cells=new ArrayList<>(_cells);
- cells.sort(new Comparator<PivExportGaugingReportAction.CellExternalData>() {
+ public PivExportGaugingReportFillValuesPanel(CtuluUI _ui, Collection<PivExportGaugingReportAction.UserCellData> _cells) {
+ ArrayList<PivExportGaugingReportAction.UserCellData>cells=new ArrayList<>(_cells);
+ cells.sort(new Comparator<PivExportGaugingReportAction.UserCellData>() {
@Override
- public int compare(PivExportGaugingReportAction.CellExternalData c1, PivExportGaugingReportAction.CellExternalData c2) {
+ public int compare(PivExportGaugingReportAction.UserCellData c1, PivExportGaugingReportAction.UserCellData c2) {
return c1.name.compareTo(c2.name);
}
});
@@ -130,58 +129,4 @@
add(pnValues,BorderLayout.CENTER);
}
-// @Override
-// public void setValue(Object _usedResults) {
-// if (!(_usedResults instanceof boolean[]))
-// throw new IllegalArgumentException("bad type parameter");
-// setSelectedResults((boolean[])_usedResults);
-// }
-//
-// @Override
-// public boolean[] getValue() {
-// return getSelectedResults();
-// }
-
- /**
- * D\xE9finit les resultats s\xE9lectionn\xE9s pour la moyenne.
- * @param _tool L'utilitaire
- */
-// public void setSelectedResults(boolean[] _usedResults) {
-// if (_usedResults==null) return;
-//
-// String[] values=new String[_usedResults.length];
-// for (int i=0; i<_usedResults.length; i++) {
-// values[i]=PivResource.getS("R\xE9sultat : {0}", (i+1));
-// }
-//
-// mdValues_.setData(values);
-//
-// for (int i=0; i<_usedResults.length; i++) {
-// if (_usedResults[i])
-// tbValues_.getTable().getSelectionModel().addSelectionInterval(i, i);
-// }
-//
-// }
-
-// /**
-// * @return Les r\xE9sultats selectionn\xE9s.
-// */
-// public boolean[] getSelectedResults() {
-// boolean[] idSels=new boolean[mdValues_.getRowCount()];
-// int[] sel=tbValues_.getTable().getSelectedRows();
-// for (int i : sel) {
-// idSels[i]=true;
-// }
-//
-// return idSels;
-// }
-
-// @Override
-// public boolean isDataValid() {
-// if (tbValues_.getTable().getSelectedRowCount()==0) {
-// setErrorText(PivResource.getS("Vous devez s\xE9lectionner 1 r\xE9sultat au moins pour la moyenne"));
-// return false;
-// }
-// return true;
-// }
}
Modified: trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/PivShow3DTransectPanel.java
===================================================================
--- trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/PivShow3DTransectPanel.java 2016-12-13 14:39:50 UTC (rev 9483)
+++ trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/PivShow3DTransectPanel.java 2016-12-16 09:49:05 UTC (rev 9484)
@@ -20,7 +20,7 @@
import org.fudaa.fudaa.piv.metier.PivTransect;
/**
- * Un panneau de saisie des param\xE8tres du transect pour le calcul des d\xE9bits.
+ * Un panneau d'affichage 3D des transects avec leurs vitesses calcul\xE9es.
*
* @author Bertrand Marchand (mar...@de...)
* @version $Id$
@@ -231,6 +231,10 @@
setHelpText(PivResource.getS("Clic gauche : Rotation de la vue\nCtrl+clic gauche : D\xE9placement de la vue\nShift+clic gauche : Zoom de la vue"));
}
+ public EG3dGraph get3dGraph() {
+ return pnGraph_;
+ }
+
public void setSelectedTransects(int... _isels) {
pnGraph_.removeAllDatas();
Modified: trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/action/PivExportGaugingReportAction.java
===================================================================
--- trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/action/PivExportGaugingReportAction.java 2016-12-13 14:39:50 UTC (rev 9483)
+++ trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/action/PivExportGaugingReportAction.java 2016-12-16 09:49:05 UTC (rev 9484)
@@ -8,22 +8,31 @@
package org.fudaa.fudaa.piv.action;
import java.awt.event.ActionEvent;
+import java.awt.image.BufferedImage;
+import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
+import java.io.IOException;
import java.util.HashMap;
+import javax.imageio.ImageIO;
import javax.swing.JFileChooser;
import javax.swing.JOptionPane;
import org.apache.poi.ss.usermodel.Cell;
+import org.apache.poi.ss.usermodel.ClientAnchor;
+import org.apache.poi.ss.usermodel.CreationHelper;
+import org.apache.poi.ss.usermodel.Drawing;
import org.apache.poi.ss.usermodel.Name;
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.ss.usermodel.Workbook;
import org.apache.poi.ss.util.AreaReference;
+import org.apache.poi.ss.util.CellRangeAddress;
import org.apache.poi.ss.util.CellReference;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
+import org.fudaa.ctulu.CtuluLibImage;
import org.fudaa.ctulu.CtuluLog;
import org.fudaa.ctulu.gui.CtuluFileChooser;
import org.fudaa.ebli.commun.EbliActionSimple;
@@ -31,9 +40,11 @@
import org.fudaa.fudaa.piv.PivImplementation;
import org.fudaa.fudaa.piv.PivPreferences;
import org.fudaa.fudaa.piv.PivResource;
+import org.fudaa.fudaa.piv.PivShow3DTransectPanel;
import org.fudaa.fudaa.piv.PivUtils;
import org.fudaa.fudaa.piv.io.PivExeLauncher;
import org.fudaa.fudaa.piv.metier.PivComputeParameters;
+import org.fudaa.fudaa.piv.metier.PivFlowResults;
import org.fudaa.fudaa.piv.metier.PivGlobalFlowResults;
import org.fudaa.fudaa.piv.metier.PivOrthoParameters;
import org.fudaa.fudaa.piv.metier.PivOrthoPoint;
@@ -51,18 +62,34 @@
*/
public class PivExportGaugingReportAction extends EbliActionSimple {
- static abstract class AbstractCellData {
- public AbstractCellData() {}
+ static interface AbstractCellData {
+ public abstract Object getValue(int _row, int _col);
- public abstract String getValue();
+ public abstract int getNbCols();
+
+ public abstract int getNbRows();
}
- public static class CellExternalData extends AbstractCellData {
+ static abstract class AbstractScalarCellData implements AbstractCellData {
+ public AbstractScalarCellData() {}
+
+ @Override
+ public int getNbCols() {
+ return 1;
+ }
+
+ @Override
+ public int getNbRows() {
+ return 1;
+ }
+ }
+
+ public static class UserCellData extends AbstractScalarCellData {
public String name;
public String value;
public String description;
- public CellExternalData(String _name, String _description) {
+ public UserCellData(String _name, String _description) {
super();
name = _name;
description=_description;
@@ -73,17 +100,27 @@
}
@Override
- public String getValue() {
+ public String getValue(int _row, int _col) {
return value;
}
}
+ /**
+ * Un data retournant une image.
+ * @author Bertrand Marchand (mar...@de...)
+ */
+ public abstract static class ImageCellData extends AbstractScalarCellData {
+ @Override
+ public abstract byte[] getValue(int _row, int _col);
+ }
+
PivImplementation impl;
// CtuluDialog diProgress_;
CtuluFileChooser fcReport_;
- /** Les variables inconnues du modele Excel. */
- HashMap<String,CellExternalData> hunknownVars=new HashMap<>();
- HashMap<String,AbstractCellData> dataTypes_ = new HashMap<>();
+ /** Les variables users (inconnues du systeme) du modele Excel. */
+ HashMap<String,UserCellData> userVars=new HashMap<>();
+ /** Toutes les variables correspondantes aux cellules nomm\xE9es. */
+ HashMap<String,AbstractCellData> dataVars_ = new HashMap<>();
/**
* Constructeur.
@@ -106,171 +143,175 @@
return;
}
+ try {
-// // Export des images, eventuellement dans un autre format.
-// CtuluTaskOperationGUI r=new CtuluTaskOperationGUI(impl, PivResource.getS("Export du rapport de jaugeage")) {
-//
-// @Override
-// public void act() {
- try {
-// this.setDesc(PivResource.getS("Export du rapport de jaugeage"));
-// this.setProgression(0);
-
- computeNeededDatas();
- initDataTypes();
+ computeNeededDatas();
+ initDataTypes();
- // Lecture des cellules du template.
- String templateDir=System.getProperty(PivPreferences.PIV_TEMPLATES_PATH,System.getProperty("user.dir")+"/templates");
- String templateName="template_gauging_"+BuPreferences.BU.getStringProperty("locale.language", System.getProperty("piv.lang", "fr"))+".xlsx";
+ String templateDir=System.getProperty(PivPreferences.PIV_TEMPLATES_PATH, System.getProperty("user.dir") + "/templates");
+ String templateName="template_gauging_" + BuPreferences.BU.getStringProperty("locale.language", System.getProperty("piv.lang", "fr")) + ".xlsx";
+
+ File ftemplate=new File(templateDir, templateName);
+ if (!ftemplate.exists()) {
+ impl.error(PivResource.getS("Erreur mod\xE8le"), PivResource.getS("Le mod\xE8le {0} n'existe pas", ftemplate));
+ }
+
+ Workbook wb=new XSSFWorkbook(new FileInputStream(ftemplate));
+ CreationHelper ch = wb.getCreationHelper();
+
+ // Le nombre de cellules nomm\xE9es
+ int nbnames=wb.getNumberOfNames();
+
+ // Recup\xE9ration depuis le template des variables utilisateurs.
+
+ for (int i=0; i < nbnames; i++) {
+ Name namedCell=wb.getNameAt(i);
+
+ String cellname=namedCell.getNameName();
+ FuLog.debug(cellname);
+
+ int ind;
+ if ((ind=cellname.indexOf('.')) != -1) {
+ cellname=cellname.substring(0, ind);
+ }
+
+ if (!dataVars_.containsKey(cellname)) {
+ String desc=namedCell.getComment();
+ if (desc == null || desc.isEmpty())
+ desc=cellname;
+
+ if (!userVars.containsKey(cellname))
+ userVars.put(cellname, new UserCellData(cellname, desc));
+ }
+ }
+
+ // Saisie des valeurs depuis la table des cellules nomm\xE9es utilisateur.
+
+ if (!userVars.isEmpty()) {
+ PivExportGaugingReportFillValuesPanel diValues=new PivExportGaugingReportFillValuesPanel(impl, userVars.values());
+ if (diValues.afficheModale(impl.getFrame(), PivResource.getS("A renseigner")) == JOptionPane.CANCEL_OPTION)
+ return;
+ }
+
+ dataVars_.putAll(userVars);
+
+ // Remplissage des cellules nomm\xE9es du template depuis les datas
+
+ HashMap<String, HashMap<String, CellRangeAddress>> rowCol2CellAdress=new HashMap<>();
+
+ for (int i=0; i < nbnames; i++) {
+ Name namedCell=wb.getNameAt(i);
+
+ String cellname=namedCell.getNameName();
+ int ind;
+ if ((ind=cellname.indexOf('.')) != -1) {
+ cellname=cellname.substring(0, ind);
+ }
+
+ // Recuperation la premiere cellule de la zone nomm\xE9e
+
+ AreaReference aref=new AreaReference(namedCell.getRefersToFormula());
+ // Generalement TOP/LEFT
+ CellReference crefTL=aref.getFirstCell();
+ // Generalement BOTTOM/RIGHT
+ CellReference crefBR=aref.getLastCell();
+ Sheet currentSheet=wb.getSheet(crefTL.getSheetName());
+ Drawing drawing = currentSheet.createDrawingPatriarch();
+
+ // Ces map servent a faire le lien entre des cellules et des cellules fusionn\xE9es. Utilis\xE9 pour les tableaux.
+ HashMap<String, CellRangeAddress> rc2CellAdress=rowCol2CellAdress.get(crefTL.getSheetName());
+ if (rc2CellAdress == null) {
+ rc2CellAdress=new HashMap<>();
+ for (int imr=0; imr < currentSheet.getNumMergedRegions(); imr++) {
+ CellRangeAddress cra=currentSheet.getMergedRegion(imr);
+ rc2CellAdress.put(cra.getFirstRow() + "_" + cra.getFirstColumn(), cra);
+ }
+
+ rowCol2CellAdress.put(crefTL.getSheetName(), rc2CellAdress);
+ }
+
+ int firstRow=crefTL.getRow();
+ int firstCol=crefTL.getCol();
+
+ // Ajoute toutes les valeurs de la variable dans les zones nomm\xE9es.
+
+ AbstractCellData cellWrapper=dataVars_.get(cellname);
+
+ // Une donn\xE9e de type image.
+ if (cellWrapper instanceof ImageCellData) {
+ ImageCellData imgWrapper = (ImageCellData)cellWrapper;
+ byte[] bytes=imgWrapper.getValue(0, 0);
- File ftemplate = new File(templateDir, templateName);
- if (!ftemplate.exists()) {
- impl.error(PivResource.getS("Erreur mod\xE8le"), PivResource.getS("Le mod\xE8le {0} n'existe pas",ftemplate));
+ if (bytes==null) {
+ Row r=currentSheet.getRow(firstRow);
+ Cell c=r.getCell(firstCol);
+ c.setCellValue("**No data**");
}
-
- Workbook wb = new XSSFWorkbook(new FileInputStream(ftemplate));
+ else {
+ int ipict=wb.addPicture(bytes, Workbook.PICTURE_TYPE_PNG);
+ ClientAnchor anchor=ch.createClientAnchor();
+ anchor.setRow1(firstRow);
+ anchor.setCol1(firstCol);
+ anchor.setRow2(crefBR.getRow() + 1);
+ anchor.setCol2(crefBR.getCol() + 1);
- try {
- int nbnames=wb.getNumberOfNames();
-
- // Recup\xE9ration des cellules nomm\xE9es non connues
- for (int i=0; i < nbnames; i++) {
- Name namedCell=wb.getNameAt(i);
-
- String cellname = namedCell.getNameName();
- FuLog.debug(cellname);
- int ind;
- if ((ind=cellname.indexOf('.'))!=-1) {
- cellname=cellname.substring(0, ind);
+ drawing.createPicture(anchor, ipict);
+ }
+ }
+
+ // Une donn\xE9e de type valeur.
+ else {
+ int currentRow=firstRow;
+ for (int irow=0; irow < cellWrapper.getNbRows(); irow++) {
+ int currentCol=firstCol;
+ for (int icol=0; icol < cellWrapper.getNbCols(); icol++) {
+ Row r=currentSheet.getRow(currentRow);
+ Cell c=r.getCell(currentCol);
+ if (c != null) {
+ Object val=cellWrapper.getValue(irow, icol);
+ c.setCellValue(val == null ? "-" : val.toString());
}
-
- if (!dataTypes_.containsKey(cellname)) {
- String desc = namedCell.getComment();
- if (desc==null || desc.isEmpty())
- desc = cellname;
-
- CellExternalData val=new CellExternalData(cellname, desc);
- if (!hunknownVars.containsKey(cellname))
- hunknownVars.put(cellname,new CellExternalData(cellname, desc));
+ CellRangeAddress cra=rc2CellAdress.get(currentRow + "_" + currentCol);
+ if (cra == null) {
+ currentCol++;
}
+ else {
+ currentCol+=cra.getLastColumn() - cra.getFirstColumn() + 1;
+ }
}
-
- // Saisie des valeurs depuis la table des valeurs.
- if (!hunknownVars.isEmpty()) {
- PivExportGaugingReportFillValuesPanel diValues=new PivExportGaugingReportFillValuesPanel(impl, hunknownVars.values());
- if (diValues.afficheModale(impl.getFrame(),PivResource.getS("A renseigner"))==JOptionPane.CANCEL_OPTION)
- return;
+ CellRangeAddress cra=rc2CellAdress.get(currentRow + "_" + firstCol);
+ if (cra == null) {
+ currentRow++;
}
-
- dataTypes_.putAll(hunknownVars);
-
- for (int i=0; i < nbnames; i++) {
- Name namedCell=wb.getNameAt(i);
-
- String cellname = namedCell.getNameName();
- int ind;
- if ((ind=cellname.indexOf('.'))!=-1) {
- cellname=cellname.substring(0, ind);
- }
-
- // retrieve the cell at the named range and test its contents
- AreaReference aref=new AreaReference(namedCell.getRefersToFormula());
- CellReference[] crefs=aref.getAllReferencedCells();
- for (int icell=0; icell < crefs.length; icell++) {
- Sheet s=wb.getSheet(crefs[icell].getSheetName());
- Row r=s.getRow(crefs[icell].getRow());
- Cell c=r.getCell(crefs[icell].getCol());
- if (c != null) {
- if (dataTypes_.containsKey(cellname)) {
- c.setCellValue(dataTypes_.get(cellname).getValue());
- }
- else {
- c.setCellValue("#####");
- }
- }
- else {
- FuLog.debug("Null cell");
- }
- }
+ else {
+ currentRow+=cra.getLastRow() - cra.getFirstRow() + 1;
}
}
- finally {
- }
-
- // Ecriture du fichier final
- if (fcReport_==null)
- fcReport_ = new CtuluFileChooser(true);
- fcReport_.setAcceptAllFileFilterUsed(true);
- fcReport_.setFileFilter(PivUtils.FILE_FLT_XLSX);
- fcReport_.setMultiSelectionEnabled(false);
- fcReport_.setDialogTitle(PivResource.getS("Ficher Excel d'export"));
- if (fcReport_.showSaveDialog(impl.getFrame()) == JFileChooser.CANCEL_OPTION) {
- return;
- }
-
- wb.write(new FileOutputStream(fcReport_.getSelectedFile()));
-
-
-// readPdfDatas();
-
-// InputStream is=PivResource.class.getResourceAsStream("template_jaugeage_vide.pdf");
-// PdfDocument pdfdoc = new PdfDocument(new PdfReader("C:\\projets\\fudaa\\documents\\contrats\\2016_lspiv-1.5_DTG-IRSTEA\\fournitures\\formulaire_lo.pdf"), new PdfWriter("C:\\projets\\fudaa\\documents\\contrats\\2016_lspiv-1.5_DTG-IRSTEA\\fournitures\\\\out.pdf"));
-//
-// PdfAcroForm form = PdfAcroForm.getAcroForm(pdfdoc, false);
-// Map<String, PdfFormField> fields = form.getFormFields();
-// fields.get("Texte2").setValue("Essai");
-// form.flattenFields();
-
-// for (int ipage=0; ipage < pdfdoc.getNumberOfPages(); ipage++) {
-// PdfCanvas pdfcanvas=new PdfCanvas(pdfdoc, ipage+1);
-// Canvas canvas=new Canvas(pdfcanvas, pdfdoc, pdfdoc.getPage(ipage+1).getPageSize());
-// canvas.setFontSize(10);;
-//
-// for (AbstractPdfData data : getPdfDatas(ipage + 1)) {
-// canvas.showTextAligned(data.getValue(), data.posX, data.posY, TextAlignment.LEFT);
-// }
-// canvas.close();
-// }
-// pdfdoc.close();
-// Document doc = new Document(pdfdoc);
-// doc.setFixedPosition(0, 0, 200);
-// doc.add(new Paragraph("Hello"));
-// doc.close();
-
-// if (this.isStopRequested())
-// return;
}
- catch (Exception e) {
- e.printStackTrace();
- }
-// finally {
-// diProgress_.dispose();
-// }
-// }
-// };
+ }
-// PivProgressionPanel pnProgress_=new PivProgressionPanel(r);
-// diProgress_ = pnProgress_.createDialog(impl.getParentComponent());
-// diProgress_.setOption(CtuluDialog.ZERO_OPTION);
-// diProgress_.setDefaultCloseOperation(CtuluDialog.DO_NOTHING_ON_CLOSE);
-// diProgress_.setTitle(r.getName());
-//
-// r.start();
-// diProgress_.afficheDialogModal();
+ // Ecriture du fichier final
+
+ if (fcReport_ == null)
+ fcReport_=new CtuluFileChooser(true);
+ fcReport_.setAcceptAllFileFilterUsed(true);
+ fcReport_.setFileFilter(PivUtils.FILE_FLT_XLSX);
+ fcReport_.setMultiSelectionEnabled(false);
+ fcReport_.setDialogTitle(PivResource.getS("Ficher Excel d'export"));
+ if (fcReport_.showSaveDialog(impl.getFrame()) == JFileChooser.CANCEL_OPTION) {
+ return;
+ }
+
+ wb.write(new FileOutputStream(fcReport_.getSelectedFile()));
+ }
+ catch (Exception e) {
+ e.printStackTrace();
+ }
}
-
-// public List<AbstractCellData> getPdfDatas(int _pageNumber) {
-// List<AbstractCellData> ret = new ArrayList<>();
-//
-// for (AbstractCellData data : datas_) {
-// if (data.pageNumber==_pageNumber) {
-// ret.add(data);
-// }
-// }
-//
-// return ret;
-// }
+ /**
+ * Calcule les donn\xE9es non stock\xE9es dans le projet, necessaires \xE0 la r\xE9alisation du template.
+ */
protected void computeNeededDatas() {
// Calcul des erreurs
if (impl.getCurrentProject().getOrthoPoints() != null) {
@@ -290,42 +331,47 @@
}
public void initDataTypes() {
- dataTypes_.clear();
+ dataVars_.clear();
final PivTransect[] transects=impl.getCurrentProject().getTransects();
final PivComputeParameters pivParams = impl.getCurrentProject().getComputeParameters();
- final PivGlobalFlowResults flowResults = new PivGlobalFlowResults(impl.getCurrentProject().getFlowResults());
+ final PivFlowResults[] flowResults = impl.getCurrentProject().getFlowResults();
final PivOrthoPoint[] orthoPoints = impl.getCurrentProject().getOrthoPoints();
final PivOrthoParameters orthoParams = impl.getCurrentProject().getOrthoParameters();
- dataTypes_.put("__COEF_VITESSE",new AbstractCellData() {
+ final PivGlobalFlowResults globRes = new PivGlobalFlowResults(flowResults);
+ final Double meanDisch=globRes.getAverageScalarResult(ResultType.DISCHARGE);
+ final Double meanArea=globRes.getAverageScalarResult(ResultType.WETTED_AREA);
+ final Double meanMeanV=globRes.getAverageScalarResult(ResultType.MEAN_VELOCITY);
+
+ dataVars_.put("__COEF_VITESSE",new AbstractScalarCellData() {
@Override
- public String getValue() {
+ public String getValue(int _row, int _col) {
// On prend le coef de vitesse du premier transect, s'il existe
return (transects==null || transects.length==0) ? null:""+transects[0].getParams().getSurfaceCoef();
}
});
- dataTypes_.put("__CORREL_MAX",new AbstractCellData() {
+ dataVars_.put("__CORREL_MAX",new AbstractScalarCellData() {
@Override
- public String getValue() {
+ public String getValue(int _row, int _col) {
return pivParams==null ? null:""+pivParams.getMaxCorrelation();
}
});
- dataTypes_.put("__CORREL_MIN",new AbstractCellData() {
+ dataVars_.put("__CORREL_MIN",new AbstractScalarCellData() {
@Override
- public String getValue() {
+ public String getValue(int _row, int _col) {
return pivParams==null ? null:""+pivParams.getMinCorrelation();
}
});
- dataTypes_.put("__DEBIT_MOYEN",new AbstractCellData() {
+ dataVars_.put("__DEBIT_MOYEN",new AbstractScalarCellData() {
@Override
- public String getValue() {
- return flowResults.getAverageScalarResult(ResultType.DISCHARGE)==null ? null:flowResults.getAverageScalarResult(ResultType.DISCHARGE)+" m\xB3/s";
+ public String getValue(int _row, int _col) {
+ return meanDisch==null ? null:meanDisch+" m\xB3/s";
}
});
- dataTypes_.put("__ERREUR_MAX",new AbstractCellData() {
+ dataVars_.put("__ERREUR_MAX",new AbstractScalarCellData() {
@Override
- public String getValue() {
+ public String getValue(int _row, int _col) {
if (orthoPoints==null)
return null;
@@ -336,84 +382,126 @@
return maxi+" m";
}
});
- dataTypes_.put("__HAUTEUR",new AbstractCellData() {
+ dataVars_.put("__HAUTEUR",new AbstractScalarCellData() {
@Override
- public String getValue() {
+ public String getValue(int _row, int _col) {
return orthoParams==null ? null:orthoParams.getWaterElevation()+" m";
}
});
- dataTypes_.put("__IA_M",new AbstractCellData() {
+ dataVars_.put("__IA_M",new AbstractScalarCellData() {
@Override
- public String getValue() {
+ public String getValue(int _row, int _col) {
return (pivParams==null || orthoParams==null) ? null:(pivParams.getIASize()*orthoParams.getResolution())+" m";
}
});
- dataTypes_.put("__IA_PIX",new AbstractCellData() {
+ dataVars_.put("__IA_PIX",new AbstractScalarCellData() {
@Override
- public String getValue() {
+ public String getValue(int _row, int _col) {
return pivParams==null ? null:pivParams.getIASize()+" pix";
}
});
- dataTypes_.put("__INTERTEMPS",new AbstractCellData() {
+ dataVars_.put("__INTERTEMPS",new AbstractScalarCellData() {
@Override
- public String getValue() {
+ public String getValue(int _row, int _col) {
return pivParams==null ? null:pivParams.getTimeInterval()+" s";
}
});
- dataTypes_.put("__NOMBRE_GRPS", new AbstractCellData() {
+ dataVars_.put("__NOMBRE_GRPS", new AbstractScalarCellData() {
@Override
- public String getValue() {
+ public String getValue(int _row, int _col) {
return orthoPoints==null ? null:orthoPoints.length+"";
}
});
- dataTypes_.put("__NOMBRE_IMAGES", new AbstractCellData() {
+ dataVars_.put("__NOMBRE_IMAGES", new AbstractScalarCellData() {
@Override
- public String getValue() {
+ public String getValue(int _row, int _col) {
return ""+impl.getCurrentProject().getSrcImageFiles().length;
}
});
- dataTypes_.put("__NOMBRE_TRANSECTS", new AbstractCellData() {
+ dataVars_.put("__NOMBRE_TRANSECTS", new AbstractScalarCellData() {
@Override
- public String getValue() {
+ public String getValue(int _row, int _col) {
return transects==null ? null:transects.length+"";
}
});
- dataTypes_.put("__NORME_MAX", new AbstractCellData() {
+ dataVars_.put("__NORME_MAX", new AbstractScalarCellData() {
@Override
- public String getValue() {
+ public String getValue(int _row, int _col) {
return pivParams==null ? null:pivParams.getSmax()+" m/s";
}
});
- dataTypes_.put("__NORME_MIN", new AbstractCellData() {
+ dataVars_.put("__NORME_MIN", new AbstractScalarCellData() {
@Override
- public String getValue() {
+ public String getValue(int _row, int _col) {
return pivParams==null ? null:pivParams.getSmin()+" m/s";
}
});
- dataTypes_.put("__PAS_INTERPOLATION", new AbstractCellData() {
+ dataVars_.put("__PAS_INTERPOLATION", new AbstractScalarCellData() {
@Override
- public String getValue() {
+ public String getValue(int _row, int _col) {
// On prend le pas du premier transect, s'il existe
return (transects==null || transects.length==0) ? null:transec...
[truncated message content] |
|
From: <bma...@us...> - 2016-12-16 16:04:07
|
Revision: 9485
http://sourceforge.net/p/fudaa/svn/9485
Author: bmarchan
Date: 2016-12-16 16:04:05 +0000 (Fri, 16 Dec 2016)
Log Message:
-----------
Ajout des variables systeme __VERSION_APPLICATION + __NOM_PROJET
Modified Paths:
--------------
trunk/soft/fudaa-lspiv/distrib/src/dist/templates/template_gauging_fr.xlsx
trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/PivExportGaugingReportFillValuesPanel.java
trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/PivImplementation.java
trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/action/PivExportGaugingReportAction.java
Modified: trunk/soft/fudaa-lspiv/distrib/src/dist/templates/template_gauging_fr.xlsx
===================================================================
(Binary files differ)
Modified: trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/PivExportGaugingReportFillValuesPanel.java
===================================================================
--- trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/PivExportGaugingReportFillValuesPanel.java 2016-12-16 09:49:05 UTC (rev 9484)
+++ trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/PivExportGaugingReportFillValuesPanel.java 2016-12-16 16:04:05 UTC (rev 9485)
@@ -13,6 +13,7 @@
import java.util.Collection;
import java.util.Comparator;
import java.util.List;
+import java.util.Set;
import javax.swing.BorderFactory;
import javax.swing.JLabel;
@@ -98,9 +99,9 @@
* Constructeur.
* @param _ui Le parent pour la boite de dialogue.
*/
- public PivExportGaugingReportFillValuesPanel(CtuluUI _ui, Collection<PivExportGaugingReportAction.UserCellData> _cells) {
- ArrayList<PivExportGaugingReportAction.UserCellData>cells=new ArrayList<>(_cells);
- cells.sort(new Comparator<PivExportGaugingReportAction.UserCellData>() {
+ public PivExportGaugingReportFillValuesPanel(CtuluUI _ui, Collection<PivExportGaugingReportAction.UserCellData> _userVars, Set<String> _systemVars) {
+ ArrayList<PivExportGaugingReportAction.UserCellData> userVars=new ArrayList<>(_userVars);
+ userVars.sort(new Comparator<PivExportGaugingReportAction.UserCellData>() {
@Override
public int compare(PivExportGaugingReportAction.UserCellData c1, PivExportGaugingReportAction.UserCellData c2) {
@@ -108,9 +109,17 @@
}
});
- setHelpText(PivResource.getS("Les champs de la table sont issus des cases nomm\xE9s du mod\xE8le Excel de rapport\net doivent \xEAtre saisis manuellement"));
+ ArrayList<String> systemVars=new ArrayList<>(_systemVars);
+ systemVars.sort(null);
- mdValues_=new ValuesTableModel(cells);
+ StringBuilder sb=new StringBuilder();
+ sb.append(PivResource.getS("Les champs de la table sont les zones nomm\xE9es inconnues du syst\xE8me,\nissues du mod\xE8le Excel de rapport. Les zones nomm\xE9es connues sont :\n\n"));
+ for (String s : systemVars) {
+ sb.append(s).append("\n");
+ }
+ setHelpText(sb.toString());
+
+ mdValues_=new ValuesTableModel(userVars);
tbValues_=new JTable(mdValues_);
JScrollPane sp=new JScrollPane(tbValues_);
Modified: trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/PivImplementation.java
===================================================================
--- trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/PivImplementation.java 2016-12-16 09:49:05 UTC (rev 9484)
+++ trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/PivImplementation.java 2016-12-16 16:04:05 UTC (rev 9485)
@@ -143,6 +143,13 @@
public PivProject getCurrentProject() {
return project;
}
+
+ /**
+ * @return Retourne le nom courant du projet, ou null si le projet n'a pas \xE9t\xE9 sauvegard\xE9.
+ */
+ public File getCurrentProjectFile() {
+ return prjFile;
+ }
/**
* Appel\xE9e quand le projet courant est modifi\xE9.
Modified: trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/action/PivExportGaugingReportAction.java
===================================================================
--- trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/action/PivExportGaugingReportAction.java 2016-12-16 09:49:05 UTC (rev 9484)
+++ trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/action/PivExportGaugingReportAction.java 2016-12-16 16:04:05 UTC (rev 9485)
@@ -42,6 +42,7 @@
import org.fudaa.fudaa.piv.PivResource;
import org.fudaa.fudaa.piv.PivShow3DTransectPanel;
import org.fudaa.fudaa.piv.PivUtils;
+import org.fudaa.fudaa.piv.PivVisuPanel;
import org.fudaa.fudaa.piv.io.PivExeLauncher;
import org.fudaa.fudaa.piv.metier.PivComputeParameters;
import org.fudaa.fudaa.piv.metier.PivFlowResults;
@@ -62,7 +63,7 @@
*/
public class PivExportGaugingReportAction extends EbliActionSimple {
- static interface AbstractCellData {
+ public static interface AbstractCellData {
public abstract Object getValue(int _row, int _col);
public abstract int getNbCols();
@@ -70,7 +71,7 @@
public abstract int getNbRows();
}
- static abstract class AbstractScalarCellData implements AbstractCellData {
+ public static abstract class AbstractScalarCellData implements AbstractCellData {
public AbstractScalarCellData() {}
@Override
@@ -119,15 +120,13 @@
CtuluFileChooser fcReport_;
/** Les variables users (inconnues du systeme) du modele Excel. */
HashMap<String,UserCellData> userVars=new HashMap<>();
- /** Toutes les variables correspondantes aux cellules nomm\xE9es. */
- HashMap<String,AbstractCellData> dataVars_ = new HashMap<>();
/**
* Constructeur.
* @param _impl L'implementation.
*/
public PivExportGaugingReportAction(PivImplementation _impl) {
- super(PivResource.getS("Export du rapport de jaugeage..."), null, "EXPORT_GAUGING_REPORT");
+ super(PivResource.getS("Exporter le rapport de jaugeage..."), null, "EXPORT_GAUGING_REPORT");
impl=_impl;
setEnabled(false);
@@ -146,7 +145,7 @@
try {
computeNeededDatas();
- initDataTypes();
+ HashMap<String, AbstractCellData> systemDatas=defineSystemVariables();
String templateDir=System.getProperty(PivPreferences.PIV_TEMPLATES_PATH, System.getProperty("user.dir") + "/templates");
String templateName="template_gauging_" + BuPreferences.BU.getStringProperty("locale.language", System.getProperty("piv.lang", "fr")) + ".xlsx";
@@ -154,6 +153,7 @@
File ftemplate=new File(templateDir, templateName);
if (!ftemplate.exists()) {
impl.error(PivResource.getS("Erreur mod\xE8le"), PivResource.getS("Le mod\xE8le {0} n'existe pas", ftemplate));
+ return;
}
Workbook wb=new XSSFWorkbook(new FileInputStream(ftemplate));
@@ -175,7 +175,7 @@
cellname=cellname.substring(0, ind);
}
- if (!dataVars_.containsKey(cellname)) {
+ if (!systemDatas.containsKey(cellname)) {
String desc=namedCell.getComment();
if (desc == null || desc.isEmpty())
desc=cellname;
@@ -188,12 +188,14 @@
// Saisie des valeurs depuis la table des cellules nomm\xE9es utilisateur.
if (!userVars.isEmpty()) {
- PivExportGaugingReportFillValuesPanel diValues=new PivExportGaugingReportFillValuesPanel(impl, userVars.values());
+ PivExportGaugingReportFillValuesPanel diValues=new PivExportGaugingReportFillValuesPanel(impl, userVars.values(), systemDatas.keySet());
if (diValues.afficheModale(impl.getFrame(), PivResource.getS("A renseigner")) == JOptionPane.CANCEL_OPTION)
return;
}
- dataVars_.putAll(userVars);
+ HashMap<String,AbstractCellData> allVars = new HashMap<>();
+ allVars.putAll(systemDatas);
+ allVars.putAll(userVars);
// Remplissage des cellules nomm\xE9es du template depuis les datas
@@ -235,7 +237,7 @@
// Ajoute toutes les valeurs de la variable dans les zones nomm\xE9es.
- AbstractCellData cellWrapper=dataVars_.get(cellname);
+ AbstractCellData cellWrapper=allVars.get(cellname);
// Une donn\xE9e de type image.
if (cellWrapper instanceof ImageCellData) {
@@ -245,7 +247,7 @@
if (bytes==null) {
Row r=currentSheet.getRow(firstRow);
Cell c=r.getCell(firstCol);
- c.setCellValue("**No data**");
+ c.setCellValue("-");
}
else {
int ipict=wb.addPicture(bytes, Workbook.PICTURE_TYPE_PNG);
@@ -330,8 +332,11 @@
}
}
- public void initDataTypes() {
- dataVars_.clear();
+ /**
+ * Definit les varaibles connues du systeme.
+ */
+ public HashMap<String, AbstractCellData> defineSystemVariables() {
+ HashMap<String, AbstractCellData> systemVars_=new HashMap<>();
final PivTransect[] transects=impl.getCurrentProject().getTransects();
final PivComputeParameters pivParams = impl.getCurrentProject().getComputeParameters();
@@ -344,32 +349,35 @@
final Double meanArea=globRes.getAverageScalarResult(ResultType.WETTED_AREA);
final Double meanMeanV=globRes.getAverageScalarResult(ResultType.MEAN_VELOCITY);
- dataVars_.put("__COEF_VITESSE",new AbstractScalarCellData() {
+ final HashMap<String,Object> imgOptions = new HashMap<>();
+ imgOptions.put(CtuluLibImage.PARAMS_FILL_BACKGROUND_BOOLEAN, Boolean.FALSE);
+
+ systemVars_.put("__COEF_VITESSE",new AbstractScalarCellData() {
@Override
public String getValue(int _row, int _col) {
// On prend le coef de vitesse du premier transect, s'il existe
return (transects==null || transects.length==0) ? null:""+transects[0].getParams().getSurfaceCoef();
}
});
- dataVars_.put("__CORREL_MAX",new AbstractScalarCellData() {
+ systemVars_.put("__CORREL_MAX",new AbstractScalarCellData() {
@Override
public String getValue(int _row, int _col) {
return pivParams==null ? null:""+pivParams.getMaxCorrelation();
}
});
- dataVars_.put("__CORREL_MIN",new AbstractScalarCellData() {
+ systemVars_.put("__CORREL_MIN",new AbstractScalarCellData() {
@Override
public String getValue(int _row, int _col) {
return pivParams==null ? null:""+pivParams.getMinCorrelation();
}
});
- dataVars_.put("__DEBIT_MOYEN",new AbstractScalarCellData() {
+ systemVars_.put("__DEBIT_MOYEN",new AbstractScalarCellData() {
@Override
public String getValue(int _row, int _col) {
return meanDisch==null ? null:meanDisch+" m\xB3/s";
}
});
- dataVars_.put("__ERREUR_MAX",new AbstractScalarCellData() {
+ systemVars_.put("__ERREUR_MAX",new AbstractScalarCellData() {
@Override
public String getValue(int _row, int _col) {
if (orthoPoints==null)
@@ -382,82 +390,88 @@
return maxi+" m";
}
});
- dataVars_.put("__HAUTEUR",new AbstractScalarCellData() {
+ systemVars_.put("__HAUTEUR",new AbstractScalarCellData() {
@Override
public String getValue(int _row, int _col) {
return orthoParams==null ? null:orthoParams.getWaterElevation()+" m";
}
});
- dataVars_.put("__IA_M",new AbstractScalarCellData() {
+ systemVars_.put("__IA_M",new AbstractScalarCellData() {
@Override
public String getValue(int _row, int _col) {
return (pivParams==null || orthoParams==null) ? null:(pivParams.getIASize()*orthoParams.getResolution())+" m";
}
});
- dataVars_.put("__IA_PIX",new AbstractScalarCellData() {
+ systemVars_.put("__IA_PIX",new AbstractScalarCellData() {
@Override
public String getValue(int _row, int _col) {
return pivParams==null ? null:pivParams.getIASize()+" pix";
}
});
- dataVars_.put("__INTERTEMPS",new AbstractScalarCellData() {
+ systemVars_.put("__INTERTEMPS",new AbstractScalarCellData() {
@Override
public String getValue(int _row, int _col) {
return pivParams==null ? null:pivParams.getTimeInterval()+" s";
}
});
- dataVars_.put("__NOMBRE_GRPS", new AbstractScalarCellData() {
+ systemVars_.put("__NOM_PROJET",new AbstractScalarCellData() {
@Override
public String getValue(int _row, int _col) {
+ return impl.getCurrentProjectFile()==null ? null:impl.getCurrentProjectFile().getName();
+ }
+ });
+ systemVars_.put("__NOMBRE_GRPS", new AbstractScalarCellData() {
+ @Override
+ public String getValue(int _row, int _col) {
return orthoPoints==null ? null:orthoPoints.length+"";
}
});
- dataVars_.put("__NOMBRE_IMAGES", new AbstractScalarCellData() {
+ systemVars_.put("__NOMBRE_IMAGES", new AbstractScalarCellData() {
@Override
public String getValue(int _row, int _col) {
return ""+impl.getCurrentProject().getSrcImageFiles().length;
}
});
- dataVars_.put("__NOMBRE_TRANSECTS", new AbstractScalarCellData() {
+ systemVars_.put("__NOMBRE_TRANSECTS", new AbstractScalarCellData() {
@Override
public String getValue(int _row, int _col) {
return transects==null ? null:transects.length+"";
}
});
- dataVars_.put("__NORME_MAX", new AbstractScalarCellData() {
+ systemVars_.put("__NORME_MAX", new AbstractScalarCellData() {
@Override
public String getValue(int _row, int _col) {
return pivParams==null ? null:pivParams.getSmax()+" m/s";
}
});
- dataVars_.put("__NORME_MIN", new AbstractScalarCellData() {
+ systemVars_.put("__NORME_MIN", new AbstractScalarCellData() {
@Override
public String getValue(int _row, int _col) {
return pivParams==null ? null:pivParams.getSmin()+" m/s";
}
});
- dataVars_.put("__PAS_INTERPOLATION", new AbstractScalarCellData() {
+ systemVars_.put("__PAS_INTERPOLATION", new AbstractScalarCellData() {
@Override
public String getValue(int _row, int _col) {
// On prend le pas du premier transect, s'il existe
return (transects==null || transects.length==0) ? null:transects[0].getParams().getInterpolationStep()+" m";
}
});
- dataVars_.put("__RAYON_RECHERCHE", new AbstractScalarCellData() {
+ systemVars_.put("__RAYON_RECHERCHE", new AbstractScalarCellData() {
@Override
public String getValue(int _row, int _col) {
// On prend le rayon du premier transect, s'il existe
return (transects==null || transects.length==0) ? null:transects[0].getParams().getRadius()+" m";
}
});
- dataVars_.put("__RESOLUTION", new AbstractScalarCellData() {
+ systemVars_.put("__RESOLUTION", new AbstractScalarCellData() {
@Override
public String getValue(int _row, int _col) {
// On prend le rayon du premier transect, s'il existe
return orthoParams==null ? null:orthoParams.getResolution()+" m/pix";
}
});
- dataVars_.put("__RESULTATS", new AbstractCellData() {
+ systemVars_.put("__RESULTATS", new AbstractCellData() {
@Override
public String getValue(int _row, int _col) {
if (flowResults==null)
@@ -499,7 +513,7 @@
return transects==null ? 0 : transects.length;
}
});
- dataVars_.put("__SIM_MS", new AbstractScalarCellData() {
+ systemVars_.put("__SIM_MS", new AbstractScalarCellData() {
@Override
public String getValue(int _row, int _col) {
if (orthoParams!=null && pivParams!=null) {
@@ -516,13 +530,13 @@
return null;
}
});
- dataVars_.put("__SIM_PIX", new AbstractScalarCellData() {
+ systemVars_.put("__SIM_PIX", new AbstractScalarCellData() {
@Override
public String getValue(int _row, int _col) {
return pivParams==null ? null:pivParams.getSim()+" pix";
}
});
- dataVars_.put("__SIP_MS", new AbstractScalarCellData() {
+ systemVars_.put("__SIP_MS", new AbstractScalarCellData() {
@Override
public String getValue(int _row, int _col) {
if (orthoParams!=null && pivParams!=null) {
@@ -539,13 +553,13 @@
return null;
}
});
- dataVars_.put("__SIP_PIX", new AbstractScalarCellData() {
+ systemVars_.put("__SIP_PIX", new AbstractScalarCellData() {
@Override
public String getValue(int _row, int _col) {
return pivParams==null ? null:pivParams.getSip()+" pix";
}
});
- dataVars_.put("__SJM_MS", new AbstractScalarCellData() {
+ systemVars_.put("__SJM_MS", new AbstractScalarCellData() {
@Override
public String getValue(int _row, int _col) {
if (orthoParams!=null && pivParams!=null) {
@@ -562,13 +576,13 @@
return null;
}
});
- dataVars_.put("__SJM_PIX", new AbstractScalarCellData() {
+ systemVars_.put("__SJM_PIX", new AbstractScalarCellData() {
@Override
public String getValue(int _row, int _col) {
return pivParams==null ? null:pivParams.getSjm()+" pix";
}
});
- dataVars_.put("__SJP_MS", new AbstractScalarCellData() {
+ systemVars_.put("__SJP_MS", new AbstractScalarCellData() {
@Override
public String getValue(int _row, int _col) {
if (orthoParams!=null && pivParams!=null) {
@@ -585,100 +599,111 @@
return null;
}
});
- dataVars_.put("__SJP_PIX", new AbstractScalarCellData() {
+ systemVars_.put("__SJP_PIX", new AbstractScalarCellData() {
@Override
public String getValue(int _row, int _col) {
return pivParams==null ? null:pivParams.getSjp()+" pix";
}
});
- dataVars_.put("__VX_MAX", new AbstractScalarCellData() {
+ systemVars_.put("__VERSION_APPLICATION",new AbstractScalarCellData() {
@Override
public String getValue(int _row, int _col) {
+ return impl.getInformationsSoftware().version;
+ }
+ });
+ systemVars_.put("__VUE_2D", new ImageCellData() {
+
+ @Override
+ public byte[] getValue(int _row, int _col) {
+ impl.get2dFrame().getVisuPanel().setViewMode(PivVisuPanel.MODE_REAL_VIEW);
+ BufferedImage img=impl.get2dFrame().getVisuPanel().produceImage(imgOptions);
+ ByteArrayOutputStream bos = new ByteArrayOutputStream();
+ try {
+ ImageIO.write(img, "png", bos);
+ return bos.toByteArray();
+ }
+ catch (IOException e) {
+ return null;
+ }
+ }
+ });
+ systemVars_.put("__VUE_3D", new ImageCellData() {
+
+ @Override
+ public byte[] getValue(int _row, int _col) {
+
+ PivShow3DTransectPanel pn=new PivShow3DTransectPanel(impl);
+
+ if (transects != null && transects.length != 0) {
+ int[] isels=new int[transects.length];
+ for (int i=0; i < transects.length; i++) {
+ isels[i]=i;
+ }
+ pn.setSelectedTransects(isels);
+ }
+
+ pn.get3dGraph().setSize(500, 500);
+ BufferedImage img=CtuluLibImage.produceImageForComponent(pn.get3dGraph(),imgOptions);
+ ByteArrayOutputStream bos = new ByteArrayOutputStream();
+ try {
+ ImageIO.write(img, "png", bos);
+ return bos.toByteArray();
+ }
+ catch (IOException e) {
+ return null;
+ }
+ }
+ });
+ systemVars_.put("__VX_MAX", new AbstractScalarCellData() {
+ @Override
+ public String getValue(int _row, int _col) {
return pivParams==null ? null:pivParams.getVxmax()+" m/s";
}
});
- dataVars_.put("__VX_MIN", new AbstractScalarCellData() {
+ systemVars_.put("__VX_MIN", new AbstractScalarCellData() {
@Override
public String getValue(int _row, int _col) {
return pivParams==null ? null:pivParams.getVxmin()+" m/s";
}
});
- dataVars_.put("__VY_MAX", new AbstractScalarCellData() {
+ systemVars_.put("__VY_MAX", new AbstractScalarCellData() {
@Override
public String getValue(int _row, int _col) {
return pivParams==null ? null:pivParams.getVymax()+" m/s";
}
});
- dataVars_.put("__VY_MIN", new AbstractScalarCellData() {
+ systemVars_.put("__VY_MIN", new AbstractScalarCellData() {
@Override
public String getValue(int _row, int _col) {
return pivParams==null ? null:pivParams.getVymin()+" m/s";
}
});
- dataVars_.put("__X_MAX", new AbstractScalarCellData() {
+ systemVars_.put("__X_MAX", new AbstractScalarCellData() {
@Override
public String getValue(int _row, int _col) {
return orthoParams==null ? null:orthoParams.getXmax()+" m";
}
});
- dataVars_.put("__X_MIN", new AbstractScalarCellData() {
+ systemVars_.put("__X_MIN", new AbstractScalarCellData() {
@Override
public String getValue(int _row, int _col) {
return orthoParams==null ? null:orthoParams.getXmin()+" m";
}
});
- dataVars_.put("__Y_MAX", new AbstractScalarCellData() {
+ systemVars_.put("__Y_MAX", new AbstractScalarCellData() {
@Override
public String getValue(int _row, int _col) {
return orthoParams==null ? null:orthoParams.getYmax()+" m";
}
});
- dataVars_.put("__Y_MIN", new AbstractScalarCellData() {
+ systemVars_.put("__Y_MIN", new AbstractScalarCellData() {
@Override
public String getValue(int _row, int _col) {
return orthoParams==null ? null:orthoParams.getYmin()+" m";
}
});
- dataVars_.put("__VUE_2D", new ImageCellData() {
-
- @Override
- public byte[] getValue(int _row, int _col) {
- BufferedImage img=impl.get2dFrame().getVisuPanel().produceImage(null);
- ByteArrayOutputStream bos = new ByteArrayOutputStream();
- try {
- ImageIO.write(img, "png", bos);
- return bos.toByteArray();
- }
- catch (IOException e) {
- return null;
- }
- }
- });
- dataVars_.put("__VUE_3D", new ImageCellData() {
-
- @Override
- public byte[] getValue(int _row, int _col) {
- if (transects==null || transects.length==0)
- return null;
-
- int[] isels=new int[transects.length];
- for (int i=0; i<transects.length; i++) {
- isels[i]=i;
- }
- PivShow3DTransectPanel pn=new PivShow3DTransectPanel(impl);
- pn.setSelectedTransects(isels);
- pn.get3dGraph().setSize(500, 500);
- BufferedImage img=CtuluLibImage.produceImageForComponent(pn.get3dGraph(),null);
- ByteArrayOutputStream bos = new ByteArrayOutputStream();
- try {
- ImageIO.write(img, "png", bos);
- return bos.toByteArray();
- }
- catch (IOException e) {
- return null;
- }
- }
- });
+
+ return systemVars_;
}
/**
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <bma...@us...> - 2016-12-20 13:19:23
|
Revision: 9488
http://sourceforge.net/p/fudaa/svn/9488
Author: bmarchan
Date: 2016-12-20 13:19:20 +0000 (Tue, 20 Dec 2016)
Log Message:
-----------
Export rapport jaugeage : Fromattage des double + protection du document final.
Modified Paths:
--------------
trunk/soft/fudaa-lspiv/distrib/src/dist/templates/template_gauging_fr.xlsx
trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/PivExportGaugingReportFillValuesPanel.java
trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/action/PivExportGaugingReportAction.java
Modified: trunk/soft/fudaa-lspiv/distrib/src/dist/templates/template_gauging_fr.xlsx
===================================================================
(Binary files differ)
Modified: trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/PivExportGaugingReportFillValuesPanel.java
===================================================================
--- trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/PivExportGaugingReportFillValuesPanel.java 2016-12-20 13:17:54 UTC (rev 9487)
+++ trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/PivExportGaugingReportFillValuesPanel.java 2016-12-20 13:19:20 UTC (rev 9488)
@@ -121,6 +121,8 @@
mdValues_=new ValuesTableModel(userVars);
tbValues_=new JTable(mdValues_);
+ // Pour conserver la valeur saisie, m\xEAme lorsqu'on clique sur le bouton Ok
+ tbValues_.putClientProperty("terminateEditOnFocusLost", Boolean.TRUE);
JScrollPane sp=new JScrollPane(tbValues_);
JPanel pnValues=new JPanel();
Modified: trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/action/PivExportGaugingReportAction.java
===================================================================
--- trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/action/PivExportGaugingReportAction.java 2016-12-20 13:17:54 UTC (rev 9487)
+++ trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/action/PivExportGaugingReportAction.java 2016-12-20 13:19:20 UTC (rev 9488)
@@ -14,12 +14,16 @@
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
+import java.text.DecimalFormat;
import java.util.HashMap;
+import java.util.Locale;
import javax.imageio.ImageIO;
import javax.swing.JFileChooser;
import javax.swing.JOptionPane;
+import org.apache.commons.codec.DecoderException;
+import org.apache.commons.codec.binary.Hex;
import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.ClientAnchor;
import org.apache.poi.ss.usermodel.CreationHelper;
@@ -31,10 +35,13 @@
import org.apache.poi.ss.util.AreaReference;
import org.apache.poi.ss.util.CellRangeAddress;
import org.apache.poi.ss.util.CellReference;
+import org.apache.poi.xssf.usermodel.XSSFSheet;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
+import org.fudaa.ctulu.CtuluLib;
import org.fudaa.ctulu.CtuluLibImage;
import org.fudaa.ctulu.CtuluLog;
import org.fudaa.ctulu.gui.CtuluFileChooser;
+import org.fudaa.ctulu.gui.CtuluFileChooserTestWritable;
import org.fudaa.ebli.commun.EbliActionSimple;
import org.fudaa.fudaa.piv.PivExportGaugingReportFillValuesPanel;
import org.fudaa.fudaa.piv.PivImplementation;
@@ -271,7 +278,7 @@
Cell c=r.getCell(currentCol);
if (c != null) {
Object val=cellWrapper.getValue(irow, icol);
- c.setCellValue(val == null ? "-" : val.toString());
+ c.setCellValue(val == null ? "-" : val.toString().trim());
}
CellRangeAddress cra=rc2CellAdress.get(currentRow + "_" + currentCol);
if (cra == null) {
@@ -292,14 +299,29 @@
}
}
- // Ecriture du fichier final
+ // Lock et ecriture du fichier final
- if (fcReport_ == null)
+ for (int i=0; i<wb.getNumberOfSheets(); i++) {
+ XSSFSheet sheet = (XSSFSheet)wb.getSheetAt(i);
+ sheet.protectSheet("__LSPIV__");
+ sheet.lockDeleteColumns();
+ sheet.lockDeleteRows();
+ sheet.lockFormatCells();
+ sheet.lockFormatColumns();
+ sheet.lockFormatRows();
+ sheet.lockInsertColumns();
+ sheet.lockInsertRows();
+ sheet.enableLocking();
+ }
+
+ if (fcReport_ == null) {
fcReport_=new CtuluFileChooser(true);
- fcReport_.setAcceptAllFileFilterUsed(true);
- fcReport_.setFileFilter(PivUtils.FILE_FLT_XLSX);
- fcReport_.setMultiSelectionEnabled(false);
- fcReport_.setDialogTitle(PivResource.getS("Ficher Excel d'export"));
+ fcReport_.setTester(new CtuluFileChooserTestWritable(impl));
+ fcReport_.setAcceptAllFileFilterUsed(true);
+ fcReport_.setFileFilter(PivUtils.FILE_FLT_XLSX);
+ fcReport_.setMultiSelectionEnabled(false);
+ fcReport_.setDialogTitle(PivResource.getS("Ficher Excel d'export"));
+ }
if (fcReport_.showSaveDialog(impl.getFrame()) == JFileChooser.CANCEL_OPTION) {
return;
}
@@ -333,7 +355,7 @@
}
/**
- * Definit les varaibles connues du systeme.
+ * Definit les variables connues du systeme.
*/
public HashMap<String, AbstractCellData> defineSystemVariables() {
HashMap<String, AbstractCellData> systemVars_=new HashMap<>();
@@ -348,33 +370,43 @@
final Double meanDisch=globRes.getAverageScalarResult(ResultType.FULL_DISCHARGE);
final Double meanArea=globRes.getAverageScalarResult(ResultType.WETTED_AREA);
final Double meanMeanV=globRes.getAverageScalarResult(ResultType.MEAN_VELOCITY);
+ final Double meanMeasuredDisch=globRes.getAverageScalarResult(ResultType.MEASURED_DISCHARGE);
final HashMap<String,Object> imgOptions = new HashMap<>();
imgOptions.put(CtuluLibImage.PARAMS_FILL_BACKGROUND_BOOLEAN, Boolean.FALSE);
+ final DecimalFormat fmtStd = CtuluLib.getDecimalFormat(3);
+ final DecimalFormat fmtEcart = CtuluLib.getNoEffectDecimalFormat();
+ fmtEcart.setMaximumFractionDigits(1);
+ fmtEcart.setMinimumFractionDigits(1);
+ fmtEcart.setPositivePrefix("+");
+ final DecimalFormat fmtExp=new DecimalFormat("#");
+ fmtExp.setMaximumFractionDigits(3);
+ fmtExp.setMinimumFractionDigits(2);
+
systemVars_.put("__COEF_VITESSE",new AbstractScalarCellData() {
@Override
public String getValue(int _row, int _col) {
// On prend le coef de vitesse du premier transect, s'il existe
- return (transects==null || transects.length==0) ? null:""+transects[0].getParams().getSurfaceCoef();
+ return (transects==null || transects.length==0) ? null:format(fmtStd,transects[0].getParams().getSurfaceCoef(),null);
}
});
systemVars_.put("__CORREL_MAX",new AbstractScalarCellData() {
@Override
public String getValue(int _row, int _col) {
- return pivParams==null ? null:""+pivParams.getMaxCorrelation();
+ return pivParams==null ? null:""+format(fmtStd,pivParams.getMaxCorrelation(),null);
}
});
systemVars_.put("__CORREL_MIN",new AbstractScalarCellData() {
@Override
public String getValue(int _row, int _col) {
- return pivParams==null ? null:""+pivParams.getMinCorrelation();
+ return pivParams==null ? null:""+format(fmtStd,pivParams.getMinCorrelation(),null);
}
});
systemVars_.put("__DEBIT_MOYEN",new AbstractScalarCellData() {
@Override
public String getValue(int _row, int _col) {
- return meanDisch==null ? null:meanDisch+" m\xB3/s";
+ return meanDisch==null ? null:format(fmtStd,meanDisch,"m\xB3/s");
}
});
systemVars_.put("__ERREUR_MAX",new AbstractScalarCellData() {
@@ -387,19 +419,19 @@
for (PivOrthoPoint pt : orthoPoints) {
maxi=Math.max(maxi, pt.getError());
}
- return maxi+" m";
+ return format(fmtStd,maxi,"m");
}
});
systemVars_.put("__HAUTEUR",new AbstractScalarCellData() {
@Override
public String getValue(int _row, int _col) {
- return orthoParams==null ? null:orthoParams.getWaterElevation()+" m";
+ return orthoParams==null ? null:format(fmtStd,orthoParams.getWaterElevation(),"m");
}
});
systemVars_.put("__IA_M",new AbstractScalarCellData() {
@Override
public String getValue(int _row, int _col) {
- return (pivParams==null || orthoParams==null) ? null:(pivParams.getIASize()*orthoParams.getResolution())+" m";
+ return (pivParams==null || orthoParams==null) ? null:format(fmtStd,pivParams.getIASize()*orthoParams.getResolution(),"m");
}
});
systemVars_.put("__IA_PIX",new AbstractScalarCellData() {
@@ -411,7 +443,7 @@
systemVars_.put("__INTERTEMPS",new AbstractScalarCellData() {
@Override
public String getValue(int _row, int _col) {
- return pivParams==null ? null:pivParams.getTimeInterval()+" s";
+ return pivParams==null ? null:format(fmtStd,pivParams.getTimeInterval(),"s");
}
});
systemVars_.put("__NOM_PROJET",new AbstractScalarCellData() {
@@ -441,76 +473,93 @@
systemVars_.put("__NORME_MAX", new AbstractScalarCellData() {
@Override
public String getValue(int _row, int _col) {
- return pivParams==null ? null:pivParams.getSmax()+" m/s";
+ return pivParams==null ? null:format(fmtStd,pivParams.getSmax(),"m/s");
}
});
systemVars_.put("__NORME_MIN", new AbstractScalarCellData() {
@Override
public String getValue(int _row, int _col) {
- return pivParams==null ? null:pivParams.getSmin()+" m/s";
+ return pivParams==null ? null:format(fmtStd,pivParams.getSmin(),"m/s");
}
});
systemVars_.put("__PAS_INTERPOLATION", new AbstractScalarCellData() {
@Override
public String getValue(int _row, int _col) {
// On prend le pas du premier transect, s'il existe
- return (transects==null || transects.length==0) ? null:transects[0].getParams().getInterpolationStep()+" m";
+ return (transects==null || transects.length==0) ? null:format(fmtStd,transects[0].getParams().getInterpolationStep(),"m");
}
});
+ systemVars_.put("__RATIO_DEBIT_MESURE", new AbstractScalarCellData() {
+ @Override
+ public String getValue(int _row, int _col) {
+ return meanMeasuredDisch==null ? null:meanMeasuredDisch/meanDisch*100+" %";
+ }
+ });
systemVars_.put("__RAYON_RECHERCHE", new AbstractScalarCellData() {
@Override
public String getValue(int _row, int _col) {
// On prend le rayon du premier transect, s'il existe
- return (transects==null || transects.length==0) ? null:transects[0].getParams().getRadius()+" m";
+ return (transects==null || transects.length==0) ? null:format(fmtStd,transects[0].getParams().getRadius(),"m");
}
});
systemVars_.put("__RESOLUTION", new AbstractScalarCellData() {
@Override
public String getValue(int _row, int _col) {
// On prend le rayon du premier transect, s'il existe
- return orthoParams==null ? null:orthoParams.getResolution()+" m/pix";
+ return orthoParams==null ? null:format(fmtStd,orthoParams.getResolution(),"m/pix");
}
});
- systemVars_.put("__RESULTATS", new AbstractCellData() {
+ systemVars_.put("__TB_RESULTATS_DEBIT", new AbstractCellData() {
@Override
- public String getValue(int _row, int _col) {
- if (flowResults==null)
+ public String getValue(int rowIndex, int _col) {
+ if (flowResults==null || flowResults.length==0)
return null;
+ Double val;
+
switch (_col) {
+ default:
case 0:
- default:
- // Num\xE9ro de transect
- return _row+1+"";
+ return rowIndex==flowResults.length? PivResource.getS("Moyenne"):""+(rowIndex+1);
case 1:
- // D\xE9bit total
- return flowResults[_row].getDischarge()+"";
+ val=rowIndex==flowResults.length? meanDisch:flowResults[rowIndex].getDischarge();
+ return format(fmtStd, val,null);
case 2:
- // Ecart debit % moyenne
- return ((flowResults[_row].getDischarge()-meanDisch)/meanDisch*100)+"";
+ val=rowIndex==flowResults.length? meanDisch:flowResults[rowIndex].getDischarge();
+ val = (val-meanDisch)/meanDisch*100;
+ return format(fmtEcart, val,null);
case 3:
- // Aire mouill\xE9e
- return flowResults[_row].getWettedArea()+"";
+ val = rowIndex==flowResults.length? meanArea:flowResults[rowIndex].getWettedArea();
+ return format(fmtStd, val,null);
case 4:
- // Ecart aire mouill\xE9e % moyenne
- return ((flowResults[_row].getWettedArea()-meanArea)/meanArea*100)+"";
+ val=rowIndex==flowResults.length? meanArea:flowResults[rowIndex].getWettedArea();
+ val = (val-meanArea)/meanArea*100;
+ return format(fmtEcart, val,null);
case 5:
- // Vitese moyenne
- return flowResults[_row].getMeanVelocity()+"";
+ val = rowIndex==flowResults.length? meanMeanV:flowResults[rowIndex].getMeanVelocity();
+ return format(fmtStd, val,null);
case 6:
- // Ecart vitesse moyenne % moyenne
- return ((flowResults[_row].getMeanVelocity()-meanMeanV)/meanMeanV*100)+"";
+ val=rowIndex==flowResults.length? meanMeanV:flowResults[rowIndex].getMeanVelocity();
+ val = (val-meanMeanV)/meanMeanV*100;
+ return format(fmtEcart, val,null);
+ case 7:
+ val = rowIndex==flowResults.length? meanMeasuredDisch:flowResults[rowIndex].getValue(-1,ResultType.MEASURED_DISCHARGE);
+ return format(fmtStd, val,null);
+ case 8:
+ val=rowIndex==flowResults.length? meanMeasuredDisch:flowResults[rowIndex].getValue(-1,ResultType.MEASURED_DISCHARGE);
+ val = (val-meanMeasuredDisch)/meanMeasuredDisch*100;
+ return format(fmtEcart, val,null);
}
}
@Override
public int getNbCols() {
- return 7;
+ return 9;
}
@Override
public int getNbRows() {
- return transects==null ? 0 : transects.length;
+ return transects==null ? 0 : transects.length+1;
}
});
systemVars_.put("__SIM_MS", new AbstractScalarCellData() {
@@ -525,7 +574,7 @@
val = orthoParams.getResolution()*pivParams.getSim()/pivParams.getTimeInterval();
}
- return val+" m/s";
+ return format(fmtStd, val,"m/s");
}
return null;
}
@@ -548,7 +597,7 @@
val = orthoParams.getResolution()*pivParams.getSip()/pivParams.getTimeInterval();
}
- return val+" m/s";
+ return format(fmtStd, val,"m/s");
}
return null;
}
@@ -571,7 +620,7 @@
val = orthoParams.getResolution()*pivParams.getSjm()/pivParams.getTimeInterval();
}
- return val+" m/s";
+ return format(fmtStd, val,"m/s");
}
return null;
}
@@ -594,7 +643,7 @@
val = orthoParams.getResolution()*pivParams.getSjp()/pivParams.getTimeInterval();
}
- return val+" m/s";
+ return format(fmtStd, val,"m/s");
}
return null;
}
@@ -657,49 +706,49 @@
systemVars_.put("__VX_MAX", new AbstractScalarCellData() {
@Override
public String getValue(int _row, int _col) {
- return pivParams==null ? null:pivParams.getVxmax()+" m/s";
+ return pivParams==null ? null:format(fmtStd, pivParams.getVxmax(), "m/s");
}
});
systemVars_.put("__VX_MIN", new AbstractScalarCellData() {
@Override
public String getValue(int _row, int _col) {
- return pivParams==null ? null:pivParams.getVxmin()+" m/s";
+ return pivParams==null ? null:format(fmtStd, pivParams.getVxmin(), "m/s");
}
});
systemVars_.put("__VY_MAX", new AbstractScalarCellData() {
@Override
public String getValue(int _row, int _col) {
- return pivParams==null ? null:pivParams.getVymax()+" m/s";
+ return pivParams==null ? null:format(fmtStd, pivParams.getVymax(),"m/s");
}
});
systemVars_.put("__VY_MIN", new AbstractScalarCellData() {
@Override
public String getValue(int _row, int _col) {
- return pivParams==null ? null:pivParams.getVymin()+" m/s";
+ return pivParams==null ? null:format(fmtStd, pivParams.getVymin(),"m/s");
}
});
systemVars_.put("__X_MAX", new AbstractScalarCellData() {
@Override
public String getValue(int _row, int _col) {
- return orthoParams==null ? null:orthoParams.getXmax()+" m";
+ return orthoParams==null ? null:format(fmtStd, orthoParams.getXmax(),"m");
}
});
systemVars_.put("__X_MIN", new AbstractScalarCellData() {
@Override
public String getValue(int _row, int _col) {
- return orthoParams==null ? null:orthoParams.getXmin()+" m";
+ return orthoParams==null ? null:format(fmtStd, orthoParams.getXmin(),"m");
}
});
systemVars_.put("__Y_MAX", new AbstractScalarCellData() {
@Override
public String getValue(int _row, int _col) {
- return orthoParams==null ? null:orthoParams.getYmax()+" m";
+ return orthoParams==null ? null:format(fmtStd, orthoParams.getYmax(),"m");
}
});
systemVars_.put("__Y_MIN", new AbstractScalarCellData() {
@Override
public String getValue(int _row, int _col) {
- return orthoParams==null ? null:orthoParams.getYmin()+" m";
+ return orthoParams==null ? null:format(fmtStd, orthoParams.getYmin(),"m");
}
});
@@ -707,6 +756,33 @@
}
/**
+ * Formatte le champs double en entr\xE9e
+ * @param _fmt Le format
+ * @param _val La valeur a formatter.
+ * @param _unit L'unit\xE9, ou null si aucune
+ * @return Si la valeur vaux Double.NaN, retourne NaN.
+ */
+ private String format(DecimalFormat _fmt, Double _val, String _unit) {
+ String ret;
+ if (_val.isNaN()) {
+ ret=_val.toString();
+ }
+ else {
+ ret=_fmt.format(_val);
+ }
+
+ // C'est pas terrible, mais on passe en notation scientifique pour les grands nombres.
+ if (ret.length()>10) {
+ ret=String.format(Locale.US, "%10.3E", _val);
+ }
+
+ if (_unit!=null) {
+ ret+=" "+_unit;
+ }
+ return ret;
+ }
+
+ /**
* @return true Si toutes les donn\xE9es sont pr\xE9sentes pour un lancement.
*/
public boolean isValide() {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <bma...@us...> - 2017-02-02 14:41:56
|
Revision: 9533
http://sourceforge.net/p/fudaa/svn/9533
Author: bmarchan
Date: 2017-02-02 14:41:54 +0000 (Thu, 02 Feb 2017)
Log Message:
-----------
LSPIV Changelogs.
Modified Paths:
--------------
trunk/soft/fudaa-lspiv/distrib/src/dist/CHANGELOG.txt
trunk/soft/fudaa-lspiv/distrib/src/dist/CHANGELOG_en.txt
trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/PivImplementation.java
Modified: trunk/soft/fudaa-lspiv/distrib/src/dist/CHANGELOG.txt
===================================================================
--- trunk/soft/fudaa-lspiv/distrib/src/dist/CHANGELOG.txt 2017-02-02 11:37:34 UTC (rev 9532)
+++ trunk/soft/fudaa-lspiv/distrib/src/dist/CHANGELOG.txt 2017-02-02 14:41:54 UTC (rev 9533)
@@ -1,5 +1,40 @@
Fudaa-LSPIV
+Version 1.5.1 du xx/xx/2017
+===========================
+
+Nouveautés
+----------
+
+- Détection sur le site de Fudaa-LSPIV de la présence d'une nouvelle version téléchargeable
+ au lancement de Fudaa-LSPIV. En complement, le menu Aide->Mise à jour permet de verifier
+ la présence d'une mise à jour.
+
+- Possibilité d'importer les images sources du projet depuis une séquence vidéo, par le
+ menu LSPIV->Gestion des images->Importer. L'utilitaire ffmpeg est utilisé pour cette
+ fonctionnalité. Les images importées remplacent les images sources existantes dans le
+ projet.
+
+Améliorations
+-------------
+
+- Le nom des fichiers .dat pour l'import de données est défini par defaut dans les boites de
+ dialogue d'import.
+
+- Le tooltip sur l'action Auto cache a été revu.
+
+- Le rapport de jaugeage en anglais a été intégré. Plusieurs modifications ont été apportées
+ sur le rapport de jaugeage.
+
+Corrections
+-----------
+
+- Problème de non prise en compte de la suppression manuelle des vitesses pour le calcul des
+ moyennes (s’il n’y a pas eu une sauvegarde entre temps).
+
+- Le menu Fichier->Exporter->Export des images sources restait grisé jusqu'a ce que le
+ projet contienne des images transformées.
+
Version 1.5.0 du 20/12/2016
===========================
Modified: trunk/soft/fudaa-lspiv/distrib/src/dist/CHANGELOG_en.txt
===================================================================
--- trunk/soft/fudaa-lspiv/distrib/src/dist/CHANGELOG_en.txt 2017-02-02 11:37:34 UTC (rev 9532)
+++ trunk/soft/fudaa-lspiv/distrib/src/dist/CHANGELOG_en.txt 2017-02-02 14:41:54 UTC (rev 9533)
@@ -1,5 +1,38 @@
Fudaa-LSPIV
+Version 1.5.1 (2016/xx/xx)
+==========================
+
+New features
+------------
+
+- Check that a new downloadable version is present on Fudaa-LSPIV site at launch of
+ Fudaa-LSPIV. In addition, the Help->Update menu allows you to check the presence of an
+ update.
+
+- Ability to import project sources images from a video sequence, through the menu
+ LSPIV->Source images management->Import. The ffmpeg utility is used for this
+ functionality. Imported images replace existing source images in the project
+
+Improvments
+-----------
+
+- Name of .dat files during data import is now defined by default in import dialog boxes.
+
+- The tooltip on the Automatic images cache action has been reviewed.
+
+- The English gauging report has been integrated. Several modifications were made to the
+ gauging report.
+
+Fixed
+-----
+
+- Existing problem of not taking into account the manual suppression of velocities for
+ average calculation (if there was no backup in the meantime).
+
+- Menu File->Export->Export source images export remained disabled till project contains
+ transformed images.
+
Version 1.5.0 (2016/12/20)
==========================
Modified: trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/PivImplementation.java
===================================================================
--- trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/PivImplementation.java 2017-02-02 11:37:34 UTC (rev 9532)
+++ trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/PivImplementation.java 2017-02-02 14:41:54 UTC (rev 9533)
@@ -287,7 +287,7 @@
showHelp();
} else if ("MAJ".equals(action)) {
if (!checkForUpdate(false)) {
- message(PivResource.getS("Information"),PivResource.getS("Site des mise \xE0 jour : {0}\nLa version de Fudaa-LSPIV est \xE0 jour.",isPIV_.update),false);
+ message(PivResource.getS("Information"),PivResource.getS("Site de mises \xE0 jour : {0}\nLa version de Fudaa-LSPIV est \xE0 jour.",isPIV_.update),false);
}
}
else if (action.startsWith("REOUVRIR")) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <bma...@us...> - 2017-04-13 19:54:02
|
Revision: 9544
http://sourceforge.net/p/fudaa/svn/9544
Author: bmarchan
Date: 2017-04-13 19:53:59 +0000 (Thu, 13 Apr 2017)
Log Message:
-----------
Production version 1.5.1 + Changelogs.txt
Modified Paths:
--------------
trunk/soft/fudaa-lspiv/distrib/src/dist/CHANGELOG.txt
trunk/soft/fudaa-lspiv/distrib/src/dist/CHANGELOG_en.txt
trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/PivImplementation.java
Modified: trunk/soft/fudaa-lspiv/distrib/src/dist/CHANGELOG.txt
===================================================================
--- trunk/soft/fudaa-lspiv/distrib/src/dist/CHANGELOG.txt 2017-03-14 09:15:47 UTC (rev 9543)
+++ trunk/soft/fudaa-lspiv/distrib/src/dist/CHANGELOG.txt 2017-04-13 19:53:59 UTC (rev 9544)
@@ -1,6 +1,6 @@
Fudaa-LSPIV
-Version 1.5.1 du xx/xx/2017
+Version 1.5.1 du 13/04/2017
===========================
Nouveautés
Modified: trunk/soft/fudaa-lspiv/distrib/src/dist/CHANGELOG_en.txt
===================================================================
--- trunk/soft/fudaa-lspiv/distrib/src/dist/CHANGELOG_en.txt 2017-03-14 09:15:47 UTC (rev 9543)
+++ trunk/soft/fudaa-lspiv/distrib/src/dist/CHANGELOG_en.txt 2017-04-13 19:53:59 UTC (rev 9544)
@@ -1,6 +1,6 @@
Fudaa-LSPIV
-Version 1.5.1 (2016/xx/xx)
+Version 1.5.1 (2016/04/13)
==========================
New features
Modified: trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/PivImplementation.java
===================================================================
--- trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/PivImplementation.java 2017-03-14 09:15:47 UTC (rev 9543)
+++ trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/PivImplementation.java 2017-04-13 19:53:59 UTC (rev 9544)
@@ -48,12 +48,10 @@
import org.fudaa.fudaa.commun.impl.FudaaStartupExitPreferencesPanel;
import org.fudaa.fudaa.piv.action.PivAutoCacheAction;
import org.fudaa.fudaa.piv.action.PivAverageFilteredResultsAction;
-import org.fudaa.fudaa.piv.action.PivChooseOrthoModeAction;
import org.fudaa.fudaa.piv.action.PivComputeFlowAction;
import org.fudaa.fudaa.piv.action.PivComputeLaunchAction;
import org.fudaa.fudaa.piv.action.PivDefineComputeParamAction;
import org.fudaa.fudaa.piv.action.PivDefineOrthoParamAction;
-import org.fudaa.fudaa.piv.action.PivDefineParamScalingAction;
import org.fudaa.fudaa.piv.action.PivExportGaugingReportAction;
import org.fudaa.fudaa.piv.action.PivExportImagesAction;
import org.fudaa.fudaa.piv.action.PivFilterInstantResultsAction;
@@ -99,7 +97,7 @@
static {
isPIV_.name = "LSPIV";
isPIV_.version = "1.5.1";
- isPIV_.date = "2017-02-02";
+ isPIV_.date = "2017-04-13";
isPIV_.rights = PivResource.getS("Tous droits r\xE9serv\xE9s")+". CEREMA (c)1999-2017";
isPIV_.license = "GPL2";
isPIV_.languages = "en,fr";
@@ -824,15 +822,15 @@
mn.add(new PivAutoCacheAction(this).buildMenuItem(EbliComponentFactory.INSTANCE));
mn.addSeparator(PivResource.getS("Orthorectification"));
- mn.add(new PivChooseOrthoModeAction(this).buildMenuItem(EbliComponentFactory.INSTANCE));
+// mn.add(new PivChooseOrthoModeAction(this).buildMenuItem(EbliComponentFactory.INSTANCE));
- BuMenu mnScaling=new BuMenu(PivResource.getS("Mise \xE0 l'\xE9chelle"),"MN_SCALING");
- mnScaling.add(new PivDefineParamScalingAction(this).buildMenuItem(EbliComponentFactory.INSTANCE));
- mnScaling.setEnabled(false);
+// BuMenu mnScaling=new BuMenu(PivResource.getS("Mise \xE0 l'\xE9chelle"),"MN_SCALING");
+// mnScaling.add(new PivDefineParamScalingAction(this).buildMenuItem(EbliComponentFactory.INSTANCE));
+// mnScaling.setEnabled(false);
+//
+// mn.add(mnScaling);
- mn.add(mnScaling);
-
- BuMenu mnOrtho=new BuMenu(PivResource.getS("Orthorectification"),"MN_ORTHO");
+// BuMenu mnOrtho=new BuMenu(PivResource.getS("Orthorectification"),"MN_ORTHO");
sm=new BuMenu(PivResource.getS("Points de r\xE9f\xE9rence"),"mnGRP");
bt=get2dFrame().getVisuPanel().getOrthoGRPAction().buildMenuItem(EbliComponentFactory.INSTANCE);
bt.setText(PivResource.getS("Nouveaux..."));
@@ -840,8 +838,11 @@
bt=new PivImportGRPAction((this)).buildMenuItem(EbliComponentFactory.INSTANCE);
bt.setText(PivResource.getS("Importer..."));
sm.add(bt);
- mnOrtho.add(sm);
- mnOrtho.add(new PivOrthoVerifyGRPAction(this));
+// mnOrtho.add(sm);
+// mnOrtho.add(new PivOrthoVerifyGRPAction(this));
+ mn.add(sm);
+ mn.add(new PivOrthoVerifyGRPAction(this));
+
sm=new BuMenu(PivResource.getS("Param\xE8tres de transformation"),"mnTRF",true);
bt=new PivDefineOrthoParamAction(this).buildMenuItem(EbliComponentFactory.INSTANCE);
bt.setText(PivResource.getS("D\xE9finir..."));
@@ -849,11 +850,11 @@
bt=new PivImportOrthoParamAction(this).buildMenuItem(EbliComponentFactory.INSTANCE);
bt.setText(PivResource.getS("Importer..."));
sm.add(bt);
- mnOrtho.add(sm);
- mnOrtho.setEnabled(false);
+// mnOrtho.add(sm);
+// mnOrtho.setEnabled(false);
+// mn.add(mnOrtho);
+ mn.add(sm);
- mn.add(mnOrtho);
-
mn.add(new PivOrthoLaunchAction(this));
mn.addSeparator(PivResource.getS("Analyse LSPIV"));
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <bma...@us...> - 2017-04-13 22:32:33
|
Revision: 9545
http://sourceforge.net/p/fudaa/svn/9545
Author: bmarchan
Date: 2017-04-13 22:32:30 +0000 (Thu, 13 Apr 2017)
Log Message:
-----------
Traduction + chmod +x sur ffmpeg.x
Modified Paths:
--------------
trunk/soft/fudaa-lspiv/distrib/src/dist/CHANGELOG.txt
trunk/soft/fudaa-lspiv/distrib/src/dist/CHANGELOG_en.txt
trunk/soft/fudaa-lspiv/distrib/src/dist/izpack/fudaa-lspiv.xml
trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/PivImportVideoParamPanel.java
trunk/soft/fudaa-lspiv/src/main/resources/org/fudaa/fudaa/piv/piv_en.fr_txt
Modified: trunk/soft/fudaa-lspiv/distrib/src/dist/CHANGELOG.txt
===================================================================
--- trunk/soft/fudaa-lspiv/distrib/src/dist/CHANGELOG.txt 2017-04-13 19:53:59 UTC (rev 9544)
+++ trunk/soft/fudaa-lspiv/distrib/src/dist/CHANGELOG.txt 2017-04-13 22:32:30 UTC (rev 9545)
@@ -34,6 +34,8 @@
- Le menu Fichier->Exporter->Export des images sources restait grisé jusqu'a ce que le
projet contienne des images transformées.
+
+- Les filtres sur les composantes VX et VY étaient intervertis.
Version 1.5.0 du 20/12/2016
===========================
Modified: trunk/soft/fudaa-lspiv/distrib/src/dist/CHANGELOG_en.txt
===================================================================
--- trunk/soft/fudaa-lspiv/distrib/src/dist/CHANGELOG_en.txt 2017-04-13 19:53:59 UTC (rev 9544)
+++ trunk/soft/fudaa-lspiv/distrib/src/dist/CHANGELOG_en.txt 2017-04-13 22:32:30 UTC (rev 9545)
@@ -33,6 +33,8 @@
- Menu File->Export->Export source images export remained disabled till project contains
transformed images.
+- Filters on the VX and VY components were interchanged.
+
Version 1.5.0 (2016/12/20)
==========================
Modified: trunk/soft/fudaa-lspiv/distrib/src/dist/izpack/fudaa-lspiv.xml
===================================================================
--- trunk/soft/fudaa-lspiv/distrib/src/dist/izpack/fudaa-lspiv.xml 2017-04-13 19:53:59 UTC (rev 9544)
+++ trunk/soft/fudaa-lspiv/distrib/src/dist/izpack/fudaa-lspiv.xml 2017-04-13 22:32:30 UTC (rev 9545)
@@ -10,7 +10,7 @@
<info>
<appname>Fudaa-LSPIV</appname>
<!-- Impossible de mettre le n de version dans une variable externe ! Dommage... -->
- <appversion>1.5.0</appversion>
+ <appversion>1.5.1</appversion>
<authors>
<author name="Magali Jodeau (EDF)" email="mag...@ed..."/>
<author name="Alexandre Hauet (EDF)" email="ale...@ed..."/>
@@ -26,7 +26,7 @@
<variables>
<variable name="lspiv-jar" value="fudaa-lspiv-${ENV[LSPIV_JAR]}.jar" />
- <variable name="released-on" value="20/12/2016"/>
+ <variable name="released-on" value="13/04/2017"/>
<!-- Change de r\xE9pertoire de destination de l'installation -->
<variable name="TargetPanel.dir" value="${DEFAULT_INSTALL_PATH} ${APP_VER}"/>
<!-- Cl\xE9 de registre pour les associations de fichiers -->
@@ -144,6 +144,7 @@
<fileset os="unix" dir="../../../../../fudaa/serveurs/lspiv" targetdir="$INSTALL_PATH/exes">
<include name="*.x"/>
</fileset>
+ <executable os="unix" targetfile="$INSTALL_PATH/exes/ffmpeg.x" />
<executable os="unix" targetfile="$INSTALL_PATH/exes/filter.x" />
<executable os="unix" targetfile="$INSTALL_PATH/exes/moy_ec.x" />
<executable os="unix" targetfile="$INSTALL_PATH/exes/ortho_plan.x" />
Modified: trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/PivImportVideoParamPanel.java
===================================================================
--- trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/PivImportVideoParamPanel.java 2017-04-13 19:53:59 UTC (rev 9544)
+++ trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/PivImportVideoParamPanel.java 2017-04-13 22:32:30 UTC (rev 9545)
@@ -74,7 +74,7 @@
});
JPanel pnSampling = new JPanel();
- pnSampling.setBorder(BorderFactory.createTitledBorder(PivResource.getS("Echantillonage")));
+ pnSampling.setBorder(BorderFactory.createTitledBorder(PivResource.getS("Echantillonnage")));
pnSampling.setLayout(new BuGridLayout(2, 5, 5, true, false));
pnSampling.add(new JLabel(PivResource.getS("Nombre d'images par secondes:")));
Modified: trunk/soft/fudaa-lspiv/src/main/resources/org/fudaa/fudaa/piv/piv_en.fr_txt
===================================================================
--- trunk/soft/fudaa-lspiv/src/main/resources/org/fudaa/fudaa/piv/piv_en.fr_txt 2017-04-13 19:53:59 UTC (rev 9544)
+++ trunk/soft/fudaa-lspiv/src/main/resources/org/fudaa/fudaa/piv/piv_en.fr_txt 2017-04-13 22:32:30 UTC (rev 9545)
@@ -1,5 +1,15 @@
1 point de d\xE9part a \xE9t\xE9 ignor\xE9 car il est en dehors du maillage=1 starting point was ignored because it is outside of the mesh
+<b>R\xE9solution</b><p>Vous pouvez d\xE9finir la r\xE9solution soit directement, soit en saisissant des couples de points et moyennation.<p><u>Saisie par couple de points</u> \:<br>Saisissez 2 points \xE0 l'\xE9cran, puis renseignez les coordonn\xE9es ou la distance dans la table (suivant l'option choisie)<p><p>=**<b>R\xE9solution</b><p>Vous pouvez d\xE9finir la r\xE9solution soit directement, soit en saisissant des couples de points et moyennation.<p><u>Saisie par couple de points</u> \:<br>Saisissez 2 points \xE0 l'\xE9cran, puis renseignez les coordonn\xE9es ou la distance dans la table (suivant l'option choisie)<p><p>**
+<b>Transformation</b><p>Pour d\xE9finir une transformation, Saisissez 2 points \xE0 l'\xE9cran, puis renseignez les coordonn\xE9es dans la table=**<b>Transformation</b><p>Pour d\xE9finir une transformation, Saisissez 2 points \xE0 l'\xE9cran, puis renseignez les coordonn\xE9es dans la table**
+<html><a href\=\=**<html><a href\=\**
<html><p>Param\xE8tres de transformation du rep\xE8re<br>initial vers le rep\xE8re de calcul</html>=<html><p>Transformation parameters from initial<br>reference to calculation reference</html>
+<html>Aire mouill\xE9e (m\xB2)</html>=<html>Wetted area (m\xB2)</html>
+<html>D\xE9bit mesur\xE9 (m\xB3/s)</html>=<html>Measur.disch.(m\xB3/s))</html>
+<html>D\xE9bit mesur\xE9 / D\xE9bit total (%)</html>=<html>Measur.disch. / Total disch. (%)</html>
+<html>D\xE9bit total (m\xB3/s)</html>=<html>Total disch. (m\xB3/s)</html>
+<html>Ecart (%)</html>=<html>Gap (%)</html>
+<html>Une mise \xE0 jour de Fudaa-LSPIV est disponible.<br>Cliquez sur le lien ci-dessous pour la t\xE9l\xE9charger.</html>=<html>An update of Fudaa-LSPIV is available.<br>Click the link below to download it.</html>
+<html>Vit. moy. (m/s)</html>=<html>Ave. vel. (m/s)</html>
<original>=<original>
A distance constante=At a constant distance
A pas de temps constant=At a constant time
@@ -11,6 +21,7 @@
Aire d'interrogation=Interrogation area
Aire de recherche=Search area
Aire mouill\xE9e (m\xB2)=Wetted area (m\xB2)
+Ajoute un couple par saisie de 2 points=**Ajoute un couple par saisie de 2 points**
Analyse LSPIV=LSPIV analysis
Analyse des images ok=Image analysis ok
Analyse du couple d'images {0} sur {1}=Analysis of image pair {0} out of {1}
@@ -59,6 +70,7 @@
Construction des \xE9l\xE9ments=Elements construction
Contour de grille=Grid outline
Contour grille=Grid outline
+Coordonn\xE9es=**Coordonn\xE9es**
Correspondance impossible des indices de noeuds lors de la creation du maillage=Impossible connection of nodes indices while creating the mesh
Corr\xE9lation=Correlation
Cr\xE9ation automatique des images cache=Images cache automatic creation
@@ -73,6 +85,7 @@
Des r\xE9sultats instantan\xE9s doivent exister=Instantaneous results must exist
Des r\xE9sultats instantan\xE9s filtr\xE9s doivent exister=Filtered instantaneous results must exist
Distance d'extrapolation=Extrapolation range
+Distance=**Distance**
Dur\xE9e d'int\xE9gration=Integration duration
D\xE9bit mesur\xE9 (m\xB3/s)=Measur.disch.(m\xB3/s)
D\xE9bit total (m\xB3/s)=Total disch. (m\xB3/s)
@@ -80,11 +93,14 @@
D\xE9finir=Define
D\xE9finition des points de grille=Definition of grid points
D\xE9finition du nombre de points sur la grille=Definition of the number of points in the grid
-Ecart (%)=Gap (%)
Ecart=Gap
+Echantillonnage interrompu=Sampling interrupted
+Echantillonnage ok=Sampling ok
+Echantillonnage=Sampling
Editer la g\xE9om\xE9trie s\xE9lectionn\xE9e=Edit the selected geometry
Editer=Edit
Erreur d'analyse du couple d'images {0},{1}\:\n=Error while analysing image pair {0},{1}\:\n
+Erreur dans l'\xE9chantillonnage\:\n=Error in sampling\:\n
Erreur de calcul des coefficients \:\n=Error while calculating the coefficients\:\n
Erreur de calcul des r\xE9sultats moyens\:\n=Error while calculating average results\:\n
Erreur de calcul des scalaires instantan\xE9s\:\n=Instantaneous scalars calculation error\:\n
@@ -109,13 +125,14 @@
Exporter les images transform\xE9es=Export transformed images
Ficher Excel d'export=Export Excel file
Fichier Excel=Excel file
-Fichier GRP=GRP file
Fichier bathy=Bathymetry file
-Fichier grid=Grid file
+Fichier calcul (PIV_param.dat)=Calculation file (PIV_param.dat)
+Fichier grille (grid.dat)=Grid file (grid.dat)
Fichier manquant=Missing file
-Fichier params calcul=Params calculation file
-Fichier params transformation=Params transf. file
+Fichier points (GRP.dat)=GRP file (GRP.dat)
Fichier projet=Project file
+Fichier transformation (img_ref.dat)=Transformation file (img_ref.dat)
+Fichier vid\xE9o=Video file
Fichiers images en niveaux de gris=Gray-scale image files
Fichiers images=Images files
Filtrage des r\xE9sultats instantan\xE9s=Instantaneous results filtering
@@ -129,8 +146,11 @@
Format d'export=Export format
Format de fichier invalide \: Format GRP attendu=Wrong file format \: GRP format expected
Format de fichier invalide \: Format GRP \xE9tendu attendu=Wrong file format \: extended GRP format expected
+Gestion des images sources=Source images management
Gestion des images=Images management
Grille=Grid
+I1=I1
+I2=I2
IA en vert=IA in green
IA/SA=IA/SA
Ichiro Fujita (Prof.), Universit\xE9 de Kob\xE9=Ichiro Fujita (Prof.), Kobe University
@@ -142,16 +162,24 @@
Image ortho=Ortho image
Image transform\xE9e=Transformed image
Import d'un transect=Import of a transect
+Import des images=Import of images
Import des param\xE8tres d'orthorectification=Import of orthorectification parameters
Import des param\xE8tres de calcul=Import of calculation parameters
Import des points de grille=Import of grid points
Import des points de r\xE9f\xE9rence=Import of the reference points
+Importer les images depuis une vid\xE9o=Import images from video
Importer=Import
Impossible d'ouvrir le fichier {0}.\nPas d'application ou fichier introuvable=Unable to open file {0}.\nNo application or file not found
Indiquer le nom du calque \xE0 cr\xE9er=Enter the name of the layer to create
+Information=Information
+Instant de d\xE9but=Instant of beginning
+Instant de fin=Instant of end
Interruption en cours. Merci de patienter=Interruption in progress. Please wait
Intervalle de temps=Time step
Isolignes / Isosurfaces=Isolines / Isosurfaces
+J1=J1
+J2=J2
+L'\xE9chantillonnage s'est termin\xE9e avec succ\xE8s=Sampling completed successfully
LSPIV=LSPIV
La biblioth\xE8que JAI Image I/O n'est probablement pas install\xE9e.\nElle doit l'\xEAtre dans le r\xE9pertoire des extensions Java.\n\nL'application ne fonctionnera pas correctement=The JAI Image I/O library is probably not installed.\nIt must be installed in the Java extensions directory.\n\nThe application will not work properly
La composante Vx d\xE9finie par {0} n'existe pas dans les r\xE9sultats=Vx component defined by {0} does not exist in the results
@@ -161,7 +189,9 @@
La pr\xE9cision du trac\xE9 doit \xEAtre d\xE9finie par un entier sup\xE9rieur \xE0 1=The tracing precision must be defined by an integer greater than 1
La r\xE9solution doit \xEAtre un r\xE9el strictement positif=Resolution must be a strictly positive real number
La transformation des images s'est termin\xE9e avec succ\xE8s=Image transformation terminated successfully
+La valeur de fin doit \xEAtre sup\xE9rieure ou \xE9gale \xE0 la valeur de d\xE9but=The end value must be greater than or equal to the start value
Label=Label
+Lancement de l'echantillonnage=Starting of sampling
Lancement de la v\xE9rification de l'orthorectification=Orthorectification check launched
Le calcul s'est termin\xE9 avec succ\xE8s=The calculation terminated successfully
Le chemin donn\xE9 n'est pas un r\xE9pertoire ou n'existe pas=The specified path is not a directory or does not exist
@@ -187,10 +217,11 @@
Le r\xE9pertoire des ex\xE9cutables n'a pas encore \xE9t\xE9 pr\xE9cis\xE9 ou n'est pas valide=The executable file directory has not been specified yet or is not valid
Le segment n'est pas d\xE9fini=Segment is not defined
Les champs de la table sont les zones nomm\xE9es inconnues du syst\xE8me,\nissues du mod\xE8le Excel de rapport. Les zones nomm\xE9es connues sont \:\n\n=The fields in the table are system unknown named areas,\ncoming from the Excel report template. Known named areas are \:\n\n
+Les coordonn\xE9es pour les points de transformation doivent \xEAtre renseign\xE9s=**Les coordonn\xE9es pour les points de transformation doivent \xEAtre renseign\xE9s**
Les executables suivants manquent dans le r\xE9pertoire donn\xE9\:\n=The following executable files are missing in the specified directory\:\n
Les extremit\xE9s du segment sont confondues. Une seule trajectoire sera calcul\xE9e.\nVoulez-vous continuer ?=Segment extremities are identical. Only one path will be calculated.\nDo you want to continue ?
Les images doivent exister=Images must exist
-Les images pgm seront utilis\xE9es pour le calcul dans l'ordre ou elles sont d\xE9finies.\nUtilisez Monter/Descendre pour modifier cet ordre=Pgm images will be used for calculation following their definition order.\nPlease use Up/Down to modify this order
+Les images seront utilis\xE9es pour le calcul dans l'ordre ou elles sont d\xE9finies.\nUtilisez Monter/Descendre pour modifier cet ordre=Images will be used for calculation following their definition order.\nPlease use Up/Down to modify this order
Les images s\xE9lectionn\xE9es=Selected images
Les param\xE8tres d'orthorectification n'ont pas \xE9t\xE9 donn\xE9s=The orthorectification parameters were not specified
Les param\xE8tres de calcul n'ont pas \xE9t\xE9 donn\xE9s=The calculation parameters were not specified
@@ -209,6 +240,7 @@
Limites de la composante Vx (m/s)=Vx component magnitude thresholds (m/s)
Limites de la composante Vy (m/s)=Vy component magnitude thresholds (m/s)
Limites de la norme de vitesse (m/s)=Velocity magnitude thresholds (m/s)
+Limites=**Limites**
Liste des images=Images list
Liste des r\xE9sultats instantan\xE9s=Instantaneous results list
Liste des transects=Transects list
@@ -224,6 +256,9 @@
Min corr\xE9lation=Min correlation
Min norme de vitesse=Min velocity magnitude
Min=Min
+Mise \xE0 jour disponible=Update available
+Mise \xE0 l'\xE9chelle=**Mise \xE0 l'\xE9chelle**
+Mode d'orthorectification=**Mode d'orthorectification**
Mode=Mode
Modification des points de r\xE9f\xE9rence=Modification of the reference points
Modification des transects initiaux=Modification of the initial transects
@@ -230,6 +265,7 @@
Modification du transect=Modification of the transect
Moyenne des r\xE9sultats instantan\xE9s filtr\xE9s=Filtered instantaneous results average
Moyenne=Average
+Ne plus afficher ce dialogue=Do not show this dialog again
Niveau d'eau (m)=Water level (m)
Nombre d'images par secondes=Number of images per second
Nombre de points de r\xE9f\xE9rence < 6, tous les points doivent avoir un Z identique=Number of reference points < 6, all points must have the same Z
@@ -242,6 +278,7 @@
Nouveaux points=New points
Nouveaux=New ones
N\xB0=#
+Orthorectification compl\xE8te=**Orthorectification compl\xE8te**
Orthorectification=Orthorectification
Ouverture d'un projet=Opening a project
Param\xE8tres de calcul de d\xE9bit=Discharge calculation parameters
@@ -248,6 +285,7 @@
Param\xE8tres de calcul=Calculation parameters
Param\xE8tres de transformation=Transformation parameters
Param\xE8tres du transect=Transect parameters
+Param\xE8tres=**Param\xE8tres**
Particules (res. bruts)=Particles (raw res.)
Particules (res. filtr\xE9s)=Particles (filtered res.)
Particules (res. moy.)=Particles (ave. res.)
@@ -256,10 +294,12 @@
Pas d'interpolation=Interpolation step
Pas de r\xE9sultats disponibles pour le trac\xE9 de particules=No results available for particle tracing
Pas de temps initial=Initial time step
+Pas de translation / rotation=**Pas de translation / rotation**
Points de contr\xF4le=Check points
Points de grille=Grid points
Points de r\xE9f\xE9rence=Reference points
Points r\xE9f\xE9rence=Reference points
+Points=Points
Position I=I position
Position J et I doivent \xEAtre d\xE9finis simultan\xE9ment ou vides=J and I positions must be defined simultaneously or left empty
Position J=J position
@@ -294,6 +334,10 @@
R\xE9pertoire contenant les executables=Directory containing the executable files
R\xE9pertoire destination=Destination directory
R\xE9solution (m/pix)=Resolution (m/pix)
+R\xE9solution calcul\xE9e=**R\xE9solution calcul\xE9e**
+R\xE9solution moyenne calcul\xE9e=**R\xE9solution moyenne calcul\xE9e**
+R\xE9solution saisie=**R\xE9solution saisie**
+R\xE9solution=**R\xE9solution**
R\xE9sultat \: {0}=Result \: {0}
R\xE9sultats bruts=Raw results
R\xE9sultats du calcul=Calculation results
@@ -306,26 +350,35 @@
R\xE9sultats=Results
R\xE9sultats\: point n\xB0=Results\: point #
SA en bleu=SA in blue
+Saisie des 2 points pour la transformation=**Saisie des 2 points pour la transformation**
+Saisie des 2 points pour la translation / rotation=**Saisie des 2 points pour la translation / rotation**
+Saisie directe de la r\xE9solution=**Saisie directe de la r\xE9solution**
Saisie interactive=Interactive input
+Saisie par couples de points /=**Saisie par couples de points /**
+Saisir un couple=**Saisir un couple**
+Saisir=**Saisir**
Saisissez la position du centre=Please click center location
Sauvegarde du projet=Saving the project
Sim=Sim
Sip=Sip
+Site de mises \xE0 jour \: {0}\nLa version de Fudaa-LSPIV est \xE0 jour=Updates site \: {0}\nThe Fudaa-LSPIV version is up-to-date
Sjm=Sjm
Sjp=Sjp
Souhaitez vous remplacer les transects initiaux par ceux calcul\xE9s ?=Would you replace initial transects by those calculated ?
Stop=Stop
+Supprime les couples s\xE9lectionn\xE9s=**Supprime les couples s\xE9lectionn\xE9s**
+Supprimer=Delete
S\xE9lection d'un fichier GRP=Selection of the GRP file
S\xE9lection d'un fichier de grille=Selection of the grid file
S\xE9lection d'un fichier de parametres de calcul=Selection of the calculation parameters file
S\xE9lection d'un fichier de parametres de transformation=Selection of the transformation parameters file
S\xE9lection d'un fichier transect=Selection of the transect file
-S\xE9lection des images sources=Selection of the source images
S\xE9lectionner au moins un transect=Select at least one transect
S\xE9lectionner un transect=Select a transect
S\xE9lectionner une g\xE9om\xE9trie=Select a geometry
S\xE9lectionnez les images que vous souhaitez exporter, puis le format d'export=Select the images you want to export, then the export format
S\xE9lectionnez un calque particule=Please select a particle layer
+S\xE9lectionn\xE9 \: Calcule toutes les images pour l'affichage. Ralentit l\xE9g\xE8rement les calculs de vitesses=Selected \: Computes all images for display. Slightly reduces speed calculations
Taille de l'aire (pix)\: Doit \xEAtre un entier positif et pair=Area size (pix)\: Must be a positive and even integer
Taille de l'aire=Area size
Temps=Time
@@ -348,11 +401,13 @@
Transformation des vitesses instantan\xE9es vers l'espace r\xE9el=Transformation of instantaneous velocities to real space
Transformation interrompue=Transformation interrupted
Transformation ok=Transformation ok
+Transformation=Transformation
Transformations du rep\xE8re initial vers le rep\xE8re de calcul=Transformations from initial reference to calculation reference
Transformer les images=Transform the images
Translation=Translation
Triangulation=Meshing
Type=Type
+Un fichier vid\xE9o doit \xEAtre s\xE9lectionn\xE9 et exister=A video file must be selected and exist
Un seul fichier projet est autoris\xE9 pour le transfert=Only one project file is authorized during transfer
Un transect doit \xEAtre d\xE9fini et des r\xE9sultats moyenn\xE9s doivent exister=A transect must be specified and averaged results must exist
Une erreur de lecture s'est produite=An error while reading occurred
@@ -362,7 +417,6 @@
Verification interrompue=Verification interrupted
Vit. instantan\xE9es=Instantaneous vel.
Vit. instantan\xE9es\: point n\xB0=Instantaneous vel.\: point #
-Vit. moy. (m/s)=Ave. vel. (m/s)
Vit. moy. prof=Depth-average vel
Vit. surf. inst. brutes=Raw inst. surf. vel.
Vit. surf. inst. filtr\xE9es=Filtered inst. surf. vel.
@@ -386,6 +440,8 @@
X img=X img
X recalcul\xE9=Recalculated X
X r\xE9el=Real X
+X1=X1
+X2=X2
Xmax doit \xEAtre strictement sup\xE9rieur \xE0 Xmin=Xmax must be strictly greater than Xmin
Xmax doit \xEAtre un r\xE9el=Xmax must be a real number
Xmax=Xmax
@@ -395,6 +451,8 @@
Y img=Y img
Y recalcul\xE9=Recalculated Y
Y r\xE9el=Real Y
+Y1=Y1
+Y2=Y2
Ymax doit \xEAtre strictement sup\xE9rieur \xE0 Ymin=Ymax must be strictly greater than Ymin
Ymax doit \xEAtre un r\xE9el=Ymax must be a real number
Ymax=Ymax
@@ -404,6 +462,7 @@
Zoom initial=Initial zoom
Zoomer sur le segment=Zoom on segment
la dur\xE9e du calcul doit \xEAtre comprise entre {0} et {1}=Calculation duration must be between {0} and {1}
+rapport=**rapport**
{0} ligne(s) de courant enlev\xE9e(s) car vide(s)={0} stream line(s) removed because empty
{0} points de d\xE9part ont \xE9t\xE9 ignor\xE9s car ils sont en dehors du maillage={0} starting points was ignored because they are outside of the mesh
{0} trajectoire(s) enlev\xE9e(s) car vide(s)={0} path(s) remomved because empty
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <bma...@us...> - 2017-04-19 08:35:22
|
Revision: 9546
http://sourceforge.net/p/fudaa/svn/9546
Author: bmarchan
Date: 2017-04-19 08:35:20 +0000 (Wed, 19 Apr 2017)
Log Message:
-----------
Fix :
- Translation FR -> EN
- Debit -> Q
Modified Paths:
--------------
trunk/soft/fudaa-lspiv/distrib/src/dist/CHANGELOG.txt
trunk/soft/fudaa-lspiv/distrib/src/dist/templates/template_gauging_en.xlsx
trunk/soft/fudaa-lspiv/distrib/src/dist/templates/template_gauging_fr.xlsx
trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/PivFlowInfoPanel.java
trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/PivImplementation.java
trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/PivScalingParamPanel.java
trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/PivUpdatePanel.java
trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/action/PivExportGaugingReportAction.java
trunk/soft/fudaa-lspiv/src/main/resources/org/fudaa/fudaa/piv/piv_en.fr_txt
Modified: trunk/soft/fudaa-lspiv/distrib/src/dist/CHANGELOG.txt
===================================================================
--- trunk/soft/fudaa-lspiv/distrib/src/dist/CHANGELOG.txt 2017-04-13 22:32:30 UTC (rev 9545)
+++ trunk/soft/fudaa-lspiv/distrib/src/dist/CHANGELOG.txt 2017-04-19 08:35:20 UTC (rev 9546)
@@ -1,5 +1,14 @@
Fudaa-LSPIV
+Version 1.5.2 du xx/xx/2017
+===========================
+
+Corrections
+-----------
+
+- Le nom du fichier rapport sauvegardé (version anglaise) est a présent par défault
+ <case_name>_report.xlsx.
+
Version 1.5.1 du 13/04/2017
===========================
Modified: trunk/soft/fudaa-lspiv/distrib/src/dist/templates/template_gauging_en.xlsx
===================================================================
(Binary files differ)
Modified: trunk/soft/fudaa-lspiv/distrib/src/dist/templates/template_gauging_fr.xlsx
===================================================================
(Binary files differ)
Modified: trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/PivFlowInfoPanel.java
===================================================================
--- trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/PivFlowInfoPanel.java 2017-04-13 22:32:30 UTC (rev 9545)
+++ trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/PivFlowInfoPanel.java 2017-04-19 08:35:20 UTC (rev 9546)
@@ -58,7 +58,7 @@
case 0:
return PivResource.getS("N\xB0");
case 1:
- return PivResource.getS("<html>D\xE9bit total (m\xB3/s)</html>");
+ return PivResource.getS("<html>Q total (m\xB3/s)</html>");
case 2:
return PivResource.getS("<html>Ecart (%)</html>");
case 3:
@@ -70,9 +70,9 @@
case 6:
return PivResource.getS("<html>Ecart (%)</html>");
case 7:
- return PivResource.getS("<html>D\xE9bit mesur\xE9 (m\xB3/s)</html>");
+ return PivResource.getS("<html>Q mesur\xE9 (m\xB3/s)</html>");
case 8:
- return PivResource.getS("<html>D\xE9bit mesur\xE9 / D\xE9bit total (%)</html>");
+ return PivResource.getS("<html>Q mesur\xE9 / Q total (%)</html>");
}
}
@@ -125,6 +125,7 @@
private class DischargeCellRenderer extends DefaultTableCellRenderer {
DecimalFormat fmt = CtuluLib.getDecimalFormat(3);
DecimalFormat fmtEcart = CtuluLib.getNoEffectDecimalFormat();
+ DecimalFormat fmtQRatio = CtuluLib.getNoEffectDecimalFormat();
public DischargeCellRenderer() {
this.setHorizontalAlignment(SwingConstants.RIGHT);
@@ -133,6 +134,8 @@
fmtEcart.setMaximumFractionDigits(1);
fmtEcart.setMinimumFractionDigits(1);
fmtEcart.setPositivePrefix("+");
+ fmtQRatio.setMaximumFractionDigits(1);
+ fmtQRatio.setMinimumFractionDigits(1);
}
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
@@ -142,7 +145,9 @@
if (((Double) value).isNaN()) {
this.setText(value.toString());
}
- else if (column==2 || column==4 || column==6 || column==8)
+ else if (column==8)
+ this.setText(fmtQRatio.format((Double)value));
+ else if (column==2 || column==4 || column==6)
this.setText(fmtEcart.format((Double)value));
else
this.setText(fmt.format((Double)value));
Modified: trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/PivImplementation.java
===================================================================
--- trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/PivImplementation.java 2017-04-13 22:32:30 UTC (rev 9545)
+++ trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/PivImplementation.java 2017-04-19 08:35:20 UTC (rev 9546)
@@ -48,10 +48,12 @@
import org.fudaa.fudaa.commun.impl.FudaaStartupExitPreferencesPanel;
import org.fudaa.fudaa.piv.action.PivAutoCacheAction;
import org.fudaa.fudaa.piv.action.PivAverageFilteredResultsAction;
+import org.fudaa.fudaa.piv.action.PivChooseOrthoModeAction;
import org.fudaa.fudaa.piv.action.PivComputeFlowAction;
import org.fudaa.fudaa.piv.action.PivComputeLaunchAction;
import org.fudaa.fudaa.piv.action.PivDefineComputeParamAction;
import org.fudaa.fudaa.piv.action.PivDefineOrthoParamAction;
+import org.fudaa.fudaa.piv.action.PivDefineParamScalingAction;
import org.fudaa.fudaa.piv.action.PivExportGaugingReportAction;
import org.fudaa.fudaa.piv.action.PivExportImagesAction;
import org.fudaa.fudaa.piv.action.PivFilterInstantResultsAction;
@@ -96,7 +98,7 @@
protected static BuInformationsSoftware isPIV_ = new BuInformationsSoftware();
static {
isPIV_.name = "LSPIV";
- isPIV_.version = "1.5.1";
+ isPIV_.version = "1.5.2";
isPIV_.date = "2017-04-13";
isPIV_.rights = PivResource.getS("Tous droits r\xE9serv\xE9s")+". CEREMA (c)1999-2017";
isPIV_.license = "GPL2";
@@ -822,15 +824,15 @@
mn.add(new PivAutoCacheAction(this).buildMenuItem(EbliComponentFactory.INSTANCE));
mn.addSeparator(PivResource.getS("Orthorectification"));
-// mn.add(new PivChooseOrthoModeAction(this).buildMenuItem(EbliComponentFactory.INSTANCE));
+ mn.add(new PivChooseOrthoModeAction(this).buildMenuItem(EbliComponentFactory.INSTANCE));
-// BuMenu mnScaling=new BuMenu(PivResource.getS("Mise \xE0 l'\xE9chelle"),"MN_SCALING");
-// mnScaling.add(new PivDefineParamScalingAction(this).buildMenuItem(EbliComponentFactory.INSTANCE));
-// mnScaling.setEnabled(false);
-//
-// mn.add(mnScaling);
+ BuMenu mnScaling=new BuMenu(PivResource.getS("Mise \xE0 l'\xE9chelle"),"MN_SCALING");
+ mnScaling.add(new PivDefineParamScalingAction(this).buildMenuItem(EbliComponentFactory.INSTANCE));
+ mnScaling.setEnabled(false);
-// BuMenu mnOrtho=new BuMenu(PivResource.getS("Orthorectification"),"MN_ORTHO");
+ mn.add(mnScaling);
+
+ BuMenu mnOrtho=new BuMenu(PivResource.getS("Orthorectification"),"MN_ORTHO");
sm=new BuMenu(PivResource.getS("Points de r\xE9f\xE9rence"),"mnGRP");
bt=get2dFrame().getVisuPanel().getOrthoGRPAction().buildMenuItem(EbliComponentFactory.INSTANCE);
bt.setText(PivResource.getS("Nouveaux..."));
@@ -838,10 +840,10 @@
bt=new PivImportGRPAction((this)).buildMenuItem(EbliComponentFactory.INSTANCE);
bt.setText(PivResource.getS("Importer..."));
sm.add(bt);
-// mnOrtho.add(sm);
-// mnOrtho.add(new PivOrthoVerifyGRPAction(this));
- mn.add(sm);
- mn.add(new PivOrthoVerifyGRPAction(this));
+ mnOrtho.add(sm);
+ mnOrtho.add(new PivOrthoVerifyGRPAction(this));
+// mn.add(sm);
+// mn.add(new PivOrthoVerifyGRPAction(this));
sm=new BuMenu(PivResource.getS("Param\xE8tres de transformation"),"mnTRF",true);
bt=new PivDefineOrthoParamAction(this).buildMenuItem(EbliComponentFactory.INSTANCE);
@@ -850,10 +852,10 @@
bt=new PivImportOrthoParamAction(this).buildMenuItem(EbliComponentFactory.INSTANCE);
bt.setText(PivResource.getS("Importer..."));
sm.add(bt);
-// mnOrtho.add(sm);
-// mnOrtho.setEnabled(false);
-// mn.add(mnOrtho);
- mn.add(sm);
+ mnOrtho.add(sm);
+ mnOrtho.setEnabled(false);
+ mn.add(mnOrtho);
+// mn.add(sm);
mn.add(new PivOrthoLaunchAction(this));
Modified: trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/PivScalingParamPanel.java
===================================================================
--- trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/PivScalingParamPanel.java 2017-04-13 22:32:30 UTC (rev 9545)
+++ trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/PivScalingParamPanel.java 2017-04-19 08:35:20 UTC (rev 9546)
@@ -49,7 +49,7 @@
add(tbParams, BorderLayout.CENTER);
String helpText=PivResource.getS("<b>R\xE9solution</b><p>Vous pouvez d\xE9finir la r\xE9solution soit directement, soit en saisissant des couples de points et moyennation.<p><u>Saisie par couple de points</u> :<br>Saisissez 2 points \xE0 l'\xE9cran, puis renseignez les coordonn\xE9es ou la distance dans la table (suivant l'option choisie)<p><p>");
- helpText+=PivResource.getS("<b>Transformation</b><p>Pour d\xE9finir une transformation, Saisissez 2 points \xE0 l'\xE9cran, puis renseignez les coordonn\xE9es dans la table");
+ helpText+=PivResource.getS("<b>Transformation</b><p>Pour d\xE9finir une transformation, saisissez 2 points \xE0 l'\xE9cran, puis renseignez les coordonn\xE9es dans la table");
setHelpText("<html>"+helpText+"</html>");
}
Modified: trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/PivUpdatePanel.java
===================================================================
--- trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/PivUpdatePanel.java 2017-04-13 22:32:30 UTC (rev 9545)
+++ trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/PivUpdatePanel.java 2017-04-19 08:35:20 UTC (rev 9546)
@@ -35,7 +35,7 @@
setLayout(new VerticalLayout(10));
setBorder(BorderFactory.createEmptyBorder(5, 5, 15, 5));
- final JLabel lbLink=new JLabel(PivResource.getS("<html><a href=\"{0}\">T\xE9l\xE9chargez la version {1} de Fudaa-LSPIV</a></html>", _url.toString(), _version));
+ final JLabel lbLink=new JLabel("<html><a href=\"{" + _url.toString() + "}\">" + PivResource.getS("T\xE9l\xE9chargez la version {0} de Fudaa-LSPIV", _version) + "</a></html>");
lbLink.addMouseListener(new MouseAdapter() {
public void mouseEntered(MouseEvent me) {
lbLink.setCursor(new Cursor(Cursor.HAND_CURSOR));
Modified: trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/action/PivExportGaugingReportAction.java
===================================================================
--- trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/action/PivExportGaugingReportAction.java 2017-04-13 22:32:30 UTC (rev 9545)
+++ trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/action/PivExportGaugingReportAction.java 2017-04-19 08:35:20 UTC (rev 9546)
@@ -643,7 +643,7 @@
case 8:
val=rowIndex==flowResults.length+1? meanMeasuredDisch/meanDisch:flowResults[rowIndex].getValue(-1,ResultType.MEASURED_DISCHARGE)/flowResults[rowIndex].getDischarge();
val*=100;
- return format(fmtEcart, val,null);
+ return format(fmt1Digit, val,null);
}
}
Modified: trunk/soft/fudaa-lspiv/src/main/resources/org/fudaa/fudaa/piv/piv_en.fr_txt
===================================================================
--- trunk/soft/fudaa-lspiv/src/main/resources/org/fudaa/fudaa/piv/piv_en.fr_txt 2017-04-13 22:32:30 UTC (rev 9545)
+++ trunk/soft/fudaa-lspiv/src/main/resources/org/fudaa/fudaa/piv/piv_en.fr_txt 2017-04-19 08:35:20 UTC (rev 9546)
@@ -1,13 +1,12 @@
1 point de d\xE9part a \xE9t\xE9 ignor\xE9 car il est en dehors du maillage=1 starting point was ignored because it is outside of the mesh
-<b>R\xE9solution</b><p>Vous pouvez d\xE9finir la r\xE9solution soit directement, soit en saisissant des couples de points et moyennation.<p><u>Saisie par couple de points</u> \:<br>Saisissez 2 points \xE0 l'\xE9cran, puis renseignez les coordonn\xE9es ou la distance dans la table (suivant l'option choisie)<p><p>=**<b>R\xE9solution</b><p>Vous pouvez d\xE9finir la r\xE9solution soit directement, soit en saisissant des couples de points et moyennation.<p><u>Saisie par couple de points</u> \:<br>Saisissez 2 points \xE0 l'\xE9cran, puis renseignez les coordonn\xE9es ou la distance dans la table (suivant l'option choisie)<p><p>**
-<b>Transformation</b><p>Pour d\xE9finir une transformation, Saisissez 2 points \xE0 l'\xE9cran, puis renseignez les coordonn\xE9es dans la table=**<b>Transformation</b><p>Pour d\xE9finir une transformation, Saisissez 2 points \xE0 l'\xE9cran, puis renseignez les coordonn\xE9es dans la table**
-<html><a href\=\=**<html><a href\=\**
+<b>R\xE9solution</b><p>Vous pouvez d\xE9finir la r\xE9solution soit directement, soit en saisissant des couples de points et moyennation.<p><u>Saisie par couple de points</u> \:<br>Saisissez 2 points \xE0 l'\xE9cran, puis renseignez les coordonn\xE9es ou la distance dans la table (suivant l'option choisie)<p><p>=<b>Resolution</b><p>You can set the resolution either directly or by entering pairs of points and averaging.<p><u>By pair of points</u> \:<br>Enter 2 points on the screen and enter the coordinates or the distance in the table (depending on the option chosen)<p><p>
+<b>Transformation</b><p>Pour d\xE9finir une transformation, saisissez 2 points \xE0 l'\xE9cran, puis renseignez les coordonn\xE9es dans la table=<b>Transformation</b><p>To define a transformation, please enter 2 points on the screen and enter the coordinates in the table
<html><p>Param\xE8tres de transformation du rep\xE8re<br>initial vers le rep\xE8re de calcul</html>=<html><p>Transformation parameters from initial<br>reference to calculation reference</html>
<html>Aire mouill\xE9e (m\xB2)</html>=<html>Wetted area (m\xB2)</html>
-<html>D\xE9bit mesur\xE9 (m\xB3/s)</html>=<html>Measur.disch.(m\xB3/s))</html>
-<html>D\xE9bit mesur\xE9 / D\xE9bit total (%)</html>=<html>Measur.disch. / Total disch. (%)</html>
-<html>D\xE9bit total (m\xB3/s)</html>=<html>Total disch. (m\xB3/s)</html>
<html>Ecart (%)</html>=<html>Gap (%)</html>
+<html>Q mesur\xE9 (m\xB3/s)</html>=<html>Measured Q (m\xB3/s)</html>
+<html>Q mesur\xE9 / Q total (%)</html>=<html>Measured Q / Total Q (%)</html>
+<html>Q total (m\xB3/s)</html>=<html>Total Q (m\xB3/s)</html>
<html>Une mise \xE0 jour de Fudaa-LSPIV est disponible.<br>Cliquez sur le lien ci-dessous pour la t\xE9l\xE9charger.</html>=<html>An update of Fudaa-LSPIV is available.<br>Click the link below to download it.</html>
<html>Vit. moy. (m/s)</html>=<html>Ave. vel. (m/s)</html>
<original>=<original>
@@ -21,7 +20,7 @@
Aire d'interrogation=Interrogation area
Aire de recherche=Search area
Aire mouill\xE9e (m\xB2)=Wetted area (m\xB2)
-Ajoute un couple par saisie de 2 points=**Ajoute un couple par saisie de 2 points**
+Ajoute un couple par saisie de 2 points=Add a pair by entering 2 points
Analyse LSPIV=LSPIV analysis
Analyse des images ok=Image analysis ok
Analyse du couple d'images {0} sur {1}=Analysis of image pair {0} out of {1}
@@ -70,7 +69,7 @@
Construction des \xE9l\xE9ments=Elements construction
Contour de grille=Grid outline
Contour grille=Grid outline
-Coordonn\xE9es=**Coordonn\xE9es**
+Coordonn\xE9es=Coordinates
Correspondance impossible des indices de noeuds lors de la creation du maillage=Impossible connection of nodes indices while creating the mesh
Corr\xE9lation=Correlation
Cr\xE9ation automatique des images cache=Images cache automatic creation
@@ -85,7 +84,7 @@
Des r\xE9sultats instantan\xE9s doivent exister=Instantaneous results must exist
Des r\xE9sultats instantan\xE9s filtr\xE9s doivent exister=Filtered instantaneous results must exist
Distance d'extrapolation=Extrapolation range
-Distance=**Distance**
+Distance=Distance
Dur\xE9e d'int\xE9gration=Integration duration
D\xE9bit mesur\xE9 (m\xB3/s)=Measur.disch.(m\xB3/s)
D\xE9bit total (m\xB3/s)=Total disch. (m\xB3/s)
@@ -217,7 +216,7 @@
Le r\xE9pertoire des ex\xE9cutables n'a pas encore \xE9t\xE9 pr\xE9cis\xE9 ou n'est pas valide=The executable file directory has not been specified yet or is not valid
Le segment n'est pas d\xE9fini=Segment is not defined
Les champs de la table sont les zones nomm\xE9es inconnues du syst\xE8me,\nissues du mod\xE8le Excel de rapport. Les zones nomm\xE9es connues sont \:\n\n=The fields in the table are system unknown named areas,\ncoming from the Excel report template. Known named areas are \:\n\n
-Les coordonn\xE9es pour les points de transformation doivent \xEAtre renseign\xE9s=**Les coordonn\xE9es pour les points de transformation doivent \xEAtre renseign\xE9s**
+Les coordonn\xE9es pour les points de transformation doivent \xEAtre renseign\xE9s=The coordinates for the transformation points must be given
Les executables suivants manquent dans le r\xE9pertoire donn\xE9\:\n=The following executable files are missing in the specified directory\:\n
Les extremit\xE9s du segment sont confondues. Une seule trajectoire sera calcul\xE9e.\nVoulez-vous continuer ?=Segment extremities are identical. Only one path will be calculated.\nDo you want to continue ?
Les images doivent exister=Images must exist
@@ -240,7 +239,7 @@
Limites de la composante Vx (m/s)=Vx component magnitude thresholds (m/s)
Limites de la composante Vy (m/s)=Vy component magnitude thresholds (m/s)
Limites de la norme de vitesse (m/s)=Velocity magnitude thresholds (m/s)
-Limites=**Limites**
+Limites=Boundaries
Liste des images=Images list
Liste des r\xE9sultats instantan\xE9s=Instantaneous results list
Liste des transects=Transects list
@@ -257,8 +256,8 @@
Min norme de vitesse=Min velocity magnitude
Min=Min
Mise \xE0 jour disponible=Update available
-Mise \xE0 l'\xE9chelle=**Mise \xE0 l'\xE9chelle**
-Mode d'orthorectification=**Mode d'orthorectification**
+Mise \xE0 l'\xE9chelle=Scaling
+Mode d'orthorectification=Orthorectification mode
Mode=Mode
Modification des points de r\xE9f\xE9rence=Modification of the reference points
Modification des transects initiaux=Modification of the initial transects
@@ -278,7 +277,7 @@
Nouveaux points=New points
Nouveaux=New ones
N\xB0=#
-Orthorectification compl\xE8te=**Orthorectification compl\xE8te**
+Orthorectification compl\xE8te=Full orthorectification
Orthorectification=Orthorectification
Ouverture d'un projet=Opening a project
Param\xE8tres de calcul de d\xE9bit=Discharge calculation parameters
@@ -285,7 +284,7 @@
Param\xE8tres de calcul=Calculation parameters
Param\xE8tres de transformation=Transformation parameters
Param\xE8tres du transect=Transect parameters
-Param\xE8tres=**Param\xE8tres**
+Param\xE8tres=Parameters
Particules (res. bruts)=Particles (raw res.)
Particules (res. filtr\xE9s)=Particles (filtered res.)
Particules (res. moy.)=Particles (ave. res.)
@@ -294,7 +293,7 @@
Pas d'interpolation=Interpolation step
Pas de r\xE9sultats disponibles pour le trac\xE9 de particules=No results available for particle tracing
Pas de temps initial=Initial time step
-Pas de translation / rotation=**Pas de translation / rotation**
+Pas de translation / rotation=No translation / rotation
Points de contr\xF4le=Check points
Points de grille=Grid points
Points de r\xE9f\xE9rence=Reference points
@@ -334,10 +333,10 @@
R\xE9pertoire contenant les executables=Directory containing the executable files
R\xE9pertoire destination=Destination directory
R\xE9solution (m/pix)=Resolution (m/pix)
-R\xE9solution calcul\xE9e=**R\xE9solution calcul\xE9e**
-R\xE9solution moyenne calcul\xE9e=**R\xE9solution moyenne calcul\xE9e**
-R\xE9solution saisie=**R\xE9solution saisie**
-R\xE9solution=**R\xE9solution**
+R\xE9solution calcul\xE9e=Computed resolution
+R\xE9solution moyenne calcul\xE9e=Average computed resolution
+R\xE9solution saisie=Entered resolution
+R\xE9solution=Resolution
R\xE9sultat \: {0}=Result \: {0}
R\xE9sultats bruts=Raw results
R\xE9sultats du calcul=Calculation results
@@ -350,13 +349,13 @@
R\xE9sultats=Results
R\xE9sultats\: point n\xB0=Results\: point #
SA en bleu=SA in blue
-Saisie des 2 points pour la transformation=**Saisie des 2 points pour la transformation**
-Saisie des 2 points pour la translation / rotation=**Saisie des 2 points pour la translation / rotation**
-Saisie directe de la r\xE9solution=**Saisie directe de la r\xE9solution**
+Saisie des 2 points pour la transformation=Entering 2 points for transformation
+Saisie des 2 points pour la translation / rotation=Entering 2 points for translation / rotation
+Saisie directe de la r\xE9solution=Direct input of resolution
Saisie interactive=Interactive input
-Saisie par couples de points /=**Saisie par couples de points /**
-Saisir un couple=**Saisir un couple**
-Saisir=**Saisir**
+Saisie par couples de points /=Input by pairs of points /
+Saisir un couple=Enter a pair
+Saisir=Enter
Saisissez la position du centre=Please click center location
Sauvegarde du projet=Saving the project
Sim=Sim
@@ -366,7 +365,7 @@
Sjp=Sjp
Souhaitez vous remplacer les transects initiaux par ceux calcul\xE9s ?=Would you replace initial transects by those calculated ?
Stop=Stop
-Supprime les couples s\xE9lectionn\xE9s=**Supprime les couples s\xE9lectionn\xE9s**
+Supprime les couples s\xE9lectionn\xE9s=Removes selected pairs
Supprimer=Delete
S\xE9lection d'un fichier GRP=Selection of the GRP file
S\xE9lection d'un fichier de grille=Selection of the grid file
@@ -407,6 +406,7 @@
Translation=Translation
Triangulation=Meshing
Type=Type
+T\xE9l\xE9chargez la version {0} de Fudaa-LSPIV=Download version {0} of Fudaa-LSPIV
Un fichier vid\xE9o doit \xEAtre s\xE9lectionn\xE9 et exister=A video file must be selected and exist
Un seul fichier projet est autoris\xE9 pour le transfert=Only one project file is authorized during transfer
Un transect doit \xEAtre d\xE9fini et des r\xE9sultats moyenn\xE9s doivent exister=A transect must be specified and averaged results must exist
@@ -462,7 +462,7 @@
Zoom initial=Initial zoom
Zoomer sur le segment=Zoom on segment
la dur\xE9e du calcul doit \xEAtre comprise entre {0} et {1}=Calculation duration must be between {0} and {1}
-rapport=**rapport**
+rapport=report
{0} ligne(s) de courant enlev\xE9e(s) car vide(s)={0} stream line(s) removed because empty
{0} points de d\xE9part ont \xE9t\xE9 ignor\xE9s car ils sont en dehors du maillage={0} starting points was ignored because they are outside of the mesh
{0} trajectoire(s) enlev\xE9e(s) car vide(s)={0} path(s) remomved because empty
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|