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);
}
|