Update of /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr
In directory sc8-pr-cvs1:/tmp/cvs-serv28766/tr
Modified Files:
TrExport.java TrFileFormatManager.java TrGrapheFille.java
TrImplementation.java TrLib.java TrParametres.java
TrProjectDispatcherListener.java TrProjet.java tr_en.fr_txt
Added Files:
banner.png banner.xcf modify-title_16.png modify-title_20.png
modify-title_24.png modify_title.xcf prepro.png time.xcf
time_16.png time_20.png time_24.png
Log Message:
General update for prepro
--- NEW FILE: banner.png ---
(This appears to be a binary file; contents omitted.)
--- NEW FILE: banner.xcf ---
(This appears to be a binary file; contents omitted.)
--- NEW FILE: modify-title_16.png ---
(This appears to be a binary file; contents omitted.)
--- NEW FILE: modify-title_20.png ---
(This appears to be a binary file; contents omitted.)
--- NEW FILE: modify-title_24.png ---
(This appears to be a binary file; contents omitted.)
--- NEW FILE: modify_title.xcf ---
(This appears to be a binary file; contents omitted.)
--- NEW FILE: prepro.png ---
(This appears to be a binary file; contents omitted.)
--- NEW FILE: time.xcf ---
(This appears to be a binary file; contents omitted.)
--- NEW FILE: time_16.png ---
(This appears to be a binary file; contents omitted.)
--- NEW FILE: time_20.png ---
(This appears to be a binary file; contents omitted.)
--- NEW FILE: time_24.png ---
(This appears to be a binary file; contents omitted.)
Index: TrExport.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/TrExport.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** TrExport.java 12 Dec 2003 11:29:41 -0000 1.10
--- TrExport.java 19 Dec 2003 12:10:55 -0000 1.11
***************
*** 45,49 ****
*/
public class TrExport {
- public static String EXPORT_PREF= "EXPORT";
protected TrParametres params_;
FudaaCommonImplementation ui_;
--- 45,48 ----
***************
*** 62,66 ****
}
public void export(String _s) {
! String f= _s.substring(EXPORT_PREF.length());
if (CtuluLib.DEBUG)
CtuluLib.debug("export " + f);
--- 61,65 ----
}
public void export(String _s) {
! String f= _s.substring(TrFileFormatManager.EXPORT_PREF.length());
if (CtuluLib.DEBUG)
CtuluLib.debug("export " + f);
***************
*** 230,234 ****
boolean fatal=
ui_.manageErrorOperationAndIsFatal(
! _ftMaillage.writeMaillage(f, maillage, _prog));
ui_.unsetMainProgression();
ui_.unsetMainMessage();
--- 229,233 ----
boolean fatal=
ui_.manageErrorOperationAndIsFatal(
! _ftMaillage.writeGrid(f, maillage, _prog));
ui_.unsetMainProgression();
ui_.unsetMainMessage();
Index: TrFileFormatManager.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/TrFileFormatManager.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** TrFileFormatManager.java 11 Dec 2003 12:50:55 -0000 1.6
--- TrFileFormatManager.java 19 Dec 2003 12:10:55 -0000 1.7
***************
*** 15,22 ****
--- 15,28 ----
import java.util.ArrayList;
import java.util.Arrays;
+ import java.util.Collections;
+ import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.TreeMap;
+ import javax.swing.JMenuItem;
+
+ import org.fudaa.ctulu.CtuluLib;
+
import com.memoire.bu.BuInformationsSoftware;
import com.memoire.bu.BuMenu;
***************
*** 24,30 ****
--- 30,40 ----
import org.fudaa.dodico.dunes.io.DunesFileFormat;
import org.fudaa.dodico.fichiers.FileFormat;
+ import org.fudaa.dodico.h2d.H2dCSVFileFormat;
+ import org.fudaa.dodico.h2d.H2dFileFormatEvolutionVersion;
import org.fudaa.dodico.h2d.type.H2dEnumType;
import org.fudaa.dodico.h2d.type.H2dFileFormatType;
+ import org.fudaa.dodico.reflux.io.CLTransitoireFileFormat;
import org.fudaa.dodico.reflux.io.CorEleBthFileFormat;
+ import org.fudaa.dodico.reflux.io.CrbFileFormat;
import org.fudaa.dodico.reflux.io.INPFileFormat;
import org.fudaa.dodico.telemac.io.SerafinFileFormat;
***************
*** 40,43 ****
--- 50,56 ----
public class TrFileFormatManager {
private FileFormat[] formats_;
+
+ public static String EXPORT_PREF= "EXPORT";
+ public static String IMPORT_PREF= "IMPORT";
/**
*
***************
*** 48,61 ****
buildFormat();
}
private final void buildFormat() {
! formats_= new FileFormat[7];
! int i= 0;
! formats_[i++]= INPFileFormat.getInstance();
! formats_[i++]= DunesFileFormat.getInstance();
! formats_[i++]= CorEleBthFileFormat.getInstance();
! formats_[i++]= Telemac2dFileFormat.getInstance();
! formats_[i++]= SerafinFileFormat.getInstance();
! formats_[i++]= TelemacCLFileFormat.getInstance();
! formats_[i++]= TelemacLiquideFileFormat.getInstance();
}
public static FileFormat[] getArray(ArrayList _l) {
--- 61,89 ----
buildFormat();
}
+
+ public FileFormat getFileFormatWithID(String _id) {
+ if (formats_ == null)
+ buildFormat();
+ for (int i= formats_.length - 1; i >= 0; i--) {
+ if (formats_[i].getID().equals(_id))
+ return formats_[i];
+ }
+ return null;
+ }
private final void buildFormat() {
! HashSet s= new HashSet(15);
! s.add(INPFileFormat.getInstance());
! s.add(DunesFileFormat.getInstance());
! s.add(CorEleBthFileFormat.getInstance());
! s.add(Telemac2dFileFormat.getInstance());
! s.add(SerafinFileFormat.getInstance());
! s.add(TelemacCLFileFormat.getInstance());
! s.add(TelemacLiquideFileFormat.getInstance());
! s.add(H2dCSVFileFormat.getInstance());
! s.add(CrbFileFormat.getInstance());
! s.add(CLTransitoireFileFormat.getInstance());
! formats_= new FileFormat[s.size()];
! s.toArray(formats_);
!
}
public static FileFormat[] getArray(ArrayList _l) {
***************
*** 65,68 ****
--- 93,114 ----
}
+ public FileFormat[] getFileFormatForImportEvol() {
+ ArrayList r= new ArrayList(10);
+ if (formats_ == null)
+ buildFormat();
+ FileFormat ft;
+ for (int i= formats_.length - 1; i >= 0; i--) {
+ ft= formats_[i];
+ if ((ft.getType() == H2dFileFormatType.COURBE_TRANSITOIRE.getId())
+ && (ft.getLastVersionInstance()
+ instanceof H2dFileFormatEvolutionVersion)) {
+ r.add(ft);
+ }
+ }
+ FileFormat[] rf= new FileFormat[r.size()];
+ r.toArray(rf);
+ return rf;
+ }
+
public FileFormat[] getFormatWithGridSupport() {
ArrayList r= new ArrayList(formats_.length);
***************
*** 121,129 ****
*/
public void buildExportMenu(BuMenu _m, TrImplementation _impl) {
! List l= H2dFileFormatType.LIST;
int n= l.size();
//on recupere les fileformat dans l'ordre des id
for (int i= 0; i < n; i++) {
! H2dFileFormatType ft= (H2dFileFormatType)H2dEnumType.getIdInList(l, i);
FileFormat[] fts= getFormatWithType(ft.getId());
BuMenu me= new BuMenu(ft.getNom(), ft.getNom());
--- 167,178 ----
*/
public void buildExportMenu(BuMenu _m, TrImplementation _impl) {
! List l= new ArrayList(H2dFileFormatType.LIST);
! Collections.sort(l, new H2dEnumType.H2dEnumIDComparator());
int n= l.size();
//on recupere les fileformat dans l'ordre des id
for (int i= 0; i < n; i++) {
! H2dFileFormatType ft= (H2dFileFormatType)l.get(i);
! if (ft == null)
! continue;
FileFormat[] fts= getFormatWithType(ft.getId());
BuMenu me= new BuMenu(ft.getNom(), ft.getNom());
***************
*** 135,139 ****
for (Iterator it= map.keySet().iterator(); it.hasNext();) {
String id= (String)it.next();
! me.addMenuItem(id, TrExport.EXPORT_PREF + (String)map.get(id), _impl);
}
//TODO : a ameliorer
--- 184,191 ----
for (Iterator it= map.keySet().iterator(); it.hasNext();) {
String id= (String)it.next();
! me.addMenuItem(
! id,
! TrFileFormatManager.EXPORT_PREF + (String)map.get(id),
! _impl);
}
//TODO : a ameliorer
***************
*** 141,143 ****
--- 193,223 ----
}
}
+ public void buildImportMenu(BuMenu _m, TrImplementation _impl) {
+ BuMenu m=
+ new BuMenu(
+ H2dFileFormatType.COURBE_TRANSITOIRE.getNom(),
+ CtuluLib.getString(H2dFileFormatType.COURBE_TRANSITOIRE.getId()));
+ FileFormat[] ft= getFileFormatForImportEvol();
+ Arrays.sort(ft);
+ int n= ft.length;
+ for (int i= 0; i < n; i++) {
+ m.addMenuItem(ft[i].getName(), IMPORT_PREF + ft[i].getID(), _impl);
+ }
+ _m.add(m);
+ }
+
+ public JMenuItem getMenuImportCourbeTrans(TrImplementation _impl) {
+ BuMenu m= (BuMenu)_impl.getMainMenuBar().getMenu("IMPORTER");
+ if (m == null)
+ return null;
+ String actCmd=
+ CtuluLib.getString(H2dFileFormatType.COURBE_TRANSITOIRE.getId());
+ for (int i= m.getItemCount() - 1; i >= 0; i--) {
+ JMenuItem it= m.getItem(i);
+ if (actCmd.equals(it.getActionCommand()))
+ return it;
+ }
+ return null;
+ }
+
}
Index: TrGrapheFille.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/TrGrapheFille.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** TrGrapheFille.java 12 Dec 2003 11:29:41 -0000 1.1
--- TrGrapheFille.java 19 Dec 2003 12:10:55 -0000 1.2
***************
*** 12,15 ****
--- 12,16 ----
import java.awt.Container;
import java.util.List;
+ import java.util.Random;
import com.memoire.bu.BuBorderLayout;
***************
*** 18,23 ****
--- 19,26 ----
import org.fudaa.dodico.h2d.H2dEvolution;
+ import org.fudaa.dodico.h2d.H2dEvolutionListener;
import org.fudaa.dodico.h2d.H2dEvolutionManager;
import org.fudaa.dodico.h2d.H2dResource;
+ import org.fudaa.dodico.mesure.EvolutionReguliere;
import org.fudaa.ebli.graphe.Axe;
***************
*** 25,28 ****
--- 28,32 ----
import org.fudaa.ebli.graphe.CourbeModelAbstract;
import org.fudaa.ebli.graphe.EbliFilleGraphe;
+ import org.fudaa.ebli.graphe.EbliFilleGrapheController;
import org.fudaa.ebli.graphe.Graphe;
***************
*** 31,35 ****
* @version $Id$
*/
! public class TrGrapheFille extends EbliFilleGraphe {
H2dEvolutionManager evol_;
--- 35,41 ----
* @version $Id$
*/
! public class TrGrapheFille
! extends EbliFilleGrapheController
! implements H2dEvolutionListener {
H2dEvolutionManager evol_;
***************
*** 41,44 ****
--- 47,52 ----
H2dEvolutionManager _evol) {
super(
+ false,
+ false,
H2dResource.getS("Courbes temporelles"),
true,
***************
*** 49,61 ****
_id);
evol_= _evol;
List evolstemp= evol_.createList();
int n= evolstemp.size();
- Graphe g= new Graphe();
for (int i= 0; i < n; i++) {
EvolCourbe addEvol= new EvolCourbe((H2dEvolution)evolstemp.get(i));
! addEvol.aspect.contour= getColor(((double) (i + 1) / (double)n));
! g.ajoute(addEvol);
}
- graphe_= new BGraphe();
double[] minMax= evol_.getXMinMaxYMinMax(evolstemp);
xmin_= minMax[0];
--- 57,68 ----
_id);
evol_= _evol;
+ evol_.addListener(this);
List evolstemp= evol_.createList();
int n= evolstemp.size();
for (int i= 0; i < n; i++) {
EvolCourbe addEvol= new EvolCourbe((H2dEvolution)evolstemp.get(i));
! addEvol.aspect.contour= getColor(i);
! controller_.ajouteComponent(addEvol);
}
double[] minMax= evol_.getXMinMaxYMinMax(evolstemp);
xmin_= minMax[0];
***************
*** 63,67 ****
ymin_= minMax[2];
ymax_= minMax[3];
- g.copyright= false;
Axe axe= new Axe();
axe.vertical= true;
--- 70,73 ----
***************
*** 69,73 ****
axe.minimum= ymin_;
axe.graduations= true;
! g.ajoute(axe);
axe= new Axe();
axe.vertical= false;
--- 75,79 ----
axe.minimum= ymin_;
axe.graduations= true;
! controller_.ajoute(axe);
axe= new Axe();
axe.vertical= false;
***************
*** 75,114 ****
axe.minimum= xmin_;
axe.graduations= true;
! g.ajoute(axe);
! graphe_.setGraphe(g);
! Container c= getContentPane();
! c.setLayout(new BuBorderLayout());
! c.add(graphe_, BuBorderLayout.CENTER);
}
! private Color getColor(double _z) {
int r, v, b, a;
double rmin, vmin, bmin, amin;
double rmax, vmax, bmax, amax;
! double n= _z * 255.;
! rmin= Color.yellow.getRed();
! vmin= Color.yellow.getGreen();
! bmin= Color.yellow.getBlue();
! amin= Color.yellow.getAlpha();
! rmax= Color.black.getRed();
! vmax= Color.black.getGreen();
! bmax= Color.black.getBlue();
! amax= Color.black.getAlpha();
! r= (int) (rmin + (rmax - rmin) * n / 255);
if (r < 0)
r= 0;
else if (r > 255)
r= 255;
! v= (int) (vmin + (vmax - vmin) * n / 255);
if (v < 0)
v= 0;
else if (v > 255)
v= 255;
! b= (int) (bmin + (bmax - bmin) * n / 255);
if (b < 0)
b= 0;
else if (b > 255)
b= 255;
! a= (int) (amin + (amax - amin) * n / 255);
if (a < 0)
a= 0;
--- 81,130 ----
axe.minimum= xmin_;
axe.graduations= true;
! controller_.ajoute(axe);
}
! private Color getColor(int _z) {
! if(_z==0) return Color.black;
! else if(_z==1) return Color.cyan;
! else if(_z==2) return Color.green;
! else if(_z==3) return Color.gray;
! else if(_z==4) return Color.orange;
! else if(_z==5) return Color.yellow;
! else if(_z==6) return Color.red;
! else if(_z==7) return Color.blue;
! else if(_z==8) return Color.pink;
! double n=_z*15;
! n=n/255;
! if((n<0) || (n>1)){
! n=Math.random();
! }
int r, v, b, a;
double rmin, vmin, bmin, amin;
double rmax, vmax, bmax, amax;
!
! rmin= Color.cyan.getRed();
! vmin= Color.cyan.getGreen();
! bmin= Color.cyan.getBlue();
! amin= Color.cyan.getAlpha();
! rmax= Color.green.getRed();
! vmax= Color.green.getGreen();
! bmax= Color.green.getBlue();
! amax= Color.green.getAlpha();
! r= (int) (rmin + (rmax - rmin) * n);
if (r < 0)
r= 0;
else if (r > 255)
r= 255;
! v= (int) (vmin + (vmax - vmin) * n);
if (v < 0)
v= 0;
else if (v > 255)
v= 255;
! b= (int) (bmin + (bmax - bmin) * n);
if (b < 0)
b= 0;
else if (b > 255)
b= 255;
! a= (int) (amin + (amax - amin) * n);
if (a < 0)
a= 0;
***************
*** 148,151 ****
--- 164,195 ----
}
+
+ /**
+ *
+ */
+ public void evolutionUsedChanged(H2dEvolution _e, int _old, int _new) {}
+
+ /**
+ *
+ */
+ public void evolutionChanged(EvolutionReguliere _e) {}
+
+
+ /**
+ *
+ */
+ public void evolutionAdd(EvolutionReguliere _e) {
+ EvolCourbe c=new EvolCourbe((H2dEvolution)_e);
+ c.setAspectContour(getColor(evol_.getNbEvol()-1));
+ controller_.ajouteComponent(c);
+ controller_.updateAxes();
+ controller_.restaurer();
+
+ }
+
+ /**
+ *
+ */
+ public void evolutionRemove(EvolutionReguliere _e) {}
}
Index: TrImplementation.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/TrImplementation.java,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -d -r1.17 -r1.18
*** TrImplementation.java 12 Dec 2003 11:29:41 -0000 1.17
--- TrImplementation.java 19 Dec 2003 12:10:55 -0000 1.18
***************
*** 22,25 ****
--- 22,26 ----
import javax.swing.JFrame;
import javax.swing.JMenu;
+ import javax.swing.JMenuItem;
import javax.swing.JScrollPane;
***************
*** 45,49 ****
--- 46,57 ----
import org.fudaa.dodico.commun.ProgressionInterface;
+ import org.fudaa.dodico.fichiers.FileFormat;
import org.fudaa.dodico.fichiers.FileFormatSoftware;
+ import org.fudaa.dodico.fichiers.FileOperationSynthese;
+ import org.fudaa.dodico.h2d.H2dCSVFileFormat;
+ import org.fudaa.dodico.h2d.H2dEvolution;
+ import org.fudaa.dodico.h2d.H2dEvolutionManager;
+ import org.fudaa.dodico.h2d.H2dFileFormatEvolutionVersion;
+ import org.fudaa.dodico.h2d.type.H2dFileFormatType;
import org.fudaa.dodico.telemac.io.TelemacDicoFileFormat;
***************
*** 75,87 ****
new BuInformationsSoftware();
static {
! isRt_.name= "Tr";
! isRt_.version= "0.03";
! isRt_.date= "01-septembre-2003";
! isRt_.rights= TrResource.getS("Tous droits réservés") + ". CETMEF (c)2003";
isRt_.contact= "fre...@eq...";
isRt_.license= "GPL2";
isRt_.languages= "fr,en";
! isRt_.logo= null;
! isRt_.banner= null;
isRt_.http= "http://fudaa.sourceforge.net";
isRt_.update= "";
--- 83,95 ----
new BuInformationsSoftware();
static {
! isRt_.name= "Prepro";
! isRt_.version= "0.04";
! isRt_.date= "2003-12-18";
! isRt_.rights= TrResource.getS("Tous droits réservés") + ". CETMEF (c)2003-2004";
isRt_.contact= "fre...@eq...";
isRt_.license= "GPL2";
isRt_.languages= "fr,en";
! isRt_.logo= TrResource.TR.getIcon("prepro");
! isRt_.banner= TrResource.TR.getIcon("banner");
isRt_.http= "http://fudaa.sourceforge.net";
isRt_.update= "";
***************
*** 242,251 ****
glassPaneStop_.setVisible(true);
}
!
public void unsetGlassPaneStop() {
! if(glassPaneStop_!=null) glassPaneStop_.setVisible(false);
}
-
-
protected void ouvrir(final File _f) {
--- 250,258 ----
glassPaneStop_.setVisible(true);
}
!
public void unsetGlassPaneStop() {
! if (glassPaneStop_ != null)
! glassPaneStop_.setVisible(false);
}
protected void ouvrir(final File _f) {
***************
*** 315,319 ****
.start();
} else if ("FERMER".equals(action)) {
! new BuTaskOperation(this, CtuluLib.EMPTY_STRING) {
public void act() {
saveAndCloseProjet(createProgressionInterface(this), this);
--- 322,326 ----
.start();
} else if ("FERMER".equals(action)) {
! new BuTaskOperation(null, CtuluLib.EMPTY_STRING) {
public void act() {
saveAndCloseProjet(createProgressionInterface(this), this);
***************
*** 325,334 ****
} else if ("CONSOLE".equals(action)) {
openLogFrame();
! } else if (action.startsWith(TrExport.EXPORT_PREF)) {
projetCourant().export(action);
} else {
super.actionPerformed(_evt);
}
}
protected void connecter() {
System.out.println("pas de connexion");
--- 332,381 ----
} else if ("CONSOLE".equals(action)) {
openLogFrame();
! } else if (action.startsWith(TrFileFormatManager.EXPORT_PREF)) {
projetCourant().export(action);
+ } else if (action.startsWith(TrFileFormatManager.IMPORT_PREF)) {
+ importAction(action.substring(TrFileFormatManager.IMPORT_PREF.length()));
} else {
super.actionPerformed(_evt);
}
}
+
+ /**
+ * Methode s'occupant d'importer les fichiers demandes. Methode appelee par actionPerformed.
+ */
+ private void importAction(String _id){
+ if(CtuluLib.DEBUG) CtuluLib.debug("import "+_id);
+ FileFormat ft=fileFormatMng_.getFileFormatWithID(_id);
+ if(ft==null) return;
+ if(ft.getType()==H2dFileFormatType.COURBE_TRANSITOIRE.getId()){
+ importCurvesAction((H2dFileFormatEvolutionVersion)ft.getLastVersionInstance());
+ }
+ }
+
+ /**
+ * Importer des courbes a partir du format _v.
+ */
+ private void importCurvesAction(final H2dFileFormatEvolutionVersion _v){
+ if(currentProject_==null) return;
+ final H2dEvolutionManager mng=currentProject_.getEvolMng();
+ FileFormat ft=_v.getFileFormat();
+ if(mng==null) return;
+ if(ft.getID()==H2dCSVFileFormat.getInstance().getID()){
+ }
+ else{
+ final File f=ouvrirFileChooser(ft.getExtensions(), ft.getDescription());
+ if(f!=null){
+ new BuTaskOperation(this,TrResource.getS("Import")+CtuluLib.ESPACE+ft.getName()){
+ public void act(){
+ FileOperationSynthese s=_v.readEvolutions(f, createProgressionInterface(this));
+ if(!manageErrorOperationAndIsFatal(s)){
+ mng.add((H2dEvolution[])s.getSource());
+ }
+ }
+ }.start();
+
+ }
+ }
+ }
protected void connecter() {
System.out.println("pas de connexion");
***************
*** 427,430 ****
--- 474,478 ----
mb.add(menuApp, index);
mb.getMenu("EXPORTER").addItemListener(this);
+ mb.getMenu("IMPORTER").addItemListener(this);
it= new BuMenuItem(TrResource.getS("Console"));
it.setActionCommand("CONSOLE");
***************
*** 447,451 ****
"Si vous répondez non, toutes vos modifications seront perdues")
+ "."))) {
- initTaskView(_bu);
currentProject_.save(_interface);
currentProject_.close();
--- 495,498 ----
***************
*** 462,465 ****
--- 509,513 ----
setEnabledForAction("FERMER", false);
setEnabledForAction("EXPORTER", false);
+ setEnabledForAction("IMPORTER", false);
}
}
***************
*** 476,479 ****
--- 524,529 ----
setEnabledForAction("ENREGISTRERCOPIE", true);
setEnabledForAction("EXPORTER", true);
+ setEnabledForAction("IMPORTER", true);
+ updateImportMenu();
_o.active(this);
}
***************
*** 585,590 ****
return arbre_;
} /**
! *
! */
public void exit() {
--- 635,640 ----
return arbre_;
} /**
! *
! */
public void exit() {
***************
*** 619,623 ****
(BuMenu)getMainMenuBar().getMenu("EXPORTER"),
this);
! } /**
*
*/
--- 669,690 ----
(BuMenu)getMainMenuBar().getMenu("EXPORTER"),
this);
! }
!
! private void buildImportMenu() {
! fileFormatMng_.buildImportMenu(
! (BuMenu)getMainMenuBar().getMenu("IMPORTER"),
! this);
! updateImportMenu();
! }
!
! private void updateImportMenu() {
! if (currentProject_ != null) {
! JMenuItem ctrans= fileFormatMng_.getMenuImportCourbeTrans(this);
! if (ctrans != null)
! ctrans.setEnabled(currentProject_.getTrParams().canImportEvolution());
! }
! }
!
! /**
*
*/
***************
*** 627,634 ****
if (menu.getMenuComponentCount() != 0)
return;
! if (menu.getActionCommand().equals("EXPORTER")) {
buildExporterMenu();
! menu.removeItemListener(this);
}
}
}
--- 694,706 ----
if (menu.getMenuComponentCount() != 0)
return;
! String com= menu.getActionCommand();
! if (com.equals("EXPORTER")) {
buildExporterMenu();
!
! }
! if (com.equals("IMPORTER")) {
! buildImportMenu();
}
+ menu.removeItemListener(this);
}
}
Index: TrLib.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/TrLib.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** TrLib.java 12 Dec 2003 11:29:41 -0000 1.6
--- TrLib.java 19 Dec 2003 12:10:55 -0000 1.7
***************
*** 63,66 ****
--- 63,67 ----
if(_nameToSave!=null)
TrLib.saveFrameDimensionInPref(_f, _nameToSave);
+ _f.dispose();
_impl.removeInternalFrame(_f);
_f.setVisible(false);
Index: TrParametres.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/TrParametres.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** TrParametres.java 11 Dec 2003 12:50:55 -0000 1.8
--- TrParametres.java 19 Dec 2003 12:10:55 -0000 1.9
***************
*** 22,24 ****
--- 22,25 ----
public H2dParameters getH2dParametres();
public TrPanelInfoSender getPanelInfoSender();
+ public boolean canImportEvolution();
}
Index: TrProjectDispatcherListener.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/TrProjectDispatcherListener.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** TrProjectDispatcherListener.java 12 Dec 2003 11:29:41 -0000 1.5
--- TrProjectDispatcherListener.java 19 Dec 2003 12:10:55 -0000 1.6
***************
*** 8,13 ****
*/
package org.fudaa.fudaa.tr;
! import java.util.HashSet;
! import java.util.Set;
import org.fudaa.ctulu.CtuluLib;
--- 8,12 ----
*/
package org.fudaa.fudaa.tr;
! import java.awt.Frame;
import org.fudaa.ctulu.CtuluLib;
***************
*** 18,25 ****
import org.fudaa.dodico.h2d.H2dBoundary;
import org.fudaa.dodico.h2d.H2dEvolution;
! import org.fudaa.dodico.h2d.H2dEvolutionListener;
import org.fudaa.dodico.h2d.H2dProjectDispatcherListener;
import org.fudaa.dodico.h2d.type.H2dBoundaryType;
import org.fudaa.dodico.h2d.type.H2dVariableType;
import org.fudaa.fudaa.commun.FudaaLib;
--- 17,25 ----
import org.fudaa.dodico.h2d.H2dBoundary;
import org.fudaa.dodico.h2d.H2dEvolution;
! import org.fudaa.dodico.h2d.H2dEvolutionListenerDispatcherDefault;
import org.fudaa.dodico.h2d.H2dProjectDispatcherListener;
import org.fudaa.dodico.h2d.type.H2dBoundaryType;
import org.fudaa.dodico.h2d.type.H2dVariableType;
+ import org.fudaa.dodico.mesure.EvolutionReguliere;
import org.fudaa.fudaa.commun.FudaaLib;
***************
*** 28,34 ****
* @version $Id$
*/
! public class TrProjectDispatcherListener
implements H2dProjectDispatcherListener {
- Set evolListener_;
/**
*
--- 28,33 ----
* @version $Id$
*/
! public class TrProjectDispatcherListener extends H2dEvolutionListenerDispatcherDefault
implements H2dProjectDispatcherListener {
/**
*
***************
*** 37,40 ****
--- 36,52 ----
super();
}
+
+ protected static void changedMainFrameState(boolean _modified, Frame _f) {
+ String s= _f.getTitle();
+ if (_modified) {
+ if (!s.startsWith("*")) {
+ _f.setTitle("*" + s);
+ }
+ } else {
+ if (s.startsWith("*")) {
+ _f.setTitle(s.substring(1));
+ }
+ }
+ }
/**
*
***************
*** 118,145 ****
: CtuluLib.EMPTY_STRING));
}
/**
*
*/
! public void addEvolutionListener(H2dEvolutionListener _l) {
! if (evolListener_ == null)
! evolListener_= new HashSet();
! evolListener_.add(_l);
! }
! /**
! *
! */
! public boolean containsEvolutionListener(H2dEvolutionListener _l) {
! return evolListener_ == null ? false : evolListener_.contains(_l);
! }
! /**
! *
! */
! public void removeEvolutionListener(H2dEvolutionListener _l) {
! if(evolListener_!=null) evolListener_.remove(_l);
! }
! /**
! *
! */
! public void evolutionChanged(H2dEvolution _e) {
FudaaLib.info("CHANGE: EVOLUTION "+_e.getNom());
}
--- 130,139 ----
: CtuluLib.EMPTY_STRING));
}
+
/**
*
*/
! public void evolutionChanged(EvolutionReguliere _e) {
! super.evolutionChanged(_e);
FudaaLib.info("CHANGE: EVOLUTION "+_e.getNom());
}
***************
*** 148,151 ****
--- 142,146 ----
*/
public void evolutionUsedChanged(H2dEvolution _e, int _old, int _new) {
+ super.evolutionUsedChanged(_e, _old, _new);
if( (_old>0) || (_new>0)){
FudaaLib.info("CHANGE: EVOLUTION "+_e.getNom()+" USED CHANGED ( old="+_old+", new= "+_new+" )");
***************
*** 153,156 ****
--- 148,168 ----
}
+
+ /**
+ *
+ */
+ public void evolutionAdd(EvolutionReguliere _e) {
+ super.evolutionAdd(_e);
+ FudaaLib.info("ADD: EVOLUTION "+_e.getNom());
+
+ }
+
+ public void evolutionRemove(EvolutionReguliere _e) {
+ super.evolutionRemove(_e);
+ FudaaLib.info("REMOVE: EVOLUTION "+_e.getNom());
+
+ }
+
+
}
Index: TrProjet.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/TrProjet.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** TrProjet.java 11 Dec 2003 12:50:55 -0000 1.12
--- TrProjet.java 19 Dec 2003 12:10:55 -0000 1.13
***************
*** 13,16 ****
--- 13,18 ----
import com.memoire.bu.BuMenu;
import org.fudaa.dodico.commun.ProgressionInterface;
+ import org.fudaa.dodico.h2d.H2dEvolutionManager;
+
import org.fudaa.ebli.calque.action.EbliActionInterface;
import org.fudaa.fudaa.commun.FudaaCommonImplementation;
***************
*** 36,38 ****
--- 38,42 ----
public BuMenu getProjectMenu();
public TrFilleVisu getVisuFille();
+ public TrParametres getTrParams();
+ public H2dEvolutionManager getEvolMng();
}
Index: tr_en.fr_txt
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/tr_en.fr_txt,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** tr_en.fr_txt 12 Dec 2003 11:29:41 -0000 1.11
--- tr_en.fr_txt 19 Dec 2003 12:10:55 -0000 1.12
***************
*** 188,190 ****
optimisation maillage=Grid optimization
Le fichier {0} n'existe pas=The file {0} doesn't exist
! Afficher la fenêtres des courbes temporelles=Show the frame for the time curves
\ No newline at end of file
--- 188,195 ----
optimisation maillage=Grid optimization
Le fichier {0} n'existe pas=The file {0} doesn't exist
! Afficher la fenêtres des courbes temporelles=Show the frame for the time curves
! Définir la durée de la simultation=Set the simulation duration
! Ans, mois, jours=Years, months, days
! Heures, minutes, secondes=Hours, minutes, seconds
! Durée (sec)=Duration (sec)
! Certaines courbes temporelles ne sont pas assez étendues dans le temps( cela sera automatiquement corrigé)=Some time curves are not width enough (this will be automtically corrected)
\ No newline at end of file
|