Update of /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/reflux
In directory sc8-pr-cvs1:/tmp/cvs-serv7810/tr/reflux
Modified Files:
TrRefluxImplHelper.java TrRefluxParametres.java
TrRefluxProjet.java
Added Files:
TrRefluxExport.java TrRefluxFilleVisu.java
Log Message:
tr: ajout de l'export pour le maillage
gestion affichage maillage
commun modif mineure
--- NEW FILE: TrRefluxExport.java ---
(This appears to be a binary file; contents omitted.)
--- NEW FILE: TrRefluxFilleVisu.java ---
(This appears to be a binary file; contents omitted.)
Index: TrRefluxImplHelper.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/reflux/TrRefluxImplHelper.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** TrRefluxImplHelper.java 18 Aug 2003 11:54:43 -0000 1.2
--- TrRefluxImplHelper.java 22 Aug 2003 16:02:24 -0000 1.3
***************
*** 11,21 ****
--- 11,25 ----
import java.io.File;
+ import com.memoire.bu.BuMainPanel;
import com.memoire.bu.BuMenuItem;
import com.memoire.bu.BuTaskOperation;
+ import org.fudaa.dodico.commun.DodicoLib;
import org.fudaa.dodico.commun.DodicoPreferences;
import org.fudaa.dodico.commun.ProgressionBuAdapter;
import org.fudaa.dodico.fichiers.FileFormatSoftware;
import org.fudaa.dodico.reflux.io.INPFileFormat;
+ import org.fudaa.dodico.telemac.io.Telemac2dFileFormat;
+ import org.fudaa.dodico.telemac.io.TelemacDicoFileFormat;
import org.fudaa.fudaa.commun.exec.FudaaExecServerManager;
***************
*** 23,28 ****
import org.fudaa.fudaa.tr.TrImplHelper;
import org.fudaa.fudaa.tr.TrImplementation;
import org.fudaa.fudaa.tr.TrPreferences;
- import org.fudaa.fudaa.tr.TrProjet;
/**
--- 27,32 ----
import org.fudaa.fudaa.tr.TrImplHelper;
import org.fudaa.fudaa.tr.TrImplementation;
+ import org.fudaa.fudaa.tr.TrLib;
import org.fudaa.fudaa.tr.TrPreferences;
/**
***************
*** 30,75 ****
* @version $Id$
*/
! public class TrRefluxImplHelper extends TrImplHelper
! {
! public static FudaaExecServerManager SERVEURS= new FudaaExecServerManager(TrPreferences.TR, DodicoPreferences.buildPrefKey(FileFormatSoftware.REFLUX_IS.name,TrPreferences.KEY_SERVEUR_PREFIXE));
! public TrRefluxImplHelper(TrImplementation _impl)
! {
super(_impl);
}
! public void ouvrir(File _f)
! {
_ouvrir(_f);
}
-
-
! public void ouvrir()
! {
! final File fic = impl_.ouvrirFileChooser(null, "Reflux Fichier inp");
! if (fic != null)
! {
_ouvrir(fic);
}
}
! public BuMenuItem[] getMenuItemsOuvrir()
! {
! BuMenuItem r =
! new BuMenuItem(FudaaResource.FUDAA.getToolIcon("appli/telemac"), "Projet Télémac");
! r.setActionCommand(impl_.PREF_OUVRIR + FileFormatSoftware.TELEMAC_IS.name);
! return new BuMenuItem[]{r};
}
! private void _ouvrir(final File _fic)
! {
! if (_fic != null)
! {
! new BuTaskOperation(impl_, "import fichier cas")
! {
! public void act()
! {
! TrRefluxProjet projet =
TrRefluxProjet.init(
_fic,
--- 34,79 ----
* @version $Id$
*/
! public class TrRefluxImplHelper extends TrImplHelper {
! public static FudaaExecServerManager SERVEURS=
! new FudaaExecServerManager(
! TrPreferences.TR,
! DodicoPreferences.buildPrefKey(
! FileFormatSoftware.REFLUX_IS.name,
! TrPreferences.KEY_SERVEUR_PREFIXE));
! public TrRefluxImplHelper(TrImplementation _impl) {
super(_impl);
}
! public void ouvrir(File _f) {
_ouvrir(_f);
}
! public void ouvrir() {
! final File fic= impl_.ouvrirFileChooser(null, "Reflux Fichier inp");
! if (fic != null) {
_ouvrir(fic);
}
}
! public BuMenuItem[] getMenuItemsOuvrir() {
! BuMenuItem r0=
! new BuMenuItem(
! FudaaResource.FUDAA.getToolIcon("appli/telemac"),
! "Projet Télémac");
! r0.setActionCommand(impl_.PREF_OUVRIR + FileFormatSoftware.TELEMAC_IS.name);
! BuMenuItem r= new BuMenuItem(null, "Projet Dico");
! r.setActionCommand(
! impl_.PREF_OUVRIR + TelemacDicoFileFormat.DICO_PROJET_ID);
! return new BuMenuItem[] { r0, r };
}
! private void _ouvrir(final File _fic) {
! if (_fic != null) {
! new BuTaskOperation(impl_, "import fichier inp") {
! public void act() {
! BuMainPanel mp= getImpl().getMainPanel();
! mp.setMessage(TrLib.geti18n("Ouverture projet"));
! TrRefluxProjet projet=
TrRefluxProjet.init(
_fic,
***************
*** 77,85 ****
new ProgressionBuAdapter(this),
getImpl());
! setProgression(90);
! if (projet != null)
! {
getImpl().addProjet(projet);
}
}
}
--- 81,94 ----
new ProgressionBuAdapter(this),
getImpl());
! mp.setProgression(60);
! this.setName(DodicoLib.EMPTY_STRING);
! this.setProgression(0);
! mp.setMessage(TrLib.geti18n("Affichage ..."));
! if (projet != null) {
getImpl().addProjet(projet);
}
+ mp.setMessage(DodicoLib.EMPTY_STRING);
+ mp.setProgression(0);
+
}
}
***************
*** 91,96 ****
*
*/
! public String getID()
! {
return FileFormatSoftware.REFLUX_IS.name;
}
--- 100,104 ----
*
*/
! public String getSoftwareID() {
return FileFormatSoftware.REFLUX_IS.name;
}
***************
*** 99,104 ****
*
*/
! public FudaaExecServerManager getServersMng()
! {
return SERVEURS;
}
--- 107,111 ----
*
*/
! public FudaaExecServerManager getServersMng() {
return SERVEURS;
}
Index: TrRefluxParametres.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/reflux/TrRefluxParametres.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** TrRefluxParametres.java 19 Aug 2003 07:48:40 -0000 1.3
--- TrRefluxParametres.java 22 Aug 2003 16:02:24 -0000 1.4
***************
*** 11,14 ****
--- 11,15 ----
import java.io.File;
+ import org.fudaa.dodico.commun.DodicoAnalyze;
import org.fudaa.dodico.commun.DodicoLib;
import org.fudaa.dodico.commun.ProgressionInterface;
***************
*** 17,24 ****
--- 18,28 ----
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;
/**
***************
*** 26,46 ****
* @version $Id$
*/
! public class TrRefluxParametres implements H2dParametres
! {
File fINP_;
String title_;
! FudaaUI ui_;
! DicoParams dicoParam_;
! H2dMaillage maillage_;
/**
*
*/
! private TrRefluxParametres()
! {
super();
-
}
public final static TrRefluxParametres init(
--- 30,51 ----
* @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(
***************
*** 48,88 ****
INPFileFormat.INPVersion _ft,
ProgressionInterface _progress,
! FudaaUI _ui)
! {
! FileOperationSynthese synt=new FileOperationSynthese();
! INPInterface inter=_ft.read(_f, synt, _progress);
! if(_ui!=null) _ui.manageErrorOperation(synt);
! if(inter==null) return null;
! TrRefluxParametres r = new TrRefluxParametres();
! r.ui_ = _ui;
! r.fINP_ = _f;
! String s = _f.getName();
! int i = s.indexOf('.');
if (i > 0)
! s = s.substring(0, i);
! r.title_ = s;
! r.dicoParam_=new DicoParams(inter.getEntiteValue(),_ft);
! H2dMaillage maillage=inter.getMaillage();
! maillage.computeBordV2(_progress);
! r.maillage_=maillage;
!
return r;
}
! public String getTitle()
! {
return title_;
}
! public File getFile()
! {
return fINP_;
}
! public File enregistrerUniqueSousRepertoire(File _f)
! {
! if (!_f.isDirectory())
! {
ui_.error(
"Répertoire",
--- 53,93 ----
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;
! TrRefluxParametres r= new TrRefluxParametres();
! r.ui_= _ui;
! r.fINP_= _f;
! String s= _f.getName();
! int i= s.indexOf('.');
if (i > 0)
! 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",
***************
*** 95,107 ****
return null;
}
! File dest =
new File(
_f,
title_ + "." + INPFileFormat.getInstance().getExtensions()[0]);
! int i = 0;
! int max = 20;
! while ((dest.exists()) && (i < max))
! {
! dest =
new File(
_f,
--- 100,111 ----
return null;
}
! File dest=
new File(
_f,
title_ + "." + INPFileFormat.getInstance().getExtensions()[0]);
! int i= 0;
! int max= 20;
! while ((dest.exists()) && (i < max)) {
! dest=
new File(
_f,
***************
*** 112,124 ****
+ 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;
--- 116,125 ----
+ 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;
***************
*** 130,136 ****
*
*/
! public DicoParams getDicoParam()
! {
! return dicoParam_;
}
--- 131,136 ----
*
*/
! public DicoParams getDicoParam() {
! return params_.getDicoParams();
}
***************
*** 139,143 ****
*/
public H2dMaillage getMaillage() {
! return maillage_;
}
--- 139,157 ----
*/
public H2dMaillage getMaillage() {
! return params_.getMaillage();
! }
!
! public H2dParametres getParametres() {
! return getRefluxParametres();
! }
!
! public H2dRefluxParametres getRefluxParametres() {
! return params_;
! }
!
! /**
! *
! */
! public void loadGeometrie(ProgressionInterface _interface) {
}
Index: TrRefluxProjet.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/reflux/TrRefluxProjet.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** TrRefluxProjet.java 19 Aug 2003 07:48:40 -0000 1.3
--- TrRefluxProjet.java 22 Aug 2003 16:02:24 -0000 1.4
***************
*** 36,40 ****
TrRefluxParametres params_;
TrRefluxFilleProjet fille_;
! TrImplementation impl_;
FudaaCalculAction calculActions_;
--- 36,40 ----
TrRefluxParametres params_;
TrRefluxFilleProjet fille_;
! TrRefluxFilleVisu visu_;
FudaaCalculAction calculActions_;
***************
*** 42,47 ****
*
*/
! public TrRefluxProjet(TrImplementation _impl, TrRefluxParametres _params) {
! impl_= _impl;
params_= _params;
calculActions_= new FudaaCalculAction(this, true);
--- 42,46 ----
*
*/
! public TrRefluxProjet(TrRefluxParametres _params) {
params_= _params;
calculActions_= new FudaaCalculAction(this, true);
***************
*** 53,65 ****
ProgressionInterface _progress,
TrImplementation _ui) {
- //TODO: gerer si param deja present
TrRefluxParametres params_=
TrRefluxParametres.init(_file, _fileFormat, _progress, _ui);
if (params_ != null)
! return new TrRefluxProjet(_ui, params_);
else
return null;
}
public TrRefluxParametres getRefluxParametres() {
return params_;
--- 52,68 ----
ProgressionInterface _progress,
TrImplementation _ui) {
TrRefluxParametres params_=
TrRefluxParametres.init(_file, _fileFormat, _progress, _ui);
+ _progress.setProgression(100);
if (params_ != null)
! return new TrRefluxProjet(params_);
else
return null;
}
+ public TrImplementation getImpl() {
+ return params_.getImpl();
+ }
+
public TrRefluxParametres getRefluxParametres() {
return params_;
***************
*** 89,114 ****
*
*/
- public TrImplementation getImpl() {
- return impl_;
- }
-
- /**
- *
- */
- public void setImpl(TrImplementation _impl) {}
-
- /**
- *
- */
public void active() {
if (fille_ == null) {
fille_= new TrRefluxFilleProjet(this);
! Dimension dim= impl_.getMainPanel().getDesktop().getSize();
fille_.setSize(
(int) (dim.getWidth() * 0.8),
(int) (dim.getHeight() * 0.8));
! fille_.setLocation(0, 0);
}
! impl_.addInternalFrame(fille_);
}
--- 92,124 ----
*
*/
public void active() {
+ Dimension dim= null;
if (fille_ == null) {
fille_= new TrRefluxFilleProjet(this);
! dim= getImpl().getMainPanel().getDesktop().getSize();
fille_.setSize(
+ (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();
+ visu_.setSize(
(int) (dim.getWidth() * 0.8),
(int) (dim.getHeight() * 0.8));
! visu_.setLocation(10, 10);
! getImpl().addInternalFrame(visu_);
}
! else
! getImpl().activateInternalFrame(visu_);
!
}
***************
*** 129,133 ****
fille_.dispose();
fille_= null;
! impl_.closeProjet(this);
}
--- 139,143 ----
fille_.dispose();
fille_= null;
! getImpl().closeProjet(this);
}
***************
*** 154,158 ****
}
};
! op.setImpl(impl_);
return op;
}
--- 164,168 ----
}
};
! op.setImpl(getImpl());
return op;
}
***************
*** 176,180 ****
*/
public FudaaUI getUI() {
! return impl_;
}
--- 186,190 ----
*/
public FudaaUI getUI() {
! return getImpl();
}
***************
*** 200,204 ****
*/
public void export(String _actionCommand) {
! new TrExport(params_).export(_actionCommand);
}
--- 210,214 ----
*/
public void export(String _actionCommand) {
! new TrRefluxExport(params_).export(_actionCommand);
}
|