You can subscribe to this list here.
| 2003 |
Jan
|
Feb
(89) |
Mar
(219) |
Apr
(82) |
May
(33) |
Jun
(11) |
Jul
(129) |
Aug
(357) |
Sep
(34) |
Oct
(37) |
Nov
(42) |
Dec
(182) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2004 |
Jan
(59) |
Feb
(74) |
Mar
(196) |
Apr
(205) |
May
(109) |
Jun
(268) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: <jm_...@us...> - 2003-06-08 20:46:57
|
Update of /cvsroot/fudaa//fudaa_devel/dodico/src/org/fudaa/dodico/hydraulique1d/casier In directory sc8-pr-cvs1:/tmp/cvs-serv23014/casier Log Message: Directory /cvsroot/fudaa//fudaa_devel/dodico/src/org/fudaa/dodico/hydraulique1d/casier added to the repository |
|
From: <jm_...@us...> - 2003-06-08 20:28:57
|
Update of /cvsroot/fudaa//fudaa_devel/dodico/idl/metier
In directory sc8-pr-cvs1:/tmp/cvs-serv17953/metier
Modified Files:
hydraulique1d.idl
Log Message:
intégration casier
Index: hydraulique1d.idl
===================================================================
RCS file: /cvsroot/fudaa//fudaa_devel/dodico/idl/metier/hydraulique1d.idl,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** hydraulique1d.idl 1 Apr 2003 08:33:33 -0000 1.3
--- hydraulique1d.idl 8 Jun 2003 20:28:54 -0000 1.4
***************
*** 232,238 ****
interface IReseau : IHydraulique1d
{
! attribute VIBief biefs;
// modificateurs
--- 232,245 ----
+ interface ICasier;
+ typedef sequence <ICasier> VICasier;
+ interface ILiaison;
+ typedef sequence <ILiaison> VILiaison;
+
interface IReseau : IHydraulique1d
{
! attribute VIBief biefs;
! attribute VICasier casiers;
! attribute VILiaison liaisons;
// modificateurs
***************
*** 263,266 ****
--- 270,280 ----
rien supprimeZonesPlanimetrage(in VIZonePlanimetrage zones);
IZonePlanimetrage creeZonePlanimetrage(in entier indiceProfilDebut, in entier indiceProfilFin, in reel taillePas);
+
+ // modificateurs casier
+ ICasier ajouterCasier();
+ rien supprimeCasiers(in VICasier casiers);
+ ILiaison ajouterLiaison();
+ rien supprimeLiaisons(in VILiaison liaisons);
+
// accesseurs
reel getXOrigine();
***************
*** 309,312 ****
--- 323,327 ----
};
+
//************************************************************************/
//* DONNEES HYDRAULIQUES */
***************
*** 795,798 ****
--- 810,820 ----
};
+ interface IParametresGenerauxCasier : IHydraulique1d
+ {
+ attribute reel coefImplicitationCasier;
+ attribute reel coefImplicitationCouplage;
+ attribute entier nbMaxIterationCouplage;
+ };
+
interface IParametresGeneraux : IHydraulique1d
{
***************
*** 815,818 ****
--- 837,841 ----
attribute IMaillage maillage;
attribute IZone zoneEtude;
+ attribute IParametresGenerauxCasier parametresCasier;
rien recalculeZoneEtude(in IReseau reseau);
***************
*** 994,997 ****
--- 1017,1231 ----
attribute IResultatsTemporelSpatial resultatsTemporelSpatial;
};
+
+ //************************************************************************/
+ //* DONNEES CASIER */
+ //************************************************************************/
+ module casier
+ {
+ //*************************************************************/
+ // la topologie */
+ interface ITopologieLiaison : IHydraulique1d
+ {
+ booleen isRiviereCasier();
+ booleen isCasierCasier();
+
+ reel getAbscisse();
+ rien setAbscisse(in reel abscisse);
+ ICasier getCasierRattache();
+ rien setCasierRattache(in ICasier casierRattache);
+ IBief getBiefRattache();
+ rien setBiefRattache(in IBief biefRattache);
+
+ ICasier getCasierAmontRattache();
+ rien setCasierAmontRattache(in ICasier casierRattache);
+ ICasier getCasierAvalRattache();
+ rien setCasierAvalRattache(in ICasier casierRattache);
+ };
+
+ interface ITopologieRiviereCasier : ITopologieLiaison
+ {
+ attribute reel abscisse;
+ attribute IBief biefRattache;
+ attribute ICasier casierRattache;
+ };
+
+ interface ITopologieCasierCasier : ITopologieLiaison
+ {
+ attribute ICasier casierAmontRattache;
+ attribute ICasier casierAvalRattache;
+ };
+ // Fin de la topologie */
+ //*************************************************************/
+
+ //*************************************************************/
+ // les caracteristiques numériques */
+ interface ICaracteristiqueLiaison : IHydraulique1d
+ {
+ attribute reel cote;
+
+ booleen isSeuil();
+ booleen isChenal();
+ booleen isSiphon();
+ reel getCote();
+ rien setCote(in reel cote);
+ reel getLargeur();
+ rien setLargeur(in reel largeur);
+ reel getLongueur();
+ rien setLongueur(in reel longueur);
+ reel getCoefQ();
+ rien setCoefQ(in reel coefQ);
+ reel getSection();
+ rien setSection(in reel section);
+ reel getCoefEnnoiment();
+ rien setCoefEnnoiment(in reel coefEnnoiment);
+ reel getRugosite();
+ rien setRugosite(in reel rugosite);
+ reel getCoefPerteCharge();
+ rien setCoefPerteCharge(in reel coefPerteCharge);
+ };
+
+ interface ISeuilLiaison : ICaracteristiqueLiaison
+ {
+ attribute reel largeur;
+ attribute reel coefQ;
+ attribute reel coefEnnoiment;
+ };
+
+ interface IChenalLiaison : ICaracteristiqueLiaison
+ {
+ attribute reel largeur;
+ attribute reel longueur;
+ attribute reel rugosite;
+ };
+
+ interface ISiphonLiaison : ICaracteristiqueLiaison
+ {
+ attribute reel longueur;
+ attribute reel section;
+ attribute reel coefPerteCharge;
+ };
+ // Fin des caracteristiques numériques */
+ //*************************************************************/
+
+ //*************************************************************/
+ // géométrie casier */
+ interface IGeometrieCasier : IHydraulique1d
+ {
+ attribute reel pasPlanimetrage;
+
+ booleen isSurfaceDependCote();
+ rien setSurfaceDependCote(in booleen surfaceDependCote);
+
+ reel getPasPlanimetrage();
+ rien setPasPlanimetrage(in reel pasPlanimetrage);
+
+ ::geometrie::VSPoint getPointsFrontiere();
+ rien setPointsFrontiere(in ::geometrie::VSPoint points);
+
+ ::geometrie::VSPoint getPointsInterieur();
+ rien setPointsInterieur(in ::geometrie::VSPoint points);
+
+ entier getNbCotePlanimetrage();
+
+ booleen isNuagePoints();
+
+ booleen isPlanimetrage();
+
+ ::geometrie::VSPoint2D getPointsPlanimetrage();
+ rien setPointsPlanimetrage(in ::geometrie::VSPoint2D points);
+
+ };
+
+ interface ICalageImage : IHydraulique1d
+ {
+ attribute ::geometrie::SPoint2D pt1Pixel;
+ attribute ::geometrie::SPoint2D pt1Utilisateur;
+ attribute ::geometrie::SPoint2D pt2Pixel;
+ attribute ::geometrie::SPoint2D pt2Utilisateur;
+ attribute ::geometrie::SPoint2D pt3Pixel;
+ attribute ::geometrie::SPoint2D pt3Utilisateur;
+ };
+
+ interface INuagePointsCasier : IGeometrieCasier
+ {
+ attribute booleen surfaceDependCote;
+ attribute ::geometrie::VSPoint pointsFrontiere;
+ attribute ::geometrie::VSPoint pointsInterieur;
+ attribute binaire image;
+ attribute ICalageImage calage;
+ };
+
+ interface IPlanimetrageCasier : IGeometrieCasier
+ {
+ attribute reel coteInitiale;
+ attribute ::geometrie::VSPoint2D points;
+ };
+
+ // Fin géométrie casier */
+ //*************************************************************/
+
+ }; // Fin du module casier
+
+ interface ILiaison : IHydraulique1d
+ {
+ attribute ::hydraulique1d::casier::ITopologieLiaison topologie;
+ attribute ::hydraulique1d::casier::ICaracteristiqueLiaison caracteristiques;
+
+ // les methodes concernant la topologie
+ booleen isRiviereCasier();
+ rien toRiviereCasier();
+ booleen isCasierCasier();
+ rien toCasierCasier();
+ reel getAbscisse();
+ rien setAbscisse(in reel abscisse);
+ ICasier getCasierRattache();
+ rien setCasierRattache(in ICasier casierRattache);
+ ICasier getCasierAmontRattache();
+ rien setCasierAmontRattache(in ICasier casierRattache);
+ ICasier getCasierAvalRattache();
+ rien setCasierAvalRattache(in ICasier casierRattache);
+
+ // les methodes concernant les caractéristiques numériques
+ booleen isSeuil();
+ rien toSeuil();
+ booleen isChenal();
+ rien toChenal();
+ booleen isSiphon();
+ rien toSiphon();
+ reel getCote();
+ rien setCote(in reel cote);
+ reel getLargeur();
+ rien setLargeur(in reel largeur);
+ reel getLongueur();
+ rien setLongueur(in reel longueur);
+ reel getCoefQ();
+ rien setCoefQ(in reel coefQ);
+ reel getSection();
+ rien setSection(in reel section);
+ reel getCoefEnnoiment();
+ rien setCoefEnnoiment(in reel coefEnnoiment);
+ reel getRugosite();
+ rien setRugosite(in reel rugosite);
+ reel getCoefPerteCharge();
+ rien setCoefPerteCharge(in reel coefPerteCharge);
+ };
+
+ interface ICasier : IHydraulique1d
+ {
+ attribute chaine nom;
+ attribute reel coteInitiale;
+ attribute ::hydraulique1d::loi::ILoiHydrogramme loiRattachee;
+ attribute ::hydraulique1d::casier::IGeometrieCasier geometrie;
+
+ booleen isNuagePoints();
+ rien toNuagePoints();
+
+ booleen isPlanimetrage();
+ rien toPlanimetrage();
+ };
+
+ //************************************************************************/
+ //* FIN DONNEES CASIER */
+ //************************************************************************/
//************************************************************************/
|
|
From: <jm_...@us...> - 2003-06-08 20:28:57
|
Update of /cvsroot/fudaa//fudaa_devel/dodico/idl/code
In directory sc8-pr-cvs1:/tmp/cvs-serv17953/code
Modified Files:
mascaret.idl
Log Message:
intégration casier
Index: mascaret.idl
===================================================================
RCS file: /cvsroot/fudaa//fudaa_devel/dodico/idl/code/mascaret.idl,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** mascaret.idl 1 Apr 2003 08:33:39 -0000 1.3
--- mascaret.idl 8 Jun 2003 20:28:54 -0000 1.4
***************
*** 68,71 ****
--- 68,78 ----
//-----------RUBRIQUE PARAMETRES NUMERIQUES-------------------------
+ // Paramètres numériques utilisé par casier
+ struct SParametresNumCasier {
+ reel coefImplicationSystemeCasiers; // coefficient d'implicitation du systeme des casiers
+ reel coefImplicationDansCouplage; // coefficient d'implicitation dans le couplage
+ entier nbMaxIterationDansCouplage; // nombre maximum d'iteration dans le couplage
+ };
+
// Paramètres numérique
struct SParametresNum {
***************
*** 75,78 ****
--- 82,86 ----
reel hauteurEauMini; // hauteur d'eau minimale
booleen implicitNoyauTrans; // implicitation noyau transcritique
+ SParametresNumCasier parametresNumeriqueCasier; // paramètres numériques utilisé par casier
};
//-----------FIN RUBRIQUE PARAMETRES NUMERIQUES-------------------------
***************
*** 255,258 ****
--- 263,311 ----
//-----------FIN RUBRIQUE SINGULARITE (BARRAGE-SEUIL) ------------
+ //-----------RUBRIQUE CASIER -----------------------------------------------
+ // Paramètres liaisons
+ struct SParametresLiaisons {
+ entier nbLiaisons; // nombre de liaisons
+ ventier types; // liaison type : 1->liaison seuil, 2-> liaison chenal, 3-> liaison siphon
+ ventier nature; // liaison nature : 1->"liaison rivière-casier", 2->"liaison casier-casier"
+ vreel cote; // liaison cote (valeur de la cote de chaques liaisons )
+ vreel largeur; // liaison largeur (largeur pour les liaisons de type chenal ou seuil, -1 pour un siphon)
+ vreel longueur; // liaison longueur (longueur pour les liaisons de type chenal ou siphon, -1 pour un seuil)
+ vreel rugosite; // liaison rugosite (coefficients de Strickler pour les liaisons de type chenal,
+ // -1 pour les seuils et siphons)
+ vreel section; // liaison section (sections transverse pour les liaisons de type siphon, -1 pour les seuils
+ // et chenals)
+ vreel coefPerteCharge; // liaison coefficient perte de charge (coefficients pertes de charge pour les liaisons de
+ // type siphon, -1 pour les seuils et chenals)
+ vreel coefDebit; // liaison coefficient de debit (coefficients de débit pour les liaisons de type seuil,
+ // -1 pour les siphons et chenals)
+ vreel coefEnnoiment; // liaison coefficient d'ennoiment (coefficients d'ennoiment pour les liaisons de type seuil,
+ // -1 pour les siphons et chenals)
+ ventier numCasierOrigine; // liaison numero casier origine (les numéros du casier amont pour une liaison de type "casier-casier"
+ // ou les numéros du casier associé pour une liaison "rivière-casier")
+ ventier numCasierFin; // liaison numero casier fin (les numéros du casier aval pour une liaison de type "casier-casier"
+ // ou -1 pour les liaisons "rivière-casier")
+ ventier numBiefAssocie; // liaison numero du bief associe (les numéros du bief auquel est relié le casier dans le cas d'une
+ // liaison "rivière-casier" ou -1 pour les liaisons de type "casier-casier")
+ vreel abscBief; // liaison abscisse correspondante (les abscisses du bief à laquelle est reliée le casier dans le cas
+ // d'une liaison "rivière-casier" ou ou -1 pour les liaisons de type "casier-casier")
+ };
+
+ // Paramètres casiers
+ struct SParametresCasier {
+ entier nbCasiers; // nombre de casiers
+ ventier optionPlanimetrage; // option de planimetrage : 1-> planimétrage manuel, 2-> planimétrage automatique
+ entier optionCalcul; // option de calcul (si optionPlanimetrage == 2) : 1-> planimétrage à surface constante,
+ // 2-> surface dépendant de la cote
+ chaine fichierGeomCasiers; // fichier geometrie casiers
+ vreel cotesInitiale; // casiers cote initiale (valeurs des cotes initiles de chaque casier)
+ vreel pasPlanimetrage; // casiers pas de planimetrage (si optionPlanimetrage == 2)
+ vreel nbCotesPlanimetrage; // casiers nombre de cotes de planimetrage (si optionPlanimetrage == 2)
+ SParametresLiaisons liaisons; // paramètres liaisons
+ };
+
+
+ //-----------FIN RUBRIQUE CASIER -------------------------------------------
+
//-----------RUBRIQUE APPORTS ET DEVERSOIRS ----------------------
// Paramètres debits d'apports
***************
*** 285,292 ****
--- 338,353 ----
};
+ // Paramètres apports de pluies dans les casiers
+ struct SParametresApportCasier {
+ entier nbApportPluie; // nombre d'apport de pluie
+ ventier numCasier; // numero du casier associe (les numéros du casier associer)
+ ventier numLoi; // numero de la loi associee (les numéros de la loi de type Hydrogramme)
+ };
+
// Paramètres apports et deversoirs
struct SParametresApporDeversoirs {
SParametresQApport debitsApports; // les debits d'apports
SParametresDeversLateraux deversLate; // les deversoirs lateraux
+ SParametresApportCasier apportCasier; // les apports de pluies dans les casiers
};
//-----------FIN RUBRIQUE APPORTS ET DEVERSOIRS ----------------------
***************
*** 445,458 ****
};
// Paramètres impressions - resultats
struct SParametresImpressResult {
chaine titreCalcul; // titre du calcul
! SParametresImpress impression; // impression
! SParametresPasStock pasStockage; // pas de stockage et impression
! SParametresResult resultats; // resultat
! SParametresListing listing; // listing
! SParametresFichReprise fichReprise; // fichier reprise en ecriture
! SParametresRubens rubens; // Rubens
! SParametresStockage stockage; // stockage
};
//-----------FIN RUBRIQUE IMPRESSIONS - RESULTATS-----------------------------------
--- 506,528 ----
};
+ // Paramètres noms fichiers resultats casiers
+ struct SParametresFichResCasier {
+ chaine resultatCasier; // fichier resultats casiers
+ chaine listingCasier; // fichier listing casiers
+ chaine resultatLiaison; // fichier resultats liaisons
+ chaine listingLiaison; // fichier listing liaisons
+ };
+
// Paramètres impressions - resultats
struct SParametresImpressResult {
chaine titreCalcul; // titre du calcul
! SParametresImpress impression; // impression
! SParametresPasStock pasStockage; // pas de stockage et impression
! SParametresResult resultats; // resultat
! SParametresListing listing; // listing
! SParametresFichReprise fichReprise; // fichier reprise en ecriture
! SParametresRubens rubens; // Rubens
! SParametresStockage stockage; // stockage
! SParametresFichResCasier casier; // noms fichiers resultats casiers
};
//-----------FIN RUBRIQUE IMPRESSIONS - RESULTATS-----------------------------------
***************
*** 544,547 ****
--- 614,618 ----
SParametresPlanimMaillage parametresPlanimMaillage; // parametres planimetrage-maillage
SParametresSingularite parametresSingularite; // parametres singularite
+ SParametresCasier parametresCasier; // parametres casiers
SParametresApporDeversoirs parametresApporDeversoirs; // parametres apports et deversoirs
SParametresCalage parametresCalage; // parametres calage
***************
*** 554,662 ****
//-----------FIN CONTENU DU FICHIER CAS MASCARET -----------------------------------
- //-----------RUBRIQUE CASIERS -----------------------------------
- // Parametres casier
- struct SParametresCasier {
- reel coteInit; // cote initiale
- reel pasPlanim; // pas de planimetrage
- booleen optionPlanim; // option de planimetrage
- entier nbZPlanim; // nombre de cotes de planimetrage
- reel ZFond; // cote du fond si optionPlanim==Faux
- vreel Z; // les cotes si optionPlanim==Faux
- vreel surf; // les surfaces si optionPlanim==Faux
- vreel vol; // les volumes si optionPlanim==Faux
- entier optionCalc; // option de calcul si optionPlanim==Faux :
- // 1->"surface constante"
- // 2->"surface dependant de Z"
- entier nbPtsFront; // nombre de points frontieres si optionPlanim==Vrai
- vreel XPtsFront; // abscisses des points frontieres si optionPlanim==Vrai
- vreel YPtsFront; // ordonnes des points frontieres si optionPlanim==Vrai
- vreel ZPtsFront; // Z des points frontieres si optionPlanim==Vrai
- entier nbPtsInter; // nombre de points interieurs si optionPlanim==Vrai
- vreel XPtsInter; // abscisses des points interieurs si optionPlanim==Vrai
- vreel YPtsInter; // ordonnes des points interieurs si optionPlanim==Vrai
- vreel ZPtsInter; // Z des points interieurs si optionPlanim==Vrai
- entier nbLiaison; // nombre de liaisons avec d'autres casiers
- ventier numLiaison; // numeros des liaisons
- ventier numCasier; // numeros des casiers associes
- };
- typedef sequence <SParametresCasier> VSParametresCasier;
-
- // Parametres casiers
- struct SParametresCasiers {
- entier nb; // nombre de casiers
- VSParametresCasier casiers; // les casiers
- };
- //-----------FIN RUBRIQUE CASIERS-------------------------
-
- //-----------RUBRIQUE LIAISONS -----------------------------------
- // Parametres liaison
- struct SParametresLiaison {
- entier type; // type de la liaison : 1->"liaison seuil", 2->"liaison chenal"
- // 3->"liaison siphon", 4->"liaison canal"
- reel cote; // cote Si type==1 ou 2 ou 3
- reel largeur; // largeur Si type==1 ou 2 ou 4
- reel coefQ; // coefficient de debit Si type==1
- reel coefNoyDenoy; // coefficient noye/Denoye Si type==1
- reel longueur; // longeur Si type==2 ou 3 ou 4
- reel rugosite; // rugosite Si type==2 ou 4
- reel section; // section Si type==3
- reel coefPertChar; // coefficient de perte de charge Si type==3
- entier nature; // nature de la liaison : 1->"liaison riviere-casier", 2->"liaison casier-casier"
- entier numCasier; // numero du casier associe Si nature==1
- reel absc; // abscisse correspondante Si nature==1
- };
- typedef sequence <SParametresLiaison> VSParametresLiaison;
-
- // Parametres liaisons
- struct SParametresLiaisons {
- entier nb; // nombre de liaisons
- VSParametresLiaison liaisons; // les liaisons
- };
- //-----------FIN RUBRIQUE LIAISONS -------------------------
-
- //-----------RUBRIQUE APPORTS DE PLUIE ------------------------------
- // Parametres apports pluie
- struct SParametresAppPluie {
- entier nb; // nombre d'apports
- ventier num; // numeros des apports
- ventier numCasier; // numeros du casier associe
- ventier numLoi; // numeros de la loi associee
- };
- //-----------FIN RUBRIQUE APPORTS DE PLUIE -------------------------
-
- //-----------RUBRIQUE PARAMETRES NUMERIQUES ---------------------------
- // Parametres coefficients d'implicitation
- struct SParametresCoefImplicit {
- reel equaResolSysCasier; // equation de resolution du systeme des casiers
- reel equaCouplage; // equation de couplage Lido-Casier
- };
-
- // Parametres numeriques casier
- struct SParametresNumCas {
- SParametresCoefImplicit coefImplicit; // coefficients d'implicitation
- entier nbMaxIterCouplage; // nombre maximum d'iteration dans le couplage Lido-Casier
- };
- //-----------FIN RUBRIQUE PARAMETRES NUMERIQUES -------------------------
-
- //-----------RUBRIQUE FICHIERS ------------------------------
- // Parametres fichiers
- struct SParametresFichiers {
- chaine resultCasiers; // fichier resultats casiers
- chaine listCasiers; // fichier listing casiers
- chaine resultLiaisons; // fichier resultats liaisons
- chaine listLiaisons; // fichier listing liaisons
- };
- //-----------FIN RUBRIQUE APPORTS DE PLUIE -------------------------
-
- //-----------CONTENU DU FICHIER CAS CASIER -------------------------------------------
- // Paramètres du fichier cas
- struct SParametresCasCASIER {
- SParametresCasiers parametresCasiers; // parametres casiers
- SParametresLiaisons parametresLiaisons; // parametres liaisons
- SParametresAppPluie parametresAppPluie; // parametres apports pluie
- SParametresNumCas parametresNum; // parametres numeriques
- SParametresFichiers parametresFichiers; // parametres fichiers
- };
- //-----------FIN CONTENU DU FICHIER CAS CASIER -----------------------------------
//-----------CONTENU DU FICHIER GEOMETRIE -----------------------------------
--- 625,628 ----
***************
*** 689,692 ****
--- 655,681 ----
//-----------FIN CONTENU DU FICHIER GEOMETRIE -----------------------------------
+ //-----------CONTENU DU FICHIER GEOMETRIE CASIER -----------------------------------
+ // Parametres point d'une géométrie casier
+ struct SPtCasier {
+ reel x; // si format "manuel" cote du casier, si format "automatique" abscisse du point
+ reel y; // si format "manuel" surface du casier, si format "automatique" ordonnee du point
+ reel z; // si format "manuel" volume du casier, si format "automatique" hauteur du point
+ chaine typePoint; // si format "manuel" chaine vide, si format "automatique" : "F"->point frontière, "I"->point intérieur
+ };
+ typedef sequence <SPtCasier> VSPtCasier;
+
+ // Géométrie d'un casier
+ struct SGeoCasier {
+ chaine nom; // nom du casier
+ VSPtCasier pts; // les points du casier
+ };
+ typedef sequence <SGeoCasier> VSGeoCasier;
+
+ // Géométrie des casiers
+ struct SGeoCasiers {
+ VSGeoCasier casiers; // la géométrie de tous les casiers
+ };
+ //-----------FIN CONTENU DU FICHIER GEOMETRIE -----------------------------------
+
//-----------CONTENU DU FICHIER "Fichiercas.txt" --------------------------------
struct SParametresNCA {
***************
*** 797,805 ****
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
interface IParametresMascaret : ::calcul::IParametres {
! attribute SParametresCAS parametresCAS; // le fichier cas (parametres) de mascaret sans le module casier
! attribute SParametresCasCASIER parametresCasCASIER; // le fichier cas (parametres) du module casier
! attribute SParametresGEO parametresGEO; // Fichier geometrie contenant les profils en travers
! attribute SParametresREP parametresREP; // Fichier de reprise en lecture
! attribute SParametresNCA parametresNCA; // Fichier contenant le nom du fichier cas
attribute SParametresTailleMaxFichier parametresTailleMaxFichier; // la taille maximum des fichier pour qu'ils soient relus
};
--- 786,794 ----
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
interface IParametresMascaret : ::calcul::IParametres {
! attribute SParametresCAS parametresCAS; // le fichier cas (parametres) de mascaret
! attribute SParametresGEO parametresGEO; // Fichier geometrie contenant les profils en travers
! attribute SGeoCasiers casierGEO; // Fichier geometrie contenant la géométrie des casiers
! attribute SParametresREP parametresREP; // Fichier de reprise en lecture
! attribute SParametresNCA parametresNCA; // Fichier contenant le nom du fichier cas
attribute SParametresTailleMaxFichier parametresTailleMaxFichier; // la taille maximum des fichier pour qu'ils soient relus
};
***************
*** 818,821 ****
--- 807,825 ----
// Fichier de reprise en ecriture
attribute SParametresREP resultatsREP;
+ // Fichier Resultat casier format optyca
+
+ // Fichiers Casiers
+ attribute SResultatsOPT resultatsCasierOPT;
+ // Fichier Resultat casier format Rubens
+ attribute SResultatsRUB resultatsCasierRUB;
+ // Fichier Resultat liaison casier format optyca
+ attribute SResultatsOPT resultatsLiaisonOPT;
+ // Fichier Resultat liaison format Rubens
+ attribute SResultatsRUB resultatsLiaisonRUB;
+ // Fichier listing des casiers
+ attribute SResultatsLIS casierLIS;
+ // Fichier listing des liaisons
+ attribute SResultatsLIS liaisonLIS;
+
};
|
|
From: <de...@us...> - 2003-05-19 14:34:30
|
Update of /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/test/tr
In directory sc8-pr-cvs1:/tmp/cvs-serv3262/test/tr
Added Files:
TestTelemacCasViewer.java cas1.txt
Log Message:
Test pour l'interface dico
--- NEW FILE: TestTelemacCasViewer.java ---
/*
* @file TestTelemacCasViewer.java
* @creation 12 mai 2003
* @modification $Date: 2003/05/19 14:34:26 $
* @license GNU General Public License 2
* @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne
* @mail de...@fu...
*/
package org.fudaa.fudaa.test.tr;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.io.File;
import java.net.URL;
import java.util.HashMap;
import javax.swing.JFrame;
import org.fudaa.dodico.commun.DodicoLib;
import org.fudaa.dodico.telemac.io.TelemacCasFileFormat;
import org.fudaa.fudaa.tr.dico.TrDicoEntitePanel;
import org.fudaa.fudaa.tr.telemac.TrTelemacCasProcess;
import org.fudaa.fudaa.tr.telemac.TrTelemacParametres;
import org.fudaa.fudaa.tr.telemac.TrTelemacProjet;
/**
* @author deniger
* @version $Id: TestTelemacCasViewer.java,v 1.1 2003/05/19 14:34:26 deniger Exp $
*/
public class TestTelemacCasViewer extends JFrame
{
public TestTelemacCasViewer(File _fileCas)
{
System.out.println("creation cas process");
TrTelemacCasProcess process = new TrTelemacCasProcess(null);
initFrame(process.createProjet(_fileCas, TelemacCasFileFormat.getInstance()));
}
private final void initFrame(TrTelemacParametres _param)
{
if (_param == null)
{
System.err.println("params nuls");
}
if (_param != null)
{
TrTelemacProjet proj = new TrTelemacProjet(_param);
TrDicoEntitePanel pn=new TrDicoEntitePanel(_param.getEntiteTableModel());
setContentPane(pn);
}
}
public static void main(String[] args)
{
HashMap arg = DodicoLib.parseArgs(args);
String fileName = (String) arg.get("-f");
File f = null;
if (fileName == null)
{
System.err.println("fichier null -> fichier par defaut");
URL url = TestTelemacCasViewer.class.getResource("cas1.txt");
if (url != null)
f = new File(url.getPath());
}
else
{
f=new File(fileName);
}
if((f==null) || (!f.exists()))
{
System.err.println("Fichier non trouvé");
return;
}
TestTelemacCasViewer frame=new TestTelemacCasViewer(f);
frame.addWindowListener(new WindowAdapter()
{
public void windowClosing(WindowEvent _e){ System.exit(0);}
});
frame.pack();
frame.setVisible(true);
}
}
--- NEW FILE: cas1.txt ---
/----------------------------------------------------------------------
/ TELEMAC-2D Version 5.2R0 - Septembre 2001
/ Exemple d'initiation - Calcul numero 1
/ Calcul de stabilisation 1ere PHASE
/ Debit de 500 m3/sec
/----------------------------------------------------------------------
/ ENVIRONNEMENT INFORMATIQUE
/----------------------------------------------------------------------
/
FICHIER DES PARAMETRES : './cas1.txt'
FICHIER DES CONDITIONS AUX LIMITES : '../../matisse/cli1.txt'
FICHIER DE GEOMETRIE : '../../matisse/geo1'
FICHIER DES FRONTIERES LIQUIDES : './liquide.txt'
FICHIER DES RESULTATS : './resu1.slf'
/
/----------------------------------------------------------------------
/ OPTIONS GENERALES
/----------------------------------------------------------------------
/
TITRE : 'TELEMAC-2D - Initiation - Calcul numero 1'
/
VARIABLES POUR LES SORTIES GRAPHIQUES : 'U,V,S,B,H,Q,M,F'
VARIABLES A IMPRIMER : ''
PAS DE TEMPS : 5.
DUREE DU CALCUL : 10800
PERIODE POUR LES SORTIES GRAPHIQUES : 24
PERIODE DE SORTIE LISTING : 15
/
/----------------------------------------------------------------------
/ CONDITIONS INITIALES
/----------------------------------------------------------------------
/
CONDITIONS INITIALES : 'COTE CONSTANTE'
COTE INITIALE : 265.
/
/----------------------------------------------------------------------
/ CONDITIONS AUX LIMITES
/----------------------------------------------------------------------
/
LOI DE FROTTEMENT SUR LE FOND : 3
COEFFICIENT DE FROTTEMENT : 55.
COTES IMPOSEES : 265.;0
DEBITS IMPOSES : 0;500. / voir aussi liquide.tx
/
/----------------------------------------------------------------------
/ OPTIONS NUMERIQUES
/----------------------------------------------------------------------
/
BANCS DECOUVRANTS : NON
MODELE DE TURBULENCE : 1
BILAN DE MASSE : OUI
NOMBRE DE SOUS-ITERATIONS POUR LES NON-LINEARITES : 1
PRECISION DU SOLVEUR : 1.E-4
FORME DE LA CONVECTION : 1;5
COEFFICIENT DE DIFFUSION DES VITESSES : 1.E-2
SOLVEUR : 7
OPTION DU SOLVEUR : 3
MASS-LUMPING SUR H : 1
MASS-LUMPING SUR LA VITESSE : 1
STOCKAGE DES MATRICES : 3
TRAITEMENT DU SYSTEME LINEAIRE : 2
/
&FIN
|
|
From: <de...@us...> - 2003-05-19 14:32:37
|
Update of /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/test/tr In directory sc8-pr-cvs1:/tmp/cvs-serv2341/tr Log Message: Directory /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/test/tr added to the repository |
Update of /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/telemac
In directory sc8-pr-cvs1:/tmp/cvs-serv1411/tr/telemac
Added Files:
TrTelemacCasProcess.java TrTelemacFilleEntite.java
TrTelemacImplHelper.java TrTelemacParametres.java
TrTelemacProjet.java
Log Message:
Projet preprocesseur commun
--- NEW FILE: TrTelemacCasProcess.java ---
/*
* @file TelemacCasProcess.java
* @creation 16 avr. 2003
* @modification $Date: 2003/05/19 14:31:48 $
* @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.telemac;
import java.awt.Frame;
import java.io.File;
import java.io.IOException;
import com.memoire.bu.BuCommonImplementation;
import org.fudaa.dodico.commun.DodicoLib;
import org.fudaa.dodico.commun.ProgressionInterface;
import org.fudaa.dodico.fichiers.FileReaderInterface;
import org.fudaa.dodico.h2d.H2dFileFormat;
import org.fudaa.dodico.telemac.io.TelemacCasFileFormat;
import org.fudaa.fudaa.commun.FudaaLib;
import org.fudaa.fudaa.tr.dico.TrDicoEntiteFile;
/**
* @author deniger
* @version $Id: TrTelemacCasProcess.java,v 1.1 2003/05/19 14:31:48 deniger Exp $
*/
public class TrTelemacCasProcess
{
ProgressionInterface progress_;
BuCommonImplementation impl_;
boolean error_;
Frame frame_;
public TrTelemacCasProcess(ProgressionInterface _progress, BuCommonImplementation _impl)
{
progress_ = _progress;
impl_ = _impl;
if (impl_ != null)
frame_ = _impl.getFrame();
}
public TrTelemacCasProcess(ProgressionInterface _progress)
{
progress_ = _progress;
}
public TrTelemacParametres createProjet(File _f, TelemacCasFileFormat ft_)
{
TrTelemacParametres r = new TrTelemacParametres();
r.setCas(ft_, _f, this);
if (error_)
return null;
return r;
}
protected void error(String _s)
{
error_ = true;
FudaaLib.showError(impl_, "Erreur", _s);
}
public void maj(TrDicoEntiteFile _e)
{
if (_e.containsErrors())
{
_e.getAnalyze().printResume();
}
}
protected Object read(String _baseDir, String _file, H2dFileFormat _fileFormat, TrDicoEntiteFile _baseEntFile)
{
File f = DodicoLib.getAbsolutePath(_baseDir, _file);
return read(f, _fileFormat, _baseEntFile);
}
protected Object read(File _file, H2dFileFormat _fileFormat, TrDicoEntiteFile _baseEntFile)
{
FileReaderInterface reader = _fileFormat.createReader();
IOException[] e = _fileFormat.read(_file, reader, progress_);
manageException(e, reader, _file);
updateFileDescription(reader, _file, _baseEntFile);
return reader.getInterface();
}
protected void manageException(IOException[] e, FileReaderInterface _i, File _f)
{
if (e != null)
{
System.out.println("impossible de fermer " + _f);
e[0].printStackTrace();
}
}
protected static void updateFileDescription(FileReaderInterface _reader, File _f, TrDicoEntiteFile _r)
{
_r.setLoaded(_reader.getAnalyze(), System.currentTimeMillis(), _reader.getFileFormat(), DodicoLib.getConanicalPath(_f));
}
}
--- NEW FILE: TrTelemacFilleEntite.java ---
/*
* @file TrTelemacFilleEntite.java
* @creation 29 avr. 2003
* @modification $Date: 2003/05/19 14:31:49 $
* @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.telemac;
import java.awt.Color;
import java.awt.Component;
import java.awt.Point;
import java.awt.event.ActionEvent;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import javax.swing.JComponent;
import javax.swing.JTable;
import javax.swing.table.DefaultTableCellRenderer;
import javax.swing.table.TableColumn;
import javax.swing.table.TableColumnModel;
import com.memoire.bu.BuBorderLayout;
import com.memoire.bu.BuButton;
import com.memoire.bu.BuButtonLayout;
import com.memoire.bu.BuInternalFrame;
import com.memoire.bu.BuList;
import com.memoire.bu.BuMenuItem;
import com.memoire.bu.BuPanel;
import com.memoire.bu.BuPopupMenu;
import com.memoire.bu.BuScrollPane;
import com.memoire.bu.BuSplit2Pane;
import com.memoire.bu.BuTabbedPane;
import com.memoire.bu.BuTable;
import com.memoire.bu.BuVerticalLayout;
import org.fudaa.dodico.commun.DodicoLib;
import org.fudaa.dodico.h2d.H2dParametres;
import org.fudaa.fudaa.tr.dico.TrDicoEntiteFile;
import org.fudaa.fudaa.tr.dico.TrDicoEntitePanel;
/**
* @author deniger
* @version $Id: TrTelemacFilleEntite.java,v 1.1 2003/05/19 14:31:49 deniger Exp $
*/
public class TrTelemacFilleEntite extends BuInternalFrame implements MouseListener
{
BuTable table_;
TrTelemacParametres.BaseFileEntiteTableModel model_;
TrTelemacParametres params_;
public TrTelemacFilleEntite(TrTelemacProjet _proj, TrTelemacParametres.BaseFileEntiteTableModel _model)
{
super(_proj.getTitre(), true, false, false, true);
model_ = _model;
params_ = _proj.getTelemacParamatres();
table_ = new BuTable(_model);
table_.addMouseListener(this);
//table_.setPreferredScrollableViewportSize(new Dimension(300, 300));
BuTabbedPane pane = new BuTabbedPane();
BuPanel pnFichiers = new BuPanel();
pnFichiers.setLayout(new BuBorderLayout(5, 5));
pnFichiers.add(new BuScrollPane(table_), BuBorderLayout.CENTER);
TableColumnModel columnModel = table_.getColumnModel();
TableColumn col = columnModel.getColumn(0);
col.setCellRenderer(new FirstCellRenderer());
col = columnModel.getColumn(1);
col.setCellRenderer(new SecondCellRenderer());
BuPanel est = new BuPanel();
est.setLayout(new BuButtonLayout(5, BuButtonLayout.RIGHT));
BuButton bu = new BuButton("Editer");
bu.addActionListener(this);
bu.setActionCommand("EDITER");
est.add(bu);
pnFichiers.add(bu, BuBorderLayout.SOUTH);
pane.addTab("Projet", null, pnFichiers, "Les fichiers du projet");
pane.setSelectedIndex(0);
BuPanel propLeft = new BuPanel();
propLeft.setLayout(new BuVerticalLayout());
BuList list = new BuList();
list.setListData(params_.getDico().getRubriques());
propLeft.add(new BuScrollPane(list));
TrDicoEntitePanel propRight= new TrDicoEntitePanel(params_.getEntiteTableModel());
BuSplit2Pane split = new BuSplit2Pane(propLeft, propRight);
pane.addTab("Propriétés", null, split, "Les propriétés");
setContentPane(pane);
}
public void mouseDown(MouseEvent _evt)
{
}
public void mouseEntered(MouseEvent _evt)
{
}
public void mouseExited(MouseEvent _evt)
{
}
public void mousePressed(MouseEvent _evt)
{
if (_evt.isPopupTrigger() || ((_evt.getModifiers() & MouseEvent.BUTTON3_MASK) != 0))
{
int i = table_.rowAtPoint(new Point(_evt.getX(), _evt.getY()));
if (i >= 0)
table_.setRowSelectionInterval(i, i);
popupMenu(_evt);
}
}
private void popupMenu(MouseEvent _evt)
{
int r = table_.getSelectedRow();
int xe = _evt.getX();
int ye = _evt.getY();
BuPopupMenu menu = new BuPopupMenu(false);
//xe = 20 - menu.getSize().width;
//ye -= 5;
BuMenuItem item = new BuMenuItem("Editer");
item.setActionCommand("EDITER");
item.addActionListener(this);
menu.add(item);
menu.show((JComponent) _evt.getSource(), xe, ye);
}
public void mouseReleased(MouseEvent _evt)
{
}
public void mouseUp(MouseEvent _evt)
{
}
public void mouseClicked(MouseEvent _evt)
{
}
private class FirstCellRenderer extends DefaultTableCellRenderer
{
public FirstCellRenderer()
{
super();
}
protected void setValue(Object value)
{
setText(((TrDicoEntiteFile) value).getEntite().getNom());
}
/**
*
*/
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column)
{
Component c = super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
TrDicoEntiteFile entFile = (TrDicoEntiteFile) value;
setToolTipText(DodicoLib.getAbsolutePath(params_.getDirBase(), entFile.getValue()).toString());
if (H2dParametres.FICHIER_PRINCIPAL.equals(entFile.getType()))
{
c.setForeground(Color.blue);
}
else
{
c.setForeground(Color.black);
}
return c;
}
}
private class SecondCellRenderer extends DefaultTableCellRenderer
{
public SecondCellRenderer()
{
super();
}
protected void setValue(Object value)
{
setText((String) value);
}
}
/**
*
*/
public void actionPerformed(ActionEvent _evt)
{
String com = _evt.getActionCommand();
if ("EDITER".equals(com))
{
int r = table_.getSelectedRow();
model_.editer(r);
}
else
{
super.actionPerformed(_evt);
}
}
}
--- NEW FILE: TrTelemacImplHelper.java ---
/*
* @file TrTelemacImplHelper.java
* @creation 29 avr. 2003
* @modification $Date: 2003/05/19 14:31:49 $
* @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.telemac;
import java.io.File;
import com.memoire.bu.BuTask;
import com.memoire.bu.BuTaskOperation;
import org.fudaa.dodico.commun.ProgressionBuAdapter;
import org.fudaa.dodico.telemac.io.TelemacCasFileFormat;
import org.fudaa.fudaa.tr.TrImplHelper;
import org.fudaa.fudaa.tr.TrImplementation;
/**
* @author deniger
* @version $Id: TrTelemacImplHelper.java,v 1.1 2003/05/19 14:31:49 deniger Exp $
*/
public class TrTelemacImplHelper extends TrImplHelper
{
TrImplementation impl_;
public TrTelemacImplHelper(TrImplementation _impl)
{
impl_=_impl;
}
public void ouvrir()
{
final File fic = impl_.ouvrirFileChooser(TelemacCasFileFormat.getInstance().getExtensions(), "Télémac Fichier cas");
if (fic != null)
{
impl_.setLastDir(fic);
new BuTaskOperation(impl_, "import fichier cas")
{
public void act()
{
ouvrirOpr(fic, this);
}
}
.start();
}
}
public void ouvrirOpr(File _f, BuTask _t)
{
TrTelemacCasProcess process = new TrTelemacCasProcess(new ProgressionBuAdapter(_t), impl_);
TrTelemacParametres param = process.createProjet(_f, TelemacCasFileFormat.getInstance());
if (param != null)
{
TrTelemacProjet proj = new TrTelemacProjet(param);
impl_.addProjet(proj);
}
}
}
--- NEW FILE: TrTelemacParametres.java ---
/*
* @file TelemacProjet.java
* @creation 16 avr. 2003
* @modification $Date: 2003/05/19 14:31:49 $
* @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.telemac;
import java.io.File;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashSet;
import java.util.Hashtable;
import java.util.Iterator;
import java.util.Map;
import java.util.Set;
import javax.swing.table.AbstractTableModel;
import com.memoire.bu.BuInformationsDocument;
import org.fudaa.dodico.commun.DodicoLib;
import org.fudaa.dodico.corba.tr.LTrCodeCalcul;
import org.fudaa.dodico.corba.tr.STrProjetH2d;
import org.fudaa.dodico.dico.DicoEntite;
import org.fudaa.dodico.dico.DicoModelAbstract;
import org.fudaa.dodico.h2d.H2dFileFormat;
import org.fudaa.dodico.h2d.H2dLib;
import org.fudaa.dodico.h2d.H2dParametres;
import org.fudaa.dodico.telemac.io.SerafinInterface;
import org.fudaa.dodico.telemac.io.TelemacCLInterface;
import org.fudaa.dodico.telemac.io.TelemacCasFileFormat;
import org.fudaa.dodico.telemac.io.TelemacCasInterface;
import org.fudaa.dodico.telemac.io.TelemacLiquideInterface;
import org.fudaa.fudaa.tr.TrEditor;
import org.fudaa.fudaa.tr.TrLib;
import org.fudaa.fudaa.tr.dico.TrDicoEntiteFile;
import org.fudaa.fudaa.tr.dico.TrDicoEntiteTableModel;
/**
* @author deniger
* @version $Id: TrTelemacParametres.java,v 1.1 2003/05/19 14:31:49 deniger Exp $
*/
public class TrTelemacParametres extends H2dParametres
{
public final class BaseFileEntiteTableModel extends AbstractTableModel
{
public int getRowCount()
{
return entiteFiles_.size();
}
public int getColumnCount()
{
return 2;
}
public Object getValueAt(int _r, int _c)
{
TrDicoEntiteFile ent = (TrDicoEntiteFile) entiteFiles_.get(_r);
if (_c == 0)
return ent;
else if (_c == 1)
{
return ent.getValue();
}
return null;
}
public String getColumnName(int _c)
{
if (_c == 0)
return "Description";
else
return "Fichier";
}
public void editer(int _r)
{
TrDicoEntiteFile entFile = (TrDicoEntiteFile) entiteFiles_.get(_r);
TrEditor.getInstance().edit(entFile, DodicoLib.getAbsolutePath(dirBase_, entFile.getValue()));
}
}
STrProjetH2d projet_;
private String dirBase_;
private TelemacCasFileFormat ft_;
private BuInformationsDocument infosDoc_;
/**
* Entites-valeurs de ce projet.
*/
private Hashtable entitesValeurs_;
/**
* contient l'id et la description des fichiers speciaux de ce projet
*/
private ArrayList entiteFiles_;
private TrDicoEntiteFile principal_;
public TrTelemacParametres()
{
}
private void initProjet(TelemacCasFileFormat _ft)
{
projet_ = new STrProjetH2d();
projet_.codeCalcul = LTrCodeCalcul.TELEMAC;
projet_.version = _ft.getVersion();
ft_ = _ft;
}
public void updateKey(DicoEntite _ent, String _newValue)
{
if (entitesValeurs_.containsKey(_ent))
{
entitesValeurs_.put(_ent, _newValue);
}
else
{
System.out.println("Entite non trouve");
}
}
public String getTitre()
{
return getEntiteValue(ft_.getTitreEntite());
}
public TrDicoEntiteFile getMainEntityFile()
{
return principal_;
}
public void setCas(TelemacCasFileFormat _ft, File _fichierCas, TrTelemacCasProcess _p)
{
initProjet(_ft);
dirBase_ = DodicoLib.getConanicalPath(_fichierCas.getParentFile());
DicoEntite fichierPrincEntite = ft_.getFichierPrincipalEntite();
if (fichierPrincEntite == null)
{
_p.error("La definition du fichier principal n'a pas été trouvée");
return;
}
principal_ = new TrDicoEntiteFile(FICHIER_PRINCIPAL, fichierPrincEntite, _fichierCas.getName());
TelemacCasInterface inter = (TelemacCasInterface) _p.read(_fichierCas, _ft, principal_);
if ((principal_.containsErrors()))
{
_p.error("Le fichier cas est invalide");
}
else
{
entitesValeurs_ = inter.getInputs();
//suppression de l'entite correspondante au fichier cas
entitesValeurs_.remove(fichierPrincEntite);
//Les entites representant des fichiers du fichier cas
DicoEntite[] entFichiers = ft_.getDico().getFichierEntitesFor(entitesValeurs_);
entiteFiles_ = new ArrayList(entFichiers.length + 3);
synchronized (entiteFiles_)
{
entiteFiles_.add(principal_);
int n = entFichiers.length - 1;
DicoEntite e;
String specialType;
for (int i = n; i >= 0; i--)
{
e = entFichiers[i];
specialType = ft_.getSpecialType(e);
//si fichier special
if (specialType != null)
{
//si ce n'est pas le principal, on l'ajoute
if (!FICHIER_PRINCIPAL.equals(specialType))
{
entiteFiles_.add(new TrDicoEntiteFile(specialType, e, (String) entitesValeurs_.remove(e)));
}
}
else
{
entiteFiles_.add(new TrDicoEntiteFile(null, e, (String) entitesValeurs_.remove(e)));
}
}
}
}
}
public DicoModelAbstract getDico()
{
return ft_.getDico();
}
public boolean loadAll(TrTelemacCasProcess _p)
{
return loadGeometrie(_p) && loadConditionsLimite(_p) && loadConditionsLimiteLiquide(_p);
}
protected synchronized TrDicoEntiteFile getSpecialFileEntite(String _ID)
{
TrDicoEntiteFile ent;
for (Iterator it = entiteFiles_.iterator(); it.hasNext();)
{
ent = (TrDicoEntiteFile) it.next();
if (_ID.equals(ent.getId()))
return ent;
}
return null;
}
protected String getEntiteValue(DicoEntite _e)
{
return (String) entitesValeurs_.get(_e);
}
public boolean loadGeometrie(TrTelemacCasProcess _p)
{
TrDicoEntiteFile entFile = getSpecialFileEntite(H2dParametres.FICHIER_GEOMETRIE);
if (entFile == null)
{
_p.error(TrLib.geti18n("Définition du fichier géométrie non trouvée."));
return false;
}
SerafinInterface sInter = (SerafinInterface) read(_p, entFile, ft_.getDefaultSerafinFormat(), true);
if (sInter == null)
return false;
String fond = ft_.getDefaultSerafinFormat().getVariableFond();
int numVariable = DodicoLib.findObject(sInter.getVariables(), fond);
if (numVariable < 0)
{
//pour l'instant
_p.error("bathymétrie non trouvée variable FOND ou es-tu ?");
return false;
}
int nbPasTemps = sInter.getNbPasDeTemps();
if (nbPasTemps > 1)
{
System.out.println("la variable à t=0 sera prise");
}
double[] fondValues = sInter.getDonnees(0, numVariable);
projet_.maillage = sInter.getMaillage();
return H2dLib.setBathymetrie(projet_.maillage, fondValues);
}
public boolean loadConditionsLimite(TrTelemacCasProcess _p)
{
TrDicoEntiteFile entFile = getSpecialFileEntite(H2dParametres.FICHIER_CL);
if (entFile == null)
{
_p.error(TrLib.geti18n("Définition du fichier de conditions limites non trouvée."));
return false;
}
TelemacCLInterface inter = (TelemacCLInterface) read(_p, entFile, ft_.getDefaultTelemacCLFormat(), true);
if (inter == null)
return false;
projet_.conditionsLimites = inter.getLines();
return true;
}
public boolean loadConditionsLimiteLiquide(TrTelemacCasProcess _p)
{
TrDicoEntiteFile entFile = getSpecialFileEntite(H2dParametres.FICHIER_CL_LIQUIDE);
if (entFile == null)
{
_p.error(TrLib.geti18n("Définition du fichier de conditions limites liquides non trouvée."));
return false;
}
TelemacLiquideInterface inter = (TelemacLiquideInterface) read(_p, entFile, ft_.getDefaultTelemacLiquideFormat(), false);
if (inter == null)
return false;
projet_.evolutionFrontieresLiquides = inter.getEvolutionsFrontieresLiquides();
return true;
}
public boolean loadFond(TrTelemacCasProcess _p)
{
_p.error("non supporté pour l'instant");
return false;
}
private Object read(TrTelemacCasProcess _p, TrDicoEntiteFile _entiteFile, H2dFileFormat _fileFormat, boolean _isVideError)
{
DicoEntite ent = _entiteFile.getEntite();
if (ent == null)
{
if (_isVideError)
{
_p.error("ce n'est pas une entree valide du fichier dico !");
}
return null;
}
String value = getEntiteValue(ent);
//ne devrait jamais arriver
if (value == null)
{
if (_isVideError)
{
_p.error(ent.getNom() + " spécifié mais vide !!!");
}
return null;
}
Object r = _p.read(dirBase_, value, _fileFormat, _entiteFile);
if (_entiteFile.containsErrors())
{
_p.error(ent.getNom() + " fichier invalide");
_p.maj(_entiteFile);
return null;
}
return r;
}
/**
* @return
*/
public String getDirBase()
{
return dirBase_;
}
/**
* @param _string
*/
public void setDirBase(String _string)
{
dirBase_ = _string;
}
/**
* @see org.fudaa.dodico.tr.TrProjetH2d#getInformationsDocument()
*/
public BuInformationsDocument getInformationsDocument()
{
if (infosDoc_ != null)
{
infosDoc_ = new BuInformationsDocument();
}
return infosDoc_;
}
public BaseFileEntiteTableModel getBaseFileEntiteTableModel()
{
return new BaseFileEntiteTableModel();
}
public TrDicoEntiteTableModel getEntiteTableModel()
{
return new TrDicoEntiteTableModel(new HashSet(entitesValeurs_.keySet()))
{
public final Set getAllEntiteSet()
{
return new HashSet(entitesValeurs_.keySet());
}
public final void setValue(DicoEntite _ent, String _value)
{
TrTelemacParametres.this.updateKey(_ent, _value);
}
public Map getUnModifiableEntiteValue()
{
return Collections.unmodifiableMap(entitesValeurs_);
}
public final String getValue(DicoEntite _ent)
{
return (String) entitesValeurs_.get(_ent);
}
};
}
// public TableModel getEntiteTableModel()
// {
// return new AbstractTableModel()
// {
// public int getRowCount()
// {
// return 1;
// }
//
// public int getColumnCount()
// {
// return 2;
// }
//
// public Object getValueAt(int _r, int _c)
// {
// return null;
// }
//
// };
//
// }
}
--- NEW FILE: TrTelemacProjet.java ---
/*
* @file TrTelemacProjet.java
* @creation 29 avr. 2003
* @modification $Date: 2003/05/19 14:31:49 $
* @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.telemac;
import java.awt.Dimension;
import com.memoire.bu.BuCommonImplementation;
import org.fudaa.dodico.h2d.H2dParametres;
import org.fudaa.fudaa.tr.TrProjet;
/**
* @author deniger
* @version $Id: TrTelemacProjet.java,v 1.1 2003/05/19 14:31:49 deniger Exp $
*/
public class TrTelemacProjet extends TrProjet
{
TrTelemacParametres params_;
TrTelemacFilleEntite entiteFille_;
public TrTelemacProjet(TrTelemacParametres _p)
{
params_=_p;
}
public void active(BuCommonImplementation _impl)
{
if(entiteFille_==null)
{
entiteFille_=new TrTelemacFilleEntite(this,params_.getBaseFileEntiteTableModel());
Dimension dim=_impl.getMainPanel().getDesktop().getSize();
entiteFille_.setSize((int)(dim.getWidth()*0.8),(int)(dim.getHeight()*0.8));
entiteFille_.setLocation(0,0);
_impl.addInternalFrame(entiteFille_);
}
entiteFille_.pack();
entiteFille_.setVisible(true);
}
public H2dParametres getParamatres()
{
return getTelemacParamatres();
}
public TrTelemacParametres getTelemacParamatres()
{
return params_;
}
}
|
Update of /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr
In directory sc8-pr-cvs1:/tmp/cvs-serv1411/tr
Added Files:
Tr.java TrCellBooleanEditor.java TrCellBooleanRenderer.java
TrCellDecorator.java TrCellDialogEditor.java
TrCellRenderer.java TrCellTextRenderer.java TrEditor.java
TrEditorExterne.java TrEditorInterface.java
TrEditorInterne.java TrImplHelper.java TrImplementation.java
TrLib.java TrPreferences.java TrProjectManager.java
TrProjet.java TrResource.java
Log Message:
Projet preprocesseur commun
--- NEW FILE: Tr.java ---
/*
* @file Tr.java
* @creation 2002-08-30
* @modification $Date: 2003/05/19 14:31:47 $
* @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.util.Locale;
import com.memoire.bu.BuApplication;
import com.memoire.bu.BuGlassPaneStop;
import com.memoire.bu.BuInformationsSoftware;
import com.memoire.bu.BuLanguagePreferencesPanel;
import com.memoire.bu.BuLib;
import com.memoire.bu.BuPreferences;
import org.fudaa.fudaa.commun.FudaaCommandLineParser;
import org.fudaa.fudaa.commun.FudaaLib;
import org.fudaa.fudaa.commun.FudaaSplashScreen;
/**
* Classe de lancement de l'application Prert. Contient la methode main.
*
* @version $Id: Tr.java,v 1.1 2003/05/19 14:31:47 deniger Exp $
* @author Fred Deniger
*/
public class Tr
{
/**
* put your documentation comment here
* @param args
*/
public static void main (String[] args)
{
if(FudaaLib.DEBUG) System.out.println("mode deboggage");
Thread.currentThread().setName("tr_main_thread");
/* Thread.currentThread().setName("Prert main thread");
Thread.currentThread().setPriority(Thread.NORM_PRIORITY - 1); */
System.out.println("Client Tr");
// Lecture des flags
//TODO: gestion des options
if(FudaaLib.DEBUG) System.out.println("Tr: Lecture des parametres");
FudaaCommandLineParser flags = new FudaaCommandLineParser();
args = flags.parse(args);
if (args.length > 0)
{
System.err.println("L'option " + args[0] + " n'est pas reconnue");
System.err.println("Options valides: " + flags.flagTotalText());
System.exit(1);
}
// Preferences
BuPreferences.BU.applyLookAndFeel();
BuInformationsSoftware il = TrImplementation.informationsSoftware();
if (BuPreferences.BU.getStringProperty("locale.language").equals(""))
{
BuLanguagePreferencesPanel pp = new BuLanguagePreferencesPanel(il.languages);
Locale.setDefault(new Locale(pp.getLocaleString(), ""));
}
BuPreferences.BU.applyLanguage(il.languages);
FudaaSplashScreen ss=null;
if (BuPreferences.BU.getBooleanProperty("splashscreen.visible", true))
{
ss = new FudaaSplashScreen(il, 2000, new String[][]
{
BuLib.SWING_CLASSES, BuLib.BU_CLASSES,
});
// Exception dans Mac L&F
try
{
ss.start();
}
catch (Exception _ex)
{
_ex.printStackTrace();
}
}
if(ss!=null)
{
ss.setProgression(10);
ss.setText("Création de l'application...");
}
BuApplication app = new BuApplication();
app.setImplementation(new TrImplementation());
if(ss!=null)
{
ss.setProgression(20);
}
app.getImplementation().setSplashScreen(ss);
app.init();
BuGlassPaneStop glasspane = new BuGlassPaneStop();
app.setGlassPane(glasspane);
glasspane.setVisible(true);
if(ss!=null)
{
ss.setProgression(100);
ss.setText("Démarrage de l'application");
}
try
{
Thread.currentThread().sleep(500);
}
catch (Exception _ex)
{
_ex.printStackTrace();
}
if(ss!=null)
{
ss.setVisible(false);
ss = null;
}
app.start();
glasspane.setVisible(false);
}
}
--- NEW FILE: TrCellBooleanEditor.java ---
/*
* @file TrCellBooleanEditor.java
* @creation 13 mai 2003
* @modification $Date: 2003/05/19 14:31:47 $
* @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.Component;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.EventObject;
import javax.swing.JTable;
import javax.swing.event.CellEditorListener;
import javax.swing.event.ChangeEvent;
import javax.swing.table.TableCellEditor;
import com.memoire.bu.BuCheckBox;
/**
* @author deniger
* @version $Id: TrCellBooleanEditor.java,v 1.1 2003/05/19 14:31:47 deniger Exp $
*/
public class TrCellBooleanEditor extends BuCheckBox implements TableCellEditor, ActionListener
{
private String trueValue_;
private String falseValue_;
private String oldValue_;
private boolean oldBooleanValue_;
public TrCellBooleanEditor()
{
this("true", "false");
}
public TrCellBooleanEditor(String _trueValue, String _falseValue)
{
trueValue_ = _trueValue;
falseValue_ = _falseValue;
addActionListener(this);
setOpaque(true);
}
/**
*
*/
public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column)
{
setValue(value);
return this;
}
/**
*
*/
public Object getCellEditorValue()
{
if (isSelected() == oldBooleanValue_)
return oldValue_;
else
return isSelected() ? trueValue_ : falseValue_;
}
/**
*
*/
public boolean isCellEditable(EventObject anEvent)
{
return true;
}
/**
*
*/
public boolean shouldSelectCell(EventObject anEvent)
{
return true;
}
/**
*
*/
public boolean stopCellEditing()
{
Object[] listeners = listenerList.getListenerList();
for (int i = listeners.length - 2; i >= 0; i -= 2)
{
if (listeners[i] == CellEditorListener.class)
{
if (changeEvent == null)
changeEvent = new ChangeEvent(this);
((CellEditorListener) listeners[i + 1]).editingStopped(changeEvent);
}
}
return true;
}
public void setValue(Object _o)
{
oldValue_ = (String) _o;
if (trueValue_ == oldValue_)
setValue(true);
else if (falseValue_ == oldValue_)
setValue(false);
else
setValue(getValue(_o));
}
public boolean getValue(Object value)
{
return Boolean.getBoolean(value.toString());
}
public void setValue(boolean _b)
{
setSelected(_b);
oldBooleanValue_ = _b;
}
/**
*
*/
public void cancelCellEditing()
{
Object[] listeners = listenerList.getListenerList();
for (int i = listeners.length - 2; i >= 0; i -= 2)
{
if (listeners[i] == CellEditorListener.class)
{
if (changeEvent == null)
changeEvent = new ChangeEvent(this);
((CellEditorListener) listeners[i + 1]).editingCanceled(changeEvent);
}
}
}
/**
*
*/
public void addCellEditorListener(CellEditorListener l)
{
listenerList.add(CellEditorListener.class, l);
}
/**
*
*/
public void removeCellEditorListener(CellEditorListener l)
{
listenerList.remove(CellEditorListener.class, l);
}
/**
*
*/
public void actionPerformed(ActionEvent e)
{
stopCellEditing();
}
}
--- NEW FILE: TrCellBooleanRenderer.java ---
/*
* @file TrCellBooleanRenderer.java
* @creation 13 mai 2003
* @modification $Date: 2003/05/19 14:31:47 $
* @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.Component;
import java.awt.Rectangle;
import javax.swing.JList;
import javax.swing.JTable;
import javax.swing.UIManager;
import com.memoire.bu.BuCheckBox;
import org.fudaa.dodico.dico.DicoDataType;
/**
* @author deniger
* @version $Id: TrCellBooleanRenderer.java,v 1.1 2003/05/19 14:31:47 deniger Exp $
*/
public abstract class TrCellBooleanRenderer extends BuCheckBox implements TrCellRenderer
{
private TrCellDecorator decorator_;
public TrCellBooleanRenderer()
{
}
public TrCellBooleanRenderer(TrCellDecorator _deco)
{
setDecorator(_deco);
}
public boolean isOpaque()
{
return true;
}
public void validate()
{
}
public void revalidate()
{
}
public void repaint(long tm, int x, int y, int width, int height)
{
}
public void repaint(Rectangle r)
{
}
protected void firePropertyChange(String propertyName, Object oldValue, Object newValue)
{
if ("text" == propertyName)
super.firePropertyChange(propertyName, oldValue, newValue);
}
public void firePropertyChange(String propertyName, boolean oldValue, boolean newValue)
{
}
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column)
{
if (isSelected)
{
super.setForeground(table.getSelectionForeground());
super.setBackground(table.getSelectionBackground());
}
else
{
super.setForeground(table.getForeground());
super.setBackground(table.getBackground());
}
if (hasFocus)
{
setBorder(UIManager.getBorder("Table.focusCellHighlightBorder"));
if (table.isCellEditable(row, column))
{
super.setForeground(UIManager.getColor("Table.focusCellForeground"));
super.setBackground(UIManager.getColor("Table.focusCellBackground"));
}
}
else
setBorder(BORDER_NO_FOCUS);
setValue(value);
return this;
}
public void setValue(Object value)
{
setSelected(Boolean.getBoolean(value.toString()));
}
public static class H2dBooleanRenderer extends TrCellBooleanRenderer
{
public H2dBooleanRenderer()
{
this(null);
}
public H2dBooleanRenderer(TrCellDecorator _deco)
{
super(_deco);
}
public void setValue(Object value)
{
setSelected(DicoDataType.Binaire.getValue((String) value));
}
}
/**
*
*/
public final void setDecorator(TrCellDecorator _c)
{
decorator_ = _c;
}
/**
*
*/
public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus)
{
setComponentOrientation(list.getComponentOrientation());
if (isSelected)
{
setBackground(list.getSelectionBackground());
setForeground(list.getSelectionForeground());
}
else
{
setBackground(list.getBackground());
setForeground(list.getForeground());
}
setEnabled(list.isEnabled());
setFont(list.getFont());
setBorder((cellHasFocus) ? UIManager.getBorder("List.focusCellHighlightBorder") : BORDER_NO_FOCUS);
if (decorator_ != null)
decorator_.decore(this, list, value, index);
setValue(value);
return this;
}
}
--- NEW FILE: TrCellDecorator.java ---
/*
* @file TrCellDecorator.java
* @creation 15 mai 2003
* @modification $Date: 2003/05/19 14:31:47 $
* @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 javax.swing.JComponent;
import javax.swing.JList;
import javax.swing.JTable;
/**
* @author deniger
* @version $Id: TrCellDecorator.java,v 1.1 2003/05/19 14:31:47 deniger Exp $
*/
public interface TrCellDecorator
{
public void decore(JComponent c,JTable table,Object value,int row,int col);
public void decore(JComponent c,JList table,Object value,int index);
}
--- NEW FILE: TrCellDialogEditor.java ---
/*
* @file TrCellDialogEditor.java
* @creation 13 mai 2003
* @modification $Date: 2003/05/19 14:31:47 $
* @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.Component;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.util.EventObject;
import javax.swing.JOptionPane;
import javax.swing.JTable;
import javax.swing.SwingUtilities;
import javax.swing.event.CellEditorListener;
import javax.swing.event.ChangeEvent;
import javax.swing.table.TableCellEditor;
import com.memoire.bu.BuLabel;
import org.fudaa.ebli.dialog.EbliSimpleDialog;
/**
* @author deniger
* @version $Id: TrCellDialogEditor.java,v 1.1 2003/05/19 14:31:47 deniger Exp $
*/
public class TrCellDialogEditor extends BuLabel implements TableCellEditor, MouseListener
{
protected EbliSimpleDialog dialog_;
private transient ChangeEvent changeEvent = null;
public TrCellDialogEditor(EbliSimpleDialog _dialog)
{
setOpaque(true);
setEnabled(true);
addMouseListener(this);
dialog_=_dialog;
}
/**
*
*/
public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column)
{
String s=(String)value;
setText(s);
return this;
}
/**
*
*/
public Object getCellEditorValue()
{
return getText();
}
/**
*
*/
public boolean isCellEditable(EventObject anEvent)
{
return true;
}
/**
*
*/
public boolean shouldSelectCell(EventObject anEvent)
{
return true;
}
/**
*
*/
public void cancelCellEditing()
{
Object[] listeners = listenerList.getListenerList();
for (int i = listeners.length - 2; i >= 0; i -= 2)
{
if (listeners[i] == CellEditorListener.class)
{
if (changeEvent == null)
changeEvent = new ChangeEvent(this);
((CellEditorListener) listeners[i + 1]).editingCanceled(changeEvent);
}
}
}
/**
*
*/
public void addCellEditorListener(CellEditorListener l)
{
listenerList.add(CellEditorListener.class, l);
}
/**
*
*/
public void removeCellEditorListener(CellEditorListener l)
{
listenerList.remove(CellEditorListener.class, l);
}
public boolean stopCellEditing()
{
Object[] listeners = listenerList.getListenerList();
for (int i = listeners.length - 2; i >= 0; i -= 2)
{
if (listeners[i] == CellEditorListener.class)
{
if (changeEvent == null)
changeEvent = new ChangeEvent(this);
((CellEditorListener) listeners[i + 1]).editingStopped(changeEvent);
}
}
return false;
}
public void mouseClicked(MouseEvent e)
{
if ((SwingUtilities.isLeftMouseButton(e)) && (e.getSource().equals(this)))
{
dialog_.setValue(getText());
int r=dialog_.afficheModale(this,"");
if(r==JOptionPane.OK_OPTION)
{
setText(dialog_.getValue());
}
stopCellEditing();
}
}
/**
*
*/
public void mouseEntered(MouseEvent e)
{
}
/**
*
*/
public void mouseExited(MouseEvent e)
{
}
/**
*
*/
public void mousePressed(MouseEvent e)
{
}
/**
*
*/
public void mouseReleased(MouseEvent e)
{
}
}
--- NEW FILE: TrCellRenderer.java ---
/*
* @file TrCellDecorator.java
* @creation 15 mai 2003
* @modification $Date: 2003/05/19 14:31:47 $
* @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 javax.swing.ListCellRenderer;
import javax.swing.border.Border;
import javax.swing.border.EmptyBorder;
import javax.swing.table.TableCellRenderer;
/**
* @author deniger
* @version $Id: TrCellRenderer.java,v 1.1 2003/05/19 14:31:47 deniger Exp $
*/
public interface TrCellRenderer extends TableCellRenderer,ListCellRenderer
{
public static Border BORDER_NO_FOCUS= new EmptyBorder(1, 1, 1, 1);
public void setDecorator(TrCellDecorator _c);
}
--- NEW FILE: TrCellTextRenderer.java ---
/*
* @file TrDefaultCellEditor.java
* @creation 15 mai 2003
* @modification $Date: 2003/05/19 14:31:47 $
* @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.Color;
import java.awt.Component;
import java.awt.Rectangle;
import javax.swing.JLabel;
import javax.swing.JList;
import javax.swing.JTable;
import javax.swing.UIManager;
/**
* @author fred deniger
* @version $Id: TrCellTextRenderer.java,v 1.1 2003/05/19 14:31:47 deniger Exp $
*
*/
public class TrCellTextRenderer
extends JLabel
implements TrCellRenderer
{
private TrCellDecorator decorator_;
protected Color cellForeground_;
protected Color cellBackground_;
public TrCellTextRenderer()
{
this(null);
}
public TrCellTextRenderer(TrCellDecorator _deco)
{
super();
setDecorator(_deco);
setOpaque(true);
setBorder(BORDER_NO_FOCUS);
}
public void updateUI()
{
super.updateUI();
setForeground(null);
setBackground(null);
}
public Component getTableCellRendererComponent(
JTable table,
Object value,
boolean isSelected,
boolean hasFocus,
int row,
int column)
{
if (isSelected)
{
super.setForeground(table.getSelectionForeground());
super.setBackground(table.getSelectionBackground());
}
else
{
super.setForeground(
(cellForeground_ != null) ? cellForeground_ : table.getForeground());
super.setBackground(
(cellBackground_ != null) ? cellBackground_ : table.getBackground());
}
setFont(table.getFont());
if (hasFocus)
{
setBorder(UIManager.getBorder("Table.focusCellHighlightBorder"));
if (table.isCellEditable(row, column))
{
super.setForeground(UIManager.getColor("Table.focusCellForeground"));
super.setBackground(UIManager.getColor("Table.focusCellBackground"));
}
}
else
{
setBorder(BORDER_NO_FOCUS);
}
setValue(value);
if(decorator_!=null) decorator_.decore(this,table,value,row,column);
return this;
}
public void validate()
{
}
/**
* Overridden for performance reasons.
* See the <a href="#override">Implementation Note</a>
* for more information.
*/
public void revalidate()
{
}
/**
* Overridden for performance reasons.
* See the <a href="#override">Implementation Note</a>
* for more information.
*/
public void repaint(long tm, int x, int y, int width, int height)
{
}
public void repaint(Rectangle r)
{
}
protected void firePropertyChange(
String propertyName,
Object oldValue,
Object newValue)
{
if (propertyName == "text")
{
super.firePropertyChange(propertyName, oldValue, newValue);
}
}
public void firePropertyChange(
String propertyName,
boolean oldValue,
boolean newValue)
{
}
protected void setValue(Object value)
{
setText((value == null) ? "" : value.toString());
}
/**
* @return
*/
public Color getCellBackground()
{
return cellBackground_;
}
/**
* @return
*/
public Color getCellForeground()
{
return cellForeground_;
}
/**
* @param _color
*/
public void setCellBackground(Color _color)
{
cellBackground_= _color;
}
/**
* @param _color
*/
public void setCellForeground(Color _color)
{
cellForeground_= _color;
}
/**
* @param list
* @param value
* @param index
* @param isSelected
* @param cellHasFocus
* @return
*/
public Component getListCellRendererComponent(
JList list,
Object value,
int index,
boolean isSelected,
boolean cellHasFocus)
{
setComponentOrientation(list.getComponentOrientation());
if (isSelected)
{
setBackground(list.getSelectionBackground());
setForeground(list.getSelectionForeground());
}
else
{
setBackground(list.getBackground());
setForeground(list.getForeground());
}
setEnabled(list.isEnabled());
setFont(list.getFont());
setBorder(
(cellHasFocus)
? UIManager.getBorder("List.focusCellHighlightBorder")
: BORDER_NO_FOCUS);
if(decorator_!=null) decorator_.decore(this, list, value, index);
setValue(value);
return this;
}
/**
*
*/
public final void setDecorator(TrCellDecorator _c)
{
decorator_=_c;
}
}
--- NEW FILE: TrEditor.java ---
/*
* @file TrEditor.java
* @creation 30 avr. 2003
* @modification $Date: 2003/05/19 14:31:48 $
* @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.io.File;
import java.util.StringTokenizer;
import org.fudaa.fudaa.commun.FudaaLib;
import org.fudaa.fudaa.tr.dico.*;
/**
* @author deniger
* @version $Id: TrEditor.java,v 1.1 2003/05/19 14:31:48 deniger Exp $
*/
public class TrEditor
{
TrEditorExterne[] editors_;
TrEditorInterface defautTextEditor_;
TrEditorInterne interne_;
String interneName_ = "interne";
private static TrEditor INSTANCE=new TrEditor();
public final static TrEditor getInstance()
{
return INSTANCE;
}
private TrEditor()
{
load();
}
private final void load()
{
String editors = TrPreferences.TR.getStringProperty("editors.extern.list", "");
StringTokenizer st = new StringTokenizer(editors, ",");
editors_ = new TrEditorExterne[st.countTokens()];
int i = 0;
while (st.hasMoreTokens())
{
String name = st.nextToken();
String cmd = TrPreferences.TR.getStringProperty("editor." + name + ".cmd", null);
if (cmd == null)
{
System.out.println("la commande est nulle");
cmd = name;
}
System.out.println(cmd);
editors_[i++] = new TrEditorExterne(cmd, name);
}
if (i != editors_.length)
{
System.out.println("probleme de decompte");
}
String defautEditor = TrPreferences.TR.getStringProperty("editor.default", interneName_);
defautTextEditor_ = findEditor(defautEditor);
if (defautTextEditor_ == null)
{
if (interne_ == null)
{
interne_ = new TrEditorInterne(interneName_);
}
defautTextEditor_ = interne_;
if(FudaaLib.DEBUG)
System.out.println("editeur par defaut "+defautTextEditor_.getName());
}
}
/**
* @param _f l'entite a editer.
* @return l'editeur correspondante a l'entite _f.
*/
private TrEditorInterface getEditor(TrDicoEntiteFile _f)
{
String editor = TrPreferences.TR.getStringProperty(_f.getEntite().getPrefId() + "editor", null);
TrEditorInterface r = null;
if (editor != null)
{
r = findEditor(editor);
}
return (r != null) ? r : defautTextEditor_;
}
private TrEditorInterface findEditor(String _name)
{
if (interneName_.equals(_name))
{
if (interne_ == null)
{
interne_ = new TrEditorInterne(interneName_);
}
return interne_;
}
int n = editors_.length - 1;
TrEditorInterface edit;
for (int i = n; i >= 0; i--)
{
edit = editors_[i];
if (edit.getName().equals(_name))
{
return edit;
}
}
return null;
}
public void edit(TrDicoEntiteFile _ent,File _file)
{
getEditor(_ent).edit(_file);
}
}
--- NEW FILE: TrEditorExterne.java ---
/*
* @file TrEditorExterne.java
* @creation 30 avr. 2003
* @modification $Date: 2003/05/19 14:31:48 $
* @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.io.File;
import java.io.IOException;
/**
* @author deniger
* @version $Id: TrEditorExterne.java,v 1.1 2003/05/19 14:31:48 deniger Exp $
*/
public class TrEditorExterne implements TrEditorInterface
{
String cmd_;
String name_;
public TrEditorExterne(String _cmd, String _name)
{
cmd_ = _cmd;
name_ = _name;
}
public synchronized void edit(File _f)
{
if (_f != null)
{
String[] cmd = new String[] { getName(), _f.getAbsolutePath()};
try
{
Process p = Runtime.getRuntime().exec(cmd);
}
catch (IOException e)
{
e.printStackTrace();
}
}
}
/**
* @return
*/
public String getCmd()
{
return cmd_;
}
/**
* @return
*/
public String getName()
{
return name_;
}
}
--- NEW FILE: TrEditorInterface.java ---
/*
* @file TrEditorInterface.java
* @creation 30 avr. 2003
* @modification $Date: 2003/05/19 14:31:48 $
* @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.io.File;
/**
* @author deniger
* @version $Id: TrEditorInterface.java,v 1.1 2003/05/19 14:31:48 deniger Exp $
*/
public interface TrEditorInterface
{
public void edit(File _f);
public String getName();
public String getCmd();
}
--- NEW FILE: TrEditorInterne.java ---
/*
* @file TrEditorInterne.java
* @creation 30 avr. 2003
* @modification $Date: 2003/05/19 14:31:48 $
* @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.Component;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import javax.swing.JFrame;
import javax.swing.JScrollPane;
import com.memoire.editor.EditorButextarea;
import com.memoire.editor.EditorButextpane;
/**
* @author deniger
* @version $Id: TrEditorInterne.java,v 1.1 2003/05/19 14:31:48 deniger Exp $
*/
public class TrEditorInterne implements TrEditorInterface
{
String name_;
public TrEditorInterne(String _name)
{
name_=_name;
}
/**
*
*/
public void edit(File _f)
{
String r = null;
FileInputStream in = null;
try
{
in = new FileInputStream(_f);
int l = in.available();
byte[] bs = new byte[l];
in.read(bs, 0, l);
//TODO gerer l'encoding
r = new String(bs);
}
catch (IOException _io)
{
_io.printStackTrace();
return;
}
finally
{
try
{
if (in != null)
in.close();
}
catch (IOException _io)
{
System.out.println("probleme lors de la fermeture");
_io.printStackTrace();
}
}
if (r != null)
{
EditorButextpane edit = new EditorButextpane();
edit.start();
edit.setText(r);
JFrame f = new JFrame(_f.getAbsolutePath());
f.getContentPane().add("Center", new JScrollPane((Component) edit.getGUI()));
f.setSize(400, 300);
f.show();
edit.run();
}
}
/**
*
*/
public String getCmd()
{
return null;
}
/**
*
*/
public String getName()
{
return name_;
}
}
--- NEW FILE: TrImplHelper.java ---
/*
* @file TrImplHelper.java
* @creation 29 avr. 2003
* @modification $Date: 2003/05/19 14:31:48 $
* @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;
/**
* @author deniger
* @version $Id: TrImplHelper.java,v 1.1 2003/05/19 14:31:48 deniger Exp $
*/
public abstract class TrImplHelper
{
public abstract void ouvrir();
}
--- NEW FILE: TrImplementation.java ---
/*
* @file TrImplementation.java
* @creation 2002-08-29
* @modification $Date: 2003/05/19 14:31:48 $
* @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.Dimension;
import java.awt.event.ActionEvent;
import java.io.File;
import javax.swing.JScrollPane;
import com.memoire.bu.BuColumn;
import com.memoire.bu.BuFileChooser;
import com.memoire.bu.BuFileFilter;
import com.memoire.bu.BuInformationsDocument;
import com.memoire.bu.BuInformationsSoftware;
import com.memoire.bu.BuMainPanel;
import com.memoire.bu.BuPreferences;
import com.memoire.bu.BuResource;
import com.memoire.bu.BuScrollPane;
import com.memoire.bu.BuTaskView;
import org.fudaa.dodico.h2d.H2dParametres;
import org.fudaa.ebli.calque.BArbreCalque;
import org.fudaa.ebli.ressource.EbliResource;
import org.fudaa.fudaa.commun.FudaaImplementation;
import org.fudaa.fudaa.commun.FudaaLib;
import org.fudaa.fudaa.tr.telemac.TrTelemacImplHelper;
/**
* L'implementation du client Tr.
*
* @version $Id: TrImplementation.java,v 1.1 2003/05/19 14:31:48 deniger Exp $
* @author Fred Deniger
*/
public class TrImplementation extends FudaaImplementation
{
private final static BuInformationsSoftware isRt_ = new BuInformationsSoftware();
static {
isRt_.name = "Tr";
isRt_.version = "0.0";
isRt_.date = "29-avril-2003";
isRt_.rights = "Tous droits réservés. CETMEF (c)2000";
isRt_.contact = "deniger";
isRt_.license = "GPL2";
isRt_.languages = "fr";
isRt_.logo = null;
isRt_.banner = null;
isRt_.http = "";
isRt_.update = "";
isRt_.man = "";
isRt_.authors = new String[] { "Frédéric Deniger" };
isRt_.contributors = new String[] { "Equipes Dodico, Ebli et Fudaa" };
isRt_.documentors = new String[] { "" };
isRt_.testers = new String[] { "Frédéric Deniger" };
// idTr_.logo = EbliResource.EBLI.getIcon("minlogo.gif");
}
protected BArbreCalque arbre_;
private String lastDir_;
private TrProjectManager projectManager_;
private TrImplHelper implHelper_;
BuTaskView taches_;
public void actionPerformed(ActionEvent _evt)
{
String action = _evt.getActionCommand();
if (action == null)
return;
if (FudaaLib.DEBUG)
System.err.println("ACTION=" + action);
if("OUVRIR".equals(action))
{
implHelper_.ouvrir();
}
// if("IMPORT:IMAGE".equals(action)) importerImage();
// else if(action.startsWith("IMPORT:MNT:"))
// {
// TrFormatMenuItem it=(TrFormatMenuItem)_evt.getSource();
// importerMNT(it);
// }
// else if("CREER".equals(action)) creer();
}
protected void connecter()
{
System.out.println("pas de connexion");
}
private void creer()
{
}
public BuPreferences getApplicationPreferences()
{
return TrPreferences.TR;
}
public BuInformationsDocument getInformationsDocument()
{
if (projetCourant() == null)
return null;
return projetCourant().getInformationsDocument();
}
public BuInformationsSoftware getInformationsSoftware()
{
return isRt_;
}
private String getLastDir()
{
return lastDir_;
}
public void init()
{
super.init();
//BuMenuBar mb = getApp().getMainMenuBar();
// BuMenu importer=(BuMenu)mb.getMenu("IMPORTER");
// ajouteMNTImportMenus(importer,"IMPORT:MNT:");
// importer.addMenuItem("Image","IMPORT:IMAGE",true);
BuMainPanel mp = getMainPanel();
BuColumn lc = mp.getLeftColumn();
BuColumn rc = mp.getRightColumn();
lc.setBorder(null);
// rc.setBorder(new EmptyBorder(0,2,0,2));
taches_ = new BuTaskView();
BuScrollPane sp = new BuScrollPane(taches_);
sp.setPreferredSize(new Dimension(150, 80));
rc.addToggledComponent(BuResource.BU.getString("Tâches"), "TACHE", sp, this);
mp.setTaskView(taches_);
setEnabledForAction("CREER", false);
setEnabledForAction("OUVRIR", true);
//setEnabledForAction("EXPORTER" ,true);
setEnabledForAction("IMPORTER", false);
setEnabledForAction("FERMER", true);
projectManager_=new TrProjectManager();
//DEBUG: a modifer
implHelper_=new TrTelemacImplHelper(this);
}
public File ouvrirFileChooser(String[] _extension, String _desc)
{
return ouvrirFileChooser(_extension, _desc, getLastDir());
}
public File ouvrirFileChooser(String[] _extension, String _desc, String _defautDir)
{
BuFileChooser fileChooser = new BuFileChooser();
fileChooser.setFileHidingEnabled(true);
if (_defautDir == null)
fileChooser.setCurrentDirectory(new File(System.getProperty("user.dir")));
else
fileChooser.setCurrentDirectory(new File(_defautDir));
fileChooser.setMultiSelectionEnabled(false);
BuFileFilter flt = new BuFileFilter(_extension, _desc);
fileChooser.addChoosableFileFilter(flt);
fileChooser.setFileFilter(flt);
int returnVal = fileChooser.showOpenDialog(getFrame());
if (returnVal == BuFileChooser.APPROVE_OPTION)
{
return fileChooser.getSelectedFile();
}
else
return null;
}
protected H2dParametres projetCourant()
{
return projectManager_.currentProjet_;
}
protected void ouvrir()
{
}
public void addProjet(TrProjet _o)
{
projectManager_.addProjet(_o);
_o.active(this);
}
/**
* _f doit etre le fichier dernierement ouvert
*/
public void setLastDir(File _f)
{
if (_f == null)
return;
File dir = _f.getParentFile();
if (dir.isDirectory())
lastDir_ = dir.getAbsolutePath();
}
// private void ajouteMNTImportMenus(BuMenu _r,String _prefix)
// {
// TrFormat[] fs=TrFormat.getMNTReaderFormat();
// int nb=fs.length;
// for(int i=0;i<nb;i++)
// {
// TrFormatMenuItem it=new TrFormatMenuItem(fs[i]);
// it.setText(fs[i].getLabel());
// it.setActionCommand("IMPORT:MNT:"+fs[i].getID());
// it.addActionListener(this);
// _r.add(it);
// }
// /* TrFichier[] f=TrFichier.MNTFichiers();
// int n=f.length;
// for(int i=n-1;i>=0;i--)
// {
// _r.addMenuItem(f[i].nom_,_prefix+f[i].ID_,true);
// } */
// }
public void start()
{
super.start();
// arbre_ = new BArbreCalque();
// arbre_.setRootVisible(false);
// arbre_.setModel(null);
// JScrollPane sp = new JScrollPane(arbre_);
// sp.setSize(150, 150);
// sp.setVisible(false);
// getMainPanel().getRightColumn().addToggledComponent(EbliResource.EBLI.getString("Calques"), "CALQUE", sp, this);
}
public static BuInformationsSoftware informationsSoftware()
{
return isRt_;
}
}
--- NEW FILE: TrLib.java ---
/*
* @file PrertLib.java
* @creation 2002-12-16
* @modification $Date: 2003/05/19 14:31:48 $
* @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.Color;
import javax.swing.JComponent;
/**
*
* @author deniger
* @version $Id: TrLib.java,v 1.1 2003/05/19 14:31:48 deniger Exp $
*/
public class TrLib
{
public static String geti18n(String _s)
{
return TrResource.TR.getString(_s);
}
public static void decoreComponent(JComponent _c, boolean valide)
{
_c.setForeground(valide ? Color.black : Color.white);
}
}
--- NEW FILE: TrPreferences.java ---
/*
* @file PrertPreferences.java
* @creation 2002-08-30
* @modification $Date: 2003/05/19 14:31:48 $
* @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 com.memoire.bu.BuPreferences;
/**
* Preferences pour Prert.
*
* @version $Id: TrPreferences.java,v 1.1 2003/05/19 14:31:48 deniger Exp $
* @author Fred Deniger
*/
public class TrPreferences
extends BuPreferences
{
public final static TrPreferences TR=new TrPreferences();
public void applyOn(Object _o)
{
if(!(_o instanceof TrImplementation))
throw new RuntimeException(""+_o+" is not a TrImplementation.");
}
}
--- NEW FILE: TrProjectManager.java ---
/*
* @file TrProjetManager.java
* @creation 29 avr. 2003
* @modification $Date: 2003/05/19 14:31:48 $
* @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.util.Hashtable;
import org.fudaa.dodico.h2d.H2dParametres;
/**
* @author deniger
* @version $Id: TrProjectManager.java,v 1.1 2003/05/19 14:31:48 deniger Exp $
*/
public class TrProjectManager
{
H2dParametres currentProjet_;
Hashtable nomProjet_;
public TrProjectManager()
{
nomProjet_=new Hashtable(5);
}
/**
* Renvoie le projet courant.
*/
public H2dParametres getCurrentProjet()
{
return currentProjet_;
}
public boolean containsProjectTitre(String _s)
{
return nomProjet_.containsKey(_s);
}
/**
* Ajoute un projet au manager.
*/
public boolean addProjet(TrProjet _pro)
{
String n=_pro.getTitre();
if(containsProjectTitre(n)) return false;
else
{
nomProjet_.put(n,_pro);
return true;
}
}
public H2dParametres getProjet(String _n)
{
return (H2dParametres)nomProjet_.get(_n);
}
}
--- NEW FILE: TrProjet.java ---
/*
* @file TrProjet.java
* @creation 29 avr. 2003
* @modification $Date: 2003/05/19 14:31:48 $
* @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 com.memoire.bu.BuCommonImplementation;
import com.memoire.bu.BuInformationsDocument;
import org.fudaa.dodico.h2d.H2dParametres;
/**
* @author deniger
* @version $Id: TrProjet.java,v 1.1 2003/05/19 14:31:48 deniger Exp $
*/
public abstract class TrProjet
{
public String getTitre()
{
return getParamatres().getTitre();
}
public BuInformationsDocument getInformationsDocument()
{
return getParamatres().getInformationsDocument();
}
public abstract H2dParametres getParamatres();
public abstract void active(BuCommonImplementation _impl);
}
--- NEW FILE: TrResource.java ---
/*
* @file PrertResource.java
* @creation 2002-09-25
* @modification $Date: 2003/05/19 14:31:48 $
* @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 com.memoire.bu.BuResource;
/**
* @version $Id: TrResource.java,v 1.1 2003/05/19 14:31:48 deniger Exp $
* @author Fred Deniger
*/
public class TrResource extends BuResource
{
public final static TrResource TR = new TrResource();
private TrResource()
{
}
}
|
|
From: <de...@us...> - 2003-05-19 14:31:50
|
Update of /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/commun
In directory sc8-pr-cvs1:/tmp/cvs-serv1411/commun
Modified Files:
FudaaImplementation.java FudaaLib.java
Log Message:
Projet preprocesseur commun
Index: FudaaImplementation.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/commun/FudaaImplementation.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** FudaaImplementation.java 18 Mar 2003 17:20:52 -0000 1.4
--- FudaaImplementation.java 19 May 2003 14:31:47 -0000 1.5
***************
*** 204,214 ****
super.init();
! BuMenuBar mb = BuMenuBar.buildBasicMenuBar();
! setMainMenuBar(mb);
! mb.addActionListener(this);
! BuToolBar tb = BuToolBar.buildBasicToolBar();
! setMainToolBar(tb);
! tb.addActionListener(this);
!
((BuMenu)mb.getMenu("MENU_EDITION")).addMenuItem("Console", "CONSOLE", false);
tb.addToolButton("Connecter", "CONNECTER", FudaaLib.getIcon("connecter"), true);
--- 204,215 ----
super.init();
! // BuMenuBar mb = BuMenuBar.buildBasicMenuBar();
! // setMainMenuBar(mb);
! // mb.addActionListener(this);
! // BuToolBar tb = BuToolBar.buildBasicToolBar();
! // setMainToolBar(tb);
! // tb.addActionListener(this);
! BuMenuBar mb=getMainMenuBar();
! BuToolBar tb=getMainToolBar();
((BuMenu)mb.getMenu("MENU_EDITION")).addMenuItem("Console", "CONSOLE", false);
tb.addToolButton("Connecter", "CONNECTER", FudaaLib.getIcon("connecter"), true);
Index: FudaaLib.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/commun/FudaaLib.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** FudaaLib.java 18 Mar 2003 17:20:35 -0000 1.4
--- FudaaLib.java 19 May 2003 14:31:47 -0000 1.5
***************
*** 269,278 ****
public static void showError(BuCommonInterface _impl,String _titre,String _message)
{
! BuDialogError erreur=
! new BuDialogError(_impl.getImplementation(),_impl.getInformationsSoftware(),_message);
erreur.setTitle(_titre);
erreur.activate();
}
!
--- 269,277 ----
public static void showError(BuCommonInterface _impl,String _titre,String _message)
{
! BuDialogError erreur=_impl==null?new BuDialogError(null,null,_message):new BuDialogError(_impl.getImplementation(),_impl.getInformationsSoftware(),_message);
erreur.setTitle(_titre);
erreur.activate();
}
!
|
|
From: <de...@us...> - 2003-05-19 14:27:06
|
Update of /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/telemac In directory sc8-pr-cvs1:/tmp/cvs-serv30726/tr/telemac Log Message: Directory /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/telemac added to the repository |
|
From: <de...@us...> - 2003-05-19 14:27:06
|
Update of /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr In directory sc8-pr-cvs1:/tmp/cvs-serv30726/tr Log Message: Directory /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr added to the repository |
|
From: <de...@us...> - 2003-05-19 14:27:06
|
Update of /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/dico In directory sc8-pr-cvs1:/tmp/cvs-serv30726/tr/dico Log Message: Directory /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/dico added to the repository |
|
From: <de...@us...> - 2003-05-19 14:21:23
|
Update of /cvsroot/fudaa/fudaa_devel/ebli/src/org/fudaa/ebli/dialog
In directory sc8-pr-cvs1:/tmp/cvs-serv25784/org/fudaa/ebli/dialog
Modified Files:
EbliSimpleDialog.java
Log Message:
Modif mineure
Index: EbliSimpleDialog.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/ebli/src/org/fudaa/ebli/dialog/EbliSimpleDialog.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** EbliSimpleDialog.java 1 Apr 2003 15:15:30 -0000 1.3
--- EbliSimpleDialog.java 19 May 2003 14:21:19 -0000 1.4
***************
*** 8,21 ****
*/
package org.fudaa.ebli.dialog;
! import java.awt.*;
! import java.awt.event.*;
! import javax.swing.*;
! import javax.swing.border.*;
!
! import org.fudaa.ebli.commun.EbliLib;
! import com.memoire.bu.*;
/**
--- 8,35 ----
*/
package org.fudaa.ebli.dialog;
! import java.awt.Color;
! import java.awt.Component;
! import java.awt.Dialog;
! import java.awt.FlowLayout;
! import java.awt.Frame;
! import java.awt.event.ActionEvent;
! import java.awt.event.ActionListener;
! import java.awt.event.WindowEvent;
! import java.awt.event.WindowListener;
+ import javax.swing.BorderFactory;
+ import javax.swing.JDialog;
+ import javax.swing.JOptionPane;
+ import com.memoire.bu.BuBorderLayout;
+ import com.memoire.bu.BuButton;
+ import com.memoire.bu.BuCharValidator;
+ import com.memoire.bu.BuLabel;
+ import com.memoire.bu.BuPanel;
+ import com.memoire.bu.BuStringValidator;
+ import com.memoire.bu.BuTextField;
+ import com.memoire.bu.BuValueValidator;
! import org.fudaa.ebli.commun.EbliLib;
/**
***************
*** 59,66 ****
--- 73,101 ----
response_ = JOptionPane.CANCEL_OPTION;
}
+
+
+ /**
+ * Permet d'initialiser ce dialogue a l'aide d'une chaine. Envoie une exception si non implante.
+ */
+ public void setValue(String _f)
+ {
+ throw new NoSuchMethodError("Methode non implantee");
+ }
+
+ /**
+ * Renvoie la chaine caracterisant le contenu de ce dialogue.
+ */
+ public String getValue()
+ {
+ throw new NoSuchMethodError("Methode non implantee");
+ }
+
+
+
public void setModale(boolean _modale)
{
modale_ = _modale;
}
+
public boolean valide()
{
***************
*** 148,152 ****
{
createDialog(_parent,_titre);
! dialog_.setModal(true);
return afficheDialog(_parent);
}
--- 183,187 ----
{
createDialog(_parent,_titre);
! modale_=true;
return afficheDialog(_parent);
}
***************
*** 160,166 ****
{
createDialog(_parent,_titre);
! dialog_.setModal(true);
return afficheDialog(_parent);
}
public void addEmptyBorder(int _b)
--- 195,213 ----
{
createDialog(_parent,_titre);
! modale_=true;
return afficheDialog(_parent);
}
+
+ /**
+ * Affiche le panel dans une boite de dialogue modale.
+ * @param _parent la fenetre parent
+ * @param _titre le titre de la boite de dialogue
+ */
+ public int afficheModale(Component _parent, String _titre)
+ {
+ createDialog(_titre);
+ modale_=true;
+ return afficheDialog(_parent);
+ }
public void addEmptyBorder(int _b)
|
|
From: <de...@us...> - 2003-05-19 14:14:55
|
Update of /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/telemac/dico In directory sc8-pr-cvs1:/tmp/cvs-serv22393/telemac/dico Removed Files: TelemacDicoKeyword.java Log Message: Fichier deplacer dans dico ou dans fudaa --- TelemacDicoKeyword.java DELETED --- |
|
From: <de...@us...> - 2003-05-19 14:14:54
|
Update of /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/telemac In directory sc8-pr-cvs1:/tmp/cvs-serv22393/telemac Removed Files: TelemacCasProcess.java TelemacProjet.java Log Message: Fichier deplacer dans dico ou dans fudaa --- TelemacCasProcess.java DELETED --- --- TelemacProjet.java DELETED --- |
|
From: <de...@us...> - 2003-05-19 14:06:17
|
Update of /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/dico
In directory sc8-pr-cvs1:/tmp/cvs-serv14981
Added Files:
DicoAbstract.java.tpl
Log Message:
Ajout du squelette des classes a generer
--- NEW FILE: DicoAbstract.java.tpl ---
/*
*File generated by fudaa
*/
package
${getPackage}
import org.fudaa.dodico.dico.*;
/**
* @author deniger
*/
public class
${getClassName}
extends DicoModelAbstract
{
public final String getVersion()
{
${getVersion}
}
protected String[] createNoms()
{
${createNoms}
}
protected final DicoEntite[] createEntites()
{
${createEntites}
}
}
|
|
From: <de...@us...> - 2003-05-19 14:04:05
|
Update of /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/telemac/io In directory sc8-pr-cvs1:/tmp/cvs-serv13570/telemac/io Added Files: TelemacCasWriter.java Log Message: TelemacDicoFactory: permet d'automatiser la creation des classes dico Support pour les fichiers cas et ajout d'un test --- NEW FILE: TelemacCasWriter.java --- /* * @file TelemacCasWriter.java * @creation 18 avr. 2003 * @modification $Date: 2003/05/19 14:04:02 $ * @license GNU General Public License 2 * @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne * @mail de...@fu... */ package org.fudaa.dodico.telemac.io; import java.io.IOException; import java.text.DateFormat; import java.util.Calendar; import java.util.Set; import java.util.StringTokenizer; import com.memoire.fu.FuLib; import org.fudaa.dodico.commun.DodicoLib; import org.fudaa.dodico.dico.DicoEntite; import org.fudaa.dodico.fichiers.FileWriterCharSimpleAbstract; /** * @author deniger * @version $Id: TelemacCasWriter.java,v 1.1 2003/05/19 14:04:02 deniger Exp $ */ public class TelemacCasWriter extends FileWriterCharSimpleAbstract { TelemacCasFileFormat fileFormat_; TelemacCasInterface interface_; String commentSep_; String enteteFormat_; String enteteRubrique_; char com_; /** * @param _ft */ public TelemacCasWriter(TelemacCasFileFormat _ft) { fileFormat_ = _ft; com_ = fileFormat_.getCommentChar(); commentSep_ = com_ + "---------------------------------------------------------------------" + lineSep_; enteteFormat_ = commentSep_ + com_ + " TELEMAC-2D Version ${TELEMAC_VERSION} ${DATE}" + lineSep_ + com_ + " ${TITLE}" + lineSep_ + commentSep_; enteteRubrique_ = lineSep_ + commentSep_ + com_ + " ${RUBRIQUE}" + lineSep_ + commentSep_; } /** * @see org.fudaa.dodico.tr.TrWriterInterface#write() */ public void write() { if (interface_ == null) { analyze_.addTranslateError("Les données sont nulles"); return; } if (out_ == null) { analyze_.addTranslateError("Le flux de sortie est nul."); return; } //Hashtable entitesValues = interface_.getInputs(); Set rest = interface_.getTrEntiteSet(); String[] rubriques = fileFormat_.getDico().getRubriques(); try { String dd = null; DicoEntite entNom = fileFormat_.getTitreEntite(); if (entNom != null) { dd = interface_.getValue(entNom); } if (dd == null) dd = "nom inconnu"; writeEntete(dd); if ((rubriques == null) || (rubriques.length == 0)) { DicoEntite[] ents = new DicoEntite[rest.size()]; rest.toArray(ents); writeRubrique(DodicoLib.geti18n("Inconnu"), ents); rest.clear(); } int n = rubriques.length; for (int i = 0; i < n; i++) { if(rubriques[i]==null) System.err.println("ub nuLL"); DicoEntite[] entToWrite = DicoEntite.getAndRemoveEntite(rubriques[i], rest); writeRubrique(rubriques[i], entToWrite); } } catch (IOException _e) { manageException(_e, analyze_); } } /** * * @param _entValues * @throws IOException */ private void writeEntete(String _nomEtude) throws IOException { String entete = FuLib.replace(enteteFormat_, "${TITLE}", _nomEtude); entete = FuLib.replace(entete, "${TELEMAC_VERSION}", fileFormat_.getVersion()); entete = FuLib.replace(entete, "${DATE}", DateFormat.getDateInstance().format(Calendar.getInstance().getTime())); String r=""; String com=""+fileFormat_.getCommentChar(); for(StringTokenizer tk=new StringTokenizer(entete,lineSep_);tk.hasMoreTokens();) { r+=formatToMaxChar(tk.nextToken(), com)+lineSep_; } writeln(r); } private void writeRubrique(String _rubrique, DicoEntite[] _ent) throws IOException { if ((_ent == null) || (_ent.length == 0)) { return; } int entiteNomMaxLength = geEntiteNomtMaxLength(_ent) + 1; String entete = FuLib.replace(enteteRubrique_, "${RUBRIQUE}", _rubrique); writeln(); out_.write(entete); int n = _ent.length; DicoEntite ent; int maxChar = fileFormat_.getMaxCharPerLine(); for (int i = 0; i < n; i++) { ent = _ent[i]; if (!fileFormat_.getDico().isKey(ent)) { analyze_.addWarning("Entité inconnue pour ce format" + " " + ent.getNom(), -1); } else { String value = interface_.getValue(ent); if (ent.containsStringDataType()) { value = FuLib.replace(value, "'", "''"); value = "'" + value + "'"; } String initNom = ent.getNom(); String nom = DodicoLib.adjustSize(entiteNomMaxLength, initNom); if (nom.length() + value.length() + 1 > maxChar) { if (initNom.length() + value.length() + 1 <= maxChar) { writeln(initNom + "=" + value); } else { if (initNom.length() + 1 > maxChar) { System.err.println("Les noms des parametres ne doivent pas dépasser 72 char"); writeln(fileFormat_.getCommentChar() + DodicoLib.geti18n("Ce parametres depasse 72 caractères")); } writeln(initNom + "="); if (value.length() > maxChar) { value = formatToMaxChar(value); } writeln(value); } } else { writeln(nom + "=" + value); } } } } /** * Renvoie une chaine de caractere respectant le nb de caractere max par * ligne. Un separateur de ligne ( et pas de prefixe) est ajoute. */ private String formatToMaxChar(String _init) { return formatToMaxChar(_init,""); } /** * Renvoie une chaine de caractere respectant le nb de caractere max par * ligne. Un separateur de ligne (et un prefixe optionnel) est ajoute. */ private String formatToMaxChar(String _init,String _pref) { int maxChar = fileFormat_.getMaxCharPerLine()-_pref.length(); StringBuffer valueFinal = new StringBuffer(_init); int vfLength = valueFinal.length(); int lnLength = lineSep_.length()+_pref.length(); for (int j = maxChar-1; j < vfLength; j += (maxChar + lnLength)) { valueFinal.insert(j - lnLength, lineSep_+_pref); } return valueFinal.toString(); } /** * Renvoie la taille max des noms des entites. */ private int geEntiteNomtMaxLength(DicoEntite[] _ent) { int r = 0; int n = _ent.length - 1; int taille = 0; for (int i = n; i >= 0; i--) { taille = _ent[i].getNom().length(); if (taille > r) r = taille; } return r; } /** * @param un objet de type TelemacCasInterface * @see org.fudaa.dodico.tr.TrWriterInterface#setInterface(java.lang.Object) */ public void setInterface(Object _interface) { setTelemacCasInterface((TelemacCasInterface) _interface); } public void setTelemacCasInterface(TelemacCasInterface _interface) { interface_ = _interface; } } |
|
From: <de...@us...> - 2003-05-19 14:04:05
|
Update of /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/test/telemac
In directory sc8-pr-cvs1:/tmp/cvs-serv13570/test/telemac
Added Files:
TestCas.java cas.txt
Log Message:
TelemacDicoFactory: permet d'automatiser la creation des classes dico
Support pour les fichiers cas et ajout d'un test
--- NEW FILE: TestCas.java ---
/*
* @file TestCas.java
* @creation 28 avr. 2003
* @modification $Date: 2003/05/19 14:04:02 $
* @license GNU General Public License 2
* @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne
* @mail de...@fu...
*/
package org.fudaa.dodico.test.telemac;
import java.io.File;
import java.util.HashMap;
import org.fudaa.dodico.commun.DodicoLib;
import org.fudaa.dodico.dico.DicoEntite;
import org.fudaa.dodico.dico.DicoModelAbstract;
import org.fudaa.dodico.h2d.H2dFileReadView;
import org.fudaa.dodico.telemac.io.TelemacCasFileFormat;
import org.fudaa.dodico.telemac.io.TelemacCasInterface;
import org.fudaa.dodico.telemac.io.TelemacCasReader;
import org.fudaa.dodico.telemac.io.TelemacCasWriter;
import org.fudaa.dodico.test.TestIO;
/**
* @author deniger
* @version $Id: TestCas.java,v 1.1 2003/05/19 14:04:02 deniger Exp $
*/
public class TestCas extends TestIO
{
public TestCas()
{
super("cas.txt", TelemacCasFileFormat.getInstance());
}
/**
* @see org.fudaa.dodico.test.TestIO#_interfaceTest(org.fudaa.dodico.tr.TrFileReadView)
*/
public void _interfaceTest(H2dFileReadView _r)
{
TelemacCasInterface inter = (TelemacCasInterface) _r.getSource();
assertEquals(inter.getNbInput(), 28);
DicoModelAbstract dico = ((TelemacCasFileFormat) format_).getDico();
DicoEntite ent = dico.getEntite("CONDITIONS INITIALES");
String t = inter.getValue(ent);
assertNotNull(ent);
assertEquals(t, "HAUTEUR NULLE");
ent = dico.getEntite("DEBITS IMPOSES");
assertNotNull(ent);
t = inter.getValue(ent);
assertEquals(t, "0.;0.");
ent = dico.getEntite("DUREE DU CALCUL");
assertNotNull(ent);
t = inter.getValue(ent);
assertEquals(t, "1600");
}
public static void main(String[] args)
{
HashMap arg = DodicoLib.parseArgs(args);
String fileName = (String) arg.get("-file");
File f = new File(fileName);
TelemacCasReader r = new TelemacCasReader(TelemacCasFileFormat.getInstance());
r.setIn(f);
r.read();
r.close();
if (r.getAnalyze() != null)
r.getAnalyze().printResume();
String fileOut = (String) arg.get("-out");
if (fileOut != null)
{
System.out.println("ecriture");
File out = new File(fileOut);
TelemacCasWriter w = new TelemacCasWriter(TelemacCasFileFormat.getInstance());
w.setInterface(r.getInterface());
w.setOut(out);
w.write();
w.close();
}
}
}
--- NEW FILE: cas.txt ---
(This appears to be a binary file; contents omitted.)
|
|
From: <de...@us...> - 2003-05-19 14:04:04
|
Update of /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/telemac/dico
In directory sc8-pr-cvs1:/tmp/cvs-serv13570/telemac/dico
Added Files:
TelemacDicoFactory.java
Log Message:
TelemacDicoFactory: permet d'automatiser la creation des classes dico
Support pour les fichiers cas et ajout d'un test
--- NEW FILE: TelemacDicoFactory.java ---
/*
* @file TelemacDicoGenerator.java
* @creation 19 mai 2003
* @modification $Date: 2003/05/19 14:04:02 $
* @license GNU General Public License 2
* @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne
* @mail de...@fu...
*/
package org.fudaa.dodico.telemac.dico;
import java.io.File;
import org.fudaa.dodico.dico.DicoFactory;
public class TelemacDicoFactory
{
public static void main(String[] args)
{
DicoFactory fact=new DicoFactory("org.fudaa.dodico.telemac.dico","TelemacDico");
File f=new File("serveurs/telemac/telemac2dv5p2.dico");
File dest=new File("src/org/fudaa/dodico/telemac/dico");
System.out.println("fichier dico "+f.getAbsolutePath());
System.out.println("repertoire de dest "+dest.getAbsolutePath());
fact.setDestDir(dest);
fact.setDicoFile(f);
fact.printAnalyze(fact.generate());
}
}
|
|
From: <de...@us...> - 2003-05-19 13:59:31
|
Update of /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/telemac/dico In directory sc8-pr-cvs1:/tmp/cvs-serv10195/telemac/dico Removed Files: TelemacDicoAbstract.java TelemacDicoAbstract.java.tpl TelemacDicoAnalyzer.java TelemacDicoDataTypeGenerate.java TelemacDicoEntiteGenerate.java TelemacDicoGenerator.java TelemacDicoInterface.java Log Message: Fichiers deplaces dans le repertoire dico ---------------------------------------------------------------------- --- TelemacDicoAbstract.java DELETED --- --- TelemacDicoAbstract.java.tpl DELETED --- --- TelemacDicoAnalyzer.java DELETED --- --- TelemacDicoDataTypeGenerate.java DELETED --- --- TelemacDicoEntiteGenerate.java DELETED --- --- TelemacDicoGenerator.java DELETED --- --- TelemacDicoInterface.java DELETED --- |
|
From: <de...@us...> - 2003-05-19 13:54:35
|
Update of /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/telemac/dico
In directory sc8-pr-cvs1:/tmp/cvs-serv3989/telemac/dico
Modified Files:
TelemacDicov5p2.java
Log Message:
Mis a jour des fichiers de lecture de telemac
Les classes dico sont mises dans un package dediee.
package dico : contient les classes necessaires pour gerer un fichier dico
package h2d: permet de stocker les classes communes reflux/telemac
Index: TelemacDicov5p2.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/telemac/dico/TelemacDicov5p2.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** TelemacDicov5p2.java 17 Apr 2003 17:26:20 -0000 1.2
--- TelemacDicov5p2.java 19 May 2003 13:54:01 -0000 1.3
***************
*** 1,8 ****
/*
! *File generated by fudaa
*/
! package org.fudaa.dodico.telemac.dico;
! import org.fudaa.dodico.tr.*;
/**
--- 1,11 ----
/*
[...6369 lines suppressed...]
entiteTableau.setDynamique(true);
entiteTableau.setNiveau(1);
choiceKeys=new String[]{"Description des librairies de T2D","LIBRARIES description"};
entiteTableau.setAide(choiceKeys[languageIndex_]);
***************
*** 4203,4208 ****
choiceKeys=new String[]{"telemac2d|tel2d_VVV|PPP|telemac2dMMMVVV.LLL;bief|bief_VVV|PPP|biefMMMVVV.LLL;damocles|damo_VVV|PPP|damoMMMVVV.LLL;paravoid|paravoid_VVV|PPP|paravoidMMMVVV.LLL","telemac2d|tel2d_VVV|PPP|telemac2dMMMVVV.LLL;bief|bief_VVV|PPP|biefMMMVVV.LLL;damocles|damo_VVV|PPP|damoMMMVVV.LLL;paravoid|paravoid_VVV|PPP|paravoidMMMVVV.LLL"};
entiteTableau.setDefautValue(choiceKeys[languageIndex_]);
! entites_[193]=entiteTableau;
}
--- 3964,3970 ----
choiceKeys=new String[]{"telemac2d|tel2d_VVV|PPP|telemac2dMMMVVV.LLL;bief|bief_VVV|PPP|biefMMMVVV.LLL;damocles|damo_VVV|PPP|damoMMMVVV.LLL;paravoid|paravoid_VVV|PPP|paravoidMMMVVV.LLL","telemac2d|tel2d_VVV|PPP|telemac2dMMMVVV.LLL;bief|bief_VVV|PPP|biefMMMVVV.LLL;damocles|damo_VVV|PPP|damoMMMVVV.LLL;paravoid|paravoid_VVV|PPP|paravoidMMMVVV.LLL"};
entiteTableau.setDefautValue(choiceKeys[languageIndex_]);
! entites[193]=entiteTableau.getImmutable();
+ return entites;
}
|
Update of /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/reflux/io In directory sc8-pr-cvs1:/tmp/cvs-serv3989/reflux/io Modified Files: CorEleBthFileFormat.java CorEleBthReader.java CorEleBthWriter.java INPFileFormat.java INPReader.java INPWriter.java Log Message: Mis a jour des fichiers de lecture de telemac Les classes dico sont mises dans un package dediee. package dico : contient les classes necessaires pour gerer un fichier dico package h2d: permet de stocker les classes communes reflux/telemac Index: CorEleBthFileFormat.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/reflux/io/CorEleBthFileFormat.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** CorEleBthFileFormat.java 1 Apr 2003 12:55:12 -0000 1.2 --- CorEleBthFileFormat.java 19 May 2003 13:54:00 -0000 1.3 *************** *** 9,15 **** package org.fudaa.dodico.reflux.io; ! import org.fudaa.dodico.tr.TrFileFormat; ! import org.fudaa.dodico.tr.TrReaderInterface; ! import org.fudaa.dodico.tr.TrWriterInterface; /** --- 9,16 ---- package org.fudaa.dodico.reflux.io; ! import org.fudaa.dodico.fichiers.FileReaderInterface; ! import org.fudaa.dodico.fichiers.FileWriterInterface; ! import org.fudaa.dodico.h2d.H2dFileFormat; ! import org.fudaa.dodico.h2d.H2dParametres; /** *************** *** 18,22 **** * @version $Id$ */ ! public class CorEleBthFileFormat extends TrFileFormat { --- 19,23 ---- * @version $Id$ */ ! public class CorEleBthFileFormat extends H2dFileFormat { *************** *** 33,37 **** protected CorEleBthFileFormat() { ! super(NB_FILE); extensions_=new String[]{"cor","ele","bth"}; ID_="CORELEBTH"; --- 34,38 ---- protected CorEleBthFileFormat() { ! super(NB_FILE,H2dParametres.FICHIER_GEOMETRIE); extensions_=new String[]{"cor","ele","bth"}; ID_="CORELEBTH"; *************** *** 46,50 **** * @see org.fudaa.dodico.tr.TrFileFormat#createReader(File[]) */ ! public TrReaderInterface createReader() { return new CorEleBthReader(this); --- 47,51 ---- * @see org.fudaa.dodico.tr.TrFileFormat#createReader(File[]) */ ! public FileReaderInterface createReader() { return new CorEleBthReader(this); *************** *** 58,62 **** * @see org.fudaa.dodico.tr.TrFileFormat#createWriter(File[], Object, ProgressionInterface) */ ! public TrWriterInterface createWriter() { return new CorEleBthWriter(this); --- 59,63 ---- * @see org.fudaa.dodico.tr.TrFileFormat#createWriter(File[], Object, ProgressionInterface) */ ! public FileWriterInterface createWriter() { return new CorEleBthWriter(this); Index: CorEleBthReader.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/reflux/io/CorEleBthReader.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** CorEleBthReader.java 17 Apr 2003 17:26:18 -0000 1.3 --- CorEleBthReader.java 19 May 2003 13:54:00 -0000 1.4 *************** *** 18,26 **** import org.fudaa.dodico.corba.geometrie.SMaillageIndex; import org.fudaa.dodico.corba.geometrie.SPoint; import org.fudaa.dodico.fortran.FortranReader; ! import org.fudaa.dodico.tr.TrFileFormat; ! import org.fudaa.dodico.tr.TrLib; ! import org.fudaa.dodico.tr.TrReaderInterface; ! import org.fudaa.dodico.tr.TrReaderWriterMultiAbstract; /** --- 18,26 ---- import org.fudaa.dodico.corba.geometrie.SMaillageIndex; import org.fudaa.dodico.corba.geometrie.SPoint; + import org.fudaa.dodico.fichiers.FileReaderInterface; + import org.fudaa.dodico.fichiers.FileReaderWriterMultiAbstract; import org.fudaa.dodico.fortran.FortranReader; ! import org.fudaa.dodico.h2d.H2dFileFormat; ! import org.fudaa.dodico.h2d.H2dLib; /** *************** *** 30,35 **** * @version $Id$ */ ! public class CorEleBthReader extends TrReaderWriterMultiAbstract ! implements TrReaderInterface { --- 30,35 ---- * @version $Id$ */ ! public class CorEleBthReader extends FileReaderWriterMultiAbstract ! implements FileReaderInterface { *************** *** 274,278 **** if (_afficheAvance) progressReceiver_.setProgression(pourc); ! int step = TrLib.getStep(nbElements, (int) _percLength / 10); int pourcStep = (int) (_percLength / step); int pas = (int) (nbElements / step); --- 274,278 ---- if (_afficheAvance) progressReceiver_.setProgression(pourc); ! int step = H2dLib.getStep(nbElements, (int) _percLength / 10); int pourcStep = (int) (_percLength / step); int pas = (int) (nbElements / step); *************** *** 413,417 **** if (_afficheAvance) progressReceiver_.setProgression(pourc); ! int step = TrLib.getStep(nbPts, (int) _percLength / 10); int pourcStep = (int) (_percLength / step); int pas = (int) (nbPts / step); --- 413,417 ---- if (_afficheAvance) progressReceiver_.setProgression(pourc); ! int step = H2dLib.getStep(nbPts, (int) _percLength / 10); int pourcStep = (int) (_percLength / step); int pas = (int) (nbPts / step); *************** *** 491,495 **** if (_afficheAvance) progressReceiver_.setProgression(pourc); ! int step = TrLib.getStep(l, (int) (_percLength / 10)); int pourcStep = (int) (_percLength / step); int pas = (int) (l / step); --- 491,495 ---- if (_afficheAvance) progressReceiver_.setProgression(pourc); ! int step = H2dLib.getStep(l, (int) (_percLength / 10)); int pourcStep = (int) (_percLength / step); int pas = (int) (l / step); *************** *** 557,561 **** * @see org.fudaa.dodico.tr.ReaderWriterInterface#getFormat() */ ! public TrFileFormat getFileFormat() { return getCorEleBthFileFormat(); --- 557,561 ---- * @see org.fudaa.dodico.tr.ReaderWriterInterface#getFormat() */ ! public H2dFileFormat getFileFormat() { return getCorEleBthFileFormat(); Index: CorEleBthWriter.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/reflux/io/CorEleBthWriter.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** CorEleBthWriter.java 17 Apr 2003 17:26:18 -0000 1.3 --- CorEleBthWriter.java 19 May 2003 13:54:00 -0000 1.4 *************** *** 16,23 **** import org.fudaa.dodico.corba.geometrie.SMaillageIndex; import org.fudaa.dodico.corba.geometrie.SPoint; import org.fudaa.dodico.fortran.FortranWriter; ! import org.fudaa.dodico.tr.TrLib; ! import org.fudaa.dodico.tr.TrReaderWriterMultiAbstract; ! import org.fudaa.dodico.tr.TrWriterInterface; /** --- 16,23 ---- import org.fudaa.dodico.corba.geometrie.SMaillageIndex; import org.fudaa.dodico.corba.geometrie.SPoint; + import org.fudaa.dodico.fichiers.FileReaderWriterMultiAbstract; + import org.fudaa.dodico.fichiers.FileWriterInterface; import org.fudaa.dodico.fortran.FortranWriter; ! import org.fudaa.dodico.h2d.H2dLib; /** *************** *** 27,32 **** */ public class CorEleBthWriter ! extends TrReaderWriterMultiAbstract ! implements TrWriterInterface { private CorEleBthInterface source_; --- 27,32 ---- */ public class CorEleBthWriter ! extends FileReaderWriterMultiAbstract ! implements FileWriterInterface { private CorEleBthInterface source_; *************** *** 198,202 **** if (_afficheAvance) progressReceiver_.setProgression(pourc); ! int step = TrLib.getStep(l, (int) _percLength / 10); int pourcStep = (int) (_percLength / step); int pas = (int) (l / step); --- 198,202 ---- if (_afficheAvance) progressReceiver_.setProgression(pourc); ! int step = H2dLib.getStep(l, (int) _percLength / 10); int pourcStep = (int) (_percLength / step); int pas = (int) (l / step); *************** *** 267,271 **** if (_afficheAvance) progressReceiver_.setProgression(pourc); ! int step = TrLib.getStep(l, (int) _percLength / 10); int pourcStep = (int) (_percLength / step); int pas = (int) (l / step); --- 267,271 ---- if (_afficheAvance) progressReceiver_.setProgression(pourc); ! int step = H2dLib.getStep(l, (int) _percLength / 10); int pourcStep = (int) (_percLength / step); int pas = (int) (l / step); *************** *** 329,333 **** progressReceiver_.setProgression(pourc); int nbLigne = (int) (l / pointParLigne); ! int step = TrLib.getStep(nbLigne, (int) _percLength / 10); int pourcStep = (int) (_percLength / step); int pas = (int) (nbLigne / step); --- 329,333 ---- progressReceiver_.setProgression(pourc); int nbLigne = (int) (l / pointParLigne); ! int step = H2dLib.getStep(nbLigne, (int) _percLength / 10); int pourcStep = (int) (_percLength / step); int pas = (int) (nbLigne / step); Index: INPFileFormat.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/reflux/io/INPFileFormat.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** INPFileFormat.java 1 Apr 2003 12:56:30 -0000 1.1 --- INPFileFormat.java 19 May 2003 13:54:01 -0000 1.2 *************** *** 9,15 **** package org.fudaa.dodico.reflux.io; ! import org.fudaa.dodico.tr.TrFileFormat; ! import org.fudaa.dodico.tr.TrReaderInterface; ! import org.fudaa.dodico.tr.TrWriterInterface; /** --- 9,16 ---- package org.fudaa.dodico.reflux.io; ! import org.fudaa.dodico.fichiers.FileReaderInterface; ! import org.fudaa.dodico.fichiers.FileWriterInterface; ! import org.fudaa.dodico.h2d.H2dFileFormat; ! import org.fudaa.dodico.h2d.H2dParametres; /** *************** *** 18,22 **** * @version $Id$ */ ! public class INPFileFormat extends TrFileFormat { public static int NB_FILE=1; --- 19,23 ---- * @version $Id$ */ ! public class INPFileFormat extends H2dFileFormat { public static int NB_FILE=1; *************** *** 32,36 **** protected INPFileFormat() { ! super(NB_FILE); extensions_=new String[]{"inp"}; ID_="REFLUX"; --- 33,37 ---- protected INPFileFormat() { ! super(NB_FILE,H2dParametres.FICHIER_PRINCIPAL); extensions_=new String[]{"inp"}; ID_="REFLUX"; *************** *** 44,48 **** * @see org.fudaa.dodico.tr.TrFileFormat#createWriter(File[], Object, ProgressionInterface) */ ! public TrWriterInterface createWriter() { return new INPWriter(); --- 45,49 ---- * @see org.fudaa.dodico.tr.TrFileFormat#createWriter(File[], Object, ProgressionInterface) */ ! public FileWriterInterface createWriter() { return new INPWriter(); *************** *** 52,56 **** * @see org.fudaa.dodico.tr.TrFileFormat#createReader(File[], ProgressionInterface, boolean, int) */ ! public TrReaderInterface createReader() { return new INPReader(); --- 53,57 ---- * @see org.fudaa.dodico.tr.TrFileFormat#createReader(File[], ProgressionInterface, boolean, int) */ ! public FileReaderInterface createReader() { return new INPReader(); Index: INPReader.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/reflux/io/INPReader.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** INPReader.java 17 Apr 2003 17:26:18 -0000 1.2 --- INPReader.java 19 May 2003 13:54:01 -0000 1.3 *************** *** 31,38 **** import org.fudaa.dodico.corba.tr.STrProprieteElementaireTransitoire; import org.fudaa.dodico.corba.tr.STrProprieteElementaireValeur; ! import org.fudaa.dodico.tr.TrFileFormat; ! import org.fudaa.dodico.tr.TrProjetH2d; ! import org.fudaa.dodico.tr.TrReaderCharSimpleAbstract; ! import org.fudaa.dodico.tr.TrReaderInterface; import com.memoire.fu.FuVectordouble; --- 31,38 ---- import org.fudaa.dodico.corba.tr.STrProprieteElementaireTransitoire; import org.fudaa.dodico.corba.tr.STrProprieteElementaireValeur; ! import org.fudaa.dodico.fichiers.FileReaderCharSimpleAbstract; ! import org.fudaa.dodico.fichiers.FileReaderInterface; ! import org.fudaa.dodico.h2d.H2dFileFormat; ! import org.fudaa.dodico.h2d.H2dParametres; import com.memoire.fu.FuVectordouble; *************** *** 45,50 **** */ public class INPReader ! extends TrReaderCharSimpleAbstract ! implements TrReaderInterface { private INPFileFormat format_; --- 45,50 ---- */ public class INPReader ! extends FileReaderCharSimpleAbstract ! implements FileReaderInterface { private INPFileFormat format_; *************** *** 376,391 **** //Format <code_u> <code_v> <code_h> temp = in_.intField(0); ! String uCode = TrProjetH2d.CODE_NON_INITIALISE; if (temp == clLibre) { ! uCode = TrProjetH2d.CODE_LIBRE; } else if (temp == clPermanent) { ! uCode = TrProjetH2d.CODE_PERMANENT; } else if (temp == clTransitoire) { ! uCode = TrProjetH2d.CODE_TRANSITOIRE_BEGIN; } else --- 376,391 ---- //Format <code_u> <code_v> <code_h> temp = in_.intField(0); ! String uCode = H2dParametres.CODE_NON_INITIALISE; if (temp == clLibre) { ! uCode = H2dParametres.CODE_LIBRE; } else if (temp == clPermanent) { ! uCode = H2dParametres.CODE_PERMANENT; } else if (temp == clTransitoire) { ! uCode = H2dParametres.CODE_TRANSITOIRE_BEGIN; } else *************** *** 399,414 **** } temp = in_.intField(1); ! String vCode = TrProjetH2d.CODE_NON_INITIALISE; if (temp == clLibre) { ! vCode = TrProjetH2d.CODE_LIBRE; } else if (temp == clPermanent) { ! vCode = TrProjetH2d.CODE_PERMANENT; } else if (temp == clTransitoire) { ! vCode = TrProjetH2d.CODE_TRANSITOIRE_BEGIN; } else --- 399,414 ---- } temp = in_.intField(1); ! String vCode = H2dParametres.CODE_NON_INITIALISE; if (temp == clLibre) { ! vCode = H2dParametres.CODE_LIBRE; } else if (temp == clPermanent) { ! vCode = H2dParametres.CODE_PERMANENT; } else if (temp == clTransitoire) { ! vCode = H2dParametres.CODE_TRANSITOIRE_BEGIN; } else *************** *** 422,437 **** } temp = in_.intField(2); ! String hCode = TrProjetH2d.CODE_NON_INITIALISE; if (temp == clLibre) { ! hCode = TrProjetH2d.CODE_LIBRE; } else if (temp == clPermanent) { ! hCode = TrProjetH2d.CODE_PERMANENT; } else if (temp == clTransitoire) { ! hCode = TrProjetH2d.CODE_TRANSITOIRE_BEGIN; } else --- 422,437 ---- } temp = in_.intField(2); ! String hCode = H2dParametres.CODE_NON_INITIALISE; if (temp == clLibre) { ! hCode = H2dParametres.CODE_LIBRE; } else if (temp == clPermanent) { ! hCode = H2dParametres.CODE_PERMANENT; } else if (temp == clTransitoire) { ! hCode = H2dParametres.CODE_TRANSITOIRE_BEGIN; } else *************** *** 447,455 **** //Si le code est permanent, on lit le champ et on affecte final double u = ! (uCode == TrProjetH2d.CODE_PERMANENT) ? in_.doubleField(0) : 0; final double v = ! (vCode == TrProjetH2d.CODE_PERMANENT) ? in_.doubleField(1) : 0; final double h = ! (hCode == TrProjetH2d.CODE_PERMANENT) ? in_.doubleField(2) : 0; fmt = kw_.getSeizeEntierFormat(); //temp contient le nombre d'indices par ligne --- 447,455 ---- //Si le code est permanent, on lit le champ et on affecte final double u = ! (uCode == H2dParametres.CODE_PERMANENT) ? in_.doubleField(0) : 0; final double v = ! (vCode == H2dParametres.CODE_PERMANENT) ? in_.doubleField(1) : 0; final double h = ! (hCode == H2dParametres.CODE_PERMANENT) ? in_.doubleField(2) : 0; fmt = kw_.getSeizeEntierFormat(); //temp contient le nombre d'indices par ligne *************** *** 504,513 **** //le meme point est specifie de nouveau: le groupe //precedent et le courant imposent une valeur non libre. ! if (((uCode != TrProjetH2d.CODE_LIBRE) ! && (old.uCode != TrProjetH2d.CODE_LIBRE)) ! || ((vCode != TrProjetH2d.CODE_LIBRE) ! && (old.vCode != TrProjetH2d.CODE_LIBRE)) ! || ((hCode != TrProjetH2d.CODE_LIBRE) ! && (old.hCode != TrProjetH2d.CODE_LIBRE))) { analyze_.addWarning( --- 504,513 ---- //le meme point est specifie de nouveau: le groupe //precedent et le courant imposent une valeur non libre. ! if (((uCode != H2dParametres.CODE_LIBRE) ! && (old.uCode != H2dParametres.CODE_LIBRE)) ! || ((vCode != H2dParametres.CODE_LIBRE) ! && (old.vCode != H2dParametres.CODE_LIBRE)) ! || ((hCode != H2dParametres.CODE_LIBRE) ! && (old.hCode != H2dParametres.CODE_LIBRE))) { analyze_.addWarning( *************** *** 522,536 **** //on ne change les valeurs que si elles sont permanentes ! if (uCode == TrProjetH2d.CODE_PERMANENT) { old.uCode = uCode; old.u = u; } ! if (vCode == TrProjetH2d.CODE_PERMANENT) { old.vCode = vCode; old.v = v; } ! if (hCode == TrProjetH2d.CODE_PERMANENT) { old.hCode = hCode; --- 522,536 ---- //on ne change les valeurs que si elles sont permanentes ! if (uCode == H2dParametres.CODE_PERMANENT) { old.uCode = uCode; old.u = u; } ! if (vCode == H2dParametres.CODE_PERMANENT) { old.vCode = vCode; old.v = v; } ! if (hCode == H2dParametres.CODE_PERMANENT) { old.hCode = hCode; *************** *** 541,555 **** //cas transitoire //Pour chaque point transitoire on decremente le compteur. ! if (TrProjetH2d.isTransitoire(uCode)) { ! old.uCode = TrProjetH2d.CODE_TRANSITOIRE_BEGIN+"CL"+courbeTransitoireCLIndex++; } ! if (TrProjetH2d.isTransitoire(vCode)) { ! old.vCode = TrProjetH2d.CODE_TRANSITOIRE_BEGIN+"CL"+courbeTransitoireCLIndex++; } ! if (TrProjetH2d.isTransitoire(hCode)) { ! old.hCode = TrProjetH2d.CODE_TRANSITOIRE_BEGIN+"CL"+courbeTransitoireCLIndex++; } } --- 541,555 ---- //cas transitoire //Pour chaque point transitoire on decremente le compteur. ! if (H2dParametres.isTransitoire(uCode)) { ! old.uCode = H2dParametres.CODE_TRANSITOIRE_BEGIN+"CL"+courbeTransitoireCLIndex++; } ! if (H2dParametres.isTransitoire(vCode)) { ! old.vCode = H2dParametres.CODE_TRANSITOIRE_BEGIN+"CL"+courbeTransitoireCLIndex++; } ! if (H2dParametres.isTransitoire(hCode)) { ! old.hCode = H2dParametres.CODE_TRANSITOIRE_BEGIN+"CL"+courbeTransitoireCLIndex++; } } *************** *** 640,653 **** if (index == clLibre) { ! tr.qCode = TrProjetH2d.CODE_LIBRE; } else if (index == clPermanent) { ! tr.qCode = TrProjetH2d.CODE_PERMANENT; } //Les courbes debit seront lu dans le fichier pn (prop nodale) else if (index == clTransitoire) { ! tr.qCode = TrProjetH2d.CODE_TRANSITOIRE_BEGIN+"PN"+courbeTransitoirePnIndex++; } else --- 640,653 ---- if (index == clLibre) { ! tr.qCode = H2dParametres.CODE_LIBRE; } else if (index == clPermanent) { ! tr.qCode = H2dParametres.CODE_PERMANENT; } //Les courbes debit seront lu dans le fichier pn (prop nodale) else if (index == clTransitoire) { ! tr.qCode = H2dParametres.CODE_TRANSITOIRE_BEGIN+"PN"+courbeTransitoirePnIndex++; } else *************** *** 730,734 **** addAnalyzeLigneLue(); } ! else if (TrProjetH2d.isTransitoire(tr.qCode)) { analyze_.addWarning( --- 730,734 ---- addAnalyzeLigneLue(); } ! else if (H2dParametres.isTransitoire(tr.qCode)) { analyze_.addWarning( *************** *** 738,742 **** addAnalyzeLigneLue(); } ! else if (tr.qCode == TrProjetH2d.CODE_LIBRE) { analyze_.addWarning( --- 738,742 ---- addAnalyzeLigneLue(); } ! else if (tr.qCode == H2dParametres.CODE_LIBRE) { analyze_.addWarning( *************** *** 1053,1072 **** propElem[3] = new TemplateGroupeElement( ! TrProjetH2d.PROPRIETE_PERTE_CHARGE, nbElemFond); case 3 : propElem[2] = new TemplateGroupeElement( ! TrProjetH2d.PROPRIETE_ALPHA_LONGUEUR_MELANGE, nbElemFond); case 2 : propElem[1] = new TemplateGroupeElement( ! TrProjetH2d.PROPRIETE_RUGOSITE, nbElemFond); case 1 : propElem[0] = new TemplateGroupeElement( ! TrProjetH2d.PROPRIETE_VISCOSITE, nbElemFond); } --- 1053,1072 ---- propElem[3] = new TemplateGroupeElement( ! H2dParametres.PROPRIETE_PERTE_CHARGE, nbElemFond); case 3 : propElem[2] = new TemplateGroupeElement( ! H2dParametres.PROPRIETE_ALPHA_LONGUEUR_MELANGE, nbElemFond); case 2 : propElem[1] = new TemplateGroupeElement( ! H2dParametres.PROPRIETE_RUGOSITE, nbElemFond); case 1 : propElem[0] = new TemplateGroupeElement( ! H2dParametres.PROPRIETE_VISCOSITE, nbElemFond); } *************** *** 1194,1203 **** int indexElement; int code = codes[0]; ! String codeFinal=TrProjetH2d.CODE_NON_INITIALISE; double valeur = 0; if (code == clPermanent) { valeur = Double.parseDouble(in_.readLine().trim()); ! codeFinal = TrProjetH2d.CODE_PERMANENT; } else --- 1194,1203 ---- int indexElement; int code = codes[0]; ! String codeFinal=H2dParametres.CODE_NON_INITIALISE; double valeur = 0; if (code == clPermanent) { valeur = Double.parseDouble(in_.readLine().trim()); ! codeFinal = H2dParametres.CODE_PERMANENT; } else *************** *** 1205,1213 **** if (code == clTransitoire) { ! codeFinal=TrProjetH2d.CODE_TRANSITOIRE_BEGIN+"PN"+courbeTransitoirePnIndex++; } else { ! codeFinal = TrProjetH2d.CODE_LIBRE; } in_.readLine(); --- 1205,1213 ---- if (code == clTransitoire) { ! codeFinal=H2dParametres.CODE_TRANSITOIRE_BEGIN+"PN"+courbeTransitoirePnIndex++; } else { ! codeFinal = H2dParametres.CODE_LIBRE; } in_.readLine(); *************** *** 1648,1652 **** Arrays.sort( t, ! TrProjetH2d.getProprieteElementaireValeurIndexComparator()); r.valeurs=t; if (nFixe == taille_) --- 1648,1652 ---- Arrays.sort( t, ! H2dParametres.getProprieteElementaireValeurIndexComparator()); r.valeurs=t; if (nFixe == taille_) *************** *** 1673,1677 **** r.valeursTransitoires = new STrProprieteElementaireTransitoire[nTrans]; transitoire.toArray(r.valeursTransitoires); ! Arrays.sort(r.valeursTransitoires,TrProjetH2d.getProprieteElementaireTransitoireIndexComparator()); r.elementsLibres = libre.toArray(); Arrays.sort(r.elementsLibres); --- 1673,1677 ---- r.valeursTransitoires = new STrProprieteElementaireTransitoire[nTrans]; transitoire.toArray(r.valeursTransitoires); ! Arrays.sort(r.valeursTransitoires,H2dParametres.getProprieteElementaireTransitoireIndexComparator()); r.elementsLibres = libre.toArray(); Arrays.sort(r.elementsLibres); *************** *** 1732,1736 **** new STrProprieteElementaireTransitoire(); tr.indexElement = _i; ! tr.indexCode = TrProjetH2d.CODE_TRANSITOIRE_BEGIN+"PN"+r; fixe.add(tr); } --- 1732,1736 ---- new STrProprieteElementaireTransitoire(); tr.indexElement = _i; ! tr.indexCode = H2dParametres.CODE_TRANSITOIRE_BEGIN+"PN"+r; fixe.add(tr); } *************** *** 1754,1762 **** STrConditionLimite tr = new STrConditionLimite(); tr.typeBord = LTrTypeBord.SOLIDE; ! tr.uCode = TrProjetH2d.CODE_LIBRE; ! tr.vCode = TrProjetH2d.CODE_LIBRE; ! tr.hCode = TrProjetH2d.CODE_LIBRE; ! tr.qCode = TrProjetH2d.CODE_LIBRE; ! tr.normale = TrProjetH2d.NORMALE_NON_INITIALISEE; return tr; } --- 1754,1762 ---- STrConditionLimite tr = new STrConditionLimite(); tr.typeBord = LTrTypeBord.SOLIDE; ! tr.uCode = H2dParametres.CODE_LIBRE; ! tr.vCode = H2dParametres.CODE_LIBRE; ! tr.hCode = H2dParametres.CODE_LIBRE; ! tr.qCode = H2dParametres.CODE_LIBRE; ! tr.normale = H2dParametres.NORMALE_NON_INITIALISEE; return tr; } *************** *** 1776,1780 **** } ! public TrFileFormat getFileFormat() { return getINPFileFormat(); --- 1776,1780 ---- } ! public H2dFileFormat getFileFormat() { return getINPFileFormat(); Index: INPWriter.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/reflux/io/INPWriter.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** INPWriter.java 1 Apr 2003 12:56:30 -0000 1.1 --- INPWriter.java 19 May 2003 13:54:01 -0000 1.2 *************** *** 9,14 **** package org.fudaa.dodico.reflux.io; ! import org.fudaa.dodico.tr.TrWriterCharSimpleAbstract; ! import org.fudaa.dodico.tr.TrWriterInterface; /** --- 9,14 ---- package org.fudaa.dodico.reflux.io; ! import org.fudaa.dodico.fichiers.FileWriterCharSimpleAbstract; ! import org.fudaa.dodico.fichiers.FileWriterInterface; /** *************** *** 18,23 **** */ public class INPWriter ! extends TrWriterCharSimpleAbstract ! implements TrWriterInterface { --- 18,23 ---- */ public class INPWriter ! extends FileWriterCharSimpleAbstract ! implements FileWriterInterface { |
|
From: <de...@us...> - 2003-05-19 13:54:34
|
Update of /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/telemac
In directory sc8-pr-cvs1:/tmp/cvs-serv3989/telemac
Modified Files:
TelemacDicoManager.java
Log Message:
Mis a jour des fichiers de lecture de telemac
Les classes dico sont mises dans un package dediee.
package dico : contient les classes necessaires pour gerer un fichier dico
package h2d: permet de stocker les classes communes reflux/telemac
Index: TelemacDicoManager.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/telemac/TelemacDicoManager.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** TelemacDicoManager.java 17 Apr 2003 17:26:20 -0000 1.1
--- TelemacDicoManager.java 19 May 2003 13:54:01 -0000 1.2
***************
*** 9,13 ****
package org.fudaa.dodico.telemac;
! import org.fudaa.dodico.telemac.dico.TelemacDicoInterface;
import org.fudaa.dodico.telemac.dico.TelemacDicov5p2;
--- 9,13 ----
package org.fudaa.dodico.telemac;
! import org.fudaa.dodico.dico.DicoModelAbstract;
import org.fudaa.dodico.telemac.dico.TelemacDicov5p2;
***************
*** 19,23 ****
public class TelemacDicoManager
{
! protected TelemacDicoInterface[] defautDicos_;
private final static TelemacDicoManager INSTANCE=new TelemacDicoManager();
--- 19,23 ----
public class TelemacDicoManager
{
! protected DicoModelAbstract[] defautDicos_;
private final static TelemacDicoManager INSTANCE=new TelemacDicoManager();
***************
*** 30,38 ****
protected TelemacDicoManager()
{
! defautDicos_=new TelemacDicoInterface[1];
defautDicos_[0]=new TelemacDicov5p2();
}
! public final TelemacDicoInterface getDefaut()
{
return defautDicos_[0];
--- 30,38 ----
protected TelemacDicoManager()
{
! defautDicos_=new DicoModelAbstract[1];
defautDicos_[0]=new TelemacDicov5p2();
}
! public final DicoModelAbstract getDefaut()
{
return defautDicos_[0];
|
|
From: <de...@us...> - 2003-05-19 13:54:33
|
Update of /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/dunes/io In directory sc8-pr-cvs1:/tmp/cvs-serv3989/dunes/io Modified Files: DunesFileFormat.java DunesReader.java DunesWriter.java Log Message: Mis a jour des fichiers de lecture de telemac Les classes dico sont mises dans un package dediee. package dico : contient les classes necessaires pour gerer un fichier dico package h2d: permet de stocker les classes communes reflux/telemac Index: DunesFileFormat.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/dunes/io/DunesFileFormat.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** DunesFileFormat.java 1 Apr 2003 09:28:11 -0000 1.2 --- DunesFileFormat.java 19 May 2003 13:53:59 -0000 1.3 *************** *** 9,15 **** package org.fudaa.dodico.dunes.io; ! import org.fudaa.dodico.tr.TrFileFormat; ! import org.fudaa.dodico.tr.TrReaderInterface; ! import org.fudaa.dodico.tr.TrWriterInterface; /** --- 9,16 ---- package org.fudaa.dodico.dunes.io; ! import org.fudaa.dodico.fichiers.FileReaderInterface; ! import org.fudaa.dodico.fichiers.FileWriterInterface; ! import org.fudaa.dodico.h2d.H2dFileFormat; ! import org.fudaa.dodico.h2d.H2dParametres; /** *************** *** 18,22 **** * @version $Id$ */ ! public class DunesFileFormat extends TrFileFormat { --- 19,23 ---- * @version $Id$ */ ! public class DunesFileFormat extends H2dFileFormat { *************** *** 32,36 **** private DunesFileFormat() { ! super(NB_FILE); extensions_ = new String[] { "mail" }; ID_ = "DUNES"; --- 33,37 ---- private DunesFileFormat() { ! super(NB_FILE,H2dParametres.FICHIER_GEOMETRIE); extensions_ = new String[] { "mail" }; ID_ = "DUNES"; *************** *** 44,48 **** * @see org.fudaa.dodico.tr.TrFileFormat#createReader(File[], ProgressionInterface, boolean, int) */ ! public TrReaderInterface createReader() { return new DunesReader(); --- 45,49 ---- * @see org.fudaa.dodico.tr.TrFileFormat#createReader(File[], ProgressionInterface, boolean, int) */ ! public FileReaderInterface createReader() { return new DunesReader(); *************** *** 52,56 **** * @see org.fudaa.dodico.tr.TrFileFormat#createWriter(File[], Object, ProgressionInterface) */ ! public TrWriterInterface createWriter() { return new DunesWriter(); --- 53,57 ---- * @see org.fudaa.dodico.tr.TrFileFormat#createWriter(File[], Object, ProgressionInterface) */ ! public FileWriterInterface createWriter() { return new DunesWriter(); Index: DunesReader.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/dunes/io/DunesReader.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** DunesReader.java 17 Apr 2003 17:26:17 -0000 1.3 --- DunesReader.java 19 May 2003 13:53:59 -0000 1.4 *************** *** 15,21 **** import org.fudaa.dodico.corba.geometrie.SMaillageIndex; import org.fudaa.dodico.corba.geometrie.SPoint; ! import org.fudaa.dodico.tr.TrFileFormat; ! import org.fudaa.dodico.tr.TrLib; ! import org.fudaa.dodico.tr.TrReaderCharSimpleAbstract; /** --- 15,21 ---- import org.fudaa.dodico.corba.geometrie.SMaillageIndex; import org.fudaa.dodico.corba.geometrie.SPoint; ! import org.fudaa.dodico.fichiers.FileReaderCharSimpleAbstract; ! import org.fudaa.dodico.h2d.H2dFileFormat; ! import org.fudaa.dodico.h2d.H2dLib; /** *************** *** 25,29 **** * @version $Id$ */ ! public class DunesReader extends TrReaderCharSimpleAbstract { --- 25,29 ---- * @version $Id$ */ ! public class DunesReader extends FileReaderCharSimpleAbstract { *************** *** 102,106 **** if (afficheAvance) progressReceiver_.setProgression(pourc); ! int step = TrLib.getStep(nbNoeuds); int pourcStep = (int) (50 / step); int pas = (int) (nbNoeuds / step); --- 102,106 ---- if (afficheAvance) progressReceiver_.setProgression(pourc); ! int step = H2dLib.getStep(nbNoeuds); int pourcStep = (int) (50 / step); int pas = (int) (nbNoeuds / step); *************** *** 167,171 **** maillage.elements = elems; //Les donnees utiles pour l'etat d'avancement ! step = TrLib.getStep(nbElem); pas = (int) (nbElem / step); pMax = pas; --- 167,171 ---- maillage.elements = elems; //Les donnees utiles pour l'etat d'avancement ! step = H2dLib.getStep(nbElem); pas = (int) (nbElem / step); pMax = pas; *************** *** 254,258 **** * @return */ ! public TrFileFormat getFileFormat() { return getDunesFileFormat(); --- 254,258 ---- * @return */ ! public H2dFileFormat getFileFormat() { return getDunesFileFormat(); Index: DunesWriter.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/dunes/io/DunesWriter.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** DunesWriter.java 17 Apr 2003 17:26:17 -0000 1.3 --- DunesWriter.java 19 May 2003 13:53:59 -0000 1.4 *************** *** 14,19 **** import org.fudaa.dodico.corba.geometrie.SMaillageIndex; import org.fudaa.dodico.corba.geometrie.SPoint; ! import org.fudaa.dodico.tr.TrLib; ! import org.fudaa.dodico.tr.TrWriterCharSimpleAbstract; /** --- 14,19 ---- import org.fudaa.dodico.corba.geometrie.SMaillageIndex; import org.fudaa.dodico.corba.geometrie.SPoint; ! import org.fudaa.dodico.fichiers.FileWriterCharSimpleAbstract; ! import org.fudaa.dodico.h2d.H2dLib; /** *************** *** 22,26 **** * @version $Id$ */ ! public class DunesWriter extends TrWriterCharSimpleAbstract { --- 22,26 ---- * @version $Id$ */ ! public class DunesWriter extends FileWriterCharSimpleAbstract { *************** *** 137,141 **** if (afficheAvance) progressReceiver_.setProgression(pourc); ! int step = TrLib.getStep(nPts); int pas = (int) (nPts / step); int pMax = pas; --- 137,141 ---- if (afficheAvance) progressReceiver_.setProgression(pourc); ! int step = H2dLib.getStep(nPts); int pas = (int) (nPts / step); int pMax = pas; *************** *** 180,184 **** b.append(lineSep_); //pour afficher l'etat d'avancement ! step = TrLib.getStep(nElems); pas = (int) (nElems / step); pMax = pas; --- 180,184 ---- b.append(lineSep_); //pour afficher l'etat d'avancement ! step = H2dLib.getStep(nElems); pas = (int) (nElems / step); pMax = pas; |
|
From: <de...@us...> - 2003-05-19 13:54:33
|
Update of /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/commun
In directory sc8-pr-cvs1:/tmp/cvs-serv3989/commun
Modified Files:
DodicoFileFormat.java DodicoLib.java
Log Message:
Mis a jour des fichiers de lecture de telemac
Les classes dico sont mises dans un package dediee.
package dico : contient les classes necessaires pour gerer un fichier dico
package h2d: permet de stocker les classes communes reflux/telemac
Index: DodicoFileFormat.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/commun/DodicoFileFormat.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** DodicoFileFormat.java 18 Mar 2003 10:48:48 -0000 1.1
--- DodicoFileFormat.java 19 May 2003 13:53:58 -0000 1.2
***************
*** 25,30 ****
private int nbFile_;
protected String[] extensions_;
- protected String ID_;
protected String nom_;
protected String description_;
protected int mode_;
--- 25,31 ----
private int nbFile_;
protected String[] extensions_;
protected String nom_;
+ protected String ID_;
+ protected String version_;
protected String description_;
protected int mode_;
***************
*** 56,67 ****
}
- /**
- * Returns the iD.
- * @return String
- */
- public String getID()
- {
- return ID_;
- }
/**
--- 57,60 ----
Index: DodicoLib.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/commun/DodicoLib.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** DodicoLib.java 17 Apr 2003 17:26:16 -0000 1.7
--- DodicoLib.java 19 May 2003 13:53:58 -0000 1.8
***************
*** 19,22 ****
--- 19,23 ----
import java.util.AbstractCollection;
import java.util.ArrayList;
+ import java.util.Collection;
import java.util.HashMap;
import java.util.Locale;
***************
*** 31,37 ****
public class DodicoLib
{
! public final static boolean DEBUG = "true".equals(System.getProperty("DEBUG"));
public final static String LOCAL_LANGUAGE = Locale.getDefault().getLanguage();
public final static boolean FRENCH_LANGUAGE = ("fr".equals(LOCAL_LANGUAGE)) ? true : false;
/** */
--- 32,39 ----
public class DodicoLib
{
! public final static boolean DEBUG = "TRUE".equals(System.getProperty("DEBUG"));
public final static String LOCAL_LANGUAGE = Locale.getDefault().getLanguage();
public final static boolean FRENCH_LANGUAGE = ("fr".equals(LOCAL_LANGUAGE)) ? true : false;
+ public final static String[] EMPTY_STRING_ARRAY=new String[0];
/** */
***************
*** 142,146 ****
* est null ou si _v null.
*/
! public static String[] enTableau(AbstractCollection _v)
{
if ((_v == null) || (_v.size() == 0))
--- 144,148 ----
* est null ou si _v null.
*/
! public static String[] enTableau(Collection _v)
{
if ((_v == null) || (_v.size() == 0))
|
|
From: <de...@us...> - 2003-05-19 13:54:10
|
Update of /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/test/telemac
In directory sc8-pr-cvs1:/tmp/cvs-serv3989/test/telemac
Modified Files:
TestCL.java TestLiquide.java TestSerafin.java TestSinusx.java
Log Message:
Mis a jour des fichiers de lecture de telemac
Les classes dico sont mises dans un package dediee.
package dico : contient les classes necessaires pour gerer un fichier dico
package h2d: permet de stocker les classes communes reflux/telemac
Index: TestCL.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/test/telemac/TestCL.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** TestCL.java 17 Apr 2003 17:26:23 -0000 1.3
--- TestCL.java 19 May 2003 13:54:03 -0000 1.4
***************
*** 24,29 ****
import org.fudaa.dodico.telemac.io.TelemacCLWriter;
import org.fudaa.dodico.test.TestIO;
! import org.fudaa.dodico.tr.TrFileReadView;
! import org.fudaa.dodico.tr.TrProjetH2d;
import com.memoire.bu.BuTask;
--- 24,29 ----
import org.fudaa.dodico.telemac.io.TelemacCLWriter;
import org.fudaa.dodico.test.TestIO;
! import org.fudaa.dodico.h2d.H2dFileReadView;
! import org.fudaa.dodico.h2d.H2dParametres;
import com.memoire.bu.BuTask;
***************
*** 46,50 ****
! public synchronized void _interfaceTest(TrFileReadView _inter)
{
assertNotNull(_inter);
--- 46,50 ----
! public synchronized void _interfaceTest(H2dFileReadView _inter)
{
assertNotNull(_inter);
***************
*** 53,183 ****
STrConditionLimite cls = inter.getLine(0);
assertEquals(cls.typeBord, LTrTypeBord.LIQUIDE_ONDE_INCIDENCE);
! assertEquals(cls.hCode, TrProjetH2d.CODE_LIBRE);
! assertEquals(cls.uCode, TrProjetH2d.CODE_LIBRE);
! assertEquals(cls.vCode, TrProjetH2d.CODE_LIBRE);
! assertEquals(cls.traceurCode, TrProjetH2d.CODE_LIBRE);
cls = inter.getLine(1);
assertEquals(cls.typeBord, LTrTypeBord.SOLIDE);
! assertEquals(cls.hCode, TrProjetH2d.CODE_LIBRE);
! assertEquals(cls.uCode, TrProjetH2d.CODE_PERMANENT);
assertEquals(cls.u, 0, eps_);
! assertEquals(cls.vCode, TrProjetH2d.CODE_LIBRE);
! assertEquals(cls.traceurCode, TrProjetH2d.CODE_LIBRE);
cls = inter.getLine(2);
assertEquals(cls.typeBord, LTrTypeBord.SOLIDE);
! assertEquals(cls.hCode, TrProjetH2d.CODE_LIBRE);
! assertEquals(cls.uCode, TrProjetH2d.CODE_LIBRE);
! assertEquals(cls.vCode, TrProjetH2d.CODE_PERMANENT);
assertEquals(cls.v, 0, eps_);
! assertEquals(cls.traceurCode, TrProjetH2d.CODE_LIBRE);
cls = inter.getLine(3);
assertEquals(cls.typeBord, LTrTypeBord.SOLIDE);
! assertEquals(cls.hCode, TrProjetH2d.CODE_LIBRE);
! assertEquals(cls.uCode, TrProjetH2d.CODE_LIBRE);
! assertEquals(cls.vCode, TrProjetH2d.CODE_LIBRE);
! assertEquals(cls.traceurCode, TrProjetH2d.CODE_LIBRE);
cls = inter.getLine(4);
assertEquals(cls.typeBord, LTrTypeBord.LIQUIDE_DEBIT_IMPOSE);
! assertEquals(cls.hCode, TrProjetH2d.CODE_LIBRE);
! assertEquals(cls.uCode, TrProjetH2d.CODE_LIBRE);
! assertEquals(cls.vCode, TrProjetH2d.CODE_LIBRE);
! assertEquals(cls.traceurCode, TrProjetH2d.CODE_PERMANENT);
cls = inter.getLine(5);
assertEquals(cls.typeBord, LTrTypeBord.LIQUIDE_DEBIT_IMPOSE);
! assertEquals(cls.hCode, TrProjetH2d.CODE_LIBRE);
! assertEquals(cls.uCode, TrProjetH2d.CODE_LIBRE);
! assertEquals(cls.vCode, TrProjetH2d.CODE_PERMANENT);
assertEquals(cls.v, 0, eps_);
! assertEquals(cls.traceurCode, TrProjetH2d.CODE_PERMANENT);
cls = inter.getLine(6);
assertEquals(cls.typeBord, LTrTypeBord.LIQUIDE_DEBIT_IMPOSE);
! assertEquals(cls.hCode, TrProjetH2d.CODE_LIBRE);
! assertEquals(cls.uCode, TrProjetH2d.CODE_PERMANENT);
assertEquals(cls.u, 0, eps_);
! assertEquals(cls.vCode, TrProjetH2d.CODE_LIBRE);
! assertEquals(cls.traceurCode, TrProjetH2d.CODE_PERMANENT);
cls = inter.getLine(7);
assertEquals(cls.typeBord, LTrTypeBord.LIQUIDE_DEBIT_IMPOSE);
! assertEquals(cls.hCode, TrProjetH2d.CODE_PERMANENT);
! assertEquals(cls.uCode, TrProjetH2d.CODE_LIBRE);
! assertEquals(cls.vCode, TrProjetH2d.CODE_LIBRE);
! assertEquals(cls.traceurCode, TrProjetH2d.CODE_PERMANENT);
cls = inter.getLine(8);
assertEquals(cls.typeBord, LTrTypeBord.LIQUIDE);
! assertEquals(cls.hCode, TrProjetH2d.CODE_PERMANENT);
! assertEquals(cls.uCode, TrProjetH2d.CODE_LIBRE);
! assertEquals(cls.vCode, TrProjetH2d.CODE_PERMANENT);
assertEquals(cls.v, 0, eps_);
! assertEquals(cls.traceurCode, TrProjetH2d.CODE_LIBRE);
cls = inter.getLine(9);
assertEquals(cls.typeBord, LTrTypeBord.LIQUIDE);
! assertEquals(cls.hCode, TrProjetH2d.CODE_PERMANENT);
! assertEquals(cls.uCode, TrProjetH2d.CODE_PERMANENT);
assertEquals(cls.u, 0, eps_);
! assertEquals(cls.vCode, TrProjetH2d.CODE_LIBRE);
! assertEquals(cls.traceurCode, TrProjetH2d.CODE_LIBRE);
cls = inter.getLine(10);
assertEquals(cls.typeBord, LTrTypeBord.LIQUIDE);
! assertEquals(cls.hCode, TrProjetH2d.CODE_LIBRE);
! assertEquals(cls.uCode, TrProjetH2d.CODE_PERMANENT);
! assertEquals(cls.vCode, TrProjetH2d.CODE_PERMANENT);
! assertEquals(cls.traceurCode, TrProjetH2d.CODE_PERMANENT);
cls = inter.getLine(11);
assertEquals(cls.typeBord, LTrTypeBord.LIQUIDE);
! assertEquals(cls.hCode, TrProjetH2d.CODE_PERMANENT);
! assertEquals(cls.uCode, TrProjetH2d.CODE_LIBRE);
! assertEquals(cls.vCode, TrProjetH2d.CODE_LIBRE);
! assertEquals(cls.traceurCode, TrProjetH2d.CODE_LIBRE);
cls = inter.getLine(12);
assertEquals(cls.typeBord, LTrTypeBord.LIQUIDE);
! assertEquals(cls.hCode, TrProjetH2d.CODE_PERMANENT);
! assertEquals(cls.uCode, TrProjetH2d.CODE_PERMANENT);
! assertEquals(cls.vCode, TrProjetH2d.CODE_PERMANENT);
! assertEquals(cls.traceurCode, TrProjetH2d.CODE_PERMANENT);
cls = inter.getLine(13);
assertEquals(cls.typeBord, LTrTypeBord.LIQUIDE);
! assertEquals(cls.hCode, TrProjetH2d.CODE_LIBRE);
! assertEquals(cls.uCode, TrProjetH2d.CODE_PERMANENT);
! assertEquals(cls.vCode, TrProjetH2d.CODE_PERMANENT);
assertEquals(cls.v, 0, eps_);
! assertEquals(cls.traceurCode, TrProjetH2d.CODE_PERMANENT);
cls = inter.getLine(14);
assertEquals(cls.typeBord, LTrTypeBord.LIQUIDE);
! assertEquals(cls.hCode, TrProjetH2d.CODE_LIBRE);
! assertEquals(cls.uCode, TrProjetH2d.CODE_PERMANENT);
assertEquals(cls.u, 0, eps_);
! assertEquals(cls.vCode, TrProjetH2d.CODE_PERMANENT);
! assertEquals(cls.traceurCode, TrProjetH2d.CODE_PERMANENT);
cls = inter.getLine(15);
assertEquals(cls.typeBord, LTrTypeBord.SOLIDE);
! assertEquals(cls.hCode, TrProjetH2d.CODE_LIBRE);
! assertEquals(cls.uCode, TrProjetH2d.CODE_PERMANENT);
assertEquals(cls.u, 0, eps_);
! assertEquals(cls.vCode, TrProjetH2d.CODE_PERMANENT);
assertEquals(cls.v, 0, eps_);
! assertEquals(cls.traceurCode, TrProjetH2d.CODE_LIBRE);
cls = inter.getLine(16);
assertEquals(cls.typeBord, LTrTypeBord.LIQUIDE_DEBIT_IMPOSE);
! assertEquals(cls.hCode, TrProjetH2d.CODE_PERMANENT);
! assertEquals(cls.uCode, TrProjetH2d.CODE_PERMANENT);
assertEquals(cls.u, 0, eps_);
! assertEquals(cls.vCode, TrProjetH2d.CODE_LIBRE);
! assertEquals(cls.traceurCode, TrProjetH2d.CODE_PERMANENT);
int l=inter.getNbLines();
--- 53,183 ----
STrConditionLimite cls = inter.getLine(0);
assertEquals(cls.typeBord, LTrTypeBord.LIQUIDE_ONDE_INCIDENCE);
! assertEquals(cls.hCode, H2dParametres.CODE_LIBRE);
! assertEquals(cls.uCode, H2dParametres.CODE_LIBRE);
! assertEquals(cls.vCode, H2dParametres.CODE_LIBRE);
! assertEquals(cls.traceurCode, H2dParametres.CODE_LIBRE);
cls = inter.getLine(1);
assertEquals(cls.typeBord, LTrTypeBord.SOLIDE);
! assertEquals(cls.hCode, H2dParametres.CODE_LIBRE);
! assertEquals(cls.uCode, H2dParametres.CODE_PERMANENT);
assertEquals(cls.u, 0, eps_);
! assertEquals(cls.vCode, H2dParametres.CODE_LIBRE);
! assertEquals(cls.traceurCode, H2dParametres.CODE_LIBRE);
cls = inter.getLine(2);
assertEquals(cls.typeBord, LTrTypeBord.SOLIDE);
! assertEquals(cls.hCode, H2dParametres.CODE_LIBRE);
! assertEquals(cls.uCode, H2dParametres.CODE_LIBRE);
! assertEquals(cls.vCode, H2dParametres.CODE_PERMANENT);
assertEquals(cls.v, 0, eps_);
! assertEquals(cls.traceurCode, H2dParametres.CODE_LIBRE);
cls = inter.getLine(3);
assertEquals(cls.typeBord, LTrTypeBord.SOLIDE);
! assertEquals(cls.hCode, H2dParametres.CODE_LIBRE);
! assertEquals(cls.uCode, H2dParametres.CODE_LIBRE);
! assertEquals(cls.vCode, H2dParametres.CODE_LIBRE);
! assertEquals(cls.traceurCode, H2dParametres.CODE_LIBRE);
cls = inter.getLine(4);
assertEquals(cls.typeBord, LTrTypeBord.LIQUIDE_DEBIT_IMPOSE);
! assertEquals(cls.hCode, H2dParametres.CODE_LIBRE);
! assertEquals(cls.uCode, H2dParametres.CODE_LIBRE);
! assertEquals(cls.vCode, H2dParametres.CODE_LIBRE);
! assertEquals(cls.traceurCode, H2dParametres.CODE_PERMANENT);
cls = inter.getLine(5);
assertEquals(cls.typeBord, LTrTypeBord.LIQUIDE_DEBIT_IMPOSE);
! assertEquals(cls.hCode, H2dParametres.CODE_LIBRE);
! assertEquals(cls.uCode, H2dParametres.CODE_LIBRE);
! assertEquals(cls.vCode, H2dParametres.CODE_PERMANENT);
assertEquals(cls.v, 0, eps_);
! assertEquals(cls.traceurCode, H2dParametres.CODE_PERMANENT);
cls = inter.getLine(6);
assertEquals(cls.typeBord, LTrTypeBord.LIQUIDE_DEBIT_IMPOSE);
! assertEquals(cls.hCode, H2dParametres.CODE_LIBRE);
! assertEquals(cls.uCode, H2dParametres.CODE_PERMANENT);
assertEquals(cls.u, 0, eps_);
! assertEquals(cls.vCode, H2dParametres.CODE_LIBRE);
! assertEquals(cls.traceurCode, H2dParametres.CODE_PERMANENT);
cls = inter.getLine(7);
assertEquals(cls.typeBord, LTrTypeBord.LIQUIDE_DEBIT_IMPOSE);
! assertEquals(cls.hCode, H2dParametres.CODE_PERMANENT);
! assertEquals(cls.uCode, H2dParametres.CODE_LIBRE);
! assertEquals(cls.vCode, H2dParametres.CODE_LIBRE);
! assertEquals(cls.traceurCode, H2dParametres.CODE_PERMANENT);
cls = inter.getLine(8);
assertEquals(cls.typeBord, LTrTypeBord.LIQUIDE);
! assertEquals(cls.hCode, H2dParametres.CODE_PERMANENT);
! assertEquals(cls.uCode, H2dParametres.CODE_LIBRE);
! assertEquals(cls.vCode, H2dParametres.CODE_PERMANENT);
assertEquals(cls.v, 0, eps_);
! assertEquals(cls.traceurCode, H2dParametres.CODE_LIBRE);
cls = inter.getLine(9);
assertEquals(cls.typeBord, LTrTypeBord.LIQUIDE);
! assertEquals(cls.hCode, H2dParametres.CODE_PERMANENT);
! assertEquals(cls.uCode, H2dParametres.CODE_PERMANENT);
assertEquals(cls.u, 0, eps_);
! assertEquals(cls.vCode, H2dParametres.CODE_LIBRE);
! assertEquals(cls.traceurCode, H2dParametres.CODE_LIBRE);
cls = inter.getLine(10);
assertEquals(cls.typeBord, LTrTypeBord.LIQUIDE);
! assertEquals(cls.hCode, H2dParametres.CODE_LIBRE);
! assertEquals(cls.uCode, H2dParametres.CODE_PERMANENT);
! assertEquals(cls.vCode, H2dParametres.CODE_PERMANENT);
! assertEquals(cls.traceurCode, H2dParametres.CODE_PERMANENT);
cls = inter.getLine(11);
assertEquals(cls.typeBord, LTrTypeBord.LIQUIDE);
! assertEquals(cls.hCode, H2dParametres.CODE_PERMANENT);
! assertEquals(cls.uCode, H2dParametres.CODE_LIBRE);
! assertEquals(cls.vCode, H2dParametres.CODE_LIBRE);
! assertEquals(cls.traceurCode, H2dParametres.CODE_LIBRE);
cls = inter.getLine(12);
assertEquals(cls.typeBord, LTrTypeBord.LIQUIDE);
! assertEquals(cls.hCode, H2dParametres.CODE_PERMANENT);
! assertEquals(cls.uCode, H2dParametres.CODE_PERMANENT);
! assertEquals(cls.vCode, H2dParametres.CODE_PERMANENT);
! assertEquals(cls.traceurCode, H2dParametres.CODE_PERMANENT);
cls = inter.getLine(13);
assertEquals(cls.typeBord, LTrTypeBord.LIQUIDE);
! assertEquals(cls.hCode, H2dParametres.CODE_LIBRE);
! assertEquals(cls.uCode, H2dParametres.CODE_PERMANENT);
! assertEquals(cls.vCode, H2dParametres.CODE_PERMANENT);
assertEquals(cls.v, 0, eps_);
! assertEquals(cls.traceurCode, H2dParametres.CODE_PERMANENT);
cls = inter.getLine(14);
assertEquals(cls.typeBord, LTrTypeBord.LIQUIDE);
! assertEquals(cls.hCode, H2dParametres.CODE_LIBRE);
! assertEquals(cls.uCode, H2dParametres.CODE_PERMANENT);
assertEquals(cls.u, 0, eps_);
! assertEquals(cls.vCode, H2dParametres.CODE_PERMANENT);
! assertEquals(cls.traceurCode, H2dParametres.CODE_PERMANENT);
cls = inter.getLine(15);
assertEquals(cls.typeBord, LTrTypeBord.SOLIDE);
! assertEquals(cls.hCode, H2dParametres.CODE_LIBRE);
! assertEquals(cls.uCode, H2dParametres.CODE_PERMANENT);
assertEquals(cls.u, 0, eps_);
! assertEquals(cls.vCode, H2dParametres.CODE_PERMANENT);
assertEquals(cls.v, 0, eps_);
! assertEquals(cls.traceurCode, H2dParametres.CODE_LIBRE);
cls = inter.getLine(16);
assertEquals(cls.typeBord, LTrTypeBord.LIQUIDE_DEBIT_IMPOSE);
! assertEquals(cls.hCode, H2dParametres.CODE_PERMANENT);
! assertEquals(cls.uCode, H2dParametres.CODE_PERMANENT);
assertEquals(cls.u, 0, eps_);
! assertEquals(cls.vCode, H2dParametres.CODE_LIBRE);
! assertEquals(cls.traceurCode, H2dParametres.CODE_PERMANENT);
int l=inter.getNbLines();
Index: TestLiquide.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/test/telemac/TestLiquide.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** TestLiquide.java 17 Apr 2003 17:26:24 -0000 1.1
--- TestLiquide.java 19 May 2003 13:54:03 -0000 1.2
***************
*** 20,24 ****
import org.fudaa.dodico.telemac.io.TelemacLiquideReader;
import org.fudaa.dodico.test.TestIO;
! import org.fudaa.dodico.tr.TrFileReadView;
/**
--- 20,24 ----
import org.fudaa.dodico.telemac.io.TelemacLiquideReader;
import org.fudaa.dodico.test.TestIO;
! import org.fudaa.dodico.h2d.H2dFileReadView;
/**
***************
*** 37,41 ****
* @see org.fudaa.dodico.test.TestIO#_interfaceTest(org.fudaa.dodico.tr.TrFileReadView)
*/
! public void _interfaceTest(TrFileReadView _r)
{
TelemacLiquideInterface inter = (TelemacLiquideInterface) _r.getSource();
--- 37,41 ----
* @see org.fudaa.dodico.test.TestIO#_interfaceTest(org.fudaa.dodico.tr.TrFileReadView)
*/
! public void _interfaceTest(H2dFileReadView _r)
{
TelemacLiquideInterface inter = (TelemacLiquideInterface) _r.getSource();
Index: TestSerafin.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/test/telemac/TestSerafin.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** TestSerafin.java 17 Apr 2003 17:26:24 -0000 1.6
--- TestSerafin.java 19 May 2003 13:54:03 -0000 1.7
***************
*** 23,27 ****
import org.fudaa.dodico.telemac.io.SerafinReader;
import org.fudaa.dodico.test.TestIO;
! import org.fudaa.dodico.tr.TrFileReadView;
/**
* @version $Id$
--- 23,27 ----
import org.fudaa.dodico.telemac.io.SerafinReader;
import org.fudaa.dodico.test.TestIO;
! import org.fudaa.dodico.h2d.H2dFileReadView;
/**
* @version $Id$
***************
*** 42,46 ****
! public void _interfaceTest(TrFileReadView _r)
{
assertNotNull(_r);
--- 42,46 ----
! public void _interfaceTest(H2dFileReadView _r)
{
assertNotNull(_r);
Index: TestSinusx.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/test/telemac/TestSinusx.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** TestSinusx.java 18 Mar 2003 15:36:10 -0000 1.4
--- TestSinusx.java 19 May 2003 13:54:03 -0000 1.5
***************
*** 18,22 ****
import org.fudaa.dodico.mnt.*;
! import org.fudaa.dodico.tr.*;
import org.fudaa.dodico.telemac.io.*;
--- 18,22 ----
import org.fudaa.dodico.mnt.*;
! import org.fudaa.dodico.h2d.*;
import org.fudaa.dodico.telemac.io.*;
|