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-09-05 15:50:28
|
Update of /cvsroot/fudaa//fudaa_devel/aide/src/mascaret/Doc.images In directory sc8-pr-cvs1:/tmp/cvs-serv30423 Added Files: Image1.jpg Log Message: La première image de l'aide mascaret --- NEW FILE: Image1.jpg --- (This appears to be a binary file; contents omitted.) |
|
From: <de...@us...> - 2003-09-02 09:16:05
|
Update of /cvsroot/fudaa/fudaa_devel In directory sc8-pr-cvs1:/tmp/cvs-serv14774 Modified Files: .cvsignore Log Message: Index: .cvsignore =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/.cvsignore,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** .cvsignore 7 Aug 2003 08:11:08 -0000 1.4 --- .cvsignore 2 Sep 2003 09:15:48 -0000 1.5 *************** *** 2,3 **** --- 2,4 ---- fudaa.conf .project + purge |
Update of /cvsroot/fudaa/fudaa_devel/aide/src/mascaret In directory sc8-pr-cvs1:/tmp/cvs-serv14290 Added Files: condition_initiale.html condition_initiale_mascaret.html condition_initiale_mascaret_os.html condition_initiale_np.html condition_limite.html condition_limite_os.html confluent.html confluent_mascaret.html description_des_choix.html description_reseau.html edition.html edition_mascaret.html edition_mascaret_os.html edition_np.html etape_prepa.html etape_prepa_mascaret.html etape_prepa_mascaret_os.html etape_prepa_np.html geom.html geom_mascaret.html geom_mascaret_os.html geom_np.html graphes.html index.html lexique.html lois_hydrauliques.html lois_hydrauliques_mascaret.html maillage.html maillage_mascaret_os.html outils_graphiques.html parametres_generaux.html parametres_generaux_mascaret.html parametres_generaux_mascaret_os.html parametres_resultats.html parametres_resultats_mascaret_os.html parametres_temporels.html parametres_temporels_mascaret.html parametres_temporels_np.html planimetrage.html presentation_generale.html reseau_hydraulique.html reseau_hydraulique_mascaret.html reseau_hydraulique_mascaret_os.html reseau_hydraulique_np.html resultat_generaux.html singularites.html singularites_mascaret_os.html strickler_crues.html strickler_os.html Log Message: Reajout fichier html |
|
From: <de...@us...> - 2003-09-02 09:03:36
|
Update of /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/test/tr
In directory sc8-pr-cvs1:/tmp/cvs-serv12718/test/tr
Modified Files:
TestTelemacCasViewer.java
Log Message:
Amelioration tableau de visualisation de fichier cas ( ajout/suppression
colonne).
Index: TestTelemacCasViewer.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/test/tr/TestTelemacCasViewer.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** TestTelemacCasViewer.java 18 Aug 2003 11:54:43 -0000 1.3
--- TestTelemacCasViewer.java 2 Sep 2003 09:03:31 -0000 1.4
***************
*** 20,23 ****
--- 20,24 ----
import org.fudaa.dodico.telemac.io.Telemac2dFileFormat;
import org.fudaa.fudaa.dico.FDicoEntitePanel;
+ import org.fudaa.fudaa.tr.TrPreferences;
import org.fudaa.fudaa.tr.telemac.TrTelemacProjet;
***************
*** 73,77 ****
frame.addWindowListener(new WindowAdapter()
{
! public void windowClosing(WindowEvent _e){ System.exit(0);}
});
--- 74,78 ----
frame.addWindowListener(new WindowAdapter()
{
! public void windowClosing(WindowEvent _e){ TrPreferences.TR.writeIniFile();System.exit(0);}
});
|
|
From: <de...@us...> - 2003-09-02 09:03:35
|
Update of /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/commun
In directory sc8-pr-cvs1:/tmp/cvs-serv12718/commun
Modified Files:
FudaaCommonImplementation.java
Log Message:
Amelioration tableau de visualisation de fichier cas ( ajout/suppression
colonne).
Index: FudaaCommonImplementation.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/commun/FudaaCommonImplementation.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** FudaaCommonImplementation.java 22 Aug 2003 16:02:23 -0000 1.3
--- FudaaCommonImplementation.java 2 Sep 2003 09:03:31 -0000 1.4
***************
*** 335,345 ****
addInternalFrame(preferences_);
}
/**
*
*/
! public void error(String _titre, String _text)
{
FudaaLib.showError(this, _titre, _text);
System.err.println(_titre + " " + _text);
--- 335,350 ----
addInternalFrame(preferences_);
}
+
+ public void error(String _titre, String _text){
+ error(_titre,_text,true);
+ }
/**
*
*/
! public void error(String _titre, String _text,boolean printErr)
{
FudaaLib.showError(this, _titre, _text);
+ if(printErr)
System.err.println(_titre + " " + _text);
***************
*** 482,486 ****
error(
_analyze.getDesc(),
! f.getOffset() < 0 ? f.getMessage() : f.toString());
return true;
}
--- 487,491 ----
error(
_analyze.getDesc(),
! f.getOffset() < 0 ? f.getMessage() : f.toString(),false);
return true;
}
|
|
From: <de...@us...> - 2003-09-02 09:01:09
|
Update of /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/data
In directory sc8-pr-cvs1:/tmp/cvs-serv12326/data
Modified Files:
TrCalqueMaillage.java
Added Files:
TrCalqueBord.java TrModeleBord.java
Log Message:
Support des bords dans les calques
--- NEW FILE: TrCalqueBord.java ---
(This appears to be a binary file; contents omitted.)
--- NEW FILE: TrModeleBord.java ---
(This appears to be a binary file; contents omitted.)
Index: TrCalqueMaillage.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/data/TrCalqueMaillage.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** TrCalqueMaillage.java 22 Aug 2003 16:02:24 -0000 1.1
--- TrCalqueMaillage.java 2 Sep 2003 09:00:36 -0000 1.2
***************
*** 37,62 ****
* @version $Id$
*/
! public class TrCalqueMaillage extends ZCalqueAffichageDonnees
!
! {
H2dMaillage mail_;
ZCalquePoint cqPt_;
/**
* @param _pts
* @param _elts
*/
! public TrCalqueMaillage(H2dMaillage _maill)
! {
setName("Maillage");
! mail_=_maill;
! cqPt_=new ZCalquePoint(new ModelePoint());
cqPt_.setName("Points");
add(cqPt_);
! BCalque p=new ZCalquePolygone(new ModelePolygone());
! p.setName("polygone");
! add(p);
! p=new ZCalqueLongPolygone(new ModeleBord());
! p.setName("bord");
! add(p);
}
--- 37,65 ----
* @version $Id$
*/
! public class TrCalqueMaillage extends ZCalqueAffichageDonnees {
H2dMaillage mail_;
ZCalquePoint cqPt_;
+ ZCalquePolygone cqPoly_;
+ ZCalqueLongPolygone cqBord_;
/**
* @param _pts
* @param _elts
*/
! public TrCalqueMaillage(H2dMaillage _maill) {
setName("Maillage");
! setDestructible(false);
! mail_= _maill;
! cqPt_= new ZCalquePoint(new ModelePoint());
cqPt_.setName("Points");
+ cqPt_.setDestructible(false);
add(cqPt_);
! cqPoly_= new ZCalquePolygone(new ModelePolygone());
! cqPoly_.setDestructible(false);
! cqPoly_.setName("polygone");
! add(cqPoly_);
! cqBord_= new ZCalqueLongPolygone(new ModeleBord());
! cqBord_.setDestructible(false);
! cqBord_.setName("bord");
! add(cqBord_);
}
***************
*** 64,100 ****
*
*/
! public GrBoite getDomaine()
! {
! GrBoite b = new GrBoite();
! H2dPoint pt=mail_.getMinPoint();
! b.o = new GrPoint(pt.getX(), pt.getY(), pt.getZ());
! pt=mail_.getMaxPoint();
! b.e = new GrPoint(pt.getX(), pt.getY(), pt.getZ());
! return b;
}
! public ZModelePoint getModelePoint()
! {
return new ModelePoint();
}
! public ZModelePolygone getModelePolygone()
! {
return new ModelePolygone();
}
!
! public ZModeleLongPolygone getModeleBord()
! {
return new ModeleBord();
}
! private class ModelePoint implements ZModelePoint
! {
/**
*
*/
! public boolean point(GrPoint _p, int _i)
! {
return TrCalqueMaillage.this.point(_p, _i);
}
--- 67,103 ----
*
*/
! public GrBoite getDomaine() {
! return getDomaine(mail_);
}
+
+ public static GrBoite getDomaine(H2dMaillage _m) {
+ GrBoite b= new GrBoite();
+ H2dPoint pt= _m.getMinPoint();
+ b.o= new GrPoint(pt.getX(), pt.getY(), pt.getZ());
+ pt= _m.getMaxPoint();
+ b.e= new GrPoint(pt.getX(), pt.getY(), pt.getZ());
+ return b;
+ }
+
+
! public ZModelePoint getModelePoint() {
return new ModelePoint();
}
! public ZModelePolygone getModelePolygone() {
return new ModelePolygone();
}
!
! public ZModeleLongPolygone getModeleBord() {
return new ModeleBord();
}
! private class ModelePoint implements ZModelePoint {
/**
*
*/
! public boolean point(GrPoint _p, int _i) {
return TrCalqueMaillage.this.point(_p, _i);
}
***************
*** 103,108 ****
*
*/
! public GrBoite getDomaine()
! {
return TrCalqueMaillage.this.getDomaine();
}
--- 106,110 ----
*
*/
! public GrBoite getDomaine() {
return TrCalqueMaillage.this.getDomaine();
}
***************
*** 111,116 ****
*
*/
! public int getNombre()
! {
return TrCalqueMaillage.this.mail_.getPtsNb();
}
--- 113,117 ----
*
*/
! public int getNombre() {
return TrCalqueMaillage.this.mail_.getPtsNb();
}
***************
*** 119,124 ****
*
*/
! public Object getObject(int _ind)
! {
throw new UnsupportedOperationException("methode non implantée");
}
--- 120,124 ----
*
*/
! public Object getObject(int _ind) {
throw new UnsupportedOperationException("methode non implantée");
}
***************
*** 126,138 ****
}
! protected class ModelePolygone implements ZModelePolygone
! {
!
/**
*
*/
! public boolean polygone(GrPolygone _p, int _i)
! {
return TrCalqueMaillage.this.polygone(_p, _i);
}
--- 126,135 ----
}
! protected class ModelePolygone implements ZModelePolygone {
/**
*
*/
! public boolean polygone(GrPolygone _p, int _i) {
return TrCalqueMaillage.this.polygone(_p, _i);
}
***************
*** 141,146 ****
*
*/
! public GrBoite getDomaine()
! {
return TrCalqueMaillage.this.getDomaine();
}
--- 138,142 ----
*
*/
! public GrBoite getDomaine() {
return TrCalqueMaillage.this.getDomaine();
}
***************
*** 149,154 ****
*
*/
! public int getNombre()
! {
return TrCalqueMaillage.this.mail_.getEltNb();
}
--- 145,149 ----
*
*/
! public int getNombre() {
return TrCalqueMaillage.this.mail_.getEltNb();
}
***************
*** 157,162 ****
*
*/
! public Object getObject(int _ind)
! {
throw new UnsupportedOperationException("methode non implantée");
}
--- 152,156 ----
*
*/
! public Object getObject(int _ind) {
throw new UnsupportedOperationException("methode non implantée");
}
***************
*** 165,209 ****
*
*/
! public int nbPoints(int i)
! {
return TrCalqueMaillage.this.getNbPointsForElt(i);
}
}
!
! public int getNbPointsForElt(int _indexElt)
! {
return mail_.getElement(_indexElt).getPtNb();
!
}
! public static void initGrPoint(H2dPoint _pt, GrPoint _ptToinit)
! {
! _ptToinit.x = _pt.getX();
! _ptToinit.y = _pt.getY();
! _ptToinit.z = _pt.getZ();
}
public static void initGrPolygone(
! H2dMaillage _ma,
H2dElement _pt,
! GrPolygone _ptToinit)
! {
! int n = _pt.getPtNb();
! if (_ptToinit.nombre() != n)
! {
_ptToinit.sommets.setSize(n);
}
GrPoint grpt;
H2dPoint hpt;
! for (int i = 0; i < n; i++)
! {
! hpt = _ma.getPt(_pt.getPtIndex()[i]);
! grpt = _ptToinit.sommets.renvoie(i);
if (grpt != null)
initGrPoint(hpt, grpt);
! else
! {
! grpt = new GrPoint(hpt.getX(), hpt.getY(), hpt.getZ());
_ptToinit.sommets.remplace(grpt, i);
}
--- 159,196 ----
*
*/
! public int nbPoints(int i) {
return TrCalqueMaillage.this.getNbPointsForElt(i);
}
}
!
! public int getNbPointsForElt(int _indexElt) {
return mail_.getElement(_indexElt).getPtNb();
!
}
! public static void initGrPoint(H2dPoint _pt, GrPoint _ptToinit) {
! _ptToinit.x= _pt.getX();
! _ptToinit.y= _pt.getY();
! _ptToinit.z= _pt.getZ();
}
public static void initGrPolygone(
! H2dMaillage _ma,
H2dElement _pt,
! GrPolygone _ptToinit) {
! int n= _pt.getPtNb();
! if (_ptToinit.nombre() != n) {
_ptToinit.sommets.setSize(n);
}
GrPoint grpt;
H2dPoint hpt;
! for (int i= 0; i < n; i++) {
! hpt= _ma.getPt(_pt.getPtIndex()[i]);
! grpt= _ptToinit.sommets.renvoie(i);
if (grpt != null)
initGrPoint(hpt, grpt);
! else {
! grpt= new GrPoint(hpt.getX(), hpt.getY(), hpt.getZ());
_ptToinit.sommets.remplace(grpt, i);
}
***************
*** 211,250 ****
}
!
! private class ModeleBord implements ZModeleLongPolygone
! {
!
private TIntObjectHashMap indexMinMax_;
!
! public ModeleBord()
! {
! int n=mail_.getPtsFrontiere().getBordInternNb();
! if(n>0)
! {
! indexMinMax_=new TIntObjectHashMap(n);
! for(int i=0;i<n;i++)
! {
! indexMinMax_.put(i,mail_.getMinMaxPointFrontiere(i));
}
}
}
!
! /**
! *
! */
! public GrBoite getDomaineForPolygoneIdx(int _idx)
! {
! if(_idx==0) return TrCalqueMaillage.this.getDomaine();
! if(indexMinMax_==null)
! {
System.err.println("Prob !!!");
return null;
! }
! else
! {
! H2dPoint[] minMax=(H2dPoint[])indexMinMax_.get(_idx-1);
! GrBoite r=new GrBoite();
! r.o=new GrPoint();
! r.e=new GrPoint();
initGrPoint(minMax[0], r.o);
initGrPoint(minMax[1], r.e);
--- 198,230 ----
}
!
! private class ModeleBord implements ZModeleLongPolygone {
!
private TIntObjectHashMap indexMinMax_;
!
! public ModeleBord() {
! int n= mail_.getPtsFrontiere().getBordInternNb();
! if (n > 0) {
! indexMinMax_= new TIntObjectHashMap(n);
! for (int i= 0; i < n; i++) {
! indexMinMax_.put(i, mail_.getMinMaxPointFrontiere(i));
}
}
}
!
! /**
! *
! */
! public GrBoite getDomaineForPolygoneIdx(int _idx) {
! if (_idx == 0)
! return TrCalqueMaillage.this.getDomaine();
! if (indexMinMax_ == null) {
System.err.println("Prob !!!");
return null;
! } else {
! H2dPoint[] minMax= (H2dPoint[])indexMinMax_.get(_idx - 1);
! GrBoite r= new GrBoite();
! r.o= new GrPoint();
! r.e= new GrPoint();
initGrPoint(minMax[0], r.o);
initGrPoint(minMax[1], r.e);
***************
*** 257,262 ****
*
*/
! public int getNbPointForPolygoneIdx(int _idx)
! {
return TrCalqueMaillage.this.mail_.getPtsFrontiere().getPtNbForBord(_idx);
}
--- 237,241 ----
*
*/
! public int getNbPointForPolygoneIdx(int _idx) {
return TrCalqueMaillage.this.mail_.getPtsFrontiere().getPtNbForBord(_idx);
}
***************
*** 265,270 ****
*
*/
! public int getPolygoneNb()
! {
return TrCalqueMaillage.this.mail_.getPtsFrontiere().getBordNb();
}
--- 244,248 ----
*
*/
! public int getPolygoneNb() {
return TrCalqueMaillage.this.mail_.getPtsFrontiere().getBordNb();
}
***************
*** 273,279 ****
*
*/
! public boolean point(GrPoint _p, int _polygoneIdx, int _pointIdx)
! {
! H2dPoint pt=mail_.getPt(TrCalqueMaillage.this.mail_.getPtsFrontiere().getPtIdxForBord(_polygoneIdx,_pointIdx));
initGrPoint(pt, _p);
return true;
--- 251,260 ----
*
*/
! public boolean point(GrPoint _p, int _polygoneIdx, int _pointIdx) {
! H2dPoint pt=
! mail_.getPt(
! TrCalqueMaillage.this.mail_.getPtsFrontiere().getPtIdxForBord(
! _polygoneIdx,
! _pointIdx));
initGrPoint(pt, _p);
return true;
***************
*** 283,288 ****
*
*/
! public GrBoite getDomaine()
! {
return TrCalqueMaillage.this.getDomaine();
}
--- 264,268 ----
*
*/
! public GrBoite getDomaine() {
return TrCalqueMaillage.this.getDomaine();
}
***************
*** 291,296 ****
*
*/
! public int getNombre()
! {
return TrCalqueMaillage.this.mail_.getPtsFrontiere().getBordNb();
}
--- 271,275 ----
*
*/
! public int getNombre() {
return TrCalqueMaillage.this.mail_.getPtsFrontiere().getBordNb();
}
***************
*** 299,314 ****
*
*/
! public Object getObject(int _ind)
! {
return null;
}
! }
/**
*
*/
! public boolean point(GrPoint _p, int _i)
! {
initGrPoint(mail_.getPt(_i), _p);
return true;
--- 278,291 ----
*
*/
! public Object getObject(int _ind) {
return null;
}
! }
/**
*
*/
! public boolean point(GrPoint _p, int _i) {
initGrPoint(mail_.getPt(_i), _p);
return true;
***************
*** 318,323 ****
*
*/
! public boolean polygone(GrPolygone _poly, int _i)
! {
initGrPolygone(this.mail_, mail_.getElement(_i), _poly);
return true;
--- 295,299 ----
*
*/
! public boolean polygone(GrPolygone _poly, int _i) {
initGrPolygone(this.mail_, mail_.getElement(_i), _poly);
return true;
***************
*** 345,349 ****
*/
public EbliListeSelection selection(GrPolygone _poly, boolean _partiel) {
! return cqPt_.selection(_poly,_partiel);
}
--- 321,345 ----
*/
public EbliListeSelection selection(GrPolygone _poly, boolean _partiel) {
! return cqPt_.selection(_poly, _partiel);
! }
!
! private boolean polyOldValue= true;
!
! /**
! *
! */
! public void setRapide(boolean _v) {
! if (rapide_ != _v) {
! boolean vp= rapide_;
! rapide_= _v;
! cqPt_.setRapide(_v);
! cqBord_.setRapide(_v);
! if (_v) {
! polyOldValue= cqPoly_.isVisible();
! cqPoly_.setVisible(false);
! } else
! cqPoly_.setVisible(polyOldValue);
! firePropertyChange("ajustement", vp, rapide_);
! }
}
|
|
From: <de...@us...> - 2003-09-02 09:01:09
|
Update of /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr
In directory sc8-pr-cvs1:/tmp/cvs-serv12326
Modified Files:
TrFilleVisu.java TrImplementation.java TrProjet.java
Log Message:
Support des bords dans les calques
Index: TrFilleVisu.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/TrFilleVisu.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** TrFilleVisu.java 22 Aug 2003 16:02:23 -0000 1.1
--- TrFilleVisu.java 2 Sep 2003 09:00:34 -0000 1.2
***************
*** 12,18 ****
import org.fudaa.dodico.h2d.H2dParametres;
- import org.fudaa.dodico.h2d.reflux.H2dRefluxParametres;
import org.fudaa.ebli.calque.BCalque;
import org.fudaa.ebli.calque.BVueCalque;
import org.fudaa.ebli.calque.ZEbliFilleCalques;
--- 12,18 ----
import org.fudaa.dodico.h2d.H2dParametres;
import org.fudaa.ebli.calque.BCalque;
+ import org.fudaa.ebli.calque.BGroupeCalque;
import org.fudaa.ebli.calque.BVueCalque;
import org.fudaa.ebli.calque.ZEbliFilleCalques;
***************
*** 37,48 ****
true,
true);
parametres_= _params;
! BVueCalque vue= getVueCalque();
! vue.setBackground(Color.white);
! vue.getCalque().add(new TrCalqueMaillage(parametres_.getMaillage()));
}
public BCalque getCalque() {
! return getVueCalque().getCalque();
}
--- 37,54 ----
true,
true);
+ setClosable(true);
parametres_= _params;
! setModeVisible(true);
! getVueCalque().setBackground(Color.white);
!
! }
!
! protected void addCqMaillage(){
! gcDonnees_.add(new TrCalqueMaillage(parametres_.getMaillage()));
}
+
public BCalque getCalque() {
! return gcDonnees_;
}
Index: TrImplementation.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/TrImplementation.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** TrImplementation.java 22 Aug 2003 16:02:23 -0000 1.5
--- TrImplementation.java 2 Sep 2003 09:00:35 -0000 1.6
***************
*** 66,71 ****
static {
isRt_.name= "Tr";
! isRt_.version= "0.02";
! isRt_.date= "18-juin-2003";
isRt_.rights= "Tous droits réservés. CETMEF (c)2003";
isRt_.contact= "fre...@eq...";
--- 66,71 ----
static {
isRt_.name= "Tr";
! isRt_.version= "0.03";
! isRt_.date= "01-septembre-2003";
isRt_.rights= "Tous droits réservés. CETMEF (c)2003";
isRt_.contact= "fre...@eq...";
***************
*** 129,134 ****
protected void ouvrirId(String _id) {
! if (_id
! .equals(TelemacDicoFileFormat.DICO_PROJET_ID)) {
TrTelemacImplHelper h=
(TrTelemacImplHelper)TrImplHelper.getImplHelper(
--- 129,133 ----
protected void ouvrirId(String _id) {
! if (_id.equals(TelemacDicoFileFormat.DICO_PROJET_ID)) {
TrTelemacImplHelper h=
(TrTelemacImplHelper)TrImplHelper.getImplHelper(
***************
*** 186,192 ****
} else if ("MODIFIER_CHAINE".equals(action)) {
changeChaineCalcul();
} else if (action.startsWith(TrExport.EXPORT_PREF)) {
projetCourant().export(action);
-
} else {
super.actionPerformed(_evt);
--- 185,194 ----
} else if ("MODIFIER_CHAINE".equals(action)) {
changeChaineCalcul();
+ } else if ("PROJET_FENETRE_GENERAL".equals(action)) {
+ projetCourant().showGeneralFille();
+ } else if ("PROJET_FENETRE_VISU".equals(action)) {
+ projetCourant().showVisuFille();
} else if (action.startsWith(TrExport.EXPORT_PREF)) {
projetCourant().export(action);
} else {
super.actionPerformed(_evt);
***************
*** 196,200 ****
public BuMenu buildProjetMenu() {
BuMenu projet= new BuDynamicMenu("Projet", "PROJET") {
- private boolean built_;
public boolean isActive() {
return true;
--- 198,201 ----
***************
*** 202,212 ****
public void build() {
! if (this.getMenuComponentCount() == 0) {
! BuMenuItem it= new BuMenuItem("Changer chaîne de calcul");
! it.setActionCommand("MODIFIER_CHAINE");
! add(it);
it.addActionListener(TrImplementation.this);
! built_= true;
}
}
};
--- 203,225 ----
public void build() {
! removeAll();
! BuMenuItem it;
! if (projetCourant() != null) {
! it= new BuMenuItem("Données générales");
! it.setActionCommand("PROJET_FENETRE_GENERAL");
it.addActionListener(TrImplementation.this);
! add(it);
! if (projetCourant().containsVisuFille()) {
! it= new BuMenuItem("Visualisation");
! it.setActionCommand("PROJET_FENETRE_VISU");
! it.addActionListener(TrImplementation.this);
! add(it);
! }
! addSeparator();
}
+ it= new BuMenuItem("Changer chaîne de calcul");
+ it.setActionCommand("MODIFIER_CHAINE");
+ add(it);
+ it.addActionListener(TrImplementation.this);
}
};
***************
*** 313,323 ****
}
projectManager_.addProjet(_o);
! _o.active();
setEnabledForAction("ENREGISTRER", true);
setEnabledForAction("ENREGISTRERSOUS", true);
setEnabledForAction("ENREGISTRERCOPIE", true);
- setEnabledForAction("FERMER", true);
setEnabledForAction("EXPORTER", true);
!
}
--- 326,335 ----
}
projectManager_.addProjet(_o);
! setEnabledForAction("FERMER", true);
setEnabledForAction("ENREGISTRER", true);
setEnabledForAction("ENREGISTRERSOUS", true);
setEnabledForAction("ENREGISTRERCOPIE", true);
setEnabledForAction("EXPORTER", true);
! _o.active();
}
Index: TrProjet.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/TrProjet.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** TrProjet.java 22 Aug 2003 16:02:23 -0000 1.5
--- TrProjet.java 2 Sep 2003 09:00:35 -0000 1.6
***************
*** 39,42 ****
--- 39,49 ----
public FudaaCalculAction getCalculActions();
public void export(String _actionCommand);
+
+ public void showGeneralFille();
+
+ public void showVisuFille();
+
+ public boolean containsVisuFille();
+
}
|
Update of /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/telemac
In directory sc8-pr-cvs1:/tmp/cvs-serv12326/telemac
Modified Files:
TrDicoProjet.java TrTelemacFilleVisu.java
TrTelemacParametres.java TrTelemacProjet.java
Log Message:
Support des bords dans les calques
Index: TrDicoProjet.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/telemac/TrDicoProjet.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** TrDicoProjet.java 22 Aug 2003 16:02:24 -0000 1.4
--- TrDicoProjet.java 2 Sep 2003 09:00:36 -0000 1.5
***************
*** 29,62 ****
public class TrDicoProjet
extends FDicoProjet
! implements FDicoProjetInterface, TrProjet, ActionListener
! {
! public TrDicoProjet(FDicoParams _param,TrImplementation _impl)
! {
! super(_param,_impl);
! if(isValide()) actions_.setEnableCalcul(true);
}
!
! public final boolean isValide()
! {
return super.isValide();
}
public static TrDicoProjet init(
File _file,
DicoCasFileFormatVersion _fileFormat,
! ProgressionInterface _progress,TrImplementation _ui)
! {
//TODO: gerer si param deja present
! FDicoParams params_=FDicoParams.init(_file, _fileFormat, _progress, _ui);
! if(params_!=null) return new TrDicoProjet(params_,_ui);
! else return null;
}
!
! public void close()
! {
super.close();
! ((TrImplementation) impl_).closeProjet(this);
}
--- 29,71 ----
public class TrDicoProjet
extends FDicoProjet
! implements FDicoProjetInterface, TrProjet, ActionListener {
! public TrDicoProjet(FDicoParams _param, TrImplementation _impl) {
! super(_param, _impl);
! if (isValide())
! actions_.setEnableCalcul(true);
}
!
! public final boolean isValide() {
return super.isValide();
}
+
+ public boolean containsVisuFille() {
+ return true;
+ }
+
+ public void showGeneralFille() {
+ active();
+ }
+ public void showVisuFille(){
+ }
+
public static TrDicoProjet init(
File _file,
DicoCasFileFormatVersion _fileFormat,
! ProgressionInterface _progress,
! TrImplementation _ui) {
//TODO: gerer si param deja present
! FDicoParams params_= FDicoParams.init(_file, _fileFormat, _progress, _ui);
! if (params_ != null)
! return new TrDicoProjet(params_, _ui);
! else
! return null;
}
! public void close() {
super.close();
! ((TrImplementation)impl_).closeProjet(this);
}
***************
*** 64,69 ****
*
*/
! public String getID()
! {
return TelemacDicoFileFormat.DICO_PROJET_ID;
}
--- 73,77 ----
*
*/
! public String getID() {
return TelemacDicoFileFormat.DICO_PROJET_ID;
}
***************
*** 72,78 ****
*
*/
! public void setImpl(TrImplementation _impl)
! {
! impl_ = _impl;
}
--- 80,85 ----
*
*/
! public void setImpl(TrImplementation _impl) {
! impl_= _impl;
}
***************
*** 81,85 ****
*
*/
! public void export(String _actionCommand) {impl_.error("Non implanté");}
}
--- 88,94 ----
*
*/
! public void export(String _actionCommand) {
! impl_.error("Non implanté");
! }
}
Index: TrTelemacFilleVisu.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/telemac/TrTelemacFilleVisu.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** TrTelemacFilleVisu.java 22 Aug 2003 16:02:26 -0000 1.1
--- TrTelemacFilleVisu.java 2 Sep 2003 09:00:37 -0000 1.2
***************
*** 25,28 ****
--- 25,32 ----
{
super(_impl,_params);
+ addCqMaillage();
+ arbre_.refresh();
+ System.out.println("ref");
+ arbre_.refresh();
}
Index: TrTelemacParametres.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/telemac/TrTelemacParametres.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** TrTelemacParametres.java 22 Aug 2003 16:02:26 -0000 1.5
--- TrTelemacParametres.java 2 Sep 2003 09:00:37 -0000 1.6
***************
*** 39,43 ****
* @version $Id$
*/
! public class TrTelemacParametres extends FDicoParams implements TrParametres {
H2dTelemacParametres params_;
--- 39,44 ----
* @version $Id$
*/
! public class TrTelemacParametres extends FDicoParams implements TrParametres
! {
H2dTelemacParametres params_;
***************
*** 48,52 ****
File _file,
DicoCasFileFormatVersion _ft,
! Map _initialSetValues) {
super(_file, _ft, _initialSetValues);
}
--- 49,54 ----
File _file,
DicoCasFileFormatVersion _ft,
! Map _initialSetValues)
! {
super(_file, _ft, _initialSetValues);
}
***************
*** 56,67 ****
Telemac2dFileFormat.TelemacVersion _ft,
ProgressionInterface _progress,
! TrImplementation _ui) {
FileOperationSynthese op= _ft.read(_file, _progress);
! DicoCasInterface inter= (DicoCasInterface)op.getSource();
if (_ui != null)
_ui.manageErrorOperationAndIsFatal(op);
if (inter == null)
return null;
! if ((inter.getInputs() == null) || (inter.getInputs().size() == 0)) {
if (_ui != null)
_ui.error(
--- 58,71 ----
Telemac2dFileFormat.TelemacVersion _ft,
ProgressionInterface _progress,
! TrImplementation _ui)
! {
FileOperationSynthese op= _ft.read(_file, _progress);
! DicoCasInterface inter= (DicoCasInterface) op.getSource();
if (_ui != null)
_ui.manageErrorOperationAndIsFatal(op);
if (inter == null)
return null;
! if ((inter.getInputs() == null) || (inter.getInputs().size() == 0))
! {
if (_ui != null)
_ui.error(
***************
*** 76,92 ****
}
! public boolean isValide() {
return dicoParams_.isValide();
}
! public FDicoParams getFDicoParams() {
return this;
}
! public Telemac2dFileFormat.TelemacVersion getTelemacFileFormatVersion() {
return (Telemac2dFileFormat.TelemacVersion) (getFileFormatVersion());
}
! private void _loadAll(ProgressionInterface _prg) {
loadGeometrie(_prg);
loadConditionsLimite(_prg);
--- 80,100 ----
}
! public boolean isValide()
! {
return dicoParams_.isValide();
}
! public FDicoParams getFDicoParams()
! {
return this;
}
! public Telemac2dFileFormat.TelemacVersion getTelemacFileFormatVersion()
! {
return (Telemac2dFileFormat.TelemacVersion) (getFileFormatVersion());
}
! private void _loadAll(ProgressionInterface _prg)
! {
loadGeometrie(_prg);
loadConditionsLimite(_prg);
***************
*** 95,103 ****
}
! public void loadGeometrie(ProgressionInterface _prg) {
loadGeometrie(_prg, null);
}
! public void loadAll(ProgressionInterface _prg) {
loadAll(_prg, null);
}
--- 103,113 ----
}
! public void loadGeometrie(ProgressionInterface _prg)
! {
loadGeometrie(_prg, null);
}
! public void loadAll(ProgressionInterface _prg)
! {
loadAll(_prg, null);
}
***************
*** 105,110 ****
public synchronized void loadGeometrie(
ProgressionInterface _prg,
! TrThreadListener _th) {
! if (!geometrieLoaded_) {
_loadGeometrie(_prg);
geometrieLoaded_= true;
--- 115,122 ----
public synchronized void loadGeometrie(
ProgressionInterface _prg,
! TrThreadListener _th)
! {
! if (!geometrieLoaded_)
! {
_loadGeometrie(_prg);
geometrieLoaded_= true;
***************
*** 116,121 ****
public synchronized void loadAll(
ProgressionInterface _prg,
! TrThreadListener _th) {
! if (!allLoaded_) {
_loadAll(_prg);
allLoaded_= true;
--- 128,135 ----
public synchronized void loadAll(
ProgressionInterface _prg,
! TrThreadListener _th)
! {
! if (!allLoaded_)
! {
_loadAll(_prg);
allLoaded_= true;
***************
*** 125,130 ****
}
! public synchronized void _loadGeometrie(ProgressionInterface _prg) {
! if (params_ != null) {
ui_.error(
"Maillage deja present",
--- 139,146 ----
}
! public synchronized void _loadGeometrie(ProgressionInterface _prg)
! {
! if (params_ != null)
! {
ui_.error(
"Maillage deja present",
***************
*** 135,139 ****
dicoParams_.getFileEntite(
getTelemacFileFormatVersion().getMaillageEntiteFile());
! if (entFile == null) {
ui_.error(
"Fichier de maillage",
--- 151,156 ----
dicoParams_.getFileEntite(
getTelemacFileFormatVersion().getMaillageEntiteFile());
! if (entFile == null)
! {
ui_.error(
"Fichier de maillage",
***************
*** 141,145 ****
return;
}
! BuMainPanel pn= ((TrImplementation)ui_).getMainPanel();
pn.setMessage("Lecture maillage");
FileOperationSynthese op=
--- 158,162 ----
return;
}
! BuMainPanel pn= ((TrImplementation) ui_).getMainPanel();
pn.setMessage("Lecture maillage");
FileOperationSynthese op=
***************
*** 147,151 ****
getFile(entFile),
_prg);
! SerafinInterface sInter= (SerafinInterface)op.getSource();
ui_.manageErrorOperationAndIsFatal(op);
--- 164,168 ----
getFile(entFile),
_prg);
! SerafinInterface sInter= (SerafinInterface) op.getSource();
ui_.manageErrorOperationAndIsFatal(op);
***************
*** 157,161 ****
getTelemacFileFormatVersion().getDefaultSerafinFormat().getVariableFond();
int numVariable= TelemacLib.contientVariable(sInter, fond);
! if (numVariable < 0) {
//pour l'instant
ui_.error("Maillage", "bathymétrie non trouvée variable FOND ou es-tu ?");
--- 174,179 ----
getTelemacFileFormatVersion().getDefaultSerafinFormat().getVariableFond();
int numVariable= TelemacLib.contientVariable(sInter, fond);
! if (numVariable < 0)
! {
//pour l'instant
ui_.error("Maillage", "bathymétrie non trouvée variable FOND ou es-tu ?");
***************
*** 163,167 ****
}
int nbPasTemps= sInter.getNbPasDeTemps();
! if (nbPasTemps > 1) {
System.out.println("la variable à t=0 sera prise");
}
--- 181,186 ----
}
int nbPasTemps= sInter.getNbPasDeTemps();
! if (nbPasTemps > 1)
! {
System.out.println("la variable à t=0 sera prise");
}
***************
*** 178,186 ****
}
! private boolean loadConditionsLimite(ProgressionInterface _prg) {
DicoEntiteFile entFile=
dicoParams_.getFileEntite(
getTelemacFileFormatVersion().getCLEntiteFile());
! if (entFile == null) {
ui_.error(
"Conditions limites",
--- 197,207 ----
}
! private boolean loadConditionsLimite(ProgressionInterface _prg)
! {
DicoEntiteFile entFile=
dicoParams_.getFileEntite(
getTelemacFileFormatVersion().getCLEntiteFile());
! if (entFile == null)
! {
ui_.error(
"Conditions limites",
***************
*** 193,197 ****
getFile(entFile),
_prg);
! TelemacCLInterface inter= (TelemacCLInterface)op.getSource();
ui_.manageErrorOperationAndIsFatal(op);
if (inter == null)
--- 214,218 ----
getFile(entFile),
_prg);
! TelemacCLInterface inter= (TelemacCLInterface) op.getSource();
ui_.manageErrorOperationAndIsFatal(op);
if (inter == null)
***************
*** 201,232 ****
}
! public void saveCas(ProgressionInterface _progress) {
super.saveCas(_progress);
}
! public void saveAs(File _f, ProgressionInterface _prg) {
super.saveAs(_f, _prg);
}
! public void saveCopy(File _f, ProgressionInterface _prg) {
super.saveCopy(_f, _prg);
}
! private boolean loadConditionsLimiteLiquide(ProgressionInterface _prg) {
DicoEntiteFile entFile=
dicoParams_.getFileEntite(
getTelemacFileFormatVersion().getCLLiquideEntiteFile());
! if (entFile == null) {
! ui_.error(
! "Frontières Liquides",
! TrLib.geti18n(
! "Définition du fichier de conditions limites liquides non trouvée."));
return false;
- }
FileOperationSynthese op=
getTelemacFileFormatVersion().getDefaultTelemacLiquideFormat().read(
getFile(entFile),
_prg);
! TelemacLiquideInterface inter= (TelemacLiquideInterface)op.getSource();
ui_.manageErrorOperationAndIsFatal(op);
if (inter == null)
--- 222,259 ----
}
! public void saveCas(ProgressionInterface _progress)
! {
super.saveCas(_progress);
}
! public void saveAs(File _f, ProgressionInterface _prg)
! {
super.saveAs(_f, _prg);
}
! public void saveCopy(File _f, ProgressionInterface _prg)
! {
super.saveCopy(_f, _prg);
}
! private boolean loadConditionsLimiteLiquide(ProgressionInterface _prg)
! {
DicoEntiteFile entFile=
dicoParams_.getFileEntite(
getTelemacFileFormatVersion().getCLLiquideEntiteFile());
! // if (entFile == null) {
! // ui_.error(
! // "Frontières Liquides",
! // TrLib.geti18n(
! // "Définition du fichier de conditions limites liquides non trouvée."));
! // return false;
! // }
! if (entFile == null)
return false;
FileOperationSynthese op=
getTelemacFileFormatVersion().getDefaultTelemacLiquideFormat().read(
getFile(entFile),
_prg);
! TelemacLiquideInterface inter= (TelemacLiquideInterface) op.getSource();
ui_.manageErrorOperationAndIsFatal(op);
if (inter == null)
***************
*** 237,246 ****
}
! private boolean loadFond(ProgressionInterface _prg) {
ui_.error("Programme", "non supporté pour l'instant");
return false;
}
! public File getFileCas() {
return getMainFile();
}
--- 264,275 ----
}
! private boolean loadFond(ProgressionInterface _prg)
! {
ui_.error("Programme", "non supporté pour l'instant");
return false;
}
! public File getFileCas()
! {
return getMainFile();
}
***************
*** 250,254 ****
* le maillage avec {@link #loadGeometrie(ProgressionInterface) loadGeometrie}
*/
! public H2dMaillage getMaillage() {
if (params_ == null)
return null;
--- 279,284 ----
* le maillage avec {@link #loadGeometrie(ProgressionInterface) loadGeometrie}
*/
! public H2dMaillage getMaillage()
! {
if (params_ == null)
return null;
***************
*** 256,264 ****
}
! public H2dTelemacParametres getTelemacParametres() {
return params_;
}
! public H2dParametres getParametres() {
return getTelemacParametres();
}
--- 286,296 ----
}
! public H2dTelemacParametres getTelemacParametres()
! {
return params_;
}
! public H2dParametres getParametres()
! {
return getTelemacParametres();
}
***************
*** 267,271 ****
*
*/
! public boolean isAllLoaded() {
return allLoaded_;
}
--- 299,304 ----
*
*/
! public boolean isAllLoaded()
! {
return allLoaded_;
}
***************
*** 274,278 ****
*
*/
! public boolean isGeometrieLoaded() {
return geometrieLoaded_;
}
--- 307,312 ----
*
*/
! public boolean isGeometrieLoaded()
! {
return geometrieLoaded_;
}
Index: TrTelemacProjet.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/telemac/TrTelemacProjet.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** TrTelemacProjet.java 22 Aug 2003 16:02:26 -0000 1.5
--- TrTelemacProjet.java 2 Sep 2003 09:00:38 -0000 1.6
***************
*** 55,58 ****
--- 55,70 ----
}
+ public void showGeneralFille() {
+ active();
+ }
+
+ public void showVisuFille() {
+ activeVisu();
+ }
+
+ public boolean containsVisuFille() {
+ return true;
+ }
+
public static TrTelemacProjet init(
File _file,
***************
*** 101,114 ****
}
};
! new BuTaskOperation(getImpl(),"Chargement fichiers"){
! public void act()
! {
params_.loadAll(new ProgressionBuAdapter(this), l);
}
! }.start();
! }
! else initVisu();
! } else
getImpl().activateInternalFrame(visu_);
}
--- 113,128 ----
}
};
! new BuTaskOperation(getImpl(), "Chargement fichiers") {
! public void act() {
params_.loadAll(new ProgressionBuAdapter(this), l);
}
! }
! .start();
! } else
! initVisu();
! } else if (visu_.isClosed())
! getImpl().addInternalFrame(visu_);
! else
getImpl().activateInternalFrame(visu_);
}
***************
*** 125,128 ****
--- 139,144 ----
visu_.setLocation(10, 10);
getImpl().addInternalFrame(visu_);
+ visu_.pack();
+ visu_.restaurer();
}
***************
*** 142,145 ****
--- 158,174 ----
} else
super.actionPerformed(e);
+ }
+
+ /**
+ *
+ */
+ public void close() {
+ super.close();
+ if (visu_ != null) {
+ visu_.setVisible(false);
+ getImpl().removeInternalFrame(visu_);
+ visu_= null;
+ }
+ ((TrImplementation)getImpl()).closeProjet(this);
}
|
Update of /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/reflux
In directory sc8-pr-cvs1:/tmp/cvs-serv12326/reflux
Modified Files:
TrRefluxFilleProjet.java TrRefluxFilleVisu.java
TrRefluxParametres.java TrRefluxProjet.java
Log Message:
Support des bords dans les calques
Index: TrRefluxFilleProjet.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/reflux/TrRefluxFilleProjet.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** TrRefluxFilleProjet.java 4 Jul 2003 15:50:54 -0000 1.1
--- TrRefluxFilleProjet.java 2 Sep 2003 09:00:36 -0000 1.2
***************
*** 47,51 ****
public TrRefluxFilleProjet(TrRefluxProjet _proj)
{
! super(_proj.getTitle(), true, false, true, true);
proj_ = _proj;
BuTabbedPane pane = new BuTabbedPane();
--- 47,51 ----
public TrRefluxFilleProjet(TrRefluxProjet _proj)
{
! super(_proj.getTitle(), true, true, true, true);
proj_ = _proj;
BuTabbedPane pane = new BuTabbedPane();
Index: TrRefluxFilleVisu.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/reflux/TrRefluxFilleVisu.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** TrRefluxFilleVisu.java 22 Aug 2003 16:02:24 -0000 1.1
--- TrRefluxFilleVisu.java 2 Sep 2003 09:00:36 -0000 1.2
***************
*** 9,16 ****
package org.fudaa.fudaa.tr.reflux;
- import org.fudaa.dodico.h2d.reflux.H2dRefluxParametres;
-
import org.fudaa.fudaa.tr.TrFilleVisu;
import org.fudaa.fudaa.tr.TrImplementation;
/**
--- 9,16 ----
package org.fudaa.fudaa.tr.reflux;
import org.fudaa.fudaa.tr.TrFilleVisu;
import org.fudaa.fudaa.tr.TrImplementation;
+ import org.fudaa.fudaa.tr.data.TrCalqueBord;
+ import org.fudaa.fudaa.tr.data.TrCalqueMaillage;
/**
***************
*** 21,27 ****
! public TrRefluxFilleVisu(TrImplementation _impl,H2dRefluxParametres _params)
{
! super(_impl,_params);
}
--- 21,30 ----
! public TrRefluxFilleVisu(TrImplementation _impl,TrRefluxParametres _params)
{
! super(_impl,_params.getParametres());
! gcDonnees_.add(new TrCalqueBord(_params.createModelBord()));
! addCqMaillage();
! arbre_.refresh();
}
Index: TrRefluxParametres.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/reflux/TrRefluxParametres.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** TrRefluxParametres.java 22 Aug 2003 16:02:24 -0000 1.4
--- TrRefluxParametres.java 2 Sep 2003 09:00:36 -0000 1.5
***************
*** 10,28 ****
import java.io.File;
import org.fudaa.dodico.commun.DodicoAnalyze;
import org.fudaa.dodico.commun.DodicoLib;
import org.fudaa.dodico.commun.ProgressionInterface;
import org.fudaa.dodico.dico.DicoParams;
import org.fudaa.dodico.fichiers.FileOperationSynthese;
import org.fudaa.dodico.h2d.H2dMaillage;
import org.fudaa.dodico.h2d.H2dParametres;
import org.fudaa.dodico.h2d.reflux.H2dRefluxParametres;
import org.fudaa.dodico.reflux.io.INPFileFormat;
import org.fudaa.dodico.reflux.io.INPInterface;
- import org.fudaa.fudaa.commun.FudaaUI;
import org.fudaa.fudaa.tr.TrImplementation;
import org.fudaa.fudaa.tr.TrParametres;
/**
--- 10,52 ----
import java.io.File;
+ import java.util.ArrayList;
+ import java.util.Arrays;
+ import java.util.Iterator;
+ import java.util.Map;
+
+ import com.memoire.bu.BuTaskOperation;
import org.fudaa.dodico.commun.DodicoAnalyze;
import org.fudaa.dodico.commun.DodicoLib;
+ import org.fudaa.dodico.commun.ProgressionBuAdapter;
import org.fudaa.dodico.commun.ProgressionInterface;
import org.fudaa.dodico.dico.DicoParams;
import org.fudaa.dodico.fichiers.FileOperationSynthese;
+ import org.fudaa.dodico.h2d.H2dBord;
+ import org.fudaa.dodico.h2d.H2dConditionLimite;
+ import org.fudaa.dodico.h2d.H2dGroupePasTemps;
import org.fudaa.dodico.h2d.H2dMaillage;
import org.fudaa.dodico.h2d.H2dParametres;
+ import org.fudaa.dodico.h2d.H2dPoint;
+ import org.fudaa.dodico.h2d.H2dProprieteElementaire;
+ import org.fudaa.dodico.h2d.reflux.H2dRefluxBordIndexGeneral;
+ import org.fudaa.dodico.h2d.reflux.H2dRefluxConditionLimite;
import org.fudaa.dodico.h2d.reflux.H2dRefluxParametres;
+ import org.fudaa.dodico.h2d.reflux.H2dRefluxBordManager.BordParFrontiere;
+ import org.fudaa.dodico.h2d.type.H2dProjetType;
+ import org.fudaa.dodico.reflux.io.CLTransitoireFileFormat;
import org.fudaa.dodico.reflux.io.INPFileFormat;
import org.fudaa.dodico.reflux.io.INPInterface;
+ import org.fudaa.dodico.reflux.io.PnTransitoireFileFormat;
+
+ import org.fudaa.ebli.geometrie.GrBoite;
+ import org.fudaa.ebli.geometrie.GrPoint;
import org.fudaa.fudaa.tr.TrImplementation;
+ import org.fudaa.fudaa.tr.TrLib;
import org.fudaa.fudaa.tr.TrParametres;
+ import org.fudaa.fudaa.tr.TrPreferences;
+ import org.fudaa.fudaa.tr.data.TrCalqueMaillage;
+ import org.fudaa.fudaa.tr.data.TrModeleBord;
/**
***************
*** 30,62 ****
* @version $Id$
*/
! public class TrRefluxParametres implements TrParametres {
! File fINP_;
! String title_;
! TrImplementation ui_;
! H2dRefluxParametres params_;
- /**
- *
- */
- private TrRefluxParametres() {
- super();
}
!
! public TrImplementation getImpl(){
! return ui_;
}
-
public final static TrRefluxParametres init(
File _f,
INPFileFormat.INPVersion _ft,
ProgressionInterface _progress,
! TrImplementation _ui) {
FileOperationSynthese synt= _ft.read(_f, _progress);
! INPInterface inter=(INPInterface)synt.getSource();
if (_ui != null)
_ui.manageErrorOperationAndIsFatal(synt);
if (inter == null)
return null;
--- 54,293 ----
* @version $Id$
*/
! public class TrRefluxParametres implements TrParametres
! {
! private class TrInpInterface implements INPInterface
! {
! H2dRefluxConditionLimite[] cl_;
! String[] fics_;
! H2dRefluxBordIndexGeneral[] bd_;
!
! public TrInpInterface(String[] _fic)
! {
! cl_= params_.getRefluxClTableau();
! Arrays.sort(cl_, new H2dConditionLimite.ComparatorIdxPt());
! fics_= _fic;
! bd_= params_.getBords().getRefluxBord();
! if (bd_ != null)
! for (int i= 0; i < bd_.length; i++)
! {
! System.out.println(bd_);
! }
! }
!
! /**
! *
! */
! public boolean contientRadiations()
! {
! return false;
! }
!
! /**
! *
! */
! public boolean contientSollicitationsReparties()
! {
! return false;
! }
!
! /**
! *
! */
! public boolean contientVent()
! {
! return false;
! }
!
! /**
! *
! */
! public H2dRefluxBordIndexGeneral[] getBords()
! {
! return bd_;
! }
!
! /**
! *
! */
! public H2dRefluxConditionLimite[] getConditionLimite()
! {
! return cl_;
! }
!
! /**
! *
! */
! public Map getEntiteValue()
! {
! return params_.getDicoParams().getEntiteValues();
! }
!
! /**
! *
! */
! public String[] getFichiers()
! {
! return fics_;
! }
!
! /**
! *
! */
! public H2dGroupePasTemps[] getGroupePasTemps()
! {
! return params_.getGroupePasTempsTab();
! }
!
! /**
! *
! */
! public H2dMaillage getMaillage()
! {
! return params_.getMaillage();
! }
!
! /**
! *
! */
! public H2dProprieteElementaire[] getPropElementaires()
! {
! return params_.getProprieteElementaireTab();
! }
!
! /**
! *
! */
! public H2dProjetType getTypeProjet()
! {
! return H2dProjetType.COURANTOLOGIE_2D;
! }
!
! /**
! *
! */
! public String getVersion()
! {
! return getINPVersion().getVersionName();
! }
!
! /**
! *
! */
! public boolean isRadiationsLecturePasDeTemps()
! {
! return false;
! }
!
! /**
! *
! */
! public boolean isVentLecturePasDeTemps()
! {
! return false;
! }
}
!
! public final class TrRefluxModeleBord implements TrModeleBord
! {
!
! /**
! *
! */
! public H2dBord getBordInIdxGeneral(int _generalIdx)
! {
! return params_.getBords().getBordFromGeneralIdx(_generalIdx);
! }
!
! /**
! *
! */
! public BordParFrontiere getBordPourFrontiere(int _i)
! {
! return params_.getBords().getFrontiereBords(_i);
! }
!
! /**
! *
! */
! public GrBoite getDomaine()
! {
! return TrCalqueMaillage.getDomaine(params_.getMaillage());
! }
!
! /**
! *
! */
! public int getFrontiereNb()
! {
! return params_.getMaillage().getPtsFrontiere().getBordNb();
! }
!
! /**
! *
! */
! public int getNbPointFrontiere(int _idxFrontiere)
! {
! return params_.getMaillage().getPtsFrontiere().getPtNbForBord(
! _idxFrontiere);
! }
!
! /**
! *
! */
! public int getNombre()
! {
! return params_.getMaillage().getPtsFrontiere().getTotalPtNb();
! }
!
! /**
! *
! */
! public Object getObject(int _ind)
! {
! return null;
! }
!
! /**
! *
! */
! public void getPoint(int _idxFrontiere, int _idxPtSurFrontiere, GrPoint _p)
! {
! H2dMaillage mail= params_.getMaillage();
! H2dPoint pt=
! mail.getPt(
! mail.getPtsFrontiere().getPtIdxForBord(
! _idxFrontiere,
! _idxPtSurFrontiere));
! _p.setCoordonnees(pt.getX(), pt.getY(), pt.getZ());
! }
!
! /**
! *
! */
! public int getTotalBordNb()
! {
! return params_.getBords().getTotalBordElementNb();
! }
!
}
+ /**
+ * La petite initialisation des parametres.
+ */
public final static TrRefluxParametres init(
File _f,
INPFileFormat.INPVersion _ft,
ProgressionInterface _progress,
! TrImplementation _ui)
! {
FileOperationSynthese synt= _ft.read(_f, _progress);
! INPInterface inter= (INPInterface) synt.getSource();
if (_ui != null)
_ui.manageErrorOperationAndIsFatal(synt);
+ if (synt.containsFatalError())
+ return null;
if (inter == null)
return null;
***************
*** 69,93 ****
s= s.substring(0, i);
r.title_= s;
! DodicoAnalyze.Editor analyze=new DodicoAnalyze.Editor();
! analyze.setDesc("Analyze du fichier"+" "+_f.getAbsolutePath());
! r.params_= H2dRefluxParametres.init(inter, _progress, _ft,analyze);
! if(_ui!=null)
{
_ui.manageAnalyzeAndIsFatal(analyze.toAnalyze());
!
}
return r;
}
! public String getTitle() {
! return title_;
}
! public File getFile() {
! return fINP_;
}
! public File enregistrerUniqueSousRepertoire(File _f) {
! if (!_f.isDirectory()) {
ui_.error(
"Répertoire",
--- 300,418 ----
s= s.substring(0, i);
r.title_= s;
! DodicoAnalyze.Editor analyze= new DodicoAnalyze.Editor();
! analyze.setDesc("Analyze du fichier" + " " + _f.getAbsolutePath());
! r.params_= H2dRefluxParametres.init(inter, _progress, _ft, analyze);
! if (_ui != null)
{
_ui.manageAnalyzeAndIsFatal(analyze.toAnalyze());
!
}
return r;
}
! private boolean fileIsProject_;
!
! File fINP_;
! H2dRefluxParametres params_;
! String title_;
! TrImplementation ui_;
!
! /**
! *
! */
! private TrRefluxParametres()
! {
! super();
}
! private boolean _save(File _f, boolean _ask)
! {
! File dir= _f.getAbsoluteFile().getParentFile();
! String ficNameInit= _f.getName();
! String ficSansExt= DodicoLib.getSansExtension(ficNameInit);
! ArrayList l= new ArrayList(10);
! ArrayList lToWrite= new ArrayList(10);
! String s;
! if (params_.contientClTransitoire())
! {
! s=
! ficSansExt
! + "."
! + CLTransitoireFileFormat.getInstance().getExtensions()[0];
!
! l.add(s);
! lToWrite.add(s);
! }
! if (params_.contientPnTransitoire())
! {
! s=
! ficSansExt
! + "."
! + PnTransitoireFileFormat.getInstance().getExtensions()[0];
! l.add(s);
! lToWrite.add(s);
! }
! l.add(ficSansExt + getINPVersion().getSolutionFileExtension());
! l.add(ficSansExt + getINPVersion().getSolutionFinaleExtension());
! if ((ficNameInit.indexOf('.') < 0)
! && (TrPreferences.TR.getBooleanProperty("add.extension", true)))
! {
! ficNameInit += "." + getINPVersion().getFileFormat().getExtensions()[0];
! }
! final File inp= new File(dir, ficNameInit);
! if (_ask)
! {
!
! ArrayList fileToOverWrite= new ArrayList(10);
! if (inp.exists())
! fileToOverWrite.add(inp.getAbsolutePath());
! for (Iterator it= lToWrite.iterator(); it.hasNext();)
! {
! File f= new File(dir, (String) it.next());
! if (f.exists())
! fileToOverWrite.add(f.getAbsolutePath());
! }
! if (fileToOverWrite.size() > 0)
! {
! StringBuffer b=
! new StringBuffer(
! TrLib.geti18n("Les fichiers suivants vont être remplacés"));
! b.append(":").append(DodicoLib.LINE_SEP);
! for (Iterator it= fileToOverWrite.iterator(); it.hasNext();)
! {
! b.append((String) it.next());
! }
! b.append(DodicoLib.LINE_SEP).append(
! TrLib.geti18n("Voulez-vous continuer ?"));
! if (!getImpl()
! .confirmation(TrLib.geti18n("Remplacer ?"), b.toString()))
! return false;
! }
! }
! final TrInpInterface inter= new TrInpInterface(DodicoLib.enTableau(l));
! new BuTaskOperation(getImpl(), TrLib.geti18n("Sauvegarde"))
! {
! public void act()
! {
! getImpl().manageErrorOperationAndIsFatal(
! TrRefluxParametres.this.getINPVersion().write(
! inp,
! inter,
! new ProgressionBuAdapter(this)));
! }
! }
! .start();
! return true;
}
! public TrRefluxModeleBord createModelBord()
! {
! return new TrRefluxModeleBord();
! }
!
! public File enregistrerUniqueSousRepertoire(File _f)
! {
! if (!_f.isDirectory())
! {
ui_.error(
"Répertoire",
***************
*** 106,110 ****
int i= 0;
int max= 20;
! while ((dest.exists()) && (i < max)) {
dest=
new File(
--- 431,436 ----
int i= 0;
int max= 20;
! while ((dest.exists()) && (i < max))
! {
dest=
new File(
***************
*** 116,129 ****
+ INPFileFormat.getInstance().getExtensions()[0]);
}
! if (dest.exists()) {
ui_.error(
"Impossible de trouver un nom de fichier non existant",
"Effacer des fichier du répertoire " + _f.getAbsolutePath());
return null;
! } else {
DodicoLib.copyFile(fINP_, dest);
return dest;
}
-
}
--- 442,457 ----
+ INPFileFormat.getInstance().getExtensions()[0]);
}
! if (dest.exists())
! {
ui_.error(
"Impossible de trouver un nom de fichier non existant",
"Effacer des fichier du répertoire " + _f.getAbsolutePath());
return null;
! }
! else
! {
DodicoLib.copyFile(fINP_, dest);
return dest;
}
}
***************
*** 131,157 ****
*
*/
! public DicoParams getDicoParam() {
return params_.getDicoParams();
}
/**
*
*/
! public H2dMaillage getMaillage() {
return params_.getMaillage();
}
! public H2dParametres getParametres() {
return getRefluxParametres();
}
! public H2dRefluxParametres getRefluxParametres() {
return params_;
}
/**
*
*/
! public void loadGeometrie(ProgressionInterface _interface) {
}
--- 459,544 ----
*
*/
! public DicoParams getDicoParam()
! {
return params_.getDicoParams();
}
+ public File getFile()
+ {
+ return fINP_;
+ }
+
+ public TrImplementation getImpl()
+ {
+ return ui_;
+ }
+
+ public INPFileFormat.INPVersion getINPVersion()
+ {
+ return params_.getVersion();
+ }
+
/**
*
*/
! public H2dMaillage getMaillage()
! {
return params_.getMaillage();
}
! public H2dParametres getParametres()
! {
return getRefluxParametres();
}
! public H2dRefluxParametres getRefluxParametres()
! {
return params_;
}
+ public String getTitle()
+ {
+ return title_;
+ }
+
/**
*
*/
! public void loadGeometrie(ProgressionInterface _interface)
! {
! }
!
! public void save()
! {
! if (fileIsProject_)
! _save(fINP_, false);
! else
! {
! fileIsProject_= _save(fINP_, true);
! }
! }
!
! public void saveAs()
! {
! final File fic=
! getImpl().ouvrirFileChooser(null, "Enregistrement Sous", true);
! if (fic == null)
! return;
! if (_save(fic, true))
! {
! fINP_= fic;
! fileIsProject_= true;
! };
!
! }
!
! public void saveCopy()
! {
! final File fic=
! getImpl().ouvrirFileChooser(null, "Enregistrement Copie", true);
! if (fic == null)
! return;
! _save(fic, true);
!
}
Index: TrRefluxProjet.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/reflux/TrRefluxProjet.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** TrRefluxProjet.java 22 Aug 2003 16:02:24 -0000 1.4
--- TrRefluxProjet.java 2 Sep 2003 09:00:36 -0000 1.5
***************
*** 10,13 ****
--- 10,14 ----
import java.awt.Dimension;
+ import java.beans.PropertyVetoException;
import java.io.File;
***************
*** 69,73 ****
}
! public void save() {}
/**
--- 70,76 ----
}
! public void save() {
! enregistrerParametres();
! }
/**
***************
*** 83,87 ****
*
*/
! public void enregistrerParametres() {}
public File enregistrerParametresUniqueSousRep(File _d) {
--- 86,90 ----
*
*/
! public void enregistrerParametres() {params_.save();}
public File enregistrerParametresUniqueSousRep(File _d) {
***************
*** 89,96 ****
}
/**
*
*/
! public void active() {
Dimension dim= null;
if (fille_ == null) {
--- 92,116 ----
}
+ public void showGeneralFille() {
+ activeGeneral();
+ }
+
+ public void showVisuFille() {
+ activeVisu();
+ }
+
+ public boolean containsVisuFille() {
+ return true;
+ }
+
+ public void active() {
+ activeGeneral();
+ activeVisu();
+ }
+
/**
*
*/
! public void activeGeneral() {
Dimension dim= null;
if (fille_ == null) {
***************
*** 100,113 ****
(int) (dim.getWidth() * 0.5),
(int) (dim.getHeight() * 0.5));
- fille_.setLocation(0, 0);
getImpl().addInternalFrame(fille_);
! }
! else
! {
getImpl().activateInternalFrame(fille_);
}
!
if (visu_ == null) {
! visu_= new TrRefluxFilleVisu(getImpl(), params_.getRefluxParametres());
if (dim == null)
dim= getImpl().getMainPanel().getDesktop().getSize();
--- 120,139 ----
(int) (dim.getWidth() * 0.5),
(int) (dim.getHeight() * 0.5));
getImpl().addInternalFrame(fille_);
! fille_.setLocation(0, 74);
! fille_.pack();
! } else if (fille_.isClosed()) {
! getImpl().addInternalFrame(fille_);
! } else {
getImpl().activateInternalFrame(fille_);
+
}
!
! }
!
! private void activeVisu() {
! Dimension dim= null;
if (visu_ == null) {
! visu_= new TrRefluxFilleVisu(getImpl(), params_);
if (dim == null)
dim= getImpl().getMainPanel().getDesktop().getSize();
***************
*** 115,124 ****
(int) (dim.getWidth() * 0.8),
(int) (dim.getHeight() * 0.8));
- visu_.setLocation(10, 10);
getImpl().addInternalFrame(visu_);
! }
! else
! getImpl().activateInternalFrame(visu_);
!
}
--- 141,152 ----
(int) (dim.getWidth() * 0.8),
(int) (dim.getHeight() * 0.8));
getImpl().addInternalFrame(visu_);
! visu_.setLocation(74, 148);
! visu_.pack();
! visu_.restaurer();
! } else if (visu_.isClosed()) {
! getImpl().addInternalFrame(visu_);
! } else
! getImpl().activateInternalFrame(visu_);
}
***************
*** 137,142 ****
// System.out.println("données non modifiées");
// }
! fille_.dispose();
fille_= null;
getImpl().closeProjet(this);
}
--- 165,180 ----
// System.out.println("données non modifiées");
// }
! if (fille_ != null) {
! fille_.setVisible(false);
! getImpl().removeInternalFrame(fille_);
! fille_= null;
! }
!
fille_= null;
+ if (visu_ != null) {
+ visu_.setVisible(false);
+ getImpl().removeInternalFrame(visu_);
+ visu_= null;
+ }
getImpl().closeProjet(this);
}
***************
*** 199,208 ****
*
*/
! public void saveAs() {}
/**
*
*/
! public void saveCopy() {}
/**
--- 237,246 ----
*
*/
! public void saveAs() {params_.saveAs();}
/**
*
*/
! public void saveCopy() {params_.saveCopy();}
/**
|
|
From: <de...@us...> - 2003-09-02 08:59:09
|
Update of /cvsroot/fudaa/fudaa_devel/fudaa
In directory sc8-pr-cvs1:/tmp/cvs-serv12002
Modified Files:
distribution.xml
Log Message:
Ajout generation jar pour prepro
Index: distribution.xml
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/distribution.xml,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** distribution.xml 7 Aug 2003 08:23:29 -0000 1.6
--- distribution.xml 2 Sep 2003 08:59:06 -0000 1.7
***************
*** 287,290 ****
--- 287,324 ----
</target>
+ <target name="jar_tr" depends=".initialisationCheck"
+ description="cree fudaa_tr.jar">
+ <property name="fudaa.tr.jar.file" value="${fudaa.dist.jar.dir}/fudaa_tr.jar"/>
+ <echo>
+ ---FUDAA: creation du jar ${fudaa.tr.jar.file}
+ </echo>
+ <mkdir dir="${fudaa.dist.jar.dir}"/>
+ <delete file="${fudaa.tr.jar.file}"/>
+ <genjar jarfile="${fudaa.tr.jar.file}">
+
+ <classpath path="${fudaaDist.classpath}"/>
+ <class name="org.fudaa.fudaa.tr.Tr"/>
+
+ <class>
+ <fileset dir="${fudaa.dist.classes.dir}">
+ <include name="org/fudaa/dodico/telemac/dico/*.class"/>
+ </fileset>
+ </class>
+
+ <resource>
+ <fileset dir="${fudaa.dist.classes.dir}">
+ <patternset refid="ressources.fic"/>
+ <include name="com/memoire/bu/"/>
+ <include name="org/fudaa/ebli/ressource/"/>
+ <include name="org/fudaa/fudaa/ressource/"/>
+ <include name="org/fudaa/fudaa/tr/"/>
+ </fileset>
+ </resource>
+
+
+ </genjar>
+
+ </target>
+
<target name="jar_seuil" depends="build"
description="cree fudaa_seuil.jar">
|
|
From: <de...@us...> - 2003-09-02 08:56:45
|
Update of /cvsroot/fudaa/fudaa_devel/ebli/src/org/fudaa/ebli/geometrie
In directory sc8-pr-cvs1:/tmp/cvs-serv11587/org/fudaa/ebli/geometrie
Modified Files:
GrPoint.java GrSegment.java
Log Message:
Modif...
Index: GrPoint.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/ebli/src/org/fudaa/ebli/geometrie/GrPoint.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** GrPoint.java 4 Jul 2003 14:32:48 -0000 1.3
--- GrPoint.java 2 Sep 2003 08:56:17 -0000 1.4
***************
*** 48,51 ****
--- 48,56 ----
}
+ public GrPoint(Point _p){
+ x=_p.x;
+ y=_p.y;
+ }
+
public final void initialise(GrPoint _p)
{
Index: GrSegment.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/ebli/src/org/fudaa/ebli/geometrie/GrSegment.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** GrSegment.java 18 Mar 2003 16:14:16 -0000 1.2
--- GrSegment.java 2 Sep 2003 08:56:17 -0000 1.3
***************
*** 20,52 ****
* @author Guillaume Desnoix
*/
! public final class GrSegment
! extends GrObjet
! implements GrContour
! {
! public GrPoint o,e;
! public GrSegment()
! {
! }
! public GrSegment(GrPoint io, GrPoint ie)
! {
! o=io;
! e=ie;
}
! public GrVecteur vecteur()
! {
return e.soustraction(o);
}
! public final String toString()
! {
! return "GrSegment("+o+", "+e+")";
}
! public final GrPoint milieu()
! {
! return new GrPoint((o.x+e.x)/2., (o.y+e.y)/2., (o.z+e.z)/2.);
}
--- 20,43 ----
* @author Guillaume Desnoix
*/
! public final class GrSegment extends GrObjet implements GrContour {
! public GrPoint o, e;
! public GrSegment() {}
! public GrSegment(GrPoint io, GrPoint ie) {
! o= io;
! e= ie;
}
! public GrVecteur vecteur() {
return e.soustraction(o);
}
! public final String toString() {
! return "GrSegment(" + o + ", " + e + ")";
}
! public final GrPoint milieu() {
! return new GrPoint((o.x + e.x) / 2., (o.y + e.y) / 2., (o.z + e.z) / 2.);
}
***************
*** 54,72 ****
* Implémentation GrObjet.
*/
! public final GrBoite boite()
! {
! GrBoite r=new GrBoite();
! r.ajuste(o);
! r.ajuste(e);
return r;
}
! public final double longueurXY()
! {
return o.distanceXY(e);
}
! public final double longueur()
! {
return o.distance(e);
}
--- 45,86 ----
* Implémentation GrObjet.
*/
! public final GrBoite boite() {
! GrBoite r= new GrBoite();
! boite(r);
return r;
}
! /**
! * Initialise la boite passee en parametre a partir de la boite de
! * ce segment.
! */
! public final void boite(GrBoite _b) {
! if (_b.e == null)
! _b.e= new GrPoint(e);
! else
! _b.e.initialise(e);
! if (_b.o == null)
! _b.o= new GrPoint(e);
! else
! _b.o.initialise(e);
! if (o.x < e.x)
! _b.o.x= o.x;
! if (o.y < e.y)
! _b.o.y= o.y;
! if (o.z < e.z)
! _b.o.z= o.z;
! if (o.x > e.x)
! _b.e.x= o.x;
! if (o.y > e.y)
! _b.e.y= o.y;
! if (o.z > e.z)
! _b.e.z= o.z;
! }
!
! public final double longueurXY() {
return o.distanceXY(e);
}
! public final double longueur() {
return o.distance(e);
}
***************
*** 76,84 ****
* point le plus proche sur le segment pour le calcul de cette distance.
*/
! public final double distanceXY(GrPoint p)
! {
/*
double d=p.soustraction(o).projectionXY().division(vecteur().projectionXY());
!
if(d<=0.)
return o.distanceXY(p);
--- 90,97 ----
* point le plus proche sur le segment pour le calcul de cette distance.
*/
! public final double distanceXY(GrPoint p) {
/*
double d=p.soustraction(o).projectionXY().division(vecteur().projectionXY());
!
if(d<=0.)
return o.distanceXY(p);
***************
*** 96,105 ****
* proche sur le segment pour le calcul de cette distance.
*/
! public final double distance(GrPoint p)
! {
/*
double d=p.soustraction(o).division(vecteur());
double r;
!
if(d<=0.)
r=o.distance(p);
--- 109,117 ----
* proche sur le segment pour le calcul de cette distance.
*/
! public final double distance(GrPoint p) {
/*
double d=p.soustraction(o).division(vecteur());
double r;
!
if(d<=0.)
r=o.distance(p);
***************
*** 108,112 ****
else
r=o.addition(vecteur().multiplication(d)).distance(p);
!
return r;
*/
--- 120,124 ----
else
r=o.addition(vecteur().multiplication(d)).distance(p);
!
return r;
*/
***************
*** 119,133 ****
* du point donne.
*/
! public final GrPoint pointPlusProche(GrPoint p)
! {
! double d=p.soustraction(o).division(vecteur());
GrPoint r;
! if(d<=0.)
! r=new GrPoint(o.x,o.y,o.z);
! else if(d>=1.)
! r=new GrPoint(e.x,e.y,e.z);
else
! r=o.addition(vecteur().multiplication(d));
return r;
--- 131,144 ----
* du point donne.
*/
! public final GrPoint pointPlusProche(GrPoint p) {
! double d= p.soustraction(o).division(vecteur());
GrPoint r;
! if (d <= 0.)
! r= new GrPoint(o.x, o.y, o.z);
! else if (d >= 1.)
! r= new GrPoint(e.x, e.y, e.z);
else
! r= o.addition(vecteur().multiplication(d));
return r;
***************
*** 138,178 ****
* du point donne dans le plan x,y.
*/
! public final GrPoint pointPlusProcheXY(GrPoint p)
! {
! double d=p.soustraction(o).projectionXY().division(vecteur().projectionXY());
GrPoint r;
! if(d<=0.)
! r=new GrPoint(o.x,o.y,o.z);
! else if(d>=1.)
! r=new GrPoint(e.x,e.y,e.z);
else
! r=o.addition(vecteur().multiplication(d));
! r.z=0.;
return r;
}
! public final GrPoint intersectionXY(GrSegment s)
! {
! if(boite().intersectionXY(s.boite())==null) return null;
! GrVecteur txy=vecteur().projectionXY();
! GrVecteur sxy=s.vecteur().projectionXY();
! GrVecteur n=txy.produitVectoriel(sxy);
! if( ( s.o.soustraction(o).projectionXY().produitTripleScalaire(txy,n)
! * s.e.soustraction(o).projectionXY().produitTripleScalaire(txy,n) <0)
! &&( o.soustraction(s.o).projectionXY().produitTripleScalaire(sxy,n)
! * e.soustraction(s.o).projectionXY().produitTripleScalaire(sxy,n) <0))
! {
! double t=o.soustraction(s.o).projectionXY().produitTripleScalaire(txy,n)
! /sxy.produitTripleScalaire(txy,n);
! GrPoint p=s.o.addition(sxy.multiplication(t));
! p.z=0.;
return p;
! }
! else return null;
}
--- 149,191 ----
* du point donne dans le plan x,y.
*/
! public final GrPoint pointPlusProcheXY(GrPoint p) {
! double d=
! p.soustraction(o).projectionXY().division(vecteur().projectionXY());
GrPoint r;
! if (d <= 0.)
! r= new GrPoint(o.x, o.y, o.z);
! else if (d >= 1.)
! r= new GrPoint(e.x, e.y, e.z);
else
! r= o.addition(vecteur().multiplication(d));
! r.z= 0.;
return r;
}
! public final GrPoint intersectionXY(GrSegment s) {
! if (boite().intersectionXY(s.boite()) == null)
! return null;
! GrVecteur txy= vecteur().projectionXY();
! GrVecteur sxy= s.vecteur().projectionXY();
! GrVecteur n= txy.produitVectoriel(sxy);
! if ((s.o.soustraction(o).projectionXY().produitTripleScalaire(txy, n)
! * s.e.soustraction(o).projectionXY().produitTripleScalaire(txy, n)
! < 0)
! && (o.soustraction(s.o).projectionXY().produitTripleScalaire(sxy, n)
! * e.soustraction(s.o).projectionXY().produitTripleScalaire(sxy, n)
! < 0)) {
! double t=
! o.soustraction(s.o).projectionXY().produitTripleScalaire(txy, n)
! / sxy.produitTripleScalaire(txy, n);
! GrPoint p= s.o.addition(sxy.multiplication(t));
! p.z= 0.;
return p;
! } else
! return null;
}
***************
*** 180,211 ****
* Retourne le segment le plus court joignant deux segments.
*/
! public final GrSegment segmentPlusCourtXY(GrSegment s)
! {
! GrSegment r=null;
! GrPoint i=intersectionXY(s);
! if(i!=null)
! {
! r=new GrSegment(i,i);
! }
! else
! {
! GrPoint p;
GrSegment t;
! p=pointPlusProcheXY(s.o); // p E this
! r=new GrSegment(p,s.o);
! p=pointPlusProcheXY(s.e); // p E this
! t=new GrSegment(p,s.e);
! if(t.longueurXY()<r.longueurXY()) r=t;
! p=s.pointPlusProcheXY(o); // p E s
! t=new GrSegment(p,o);
! if(t.longueurXY()<r.longueurXY()) r=t;
! p=s.pointPlusProcheXY(e); // p E s
! t=new GrSegment(p,e);
! if(t.longueurXY()<r.longueurXY()) r=t;
}
--- 193,223 ----
* Retourne le segment le plus court joignant deux segments.
*/
! public final GrSegment segmentPlusCourtXY(GrSegment s) {
! GrSegment r= null;
! GrPoint i= intersectionXY(s);
! if (i != null) {
! r= new GrSegment(i, i);
! } else {
! GrPoint p;
GrSegment t;
! p= pointPlusProcheXY(s.o); // p E this
! r= new GrSegment(p, s.o);
! p= pointPlusProcheXY(s.e); // p E this
! t= new GrSegment(p, s.e);
! if (t.longueurXY() < r.longueurXY())
! r= t;
! p= s.pointPlusProcheXY(o); // p E s
! t= new GrSegment(p, o);
! if (t.longueurXY() < r.longueurXY())
! r= t;
! p= s.pointPlusProcheXY(e); // p E s
! t= new GrSegment(p, e);
! if (t.longueurXY() < r.longueurXY())
! r= t;
}
***************
*** 213,255 ****
}
! public final GrSegment applique(GrMorphisme t)
! {
! GrSegment res=new GrSegment();
! res.o=o.applique(t);
! res.e=e.applique(t);
return res;
}
! public final void autoApplique(GrMorphisme t)
! {
o.autoApplique(t);
e.autoApplique(t);
}
! /*
! public GrPoint intersection(GrSegment s)
! {
! if(boite().intersection(s.boite())==null) return null;
!
! GrVecteur n=vecteur().produitVectoriel(s.vecteur());
!
! if( ( s.o.soustraction(o).produitTripleScalaire(vecteur(),n)
! * s.e.soustraction(o).produitTripleScalaire(vecteur(),n) <0)
! &&( o.soustraction(s.o).produitTripleScalaire(s.vecteur(),n)
! * e.soustraction(s.o).produitTripleScalaire(s.vecteur(),n) <0))
{
! double t=o.soustraction(s.o).produitTripleScalaire(vecteur(),n)
! /s.vecteur().produitTripleScalaire(vecteur(),n);
!
! return s.o.addition(s.vecteur().multiplication(t));
}
! else return null;
! }
! */
!
! public final GrPoint[] contour()
! {
! return new GrPoint[] { o,e };
}
--- 225,263 ----
}
! public final GrSegment applique(GrMorphisme t) {
! GrSegment res= new GrSegment();
! res.o= o.applique(t);
! res.e= e.applique(t);
return res;
}
! public final void autoApplique(GrMorphisme t) {
o.autoApplique(t);
e.autoApplique(t);
}
! /*
! public GrPoint intersection(GrSegment s)
{
! if(boite().intersection(s.boite())==null) return null;
!
! GrVecteur n=vecteur().produitVectoriel(s.vecteur());
!
! if( ( s.o.soustraction(o).produitTripleScalaire(vecteur(),n)
! * s.e.soustraction(o).produitTripleScalaire(vecteur(),n) <0)
! &&( o.soustraction(s.o).produitTripleScalaire(s.vecteur(),n)
! * e.soustraction(s.o).produitTripleScalaire(s.vecteur(),n) <0))
! {
! double t=o.soustraction(s.o).produitTripleScalaire(vecteur(),n)
! /s.vecteur().produitTripleScalaire(vecteur(),n);
!
! return s.o.addition(s.vecteur().multiplication(t));
! }
! else return null;
}
! */
! public final GrPoint[] contour() {
! return new GrPoint[] { o, e };
}
***************
*** 263,272 ****
* @author b.marchand Le 26/10/2000
*/
! public final boolean estSelectionne(GrMorphisme _ecran, int _dist, Point _pt) {
! GrPolyligne pl=new GrPolyligne();
! pl.sommets.ajoute(o);
! pl.sommets.ajoute(e);
! return pl.estSelectionne(_ecran,_dist,_pt);
}
}
--- 271,291 ----
* @author b.marchand Le 26/10/2000
*/
! public final boolean estSelectionne(
! GrMorphisme _ecran,
! int _dist,
! Point _pt) {
! return estSelectionne(_ecran, _dist, new GrPoint(_pt));
! }
! public final boolean estSelectionne(
! GrMorphisme _ecran,
! int _dist,
! GrPoint _pt) {
! GrSegment p= applique(_ecran);
! return p.distanceXY(_pt) < _dist;
! }
!
! public final boolean estSelectionne(int _dist, GrPoint _pt) {
! return distanceXY(_pt) < _dist;
}
}
|
|
From: <de...@us...> - 2003-09-02 08:56:44
|
Update of /cvsroot/fudaa/fudaa_devel/ebli/src/org/fudaa/ebli/trace
In directory sc8-pr-cvs1:/tmp/cvs-serv11587/org/fudaa/ebli/trace
Modified Files:
TraceLigne.java
Log Message:
Modif...
Index: TraceLigne.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/ebli/src/org/fudaa/ebli/trace/TraceLigne.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** TraceLigne.java 18 Mar 2003 16:09:54 -0000 1.3
--- TraceLigne.java 2 Sep 2003 08:56:17 -0000 1.4
***************
*** 86,93 ****
--- 86,141 ----
{
g_ = _g;
+ setDefault();
+
+ }
+
+ /**
+ * Une classe permettant de stocker les donnees essentielles pour
+ * traceLigne.
+ */
+ public static class Data{
+ public int typeTrait_;
+ public float epaisseur_;
+ public Color couleur_;
+
+ public Data(){
+ this(LISSE,1f,Color.black);
+ }
+
+ public Data(int _typeTrait,float _epaisseur,Color _c){
+ typeTrait_=_typeTrait;
+ epaisseur_=_epaisseur;
+ couleur_=_c;
+ }
+ }
+
+ /**
+ * Initialise les donnees par defaut : trait lisse, epaisseur de 1 et couleur
+ * noire.
+ */
+ public final void setDefault(){
typeTrait_ = LISSE;
epaisseur_ = 1.0f;
couleur_ = Color.black;
}
+
+
+ /**
+ * Initialisation de ce traceLigne a partir des donnees de Data.
+ * L'instance de Graphics n'est pas modifiee. Si _d est null prend
+ * les valeur par defaut.
+ */
+ public void init(Data _d){
+ if(_d!=null){
+ typeTrait_=_d.typeTrait_;
+ couleur_=_d.couleur_;
+ epaisseur_=_d.epaisseur_;
+ }
+ else setDefault();
+ }
+
+ public void setGraphics(Graphics2D _g){
+ g_=_g;
+ }
***************
*** 129,132 ****
--- 177,181 ----
if(typeTrait_ == INVISIBLE)
return false;
+ if(couleur_!=null)
g_.setColor(couleur_);
g_.setStroke(getStroke());
|
|
From: <de...@us...> - 2003-09-02 08:56:40
|
Update of /cvsroot/fudaa/fudaa_devel/ebli/src/org/fudaa/ebli/commun
In directory sc8-pr-cvs1:/tmp/cvs-serv11587/org/fudaa/ebli/commun
Modified Files:
EbliListeSelection.java
Log Message:
Modif...
Index: EbliListeSelection.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/ebli/src/org/fudaa/ebli/commun/EbliListeSelection.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** EbliListeSelection.java 21 Feb 2003 17:04:44 -0000 1.2
--- EbliListeSelection.java 2 Sep 2003 08:56:17 -0000 1.3
***************
*** 478,482 ****
{
if(contains(_l)) return false;
- System.err.println("ne contient donc evt");
index_.or(_l.index_);
if(_event) fireSelectionEvent();
--- 478,481 ----
|
|
From: <de...@us...> - 2003-09-02 08:56:40
|
Update of /cvsroot/fudaa/fudaa_devel/ebli/src/org/fudaa/ebli/calque
In directory sc8-pr-cvs1:/tmp/cvs-serv11587/org/fudaa/ebli/calque
Modified Files:
BArbreCalque.java BCalque.java ZCalqueAffichageDonnees.java
ZCalqueLongPolygone.java ZCalquePolygone.java
ZCalquePolyligne.java ZEbliFilleCalques.java
Log Message:
Modif...
Index: BArbreCalque.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/ebli/src/org/fudaa/ebli/calque/BArbreCalque.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** BArbreCalque.java 18 Mar 2003 16:04:05 -0000 1.2
--- BArbreCalque.java 2 Sep 2003 08:56:17 -0000 1.3
***************
*** 36,43 ****
public class BArbreCalque
extends JTree
! implements MouseListener, PropertyChangeListener
! {
! public BArbreCalque()
! {
setRequestFocusEnabled(false);
setShowsRootHandles(true);
--- 36,41 ----
public class BArbreCalque
[...1004 lines suppressed...]
! BCalque[] c= ((BCalque)_node).getCalques();
! r= (c.length == 0);
}
return r;
}
! public void addTreeModelListener(TreeModelListener _l) {
! if (listeners_ == null)
! listeners_= new Vector();
listeners_.addElement(_l);
}
! public void removeTreeModelListener(TreeModelListener _l) {
! if (listeners_ == null)
! return;
listeners_.removeElement(_l);
}
! public void valueForPathChanged(TreePath _path, Object _newValue) {}
}
Index: BCalque.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/ebli/src/org/fudaa/ebli/calque/BCalque.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** BCalque.java 30 Jan 2003 10:56:50 -0000 1.1
--- BCalque.java 2 Sep 2003 08:56:17 -0000 1.2
***************
*** 422,426 ****
// Proprietes
! private boolean rapide_;
/**
--- 422,426 ----
// Proprietes
! protected boolean rapide_;
/**
Index: ZCalqueAffichageDonnees.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/ebli/src/org/fudaa/ebli/calque/ZCalqueAffichageDonnees.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** ZCalqueAffichageDonnees.java 22 Aug 2003 15:55:31 -0000 1.3
--- ZCalqueAffichageDonnees.java 2 Sep 2003 08:56:17 -0000 1.4
***************
*** 107,115 ****
public void listeSelectionChanged(EbliListeSelectionEvent _e)
{
- System.out.println("event selection");
if(selection_==null) return;
if (selection_.equals(_e.getSource()))
{
- System.err.println("event selecion ok !!!");
fireSelectionEvent();
repaint();
--- 107,113 ----
Index: ZCalqueLongPolygone.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/ebli/src/org/fudaa/ebli/calque/ZCalqueLongPolygone.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** ZCalqueLongPolygone.java 4 Jul 2003 14:32:48 -0000 1.1
--- ZCalqueLongPolygone.java 2 Sep 2003 08:56:17 -0000 1.2
***************
*** 87,91 ****
GrMorphisme versEcran = getVersEcran();
boolean attenue = isAttenue();
- boolean rapide = isRapide();
// BPaletteCouleur paletteCouleur = getPaletteCouleur();
--- 87,90 ----
***************
*** 95,98 ****
--- 94,98 ----
if (attenue)
foreground = attenueCouleur(foreground);
+ boolean rapide=isRapide();
Icon icone = getIcone();
***************
*** 101,105 ****
GrBoite bPoly;
- int incrementPt = 1;
if (tl_ == null)
tl_ = new TraceLigne((Graphics2D) _g);
--- 101,104 ----
***************
*** 116,123 ****
if (nbPoints <= 0)
continue;
- if ((rapide) && (nbPoints > 15))
- incrementPt = 3;
- else
- incrementPt = 1;
//QUESTION: a rajouter
/* double z = 0.;
--- 115,118 ----
***************
*** 147,151 ****
ptOri.autoApplique(versEcran);
GrPoint ptDest = new GrPoint();
! for (int j = nbPoints - 1; j >= 0; j -= incrementPt)
{
//le point de dest est initialise
--- 142,146 ----
ptOri.autoApplique(versEcran);
GrPoint ptDest = new GrPoint();
! for (int j = nbPoints - 1; j >= 0; j --)
{
//le point de dest est initialise
Index: ZCalquePolygone.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/ebli/src/org/fudaa/ebli/calque/ZCalquePolygone.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** ZCalquePolygone.java 4 Jul 2003 14:32:48 -0000 1.3
--- ZCalquePolygone.java 2 Sep 2003 08:56:17 -0000 1.4
***************
*** 88,92 ****
if(!domaine.intersectXY(clip))
{
- System.out.println("polygones non affiches");
return ;
}
--- 88,91 ----
Index: ZCalquePolyligne.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/ebli/src/org/fudaa/ebli/calque/ZCalquePolyligne.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** ZCalquePolyligne.java 4 Jul 2003 14:32:48 -0000 1.3
--- ZCalquePolyligne.java 2 Sep 2003 08:56:17 -0000 1.4
***************
*** 172,176 ****
{
- System.out.println("dessin selection");
if(tlSelection_==null) tlSelection_=new TraceLigne((Graphics2D)_g);
else tlSelection_.graphics((Graphics2D)_g);
--- 172,175 ----
***************
*** 184,188 ****
ic=attenueIcone(ic);
}
! _g.setColor(cs);
tlSelection_.setCouleur(cs);
//tlSelection_.setEpaisseur(2f);
--- 183,187 ----
ic=attenueIcone(ic);
}
! //_g.setColor(cs);
tlSelection_.setCouleur(cs);
//tlSelection_.setEpaisseur(2f);
***************
*** 191,195 ****
{
if(!selection_.isSelected(i)) continue;
- System.out.println("polyligne tracee");
modele_.polyligne(p,i);
if(clip.intersectXY(p.boite()))
--- 190,193 ----
***************
*** 203,207 ****
//le point de dest est initialise
ptDest=p.sommets.renvoie(j);
- System.out.println("dessine le point "+ptDest);
ic.paintIcon(this, _g, (int)ptDest.x, (int)ptDest.y);
if(ptOri!=null)
--- 201,204 ----
Index: ZEbliFilleCalques.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/ebli/src/org/fudaa/ebli/calque/ZEbliFilleCalques.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** ZEbliFilleCalques.java 22 Aug 2003 15:55:31 -0000 1.6
--- ZEbliFilleCalques.java 2 Sep 2003 08:56:17 -0000 1.7
***************
*** 134,137 ****
--- 134,139 ----
/** */
protected BArbreCalque arbre_;
+
+ protected BGroupeCalque gcDonnees_;
/* Variable stockant les specifics tools*/
***************
*** 238,242 ****
gc.setTitle(EbliResource.EBLI.getString("Calques"));
gc.setDestructible(false);
! arbre_.setCalque(gc);
arbre_.addTreeSelectionListener(this);
//Calque d'administration
--- 240,246 ----
gc.setTitle(EbliResource.EBLI.getString("Calques"));
gc.setDestructible(false);
! gcDonnees_=new BGroupeCalque();
! gcDonnees_.setName("cqDonnees");
! arbre_.setCalque(gcDonnees_);
arbre_.addTreeSelectionListener(this);
//Calque d'administration
***************
*** 246,249 ****
--- 250,254 ----
cqAdmin_.setDestructible(false);
gc.add(cqAdmin_);
+ gc.add(gcDonnees_);
if (vc_.getCalque() == null)
***************
*** 308,312 ****
cqAdmin_.add(cqDepVueI_);
! arbre_.refresh();
// Column tools
--- 313,317 ----
cqAdmin_.add(cqDepVueI_);
! // arbre_.refresh();
// Column tools
***************
*** 400,417 ****
}
- protected void setCalqueAdminVisible(boolean _b)
- {
- if(_b)
- {
- vc_.getCalque().add(cqAdmin_);
- cqAdmin_.enPremier();
- }
- else
- {
- vc_.getCalque().remove(cqAdmin_);
- }
- arbre_.refresh();
- vc_.revalidate();
- }
protected synchronized AbstractButton getButton(String _actionCommand)
--- 405,408 ----
***************
*** 719,725 ****
public void setSelected(boolean b) throws java.beans.PropertyVetoException
{
! if (b)
{
! arbre_.setCalque(vc_.getCalque());
arbre_.refresh();
// if(btRepere.getDesktop() == null)
--- 710,716 ----
public void setSelected(boolean b) throws java.beans.PropertyVetoException
{
! if ((b) && (arbre_.getCalque()!=gcDonnees_))
{
! arbre_.setCalque(gcDonnees_);
arbre_.refresh();
// if(btRepere.getDesktop() == null)
***************
*** 728,731 ****
--- 719,728 ----
super.setSelected(b);
}
+
+ protected void addCalque(BCalque _b,boolean _enPremier){
+ gcDonnees_.add(_b);
+ if(_enPremier) _b.enPremier();
+ }
+
/**
***************
*** 754,758 ****
protected void showViewPreferences()
{
! if(EbliLib.DEBUG) System.out.println("ViewPreferences ok");
if(specificToolsPrefView_==null)
{
--- 751,755 ----
protected void showViewPreferences()
{
! if(EbliLib.DEBUG) System.out.println("ViewPreferences ok");
if(specificToolsPrefView_==null)
{
***************
*** 773,776 ****
--- 770,774 ----
{
String com = _ae.getActionCommand();
+ if(EbliLib.DEBUG)
System.out.println(com);
if (enr.equals(com))
***************
*** 1453,1457 ****
public void cancel()
{
- System.out.println("cancel");
JComponent ab;
Object o;
--- 1451,1454 ----
***************
*** 1473,1477 ****
public void ok()
{
- if(EbliLib.DEBUG) System.out.println("ViewPreferences ok");
EbliPreferences.EBLI.writeIniFile();
}
--- 1470,1473 ----
***************
*** 1482,1486 ****
public void closeDialog()
{
- if(EbliLib.DEBUG) System.out.println("ViewPreferences close");
ZEbliFilleCalques.this.specificToolsPrefView_=null;
}
--- 1478,1481 ----
***************
*** 1498,1502 ****
boolean b=((Boolean)_h.get(ab)).booleanValue();
String pref=ZEbliFilleCalques.this.getPreferencesVisibleKey(ab);
- System.out.println("enre de " +pref);
EbliPreferences.EBLI.putBooleanProperty(pref,b);
ab.setVisible(b);
--- 1493,1496 ----
***************
*** 1718,1723 ****
public void hierarchyChanged(HierarchyEvent e)
{
- AbstractButton ab=(AbstractButton)e.getSource();
- System.out.println(ab.getActionCommand());
}
--- 1712,1715 ----
|
|
From: <de...@us...> - 2003-09-02 08:52:02
|
Update of /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/test/reflux In directory sc8-pr-cvs1:/tmp/cvs-serv10859/test/reflux Added Files: TestCLTransitoire.java Log Message: Evolution transitoire pour reflux. Test pour fichier transitoire et pour lecture fichier binaire --- NEW FILE: TestCLTransitoire.java --- (This appears to be a binary file; contents omitted.) |
|
From: <de...@us...> - 2003-09-02 08:52:01
|
Update of /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/test In directory sc8-pr-cvs1:/tmp/cvs-serv10859/test Added Files: TestCommun.java TestFortranBinary.java Log Message: Evolution transitoire pour reflux. Test pour fichier transitoire et pour lecture fichier binaire --- NEW FILE: TestCommun.java --- (This appears to be a binary file; contents omitted.) --- NEW FILE: TestFortranBinary.java --- (This appears to be a binary file; contents omitted.) |
|
From: <de...@us...> - 2003-09-02 08:52:01
|
Update of /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/test/h2d In directory sc8-pr-cvs1:/tmp/cvs-serv10859/test/h2d Added Files: TestBord.java Log Message: Evolution transitoire pour reflux. Test pour fichier transitoire et pour lecture fichier binaire --- NEW FILE: TestBord.java --- (This appears to be a binary file; contents omitted.) |
|
From: <de...@us...> - 2003-09-02 08:51:59
|
Update of /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/h2d In directory sc8-pr-cvs1:/tmp/cvs-serv10859/h2d Added Files: H2dEvolutionFrontiereLiquideMutable.java H2dEvolutionMutable.java Log Message: Evolution transitoire pour reflux. Test pour fichier transitoire et pour lecture fichier binaire --- NEW FILE: H2dEvolutionFrontiereLiquideMutable.java --- (This appears to be a binary file; contents omitted.) --- NEW FILE: H2dEvolutionMutable.java --- (This appears to be a binary file; contents omitted.) |
Update of /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/reflux/io In directory sc8-pr-cvs1:/tmp/cvs-serv9842/io Added Files: CLTransitoireFileFormat.java CLVReader.java CLVWriter.java PnTransitoireFileFormat.java Log Message: Support des fichiers transitoires pour reflux. --- NEW FILE: CLTransitoireFileFormat.java --- (This appears to be a binary file; contents omitted.) --- NEW FILE: CLVReader.java --- (This appears to be a binary file; contents omitted.) --- NEW FILE: CLVWriter.java --- (This appears to be a binary file; contents omitted.) --- NEW FILE: PnTransitoireFileFormat.java --- (This appears to be a binary file; contents omitted.) |
Update of /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/fichiers
In directory sc8-pr-cvs1:/tmp/cvs-serv9006/fichiers
Modified Files:
FileFormatVersion.java FileOpReadCharSimpleAbstract.java
FileReadOperationAbstract.java FileWriteOperationAbstract.java
MaillageCORELEBTH.java
Log Message:
Correction bug 797184
Amelioration lecture format reflux/telemac
Index: FileFormatVersion.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/fichiers/FileFormatVersion.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** FileFormatVersion.java 22 Aug 2003 15:51:12 -0000 1.2
--- FileFormatVersion.java 2 Sep 2003 08:41:24 -0000 1.3
***************
*** 84,90 ****
public FileOperationSynthese read(File _f, ProgressionInterface _prog) {
FileReadOperationAbstract i= createReader();
! i.setFile(_f);
! i.setProgressReceiver(_prog);
! FileOperationSynthese r= i.read();
i.setProgressReceiver(null);
return r;
--- 84,88 ----
public FileOperationSynthese read(File _f, ProgressionInterface _prog) {
FileReadOperationAbstract i= createReader();
! FileOperationSynthese r= i.read(_f,_prog);
i.setProgressReceiver(null);
return r;
***************
*** 96,102 ****
ProgressionInterface _prog) {
FileWriteOperationAbstract i= createWriter();
! i.setFile(_f);
! i.setProgressReceiver(_prog);
! FileOperationSynthese r= i.write(_source);
i.setProgressReceiver(null);
return r;
--- 94,98 ----
ProgressionInterface _prog) {
FileWriteOperationAbstract i= createWriter();
! FileOperationSynthese r= i.write(_source,_f,_prog);
i.setProgressReceiver(null);
return r;
Index: FileOpReadCharSimpleAbstract.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/fichiers/FileOpReadCharSimpleAbstract.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** FileOpReadCharSimpleAbstract.java 22 Aug 2003 15:51:12 -0000 1.2
--- FileOpReadCharSimpleAbstract.java 2 Sep 2003 08:41:24 -0000 1.3
***************
*** 29,33 ****
protected FortranReader in_;
! public final void setFile(File _f) {
analyze_= new DodicoAnalyze.Editor();
analyze_.setRessource(_f.getAbsolutePath());
--- 29,33 ----
protected FortranReader in_;
! public void setFile(File _f) {
analyze_= new DodicoAnalyze.Editor();
analyze_.setRessource(_f.getAbsolutePath());
Index: FileReadOperationAbstract.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/fichiers/FileReadOperationAbstract.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** FileReadOperationAbstract.java 22 Aug 2003 15:51:12 -0000 1.1
--- FileReadOperationAbstract.java 2 Sep 2003 08:41:24 -0000 1.2
***************
*** 9,13 ****
--- 9,16 ----
package org.fudaa.dodico.fichiers;
+ import java.io.File;
+
import org.fudaa.dodico.commun.DodicoLib;
+ import org.fudaa.dodico.commun.ProgressionInterface;
/**
***************
*** 15,19 ****
* @version $Id$
*/
! public abstract class FileReadOperationAbstract extends FileOperationAbstract{
protected abstract Object _read();
--- 18,22 ----
* @version $Id$
*/
! public abstract class FileReadOperationAbstract extends FileOperationAbstract {
protected abstract Object _read();
***************
*** 23,29 ****
--- 26,41 ----
*/
public final FileOperationSynthese read() {
+ if (progress_ != null)
+ progress_.setDesc(
+ getOperationDescription() + DodicoLib.ESPACE + getVersion());
return closeOperation(_read());
}
+ public final FileOperationSynthese read(File _f,ProgressionInterface _inter){
+ setFile(_f);
+ setProgressReceiver(_inter);
+ return read();
+ }
+
/**
*
***************
*** 32,37 ****
return DodicoLib.geti18n("Lecture");
}
-
-
}
--- 44,47 ----
Index: FileWriteOperationAbstract.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/fichiers/FileWriteOperationAbstract.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** FileWriteOperationAbstract.java 22 Aug 2003 15:51:12 -0000 1.1
--- FileWriteOperationAbstract.java 2 Sep 2003 08:41:24 -0000 1.2
***************
*** 9,13 ****
--- 9,16 ----
package org.fudaa.dodico.fichiers;
+ import java.io.File;
+
import org.fudaa.dodico.commun.DodicoLib;
+ import org.fudaa.dodico.commun.ProgressionInterface;
/**
***************
*** 24,30 ****
*/
public final FileOperationSynthese write(Object _o) {
!
_write(_o);
return closeOperation(_o);
}
--- 27,41 ----
*/
public final FileOperationSynthese write(Object _o) {
! if (progress_ != null)
! progress_.setDesc(
! getOperationDescription() + DodicoLib.ESPACE + getVersion());
_write(_o);
return closeOperation(_o);
+ }
+
+ public final FileOperationSynthese write(Object _o,File _f,ProgressionInterface _inter){
+ setFile(_f);
+ setProgressReceiver(_inter);
+ return write(_o);
}
Index: MaillageCORELEBTH.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/fichiers/MaillageCORELEBTH.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** MaillageCORELEBTH.java 4 Jul 2003 12:39:45 -0000 1.4
--- MaillageCORELEBTH.java 2 Sep 2003 08:41:24 -0000 1.5
***************
*** 10,25 ****
package org.fudaa.dodico.fichiers;
! import java.io.*;
! import java.util.*;
! import org.fudaa.dodico.objet.*;
! import org.fudaa.dodico.usine.UsineHelper;
! import org.fudaa.dodico.corba.objet.*;
import org.fudaa.dodico.corba.usine.IUsine;
! import org.fudaa.dodico.corba.geometrie.*;
! import org.fudaa.dodico.fortran.*;
! import org.fudaa.dodico.ef.*;
! import org.fudaa.dodico.geometrie.*;
! import org.fudaa.dodico.corba.ef.*;
/**
--- 10,35 ----
package org.fudaa.dodico.fichiers;
! import java.io.File;
! import java.io.FileNotFoundException;
! import java.io.FileReader;
! import java.io.FileWriter;
! import java.io.IOException;
! import java.util.ArrayList;
! import java.util.Collections;
! import java.util.Comparator;
! import java.util.Iterator;
! import java.util.List;
! import org.fudaa.dodico.corba.ef.IElement;
! import org.fudaa.dodico.corba.ef.IMaillage;
! import org.fudaa.dodico.corba.ef.INoeud;
! import org.fudaa.dodico.corba.geometrie.IPoint;
! import org.fudaa.dodico.corba.geometrie.LTypeElement;
import org.fudaa.dodico.corba.usine.IUsine;
!
! import org.fudaa.dodico.fortran.FortranReader;
! import org.fudaa.dodico.fortran.FortranWriter;
! import org.fudaa.dodico.objet.CDodico;
! import org.fudaa.dodico.usine.UsineHelper;
/**
|
|
From: <de...@us...> - 2003-09-02 08:43:02
|
Update of /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/dico
In directory sc8-pr-cvs1:/tmp/cvs-serv9006/dico
Modified Files:
DicoCasFileFormatVersion.java DicoEntite.java DicoParams.java
Log Message:
Correction bug 797184
Amelioration lecture format reflux/telemac
Index: DicoCasFileFormatVersion.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/dico/DicoCasFileFormatVersion.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** DicoCasFileFormatVersion.java 22 Aug 2003 15:51:11 -0000 1.2
--- DicoCasFileFormatVersion.java 2 Sep 2003 08:41:23 -0000 1.3
***************
*** 119,123 ****
}
! public FileOperationSynthese writeMaillage(
File _f,
DicoCasInterface _source,
--- 119,123 ----
}
! public FileOperationSynthese write(
File _f,
DicoCasInterface _source,
Index: DicoEntite.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/dico/DicoEntite.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** DicoEntite.java 4 Jul 2003 12:08:51 -0000 1.2
--- DicoEntite.java 2 Sep 2003 08:41:23 -0000 1.3
***************
*** 89,92 ****
--- 89,93 ----
return DodicoLib.enTableau(l);
}
+
public boolean containsStringDataType()
Index: DicoParams.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/dico/DicoParams.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** DicoParams.java 22 Aug 2003 15:51:11 -0000 1.3
--- DicoParams.java 2 Sep 2003 08:41:24 -0000 1.4
***************
*** 38,42 ****
*/
public DicoParams(Map _inits, DicoCasFileFormatVersion _dico) {
! entitesValues_= new Hashtable(_inits);
ft_= _dico;
casFileEntite_= ft_.getFichierPrincipalEntite();
--- 38,43 ----
*/
public DicoParams(Map _inits, DicoCasFileFormatVersion _dico) {
!
! entitesValues_=(_inits==null?new Hashtable(): new Hashtable(_inits));
ft_= _dico;
casFileEntite_= ft_.getFichierPrincipalEntite();
***************
*** 329,333 ****
public int getFileEntiteIdx(DicoEntite _ent) {
int n= entitesFiles_.size();
! for (int i= 0; i <= n; i++) {
DicoEntiteFile entF= getFileEntiteSet(i);
if (entF.getEntite().equals(_ent))
--- 330,334 ----
public int getFileEntiteIdx(DicoEntite _ent) {
int n= entitesFiles_.size();
! for (int i= 0; i <n; i++) {
DicoEntiteFile entF= getFileEntiteSet(i);
if (entF.getEntite().equals(_ent))
|
|
From: <de...@us...> - 2003-09-02 08:43:02
|
Update of /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/fortran
In directory sc8-pr-cvs1:/tmp/cvs-serv9006/fortran
Modified Files:
FortranBinaryInputStream.java FortranWriter.java
NativeBinaryInputStream.java
Log Message:
Correction bug 797184
Amelioration lecture format reflux/telemac
Index: FortranBinaryInputStream.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/fortran/FortranBinaryInputStream.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** FortranBinaryInputStream.java 4 Jul 2003 12:47:12 -0000 1.5
--- FortranBinaryInputStream.java 2 Sep 2003 08:41:24 -0000 1.6
***************
*** 15,18 ****
--- 15,19 ----
/**
* Une classe facilitant la lecture de fichiers binaires écrits par Fortran
+ * Utilise la classe NativeBinaryInputStream qui est deja "bufferisee".
* L'équivalence d'intructions entre Java et Fortran se fera de la manière
* suivante :<BR>
***************
*** 63,69 ****
*
* Dans le cas acces sequentiel, un compteur permet de se positionner
! * dans le flux. Il faut faire attention lors de l'utilisation des methodes
! * mark et reset (par exemple) sur le inputstream donne en entree. le compteur
! * peut devenir faux.
*
*
--- 64,69 ----
*
* Dans le cas acces sequentiel, un compteur permet de se positionner
! * dans le flux.
! *
*
*
***************
*** 85,89 ****
* de l'enregistrement. La variable systeme ("os.arch") permet de déterminer
* l'architecture a utiliser.
! * @param _in InputStream
* @param _sequential <B>true</B> le fichier est binaire à accès
* <I>Sequential</I>. <B>false</B> le fichier est binaire à accès <I>Direct</I>
--- 85,89 ----
* de l'enregistrement. La variable systeme ("os.arch") permet de déterminer
* l'architecture a utiliser.
! * @param _in InputStream (inutile d'utiliser un buffer)
* @param _sequential <B>true</B> le fichier est binaire à accès
* <I>Sequential</I>. <B>false</B> le fichier est binaire à accès <I>Direct</I>
***************
*** 98,102 ****
* Il est possible de definir l'architecture intel ( little indian) ou sparc
* (big indian).
! * @param _in InputStream.
* @param _sequential <B>true</B> le fichier est binaire à accès
* <I>Sequential</I>. <B>false</B> le fichier est binaire à accès
--- 98,102 ----
* Il est possible de definir l'architecture intel ( little indian) ou sparc
* (big indian).
! * @param _in InputStream.(inutile d'utiliser un buffer)
* @param _sequential <B>true</B> le fichier est binaire à accès
* <I>Sequential</I>. <B>false</B> le fichier est binaire à accès
***************
*** 179,182 ****
--- 179,183 ----
/**
* Lecture d'un champ réel en double précision "<I>double precision</I>"
+ * soit 8 octets.
* Fortran
* @return double correspondant au double precision
***************
*** 284,288 ****
*/
public void readRecord() throws IOException {
! skip(nextPos_-currentPos_);
currentPos_=nextPos_;
--- 285,290 ----
*/
public void readRecord() throws IOException {
! long l=skip(nextPos_-currentPos_);
! if(l!=(nextPos_-currentPos_)) System.err.println("Probleme de lecture binaire");
currentPos_=nextPos_;
***************
*** 297,301 ****
/**
* Renvoie la position courante dans le flux.
- * @return long
*/
public int getCurrentPosition()
--- 299,302 ----
Index: FortranWriter.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/fortran/FortranWriter.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** FortranWriter.java 4 Jul 2003 12:47:13 -0000 1.4
--- FortranWriter.java 2 Sep 2003 08:41:24 -0000 1.5
***************
*** 13,19 ****
import java.io.PrintWriter;
import java.io.Writer;
! import java.util.Iterator;
! import java.util.Vector;
import org.fudaa.dodico.commun.DodicoLib;
--- 13,19 ----
import java.io.PrintWriter;
import java.io.Writer;
! import java.util.Collections;
+ import org.fudaa.dodico.commun.DodicoArrayList;
import org.fudaa.dodico.commun.DodicoLib;
***************
*** 28,76 ****
// extends PrintWriter
{
! protected Vector fields;
protected int number;
private Writer out_;
! private String line_separator_ = DodicoLib.LINE_SEP;
private StringBuffer buffer_;
! public FortranWriter(Writer _w)
! {
! out_=_w;
! fields=new Vector();
! number=-1;
}
!
! private void write(String _b) throws IOException
! {
out_.write(_b.toCharArray());
}
!
! private void write(StringBuffer _b) throws IOException
! {
! char[] c=new char[_b.length()];
_b.getChars(0, c.length, c, 0);
out_.write(c);
_b.setLength(0);
}
-
! public FortranWriter(PrintWriter _w)
! {
! out_ = _w;
! fields = new Vector();
! number = -1;
}
! public void close()
! throws IOException
! {
out_.close();
}
-
-
! public void flush()
! throws IOException
! {
out_.flush();
}
--- 28,70 ----
// extends PrintWriter
{
! protected DodicoArrayList fields;
! int nbMaxFields_;
! // protected Vector fields;
protected int number;
private Writer out_;
! private String line_separator_= DodicoLib.LINE_SEP;
private StringBuffer buffer_;
! public FortranWriter(Writer _w) {
! out_= _w;
! fields= new DodicoArrayList();
! // fields= new Vector();
! number= -1;
! nbMaxFields_= -1;
}
!
! private void write(String _b) throws IOException {
out_.write(_b.toCharArray());
}
!
! private void write(StringBuffer _b) throws IOException {
! char[] c= new char[_b.length()];
_b.getChars(0, c.length, c, 0);
out_.write(c);
_b.setLength(0);
}
! public FortranWriter(PrintWriter _w) {
! out_= _w;
! fields= new DodicoArrayList();
! // fields= new Vector();
! number= -1;
}
! public void close() throws IOException {
out_.close();
}
! public void flush() throws IOException {
out_.flush();
}
***************
*** 80,85 ****
* Incremente le num de ligne.
*/
! public void println(String _l) throws IOException
! {
write(_l + line_separator_);
//fields.clear();
--- 74,78 ----
* Incremente le num de ligne.
*/
! public void println(String _l) throws IOException {
write(_l + line_separator_);
//fields.clear();
***************
*** 87,90 ****
--- 80,89 ----
}
+ public void println() throws IOException {
+ write(line_separator_);
+ //fields.clear();
+ number++;
+ }
+
// public FortranWriter()
// {
***************
*** 100,126 ****
// }
! public int getLineNumber()
! {
return number;
}
! private boolean stringQuoted_ = true;
! public boolean isStringQuoted()
! {
return stringQuoted_;
}
! public void setStringQuoted(boolean _stringQuoted)
! {
! stringQuoted_ = _stringQuoted;
}
! public String getLineSeparator()
! {
return line_separator_;
}
! public void setLineSeparator(String _ls)
! {
! line_separator_ = _ls;
}
--- 99,120 ----
// }
! public int getLineNumber() {
return number;
}
! private boolean stringQuoted_= true;
! public boolean isStringQuoted() {
return stringQuoted_;
}
! public void setStringQuoted(boolean _stringQuoted) {
! stringQuoted_= _stringQuoted;
}
! public String getLineSeparator() {
return line_separator_;
}
! public void setLineSeparator(String _ls) {
! line_separator_= _ls;
}
***************
*** 129,161 ****
*/
! public void writeFields() throws IOException
! {
! String s;
! Object o;
! if(buffer_==null) buffer_=new StringBuffer(200);
! for (Iterator e = fields.iterator(); e.hasNext();)
! {
! o = e.next();
! if (o != null)
! {
! s = "";
!
! if (stringQuoted_ && (o instanceof String))
! {
! s = o.toString();
!
! if (s.indexOf('\'') >= 0)
! {
! for (int i = s.length() - 1; i >= 0; i--)
! if (s.charAt(i) == '\'')
! s = s.substring(0, i) + "''" + s.substring(i + 1);
! }
!
! s = "'" + s + "'";
! }
! else
! s = o.toString();
! buffer_.append(s + " ");
! //out_.write(s + " ");
}
}
--- 123,136 ----
*/
! public void writeFields() throws IOException {
! FormatField o;
! if (buffer_ == null)
! buffer_= new StringBuffer(200);
! // for (Iterator e= fields.iterator(); e.hasNext();) {
! // o= e.next();
! for (int i= 0; i <= nbMaxFields_; i++) {
! o= (FormatField)fields.get(i);
! if (o != null) {
! buffer_.append(o.getStringNonFormate() + " ");
}
}
***************
*** 164,168 ****
write(buffer_);
number++;
! fields.clear();
}
--- 139,146 ----
write(buffer_);
number++;
! // fields.clear();
! nbMaxFields_= -1;
! Collections.fill(fields, null);
! // fields.
}
***************
*** 171,195 ****
*/
! public void writeFields(int[] _fmt) throws IOException
! {
! int l = fields.size();
! if(buffer_==null) buffer_=new StringBuffer(200);
String s;
! Object o;
! for (int i = 0; i < l; i++)
! {
! o = fields.get(i);
! s = "";
if (o == null)
! s = addSpacesAfter(_fmt[i], "");
! else if (o instanceof Integer)
! s = addSpacesBefore(_fmt[i], o.toString());
! else if ((o instanceof Double) || (o instanceof Float))
! s = addSpacesBefore(_fmt[i], formateReel(_fmt[i], o));
! else if (o instanceof String)
! s = addSpacesAfter(_fmt[i], (String) o);
! else
! System.err.println("Type de " + o + " non reconnu pour le champ " + i);
//out_.write(s);
buffer_.append(s);
--- 149,167 ----
*/
! public void writeFields(int[] _fmt) throws IOException {
! int l= fields.size();
! if (buffer_ == null)
! buffer_= new StringBuffer(200);
String s;
! FormatField o;
! // for (int i= 0; i < l; i++) {
! for (int i= 0; i <= nbMaxFields_; i++) {
! o= (FormatField)fields.get(i);
! s= "";
if (o == null)
! s= addSpacesAfter(_fmt[i], "");
! else
! s=o.getStringFormate(_fmt[i]);
//out_.write(s);
buffer_.append(s);
***************
*** 200,204 ****
write(buffer_);
number++;
! fields.clear();
}
--- 172,178 ----
write(buffer_);
number++;
! //fields.clear();
! nbMaxFields_= -1;
! Collections.fill(fields, null);
}
***************
*** 207,226 ****
* du champ.
*/
! private final static String formateReel(int _l, Object _d)
! {
! String r = _d.toString();
! if (r.length() >= _l)
! {
// int i=0;
// while (i<r.length() && r.charAt(i)!='E') i++;
// if (i==r.length()) r=r.substring(0,lg);
// else r=r.substring(0,lg-r.length()+i)+r.substring(i);
! int i = r.indexOf('.');
! int j = r.indexOf('E');
if ((i < _l) && (j < 0))
! r = r.substring(0, _l);
else if (j > 0)
! r = r.substring(0, _l - r.length() + j) + r.substring(j);
}
--- 181,198 ----
* du champ.
*/
! public final static String formateReel(int _l, Object _d) {
! String r= _d.toString();
! if (r.length() >= _l) {
// int i=0;
// while (i<r.length() && r.charAt(i)!='E') i++;
// if (i==r.length()) r=r.substring(0,lg);
// else r=r.substring(0,lg-r.length()+i)+r.substring(i);
! int i= r.indexOf('.');
! int j= r.indexOf('E');
if ((i < _l) && (j < 0))
! r= r.substring(0, _l);
else if (j > 0)
! r= r.substring(0, _l - r.length() + j) + r.substring(j);
}
***************
*** 228,233 ****
}
! private final static String addSpacesBefore(int t, String s)
! {
//Ancienne version
/*String a="*****";
--- 200,204 ----
}
! public final static String addSpacesBefore(int t, String s) {
//Ancienne version
/*String a="*****";
***************
*** 251,259 ****
return r; */
! int l = s.length();
! int lMotif = 5;
! StringBuffer r = new StringBuffer(t);
! if (l > t)
! {
System.err.println(
"Impossible d'écrire la valeur "
--- 222,229 ----
return r; */
! int l= s.length();
! int lMotif= 5;
! StringBuffer r= new StringBuffer(t);
! if (l > t) {
System.err.println(
"Impossible d'écrire la valeur "
***************
*** 261,271 ****
+ " sur un champ de longueur "
+ t);
! String a = "*****";
! int nbMotif = t / lMotif;
! int sup = t % lMotif;
! for (int i = nbMotif; i > 0; i--)
r.append(a);
! switch (sup)
! {
case 0 :
break;
--- 231,240 ----
+ " sur un champ de longueur "
+ t);
! String a= "*****";
! int nbMotif= t / lMotif;
! int sup= t % lMotif;
! for (int i= nbMotif; i > 0; i--)
r.append(a);
! switch (sup) {
case 0 :
break;
***************
*** 285,295 ****
return r.toString();
}
! String b = " ";
! int nbMotif = (t - l) / lMotif;
! int sup = (t - l) % lMotif;
! for (int i = nbMotif; i > 0; i--)
r.append(b);
! switch (sup)
! {
case 0 :
break;
--- 254,263 ----
return r.toString();
}
! String b= " ";
! int nbMotif= (t - l) / lMotif;
! int sup= (t - l) % lMotif;
! for (int i= nbMotif; i > 0; i--)
r.append(b);
! switch (sup) {
case 0 :
break;
***************
*** 315,320 ****
}
! private final static String addSpacesAfter(int t, String s)
! {
/* String a="*****";
String b=" ";
--- 283,287 ----
}
! public final static String addSpacesAfter(int t, String s) {
/* String a="*****";
String b=" ";
***************
*** 330,338 ****
return r; */
! int l = s.length();
! int lMotif = 5;
! StringBuffer r = new StringBuffer(t);
! if (l > t)
! {
System.err.println(
"Impossible d'écrire la valeur "
--- 297,304 ----
return r; */
! int l= s.length();
! int lMotif= 5;
! StringBuffer r= new StringBuffer(t);
! if (l > t) {
System.err.println(
"Impossible d'écrire la valeur "
***************
*** 340,350 ****
+ " sur un champ de longueur "
+ t);
! String a = "*****";
! int nbMotif = t / lMotif;
! int sup = t % lMotif;
! for (int i = nbMotif; i > 0; i--)
r.append(a);
! switch (sup)
! {
case 0 :
break;
--- 306,315 ----
+ " sur un champ de longueur "
+ t);
! String a= "*****";
! int nbMotif= t / lMotif;
! int sup= t % lMotif;
! for (int i= nbMotif; i > 0; i--)
r.append(a);
! switch (sup) {
case 0 :
break;
***************
*** 365,375 ****
}
r.append(s);
! String b = " ";
! int nbMotif = (t - l) / lMotif;
! int sup = (t - l) % lMotif;
! for (int i = nbMotif; i > 0; i--)
r.append(b);
! switch (sup)
! {
case 0 :
break;
--- 330,339 ----
}
r.append(s);
! String b= " ";
! int nbMotif= (t - l) / lMotif;
! int sup= (t - l) % lMotif;
! for (int i= nbMotif; i > 0; i--)
r.append(b);
! switch (sup) {
case 0 :
break;
***************
*** 397,409 ****
* @param _v la valeur du champ de type double
*/
!
! public void doubleField(int _i, double _v)
! {
! if (fields.size() <= _i)
! fields.setSize(_i + 1);
! // fields.ensureCapacity(_i+1);
! fields.setElementAt(new Double(_v), _i);
}
/**
* Fixe la valeur du champ numero i avec un reel.
--- 361,373 ----
* @param _v la valeur du champ de type double
*/
! public void doubleField(int _i, double _v) {
! objectField(_i, getDoubleFormatField(_v));
! // if (fields.size() <= _i)
! // fields.setSize(_i + 1);
! // // fields.ensureCapacity(_i+1);
! // fields.setElementAt(new Double(_v), _i);
}
+
/**
* Fixe la valeur du champ numero i avec un reel.
***************
*** 411,422 ****
* @param _v la valeur du champ de type float
*/
! public void floatField(int _i, double _v)
! {
! if (fields.size() <= _i)
! fields.setSize(_i + 1);
! // fields.ensureCapacity(_i+1);
! fields.setElementAt(new Float(_v), _i);
}
/**
* Fixe la valeur du champ numero i avec un entier.
--- 375,387 ----
* @param _v la valeur du champ de type float
*/
! public void floatField(int _i, double _v) {
! // if (fields.size() <= _i)
! // fields.setSize(_i + 1);
! // // fields.ensureCapacity(_i+1);
! // fields.setElementAt(new Float(_v), _i);
! objectField(_i, getFloatFormatField((float)_v));
}
+
/**
* Fixe la valeur du champ numero i avec un entier.
***************
*** 424,433 ****
* @param _v la valeur du champ de type int
*/
! public void intField(int _i, int _v)
! {
! if (fields.size() <= _i)
! fields.setSize(_i + 1);
! // fields.ensureCapacity(_i+1);
! fields.setElementAt(new Integer(_v), _i);
}
--- 389,398 ----
* @param _v la valeur du champ de type int
*/
! public void intField(int _i, int _v) {
! // if (fields.size() <= _i)
! // fields.setSize(_i + 1);
! // // fields.ensureCapacity(_i+1);
! // fields.setElementAt(new Integer(_valeurChamp), _i);
! objectField(_i, getIntegerFormatField(_v));
}
***************
*** 437,448 ****
* @param _v la valeur du champ de type string
*/
! public void stringField(int _i, String _v)
! {
if (fields.size() <= _i)
fields.setSize(_i + 1);
// fields.ensureCapacity(_i+1);
! fields.setElementAt(_v, _i);
}
}
--- 402,559 ----
* @param _v la valeur du champ de type string
*/
! public void stringField(int _i, String _v) {
! objectField(_i, getStringFormatField(_v));
! }
!
! private void objectField(int _i, Object _v) {
if (fields.size() <= _i)
fields.setSize(_i + 1);
// fields.ensureCapacity(_i+1);
! fields.set(_i, _v);
! if (_i > nbMaxFields_)
! nbMaxFields_= _i;
! }
!
! private interface FormatField {
! public String getStringNonFormate();
! public String getStringFormate(int _f);
! }
! private final StringFormatField FF_EMPTY_STRING=
! new StringFormatField(DodicoLib.EMPTY_STRING);
! private final StringFormatField FF_ESPACE_STRING=
! new StringFormatField(DodicoLib.ESPACE);
!
! private final StringFormatField getStringFormatField(String _s) {
! if (_s == DodicoLib.EMPTY_STRING)
! return FF_EMPTY_STRING;
! if (_s == DodicoLib.ESPACE)
! return FF_ESPACE_STRING;
! return new StringFormatField(_s);
! }
!
! private final class StringFormatField implements FormatField {
!
! private String s_;
! public StringFormatField(String _s) {
! s_= _s;
! }
!
! /**
! *
! */
! public String getStringFormate(int _f) {
! return addSpacesAfter(_f, s_);
! }
!
! /**
! *
! */
! public String getStringNonFormate() {
! if (isStringQuoted()) {
! String r= s_;
!
! if (r.indexOf('\'') >= 0) {
! for (int j= r.length() - 1; j >= 0; j--)
! if (r.charAt(j) == '\'')
! r= r.substring(0, j) + "''" + r.substring(j + 1);
! }
! r= "'" + r + "'";
! return r;
! } else
! return s_;
!
! }
! }
!
! private final DoubleFormatField DOUBLE_ZERO= new DoubleFormatField(0d);
!
! private final DoubleFormatField getDoubleFormatField(double _d) {
! if (_d == 0d)
! return DOUBLE_ZERO;
! return new DoubleFormatField(_d);
! }
!
! private final FloatFormatField FLOAT_ZERO= new FloatFormatField(0f);
!
! private final FloatFormatField getFloatFormatField(float _d) {
! if (_d == 0f)
! return FLOAT_ZERO;
! return new FloatFormatField(_d);
! }
!
! private final class DoubleFormatField implements FormatField {
! private double d_;
! public DoubleFormatField(double _d) {
! d_= _d;
! }
! /**
! *
! */
! public String getStringFormate(int _f) {
! return addSpacesBefore(_f, formateReel(_f, Double.toString(d_)));
! }
!
! /**
! *
! */
! public String getStringNonFormate() {
! return Double.toString(d_);
! }
}
+ private final class FloatFormatField implements FormatField {
+ private float d_;
+ public FloatFormatField(float _d) {
+ d_= _d;
+ }
+ /**
+ *
+ */
+ public String getStringFormate(int _f) {
+ return addSpacesBefore(_f, formateReel(_f, Float.toString(d_)));
+ }
+
+ /**
+ *
+ */
+ public String getStringNonFormate() {
+ return Float.toString(d_);
+ }
+
+ }
+
+ IntegerFormatField[] FF_INTEGERS;
+
+ private final void initFFInteger(){
+ FF_INTEGERS=new IntegerFormatField[7];
+ for(int i=FF_INTEGERS.length-1;i>=0;i--){
+ FF_INTEGERS[i]=new IntegerFormatField(i);
+ }
+ }
+
+ private final IntegerFormatField getIntegerFormatField(int _i){
+ if(FF_INTEGERS==null) initFFInteger();
+ return ((_i>=0) && (_i<FF_INTEGERS.length))?FF_INTEGERS[_i]:new IntegerFormatField(_i);
+ }
+ private final class IntegerFormatField implements FormatField {
+ private int d_;
+ public IntegerFormatField(int _d) {
+ d_= _d;
+ }
+ /**
+ *
+ */
+ public String getStringFormate(int _f) {
+ return addSpacesBefore(_f, DodicoLib.getString(d_));
+ }
+
+ /**
+ *
+ */
+ public String getStringNonFormate() {
+ return DodicoLib.getString(d_);
+ }
+ }
+
}
Index: NativeBinaryInputStream.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/fortran/NativeBinaryInputStream.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** NativeBinaryInputStream.java 4 Jul 2003 12:47:13 -0000 1.4
--- NativeBinaryInputStream.java 2 Sep 2003 08:41:24 -0000 1.5
***************
*** 25,32 ****
// extends DataInputStream
{
! public final static String X86 = "86";
! public final static String X86_NAME = "X86";
! public final static String SPARC = "sparc";
! public final static String SPARC_NAME = "SPARC";
/**
--- 25,32 ----
// extends DataInputStream
{
! public final static String X86= "86";
! public final static String X86_NAME= "X86";
! public final static String SPARC= "sparc";
! public final static String SPARC_NAME= "SPARC";
/**
***************
*** 49,71 ****
int _bufferLength,
String _machine)
! throws IOException
! {
this(new BufferedInputStream(_in, _bufferLength), _machine);
}
public NativeBinaryInputStream(InputStream _in, String _machine)
! throws IOException
! {
this(new BufferedInputStream(_in), _machine);
}
public NativeBinaryInputStream(BufferedInputStream _in, String _machine)
! throws IOException
! {
! in_ = new DataInputStream(_in);
//inutile
//buf=null;
setMachineType(_machine);
! buf=new byte[8];
}
--- 49,68 ----
int _bufferLength,
String _machine)
! throws IOException {
this(new BufferedInputStream(_in, _bufferLength), _machine);
}
public NativeBinaryInputStream(InputStream _in, String _machine)
! throws IOException {
this(new BufferedInputStream(_in), _machine);
}
public NativeBinaryInputStream(BufferedInputStream _in, String _machine)
! throws IOException {
! in_= new DataInputStream(_in);
//inutile
//buf=null;
setMachineType(_machine);
! buf= new byte[8];
}
***************
*** 75,108 ****
* @return String correspondant à la chaine de caractères
*/
! public String readCharacter(int _lgString) throws IOException
! {
! if(buf.length!=_lgString)
! buf = new byte[_lgString];
in_.read(buf);
return new String(buf);
}
! public void skip(long _l) throws IOException
! {
! in_.skip(_l);
}
! public void close() throws IOException
! {
in_.close();
}
! public int available() throws IOException
! {
return in_.available();
}
! public void skipBytes(int _l) throws IOException
! {
in_.skipBytes(_l);
}
! public static String getLocalMachine()
! {
return System.getProperty("os.arch");
}
--- 72,120 ----
* @return String correspondant à la chaine de caractères
*/
! public String readCharacter(int _lgString) throws IOException {
! if (buf.length != _lgString)
! buf= new byte[_lgString];
in_.read(buf);
return new String(buf);
}
! /**
! * Cette methode assure (au maximun) que _l octets sont ignores.
! * @return le nombre d'octets reellement ignore.
! */
! public long skip(long _l) throws IOException {
! long skipReal= in_.skip(_l);
! //si tous les octets n'ont pas ete ignore
! if (skipReal < _l) {
! //les octets restants a lire.
! long nToSkip= _l - skipReal;
! //le nombre total d'octets ignores
! long total= 0l;
! //les octets ignores lors d'une instruction.
! long nSkipped= 0l;
! //tant qu'on pas atteint le but et qu'il reste des octets a lire.
! while ((total < nToSkip)
! && ((nSkipped= in_.skip(nToSkip - total)) > 0)) {
! total += nSkipped;
! }
! return _l-nToSkip+total;
! } else
! return skipReal;
!
}
! public void close() throws IOException {
in_.close();
}
! public int available() throws IOException {
return in_.available();
}
! public void skipBytes(int _l) throws IOException {
in_.skipBytes(_l);
}
! public static String getLocalMachine() {
return System.getProperty("os.arch");
}
***************
*** 111,116 ****
* Renvoie l'identifiant correspond a la machine.
*/
! public static String getLocalMachineId()
! {
return getMachineId(System.getProperty("os.arch"));
}
--- 123,127 ----
* Renvoie l'identifiant correspond a la machine.
*/
! public static String getLocalMachineId() {
return getMachineId(System.getProperty("os.arch"));
}
***************
*** 122,127 ****
* sont utilisees.
*/
! public static String getMachineId(String _desc)
! {
if (isX86(_desc))
return X86;
--- 133,137 ----
* sont utilisees.
*/
! public static String getMachineId(String _desc) {
if (isX86(_desc))
return X86;
***************
*** 136,141 ****
* par <code>"X86"</code>). La variable <code>X86</code> est utilisee.
*/
! public static boolean isX86(String _machine)
! {
if (_machine == null)
return false;
--- 146,150 ----
* par <code>"X86"</code>). La variable <code>X86</code> est utilisee.
*/
! public static boolean isX86(String _machine) {
if (_machine == null)
return false;
***************
*** 150,155 ****
* La variable <code>SPARC</code> est utilisee.
*/
! public static boolean isSparc(String _machine)
! {
if (_machine == null)
return false;
--- 159,163 ----
* La variable <code>SPARC</code> est utilisee.
*/
! public static boolean isSparc(String _machine) {
if (_machine == null)
return false;
***************
*** 163,168 ****
* classe.
*/
! public static boolean isMachineKnown(String _machine)
! {
return (isX86(_machine) || isSparc(_machine));
}
--- 171,175 ----
* classe.
*/
! public static boolean isMachineKnown(String _machine) {
return (isX86(_machine) || isSparc(_machine));
}
***************
*** 171,213 ****
* Affecte le type de machine. Par défaut, le type sparc est utilise.
*/
! public final void setMachineType(String _machine)
! {
! if(_machine==null) _machine=NativeBinaryInputStream.getLocalMachine();
! if (isX86(_machine))
! {
! machineType_ = X86;
! l1 = i1 = s1 = 0;
! l2 = i2 = s2 = 1;
! l3 = i3 = 2;
! l4 = i4 = 3;
! l5 = 4;
! l6 = 5;
! l7 = 6;
! l8 = 7;
! }
! else
! {
! machineType_ = SPARC;
! l1 = 7;
! l2 = 6;
! l3 = 5;
! l4 = 4;
! l5 = i1 = 3;
! l6 = i2 = 2;
! l7 = i3 = s1 = 1;
! l8 = i4 = s2 = 0;
! }
}
! public String getMachineType()
! {
return machineType_;
}
! private long _readInt_64() throws IOException
! {
! if(buf.length!=8)
! buf = new byte[8];
! nbByteLus_ = in_.read(buf);
return (buf[l1] < 0 ? (256 + buf[l1]) : buf[l1])
+ (buf[l2] < 0 ? (256 + buf[l2]) : buf[l2]) * 0x100L
--- 178,215 ----
* Affecte le type de machine. Par défaut, le type sparc est utilise.
*/
! public final void setMachineType(String _machine) {
! if (_machine == null)
! _machine= NativeBinaryInputStream.getLocalMachine();
! if (isX86(_machine)) {
! machineType_= X86;
! l1= i1= s1= 0;
! l2= i2= s2= 1;
! l3= i3= 2;
! l4= i4= 3;
! l5= 4;
! l6= 5;
! l7= 6;
! l8= 7;
! } else {
! machineType_= SPARC;
! l1= 7;
! l2= 6;
! l3= 5;
! l4= 4;
! l5= i1= 3;
! l6= i2= 2;
! l7= i3= s1= 1;
! l8= i4= s2= 0;
! }
}
! public String getMachineType() {
return machineType_;
}
! private long _readInt_64() throws IOException {
! if (buf.length != 8)
! buf= new byte[8];
! nbByteLus_= in_.read(buf);
return (buf[l1] < 0 ? (256 + buf[l1]) : buf[l1])
+ (buf[l2] < 0 ? (256 + buf[l2]) : buf[l2]) * 0x100L
***************
*** 220,237 ****
}
! public byte readInt_8() throws IOException
! {
! if(buf.length!=1)
! buf = new byte[1];
! nbByteLus_ = in_.read(buf);
return buf[0];
}
! public short readUInt_8() throws IOException
! {
! if(buf.length!=1)
! buf = new byte[1];
! nbByteLus_ = in_.read(buf);
! return buf[0] < 0 ? (short) (256 + buf[0]) : (short) buf[0];
}
--- 222,237 ----
}
! public byte readInt_8() throws IOException {
! if (buf.length != 1)
! buf= new byte[1];
! nbByteLus_= in_.read(buf);
return buf[0];
}
! public short readUInt_8() throws IOException {
! if (buf.length != 1)
! buf= new byte[1];
! nbByteLus_= in_.read(buf);
! return buf[0] < 0 ? (short) (256 + buf[0]) : (short)buf[0];
}
***************
*** 241,277 ****
* @return si fin du fichier.
*/
! public boolean isFinFichier()
! {
return nbByteLus_ == -1;
}
! public short readInt_16() throws IOException
! {
! if(buf.length!=2)
! buf = new byte[2];
! nbByteLus_ = in_.read(buf);
return (short)
((buf[s1] < 0 ? (256 + buf[s1]) : buf[s1]) + (buf[s2] * 0x100));
}
! public int readUInt_16() throws IOException
! {
! if(buf.length!=2)
! buf = new byte[2];
! nbByteLus_ = in_.read(buf);
return (buf[s1] < 0 ? (256 + buf[s1]) : buf[s1])
+ (buf[s2] < 0 ? (256 + buf[s2]) : buf[s2]) * 0x100;
}
! public int readInt_32() throws IOException
! {
return _readInt_32();
}
! private int _readInt_32() throws IOException
! {
! if(buf.length!=4)
! buf = new byte[4];
! nbByteLus_ = in_.read(buf);
return (buf[i1] < 0 ? (256 + buf[i1]) : buf[i1])
+ (buf[i2] < 0 ? (256 + buf[i2]) : buf[i2]) * 0x100
--- 241,272 ----
* @return si fin du fichier.
*/
! public boolean isFinFichier() {
return nbByteLus_ == -1;
}
! public short readInt_16() throws IOException {
! if (buf.length != 2)
! buf= new byte[2];
! nbByteLus_= in_.read(buf);
return (short)
((buf[s1] < 0 ? (256 + buf[s1]) : buf[s1]) + (buf[s2] * 0x100));
}
! public int readUInt_16() throws IOException {
! if (buf.length != 2)
! buf= new byte[2];
! nbByteLus_= in_.read(buf);
return (buf[s1] < 0 ? (256 + buf[s1]) : buf[s1])
+ (buf[s2] < 0 ? (256 + buf[s2]) : buf[s2]) * 0x100;
}
! public int readInt_32() throws IOException {
return _readInt_32();
}
! private int _readInt_32() throws IOException {
! if (buf.length != 4)
! buf= new byte[4];
! nbByteLus_= in_.read(buf);
return (buf[i1] < 0 ? (256 + buf[i1]) : buf[i1])
+ (buf[i2] < 0 ? (256 + buf[i2]) : buf[i2]) * 0x100
***************
*** 280,288 ****
}
! public long readUInt_32() throws IOException
! {
! if(buf.length!=4)
! buf = new byte[4];
! nbByteLus_ = in_.read(buf);
return (buf[i1] < 0 ? (256 + buf[i1]) : buf[i1])
+ (buf[i2] < 0 ? (256 + buf[i2]) : buf[i2]) * 0x100L
--- 275,282 ----
}
! public long readUInt_32() throws IOException {
! if (buf.length != 4)
! buf= new byte[4];
! nbByteLus_= in_.read(buf);
return (buf[i1] < 0 ? (256 + buf[i1]) : buf[i1])
+ (buf[i2] < 0 ? (256 + buf[i2]) : buf[i2]) * 0x100L
***************
*** 291,296 ****
}
! public long readInt_64() throws IOException
! {
//utilise une methode privee pour eviter les problemes avec
//l'heritage
--- 285,289 ----
}
! public long readInt_64() throws IOException {
//utilise une methode privee pour eviter les problemes avec
//l'heritage
***************
*** 298,316 ****
}
! public float readFloat_32() throws IOException
! {
/*Reviens a faire readInt_32().
Ne pas utiliser cette méthode car fausse l'incrementation de
FortranBinaryInputStream*/
! int temp = _readInt_32();
return Float.intBitsToFloat(temp);
}
! public double readFloat_64() throws IOException
! {
/*Reviens a faire readInt_64().
Ne pas utiliser cette méthode car fausse l'incrementation de
FortranBinaryInputStream*/
! long temp = _readInt_64();
return Double.longBitsToDouble(temp);
}
--- 291,307 ----
}
! public float readFloat_32() throws IOException {
/*Reviens a faire readInt_32().
Ne pas utiliser cette méthode car fausse l'incrementation de
FortranBinaryInputStream*/
! int temp= _readInt_32();
return Float.intBitsToFloat(temp);
}
! public double readFloat_64() throws IOException {
/*Reviens a faire readInt_64().
Ne pas utiliser cette méthode car fausse l'incrementation de
FortranBinaryInputStream*/
! long temp= _readInt_64();
return Double.longBitsToDouble(temp);
}
|
|
From: <de...@us...> - 2003-09-02 08:42:51
|
Update of /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/reflux/io
In directory sc8-pr-cvs1:/tmp/cvs-serv9006/reflux/io
Modified Files:
INPAdapter.java INPFileFormat.java INPReader.java
INPWriter.java
Log Message:
Correction bug 797184
Amelioration lecture format reflux/telemac
Index: INPAdapter.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/reflux/io/INPAdapter.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** INPAdapter.java 22 Aug 2003 15:51:12 -0000 1.5
--- INPAdapter.java 2 Sep 2003 08:41:24 -0000 1.6
***************
*** 34,39 ****
private boolean isVentLecturePasDeTemps_;
private boolean isRadiationsLecturePasDeTemps_;
! private int nbPNTransitoires_;
! private int nbCLTransitoires_;
private String version_;
// public H2dParametresCalculReflux parametresCalcul_;
--- 34,39 ----
private boolean isVentLecturePasDeTemps_;
private boolean isRadiationsLecturePasDeTemps_;
! // private int nbPNTransitoires_;
! // private int nbCLTransitoires_;
private String version_;
// public H2dParametresCalculReflux parametresCalcul_;
***************
*** 56,71 ****
! public void setNbPNTransitoires(int _i)
! {
! if(_i>0)
! nbPNTransitoires_=_i;
! }
!
! public void setNbCLTransitoires(int _i)
! {
! if(_i>0)
! nbCLTransitoires_=_i;
! }
!
--- 56,71 ----
! // public void setNbPNTransitoires(int _i)
! // {
! // if(_i>0)
! // nbPNTransitoires_=_i;
! // }
! //
! // public void setNbCLTransitoires(int _i)
! // {
! // if(_i>0)
! // nbCLTransitoires_=_i;
! // }
! //
***************
*** 175,190 ****
* @return
*/
! public int getNbCLTransitoires()
! {
! return nbCLTransitoires_;
! }
!
! /**
! * @return
! */
! public int getNbPNTransitoires()
! {
! return nbPNTransitoires_;
! }
/**
--- 175,190 ----
* @return
*/
! // public int getNbCLTransitoires()
! // {
! // return nbCLTransitoires_;
! // }
! //
! // /**
! // * @return
! // */
! // public int getNbPNTransitoires()
! // {
! // return nbPNTransitoires_;
! // }
/**
Index: INPFileFormat.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/reflux/io/INPFileFormat.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** INPFileFormat.java 22 Aug 2003 15:51:12 -0000 1.5
--- INPFileFormat.java 2 Sep 2003 08:41:24 -0000 1.6
***************
*** 18,21 ****
--- 18,22 ----
import org.fudaa.dodico.corba.tr.LTrSchemaResolution;
+ import org.fudaa.dodico.commun.DodicoLib;
import org.fudaa.dodico.commun.ProgressionInterface;
import org.fudaa.dodico.dico.DicoCasFileFormat;
***************
*** 28,39 ****
import org.fudaa.dodico.dico.DicoManager;
import org.fudaa.dodico.fichiers.FileFormatSoftware;
- import org.fudaa.dodico.fichiers.FileFormatVersion;
import org.fudaa.dodico.fichiers.FileOperationSynthese;
import org.fudaa.dodico.fichiers.FileReadOperationAbstract;
import org.fudaa.dodico.fichiers.FileWriteOperationAbstract;
import org.fudaa.dodico.h2d.type.H2dBordType;
import org.fudaa.dodico.h2d.type.H2dClType;
import org.fudaa.dodico.h2d.type.H2dFileFormatType;
! import org.fudaa.dodico.h2d.reflux.H2dRefluxDicoModel;
/**
--- 29,40 ----
import org.fudaa.dodico.dico.DicoManager;
import org.fudaa.dodico.fichiers.FileFormatSoftware;
import org.fudaa.dodico.fichiers.FileOperationSynthese;
import org.fudaa.dodico.fichiers.FileReadOperationAbstract;
import org.fudaa.dodico.fichiers.FileWriteOperationAbstract;
+ import org.fudaa.dodico.h2d.reflux.H2dRefluxDicoModel;
import org.fudaa.dodico.h2d.type.H2dBordType;
import org.fudaa.dodico.h2d.type.H2dClType;
import org.fudaa.dodico.h2d.type.H2dFileFormatType;
! import org.fudaa.dodico.h2d.type.H2dVariableType;
/**
***************
*** 73,87 ****
}
! private String[] schemaResolution_=
! { "STATIONNAIRE", "EULER", "LAXWEN", "SELUMP" };
! private String[] methodeResolution_=
! {
! "LINEAIRE",
! "NEWTON",
! "NEWTON_BCD",
! "NEWTON_LMG",
! "SELUMP",
! "SELUMP_BCD",
! "LAXWEN" };
public H2dClType getClType(int _id) {
--- 74,104 ----
}
! public String getClTransitoireFileExtension() {
! return CLTransitoireFileFormat.getInstance().getExtensions()[0];
! }
!
! public String getPnTransitoireFileExtension() {
! return PnTransitoireFileFormat.getInstance().getExtensions()[0];
! }
!
! public String getSolutionInitFileExtension() {
! return ".siv";
! }
!
! public String getSolutionFileExtension() {
! return ".sov";
! }
!
! public String getSolutionFinaleExtension() {
! return ".sfv";
! }
!
! public String getCLTransitoireFichier(String[] _f) {
! return DodicoLib.findStringEndWith(_f, getClTransitoireFileExtension());
! }
!
! public String getPnTransitoireFichier(String[] _f) {
! return DodicoLib.findStringEndWith(_f, getPnTransitoireFileExtension());
! }
public H2dClType getClType(int _id) {
***************
*** 95,98 ****
--- 112,135 ----
}
+ public int getCode(H2dClType _t) {
+ if (_t == H2dClType.LIBRE)
+ return getCodeLibre();
+ else if (_t == H2dClType.PERMANENT)
+ return getCodePermanent();
+ else if (_t == H2dClType.TRANSITOIRE)
+ return getCodeTransitoire();
+ return -1;
+ }
+
+ public int getPositionForCond(H2dVariableType _v) {
+ if (_v == H2dVariableType.VITESSE_U)
+ return 0;
+ else if (_v == H2dVariableType.VITESSE_V)
+ return 1;
+ else if (_v == H2dVariableType.COTE_EAU)
+ return 2;
+ return -1;
+ }
+
public H2dBordType getBordType(int _id) {
if (_id == getCodeBordLiquide())
***************
*** 105,108 ****
--- 142,156 ----
}
+ public int getBordTypeId(H2dBordType _id) {
+ if (_id == H2dBordType.LIQUIDE)
+ return getCodeBordLiquide();
+ else if (_id == H2dBordType.LIQUIDE_DEBIT_IMPOSE)
+ return getCodeBordLiquideDebit();
+ else if (
+ (_id == H2dBordType.SOLIDE) || (_id == H2dBordType.SOLIDE_FROTTEMENT))
+ return getCodeBordSolideFrottement();
+ return -1;
+ }
+
/**
* Renvoie, a partir de la chaine _s lue dans un fichier inp, le
***************
*** 160,163 ****
--- 208,215 ----
}
+ public int[] getFLUTNBPasTemps() {
+ return new int[] { 10 };
+ }
+
public int[] getFLUTSchemaResolutionFormat() {
return new int[] { 20, 10, 10 };
***************
*** 175,178 ****
--- 227,233 ----
return "COEFFICIENTS";
}
+ public String getFLUTImpression() {
+ return "IMPRESSION";
+ }
public int[] getFLUTFreqImpressionFormat() {
***************
*** 180,190 ****
}
! public String[] getFLUTSchemaResolution() {
! return schemaResolution_;
! }
!
! public String[] getFLUTMethodeResolution() {
! return methodeResolution_;
! }
public String getIMPRESSION() {
--- 235,245 ----
}
! // public String[] getFLUTSchemaResolution() {
! // return schemaResolution_;
! // }
! //
! // public String[] getFLUTMethodeResolution() {
! // return methodeResolution_;
! // }
public String getIMPRESSION() {
***************
*** 212,225 ****
}
public int getDLPNDllPointExtremite() {
return 3;
} /**
! * Renvoie le format concernant la ligne declarant le bloc Coor.
! */
public int[] getCOORFormat() {
return new int[] { 5, 15, 5, 5 };
} /**
! * Renvoie le format concernant les lignes declarant les coordonnées.
! */
public int[] getTroisDoubleFormat() {
return new int[] { 10, 10, 10 };
--- 267,284 ----
}
+ public int getDLPNDllPointMilieu() {
+ return 2;
+ }
+
public int getDLPNDllPointExtremite() {
return 3;
} /**
! * Renvoie le format concernant la ligne declarant le bloc Coor.
! */
public int[] getCOORFormat() {
return new int[] { 5, 15, 5, 5 };
} /**
! * Renvoie le format concernant les lignes declarant les coordonnées.
! */
public int[] getTroisDoubleFormat() {
return new int[] { 10, 10, 10 };
***************
*** 230,233 ****
--- 289,296 ----
}
+ public int[] getPRNDFormat() {
+ return new int[] { 5, 15, 5 };
+ }
+
public String getDLPN() {
return "DLPN";
***************
*** 290,293 ****
--- 353,360 ----
}
+ public int[] getBlocSimpleFormat() {
+ return new int[] { 5 };
+ }
+
public String getELEM() {
return "ELEM";
***************
*** 346,349 ****
--- 413,420 ----
}
+ public int getCodeFond() {
+ return 5;
+ }
+
public int getCodeBordLiquide() {
return 6;
***************
*** 358,377 ****
}
! public DicoEntite getCoefContribution(int _index) {
String rubrique= "Coefficients contribution";
DicoEntiteList entites= getRefluxModel().getEntites();
! if (entiteContrib_ == null) {
! List l= new ArrayList(18);
! DicoEntite ent;
! for (Iterator it= entites.iterator(); it.hasNext();) {
! ent= (DicoEntite)it.next();
! if (rubrique.equals(ent.getRubrique())) {
! l.add(ent);
! }
}
- Collections.sort(l, DicoEntiteGenerate.getComparatorIndex());
- entiteContrib_= new DicoEntite[l.size()];
- l.toArray(entiteContrib_);
}
if (_index < 0 || _index >= entiteContrib_.length) {
System.out.println(
--- 429,457 ----
}
! private void buildListContribution() {
String rubrique= "Coefficients contribution";
+ List l= new ArrayList(18);
+ DicoEntite ent;
DicoEntiteList entites= getRefluxModel().getEntites();
! for (Iterator it= entites.iterator(); it.hasNext();) {
! ent= (DicoEntite)it.next();
! if (rubrique.equals(ent.getRubrique())) {
! l.add(ent);
}
}
+ Collections.sort(l, DicoEntiteGenerate.getComparatorIndex());
+ entiteContrib_= new DicoEntite[l.size()];
+ l.toArray(entiteContrib_);
+ }
+
+ public int getCoefContributionNb() {
+ if (entiteContrib_ == null)
+ buildListContribution();
+ return entiteContrib_.length;
+ }
+
+ public DicoEntite getCoefContribution(int _index) {
+ if (entiteContrib_ == null)
+ buildListContribution();
if (_index < 0 || _index >= entiteContrib_.length) {
System.out.println(
***************
*** 396,399 ****
--- 476,493 ----
}
+ public CLVReader createCLVReader() {
+ return CLTransitoireFileFormat
+ .getInstance()
+ .getLastVersionImpl()
+ .createCLVReader();
+ }
+
+ public CLVWriter createCLVWriter() {
+ return CLTransitoireFileFormat
+ .getInstance()
+ .getLastVersionImpl()
+ .createCLVWriter();
+ }
+
/**
*
***************
*** 403,415 ****
}
public INPReader createINPReader() {
return new INPReader(this);
}
/**
*
*/
public FileWriteOperationAbstract createWriter() {
! return null;
}
--- 497,523 ----
}
+ public INPWriter createINPWriter() {
+ return new INPWriter(this);
+ }
+
public INPReader createINPReader() {
return new INPReader(this);
}
+ public FileOperationSynthese write(
+ File _f,
+ INPInterface _inter,
+ ProgressionInterface _prog) {
+ INPWriter w= createINPWriter();
+ w.setFile(_f);
+ w.setProgressReceiver(_prog);
+ return w.write(_inter);
+ }
+
/**
*
*/
public FileWriteOperationAbstract createWriter() {
! return new INPWriter(this);
}
Index: INPReader.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/reflux/io/INPReader.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** INPReader.java 22 Aug 2003 15:51:12 -0000 1.6
--- INPReader.java 2 Sep 2003 08:41:24 -0000 1.7
***************
*** 14,21 ****
--- 14,23 ----
import java.io.EOFException;
+ import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
+ import java.util.StringTokenizer;
[...1259 lines suppressed...]
! + clFile.getAbsolutePath());
! } else {
! CLVReader pnvr= version_.createCLVReader();
! H2dEvolutionMutable[] evols= new H2dEvolutionMutable[evolsPN.size()];
! evolsPN.toArray(evols);
! pnvr.setEvolutions(evols);
! pnvr.setFile(clFile);
! pnvr.setProgressReceiver(progress_);
! FileOperationSynthese s= pnvr.read();
! analyze_.merge(s.getAnalyze());
}
}
! return projet;
}
! public void setFile(File _f) {
! super.setFile(_f);
! baseFile_= _f.getAbsoluteFile().getParentFile().getAbsolutePath();
! ficName_= DodicoLib.getSansExtension(_f.getName());
}
Index: INPWriter.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/reflux/io/INPWriter.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** INPWriter.java 22 Aug 2003 15:51:12 -0000 1.4
--- INPWriter.java 2 Sep 2003 08:41:24 -0000 1.5
***************
*** 9,15 ****
package org.fudaa.dodico.reflux.io;
! import org.fudaa.dodico.fichiers.FileFormat;
! import org.fudaa.dodico.fichiers.FileOpWriterCharSimpleAbstract;
! import org.fudaa.dodico.fichiers.FileReadOperationAbstract;
/**
--- 9,49 ----
package org.fudaa.dodico.reflux.io;
[...1097 lines suppressed...]
+ String ficPn= version_.getPnTransitoireFichier(_inter.getFichiers());
+ if (ficPn == null) {
+ analyze_.addError(
+ DodicoLib.geti18n(
+ "Le fichier des proprietes nodales transitoires est introuvable( données non enregistrées)"));
+ }
+ else{
+ File fic=new File(baseDir_,ficPn);
+ System.out.println("ecriture "+fic.getAbsolutePath());
+ H2dEvolution[] evols=new H2dEvolution[pnTransitoireCourbeList.size()];
+ pnTransitoireCourbeList.toArray(evols);
+ CLVWriter w=version_.createCLVWriter();
+ analyze_.merge(w.write(evols,fic,progress_).getAnalyze());
+ }
+ }
+
+
+ }
}
|
|
From: <de...@us...> - 2003-09-02 08:42:51
|
Update of /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/test/telemac
In directory sc8-pr-cvs1:/tmp/cvs-serv9006/test/telemac
Modified Files:
TestCas.java
Log Message:
Correction bug 797184
Amelioration lecture format reflux/telemac
Index: TestCas.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/test/telemac/TestCas.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** TestCas.java 22 Aug 2003 15:51:13 -0000 1.4
--- TestCas.java 2 Sep 2003 08:41:25 -0000 1.5
***************
*** 64,68 ****
DicoCasInterface inter=getInter(fic_);
File tmpFile=createTempFile();
! FileOperationSynthese syntheseR=Telemac2dFileFormat.getInstance().getLastVersionImpl().writeMaillage(tmpFile, inter,null);
assertFalse(syntheseR.containsMessages());
_interfaceTest(getInter(tmpFile));
--- 64,68 ----
DicoCasInterface inter=getInter(fic_);
File tmpFile=createTempFile();
! FileOperationSynthese syntheseR=Telemac2dFileFormat.getInstance().getLastVersionImpl().write(tmpFile, inter,null);
assertFalse(syntheseR.containsMessages());
_interfaceTest(getInter(tmpFile));
|
|
From: <de...@us...> - 2003-09-02 08:42:50
|
Update of /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/telemac/io
In directory sc8-pr-cvs1:/tmp/cvs-serv9006/telemac/io
Modified Files:
TelemacLiquideReader.java
Log Message:
Correction bug 797184
Amelioration lecture format reflux/telemac
Index: TelemacLiquideReader.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/telemac/io/TelemacLiquideReader.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** TelemacLiquideReader.java 22 Aug 2003 15:51:13 -0000 1.5
--- TelemacLiquideReader.java 2 Sep 2003 08:41:24 -0000 1.6
***************
*** 18,21 ****
--- 18,22 ----
import org.fudaa.dodico.fichiers.FileOpReadCharSimpleAbstract;
import org.fudaa.dodico.h2d.H2dEvolutionFrontiereLiquide;
+ import org.fudaa.dodico.h2d.H2dEvolutionFrontiereLiquideMutable;
import org.fudaa.dodico.h2d.type.H2dVariableType;
***************
*** 48,52 ****
}
inter = new TelemacLiquideAbstract();
! H2dEvolutionFrontiereLiquide[] evols = null;
in_.setJumpBlankLine(true);
in_.setCommentInOneField(version_.getCommentChar());
--- 49,53 ----
}
inter = new TelemacLiquideAbstract();
! H2dEvolutionFrontiereLiquideMutable[] evols = null;
in_.setJumpBlankLine(true);
in_.setCommentInOneField(version_.getCommentChar());
***************
*** 69,73 ****
{
! evols = new H2dEvolutionFrontiereLiquide[nbValue];
//values = new FuVectordouble[nbValue];
for (int i = 0; i < nbValue; i++)
--- 70,74 ----
{
! evols = new H2dEvolutionFrontiereLiquideMutable[nbValue];
//values = new FuVectordouble[nbValue];
for (int i = 0; i < nbValue; i++)
***************
*** 90,94 ****
{
itemp=Integer.parseInt(stemp.substring(indexPar + 1, indexParFermante));
! evols[i] = new H2dEvolutionFrontiereLiquide(var,itemp);
}
}
--- 91,95 ----
{
itemp=Integer.parseInt(stemp.substring(indexPar + 1, indexParFermante));
! evols[i] = new H2dEvolutionFrontiereLiquideMutable(var,itemp);
}
}
|