Update of /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/telemac
In directory sc8-pr-cvs1:/tmp/cvs-serv7810/tr/telemac
Modified Files:
TrDicoProjet.java TrTelemacImplHelper.java
TrTelemacParametres.java TrTelemacProjet.java
Added Files:
TrTelemacExport.java TrTelemacFilleVisu.java
Log Message:
tr: ajout de l'export pour le maillage
gestion affichage maillage
commun modif mineure
--- NEW FILE: TrTelemacExport.java ---
(This appears to be a binary file; contents omitted.)
--- NEW FILE: TrTelemacFilleVisu.java ---
(This appears to be a binary file; contents omitted.)
Index: TrDicoProjet.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/telemac/TrDicoProjet.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** TrDicoProjet.java 19 Aug 2003 07:48:40 -0000 1.3
--- TrDicoProjet.java 22 Aug 2003 16:02:24 -0000 1.4
***************
*** 15,18 ****
--- 15,19 ----
import org.fudaa.dodico.dico.DicoCasFileFormatVersion;
import org.fudaa.dodico.fichiers.FileFormatSoftware;
+ import org.fudaa.dodico.telemac.io.TelemacDicoFileFormat;
import org.fudaa.fudaa.dico.FDicoParams;
***************
*** 65,69 ****
public String getID()
{
! return FileFormatSoftware.DICO_IS.name;
}
--- 66,70 ----
public String getID()
{
! return TelemacDicoFileFormat.DICO_PROJET_ID;
}
Index: TrTelemacImplHelper.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/telemac/TrTelemacImplHelper.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** TrTelemacImplHelper.java 19 Aug 2003 07:48:40 -0000 1.4
--- TrTelemacImplHelper.java 22 Aug 2003 16:02:26 -0000 1.5
***************
*** 17,24 ****
--- 17,27 ----
import org.fudaa.dodico.dico.DicoCasFileFormat;
import org.fudaa.dodico.dico.DicoCasFileFormatVersion;
+ import org.fudaa.dodico.dico.DicoLanguage;
import org.fudaa.dodico.dico.DicoModelAbstract;
import org.fudaa.dodico.fichiers.FileFormatSoftware;
+ import org.fudaa.dodico.reflux.io.INPFileFormat;
import org.fudaa.dodico.telemac.TelemacDicoManager;
import org.fudaa.dodico.telemac.io.Telemac2dFileFormat;
+ import org.fudaa.dodico.telemac.io.TelemacDicoFileFormat;
import org.fudaa.fudaa.dico.FDicoChooserPanel;
***************
*** 31,93 ****
* @version $Id$
*/
! public class TrTelemacImplHelper extends TrImplHelper
! {
! public TrTelemacImplHelper(TrImplementation _impl)
! {
super(_impl);
}
! public void ouvrir(File _f)
! {
_ouvrir(_f);
}
! public void ouvrir()
! {
! final File fic = impl_.ouvrirFileChooser(null, "Télémac Fichier cas");
! if (fic != null)
! {
_ouvrir(fic);
}
}
! private void _ouvrir(final File _fic)
! {
! if (_fic != null)
! {
! new BuTaskOperation(impl_, "import fichier cas")
! {
! public void act()
! {
! TrTelemacProjet projet =
! TrTelemacProjet.init(
! _fic,
! (Telemac2dFileFormat.TelemacVersion)Telemac2dFileFormat.getInstance().getLastVersionImpl(),
! new ProgressionBuAdapter(this),
! getImpl());
! setProgression(90);
! if (projet != null)
! {
! getImpl().addProjet(projet);
}
}
}
- .start();
}
! }
! public void ouvrirDico()
! {
! FDicoChooserPanel s=new FDicoChooserPanel(TelemacDicoManager.getINSTANCE());
! int r = s.afficheModale(impl_.getFrame(), "Choix fichier dico");
! if (s.isOkResponse(r))
! {
! _ouvrir(
s.getSelectedFile(),
! s.getFileFormatSelected(),
! s.getVersionSelected(),
! s.getLanguageSelected());
}
--- 34,93 ----
* @version $Id$
*/
! public class TrTelemacImplHelper extends TrImplHelper {
! public TrTelemacImplHelper(TrImplementation _impl) {
super(_impl);
}
! public void ouvrir(File _f) {
_ouvrir(_f);
}
! public void ouvrir() {
! final File fic= impl_.ouvrirFileChooser(null, "Télémac Fichier cas");
! if (fic != null) {
_ouvrir(fic);
}
}
! private void _ouvrir(final File _fic) {
! _ouvrir(_fic,DicoLanguage.getCurrentID());
! }
!
! private void _ouvrir(final File _fic,final int _language) {
! if (_fic != null) {
! new BuTaskOperation(impl_, "import fichier cas") {
! public void act() {
! TrTelemacProjet projet=
! TrTelemacProjet.init(
! _fic,
! (Telemac2dFileFormat.TelemacVersion)Telemac2dFileFormat
! .getInstance()
! .getLastVersionImpl(_language),
! new ProgressionBuAdapter(this),
! getImpl());
! setProgression(90);
! if (projet != null) {
! getImpl().addProjet(projet);
! }
}
}
+ .start();
}
}
!
!
! public void ouvrirDico() {
! FDicoChooserPanel s=
! new FDicoChooserPanel(TelemacDicoManager.getINSTANCE());
! int r= s.afficheModale(impl_.getFrame(), "Choix fichier dico");
! if (s.isOkResponse(r)) {
! _ouvrir(
s.getSelectedFile(),
! s.getFileFormatSelected(),
! s.getVersionSelected(),
! s.getLanguageSelected());
}
***************
*** 99,125 ****
final DicoCasFileFormat _ft,
final String _v,
! final int _language)
! {
! if (_fic != null)
! {
! new BuTaskOperation(impl_, "import fichier cas pour " + _ft.getName())
! {
! public void act()
! {
! DicoCasFileFormatVersion version=_ft.getVersionImpl(_v,_language);
!
! DicoModelAbstract m =_ft.getLastVersionImpl().getDico();
if (m == null)
getImpl().error(
"INTERNE Impossible de créer le modele du dictionnaire");
! else
! {
! TrDicoProjet projet = TrDicoProjet.init(_fic,version,new ProgressionBuAdapter(this), getImpl());
! setProgression(90);
! if (projet != null)
! {
! getImpl().addProjet(projet);
! }
}
}
}
--- 99,127 ----
final DicoCasFileFormat _ft,
final String _v,
! final int _language) {
! if (_fic != null) {
! if(_ft==Telemac2dFileFormat.getInstance()){
! _ouvrir(_fic, _language);
! return;
! }
! new BuTaskOperation(impl_, "import fichier cas pour " + _ft.getName()) {
! public void act() {
! DicoCasFileFormatVersion version= _ft.getVersionImpl(_v, _language);
! DicoModelAbstract m= version.getDico();
if (m == null)
getImpl().error(
"INTERNE Impossible de créer le modele du dictionnaire");
! else {
! TrDicoProjet projet=
! TrDicoProjet.init(
! _fic,
! version,
! new ProgressionBuAdapter(this),
! getImpl());
! setProgression(90);
! if (projet != null) {
! getImpl().addProjet(projet);
}
+ }
}
}
***************
*** 131,136 ****
*
*/
! public String getID()
! {
return FileFormatSoftware.TELEMAC_IS.name;
}
--- 133,137 ----
*
*/
! public String getSoftwareID() {
return FileFormatSoftware.TELEMAC_IS.name;
}
***************
*** 139,151 ****
*
*/
! public BuMenuItem[] getMenuItemsOuvrir()
! {
! BuMenuItem r0 = new BuMenuItem("Projet dico");
! r0.setActionCommand(impl_.PREF_OUVRIR + FileFormatSoftware.TELEMAC_IS.name);
! BuMenuItem r =
new BuMenuItem(
FudaaResource.FUDAA.getToolIcon("appli/reflux"),
"Projet Reflux");
! r.setActionCommand(impl_.PREF_OUVRIR + FileFormatSoftware.TELEMAC_IS.name);
return new BuMenuItem[] { r0, r };
}
--- 140,153 ----
*
*/
! public BuMenuItem[] getMenuItemsOuvrir() {
! BuMenuItem r0= new BuMenuItem("Projet dico");
! r0.setActionCommand(
! impl_.PREF_OUVRIR
! + TelemacDicoFileFormat.DICO_PROJET_ID);
! BuMenuItem r=
new BuMenuItem(
FudaaResource.FUDAA.getToolIcon("appli/reflux"),
"Projet Reflux");
! r.setActionCommand(impl_.PREF_OUVRIR + FileFormatSoftware.REFLUX_IS.name);
return new BuMenuItem[] { r0, r };
}
Index: TrTelemacParametres.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/telemac/TrTelemacParametres.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** TrTelemacParametres.java 19 Aug 2003 07:48:40 -0000 1.4
--- TrTelemacParametres.java 22 Aug 2003 16:02:26 -0000 1.5
***************
*** 12,24 ****
import java.util.Map;
import org.fudaa.dodico.commun.ProgressionInterface;
import org.fudaa.dodico.dico.DicoCasFileFormatVersion;
import org.fudaa.dodico.dico.DicoCasInterface;
import org.fudaa.dodico.dico.DicoEntiteFile;
- import org.fudaa.dodico.dunes.io.DunesInterface;
import org.fudaa.dodico.fichiers.FileOperationSynthese;
import org.fudaa.dodico.h2d.H2dMaillage;
import org.fudaa.dodico.h2d.H2dParametres;
! import org.fudaa.dodico.reflux.io.CorEleBthInterface;
import org.fudaa.dodico.telemac.io.SerafinInterface;
import org.fudaa.dodico.telemac.io.Telemac2dFileFormat;
--- 12,26 ----
import java.util.Map;
+ import com.memoire.bu.BuMainPanel;
+
import org.fudaa.dodico.commun.ProgressionInterface;
import org.fudaa.dodico.dico.DicoCasFileFormatVersion;
import org.fudaa.dodico.dico.DicoCasInterface;
import org.fudaa.dodico.dico.DicoEntiteFile;
import org.fudaa.dodico.fichiers.FileOperationSynthese;
import org.fudaa.dodico.h2d.H2dMaillage;
import org.fudaa.dodico.h2d.H2dParametres;
! import org.fudaa.dodico.h2d.telemac.H2dTelemacParametres;
! import org.fudaa.dodico.telemac.io.SerafinAdapter;
import org.fudaa.dodico.telemac.io.SerafinInterface;
import org.fudaa.dodico.telemac.io.Telemac2dFileFormat;
***************
*** 27,33 ****
import org.fudaa.dodico.telemac.io.TelemacLiquideInterface;
- import org.fudaa.fudaa.commun.FudaaUI;
import org.fudaa.fudaa.dico.FDicoParams;
import org.fudaa.fudaa.tr.TrLib;
/**
--- 29,37 ----
import org.fudaa.dodico.telemac.io.TelemacLiquideInterface;
import org.fudaa.fudaa.dico.FDicoParams;
+ import org.fudaa.fudaa.tr.TrImplementation;
import org.fudaa.fudaa.tr.TrLib;
+ import org.fudaa.fudaa.tr.TrParametres;
+ import org.fudaa.fudaa.tr.TrThreadListener;
/**
***************
*** 35,48 ****
* @version $Id$
*/
! public class TrTelemacParametres extends FDicoParams implements H2dParametres{
! H2dMaillage maillage_;
protected TrTelemacParametres(
File _file,
DicoCasFileFormatVersion _ft,
! Map _initialSetValues,
! long _timeloaded) {
! super(_file, _ft, _initialSetValues, _timeloaded);
}
--- 39,53 ----
* @version $Id$
*/
! public class TrTelemacParametres extends FDicoParams implements TrParametres {
! H2dTelemacParametres params_;
! boolean geometrieLoaded_;
! boolean allLoaded_;
protected TrTelemacParametres(
File _file,
DicoCasFileFormatVersion _ft,
! Map _initialSetValues) {
! super(_file, _ft, _initialSetValues);
}
***************
*** 51,59 ****
Telemac2dFileFormat.TelemacVersion _ft,
ProgressionInterface _progress,
! FudaaUI _ui) {
! FileOperationSynthese op= new FileOperationSynthese();
! DicoCasInterface inter= _ft.readCas(_file, op, _progress);
if (_ui != null)
! _ui.manageErrorOperation(op);
if (inter == null)
return null;
--- 56,64 ----
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;
***************
*** 66,81 ****
}
TrTelemacParametres r=
! new TrTelemacParametres(_file, _ft, inter.getInputs(), op.getOpTime());
r.setUI(_ui);
return r;
}
- public CorEleBthInterface createCorEleBthInterface(ProgressionInterface _prog) {
- CorEleBthInterface r= null;
- if (maillage_ == null)
- loadGeometrie(_prog);
- return r;
- }
-
public boolean isValide() {
return dicoParams_.isValide();
--- 71,79 ----
}
TrTelemacParametres r=
! new TrTelemacParametres(_file, _ft, inter.getInputs());
r.setUI(_ui);
return r;
}
public boolean isValide() {
return dicoParams_.isValide();
***************
*** 90,107 ****
}
! public boolean loadAll(ProgressionInterface _prg) {
! return loadGeometrie(_prg)
! && loadConditionsLimite(_prg)
! && loadConditionsLimiteLiquide(_prg);
}
! public boolean loadGeometrie(ProgressionInterface _prg) {
! if (maillage_ != null) {
ui_.error(
"Maillage deja present",
TrLib.geti18n("Un maillage est déjà présent."));
! return false;
}
-
DicoEntiteFile entFile=
dicoParams_.getFileEntite(
--- 88,135 ----
}
! private void _loadAll(ProgressionInterface _prg) {
! loadGeometrie(_prg);
! loadConditionsLimite(_prg);
! loadConditionsLimiteLiquide(_prg);
!
}
! public void loadGeometrie(ProgressionInterface _prg) {
! loadGeometrie(_prg, null);
! }
!
! public void loadAll(ProgressionInterface _prg) {
! loadAll(_prg, null);
! }
!
! public synchronized void loadGeometrie(
! ProgressionInterface _prg,
! TrThreadListener _th) {
! if (!geometrieLoaded_) {
! _loadGeometrie(_prg);
! geometrieLoaded_= true;
! }
! if (_th != null)
! _th.threadIsFinish();
! }
!
! public synchronized void loadAll(
! ProgressionInterface _prg,
! TrThreadListener _th) {
! if (!allLoaded_) {
! _loadAll(_prg);
! allLoaded_= true;
! }
! if (_th != null)
! _th.threadIsFinish();
! }
!
! public synchronized void _loadGeometrie(ProgressionInterface _prg) {
! if (params_ != null) {
ui_.error(
"Maillage deja present",
TrLib.geti18n("Un maillage est déjà présent."));
! return;
}
DicoEntiteFile entFile=
dicoParams_.getFileEntite(
***************
*** 111,125 ****
"Fichier de maillage",
TrLib.geti18n("Définition du fichier géométrie non trouvée."));
! return false;
}
! FileOperationSynthese op= new FileOperationSynthese();
! SerafinInterface sInter=
getTelemacFileFormatVersion().getDefaultSerafinFormat().read(
getFile(entFile),
- op,
_prg);
! ui_.manageErrorOperation(op);
if (sInter == null)
! return false;
String fond=
getTelemacFileFormatVersion().getDefaultSerafinFormat().getVariableFond();
--- 139,157 ----
"Fichier de maillage",
TrLib.geti18n("Définition du fichier géométrie non trouvée."));
! return;
}
! BuMainPanel pn= ((TrImplementation)ui_).getMainPanel();
! pn.setMessage("Lecture maillage");
! FileOperationSynthese op=
getTelemacFileFormatVersion().getDefaultSerafinFormat().read(
getFile(entFile),
_prg);
! SerafinInterface sInter= (SerafinInterface)op.getSource();
! ui_.manageErrorOperationAndIsFatal(op);
!
if (sInter == null)
! return;
! pn.setProgression(50);
! pn.setMessage("Recherche variable fond");
String fond=
getTelemacFileFormatVersion().getDefaultSerafinFormat().getVariableFond();
***************
*** 128,132 ****
//pour l'instant
ui_.error("Maillage", "bathymétrie non trouvée variable FOND ou es-tu ?");
! return false;
}
int nbPasTemps= sInter.getNbPasDeTemps();
--- 160,164 ----
//pour l'instant
ui_.error("Maillage", "bathymétrie non trouvée variable FOND ou es-tu ?");
! return;
}
int nbPasTemps= sInter.getNbPasDeTemps();
***************
*** 134,148 ****
System.out.println("la variable à t=0 sera prise");
}
! //DEBUG A CONTINUER
! // double[] fondValues = sInter.getDonnees(0, numVariable);
! // projet_.maillage = sInter.getMaillage();
! // return H2dLib.setBathymetrie(projet_.maillage, fondValues);
! maillage_= sInter.getMaillage();
! H2dMaillage.computeBord(maillage_, sInter.getPtsFrontiere(), _prg);
!
! return true;
}
! public boolean loadConditionsLimite(ProgressionInterface _prg) {
DicoEntiteFile entFile=
dicoParams_.getFileEntite(
--- 166,182 ----
System.out.println("la variable à t=0 sera prise");
}
! SerafinAdapter.majFond(sInter, numVariable, 0);
! pn.setProgression(70);
! pn.setMessage("Recherche des bords");
! H2dMaillage.computeBord(
! sInter.getMaillage(),
! sInter.getPtsFrontiere(),
! _prg);
! params_= new H2dTelemacParametres(sInter.getMaillage());
! pn.setProgression(0);
! return;
}
! private boolean loadConditionsLimite(ProgressionInterface _prg) {
DicoEntiteFile entFile=
dicoParams_.getFileEntite(
***************
*** 155,165 ****
return false;
}
! FileOperationSynthese op= new FileOperationSynthese();
! TelemacCLInterface inter=
getTelemacFileFormatVersion().getDefaultTelemacCLFormat().read(
getFile(entFile),
- op,
_prg);
! ui_.manageErrorOperation(op);
if (inter == null)
return false;
--- 189,198 ----
return false;
}
! FileOperationSynthese op=
getTelemacFileFormatVersion().getDefaultTelemacCLFormat().read(
getFile(entFile),
_prg);
! TelemacCLInterface inter= (TelemacCLInterface)op.getSource();
! ui_.manageErrorOperationAndIsFatal(op);
if (inter == null)
return false;
***************
*** 180,184 ****
}
! public boolean loadConditionsLimiteLiquide(ProgressionInterface _prg) {
DicoEntiteFile entFile=
dicoParams_.getFileEntite(
--- 213,217 ----
}
! private boolean loadConditionsLimiteLiquide(ProgressionInterface _prg) {
DicoEntiteFile entFile=
dicoParams_.getFileEntite(
***************
*** 191,201 ****
return false;
}
! FileOperationSynthese op= new FileOperationSynthese();
! TelemacLiquideInterface inter=
getTelemacFileFormatVersion().getDefaultTelemacLiquideFormat().read(
getFile(entFile),
- op,
_prg);
! ui_.manageErrorOperation(op);
if (inter == null)
return false;
--- 224,233 ----
return false;
}
! FileOperationSynthese op=
getTelemacFileFormatVersion().getDefaultTelemacLiquideFormat().read(
getFile(entFile),
_prg);
! TelemacLiquideInterface inter= (TelemacLiquideInterface)op.getSource();
! ui_.manageErrorOperationAndIsFatal(op);
if (inter == null)
return false;
***************
*** 205,209 ****
}
! public boolean loadFond(ProgressionInterface _prg) {
ui_.error("Programme", "non supporté pour l'instant");
return false;
--- 237,241 ----
}
! private boolean loadFond(ProgressionInterface _prg) {
ui_.error("Programme", "non supporté pour l'instant");
return false;
***************
*** 213,218 ****
return getMainFile();
}
-
-
/**
--- 245,248 ----
***************
*** 221,225 ****
*/
public H2dMaillage getMaillage() {
! return maillage_;
}
--- 251,279 ----
*/
public H2dMaillage getMaillage() {
! if (params_ == null)
! return null;
! return params_.getMaillage();
! }
!
! public H2dTelemacParametres getTelemacParametres() {
! return params_;
! }
!
! public H2dParametres getParametres() {
! return getTelemacParametres();
! }
!
! /**
! *
! */
! public boolean isAllLoaded() {
! return allLoaded_;
! }
!
! /**
! *
! */
! 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.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** TrTelemacProjet.java 19 Aug 2003 07:48:40 -0000 1.4
--- TrTelemacProjet.java 22 Aug 2003 16:02:26 -0000 1.5
***************
*** 9,16 ****
package org.fudaa.fudaa.tr.telemac;
import java.io.File;
import org.fudaa.dodico.commun.ProgressionInterface;
- import org.fudaa.dodico.dunes.io.DunesInterface;
import org.fudaa.dodico.fichiers.FileFormatSoftware;
import org.fudaa.dodico.telemac.io.Telemac2dFileFormat;
--- 9,25 ----
package org.fudaa.fudaa.tr.telemac;
+ import java.awt.Dimension;
+ import java.awt.event.ActionEvent;
import java.io.File;
+ import javax.swing.JButton;
+ import javax.swing.JMenuBar;
+
+ import com.memoire.bu.BuButton;
+ import com.memoire.bu.BuResource;
+ import com.memoire.bu.BuTaskOperation;
+
+ import org.fudaa.dodico.commun.ProgressionBuAdapter;
import org.fudaa.dodico.commun.ProgressionInterface;
import org.fudaa.dodico.fichiers.FileFormatSoftware;
import org.fudaa.dodico.telemac.io.Telemac2dFileFormat;
***************
*** 19,25 ****
import org.fudaa.fudaa.dico.FDicoParams;
import org.fudaa.fudaa.dico.FDicoProjetAbstract;
- import org.fudaa.fudaa.tr.TrExport;
import org.fudaa.fudaa.tr.TrImplementation;
import org.fudaa.fudaa.tr.TrProjet;
/**
--- 28,34 ----
import org.fudaa.fudaa.dico.FDicoParams;
import org.fudaa.fudaa.dico.FDicoProjetAbstract;
import org.fudaa.fudaa.tr.TrImplementation;
import org.fudaa.fudaa.tr.TrProjet;
+ import org.fudaa.fudaa.tr.TrThreadListener;
/**
***************
*** 29,32 ****
--- 38,42 ----
public class TrTelemacProjet extends FDicoProjetAbstract implements TrProjet {
TrTelemacParametres params_;
+ TrTelemacFilleVisu visu_;
public TrTelemacProjet(TrTelemacParametres _params, TrImplementation _impl) {
***************
*** 59,62 ****
--- 69,82 ----
}
+ protected void buildEntiteFille() {
+ super.buildEntiteFille();
+ JMenuBar menu= entiteFille_.getJMenuBar();
+ JButton bt= new BuButton("Visualiser");
+ bt.addActionListener(this);
+ bt.setIcon(BuResource.BU.getIcon("voir"));
+ bt.setActionCommand("VOIR");
+ menu.add(bt);
+ }
+
/**
*
***************
*** 72,80 ****
return params_.getFDicoParams();
}
!
/**
*
*/
! public void export(String _actionCommand) {new TrExport(params_).export(_actionCommand);}
}
--- 92,146 ----
return params_.getFDicoParams();
}
!
! private void activeVisu() {
! if (visu_ == null) {
! if (!params_.isAllLoaded()) {
! final TrThreadListener l= new TrThreadListener() {
! public void threadIsFinish() {
! initVisu();
! }
! };
! new BuTaskOperation(getImpl(),"Chargement fichiers"){
! public void act()
! {
! params_.loadAll(new ProgressionBuAdapter(this), l);
! }
! }.start();
! }
! else initVisu();
!
! } else
! getImpl().activateInternalFrame(visu_);
! }
!
! void initVisu() {
! if (visu_ != null)
! return;
! visu_=
! new TrTelemacFilleVisu(
! (TrImplementation)getImpl(),
! params_.getTelemacParametres());
! Dimension dim= getImpl().getMainPanel().getDesktop().getSize();
! visu_.setSize((int) (dim.getWidth() * 0.8), (int) (dim.getHeight() * 0.8));
! visu_.setLocation(10, 10);
! getImpl().addInternalFrame(visu_);
! }
!
/**
*
*/
! public void export(String _actionCommand) {
! new TrTelemacExport(params_).export(_actionCommand);
! }
!
! /**
! *
! */
! public void actionPerformed(ActionEvent e) {
! if ("VOIR".equals(e.getActionCommand())) {
! activeVisu();
! } else
! super.actionPerformed(e);
! }
}
|