|
From: <de...@us...> - 2010-01-18 17:36:59
|
Revision: 5621
http://fudaa.svn.sourceforge.net/fudaa/?rev=5621&view=rev
Author: deniger
Date: 2010-01-18 17:36:44 +0000 (Mon, 18 Jan 2010)
Log Message:
-----------
Modified Paths:
--------------
trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/export/TrExportOperationRefineInClosedLine.java
trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/export/TrExportPanelFilterFactory.java
trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/TrPostTimeModelSaver.java
trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/TrPostUserVariableSaver.java
trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/persist/TrPostPersistenceManager.java
trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/persist/TrPostSourceReplayPersist.java
trunk/soft/fudaa-prepro/ui/src/main/resources/org/fudaa/fudaa/tr/common/tr_en.fr_txt
Added Paths:
-----------
trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/export/TrExportOperationMeshesInClosedLine.java
Added: trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/export/TrExportOperationMeshesInClosedLine.java
===================================================================
--- trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/export/TrExportOperationMeshesInClosedLine.java (rev 0)
+++ trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/export/TrExportOperationMeshesInClosedLine.java 2010-01-18 17:36:44 UTC (rev 5621)
@@ -0,0 +1,57 @@
+package org.fudaa.fudaa.tr.export;
+
+import com.vividsolutions.jts.geom.LinearRing;
+
+import org.fudaa.ctulu.CtuluListSelectionInterface;
+import org.fudaa.ctulu.ProgressionInterface;
+import org.fudaa.dodico.ef.EfGridData;
+import org.fudaa.dodico.ef.operation.EfIndexVisitorEltInRing;
+import org.fudaa.dodico.ef.operation.EfOperation;
+import org.fudaa.fudaa.meshviewer.export.MvExportOperationBuilderInterface;
+import org.fudaa.fudaa.meshviewer.export.MvExportSourceFilterActivity;
+import org.fudaa.fudaa.meshviewer.filter.MvFilterSelectedElement;
+import org.fudaa.fudaa.tr.data.TrVisuPanel;
+
+/**
+ *
+ * Permet d'exporter uniquement les elements appartenant a un polygone
+ * @author deniger
+ */
+public class TrExportOperationMeshesInClosedLine extends TrExportOperationOnClosedLineAbstract {
+ protected class Builder implements MvExportOperationBuilderInterface {
+
+ LinearRing line;
+ final EfGridData grid;
+ CtuluListSelectionInterface meshSelected;
+
+ private Builder(final LinearRing line, final EfGridData grid) {
+ super();
+ this.line = line;
+ this.grid = grid;
+ }
+
+ public void buildOperation(final ProgressionInterface progression) {
+ meshSelected = EfIndexVisitorEltInRing.findContainedElt(grid.getGrid(), line, true);
+
+ }
+
+ public EfOperation getOperation(final int tidx) {
+ return new MvExportSourceFilterActivity(grid, new MvFilterSelectedElement(meshSelected, grid.getGrid()));
+ }
+
+ public void stop() {
+
+ }
+
+ }
+
+ public TrExportOperationMeshesInClosedLine(final String title, final TrVisuPanel panel) {
+ super(title, panel);
+ }
+
+ @Override
+ public MvExportOperationBuilderInterface getBuilder(final EfGridData src) {
+ return new Builder((LinearRing) mvLineChooser.getSelectedLine(), src);
+ }
+
+}
Modified: trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/export/TrExportOperationRefineInClosedLine.java
===================================================================
--- trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/export/TrExportOperationRefineInClosedLine.java 2010-01-18 17:36:15 UTC (rev 5620)
+++ trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/export/TrExportOperationRefineInClosedLine.java 2010-01-18 17:36:44 UTC (rev 5621)
@@ -1,22 +1,12 @@
package org.fudaa.fudaa.tr.export;
-import com.vividsolutions.jts.algorithm.CGAlgorithms;
-import com.vividsolutions.jts.algorithm.ConvexHull;
-import com.vividsolutions.jts.geom.Coordinate;
-import com.vividsolutions.jts.geom.Geometry;
-import com.vividsolutions.jts.geom.LineString;
import com.vividsolutions.jts.geom.LinearRing;
-import com.vividsolutions.jts.geom.Polygon;
-import org.fudaa.ctulu.CtuluLibArray;
import org.fudaa.ctulu.CtuluListSelectionInterface;
import org.fudaa.ctulu.ProgressionInterface;
-import org.fudaa.ctulu.gis.GISGeometryFactory;
-import org.fudaa.ctulu.gis.GISPolygone;
import org.fudaa.dodico.ef.EfGridData;
import org.fudaa.dodico.ef.operation.EfIndexVisitorEltInRing;
import org.fudaa.dodico.ef.operation.EfOperation;
-import org.fudaa.dodico.ef.operation.projection.EfOperationProjectionOrtho;
import org.fudaa.dodico.ef.operation.refine.EfOperationRefineEdge;
import org.fudaa.fudaa.meshviewer.export.MvExportOperationBuilderInterface;
import org.fudaa.fudaa.tr.data.TrVisuPanel;
Modified: trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/export/TrExportPanelFilterFactory.java
===================================================================
--- trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/export/TrExportPanelFilterFactory.java 2010-01-18 17:36:15 UTC (rev 5620)
+++ trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/export/TrExportPanelFilterFactory.java 2010-01-18 17:36:44 UTC (rev 5621)
@@ -43,9 +43,11 @@
if (_hauteurFilter) {
item.add(new TrExportFilterItemHauteurTime(_timeSelection));
}
+ item.add(new TrExportOperationMeshesInClosedLine(TrResource
+ .getS("Exporter uniquement les \xE9l\xE9ments appartenant \xE0 un polygone"), visu));
item.add(new TrExportOperationRefineItem(TrResource.getS("Rafiner tout le maillage et exporter tout le maillage")));
item.add(new TrExportOperationRefineInClosedLine(TrResource
- .getS("Rafiner les \xE9l\xE9ments appartenant \xE0 une zone et exporter tout le maillage"), visu));
+ .getS("Rafiner les \xE9l\xE9ments appartenant\xE0 un polygone et exporter tout le maillage"), visu));
if (isSelection) {
item.add(new TrExportOperationRefineItem(TrResource
.getS("Rafiner uniquement les \xE9l\xE9ments s\xE9lectionn\xE9s et exporter tout le maillage"),
Modified: trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/TrPostTimeModelSaver.java
===================================================================
--- trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/TrPostTimeModelSaver.java 2010-01-18 17:36:15 UTC (rev 5620)
+++ trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/TrPostTimeModelSaver.java 2010-01-18 17:36:44 UTC (rev 5621)
@@ -21,12 +21,17 @@
String expr_;
String fmtPattern_;
+ String fmtPattern__;
double[] savedTimeSteps_;
public TrPostTimeModelSaver() {
}
-
+ public void restoreFmtPattern(){
+ if(fmtPattern_==null && fmtPattern__!=null){
+ fmtPattern_=fmtPattern__;
+ }
+ }
public TrPostTimeModelSaver(final TrPostSource _src) {
final TrPostTimeModel model = _src.getTime();
expr_ = model.getUsedFormule();
Modified: trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/TrPostUserVariableSaver.java
===================================================================
--- trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/TrPostUserVariableSaver.java 2010-01-18 17:36:15 UTC (rev 5620)
+++ trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/TrPostUserVariableSaver.java 2010-01-18 17:36:44 UTC (rev 5621)
@@ -41,10 +41,19 @@
TrPostDataCreatedSaver[] saver_;
Object g_;
+ //pour compatibilit\xE9 ascendante: certaine version dispose
+ Object g__;
public TrPostUserVariableSaver() {
}
+
+
+ public void restoreG(){
+ if(g_==null && g__!=null){
+ g_=g__;
+ }
+ }
public boolean isExprEmpty() {
return CtuluLibArray.isEmpty(varCreated_) || CtuluLibArray.isEmpty(expr_) || expr_.length != varCreated_.length;
Modified: trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/persist/TrPostPersistenceManager.java
===================================================================
--- trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/persist/TrPostPersistenceManager.java 2010-01-18 17:36:15 UTC (rev 5620)
+++ trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/persist/TrPostPersistenceManager.java 2010-01-18 17:36:44 UTC (rev 5621)
@@ -3,13 +3,16 @@
import java.awt.Dimension;
import java.awt.Point;
import java.io.File;
+import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
+import java.io.InputStreamReader;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.io.OutputStream;
+import java.nio.charset.Charset;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
@@ -462,7 +465,7 @@
try {
- in = getParser().createObjectInputStream(new FileReader(file));
+ in = createObjectInputStream(file);
int nbFichiersToGenrate;
// -- lecture readme --//
@@ -653,8 +656,10 @@
for (int i = 0; i < listeVar.size(); i++) {
final TrPostUserVariableSaver var = listeVar.get(i);
final TrPostTimeModelSaver ptd = listePdt.get(i);
- out = getParser().createObjectOutputStream(
- new FileWriter(new File(dirForVar, "variables_" + listeCouplesIdSources.get(i).IdSource)));
+ XStream parser = getParser();
+ parser.omitField(TrPostUserVariableSaver.class, "g__");
+ out = parser.createObjectOutputStream(new FileWriter(new File(dirForVar, "variables_"
+ + listeCouplesIdSources.get(i).IdSource)));
out.writeObject(var);
out.writeObject(ptd);
out.close();
@@ -664,8 +669,10 @@
for (int i = 0; i < listeVarSuites.size(); i++) {
final TrPostUserVariableSaver var = listeVarSuites.get(i);
final TrPostTimeModelSaver ptd = listePdtSuites.get(i);
- out = getParser().createObjectOutputStream(
- new FileWriter(pathVariables + File.separator + "variables_" + listeSuiteCalcul.get(i).Id));
+ XStream parser = getParser();
+ parser.omitField(TrPostTimeModelSaver.class, "fmtPattern__");
+ out = parser.createObjectOutputStream(new FileWriter(pathVariables + File.separator + "variables_"
+ + listeSuiteCalcul.get(i).Id));
out.writeObject(var);
out.writeObject(ptd);
out.close();
@@ -692,7 +699,7 @@
// -- outputstream du xstream --//
ObjectInputStream in = null;
try {
- in = getParser().createObjectInputStream(new FileReader(file));
+ in = createObjectInputStream(file);
// -- recuperation du multiSourceActivator--//
final TrPostMultiSourceActivator2 multiProjectActivator = new TrPostMultiSourceActivator2(trprojet_);
@@ -763,21 +770,26 @@
}
}
- final List<TrPostSourceReplayPersist> lstReplay = (List<TrPostSourceReplayPersist>) in.readObject();
- CtuluAnalyze log = new CtuluAnalyze();
- if (lstReplay != null) {
- for (TrPostSourceReplayPersist srcReplay : lstReplay) {
- TrPostSource replay = srcReplay.replay(trprojet_, log);
- trprojet_.getSources().addSourceBuilt((TrPostSourceBuilt) replay);
+ Object readObject = in.readObject();
+ int nbSuitesCalcul = 0;
+ if (readObject instanceof List) {
+ final List<TrPostSourceReplayPersist> lstReplay = (List<TrPostSourceReplayPersist>) readObject;
+ CtuluAnalyze log = new CtuluAnalyze();
+ if (lstReplay != null) {
+ for (TrPostSourceReplayPersist srcReplay : lstReplay) {
+ TrPostSource replay = srcReplay.replay(trprojet_, log);
+ trprojet_.getSources().addSourceBuilt((TrPostSourceBuilt) replay);
+ }
}
+ if (!log.isEmpty()) {
+ trprojet_.getImpl().manageAnalyzeAndIsFatal(log);
+ }
+ nbSuitesCalcul = in.readInt();
+ } else {
+ // -- lecture nb suites de calcul pour les sources --//
+ nbSuitesCalcul = ((Integer) readObject).intValue();
}
- if (!log.isEmpty()) {
- trprojet_.getImpl().manageAnalyzeAndIsFatal(log);
- }
- // -- lecture nb suites de calcul pour les sources --//
- final int nbSuitesCalcul = in.readInt();
-
// -- lecture de la liste des objets source perssitant --//
if (nbSuitesCalcul > 0) {
final List<TrPostSourcePersistComposite> listeSuitesCalculs = (List<TrPostSourcePersistComposite>) in
@@ -816,10 +828,11 @@
if (fileVariables.canRead()) {
ObjectInputStream in = null;
try {
- in = getParser().createObjectInputStream(new FileReader(fileVariables));
+ in = createObjectInputStream(fileVariables);
Object var = in.readObject();
if (var instanceof TrPostUserVariableSaver) {
final TrPostUserVariableSaver varUser = (TrPostUserVariableSaver) var;
+ varUser.restoreG();
final CtuluAnalyze restore = varUser.restore(src, new CtuluAnalyze(), prog, ui_, trprojet_.getSources());
if (restore != null && restore.containsErrors()) {
ui_.manageAnalyzeAndIsFatal(restore);
@@ -829,6 +842,7 @@
var = in.readObject();
if (var instanceof TrPostTimeModelSaver) {
final TrPostTimeModelSaver varUser = (TrPostTimeModelSaver) var;
+ varUser.restoreFmtPattern();
varUser.restore(src, ui_.createProgressionForMainPanel(), true);
}
@@ -1002,7 +1016,7 @@
// -- outputstream du xstream --//
ObjectInputStream in = null;
try {
- in = getParser().createObjectInputStream(new FileReader(file));
+ in = createObjectInputStream(file);
// --readme --//
final Object debuTfichier = in.readObject();
if (debuTfichier instanceof XmlCommentaire) {
@@ -1010,23 +1024,30 @@
} else {
liste = (List<CoupleNomId>) debuTfichier;
}
- } catch (final IOException e) {
- e.printStackTrace();
- } catch (final ClassNotFoundException e) {
- e.printStackTrace();
+ } catch (final Exception e) {
+ FuLog.error(e);
} finally {
try {
in.close();
- return liste;
} catch (final IOException e) {
e.printStackTrace();
messageError(false);
}
}
- return null;
+ return liste;
}
+ private ObjectInputStream createObjectInputStream(final File file) throws IOException, FileNotFoundException {
+ XStream parser = getParser();
+ return createObjectInpuStream(file, parser);
+ }
+
+ private ObjectInputStream createObjectInpuStream(final File file, XStream parser) throws IOException,
+ FileNotFoundException {
+ return parser.createObjectInputStream(new InputStreamReader(new FileInputStream(file),Charset.forName("UTF-8")));
+ }
+
/**
* Methode qui charge le projet,l'ensemble des sources et toutes les widgets dans les layouts.
*
@@ -1314,7 +1335,7 @@
// -- inputstream du xstream --//
ObjectInputStream in = null;
try {
- in = getParser().createObjectInputStream(new FileReader(file));
+ in = createObjectInputStream(file);
// -- r\xE9cup\xE9ration de la scene xml --//
final EbliSceneSerializeXml sceneXml = (EbliSceneSerializeXml) in.readObject();
Modified: trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/persist/TrPostSourceReplayPersist.java
===================================================================
--- trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/persist/TrPostSourceReplayPersist.java 2010-01-18 17:36:15 UTC (rev 5620)
+++ trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/persist/TrPostSourceReplayPersist.java 2010-01-18 17:36:44 UTC (rev 5621)
@@ -4,6 +4,10 @@
import org.fudaa.fudaa.tr.post.TrPostProjet;
import org.fudaa.fudaa.tr.post.TrPostSource;
+/**
+ * @author deniger
+ *
+ */
public interface TrPostSourceReplayPersist {
public abstract TrPostSource replay(TrPostProjet projet, CtuluAnalyze log);
Modified: trunk/soft/fudaa-prepro/ui/src/main/resources/org/fudaa/fudaa/tr/common/tr_en.fr_txt
===================================================================
--- trunk/soft/fudaa-prepro/ui/src/main/resources/org/fudaa/fudaa/tr/common/tr_en.fr_txt 2010-01-18 17:36:15 UTC (rev 5620)
+++ trunk/soft/fudaa-prepro/ui/src/main/resources/org/fudaa/fudaa/tr/common/tr_en.fr_txt 2010-01-18 17:36:44 UTC (rev 5621)
@@ -1,11 +1,12 @@
Afficher les \xE9volutions temporelles dans une nouvelle fen\xEAtre=Display time evolutions in a new frame
+Exporter uniquement les \xE9l\xE9ments appartenant \xE0 un polygone=Export meshes contained by a linear ring
Extraire le maillage et projeter sur le polygone=Filter Grid and project on a polygon
Raffiner uniquement les \xE9l\xE9ments compl\xE8tement mouill\xE9s=Ignore partially dry meshes
Exporter uniquement les \xE9l\xE9ments compl\xE8tement mouill\xE9s=Export only complete wet meshes
Exporter uniquement les \xE9l\xE9ments mouill\xE9s=Export only wet meshes
Rafiner tout le maillage et exporter tout le maillage=Refine the complete grid and export it
Rafiner uniquement les \xE9l\xE9ments s\xE9lectionn\xE9s et exporter tout le maillage=Refine only selected meshes and export the complete grid
-Rafiner les \xE9l\xE9ments appartenant \xE0 une zone et exporter tout le maillage=Refine only meshes contained by a linear ring and export the complete grid
+Rafiner les \xE9l\xE9ments appartenant\xE0 un polygone et exporter tout le maillage=Refine only meshes contained by a linear ring and export the complete grid
Rafiner uniquement les \xE9l\xE9ments mouill\xE9s et exporter tout le maillage=Refine only wet meshes and export the complete grid
La valeur utilis\xE9e pour la hauteur n'est pas valide=The value used the depth is not valid
Choisir une ligne ferm\xE9e=Choose a linear ring
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <de...@us...> - 2010-06-10 21:39:22
|
Revision: 5764
http://fudaa.svn.sourceforge.net/fudaa/?rev=5764&view=rev
Author: deniger
Date: 2010-06-10 21:39:15 +0000 (Thu, 10 Jun 2010)
Log Message:
-----------
Modified Paths:
--------------
trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/TrLauncherDefault.java
trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/actions/TrPostActionController.java
trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/data/TrPostDataCreatedExpr.java
trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/data/TrPostDataCreationPanel.java
trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/persist/TrPostPersistenceManager.java
trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/persist/TrPostSourceProjectedPersistReplay.java
trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/rubar/TrRubarDonneesBrutesLayer.java
trunk/soft/fudaa-prepro/ui/src/main/resources/org/fudaa/fudaa/tr/common/tr_en.fr_txt
Modified: trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/TrLauncherDefault.java
===================================================================
--- trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/TrLauncherDefault.java 2010-06-10 21:37:04 UTC (rev 5763)
+++ trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/TrLauncherDefault.java 2010-06-10 21:39:15 UTC (rev 5764)
@@ -111,8 +111,8 @@
infoSoft = new BuInformationsSoftware();
infoSoft.name = "prepro";
- infoSoft.version = "1.1RC4";
- infoSoft.date = "2010-06-01";
+ infoSoft.version = "1.1RC6";
+ infoSoft.date = "2010-06-10";
// infoSoft.version = "1.00";
// infoSoft.date = "2010-01-27";
infoSoft.rights = TrResource.getS("Tous droits r\xE9serv\xE9s") + ". CETMEF (c)2003-2009";
Modified: trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/actions/TrPostActionController.java
===================================================================
--- trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/actions/TrPostActionController.java 2010-06-10 21:37:04 UTC (rev 5763)
+++ trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/actions/TrPostActionController.java 2010-06-10 21:39:15 UTC (rev 5764)
@@ -1,6 +1,5 @@
/**
- * Licence GPL
- * Copyright Genesis
+ * Licence GPL Copyright Genesis
*/
package org.fudaa.fudaa.tr.post.actions;
@@ -12,11 +11,13 @@
import java.util.Map;
import javax.swing.Action;
+import javax.swing.JComponent;
+import javax.swing.JTabbedPane;
+import javax.swing.SwingUtilities;
import org.fudaa.ctulu.CtuluUI;
import org.fudaa.ebli.commun.EbliActionInterface;
import org.fudaa.ebli.commun.EbliActionPaletteAbstract;
-import org.fudaa.ebli.palette.BPaletteInfo;
import org.fudaa.fudaa.sig.layer.FSigVisuPanel;
import org.fudaa.fudaa.sig.layer.FSigVisuPanelController;
@@ -34,7 +35,7 @@
Map<String, EbliActionPaletteAbstract> mapTabPalettes_ = new HashMap<String, EbliActionPaletteAbstract>(2);
Collection<EbliActionPaletteAbstract> tabPalettes_ = null;
- Collection<String> useAsPalette = Arrays.asList("CONFIGURE", "CHANGE_REFERENCE","GLOBAL_MOVE","GLOBAL_ROTATE");
+ Collection<String> useAsPalette = Arrays.asList("CONFIGURE", "CHANGE_REFERENCE", "GLOBAL_MOVE", "GLOBAL_ROTATE");
Collection<String> useAsTab = Arrays.asList("INFOS", "PALETTE_EDTION", "NAVIGATE");
@@ -89,22 +90,30 @@
return tabPalettes_;
}
- public BPaletteInfo getPaletteInfoModel() {
- return ((BPaletteInfo) mapTabPalettes_.get("INFOS").buildContentPane());
- }
@Override
public FSigVisuPanel getVisuPanel() {
return super.getVisuPanel();
}
+ public final void setInfoPaletteActive() {
+ JComponent paletteContent = mapTabPalettes_.get("INFOS").getPaletteContent();
+ if (paletteContent != null) {
+ JTabbedPane parent = (JTabbedPane) SwingUtilities.getAncestorOfClass(JTabbedPane.class, paletteContent);
+ if (parent != null) {
+ parent.setSelectedComponent(paletteContent);
+ }
+ }
+
+ }
+
@Override
protected EbliActionInterface[] getApplicationActions() {
return removePalettes(pn_.getApplicationActions());
}
-
- private List<EbliActionPaletteAbstract> toHide=new ArrayList<EbliActionPaletteAbstract>();
+ private List<EbliActionPaletteAbstract> toHide = new ArrayList<EbliActionPaletteAbstract>();
+
/**
* @param actions les actions a trier
* @return la listes des actions a ajouter dans les menus et autres. Les autres ( les palettes) seront visible tout le
@@ -119,9 +128,9 @@
if (action == null) continue;
final String value = (String) action.getValue(Action.ACTION_COMMAND_KEY);
final boolean isPalette = action instanceof EbliActionPaletteAbstract;
- if("GLOBAL_MOVE".equals(value)||"GLOBAL_ROTATE".equals(value)){
- if(toHide.add((EbliActionPaletteAbstract) action));
- ((EbliActionPaletteAbstract)action).setDialogIsModal(false);
+ if ("GLOBAL_MOVE".equals(value) || "GLOBAL_ROTATE".equals(value)) {
+ if (toHide.add((EbliActionPaletteAbstract) action)) ;
+ ((EbliActionPaletteAbstract) action).setDialogIsModal(false);
action.updateStateBeforeShow();
}
if (!isPalette || useAsPalette.contains(value)) {
@@ -129,6 +138,7 @@
}
if (isPalette && useAsTab.contains(value)) {
mapTabPalettes_.put(value, (EbliActionPaletteAbstract) action);
+ ((EbliActionPaletteAbstract) action).setUsedAsTab(true);
}
}
return acts.toArray(new EbliActionInterface[acts.size()]);
@@ -137,9 +147,9 @@
public void editStop() {
for (EbliActionPaletteAbstract action : toHide) {
action.setSelected(false);
-
+
}
-
+
}
}
Modified: trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/data/TrPostDataCreatedExpr.java
===================================================================
--- trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/data/TrPostDataCreatedExpr.java 2010-06-10 21:37:04 UTC (rev 5763)
+++ trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/data/TrPostDataCreatedExpr.java 2010-06-10 21:39:15 UTC (rev 5764)
@@ -115,7 +115,7 @@
}
public EfData getDataFor(final int _idxTime) {
- final double[] res = new double[src_.isRubar() ? src_.getGrid().getEltNb() : src_.getGrid().getPtsNb()];
+ final double[] res = new double[src_.containsOnlyElementVar() ? src_.getGrid().getEltNb() : src_.getGrid().getPtsNb()];
final EfData[] ds = new EfData[usedVar_.length];
// on enregistre les donnees pour chaque variable necessaire.
for (int i = usedVar_.length - 1; i >= 0; i--) {
@@ -128,7 +128,7 @@
}
res[i] = expr_.getValue();
}
- return src_.isRubar() ? (EfData) new EfDataElement(res) : new EfDataNode(res);
+ return src_.containsOnlyElementVar() ? (EfData) new EfDataElement(res) : new EfDataNode(res);
}
Modified: trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/data/TrPostDataCreationPanel.java
===================================================================
--- trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/data/TrPostDataCreationPanel.java 2010-06-10 21:37:04 UTC (rev 5763)
+++ trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/data/TrPostDataCreationPanel.java 2010-06-10 21:39:15 UTC (rev 5764)
@@ -682,7 +682,7 @@
final ProgressionInterface _prog, final CtuluCommandContainer _cmd) {
_toProject.buildDefaultVarUpdateLists();
final TrPostSourceProjected pro = new TrPostSourceProjected(_toProject, _dest.getGrid(), _dest.getTime()
- .getInitTimeSteps(), _dest.isRubar(), _sameGrid, _impl.getImpl(), new TrPostSourceProjectedPersistReplay(
+ .getInitTimeSteps(), _dest.containsOnlyElementVar(), _sameGrid, _impl.getImpl(), new TrPostSourceProjectedPersistReplay(
_toProject.getId(), _dest.getId(), _sameGrid));
pro.openDatas(_prog, new CtuluAnalyze(), _impl.getImpl());
Modified: trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/persist/TrPostPersistenceManager.java
===================================================================
--- trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/persist/TrPostPersistenceManager.java 2010-06-10 21:37:04 UTC (rev 5763)
+++ trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/persist/TrPostPersistenceManager.java 2010-06-10 21:39:15 UTC (rev 5764)
@@ -11,7 +11,6 @@
import java.io.ObjectOutputStream;
import java.io.OutputStream;
import java.util.ArrayList;
-import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
@@ -364,7 +363,7 @@
// -- ecriture de la classe xstream
ObjectOutputStream out = null;
try {
- out = getParser().createObjectOutputStream(new FileWriter(file));
+ out = EbliLib.createObjectOutpuStream(file, getParser());
// -- readme --//
out.writeObject(XmlCommentaire.getCommentaireLayout());
@@ -505,7 +504,7 @@
// -- g\xE9n\xE9ration du xml pour la scene --//
try {
final File fichier = new File(projet + File.separator + setupProject);
- out = getParser().createObjectOutputStream(new FileWriter(fichier));
+ out=EbliLib.createObjectOutpuStream(fichier, getParser());
// --enregistrement du path relatif --//
final File pathRelatif = CtuluLibFile.getRelativePathnameTo(fichier, projet_);
@@ -541,7 +540,8 @@
ObjectOutputStream out = null;
// -- g\xE9n\xE9ration du xml pour la scene --//
try {
- out = getParser().createObjectOutputStream(new FileWriter(file));
+ out = EbliLib.createObjectOutpuStream(file, getParser());
+
// -- redame --//
out.writeObject(XmlCommentaire.getCommentaireSources());
@@ -1182,7 +1182,7 @@
// -- outputstream du xstream --//
ObjectOutputStream out = null;
try {
- out = getParser().createObjectOutputStream(new FileWriter(file));
+ out = EbliLib.createObjectOutpuStream(file, getParser());
// -- g\xE9n\xE9ration du xml pour la scene --//
out.writeObject(new EbliSceneSerializeXml(scene, title, (Dimension) parametres.get("dimensions"),
Modified: trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/persist/TrPostSourceProjectedPersistReplay.java
===================================================================
--- trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/persist/TrPostSourceProjectedPersistReplay.java 2010-06-10 21:37:04 UTC (rev 5763)
+++ trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/persist/TrPostSourceProjectedPersistReplay.java 2010-06-10 21:39:15 UTC (rev 5764)
@@ -33,7 +33,7 @@
TrPostSource init = projet.getSources().getSource(refSourceId);
TrPostSource dest = projet.getSources().getSource(destSourceId);
TrPostSourceProjected res = new TrPostSourceProjected(init, dest.getGrid(), dest.getTime().getInitTimeSteps(), dest
- .isRubar(), gridEquals, projet.getImpl(), this);
+ .containsOnlyElementVar(), gridEquals, projet.getImpl(), this);
res.setId(id);
return res;
}
Modified: trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/rubar/TrRubarDonneesBrutesLayer.java
===================================================================
--- trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/rubar/TrRubarDonneesBrutesLayer.java 2010-06-10 21:37:04 UTC (rev 5763)
+++ trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/rubar/TrRubarDonneesBrutesLayer.java 2010-06-10 21:39:15 UTC (rev 5764)
@@ -191,6 +191,20 @@
return 4;
}
+ public boolean getCentre(GrPoint pt, int idx, boolean force) {
+ final H2dParallelogrammeDataAbstract d = target_.getParall(idx);
+ pt.x_ = 0;
+ pt.y_ = 0;
+ for (int i = 0; i < 4; i++) {
+ pt.x_ += d.getX(i);
+ pt.y_ += d.getY(i);
+ }
+ pt.x_ = pt.x_ / 4;
+ pt.y_ = pt.y_ / 4;
+ return true;
+
+ }
+
public boolean polygone(final GrPolygone _p, final int _i, final boolean _force) {
if (_p.nombre() != 4) {
_p.sommets_.setSize(4);
Modified: trunk/soft/fudaa-prepro/ui/src/main/resources/org/fudaa/fudaa/tr/common/tr_en.fr_txt
===================================================================
--- trunk/soft/fudaa-prepro/ui/src/main/resources/org/fudaa/fudaa/tr/common/tr_en.fr_txt 2010-06-10 21:37:04 UTC (rev 5763)
+++ trunk/soft/fudaa-prepro/ui/src/main/resources/org/fudaa/fudaa/tr/common/tr_en.fr_txt 2010-06-10 21:39:15 UTC (rev 5764)
@@ -1,4 +1,6 @@
Afficher les \xE9volutions temporelles dans une nouvelle fen\xEAtre=Display time evolutions in a new frame
+Choisir un autre fichier r\xE9sultat=Choose another result file
+Un seul r\xE9sultat est charg\xE9=only one file is loaded
Pas de variables \xE0 afficher. Avez-vous bien charg\xE9 un des fichiers TRC ou HYC ?=No variable to display. Have you loaded the file TRC or HYC ?
Pas de variables=No variables
Erreur, la frame calque ne trouve pas le fichier r\xE9sultat qui correspond \xE0 l'ID =Error, the layer widget didn't find the matching file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <de...@us...> - 2010-06-28 22:56:03
|
Revision: 5783
http://fudaa.svn.sourceforge.net/fudaa/?rev=5783&view=rev
Author: deniger
Date: 2010-06-28 22:55:55 +0000 (Mon, 28 Jun 2010)
Log Message:
-----------
Modified Paths:
--------------
trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/TrLauncherDefault.java
trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/TrPostImplementation.java
trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/common/TrCourbeWizardImportScope.java
trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/common/TrProjectImportPanel.java
trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/common/TrProjectPersistence.java
trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/data/TrRubarAreteEditor.java
trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/data/TrSiInterpolAction.java
trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/ScopCourbeTreeModel.java
trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/TrIsoLayerDefault.java
trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/TrPostCommonImplementation.java
trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/TrPostFilterDefaultValuePanel.java
trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/TrPostFilterHauteurPanel.java
trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/TrPostFilterSelecteur.java
trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/TrPostFlecheLayer.java
trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/TrPostLayoutFille.java
trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/TrPostLayoutPanelController.java
trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/TrPostMultiSourceActivator.java
trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/TrPostMultiSourceActivator2.java
trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/TrPostProjectCompPanel.java
trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/TrPostProjet.java
trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/TrPostRubarLimniMng.java
trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/TrPostSourceAbstract.java
trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/TrPostSourceBuilder.java
trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/TrPostTimeFmtPanel.java
trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/TrPostVisuPanel.java
trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/actions/TrIsoLineAction.java
trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/actions/TrPostActionAddPointFromWidgetCalque.java
trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/actions/TrPostActionChooseAndCreateCalque.java
trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/actions/TrPostActionOpenSrc.java
trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/data/TrPostDataCreationActions.java
trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/data/TrPostDataCreationPanel.java
trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/data/TrPostDataEditCommonPanel.java
trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/dialogSpec/TrPostTrajectoireTaskModel.java
trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/dialogSpec/TrPostWizardCreateScope.java
trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/persist/TrPostPersistenceManager.java
trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/profile/MvLineChooser.java
trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/profile/MvProfileBuilderFromTree.java
trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/reflux/TrRefluxBoundaryEditor.java
trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/reflux/TrRefluxImplHelper.java
trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/reflux/TrRefluxPropEditor.java
trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/reflux/TrRefluxRadiationVentPanel.java
trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/reflux/TrRefluxTimeStepsEditor.java
trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/rubar/TrRubarDonneesBrutesLayerGroup.java
trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/rubar/TrRubarNewProjectPanel.java
trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/rubar/TrRubarOuvrageEditorFactory.java
trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/rubar/TrRubarProjectFactory.java
trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/rubar/TrRubarRegularGridEditor.java
trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/rubar/TrRubarSIEditor.java
trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/rubar/TrRubarVisuPanel.java
trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/telemac/TrTelemacBoundaryEditor.java
trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/telemac/TrTelemacBoundaryPtsEditor.java
trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/telemac/TrTelemacCommunProjet.java
trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/telemac/TrTelemacCulvertEndEditor.java
trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/telemac/TrTelemacDefaultPropertiesEditor.java
trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/telemac/TrTelemacExecPreferencesPanel.java
trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/telemac/TrTelemacImplHelper.java
trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/telemac/TrTelemacSaveBackupGeometryFile.java
trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/telemac/TrTelemacSiActivateDialog.java
trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/telemac/TrTelemacSiphonEditor.java
trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/telemac/TrTelemacSiphonLayer.java
trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/telemac/TrTelemacSourceDefaultValues.java
trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/telemac/TrTelemacSourceEditor.java
trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/telemac/TrTelemacSourceSaisie.java
trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/telemac/TrTelemacWeirLayerDisplay.java
trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/telemac/TrTelemacWeirValuesEditor.java
trunk/soft/fudaa-prepro/ui/src/main/resources/org/fudaa/fudaa/tr/common/tr_en.fr_txt
Modified: trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/TrLauncherDefault.java
===================================================================
--- trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/TrLauncherDefault.java 2010-06-28 22:54:10 UTC (rev 5782)
+++ trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/TrLauncherDefault.java 2010-06-28 22:55:55 UTC (rev 5783)
@@ -112,7 +112,7 @@
infoSoft = new BuInformationsSoftware();
infoSoft.name = "prepro";
infoSoft.version = "1.1RC7";
- infoSoft.date = "2010-06-10";
+ infoSoft.date = "2010-06-29";
// infoSoft.version = "1.00";
// infoSoft.date = "2010-01-27";
infoSoft.rights = TrResource.getS("Tous droits r\xE9serv\xE9s") + ". CETMEF (c)2003-2009";
Modified: trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/TrPostImplementation.java
===================================================================
--- trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/TrPostImplementation.java 2010-06-28 22:54:10 UTC (rev 5782)
+++ trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/TrPostImplementation.java 2010-06-28 22:55:55 UTC (rev 5783)
@@ -1,9 +1,9 @@
/**
- * @creation 24 mai 2004
- * @modification $Date: 2006-09-19 15:07:28 $
- * @license GNU General Public License 2
- * @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne
- * @mail fud...@li...
+ * @creation 24 mai 2004
+ * @modification $Date: 2006-09-19 15:07:28 $
+ * @license GNU General Public License 2
+ * @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne
+ * @mail fud...@li...
*/
package org.fudaa.fudaa.tr;
@@ -12,6 +12,10 @@
import org.fudaa.fudaa.tr.common.TrResource;
import org.fudaa.fudaa.tr.post.TrPostCommonImplementation;
+import org.fudaa.fudaa.tr.post.TrPostLayoutFille;
+import org.fudaa.fudaa.tr.post.TrPostSource;
+import org.fudaa.fudaa.tr.post.actions.TrPostActionChooseAndCreateCalque;
+import org.fudaa.fudaa.tr.post.actions.TrPostActionOpenSrc;
/**
* @author Fred Deniger
@@ -35,14 +39,17 @@
@Override
public void doImportProject() {
+
+ TrPostLayoutFille currentLayoutFilleOrFirst = getCurrentLayoutFilleOrFirst();
+ if (currentLayoutFilleOrFirst != null) {
+ TrPostActionOpenSrc open=new TrPostActionOpenSrc(getCurrentProject());
+ TrPostSource openSource = open.openSource();
+ if(openSource!=null){
+ currentLayoutFilleOrFirst.controller_.addSource(openSource);
+ }
- /*
- * if (getCurrentProject() != null && getCurrentProject().getFille() != null) {
- * TrProjectPersistence.importForFrame(getCurrentProject().getFille(), this);
- *
- *
- * }
- */
+ }
+
}
@Override
Modified: trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/common/TrCourbeWizardImportScope.java
===================================================================
--- trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/common/TrCourbeWizardImportScope.java 2010-06-28 22:54:10 UTC (rev 5782)
+++ trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/common/TrCourbeWizardImportScope.java 2010-06-28 22:55:55 UTC (rev 5783)
@@ -154,18 +154,10 @@
BuFileFilter filterScopeT=ScopeTFileFormat.getInstance().createFileFilter();
BuFileFilter filterScopeGENE=ScopeGENEFileFormat.getInstance().createFileFilter();
-// for(int i=0;i<ScopeSFileFormat.getInstance().getExtensions().length;i++)
-// if(name.contains(ScopeSFileFormat.getInstance().getExtensions()[i]) || name.contains(ScopeSFileFormat.getInstance().getExtensions()[i].toLowerCase()))
-
if(filterScopeS.accept(_file))
return 0;
-// for(int i=0;i<ScopeTFileFormat.getInstance().getExtensions().length;i++)
-// if(name.contains(ScopeSFileFormat.getInstance().getExtensions()[i])|| name.contains(ScopeSFileFormat.getInstance().getExtensions()[i].toLowerCase()))
if(filterScopeT.accept(_file))
return 1;
-// for(int i=0;i<ScopeGENEFileFormat.getInstance().getExtensions().length;i++){
-// String ext=ScopeGENEFileFormat.getInstance().getExtensions()[i];
-// if(name.contains(ScopeGENEFileFormat.getInstance().getExtensions()[i])|| name.contains(ScopeGENEFileFormat.getInstance().getExtensions()[i].toLowerCase()))
if(filterScopeGENE.accept(_file))
return 2;
@@ -191,8 +183,6 @@
//Choose a valid file
}
- // if(panelParametres_==null)
- // panelParametres_=buildPanelParametresImportation();
return buildPanelParametresImportation();
}
Modified: trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/common/TrProjectImportPanel.java
===================================================================
--- trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/common/TrProjectImportPanel.java 2010-06-28 22:54:10 UTC (rev 5782)
+++ trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/common/TrProjectImportPanel.java 2010-06-28 22:55:55 UTC (rev 5783)
@@ -76,7 +76,7 @@
}
@Override
- public boolean valide() {
+ public boolean isDataValid() {
final File f = pn_.getFile();
if (!isAcceptable(f)) {
if (f == null || !f.exists()) {
@@ -91,15 +91,15 @@
}
public void changedUpdate(final DocumentEvent _e) {
- valide();
+ isDataValid();
}
public void insertUpdate(final DocumentEvent _e) {
- valide();
+ isDataValid();
}
public void removeUpdate(final DocumentEvent _e) {
- valide();
+ isDataValid();
}
public FudaaSaveZipLoader getLoader() throws IOException {
Modified: trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/common/TrProjectPersistence.java
===================================================================
--- trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/common/TrProjectPersistence.java 2010-06-28 22:54:10 UTC (rev 5782)
+++ trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/common/TrProjectPersistence.java 2010-06-28 22:55:55 UTC (rev 5783)
@@ -1,8 +1,12 @@
/*
* @creation 6 sept. 06
+ *
* @modification $Date: 2007-06-11 13:08:21 $
+ *
* @license GNU General Public License 2
+ *
* @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne
+ *
* @mail de...@fu...
*/
package org.fudaa.fudaa.tr.common;
@@ -14,6 +18,7 @@
import org.fudaa.ctulu.CtuluTaskDelegate;
import org.fudaa.ctulu.ProgressionInterface;
+import org.fudaa.ebli.calque.ZEbliCalquesPanel;
import org.fudaa.ebli.calque.ZEbliFilleCalques;
import org.fudaa.fudaa.commun.impl.FudaaCommonImplementation;
import org.fudaa.fudaa.commun.save.FudaaSaveLib;
@@ -41,7 +46,7 @@
final boolean r = FSigProjectPersistence.saveProject(_impl, _proj, TrLib.getPreSaveFile(_destFile), _prog);
if (r) {
// ancien format a effacer
- // old format to erase
+ // old format to erase
final File db = FSigProjectPersistence.getPreSaveFileOld(_destFile);
if (db.exists()) {
db.delete();
@@ -90,7 +95,7 @@
if (doc != null) {
prj.initInformationsDocument(doc);
// le reste ce fait automatiquement par les objets sauv\xE9s.
- // the rest is automatically made by the saved objects
+ // the rest is automatically made by the saved objects
}
return true;
@@ -106,9 +111,14 @@
public static FudaaSaveZipLoader importForFrame(final JInternalFrame _currentFrame,
final FudaaCommonImplementation _impl) {
+ return importForFrame(((ZEbliFilleCalques) _currentFrame).getVisuPanel(), _impl);
+ }
+
+ public static FudaaSaveZipLoader importForFrame(final ZEbliCalquesPanel _calquePanel,
+ final FudaaCommonImplementation _impl) {
final TrProjectImportPanel pn = new TrProjectImportPanel();
final String s = FSigLib.getS("Importer un projet");
- if (pn.afficheModaleOk(_currentFrame, s)) {
+ if (pn.afficheModaleOk(_calquePanel.getCtuluUI().getParentComponent(), s)) {
FudaaSaveZipLoader loader = null;
try {
loader = pn.getLoader();
@@ -116,8 +126,7 @@
final CtuluTaskDelegate createTask = _impl.createTask(s);
createTask.start(new Runnable() {
public void run() {
- FudaaSaveLib.restoreAndLaunch(_impl, (ZEbliFilleCalques) _currentFrame, createTask.getStateReceiver(),
- finalLoader);
+ FudaaSaveLib.restoreAndLaunch(_impl, _calquePanel, createTask.getStateReceiver(), finalLoader);
}
});
} catch (final IOException _evt) {
Modified: trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/data/TrRubarAreteEditor.java
===================================================================
--- trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/data/TrRubarAreteEditor.java 2010-06-28 22:54:10 UTC (rev 5782)
+++ trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/data/TrRubarAreteEditor.java 2010-06-28 22:55:55 UTC (rev 5783)
@@ -413,7 +413,7 @@
}
@Override
- public boolean valide() {
+ public boolean isDataValid() {
boolean r = true;
StringBuffer err = null;
if (tarageEditor_ != null && tarageEditor_.isError()) {
Modified: trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/data/TrSiInterpolAction.java
===================================================================
--- trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/data/TrSiInterpolAction.java 2010-06-28 22:54:10 UTC (rev 5782)
+++ trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/data/TrSiInterpolAction.java 2010-06-28 22:55:55 UTC (rev 5783)
@@ -150,7 +150,7 @@
final CtuluDialogPanel pn = new CtuluDialogPanel() {
@Override
- public boolean valide() {
+ public boolean isDataValid() {
final TableCellEditor cellEditor = table.getCellEditor();
if (cellEditor != null) {
cellEditor.stopCellEditing();
Modified: trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/ScopCourbeTreeModel.java
===================================================================
--- trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/ScopCourbeTreeModel.java 2010-06-28 22:54:10 UTC (rev 5782)
+++ trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/ScopCourbeTreeModel.java 2010-06-28 22:55:55 UTC (rev 5783)
@@ -27,6 +27,7 @@
* @author genesis
*
*/
+@SuppressWarnings("serial")
public class ScopCourbeTreeModel extends TrPostCourbeTreeModel{
Modified: trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/TrIsoLayerDefault.java
===================================================================
--- trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/TrIsoLayerDefault.java 2010-06-28 22:54:10 UTC (rev 5782)
+++ trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/TrIsoLayerDefault.java 2010-06-28 22:55:55 UTC (rev 5783)
@@ -94,7 +94,7 @@
@Override
public void paintIconCentre(final Component _c, final Graphics _g, final int _x, final int _y) {
- if (_g == null) return;
+ if (_g == null) { return; }
Color old = null;
if (getCouleur() != null) {
old = _g.getColor();
@@ -336,7 +336,7 @@
protected final void paintSonde(final Graphics2D _g2d, final GrMorphisme _versEcran) {
if (sondeSelectedElement_ >= 0) {
GrPoint oldPoint = null;
- for (GrPoint point : sondePt_) {
+ for (final GrPoint point : sondePt_) {
final GrPoint p = point.applique(_versEcran);
if (sondeIcone_ == null) {
@@ -408,11 +408,13 @@
sondePt_ = new ArrayList<GrPoint>();
}
- GrPoint point = new GrPoint();
+ final GrPoint point = new GrPoint();
point.initialiseAvec(_ptReel);
- if (!_add) sondePt_.clear();
+ if (!_add) {
+ sondePt_.clear();
+ }
sondePt_.add(point);
final int i = sondeSelection(point, getIsoModelAbstract());
@@ -520,7 +522,7 @@
@Override
public void fillWithInterpolateInfo(final InfoData _m) {
- int i = sondePt_.size()-1;
+ final int i = sondePt_.size() - 1;
getIsoModelAbstract().fillInterpolateInfo(_m, sondeSelectedElement_, sondePt_.get(i).x_, sondePt_.get(i).y_,
getTitle());
}
@@ -613,17 +615,18 @@
}
public final double getSondeX() {
- return sondePt_ == null ? 0 : sondePt_.get(sondePt_.size()-1).x_;
+ return sondePt_ == null ? 0 : sondePt_.get(sondePt_.size() - 1).x_;
}
public final double getSondeY() {
- return sondePt_ == null ? 0 : sondePt_.get(sondePt_.size()-1).y_;
+ return sondePt_ == null ? 0 : sondePt_.get(sondePt_.size() - 1).y_;
}
public final JComponent getTargetComponent() {
return this;
}
+ @Override
public GrBoite getDomaineOnSelected() {
if (isSelectionEmpty()) { return null; }
int m = selection_.getMaxIndex();
@@ -767,38 +770,38 @@
final int n = modelToUse.getNbElt();
final GrPolygone poly = new GrPolygone();
final GrBoite b = new GrBoite();
-// final int width = this.getSize().width;
-// final int height = this.getSize().height;
-// GrPoint ptCenter = new GrPoint();
-// CtuluListSelection alreadyExist = new CtuluListSelection();
+ // final int width = this.getSize().width;
+ // final int height = this.getSize().height;
+ // GrPoint ptCenter = new GrPoint();
+ // CtuluListSelection alreadyExist = new CtuluListSelection();
for (i = 0; i < n; i++) {
-// modelToUse.getCentre(ptCenter, i, false);
-// ptCenter.autoApplique(_versEcran);
-// if (ptCenter.y_ >= 0 && ptCenter.y_ <= height && ptCenter.x_ >= 0 && ptCenter.x_ <= width) {
-// int idx = (2*width * ((int) ptCenter.y_)) + ((int) ptCenter.x_*2);
-// if (alreadyExist.isSelected(idx)) {
-//// System.err.println("same for "+ptCenter);
-// continue;
-// } else {
-// if (idx >= 0) alreadyExist.add(idx);
-//
-// if (rapide) {
-// int idx2;
-//
-// for (int j = ((int) ptCenter.x_) - 1; j < (((int) ptCenter.x_) + 2); j++) {
-// for (int k = ((int) ptCenter.y_) - 1; k < (((int) ptCenter.y_) + 2); k++) {
-// if ((j >= 0) && (j < width) && (k >= 0) && (k < height)) {
-// idx2 = (width * k) + j;
-//
-// if (idx2 != idx && idx2 >= 0) {
-// alreadyExist.add(idx2);
-// }
-// }
-// }
-// }
-// }
-// }
-// }
+ // modelToUse.getCentre(ptCenter, i, false);
+ // ptCenter.autoApplique(_versEcran);
+ // if (ptCenter.y_ >= 0 && ptCenter.y_ <= height && ptCenter.x_ >= 0 && ptCenter.x_ <= width) {
+ // int idx = (2*width * ((int) ptCenter.y_)) + ((int) ptCenter.x_*2);
+ // if (alreadyExist.isSelected(idx)) {
+ // // System.err.println("same for "+ptCenter);
+ // continue;
+ // } else {
+ // if (idx >= 0) alreadyExist.add(idx);
+ //
+ // if (rapide) {
+ // int idx2;
+ //
+ // for (int j = ((int) ptCenter.x_) - 1; j < (((int) ptCenter.x_) + 2); j++) {
+ // for (int k = ((int) ptCenter.y_) - 1; k < (((int) ptCenter.y_) + 2); k++) {
+ // if ((j >= 0) && (j < width) && (k >= 0) && (k < height)) {
+ // idx2 = (width * k) + j;
+ //
+ // if (idx2 != idx && idx2 >= 0) {
+ // alreadyExist.add(idx2);
+ // }
+ // }
+ // }
+ // }
+ // }
+ // }
+ // }
// le test sur la condition se fait dans le modele
if (!modelToUse.polygone(poly, i, false)) {
@@ -982,13 +985,44 @@
if (sonde_) {
clearSelection();
} else {
- sondeSelectedElement_ = -1;
+ clearSonde();
}
- // pour mettre a jour le panel d'info
- fireSelectionEvent();
}
}
+ @Override
+ public boolean changeSelection(final CtuluListSelection s, final int action) {
+ clearSonde();
+ return super.changeSelection(s, action);
+ }
+
+ @Override
+ public boolean changeSelection(final LinearRing poly, final int action, final int mode) {
+ clearSonde();
+ return super.changeSelection(poly, action, mode);
+ }
+
+ @Override
+ public boolean changeSelection(final GrPoint pt, final int tolerancePixel, final int action) {
+ clearSonde();
+ return super.changeSelection(pt, tolerancePixel, action);
+ }
+
+ @Override
+ public boolean changeSelection(final LinearRing[] p, final int action, final int mode) {
+ clearSonde();
+ return super.changeSelection(p, action, mode);
+ }
+
+ public void clearSonde() {
+ if (sondePt_ != null) {
+ this.sondePt_.clear();
+ }
+ sondeSelectedElement_ = -1;
+ // pour mettre a jour le panel d'info
+ fireSelectionEvent();
+ }
+
public final void setV(final int _i) {
if (getIsoModelAbstract().getVariableNb() == 0) { return; }
getListSelectionModel().setSelectionInterval(_i, _i);
Modified: trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/TrPostCommonImplementation.java
===================================================================
--- trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/TrPostCommonImplementation.java 2010-06-28 22:54:10 UTC (rev 5782)
+++ trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/TrPostCommonImplementation.java 2010-06-28 22:55:55 UTC (rev 5783)
@@ -15,11 +15,13 @@
import java.util.List;
import javax.swing.JInternalFrame;
+import javax.swing.JMenuItem;
import javax.swing.JOptionPane;
import javax.swing.SwingUtilities;
import com.memoire.bu.BuLib;
import com.memoire.bu.BuMenu;
+import com.memoire.bu.BuMenuBar;
import com.memoire.bu.BuWizardDialog;
import org.fudaa.ctulu.CtuluLibString;
@@ -46,7 +48,7 @@
return project;
}
- public final void setCurrentProject(TrPostProjet _c) {
+ public final void setCurrentProject(final TrPostProjet _c) {
project = _c;
}
@@ -55,7 +57,7 @@
*/
public List<TrPostLayoutFille> getAllLayoutFille() {
final JInternalFrame[] allInternalFrames = getAllInternalFrames();
- if (allInternalFrames == null) return Collections.emptyList();
+ if (allInternalFrames == null) { return Collections.emptyList(); }
final List<TrPostLayoutFille> res = new ArrayList<TrPostLayoutFille>(allInternalFrames.length);
for (int i = 0; i < allInternalFrames.length; i++) {
final JInternalFrame internalFrame = allInternalFrames[i];
@@ -67,7 +69,7 @@
}
public void elimineDoublonNomsLayout() {
- List<TrPostLayoutFille> liste = getAllLayoutFille();
+ final List<TrPostLayoutFille> liste = getAllLayoutFille();
for (int i = 0; i < liste.size(); i++) {
int cpt = 1;
@@ -81,27 +83,26 @@
}
}
-
- public void display(final TrPostVisuPanel pnVisu,final BCalque calqueActif){
+ public void display(final TrPostVisuPanel pnVisu, final BCalque calqueActif) {
display(pnVisu, calqueActif, TrPostSourceComparatorBuilder.getComparaisonTitle());
}
- public void display(final TrPostVisuPanel pnVisu,final BCalque calqueActif,final String title){
+
+ public void display(final TrPostVisuPanel pnVisu, final BCalque calqueActif, final String title) {
BuLib.invokeLater(new Runnable() {
public void run() {
- final CalqueLegendeWidgetAdapter legendeCalque=(CalqueLegendeWidgetAdapter) pnVisu.getCqLegend();
+ final CalqueLegendeWidgetAdapter legendeCalque = (CalqueLegendeWidgetAdapter) pnVisu.getCqLegend();
// _impl.addInternalFrame(compFille);
// -- ajout de la comparaison en tant que widget --//
final Point location = pnVisu.getLocation();
location.x += 10;
location.y += 10;
- BCalque calqueAct = calqueActif;
+ final BCalque calqueAct = calqueActif;
pnVisu.setCalqueActif(calqueAct);
- TrPostLayoutFille layoutFille = getCurrentLayoutFille();
- layoutFille.controller_.addCalque(title
- + " " + layoutFille.getScene().getAllVue2d().size() + 1, location, pnVisu
- .getPreferredSize(), pnVisu, legendeCalque);
+ final TrPostLayoutFille layoutFille = getCurrentLayoutFille();
+ layoutFille.controller_.addCalque(title + " " + layoutFille.getScene().getAllVue2d().size() + 1, location,
+ pnVisu.getPreferredSize(), pnVisu, legendeCalque);
pnVisu.restaurer();
}
@@ -114,8 +115,9 @@
*/
public TrPostLayoutFille getCurrentLayoutFille() {
final JInternalFrame currentInternalFrame = getCurrentInternalFrame();
- if (currentInternalFrame instanceof TrPostLayoutFille) return (TrPostLayoutFille) currentInternalFrame;
- else {
+ if (currentInternalFrame instanceof TrPostLayoutFille) {
+ return (TrPostLayoutFille) currentInternalFrame;
+ } else {
// -- on recherche la premiere file layout qu'on a et on l'envoie --//
// -- ACHTUNG: CAS A TRAITER:EXEMPLE SI ON EST DANS LA FRAME GESTION MULTI SOURCE; ON EST PAS DANS LA CURRENT
// LAYOUT MAIS ON S EN FOUT--//
@@ -130,7 +132,9 @@
TrPostLayoutFille current = getCurrentLayoutFille();
if (current == null) {
final List<TrPostLayoutFille> allLayoutFille = getAllLayoutFille();
- if (!allLayoutFille.isEmpty()) current = allLayoutFille.get(0);
+ if (!allLayoutFille.isEmpty()) {
+ current = allLayoutFille.get(0);
+ }
}
return current;
}
@@ -139,7 +143,16 @@
public void init() {
super.init();
final BuMenu menu = (BuMenu) getMainMenuBar().getMenu("IMPORTER");
- menu.addMenuItem(TrResource.getS("Autres r\xE9sultats"), getImportResultsAct());
+ final JMenuItem menuImportImage = BuMenuBar.getMenuItem(menu, "IMPORT_IMAGE");
+ if (menuImportImage != null) {
+ menu.remove(menuImportImage);
+ }
+ final JMenuItem menuImportProjet= BuMenuBar.getMenuItem(menu, "IMPORT_PROJECT");
+ if (menuImportProjet != null) {
+ menuImportProjet.setText(TrResource.getS("Importer un fichier source"));
+ }
+
+ menu.addMenuItem(TrResource.getS("Fichiers scope"), getImportResultsAct());
}
String getImportResultsAct() {
@@ -240,8 +253,8 @@
// -- ouverture d'un fichier r\xE9sultat qui sera automatiquement ajout\xE9 dans la layout courante --//
project.createNewLayoutFrame();
// -- ouverture d'un fichier r\xE9sultat --//
- TrPostActionChooseAndCreateCalque chooserSource = new TrPostActionChooseAndCreateCalque(project, project.getImpl()
- .getCurrentLayoutFille().controller_);
+ final TrPostActionChooseAndCreateCalque chooserSource = new TrPostActionChooseAndCreateCalque(project, project
+ .getImpl().getCurrentLayoutFille().controller_);
chooserSource.actionPerformed(null);
} else if ("OUVRIR".equals(com)) {
@@ -262,7 +275,6 @@
}
project.getManager().loadProject(false, null);
- // new TrPostFusionProjet(c_);
} else
@@ -279,7 +291,6 @@
@Override
public void act() {
- // c_.save(TrPostCommonImplementation.this, createProgressionInterface(this));
// -- enregistrement sauce widget --//
project.getManager().saveProject(false);
@@ -291,18 +302,19 @@
@Override
public void act() {
- // c_.save(TrPostCommonImplementation.this, createProgressionInterface(this));
// -- enregistrement sauce widget --//
project.getManager().saveProject(true);
}
}.start();
+ } else if (getImportResultsAct().equals(c...
[truncated message content] |
|
From: <de...@us...> - 2010-10-01 22:29:22
|
Revision: 5970
http://fudaa.svn.sourceforge.net/fudaa/?rev=5970&view=rev
Author: deniger
Date: 2010-10-01 22:29:16 +0000 (Fri, 01 Oct 2010)
Log Message:
-----------
Modified Paths:
--------------
trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/TrLauncherDefault.java
trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/dialogSpec/TrPostTrajectoireTaskModel.java
trunk/soft/fudaa-prepro/ui/src/main/resources/org/fudaa/fudaa/tr/common/tr_en.fr_txt
Modified: trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/TrLauncherDefault.java
===================================================================
--- trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/TrLauncherDefault.java 2010-10-01 22:29:01 UTC (rev 5969)
+++ trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/TrLauncherDefault.java 2010-10-01 22:29:16 UTC (rev 5970)
@@ -111,8 +111,8 @@
infoSoft = new BuInformationsSoftware();
infoSoft.name = "prepro";
- infoSoft.version = "1.1RC10";
- infoSoft.date = "2010-09-06";
+ infoSoft.version = "1.1RC11";
+ infoSoft.date = "2010-09-24";
// infoSoft.version = "1.00";
// infoSoft.date = "2010-01-27";
infoSoft.rights = TrResource.getS("Tous droits r\xE9serv\xE9s") + ". CETMEF (c)2003-2009";
Modified: trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/dialogSpec/TrPostTrajectoireTaskModel.java
===================================================================
--- trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/dialogSpec/TrPostTrajectoireTaskModel.java 2010-10-01 22:29:01 UTC (rev 5969)
+++ trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/dialogSpec/TrPostTrajectoireTaskModel.java 2010-10-01 22:29:16 UTC (rev 5970)
@@ -496,7 +496,7 @@
pn.add(cbFirstTime_);
pn.add(new JLabel(TrResource.getS("Dur\xE9e d'int\xE9gration:")));
pn.add(duree_);
- pn.add(new JLabel(TrResource.getS("Finesse:")));
+ pn.add(new JLabel(TrResource.getS("Pr\xE9cision du trac\xE9:")));
pn.add(finesse_);
return pn;
}
Modified: trunk/soft/fudaa-prepro/ui/src/main/resources/org/fudaa/fudaa/tr/common/tr_en.fr_txt
===================================================================
--- trunk/soft/fudaa-prepro/ui/src/main/resources/org/fudaa/fudaa/tr/common/tr_en.fr_txt 2010-10-01 22:29:01 UTC (rev 5969)
+++ trunk/soft/fudaa-prepro/ui/src/main/resources/org/fudaa/fudaa/tr/common/tr_en.fr_txt 2010-10-01 22:29:16 UTC (rev 5970)
@@ -1013,7 +1013,7 @@
S\xE9lection la variable pour l'axe Y=Select the variable for the Y axe
Recherche \xE9l\xE9ment englobant= Searching for the encompassing element
Dur\xE9e d'int\xE9gration= Time of integration
-Finesse:=Finesse:
+Pr\xE9cision du trac\xE9=Compute accuracy
Choix de la finesse et dur\xE9e=Selection of the finess and duration
Le point doit etre form\xE9 de 2 r\xE9els = tHE POINT MUST BE FORMED BY 2 REAL NUMBERS
Point de d\xE9part:= Starting point:
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <de...@us...> - 2012-01-03 22:53:18
|
Revision: 6908
http://fudaa.svn.sourceforge.net/fudaa/?rev=6908&view=rev
Author: deniger
Date: 2012-01-03 22:53:12 +0000 (Tue, 03 Jan 2012)
Log Message:
-----------
Modified Paths:
--------------
trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/common/TrCourbeTemporelleManager.java
trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/rubar/TrRubarEvolutionManager.java
trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/rubar/TrRubarFileStateMng.java
trunk/soft/fudaa-prepro/ui/src/main/resources/org/fudaa/fudaa/tr/common/tr_en.fr_txt
Modified: trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/common/TrCourbeTemporelleManager.java
===================================================================
--- trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/common/TrCourbeTemporelleManager.java 2012-01-03 21:02:11 UTC (rev 6907)
+++ trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/common/TrCourbeTemporelleManager.java 2012-01-03 22:53:12 UTC (rev 6908)
@@ -47,36 +47,40 @@
import com.memoire.fu.FuLog;
/**
- * Il est suppose qu'il n'y a qu'un seul graphe dessine.
- * It is supposed that there is only a graph drawn
+ * Il est suppose qu'il n'y a qu'un seul graphe dessine. It is supposed that there is only a graph drawn
+ *
* @author Fred Deniger
* @version $Id: TrCourbeTemporelleManager.java,v 1.29 2007-05-22 14:20:38 deniger Exp $
*/
-public class TrCourbeTemporelleManager extends EGGrapheTreeModel implements EvolutionListener,
- TrCourbeImporter.Target {
+public class TrCourbeTemporelleManager extends EGGrapheTreeModel implements EvolutionListener, TrCourbeImporter.Target {
public static final H2dVariableType getRealVariable(final H2dVariableType _t) {
+ if (_t == null) {
+ return null;
+ }
return _t.getParentVariable() == null ? _t : _t.getParentVariable();
}
- public static final boolean isCurveNotEnoughLarge(final double _min, final double _max,
- final EvolutionReguliereInterface[] _l) {
+ public static final boolean isCurveNotEnoughLarge(final double _min, final double _max, final EvolutionReguliereInterface[] _l) {
if (_l != null) {
for (int i = _l.length - 1; i >= 0; i--) {
final EvolutionReguliereInterface li = _l[i];
- if ((li.getMinX() > _min) || (li.getMaxX() < _max)) { return true; }
+ if ((li.getMinX() > _min) || (li.getMaxX() < _max)) {
+ return true;
+ }
}
return false;
}
return true;
}
- public static final boolean isCurveNotEnoughLarge(final double _min, final double _max,
- final H2dEvolutionFrontiereLiquide[] _l) {
+ public static final boolean isCurveNotEnoughLarge(final double _min, final double _max, final H2dEvolutionFrontiereLiquide[] _l) {
if (_l != null) {
for (int i = _l.length - 1; i >= 0; i--) {
final EvolutionReguliereInterface li = _l[i].getEvolution();
- if ((li.getMinX() > _min) || (li.getMaxX() < _max)) { return true; }
+ if ((li.getMinX() > _min) || (li.getMaxX() < _max)) {
+ return true;
+ }
}
return false;
}
@@ -90,12 +94,18 @@
protected final transient H2dParameters params_;
- public TrCourbeTemporelleManager(final H2dParameters _p) {
+ public TrCourbeTemporelleManager(final H2dParameters _p, boolean createDefaultCourbe) {
+ setCreateDefaultCourbe(createDefaultCourbe);
initWith(_p);
params_ = _p;
_p.getProjectDispatcher().addEvolutionListener(this);
}
+ public TrCourbeTemporelleManager(final H2dParameters _p) {
+ this(_p, false);
+
+ }
+
private TrCourbeComboboxModel initCombobox(final TrCourbeComboboxModel _m, final JComboBox _cb) {
_cb.setModel(_m);
_cb.setEditable(false);
@@ -140,11 +150,11 @@
final EGCourbeChild courbe = new EGCourbeChild(_g, new FudaaCourbeModel(_e));
// courbe.setTitre(_e.getNom());
courbe.setAspectContour(BPalettePlageDefault.getColor(_idx));
-
+
// on met a jour si la courbe est un nuage de points ou non --//
//We update if the curve is a cloud of points or not
courbe.setNuagePoints(_e.isNuagePoints());
-
+
if (_g == null) {
groupNull_.addEGComponent(courbe);
} else {
@@ -155,7 +165,9 @@
@Override
protected EGCourbeChild duplicateCourbe(final EGCourbeChild _c) {
- if (_c == null) { return null; }
+ if (_c == null) {
+ return null;
+ }
final EvolutionReguliere newE = ((FudaaCourbeModel) _c.getModel()).getEvolution().duplicate();
// newE.setListener(listener_);
newE.setNom(_c.getTitle() + CtuluLibString.ESPACE + BuResource.BU.getString("Copie"));
@@ -167,7 +179,9 @@
final EGGroup g = getGroup(i);
for (int j = g.getChildCount() - 1; j >= 0; j--) {
final EGCourbe c = (EGCourbe) g.getChildAt(j);
- if (((FudaaCourbeModel) c.getModel()).getEvolution().equals(_e)) { return c; }
+ if (((FudaaCourbeModel) c.getModel()).getEvolution().equals(_e)) {
+ return c;
+ }
}
}
return null;
@@ -175,7 +189,9 @@
protected String majNom(final String _nom, final int _idx) {
final int idxUnder = _nom.lastIndexOf('_');
- if (idxUnder < 0) { return _nom + '_' + _idx; }
+ if (idxUnder < 0) {
+ return _nom + '_' + _idx;
+ }
try {
Integer.parseInt(_nom.substring(idxUnder + 1));
return _nom.substring(0, idxUnder) + "_" + _idx;
@@ -210,9 +226,7 @@
final Map.Entry e = (Map.Entry) it.next();
final H2dVariableType t = getRealVariable((H2dVariableType) e.getValue());
EGGroup g = groupNull_;
- if (t == null) {
- FuLog.warning(e + " mal d\xE9fini ?");
- } else {
+ if (t != null) {
g = (EGGroup) varGrapheGroup_.get(t);
}
if (g == null) {
@@ -245,11 +259,6 @@
}
}
- /*
- * public boolean isUsedCurveNotEnoughWidth(double _min, double _max) { new Throwable().printStackTrace(); return
- * false; }
- */
-
@Override
public void addNewCourbe(final CtuluCommandManager _cmd, final Component _parent, final EGGraphe _graphe) {
final String title = TrResource.getS("courbe") + CtuluLibString.ESPACE + (getNbCourbes() + 1);
@@ -274,8 +283,7 @@
xmaxVal = 1;
}
}
- final FudaaCourbeCreateGroupPanel pn = new FudaaCourbeCreateGroupPanel(title, xminVal, xmaxVal, model, _graphe,
- null);
+ final FudaaCourbeCreateGroupPanel pn = new FudaaCourbeCreateGroupPanel(title, xminVal, xmaxVal, model, _graphe, null);
if (CtuluDialogPanel.isOkResponse(pn.afficheModale(_parent))) {
final EGGroup gr = pn.getSelectedGroup();
final EvolutionReguliere evol = pn.getEvol();
@@ -321,8 +329,7 @@
* @param _t la variable a considere
* @return un model pour les courbes de la variable _t
*/
- public ComboBoxModel createComboBoxModel(final H2dVariableType _t, final EvolutionReguliereInterface _evol1,
- final EvolutionReguliereAbstract _evol2) {
+ public ComboBoxModel createComboBoxModel(final H2dVariableType _t, final EvolutionReguliereInterface _evol1, final EvolutionReguliereAbstract _evol2) {
return new TrCourbeComboboxModel(_evol1, _evol2, getGroupeFor(_t), null);
}
@@ -330,13 +337,12 @@
return initCombobox(new TrCourbeComboboxModel(getGroupeFor(_t), groupNull_), _cb);
}
- public ComboBoxModel createComboBoxModelWithEmpty(final EvolutionReguliereInterface _e0,
- final EvolutionReguliereInterface _e, final H2dVariableType _t, final JComboBox _cb) {
+ public ComboBoxModel createComboBoxModelWithEmpty(final EvolutionReguliereInterface _e0, final EvolutionReguliereInterface _e,
+ final H2dVariableType _t, final JComboBox _cb) {
return initCombobox(new TrCourbeComboboxModel(_e0, _e, getGroupeFor(_t), groupNull_), _cb);
}
- public ComboBoxModel createComboBoxModelWithEmpty(final EvolutionReguliereInterface _e, final H2dVariableType _t,
- final JComboBox _cb) {
+ public ComboBoxModel createComboBoxModelWithEmpty(final EvolutionReguliereInterface _e, final H2dVariableType _t, final JComboBox _cb) {
return initCombobox(new TrCourbeComboboxModel(_e, null, getGroupeFor(_t), groupNull_), _cb);
}
@@ -356,8 +362,8 @@
}
}
- public void evolutionUsedChanged(final EvolutionReguliereInterface _e, final int _old, final int _new,
- final boolean _isAdjusting) {}
+ public void evolutionUsedChanged(final EvolutionReguliereInterface _e, final int _old, final int _new, final boolean _isAdjusting) {
+ }
public int getNbEvol() {
int r = 0;
@@ -384,13 +390,14 @@
public H2dVariableType getVar(final EGGroup _g) {
for (final Iterator it = varGrapheGroup_.entrySet().iterator(); it.hasNext();) {
final Map.Entry e = (Map.Entry) it.next();
- if (e.getValue() == _g) { return (H2dVariableType) e.getKey(); }
+ if (e.getValue() == _g) {
+ return (H2dVariableType) e.getKey();
+ }
}
return null;
}
- public void importCourbes(final EvolutionReguliereInterface[] _crb, final CtuluCommandManager _mng,
- final ProgressionInterface _prog) {
+ public void importCourbes(final EvolutionReguliereInterface[] _crb, final CtuluCommandManager _mng, final ProgressionInterface _prog) {
add(_crb, _mng);
}
@@ -410,6 +417,9 @@
v.setTitre("Import");
groupNull_.setTitle(v.getTitre());
groupNull_.setAxeY(v);
+ if (createDefaultCourbe) {
+ createDefaultCourbe(groupNull_);
+ }
}
setValues(m);
if (!contains(groupNull_)) {
@@ -422,6 +432,16 @@
fireTreeStructureChanged(this, getPathToRoot(getGrapheTreeNode()), null, null);
}
+ private boolean createDefaultCourbe = false;
+
+ public boolean isCreateDefaultCourbe() {
+ return createDefaultCourbe;
+ }
+
+ private final void setCreateDefaultCourbe(boolean createDefaultCourbe) {
+ this.createDefaultCourbe = createDefaultCourbe;
+ }
+
protected final EGGroup getOrCreateGroupFor(final H2dVariableType _tInit) {
final H2dVariableType t = getRealVariable(_tInit);
if (!varGrapheGroup_.containsKey(t)) {
@@ -432,11 +452,19 @@
v.setUnite(_tInit.getCommonUnit() == null ? null : _tInit.getCommonUnit().toString());
g.setAxeY(v);
varGrapheGroup_.put(t, g);
+
return g;
}
return (EGGroup) varGrapheGroup_.get(t);
}
+ private void createDefaultCourbe(final EGGroup g) {
+ EvolutionReguliere defaultCourbe = new EvolutionReguliere(1);
+ defaultCourbe.add(0, 0);
+ defaultCourbe.setNom(TrLib.getString("vide"));
+ createEGCourbe(g, defaultCourbe);
+ }
+
public boolean isOneCurveUsed() {
FuLog.error("DO NOT USE");
return false;
Modified: trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/rubar/TrRubarEvolutionManager.java
===================================================================
--- trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/rubar/TrRubarEvolutionManager.java 2012-01-03 21:02:11 UTC (rev 6907)
+++ trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/rubar/TrRubarEvolutionManager.java 2012-01-03 22:53:12 UTC (rev 6908)
@@ -53,7 +53,7 @@
* @param _p
*/
public TrRubarEvolutionManager(final H2dParameters _p) {
- super(_p);
+ super(_p, true);
rubarParam_ = (H2dRubarParameters) _p;
rubarParam_.getBcMng().addListener(this);
rubarParam_.getAppMng().addAppListener(this);
Modified: trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/rubar/TrRubarFileStateMng.java
===================================================================
--- trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/rubar/TrRubarFileStateMng.java 2012-01-03 21:02:11 UTC (rev 6907)
+++ trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/rubar/TrRubarFileStateMng.java 2012-01-03 22:53:12 UTC (rev 6908)
@@ -213,7 +213,7 @@
fileModified = null;
_impl.getImpl().setMainMessage(TrResource.getS("Suppression fichiers"));
// suppression des fichiers inutiles
- for (int i = fileToRemove.size() - 1; i > 0; i--) {
+ for (int i = fileToRemove.size() - 1; i >= 0; i--) {
final File f = (File) fileToRemove.get(i);
CtuluLibMessage.info("SAVE: file removed " + f.getAbsolutePath());
f.delete();
Modified: trunk/soft/fudaa-prepro/ui/src/main/resources/org/fudaa/fudaa/tr/common/tr_en.fr_txt
===================================================================
--- trunk/soft/fudaa-prepro/ui/src/main/resources/org/fudaa/fudaa/tr/common/tr_en.fr_txt 2012-01-03 21:02:11 UTC (rev 6907)
+++ trunk/soft/fudaa-prepro/ui/src/main/resources/org/fudaa/fudaa/tr/common/tr_en.fr_txt 2012-01-03 22:53:12 UTC (rev 6908)
@@ -1,4 +1,5 @@
Le fichier r\xE9sultat utilis\xE9 actuellement=The current source used
+vide=empty
S\xE9lectionner les ar\xEAtes du m\xEAme type=Select edges with same type
Choisir l'isoligne de la courbe s\xE9lectionn\xE9e=Choose the line of the selected curve.
Fichier=File
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <de...@us...> - 2012-03-25 19:53:13
|
Revision: 7033
http://fudaa.svn.sourceforge.net/fudaa/?rev=7033&view=rev
Author: deniger
Date: 2012-03-25 19:53:06 +0000 (Sun, 25 Mar 2012)
Log Message:
-----------
Modified Paths:
--------------
trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/TrLauncherDefault.java
trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/TrSupervisorImplementation.java
trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/common/TrCommonImplementation.java
trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/persist/TrPostPersistenceManager.java
trunk/soft/fudaa-prepro/ui/src/main/resources/org/fudaa/fudaa/tr/common/tr_en.fr_txt
Removed Paths:
-------------
trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/TrSoftUpdater.java
Modified: trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/TrLauncherDefault.java
===================================================================
--- trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/TrLauncherDefault.java 2012-03-24 03:23:26 UTC (rev 7032)
+++ trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/TrLauncherDefault.java 2012-03-25 19:53:06 UTC (rev 7033)
@@ -48,21 +48,7 @@
static BuInformationsSoftware infoSoft;
- private static void updateVersion() {
- if (BuPreferences.BU.getBooleanProperty("check.update", true)) {
- if (Fu.DEBUG && FuLog.isDebug()) {
- FuLog.debug("FTR: search for updates");
- }
- final Thread d = new Thread() {
- @Override
- public void run() {
- new TrSoftUpdater(infoSoft).update();
- }
- };
- d.setPriority(Thread.NORM_PRIORITY);
- d.start();
- }
- }
+
public static void init() {
@@ -116,7 +102,6 @@
"Didier Roug\xE9" };
infoSoft.citation = "";
FudaaSaveLib.configureDb4o();
- updateVersion();
}
/**
Deleted: trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/TrSoftUpdater.java
===================================================================
--- trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/TrSoftUpdater.java 2012-03-24 03:23:26 UTC (rev 7032)
+++ trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/TrSoftUpdater.java 2012-03-25 19:53:06 UTC (rev 7033)
@@ -1,339 +0,0 @@
-/*
- * @creation 21 juil. 06
- * @modification $Date: 2007-05-04 14:01:52 $
- * @license GNU General Public License 2
- * @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne
- * @mail de...@fu...
- */
-package org.fudaa.fudaa.tr;
-
-import java.awt.Frame;
-import java.awt.Window;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.LineNumberReader;
-import java.net.URL;
-import java.net.URLConnection;
-import java.util.Properties;
-
-import javax.swing.JDialog;
-import javax.swing.JOptionPane;
-import javax.swing.ListModel;
-
-import com.memoire.bu.*;
-import com.memoire.fu.Fu;
-import com.memoire.fu.FuLib;
-import com.memoire.fu.FuLog;
-
-import org.fudaa.ctulu.CtuluLib;
-import org.fudaa.ctulu.CtuluLibString;
-import org.fudaa.ctulu.gui.CtuluLibDialog;
-import org.fudaa.ctulu.gui.CtuluOptionPane;
-import org.fudaa.fudaa.commun.FudaaBrowserControl;
-import org.fudaa.fudaa.commun.FudaaLib;
-import org.fudaa.fudaa.tr.common.TrLib;
-import org.fudaa.fudaa.tr.common.TrResource;
-
-/**
- * @author fred deniger
- * @version $Id: TrSoftUpdater.java,v 1.12 2007-05-04 14:01:52 deniger Exp $
- */
-public class TrSoftUpdater {
-
- BuCommonImplementation impl_;
- final BuInformationsSoftware infos_;
- boolean isConnected_;
- boolean isUptoDate_;
- int nbTry_ = 7;
-
- final String updateURL_;
-
- int wait_ = 1000;
-
- public TrSoftUpdater(final BuInformationsSoftware _infos) {
- super();
- infos_ = _infos;
- updateURL_ = TrLib.getMajURl(infos_);
- BuPreferences.BU.applyNetwork();
- }
-
- void afficheDialogueForUpdate(final String _version) {
-
- final String title = TrResource.getS("Mise \xE0 jour de Fudaa-Prepro:") + CtuluLibString.ESPACE + _version;
- final String message = "<html><body><p>"
- + TrResource.getS("Une nouvelle version est disponible:")
- + "<b> "
- + _version
- + "</b>.</p><p>"
- + TrResource.getS("Cliquer {0} pour voir les modifications apport\xE9es \xE0 la derni\xE8re version.",
- "<a href=\"GO_UPDATE\">" + TrResource.getS("ici") + "</a>")
- + "</p><p>"
- + TrResource
- .getS("Pour utiliser la nouvelle version, vous devrez fermer toutes les applications de Fudaa-Prepro.")
- + "<br>"
- + TrResource
- .getS("Pour cela, vous pouvez utiliser directement l'option ci-dessous <br> ou le menu 'Fichier>Fermer toutes les applications'.")
- + "<p><b>"
- + TrResource.getS("Mettre \xE0 jour en arri\xE8re-plan:")
- + "</b><br>"
- + TrResource
- .getS("La nouvelle version sera t\xE9l\xE9charg\xE9e et install\xE9e en tache de fond. Elle sera utilis\xE9e au prochain red\xE9marrage de Fudaa Prepro.")
- + "</p>";
- final boolean isJnlp = TrLib.isJnlp();
- final String closeAll = TrResource.getS("Fermer toutes les applications et mettre \xE0 jour");
- final String ignore = FudaaLib.getS("Ignorer");
- final String background = TrResource.getS("Mettre \xE0 jour en arri\xE8re-plan");
- final String ignoreAndForget = TrResource.getS("Ignorer et ne plus demander");
- final String[] options = isJnlp ? new String[] { closeAll, background, ignoreAndForget, ignore } : new String[] {
- closeAll, ignoreAndForget, ignore };
-
- final CtuluOptionPane pane = new CtuluOptionPane(message, JOptionPane.INFORMATION_MESSAGE) {
- @Override
- protected void linkActivated(final String _url) {
- if (_url == null) {
- new Thread() {
- @Override
- public void run() {
- showUpdateModification(_version);
- }
- }.start();
-
- } else {
- super.linkActivated(_url);
- }
- }
- };
- pane.setOptions(options);
- final JDialog d = pane.createDialog(getFrame(), title);
- // en fait c'est juste pour avoir le joli icone en haut a gauche
- d.setResizable(true);
- d.setModal(true);
- d.pack();
- TrLauncherDefault.updateDial_ = d;
- d.show();
- d.dispose();
- TrLauncherDefault.updateDial_ = null;
-
- final Object o = pane.getValue();
- final String preproJnlp = "http://fudaa.fr/install/prepro/prepro.jnlp";
- final boolean isJava16 = "1.6".compareTo(FuLib.getJavaVersion()) <= 0;
- if (options[0].equals(o)) {
- Object tmp = null;
- final boolean onlySup = isOnlySupervisor();
- // un objet temporaire pour eviter que Bu fasse un System.exit(0);
- if (!onlySup) {
- tmp = new Object();
- BuRegistry.register(tmp);
- closeAll();
- }
- if (onlySup || (tmp != null && BuRegistry.getModel().getSize() == 1 && tmp.equals(BuRegistry.getModel().get(0)))) {
- if (TrLib.isJnlp()) {
- try {
- String[] strings = new String[] { TrLib.getJavaws(), "-online", preproJnlp };
- if (isJava16) {
- strings = new String[] { TrLib.getJavaws(), preproJnlp };
- }
- // on importe la nouvelle version
- // Runtime.getRuntime().exec(new String[] { TrLib.getJavaws(), "-wait", "-import", preproJnlp });
- // on lance le tout
- Runtime.getRuntime().exec(strings);
- } catch (final IOException _evt) {
- FudaaBrowserControl.displayURL(updateURL_);
- FuLog.error(_evt);
-
- }
- }
- System.exit(0);
- } else {
- BuRegistry.unregister(tmp);
- FudaaBrowserControl.displayURL(updateURL_);
- }
- // tache de fond
- } else if (isJnlp && options[1].equals(o)) {
- if (TrLib.isJnlp()) {
- try {
- Runtime.getRuntime().exec(new String[] { TrLib.getJavaws(), "-import", "-silent", preproJnlp });
- } catch (final IOException _evt) {
- FudaaBrowserControl.displayURL(updateURL_);
- FuLog.error(_evt);
-
- }
- } else {
- FudaaBrowserControl.displayURL(updateURL_);
- }
- } else if (options[options.length - 2].equals(o)) {
- BuPreferences.BU.putBooleanProperty("check.update", false);
- BuPreferences.BU.writeIniFile();
- CtuluLibDialog
- .showMessage(
- getFrame(),
- TrResource.getS("V\xE9rification des mises \xE0 jour au d\xE9marrage"),
- TrResource
- .getS("Pour activer \xE0 nouveau cette option, aller dans les pr\xE9f\xE9rences (menu Edition) et\n choisir l'onglet 'Syst\xE8me' et 'D\xE9marrage/sortie'"));
- }
-
- }
-
- private Frame getFrame() {
- return impl_ == null ? BuLib.HELPER : impl_.getFrame();
-
- }
-
- protected void showUpdateModification(final String _version) {
- InputStream in = null;
- LineNumberReader reader = null;
- try {
- final String lang = CtuluLib.isFrenchLanguageSelected() ? "fr" : "en";
- final URL url = new URL("http://www.fudaa.fr/prepro/inc.last-changelog." + lang + ".html");
- // in = url.openStream();
- final URLConnection connection = url.openConnection();
- for (int i = 0; i < nbTry_ && in == null; i++) {
- connection.connect();
- in = url.openStream();
- try {
- if (in == null) {
- Thread.sleep(wait_);
- }
- } catch (final InterruptedException _evt) {
-
- }
- }
- if (in == null) {
- BuBrowserControl.displayURL(updateURL_);
-
- } else {
- final StringBuffer buf = new StringBuffer(300);
- buf.append("<html><body>");
- reader = new LineNumberReader(new InputStreamReader(in));
- String line = reader.readLine();
- while (line != null) {
- buf.append(line);
- line = reader.readLine();
- }
- buf.append("</body></html>");
- CtuluLibDialog.showMessage(getFrame(), TrResource.getS("Modifications apport\xE9es \xE0 la version {0}", _version),
- buf.toString());
-
- }
- } catch (final IOException _evt) {
- // FuLog.error(_evt);
-
- } finally {
- FuLib.safeClose(in);
- FuLib.safeClose(reader);
- }
- }
-
- public void closeAll() {
- if (impl_ != null) {
- impl_.exit();
- }
- final ListModel model = BuRegistry.getModel();
- final int nb = model.getSize() - 1;
- for (int i = 0; i < nb; i++) {
- final Object o = model.getElementAt(i);
- if (o instanceof BuApplication) {
- ((BuApplication) o).exit();
- } else if (o instanceof Window) {
- ((Window) o).hide();
- ((Window) o).dispose();
- }
- }
- }
-
- public BuCommonImplementation getImpl() {
- return impl_;
- }
-
- public int getNbTry() {
- return nbTry_;
- }
-
- public int getWait() {
- return wait_;
- }
-
- public boolean isConnected() {
- return isConnected_;
- }
-
- public boolean isOnlySupervisor() {
- if (BuRegistry.getModel().getSize() == 0) { return true; }
- if (BuRegistry.getModel().getSize() == 1) {
- final Object o = BuRegistry.getModel().get(0);
- return (o instanceof BuApplication)
- && ((((BuApplication) o).getImplementation()) instanceof TrSupervisorImplementation);
- }
- return false;
- }
-
- public boolean isUptoDate() {
- return isUptoDate_;
- }
-
- public void setImpl(final BuCommonImplementation _impl) {
- impl_ = _impl;
- }
-
- public void setNbTry(final int _nbTry) {
- nbTry_ = _nbTry;
- }
-
- public void setWait(final int _millsec) {
- wait_ = _millsec;
- }
-
- public void update() {
- if (Fu.DEBUG && FuLog.isDebug()) {
- FuLog.debug("FTR: update start load properties");
- }
- InputStream in = null;
- try {
- final URL url = new URL("http://www.fudaa.fr/prepro/prepro.properties");
- // in = url.openStream();
- final URLConnection connection = url.openConnection();
- connection.setUseCaches(false);
- for (int i = 0; i < nbTry_ && in == null; i++) {
- connection.connect();
- in = url.openStream();
- try {
- if (in == null) {
- Thread.sleep(wait_);
- }
- } catch (final InterruptedException _evt) {
-
- }
- }
- if (in == null) {
- isConnected_ = false;
- } else {
- isConnected_ = true;
- final Properties prop = new Properties();
- prop.load(in);
- final String version = prop.getProperty("@version@");
- if (Fu.DEBUG && FuLog.isDebug()) {
- FuLog.debug("FTR: version read from site " + version);
- }
- if (version != null && version.compareTo(infos_.version) > 0) {
- isUptoDate_ = false;
- BuLib.invokeLater(new Runnable() {
-
- public void run() {
- afficheDialogueForUpdate(version);
- }
- });
- } else {
- isUptoDate_ = true;
- }
-
- }
- } catch (final IOException _evt) {
- // FuLog.error(_evt);
-
- } finally {
- FuLib.safeClose(in);
- }
- }
-
-}
Modified: trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/TrSupervisorImplementation.java
===================================================================
--- trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/TrSupervisorImplementation.java 2012-03-24 03:23:26 UTC (rev 7032)
+++ trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/TrSupervisorImplementation.java 2012-03-25 19:53:06 UTC (rev 7033)
@@ -98,7 +98,6 @@
r.addMenuItem(BuResource.BU.getString("Licence..."), "TEXTE_LICENCE", true);
r.addSeparator();
r.addMenuItem(BuResource.BU.getString("Site WWW"), "WWW_ACCUEIL", true);
- r.addMenuItem(BuResource.BU.getString("Mise \xE0 jour"), "MAJ", true);
TrLib.addJavawsForJnlp(r);
r.addMenuItem(TrResource.getS("Soumettre une demande d'am\xE9lioration"), "SEND_COMMENT", BuResource.BU.getIcon("envoyer"), true);
TrLib.addJava3DJMFTest(r);
Modified: trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/common/TrCommonImplementation.java
===================================================================
--- trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/common/TrCommonImplementation.java 2012-03-24 03:23:26 UTC (rev 7032)
+++ trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/common/TrCommonImplementation.java 2012-03-25 19:53:06 UTC (rev 7033)
@@ -29,31 +29,9 @@
import javax.swing.KeyStroke;
import javax.swing.event.InternalFrameEvent;
-import com.memoire.bu.BuActionRemover;
-import com.memoire.bu.BuBrowserPreferencesPanel;
-import com.memoire.bu.BuColumn;
-import com.memoire.bu.BuDesktopPreferencesPanel;
-import com.memoire.bu.BuIcon;
-import com.memoire.bu.BuInternalFrame;
-import com.memoire.bu.BuLanguagePreferencesPanel;
-import com.memoire.bu.BuLib;
-import com.memoire.bu.BuMainPanel;
-import com.memoire.bu.BuMenu;
-import com.memoire.bu.BuMenuBar;
-import com.memoire.bu.BuMenuItem;
-import com.memoire.bu.BuPreferences;
-import com.memoire.bu.BuResource;
-import com.memoire.bu.BuScrollPane;
-import com.memoire.bu.BuTaskView;
-import com.memoire.bu.BuToolBar;
-import com.memoire.bu.BuUserPreferencesPanel;
-import com.memoire.fu.FuLib;
-import com.memoire.fu.FuLog;
-
import org.fudaa.ctulu.BuNetworkPreferencesPanel;
import org.fudaa.ctulu.CtuluLib;
import org.fudaa.ctulu.CtuluLibArray;
-import org.fudaa.ctulu.CtuluTaskDelegate;
import org.fudaa.ctulu.ProgressionInterface;
import org.fudaa.ctulu.gui.CtuluFavoriteFiles;
import org.fudaa.ctulu.gui.CtuluHelpComponent;
@@ -72,9 +50,29 @@
import org.fudaa.fudaa.fdico.FDicoPreferences;
import org.fudaa.fudaa.sig.FSigLib;
import org.fudaa.fudaa.sig.layer.FSigImageImportAction;
-import org.fudaa.fudaa.tr.TrSoftUpdater;
import org.jdesktop.swingx.ScrollPaneSelector;
+import com.memoire.bu.BuActionRemover;
+import com.memoire.bu.BuBrowserPreferencesPanel;
+import com.memoire.bu.BuColumn;
+import com.memoire.bu.BuDesktopPreferencesPanel;
+import com.memoire.bu.BuIcon;
+import com.memoire.bu.BuInternalFrame;
+import com.memoire.bu.BuLanguagePreferencesPanel;
+import com.memoire.bu.BuLib;
+import com.memoire.bu.BuMainPanel;
+import com.memoire.bu.BuMenu;
+import com.memoire.bu.BuMenuBar;
+import com.memoire.bu.BuMenuItem;
+import com.memoire.bu.BuPreferences;
+import com.memoire.bu.BuResource;
+import com.memoire.bu.BuScrollPane;
+import com.memoire.bu.BuTaskView;
+import com.memoire.bu.BuToolBar;
+import com.memoire.bu.BuUserPreferencesPanel;
+import com.memoire.fu.FuLib;
+import com.memoire.fu.FuLog;
+
/**
* @author Fred Deniger
* @version $Id: TrCommonImplementation.java,v 1.59.2.1 2008-03-18 11:05:44 bmarchan Exp $
@@ -215,30 +213,8 @@
return null;
}
- protected void maj() {
- final String s = TrResource.getS("Recherche mise \xE0 jour"); //Finding update
- final CtuluTaskDelegate task = createTask(s);
- task.start(new Runnable() {
+
- public void run() {
- final TrSoftUpdater up = new TrSoftUpdater(getInformationsSoftware());
- up.setNbTry(3);
- up.setImpl(TrCommonImplementation.this);
- up.setWait(500);
- up.update();
- if (up.isConnected()) {
- if (up.isUptoDate()) {
- message(s, TrResource.getS("Votre version est \xE0 jour"), false);
- }
- } else {
- displayURL(TrLib.getMajURl(getInformationsSoftware()));
- }
- }
-
- });
-
- }
-
protected abstract void ouvrir();
protected void removeUnusedActions() {
@@ -341,8 +317,6 @@
} else if ("AIDE_INDEX".equals(act)) {
// displayAideIndex();
displayHelpPDF(getInformationsSoftware().baseManUrl());
- } else if ("MAJ".equals(act)) {
- maj();
} else if ("SEND_COMMENT".equals(act)) {
new Thread() {
@Override
@@ -487,7 +461,6 @@
setEnabledForAction("QUITTER", true);
setEnabledForAction("PREFERENCE", true);
- setEnabledForAction("MAJ", true);
setEnabledForAction("SEND_COMMENT", true);
setEnabledForAction("LAUNCH_JAVAWS", true);
final BuMenu mFichier = (BuMenu) b.getMenu("MENU_FICHIER");
Modified: trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/persist/TrPostPersistenceManager.java
===================================================================
--- trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/persist/TrPostPersistenceManager.java 2012-03-24 03:23:26 UTC (rev 7032)
+++ trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/persist/TrPostPersistenceManager.java 2012-03-25 19:53:06 UTC (rev 7033)
@@ -1036,16 +1036,17 @@
*/
public void loadProject(final boolean executeByExplorer, final File explorerFile) {
managerError.clear();
+ progression("Chargement du projet", 0);
// -- on elimine les doublons potentiels des frames layouts --//
ui_.elimineDoublonNomsLayout();
-
+ ui_.setGlassPaneStop();
progression("Lecture du r\xE9pertoire", 10);
// -- etape 1 lecture du repertoire global ou du fichier param --//
if (!loadPersistDirectory(executeByExplorer, explorerFile)) {
return;
}
- ui_.setGlassPaneStop();
+
final String pathVariables = projet_.getAbsolutePath() + File.separator + REP_VAR;
try {
new File(pathVariables).mkdir();
@@ -1053,15 +1054,7 @@
// pas grave on continue
FuLog.debug("Le repertoire des variables existe deja");
}
- // -- etape 2 sauvegarde du fichier contenant tous les sources ouverts
- progression("Chargement du fichier descripteur de sources", 15);
- File file = new File(projet_.getAbsolutePath() + File.separator + setupProject);
- final HashMap<String, Object> parametres = new HashMap<String, Object>();
- if (!loadSource(file, parametres)) {
- managerError.addMessageError("Veuillez corriger les chemins des fichiers r\xE9sultats dans le fichier setup et r\xE9it\xE9rez l'op\xE9ration.");
- managerError.showDialog(ui_);
- return;
- }
+
// boolean containsVariables = containsVariables(pathVariables);
// boolean loadVar = true;
// if (containsVariables) {
@@ -1073,7 +1066,15 @@
public void run() {
try {
-
+ // -- etape 2 sauvegarde du fichier contenant tous les sources ouverts
+ progression("Chargement du fichier descripteur de sources", 15);
+ File file = new File(projet_.getAbsolutePath() + File.separator + setupProject);
+ final HashMap<String, Object> parametres = new HashMap<String, Object>();
+ if (!loadSource(file, parametres)) {
+ managerError.addMessageError("Veuillez corriger les chemins des fichiers r\xE9sultats dans le fichier setup et r\xE9it\xE9rez l'op\xE9ration.");
+ managerError.showDialog(ui_);
+ return;
+ }
// -- etape 6; lecture des variables --//
progression("Lecture variables", 20);
// if (loadVarFinal) {
@@ -1082,7 +1083,7 @@
// -- etape 3: sauvegarde du fichier de descriptions des layout
// --//
progression("Cr\xE9ation du descripteur de layout", 30);
- File file = new File(projet_.getAbsolutePath() + File.separator + INFOSCENE);
+ file = new File(projet_.getAbsolutePath() + File.separator + INFOSCENE);
final List<String> listeFichiers = loadDescriptorScenes(file);
// -- etape 4 chargement des ebliscene unitairement --//
progression("Cr\xE9ation des fichiers layout", 40);
Modified: trunk/soft/fudaa-prepro/ui/src/main/resources/org/fudaa/fudaa/tr/common/tr_en.fr_txt
===================================================================
--- trunk/soft/fudaa-prepro/ui/src/main/resources/org/fudaa/fudaa/tr/common/tr_en.fr_txt 2012-03-24 03:23:26 UTC (rev 7032)
+++ trunk/soft/fudaa-prepro/ui/src/main/resources/org/fudaa/fudaa/tr/common/tr_en.fr_txt 2012-03-25 19:53:06 UTC (rev 7033)
@@ -1,4 +1,5 @@
Le fichier r\xE9sultat utilis\xE9 actuellement=The current source used
+Chargement du projet=Project loading
Le projet contient des variables calcul\xE9es. Voulez-vous les charger ?=The project contained computed variables. Do you want to load them ?
Chargement des variables=Variables loading
Au moins un ouvrage doit \xEAtre cr\xE9\xE9=At least one structure must be created
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <de...@us...> - 2012-03-28 08:38:58
|
Revision: 7036
http://fudaa.svn.sourceforge.net/fudaa/?rev=7036&view=rev
Author: deniger
Date: 2012-03-28 08:38:51 +0000 (Wed, 28 Mar 2012)
Log Message:
-----------
Modified Paths:
--------------
trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/TrPostUserVariableSaver.java
trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/dialogSpec/TrPostTrajectoireTaskModel.java
trunk/soft/fudaa-prepro/ui/src/main/resources/org/fudaa/fudaa/tr/common/tr_en.fr_txt
Modified: trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/TrPostUserVariableSaver.java
===================================================================
--- trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/TrPostUserVariableSaver.java 2012-03-25 20:20:34 UTC (rev 7035)
+++ trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/TrPostUserVariableSaver.java 2012-03-28 08:38:51 UTC (rev 7036)
@@ -88,6 +88,9 @@
*/
public CtuluAnalyze restore(final TrPostSource _src, final CtuluAnalyze _analyze, final ProgressionInterface _prog, final CtuluUI _ui,
TrPostSourcesManager ctx) {
+ if(saver_==null){
+ saver_=new TrPostDataCreatedSaver[0];
+ }
CtuluAnalyze log = new CtuluAnalyze();
if (g_ != null) {
_src.getGravity().setValue(g_);
Modified: trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/dialogSpec/TrPostTrajectoireTaskModel.java
===================================================================
--- trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/dialogSpec/TrPostTrajectoireTaskModel.java 2012-03-25 20:20:34 UTC (rev 7035)
+++ trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/dialogSpec/TrPostTrajectoireTaskModel.java 2012-03-28 08:38:51 UTC (rev 7036)
@@ -404,7 +404,7 @@
conteneur.add(new JLabel("Point 2:"));
conteneur.add(x2_);
conteneur.add(y2_);
- conteneur.add(new JLabel("Nombre de trajectoire/lignes de courant:"));
+ conteneur.add(new JLabel(TrLib.getString("Nombre de trajectoire/lignes de courant")));
conteneur.add(nbPoints_);
final LineString initSelected = lineChooser_.getInitSelected();
if (initSelected != null) {
Modified: trunk/soft/fudaa-prepro/ui/src/main/resources/org/fudaa/fudaa/tr/common/tr_en.fr_txt
===================================================================
--- trunk/soft/fudaa-prepro/ui/src/main/resources/org/fudaa/fudaa/tr/common/tr_en.fr_txt 2012-03-25 20:20:34 UTC (rev 7035)
+++ trunk/soft/fudaa-prepro/ui/src/main/resources/org/fudaa/fudaa/tr/common/tr_en.fr_txt 2012-03-28 08:38:51 UTC (rev 7036)
@@ -1,5 +1,7 @@
Le fichier r\xE9sultat utilis\xE9 actuellement=The current source used
Chargement du projet=Project loading
+Pas de temps intial=Initial time step
+Lignes de courants=Stream lines
Le projet contient des variables calcul\xE9es. Voulez-vous les charger ?=The project contained computed variables. Do you want to load them ?
Chargement des variables=Variables loading
Au moins un ouvrage doit \xEAtre cr\xE9\xE9=At least one structure must be created
@@ -1093,6 +1095,7 @@
Composante selon X=Vector along X
Composante selon Y=Vector along Y
Ajouter un vecteur=Add a vector
+Vecteur=Vector
Ajouter un vecteur d\xE9fini par 2 variables d\xE9j\xE0 d\xE9finies=Add a vector by choosing 2 existing variables
Valeurs au noeud=Values for node
Valeurs sur l'\xE9l\xE9ment=Values for mesh
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <de...@us...> - 2012-04-02 21:30:12
|
Revision: 7041
http://fudaa.svn.sourceforge.net/fudaa/?rev=7041&view=rev
Author: deniger
Date: 2012-04-02 21:30:05 +0000 (Mon, 02 Apr 2012)
Log Message:
-----------
Modified Paths:
--------------
trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/TrLauncherDefault.java
trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/TrPostLayoutFille.java
trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/TrPostLayoutPanelController.java
trunk/soft/fudaa-prepro/ui/src/main/resources/org/fudaa/fudaa/tr/common/tr_en.fr_txt
Modified: trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/TrLauncherDefault.java
===================================================================
--- trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/TrLauncherDefault.java 2012-04-02 21:24:41 UTC (rev 7040)
+++ trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/TrLauncherDefault.java 2012-04-02 21:30:05 UTC (rev 7041)
@@ -77,8 +77,8 @@
infoSoft = new BuInformationsSoftware();
infoSoft.name = "prepro";
- infoSoft.version = "1.2RC1";
- infoSoft.date = "2012-03-29";
+ infoSoft.version = "1.2RC2";
+ infoSoft.date = "2012-04-02";
infoSoft.rights = TrResource.getS("Tous droits r\xE9serv\xE9s") + ". CETMEF (c)2003-2009";
infoSoft.contact = "fre...@fu...";
infoSoft.license = "GPL2";
Modified: trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/TrPostLayoutFille.java
===================================================================
--- trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/TrPostLayoutFille.java 2012-04-02 21:24:41 UTC (rev 7040)
+++ trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/TrPostLayoutFille.java 2012-04-02 21:30:05 UTC (rev 7041)
@@ -25,17 +25,6 @@
import javax.swing.JPanel;
import javax.swing.JToolBar;
-import com.memoire.bu.BuComboBox;
-import com.memoire.bu.BuCutCopyPasteInterface;
-import com.memoire.bu.BuInformationsDocument;
-import com.memoire.bu.BuInformationsSoftware;
-import com.memoire.bu.BuInternalFrame;
-import com.memoire.bu.BuMenu;
-import com.memoire.bu.BuMenuBar;
-import com.memoire.bu.BuToolBar;
-import com.memoire.bu.BuUndoRedoInterface;
-import com.memoire.fu.FuLog;
-
import org.fudaa.ctulu.CtuluCommandManager;
import org.fudaa.ctulu.CtuluExportDataInterface;
import org.fudaa.ctulu.CtuluLibImage;
@@ -67,15 +56,14 @@
import org.fudaa.ebli.visuallibrary.calque.CalqueLegendeWidgetAdapter;
import org.fudaa.ebli.visuallibrary.calque.EbliWidgetCreatorLegende;
import org.fudaa.ebli.visuallibrary.calque.EbliWidgetCreatorVueCalque;
-import org.fudaa.ebli.visuallibrary.creator.EbliWidgetCreatorArrowEditor;
import org.fudaa.ebli.visuallibrary.creator.EbliWidgetCreatorTextEditor;
import org.fudaa.ebli.visuallibrary.graphe.EbliWidgetCreatorGraphe;
import org.fudaa.fudaa.commun.impl.FudaaCommonImplementation;
import org.fudaa.fudaa.tr.TrLauncherDefault;
import org.fudaa.fudaa.tr.common.TrCourbeImporter;
+import org.fudaa.fudaa.tr.common.TrCourbeImporter.Target;
import org.fudaa.fudaa.tr.common.TrLib;
import org.fudaa.fudaa.tr.common.TrResource;
-import org.fudaa.fudaa.tr.common.TrCourbeImporter.Target;
import org.fudaa.fudaa.tr.post.actions.TrPostActionBilan;
import org.fudaa.fudaa.tr.post.actions.TrPostActionChooseAndCreateCalque;
import org.fudaa.fudaa.tr.post.dialogSpec.TrPostWizardCreateScope;
@@ -83,6 +71,17 @@
import org.fudaa.fudaa.tr.post.profile.MvProfileTreeModel;
import org.netbeans.api.visual.widget.Widget;
+import com.memoire.bu.BuComboBox;
+import com.memoire.bu.BuCutCopyPasteInterface;
+import com.memoire.bu.BuInformationsDocument;
+import com.memoire.bu.BuInformationsSoftware;
+import com.memoire.bu.BuInternalFrame;
+import com.memoire.bu.BuMenu;
+import com.memoire.bu.BuMenuBar;
+import com.memoire.bu.BuToolBar;
+import com.memoire.bu.BuUndoRedoInterface;
+import com.memoire.fu.FuLog;
+
/**
* InternalFrame qui contient la scene EbliScene.
*
@@ -453,18 +452,8 @@
setTitle(previousTitleFrame);
}
- // -- cas des fleches
- else if (node.getCreator() instanceof EbliWidgetCreatorArrowEditor) {
- FuLog.debug("arrow editor");
+
- // -- etape 1: on fout eventuellement le tree des layouts --//
- changeTree(getScene());
- // -- etape 2: rechargement de la toolbar specifique dans this --//
- changeToolbar(node.getWidget().getController());
- setTitle(previousTitleFrame);
-
- }
-
else {
// -- etape 1: on fout eventuellement le tree des layouts --//
changeTree(getScene());
Modified: trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/TrPostLayoutPanelController.java
===================================================================
--- trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/TrPostLayoutPanelController.java 2012-04-02 21:24:41 UTC (rev 7040)
+++ trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/TrPostLayoutPanelController.java 2012-04-02 21:30:05 UTC (rev 7041)
@@ -17,12 +17,6 @@
import javax.swing.JTabbedPane;
import javax.swing.SwingConstants;
-import com.memoire.bu.BuDesktop;
-import com.memoire.bu.BuMenu;
-import com.memoire.bu.BuMenuItem;
-import com.memoire.bu.BuResource;
-import com.memoire.bu.BuSeparator;
-
import org.fudaa.ctulu.CtuluCommandManager;
import org.fudaa.ctulu.CtuluLibString;
import org.fudaa.ctulu.gui.CtuluSelectorPopupButton;
@@ -55,7 +49,7 @@
import org.fudaa.ebli.visuallibrary.calque.CalqueLegendeWidgetAdapter;
import org.fudaa.ebli.visuallibrary.calque.EbliWidgetControllerCalque;
import org.fudaa.ebli.visuallibrary.calque.EbliWidgetCreatorVueCalque;
-import org.fudaa.ebli.visuallibrary.creator.EbliWidgetCreatorConnectionWidget;
+import org.fudaa.ebli.visuallibrary.creator.EbliWidgetCreatorArrow;
import org.fudaa.ebli.visuallibrary.creator.EbliWidgetCreatorShape;
import org.fudaa.ebli.visuallibrary.creator.EbliWidgetCreatorTextLabel;
import org.fudaa.ebli.visuallibrary.creator.ShapeCreatorCircle;
@@ -66,6 +60,7 @@
import org.fudaa.ebli.visuallibrary.creator.ShapeCreatorRectangle;
import org.fudaa.fudaa.commun.FudaaLib;
import org.fudaa.fudaa.sig.layer.FSigImageImportAction;
+import org.fudaa.fudaa.tr.common.TrLib;
import org.fudaa.fudaa.tr.common.TrProjectPersistence;
import org.fudaa.fudaa.tr.common.TrResource;
import org.fudaa.fudaa.tr.post.actions.TrPostActionChangeSceneForWidget;
@@ -75,6 +70,12 @@
import org.fudaa.fudaa.tr.post.dialogSpec.TrPostWizardCreateScope;
import org.netbeans.api.visual.widget.Widget;
+import com.memoire.bu.BuDesktop;
+import com.memoire.bu.BuMenu;
+import com.memoire.bu.BuMenuItem;
+import com.memoire.bu.BuResource;
+import com.memoire.bu.BuSeparator;
+
/**
* Controller des actions pour les ebliWidget. Gere les multi layout.
*
@@ -196,12 +197,12 @@
}
- public EbliNode addLigne() {
+ public EbliNode addArrow() {
// -- ajout du rectangle --//
final EbliNode nodeLigne = new EbliNodeDefault();
- nodeLigne.setTitle("Ligne");
- nodeLigne.setCreator(new EbliWidgetCreatorShape(new ShapeCreatorLine()));
- nodeLigne.getCreator().setPreferredSize(new Dimension(200, 100));
+ nodeLigne.setTitle(TrLib.getString("Fl\xE8che"));
+ nodeLigne.setCreator(new EbliWidgetCreatorArrow());
+ nodeLigne.getCreator().setPreferredSize(new Dimension(20, 20));
nodeLigne.getCreator().setPreferredLocation(new Point(350, 125));
// ajout du node au layout
addNode(nodeLigne);
@@ -212,7 +213,7 @@
public EbliNode addCercle() {
// -- ajout du rectangle --//
final EbliNode nodeCercle = new EbliNodeDefault();
- nodeCercle.setTitle("Cercle");
+ nodeCercle.setTitle(TrLib.getString("Cercle"));
nodeCercle.setCreator(new EbliWidgetCreatorShape(new ShapeCreatorCircle()));
nodeCercle.getCreator().setPreferredSize(new Dimension(200, 100));
nodeCercle.getCreator().setPreferredLocation(new Point(350, 125));
@@ -225,7 +226,7 @@
public EbliNode addEllipse() {
// -- ajout du rectangle --//
final EbliNode nodeEllipse = new EbliNodeDefault();
- nodeEllipse.setTitle("Ellipse");
+ nodeEllipse.setTitle(TrLib.getString("Ellipse"));
nodeEllipse.setCreator(new EbliWidgetCreatorShape(new ShapeCreatorEllipse()));
nodeEllipse.getCreator().setPreferredSize(new Dimension(200, 100));
nodeEllipse.getCreator().setPreferredLocation(new Point(350, 125));
@@ -243,7 +244,7 @@
public EbliNode addFleche() {
// -- ajout du rectangle --//
final EbliNode nodeFleche = new EbliNodeDefault();
- nodeFleche.setTitle("Fleche");
+ nodeFleche.setTitle(TrLib.getString("Fl\xE8che"));
nodeFleche.setCreator(new EbliWidgetCreatorShape(new ShapeCreatorFleche()));
nodeFleche.getCreator().setPreferredSize(new Dimension(100, 50));
nodeFleche.getCreator().setPreferredLocation(new Point(350, 125));
@@ -257,7 +258,7 @@
public EbliNode addDblFleche() {
// -- ajout du rectangle --//
final EbliNode nodeFleche = new EbliNodeDefault();
- nodeFleche.setTitle("Double fl\xE8che");
+ nodeFleche.setTitle(TrLib.getString("Double fl\xE8che"));
nodeFleche.setCreator(new EbliWidgetCreatorShape(new ShapeCreatorDblFleche()));
nodeFleche.getCreator().setPreferredSize(new Dimension(100, 50));
nodeFleche.getCreator().setPreferredLocation(new Point(350, 125));
@@ -323,15 +324,15 @@
_l.add(new EbliWidgetActiontextEditor(getSceneCourante()));
// -- ligne --//
- _l.add(new EbliActionSimple(EbliResource.EBLI.getString("Ligne"), EbliResource.EBLI.getToolIcon("trait"), "WIDGETLINE") {
+ _l.add(new EbliActionSimple(TrLib.getString("Fl\xE8che"), WidgetResource.WIDGET.getToolIcon("arrow_16"), "WIDGETLINE") {
@Override
public void actionPerformed(final ActionEvent _evt) {
- addLigne();
+ addArrow();
}
});
// -- palette fleche --//
- _l.add(new EbliActionSimple(EbliResource.EBLI.getString("Fl\xE8che pleine"), WidgetResource.WIDGET.getToolIcon("arrow-left_16"), "WIDGETFLECHE") {
+ _l.add(new EbliActionSimple(TrLib.getString("Fl\xE8che pleine"), WidgetResource.WIDGET.getToolIcon("arrow-left_16"), "WIDGETFLECHE") {
@Override
public void actionPerformed(final ActionEvent _evt) {
addFleche();
@@ -340,28 +341,28 @@
// -- palette double fleche --//
// crystal_bu_scrollpane_corner.png
- _l.add(new EbliActionSimple(EbliResource.EBLI.getString("Double fl\xE8che"), WidgetResource.WIDGET.getToolIcon("double-arrow_16"), "WIDGETDBLFLECHE") {
+ _l.add(new EbliActionSimple(TrLib.getString("Double fl\xE8che"), WidgetResource.WIDGET.getToolIcon("double-arrow_16"), "WIDGETDBLFLECHE") {
@Override
public void actionPerformed(final ActionEvent _evt) {
addDblFleche();
}
});
// -- palette Ellipse --//
- _l.add(new EbliActionSimple(EbliResource.EBLI.getString("Ellipse"), EbliResource.EBLI.getToolIcon("ellip"), "WIDGETELLIPSE") {
+ _l.add(new EbliActionSimple(TrLib.getString("Ellipse"), EbliResource.EBLI.getToolIcon("ellip"), "WIDGETELLIPSE") {
@Override
public void actionPerformed(final ActionEvent _evt) {
addEllipse();
}
});
- _l.add(new EbliActionSimple(EbliResource.EBLI.getString("Cercle"), EbliResource.EBLI.getToolIcon("cerc"), "WIDGETCERCLE") {
+ _l.add(new EbliActionSimple(TrLib.getString("Cercle"), EbliResource.EBLI.getToolIcon("cerc"), "WIDGETCERCLE") {
@Override
public void actionPerformed(final ActionEvent _evt) {
addCercle();
}
});
- _l.add(new EbliActionSimple(EbliResource.EBLI.getString("Rectangle"), EbliResource.EBLI.getToolIcon("rect"), "WIDGETRECT") {
+ _l.add(new EbliActionSimple(TrLib.getString("Rectangle"), EbliResource.EBLI.getToolIcon("rect"), "WIDGETRECT") {
@Override
public void actionPerformed(final ActionEvent _evt) {
Modified: trunk/soft/fudaa-prepro/ui/src/main/resources/org/fudaa/fudaa/tr/common/tr_en.fr_txt
===================================================================
--- trunk/soft/fudaa-prepro/ui/src/main/resources/org/fudaa/fudaa/tr/common/tr_en.fr_txt 2012-04-02 21:24:41 UTC (rev 7040)
+++ trunk/soft/fudaa-prepro/ui/src/main/resources/org/fudaa/fudaa/tr/common/tr_en.fr_txt 2012-04-02 21:30:05 UTC (rev 7041)
@@ -1,5 +1,10 @@
Le fichier r\xE9sultat utilis\xE9 actuellement=The current source used
Ouvrir et recalculer=Open and recompute
+Fl\xE8che=Arrow
+Cercle=Circle
+Ellipse=Ellipse
+Double fl\xE8che=Arrow double
+Fl\xE8che pleine=Arrow
Ouvrir et recalculer (Post)=Open and recompute (Post)
Toutes les variables, trajectoires,... vont \xEAtre recalcul\xE9es au lancement=All variables, flow paths,... will be recomputed at startup
Chargement du projet=Project loading
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <de...@us...> - 2012-04-17 14:22:31
|
Revision: 7078
http://fudaa.svn.sourceforge.net/fudaa/?rev=7078&view=rev
Author: deniger
Date: 2012-04-17 14:22:21 +0000 (Tue, 17 Apr 2012)
Log Message:
-----------
Modified Paths:
--------------
trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/dialogSpec/TrPostWizardCourbeTemporelle.java
trunk/soft/fudaa-prepro/ui/src/main/resources/org/fudaa/fudaa/tr/common/tr_en.fr_txt
Modified: trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/dialogSpec/TrPostWizardCourbeTemporelle.java
===================================================================
--- trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/dialogSpec/TrPostWizardCourbeTemporelle.java 2012-04-17 14:04:10 UTC (rev 7077)
+++ trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/dialogSpec/TrPostWizardCourbeTemporelle.java 2012-04-17 14:22:21 UTC (rev 7078)
@@ -110,10 +110,8 @@
@Override
public Class<?> getColumnClass(final int _columnIndex) {
- if (_columnIndex == 3)
- return Boolean.class;
- if (_columnIndex == 2 || _columnIndex == 1)
- return JButton.class;
+ if (_columnIndex == 3) return Boolean.class;
+ if (_columnIndex == 2 || _columnIndex == 1) return JButton.class;
return String.class;
}
@@ -142,12 +140,11 @@
// -- connaitre la bonen liste entre les points reels et interpol\xE9s
if (_columnIndex == 0) {
+ if (isInterpolated(_rowIndex)) { return TrLib.getString("Interpol\xE9");// + " " + getPointInt(_rowIndex).idxElt_
+ }
if (isElement) {
return TrResource.TR.getString("El\xE9ment {0}", Integer.toString(getPointReel(_rowIndex) + 1));
- }
- if (!isInterpolated(_rowIndex))
- return "Point " + (getPointReel(_rowIndex) + 1);
- else return TrLib.getString("Interpol\xE9");// + " " + getPointInt(_rowIndex).idxElt_
+ } else return TrResource.TR.getString("Point {0}", Integer.toString(getPointReel(_rowIndex) + 1));
} else if (_columnIndex == 1) {
if (!isInterpolated(_rowIndex)) {
@@ -157,9 +154,7 @@
if (!isInterpolated(_rowIndex)) {
return format(getY(getPointReel(_rowIndex)));
} else return format(getPointInt(_rowIndex).getY());
- } else if (_columnIndex == 3) {
- return isInterpolated(_rowIndex);
- }
+ } else if (_columnIndex == 3) { return isInterpolated(_rowIndex); }
return null;
@@ -189,12 +184,11 @@
}
void updatelabel() {
- if (label_ != null)
- if (isElement) {
- label_.setText(TrResource.TR.getString("Nb El\xE9ments {0}", Integer.toString(listPointOrMeshes.size())));
- } else {
- label_.setText(TrResource.TR.getString("Nb points {0}", Integer.toString(listPointOrMeshes.size())));
- }
+ if (label_ != null) if (isElement) {
+ label_.setText(TrResource.TR.getString("Nb El\xE9ments {0}", Integer.toString(listPointOrMeshes.size())));
+ } else {
+ label_.setText(TrResource.TR.getString("Nb points {0}", Integer.toString(listPointOrMeshes.size())));
+ }
}
}
@@ -208,7 +202,8 @@
// private int[] ptIdx_;
BuCheckBox checkboxNewGraphe_ = new BuCheckBox(TrResource.TR.getString("Cr\xE9er un nouveau graphe"));
- BuCheckBox traceOrigineDansVue2d_ = new BuCheckBox(TrResource.TR.getString("Cr\xE9er calque avec points d'origine de la courbe"));
+ BuCheckBox traceOrigineDansVue2d_ = new BuCheckBox(
+ TrResource.TR.getString("Cr\xE9er calque avec points d'origine de la courbe"));
private final MvExportChooseVarAndTime chooserVarTime_;
@@ -252,26 +247,20 @@
assert _pt != null;
}
listPointOrMeshes = new ArrayList();
- if (_ptIdx != null)
- for (int i = 0; i < _ptIdx.length; i++)
- listPointOrMeshes.add(_ptIdx[i]);
+ if (_ptIdx != null) for (int i = 0; i < _ptIdx.length; i++)
+ listPointOrMeshes.add(_ptIdx[i]);
- if (_pt != null)
- listPointOrMeshes.add(_pt);
+ if (_pt != null) listPointOrMeshes.add(_pt);
}
public double getX(int idx) {
- if (isElement) {
- return source.getGrid().getCentreXElement(idx);
- }
+ if (isElement) { return source.getGrid().getCentreXElement(idx); }
return source.getGrid().getPtX(idx);
}
public double getY(int idx) {
- if (isElement) {
- return source.getGrid().getCentreXElement(idx);
- }
+ if (isElement) { return source.getGrid().getCentreXElement(idx); }
return source.getGrid().getPtY(idx);
}
@@ -296,8 +285,10 @@
jlisteGraphesSelections.setBorder(BorderFactory.createTitledBorder(TrResource.TR.getString("Graphes choisis")));
jlisteGraphesSelections.setCellRenderer(new GrapheCellRenderer());
final JPanel panelControle = new JPanel(new FlowLayout(FlowLayout.CENTER));
- final JButton select = new JButton(TrResource.TR.getString("Ajouter"), EbliResource.EBLI.getIcon("crystal22_avancervite"));
- final JButton unselect = new JButton(TrResource.TR.getString("Enlever"), EbliResource.EBLI.getIcon("crystal22_reculervite"));
+ final JButton select = new JButton(TrResource.TR.getString("Ajouter"),
+ EbliResource.EBLI.getIcon("crystal22_avancervite"));
+ final JButton unselect = new JButton(TrResource.TR.getString("Enlever"),
+ EbliResource.EBLI.getIcon("crystal22_reculervite"));
select.addActionListener(new ActionListener() {
@Override
public void actionPerformed(final ActionEvent _e) {
@@ -392,8 +383,8 @@
@Override
public boolean editCellAt(int _row, int _column, EventObject _e) {
- if (_e instanceof MouseEvent && ((MouseEvent) _e).getClickCount() == 2)
- saisirPoints("" + getValueAt(_row, 1), "" + getValueAt(_row, 2), false, _row, model);
+ if (_e instanceof MouseEvent && ((MouseEvent) _e).getClickCount() == 2) saisirPoints("" + getValueAt(_row, 1),
+ "" + getValueAt(_row, 2), false, _row, model);
return false;
}
@@ -401,9 +392,12 @@
content.add(new BuScrollPane(tableau), BorderLayout.CENTER);
final JPanel control = new JPanel(new FlowLayout(FlowLayout.CENTER));
if (!isElement) {
- content.add(
- new JLabel(TrResource.getS("Saisir des points en cliquant sur ajouter. Modifier des points en cliquant sur les valeurs puis modifier.")),
- BorderLayout.NORTH);
+ content
+ .add(
+ new JLabel(
+ TrResource
+ .getS("Saisir des points en cliquant sur ajouter. Modifier des points en cliquant sur les valeurs puis modifier.")),
+ BorderLayout.NORTH);
// -- ajout du jtext pour ajout uniquement d'un point interpol\xE9 --//
@@ -426,8 +420,8 @@
@Override
public void actionPerformed(final ActionEvent _e) {
final int pointToModify = tableau.getSelectedRow();
- if (pointToModify != -1)
- saisirPoints("" + model.getValueAt(pointToModify, 1), "" + model.getValueAt(pointToModify, 2), false, pointToModify, model);
+ if (pointToModify != -1) saisirPoints("" + model.getValueAt(pointToModify, 1),
+ "" + model.getValueAt(pointToModify, 2), false, pointToModify, model);
}
});
@@ -435,7 +429,7 @@
control.add(modifier);
}
// control.add(new JLabel(TrResource.getS("Supprimer la s\xE9lection:")));
- final JButton supprimer = new JButton("Supprimer", EbliResource.EBLI.getIcon("crystal_detruire"));
+ final JButton supprimer = new JButton(TrLib.getString("Supprimer"), EbliResource.EBLI.getIcon("crystal_detruire"));
supprimer.addActionListener(new ActionListener() {
@Override
public void actionPerformed(final ActionEvent _e) {
@@ -446,7 +440,7 @@
listPointOrMeshes.remove(listePointToDelete[i] - (nbLignesSupprimees++));
}
model.fireTableDataChanged();
- indicateurPoints_.setText("Nb points: " + listPointOrMeshes.size());
+ indicateurPoints_.setText(TrResource.getS("Nombre de points: {0}", Integer.toString(listPointOrMeshes.size())));
// if (listePoints_.size() == 0) pointsSaisis = false;
}
}
@@ -465,10 +459,10 @@
// -- ajout du panel de selection des zcqlauePoints de la vue 2d --//
- builderPointsCalque_ = new TrEvolutionBuilderFromTree.PostEvolutionTemporelles(this.calque_, model, listPointOrMeshes);
+ builderPointsCalque_ = new TrEvolutionBuilderFromTree.PostEvolutionTemporelles(this.calque_, model,
+ listPointOrMeshes);
JTree buildTree = builderPointsCalque_.buildTree();
- if (buildTree.getModel().getChildCount(buildTree.getModel().getRoot()) == 0)
- return content;
+ if (buildTree.getModel().getChildCount(buildTree.getModel().getRoot()) == 0) return content;
splitpanel.setTopComponent(content);
@@ -522,10 +516,9 @@
if (modelPointsReels != null) {
modelTotal = modelPointsReels;
if (modelPointsInt != null)
- // --merge avec le precedent --//
- modelTotal.mergeWithAnotherTreeModel(modelPointsInt);
- } else if (modelPointsInt != null)
- modelTotal = modelPointsInt;
+ // --merge avec le precedent --//
+ modelTotal.mergeWithAnotherTreeModel(modelPointsInt);
+ } else if (modelPointsInt != null) modelTotal = modelPointsInt;
modelTotal.getAxeX().setUnite("s");
@@ -553,8 +546,7 @@
pn.setLayout(new BuGridLayout(2));
pn.addLabel(TrLib.getString("Indiquer le nom du calque \xE0 cr\xE9er"));
JTextField tf = nomCalque_;
- if (tf.getText() == null || tf.getText().length() == 0)
- tf.setText("Origine \xE9volution temporelle");
+ if (tf.getText() == null || tf.getText().length() == 0) tf.setText("Origine \xE9volution temporelle");
String titreCalque = tf.getText();
FSigLayerGroup group = TrPostWizardProfilSpatial.getGroup(idTemporel, calque_);
@@ -623,8 +615,7 @@
}
// -- creation d un nouveau graphe si coch\xE9 --//
- if (checkboxNewGraphe_.isSelected())
- createNewGraphe(modelTotal, prog);
+ if (checkboxNewGraphe_.isSelected()) createNewGraphe(modelTotal, prog);
// -- ajout des courbes dans les graphes --//
for (int i = 0; i < listeGraphesChoisis_.size(); i++) {
@@ -663,7 +654,7 @@
final int idxElt = TrIsoLayerDefault.sondeSelection(point, calque_.getIsoLayer().getIsoModel());
if (idxElt > -1)
- return new TrPostInterpolatePoint(idxElt, x, y, new GISPrecision());
+ return new TrPostInterpolatePoint(idxElt, x, y, new GISPrecision());
return null;
}
@@ -675,8 +666,7 @@
* @return
*/
int findPointReel(final double x, final double y) {
- if (calque_.isRubar())
- return -1;
+ if (calque_.isRubar()) return -1;
CtuluListSelection nearestNode = EfIndexHelper.getNearestNode(getSource().getGrid(), x, y, 1E-2, null);
return (nearestNode == null || nearestNode.isEmpty()) ? -1 : nearestNode.getMinIndex();
@@ -692,8 +682,7 @@
final ArrayList<TrPostInterpolatePoint> res = new ArrayList<TrPostInterpolatePoint>();
for (int i = 0; i < listPointOrMeshes.size(); i++)
- if (isInterpolated(i))
- res.add(getPointInt(i));
+ if (isInterpolated(i)) res.add(getPointInt(i));
final TrPostInterpolatePoint[] listeInt = new TrPostInterpolatePoint[res.size()];
for (int i = 0; i < res.size(); i++)
@@ -711,8 +700,7 @@
final ArrayList<Integer> res = new ArrayList<Integer>();
for (int i = 0; i < listPointOrMeshes.size(); i++)
- if (!isInterpolated(i))
- res.add(getPointReel(i));
+ if (!isInterpolated(i)) res.add(getPointReel(i));
final int[] listeReels = new int[res.size()];
for (int i = 0; i < res.size(); i++)
@@ -762,20 +750,17 @@
switch (current_) {
case 0: {
- if (panelSelectionPoints == null)
- panelSelectionPoints = constructSelectionPoint();
+ if (panelSelectionPoints == null) panelSelectionPoints = constructSelectionPoint();
return panelSelectionPoints;
}
case 1: {
- if (listPointOrMeshes.size() == 0) {
- return new JLabel(TrResource.getS("Erreur, aucun points s\xE9lectionn\xE9s, veuillez appuyer sur pr\xE9c\xE9dent et ajouter des points."));
- }
+ if (listPointOrMeshes.size() == 0) { return new JLabel(
+ TrResource.getS("Erreur, aucun points s\xE9lectionn\xE9s, veuillez appuyer sur pr\xE9c\xE9dent et ajouter des points.")); }
return chooserVarTime_;
}
case 2: {
- if (panelSelectiongraphes == null)
- panelSelectiongraphes = constructPanelSelectionGraphe();
+ if (panelSelectiongraphes == null) panelSelectiongraphes = constructPanelSelectionGraphe();
return panelSelectiongraphes;
}
}
@@ -799,11 +784,9 @@
public int getStepDisabledButtons() {
int r = super.getStepDisabledButtons();
if (current_ == 1) {
- if (!pointsSaisis())
- r |= BuButtonPanel.SUIVANT;
+ if (!pointsSaisis()) r |= BuButtonPanel.SUIVANT;
} else if (current_ == 2) {
- if ((listeGraphesChoisis_ == null || listeGraphesChoisis_.size() == 0) && !checkboxNewGraphe_.isSelected())
- r |= BuButtonPanel.TERMINER;
+ if ((listeGraphesChoisis_ == null || listeGraphesChoisis_.size() == 0) && !checkboxNewGraphe_.isSelected()) r |= BuButtonPanel.TERMINER;
// -- pour empecher d avancer, voir ci dessous
// r |= BuButtonPanel.SUIVANT;
}
@@ -849,7 +832,7 @@
@Override
public String getTaskTitle() {
- return "Evolutions temporelles";
+ return TrLib.getString("Evolutions temporelles");
}
/**
@@ -908,7 +891,8 @@
*
* @param create
*/
- public void saisirPoints(final String val1, final String val2, final boolean create, final int indexToModify, final ModelListePoints model) {
+ public void saisirPoints(final String val1, final String val2, final boolean create, final int indexToModify,
+ final ModelListePoints model) {
final BuTextField textX = new BuTextField(10);
textX.setCharValidator(BuCharValidator.FLOAT);
textX.setStringValidator(BuStringValidator.FLOAT);
@@ -919,10 +903,8 @@
textY.setStringValidator(BuStringValidator.FLOAT);
textY.setValueValidator(BuValueValidator.FLOAT);
// -- init --//
- if (val1 != null)
- textX.setText(val1);
- if (val2 != null)
- textY.setText(val2);
+ if (val1 != null) textX.setText(val1);
+ if (val2 != null) textY.setText(val2);
final JDialog dialog = CtuluLibSwing.createDialogOnActiveWindow(TrResource.getS("Ajouter des points"));
final JButton ajouter = new JButton("Valider", EbliResource.EBLI.getIcon("crystal_ajouter"));
@@ -943,7 +925,8 @@
final TrPostInterpolatePoint interpol = findPointInterpol(newX, newY);
if (interpol == null) {
- calque_.getCtuluUI().error("Erreur", TrResource.getS("Ce point n'existe pas et ne peut \xEAtre interpol\xE9"), true);
+ calque_.getCtuluUI().error("Erreur", TrResource.getS("Ce point n'existe pas et ne peut \xEAtre interpol\xE9"),
+ true);
return;
}
@@ -985,8 +968,7 @@
control.add(ajouter);
String title;
- if (create)
- title = TrResource.getS("Creation de point");
+ if (create) title = TrResource.getS("Creation de point");
else title = TrResource.getS("Modification de point");
final JPanel content = new JPanel(new BorderLayout());
Modified: trunk/soft/fudaa-prepro/ui/src/main/resources/org/fudaa/fudaa/tr/common/tr_en.fr_txt
===================================================================
--- trunk/soft/fudaa-prepro/ui/src/main/resources/org/fudaa/fudaa/tr/common/tr_en.fr_txt 2012-04-17 14:04:10 UTC (rev 7077)
+++ trunk/soft/fudaa-prepro/ui/src/main/resources/org/fudaa/fudaa/tr/common/tr_en.fr_txt 2012-04-17 14:22:21 UTC (rev 7078)
@@ -738,11 +738,16 @@
Graphes choisis=selected graphs
Cr\xE9er calque avec points d'origine de la courbe=Create a layer containing points used to create curves
S\xE9lectionner au moins une extremit\xE9 de siphon=Select at least a culvert's end
+Supprimer=Remove
+Nombre de points\: {0}=Number of points\: {0}
+Evolutions temporelles=Time Evolutions
+Points s\xE9lectionn\xE9s=Selected points
Choisir les points=Choose points
S\xE9lectionner au moins un siphon=Select at least one culvert
S\xE9lectionner deux sources=Select two sources
Erreur dans la s\xE9lection=Selection error
S\xE9lection vide=Empty selection
+Point {0}=Point {0}
Un seul bord liquide doit \xEAtre s\xE9lectionn\xE9=Only one liquid boundary must be selected
Ce bord doit contenir des variables \xE9ditables spatiallement=This boundary must contain contain editable variables
Activer le mode "Noeuds fronti\xE8res"=Enable the mode "Frontier nodes"
@@ -759,6 +764,7 @@
Affiche les \xE9volutions temporelles sur la s\xE9lection ou sur l'interpolation=Display time curves on the selection or on the current interpolation
S\xE9lectionner au moins un objet ou activer la sonde=Select at leat one object or active the interpolation
El\xE9ment {0}=Mesh {0}
+El\xE9ment=Mesh
Nb El\xE9ments {0}=Number of meshes {0}
Nb points {0}=Number of nodes {0}
Enlever les seuils s\xE9lectionn\xE9s=Remove the selected weirs
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <de...@us...> - 2012-06-04 22:42:56
|
Revision: 7270
http://fudaa.svn.sourceforge.net/fudaa/?rev=7270&view=rev
Author: deniger
Date: 2012-06-04 22:42:49 +0000 (Mon, 04 Jun 2012)
Log Message:
-----------
Modified Paths:
--------------
trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/TrPostRubarFmtModel.java
trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/TrPostRubarLoader.java
trunk/soft/fudaa-prepro/ui/src/main/resources/org/fudaa/fudaa/tr/common/tr_en.fr_txt
Modified: trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/TrPostRubarFmtModel.java
===================================================================
--- trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/TrPostRubarFmtModel.java 2012-06-04 22:42:19 UTC (rev 7269)
+++ trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/TrPostRubarFmtModel.java 2012-06-04 22:42:49 UTC (rev 7270)
@@ -8,8 +8,6 @@
import com.memoire.bu.BuResource;
import org.fudaa.ctulu.CtuluLib;
-import org.fudaa.ctulu.CtuluLibArray;
-import org.fudaa.ctulu.CtuluLibFile;
import org.fudaa.ctulu.fileformat.FileFormat;
/**
@@ -39,7 +37,9 @@
@Override
public Class getColumnClass(final int _columnIndex) {
- if (_columnIndex == 0) { return Boolean.class; }
+ if (_columnIndex == 0) {
+ return Boolean.class;
+ }
return String.class;
}
@@ -50,7 +50,9 @@
@Override
public String getColumnName(final int _column) {
- if (_column == 0) { return CtuluLib.getS("Charg\xE9"); }
+ if (_column == 0) {
+ return CtuluLib.getS("Charg\xE9");
+ }
return BuResource.BU.getString("Fichier");
}
@@ -61,7 +63,9 @@
@Override
public Object getValueAt(final int _rowIndex, final int _columnIndex) {
- if (_columnIndex == 0) { return Boolean.valueOf(fileToLoad_[_rowIndex]); }
+ if (_columnIndex == 0) {
+ return Boolean.valueOf(fileToLoad_[_rowIndex]);
+ }
final FileFormat fileFormat = fmtToLoad_[_rowIndex];
final String[] ext = fileFormat.getExtensions();
final File file = (File) fmtLoadable_.get(fileFormat);
@@ -94,4 +98,19 @@
fileToLoad_[_rowIndex] = ((Boolean) _value).booleanValue();
}
}
+
+ void unselectAll() {
+ for (int i = fileToLoad_.length - 1; i >= 0; i--) {
+ fileToLoad_[i] = false;
+ }
+ fireTableRowsUpdated(0, getRowCount() - 1);
+ }
+
+ void selectAll() {
+ for (int i = fileToLoad_.length - 1; i >= 0; i--) {
+ fileToLoad_[i] = true;
+ }
+ fireTableRowsUpdated(0, getRowCount() - 1);
+
+ }
}
\ No newline at end of file
Modified: trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/TrPostRubarLoader.java
===================================================================
--- trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/TrPostRubarLoader.java 2012-06-04 22:42:19 UTC (rev 7269)
+++ trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/TrPostRubarLoader.java 2012-06-04 22:42:49 UTC (rev 7270)
@@ -98,6 +98,12 @@
import com.memoire.bu.BuScrollPane;
import com.memoire.fu.Fu;
import com.memoire.fu.FuLog;
+import java.awt.BorderLayout;
+import java.awt.FlowLayout;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import javax.swing.JButton;
+import javax.swing.JPanel;
/**
* @author Fred Deniger
@@ -920,10 +926,32 @@
lb.setHorizontalTextPosition(SwingConstants.CENTER);
pn.add(lb, BuBorderLayout.NORTH);
final JTable tb = new JTable();
- tb.setModel(new TrPostRubarFmtModel(fmtToLoad_, fileToLoad_, fmtLoadable_));
+ final TrPostRubarFmtModel trPostRubarFmtModel = new TrPostRubarFmtModel(fmtToLoad_, fileToLoad_, fmtLoadable_);
+ tb.setModel(trPostRubarFmtModel);
final BuScrollPane sc = new BuScrollPane(tb);
sc.setColumnHeaderView(null);
pn.add(sc, BuBorderLayout.CENTER);
+ JPanel pnButtons = new JPanel(new FlowLayout(FlowLayout.CENTER));
+ JButton btSelectAll = new JButton(TrLib.getString("Tout s\xE9lectionner"));
+ JButton btUnSelectAll = new JButton(TrLib.getString("Tout d\xE9s\xE9lectionner"));
+ pnButtons.add(btSelectAll);
+ pnButtons.add(btUnSelectAll);
+ btSelectAll.addActionListener(new ActionListener() {
+
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ trPostRubarFmtModel.selectAll();
+ }
+ });
+ btUnSelectAll.addActionListener(new ActionListener() {
+
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ trPostRubarFmtModel.unselectAll();
+ }
+ });
+ pn.add(pnButtons, BorderLayout.SOUTH);
+
if (CtuluDialogPanel.isOkResponse(pn.afficheModale(_f.getParentComponent()))) {
if (_inter == null) {
final CtuluTaskDelegate task = _f.createTask(TrResource.getS("Charger"));
@@ -985,12 +1013,10 @@
fmtToLoad_ = new FileFormat[fileLoadable.size()];
fileToLoad_ = new boolean[fileLoadable.size()];
+
fileLoadable.toArray(fmtToLoad_);
- if (selectedFile != null) {
- final int idx = CtuluLibArray.findObject(fmtToLoad_, selectedFile);
- if (idx >= 0) {
- fileToLoad_[idx] = true;
- }
+ for (int i = 0; i < fileToLoad_.length; i++) {
+ fileToLoad_[i] = true;
}
}
Modified: trunk/soft/fudaa-prepro/ui/src/main/resources/org/fudaa/fudaa/tr/common/tr_en.fr_txt
===================================================================
--- trunk/soft/fudaa-prepro/ui/src/main/resources/org/fudaa/fudaa/tr/common/tr_en.fr_txt 2012-06-04 22:42:19 UTC (rev 7269)
+++ trunk/soft/fudaa-prepro/ui/src/main/resources/org/fudaa/fudaa/tr/common/tr_en.fr_txt 2012-06-04 22:42:49 UTC (rev 7270)
@@ -1207,4 +1207,6 @@
Fichier r\xE9sultat=Result file
Chemin complet=Absolute path
Variable\: {0}\n Point interpol\xE9\: {1}=Variable\: {0}\n Interpolated point \: {1}
-Pas de valeurs \xE0 \xE9diter pour un ouvrage unique=No data to edit when only one structure is defined
\ No newline at end of file
+Pas de valeurs \xE0 \xE9diter pour un ouvrage unique=No data to edit when only one structure is defined
+Tout s\xE9lectionner=Select All
+Tout d\xE9s\xE9lectionner=Unselect All
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <de...@us...> - 2012-10-24 15:52:00
|
Revision: 7797
http://fudaa.svn.sourceforge.net/fudaa/?rev=7797&view=rev
Author: deniger
Date: 2012-10-24 15:51:50 +0000 (Wed, 24 Oct 2012)
Log Message:
-----------
Modified Paths:
--------------
trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/telemac/TrTelemacExecPreferencesPanel.java
trunk/soft/fudaa-prepro/ui/src/main/resources/org/fudaa/fudaa/tr/common/tr_en.fr_txt
Modified: trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/telemac/TrTelemacExecPreferencesPanel.java
===================================================================
--- trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/telemac/TrTelemacExecPreferencesPanel.java 2012-10-24 15:51:08 UTC (rev 7796)
+++ trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/telemac/TrTelemacExecPreferencesPanel.java 2012-10-24 15:51:50 UTC (rev 7797)
@@ -77,8 +77,7 @@
add(pn);
addLabel(FudaaLib.getS("Aide:"));
addLabel("<html><p><b>"
- + TrResource.getS("Le r\xE9pertoire s\xE9lectionn\xE9 doit contenir les ex\xE9cutables telemac."
- + "<br>Utiliser le bouton '...' pour choisir le dossier (C:\\telemac\\V?P?\\bin).") + "</b></p></html>");
+ + TrResource.getS("Le r\xE9pertoire s\xE9lectionn\xE9 doit contenir les ex\xE9cutables telemac.<br>Utiliser le bouton '...' pour choisir le dossier") + "</b></p></html>");
if (_it != null) {
initVersion_ = _it.getVersion();
ftVersionName_.setText(_it.getVersion());
@@ -121,7 +120,7 @@
if (!f.exists()) {
setErrorText(TrResource.getS("Le dossier n'existe pas"));
r = false;
- } else if (!new File(f, "telemac2d.bat").exists()) {
+ } else if ((!new File(f, "telemac2d.bat").exists())&&(!new File(f, "telemac2d.py").exists())) {
setErrorText(TrResource.getS("Ce n'est pas le dossier des ex\xE9cutable telemac"));
r = false;
}
Modified: trunk/soft/fudaa-prepro/ui/src/main/resources/org/fudaa/fudaa/tr/common/tr_en.fr_txt
===================================================================
--- trunk/soft/fudaa-prepro/ui/src/main/resources/org/fudaa/fudaa/tr/common/tr_en.fr_txt 2012-10-24 15:51:08 UTC (rev 7796)
+++ trunk/soft/fudaa-prepro/ui/src/main/resources/org/fudaa/fudaa/tr/common/tr_en.fr_txt 2012-10-24 15:51:50 UTC (rev 7797)
@@ -504,7 +504,7 @@
Lancer le post-processeur=Launch the postprocessor
Editeur texte=Text editor
\xE9diteur texte=text editor
-Le r\xE9pertoire s\xE9lectionn\xE9 doit contenir les ex\xE9cutables telemac.<br>Utiliser le bouton '...' pour choisir le dossier (C\:\\telemac\\V?P?\\bin)=The selected directory has to contain the executable files of Telemac.<br>Make use of the '...' button to specify the folder (C:\telemac\V?P?\bin)
+Le r\xE9pertoire s\xE9lectionn\xE9 doit contenir les ex\xE9cutables telemac.<br>Utiliser le bouton '...' pour choisir le dossier=The selected directory has to contain the executable files of Telemac.<br>Make use of the '...' button to specify the folder
Ajouter une nouvelle loi de tarage=Add a new stage discharge relation
Ouvrir un fichier cas=Open steering file
Syst\xE8me de mod\xE9lisation=Modelling system
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <de...@us...> - 2012-11-05 16:23:06
|
Revision: 7861
http://fudaa.svn.sourceforge.net/fudaa/?rev=7861&view=rev
Author: deniger
Date: 2012-11-05 16:23:00 +0000 (Mon, 05 Nov 2012)
Log Message:
-----------
Modified Paths:
--------------
trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/data/TrVisuPanelEditor.java
trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/data/TrPostDataVecteur.java
trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/dialogSpec/TrPostDialogBilan.java
trunk/soft/fudaa-prepro/ui/src/main/resources/org/fudaa/fudaa/tr/common/tr_en.fr_txt
Modified: trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/data/TrVisuPanelEditor.java
===================================================================
--- trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/data/TrVisuPanelEditor.java 2012-11-05 16:21:38 UTC (rev 7860)
+++ trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/data/TrVisuPanelEditor.java 2012-11-05 16:23:00 UTC (rev 7861)
@@ -11,8 +11,6 @@
*/
package org.fudaa.fudaa.tr.data;
-import java.awt.BorderLayout;
-import java.awt.GridLayout;
import java.awt.event.ActionEvent;
import java.util.Collection;
import java.util.List;
@@ -21,11 +19,8 @@
import javax.swing.Action;
import javax.swing.Icon;
-import javax.swing.JButton;
import javax.swing.JFrame;
-import javax.swing.JLabel;
import javax.swing.JOptionPane;
-import javax.swing.JPanel;
import javax.swing.event.InternalFrameAdapter;
import javax.swing.event.InternalFrameEvent;
@@ -66,16 +61,13 @@
import org.fudaa.fudaa.commun.impl.FudaaCommonImplementation;
import org.fudaa.fudaa.meshviewer.MvLayerGrid;
import org.fudaa.fudaa.meshviewer.MvResource;
-import org.fudaa.fudaa.meshviewer.layer.MvNodeLayer;
import org.fudaa.fudaa.sig.FSigLib;
import org.fudaa.fudaa.sig.layer.FSigEditor;
import org.fudaa.fudaa.sig.wizard.FSigWizardVariableModifier;
import org.fudaa.fudaa.tr.TrLauncherDefault;
import org.fudaa.fudaa.tr.common.Tr3DFactory;
-import org.fudaa.fudaa.tr.common.TrLauncher;
import org.fudaa.fudaa.tr.common.TrProjectDispatcherListener;
import org.fudaa.fudaa.tr.common.TrResource;
-import org.fudaa.fudaa.tr.data.TrSaisiePoint.VisuFrameListener;
import org.fudaa.fudaa.tr.export.TrExportFactory;
import org.fudaa.fudaa.tr.post.TrPostSource;
import org.fudaa.fudaa.tr.post.profile.MvProfileAction;
Modified: trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/data/TrPostDataVecteur.java
===================================================================
--- trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/data/TrPostDataVecteur.java 2012-11-05 16:21:38 UTC (rev 7860)
+++ trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/data/TrPostDataVecteur.java 2012-11-05 16:23:00 UTC (rev 7861)
@@ -51,7 +51,7 @@
}
public void interpolateValues(final GrSegment _target, final EfGridInterface _grid, final int _idxElt,
- final double _x, final double _y) {
+ final double _x, final double _y) {
_target.o_.x_ = _x;
_target.o_.y_ = _y;
double vx = 0;
@@ -82,9 +82,16 @@
public final double getVx(final int _ptIdx) {
return x_.getValue(_ptIdx);
+ }
+ public final EfData getVxData() {
+ return x_;
}
+ public final EfData getVyData() {
+ return y_;
+ }
+
/**
* @param _ptIdx l'indice du point demande
* @return la composant en y
Modified: trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/dialogSpec/TrPostDialogBilan.java
===================================================================
--- trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/dialogSpec/TrPostDialogBilan.java 2012-11-05 16:21:38 UTC (rev 7860)
+++ trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/dialogSpec/TrPostDialogBilan.java 2012-11-05 16:23:00 UTC (rev 7861)
@@ -54,6 +54,7 @@
import org.fudaa.fudaa.tr.post.TrPostCommonImplementation;
import org.fudaa.fudaa.tr.post.TrPostSource;
import org.fudaa.fudaa.tr.post.TrPostVisuPanel;
+import org.fudaa.fudaa.tr.post.data.TrPostDataVecteur;
import org.fudaa.fudaa.tr.post.profile.MVProfileCourbeModel;
import org.fudaa.fudaa.tr.post.profile.MvProfileCoteTester;
import org.fudaa.fudaa.tr.post.profile.MvProfileCourbe;
@@ -83,6 +84,7 @@
JComboBox listVar_;
CtuluComboBoxModelAdapter modelPdt_;
JComboBox listPdt_;
+ JCheckBox cbVectoriel;
// isolignes
private JPanel panelIsolignes_;
JCheckBox boxSelectLineAuto_ = new JCheckBox(TrResource.getS("Choisir l'isoligne du calque"));
@@ -206,7 +208,6 @@
textY2.setValueValidator(BuValueValidator.FLOAT);
boxSelectLineAuto_.setAction(new AbstractAction() {
-
@Override
public void actionPerformed(final ActionEvent _e) {
final boolean enabled = false;
@@ -235,7 +236,6 @@
}
});
boxSelectLineManu_.setAction(new AbstractAction() {
-
@Override
public void actionPerformed(final ActionEvent _e) {
final boolean enabled = true;
@@ -315,7 +315,6 @@
// -- action relatives aux resultats --//
ajouter_.addActionListener(new ActionListener() {
-
@Override
public void actionPerformed(final ActionEvent _e) {
if (controleDataOk()) {
@@ -344,7 +343,6 @@
res.add(new BuLabel(""));
res.add(btChangeFmt_);
btChangeFmt_.addActionListener(new ActionListener() {
-
@Override
public void actionPerformed(ActionEvent _e) {
CtuluNumberFormatI newFmt = CtuluDecimalFormatEditPanel.chooseNumberFormat(currentFmt_);
@@ -445,19 +443,38 @@
}
private JPanel buildVariables() {
- final JPanel content = new JPanel(new GridLayout(2, 2));
+ final JPanel content = new JPanel(new GridLayout(3, 2));
listVar_ = new BuComboBox(modelVariables_);
listVar_.setSelectedIndex(0);
listPdt_ = new BuComboBox(modelPdt_);
listPdt_.setSelectedIndex(0);
+ cbVectoriel = new JCheckBox();
content.add(new JLabel(TrLib.getString("Variable")));
content.add(listVar_);
content.add(new JLabel(TrLib.getString("Pas de temps")));
content.add(listPdt_);
+ content.add(new JLabel(TrLib.getString("Calcul vectoriel")));
+ content.add(cbVectoriel);
content.setBorder(BorderFactory.createTitledBorder(TrResource.getS("Choix de la variable et du pas de temps")));
+ updateCbVectorielState();
+ listVar_.addActionListener(new ActionListener() {
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ updateCbVectorielState();
+ }
+ });
return content;
}
+ private void updateCbVectorielState() {
+ H2dVariableType selectedItem = (H2dVariableType) listVar_.getSelectedItem();
+ if (selectedItem == null) {
+ cbVectoriel.setEnabled(false);
+ } else {
+ cbVectoriel.setEnabled(source_.getFlecheContent(selectedItem) != null);
+ }
+ }
+
private JPanel buildSeuil() {
seuil_.setCharValidator(BuCharValidator.FLOAT);
seuil_.setStringValidator(BuStringValidator.FLOAT);
@@ -537,7 +554,6 @@
private void computeResults() {
new CtuluTaskOperationGUI(impl_, FudaaLib.getS("Calcul Bilan")) {
-
@Override
public void act() {
final ProgressionInterface prog = getStateReceiver();
@@ -566,9 +582,14 @@
// -- calcul de l'int\xE9grale --//
impl_.setMainProgression(70);
impl_.setMainMessage(CtuluLib.getS("Calcul de l'int\xE9grale"));
+ EfDataIntegrale resCalcul = null;
+ if (cbVectoriel.isEnabled() && cbVectoriel.isSelected()) {
+ TrPostDataVecteur vectData = (TrPostDataVecteur) data;
+ resCalcul = EfBilanHelper.integrerMethodeTrapezeVector(interfaceRes, vectData.getVxData(), vectData.getVyData(), getSeuil());
+ } else {
+ resCalcul = EfBilanHelper.integrerMethodeTrapeze(interfaceRes, data, getSeuil());
+ }
- EfDataIntegrale resCalcul = EfBilanHelper.integrerMethodeTrapeze(interfaceRes, data, getSeuil());
-
res_ = resCalcul.getResultat();
resMax_ = resCalcul.getZonePlus();
resMin_ = resCalcul.getZoneMoins();
Modified: trunk/soft/fudaa-prepro/ui/src/main/resources/org/fudaa/fudaa/tr/common/tr_en.fr_txt
===================================================================
--- trunk/soft/fudaa-prepro/ui/src/main/resources/org/fudaa/fudaa/tr/common/tr_en.fr_txt 2012-11-05 16:21:38 UTC (rev 7860)
+++ trunk/soft/fudaa-prepro/ui/src/main/resources/org/fudaa/fudaa/tr/common/tr_en.fr_txt 2012-11-05 16:23:00 UTC (rev 7861)
@@ -1209,4 +1209,5 @@
Variable\: {0}\n Point interpol\xE9\: {1}=Variable\: {0}\n Interpolated point \: {1}
Pas de valeurs \xE0 \xE9diter pour un ouvrage unique=No data to edit when only one structure is defined
Tout s\xE9lectionner=Select All
-Tout d\xE9s\xE9lectionner=Unselect All
\ No newline at end of file
+Tout d\xE9s\xE9lectionner=Unselect All
+Calcul vectoriel=Vector computation
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <de...@us...> - 2013-01-23 09:10:19
|
Revision: 8244
http://fudaa.svn.sourceforge.net/fudaa/?rev=8244&view=rev
Author: deniger
Date: 2013-01-23 09:10:10 +0000 (Wed, 23 Jan 2013)
Log Message:
-----------
Modified Paths:
--------------
trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/TrPostLayoutFille.java
trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/actions/TrPostActionBilan.java
trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/dialogSpec/TrPostDialogBilan.java
trunk/soft/fudaa-prepro/ui/src/main/resources/org/fudaa/fudaa/tr/common/tr_en.fr_txt
Modified: trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/TrPostLayoutFille.java
===================================================================
--- trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/TrPostLayoutFille.java 2013-01-22 17:00:30 UTC (rev 8243)
+++ trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/TrPostLayoutFille.java 2013-01-23 09:10:10 UTC (rev 8244)
@@ -81,37 +81,29 @@
/**
* InternalFrame qui contient la scene EbliScene.
- *
+ *
* @author Adrien Hadoux
*/
public class TrPostLayoutFille extends BuInternalFrame implements CtuluFilleWithComponent, CtuluUndoRedoInterface, BuUndoRedoInterface,
- BuCutCopyPasteInterface, CtuluSelectionInterface, EbliWidgetEditModeListener, CtuluImageProducer, EbliPageable, CtuluExportDataInterface {
+ BuCutCopyPasteInterface, CtuluSelectionInterface, EbliWidgetEditModeListener, CtuluImageProducer, EbliPageable, CtuluExportDataInterface {
/**
- *
+ *
*/
private static final long serialVersionUID = -2769884291563880931L;
-
/**
* scene de l internalFrame.
*/
// final private EbliScene scene_;
public TrPostLayoutPanelController controller_;
-
final JComponent defaultSouth_ = new JLabel(TrResource.getS("Details:"));
-
private EbliPageableDelegate delegueImpression_;
-
boolean ecrasePrevious_ = true;
-
JComponent editorEnCours_;
BuInformationsDocument id_;
BuMenu menuLayoutManager_;
-
JMenuBar menuModifiable_ = new BuMenuBar();
-
JMenu[] menus_;
-
Dimension oldSize_;
/**
* Scroll qui contient le tree a droite. Ce panel est modifi\xE9 des que l on change de type d elements.
@@ -121,24 +113,18 @@
* palette d infos pour le calque associe.
*/
JComponent palette_;
-
/**
* Panel qui contient le tree modifiable
*/
// JPanel conteneurTree_;
JComponent panelSouthSuiviSouris_;
-
public String previousTitleFrame = getTitle();
-
TrPostProjet projet_;
-
JComponent right_;
-
/**
* Toolbar modifiable qui se met a jour selon la selection de la widget.
*/
JToolBar toolBarModifiable_ = new BuToolBar();
-
JComponent[] tools_;
/**
@@ -177,11 +163,11 @@
* @param _preferedDimension
* @param _calque
* @return
- * @see org.fudaa.fudaa.tr.post.TrPostLayoutPanelController#addCalque(java.lang.String, java.awt.Point,
- * java.awt.Dimension, org.fudaa.ebli.calque.ZEbliCalquesPanel)
+ * @see org.fudaa.fudaa.tr.post.TrPostLayoutPanelController#addCalque(java.lang.String, java.awt.Point, java.awt.Dimension,
+ * org.fudaa.ebli.calque.ZEbliCalquesPanel)
*/
public EbliNode addCalque(final String _title, final Point _preferredLocation, final Dimension _preferedDimension, final TrPostVisuPanel _calque,
- final CalqueLegendeWidgetAdapter _legende) {
+ final CalqueLegendeWidgetAdapter _legende) {
return controller_.addCalque(_title, _preferredLocation, _preferedDimension, _calque);
}
@@ -195,7 +181,7 @@
/**
* change le component south de la frame. dans le cas du calque il s agit du suivi souris.
- *
+ *
* @param _controller
*/
private void changeSouth(final EbliWidgetInterface _controller) {
@@ -212,7 +198,7 @@
/**
* Methode qui modifie la toolbar associee au calque selectionne
- *
+ *
* @param _calque
*/
private void changeToolbar(final EbliWidgetControllerInterface _controller) {
@@ -268,7 +254,7 @@
/**
* Methode appelee pour les widget qui contiennent des graphes.
- *
+ *
* @param _controller
* @param creator
*/
@@ -282,7 +268,9 @@
final ArrayList<EbliActionSimple> listeActions = new ArrayList<EbliActionSimple>();
final EGFillePanel _graphe = creator.getGraphePanel();
if (_graphe.getGraphe().getModel() instanceof MvProfileTreeModel) {
- listeActions.add(new TrPostActionBilan(((MvProfileTreeModel) _graphe.getGraphe().getModel()), projet_.getImpl()));
+ listeActions.add(new TrPostActionBilan(
+ creator.getWidget().getEbliScene(),
+ (MvProfileTreeModel) _graphe.getGraphe().getModel(), projet_.getImpl()));
}
// -- ajout de l'importation dans les courbes de l'action --//
@@ -302,7 +290,7 @@
/**
* Methode qui met a jour le tree de droite avec le tree du calque ou graphe selectionne.
- *
+ *
* @param _widget
*/
@SuppressWarnings("unchecked")
@@ -347,7 +335,7 @@
for (final Iterator<EbliNode> it = ((Set<EbliNode>) getScene().getSelectedObjects()).iterator(); it.hasNext();) {
final EbliNode node = it.next();
if (!(node.getCreator() instanceof EbliWidgetCreatorLegende)
- && !(node.getCreator() instanceof org.fudaa.ebli.visuallibrary.graphe.EbliWidgetCreatorLegende)) {
+ && !(node.getCreator() instanceof org.fudaa.ebli.visuallibrary.graphe.EbliWidgetCreatorLegende)) {
projet_.nodesCopyied.add(node);
}
}
@@ -390,7 +378,7 @@
for (final Iterator<EbliNode> it = ((Set<EbliNode>) getScene().getSelectedObjects()).iterator(); it.hasNext();) {
final EbliNode node = it.next();
if (!(node.getCreator() instanceof EbliWidgetCreatorLegende)
- && !(node.getCreator() instanceof org.fudaa.ebli.visuallibrary.graphe.EbliWidgetCreatorLegende)) {
+ && !(node.getCreator() instanceof org.fudaa.ebli.visuallibrary.graphe.EbliWidgetCreatorLegende)) {
projet_.nodesCutted.add(node);
}
@@ -455,10 +443,7 @@
changeToolbar(node.getWidget().getController());
setTitle(previousTitleFrame);
- }
-
-
- else {
+ } else {
// -- etape 1: on fout eventuellement le tree des layouts --//
changeTree(getScene());
// -- etape 2: rechargement de la toolbar specifique dans this --//
@@ -519,12 +504,11 @@
@Override
public String[] getEnabledActions() {
- return new String[] { "TOUTSELECTIONNER", "INVERSESELECTION", "CLEARSELECTION", "IMPRIMER", "MISEENPAGE", "PREVISUALISER",
- CtuluLibImage.SNAPSHOT_COMMAND, "COLLER", "COPIER", "COUPER", CtuluExportDataInterface.EXPORT_CMD };
+ return new String[]{"TOUTSELECTIONNER", "INVERSESELECTION", "CLEARSELECTION", "IMPRIMER", "MISEENPAGE", "PREVISUALISER",
+ CtuluLibImage.SNAPSHOT_COMMAND, "COLLER", "COPIER", "COUPER", CtuluExportDataInterface.EXPORT_CMD};
}
// ---methode du listener d ecoute de la scene
-
// /**
// * Called to notify that an object was added to an object scene. This is called when an object-widget mapping is
// * registered in an ObjectScene only. At the moment of the call, the object is still not reqistered in the
@@ -560,7 +544,6 @@
// ObjectState newState) {
//
// }
-
@Override
public BuInformationsDocument getInformationsDocument() {
if (id_ == null) {
@@ -602,7 +585,7 @@
@Override
public JMenu[] getSpecificMenus() {
if (menus_ == null) {
- menus_ = new JMenu[] { controller_.createMenu() };
+ menus_ = new JMenu[]{controller_.createMenu()};
menus_[0].setText(getTitle());
}
return menus_;
@@ -618,7 +601,7 @@
/**
* Methode utilisee dans la classe fille TrPostFille pour recuperer le calque principal et enregistrer.
- *
+ *
* @return
*/
public final ZEbliCalquesPanel getVisuPanel() {
@@ -704,7 +687,6 @@
g2d.translate(xCentre, yCentre);
try {
Runnable runnable = new Runnable() {
-
@Override
public void run() {
scene.produceImage(g2d, (int) wCompDessine, (int) hCompDessine, null);
@@ -783,7 +765,7 @@
/**
* Met en place la menubar et la rend floatable false.
- *
+ *
* @param _toolBar
*/
public void setToolBar(final JToolBar _toolBar) {
Modified: trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/actions/TrPostActionBilan.java
===================================================================
--- trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/actions/TrPostActionBilan.java 2013-01-22 17:00:30 UTC (rev 8243)
+++ trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/actions/TrPostActionBilan.java 2013-01-23 09:10:10 UTC (rev 8244)
@@ -2,6 +2,7 @@
import java.awt.event.ActionEvent;
import org.fudaa.ebli.commun.EbliActionSimple;
+import org.fudaa.ebli.visuallibrary.EbliScene;
import org.fudaa.fudaa.tr.common.TrLib;
import org.fudaa.fudaa.tr.common.TrResource;
import org.fudaa.fudaa.tr.post.TrPostCommonImplementation;
@@ -21,6 +22,7 @@
final MvProfileTreeModel modelGraphe_;
final boolean startWithCalque;
TrPostCommonImplementation impl_;
+ private EbliScene scene;
public TrPostActionBilan(final TrPostVisuPanel _visu, final TrPostCommonImplementation impl) {
super(TrLib.getString("Calcul des bilans"), TrResource.TR.getIcon("bilan"), "BILAN");
@@ -30,12 +32,14 @@
impl_ = impl;
}
- public TrPostActionBilan(final MvProfileTreeModel _model, final TrPostCommonImplementation impl) {
+ public TrPostActionBilan(EbliScene scene, final MvProfileTreeModel _model, final TrPostCommonImplementation impl) {
super(TrLib.getString("Calcul des bilans"), TrResource.TR.getIcon("bilan"), "BILAN");
+ setDefaultToolTip(TrLib.getString("Afin de d\xE9terminer la ligne support, s\xE9lectionner une courbe avec de lancer le calcul"));
modelGraphe_ = _model;
panel_ = null;
startWithCalque = false;
impl_ = impl;
+ this.scene = scene;
}
@Override
@@ -44,7 +48,7 @@
if (startWithCalque) {
new TrPostDialogBilan(panel_, impl_);
} else {
- new TrPostDialogBilan(modelGraphe_, impl_);
+ new TrPostDialogBilan(scene,modelGraphe_, impl_);
}
}
}
Modified: trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/dialogSpec/TrPostDialogBilan.java
===================================================================
--- trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/dialogSpec/TrPostDialogBilan.java 2013-01-22 17:00:30 UTC (rev 8243)
+++ trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/post/dialogSpec/TrPostDialogBilan.java 2013-01-23 09:10:10 UTC (rev 8244)
@@ -16,6 +16,7 @@
import java.awt.GridLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
+import java.util.List;
import javax.swing.AbstractAction;
import javax.swing.AbstractListModel;
import javax.swing.BorderFactory;
@@ -47,6 +48,7 @@
import org.fudaa.dodico.ef.operation.EfLineIntersectionsResultsI;
import org.fudaa.dodico.ef.operation.EfLineIntersectorActivity;
import org.fudaa.dodico.h2d.type.H2dVariableType;
+import org.fudaa.ebli.courbe.EGCourbeChild;
import org.fudaa.ebli.courbe.EGObject;
import org.fudaa.ebli.ressource.EbliResource;
import org.fudaa.ebli.visuallibrary.EbliScene;
@@ -105,6 +107,7 @@
double res_;
double resMax_;
double resMin_;
+ private EbliScene scene;
private void updateResValues() {
tfRes_.setText(currentFmt_.format(res_));
@@ -142,9 +145,10 @@
* @param _panelVariables
* @param _source
*/
- public TrPostDialogBilan(final MvProfileTreeModel _modelGraphe, final TrPostCommonImplementation impl) {
+ public TrPostDialogBilan(EbliScene scene, final MvProfileTreeModel _modelGraphe, final TrPostCommonImplementation impl) {
visuPanel = null;
impl_ = impl;
+ this.scene = scene;
modelGraphe_ = _modelGraphe;
source_ = (TrPostSource) _modelGraphe.target_.getData();
modelVariables_ = new CtuluComboBoxModelAdapter(source_.getNewVarListModel());
@@ -408,12 +412,19 @@
protected LineString getSelectedLine() {
if (this.modelGraphe_ != null) {
EGObject selectedObject = modelGraphe_.getSelectedObject();
+ if (selectedObject == null) {
+ List<EGCourbeChild> allCourbesChild = modelGraphe_.getAllCourbesChild();
+ if (allCourbesChild.size() == 1) {
+ selectedObject = allCourbesChild.get(0);
+ }
+ }
if (selectedObject instanceof MvProfileCourbe) {
MvProfileCourbe profile = (MvProfileCourbe) selectedObject;
if (profile.getProfileModel() instanceof MVProfileCourbeModel) {
return ((MVProfileCourbeModel) profile.getProfileModel()).getInitLine();
}
}
+
}
return visuPanel == null ? null : visuPanel.getSelectedLine();
}
@@ -439,6 +450,9 @@
@Override
public EbliScene getScene() {
+ if (scene != null) {
+ return scene;
+ }
return getVisuPanel().getPostImpl().getCurrentLayoutFille().getScene();
}
Modified: trunk/soft/fudaa-prepro/ui/src/main/resources/org/fudaa/fudaa/tr/common/tr_en.fr_txt
===================================================================
--- trunk/soft/fudaa-prepro/ui/src/main/resources/org/fudaa/fudaa/tr/common/tr_en.fr_txt 2013-01-22 17:00:30 UTC (rev 8243)
+++ trunk/soft/fudaa-prepro/ui/src/main/resources/org/fudaa/fudaa/tr/common/tr_en.fr_txt 2013-01-23 09:10:10 UTC (rev 8244)
@@ -1,4 +1,5 @@
Le fichier r\xE9sultat utilis\xE9 actuellement=The current source used
+Afin de d\xE9terminer la ligne support, s\xE9lectionner une courbe avec de lancer le calcul=To determine the line to use, select one curve before launching the computation
La frame graphe ne trouve pas la variable qui correspond \xE0 l'ID {0}=The variable {0} is not found by the graph view
La tentative de rejouer les donn\xE9es pour le graphe \xE9volution temporel {0} a \xE9chou\xE9 avec le fichier d'id {1}=The time evolution {0} for the source {1} can't be rebuilt
Ouvrir et recalculer=Open and recompute
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <de...@us...> - 2013-09-04 11:50:50
|
Revision: 8487
http://sourceforge.net/p/fudaa/svn/8487
Author: deniger
Date: 2013-09-04 11:50:47 +0000 (Wed, 04 Sep 2013)
Log Message:
-----------
maj bug
Modified Paths:
--------------
trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/TrLauncherDefault.java
trunk/soft/fudaa-prepro/ui/src/main/resources/org/fudaa/fudaa/tr/common/tr_en.fr_txt
Modified: trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/TrLauncherDefault.java
===================================================================
--- trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/TrLauncherDefault.java 2013-09-04 11:47:40 UTC (rev 8486)
+++ trunk/soft/fudaa-prepro/ui/src/main/java/org/fudaa/fudaa/tr/TrLauncherDefault.java 2013-09-04 11:50:47 UTC (rev 8487)
@@ -72,8 +72,8 @@
infoSoft = new BuInformationsSoftware();
infoSoft.name = "prepro";
- infoSoft.version = "1.3-RC2";
- infoSoft.date = "2013-09-03";
+ infoSoft.version = "1.3-RC3";
+ infoSoft.date = "2013-09-04";
infoSoft.rights = TrResource.getS("Tous droits r\xE9serv\xE9s") + ". CETMEF (c)2003-2009";
infoSoft.contact = "fre...@fu...";
infoSoft.license = "GPL2";
Modified: trunk/soft/fudaa-prepro/ui/src/main/resources/org/fudaa/fudaa/tr/common/tr_en.fr_txt
===================================================================
--- trunk/soft/fudaa-prepro/ui/src/main/resources/org/fudaa/fudaa/tr/common/tr_en.fr_txt 2013-09-04 11:47:40 UTC (rev 8486)
+++ trunk/soft/fudaa-prepro/ui/src/main/resources/org/fudaa/fudaa/tr/common/tr_en.fr_txt 2013-09-04 11:50:47 UTC (rev 8487)
@@ -4,6 +4,7 @@
La tentative de rejouer les donn\xE9es pour le graphe \xE9volution temporel {0} a \xE9chou\xE9 avec le fichier d'id {1}=The time evolution {0} for the source {1} can't be rebuilt
Ouvrir et recalculer=Open and recompute
Courbe spatiale=Spatial curve
+Calculer=C&ompute
R\xE9sultat=Result
Positif=Positive
N\xE9gatif=Negative
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|