|
From: <had...@us...> - 2009-05-08 13:07:23
|
Revision: 4738
http://fudaa.svn.sourceforge.net/fudaa/?rev=4738&view=rev
Author: hadouxad
Date: 2009-05-08 13:07:20 +0000 (Fri, 08 May 2009)
Log Message:
-----------
COMMIT des liste de ctuluanalyse
Modified Paths:
--------------
trunk/soft/fudaa-crue/dodico/src/main/java/org/fudaa/dodico/crue/io/Crue10FileFormat.java
trunk/soft/fudaa-crue/fudaa/src/main/java/org/fudaa/fudaa/crue/common/CrueCommomImplementation.java
trunk/soft/fudaa-crue/fudaa/src/main/java/org/fudaa/fudaa/crue/projet/CrueProjet.java
trunk/soft/fudaa-crue/fudaa/src/main/java/org/fudaa/fudaa/crue/projet/ScenarioLoader.java
trunk/soft/fudaa-crue/fudaa/src/main/java/org/fudaa/fudaa/crue/projet/ScenarioSaver.java
trunk/soft/fudaa-crue/fudaa/src/main/java/org/fudaa/fudaa/crue/view/CrueFilleComparaisonScenario.java
trunk/soft/fudaa-crue/fudaa/src/main/java/org/fudaa/fudaa/crue/view/CrueFilleGenerationCrue9.java
trunk/soft/fudaa-crue/fudaa/src/main/java/org/fudaa/fudaa/test/AppCrueTest.java
Added Paths:
-----------
trunk/soft/fudaa-crue/fudaa/src/main/java/org/fudaa/fudaa/crue/view/CrueErrorManager.java
trunk/soft/fudaa-crue/fudaa/src/main/java/org/fudaa/fudaa/crue/view/CrueFilleEMH.java
trunk/soft/fudaa-crue/fudaa/src/main/java/org/fudaa/fudaa/crue/view/CrueFilleInfosGenerales.java
Removed Paths:
-------------
trunk/soft/fudaa-crue/fudaa/src/main/java/org/fudaa/fudaa/crue/view/CrueFicheEMHFille.java
trunk/soft/fudaa-crue/fudaa/src/main/java/org/fudaa/fudaa/crue/view/CrueFicheInfosGenerales.java
trunk/soft/fudaa-crue/fudaa/src/main/java/org/fudaa/fudaa/crue/view/CruePersistanceErrorManager.java
Modified: trunk/soft/fudaa-crue/dodico/src/main/java/org/fudaa/dodico/crue/io/Crue10FileFormat.java
===================================================================
--- trunk/soft/fudaa-crue/dodico/src/main/java/org/fudaa/dodico/crue/io/Crue10FileFormat.java 2009-05-08 09:43:10 UTC (rev 4737)
+++ trunk/soft/fudaa-crue/dodico/src/main/java/org/fudaa/dodico/crue/io/Crue10FileFormat.java 2009-05-08 13:07:20 UTC (rev 4738)
@@ -114,6 +114,7 @@
* @return
*/
public final M read(final File f, final CtuluAnalyze analyzer, final CrueData dataLinked) {
+ analyzer.setDesc(f.getName());
return readerWriter.readXML(f, analyzer, dataLinked);
}
Modified: trunk/soft/fudaa-crue/fudaa/src/main/java/org/fudaa/fudaa/crue/common/CrueCommomImplementation.java
===================================================================
--- trunk/soft/fudaa-crue/fudaa/src/main/java/org/fudaa/fudaa/crue/common/CrueCommomImplementation.java 2009-05-08 09:43:10 UTC (rev 4737)
+++ trunk/soft/fudaa-crue/fudaa/src/main/java/org/fudaa/fudaa/crue/common/CrueCommomImplementation.java 2009-05-08 13:07:20 UTC (rev 4738)
@@ -13,8 +13,8 @@
import org.fudaa.fudaa.crue.builder.CrueScenarioBuilder;
import org.fudaa.fudaa.crue.explorer.CrueLauncher;
import org.fudaa.fudaa.crue.projet.CrueProjet;
-import org.fudaa.fudaa.crue.view.CrueFicheEMHFille;
-import org.fudaa.fudaa.crue.view.CrueFicheInfosGenerales;
+import org.fudaa.fudaa.crue.view.CrueFilleEMH;
+import org.fudaa.fudaa.crue.view.CrueFilleInfosGenerales;
import org.fudaa.fudaa.crue.view.CrueFicheModeleFille;
import org.fudaa.fudaa.crue.view.CrueFilleComparaisonScenario;
import org.fudaa.fudaa.crue.view.CrueFilleGenerationCrue9;
@@ -305,7 +305,7 @@
this.addInternalFrame(new CrueFilleScenarioManager(crueProjet_));
}
- public CrueFicheEMHFille emhViewFille = null;
+ public CrueFilleEMH emhViewFille = null;
/**
*
@@ -318,10 +318,10 @@
}
if (emhViewFille == null) {
- emhViewFille = new CrueFicheEMHFille(crueProjet_);
+ emhViewFille = new CrueFilleEMH(crueProjet_);
}
// TODO a remplacer par scenarioFille (creer nouveau pour debugagge rapide)
- this.addInternalFrame(new CrueFicheEMHFille(crueProjet_));
+ this.addInternalFrame(new CrueFilleEMH(crueProjet_));
}
public CrueFicheModeleFille modeleFille = null;
@@ -346,14 +346,14 @@
this.addInternalFrame(new CrueFicheModeleFille(crueProjet_));
}
- public CrueFicheInfosGenerales etudeFille = null;
+ public CrueFilleInfosGenerales etudeFille = null;
/**
*
*/
public void addEtudeManagerFille() {
if (etudeFille == null) {
- etudeFille = new CrueFicheInfosGenerales(crueProjet_);
+ etudeFille = new CrueFilleInfosGenerales(crueProjet_);
}
this.addInternalFrame(etudeFille);
}
Modified: trunk/soft/fudaa-crue/fudaa/src/main/java/org/fudaa/fudaa/crue/projet/CrueProjet.java
===================================================================
--- trunk/soft/fudaa-crue/fudaa/src/main/java/org/fudaa/fudaa/crue/projet/CrueProjet.java 2009-05-08 09:43:10 UTC (rev 4737)
+++ trunk/soft/fudaa-crue/fudaa/src/main/java/org/fudaa/fudaa/crue/projet/CrueProjet.java 2009-05-08 13:07:20 UTC (rev 4738)
@@ -7,7 +7,7 @@
import org.fudaa.dodico.crue.metier.emh.CrueData;
import org.fudaa.fudaa.crue.common.CrueCommomImplementation;
import org.fudaa.fudaa.crue.common.FCrueResource;
-import org.fudaa.fudaa.crue.view.CruePersistanceErrorManager;
+import org.fudaa.fudaa.crue.view.CrueErrorManager;
/**
* Projet Crue. Contient le contenu du fichier xml ETU lu. Manage les scc�narios, modeles et sous modeles crue au sein
@@ -25,7 +25,7 @@
final CrueCommomImplementation impl;
final File fichierEtu_;
- final CruePersistanceErrorManager managerError;
+ final CrueErrorManager managerError;
/**
* Les donnees crueData chargees.
@@ -40,7 +40,7 @@
public CrueProjet(final File fichierEtu, final CrueCommomImplementation impl) {
this.impl = impl;
fichierEtu_ = fichierEtu;
- managerError = new CruePersistanceErrorManager();
+ managerError = new CrueErrorManager();
// -- init de la structure projet --//
project = readProject(fichierEtu);
@@ -58,7 +58,7 @@
public EMHproject readProject(final File _f) {
managerError.clear();
// -- lecture du fichier --//
- final EMHproject projet = Crue10FileFormatFactory.getETUFileFormat().read(_f, managerError.getAnalyser(), null);
+ final EMHproject projet = Crue10FileFormatFactory.getETUFileFormat().read(_f, managerError.getNewAnalyser(), null);
// -- affichage du r�sultat --//
managerError.showDialog(impl, FCrueResource.getS("Chargement projet"));
@@ -87,7 +87,7 @@
return impl;
}
- public CruePersistanceErrorManager getManagerError() {
+ public CrueErrorManager getManagerError() {
return managerError;
}
Modified: trunk/soft/fudaa-crue/fudaa/src/main/java/org/fudaa/fudaa/crue/projet/ScenarioLoader.java
===================================================================
--- trunk/soft/fudaa-crue/fudaa/src/main/java/org/fudaa/fudaa/crue/projet/ScenarioLoader.java 2009-05-08 09:43:10 UTC (rev 4737)
+++ trunk/soft/fudaa-crue/fudaa/src/main/java/org/fudaa/fudaa/crue/projet/ScenarioLoader.java 2009-05-08 13:07:20 UTC (rev 4738)
@@ -97,7 +97,6 @@
public CrueData compute() {
projet.managerError.clear();
- CtuluAnalyze analyzer = projet.managerError.getAnalyser();
// -- detection crue 9 ou 10 --//
if (scenario.getInfosVersions() != null && scenario.getInfosVersions().getType() != null) {
@@ -111,7 +110,7 @@
}
} else {
- analyzer.addError("io.etu.typeNotDefined");
+ projet.managerError.getLastAnalyser().addError("io.etu.typeNotDefined");
return null;
}
@@ -124,8 +123,8 @@
*/
public CrueData computeCrue9() {
CrueData res = new CrueDataImpl();
- CtuluAnalyze analyzer = projet.managerError.getAnalyser();
-
+ CtuluAnalyze analyzer = projet.managerError.getNewAnalyser();
+ analyzer.setDesc(FCrueResource.getS("Fichiers existant dans le scenario") + " " + scenario.getId());
// -- recuperation du fichier DC --//
if (scenario.getRunCourant() != null) {
// scenario.getRunCourant().setListeModelesRuns(listeModelesRuns)
@@ -145,7 +144,8 @@
*/
public CrueData computeCrue10() {
CrueData res = null;
- CtuluAnalyze analyzer = projet.managerError.getAnalyser();
+ CtuluAnalyze analyzer = projet.managerError.getNewAnalyser();
+ analyzer.setDesc(FCrueResource.getS("Fichiers existant dans le scenario") + " " + scenario.getId());
if (scenario.getRunCourant() != null) {
// scenario.getRunCourant().setListeModelesRuns(listeModelesRuns)
@@ -226,15 +226,17 @@
// -- lecture DFRT avant DPTG--//
final List<DonFrt> jeuDonnees = Crue10FileFormatFactory.getDFRTFileFormat().read(fichierDfrt.getFichier(),
- analyzer, null);
+ projet.getManagerError().getNewAnalyser(), null);
resVersion.setFrottements(jeuDonnees);
// -- lecture DPTG a besoin de DFRT--//
- Crue10FileFormatFactory.getDPTGFileFormat().read(fichierDptg.getFichier(), analyzer, resVersion);
+ Crue10FileFormatFactory.getDPTGFileFormat().read(fichierDptg.getFichier(),
+ projet.getManagerError().getNewAnalyser(), resVersion);
// -- lecture DCSP --//
- Crue10FileFormatFactory.getDCSPFileFormat().read(fichierDcsp.getFichier(), analyzer, resVersion);
+ Crue10FileFormatFactory.getDCSPFileFormat().read(fichierDcsp.getFichier(),
+ projet.getManagerError().getNewAnalyser(), resVersion);
// -- on fusionne les donnes res au res totaux --//
res.mergeWithAnotherCrueData(resVersion);
@@ -289,16 +291,17 @@
// - on ajoute les infos au cruedata
// DPTI
- Crue10FileFormatFactory.getDPTIFileFormat().read(fichierDPTI.getFichier(), analyzer, res);
+ Crue10FileFormatFactory.getDPTIFileFormat().read(fichierDPTI.getFichier(),
+ projet.getManagerError().getNewAnalyser(), res);
// OPTG
final OrdPrtGeoModeleBase data = Crue10FileFormatFactory.getOPTGFileFormat().read(fichierOPTG.getFichier(),
- analyzer, null);
+ projet.getManagerError().getNewAnalyser(), null);
res.setPretraitementsGeom(data);
// PNUM
final ParamNumModeleBase dataPnum = Crue10FileFormatFactory.getPNUMFileFormat().read(fichierPNUM.getFichier(),
- analyzer, null);
+ projet.getManagerError().getNewAnalyser(), null);
res.setParamNumModeleBase(dataPnum);
// OPTI
@@ -344,30 +347,30 @@
}
// -- lecture dlhy --//
- final List<Loi> listeLois = Crue10FileFormatFactory.getDLHYFileFormat().read(fichierDLHY.getFichier(), analyzer,
- res);
+ final List<Loi> listeLois = Crue10FileFormatFactory.getDLHYFileFormat().read(fichierDLHY.getFichier(),
+ projet.getManagerError().getNewAnalyser(), res);
// -- ajout des lois de dlhy --//
res.setLois(listeLois);
// -- lecture de dclm --//
final DonCLimMScenario donCLimMScenario = Crue10FileFormatFactory.getDCLMFileFormat().read(
- fichierDCLM.getFichier(), analyzer, res);
+ fichierDCLM.getFichier(), projet.getManagerError().getNewAnalyser(), res);
res.setConditionsLim(donCLimMScenario);
// OCAL
final OrdCalcScenario dataOCAL = Crue10FileFormatFactory.getOCALFileFormat().read(fichierOCAL.getFichier(),
- analyzer, res);
+ projet.getManagerError().getNewAnalyser(), res);
res.setOrdCalc(dataOCAL);
// ORES
final OrdResScenario dataORES = Crue10FileFormatFactory.getORESFileFormat().read(fichierORES.getFichier(),
- analyzer, null);
+ projet.getManagerError().getNewAnalyser(), null);
res.setOrdRes(dataORES);
// PCAL
final ParamCalcScenario dataPCAL = Crue10FileFormatFactory.getPCALFileFormat().read(fichierPCAL.getFichier(),
- analyzer, null);
+ projet.getManagerError().getNewAnalyser(), null);
res.setParamCalc(dataPCAL);
return res;
@@ -425,8 +428,8 @@
}
// DH
- CrueIOResu<CrueData> resu2 = Crue9FileFormatFactory.getDHFileFormat().read(fichierDH.getFichier(), analyzer,
- resuPartiels.getMetier());
+ CrueIOResu<CrueData> resu2 = Crue9FileFormatFactory.getDHFileFormat().read(fichierDH.getFichier(),
+ projet.getManagerError().getNewAnalyser(), resuPartiels.getMetier());
res = resu2.getMetier();
Modified: trunk/soft/fudaa-crue/fudaa/src/main/java/org/fudaa/fudaa/crue/projet/ScenarioSaver.java
===================================================================
--- trunk/soft/fudaa-crue/fudaa/src/main/java/org/fudaa/fudaa/crue/projet/ScenarioSaver.java 2009-05-08 09:43:10 UTC (rev 4737)
+++ trunk/soft/fudaa-crue/fudaa/src/main/java/org/fudaa/fudaa/crue/projet/ScenarioSaver.java 2009-05-08 13:07:20 UTC (rev 4738)
@@ -40,9 +40,9 @@
// -- generation DC --//
boolean ok = Crue9FileFormatFactory.getDCFileFormat().write(new CrueIOResu<CrueData>(projet.getDataSources()),
- fileDc, projet.getManagerError().getAnalyser());
+ fileDc, projet.getManagerError().getNewAnalyser());
- projet.getManagerError().getAnalyser().addInfo(
+ projet.getManagerError().getLastAnalyser().addInfo(
FCrueResource.getS("Fichier DC généré dans " + fileDc.getAbsolutePath()));
// -- generation DH --//
@@ -71,9 +71,9 @@
File fileDrso = new File(fichierModele + ".drso.xml");
boolean ok = Crue10FileFormatFactory.getDRSOFileFormat().write(data, fileDrso,
- projet.getManagerError().getAnalyser());
+ projet.getManagerError().getNewAnalyser());
- projet.getManagerError().getAnalyser().addInfo(
+ projet.getManagerError().getLastAnalyser().addInfo(
FCrueResource.getS("Fichier DRSO généré dans " + fileDrso.getAbsolutePath()));
// -- generation DFRT --//
@@ -82,9 +82,9 @@
if (data.getFrottements() != null) {
ok = ok
&& Crue10FileFormatFactory.getDFRTFileFormat().write(data.getFrottements(), fileDfrt,
- projet.getManagerError().getAnalyser());
+ projet.getManagerError().getNewAnalyser());
- projet.getManagerError().getAnalyser().addInfo(
+ projet.getManagerError().getLastAnalyser().addInfo(
FCrueResource.getS("Fichier DFRT généré dans " + fileDfrt.getAbsolutePath()));
}
@@ -93,18 +93,18 @@
ok = ok
&& Crue10FileFormatFactory.getDCSPFileFormat().write(data.getAllEMH(), fileDcsp,
- projet.getManagerError().getAnalyser());
+ projet.getManagerError().getNewAnalyser());
- projet.getManagerError().getAnalyser().addInfo(
+ projet.getManagerError().getLastAnalyser().addInfo(
FCrueResource.getS("Fichier DCSP généré dans " + fileDcsp.getAbsolutePath()));
// -- DPTG --//
File fileDptg = new File(fichierModele + ".dptg.xml");
ok = ok
- && Crue10FileFormatFactory.getDPTGFileFormat().write(data, fileDptg, projet.getManagerError().getAnalyser());
+ && Crue10FileFormatFactory.getDPTGFileFormat().write(data, fileDptg, projet.getManagerError().getNewAnalyser());
- projet.getManagerError().getAnalyser().addInfo(
+ projet.getManagerError().getLastAnalyser().addInfo(
FCrueResource.getS("Fichier DPTG généré dans " + fileDptg.getAbsolutePath()));
// -- Niveau modele --//
@@ -117,9 +117,9 @@
ok = ok
&& Crue10FileFormatFactory.getOPTGFileFormat().write(data.getPretraitementsGeom(), fileOptg,
- projet.getManagerError().getAnalyser());
+ projet.getManagerError().getNewAnalyser());
- projet.getManagerError().getAnalyser().addInfo(
+ projet.getManagerError().getLastAnalyser().addInfo(
FCrueResource.getS("Fichier OPTG généré dans " + fileOptg.getAbsolutePath()));
}
@@ -129,9 +129,9 @@
ok = ok
&& Crue10FileFormatFactory.getPNUMFileFormat().write(data.getParamNumModeleBase(), filePnum,
- projet.getManagerError().getAnalyser());
+ projet.getManagerError().getNewAnalyser());
- projet.getManagerError().getAnalyser().addInfo(
+ projet.getManagerError().getLastAnalyser().addInfo(
FCrueResource.getS("Fichier PNUM généré dans " + filePnum.getAbsolutePath()));
}
@@ -139,9 +139,9 @@
File fileDpti = new File(fichierModele + ".dpti.xml");
ok = ok
- && Crue10FileFormatFactory.getDPTIFileFormat().write(data, fileDpti, projet.getManagerError().getAnalyser());
+ && Crue10FileFormatFactory.getDPTIFileFormat().write(data, fileDpti, projet.getManagerError().getNewAnalyser());
- projet.getManagerError().getAnalyser().addInfo(
+ projet.getManagerError().getLastAnalyser().addInfo(
FCrueResource.getS("Fichier DPTI généré dans " + fileDpti.getAbsolutePath()));
// -- niveau scenario Une liste fixe de fichiers de niveau scénario : OCAL, ORES, PCAL, DCLM, DLHY --//
@@ -151,9 +151,9 @@
ok = ok
&& Crue10FileFormatFactory.getOCALFileFormat().write(data.getOrdCalc(), fileOcal,
- projet.getManagerError().getAnalyser());
+ projet.getManagerError().getNewAnalyser());
- projet.getManagerError().getAnalyser().addInfo(
+ projet.getManagerError().getLastAnalyser().addInfo(
FCrueResource.getS("Fichier OCAL généré dans " + fileOcal.getAbsolutePath()));
}
@@ -163,9 +163,9 @@
ok = ok
&& Crue10FileFormatFactory.getORESFileFormat().write(data.getOrdRes(), fileORES,
- projet.getManagerError().getAnalyser());
+ projet.getManagerError().getNewAnalyser());
- projet.getManagerError().getAnalyser().addInfo(
+ projet.getManagerError().getLastAnalyser().addInfo(
FCrueResource.getS("Fichier ORES généré dans " + fileORES.getAbsolutePath()));
}
// -- PCAL --//
@@ -174,9 +174,9 @@
ok = ok
&& Crue10FileFormatFactory.getPCALFileFormat().write(data.getParamCalc(), filePCAL,
- projet.getManagerError().getAnalyser());
+ projet.getManagerError().getNewAnalyser());
- projet.getManagerError().getAnalyser().addInfo(
+ projet.getManagerError().getLastAnalyser().addInfo(
FCrueResource.getS("Fichier PCAL généré dans " + filePCAL.getAbsolutePath()));
}
@@ -186,9 +186,9 @@
ok = ok
&& Crue10FileFormatFactory.getDLHYFileFormat().write(data.getLois(), fileDLHY,
- projet.getManagerError().getAnalyser());
+ projet.getManagerError().getNewAnalyser());
- projet.getManagerError().getAnalyser().addInfo(
+ projet.getManagerError().getLastAnalyser().addInfo(
FCrueResource.getS("Fichier DLHY généré dans " + fileDLHY.getAbsolutePath()));
}
@@ -198,9 +198,9 @@
ok = ok
&& Crue10FileFormatFactory.getDCLMFileFormat().write(data.getConditionsLim(), fileDCLM,
- projet.getManagerError().getAnalyser());
+ projet.getManagerError().getNewAnalyser());
- projet.getManagerError().getAnalyser().addInfo(
+ projet.getManagerError().getLastAnalyser().addInfo(
FCrueResource.getS("Fichier DCLM généré dans " + fileDCLM.getAbsolutePath()));
}
Copied: trunk/soft/fudaa-crue/fudaa/src/main/java/org/fudaa/fudaa/crue/view/CrueErrorManager.java (from rev 4737, trunk/soft/fudaa-crue/fudaa/src/main/java/org/fudaa/fudaa/crue/view/CruePersistanceErrorManager.java)
===================================================================
--- trunk/soft/fudaa-crue/fudaa/src/main/java/org/fudaa/fudaa/crue/view/CrueErrorManager.java (rev 0)
+++ trunk/soft/fudaa-crue/fudaa/src/main/java/org/fudaa/fudaa/crue/view/CrueErrorManager.java 2009-05-08 13:07:20 UTC (rev 4738)
@@ -0,0 +1,168 @@
+package org.fudaa.fudaa.crue.view;
+
+import java.awt.BorderLayout;
+import java.awt.Frame;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.logging.LogRecord;
+
+import javax.swing.JButton;
+import javax.swing.JDialog;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import javax.swing.JScrollPane;
+
+import org.fudaa.ctulu.CtuluAnalyze;
+import org.fudaa.ctulu.CtuluDefaultLogFormatter;
+import org.fudaa.ctulu.CtuluUI;
+import org.fudaa.ctulu.gui.CtuluLibSwing;
+import org.fudaa.ebli.ressource.EbliResource;
+import org.fudaa.fudaa.commun.FudaaLib;
+import org.fudaa.fudaa.crue.common.FCrueResource;
+import org.jdesktop.swingx.JXTreeTable;
+import org.jdesktop.swingx.treetable.DefaultMutableTreeTableNode;
+import org.jdesktop.swingx.treetable.DefaultTreeTableModel;
+
+/**
+ * Manager qui indique toutes les erreurs,messages qui se sont produites pendant le chargement.
+ *
+ * @author Adrien Hadoux
+ */
+public class CrueErrorManager {
+
+ public CrueErrorManager() {
+ super();
+ }
+
+ List<CtuluAnalyze> analyser_ = new ArrayList<CtuluAnalyze>();
+
+ public List<CtuluAnalyze> getAnalyser() {
+ return analyser_;
+ }
+
+ /**
+ * Ajoute un nouvel ctuluanalyze a la liste et le fournit.
+ *
+ * @return
+ */
+ public CtuluAnalyze getNewAnalyser() {
+ CtuluAnalyze analyzer = new CtuluAnalyze();
+ // ajout dans la liste des analyze
+ analyser_.add(analyzer);
+ return analyzer;
+ }
+
+ /**
+ * retourne le dernier ctuluanalyze cree.
+ *
+ * @param message
+ * @return
+ */
+ public CtuluAnalyze getLastAnalyser() {
+ return analyser_.get(analyser_.size() - 1);
+ }
+
+ public void setListeMessageError(final List<CtuluAnalyze> listeMessageError) {
+ this.analyser_ = listeMessageError;
+ }
+
+ /**
+ * Ajoute un message d'erreur au tout dernier analyzer dispo.
+ *
+ * @param message
+ */
+ public void addMessageError(final String message) {
+ analyser_.get(analyser_.size() - 1).addError(message);
+ }
+
+ public void clear() {
+
+ analyser_.clear();
+
+ }
+
+ /**
+ * Affiche la dialog avec le resultata du ctuluAnalyse.
+ *
+ * @param ui
+ * @param title
+ */
+ public void showDialog(final CtuluUI ui, final String title) {
+ if (analyser_ == null && ui != null) {
+ ui.message(EbliResource.EBLI.getString("Chargement terminé"), EbliResource.EBLI
+ .getString("Chargement terminé avec succès"), false);
+
+ return;
+ }
+ DefaultTreeTableModel modeleJX = new DefaultTreeTableModel(constructArborescence(analyser_));
+ List<String> colonnes = new ArrayList<String>();
+ colonnes.add(FCrueResource.getS("Analyse"));
+ modeleJX.setColumnIdentifiers(colonnes);
+
+ final JXTreeTable table = new JXTreeTable(modeleJX);
+
+ table.setEditable(false);
+ final Frame f;
+ if (ui != null) {
+ f = CtuluLibSwing.getFrameAncestorHelper(ui.getParentComponent());
+ } else {
+ f = null;
+ }
+ final JDialog dialog_ = new JDialog(f);
+ dialog_.setModal(true);
+ dialog_.setTitle(title);
+ final JPanel container = new JPanel(new BorderLayout());
+ container.add(new JScrollPane(table), BorderLayout.CENTER);
+
+ container.add(new JLabel(EbliResource.EBLI.getString("Opération terminé. Informations")), BorderLayout.NORTH);
+
+ final JButton ajouter_ = new JButton("Valider", EbliResource.EBLI.getIcon("crystal_valider"));
+ ajouter_.addActionListener(new ActionListener() {
+
+ public void actionPerformed(final ActionEvent e) {
+ dialog_.dispose();
+ }
+
+ });
+ container.add((new JPanel()).add(ajouter_), BorderLayout.SOUTH);
+
+ dialog_.setContentPane(container);
+ if (ui != null) {
+ // dialog_.setLocationRelativeTo(ui.getParentComponent());
+ dialog_.setLocation(200, 200);
+ }
+ // dialog_.pack();
+ dialog_.setSize(600, 250);
+ dialog_.setVisible(true);
+
+ }
+
+ private DefaultMutableTreeTableNode constructArborescence(final List<CtuluAnalyze> listemessage) {
+ final DefaultMutableTreeTableNode root = new DefaultMutableTreeTableNode("root");
+
+ for (CtuluAnalyze message : listemessage) {
+
+ String entete = "Analyse";
+ if (message.getDesc() != null) {
+ entete = message.getDesc();
+ } else if (message.getResource() != null) {
+ entete = message.getResource();
+ }
+
+ final DefaultMutableTreeTableNode rootFic = new DefaultMutableTreeTableNode(entete);
+ root.add(rootFic);
+
+ boolean perfect = message.isEmpty();
+ for (LogRecord log : message.getRecords()) {
+ rootFic.add(new DefaultMutableTreeTableNode(CtuluDefaultLogFormatter.DEFAULT.format(log)));
+ }
+ if (perfect) {
+ rootFic.add(new DefaultMutableTreeTableNode(FudaaLib.getS("Aucun problème rencontré")));
+ }
+ }
+ return root;
+ }
+
+}
Deleted: trunk/soft/fudaa-crue/fudaa/src/main/java/org/fudaa/fudaa/crue/view/CrueFicheEMHFille.java
===================================================================
--- trunk/soft/fudaa-crue/fudaa/src/main/java/org/fudaa/fudaa/crue/view/CrueFicheEMHFille.java 2009-05-08 09:43:10 UTC (rev 4737)
+++ trunk/soft/fudaa-crue/fudaa/src/main/java/org/fudaa/fudaa/crue/view/CrueFicheEMHFille.java 2009-05-08 13:07:20 UTC (rev 4738)
@@ -1,68 +0,0 @@
-package org.fudaa.fudaa.crue.view;
-
-import java.awt.BorderLayout;
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.swing.JLabel;
-import javax.swing.JScrollPane;
-import javax.swing.ListSelectionModel;
-
-import org.fudaa.fudaa.crue.builder.EMHGeneralBuilder;
-import org.fudaa.fudaa.crue.builder.CrueTreeProject.ScenarioTreeRenderer;
-import org.fudaa.fudaa.crue.common.FCrueResource;
-import org.fudaa.fudaa.crue.projet.CrueProjet;
-import org.jdesktop.swingx.JXTreeTable;
-import org.jdesktop.swingx.treetable.DefaultTreeTableModel;
-
-import com.memoire.bu.BuInternalFrame;
-import com.memoire.bu.BuList;
-
-/**
- * Affichage rapide des EMH.
- *
- * @author Adrien Hadoux
- */
-public class CrueFicheEMHFille extends BuInternalFrame {
- /**
- *
- */
- private static final long serialVersionUID = 4662472594024929109L;
- CrueProjet projet;
- BuList listeModeles;
- BuList listeSousModeles;
-
- /**
- * @param projet
- */
- public CrueFicheEMHFille(CrueProjet projet) {
- super(FCrueResource.getS("Affichage des EMH"), true, true, true, true);
- this.projet = projet;
-
- initBuild();
-
- }
-
- /**
- * Init la construction graphique.
- */
- public void initBuild() {
-
- setSize(550, 260);
-
- DefaultTreeTableModel treeModel = EMHGeneralBuilder.buildTreeScenario(projet.getDataSources());
-
- List<String> colonnes = new ArrayList<String>();
- colonnes.add("EMH");
- treeModel.setColumnIdentifiers(colonnes);
- JXTreeTable treeEMH = new JXTreeTable(treeModel);
- treeEMH.setTreeCellRenderer(new ScenarioTreeRenderer());
- treeEMH.setShowHorizontalLines(true);
- treeEMH.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
- this.getContentPane().add(new JScrollPane(treeEMH), BorderLayout.CENTER);
- this.getContentPane().add(
- new JLabel(FCrueResource.getS("EMH contenues dans le scénario courant") + " "
- + projet.getProject().getScenarioCourant().getId()), BorderLayout.NORTH);
-
- }
-}
Deleted: trunk/soft/fudaa-crue/fudaa/src/main/java/org/fudaa/fudaa/crue/view/CrueFicheInfosGenerales.java
===================================================================
--- trunk/soft/fudaa-crue/fudaa/src/main/java/org/fudaa/fudaa/crue/view/CrueFicheInfosGenerales.java 2009-05-08 09:43:10 UTC (rev 4737)
+++ trunk/soft/fudaa-crue/fudaa/src/main/java/org/fudaa/fudaa/crue/view/CrueFicheInfosGenerales.java 2009-05-08 13:07:20 UTC (rev 4738)
@@ -1,198 +0,0 @@
-package org.fudaa.fudaa.crue.view;
-
-import java.awt.FlowLayout;
-import java.awt.GridLayout;
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
-
-import javax.swing.JLabel;
-import javax.swing.JTextArea;
-import javax.swing.JTextField;
-
-import org.fudaa.dodico.crue.metier.EMHProjectInfos;
-import org.fudaa.ebli.commun.EbliActionSimple;
-import org.fudaa.ebli.commun.EbliComponentFactory;
-import org.fudaa.fudaa.crue.common.CommomLib;
-import org.fudaa.fudaa.crue.common.FCrueResource;
-import org.fudaa.fudaa.crue.projet.CrueProjet;
-
-import com.memoire.bu.BuButton;
-import com.memoire.bu.BuInternalFrame;
-import com.memoire.bu.BuPanel;
-
-public class CrueFicheInfosGenerales extends BuInternalFrame {
-
- CrueProjet projet;
-
- public CrueFicheInfosGenerales(CrueProjet projet) {
- super(FCrueResource.getS("Transformation Crue 9 <=> Crue 10"), true, true, true, true);
- this.projet = projet;
-
- initBuild();
-
- }
-
- /**
- * Init la construction graphique.
- */
- public void initBuild() {
-
- setSize(550, 260);
- BuPanel infos = new BuPanel(new GridLayout(8, 2, 10, 0));
- this.getContentPane().add(infos);
-
- // infos.setBorder(BorderFactory.createTitledBorder(FCrueResource.getS("Infos Etude")));
- setTitle(FCrueResource.getS("Infos Etude"));
-
- JLabel titreEtude1 = new JLabel(FCrueResource.getS("Etude:"));
- final JTextField titreEtude2 = new JTextField(projet.getFichierEtu_().getName(), 20);
- JLabel titreCommentaire = new JLabel(FCrueResource.getS("Commentaire:"));
- final JTextArea titreCommentaire2 = new JTextArea(1, 20);
-
- JLabel path1 = new JLabel(projet.getProject().getInfos().FICHETUDES + ":");
- final JTextField path1_2 = new JTextField(15);
- JLabel path2 = new JLabel(projet.getProject().getInfos().RUNS + ":");
- final JTextField path2_2 = new JTextField(15);
- JLabel path3 = new JLabel(projet.getProject().getInfos().RAPPORTS + ":");
- final JTextField path3_2 = new JTextField(15);
-
- if (projet.getProject().getInfos().getFichierEtu() != null) {
- titreCommentaire2.setText(projet.getProject().getInfos().getFichierEtu());
- }
- if (projet.getProject().getInfos().getDirectories() != null) {
- path1_2.setText(projet.getProject().getInfos().getDirectories().get(projet.getProject().getInfos().FICHETUDES));
- path2_2.setText(projet.getProject().getInfos().getDirectories().get(projet.getProject().getInfos().RUNS));
- path3_2.setText(projet.getProject().getInfos().getDirectories().get(projet.getProject().getInfos().RAPPORTS));
- }
-
- JLabel titredateCreation = new JLabel(FCrueResource.getS("Creation:"));
- JLabel titredateCreation2 = new JLabel();
- if (projet.getProject().getInfos().getInfosVersions() != null
- && projet.getProject().getInfos().getInfosVersions().getDateCreation() != null) {
- titredateCreation2.setText(projet.getProject().getInfos().getInfosVersions().getDateCreation());
- }
-
- JLabel auteurCreation = new JLabel(FCrueResource.getS("Auteur:"));
- JLabel auteurCreation2 = new JLabel();
- if (projet.getProject().getInfos().getInfosVersions() != null
- && projet.getProject().getInfos().getInfosVersions().getAuteurDerniereModif() != null) {
- auteurCreation2.setText(projet.getProject().getInfos().getInfosVersions().getAuteurDerniereModif());
- }
-
- infos.add(titreEtude1);
- BuPanel pptitreEtude2 = new BuPanel(new FlowLayout(FlowLayout.LEFT));
- pptitreEtude2.add(titreEtude2);
- infos.add(pptitreEtude2);
-
- infos.add(titredateCreation);
- infos.add(titredateCreation2);
- infos.add(auteurCreation);
- infos.add(auteurCreation2);
-
- infos.add(titreCommentaire);
- BuPanel pptitreCommentaire2 = new BuPanel(new FlowLayout(FlowLayout.LEFT));
- pptitreCommentaire2.add(titreCommentaire2);
- titreCommentaire2.setDragEnabled(true);
- infos.add(pptitreCommentaire2);
-
- infos.add(path1);
- BuPanel ppath1 = new BuPanel(new FlowLayout(FlowLayout.LEFT));
- ppath1.add(path1_2);
- BuButton parcourir1 = new BuButton(FCrueResource.getS("..."));
- parcourir1.addActionListener(new ActionListener() {
- public void actionPerformed(ActionEvent e) {
- useJfileChooser(path1_2);
- }
- });
- ppath1.add(parcourir1);
-
- infos.add(ppath1);
-
- infos.add(path2);
- BuPanel ppath2 = new BuPanel(new FlowLayout(FlowLayout.LEFT));
- ppath2.add(path2_2);
- BuButton parcourir2 = new BuButton(FCrueResource.getS("..."));
- parcourir2.addActionListener(new ActionListener() {
- public void actionPerformed(ActionEvent e) {
- useJfileChooser(path2_2);
- }
- });
- ppath2.add(parcourir2);
-
- infos.add(ppath2);
-
- infos.add(path3);
- BuPanel ppath3 = new BuPanel(new FlowLayout(FlowLayout.LEFT));
- ppath3.add(path3_2);
- BuButton parcourir3 = new BuButton(FCrueResource.getS("..."));
- parcourir3.addActionListener(new ActionListener() {
- public void actionPerformed(ActionEvent e) {
- useJfileChooser(path3_2);
- }
- });
- ppath3.add(parcourir3);
-
- infos.add(ppath3);
-
- EbliActionSimple actionModifier = new EbliActionSimple(FCrueResource.getS("Valider"), FCrueResource.CRUE
- .getIcon("crystal_oui.png"), "VALIDER") {
-
- @Override
- public void actionPerformed(ActionEvent _e) {
- modifieEtude(titreEtude2.getText(), titreCommentaire2.getText(), path1_2.getText(), path2_2.getText(), path3_2
- .getText());
- }
-
- };
- infos.add(new JLabel());
-
- BuPanel ppmodifier = new BuPanel(new FlowLayout(FlowLayout.RIGHT));
- ppmodifier.add(actionModifier.buildButton(EbliComponentFactory.INSTANCE));
- infos.add(ppmodifier);
-
- }
-
- /**
- * Récupère les champs saisie de l'ihm et modifie les infos du projet crue.
- *
- * @param newEtude
- * @param newCommentaire
- * @param path1
- * @param path2
- * @param path
- */
- private void modifieEtude(String newEtude, String newCommentaire, String path1, String path2, String path3) {
-
- if (projet.getProject().getInfos() != null) {
- EMHProjectInfos infos = projet.getProject().getInfos();
-
- if (newEtude != null) {
- infos.setNomEtude(newEtude);
- }
- if (newCommentaire != null) {
- infos.getInfosVersions().setCommentaire(newCommentaire);
- }
-
- if (path1 != null) {
- infos.getDirectories().put(EMHProjectInfos.FICHETUDES, path1);
- } else if (path2 != null) {
- infos.getDirectories().put(EMHProjectInfos.RUNS, path2);
- } else if (path3 != null) {
- infos.getDirectories().put(EMHProjectInfos.RAPPORTS, path3);
- }
-
- projet.getImpl().message(FCrueResource.getS(""));
- }
-
- }
-
- /**
- * Utilise un chooser pour aider au parcours du fichier.
- *
- * @param field
- */
- public void useJfileChooser(JTextField field) {
- CommomLib.openChooserAndSynchroniseTf(field, projet.getImpl(), FCrueResource.getS("Emplacement du fichier"));
- }
-
-}
Modified: trunk/soft/fudaa-crue/fudaa/src/main/java/org/fudaa/fudaa/crue/view/CrueFilleComparaisonScenario.java
===================================================================
--- trunk/soft/fudaa-crue/fudaa/src/main/java/org/fudaa/fudaa/crue/view/CrueFilleComparaisonScenario.java 2009-05-08 09:43:10 UTC (rev 4737)
+++ trunk/soft/fudaa-crue/fudaa/src/main/java/org/fudaa/fudaa/crue/view/CrueFilleComparaisonScenario.java 2009-05-08 13:07:20 UTC (rev 4738)
@@ -102,7 +102,7 @@
}
// TODO Carole: continuer la comparaison de scenario.
- projet.getManagerError().getAnalyser().addInfo("En cours de développement");
+ projet.getManagerError().getNewAnalyser().addInfo("En cours de développement");
// -- affichage du resultat --//
projet.getManagerError().showDialog(projet.getImpl(), FCrueResource.getS("Résultat comparaison"));
Copied: trunk/soft/fudaa-crue/fudaa/src/main/java/org/fudaa/fudaa/crue/view/CrueFilleEMH.java (from rev 4737, trunk/soft/fudaa-crue/fudaa/src/main/java/org/fudaa/fudaa/crue/view/CrueFicheEMHFille.java)
===================================================================
--- trunk/soft/fudaa-crue/fudaa/src/main/java/org/fudaa/fudaa/crue/view/CrueFilleEMH.java (rev 0)
+++ trunk/soft/fudaa-crue/fudaa/src/main/java/org/fudaa/fudaa/crue/view/CrueFilleEMH.java 2009-05-08 13:07:20 UTC (rev 4738)
@@ -0,0 +1,68 @@
+package org.fudaa.fudaa.crue.view;
+
+import java.awt.BorderLayout;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.swing.JLabel;
+import javax.swing.JScrollPane;
+import javax.swing.ListSelectionModel;
+
+import org.fudaa.fudaa.crue.builder.EMHGeneralBuilder;
+import org.fudaa.fudaa.crue.builder.CrueTreeProject.ScenarioTreeRenderer;
+import org.fudaa.fudaa.crue.common.FCrueResource;
+import org.fudaa.fudaa.crue.projet.CrueProjet;
+import org.jdesktop.swingx.JXTreeTable;
+import org.jdesktop.swingx.treetable.DefaultTreeTableModel;
+
+import com.memoire.bu.BuInternalFrame;
+import com.memoire.bu.BuList;
+
+/**
+ * Affichage rapide des EMH.
+ *
+ * @author Adrien Hadoux
+ */
+public class CrueFilleEMH extends BuInternalFrame {
+ /**
+ *
+ */
+ private static final long serialVersionUID = 4662472594024929109L;
+ CrueProjet projet;
+ BuList listeModeles;
+ BuList listeSousModeles;
+
+ /**
+ * @param projet
+ */
+ public CrueFilleEMH(CrueProjet projet) {
+ super(FCrueResource.getS("Affichage des EMH"), true, true, true, true);
+ this.projet = projet;
+
+ initBuild();
+
+ }
+
+ /**
+ * Init la construction graphique.
+ */
+ public void initBuild() {
+
+ setSize(550, 260);
+
+ DefaultTreeTableModel treeModel = EMHGeneralBuilder.buildTreeScenario(projet.getDataSources());
+
+ List<String> colonnes = new ArrayList<String>();
+ colonnes.add("EMH");
+ treeModel.setColumnIdentifiers(colonnes);
+ JXTreeTable treeEMH = new JXTreeTable(treeModel);
+ treeEMH.setTreeCellRenderer(new ScenarioTreeRenderer());
+ treeEMH.setShowHorizontalLines(true);
+ treeEMH.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
+ this.getContentPane().add(new JScrollPane(treeEMH), BorderLayout.CENTER);
+ this.getContentPane().add(
+ new JLabel(FCrueResource.getS("EMH contenues dans le scénario courant") + " "
+ + projet.getProject().getScenarioCourant().getId()), BorderLayout.NORTH);
+
+ }
+}
Property changes on: trunk/soft/fudaa-crue/fudaa/src/main/java/org/fudaa/fudaa/crue/view/CrueFilleEMH.java
___________________________________________________________________
Added: svn:mergeinfo
+
Modified: trunk/soft/fudaa-crue/fudaa/src/main/java/org/fudaa/fudaa/crue/view/CrueFilleGenerationCrue9.java
===================================================================
--- trunk/soft/fudaa-crue/fudaa/src/main/java/org/fudaa/fudaa/crue/view/CrueFilleGenerationCrue9.java 2009-05-08 09:43:10 UTC (rev 4737)
+++ trunk/soft/fudaa-crue/fudaa/src/main/java/org/fudaa/fudaa/crue/view/CrueFilleGenerationCrue9.java 2009-05-08 13:07:20 UTC (rev 4738)
@@ -11,7 +11,6 @@
import javax.swing.JTabbedPane;
import javax.swing.JTextField;
-import org.fudaa.ctulu.CtuluAnalyze;
import org.fudaa.dodico.crue.metier.EMHScenario;
import org.fudaa.fudaa.crue.builder.CrueScenarioBuilder;
import org.fudaa.fudaa.crue.common.CommomLib;
@@ -170,10 +169,10 @@
EMHScenario scenario = EMHScenario.findById(idScenario, projet.getProject().getListeScenarios());
projet.getManagerError().clear();
- CtuluAnalyze analyze = projet.getManagerError().analyser_;
+ // CtuluAnalyze analyze = projet.getManagerError().analyser_;
if (scenario == null) {
- analyze.addError("generate.error.noScenarioSelected");
+ projet.getManagerError().getNewAnalyser().addError("generate.error.noScenarioSelected");
} else {
ScenarioSaver saver = new ScenarioSaver(pathFichier, scenario, projet);
saver.generateInCrue9();
@@ -192,10 +191,10 @@
EMHScenario scenario = EMHScenario.findById(idScenario, projet.getProject().getListeScenarios());
projet.getManagerError().clear();
- CtuluAnalyze analyze = projet.getManagerError().analyser_;
+ // CtuluAnalyze analyze = projet.getManagerError().analyser_;
if (scenario == null) {
- analyze.addError("generate.error.noScenarioSelected");
+ projet.getManagerError().getNewAnalyser().addError("generate.error.noScenarioSelected");
} else {
ScenarioSaver saver = new ScenarioSaver(pathFichier, scenario, projet);
saver.generateInCrue10();
Copied: trunk/soft/fudaa-crue/fudaa/src/main/java/org/fudaa/fudaa/crue/view/CrueFilleInfosGenerales.java (from rev 4735, trunk/soft/fudaa-crue/fudaa/src/main/java/org/fudaa/fudaa/crue/view/CrueFicheInfosGenerales.java)
===================================================================
--- trunk/soft/fudaa-crue/fudaa/src/main/java/org/fudaa/fudaa/crue/view/CrueFilleInfosGenerales.java (rev 0)
+++ trunk/soft/fudaa-crue/fudaa/src/main/java/org/fudaa/fudaa/crue/view/CrueFilleInfosGenerales.java 2009-05-08 13:07:20 UTC (rev 4738)
@@ -0,0 +1,198 @@
+package org.fudaa.fudaa.crue.view;
+
+import java.awt.FlowLayout;
+import java.awt.GridLayout;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+
+import javax.swing.JLabel;
+import javax.swing.JTextArea;
+import javax.swing.JTextField;
+
+import org.fudaa.dodico.crue.metier.EMHProjectInfos;
+import org.fudaa.ebli.commun.EbliActionSimple;
+import org.fudaa.ebli.commun.EbliComponentFactory;
+import org.fudaa.fudaa.crue.common.CommomLib;
+import org.fudaa.fudaa.crue.common.FCrueResource;
+import org.fudaa.fudaa.crue.projet.CrueProjet;
+
+import com.memoire.bu.BuButton;
+import com.memoire.bu.BuInternalFrame;
+import com.memoire.bu.BuPanel;
+
+public class CrueFilleInfosGenerales extends BuInternalFrame {
+
+ CrueProjet projet;
+
+ public CrueFilleInfosGenerales(CrueProjet projet) {
+ super(FCrueResource.getS("Transformation Crue 9 <=> Crue 10"), true, true, true, true);
+ this.projet = projet;
+
+ initBuild();
+
+ }
+
+ /**
+ * Init la construction graphique.
+ */
+ public void initBuild() {
+
+ setSize(550, 260);
+ BuPanel infos = new BuPanel(new GridLayout(8, 2, 10, 0));
+ this.getContentPane().add(infos);
+
+ // infos.setBorder(BorderFactory.createTitledBorder(FCrueResource.getS("Infos Etude")));
+ setTitle(FCrueResource.getS("Infos Etude"));
+
+ JLabel titreEtude1 = new JLabel(FCrueResource.getS("Etude:"));
+ final JTextField titreEtude2 = new JTextField(projet.getFichierEtu_().getName(), 20);
+ JLabel titreCommentaire = new JLabel(FCrueResource.getS("Commentaire:"));
+ final JTextArea titreCommentaire2 = new JTextArea(1, 20);
+
+ JLabel path1 = new JLabel(projet.getProject().getInfos().FICHETUDES + ":");
+ final JTextField path1_2 = new JTextField(15);
+ JLabel path2 = new JLabel(projet.getProject().getInfos().RUNS + ":");
+ final JTextField path2_2 = new JTextField(15);
+ JLabel path3 = new JLabel(projet.getProject().getInfos().RAPPORTS + ":");
+ final JTextField path3_2 = new JTextField(15);
+
+ if (projet.getProject().getInfos().getFichierEtu() != null) {
+ titreCommentaire2.setText(projet.getProject().getInfos().getFichierEtu());
+ }
+ if (projet.getProject().getInfos().getDirectories() != null) {
+ path1_2.setText(projet.getProject().getInfos().getDirectories().get(projet.getProject().getInfos().FICHETUDES));
+ path2_2.setText(projet.getProject().getInfos().getDirectories().get(projet.getProject().getInfos().RUNS));
+ path3_2.setText(projet.getProject().getInfos().getDirectories().get(projet.getProject().getInfos().RAPPORTS));
+ }
+
+ JLabel titredateCreation = new JLabel(FCrueResource.getS("Creation:"));
+ JLabel titredateCreation2 = new JLabel();
+ if (projet.getProject().getInfos().getInfosVersions() != null
+ && projet.getProject().getInfos().getInfosVersions().getDateCreation() != null) {
+ titredateCreation2.setText(projet.getProject().getInfos().getInfosVersions().getDateCreation());
+ }
+
+ JLabel auteurCreation = new JLabel(FCrueResource.getS("Auteur:"));
+ JLabel auteurCreation2 = new JLabel();
+ if (projet.getProject().getInfos().getInfosVersions() != null
+ && projet.getProject().getInfos().getInfosVersions().getAuteurDerniereModif() != null) {
+ auteurCreation2.setText(projet.getProject().getInfos().getInfosVersions().getAuteurDerniereModif());
+ }
+
+ infos.add(titreEtude1);
+ BuPanel pptitreEtude2 = new BuPanel(new FlowLayout(FlowLayout.LEFT));
+ pptitreEtude2.add(titreEtude2);
+ infos.add(pptitreEtude2);
+
+ infos.add(titredateCreation);
+ infos.add(titredateCreation2);
+ infos.add(auteurCreation);
+ infos.add(auteurCreation2);
+
+ infos.add(titreCommentaire);
+ BuPanel pptitreCommentaire2 = new BuPanel(new FlowLayout(FlowLayout.LEFT));
+ pptitreCommentaire2.add(titreCommentaire2);
+ titreCommentaire2.setDragEnabled(true);
+ infos.add(pptitreCommentaire2);
+
+ infos.add(path1);
+ BuPanel ppath1 = new BuPanel(new FlowLayout(FlowLayout.LEFT));
+ ppath1.add(path1_2);
+ BuButton parcourir1 = new BuButton(FCrueResource.getS("..."));
+ parcourir1.addActionListener(new ActionListener() {
+ public void actionPerformed(ActionEvent e) {
+ useJfileChooser(path1_2);
+ }
+ });
+ ppath1.add(parcourir1);
+
+ infos.add(ppath1);
+
+ infos.add(path2);
+ BuPanel ppath2 = new BuPanel(new FlowLayout(FlowLayout.LEFT));
+ ppath2.add(path2_2);
+ BuButton parcourir2 = new BuButton(FCrueResource.getS("..."));
+ parcourir2.addActionListener(new ActionListener() {
+ public void actionPerformed(ActionEvent e) {
+ useJfileChooser(path2_2);
+ }
+ });
+ ppath2.add(parcourir2);
+
+ infos.add(ppath2);
+
+ infos.add(path3);
+ BuPanel ppath3 = new BuPanel(new FlowLayout(FlowLayout.LEFT));
+ ppath3.add(path3_2);
+ BuButton parcourir3 = new BuButton(FCrueResource.getS("..."));
+ parcourir3.addActionListener(new ActionListener() {
+ public void actionPerformed(ActionEvent e) {
+ useJfileChooser(path3_2);
+ }
+ });
+ ppath3.add(parcourir3);
+
+ infos.add(ppath3);
+
+ EbliActionSimple actionModifier = new EbliActionSimple(FCrueResource.getS("Valider"), FCrueResource.CRUE
+ .getIcon("crystal_oui.png"), "VALIDER") {
+
+ @Override
+ public void actionPerformed(ActionEvent _e) {
+ modifieEtude(titreEtude2.getText(), titreCommentaire2.getText(), path1_2.getText(), path2_2.getText(), path3_2
+ .getText());
+ }
+
+ };
+ infos.add(new JLabel());
+
+ BuPanel ppmodifier = new BuPanel(new FlowLayout(FlowLayout.RIGHT));
+ ppmodifier.add(actionModifier.buildButton(EbliComponentFactory.INSTANCE));
+ infos.add(ppmodifier);
+
+ }
+
+ /**
+ * Récupère les champs saisie de l'ihm et modifie les infos du projet crue.
+ *
+ * @param newEtude
+ * @param newCommentaire
+ * @param path1
+ * @param path2
+ * @param path
+ */
+ private void modifieEtude(String newEtude, String newCommentaire, String path1, String path2, String path3) {
+
+ if (projet.getProject().getInfos() != null) {
+ EMHProjectInfos infos = projet.getProject().getInfos();
+
+ if (newEtude != null) {
+ infos.setNomEtude(newEtude);
+ }
+ if (newCommentaire != null) {
+ infos.getInfosVersions().setCommentaire(newCommentaire);
+ }
+
+ if (path1 != null) {
+ infos.getDirectories().put(EMHProjectInfos.FICHETUDES, path1);
+ } else if (path2 != null) {
+ infos.getDirectories().put(EMHProjectInfos.RUNS, path2);
+ } else if (path3 != null) {
+ infos.getDirectories().put(EMHProjectInfos.RAPPORTS, path3);
+ }
+
+ projet.getImpl().message(FCrueResource.getS(""));
+ }
+
+ }
+
+ /**
+ * Utilise un chooser pour aider au parcours du fichier.
+ *
+ * @param field
+ */
+ public void useJfileChooser(JTextField field) {
+ CommomLib.openChooserAndSynchroniseTf(field, projet.getImpl(), FCrueResource.getS("Emplacement du fichier"));
+ }
+
+}
Property changes on: trunk/soft/fudaa-crue/fudaa/src/main/java/org/fudaa/fudaa/crue/view/CrueFilleInfosGenerales.java
___________________________________________________________________
Added: svn:mergeinfo
+
Deleted: trunk/soft/fudaa-crue/fudaa/src/main/java/org/fudaa/fudaa/crue/view/CruePersistanceErrorManager.java
===================================================================
--- trunk/soft/fudaa-crue/fudaa/src/main/java/org/fudaa/fudaa/crue/view/CruePersistanceErrorManager.java 2009-05-08 09:43:10 UTC (rev 4737)
+++ trunk/soft/fudaa-crue/fudaa/src/main/java/org/fudaa/fudaa/crue/view/CruePersistanceErrorManager.java 2009-05-08 13:07:20 UTC (rev 4738)
@@ -1,132 +0,0 @@
-package org.fudaa.fudaa.crue.view;
-
-import java.awt.BorderLayout;
-import java.awt.Frame;
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.logging.LogRecord;
-
-import javax.swing.JButton;
-import javax.swing.JDialog;
-import javax.swing.JLabel;
-import javax.swing.JPanel;
-import javax.swing.JScrollPane;
-
-import org.fudaa.ctulu.CtuluAnalyze;
-import org.fudaa.ctulu.CtuluDefaultLogFormatter;
-import org.fudaa.ctulu.CtuluUI;
-import org.fudaa.ctulu.gui.CtuluLibSwing;
-import org.fudaa.ebli.ressource.EbliResource;
-import org.fudaa.fudaa.commun.FudaaLib;
-import org.fudaa.fudaa.crue.common.FCrueResource;
-import org.jdesktop.swingx.JXTreeTable;
-import org.jdesktop.swingx.treetable.DefaultMutableTreeTableNode;
-import org.jdesktop.swingx.treetable.DefaultTreeTableModel;
-
-/**
- * Fred: interet de cette classe ? Manager qui indique toutes les erreurs qui se sont produites pendant le chargement.
- *
- * @author Adrien Hadoux
- */
-public class CruePersistanceErrorManager {
-
- public CruePersistanceErrorManager() {
- super();
- this.analyser_ = new CtuluAnalyze();
- }
-
- CtuluAnalyze analyser_ = new CtuluAnalyze();
-
- public CtuluAnalyze getAnalyser() {
- return analyser_;
- }
-
- public void setListeMessageError(final CtuluAnalyze listeMessageError) {
- this.analyser_ = listeMessageError;
- }
-
- public void addMessageError(final String message) {
- analyser_.addError(message);
- }
-
- public void clear() {
-
- analyser_.clear();
-
- }
-
- /**
- * Affiche la dialog avec le resultata du ctuluAnalyse.
- *
- * @param ui
- * @param title
- */
- public void showDialog(final CtuluUI ui, final String title) {
- if (analyser_ == null && ui != null) {
- ui.message(EbliResource.EBLI.getString("Chargement terminé"), EbliResource.EBLI
- .getString("Chargement terminé avec succès"), false);
-
- return;
- }
- DefaultTreeTableModel modeleJX = new DefaultTreeTableModel(constructArborescence(analyser_));
- List<String> colonnes = new ArrayList<String>();
- colonnes.add(FCrueResource.getS("Analyse"));
- modeleJX.setColumnIdentifiers(colonnes);
-
- final JXTreeTable table = new JXTreeTable(modeleJX);
-
- table.setEditable(false);
- final Frame f;
- if (ui != null) {
- f = CtuluLibSwing.getFrameAncestorHelper(ui.getParentComponent());
- } else {
- f = null;
- }
- final JDialog dialog_ = new JDialog(f);
- dialog_.setModal(true);
- dialog_.setTitle(title);
- final JPanel container = new JPanel(new BorderLayout());
- container.add(new JScrollPane(table), BorderLayout.CENTER);
-
- container.add(new JLabel(EbliResource.EBLI.getString("Opération terminé. Informations")), BorderLayout.NORTH);
-
- final JButton ajouter_ = new JButton("Valider", EbliResource.EBLI.getIcon("crystal_valider"));
- ajouter_.addActionListener(new ActionListener() {
-
- public void actionPerformed(final ActionEvent e) {
- dialog_.dispose();
- }
-
- });
- container.add((new JPanel()).add(ajouter_), BorderLayout.SOUTH);
-
- dialog_.setContentPane(container);
- if (ui != null) {
- dialog_.setLocationRelativeTo(ui.getParentComponent());
- }
- // dialog_.pack();
- dialog_.setSize(600, 250);
- dialog_.setVisible(true);
-
- }
-
- private DefaultMutableTreeTableNode constructArborescence(final CtuluAnalyze message) {
- final DefaultMutableTreeTableNode root = new DefaultMutableTreeTableNode("root");
-
- final DefaultMutableTreeTableNode rootFic = new DefaultMutableTreeTableNode(message.getDesc());
- root.add(rootFic);
-
- boolean perfect = message.isEmpty();
- for (LogRecord log : message.getRecords()) {
- rootFic.add(new DefaultMutableTreeTableNode(CtuluDefaultLogFormatter.DEFAULT.format(log)));
- }
- if (perfect) {
- rootFic.add(new DefaultMutableTreeTableNode(FudaaLib.getS("Aucun problème rencontré")));
- }
-
- return root;
- }
-
-}
Modified: trunk/soft/fudaa-crue/fudaa/src/main/java/org/fudaa/fudaa/test/AppCrueTest.java
===================================================================
--- trunk/soft/fudaa-crue/fudaa/src/main/java/org/fudaa/fudaa/test/AppCrueTest.java 2009-05-08 09:43:10 UTC (rev 4737)
+++ trunk/soft/fudaa-crue/fudaa/src/main/java/org/fudaa/fudaa/test/AppCrueTest.java 2009-05-08 13:07:20 UTC (rev 4738)
@@ -10,7 +10,16 @@
import java.util.List;
import java.util.Set;
-import javax.swing.*;
+import javax.swing.BorderFactory;
+import javax.swing.JButton;
+import javax.swing.JComboBox;
+import javax.swing.JFileChooser;
+import javax.swing.JFrame;
+import javax.swing.JLabel;
+import javax.swing.JOptionPane;
+import javax.swing.JPanel;
+import javax.swing.JTabbedPane;
+import javax.swing.JTextField;
import org.fudaa.ctulu.CtuluAnalyze;
import org.fudaa.ctulu.gui.CtuluDialogPanel;
@@ -18,7 +27,7 @@
import org.fudaa.dodico.crue.io.common.Messages;
import org.fudaa.dodico.crue.io.dao.ValidatorXml;
import org.fudaa.fudaa.commun.FudaaLib;
-import org.fudaa.fudaa.crue.view.CruePersistanceErrorManager;
+import org.fudaa.fudaa.crue.view.CrueErrorManager;
/**
* Des methodes poru aider dans les tests
@@ -325,8 +334,8 @@
* @param listeMessageError
*/
public static void getInfosError(final CtuluAnalyze listeMessageError) {
- final CruePersistanceErrorManager manager = new CruePersistanceErrorManager();
- manager.setListeMessageError(listeMessageError);
+ final CrueErrorManager manager = new CrueErrorManager();
+ manager.getAnalyser().add(listeMessageError);
manager.showDialog(null, "R�sultats");
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|