You can subscribe to this list here.
| 2008 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(46) |
Jul
(37) |
Aug
(154) |
Sep
(140) |
Oct
(132) |
Nov
(104) |
Dec
(67) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2009 |
Jan
(113) |
Feb
(73) |
Mar
(102) |
Apr
(106) |
May
(114) |
Jun
(67) |
Jul
(116) |
Aug
(48) |
Sep
(108) |
Oct
(296) |
Nov
(56) |
Dec
(53) |
| 2010 |
Jan
(95) |
Feb
(31) |
Mar
(40) |
Apr
(12) |
May
(10) |
Jun
(27) |
Jul
(19) |
Aug
(81) |
Sep
(48) |
Oct
(45) |
Nov
(40) |
Dec
(7) |
| 2011 |
Jan
(16) |
Feb
(32) |
Mar
(55) |
Apr
(38) |
May
(24) |
Jun
(37) |
Jul
(12) |
Aug
(16) |
Sep
(97) |
Oct
(90) |
Nov
(101) |
Dec
(89) |
| 2012 |
Jan
(18) |
Feb
(2) |
Mar
(54) |
Apr
(69) |
May
(97) |
Jun
(131) |
Jul
(70) |
Aug
(48) |
Sep
(48) |
Oct
(119) |
Nov
(194) |
Dec
(60) |
| 2013 |
Jan
(73) |
Feb
(35) |
Mar
(42) |
Apr
(28) |
May
(7) |
Jun
(17) |
Jul
(27) |
Aug
(10) |
Sep
(38) |
Oct
(12) |
Nov
(4) |
Dec
(16) |
| 2014 |
Jan
(33) |
Feb
(37) |
Mar
(19) |
Apr
(3) |
May
(47) |
Jun
(26) |
Jul
(22) |
Aug
|
Sep
(10) |
Oct
(30) |
Nov
(24) |
Dec
(19) |
| 2015 |
Jan
(13) |
Feb
(16) |
Mar
(36) |
Apr
(19) |
May
(5) |
Jun
(5) |
Jul
(3) |
Aug
(11) |
Sep
(22) |
Oct
(7) |
Nov
(14) |
Dec
|
| 2016 |
Jan
|
Feb
(26) |
Mar
(13) |
Apr
(61) |
May
|
Jun
|
Jul
(4) |
Aug
|
Sep
|
Oct
(27) |
Nov
(14) |
Dec
(21) |
| 2017 |
Jan
(30) |
Feb
(4) |
Mar
(3) |
Apr
(5) |
May
(69) |
Jun
(29) |
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: <bma...@us...> - 2015-04-23 10:35:03
|
Revision: 9121
http://sourceforge.net/p/fudaa/svn/9121
Author: bmarchan
Date: 2015-04-23 10:34:56 +0000 (Thu, 23 Apr 2015)
Log Message:
-----------
Traduction
Modified Paths:
--------------
trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/PivImplementation.java
trunk/soft/fudaa-lspiv/src/main/resources/org/fudaa/fudaa/piv/piv_en.fr_txt
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-23 10:34:12 UTC (rev 9120)
+++ trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/PivImplementation.java 2015-04-23 10:34:56 UTC (rev 9121)
@@ -25,10 +25,8 @@
import javax.imageio.ImageReader;
import javax.swing.AbstractButton;
import javax.swing.ButtonGroup;
-import javax.swing.JCheckBox;
import javax.swing.JFileChooser;
import javax.swing.JFrame;
-import javax.swing.JMenuItem;
import javax.swing.JOptionPane;
import javax.swing.SwingUtilities;
import javax.swing.TransferHandler;
@@ -90,7 +88,7 @@
static {
isPIV_.name = "LSPIV";
isPIV_.version = "1.4.3";
- isPIV_.date = "2015-03-31";
+ isPIV_.date = "2015-04-23";
isPIV_.rights = PivResource.getS("Tous droits r\xE9serv\xE9s")+". CEREMA (c)1999-2015";
isPIV_.license = "GPL2";
isPIV_.languages = "en,fr";
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 2015-04-23 10:34:12 UTC (rev 9120)
+++ trunk/soft/fudaa-lspiv/src/main/resources/org/fudaa/fudaa/piv/piv_en.fr_txt 2015-04-23 10:34:56 UTC (rev 9121)
@@ -45,6 +45,7 @@
Choisir 2 points diff\xE9rents=Please choose 2 different points
Choix de la variable=Variable choice
Choix du segment=Segment choice
+Clic gauche \: Rotation de la vue\nCtrl+clic gauche \: D\xE9placement de la vue\nShift+clic gauche \: Zoom de la vue=Left click \: View rotation\nLeft Ctrl+click \: View pan\nLeft Shift+click \: View zoom
Coefficient de vitesse=Velocity coefficient
Construction des noeuds=Nodes construction
Construction des points=Points construction
@@ -61,7 +62,7 @@
Delta (valeur absolue)=Delta (absolute value)
Des points de grille existent d\xE9j\xE0.\nVoulez-vous les supprimer avant ajout des nouveaux ?=Grid points already exist.\nDo you want to remove them before adding new ones ?
Des points de grille existent d\xE9j\xE0.\nVoulez-vous les supprimer avant import des nouveaux ?=Grid points already exist.\nDo you want to remove them before importing new ones ?
-Des points existent d\xE9j\xE0. Voulez-vous les remplacer ?=Points already exist. Do you want to replace them?
+Des points existent d\xE9j\xE0.\nVoulez-vous les supprimer avant ajout des nouveaux ?=Points already exist.\nDo you want to remove them before importing new ones ?
Des r\xE9sultats instantan\xE9s doivent exister=Instantaneous results must exist
Distance d'extrapolation=Extrapolation range
Dur\xE9e d'int\xE9gration=Integration duration
@@ -81,6 +82,7 @@
Erreur de calcul du d\xE9bit du transect {0}\:\n=Error while calculating the transect {0} discharge\:\n
Erreur de filtrage des r\xE9sultats\:\n=Error while filtering the results\:\n
Erreur de reconditionnement du transect {0}\:\n=Error while repacking the transect {0}\:\n
+Erreur de reconditionnement du transect\:\n=Error while repacking the transect\:\n
Erreur de transformation de l'image {0}\:\n=Error while picture {0} transformation\:\n
Erreur de transformation des vitesses instantan\xE9es\:\n=Error while instantaneous velocities transformation\:\n
Erreur de v\xE9rification de l'orthorectification\:\n=Error while checking orthorectification\:\n
@@ -149,7 +151,7 @@
Le delta du marqueur doit \xEAtre renseign\xE9=The delta of the marker must be entered
Le fichier ne semble pas \xEAtre un projet Fudaa-LSPIV.\nCauses possibles\:\n- Le fichier n'est pas dans un format ZIP\n- Il ne contient pas le r\xE9pertoire '{0}'=The file seems not to be a Fudaa-LSPIV project.\nPotential causes\:\n- The file is not in a ZIP format\n- The file does not contain the '{0}' directory
Le niveau d'eau doit \xEAtre un r\xE9el=The water level must be a real number
-Le nombre de points doit \xEAtre au minimum de 4=The minimum number of points is 4
+Le nombre de points de r\xE9f\xE9rence doit \xEAtre au minimum de 4=The minimum number of GRP is 4
Le nombre de points doit \xEAtre sup\xE9rieur \xE0 1=The number of points must be greater than 1
Le nombre de points doit \xEAtre un entier sup\xE9rieur ou \xE9gal \xE0 2=The number of points must be an integer greater than or equal to 2
Le pas de temps {0} n'a pas \xE9t\xE9 trouv\xE9 dans les r\xE9sultats. Le pas de temps initial a \xE9t\xE9 r\xE9initialis\xE9 par d\xE9faut=The time step {0} was not found in the results. The initial time was reset to default
@@ -174,7 +176,7 @@
Les param\xE8tres et points de r\xE9f\xE9rence doivent \xEAtre renseign\xE9s=The parameters and the reference points must be specified
Les points de grille n'ont pas \xE9t\xE9 d\xE9finis=The grid points were not specified
Les points de r\xE9f\xE9rence doivent avoir \xE9t\xE9 saisis=The reference points must be specified
-Les points {0} et {1} ont des coordonn\xE9es r\xE9elles confondues=The points {0} and {1} have the same real coordinates
+Les points de r\xE9f\xE9rence {0} et {1} ont des coordonn\xE9es r\xE9elles confondues=The reference points {0} and {1} have the same real coordinates
Les transects=The transects
Lie/d\xE9lie l'image et le r\xE9sultat instantan\xE9=Bind/unbind image and instantaneous result
Ligne=Line
@@ -199,13 +201,15 @@
Modification du transect=Modification of the transect
Moyenne=Average
Niveau d'eau (m)=Water level (m)
-Nombre de points < 6, tous les points doivent avoir un Z identique=Number of points < 6, all points must have the same Z
+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
Nombre de points sur les segments 1-2/3-4=Number of points in segments 1-2/3-4
Nombre de points sur les segments 2-3/4-1=Number of points in segments 2-3/4-1
Nombre de trajectoire/lignes de courant=Number of paths/stream lines
Nouveau projet=New project
Nouveau transect=New transect
Nouveau=New
+Nouveaux points=New points
+Nouveaux=New ones
N\xB0=#
Orthorectification=Orthorectification
Ouverture d'un projet=Opening a project
@@ -244,7 +248,9 @@
Rayon de recherche=Searching radius
Rechargement des trac\xE9s de particules=Reloading of particles tracing
Reconditionnement de l'image {0} sur {1}=Repacking image {0} out of {1}
+Reconditionnement du transect ok=Transect repack ok
Reconditionnement du transect {0} ok=Transect {0] repack ok
+Reconditionnement du transectTransect repack
Reconditionnement interrompu=Repack interrupted
Reconditionnement ok=Repack ok
Reconditionnement/calcul de d\xE9bit pour le transect {0}=Repack/calculation of discharge for the transect {0}
@@ -277,6 +283,7 @@
S\xE9lection d'un fichier de grille=Selection of the grid 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
@@ -330,6 +337,7 @@
Vous devez pr\xE9ciser un nom de r\xE9pertoire=You must specify a directory name
Vous devez s\xE9lectionner 1 r\xE9sultat au moins pour la moyenne=You must select at least 1 result for the average
Vue 2D=2D view
+Vue 3D du(des) transect(s)=Transect(s) 3D view
Vue=View
V\xE9rification des points d'orthorectification=Verification of the orthorectification points
V\xE9rification des points de r\xE9f\xE9rence=Verification of the reference points
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <bma...@us...> - 2015-04-23 10:34:19
|
Revision: 9120
http://sourceforge.net/p/fudaa/svn/9120
Author: bmarchan
Date: 2015-04-23 10:34:12 +0000 (Thu, 23 Apr 2015)
Log Message:
-----------
ebli-graphe-3D : Traduction par defaut dans EbliResource
Modified Paths:
--------------
trunk/framework/ebli-common/src/main/resources/org/fudaa/ebli/ressource/ebli_en.fr_txt
trunk/framework/ebli-graphe-3D/src/main/java/org/fudaa/ebli/graphe3D/ui/panel/EG3dBtnPanel.java
Property Changed:
----------------
trunk/framework/ebli-network/
Modified: trunk/framework/ebli-common/src/main/resources/org/fudaa/ebli/ressource/ebli_en.fr_txt
===================================================================
--- trunk/framework/ebli-common/src/main/resources/org/fudaa/ebli/ressource/ebli_en.fr_txt 2015-04-21 21:34:11 UTC (rev 9119)
+++ trunk/framework/ebli-common/src/main/resources/org/fudaa/ebli/ressource/ebli_en.fr_txt 2015-04-23 10:34:12 UTC (rev 9120)
@@ -890,4 +890,20 @@
D\xE9cimation\: {0} point(s) enlev\xE9(s)=Decimation\: {0} point(s) removed
{0} objet(s) d\xE9plac\xE9(s)={0} object{s) moved
Ajouter un sommet=Add a vertex
-{0} obj. s\xE9lect.={0} selected obj.
\ No newline at end of file
+{0} obj. s\xE9lect.={0} selected obj.
+Redimensionner=Resize
+Afficher les extr\xE9mit\xE9s=Show boxe's lines
+Afficher les axes X et Y=Display x and y axis
+Afficher la grille= Display grid
+Afficher l'axe Z=Display Z axis
+Voir le maillage=Display the meshing
+Mode cach\xE9=Hidden mode
+Mode spectre=Spectrum mode
+Nuance de gris=Gray shade
+Nuance= Shade
+Mode Fog=Fog mode
+Type Wireframe=Wireframe type
+Type Surface=Surface type
+Type Nuage de points=Points fog type
+Mode contour=Contour mode
+Mode densit\xE9=Density mode
Modified: trunk/framework/ebli-graphe-3D/src/main/java/org/fudaa/ebli/graphe3D/ui/panel/EG3dBtnPanel.java
===================================================================
--- trunk/framework/ebli-graphe-3D/src/main/java/org/fudaa/ebli/graphe3D/ui/panel/EG3dBtnPanel.java 2015-04-21 21:34:11 UTC (rev 9119)
+++ trunk/framework/ebli-graphe-3D/src/main/java/org/fudaa/ebli/graphe3D/ui/panel/EG3dBtnPanel.java 2015-04-23 10:34:12 UTC (rev 9120)
@@ -19,6 +19,7 @@
import org.fudaa.ebli.graphe3D.data.EG3dSurfaceModel.PlotType;
import org.fudaa.ebli.graphe3D.renderer.EG3dDefaultDataRenderer;
import org.fudaa.ebli.graphe3D.ui.EG3dScrollablePanel;
+import org.fudaa.ebli.ressource.EbliResource;
import org.fudaa.ebli.trace.TraceLigne;
import com.memoire.bu.BuResource;
@@ -359,7 +360,8 @@
buttonGroup2.add(surfaceType);
buttonGroup2.add(contourType);
buttonGroup2.add(densityType);
- translate(BuResource.BU);
+ // Par defaut, la traduction est dans le fichier de traduction Ebli.
+ translate(EbliResource.EBLI);
}
Index: trunk/framework/ebli-network
===================================================================
--- trunk/framework/ebli-network 2015-04-21 21:34:11 UTC (rev 9119)
+++ trunk/framework/ebli-network 2015-04-23 10:34:12 UTC (rev 9120)
Property changes on: trunk/framework/ebli-network
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,4 ##
+.classpath
+.project
+target
+.settings
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <bma...@us...> - 2015-04-21 21:34:14
|
Revision: 9119
http://sourceforge.net/p/fudaa/svn/9119
Author: bmarchan
Date: 2015-04-21 21:34:11 +0000 (Tue, 21 Apr 2015)
Log Message:
-----------
Add action Delete
Modified Paths:
--------------
trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/PivImplementation.java
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-21 15:58:52 UTC (rev 9118)
+++ trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/PivImplementation.java 2015-04-21 21:34:11 UTC (rev 9119)
@@ -707,6 +707,7 @@
mn.add(get2dFrame().getVisuPanel().getEditAction().buildMenuItem(EbliComponentFactory.INSTANCE),idx++);
mn.add(get2dFrame().getVisuPanel().getDeplacementAction().buildMenuItem(EbliComponentFactory.INSTANCE),idx++);
mn.add(get2dFrame().getVisuPanel().getRotationAction().buildMenuItem(EbliComponentFactory.INSTANCE),idx++);
+ mn.add(get2dFrame().getVisuPanel().getEditor().getActionDelete().buildMenuItem(EbliComponentFactory.INSTANCE),idx++);
mn.insertSeparator(idx++);
// les menus exporter et importer sont construit dynamiquement
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <bma...@us...> - 2015-04-21 15:37:05
|
Revision: 9117
http://sourceforge.net/p/fudaa/svn/9117
Author: bmarchan
Date: 2015-04-21 15:36:56 +0000 (Tue, 21 Apr 2015)
Log Message:
-----------
Petites am?\195?\169liorations pour les ?\195?\169ditions de geometries (Formattage/nommage des colonnes X,Y)
Modified Paths:
--------------
trunk/framework/ctulu-gis/src/main/java/org/fudaa/ctulu/gis/GISZoneCollection.java
trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/edition/EbliObjetsEditorPanel.java
trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/edition/EbliObjetsMultiEditorPanel.java
trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/edition/ZCalquePointEditable.java
trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/edition/ZEditorDefault.java
trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/edition/ZModelePointEditable.java
Modified: trunk/framework/ctulu-gis/src/main/java/org/fudaa/ctulu/gis/GISZoneCollection.java
===================================================================
--- trunk/framework/ctulu-gis/src/main/java/org/fudaa/ctulu/gis/GISZoneCollection.java 2015-04-20 13:41:08 UTC (rev 9116)
+++ trunk/framework/ctulu-gis/src/main/java/org/fudaa/ctulu/gis/GISZoneCollection.java 2015-04-21 15:36:56 UTC (rev 9117)
@@ -927,17 +927,20 @@
throw new IllegalArgumentException("Au moins l'un des deux index est incoh\xE9rent.");
}
if (_index1 != _index2) {
- CtuluCommandComposite cmd = new CtuluCommandComposite();
+ CtuluCommandComposite cmd=new CtuluCommandComposite();
// Permutation des g\xE9om\xE9tries
super.switchGeometries(_index1, _index2, cmd);
// Permutation des valeurs d'attributs
- for (int i = 0; i < attr_.length; i++) {
- Object tmp = attr_[i].getObjectValueAt(_index1);
- attr_[i].setObject(_index1, attr_[i].getObjectValueAt(_index2), cmd);
- attr_[i].setObject(_index2, tmp, cmd);
+
+ if (attr_ != null) {
+ for (int i=0; i < attr_.length; i++) {
+ Object tmp=attr_[i].getObjectValueAt(_index1);
+ attr_[i].setObject(_index1, attr_[i].getObjectValueAt(_index2), cmd);
+ attr_[i].setObject(_index2, tmp, cmd);
+ }
+ fireAttributeValueChanged(-1, null, _index1, null);
+ fireAttributeValueChanged(-1, null, _index2, null);
}
- fireAttributeValueChanged(-1, null, _index1, null);
- fireAttributeValueChanged(-1, null, _index2, null);
if (_cmd != null) {
_cmd.addCmd(cmd.getSimplify());
}
Modified: trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/edition/EbliObjetsEditorPanel.java
===================================================================
--- trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/edition/EbliObjetsEditorPanel.java 2015-04-20 13:41:08 UTC (rev 9116)
+++ trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/edition/EbliObjetsEditorPanel.java 2015-04-21 15:36:56 UTC (rev 9117)
@@ -6,10 +6,12 @@
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
+
import javax.swing.JCheckBox;
+
import org.fudaa.ctulu.CtuluCommandContainer;
-import org.fudaa.ctulu.gis.GISZoneCollection;
import org.fudaa.ctulu.gui.CtuluValuesEditorPanel;
+import org.fudaa.ebli.commun.EbliCoordinateDefinition;
import org.fudaa.ebli.commun.EbliLib;
/**
@@ -23,13 +25,13 @@
/**
* Constructeur.
- * @param _zone La collection contenant les g\xE9om\xE9tries.
+ * @param _model Le mod\xE8le \xE9ditable contenant les g\xE9om\xE9tries.
* @param _idx Les indices des objets selectionn\xE9s.
* @param _cmd Le manager undo/redo
*/
- public EbliObjetsEditorPanel(final GISZoneCollection _zone, final int[] _idx, final CtuluCommandContainer _cmd) {
- super(new EbliObjetsMultiEditorPanel(_zone,_idx),_cmd);
- decorePanel(_zone.getNbGeometries()==_idx.length);
+ public EbliObjetsEditorPanel(final ZModeleEditable _model, final int[] _idx, final CtuluCommandContainer _cmd, EbliCoordinateDefinition[] _coordDefs) {
+ super(new EbliObjetsMultiEditorPanel(_model,_idx, _coordDefs),_cmd);
+ decorePanel(_model.getNombre()==_idx.length);
}
/**
Modified: trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/edition/EbliObjetsMultiEditorPanel.java
===================================================================
--- trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/edition/EbliObjetsMultiEditorPanel.java 2015-04-20 13:41:08 UTC (rev 9116)
+++ trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/edition/EbliObjetsMultiEditorPanel.java 2015-04-21 15:36:56 UTC (rev 9117)
@@ -7,10 +7,6 @@
*/
package org.fudaa.ebli.calque.edition;
-import com.memoire.bu.BuButton;
-import com.memoire.bu.BuLabel;
-import com.memoire.bu.BuResource;
-import com.memoire.bu.BuVerticalLayout;
import java.awt.BorderLayout;
import java.awt.FlowLayout;
import java.awt.event.ActionEvent;
@@ -20,15 +16,17 @@
import java.util.Comparator;
import java.util.HashMap;
import java.util.List;
+
import javax.swing.BorderFactory;
import javax.swing.JComboBox;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.event.ListSelectionEvent;
import javax.swing.event.ListSelectionListener;
+
import org.fudaa.ctulu.CtuluCommandComposite;
import org.fudaa.ctulu.collection.CtuluCollection;
-import org.fudaa.ctulu.editor.CtuluValueEditorDefaults;
+import org.fudaa.ctulu.editor.CtuluValueEditorDouble;
import org.fudaa.ctulu.editor.CtuluValueEditorI;
import org.fudaa.ctulu.gis.GISAttributeInterface;
import org.fudaa.ctulu.gis.GISAttributeModel;
@@ -37,8 +35,14 @@
import org.fudaa.ctulu.gui.CtuluValuesMultiEditorPanel;
import org.fudaa.ctulu.gui.CtuluValuesParameters;
import org.fudaa.ctulu.gui.CtuluValuesParametersDefault;
+import org.fudaa.ebli.commun.EbliCoordinateDefinition;
import org.fudaa.ebli.commun.EbliLib;
+import com.memoire.bu.BuButton;
+import com.memoire.bu.BuLabel;
+import com.memoire.bu.BuResource;
+import com.memoire.bu.BuVerticalLayout;
+
/**
* Un editeur pour les g\xE9om\xE9tries d'un calque. Permet l'\xE9dition des g\xE9om\xE9tries et leur reordonnancement.
*
@@ -55,7 +59,7 @@
* True : Seules les g\xE9om\xE9tries s\xE9lectionn\xE9es sont prisent en compte
*/
private boolean isFiltered_ = true;
- private GISZoneCollection zone_;
+ private ZModeleEditable model_;
/**
* Indice de zone vers sortable row
*/
@@ -113,13 +117,13 @@
}
/**
- * @param _zone La collection des g\xE9om\xE9tries.
+ * @param _model Le mod\xE8le \xE9ditable.
* @param _idx Les indices selectionn\xE9s.
*/
- public EbliObjetsMultiEditorPanel(GISZoneCollection _zone, final int[] _idx) {
- super(buildParams(_zone, _idx));
+ public EbliObjetsMultiEditorPanel(ZModeleEditable _model, final int[] _idx, EbliCoordinateDefinition[] _coordDefs) {
+ super(buildParams(_model.getGeomData(), _idx, _coordDefs));
- zone_ = _zone;
+ model_ = _model;
idxInitMdlSel_ = _idx;
for (Row row : rows_) {
@@ -138,7 +142,7 @@
* @param _idx Les indices selectionn\xE9s
* @return Les param\xE8tres.
*/
- private static CtuluValuesParameters buildParams(final GISZoneCollection _zone, final int[] _idx) {
+ private static CtuluValuesParameters buildParams(final GISZoneCollection _zone, final int[] _idx, EbliCoordinateDefinition[] _coordDefs) {
CtuluValuesParametersDefault params = new CtuluValuesParametersDefault();
final List<String> names = new ArrayList<String>(_zone.getNbAttributes() + 2);
@@ -149,10 +153,16 @@
if (_zone instanceof GISZoneCollectionPoint) {
GISZoneCollectionPoint ptZone = (GISZoneCollectionPoint) _zone;
- names.add("X");
- names.add("Y");
- editor.add(CtuluValueEditorDefaults.DOUBLE_EDITOR);
- editor.add(CtuluValueEditorDefaults.DOUBLE_EDITOR);
+ names.add(_coordDefs[0].getName());
+ names.add(_coordDefs[1].getName());
+ CtuluValueEditorDouble coordEditor;
+ // Editeurs X,Y respectent le formattage.
+ coordEditor=new CtuluValueEditorDouble();
+ coordEditor.setFormatter(_coordDefs[0].getFormatter().getXYFormatter());
+ editor.add(coordEditor);
+ coordEditor=new CtuluValueEditorDouble();
+ coordEditor.setFormatter(_coordDefs[1].getFormatter().getXYFormatter());
+ editor.add(coordEditor);
model.add(ptZone.createEditForX());
model.add(ptZone.createEditForY());
for (int i = 0; i < ptZone.getNbAttributes(); i++) {
@@ -200,8 +210,10 @@
* Construit les comparateurs pour chaque colonne.
*/
private void buildComparators() {
+ GISZoneCollection zone=model_.getGeomData();
+
// Pour une collection de points
- if (zone_ instanceof GISZoneCollectionPoint) {
+ if (zone instanceof GISZoneCollectionPoint) {
// Comparateur pour X
comparators_.add(new ValueRowComparator(comparators_.size(), new Comparator<Double>() {
@@ -219,8 +231,8 @@
}
}));
// Les autres comparateurs
- for (int i = 0; i < zone_.getNbAttributes(); i++) {
- final GISAttributeInterface att = zone_.getAttribute(i);
+ for (int i = 0; i < zone.getNbAttributes(); i++) {
+ final GISAttributeInterface att = zone.getAttribute(i);
// FIXME BM: G\xE9rer attribut non visible.
if (att.isEditable() && att.isUserVisible()) {
comparators_.add(new ValueRowComparator(comparators_.size(), att.getComparator()));
@@ -228,8 +240,8 @@
}
} // Pour toute autre liste
else {
- for (int i = 0; i < zone_.getNbAttributes(); i++) {
- final GISAttributeInterface att = zone_.getAttribute(i);
+ for (int i = 0; i < zone.getNbAttributes(); i++) {
+ final GISAttributeInterface att = zone.getAttribute(i);
// FIXME BM: G\xE9rer attribut non visible.
if (!att.isAtomicValue() && att.isEditable() && att.isUserVisible()) {
comparators_.add(new ValueRowComparator(comparators_.size(), att.getComparator()));
@@ -512,7 +524,7 @@
// Les lignes ont \xE9t\xE9 d\xE9plac\xE9es => Il faut d\xE9placer aussi les g\xE9om\xE9tries dans la collection.
if (initInd != irow) {
// Les g\xE9om\xE9tries sont switch\xE9es, les index initiaux aussi.
- zone_.switchGeometries(irow, initInd, cmp);
+ model_.getGeomData().switchGeometries(irow, initInd, cmp);
// Les index initiaux aussi
for (int i = irow + 1; i < rows_.size(); i++) {
SortableRow row = (SortableRow) rows_.get(i);
Modified: trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/edition/ZCalquePointEditable.java
===================================================================
--- trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/edition/ZCalquePointEditable.java 2015-04-20 13:41:08 UTC (rev 9116)
+++ trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/edition/ZCalquePointEditable.java 2015-04-21 15:36:56 UTC (rev 9117)
@@ -7,13 +7,13 @@
*/
package org.fudaa.ebli.calque.edition;
-import com.memoire.fu.FuLog;
-import com.vividsolutions.jts.geom.Geometry;
import gnu.trove.TObjectIntHashMap;
+
import java.awt.Color;
import java.awt.Font;
import java.awt.FontMetrics;
import java.awt.Graphics2D;
+
import org.apache.commons.lang.ObjectUtils;
import org.apache.commons.lang.StringUtils;
import org.fudaa.ctulu.CtuluCommandComposite;
@@ -43,6 +43,9 @@
import org.fudaa.ebli.trace.TraceIcon;
import org.nfunk.jep.Variable;
+import com.memoire.fu.FuLog;
+import com.vividsolutions.jts.geom.Geometry;
+
/**
* @author Fred Deniger
* @version $Id$
Modified: trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/edition/ZEditorDefault.java
===================================================================
--- trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/edition/ZEditorDefault.java 2015-04-20 13:41:08 UTC (rev 9116)
+++ trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/edition/ZEditorDefault.java 2015-04-21 15:36:56 UTC (rev 9117)
@@ -848,8 +848,8 @@
editSingleObject(calque);
} else {
// Plusieurs g\xE9om\xE9tries sont \xE0 \xE9diter
- EbliObjetsEditorPanel pn = new EbliObjetsEditorPanel(calque.getModelEditable().getGeomData(),
- calque.getLayerSelection().getSelectedIndex(), getMng());
+ EbliObjetsEditorPanel pn = new EbliObjetsEditorPanel(calque.getModelEditable(),
+ calque.getLayerSelection().getSelectedIndex(), getMng(), getCoordinateDefinitions());
// if (calque.getModelEditable().getGeomData() instanceof GISZoneCollectionPoint)
// pn=GISGuiBuilder.buildFor((GISZoneCollectionPoint)calque.getModelEditable().getGeomData(), calque.getLayerSelection()
// .getSelectedIndex(), getMng());
Modified: trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/edition/ZModelePointEditable.java
===================================================================
--- trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/edition/ZModelePointEditable.java 2015-04-20 13:41:08 UTC (rev 9116)
+++ trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/edition/ZModelePointEditable.java 2015-04-21 15:36:56 UTC (rev 9117)
@@ -255,6 +255,7 @@
_d.put(EbliLib.getS("Nombre de points"), CtuluLibString.getString(getNombre()));
final int nb = _layer.isSelectionEmpty() ? 0 : _layer.getLayerSelection().getNbSelectedIndex();
_d.put(EbliLib.getS("Nombre de points s\xE9lectionn\xE9s"), CtuluLibString.getString(nb));
+ // 2 points
if (nb == 2) {
final int i = _layer.getLayerSelection().getMaxIndex();
final int i2 = _layer.getLayerSelection().getMinIndex();
@@ -262,9 +263,13 @@
CtuluLib.DEFAULT_NUMBER_FORMAT.format(CtuluLibGeometrie.getDistance(getX(i), getY(i), getX(i2), getY(i2))));
return;
}
+ // Plusieurs points
if (nb != 1) {
return;
}
+ // 1 point
+ _d.put("X", ""+getX(_layer.getLayerSelection().getMaxIndex()));
+ _d.put("Y", ""+getY(_layer.getLayerSelection().getMaxIndex()));
final int idxNode = _layer.getLayerSelection().getMaxIndex();
_d.setTitle(EbliLib.getS("Point {0}", CtuluLibString.getString(idxNode + 1)));
final GISZoneCollection model = getGeomData();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <bma...@us...> - 2015-04-20 13:41:16
|
Revision: 9116
http://sourceforge.net/p/fudaa/svn/9116
Author: bmarchan
Date: 2015-04-20 13:41:08 +0000 (Mon, 20 Apr 2015)
Log Message:
-----------
Correction sur rotation/deplacement
Modified Paths:
--------------
trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/layer/PivCntGridModel.java
trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/layer/PivOrthoPointsModel.java
trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/layer/PivTransectModel.java
Modified: trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/layer/PivCntGridModel.java
===================================================================
--- trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/layer/PivCntGridModel.java 2015-04-20 13:40:26 UTC (rev 9115)
+++ trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/layer/PivCntGridModel.java 2015-04-20 13:41:08 UTC (rev 9116)
@@ -1,6 +1,8 @@
package org.fudaa.fudaa.piv.layer;
import org.fudaa.ctulu.CtuluAnalyze;
+import org.fudaa.ctulu.CtuluCommandContainer;
+import org.fudaa.ctulu.CtuluListSelectionInterface;
import org.fudaa.ctulu.gis.GISAttribute;
import org.fudaa.ctulu.gis.GISAttributeModelObjectArray;
import org.fudaa.ctulu.gis.GISZoneCollectionLigneBrisee;
@@ -25,6 +27,8 @@
// public static final GISAttributeInteger ATT_IND_COL=new GISAttributeInteger("color",false);
// Le projet.
PivProject prj_;
+ /** Pour empecher les evenements cycliques */
+ protected boolean eventEnabled_=true;
/**
* Constructeur.
@@ -53,47 +57,78 @@
prj_=_prj;
update();
}
+
+ @Override
+ public boolean moveGlobal(CtuluListSelectionInterface _selection, double _dx, double _dy, double _dz, CtuluCommandContainer _cmd) {
+ boolean b=super.moveGlobal(_selection, _dx, _dy, _dz, _cmd);
+ geometryChanged(null);
+ return b;
+ }
+ @Override
+ public boolean rotateGlobal(CtuluListSelectionInterface _selection, double _angRad, double _xreel0, double _yreel0, CtuluCommandContainer _cmd) {
+ boolean b=super.rotateGlobal(_selection, _angRad, _xreel0, _yreel0, _cmd);
+ geometryChanged(null);
+ return b;
+ }
+
/**
* Remise a jour du mod\xE8le depuis le projet.
*/
public void update() {
- GISZoneCollectionLigneBrisee zl=(GISZoneCollectionLigneBrisee)getGeomData();
- zl.removeAll(null);
+ if (!eventEnabled_) return;
+ eventEnabled_=false;
- if (prj_.getComputeCntGrid()!=null) {
- GrPolygone pl=prj_.getComputeCntGrid().getContour();
- this.addGeometry(pl, null, null, null);
-
- // Les labels
- GISAttributeModelObjectArray lbData = (GISAttributeModelObjectArray) PivVisuPanel.ATT_LABEL.createDataForGeom(null, pl.nombre()+1);
- for (int i=0; i<lbData.getSize(); i++) {
- lbData.set(i, "P"+(i+1));
+ try {
+ GISZoneCollectionLigneBrisee zl=(GISZoneCollectionLigneBrisee) getGeomData();
+ zl.removeAll(null);
+
+ if (prj_.getComputeCntGrid() != null) {
+ GrPolygone pl=prj_.getComputeCntGrid().getContour();
+ this.addGeometry(pl, null, null, null);
+
+ // Les labels
+ GISAttributeModelObjectArray lbData=(GISAttributeModelObjectArray) PivVisuPanel.ATT_LABEL.createDataForGeom(null, pl.nombre() + 1);
+ for (int i=0; i < lbData.getSize(); i++) {
+ lbData.set(i, "P" + (i + 1));
+ }
+ zl.getModel(PivVisuPanel.ATT_LABEL).setObject(0, lbData, null);
}
- zl.getModel(PivVisuPanel.ATT_LABEL) .setObject(0, lbData, null);
}
+ finally {
+ eventEnabled_=true;
+ }
}
/**
- * Appel\xE9 en cas d'\xE9dition de la g\xE9om\xE9trie => On remet a jour le projet
+ * Appel\xE9 en cas de modification de g\xE9om\xE9tries => On remet a jour le projet pour la selection.
+ * @param _sel <code>null</code> : Toutes les g\xE9om\xE9tries doivent \xEAtre remises \xE0 jour.
*/
@Override
public void geometryChanged(int[] _sel) {
- GISZoneCollectionLigneBrisee zp=(GISZoneCollectionLigneBrisee)getGeomData();
+ if (!eventEnabled_) return;
+ eventEnabled_=false;
- CoordinateSequence seq=zp.getCoordinateSequence(0);
+ try {
+ GISZoneCollectionLigneBrisee zp=(GISZoneCollectionLigneBrisee) getGeomData();
- int nbPts=seq.size();
- if (isGeometryFermee(0)) {
- nbPts--;
+ CoordinateSequence seq=zp.getCoordinateSequence(0);
+
+ int nbPts=seq.size();
+ if (isGeometryFermee(0)) {
+ nbPts--;
+ }
+
+ GrPolygone pl=new GrPolygone();
+ for (int i=0; i < nbPts; i++) {
+ pl.sommets_.ajoute(seq.getX(i), seq.getY(i), 0);
+ }
+ PivCntGrid cnt=prj_.getComputeCntGrid();
+ cnt.setContour(pl);
+ prj_.setComputeCntGrid(cnt);
}
-
- GrPolygone pl=new GrPolygone();
- for (int i=0; i<nbPts; i++) {
- pl.sommets_.ajoute(seq.getX(i),seq.getY(i),0);
+ finally {
+ eventEnabled_=true;
}
- PivCntGrid cnt=prj_.getComputeCntGrid();
- cnt.setContour(pl);
- prj_.setComputeCntGrid(cnt);
}
}
Modified: trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/layer/PivOrthoPointsModel.java
===================================================================
--- trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/layer/PivOrthoPointsModel.java 2015-04-20 13:40:26 UTC (rev 9115)
+++ trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/layer/PivOrthoPointsModel.java 2015-04-20 13:41:08 UTC (rev 9116)
@@ -3,6 +3,8 @@
import java.awt.Dimension;
import org.fudaa.ctulu.CtuluAnalyze;
+import org.fudaa.ctulu.CtuluCommandContainer;
+import org.fudaa.ctulu.CtuluListSelectionInterface;
import org.fudaa.ctulu.gis.GISAttribute;
import org.fudaa.ctulu.gis.GISAttributeDouble;
import org.fudaa.ctulu.gis.GISAttributeModelDoubleArray;
@@ -65,6 +67,8 @@
PivProject prj_;
/** Le type de mod\xE8le */
int type_=PivVisuPanel.MODE_ORIGINAL_VIEW;
+ /** Pour empecher les evenements cycliques */
+ protected boolean eventEnabled_=true;
/**
* Construction du mod\xE8le.
@@ -140,117 +144,148 @@
prj_=_prj;
update();
}
+
+ @Override
+ public boolean moveGeometries(CtuluListSelectionInterface _selection, double _dx, double _dy, double _dz, CtuluCommandContainer _cmd) {
+ boolean b=super.moveGeometries(_selection, _dx, _dy, _dz, _cmd);
+ geometryChanged(null);
+ return b;
+ }
+ @Override
+ public boolean rotateGeometries(CtuluListSelectionInterface _selection, double _angRad, double _xreel0, double _yreel0, CtuluCommandContainer _cmd) {
+ boolean b=super.rotateGeometries(_selection, _angRad, _xreel0, _yreel0, _cmd);
+ geometryChanged(null);
+ return b;
+ }
+
/**
* Met a jour le mod\xE8le en fonction des points d'orthorectification.
*/
public void update() {
- Dimension imgSize=prj_.getSrcImageSize();
+ if (!eventEnabled_) return;
+ eventEnabled_=false;
- GISZoneCollectionMultiPoint zp=(GISZoneCollectionMultiPoint)getGeomData();
- zp.removeAll(null);
+ try {
+ Dimension imgSize=prj_.getSrcImageSize();
- if (prj_.getOrthoPoints()!=null) {
- PivOrthoPoint[] pts=prj_.getOrthoPoints();
+ GISZoneCollectionMultiPoint zp=(GISZoneCollectionMultiPoint) getGeomData();
+ zp.removeAll(null);
- // En espace image
- if (type_ == PivVisuPanel.MODE_ORIGINAL_VIEW) {
- GISAttributeModelDoubleArray xrData = (GISAttributeModelDoubleArray) ATT_IND_XR.createDataForGeom(null, pts.length);
- GISAttributeModelDoubleArray yrData = (GISAttributeModelDoubleArray) ATT_IND_YR.createDataForGeom(null, pts.length);
- GISAttributeModelDoubleArray zrData = (GISAttributeModelDoubleArray) PivVisuPanel.ATT_IND_ZR.createDataForGeom(null, pts.length);
- GISAttributeModelObjectArray lbData = (GISAttributeModelObjectArray) PivVisuPanel.ATT_LABEL.createDataForGeom(null, pts.length);
+ if (prj_.getOrthoPoints() != null) {
+ PivOrthoPoint[] pts=prj_.getOrthoPoints();
- CoordinateSequence seq = GISGeometryFactory.INSTANCE.getCoordinateSequenceFactory().create(pts.length, 2);
- for (int i = 0; i < pts.length; i++) {
- seq.setOrdinate(i, 0, pts[i].getImgPoint().x_);
- seq.setOrdinate(i, 1, imgSize.height - pts[i].getImgPoint().y_);
+ // En espace image
+ if (type_ == PivVisuPanel.MODE_ORIGINAL_VIEW) {
+ GISAttributeModelDoubleArray xrData=(GISAttributeModelDoubleArray) ATT_IND_XR.createDataForGeom(null, pts.length);
+ GISAttributeModelDoubleArray yrData=(GISAttributeModelDoubleArray) ATT_IND_YR.createDataForGeom(null, pts.length);
+ GISAttributeModelDoubleArray zrData=(GISAttributeModelDoubleArray) PivVisuPanel.ATT_IND_ZR.createDataForGeom(null, pts.length);
+ GISAttributeModelObjectArray lbData=(GISAttributeModelObjectArray) PivVisuPanel.ATT_LABEL.createDataForGeom(null, pts.length);
- xrData.set(i, new Double(pts[i].getRealPoint().x_));
- yrData.set(i, new Double(pts[i].getRealPoint().y_));
- zrData.set(i, new Double(pts[i].getRealPoint().z_));
- lbData.set(i, "P"+(i+1));
+ CoordinateSequence seq=GISGeometryFactory.INSTANCE.getCoordinateSequenceFactory().create(pts.length, 2);
+ for (int i=0; i < pts.length; i++) {
+ seq.setOrdinate(i, 0, pts[i].getImgPoint().x_);
+ seq.setOrdinate(i, 1, imgSize.height - pts[i].getImgPoint().y_);
+
+ xrData.set(i, new Double(pts[i].getRealPoint().x_));
+ yrData.set(i, new Double(pts[i].getRealPoint().y_));
+ zrData.set(i, new Double(pts[i].getRealPoint().z_));
+ lbData.set(i, "P" + (i + 1));
+ }
+
+ GISMultiPoint mp=(GISMultiPoint) GISGeometryFactory.INSTANCE.createMultiPoint(seq);
+ zp.addGeometry(mp, null, null);
+
+ // Les valeurs d'attributs
+ zp.getModel(ATT_IND_XR).setObject(0, xrData, null);
+ zp.getModel(ATT_IND_YR).setObject(0, yrData, null);
+ zp.getModel(PivVisuPanel.ATT_IND_ZR).setObject(0, zrData, null);
+ zp.getModel(PivVisuPanel.ATT_LABEL).setObject(0, lbData, null);
}
- GISMultiPoint mp = (GISMultiPoint) GISGeometryFactory.INSTANCE.createMultiPoint(seq);
- zp.addGeometry(mp, null, null);
+ // En espace r\xE9el
+ else {
+ GISAttributeModelDoubleArray xiData=(GISAttributeModelDoubleArray) ATT_IND_XI.createDataForGeom(null, pts.length);
+ GISAttributeModelDoubleArray yiData=(GISAttributeModelDoubleArray) ATT_IND_YI.createDataForGeom(null, pts.length);
+ GISAttributeModelDoubleArray zrData=(GISAttributeModelDoubleArray) PivVisuPanel.ATT_IND_ZR.createDataForGeom(null, pts.length);
+ GISAttributeModelObjectArray lbData=(GISAttributeModelObjectArray) PivVisuPanel.ATT_LABEL.createDataForGeom(null, pts.length);
- // Les valeurs d'attributs
- zp.getModel(ATT_IND_XR).setObject(0, xrData, null);
- zp.getModel(ATT_IND_YR).setObject(0, yrData, null);
- zp.getModel(PivVisuPanel.ATT_IND_ZR).setObject(0, zrData, null);
- zp.getModel(PivVisuPanel.ATT_LABEL) .setObject(0, lbData, null);
- }
+ CoordinateSequence seq=GISGeometryFactory.INSTANCE.getCoordinateSequenceFactory().create(pts.length, 2);
+ for (int i=0; i < pts.length; i++) {
+ seq.setOrdinate(i, 0, pts[i].getRealPoint().x_);
+ seq.setOrdinate(i, 1, pts[i].getRealPoint().y_);
- // En espace r\xE9el
- else {
- GISAttributeModelDoubleArray xiData = (GISAttributeModelDoubleArray) ATT_IND_XI.createDataForGeom(null, pts.length);
- GISAttributeModelDoubleArray yiData = (GISAttributeModelDoubleArray) ATT_IND_YI.createDataForGeom(null, pts.length);
- GISAttributeModelDoubleArray zrData = (GISAttributeModelDoubleArray) PivVisuPanel.ATT_IND_ZR.createDataForGeom(null, pts.length);
- GISAttributeModelObjectArray lbData = (GISAttributeModelObjectArray) PivVisuPanel.ATT_LABEL.createDataForGeom(null, pts.length);
+ xiData.set(i, new Double(pts[i].getImgPoint().x_));
+ yiData.set(i, new Double(imgSize.height - pts[i].getImgPoint().y_));
+ zrData.set(i, new Double(pts[i].getRealPoint().z_));
+ lbData.set(i, "P" + (i + 1));
+ }
- CoordinateSequence seq = GISGeometryFactory.INSTANCE.getCoordinateSequenceFactory().create(pts.length, 2);
- for (int i = 0; i < pts.length; i++) {
- seq.setOrdinate(i, 0, pts[i].getRealPoint().x_);
- seq.setOrdinate(i, 1, pts[i].getRealPoint().y_);
+ GISMultiPoint mp=(GISMultiPoint) GISGeometryFactory.INSTANCE.createMultiPoint(seq);
+ zp.addGeometry(mp, null, null);
- xiData.set(i, new Double(pts[i].getImgPoint().x_));
- yiData.set(i, new Double(imgSize.height - pts[i].getImgPoint().y_));
- zrData.set(i, new Double(pts[i].getRealPoint().z_));
- lbData.set(i, "P"+(i+1));
+ // Les valeurs d'attributs
+ zp.getModel(ATT_IND_XI).setObject(0, xiData, null);
+ zp.getModel(ATT_IND_YI).setObject(0, yiData, null);
+ zp.getModel(PivVisuPanel.ATT_IND_ZR).setObject(0, zrData, null);
+ zp.getModel(PivVisuPanel.ATT_LABEL).setObject(0, lbData, null);
}
-
- GISMultiPoint mp = (GISMultiPoint) GISGeometryFactory.INSTANCE.createMultiPoint(seq);
- zp.addGeometry(mp, null, null);
-
- // Les valeurs d'attributs
- zp.getModel(ATT_IND_XI).setObject(0, xiData, null);
- zp.getModel(ATT_IND_YI).setObject(0, yiData, null);
- zp.getModel(PivVisuPanel.ATT_IND_ZR).setObject(0, zrData, null);
- zp.getModel(PivVisuPanel.ATT_LABEL) .setObject(0, lbData, null);
}
}
+ finally {
+ eventEnabled_=true;
+ }
}
- /**
- * Appel\xE9 quand la g\xE9om\xE9trie a \xE9t\xE9 modifi\xE9e par l'editeur.
+ /**
+ * Appel\xE9 en cas de modification de g\xE9om\xE9tries => On remet a jour le projet pour la selection.
+ * @param _sel <code>null</code> : Toutes les g\xE9om\xE9tries doivent \xEAtre remises \xE0 jour.
*/
@Override
public void geometryChanged(int[] _sel) {
- Dimension imgSize=prj_.getSrcImageSize();
+ if (!eventEnabled_) return;
+ eventEnabled_=false;
- GISZoneCollectionMultiPoint zp=(GISZoneCollectionMultiPoint)getGeomData();
- GISMultiPoint mp=(GISMultiPoint)getGeomData().getGeometry(0);
+ try {
+ Dimension imgSize=prj_.getSrcImageSize();
- CoordinateSequence seq=mp.getCoordinateSequence();
+ GISZoneCollectionMultiPoint zp=(GISZoneCollectionMultiPoint) getGeomData();
+ GISMultiPoint mp=(GISMultiPoint) getGeomData().getGeometry(0);
- PivOrthoPoint[] pts=new PivOrthoPoint[seq.size()];
+ CoordinateSequence seq=mp.getCoordinateSequence();
- // En espace image
- if (type_==PivVisuPanel.MODE_ORIGINAL_VIEW) {
- GISAttributeModelDoubleArray xrData=(GISAttributeModelDoubleArray) zp.getModel(ATT_IND_XR).getObjectValueAt(0);
- GISAttributeModelDoubleArray yrData=(GISAttributeModelDoubleArray) zp.getModel(ATT_IND_YR).getObjectValueAt(0);
- GISAttributeModelDoubleArray zrData=(GISAttributeModelDoubleArray) zp.getModel(PivVisuPanel.ATT_IND_ZR).getObjectValueAt(0);
+ PivOrthoPoint[] pts=new PivOrthoPoint[seq.size()];
- for (int i=0; i<pts.length; i++) {
- GrPoint imgPt=new GrPoint(seq.getX(i), imgSize.height-seq.getY(i), 0);
- GrPoint realPt=new GrPoint(xrData.getValue(i),yrData.getValue(i),zrData.getValue(i));
- pts[i]=new PivOrthoPoint(realPt, imgPt);
+ // En espace image
+ if (type_ == PivVisuPanel.MODE_ORIGINAL_VIEW) {
+ GISAttributeModelDoubleArray xrData=(GISAttributeModelDoubleArray) zp.getModel(ATT_IND_XR).getObjectValueAt(0);
+ GISAttributeModelDoubleArray yrData=(GISAttributeModelDoubleArray) zp.getModel(ATT_IND_YR).getObjectValueAt(0);
+ GISAttributeModelDoubleArray zrData=(GISAttributeModelDoubleArray) zp.getModel(PivVisuPanel.ATT_IND_ZR).getObjectValueAt(0);
+
+ for (int i=0; i < pts.length; i++) {
+ GrPoint imgPt=new GrPoint(seq.getX(i), imgSize.height - seq.getY(i), 0);
+ GrPoint realPt=new GrPoint(xrData.getValue(i), yrData.getValue(i), zrData.getValue(i));
+ pts[i]=new PivOrthoPoint(realPt, imgPt);
+ }
}
- }
- // En espace r\xE9el
- else {
- GISAttributeModelDoubleArray xiData=(GISAttributeModelDoubleArray) zp.getModel(ATT_IND_XI).getObjectValueAt(0);
- GISAttributeModelDoubleArray yiData=(GISAttributeModelDoubleArray) zp.getModel(ATT_IND_YI).getObjectValueAt(0);
- GISAttributeModelDoubleArray zrData=(GISAttributeModelDoubleArray) zp.getModel(PivVisuPanel.ATT_IND_ZR).getObjectValueAt(0);
+ // En espace r\xE9el
+ else {
+ GISAttributeModelDoubleArray xiData=(GISAttributeModelDoubleArray) zp.getModel(ATT_IND_XI).getObjectValueAt(0);
+ GISAttributeModelDoubleArray yiData=(GISAttributeModelDoubleArray) zp.getModel(ATT_IND_YI).getObjectValueAt(0);
+ GISAttributeModelDoubleArray zrData=(GISAttributeModelDoubleArray) zp.getModel(PivVisuPanel.ATT_IND_ZR).getObjectValueAt(0);
- for (int i=0; i<pts.length; i++) {
- GrPoint imgPt=new GrPoint(xiData.getValue(i),imgSize.height-yiData.getValue(i),0);
- GrPoint realPt=new GrPoint(seq.getX(i), seq.getY(i), zrData.getValue(i));
- pts[i]=new PivOrthoPoint(realPt, imgPt);
+ for (int i=0; i < pts.length; i++) {
+ GrPoint imgPt=new GrPoint(xiData.getValue(i), imgSize.height - yiData.getValue(i), 0);
+ GrPoint realPt=new GrPoint(seq.getX(i), seq.getY(i), zrData.getValue(i));
+ pts[i]=new PivOrthoPoint(realPt, imgPt);
+ }
}
+
+ prj_.setOrthoPoints(pts);
}
-
- prj_.setOrthoPoints(pts);
+ finally {
+ eventEnabled_=true;
+ }
}
}
Modified: trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/layer/PivTransectModel.java
===================================================================
--- trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/layer/PivTransectModel.java 2015-04-20 13:40:26 UTC (rev 9115)
+++ trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/layer/PivTransectModel.java 2015-04-20 13:41:08 UTC (rev 9116)
@@ -5,6 +5,7 @@
import java.util.List;
import org.fudaa.ctulu.CtuluCommandContainer;
+import org.fudaa.ctulu.CtuluListSelectionInterface;
import org.fudaa.ctulu.gis.GISAttribute;
import org.fudaa.ctulu.gis.GISAttributeInterface;
import org.fudaa.ctulu.gis.GISZoneCollectionLigneBrisee;
@@ -35,6 +36,8 @@
PivProject prj_;
/** Les attributs de la collection */
private GISAttribute[] attrs_ = new GISAttribute[]{PivVisuPanel.ATT_IND_ZR, PivVisuPanel.ATT_INTER, PivVisuPanel.ATT_RAYON, PivVisuPanel.ATT_COEF_VIT};
+ /** Pour empecher les evenements cycliques */
+ protected boolean eventEnabled_=true;
class AttributeDataAdapter implements ZEditionAttributesDataI {
PivTransect trans_;
@@ -111,23 +114,31 @@
prj_=_prj;
update();
}
-
+
/**
* Remise a jour du mod\xE8le depuis le projet.
*/
public void update() {
- GISZoneCollectionLigneBrisee zl=(GISZoneCollectionLigneBrisee)getGeomData();
- zl.removeAll(null);
+ if (!eventEnabled_) return;
+ eventEnabled_=false;
+
+ try {
+ GISZoneCollectionLigneBrisee zl=(GISZoneCollectionLigneBrisee) getGeomData();
+ zl.removeAll(null);
- PivTransect[] trans=prj_.getTransects();
- if (trans!=null) {
- for (int i=0; i<trans.length; i++) {
- GrPolyligne pl=trans[i].getStraight();
- this.addGeometry(pl, null, null, new AttributeDataAdapter(trans[i]));
- // Initialisation du Z.
- zl.initZAttribute(i);
+ PivTransect[] trans=prj_.getTransects();
+ if (trans != null) {
+ for (int i=0; i < trans.length; i++) {
+ GrPolyligne pl=trans[i].getStraight();
+ this.addGeometry(pl, null, null, new AttributeDataAdapter(trans[i]));
+ // Initialisation du Z.
+ zl.initZAttribute(i);
+ }
}
}
+ finally {
+ eventEnabled_=true;
+ }
}
@Override
@@ -150,38 +161,66 @@
return true;
}
+ @Override
+ public boolean moveGlobal(CtuluListSelectionInterface _selection, double _dx, double _dy, double _dz, CtuluCommandContainer _cmd) {
+ boolean b=super.moveGlobal(_selection, _dx, _dy, _dz, _cmd);
+ geometryChanged(null);
+ return b;
+ }
+
+ @Override
+ public boolean rotateGlobal(CtuluListSelectionInterface _selection, double _angRad, double _xreel0, double _yreel0, CtuluCommandContainer _cmd) {
+ boolean b=super.rotateGlobal(_selection, _angRad, _xreel0, _yreel0, _cmd);
+ geometryChanged(null);
+ return b;
+ }
+
/**
- * Appel\xE9 en cas d'\xE9dition de la g\xE9om\xE9trie => On remet a jour le projet
+ * Appel\xE9 en cas de modification de g\xE9om\xE9tries => On remet a jour le projet pour la selection.
+ * @param _sel <code>null</code> : Toutes les g\xE9om\xE9tries doivent \xEAtre remises \xE0 jour.
*/
@Override
public void geometryChanged(int[] _sel) {
-
- PivTransect[] trans=prj_.getTransects();
- GISZoneCollectionLigneBrisee zp=(GISZoneCollectionLigneBrisee)getGeomData();
-
- if (zp.getNbGeometries() != 0) {
- for (int i = 0; i < _sel.length; i++) {
- zp.initZCoordinate(_sel[i]);
+ if (!eventEnabled_) return;
+ eventEnabled_=false;
- CoordinateSequence seq = zp.getCoordinateSequence(_sel[i]);
- int nbPts = seq.size();
+ try {
+ PivTransect[] trans=prj_.getTransects();
+ GISZoneCollectionLigneBrisee zp=(GISZoneCollectionLigneBrisee) getGeomData();
- GrPolyligne pl = new GrPolyligne();
- for (int j = 0; j < nbPts; j++) {
- pl.sommets_.ajoute(seq.getOrdinate(j, 0), seq.getOrdinate(j, 1), seq.getOrdinate(j, 2));
+ if (_sel == null) {
+ _sel=new int[zp.getNbGeometries()];
+ for (int i=0; i < _sel.length; i++)
+ _sel[i]=i;
+ }
+
+ if (zp.getNbGeometries() != 0) {
+ for (int i=0; i < _sel.length; i++) {
+ zp.initZCoordinate(_sel[i]);
+
+ CoordinateSequence seq=zp.getCoordinateSequence(_sel[i]);
+ int nbPts=seq.size();
+
+ GrPolyligne pl=new GrPolyligne();
+ for (int j=0; j < nbPts; j++) {
+ pl.sommets_.ajoute(seq.getOrdinate(j, 0), seq.getOrdinate(j, 1), seq.getOrdinate(j, 2));
+ }
+
+ PivTransectParams params=new PivTransectParams();
+ params.setInterpolationStep(zp.getDoubleValue(zp.getIndiceOf(PivVisuPanel.ATT_INTER), _sel[i]));
+ params.setRadius(zp.getDoubleValue(zp.getIndiceOf(PivVisuPanel.ATT_RAYON), _sel[i]));
+ params.setSurfaceCoef(zp.getDoubleValue(zp.getIndiceOf(PivVisuPanel.ATT_COEF_VIT), _sel[i]));
+
+ trans[_sel[i]].setStraight(pl);
+ trans[_sel[i]].setParams(params);
}
-
- PivTransectParams params=new PivTransectParams();
- params.setInterpolationStep(zp.getDoubleValue(zp.getIndiceOf(PivVisuPanel.ATT_INTER), _sel[i]));
- params.setRadius(zp.getDoubleValue(zp.getIndiceOf(PivVisuPanel.ATT_RAYON), _sel[i]));
- params.setSurfaceCoef(zp.getDoubleValue(zp.getIndiceOf(PivVisuPanel.ATT_COEF_VIT), _sel[i]));
-
- trans[_sel[i]].setStraight(pl);
- trans[_sel[i]].setParams(params);
}
+
+ prj_.setTransects(trans);
}
-
- prj_.setTransects(trans);
+ finally {
+ eventEnabled_=true;
+ }
}
@Override
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <bma...@us...> - 2015-04-20 13:40:29
|
Revision: 9115
http://sourceforge.net/p/fudaa/svn/9115
Author: bmarchan
Date: 2015-04-20 13:40:26 +0000 (Mon, 20 Apr 2015)
Log Message:
-----------
Palettes rotation+deplacement retaillables
Modified Paths:
--------------
trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/action/SceneDeplacementAction.java
trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/action/SceneRotationAction.java
trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/edition/BPaletteDeplacement.java
Modified: trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/action/SceneDeplacementAction.java
===================================================================
--- trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/action/SceneDeplacementAction.java 2015-04-20 09:44:41 UTC (rev 9114)
+++ trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/action/SceneDeplacementAction.java 2015-04-20 13:40:26 UTC (rev 9115)
@@ -45,6 +45,7 @@
*/
public SceneDeplacementAction(final TreeSelectionModel _m, final ZEditorDefault _editor, EbliFormatterInterface _formatter, ZCalqueDeplacementInteraction _cqDep) {
super(EbliLib.getS("D\xE9placer des objets"), EbliResource.EBLI.getToolIcon("fleche-deplacement"), "GLOBAL_MOVE", _m);
+ setResizable(true);
formatter_=_formatter;
pnCalques_=_editor.getPanel();
// Pour capter l'activation d'un autre calque.
Modified: trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/action/SceneRotationAction.java
===================================================================
--- trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/action/SceneRotationAction.java 2015-04-20 09:44:41 UTC (rev 9114)
+++ trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/action/SceneRotationAction.java 2015-04-20 13:40:26 UTC (rev 9115)
@@ -33,6 +33,7 @@
*/
public SceneRotationAction(final TreeSelectionModel _m, final ZEditorInterface _editor, ZSceneEditor _sceneEditor, EbliFormatterInterface _formatter) {
super(EbliLib.getS("Rotation des objets"), EbliResource.EBLI.getToolIcon("draw-rotation"), "GLOBAL_ROTATE", _m);
+ setResizable(true);
formatter_=_formatter;
setSceneEditor(_sceneEditor);
setEnabled(isTargetValid(super.target_));
Modified: trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/edition/BPaletteDeplacement.java
===================================================================
--- trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/edition/BPaletteDeplacement.java 2015-04-20 09:44:41 UTC (rev 9114)
+++ trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/edition/BPaletteDeplacement.java 2015-04-20 13:40:26 UTC (rev 9115)
@@ -60,7 +60,7 @@
sceneEditor_ = _sceneEditor;
tfDx_ = BuTextField.createDoubleField();
- tfDx_.setPreferredSize(new Dimension(70, tfDx_.getPreferredSize().height));
+ tfDx_.setPreferredSize(new Dimension(90, tfDx_.getPreferredSize().height));
tfDx_.setValue(new Double(0));
tfDy_ = BuTextField.createDoubleField();
tfDy_.setValue(new Double(0));
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <bma...@us...> - 2015-04-20 09:44:43
|
Revision: 9114
http://sourceforge.net/p/fudaa/svn/9114
Author: bmarchan
Date: 2015-04-20 09:44:41 +0000 (Mon, 20 Apr 2015)
Log Message:
-----------
Nouveaux outils Deplacement et rotation.
Modified Paths:
--------------
trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/PivFille2d.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/PivVisuPanel.java
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/layer/PivTransectLayer.java
Modified: trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/PivFille2d.java
===================================================================
--- trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/PivFille2d.java 2015-04-20 09:14:18 UTC (rev 9113)
+++ trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/PivFille2d.java 2015-04-20 09:44:41 UTC (rev 9114)
@@ -40,7 +40,7 @@
JComponent[] cmps=getVisuPanel().getSpecificTools();
JComponent[] tools=new JComponent[cmps.length+superCmps.length];
System.arraycopy(superCmps, 0, tools, 0, superCmps.length);
- System.arraycopy(cmps, 0, tools, superCmps.length-1, cmps.length);
+ System.arraycopy(cmps, 0, tools, superCmps.length, cmps.length);
return tools;
}
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-20 09:14:18 UTC (rev 9113)
+++ trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/PivImplementation.java 2015-04-20 09:44:41 UTC (rev 9114)
@@ -25,8 +25,10 @@
import javax.imageio.ImageReader;
import javax.swing.AbstractButton;
import javax.swing.ButtonGroup;
+import javax.swing.JCheckBox;
import javax.swing.JFileChooser;
import javax.swing.JFrame;
+import javax.swing.JMenuItem;
import javax.swing.JOptionPane;
import javax.swing.SwingUtilities;
import javax.swing.TransferHandler;
@@ -696,11 +698,22 @@
mr.setResource(PivResource.PIV);
}
+ // Le menu Editer
+ BuMenu mn= (BuMenu)mb.getMenu("MENU_EDITION");
+ int idx=mn.indexOf("COPIER");
+ // Au cas ou...
+ if (idx==-1)
+ idx=mn.getComponentCount();
+ mn.add(get2dFrame().getVisuPanel().getEditAction().buildMenuItem(EbliComponentFactory.INSTANCE),idx++);
+ mn.add(get2dFrame().getVisuPanel().getDeplacementAction().buildMenuItem(EbliComponentFactory.INSTANCE),idx++);
+ mn.add(get2dFrame().getVisuPanel().getRotationAction().buildMenuItem(EbliComponentFactory.INSTANCE),idx++);
+ mn.insertSeparator(idx++);
+
// les menus exporter et importer sont construit dynamiquement
// buildImportMenu();
setEnabledForAction("IMPORTER", false);
buildExportMenu();
- BuMenu mn=buildPivMenu();
+ mn=buildPivMenu();
mb.addMenu(mn);
}
@@ -808,7 +821,7 @@
mn.add(sm);
mn.add(get2dFrame().getVisuPanel().getRealView().getParamsTransectAction().buildMenuItem(EbliComponentFactory.INSTANCE));
mn.add(new PivComputeFlowAction(this));
- mn.add(get2dFrame().getVisuPanel().getShowFlowAction().buildMenuItem(EbliComponentFactory.INSTANCE));
+// mn.add(get2dFrame().getVisuPanel().getShowFlowAction().buildMenuItem(EbliComponentFactory.INSTANCE));
mn.add(new PivShow3DTransectAction(this));
mn.addSeparator(PivResource.getS("Vue"));
@@ -822,8 +835,6 @@
mn.add(itOriginalView);
mn.add(itRealView);
mn.add(itTransfView);
- mn.addSeparator();
- mn.add(get2dFrame().getVisuPanel().getEditAction());
mn.setVisible(true);
return mn;
Modified: trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/PivVisuPanel.java
===================================================================
--- trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/PivVisuPanel.java 2015-04-20 09:14:18 UTC (rev 9113)
+++ trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/PivVisuPanel.java 2015-04-20 09:44:41 UTC (rev 9114)
@@ -8,6 +8,7 @@
package org.fudaa.fudaa.piv;
import java.awt.Color;
+import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
@@ -15,18 +16,22 @@
import javax.swing.Action;
import javax.swing.JComponent;
import javax.swing.JMenu;
+import javax.swing.SwingUtilities;
import org.fudaa.ctulu.gis.GISAttributeDouble;
import org.fudaa.ctulu.gis.GISAttributeString;
import org.fudaa.ebli.animation.EbliAnimationSourceInterface;
import org.fudaa.ebli.calque.BCalqueAffichage;
import org.fudaa.ebli.calque.ZEbliCalquesPanel;
+import org.fudaa.ebli.calque.action.SceneDeplacementAction;
+import org.fudaa.ebli.calque.action.SceneRotationAction;
import org.fudaa.ebli.calque.edition.ZCalqueEditable;
import org.fudaa.ebli.calque.edition.ZCalqueEditionInteraction;
import org.fudaa.ebli.calque.edition.ZEditorDefault;
import org.fudaa.ebli.commun.EbliActionAbstract;
import org.fudaa.ebli.commun.EbliActionInterface;
import org.fudaa.ebli.commun.EbliActionPaletteAbstract;
+import org.fudaa.ebli.commun.EbliComponentFactory;
import org.fudaa.ebli.commun.EbliUIProperties;
import org.fudaa.ebli.trace.TraceIcon;
import org.fudaa.ebli.trace.TraceIconModel;
@@ -121,6 +126,8 @@
private PivShowVelocityAction actShowVelocities_;
private PivShowFlowAction actShowFlow_;
private PivEditAction actEdit_;
+ private SceneRotationAction actRotation_;
+ private SceneDeplacementAction actDeplacement_;
/**
* Construction des calques. Une partie est d\xE9j\xE0 construite par d\xE9faut dans
@@ -272,9 +279,8 @@
actShowFlow_=new PivShowFlowAction((PivImplementation)getCtuluUI());
actEdit_=new PivEditAction(this);
getScene().addSelectionListener(actEdit_);
-
// Les actions affich\xE9es dans le menu contextuel.
- getEditor().getSceneEditor().setActions(new EbliActionInterface[]{actEdit_,null});
+ getEditor().getSceneEditor().setActions(new EbliActionInterface[]{actEdit_});
}
/**
@@ -349,6 +355,50 @@
return actEdit_;
}
+ public SceneRotationAction getRotationAction() {
+ if (actRotation_==null) {
+ actRotation_=new SceneRotationAction(getArbreCalqueModel().getTreeSelectionModel(), gisEditor_, gisEditor_.getSceneEditor(),getEbliFormatter()) {
+
+ /**
+ * Surchag\xE9 pour d\xE9finir le desktop au moment de l'affichage.
+ */
+ @Override
+ public void showWindow() {
+ // Necessaire, sinon la palette est visualis\xE9e en externe. Ne peut \xEAtre fait avant, car le desktop n'est pas
+ // encore existant.
+ BuDesktop desk=(BuDesktop)SwingUtilities.getAncestorOfClass(BuDesktop.class,PivVisuPanel.this);
+ if (desk!=null)
+ setDesktop(desk);
+ super.showWindow();
+ }
+ };
+ }
+
+ return actRotation_;
+ }
+
+ public SceneDeplacementAction getDeplacementAction() {
+ if (actDeplacement_==null) {
+ actDeplacement_=new SceneDeplacementAction(getArbreCalqueModel().getTreeSelectionModel(), gisEditor_, getEbliFormatter(), null) {
+
+ /**
+ * Surchag\xE9 pour d\xE9finir le desktop au moment de l'affichage.
+ */
+ @Override
+ public void showWindow() {
+ // Necessaire, sinon la palette est visualis\xE9e en externe. Ne peut \xEAtre fait avant, car le desktop n'est pas
+ // encore existant.
+ BuDesktop desk=(BuDesktop)SwingUtilities.getAncestorOfClass(BuDesktop.class,PivVisuPanel.this);
+ if (desk!=null)
+ setDesktop(desk);
+ super.showWindow();
+ }
+ };
+ }
+
+ return actDeplacement_;
+ }
+
/**
* @return Le calque d'edition de formes.
*/
@@ -483,10 +533,27 @@
return new EbliActionInterface[0];
}
+ AbstractButton btRotation_;
+ AbstractButton btDeplacement_;
+
+ /**
+ * @return Les actions sp\xE9cifiques de la vue affich\xE9es dans la barre d'actions.
+ */
public JComponent[] getSpecificTools() {
BuDesktop desk=((PivImplementation)getCtuluUI()).getMainPanel().getDesktop();
- JComponent[] cps=getCurrentView().getSpecificTools();
+ JComponent[] cpsView=getCurrentView().getSpecificTools();
+ JComponent[] cps=new JComponent[cpsView.length+2];
+ System.arraycopy(cpsView, 0, cps, 2, cpsView.length);
+
+ if (btRotation_==null)
+ btRotation_=getRotationAction().buildToolButton(EbliComponentFactory.INSTANCE);
+ if (btDeplacement_==null)
+ btDeplacement_=getDeplacementAction().buildToolButton(EbliComponentFactory.INSTANCE);
+
+ cps[0]=btRotation_;
+ cps[1]=btDeplacement_;
+
for (JComponent cp : cps) {
if (cp instanceof AbstractButton) {
AbstractButton bt=(AbstractButton)cp;
Modified: 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 2015-04-20 09:14:18 UTC (rev 9113)
+++ trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/action/PivShow3DTransectAction.java 2015-04-20 09:44:41 UTC (rev 9114)
@@ -30,7 +30,7 @@
PivShow3DTransectPanel pn;
public PivShow3DTransectAction(PivImplementation _impl) {
- super(PivResource.getS("Graphe 3D du(des) transect(s)..."), null, "SHOW_3D_GRAPH_TRANS");
+ super(PivResource.getS("Vue 3D du(des) transect(s)..."), null, "SHOW_3D_GRAPH_TRANS");
impl=_impl;
_impl.get2dFrame().getVisuPanel().getScene().addSelectionListener(this);
Modified: trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/layer/PivTransectLayer.java
===================================================================
--- trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/layer/PivTransectLayer.java 2015-04-20 09:14:18 UTC (rev 9113)
+++ trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/layer/PivTransectLayer.java 2015-04-20 09:44:41 UTC (rev 9114)
@@ -3,7 +3,6 @@
import java.awt.Graphics2D;
import org.fudaa.ebli.calque.edition.ZCalqueLigneBriseeEditable;
-import org.fudaa.ebli.calque.edition.ZModeleLigneBriseeEditable;
import org.fudaa.ebli.geometrie.GrBoite;
import org.fudaa.ebli.geometrie.GrMorphisme;
import org.fudaa.ebli.geometrie.GrPoint;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <bma...@us...> - 2015-04-20 09:14:25
|
Revision: 9113
http://sourceforge.net/p/fudaa/svn/9113
Author: bmarchan
Date: 2015-04-20 09:14:18 +0000 (Mon, 20 Apr 2015)
Log Message:
-----------
Ajout d'un raccourci pour le calcul des d?\195?\169bits
Modified Paths:
--------------
trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/action/PivComputeFlowAction.java
Modified: trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/action/PivComputeFlowAction.java
===================================================================
--- trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/action/PivComputeFlowAction.java 2015-04-20 09:12:57 UTC (rev 9112)
+++ trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/action/PivComputeFlowAction.java 2015-04-20 09:14:18 UTC (rev 9113)
@@ -8,7 +8,9 @@
package org.fudaa.fudaa.piv.action;
import java.awt.event.ActionEvent;
+import java.awt.event.KeyEvent;
+import javax.swing.KeyStroke;
import javax.swing.SwingUtilities;
import org.fudaa.ctulu.CtuluLog;
@@ -42,6 +44,7 @@
*/
public PivComputeFlowAction(PivImplementation _impl) {
super(PivResource.getS("Calcul du d\xE9bit"), null, "COMPUTE_FLOW");
+ setKey(KeyStroke.getKeyStroke(KeyEvent.VK_Q, KeyEvent.CTRL_MASK | KeyEvent.SHIFT_MASK));
impl=_impl;
setEnabled(false);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <bma...@us...> - 2015-04-20 09:13:05
|
Revision: 9112
http://sourceforge.net/p/fudaa/svn/9112
Author: bmarchan
Date: 2015-04-20 09:12:57 +0000 (Mon, 20 Apr 2015)
Log Message:
-----------
Palette de d?\195?\169placement nouvelle possibilit?\195?\169 : Si calque de deplacement est null, pas de deplacement interactif
Modified Paths:
--------------
trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/action/SceneDeplacementAction.java
trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/edition/BPaletteDeplacement.java
trunk/framework/ebli-common/src/main/java/org/fudaa/ebli/commun/EbliActionPaletteAbstract.java
Modified: trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/action/SceneDeplacementAction.java
===================================================================
--- trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/action/SceneDeplacementAction.java 2015-04-20 09:08:21 UTC (rev 9111)
+++ trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/action/SceneDeplacementAction.java 2015-04-20 09:12:57 UTC (rev 9112)
@@ -24,7 +24,9 @@
import org.fudaa.ebli.ressource.EbliResource;
/**
- * Une action pour faire une rotation d'objets GIS, reagissant au changement de calque selectionn\xE9.
+ * Une action pour faire un d\xE9placement d'objets GIS, reagissant au changement de calque selectionn\xE9.
+ * Cette action permet un d\xE9placement \xE0 la souris, ou par un panneau Dx,Dy,Dz.
+ *
* @author Fred Deniger, mar...@de...
* @version $Id: SceneDeplacementAction.java,v 1.1.2.1 2008-05-13 12:10:47 bmarchan Exp $
*/
@@ -37,17 +39,22 @@
/**
* @param _m l'arbre des calques
+ * @param _cqDep Le calque d'interaction pour le d\xE9placement \xE0 la souris. Si
+ * <code>null</code>, le d\xE9placement ne se fait que par le panneau de
+ * saisie de Dx,Dy,Dz
*/
public SceneDeplacementAction(final TreeSelectionModel _m, final ZEditorDefault _editor, EbliFormatterInterface _formatter, ZCalqueDeplacementInteraction _cqDep) {
super(EbliLib.getS("D\xE9placer des objets"), EbliResource.EBLI.getToolIcon("fleche-deplacement"), "GLOBAL_MOVE", _m);
formatter_=_formatter;
pnCalques_=_editor.getPanel();
// Pour capter l'activation d'un autre calque.
- pnCalques_.getController().addPropertyChangeListener("gele", this);
+ if (_cqDep!=null)
+ pnCalques_.getController().addPropertyChangeListener("gele", this);
cqDep_=_cqDep;
setSceneEditor(_editor.getSceneEditor());
- cqDep_.addPropertyChangeListener("gele",this);
+ if (cqDep_!=null)
+ cqDep_.addPropertyChangeListener("gele",this);
setEnabled(isTargetValid(super.target_));
}
/**
@@ -66,12 +73,14 @@
@Override
public void changeAction(){
super.changeAction();
- if (isSelected()) {
- pnCalques_.setCalqueInteractionActif(cqDep_);
+ if (cqDep_!=null) {
+ if (isSelected()) {
+ pnCalques_.setCalqueInteractionActif(cqDep_);
+ }
+ else {
+ pnCalques_.setCalqueSelectionActif();
+ }
}
- else {
- pnCalques_.setCalqueSelectionActif();
- }
}
@@ -83,7 +92,8 @@
@Override
protected BPalettePanelInterface buildPaletteContent() {
BPaletteDeplacement pal=new BPaletteDeplacement(sceneEditor_,formatter_);
- pal.setCalqueDeplacement(cqDep_);
+ if (cqDep_!=null)
+ pal.setCalqueDeplacement(cqDep_);
return pal;
}
@@ -101,6 +111,7 @@
@Override
public void internalFrameClosing(InternalFrameEvent e) {
- pnCalques_.setCalqueSelectionActif();
+ if (cqDep_!=null)
+ pnCalques_.setCalqueSelectionActif();
}
}
Modified: trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/edition/BPaletteDeplacement.java
===================================================================
--- trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/edition/BPaletteDeplacement.java 2015-04-20 09:08:21 UTC (rev 9111)
+++ trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/edition/BPaletteDeplacement.java 2015-04-20 09:12:57 UTC (rev 9112)
@@ -107,22 +107,19 @@
dz = (Double) tfDz_.getValue();
}
if (dx != null && dy != null && dz != null) {
- deplacement_.getTarget().moved(dx.doubleValue(), dy.doubleValue(), dz.doubleValue(), false);
+ sceneEditor_.moveSelectedObjects(dx, dy, dz);
}
-
}
}
+ /**
+ * @param _dep Le calque de d\xE9placement : Si <code>null</code>, le d\xE9placement ne se fait que par les Dx,Dy,DZ.
+ */
public void setCalqueDeplacement(ZCalqueDeplacementInteraction _dep) {
deplacement_ = _dep;
- deplacement_.specPanel_ = this;
+ if (deplacement_!=null)
+ deplacement_.specPanel_ = this;
}
-// public void close(){
-// if (FuLog.isTrace()) {
-// FuLog.trace("EBL: " + getClass().getName() + " close");
-// }
-// deplacement_.specPanel_ = null;
-// }
@Override
public JComponent getComponent() {
@@ -131,7 +128,7 @@
@Override
public void updateState() {
- if (deplacement_.isDragged()) {
+ if (deplacement_!=null && deplacement_.isDragged()) {
tfDx_.setEditable(false);
tfDy_.setEditable(false);
tfDz_.setEditable(false);
@@ -148,7 +145,7 @@
tfDx_.setEditable(true);
tfDy_.setEditable(true);
tfDz_.setEditable(true);
- btApply_.setEnabled(!deplacement_.isSelectionEmpty());
+ btApply_.setEnabled(!sceneEditor_.getScene().isSelectionEmpty());
}
}
Modified: trunk/framework/ebli-common/src/main/java/org/fudaa/ebli/commun/EbliActionPaletteAbstract.java
===================================================================
--- trunk/framework/ebli-common/src/main/java/org/fudaa/ebli/commun/EbliActionPaletteAbstract.java 2015-04-20 09:08:21 UTC (rev 9111)
+++ trunk/framework/ebli-common/src/main/java/org/fudaa/ebli/commun/EbliActionPaletteAbstract.java 2015-04-20 09:12:57 UTC (rev 9112)
@@ -215,6 +215,7 @@
}
dial_.setModal(dialogIsModal);
dial_.setContentPane(window_.getContentPane());
+ dial_.setTitle(window_.getTitle());
dial_.pack();
dial_.addWindowListener(new WindowAdapter() {
@Override
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <bma...@us...> - 2015-04-20 09:08:23
|
Revision: 9111
http://sourceforge.net/p/fudaa/svn/9111
Author: bmarchan
Date: 2015-04-20 09:08:21 +0000 (Mon, 20 Apr 2015)
Log Message:
-----------
Gestion correcte L&F Nimbus pour l'arbre des calques
Modified Paths:
--------------
trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/BArbreCalque.java
Modified: trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/BArbreCalque.java
===================================================================
--- trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/BArbreCalque.java 2015-04-17 13:48:00 UTC (rev 9110)
+++ trunk/framework/ebli-2d/src/main/java/org/fudaa/ebli/calque/BArbreCalque.java 2015-04-20 09:08:21 UTC (rev 9111)
@@ -539,6 +539,7 @@
public ArbreCell1(final boolean _editable) {
r1_ = new BuTextField();
r1_.setEditable(false);
+ r1_.setOpaque(false);
r1_.setBorder(null);
r2_ = new JLabel(" ");
r2_.setPreferredSize(new Dimension(80, 12));
@@ -562,6 +563,7 @@
pnRight_.setLayout(new BuBorderLayout(2, 1, true, true));
pnRight_.add(r3_, BuBorderLayout.CENTER);
pnRight_.add(r4, BuBorderLayout.EAST);
+ pnRight_.setOpaque(false);
if (_editable) {
cbVisible_ = new BuCheckBox3States();
@@ -577,9 +579,10 @@
pnLeft.add(lbSelect_);
add(pnLeft, BuBorderLayout.WEST);
add(pnRight_, BuBorderLayout.CENTER);
- setOpaque(true);
+ // B.M. : Supprim\xE9 pour le L&F Nimbus
+// setOpaque(true);
}
- final BuLightBorder light_ = new BuLightBorder(BuLightBorder.RAISED, 3);
+ final BuLightBorder light_ = new BuLightBorder(BuLightBorder.RAISED, 1);
@Override
public Component getTreeCellRendererComponent(final JTree _tree, final Object _value, final boolean _selected,
@@ -666,32 +669,30 @@
}
}
r2_.setText(s.toString());
- setBackground(treeBackground_);
- setForeground(treeForeground_);
if (_selected) {
final Color bg = treeSelectionBakground_;
final Color fg = treeSelectionForeground_;
- pnRight_.setBackground(bg);
- pnRight_.setForeground(fg);
+ setBackground(bg);
+ setForeground(fg);
r1_.setBackground(bg);
r1_.setForeground(fg);
- r2_.setBackground(bg);
r2_.setForeground(fg);
- r3_.setBackground(bg);
r3_.setForeground(fg);
- pnRight_.setBorder(light_);
+ // B.M. : Opacit\xE9 necessaire pour le L&F Nimbus qui ne semble pas gerer correctement le treeBackground_
+ setOpaque(true);
+ r1_.setOpaque(true);
} else {
final Color bg = treeBackground_;
final Color fg = treeForeground_;
- pnRight_.setBackground(bg);
- pnRight_.setForeground(fg);
+ setBackground(bg);
+ setForeground(fg);
r1_.setBackground(bg);
r1_.setForeground(fg);
- r2_.setBackground(bg);
r2_.setForeground(fg);
- r3_.setBackground(bg);
r3_.setForeground(fg);
- pnRight_.setBorder(BuBorders.EMPTY3333);
+ // B.M. : Opacit\xE9 necessaire pour le L&F Nimbus qui ne semble pas gerer correctement le treeBackground_
+ setOpaque(false);
+ r1_.setOpaque(false);
}
final StringBuffer tooltip = new StringBuffer(60);
tooltip.append("<html><body style=\"margin:1px;\">");
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <bma...@us...> - 2015-04-17 13:48:08
|
Revision: 9110
http://sourceforge.net/p/fudaa/svn/9110
Author: bmarchan
Date: 2015-04-17 13:48:00 +0000 (Fri, 17 Apr 2015)
Log Message:
-----------
Ajout L&F Nimbus
Modified Paths:
--------------
trunk/framework/ctulu-bu/src/main/java/com/memoire/bu/BuPreferences.java
trunk/framework/fudaa-common/src/main/java/org/fudaa/fudaa/commun/impl/FudaaLookPreferencesPanel.java
Modified: trunk/framework/ctulu-bu/src/main/java/com/memoire/bu/BuPreferences.java
===================================================================
--- trunk/framework/ctulu-bu/src/main/java/com/memoire/bu/BuPreferences.java 2015-04-16 15:30:15 UTC (rev 9109)
+++ trunk/framework/ctulu-bu/src/main/java/com/memoire/bu/BuPreferences.java 2015-04-17 13:48:00 UTC (rev 9110)
@@ -148,6 +148,8 @@
} finally {
BuLib.forgetLnf();
}
+ } else if (lnfname.equals("ASPECT_NIMBUS")) {
+ lnfclass = "javax.swing.plaf.nimbus.NimbusLookAndFeel";
} else if (lnfname.equals("ASPECT_METOUIA")) {
lnfclass = "net.sourceforge.mlf.metouia.MetouiaLookAndFeel";
} else if (lnfname.equals("ASPECT_MOTIF")) {
Modified: trunk/framework/fudaa-common/src/main/java/org/fudaa/fudaa/commun/impl/FudaaLookPreferencesPanel.java
===================================================================
--- trunk/framework/fudaa-common/src/main/java/org/fudaa/fudaa/commun/impl/FudaaLookPreferencesPanel.java 2015-04-16 15:30:15 UTC (rev 9109)
+++ trunk/framework/fudaa-common/src/main/java/org/fudaa/fudaa/commun/impl/FudaaLookPreferencesPanel.java 2015-04-17 13:48:00 UTC (rev 9110)
@@ -44,7 +44,7 @@
BuGridLayout loGen_;
BuGridLayout loGenDesk_;
BuPreferences options_;
- Map optionsStr_;
+ Map<Object,Object> optionsStr_;
BuPanel pnGenDesk_;
BuTextField tfGenAspSkinlf_, tfGenAspOyoaha_;
@@ -58,7 +58,7 @@
appli_ = _appli;
options_ = BuPreferences.BU;
cbRenderer_ = new BuOptionRenderer();
- optionsStr_ = new HashMap();
+ optionsStr_ = new HashMap<Object, Object>();
final String aspectStr = "aspect";
optionsStr_.put("DESKTOP_UNIFORME", new BuOptionItem(getS("Uniforme"), BuResource.BU.getMenuIcon("uniforme")));
optionsStr_.put("DESKTOP_DEGRADE", new BuOptionItem(getS("D\xE9grad\xE9"), BuResource.BU.getMenuIcon("degrade")));
@@ -99,6 +99,8 @@
.isEnabled("ASPECT_METAL")));
optionsStr_.put("ASPECT_MOTIF", new BuOptionItem("Motif", BuResource.BU.getMenuIcon(aspectStr), options_
.isEnabled("ASPECT_MOTIF")));
+ optionsStr_.put("ASPECT_NIMBUS", new BuOptionItem("Nimbus", BuResource.BU.getMenuIcon(aspectStr), options_
+ .isEnabled("ASPECT_NIMBUS")));
optionsStr_.put("ASPECT_NEXT", new BuOptionItem("Next", BuResource.BU.getMenuIcon(aspectStr), options_
.isEnabled("ASPECT_NEXT")));
optionsStr_.put("ASPECT_ORGANIC", new BuOptionItem("Organic", BuResource.BU.getMenuIcon(aspectStr), options_
@@ -153,7 +155,7 @@
// Aspect
lbGenAspAspect_ = new BuLabel(getS("Aspect:"), SwingConstants.RIGHT);
- items = new BuOptionItem[11];
+ items = new BuOptionItem[12];
int i = 0;
items[i++] = optionsStr_.get(getAspectDefaut());
// items[ i++]=optionsStr_.get("ASPECT_AMIGA");
@@ -161,7 +163,6 @@
items[i++] = optionsStr_.get("ASPECT_GTK");
// items[ i++]=optionsStr_.get("ASPECT_KUNSTSTOFF");
items[i++] = optionsStr_.get("ASPECT_LIQUID");
- items[i++] = optionsStr_.get("ASPECT_SUBSTANCE");
items[i++] = optionsStr_.get("ASPECT_MAC");
items[i++] = optionsStr_.get("ASPECT_METAL");
items[i++] = optionsStr_.get("ASPECT_MOTIF");
@@ -169,9 +170,11 @@
* items[ i++]=optionsStr_.get("ASPECT_NEXT"); items[i++]=optionsStr_.get("ASPECT_ORGANIC");
* items[i++]=optionsStr_.get("ASPECT_OYOAHA");
*/
+ items[i++] = optionsStr_.get("ASPECT_NIMBUS");
items[i++] = optionsStr_.get("ASPECT_PLASTIC");
items[i++] = optionsStr_.get("ASPECT_PLASTIC3D");
items[i++] = optionsStr_.get("ASPECT_PLASTICXP");
+ items[i++] = optionsStr_.get("ASPECT_SUBSTANCE");
/*
* items[i++]=optionsStr_.get("ASPECT_SKINLF"); items[i++]=optionsStr_.get("ASPECT_SLAF");
*/
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...> - 2015-04-16 15:28:26
|
Revision: 9108
http://sourceforge.net/p/fudaa/svn/9108
Author: bmarchan
Date: 2015-04-16 15:28:24 +0000 (Thu, 16 Apr 2015)
Log Message:
-----------
Graphe3D : Quelques corrections
Modified Paths:
--------------
trunk/framework/ebli-graphe-3D/src/main/java/org/fudaa/ebli/graphe3D/EG3dGraph.java
trunk/framework/ebli-graphe-3D/src/main/java/org/fudaa/ebli/graphe3D/EG3dProjection3dto2d.java
trunk/framework/ebli-graphe-3D/src/main/java/org/fudaa/ebli/graphe3D/data/EG3dDefaultLineModel.java
trunk/framework/ebli-graphe-3D/src/main/java/org/fudaa/ebli/graphe3D/data/EG3dLineModelAbstract.java
trunk/framework/ebli-graphe-3D/src/main/java/org/fudaa/ebli/graphe3D/renderer/EG3dDefaultDataRenderer.java
trunk/framework/ebli-graphe-3D/src/main/java/org/fudaa/ebli/graphe3D/ui/panel/EG3dBtnPanel.java
Modified: trunk/framework/ebli-graphe-3D/src/main/java/org/fudaa/ebli/graphe3D/EG3dGraph.java
===================================================================
--- trunk/framework/ebli-graphe-3D/src/main/java/org/fudaa/ebli/graphe3D/EG3dGraph.java 2015-04-14 09:39:00 UTC (rev 9107)
+++ trunk/framework/ebli-graphe-3D/src/main/java/org/fudaa/ebli/graphe3D/EG3dGraph.java 2015-04-16 15:28:24 UTC (rev 9108)
@@ -11,6 +11,7 @@
import java.awt.Point;
import java.awt.PrintGraphics;
import java.awt.Rectangle;
+import java.awt.RenderingHints;
import java.awt.event.FocusAdapter;
import java.awt.event.FocusEvent;
import java.awt.event.MouseAdapter;
@@ -28,11 +29,11 @@
import javax.swing.JComponent;
+import org.fudaa.ebli.graphe3D.data.EG3dDataModel;
import org.fudaa.ebli.graphe3D.data.EG3dLineModel;
-import org.fudaa.ebli.graphe3D.data.EG3dDataModel;
import org.fudaa.ebli.graphe3D.data.EG3dSurfaceModel;
+import org.fudaa.ebli.graphe3D.data.EG3dSurfaceModel.PlotType;
import org.fudaa.ebli.graphe3D.data.EG3dVertex;
-import org.fudaa.ebli.graphe3D.data.EG3dSurfaceModel.PlotType;
import org.fudaa.ebli.graphe3D.renderer.EG3dDataRenderer;
import org.fudaa.ebli.graphe3D.renderer.EG3dDefaultDataRenderer;
import org.fudaa.ebli.graphe3D.renderer.EG3dDefaultViewRenderer;
@@ -141,14 +142,26 @@
datas.add(_data);
_data.addPropertyChangeListener(surfaceChangesListener);
// _data.addChangeListener(surfaceChangesListener);
- resetZoom();
+ resetBounds();
+
+ repaint();
}
public void removeData(EG3dDataModel _data) {
datas.remove(_data);
_data.removePropertyChangeListener(surfaceChangesListener);
// _data.removeChangeListener(surfaceChangesListener);
+ repaint();
}
+
+ public void removeAllDatas() {
+ for (EG3dDataModel data : datas) {
+ data.removePropertyChangeListener(surfaceChangesListener);
+ }
+ datas.clear();
+
+ repaint();
+ }
public void setViewRenderer(EG3dDefaultViewRenderer _renderer) {
if (viewRenderer!=null)
@@ -159,7 +172,8 @@
projector=_renderer.getProjector();
colors = _renderer.getColorModel();
-
+
+ repaint();
}
public EG3dDefaultViewRenderer getViewRenderer() {
@@ -325,7 +339,6 @@
}
public void propertyChange(java.beans.PropertyChangeEvent pe) {
- resetZoom();
// init();
destroyImage();
}
@@ -367,13 +380,15 @@
}
/**
- * Redefini les zoom du graphe.
+ * Redefini les limites du graphe.
*/
- public void resetZoom() {
+ public void resetBounds() {
xmin=Float.MAX_VALUE;
xmax=Float.MIN_VALUE;
ymin=Float.MAX_VALUE;
ymax=Float.MIN_VALUE;
+ zmin=Float.MAX_VALUE;
+ zmax=Float.MIN_VALUE;
for (EG3dDataModel curve : datas) {
xmin=Math.min(xmin, curve.getXMin());
xmax=Math.max(xmax, curve.getXMax());
@@ -385,90 +400,37 @@
// setRanges(xmin, xmax, ymin, ymax);
}
-
- /**
- * Sets the x and y ranges of calculated surface vertices. The ranges will
- * not affect surface appearance. They affect axes scale appearance.
- *
- * @param xmin
- * the minimum x
- * @param xmax
- * the maximum x
- * @param ymin
- * the minimum y
- * @param ymax
- * the maximum y
- */
-
-// public void setRanges(float xmin, float xmax, float ymin, float ymax) {
-// this.xmin = xmin;
-// this.xmax = xmax;
-// this.ymin = ymin;
-// this.ymax = ymax;
-// }
-
- /**
- * Gets the current x, y, and z ranges.
- *
- * @return array of x,y, and z ranges in order of xmin, xmax, ymin, ymax,
- * zmin, zmax
- */
-
- public float[] getRanges() {
- float[] ranges = new float[6];
-
- ranges[0] = xmin;
- ranges[1] = xmax;
- ranges[2] = ymin;
- ranges[3] = ymax;
- ranges[4] = zmin;
- ranges[5] = zmax;
-
- return ranges;
+
+ public void setRangeX(float _xmin, float _xmax) {
+ xmin=_xmin;
+ xmax=_xmax;
+ repaint();
}
+
+ public float[] getRangeX() {
+ return new float[]{xmin,xmax};
+ }
+
+ public void setRangeY(float _ymin, float _ymax) {
+ ymin=_ymin;
+ ymax=_ymax;
+ repaint();
+ }
+
+ public float[] getRangeY() {
+ return new float[]{ymin,ymax};
+ }
+
+ public void setRangeZ(float _zmin, float _zmax) {
+ zmin=_zmin;
+ zmax=_zmax;
+ repaint();
+ }
+
+ public float[] getRangeZ() {
+ return new float[]{zmin,zmax};
+ }
- /**
- * Sets the data availability flag. If this flag is <code>false</code>, <code>SurfaceCanvas</code> will not generate any surface image, even if
- * the data is available. But it is the programmer's responsiblity to set
- * this flag to <code>false</code> when data is not available.
- *
- * @param avail
- * the availability flag
- */
-
-// public void setDataAvailability(boolean avail) {
-// data_available = avail;
-// is_data_available = avail; // see Handlers for mouse input events
-// // section
-// }
-
- /**
- * Sets the new vertices array of surface.
- *
- * @param surfaceVertex
- * the new vertices array
- * @see #getValuesArray
- */
-
-// public void setValuesArray(EbliGraph3dVertex[][] vertex) {
-// this.surfaceVertex = vertex;
-// }
-
- /**
- * Gets the current vertices array.
- *
- * @return current vertices array
- * @see #setValuesArray
- */
-
-// public EbliGraph3dVertex[][] getValuesArray() {
-// if (!data_available)
-// return null;
-// return surfaceVertex;
-// }
-
-// private boolean is_data_available; // holds the original data availability
- // flag
private boolean dragged; // dragged flag
private int click_x, click_y; // previous mouse cursor position
@@ -516,8 +478,11 @@
*/
public void paintComponent(Graphics g) {
- if ((getBounds().width <= 0) || (getBounds().height <= 0))
+ if ((getBounds().width <= 0) || (getBounds().height <= 0))
return;
+
+ ((Graphics2D)g).setRenderingHint(RenderingHints.KEY_ANTIALIASING,
+ RenderingHints.VALUE_ANTIALIAS_ON);
// backing buffer creation
@@ -1676,8 +1641,8 @@
// model.setDispDivisions(plot_density);
Thread.yield();
- zmin = zi;
- zmax = zx;
+// zmin = zi;
+// zmax = zx;
color_factor = 1f / (zmax - zmin);
// if (!printing) {
@@ -2557,14 +2522,25 @@
}
public void plotLine(EG3dLineModel _curve, EG3dDataRenderer _renderer) {
+ if (_curve.getNbPoints() < 2)
+ return;
+
+ projector.setZRange(zmin, zmax);
+
TraceLigne tl=new TraceLigne();
- Point p2=projector.project(_curve.getX(0), _curve.getY(0), _curve.getZ(0));
+ float xe=xmax-xmin==0 ? 0:20*(_curve.getX(0)-xmin)/(xmax-xmin)-10;
+ float ye=ymax-zmin==0 ? 0:20*(_curve.getY(0)-ymin)/(ymax-ymin)-10;
+ float ze=zmax-zmin==0 ? 0:20*(_curve.getZ(0)-zmin)/(zmax-zmin)-10;
+ Point p2=projector.project(xe, ye, ze);
for (int i=1; i<_curve.getNbPoints(); i++) {
Point p1=p2;
- p2=projector.project(_curve.getX(i), _curve.getY(i), _curve.getZ(i));
- tl.setCouleur(_renderer.getLineColor(i));
- tl.setEpaisseur(_renderer.getLineThickness(i));
- tl.setTypeTrait(_renderer.getLineStyle(i));
+ xe=xmax-xmin==0 ? 0:20*(_curve.getX(i)-xmin)/(xmax-xmin)-10;
+ ye=ymax-zmin==0 ? 0:20*(_curve.getY(i)-ymin)/(ymax-ymin)-10;
+ ze=zmax-zmin==0 ? 0:20*(_curve.getZ(i)-zmin)/(zmax-zmin)-10;
+ p2=projector.project(xe, ye, ze);
+ tl.setCouleur(_renderer.getLineColor(i-1));
+ tl.setEpaisseur(_renderer.getLineThickness(i-1));
+ tl.setTypeTrait(_renderer.getLineStyle(i-1));
tl.dessineTrait((Graphics2D)graphics, p1.x, p1.y, p2.x, p2.y);
}
}
Modified: trunk/framework/ebli-graphe-3D/src/main/java/org/fudaa/ebli/graphe3D/EG3dProjection3dto2d.java
===================================================================
--- trunk/framework/ebli-graphe-3D/src/main/java/org/fudaa/ebli/graphe3D/EG3dProjection3dto2d.java 2015-04-14 09:39:00 UTC (rev 9107)
+++ trunk/framework/ebli-graphe-3D/src/main/java/org/fudaa/ebli/graphe3D/EG3dProjection3dto2d.java 2015-04-16 15:28:24 UTC (rev 9108)
@@ -73,8 +73,10 @@
trans_y = center_y + _2D_trans_y;
}
-
-
+ /**
+ * Rotation suivant Z.
+ * @param angle En degr\xE9s
+ */
public void setRotationAngle(float angle) {
rotation = angle;
sin_rotation = (float)Math.sin(angle * DEGTORAD);
@@ -102,7 +104,10 @@
}
-
+ /**
+ * Rotation suivant Y.
+ * @param angle En degr\xE9s
+ */
public void setElevationAngle(float angle) {
elevation = angle;
sin_elevation = (float)Math.sin(angle * DEGTORAD);
@@ -126,6 +131,10 @@
return cos_elevation;
}
+ /**
+ * Distance de l'oeil \xE0 l'objet.
+ * @param new_distance Pour une perspective cavali\xE8re : Donner une grande distance.
+ */
public void setDistance(float new_distance) {
distance = new_distance;
factor = distance * _2D_scale;
Modified: trunk/framework/ebli-graphe-3D/src/main/java/org/fudaa/ebli/graphe3D/data/EG3dDefaultLineModel.java
===================================================================
--- trunk/framework/ebli-graphe-3D/src/main/java/org/fudaa/ebli/graphe3D/data/EG3dDefaultLineModel.java 2015-04-14 09:39:00 UTC (rev 9107)
+++ trunk/framework/ebli-graphe-3D/src/main/java/org/fudaa/ebli/graphe3D/data/EG3dDefaultLineModel.java 2015-04-16 15:28:24 UTC (rev 9108)
@@ -16,7 +16,7 @@
public void setPoints(List<EG3dVertex> _pts) {
firePropertyChange("points", pts, pts=_pts);
- resetLimits();
+ clearCache();
}
@Override
Modified: trunk/framework/ebli-graphe-3D/src/main/java/org/fudaa/ebli/graphe3D/data/EG3dLineModelAbstract.java
===================================================================
--- trunk/framework/ebli-graphe-3D/src/main/java/org/fudaa/ebli/graphe3D/data/EG3dLineModelAbstract.java 2015-04-14 09:39:00 UTC (rev 9107)
+++ trunk/framework/ebli-graphe-3D/src/main/java/org/fudaa/ebli/graphe3D/data/EG3dLineModelAbstract.java 2015-04-16 15:28:24 UTC (rev 9108)
@@ -11,12 +11,14 @@
*/
public abstract class EG3dLineModelAbstract implements EG3dLineModel {
PropertyChangeSupport support=new PropertyChangeSupport(this.getClass());
- float xmin;
- float xmax;
- float ymin;
- float ymax;
- float zmin;
- float zmax;
+ boolean mustReset_=true;
+
+ protected float xmin;
+ protected float xmax;
+ protected float ymin;
+ protected float ymax;
+ protected float zmin;
+ protected float zmax;
@Override
public void addPropertyChangeListener(PropertyChangeListener listener) {
@@ -59,35 +61,52 @@
zmin=Math.min(zmin, getZ(i));
zmax=Math.max(zmax, getZ(i));
}
+ mustReset_=false;
}
+ public void clearCache() {
+ mustReset_=true;
+ }
+
@Override
public float getXMin() {
+ if (mustReset_)
+ resetLimits();
return xmin;
}
@Override
public float getYMin() {
+ if (mustReset_)
+ resetLimits();
return ymin;
}
@Override
public float getZMin() {
+ if (mustReset_)
+ resetLimits();
return zmin;
}
@Override
public float getXMax() {
+ if (mustReset_)
+ resetLimits();
return xmax;
}
@Override
public float getYMax() {
+ if (mustReset_)
+ resetLimits();
return ymax;
}
@Override
public float getZMax() {
+ if (mustReset_)
+ resetLimits();
return zmax;
}
Modified: trunk/framework/ebli-graphe-3D/src/main/java/org/fudaa/ebli/graphe3D/renderer/EG3dDefaultDataRenderer.java
===================================================================
--- trunk/framework/ebli-graphe-3D/src/main/java/org/fudaa/ebli/graphe3D/renderer/EG3dDefaultDataRenderer.java 2015-04-14 09:39:00 UTC (rev 9107)
+++ trunk/framework/ebli-graphe-3D/src/main/java/org/fudaa/ebli/graphe3D/renderer/EG3dDefaultDataRenderer.java 2015-04-16 15:28:24 UTC (rev 9108)
@@ -15,10 +15,10 @@
* @author Bertrand Marchand (mar...@de...)
*/
public class EG3dDefaultDataRenderer implements EG3dDataRenderer {
- TraceLigneModel lm;
- TraceIconModel im;
- EG3dSurfaceColorModelSet surfColorModel_;
- PropertyChangeSupport property;
+ protected TraceLigneModel lm;
+ protected TraceIconModel im;
+ protected EG3dSurfaceColorModelSet surfColorModel_;
+ protected PropertyChangeSupport property;
public EG3dDefaultDataRenderer() {
this(new TraceLigneModel(),new TraceIconModel());
Modified: trunk/framework/ebli-graphe-3D/src/main/java/org/fudaa/ebli/graphe3D/ui/panel/EG3dBtnPanel.java
===================================================================
--- trunk/framework/ebli-graphe-3D/src/main/java/org/fudaa/ebli/graphe3D/ui/panel/EG3dBtnPanel.java 2015-04-14 09:39:00 UTC (rev 9107)
+++ trunk/framework/ebli-graphe-3D/src/main/java/org/fudaa/ebli/graphe3D/ui/panel/EG3dBtnPanel.java 2015-04-16 15:28:24 UTC (rev 9108)
@@ -363,25 +363,42 @@
}
- public void translate(BuResource resource){
- densityType.setText(resource.getString("Mode densit\xE9"));
- wireframeType.setText(resource.getString("Type Wireframe"));
- contourType.setText(resource.getString("Mode contour"));
- surfaceType.setText(resource.getString("Type Surface"));
- wireframePTType.setText(resource.getString("Type Nuage de points"));
- fogMode.setText(resource.getString("Mode Fog"));
- dualShadeMode.setText(resource.getString("Nuance"));
- grayScaleMode.setText(resource.getString("Nuance de gris"));
- spectrumMode.setText(resource.getString("Mode spectre"));
- hiddenMode.setText(resource.getString("Mode cach\xE9"));
- mesh.setText(resource.getString("Voir le maillage"));
- scaleBox.setText(resource.getString("Redimensionner"));
- btnDisplayGrids.setText(resource.getString("Afficher la grille"));
- btnDisplayZ.setText(resource.getString("Afficher l'axe Z"));
- btnDisplayXY.setText(resource.getString("Afficher les axes X et Y"));
- btnShowBox.setText(resource.getString("Afficher les extr\xE9mit\xE9s"));
-
- }
+ public void translate(BuResource resource) {
+ densityType.setText(resource.getString("Mode densit\xE9"));
+ wireframeType.setText(resource.getString("Type Wireframe"));
+ contourType.setText(resource.getString("Mode contour"));
+ surfaceType.setText(resource.getString("Type Surface"));
+ wireframePTType.setText(resource.getString("Type Nuage de points"));
+ fogMode.setText(resource.getString("Mode Fog"));
+ dualShadeMode.setText(resource.getString("Nuance"));
+ grayScaleMode.setText(resource.getString("Nuance de gris"));
+ spectrumMode.setText(resource.getString("Mode spectre"));
+ hiddenMode.setText(resource.getString("Mode cach\xE9"));
+ mesh.setText(resource.getString("Voir le maillage"));
+ scaleBox.setText(resource.getString("Redimensionner"));
+ btnDisplayGrids.setText(resource.getString("Afficher la grille"));
+ btnDisplayZ.setText(resource.getString("Afficher l'axe Z"));
+ btnDisplayXY.setText(resource.getString("Afficher les axes X et Y"));
+ btnShowBox.setText(resource.getString("Afficher les extr\xE9mit\xE9s"));
+ }
+
+ /**
+ * Affiche ou non les boutons sp\xE9cifiques aux datas surface.
+ * @param _b True : Les boutons sont affich\xE9s.
+ */
+ public void showSurfaceButton(boolean _b) {
+ mesh.setVisible(_b);
+ hiddenMode.setVisible(_b);
+ spectrumMode.setVisible(_b);
+ grayScaleMode.setVisible(_b);
+ dualShadeMode.setVisible(_b);
+ fogMode.setVisible(_b);
+ wireframeType.setVisible(_b);
+ wireframePTType.setVisible(_b);
+ surfaceType.setVisible(_b);
+ contourType.setVisible(_b);
+ densityType.setVisible(_b);
+ }
public JCheckBox getBtnShowBox() {
return btnShowBox;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <bma...@us...> - 2015-04-14 09:39:02
|
Revision: 9107
http://sourceforge.net/p/fudaa/svn/9107
Author: bmarchan
Date: 2015-04-14 09:39:00 +0000 (Tue, 14 Apr 2015)
Log Message:
-----------
Adaptation aux modifications du package ebli-graphe-3D
Modified Paths:
--------------
trunk/soft/fudaa-mascaret/ui/src/main/java/org/fudaa/fudaa/hydraulique1d/graphe3D/PanelGraphe3D.java
trunk/soft/fudaa-mascaret/ui/src/main/java/org/fudaa/fudaa/hydraulique1d/graphe3D/PanelGraphe3Dzyx.java
Modified: trunk/soft/fudaa-mascaret/ui/src/main/java/org/fudaa/fudaa/hydraulique1d/graphe3D/PanelGraphe3D.java
===================================================================
--- trunk/soft/fudaa-mascaret/ui/src/main/java/org/fudaa/fudaa/hydraulique1d/graphe3D/PanelGraphe3D.java 2015-04-14 09:38:03 UTC (rev 9106)
+++ trunk/soft/fudaa-mascaret/ui/src/main/java/org/fudaa/fudaa/hydraulique1d/graphe3D/PanelGraphe3D.java 2015-04-14 09:39:00 UTC (rev 9107)
@@ -6,14 +6,13 @@
import org.fudaa.dodico.hydraulique1d.metier.MetierBief;
import org.fudaa.dodico.hydraulique1d.metier.MetierHydraulique1d;
import org.fudaa.dodico.hydraulique1d.metier.MetierProfil;
-import org.fudaa.ebli.graphe3D.EbliGraphDataModel;
-import org.fudaa.ebli.graphe3D.EbliGraphDataModel.EbliGraphDataStructure;
-import org.fudaa.ebli.graphe3D.ui.panel.EbliGraphBtnPanel;
-import org.fudaa.ebli.graphe3D.ui.panel.GraphPanel;
+import org.fudaa.ebli.graphe3D.data.EG3dSurfaceProfilesModel;
+import org.fudaa.ebli.graphe3D.data.EG3dSurfaceProfilesModel.EbliGraphDataStructure;
+import org.fudaa.ebli.graphe3D.ui.panel.EG3dBtnPanel;
+import org.fudaa.ebli.graphe3D.ui.panel.EG3dGraphPanel;
import org.fudaa.fudaa.hydraulique1d.Hydraulique1dResource;
import com.memoire.bu.BuPanel;
-import com.memoire.bu.BuResource;
/**
*
@@ -57,7 +56,7 @@
return;
//-- creation du model de graphe 3d
- EbliGraphDataModel dataModel = new EbliGraphDataModel();
+ EG3dSurfaceProfilesModel dataModel = new EG3dSurfaceProfilesModel();
int nbProfils = bief.profils().length;
int nbMaxPoints = 0;
@@ -135,14 +134,14 @@
dataModel.setValues(s);
- GraphPanel jsp = new GraphPanel();
+ EG3dGraphPanel jsp = new EG3dGraphPanel();
jsp.setPreferredSize(new Dimension(600,400));
translate3dGraph(jsp.getBtnPanel());
grapheContainer.removeAll();
grapheContainer.add(jsp, BorderLayout.CENTER);
- jsp.setModel(dataModel);
+ jsp.getView().addData(dataModel);
/*
JFrame jf = new JFrame("test");
jf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
@@ -155,7 +154,7 @@
}
- public void translate3dGraph(EbliGraphBtnPanel p){
+ public void translate3dGraph(EG3dBtnPanel p){
p.getDensityType().setText(Hydraulique1dResource.HYDRAULIQUE1D.getString("Mode densit\xE9"));
p.getWireframeType().setText(Hydraulique1dResource.HYDRAULIQUE1D.getString("Type Wireframe"));
p.getContourType().setText(Hydraulique1dResource.HYDRAULIQUE1D.getString("Mode contour"));
Modified: trunk/soft/fudaa-mascaret/ui/src/main/java/org/fudaa/fudaa/hydraulique1d/graphe3D/PanelGraphe3Dzyx.java
===================================================================
--- trunk/soft/fudaa-mascaret/ui/src/main/java/org/fudaa/fudaa/hydraulique1d/graphe3D/PanelGraphe3Dzyx.java 2015-04-14 09:38:03 UTC (rev 9106)
+++ trunk/soft/fudaa-mascaret/ui/src/main/java/org/fudaa/fudaa/hydraulique1d/graphe3D/PanelGraphe3Dzyx.java 2015-04-14 09:39:00 UTC (rev 9107)
@@ -5,11 +5,13 @@
+
import org.fudaa.dodico.hydraulique1d.metier.MetierBief;
import org.fudaa.dodico.hydraulique1d.metier.MetierHydraulique1d;
import org.fudaa.dodico.hydraulique1d.metier.MetierProfil;
-import org.fudaa.ebli.graphe3D.EbliGraphDataModel;
-import org.fudaa.ebli.graphe3D.EbliGraphDataModel.EbliGraphDataStructure;
+import org.fudaa.ebli.graphe3D.data.EG3dSurfaceProfilesModel;
+import org.fudaa.ebli.graphe3D.data.EG3dSurfaceProfilesModel.EbliGraphDataStructure;
+
/*
import javax.swing.JComponent;
import org.jzy3d.chart.factories.AWTChartComponentFactory;
@@ -68,7 +70,7 @@
return;
//-- creation du model de graphe 3d
- EbliGraphDataModel dataModel = new EbliGraphDataModel();
+ EG3dSurfaceProfilesModel dataModel = new EG3dSurfaceProfilesModel();
int nbProfils = bief.profils().length;
int nbMaxPoints = 0;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <bma...@us...> - 2015-04-07 15:29:35
|
Revision: 9104
http://sourceforge.net/p/fudaa/svn/9104
Author: bmarchan
Date: 2015-04-07 15:29:33 +0000 (Tue, 07 Apr 2015)
Log Message:
-----------
Ameliorations
Modified Paths:
--------------
trunk/business/fudaa-sig/src/main/java/org/fudaa/fudaa/sig/FSigResource.java
trunk/business/fudaa-sig/src/main/java/org/fudaa/fudaa/sig/layer/FSigTempLineInLayer.java
Modified: trunk/business/fudaa-sig/src/main/java/org/fudaa/fudaa/sig/FSigResource.java
===================================================================
--- trunk/business/fudaa-sig/src/main/java/org/fudaa/fudaa/sig/FSigResource.java 2015-04-07 14:57:34 UTC (rev 9103)
+++ trunk/business/fudaa-sig/src/main/java/org/fudaa/fudaa/sig/FSigResource.java 2015-04-07 15:29:33 UTC (rev 9104)
@@ -11,6 +11,7 @@
import org.fudaa.fudaa.ressource.FudaaResource;
import com.memoire.bu.BuResource;
+import com.memoire.fu.FuLib;
/**
* @version $Id: FSigResource.java,v 1.4 2006-09-19 15:10:20 deniger Exp $
@@ -24,4 +25,22 @@
super(_b);
}
+ /**
+ * Traduit et retourne la chaine traduite, avec ou sans valeurs \xE0 ins\xE9rer.
+ *
+ * @param _s La chaine \xE0 traduire.
+ * @param _vals Les valeurs, de n'importe quelle type.
+ * @return La chaine traduite.
+ */
+ public static String getS(String _s, Object ... _vals) {
+ String r = FSIG.getString(_s);
+ if (r == null) {
+ return r;
+ }
+
+ for (int i=0; i<_vals.length; i++) {
+ r = FuLib.replace(r, "{"+i+"}", _vals[i].toString());
+ }
+ return r;
+ }
}
\ No newline at end of file
Modified: trunk/business/fudaa-sig/src/main/java/org/fudaa/fudaa/sig/layer/FSigTempLineInLayer.java
===================================================================
--- trunk/business/fudaa-sig/src/main/java/org/fudaa/fudaa/sig/layer/FSigTempLineInLayer.java 2015-04-07 14:57:34 UTC (rev 9103)
+++ trunk/business/fudaa-sig/src/main/java/org/fudaa/fudaa/sig/layer/FSigTempLineInLayer.java 2015-04-07 15:29:33 UTC (rev 9104)
@@ -26,6 +26,8 @@
public class FSigTempLineInLayer {
private Color colorLineTempo_ = Color.RED;
+ private TraceIconModel iconModel_=new TraceIconModel(TraceIcon.PLUS_DOUBLE, 4, colorLineTempo_);
+ private TraceLigneModel lineModel_=new TraceLigneModel(TraceLigne.MIXTE, 2, colorLineTempo_);
GrBoite initZoom_;
@@ -66,11 +68,22 @@
}
/**
- * @param _colorLineTempo the colorLineTempo to set
+ * Modifie la couleur du segment et des icones.
+ * @param _colorLineTempo La couleur de ligne
*/
public void setColorLineTempo(Color _colorLineTempo) {
colorLineTempo_ = _colorLineTempo;
+ lineModel_.setCouleur(_colorLineTempo);
+ iconModel_.setCouleur(_colorLineTempo);
}
+
+ public void setLineModel(TraceLigneModel _model) {
+ lineModel_=_model;
+ }
+
+ public void setIconModel(TraceIconModel _model) {
+ iconModel_=_model;
+ }
/**
* @param _s la ligne a afficher temporairement. si null n'affiche rien
@@ -89,12 +102,10 @@
initZoom_ = panel_.getVueCalque().getViewBoite();
tmp_ = new ZCalqueLigneBrisee();
tmp_.setDestructible(true);
- final TraceIconModel model = new TraceIconModel(TraceIcon.PLUS_DOUBLE, 4, colorLineTempo_);
- tmp_.setIconModel(0, model);
- tmp_.setIconModel(1, model);
- final TraceLigneModel ligne = new TraceLigneModel(TraceLigne.MIXTE, 2, colorLineTempo_);
- tmp_.setLineModel(0, ligne);
- tmp_.setLineModel(1, ligne);
+ tmp_.setIconModel(0, iconModel_);
+ tmp_.setIconModel(1, iconModel_);
+ tmp_.setLineModel(0, lineModel_);
+ tmp_.setLineModel(1, lineModel_);
panel_.getVueCalque().getCalque().enPremier(tmp_);
panel_.getCqInfos().enPremier();
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <bma...@us...> - 2015-04-07 14:57:37
|
Revision: 9103
http://sourceforge.net/p/fudaa/svn/9103
Author: bmarchan
Date: 2015-04-07 14:57:34 +0000 (Tue, 07 Apr 2015)
Log Message:
-----------
Fix : Impossible de creer un transect
Modified Paths:
--------------
trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/metier/PivProject.java
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-04-02 12:49:04 UTC (rev 9102)
+++ trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/metier/PivProject.java 2015-04-07 14:57:34 UTC (rev 9103)
@@ -845,9 +845,16 @@
* @param _trans Le transect \xE0 ajouter.
*/
public void addTransect(PivTransect _trans) {
- PivTransect[] trans=Arrays.copyOf(transects, transects.length+1);
- trans[trans.length-1]=_trans;
+ PivTransect[] trans;
+ if (transects==null) {
+ trans=new PivTransect[]{_trans};
+ }
+ else {
+ trans=Arrays.copyOf(transects, transects.length+1);
+ trans[trans.length-1]=_trans;
+ }
+
setTransects(trans);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <bma...@us...> - 2015-04-02 12:49:13
|
Revision: 9102
http://sourceforge.net/p/fudaa/svn/9102
Author: bmarchan
Date: 2015-04-02 12:49:04 +0000 (Thu, 02 Apr 2015)
Log Message:
-----------
Add Drag&Drop
Modified Paths:
--------------
trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/PivImplementation.java
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-02 07:58:24 UTC (rev 9101)
+++ trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/PivImplementation.java 2015-04-02 12:49:04 UTC (rev 9102)
@@ -10,9 +10,12 @@
import java.awt.Desktop;
import java.awt.Dimension;
import java.awt.Point;
+import java.awt.datatransfer.DataFlavor;
+import java.awt.datatransfer.UnsupportedFlavorException;
import java.awt.event.ActionEvent;
import java.beans.PropertyVetoException;
import java.io.File;
+import java.io.IOException;
import java.util.Iterator;
import java.util.List;
import java.util.Observable;
@@ -23,8 +26,10 @@
import javax.swing.AbstractButton;
import javax.swing.ButtonGroup;
import javax.swing.JFileChooser;
+import javax.swing.JFrame;
import javax.swing.JOptionPane;
import javax.swing.SwingUtilities;
+import javax.swing.TransferHandler;
import org.fudaa.ctulu.CtuluLibFile;
import org.fudaa.ctulu.gui.CtuluDialog;
@@ -81,7 +86,7 @@
protected static BuInformationsSoftware isPIV_ = new BuInformationsSoftware();
static {
isPIV_.name = "LSPIV";
- isPIV_.version = "1.4.2";
+ isPIV_.version = "1.4.3";
isPIV_.date = "2015-03-31";
isPIV_.rights = PivResource.getS("Tous droits r\xE9serv\xE9s")+". CEREMA (c)1999-2015";
isPIV_.license = "GPL2";
@@ -665,6 +670,9 @@
public void init() {
CtuluImageExport.removeWritableFormats(new String[]{"ps"});
+
+ // DragAndDrop
+ installDragAndDrop();
super.init();
// Pour forcer l'activation du command listener.
@@ -694,7 +702,59 @@
BuMenu mn=buildPivMenu();
mb.addMenu(mn);
}
+
+ /**
+ * Met en place le drag&drop pour les fichiers projet
+ */
+ protected void installDragAndDrop() {
+ ((JFrame) getFrame()).setTransferHandler(new TransferHandler() {
+ @Override
+ public boolean canImport(TransferSupport support) {
+ for (DataFlavor df : support.getDataFlavors()) {
+ if (df.equals(DataFlavor.javaFileListFlavor)) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /**
+ * L'importation de donn\xE9es.
+ */
+ @Override
+ public boolean importData(TransferSupport support) {
+ if (canImport(support)) {
+ try {
+ @SuppressWarnings("unchecked")
+ final List<File> files=(List<File>) support.getTransferable().getTransferData(DataFlavor.javaFileListFlavor);
+ if (files.size() > 1) {
+ error(PivResource.getS("Un seul fichier projet est autoris\xE9 pour le transfert"));
+ return false;
+ }
+ // Un thread est lanc\xE9, sinon l'explorer de fichier d'ou provient le fichier est bloqu\xE9
+ // durant le processus d'ouverture
+ new Thread(new Runnable() {
+ @Override
+ public void run() {
+ ouvrir(files.get(0));
+ }
+ }).start();
+
+ return true;
+ }
+ catch (UnsupportedFlavorException ufe) {
+ ufe.printStackTrace();
+ }
+ catch (IOException ioe) {
+ ioe.printStackTrace();
+ }
+ }
+ return false;
+ }
+ });
+ }
+
/**
* Construit le menu projet.
* @return Le menu projet.
@@ -835,44 +895,6 @@
*/
@Override
public void start() {
-// ((JFrame)getFrame()).setTransferHandler(new TransferHandler() {
-//
-// @Override
-// public boolean canImport(TransferSupport support) {
-// for (DataFlavor df : support.getDataFlavors()) {
-// if (df.equals(DataFlavor.javaFileListFlavor)) {
-// return true;
-// }
-// }
-// return false;
-// }
-//
-// /**
-// * L'importation de donn\xE9es.
-// */
-// @Override
-// public boolean importData(TransferSupport support) {
-// if (canImport(support)) {
-// try {
-// List<File> files = (List<File>) support.getTransferable().getTransferData(DataFlavor.javaFileListFlavor);
-// if (files.size() > 1) {
-// error(PivResource.getS("Un seul fichier projet est autoris\xE9 pour le transfert"));
-// return false;
-// }
-// ouvrir(files.get(0));
-// return true;
-// }
-// catch (UnsupportedFlavorException ufe) {
-// ufe.printStackTrace();
-// }
-// catch (IOException ioe) {
-// ioe.printStackTrace();
-// }
-// }
-// return false;
-// }
-// });
-
super.start();
super.addFrameListLeft();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <bma...@us...> - 2015-04-02 07:58:26
|
Revision: 9101
http://sourceforge.net/p/fudaa/svn/9101
Author: bmarchan
Date: 2015-04-02 07:58:24 +0000 (Thu, 02 Apr 2015)
Log Message:
-----------
Traduction
Modified Paths:
--------------
trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/PivRealView.java
trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/action/PivComputeFlowAction.java
trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/action/PivCreateParticleLinesAction.java
trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/particles/PivComputeParticlesTaskModel.java
trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/particles/PivParticlesLayerPersistData.java
trunk/soft/fudaa-lspiv/src/main/resources/org/fudaa/fudaa/piv/piv_en.fr_txt
Modified: trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/PivRealView.java
===================================================================
--- trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/PivRealView.java 2015-04-02 06:56:35 UTC (rev 9100)
+++ trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/PivRealView.java 2015-04-02 07:58:24 UTC (rev 9101)
@@ -210,6 +210,7 @@
// Layer des ortho points
cqRealOrthoPoints_=new ZCalqueMultiPointEditable(null,null);
cqRealOrthoPoints_.setTitle(PivResource.getS("Points r\xE9f\xE9rence"));
+ cqRealOrthoPoints_.setLongTitle(PivResource.getS("Points r\xE9f\xE9rence"));
cqRealOrthoPoints_.setIconModel(0, new TraceIconModel(TraceIcon.PLUS_DOUBLE, 3, Color.RED));
cqRealOrthoPoints_.setName("cqRealOrthoPoints");
cqRealOrthoPoints_.setDestructible(false);
@@ -219,6 +220,7 @@
// Layer des ortho points recalcul\xE9s (ajout\xE9 a la demande)
cqRealControlPoints_=new ZCalqueMultiPointEditable(null,null);
cqRealControlPoints_.setTitle(PivResource.getS("Points de contr\xF4le"));
+ cqRealControlPoints_.setLongTitle(PivResource.getS("Points de contr\xF4le"));
cqRealControlPoints_.setIconModel(0, new TraceIconModel(TraceIcon.PLUS_DOUBLE, 3, Color.BLUE));
cqRealControlPoints_.setName("cqRealControlPoints");
cqRealControlPoints_.setDestructible(false);
@@ -237,6 +239,7 @@
// Layer de l'image en espace reel
cqRealImg_ = new PivImageRasterLayer();
cqRealImg_.setTitle(PivResource.getS("Image transform\xE9e"));
+ cqRealImg_.setLongTitle(PivResource.getS("Image transform\xE9e"));
cqRealImg_.setName("cqRealImg");
// Layer des vitesses moyennes.
@@ -313,8 +316,8 @@
// Layer des transect
cqTransect_= new ZCalqueLigneBriseeEditable();
- cqTransect_.setTitle(PivResource.getS("Transect"));
- cqTransect_.setLongTitle(PivResource.getS("Transect"));
+ cqTransect_.setTitle(PivResource.getS("Transects"));
+ cqTransect_.setLongTitle(PivResource.getS("Les transects"));
cqTransect_.setName("cqTransect");
cqTransect_.setFormeEnable(new int[]{DeForme.LIGNE_BRISEE});
cqTransect_.setLineModel(1, new TraceLigneModel(TraceLigne.POINTILLE, 2, Color.ORANGE));
Modified: trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/action/PivComputeFlowAction.java
===================================================================
--- trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/action/PivComputeFlowAction.java 2015-04-02 06:56:35 UTC (rev 9100)
+++ trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/action/PivComputeFlowAction.java 2015-04-02 07:58:24 UTC (rev 9101)
@@ -140,7 +140,7 @@
for (int i=0; i<trans.length; i++) {
GrPolyligne pl = trans[i].getStraight();
if (pl.sommet(0).z_ < param.getWaterElevation() || pl.sommet(pl.nombre() - 1).z_ < param.getWaterElevation()) {
- impl.error(PivResource.getS("Erreur"), PivResource.getS("Au moins un point extremit\xE9 du transect n\xB0 "+(i+1)+" a un Z inf\xE9rieur au niveau d'eau."));
+ impl.error(PivResource.getS("Erreur"), PivResource.getS("Au moins un point extremit\xE9 du transect n\xB0{0} a un Z inf\xE9rieur au niveau d'eau.",(i+1)));
return false;
}
}
Modified: trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/action/PivCreateParticleLinesAction.java
===================================================================
--- trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/action/PivCreateParticleLinesAction.java 2015-04-02 06:56:35 UTC (rev 9100)
+++ trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/action/PivCreateParticleLinesAction.java 2015-04-02 07:58:24 UTC (rev 9101)
@@ -28,7 +28,7 @@
PivComputeParticlesTaskModel taskTrajectories = null;
public PivCreateParticleLinesAction(final ZEbliCalquesPanel panel, FudaaCommonImplementation impl, PivParticlesLayer[] _layers) {
- super(FSigResource.getS("Calcul des lignes de courants/trajectoires..."), FSigResource.FSIG.getIcon("crystal_oscilloscope.png"), "TRAJ");
+ super(PivResource.getS("Calcul des lignes de courant/trajectoires..."), PivResource.PIV.getIcon("crystal_oscilloscope.png"), "TRAJ");
impl_ = impl;
pnCalque_ = panel;
layers_=_layers;
Modified: trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/particles/PivComputeParticlesTaskModel.java
===================================================================
--- trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/particles/PivComputeParticlesTaskModel.java 2015-04-02 06:56:35 UTC (rev 9100)
+++ trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/particles/PivComputeParticlesTaskModel.java 2015-04-02 07:58:24 UTC (rev 9101)
@@ -325,9 +325,9 @@
if (idxRemove > 0) {
String txt = null;
if (idxRemove == 1) {
- txt = PivResource.getS("1 point de d\xE9part a \xE9t\xE9 ignor\xE9 car il en dehors du maillage");
+ txt = PivResource.getS("1 point de d\xE9part a \xE9t\xE9 ignor\xE9 car il est en dehors du maillage");
} else {
- txt = PivResource.getS("{0} points de d\xE9part ont \xE9t\xE9 ignor\xE9s car ils en dehors du maillage", CtuluLibString.getString(idxRemove));
+ txt = PivResource.getS("{0} points de d\xE9part ont \xE9t\xE9 ignor\xE9s car ils sont en dehors du maillage", CtuluLibString.getString(idxRemove));
}
_messages[0] = txt;
}
@@ -522,7 +522,7 @@
JPanel mainSegment = new JPanel(new BuVerticalLayout(5, false, true));
mainSegment.add(conteneur);
JPanel pn = new JPanel(new BuGridLayout(3, 2, 0));
- JButton bt = new JButton(PivResource.getS("zoomer sur le segment"));
+ JButton bt = new JButton(PivResource.getS("Zoomer sur le segment"));
bt.addActionListener(new ActionListener() {
@Override
public void actionPerformed(final ActionEvent _e) {
@@ -634,7 +634,7 @@
@Override
public String getTitre() {
- return PivResource.getS("Lignes de courants") + "/" + PivResource.getS("Trajectoires");
+ return PivResource.getS("Lignes de courant") + "/" + PivResource.getS("Trajectoires");
}
protected boolean isLigneCourant() {
@@ -648,7 +648,7 @@
@Override
public String isTakDataValid() {
if (!this.integerEditor_.isValueValidFromComponent(finesse_)) {
- return PivResource.getS("La finesse doit \xEAtre d\xE9fini par un entier sup\xE9rieur \xE0 1");
+ return PivResource.getS("La pr\xE9cision du trac\xE9 doit \xEAtre d\xE9finie par un entier sup\xE9rieur \xE0 1");
}
if (!isSegmentValid()) {
return PivResource.getS("Le segment n'est pas d\xE9fini");
Modified: trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/particles/PivParticlesLayerPersistData.java
===================================================================
--- trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/particles/PivParticlesLayerPersistData.java 2015-04-02 06:56:35 UTC (rev 9100)
+++ trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/particles/PivParticlesLayerPersistData.java 2015-04-02 07:58:24 UTC (rev 9101)
@@ -84,13 +84,13 @@
// res.vx=src.getVarListModel()
res.vx=src.getVariableById(vx);
if (res.vx == null) {
- log.addFatalError(PivResource.getS("La vitesse Vx d\xE9finie par {0} n'existe pas dans le projet", vx));
+ log.addFatalError(PivResource.getS("La composante Vx d\xE9finie par {0} n'existe pas dans les r\xE9sultats", vx));
return null;
}
// res.vy = finder.getVariable(vy);
res.vy=src.getVariableById(vy);
if (res.vy == null) {
- log.addFatalError(PivResource.getS("La vitesse Vy d\xE9finie par {0} n'existe pas dans le projet", vy));
+ log.addFatalError(PivResource.getS("La composante Vy d\xE9finie par {0} n'existe pas dans les r\xE9sultats", vy));
return null;
}
@@ -112,7 +112,7 @@
// res.firstTimeStepIdx_ = src.getNbTimeStep() - 1;
// }
// log
-// .addWarn(PivResource.getS("Le pas de temps {0} n'a pas \xE9t\xE9 trouv\xE9 dans le projet. Le pas de temps initial a \xE9t\xE9 r\xE9initialis\xE9 par d\xE9faut",
+// .addWarn(PivResource.getS("Le pas de temps {0} n'a pas \xE9t\xE9 trouv\xE9 dans les r\xE9sultats. Le pas de temps initial a \xE9t\xE9 r\xE9initialis\xE9 par d\xE9faut",
// Double.toString(initTime)));
// }
// res.firstTimeStep_ = src.getTimeStep(res.firstTimeStepIdx_);
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 2015-04-02 06:56:35 UTC (rev 9100)
+++ trunk/soft/fudaa-lspiv/src/main/resources/org/fudaa/fudaa/piv/piv_en.fr_txt 2015-04-02 07:58:24 UTC (rev 9101)
@@ -1,4 +1,7 @@
+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
<original>=<original>
+A distance constante=At a constant distance
+A pas de temps constant=At a constant time
Affiche l'image source s\xE9lectionn\xE9e=Show selected source image
Affiche l'image s\xE9lectionn\xE9e=Show selected image
Affiche le r\xE9sultat instantan\xE9 s\xE9lectionn\xE9=Show selected instantaneous result
@@ -10,13 +13,20 @@
Analyse des images ok=Image analysis ok
Analyse du couple d'images {0} sur {1}=Analysis of image pair {0} out of {1}
Analyse interrompue=Analysis interrupted
-Au moins un point extremit\xE9 du transect a un Z inf\xE9rieur au niveau d'eau=At least one edge of the transect is lower than the water level
+Au moins un point extremit\xE9 du transect n\xB0{0} a un Z inf\xE9rieur au niveau d'eau=At least one extremity point of the transect #{0} is lower than the water level
+Aucun point de d\xE9part n'appartient au maillage=No starting point belongs to the mesh
Aucun point de r\xE9f\xE9rence au sol n'a \xE9t\xE9 d\xE9fini=No ground reference point was defined
+Aucun transect n'a \xE9t\xE9 d\xE9fini=No transect was defined
+Aucun=None
+Aucune ligne \xE0 tracer=No line to be drawn
Cache des images automatique=Automatic images cache
Calcul des coefficients ok=Calculation of the coefficients ok
Calcul des coefficients=Calculation of the coefficients
+Calcul des d\xE9bits=Calculation of the discharges
+Calcul des lignes de courant/trajectoires=Calculation of stream lines/paths
Calcul des r\xE9sultats instantan\xE9s=Calculation of the instantaneous results
Calcul des r\xE9sultats moyens=Calculation of the average results
+Calcul des scalaires instantan\xE9s=Calculation of instantaneous scalar
Calcul des vitesses moyennes ok=Calculation of the average velocities ok
Calcul des vitesses moyennes=Calculation of the average velocities
Calcul du d\xE9bit ok=Calculation of the discharge ok
@@ -24,11 +34,20 @@
Calcul interrompu=Calculation interrupted
Calcul ok=Calculation ok
Calcul termin\xE9=Calculation is completed
+Calcul=Calculation
Calculer des valeurs par d\xE9faut=Calculate default values
+Calculer une seule trajectoire=Calculate only one path
+Calculer=Calculate
+Calque {0} cr\xE9\xE9={0} layer created
+Calque {0} mis \xE0 jour={0} layer updated
Cette cr\xE9ation sera r\xE9alis\xE9e apr\xE8s chaque op\xE9ration\n de s\xE9lection d'image ou transformation, et d\xE9s maintenant.\n\nSouhaitez vous continuer ?=This creation will be performed following each\nimage selection or transformation operations, and now.\n\nDo you want to continue ?
Chargement du projet=Opening project
+Choisir 2 points diff\xE9rents=Please choose 2 different points
+Choix de la variable=Variable choice
+Choix du segment=Segment choice
Coefficient de vitesse=Velocity coefficient
Construction des noeuds=Nodes construction
+Construction des points=Points construction
Construction des \xE9l\xE9ments=Elements construction
Contour de grille=Grid outline
Contour grille=Grid outline
@@ -39,15 +58,16 @@
Cr\xE9ation des caches images transform\xE9es=Creating transformed images caches
Cr\xE9ation des caches images=Creating images caches
Dans le projet=In project
+Delta (valeur absolue)=Delta (absolute value)
Des points de grille existent d\xE9j\xE0.\nVoulez-vous les supprimer avant ajout des nouveaux ?=Grid points already exist.\nDo you want to remove them before adding new ones ?
Des points de grille existent d\xE9j\xE0.\nVoulez-vous les supprimer avant import des nouveaux ?=Grid points already exist.\nDo you want to remove them before importing new ones ?
Des points existent d\xE9j\xE0. Voulez-vous les remplacer ?=Points already exist. Do you want to replace them?
Des r\xE9sultats instantan\xE9s doivent exister=Instantaneous results must exist
Distance d'extrapolation=Extrapolation range
+Dur\xE9e d'int\xE9gration=Integration duration
D\xE9bit total (m\xB3/s)=Total discharge (m\xB3/s)
D\xE9bit=Discharge
D\xE9finir=Define
-D\xE9finition d'un transect=Definition of a transect
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
@@ -55,12 +75,12 @@
Editer=Edit
Erreur d'analyse du couple d'images {0},{1}\:\n=Error while analysing image pair {0},{1}\:\n
Erreur de calcul des coefficients \:\n=Error while calculating the coefficients\:\n
-Erreur de calcul des r\xE9sultats instantan\xE9s\:\n=Error while calculating instantaneous results\:\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
Erreur de calcul des vitesses moyennes\:\n=Error while calculating average velocities\:\n
-Erreur de calcul du d\xE9bit\:\n=Error while calculating the discharge\:\n
+Erreur de calcul du d\xE9bit du transect {0}\:\n=Error while calculating the transect {0} discharge\:\n
Erreur de filtrage des r\xE9sultats\:\n=Error while filtering the results\:\n
-Erreur de reconditionnement du transect\:\n=Error while repacking the transect\:\n
+Erreur de reconditionnement du transect {0}\:\n=Error while repacking the transect {0}\:\n
Erreur de transformation de l'image {0}\:\n=Error while picture {0} transformation\:\n
Erreur de transformation des vitesses instantan\xE9es\:\n=Error while instantaneous velocities transformation\:\n
Erreur de v\xE9rification de l'orthorectification\:\n=Error while checking orthorectification\:\n
@@ -94,6 +114,7 @@
Grille=Grid
IA en vert=IA in green
IA/SA=IA/SA
+Ichiro Fujita (Prof.), Universit\xE9 de Kob\xE9=Ichiro Fujita (Prof.), Kobe University
Il doit exister au moins une image source=At least one source image must exist
Il doit exister au moins une image transform\xE9e=At least one transformed image must exist
Il doit exister des r\xE9sultats de calcul de d\xE9bit=Some discharge calculation results must exist
@@ -106,13 +127,18 @@
Import des points de r\xE9f\xE9rence=Import of the reference points
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
Interruption en cours. Merci de patienter=Interruption in progress. Please wait
Intervalle de temps (s)=Time step (s)
Intervalle de temps=Time step
Isolignes / Isosurfaces=Isolines / Isosurfaces
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
+La composante Vy d\xE9finie par {0} n'existe pas dans les r\xE9sultats=Vy component defined by {0} does not exist in the results
La cr\xE9ation/mise \xE0 jour des caches de toutes les images peut prendre\n plusieurs minutes=Caches creation/update for all images can take several\nminutes
+La dur\xE9e doit \xEAtre d\xE9finie par un r\xE9el en secondes=The duration must be defined by a real in seconds
+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
Label=Label
@@ -120,11 +146,13 @@
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
Le contour de grille doit comporter 4 sommets=The grid outline must comprise 4 vertices
+Le delta du marqueur doit \xEAtre renseign\xE9=The delta of the marker must be entered
Le fichier ne semble pas \xEAtre un projet Fudaa-LSPIV.\nCauses possibles\:\n- Le fichier n'est pas dans un format ZIP\n- Il ne contient pas le r\xE9pertoire '{0}'=The file seems not to be a Fudaa-LSPIV project.\nPotential causes\:\n- The file is not in a ZIP format\n- The file does not contain the '{0}' directory
Le niveau d'eau doit \xEAtre un r\xE9el=The water level must be a real number
Le nombre de points doit \xEAtre au minimum de 4=The minimum number of points is 4
Le nombre de points doit \xEAtre sup\xE9rieur \xE0 1=The number of points must be greater than 1
Le nombre de points doit \xEAtre un entier sup\xE9rieur ou \xE9gal \xE0 2=The number of points must be an integer greater than or equal to 2
+Le pas de temps {0} n'a pas \xE9t\xE9 trouv\xE9 dans les r\xE9sultats. Le pas de temps initial a \xE9t\xE9 r\xE9initialis\xE9 par d\xE9faut=The time step {0} was not found in the results. The initial time was reset to default
Le projet doit contenir au moins 1 image source=The project must contain at least 1 source image
Le projet doit contenir au moins 1 image transform\xE9e=The project must contain at least 1 transformed image
Le projet doit contenir au moins 2 images transform\xE9es=The project must contain at least 2 transformed images
@@ -134,24 +162,29 @@
Le projet ne contient pas de r\xE9sultats moyenn\xE9s=The project does not contain averaged results
Le r\xE9pertoire de destination n'est pas d\xE9fini ou est inaccessible=The destination directory is not defined or is inaccessible
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 transect n'a pas \xE9t\xE9 d\xE9fini=The transect was not defined
+Le segment n'est pas d\xE9fini=Segment is not defined
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 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 d\xE9bit n'ont pas \xE9t\xE9 donn\xE9s=The discharge calculation parameters were not specified
Les param\xE8tres de calcul n'ont pas \xE9t\xE9 donn\xE9s=The calculation parameters were not specified
Les param\xE8tres doivent \xEAtre renseign\xE9s et les images transform\xE9es doivent exister=The parameters must be specified and the transformed images must exist
Les param\xE8tres et points de r\xE9f\xE9rence doivent \xEAtre renseign\xE9s=The parameters and the reference points must be specified
Les points de grille n'ont pas \xE9t\xE9 d\xE9finis=The grid points were not specified
Les points de r\xE9f\xE9rence doivent avoir \xE9t\xE9 saisis=The reference points must be specified
Les points {0} et {1} ont des coordonn\xE9es r\xE9elles confondues=The points {0} and {1} have the same real coordinates
+Les transects=The transects
Lie/d\xE9lie l'image et le r\xE9sultat instantan\xE9=Bind/unbind image and instantaneous result
+Ligne=Line
+Lignes de courant=Stream lines
Limites de la norme de vitesse (m/s)=Velocity magnitude thresholds (m/s)
Limites de la vitesse v transversale (m/s)=Transverse velocity magnitude thresholds (m/s)
Liste des images=Images list
Liste des r\xE9sultats instantan\xE9s=Instantaneous results list
+Marqueur=Mark
+Marqueurs=Marks
Max corr\xE9lation=Max correlation
Max norme de vitesse=Max velocity magnitude
Max vitesse transversale=Max transverse velocity
@@ -160,23 +193,34 @@
Min norme de vitesse=Min velocity magnitude
Min vitesse transversale=Min transverse velocity
Min=Min
+Mode=Mode
Modification des points de r\xE9f\xE9rence=Modification of the reference points
-Modification du transect initial=Modification of the initial transect
+Modification des transects initiaux=Modification of the initial transects
Modification du transect=Modification of the transect
Moyenne=Average
Niveau d'eau (m)=Water level (m)
Nombre de points < 6, tous les points doivent avoir un Z identique=Number of points < 6, all points must have the same Z
Nombre de points sur les segments 1-2/3-4=Number of points in segments 1-2/3-4
Nombre de points sur les segments 2-3/4-1=Number of points in segments 2-3/4-1
+Nombre de trajectoire/lignes de courant=Number of paths/stream lines
Nouveau projet=New project
+Nouveau transect=New transect
+Nouveau=New
N\xB0=#
Orthorectification=Orthorectification
Ouverture d'un projet=Opening a project
Param\xE8tres de calcul de d\xE9bit=Discharge calculation parameters
Param\xE8tres de calcul=Calculation parameters
Param\xE8tres de transformation=Transformation parameters
+Param\xE8tres du transect=Transect parameters
+Particules (res. bruts)=Particles (raw res.)
+Particules (res. filtr\xE9s)=Particles (filtered res.)
+Particules (res. moy.)=Particles (ave. res.)
Pas d'espace d'interpolation de la bathym\xE9trie (m)=Interpolation space step of the bathymetry (m)
Pas d'image \xE0 transf\xE9rer ou aucune image s\xE9lectionn\xE9e=No image to transfer or no selected image
+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
Points de contr\xF4le=Check points
Points de grille=Grid points
Points de r\xE9f\xE9rence=Reference points
@@ -190,21 +234,28 @@
Post-traitement=Post-processing
Probl\xE8me d'installation=Installation problem
Probl\xE8me de cr\xE9ation du projet=Problem with project creation
+Pr\xE9ciser le nombre de trajectoires=Enter number of paths
+Pr\xE9cision du trac\xE9=Tracing precision
Pr\xE9visualisation des images transform\xE9es=Transformed images preview
Pts calcul\xE9s=Calculated pts
Pts r\xE9els=Real pts
Rayon de recherche des vitesses (m)=Velocity searching radius (m)
Rayon de recherche des vitesses=Velocity searching radius
+Rayon de recherche=Searching radius
+Rechargement des trac\xE9s de particules=Reloading of particles tracing
Reconditionnement de l'image {0} sur {1}=Repacking image {0} out of {1}
-Reconditionnement du transect ok=Transect repack ok
-Reconditionnement du transect=Transect repack
+Reconditionnement du transect {0} ok=Transect {0] repack ok
Reconditionnement interrompu=Repack interrupted
Reconditionnement ok=Repack ok
+Reconditionnement/calcul de d\xE9bit pour le transect {0}=Repack/calculation of discharge for the transect {0}
+Rejouer les donn\xE9es=Replay data
Reprise=Resuming
R\xE9pertoire contenant les executables=Directory containing the executable files
R\xE9pertoire destination=Destination directory
R\xE9solution (m/pix)=Resolution (m/pix)
R\xE9sultat \: {0}=Result \: {0}
+R\xE9sultats bruts=Raw results
+R\xE9sultats filtr\xE9s=Filtered results
R\xE9sultats inst. bruts=Raw inst. results
R\xE9sultats inst. filtr\xE9s=Filtred inst. results
R\xE9sultats instantan\xE9s bruts=Raw instantaneous results
@@ -220,23 +271,32 @@
Sip=Sip
Sjm=Sjm
Sjp=Sjp
-Souhaitez vous remplacer le transect initial par celui calcul\xE9 ?=Would you replace initial transect by that calculated ?
+Souhaitez vous remplacer les transects initiaux par ceux calcul\xE9s ?=Would you replace initial transects by those calculated ?
Stop=Stop
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 transect=Selection of the transect file
S\xE9lection des images sources=Selection of the source images
+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
Taille de l'aire=Area size
Taille de l'aire\: Doit \xEAtre un entier positif et pair=Area size\: Must be an even positive integer
+Temps=Time
Terminer la saisie des points et valider=End input of the points and validate
Tous droits r\xE9serv\xE9s=All rights reserved
Toutes les images=All images
Tracer des isolignes=Isolines drawing
Tracer des isosurfaces=Isosurfaces drawing
+Trac\xE9s de particules sur r\xE9sultats bruts=Particles tracing with raw results
+Trac\xE9s de particules sur r\xE9sultats filtr\xE9s=Particles tracing with filtered results
+Trac\xE9s de particules sur r\xE9sultats moyenn\xE9s=Particles tracing with averaged results
Traitement des images sources=Sources images processing
+Trajectoires=Paths
+Transect n\xB0 {0}=Transect #{0}
Transect=Transect
+Transects=Transects
Transformation de l'image {0} sur {1}=Transformation of image {0} out of {1}
Transformation des images ok=Transformation of the images ok
Transformation des images=Transformation of the images
@@ -245,14 +305,15 @@
Transformation ok=Transformation ok
Transformer les images=Transform the images
Triangulation=Meshing
+Type=Type
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
-Un transect existe d\xE9j\xE0. Voulez-vous le remplacer ?=A transect already exists. Do you want to replace it?
Une erreur de lecture s'est produite=An error while reading occurred
+Vecteur=Vector
Verification des points de r\xE9f\xE9rence=Verification of the reference points
Verification interrompue=Verification interrupted
Vit. instantan\xE9es=Instantaneous vel.
-Vit. instantan\xE9es\: point n\xB0=Instantaneous vel.\: point n\xB0
+Vit. instantan\xE9es\: point n\xB0=Instantaneous vel.\: point #
Vit. moy. prof=Depth-average vel
Vit. surf. inst. brutes=Raw inst. surf. vel.
Vit. surf. inst. filtr\xE9es=Filtered inst. surf. vel.
@@ -265,6 +326,7 @@
Vitesses moyenn\xE9es sur la profondeur=Depth-average velocities
Voir les vitesses moyennes de surface=Show average surface velocities
Voir les vitesses moyennes sur la verticale=Show depth-averaged velocities
+Voulez-vous supprimer les transects existants ?=Do you want to remove existing transects?
Vous devez pr\xE9ciser un nom de r\xE9pertoire=You must specify a directory name
Vous devez s\xE9lectionner 1 r\xE9sultat au moins pour la moyenne=You must select at least 1 result for the average
Vue 2D=2D view
@@ -288,6 +350,12 @@
Ymin doit \xEAtre un r\xE9el=Ymin must be a real number
Ymin=Ymin
Z r\xE9el=Real Z
+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}
+{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
{0}\: Doit \xEAtre inf\xE9rieur \xE0 {1}={0}\: Must be less than {1}
{0}\: Doit \xEAtre sup\xE9rieur \xE0 {1}={0}\: Must be greater than {1}
{0}\: Doit \xEAtre un entier > 0={0}\: Must be an integer > 0
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <bma...@us...> - 2015-03-31 15:44:56
|
Revision: 9099
http://sourceforge.net/p/fudaa/svn/9099
Author: bmarchan
Date: 2015-03-31 15:44:49 +0000 (Tue, 31 Mar 2015)
Log Message:
-----------
Fix nom l?\195?\169gende + restitution pas de temps
Modified Paths:
--------------
trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/particles/PivParticlesLayer.java
trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/particles/PivParticlesLayerPersistData.java
Modified: trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/particles/PivParticlesLayer.java
===================================================================
--- trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/particles/PivParticlesLayer.java 2015-03-31 14:51:28 UTC (rev 9098)
+++ trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/particles/PivParticlesLayer.java 2015-03-31 15:44:49 UTC (rev 9099)
@@ -144,7 +144,7 @@
protected BPalettePlage createPlageForSelectedVar() {
final BPalettePlage s = new BPalettePlage();
- s.setTitre(getSelectedAttributeLongName());
+ s.setTitre(getSelectedAttributeName());
final CtuluRange r = new CtuluRange();
getRange(r);
if (r.max_ - r.min_ < 0.01) {
Modified: trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/particles/PivParticlesLayerPersistData.java
===================================================================
--- trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/particles/PivParticlesLayerPersistData.java 2015-03-31 14:51:28 UTC (rev 9098)
+++ trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/particles/PivParticlesLayerPersistData.java 2015-03-31 15:44:49 UTC (rev 9099)
@@ -104,8 +104,7 @@
res.marqueur_.timeStep_ = markOnTimeStep;
}
res.firstTimeStep_=initTime;
-//
-// res.firstTimeStepIdx_ = findTimeStep(src);
+ res.firstTimeStepIdx_ = Math.max(0,findTimeStep(src));
// if (res.firstTimeStepIdx_ < 0) {
// res.firstTimeStepIdx_ = src.getNbTimeStep() / 2;
// if (res.firstTimeStepIdx_ < 0) res.firstTimeStepIdx_ = 0;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <bma...@us...> - 2015-03-31 14:51:30
|
Revision: 9098
http://sourceforge.net/p/fudaa/svn/9098
Author: bmarchan
Date: 2015-03-31 14:51:28 +0000 (Tue, 31 Mar 2015)
Log Message:
-----------
Chgt version -> 1.4.2
Modified Paths:
--------------
trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/PivImplementation.java
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-03-31 14:13:30 UTC (rev 9097)
+++ trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/PivImplementation.java 2015-03-31 14:51:28 UTC (rev 9098)
@@ -82,7 +82,7 @@
static {
isPIV_.name = "LSPIV";
isPIV_.version = "1.4.2";
- isPIV_.date = "2015-02-24";
+ isPIV_.date = "2015-03-31";
isPIV_.rights = PivResource.getS("Tous droits r\xE9serv\xE9s")+". CEREMA (c)1999-2015";
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-03-31 14:13:38
|
Revision: 9097
http://sourceforge.net/p/fudaa/svn/9097
Author: bmarchan
Date: 2015-03-31 14:13:30 +0000 (Tue, 31 Mar 2015)
Log Message:
-----------
Am?\195?\169lioration du trac?\195?\169 de particules
Modified Paths:
--------------
trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/PivImplementation.java
trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/PivRealView.java
trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/action/PivCreateParticleLinesAction.java
trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/particles/PivComputeParticlesTaskModel.java
trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/particles/PivParticlesLayer.java
trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/particles/PivParticlesSourceI.java
trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/particles/PivResultSource.java
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-03-31 10:13:52 UTC (rev 9096)
+++ trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/PivImplementation.java 2015-03-31 14:13:30 UTC (rev 9097)
@@ -734,6 +734,7 @@
mn.addSeparator(PivResource.getS("Post-traitement"));
mn.add(new PivComputeAverageAction(this));
mn.add(get2dFrame().getVisuPanel().getShowVelocitiesAction().buildMenuItem(EbliComponentFactory.INSTANCE));
+ mn.add(get2dFrame().getVisuPanel().getRealView().getTraceParticlesAction().buildMenuItem(EbliComponentFactory.INSTANCE));
mn.addSeparator(PivResource.getS("D\xE9bit"));
sm=new BuMenu(PivResource.getS("Transect"),"mnGRP");
Modified: trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/PivRealView.java
===================================================================
--- trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/PivRealView.java 2015-03-31 10:13:52 UTC (rev 9096)
+++ trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/PivRealView.java 2015-03-31 14:13:30 UTC (rev 9097)
@@ -90,7 +90,7 @@
private BuComboBox cbVel_;
private EbliAnimationAction actAnim_;
private AbstractButton btAnim_;
- private PivCreateParticleLinesAction actStreamLines_;
+ private PivCreateParticleLinesAction actParticleLines_;
private AbstractButton btStreamLines_;
private PivProject prj_;
private List<BCalqueAffichage> layers_=new ArrayList<BCalqueAffichage>();
@@ -480,9 +480,9 @@
btAnim_=actAnim_.buildToolButton(EbliComponentFactory.INSTANCE);
btAnim_.setEnabled(true);
- actStreamLines_=new PivCreateParticleLinesAction(pnLayers_, (FudaaCommonImplementation)pnLayers_.getCtuluUI(),
+ actParticleLines_=new PivCreateParticleLinesAction(pnLayers_, (FudaaCommonImplementation)pnLayers_.getCtuluUI(),
new PivParticlesLayer[]{cqAveParticles_,cqFltParticles_,cqRawParticles_});
- btStreamLines_=actStreamLines_.buildToolButton(EbliComponentFactory.INSTANCE);
+ btStreamLines_=actParticleLines_.buildToolButton(EbliComponentFactory.INSTANCE);
// La liste des variables possibles
cbVar_=new BuComboBox();
@@ -620,7 +620,7 @@
// Force la mise a jour du composant d'animation
actAnim_.setAnimAdapterInterface(new SequenceAnimationAdapter());
// Les calques peuvent avoir chang\xE9.
- actStreamLines_.setLayers(new PivParticlesLayer[]{cqAveParticles_, cqFltParticles_, cqRawParticles_});
+ actParticleLines_.setLayers(new PivParticlesLayer[]{cqAveParticles_, cqFltParticles_, cqRawParticles_});
Object itImgSel=cbImg_.getSelectedItem();
cbImg_.removeAllItems();
@@ -888,4 +888,12 @@
}
return actParamsTransect_;
}
+
+ /**
+ * Retourne l'action pour la saisie des parametres d'un transect.
+ * @return L'action.
+ */
+ public PivCreateParticleLinesAction getTraceParticlesAction() {
+ return actParticleLines_;
+ }
}
Modified: trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/action/PivCreateParticleLinesAction.java
===================================================================
--- trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/action/PivCreateParticleLinesAction.java 2015-03-31 10:13:52 UTC (rev 9096)
+++ trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/action/PivCreateParticleLinesAction.java 2015-03-31 14:13:30 UTC (rev 9097)
@@ -28,7 +28,7 @@
PivComputeParticlesTaskModel taskTrajectories = null;
public PivCreateParticleLinesAction(final ZEbliCalquesPanel panel, FudaaCommonImplementation impl, PivParticlesLayer[] _layers) {
- super(FSigResource.getS("Calcul des lignes de courants/trajectoires"), FSigResource.FSIG.getIcon("crystal_oscilloscope.png"), "TRAJ");
+ super(FSigResource.getS("Calcul des lignes de courants/trajectoires..."), FSigResource.FSIG.getIcon("crystal_oscilloscope.png"), "TRAJ");
impl_ = impl;
pnCalque_ = panel;
layers_=_layers;
@@ -43,6 +43,10 @@
@Override
public void actionPerformed(final ActionEvent _e) {
+ if (destLayer_.getSource().getGrid()==null) {
+ impl_.error(PivResource.getS("Pas de r\xE9sultats disponibles pour le trac\xE9 de particules"));
+ return;
+ }
taskTrajectories = new PivComputeParticlesTaskModel(pnCalque_,destLayer_);
new FudaaPanelTask(pnCalque_.getCtuluUI(), taskTrajectories).afficheDialog();
}
Modified: trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/particles/PivComputeParticlesTaskModel.java
===================================================================
--- trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/particles/PivComputeParticlesTaskModel.java 2015-03-31 10:13:52 UTC (rev 9096)
+++ trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/particles/PivComputeParticlesTaskModel.java 2015-03-31 14:13:30 UTC (rev 9097)
@@ -595,15 +595,16 @@
pn.add(new JLabel(PivResource.getS("Mode")));
pn.add(choixMode_);
pn.add(new JLabel(PivResource.getS("Vecteur")));
- ListModel<PivVectorDefinitionI> flecheListModel = destlayer_.getSource().getNewFlecheListModel();
+ ListModel<PivVectorDefinitionI> flecheListModel = destlayer_.getSource().getFlecheListModel();
CtuluComboBoxModelAdapter cb = new CtuluComboBoxModelAdapter(flecheListModel);
cbVitesse_ = new BuComboBox(cb);
cb.setSelectedItem(flecheListModel.getElementAt(0));
pn.add(cbVitesse_);
- pn.add(new JLabel(PivResource.getS("Pas de temps intial")));
+ pn.add(new JLabel(PivResource.getS("Pas de temps initial")));
cbFirstTime_ = new BuComboBox(new CtuluComboBoxModelAdapter(destlayer_.getSource().getTimeListModel()));
- cbFirstTime_.setSelectedIndex(0);
+ if (cbFirstTime_.getItemCount()>0)
+ cbFirstTime_.setSelectedIndex(0);
pn.add(cbFirstTime_);
pn.add(new JLabel(PivResource.getS("Dur\xE9e d'int\xE9gration:")));
pn.add(duree_);
Modified: trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/particles/PivParticlesLayer.java
===================================================================
--- trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/particles/PivParticlesLayer.java 2015-03-31 10:13:52 UTC (rev 9096)
+++ trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/particles/PivParticlesLayer.java 2015-03-31 14:13:30 UTC (rev 9097)
@@ -7,8 +7,10 @@
import java.awt.Graphics2D;
import java.util.ArrayList;
import java.util.HashMap;
+import java.util.Iterator;
import java.util.List;
import java.util.Map;
+import java.util.Map.Entry;
import org.fudaa.ctulu.CtuluAnalyze;
import org.fudaa.ctulu.CtuluAnalyzeGroup;
@@ -33,6 +35,7 @@
import org.fudaa.ebli.geometrie.GrMorphisme;
import org.fudaa.ebli.geometrie.GrPoint;
import org.fudaa.ebli.palette.BPalettePlage;
+import org.fudaa.ebli.palette.BPalettePlageProperties;
import org.fudaa.ebli.palette.PaletteManager;
import org.fudaa.ebli.trace.TraceIcon;
import org.fudaa.ebli.trace.TraceIconModel;
@@ -58,7 +61,7 @@
/**
* Only modified form constructor or from initFrom method.
*/
- GISAttributeInterface attrMark_=PivParticlesGISDataModel.ATT_MARK;
+// GISAttributeInterface attrMark_=PivParticlesGISDataModel.ATT_MARK;
// GISAttributeInterface attrTime_=new GISAttributeDouble("Time", true);
// GISAttributeInterface attrVX_=new GISAttributeDouble("VX", true);
// GISAttributeInterface attrVY_=new GISAttributeDouble("VY", true);
@@ -131,7 +134,7 @@
final GISZoneCollection geomData = modele_.getGeomData();
final int nbAttributes = geomData.getNbAttributes();
for (int i = 0; i < nbAttributes; i++) {
- if (geomData.getAttribute(i) != attrMark_) {
+ if (geomData.getAttribute(i) != PivParticlesGISDataModel.ATT_MARK) {
attList_.add(geomData.getAttribute(i));
// attListModel_.addElement(geomData.getAttribute(i).getLongName());
}
@@ -250,56 +253,104 @@
public void initFrom(final EbliUIProperties _p) {
if (_p != null) {
-// attSelectionModel_.clearSelection();
+ // attSelectionModel_.clearSelection();
super.initFrom(_p);
initPaletteMap();
- FuLog.warning("A modifier: "+new Exception().getStackTrace()[0].toString());
-// if (true) return;
-// if (TrIsoLayerDefault.restorePalette(_p, namePalette_)) {
-// updateLegende();
-// }
-// if (idx >= 0) {
-// attSelectionModel_.setSelectionInterval(idx, idx);
-// }
-// final EfTrajectoireParameters initParam=(EfTrajectoireParameters) _p.get(FSigTrPostTrajectoireLineLayerPersistence.INIT_DATA);
-// if (initParam != null) {
-// this.dataMemory_=initParam;
-// }
-// else {
-// final FSigTrPostTrajectoireLineLayerPersistData data=(FSigTrPostTrajectoireLineLayerPersistData) _p.get(FSigTrPostTrajectoireLineLayerPersistence.COMPUTE_DATA);
-// if (data != null) {
- final CtuluAnalyze log=new CtuluAnalyze();
- final PivParticlesLayerPersistData data=(PivParticlesLayerPersistData) _p.get(PivParticlesLayerPersistData.COMPUTE_DATA);
- if (data!=null) {
- EfTrajectoireParameters restore=data.restore(src_, log);
-// final EfTrajectoireParameters restore=(EfTrajectoireParameters)_p.get(FSigTrPostTrajectoireLineLayerPersistence.COMPUTE_DATA);
- if (!log.isEmpty()) {
- final CtuluAnalyzeGroup gr=new CtuluAnalyzeGroup(null);
- gr.addAnalyzer(log);
- CtuluAnalyzeGUI.showDialog(gr, vue2d_.getCtuluUI(), PivResource.getS("Rechargement des donn\xE9es trajectoires"));
- }
-// if (restore != null && _p.getBoolean(FSigTrPostTrajectoireLineLayerPersistence.RECOMPUTE)) {
- if (restore!=null) restoreData(log, restore);
- this.dataMemory_=restore;
+
+ // if (idx >= 0) {
+ // attSelectionModel_.setSelectionInterval(idx, idx);
+ // }
+ // final EfTrajectoireParameters initParam=(EfTrajectoireParameters)
+ // _p.get(FSigTrPostTrajectoireLineLayerPersistence.INIT_DATA);
+ // if (initParam != null) {
+ // this.dataMemory_=initParam;
+ // }
+ // else {
+ // final FSigTrPostTrajectoireLineLayerPersistData
+ // data=(FSigTrPostTrajectoireLineLayerPersistData)
+ // _p.get(FSigTrPostTrajectoireLineLayerPersistence.COMPUTE_DATA);
+ // if (data != null) {
+ final CtuluAnalyze log=new CtuluAnalyze();
+ final PivParticlesLayerPersistData data=(PivParticlesLayerPersistData) _p.get(PivParticlesLayerPersistData.COMPUTE_DATA);
+ if (data != null) {
+ EfTrajectoireParameters restore=data.restore(src_, log);
+ // final EfTrajectoireParameters
+ // restore=(EfTrajectoireParameters)_p.get(FSigTrPostTrajectoireLineLayerPersistence.COMPUTE_DATA);
+ if (!log.isEmpty()) {
+ final CtuluAnalyzeGroup gr=new CtuluAnalyzeGroup(null);
+ gr.addAnalyzer(log);
+ CtuluAnalyzeGUI.showDialog(gr, vue2d_.getCtuluUI(), PivResource.getS("Rechargement des trac\xE9s de particules"));
}
- else {
- this.dataMemory_=null;
- }
-// }
-// }
+ // if (restore != null &&
+ // _p.getBoolean(FSigTrPostTrajectoireLineLayerPersistence.RECOMPUTE)) {
+ if (restore != null)
+ restoreData(log, restore);
+ this.dataMemory_=restore;
+ }
+ else {
+ this.dataMemory_=null;
+ }
+ // }
+ // }
+ // }
+// final String markId=(String) _p.get("mark.attribute");
+// if (markId != null) {
+// attrMark_=modeleDonnees().getGeomData().getAttributeWithID(markId);
// }
- final String markId=(String) _p.get("mark.attribute");
- if (markId != null) {
- attrMark_=modeleDonnees().getGeomData().getAttributeWithID(markId);
- }
- attSel_ = getAttForName(_p.getString("att.selected"));
+ attSel_=getAttForName(_p.getString("att.selected"));
+
+ if (restorePalettes(_p, namePalette_)) {
+ updateLegende();
+ }
}
}
+ public static boolean restorePalettes(final EbliUIProperties _p, final Map<String, BPalettePlage> _dest) {
+ final String[] names = (String[]) _p.get("post.paletteNames");
+ if (names != null && names.length > 0) {
+ final BPalettePlageProperties[] props = (BPalettePlageProperties[]) _p.get("post.paletteProps");
+ if (_dest.size() > 0) {
+ _dest.clear();
+ }
+ for (int i = 0; i < names.length; i++) {
+ if (props[i] != null && names[i] != null) {
+ BPalettePlage plage = new BPalettePlage(props[i]);
+// initSubTitleLabel(plage);
+ _dest.put(names[i], plage);
+ }
+ }
+ return true;
+ }
+ return false;
+ }
+
+ public static EbliUIProperties savePalettes(final Map<String, BPalettePlage> _nameBPalette, final EbliUIProperties _prop) {
+ if (_prop == null) {
+ return null;
+ }
+ if (_nameBPalette == null || _nameBPalette.size() == 0) {
+ return _prop;
+ }
+ final List<String> paletteNames = new ArrayList<>(_nameBPalette.size());
+ final List<BPalettePlageProperties> palettes = new ArrayList<>(_nameBPalette.size());
+
+ for (final Iterator<Entry<String,BPalettePlage>> it = _nameBPalette.entrySet().iterator(); it.hasNext();) {
+ Entry<String, BPalettePlage> e=it.next();
+ final String key = e.getKey();
+ if (!CtuluLibString.isEmpty(key)) {
+ paletteNames.add(key);
+ palettes.add(((BPalettePlage) e.getValue()).save());
+ }
+ }
+ _prop.put("post.paletteNames", paletteNames.toArray(new String[paletteNames.size()]));
+ _prop.put("post.paletteProps", palettes.toArray(new BPalettePlageProperties[palettes.size()]));
+ return _prop;
+ }
+
private void restoreData(final CtuluAnalyze log, final EfTrajectoireParameters restore) {
log.clear();
final EfTrajectoireActivity ac = new EfTrajectoireActivity(src_.getInterpolator(), null, src_.getTimes());
- final String title = PivResource.getS("Calcul");
+// final String title = PivResource.getS("Calcul");
final List<EfTrajectoireResultBuilder> computeLigneCourant = ac.computeLigneCourant(restore, null, log);
final PivComputeAndDisplayParticlesActivity activity = new PivComputeAndDisplayParticlesActivity(vue2d_,this,null);
activity.reloadLinesIn(PivParticlesLayer.this, restore, computeLigneCourant, log);
@@ -380,7 +431,7 @@
}
// on trace les icones apres pour qu'ils soient dessin\xE9s au-dessus des lignes.
final GISZoneCollection geomData = super.modeleDonnees().getGeomData();
- final int idxMark = geomData.getIndiceOf(attrMark_);
+ final int idxMark = geomData.getIndiceOf(PivParticlesGISDataModel.ATT_MARK);
// final int idxAttSelected = geomData.getIndiceOf(attSel_);
// si idxSelected est positif on utilise une palette
// final int idxSelected = isPaletteCouleurUsed_ && idxAttSelected >= 0 ? geomData.getIndiceOf(attList_.get(idxAttSelected)) : -1;
@@ -453,9 +504,9 @@
// c'est pour que la variable en cours soit enregistr\xE9e
updateLegende(false);
final EbliUIProperties res = super.saveUIProperties();
-// TODO TrIsoLayerDefault.savePalettes(namePalette_, res);
+ savePalettes(namePalette_, res);
res.put("att.selected", getSelectedAttributeName());
- res.put("mark.attribute", attrMark_ == null ? CtuluLibString.EMPTY_STRING : attrMark_.getID());
+// res.put("mark.attribute", attrMark_ == null ? CtuluLibString.EMPTY_STRING : attrMark_.getID());
if (dataMemory_!=null)
res.put(PivParticlesLayerPersistData.COMPUTE_DATA, new PivParticlesLayerPersistData(dataMemory_));
// res.put(FSigTrPostTrajectoireLineLayerPersistence.INIT_DATA, dataMemory_);
Modified: trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/particles/PivParticlesSourceI.java
===================================================================
--- trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/particles/PivParticlesSourceI.java 2015-03-31 10:13:52 UTC (rev 9096)
+++ trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/particles/PivParticlesSourceI.java 2015-03-31 14:13:30 UTC (rev 9097)
@@ -156,7 +156,7 @@
*/
// ListModel getFlecheListModel();
- public ListModel<PivVectorDefinitionI> getNewFlecheListModel();
+ public ListModel<PivVectorDefinitionI> getFlecheListModel();
/**
* @return le maillage de l'objet source
Modified: trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/particles/PivResultSource.java
===================================================================
--- trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/particles/PivResultSource.java 2015-03-31 10:13:52 UTC (rev 9096)
+++ trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/particles/PivResultSource.java 2015-03-31 14:13:30 UTC (rev 9097)
@@ -63,7 +63,7 @@
}
@Override
- public ListModel<PivVectorDefinitionI> getNewFlecheListModel() {
+ public ListModel<PivVectorDefinitionI> getFlecheListModel() {
if (flecheList_==null) {
PivVectorDefinitionI fch;
flecheList_=new DefaultListModel<>();
@@ -125,8 +125,8 @@
@Override
public ListModel<Double> getTimeListModel() {
if (timeList_==null) {
+ timeList_=new DefaultListModel<>();
if (res_ != null) {
- timeList_=new DefaultListModel<>();
for (int i=0; i < res_.getNbTime(); i++) {
timeList_.addElement(getTimeStep(i));
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <bma...@us...> - 2015-03-31 10:13:54
|
Revision: 9096
http://sourceforge.net/p/fudaa/svn/9096
Author: bmarchan
Date: 2015-03-31 10:13:52 +0000 (Tue, 31 Mar 2015)
Log Message:
-----------
dev
Modified Paths:
--------------
trunk/framework/ctulu-common/src/main/java/org/fudaa/ctulu/LogConverter.java
Modified: trunk/framework/ctulu-common/src/main/java/org/fudaa/ctulu/LogConverter.java
===================================================================
--- trunk/framework/ctulu-common/src/main/java/org/fudaa/ctulu/LogConverter.java 2015-03-31 10:12:35 UTC (rev 9095)
+++ trunk/framework/ctulu-common/src/main/java/org/fudaa/ctulu/LogConverter.java 2015-03-31 10:13:52 UTC (rev 9096)
@@ -34,6 +34,30 @@
}
+ public static Level getLevel(CtuluLogLevel level) {
+ if (CtuluLogLevel.FATAL == level) {
+ return CtuluAnalyze.FATAL;
+ }
+ if (CtuluLogLevel.ERROR == level) {
+ return CtuluAnalyze.ERROR;
+ }
+ if (CtuluLogLevel.SEVERE == level) {
+ return Level.SEVERE;
+ }
+ if (CtuluLogLevel.INFO == level) {
+ return Level.INFO;
+ }
+ if (CtuluLogLevel.WARNING == level) {
+ return Level.WARNING;
+ }
+ if (CtuluLogLevel.DEBUG == level) {
+ return Level.FINE;
+ }
+ return CtuluAnalyze.ERROR;
+
+
+ }
+
public static CtuluLogRecord convert(LogRecord record) {
CtuluLogRecord res = new CtuluLogRecord(getLevel(record.getLevel()), record.getMessage());
res.setLocalizedMessage(record.getMessage());
@@ -51,6 +75,15 @@
return res;
}
+ public static CtuluAnalyze convert(CtuluLog in) {
+ CtuluAnalyze res=new CtuluAnalyze(in.getDefaultResourceBundle());
+ res.setDesc(in.getDesc());
+ for (CtuluLogRecord logRecord : in.getRecords()) {
+ res.addRecord(getLevel(logRecord.getLevel()),logRecord.getMsg(),logRecord.getArgs());
+ }
+ return res;
+ }
+
public static CtuluLogGroup convert(CtuluAnalyzeGroup in) {
CtuluLogGroup res = new CtuluLogGroup(in.defaultResource);
res.setDescription(in.getMainDesc());
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <bma...@us...> - 2015-03-26 22:55:10
|
Revision: 9094
http://sourceforge.net/p/fudaa/svn/9094
Author: bmarchan
Date: 2015-03-26 22:55:08 +0000 (Thu, 26 Mar 2015)
Log Message:
-----------
Lancement par defaut avec le langage choisi ?\195?\160 l'installation
Modified Paths:
--------------
trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/Piv.java
trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/PivImplementation.java
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 2015-03-26 22:46:29 UTC (rev 9093)
+++ trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/Piv.java 2015-03-26 22:55:08 UTC (rev 9094)
@@ -34,7 +34,8 @@
// Obligatoire pour que la langue soit prise en charge le plus tot possible
// et dans tous les composants standards de Java (FileChooser, ...). Il faut
// le faire avant m\xEAme qu'un composant Swing soit instanci\xE9.
- BuPreferences.BU.applyLanguage("en,fr");
+ String defLang=System.getProperty("piv.lang","fr"); // Langage par d\xE9faut \xE0 l'installation.
+ BuPreferences.BU.applyLanguage("en, fr",BuPreferences.BU.getStringProperty("locale.language",defLang),false);
// try {
// //pour utiliser les icones crystal.
// //a voir si cela convient.
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-03-26 22:46:29 UTC (rev 9093)
+++ trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/PivImplementation.java 2015-03-26 22:55:08 UTC (rev 9094)
@@ -83,13 +83,13 @@
isPIV_.name = "LSPIV";
isPIV_.version = "1.4.2";
isPIV_.date = "2015-02-24";
- isPIV_.rights = PivResource.getS("Tous droits r\xE9serv\xE9s")+". CETMEF (c)1999-2015";
+ isPIV_.rights = PivResource.getS("Tous droits r\xE9serv\xE9s")+". CEREMA (c)1999-2015";
isPIV_.license = "GPL2";
isPIV_.languages = "en,fr";
isPIV_.authors=new String[]{"B.Marchand (mar...@de...)"};
isPIV_.contact="mag...@ed...\nje...@ir...\nal...@ed...";
isPIV_.http="http://forge.irstea.fr/projects/fudaa-lspiv";
- isPIV_.man="guide_Fudaa-lspiv.pdf";
+ isPIV_.man="guide_Fudaa-lspiv_"+BuPreferences.BU.getStringProperty("locale.language", System.getProperty("piv.lang", "fr"))+".pdf";
isPIV_.citation=PivResource.getS("Ichiro Fujita (Prof.), Universit\xE9 de Kob\xE9");
isPIV_.logo = PivResource.PIV.getIcon("iconepiv.gif");
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <bma...@us...> - 2015-03-26 22:46:37
|
Revision: 9093
http://sourceforge.net/p/fudaa/svn/9093
Author: bmarchan
Date: 2015-03-26 22:46:29 +0000 (Thu, 26 Mar 2015)
Log Message:
-----------
BuPreferences ; Application d'un langage par defaut.
Modified Paths:
--------------
trunk/framework/ctulu-bu/src/main/java/com/memoire/bu/BuPreferences.java
Modified: trunk/framework/ctulu-bu/src/main/java/com/memoire/bu/BuPreferences.java
===================================================================
--- trunk/framework/ctulu-bu/src/main/java/com/memoire/bu/BuPreferences.java 2015-03-24 10:50:26 UTC (rev 9092)
+++ trunk/framework/ctulu-bu/src/main/java/com/memoire/bu/BuPreferences.java 2015-03-26 22:46:29 UTC (rev 9093)
@@ -334,10 +334,24 @@
applyLanguage(_dispo, false);
}
+ /**
+ * Applique le langage d\xE9fini dans les pr\xE9f\xE9rences parmis un ensemble de langages possibles
+ * @param _dispo Les langages possibles, s\xE9par\xE9s par une ','
+ * @param _fallBackOnEnglish
+ */
public void applyLanguage(String _dispo, boolean _fallBackOnEnglish) {
+ applyLanguage(_dispo, getStringProperty("locale.language"), _fallBackOnEnglish);
+ }
+
+ /**
+ * Applique le langage demand\xE9 parmis un ensemble de langages possibles.
+ * @param _dispo Les langages possibles, s\xE9par\xE9s par une ','
+ * @param l Le langage demand\xE9
+ * @param _fallBackOnEnglish
+ */
+ public void applyLanguage(String _dispo, String l, boolean _fallBackOnEnglish) {
FuResource.setDefaultToEnglish(getBooleanProperty("translation.fallBackOnEnglish", _fallBackOnEnglish));
- String l = getStringProperty("locale.language");
String c = getStringProperty("locale.country", l.toUpperCase());
// System.err.println("BPR: "+l+" "+_dispo+" "+BuPreferences.BU);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <bma...@us...> - 2015-03-19 13:43:41
|
Revision: 9089
http://sourceforge.net/p/fudaa/svn/9089
Author: bmarchan
Date: 2015-03-19 13:43:38 +0000 (Thu, 19 Mar 2015)
Log Message:
-----------
Multi transect correctifs
Modified Paths:
--------------
trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/PivImplementation.java
trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/PivVisuPanel.java
trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/action/PivEditAction.java
trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/action/PivNewTransectAction.java
trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/layer/PivTransectModel.java
trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/metier/PivProject.java
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-03-17 16:00:27 UTC (rev 9088)
+++ trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/PivImplementation.java 2015-03-19 13:43:38 UTC (rev 9089)
@@ -738,7 +738,7 @@
mn.addSeparator(PivResource.getS("D\xE9bit"));
sm=new BuMenu(PivResource.getS("Transect"),"mnGRP");
bt=get2dFrame().getVisuPanel().getNewTransectAction().buildMenuItem(EbliComponentFactory.INSTANCE);
- bt.setText(PivResource.getS("D\xE9finir..."));
+ bt.setText(PivResource.getS("Nouveau..."));
sm.add(bt);
bt=new PivImportTransectAction((this)).buildMenuItem(EbliComponentFactory.INSTANCE);
bt.setText(PivResource.getS("Importer..."));
Modified: trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/PivVisuPanel.java
===================================================================
--- trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/PivVisuPanel.java 2015-03-17 16:00:27 UTC (rev 9088)
+++ trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/PivVisuPanel.java 2015-03-19 13:43:38 UTC (rev 9089)
@@ -21,7 +21,9 @@
import org.fudaa.ebli.animation.EbliAnimationSourceInterface;
import org.fudaa.ebli.calque.BCalqueAffichage;
import org.fudaa.ebli.calque.ZEbliCalquesPanel;
+import org.fudaa.ebli.calque.edition.ZCalqueEditable;
import org.fudaa.ebli.calque.edition.ZCalqueEditionInteraction;
+import org.fudaa.ebli.calque.edition.ZEditorDefault;
import org.fudaa.ebli.commun.EbliActionAbstract;
import org.fudaa.ebli.commun.EbliActionInterface;
import org.fudaa.ebli.commun.EbliActionPaletteAbstract;
@@ -36,6 +38,7 @@
import org.fudaa.fudaa.piv.action.PivOrthoGRPAction;
import org.fudaa.fudaa.piv.action.PivShowFlowAction;
import org.fudaa.fudaa.piv.action.PivShowVelocityAction;
+import org.fudaa.fudaa.piv.layer.PivEditableModel;
import org.fudaa.fudaa.piv.metier.PivProject;
import com.memoire.bu.BuDesktop;
@@ -136,6 +139,30 @@
buildActions();
}
+ @Override
+ protected ZEditorDefault createGisEditor() {
+ ZEditorDefault editor=new ZEditorDefault(this) {
+ @Override
+ public String edit() {
+ String ret=super.edit();
+
+ // Necessaire pour que le modele soit notifi\xE9 que la g\xE9om\xE9trie a \xE9t\xE9 \xE9dit\xE9e.
+ if (getScene().getCalqueActif() instanceof ZCalqueEditable) {
+ ZCalqueEditable cq=(ZCalqueEditable) getScene().getCalqueActif();
+ if (cq.getLayerSelection()!=null && !cq.getLayerSelection().isEmpty()) {
+ if (cq.modeleDonnees() instanceof PivEditableModel) {
+ ((PivEditableModel)cq.modeleDonnees()).geometryChanged(cq.getLayerSelection().getSelectedIndex());
+ }
+ }
+ }
+ return ret;
+ }
+ };
+ return editor;
+ }
+
+
+
public PivOriginalView getOriginalView() {
if (origView_==null) {
origView_=new PivOriginalView(this);
Modified: trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/action/PivEditAction.java
===================================================================
--- trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/action/PivEditAction.java 2015-03-17 16:00:27 UTC (rev 9088)
+++ trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/action/PivEditAction.java 2015-03-19 13:43:38 UTC (rev 9089)
@@ -36,16 +36,7 @@
*/
@Override
public void actionPerformed(final ActionEvent _e) {
- if (pnCalques_.getScene().getCalqueActif() instanceof ZCalqueEditable) {
- ZCalqueEditable cq=(ZCalqueEditable) pnCalques_.getScene().getCalqueActif();
- if (cq.getLayerSelection()!=null && !cq.getLayerSelection().isEmpty()) {
- cq.editSelected();
-
- if (cq.modeleDonnees() instanceof PivEditableModel) {
- ((PivEditableModel)cq.modeleDonnees()).geometryChanged(cq.getLayerSelection().getSelectedIndex());
- }
- }
- }
+ pnCalques_.getEditor().edit();
}
@Override
Modified: trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/action/PivNewTransectAction.java
===================================================================
--- trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/action/PivNewTransectAction.java 2015-03-17 16:00:27 UTC (rev 9088)
+++ trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/action/PivNewTransectAction.java 2015-03-19 13:43:38 UTC (rev 9089)
@@ -177,7 +177,7 @@
* @param _pn Le panneau des calques.
*/
public PivNewTransectAction(PivVisuPanel _pn) {
- super(PivResource.getS("D\xE9finition d'un transect..."), null, "CREATE_TRANSECT");
+ super(PivResource.getS("Nouveau transect..."), null, "CREATE_TRANSECT");
pnCalques_=_pn;
controller_=new EditionController();
propListener_=new EditionLayerPropertyListener();
Modified: trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/layer/PivTransectModel.java
===================================================================
--- trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/layer/PivTransectModel.java 2015-03-17 16:00:27 UTC (rev 9088)
+++ trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/layer/PivTransectModel.java 2015-03-19 13:43:38 UTC (rev 9089)
@@ -8,13 +8,17 @@
import org.fudaa.ctulu.gis.GISAttribute;
import org.fudaa.ctulu.gis.GISAttributeInterface;
import org.fudaa.ctulu.gis.GISZoneCollectionLigneBrisee;
+import org.fudaa.ebli.calque.ZCalqueAffichageDonneesInterface;
import org.fudaa.ebli.calque.edition.ZEditionAttributesDataI;
import org.fudaa.ebli.calque.edition.ZModeleLigneBriseeEditable;
import org.fudaa.ebli.geometrie.GrPolyligne;
+import org.fudaa.ebli.palette.BPaletteInfo.InfoData;
+import org.fudaa.fudaa.piv.PivResource;
import org.fudaa.fudaa.piv.PivVisuPanel;
-import org.fudaa.fudaa.piv.metier.PivTransectParams;
+import org.fudaa.fudaa.piv.metier.PivFlowResults;
import org.fudaa.fudaa.piv.metier.PivProject;
import org.fudaa.fudaa.piv.metier.PivTransect;
+import org.fudaa.fudaa.piv.metier.PivTransectParams;
import com.vividsolutions.jts.geom.CoordinateSequence;
@@ -179,4 +183,53 @@
prj_.setTransects(trans);
}
+
+ @Override
+ public void fillWithInfo(InfoData _d, ZCalqueAffichageDonneesInterface _layer) {
+// final ZCalqueFleche.StringInfo info = new ZCalqueFleche.StringInfo();
+// info.titleIfOne_ = PivResource.getS("R\xE9sultats: point n\xB0");
+// info.title_ = PivResource.getS("R\xE9sultats");
+ super.fillWithInfo(_d, _layer);
+
+ // Infos de r\xE9sultats de calcul
+
+ if (!_layer.isSelectionEmpty()) {
+ int[] selIds=_layer.getLayerSelection().getSelectedIndex();
+
+ if (selIds.length==1) {
+ _d.setTitle(PivResource.getS("Transect n\xB0 {0}", selIds[0]+1));
+ }
+
+ if (prj_.getFlowResults() != null) {
+ PivFlowResults res=prj_.getFlowResults()[selIds[0]];
+ Double waterElevation=res.getWaterElevation();
+ Double discharge=res.getDischarge();
+ Double wettedArea=res.getWettedArea();
+ Double meanVelocity=res.getMeanVelocity();
+
+ for (int idx : selIds) {
+ res=prj_.getFlowResults()[idx];
+ if (waterElevation != res.getWaterElevation())
+ waterElevation=null;
+ if (discharge != res.getDischarge())
+ discharge=null;
+ if (wettedArea != res.getWettedArea())
+ wettedArea=null;
+ if (meanVelocity != res.getMeanVelocity())
+ meanVelocity=null;
+ }
+
+ if (waterElevation != null)
+ _d.put(PivResource.getS("Niveau d'eau (m)"), "" + waterElevation);
+ if (discharge != null)
+ _d.put(PivResource.getS("D\xE9bit total (m\xB3/s)"), "" + discharge);
+ if (wettedArea != null)
+ _d.put(PivResource.getS("Aire mouill\xE9e (m\xB2)"), "" + wettedArea);
+ if (meanVelocity != null)
+ _d.put(PivResource.getS("Vitesse moyenne sur la section (m/s)"), "" + meanVelocity);
+ }
+ }
+
+// ZCalqueFleche.fillWithInfo(_d, _layer.getLayerSelection(), this, info);
+ }
}
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-03-17 16:00:27 UTC (rev 9088)
+++ trunk/soft/fudaa-lspiv/src/main/java/org/fudaa/fudaa/piv/metier/PivProject.java 2015-03-19 13:43:38 UTC (rev 9089)
@@ -845,14 +845,10 @@
* @param _trans Le transect \xE0 ajouter.
*/
public void addTransect(PivTransect _trans) {
- if (transects==null) {
- transects=new PivTransect[]{_trans};
- }
- else {
- transects=Arrays.copyOf(transects, transects.length+1);
- transects[transects.length-1]=_trans;
- }
- setTransects(transects);
+ PivTransect[] trans=Arrays.copyOf(transects, transects.length+1);
+ trans[trans.length-1]=_trans;
+
+ setTransects(trans);
}
/**
@@ -860,6 +856,11 @@
* @param _trans Les transects. <tt>null</tt> est autoris\xE9.
*/
public void setTransects(PivTransect[] _trans) {
+ // On met a null les r\xE9sultats de d\xE9bit en cas de tableau diff\xE9rents,
+ // car le nombre de r\xE9sultats doit \xEAtre identique.
+ if (!Arrays.equals(transects, _trans)) {
+ setFlowResults(null);
+ }
transects=_trans;
isModified=true;
fireProjectStateChanged("transect");
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|