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: <de...@us...> - 2003-07-04 15:56:44
|
Update of /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/refonde
In directory sc8-pr-cvs1:/tmp/cvs-serv15566/refonde
Modified Files:
Refonde.java RefondeImplementation.java
Log Message:
Ajout de FudaaCommonImplementation
Index: Refonde.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/refonde/Refonde.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** Refonde.java 30 Jan 2003 13:09:43 -0000 1.1
--- Refonde.java 4 Jul 2003 15:56:40 -0000 1.2
***************
*** 85,96 ****
// Update
! if( !flags.no_update ) {
! FudaaUpdate update=new FudaaUpdate(RefondeImplementation.informationsSoftware());
! update.setInstallMode(flags.jar_update?FudaaUpdate.JAR:FudaaUpdate.CLASS);
! if( update.scanForUpdate() ) {
! if( update.startUpdate() )
! System.exit(0);
! } else System.err.println("Refonde : no update");
! }
// Splash screen
--- 85,96 ----
// Update
! // if( !flags.no_update ) {
! // FudaaUpdate update=new FudaaUpdate(RefondeImplementation.informationsSoftware());
! // update.setInstallMode(flags.jar_update?FudaaUpdate.JAR:FudaaUpdate.CLASS);
! // if( update.scanForUpdate() ) {
! // if( update.startUpdate() )
! // System.exit(0);
! // } else System.err.println("Refonde : no update");
! // }
// Splash screen
Index: RefondeImplementation.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/refonde/RefondeImplementation.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** RefondeImplementation.java 18 Mar 2003 16:52:08 -0000 1.4
--- RefondeImplementation.java 4 Jul 2003 15:56:40 -0000 1.5
***************
*** 28,31 ****
--- 28,32 ----
import org.fudaa.fudaa.commun.*;
+ import org.fudaa.fudaa.commun.dodico.*;
import java.awt.event.*;
|
|
From: <de...@us...> - 2003-07-04 15:56:44
|
Update of /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/lido
In directory sc8-pr-cvs1:/tmp/cvs-serv15566/lido
Modified Files:
LidoAstuces.java LidoExport.java LidoExportPanneau.java
LidoFilleReseau.java LidoImplementation.java LidoImport.java
LidoModifStructRecord.java
Log Message:
Ajout de FudaaCommonImplementation
Index: LidoAstuces.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/lido/LidoAstuces.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** LidoAstuces.java 1 Apr 2003 16:13:29 -0000 1.4
--- LidoAstuces.java 4 Jul 2003 15:56:39 -0000 1.5
***************
*** 12,17 ****
import com.memoire.bu.BuPreferences;
- import org.fudaa.fudaa.commun.FudaaAstuces;
import org.fudaa.fudaa.commun.FudaaPreferences;
--- 12,17 ----
import com.memoire.bu.BuPreferences;
import org.fudaa.fudaa.commun.FudaaPreferences;
+ import org.fudaa.fudaa.commun.aide.FudaaAstuces;
Index: LidoExport.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/lido/LidoExport.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** LidoExport.java 1 Apr 2003 16:13:27 -0000 1.4
--- LidoExport.java 4 Jul 2003 15:56:39 -0000 1.5
***************
*** 10,13 ****
--- 10,14 ----
package org.fudaa.fudaa.lido;
+ import org.fudaa.fudaa.commun.fileChooser.FudaaFileChooser;
import org.fudaa.fudaa.lido.ihmhelper.gestion.*;
import org.fudaa.dodico.corba.lido.*;
***************
*** 149,153 ****
File res=null;
! BuFileChooser chooser = new BuFileChooser();
chooser.setFileFilter(new javax.swing.filechooser.FileFilter() {
public boolean accept(java.io.File f)
--- 150,154 ----
File res=null;
! BuFileChooser chooser = new FudaaFileChooser(false);
chooser.setFileFilter(new javax.swing.filechooser.FileFilter() {
public boolean accept(java.io.File f)
Index: LidoExportPanneau.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/lido/LidoExportPanneau.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** LidoExportPanneau.java 1 Apr 2003 16:13:32 -0000 1.4
--- LidoExportPanneau.java 4 Jul 2003 15:56:39 -0000 1.5
***************
*** 12,15 ****
--- 12,17 ----
import com.memoire.bu.*;
import org.fudaa.fudaa.commun.*;
+ import org.fudaa.fudaa.commun.projet.*;
+
import java.awt.*;
import java.awt.event.*;
Index: LidoFilleReseau.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/lido/LidoFilleReseau.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** LidoFilleReseau.java 1 Apr 2003 16:13:30 -0000 1.5
--- LidoFilleReseau.java 4 Jul 2003 15:56:39 -0000 1.6
***************
*** 17,20 ****
--- 17,21 ----
import org.fudaa.ebli.commun.*;
import org.fudaa.fudaa.commun.*;
+ import org.fudaa.fudaa.commun.projet.*;
import org.fudaa.fudaa.lido.tableau.*;
import org.fudaa.fudaa.lido.editor.*;
***************
*** 284,288 ****
proTable_.getSelectionModel().addListSelectionListener(this);
LidoDialogTableau dlProfils=new LidoDialogTableau(proTable_, "Profils",p_);
! dlProfils.setNavPanel(FudaaPanneauNavigation.FERMER);
dlProfils.setActionPanel(EbliPreferences.DIALOG.SUPPRIMER);
dlProfils.addActionListener(this);
--- 285,289 ----
proTable_.getSelectionModel().addListSelectionListener(this);
LidoDialogTableau dlProfils=new LidoDialogTableau(proTable_, "Profils",p_);
! dlProfils.setNavPanel(FudaaPanelNavigation.FERMER);
dlProfils.setActionPanel(EbliPreferences.DIALOG.SUPPRIMER);
dlProfils.addActionListener(this);
Index: LidoImplementation.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/lido/LidoImplementation.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** LidoImplementation.java 1 Apr 2003 16:13:31 -0000 1.5
--- LidoImplementation.java 4 Jul 2003 15:56:39 -0000 1.6
***************
*** 11,18 ****
--- 11,25 ----
import org.fudaa.dodico.lido.*;
+ import org.fudaa.dodico.objet.CDodico;
+ import org.fudaa.dodico.usine.UsineHelper;
import org.fudaa.dodico.corba.objet.*;
+ import org.fudaa.dodico.corba.usine.IUsine;
import org.fudaa.dodico.corba.lido.*;
import org.fudaa.dodico.corba.calcul.*;
import org.fudaa.fudaa.commun.*;
[...4370 lines suppressed...]
! previsuFille_.setMaximum(true);
}
- catch( java.beans.PropertyVetoException _e)
- {previsuFille_.setSize(100,100);}
}
-
}
--- 2650,2660 ----
try
{
! previsuFille_.setMaximum(true);
! }
! catch (java.beans.PropertyVetoException _e)
! {
! previsuFille_.setSize(100, 100);
}
}
}
Index: LidoImport.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/lido/LidoImport.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** LidoImport.java 1 Apr 2003 16:13:30 -0000 1.4
--- LidoImport.java 4 Jul 2003 15:56:39 -0000 1.5
***************
*** 12,15 ****
--- 12,17 ----
import org.fudaa.dodico.corba.lido.*;
import org.fudaa.dodico.lido.*;
+ import org.fudaa.fudaa.commun.fileChooser.FudaaFileChooser;
+
import com.memoire.bu.*;
import java.io.*;
***************
*** 253,257 ****
File res=null;
! BuFileChooser chooser = new BuFileChooser();
chooser.setFileFilter(new javax.swing.filechooser.FileFilter() {
public boolean accept(java.io.File f)
--- 255,259 ----
File res=null;
! BuFileChooser chooser = new FudaaFileChooser(false);
chooser.setFileFilter(new javax.swing.filechooser.FileFilter() {
public boolean accept(java.io.File f)
Index: LidoModifStructRecord.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/lido/LidoModifStructRecord.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** LidoModifStructRecord.java 1 Apr 2003 16:13:28 -0000 1.4
--- LidoModifStructRecord.java 4 Jul 2003 15:56:39 -0000 1.5
***************
*** 12,15 ****
--- 12,17 ----
import org.fudaa.dodico.corba.lido.*;
import org.fudaa.fudaa.commun.*;
+ import org.fudaa.fudaa.commun.projet.*;
+
import java.util.*;
|
Update of /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/reflux
In directory sc8-pr-cvs1:/tmp/cvs-serv15430/reflux
Added Files:
TrRefluxFilleProjet.java TrRefluxImplHelper.java
TrRefluxParametres.java TrRefluxProjet.java
Log Message:
Maj
--- NEW FILE: TrRefluxFilleProjet.java ---
/*
* @file TrRefluxFilleProjet.java
* @creation 10 juin 2003
* @modification $Date: 2003/07/04 15:50:54 $
* @license GNU General Public License 2
* @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne
* @mail de...@fu...
*/
package org.fudaa.fudaa.tr.reflux;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.text.DateFormat;
import java.util.Date;
import javax.swing.BorderFactory;
import javax.swing.JButton;
import javax.swing.JPanel;
import com.memoire.bu.BuBorderLayout;
import com.memoire.bu.BuButton;
import com.memoire.bu.BuButtonLayout;
import com.memoire.bu.BuGridLayout;
import com.memoire.bu.BuInternalFrame;
import com.memoire.bu.BuLabel;
import com.memoire.bu.BuPanel;
import com.memoire.bu.BuResource;
import com.memoire.bu.BuTabbedPane;
import com.memoire.bu.BuTextField;
import org.fudaa.fudaa.commun.exec.FudaaEditor;
import org.fudaa.fudaa.dico.FDicoEntitePanel;
/**
* @author deniger
* @version $Id: TrRefluxFilleProjet.java,v 1.1 2003/07/04 15:50:54 deniger Exp $
*/
public class TrRefluxFilleProjet
extends BuInternalFrame
implements ActionListener
{
TrRefluxProjet proj_;
/**
*
*/
public TrRefluxFilleProjet(TrRefluxProjet _proj)
{
super(_proj.getTitle(), true, false, true, true);
proj_ = _proj;
BuTabbedPane pane = new BuTabbedPane();
BuPanel princ = new BuPanel();
princ.setLayout(new BuBorderLayout(5, 15));
princ.add(_proj.getCalculActions().createPanel(), BuBorderLayout.NORTH);
BuPanel centre = new BuPanel();
centre.setLayout(new BuGridLayout(2, 5, 5, false, false));
centre.add(new BuLabel("Fichier : "));
BuTextField txt = new BuTextField();
txt.setEditable(false);
txt.setText(_proj.getRefluxParametres().getFile().getAbsolutePath());
centre.add(txt);
centre.add(new BuLabel("modifié le : "));
txt = new BuTextField();
txt.setEditable(false);
txt.setText(
DateFormat.getDateInstance().format(
new Date(_proj.getRefluxParametres().getFile().lastModified())));
centre.add(txt);
princ.add(centre, BuBorderLayout.CENTER);
JButton e = new BuButton(BuResource.BU.getIcon("editer"));
e.setText("Editer");
e.addActionListener(this);
e.setActionCommand("EDITER");
BuPanel pnEst = new BuPanel();
pnEst.setLayout(new BuButtonLayout(5, BuButtonLayout.TOP));
pnEst.add(e);
princ.add(pnEst, BuBorderLayout.EAST);
princ.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
pane.addTab("Projet", null, princ);
pane.addTab(
"Propriétés calcul",
new FDicoEntitePanel(proj_.getRefluxParametres().getDicoParam()));
setContentPane(pane);
pane.setSelectedIndex(0);
}
public void actionPerformed(ActionEvent _ae)
{
String com = _ae.getActionCommand();
if ("EDITER".equals(com))
{
FudaaEditor.getInstance().edit(proj_.getRefluxParametres().getFile());
}
}
}
--- NEW FILE: TrRefluxImplHelper.java ---
/*
* @file TrRefluxImplHelper.java
* @creation 10 juin 2003
* @modification $Date: 2003/07/04 15:50:54 $
* @license GNU General Public License 2
* @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne
* @mail de...@fu...
*/
package org.fudaa.fudaa.tr.reflux;
import java.io.File;
import com.memoire.bu.BuMenuItem;
import com.memoire.bu.BuTaskOperation;
import org.fudaa.dodico.commun.DodicoPreferences;
import org.fudaa.dodico.commun.ProgressionBuAdapter;
import org.fudaa.dodico.reflux.io.INPFileFormat;
import org.fudaa.fudaa.commun.exec.FudaaExecServerManager;
import org.fudaa.fudaa.ressource.FudaaResource;
import org.fudaa.fudaa.tr.TrImplHelper;
import org.fudaa.fudaa.tr.TrImplementation;
import org.fudaa.fudaa.tr.TrPreferences;
import org.fudaa.fudaa.tr.TrProjet;
/**
* @author deniger
* @version $Id: TrRefluxImplHelper.java,v 1.1 2003/07/04 15:50:54 deniger Exp $
*/
public class TrRefluxImplHelper extends TrImplHelper
{
public static FudaaExecServerManager SERVEURS= new FudaaExecServerManager(TrPreferences.TR, DodicoPreferences.buildPrefKey(TrProjet.REFLUX_ID,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 + TrProjet.TELEMAC_ID);
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,
INPFileFormat.getInstance(),
new ProgressionBuAdapter(this),
getImpl());
setProgression(90);
if (projet != null)
{
getImpl().addProjet(projet);
}
}
}
.start();
}
}
/**
*
*/
public String getID()
{
return TrProjet.REFLUX_ID;
}
/**
*
*/
public FudaaExecServerManager getServersMng()
{
return SERVEURS;
}
}
--- NEW FILE: TrRefluxParametres.java ---
/*
* @file TrRefluxParametres.java
* @creation 10 juin 2003
* @modification $Date: 2003/07/04 15:50:54 $
* @license GNU General Public License 2
* @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne
* @mail de...@fu...
*/
package org.fudaa.fudaa.tr.reflux;
import java.io.File;
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.reflux.io.INPFileFormat;
import org.fudaa.dodico.reflux.io.INPInterface;
import org.fudaa.fudaa.commun.FudaaUI;
/**
* @author deniger
* @version $Id: TrRefluxParametres.java,v 1.1 2003/07/04 15:50:54 deniger Exp $
*/
public class TrRefluxParametres
{
File fINP_;
String title_;
FudaaUI ui_;
DicoParams dicoParam_;
/**
*
*/
public TrRefluxParametres(INPInterface _inter,FudaaUI _ui)
{
super();
ui_ = _ui;
}
public final static TrRefluxParametres init(
File _f,
INPFileFormat _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(inter,_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(),inter.getDicoModel());
return r;
}
public String getTitle()
{
return title_;
}
public File getFile()
{
return fINP_;
}
public File enregistrerUniqueSousRepertoire(File _f)
{
if (!_f.isDirectory())
{
ui_.error(
"Répertoire",
"Le fichier"
+ " "
+ _f.getAbsolutePath()
+ " "
+ "n'est pas "
+ "un répertoire");
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,
title_
+ "_"
+ i
+ "."
+ 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;
}
}
/**
*
*/
public DicoParams getDicoParam()
{
return dicoParam_;
}
}
--- NEW FILE: TrRefluxProjet.java ---
/*
* @file TrRefluxProjet.java
* @creation 10 juin 2003
* @modification $Date: 2003/07/04 15:50:54 $
* @license GNU General Public License 2
* @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne
* @mail de...@fu...
*/
package org.fudaa.fudaa.tr.reflux;
import java.awt.Dimension;
import java.io.File;
import com.memoire.bu.BuInformationsDocument;
import com.memoire.bu.BuTaskOperation;
import org.fudaa.dodico.calcul.CalculLauncher;
import org.fudaa.dodico.commun.ProgressionBuAdapter;
import org.fudaa.dodico.commun.ProgressionInterface;
import org.fudaa.dodico.h2d.H2dParametres;
import org.fudaa.dodico.reflux.RefluxExec;
import org.fudaa.dodico.reflux.io.INPFileFormat;
import org.fudaa.fudaa.commun.FudaaUI;
import org.fudaa.fudaa.commun.calcul.FudaaCalculAction;
import org.fudaa.fudaa.commun.calcul.FudaaCalculOp;
import org.fudaa.fudaa.tr.TrImplementation;
import org.fudaa.fudaa.tr.TrProjet;
/**
* @author deniger
* @version $Id: TrRefluxProjet.java,v 1.1 2003/07/04 15:50:54 deniger Exp $
*/
public class TrRefluxProjet implements TrProjet
{
BuInformationsDocument infos_;
TrRefluxParametres params_;
TrRefluxFilleProjet fille_;
TrImplementation impl_;
FudaaCalculAction calculActions_;
/**
*
*/
public TrRefluxProjet(TrImplementation _impl,TrRefluxParametres _params)
{
impl_ = _impl;
params_=_params;
calculActions_=new FudaaCalculAction(this,true);
}
public static TrRefluxProjet init(
File _file,
INPFileFormat _fileFormat,
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_;
}
public void save()
{
}
/**
*
*/
public BuInformationsDocument getInformationsDocument()
{
if (infos_ == null)
infos_ = new BuInformationsDocument();
return infos_;
}
/**
*
*/
public H2dParametres getParametres()
{
return null;
}
/**
*
*/
public void enregistrerParametres()
{
}
public File enregistrerParametresUniqueSousRep(File _d)
{
return params_.enregistrerUniqueSousRepertoire(_d);
}
/**
*
*/
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_);
}
public void close()
{
// if (isModified())
// {
// if (FudaaLib
// .showConfirmation(
// impl_,
// "Sauvegarder les données",
// "Les données ont été modifiées,\nVoulez-vous sauvegarder les données ?"))
// this.enregistrerParametres();
// }
// else
// {
// System.out.println("données non modifiées");
// }
fille_.dispose();
fille_ = null;
impl_.closeProjet(this);
}
/**
*
*/
public String getTitle()
{
return params_.getTitle();
}
/**
*
*/
public CalculLauncher actionCalcul()
{
FudaaCalculOp op=new FudaaCalculOp(new RefluxExec())
{
public File proceedParamFile(ProgressionInterface _inter)
{
return params_.getFile();
}
/**
* @return
*/
protected String getTaskName()
{
return "lancement reflux";
}
};
op.setImpl(impl_);
return op;
}
/**
*
*/
/**
*
*/
public String getID()
{
return TrProjet.REFLUX_ID;
}
/**
*
*/
public File getParamsFile()
{
return getRefluxParametres().getFile();
}
/**
*
*/
public FudaaUI getUI()
{
return impl_;
}
/**
* @return
*/
public FudaaCalculAction getCalculActions()
{
return calculActions_;
}
/**
*
*/
public void saveAs()
{
}
/**
*
*/
public void saveCopy()
{
}
}
|
|
From: <de...@us...> - 2003-07-04 15:50:56
|
Update of /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr
In directory sc8-pr-cvs1:/tmp/cvs-serv15430
Added Files:
TrCodePanel.java
Log Message:
Maj
--- NEW FILE: TrCodePanel.java ---
/*
* @file TrTelemacCodePanel.java
* @creation 3 juin 2003
* @modification $Date: 2003/07/04 15:50:53 $
* @license GNU General Public License 2
* @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne
* @mail de...@fu...
*/
package org.fudaa.fudaa.tr;
import java.awt.event.ActionEvent;
import java.io.File;
import java.util.ArrayList;
import java.util.StringTokenizer;
import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextField;
import com.memoire.bu.BuBorderLayout;
import com.memoire.bu.BuButton;
import com.memoire.bu.BuButtonLayout;
import com.memoire.bu.BuCheckBox;
import com.memoire.bu.BuComboBox;
import com.memoire.bu.BuGridLayout;
import com.memoire.bu.BuPanel;
import org.fudaa.dodico.commun.DodicoLib;
import org.fudaa.dodico.commun.DodicoPreferences;
import org.fudaa.ebli.dialog.EbliSimpleDialogPanel;
import org.fudaa.fudaa.commun.FudaaLib;
import org.fudaa.fudaa.commun.exec.FudaaExec;
import org.fudaa.fudaa.commun.exec.FudaaExecCellRenderer;
import org.fudaa.fudaa.commun.exec.FudaaExecComboBoxEditor;
import org.fudaa.fudaa.commun.exec.FudaaExecServerManager;
import org.fudaa.fudaa.tr.telemac.TrTelemacCodePrefDialogPanel;
/**
* @author deniger
* @version $Id: TrCodePanel.java,v 1.1 2003/07/04 15:50:53 deniger Exp $
*/
public class TrCodePanel extends EbliSimpleDialogPanel
{
File fParams_;
JComboBox cbCode_;
JTextField txtOption_;
FudaaExecServerManager mng_;
BuCheckBox cbLogFrame_;
/**
*
*/
public TrCodePanel(TrProjet _proj, FudaaExecServerManager _mng)
{
super();
mng_ = _mng;
fParams_ = _proj.getParamsFile();
addEmptyBorder(10);
setLayout(new BuBorderLayout(5, 5));
JPanel pn = new BuPanel();
pn.setLayout(new BuGridLayout(3, 25, 5, true, true, true, true));
addLabel(pn, "Code ");
addLabel(pn, "Options");
addLabel(pn, "Fichier");
cbCode_ = new BuComboBox();
cbCode_.setRenderer(new FudaaExecCellRenderer());
cbCode_.setEditor(new FudaaExecComboBoxEditor(mng_));
cbCode_.setEditable(true);
cbCode_.setModel(mng_.createComboBoxModel());
pn.add(cbCode_);
txtOption_ = addStringText(pn);
JLabel l = addLabel(pn, fParams_.getName());
l.setToolTipText(fParams_.getAbsolutePath());
cbLogFrame_ = new BuCheckBox("Fenêtre de log");
pn.add(cbLogFrame_);
BuPanel pnBt = new BuPanel();
pnBt.setLayout(new BuButtonLayout(5, BuButtonLayout.LEFT));
JButton bt = new BuButton();
bt.setText("Modifier Valeurs par défaut");
bt.setToolTipText("Modifier les valeurs par defaut");
bt.setActionCommand("MODIF_DEFAULT");
bt.addActionListener(this);
pnBt.add(bt);
add(pn, BuBorderLayout.CENTER);
add(pnBt, BuBorderLayout.SOUTH);
valide();
init();
}
private void init()
{
cbLogFrame_.setSelected(
TrPreferences.TR.getBooleanProperty(
DodicoPreferences.buildPrefKey(
TrProjet.TELEMAC_ID,
TrPreferences.KEY_SERVEUR_SHOW_LOG),
true));
cbCode_.setSelectedItem(mng_.getDefaultServeur());
txtOption_.setText(DodicoLib.EMPTY_STRING);
}
public String[] launchParams()
{
ArrayList l = new ArrayList(5);
if (cbCode_.getSelectedItem() == null)
return null;
StringTokenizer tk =
new StringTokenizer(
((FudaaExec) cbCode_.getSelectedItem()).getExecCommand(),
" ");
while (tk.hasMoreElements())
{
l.add(tk.nextToken());
}
tk = new StringTokenizer(txtOption_.getText(), " ");
while (tk.hasMoreElements())
{
l.add(tk.nextToken());
}
l.add(fParams_.getAbsolutePath());
String[] r = DodicoLib.enTableau(l);
if (FudaaLib.DEBUG)
DodicoLib.printStringArray(r);
return r;
}
public String getExeCmd()
{
return ((FudaaExec) cbCode_.getSelectedItem()).getExecCommand();
}
public String getOptions()
{
return txtOption_.getText();
}
public boolean isLogFrame()
{
return cbLogFrame_.isSelected();
}
/**
*
*/
public void actionPerformed(ActionEvent _evt)
{
if (_evt.getActionCommand().equals("MODIF_DEFAULT"))
{
int r =
new TrTelemacCodePrefDialogPanel(mng_).afficheModale(
this,
"Valeur par defaut de telemac");
if (EbliSimpleDialogPanel.isOkResponse(r))
{
mng_.writePref();
cbCode_.setSelectedItem(mng_.getDefaultServeur());
valide();
}
}
super.actionPerformed(_evt);
}
/**
*
*/
public boolean valide()
{
boolean v = mng_.getFudaaExecNb() > 0;
if (v)
{
cancelErrorText();
}
else
{
setErrorText("Pas d'éxecutable");
}
return v;
}
}
|
|
From: <de...@us...> - 2003-07-04 15:49:52
|
Update of /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/reflux In directory sc8-pr-cvs1:/tmp/cvs-serv15283/reflux Log Message: Directory /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/reflux added to the repository |
|
From: <de...@us...> - 2003-07-04 15:49:23
|
Update of /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/data
In directory sc8-pr-cvs1:/tmp/cvs-serv15211/data
Added Files:
TrMaillage.java
Log Message:
Maillage pour fudaa
--- NEW FILE: TrMaillage.java ---
/*
* @file TrMaillage.java
* @creation 30 juin 2003
* @modification $Date: 2003/07/04 15:49:20 $
* @license GNU General Public License 2
* @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne
* @mail de...@fu...
*/
package org.fudaa.fudaa.tr.data;
import gnu.trove.TIntObjectHashMap;
import org.fudaa.dodico.h2d.H2dElement;
import org.fudaa.dodico.h2d.H2dMaillage;
import org.fudaa.dodico.h2d.H2dPoint;
import org.fudaa.ebli.calque.ZModeleLongPolygone;
import org.fudaa.ebli.calque.ZModeleMaillage;
import org.fudaa.ebli.calque.ZModeleMaillageElement;
import org.fudaa.ebli.calque.ZModelePoint;
import org.fudaa.ebli.calque.ZModelePolygone;
import org.fudaa.ebli.geometrie.GrBoite;
import org.fudaa.ebli.geometrie.GrPoint;
import org.fudaa.ebli.geometrie.GrPolygone;
import org.fudaa.ebli.geometrie.VecteurGrPoint;
import org.fudaa.ebli.trace.PTrait;
/**
* @author deniger
* @version $Id: TrMaillage.java,v 1.1 2003/07/04 15:49:20 deniger Exp $
*/
public class TrMaillage
{
H2dMaillage mail_;
/**
* @param _pts
* @param _elts
*/
public TrMaillage(H2dMaillage _maill)
{
mail_=_maill;
}
/**
*
*/
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 TrMaillage.this.point(_p, _i);
}
/**
*
*/
public GrBoite getDomaine()
{
return TrMaillage.this.getDomaine();
}
/**
*
*/
public int getNombre()
{
return TrMaillage.this.mail_.getPtsNb();
}
/**
*
*/
public Object getObject(int _ind)
{
throw new UnsupportedOperationException("methode non implantée");
}
}
protected class ModelePolygone implements ZModelePolygone
{
/**
*
*/
public boolean polygone(GrPolygone _p, int _i)
{
return TrMaillage.this.polygone(_p, _i);
}
/**
*
*/
public GrBoite getDomaine()
{
return TrMaillage.this.getDomaine();
}
/**
*
*/
public int getNombre()
{
return TrMaillage.this.mail_.getEltNb();
}
/**
*
*/
public Object getObject(int _ind)
{
throw new UnsupportedOperationException("methode non implantée");
}
/**
*
*/
public int nbPoints(int i)
{
return TrMaillage.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);
}
}
}
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 TrMaillage.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);
return r;
}
}
/**
*
*/
public int getNbPointForPolygoneIdx(int _idx)
{
return TrMaillage.this.mail_.getPtsFrontiere().getPtNbForBord(_idx);
}
/**
*
*/
public int getPolygoneNb()
{
return TrMaillage.this.mail_.getPtsFrontiere().getBordNb();
}
/**
*
*/
public boolean point(GrPoint _p, int _polygoneIdx, int _pointIdx)
{
H2dPoint pt=mail_.getPt(TrMaillage.this.mail_.getPtsFrontiere().getPtIdxForBord(_polygoneIdx,_pointIdx));
initGrPoint(pt, _p);
return true;
}
/**
*
*/
public GrBoite getDomaine()
{
return TrMaillage.this.getDomaine();
}
/**
*
*/
public int getNombre()
{
return TrMaillage.this.mail_.getPtsFrontiere().getBordNb();
}
/**
*
*/
public Object getObject(int _ind)
{
return null;
}
}
/**
*
*/
public boolean point(GrPoint _p, int _i)
{
initGrPoint(mail_.getPt(_i), _p);
return true;
}
/**
*
*/
public boolean polygone(GrPolygone _poly, int _i)
{
initGrPolygone(this.mail_, mail_.getElement(_i), _poly);
return true;
}
}
|
|
From: <de...@us...> - 2003-07-04 15:47:44
|
Update of /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/data In directory sc8-pr-cvs1:/tmp/cvs-serv15038/data Log Message: Directory /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/data added to the repository |
Update of /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/lido/ihmhelper/gestion
In directory sc8-pr-cvs1:/tmp/cvs-serv14621a/ihmhelper/gestion
Modified Files:
LidoPH_Apport.java LidoPH_Base.java LidoPH_Bief.java
LidoPH_Calcul.java LidoPH_Laisse.java LidoPH_Limite.java
LidoPH_Loiclm.java LidoPH_Loisng.java LidoPH_Noeud.java
LidoPH_PermSection2.java LidoPH_PermSection3.java
LidoPH_Perte.java LidoPH_Profil.java LidoPH_Singularite.java
LidoParamsHelper.java
Log Message:
VERSION 1.4
Index: LidoPH_Apport.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/lido/ihmhelper/gestion/LidoPH_Apport.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** LidoPH_Apport.java 1 Apr 2003 16:13:17 -0000 1.5
--- LidoPH_Apport.java 4 Jul 2003 15:46:50 -0000 1.6
***************
*** 11,14 ****
--- 11,15 ----
import org.fudaa.fudaa.commun.*;
+ import org.fudaa.fudaa.commun.projet.*;
import org.fudaa.fudaa.lido.*;
Index: LidoPH_Base.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/lido/ihmhelper/gestion/LidoPH_Base.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** LidoPH_Base.java 1 Apr 2003 16:13:16 -0000 1.5
--- LidoPH_Base.java 4 Jul 2003 15:46:50 -0000 1.6
***************
*** 11,14 ****
--- 11,15 ----
import org.fudaa.fudaa.commun.*;
+ import org.fudaa.fudaa.commun.projet.*;
import org.fudaa.fudaa.lido.*;
import java.util.*;
Index: LidoPH_Bief.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/lido/ihmhelper/gestion/LidoPH_Bief.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** LidoPH_Bief.java 1 Apr 2003 16:13:03 -0000 1.6
--- LidoPH_Bief.java 4 Jul 2003 15:46:50 -0000 1.7
***************
*** 11,14 ****
--- 11,15 ----
import org.fudaa.fudaa.commun.*;
+ import org.fudaa.fudaa.commun.projet.*;
import org.fudaa.fudaa.lido.*;
Index: LidoPH_Calcul.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/lido/ihmhelper/gestion/LidoPH_Calcul.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** LidoPH_Calcul.java 1 Apr 2003 16:13:11 -0000 1.5
--- LidoPH_Calcul.java 4 Jul 2003 15:46:50 -0000 1.6
***************
*** 11,14 ****
--- 11,15 ----
import org.fudaa.fudaa.commun.*;
+ import org.fudaa.fudaa.commun.projet.*;
import org.fudaa.fudaa.lido.*;
Index: LidoPH_Laisse.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/lido/ihmhelper/gestion/LidoPH_Laisse.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** LidoPH_Laisse.java 1 Apr 2003 16:13:13 -0000 1.5
--- LidoPH_Laisse.java 4 Jul 2003 15:46:50 -0000 1.6
***************
*** 11,14 ****
--- 11,15 ----
import org.fudaa.fudaa.commun.*;
+ import org.fudaa.fudaa.commun.projet.*;
import org.fudaa.fudaa.lido.*;
Index: LidoPH_Limite.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/lido/ihmhelper/gestion/LidoPH_Limite.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** LidoPH_Limite.java 1 Apr 2003 16:13:05 -0000 1.5
--- LidoPH_Limite.java 4 Jul 2003 15:46:50 -0000 1.6
***************
*** 11,14 ****
--- 11,15 ----
import org.fudaa.fudaa.commun.*;
+ import org.fudaa.fudaa.commun.projet.*;
import org.fudaa.fudaa.lido.*;
Index: LidoPH_Loiclm.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/lido/ihmhelper/gestion/LidoPH_Loiclm.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** LidoPH_Loiclm.java 1 Apr 2003 16:13:15 -0000 1.6
--- LidoPH_Loiclm.java 4 Jul 2003 15:46:50 -0000 1.7
***************
*** 17,22 ****
import org.fudaa.dodico.corba.lido.SParametresCondLimBlocCLM;
import org.fudaa.dodico.corba.lido.SParametresCondLimPointLigneCLM;
! import org.fudaa.fudaa.commun.FudaaParamEvent;
! import org.fudaa.fudaa.commun.FudaaProjet;
import org.fudaa.fudaa.lido.LidoResource;
--- 17,22 ----
import org.fudaa.dodico.corba.lido.SParametresCondLimBlocCLM;
import org.fudaa.dodico.corba.lido.SParametresCondLimPointLigneCLM;
! import org.fudaa.fudaa.commun.projet.FudaaParamEvent;
! import org.fudaa.fudaa.commun.projet.FudaaProjet;
import org.fudaa.fudaa.lido.LidoResource;
Index: LidoPH_Loisng.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/lido/ihmhelper/gestion/LidoPH_Loisng.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** LidoPH_Loisng.java 1 Apr 2003 16:13:13 -0000 1.5
--- LidoPH_Loisng.java 4 Jul 2003 15:46:50 -0000 1.6
***************
*** 11,14 ****
--- 11,15 ----
import org.fudaa.fudaa.commun.*;
+ import org.fudaa.fudaa.commun.projet.*;
import org.fudaa.fudaa.lido.*;
Index: LidoPH_Noeud.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/lido/ihmhelper/gestion/LidoPH_Noeud.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** LidoPH_Noeud.java 1 Apr 2003 16:13:17 -0000 1.5
--- LidoPH_Noeud.java 4 Jul 2003 15:46:50 -0000 1.6
***************
*** 11,14 ****
--- 11,15 ----
import org.fudaa.fudaa.commun.*;
+ import org.fudaa.fudaa.commun.projet.*;
import org.fudaa.fudaa.lido.*;
Index: LidoPH_PermSection2.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/lido/ihmhelper/gestion/LidoPH_PermSection2.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** LidoPH_PermSection2.java 1 Apr 2003 16:12:59 -0000 1.5
--- LidoPH_PermSection2.java 4 Jul 2003 15:46:50 -0000 1.6
***************
*** 11,14 ****
--- 11,15 ----
import org.fudaa.fudaa.commun.*;
+ import org.fudaa.fudaa.commun.projet.*;
import org.fudaa.fudaa.lido.*;
Index: LidoPH_PermSection3.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/lido/ihmhelper/gestion/LidoPH_PermSection3.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** LidoPH_PermSection3.java 1 Apr 2003 16:13:06 -0000 1.5
--- LidoPH_PermSection3.java 4 Jul 2003 15:46:50 -0000 1.6
***************
*** 11,14 ****
--- 11,15 ----
import org.fudaa.fudaa.commun.*;
+ import org.fudaa.fudaa.commun.projet.*;
import org.fudaa.fudaa.lido.*;
Index: LidoPH_Perte.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/lido/ihmhelper/gestion/LidoPH_Perte.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** LidoPH_Perte.java 1 Apr 2003 16:13:09 -0000 1.5
--- LidoPH_Perte.java 4 Jul 2003 15:46:50 -0000 1.6
***************
*** 11,14 ****
--- 11,15 ----
import org.fudaa.fudaa.commun.*;
+ import org.fudaa.fudaa.commun.projet.*;
import org.fudaa.fudaa.lido.*;
Index: LidoPH_Profil.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/lido/ihmhelper/gestion/LidoPH_Profil.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** LidoPH_Profil.java 1 Apr 2003 16:13:13 -0000 1.5
--- LidoPH_Profil.java 4 Jul 2003 15:46:50 -0000 1.6
***************
*** 11,14 ****
--- 11,15 ----
import org.fudaa.fudaa.commun.*;
+ import org.fudaa.fudaa.commun.projet.*;
import org.fudaa.fudaa.lido.*;
Index: LidoPH_Singularite.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/lido/ihmhelper/gestion/LidoPH_Singularite.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** LidoPH_Singularite.java 1 Apr 2003 16:13:10 -0000 1.6
--- LidoPH_Singularite.java 4 Jul 2003 15:46:50 -0000 1.7
***************
*** 11,14 ****
--- 11,15 ----
import org.fudaa.fudaa.commun.*;
+ import org.fudaa.fudaa.commun.projet.*;
import org.fudaa.fudaa.lido.*;
Index: LidoParamsHelper.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/lido/ihmhelper/gestion/LidoParamsHelper.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** LidoParamsHelper.java 1 Apr 2003 16:13:00 -0000 1.5
--- LidoParamsHelper.java 4 Jul 2003 15:46:50 -0000 1.6
***************
*** 10,18 ****
package org.fudaa.fudaa.lido.ihmhelper.gestion;
import com.memoire.bu.BuInformationsDocument;
! import org.fudaa.fudaa.commun.*;
! import org.fudaa.fudaa.lido.*;
! import org.fudaa.dodico.corba.lido.*;
! import java.util.*;
/**
--- 10,62 ----
[...1206 lines suppressed...]
! old = null;
}
+ else
+ // hydros
+ if ((clm.condLimites[i].typLoi == LidoResource.LIMITE.HYDRO))
+ {
+ SParametresCondLimPointLigneCLM[] old = clm.condLimites[i].point;
+ clm.condLimites[i].point = new SParametresCondLimPointLigneCLM[2];
+
+ clm.condLimites[i].point[0] = new SParametresCondLimPointLigneCLM();
+ clm.condLimites[i].point[0].tLim = 1.;
+ clm.condLimites[i].point[0].qLim = old[1].qLim;
+ clm.condLimites[i].point[1] = new SParametresCondLimPointLigneCLM();
+ clm.condLimites[i].point[1].tLim = 2.;
+ clm.condLimites[i].point[1].qLim = old[1].qLim;
+ clm.condLimites[i].nbPoints = 2;
+ old = null;
+ }
}
}
|
Update of /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/lido/ihmhelper In directory sc8-pr-cvs1:/tmp/cvs-serv14621a/ihmhelper Modified Files: LidoIHMParams.java LidoIHM_Apport.java LidoIHM_Base.java LidoIHM_Bief.java LidoIHM_Calage.java LidoIHM_Laisse.java LidoIHM_Limite.java LidoIHM_Noeud.java LidoIHM_Paramcalcul.java LidoIHM_Perte.java LidoIHM_Planimetrage.java LidoIHM_Profil.java LidoIHM_Reseau.java LidoIHM_Resultatenlong.java LidoIHM_Resultaterreurs.java LidoIHM_Resultatlaisse.java LidoIHM_Resultatprofil.java LidoIHM_Sectioncalcul.java LidoIHM_Singularite.java LidoIHM_Vartemp.java Log Message: VERSION 1.4 Index: LidoIHMParams.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/lido/ihmhelper/LidoIHMParams.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** LidoIHMParams.java 1 Apr 2003 16:13:39 -0000 1.5 --- LidoIHMParams.java 4 Jul 2003 15:46:50 -0000 1.6 *************** *** 11,14 **** --- 11,15 ---- import org.fudaa.fudaa.commun.*; + import org.fudaa.fudaa.commun.projet.*; import org.fudaa.dodico.corba.lido.*; import org.fudaa.dodico.lido.*; Index: LidoIHM_Apport.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/lido/ihmhelper/LidoIHM_Apport.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** LidoIHM_Apport.java 1 Apr 2003 16:13:38 -0000 1.6 --- LidoIHM_Apport.java 4 Jul 2003 15:46:50 -0000 1.7 *************** *** 11,14 **** --- 11,15 ---- import org.fudaa.fudaa.commun.*; + import org.fudaa.fudaa.commun.projet.*; import org.fudaa.dodico.corba.lido.*; import com.memoire.bu.*; Index: LidoIHM_Base.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/lido/ihmhelper/LidoIHM_Base.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** LidoIHM_Base.java 1 Apr 2003 16:13:38 -0000 1.5 --- LidoIHM_Base.java 4 Jul 2003 15:46:50 -0000 1.6 *************** *** 13,16 **** --- 13,17 ---- import org.fudaa.fudaa.commun.*; + import org.fudaa.fudaa.commun.projet.*; import org.fudaa.fudaa.lido.*; import org.fudaa.fudaa.lido.editor.*; Index: LidoIHM_Bief.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/lido/ihmhelper/LidoIHM_Bief.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** LidoIHM_Bief.java 1 Apr 2003 16:13:37 -0000 1.6 --- LidoIHM_Bief.java 4 Jul 2003 15:46:50 -0000 1.7 *************** *** 11,14 **** --- 11,15 ---- import org.fudaa.fudaa.commun.*; + import org.fudaa.fudaa.commun.projet.*; import org.fudaa.dodico.corba.lido.*; import com.memoire.bu.*; Index: LidoIHM_Calage.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/lido/ihmhelper/LidoIHM_Calage.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** LidoIHM_Calage.java 1 Apr 2003 16:13:36 -0000 1.6 --- LidoIHM_Calage.java 4 Jul 2003 15:46:50 -0000 1.7 *************** *** 11,14 **** --- 11,15 ---- import org.fudaa.fudaa.commun.*; + import org.fudaa.fudaa.commun.projet.*; import org.fudaa.dodico.corba.lido.*; import com.memoire.bu.*; Index: LidoIHM_Laisse.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/lido/ihmhelper/LidoIHM_Laisse.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** LidoIHM_Laisse.java 1 Apr 2003 16:13:38 -0000 1.6 --- LidoIHM_Laisse.java 4 Jul 2003 15:46:50 -0000 1.7 *************** *** 11,14 **** --- 11,15 ---- import org.fudaa.fudaa.commun.*; + import org.fudaa.fudaa.commun.projet.*; import org.fudaa.dodico.corba.lido.*; import com.memoire.bu.*; Index: LidoIHM_Limite.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/lido/ihmhelper/LidoIHM_Limite.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** LidoIHM_Limite.java 1 Apr 2003 16:13:38 -0000 1.6 --- LidoIHM_Limite.java 4 Jul 2003 15:46:50 -0000 1.7 *************** *** 11,14 **** --- 11,15 ---- import org.fudaa.fudaa.commun.*; + import org.fudaa.fudaa.commun.projet.*; import org.fudaa.dodico.corba.lido.*; import com.memoire.bu.*; Index: LidoIHM_Noeud.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/lido/ihmhelper/LidoIHM_Noeud.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** LidoIHM_Noeud.java 1 Apr 2003 16:13:36 -0000 1.6 --- LidoIHM_Noeud.java 4 Jul 2003 15:46:50 -0000 1.7 *************** *** 11,14 **** --- 11,15 ---- import org.fudaa.fudaa.commun.*; + import org.fudaa.fudaa.commun.projet.*; import org.fudaa.dodico.corba.lido.*; import com.memoire.bu.*; Index: LidoIHM_Paramcalcul.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/lido/ihmhelper/LidoIHM_Paramcalcul.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** LidoIHM_Paramcalcul.java 1 Apr 2003 16:13:37 -0000 1.5 --- LidoIHM_Paramcalcul.java 4 Jul 2003 15:46:50 -0000 1.6 *************** *** 11,14 **** --- 11,15 ---- import org.fudaa.fudaa.commun.*; + import org.fudaa.fudaa.commun.projet.*; import org.fudaa.dodico.corba.lido.*; import org.fudaa.ebli.ressource.*; Index: LidoIHM_Perte.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/lido/ihmhelper/LidoIHM_Perte.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** LidoIHM_Perte.java 1 Apr 2003 16:13:37 -0000 1.6 --- LidoIHM_Perte.java 4 Jul 2003 15:46:50 -0000 1.7 *************** *** 11,14 **** --- 11,15 ---- import org.fudaa.fudaa.commun.*; + import org.fudaa.fudaa.commun.projet.*; import org.fudaa.dodico.corba.lido.*; import org.fudaa.ebli.ressource.*; Index: LidoIHM_Planimetrage.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/lido/ihmhelper/LidoIHM_Planimetrage.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** LidoIHM_Planimetrage.java 1 Apr 2003 16:13:38 -0000 1.5 --- LidoIHM_Planimetrage.java 4 Jul 2003 15:46:50 -0000 1.6 *************** *** 11,14 **** --- 11,15 ---- import org.fudaa.fudaa.commun.*; + import org.fudaa.fudaa.commun.projet.*; import org.fudaa.dodico.corba.lido.*; import com.memoire.bu.*; Index: LidoIHM_Profil.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/lido/ihmhelper/LidoIHM_Profil.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** LidoIHM_Profil.java 1 Apr 2003 16:13:39 -0000 1.6 --- LidoIHM_Profil.java 4 Jul 2003 15:46:50 -0000 1.7 *************** *** 11,14 **** --- 11,15 ---- import org.fudaa.fudaa.commun.*; + import org.fudaa.fudaa.commun.projet.*; import org.fudaa.dodico.corba.lido.*; import org.fudaa.dodico.lido.*; Index: LidoIHM_Reseau.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/lido/ihmhelper/LidoIHM_Reseau.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** LidoIHM_Reseau.java 1 Apr 2003 16:13:38 -0000 1.5 --- LidoIHM_Reseau.java 4 Jul 2003 15:46:50 -0000 1.6 *************** *** 11,14 **** --- 11,15 ---- import org.fudaa.fudaa.commun.*; + import org.fudaa.fudaa.commun.projet.*; import org.fudaa.dodico.corba.lido.*; import com.memoire.bu.*; Index: LidoIHM_Resultatenlong.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/lido/ihmhelper/LidoIHM_Resultatenlong.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** LidoIHM_Resultatenlong.java 1 Apr 2003 16:13:39 -0000 1.5 --- LidoIHM_Resultatenlong.java 4 Jul 2003 15:46:50 -0000 1.6 *************** *** 11,14 **** --- 11,15 ---- import org.fudaa.fudaa.commun.*; + import org.fudaa.fudaa.commun.projet.*; import org.fudaa.dodico.corba.lido.*; import com.memoire.bu.*; Index: LidoIHM_Resultaterreurs.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/lido/ihmhelper/LidoIHM_Resultaterreurs.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** LidoIHM_Resultaterreurs.java 1 Apr 2003 16:13:37 -0000 1.5 --- LidoIHM_Resultaterreurs.java 4 Jul 2003 15:46:50 -0000 1.6 *************** *** 14,17 **** --- 14,19 ---- import org.fudaa.fudaa.lido.*; import org.fudaa.fudaa.commun.*; + import org.fudaa.fudaa.commun.projet.*; + import javax.swing.*; import javax.swing.border.*; Index: LidoIHM_Resultatlaisse.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/lido/ihmhelper/LidoIHM_Resultatlaisse.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** LidoIHM_Resultatlaisse.java 1 Apr 2003 16:13:37 -0000 1.6 --- LidoIHM_Resultatlaisse.java 4 Jul 2003 15:46:50 -0000 1.7 *************** *** 11,14 **** --- 11,15 ---- import org.fudaa.fudaa.commun.*; + import org.fudaa.fudaa.commun.projet.*; import org.fudaa.dodico.corba.lido.*; import com.memoire.bu.*; Index: LidoIHM_Resultatprofil.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/lido/ihmhelper/LidoIHM_Resultatprofil.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** LidoIHM_Resultatprofil.java 1 Apr 2003 16:13:37 -0000 1.6 --- LidoIHM_Resultatprofil.java 4 Jul 2003 15:46:50 -0000 1.7 *************** *** 11,14 **** --- 11,15 ---- import org.fudaa.fudaa.commun.*; + import org.fudaa.fudaa.commun.projet.*; import org.fudaa.dodico.corba.lido.*; import org.fudaa.ebli.ressource.*; Index: LidoIHM_Sectioncalcul.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/lido/ihmhelper/LidoIHM_Sectioncalcul.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** LidoIHM_Sectioncalcul.java 1 Apr 2003 16:13:39 -0000 1.6 --- LidoIHM_Sectioncalcul.java 4 Jul 2003 15:46:50 -0000 1.7 *************** *** 11,14 **** --- 11,15 ---- import org.fudaa.fudaa.commun.*; + import org.fudaa.fudaa.commun.projet.*; import org.fudaa.dodico.corba.lido.*; import org.fudaa.ebli.ressource.*; Index: LidoIHM_Singularite.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/lido/ihmhelper/LidoIHM_Singularite.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** LidoIHM_Singularite.java 1 Apr 2003 16:13:38 -0000 1.6 --- LidoIHM_Singularite.java 4 Jul 2003 15:46:50 -0000 1.7 *************** *** 11,14 **** --- 11,15 ---- import org.fudaa.fudaa.commun.*; + import org.fudaa.fudaa.commun.projet.*; import org.fudaa.dodico.corba.lido.*; import org.fudaa.ebli.ressource.*; Index: LidoIHM_Vartemp.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/lido/ihmhelper/LidoIHM_Vartemp.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** LidoIHM_Vartemp.java 1 Apr 2003 16:13:38 -0000 1.5 --- LidoIHM_Vartemp.java 4 Jul 2003 15:46:50 -0000 1.6 *************** *** 11,14 **** --- 11,15 ---- import org.fudaa.fudaa.commun.*; + import org.fudaa.fudaa.commun.projet.*; import org.fudaa.dodico.corba.lido.*; import org.fudaa.ebli.ressource.*; |
|
From: <de...@us...> - 2003-07-04 15:46:53
|
Update of /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/lido/visu In directory sc8-pr-cvs1:/tmp/cvs-serv14621a/visu Modified Files: LidoVisuLignedeau.java Log Message: VERSION 1.4 Index: LidoVisuLignedeau.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/lido/visu/LidoVisuLignedeau.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** LidoVisuLignedeau.java 1 Apr 2003 16:13:44 -0000 1.4 --- LidoVisuLignedeau.java 4 Jul 2003 15:46:50 -0000 1.5 *************** *** 15,18 **** --- 15,19 ---- import org.fudaa.ebli.graphe.*; import org.fudaa.fudaa.commun.*; + import org.fudaa.fudaa.commun.projet.*; import org.fudaa.ebli.dialog.*; import org.fudaa.fudaa.lido.*; |
Update of /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/lido/graphe
In directory sc8-pr-cvs1:/tmp/cvs-serv14621a/graphe
Modified Files:
LidoGrapheProfil.java LidoGrapheSeuilDenoye.java
LidoGrapheSeuilNoye.java LidoGrapheSingulariteCourbe.java
Log Message:
VERSION 1.4
Index: LidoGrapheProfil.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/lido/graphe/LidoGrapheProfil.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** LidoGrapheProfil.java 1 Apr 2003 16:13:35 -0000 1.6
--- LidoGrapheProfil.java 4 Jul 2003 15:46:50 -0000 1.7
***************
*** 12,15 ****
--- 12,16 ----
import java.awt.*;
import org.fudaa.ebli.graphe.*;
+ import org.fudaa.fudaa.commun.FudaaLib;
import org.fudaa.fudaa.lido.LidoResource;
import org.fudaa.dodico.corba.lido.*;
***************
*** 25,81 ****
* @author Axel von Arnim
*/
[...1021 lines suppressed...]
!
! ctrStoG_.v = profil_.absMajSto[0];
! ctrStoD_.v = profil_.absMajSto[1];
! ctrRivG_.v = rivGaAbs;
! ctrRivD_.v = rivDrAbs;
! updatePasPlanimetrage();
! }
!
! private void updatePasPlanimetrage()
! {
! double d =
! (ctrEau_.v - profilMinOrdonnee_)
! / LidoResource.PLANIMETRAGE.NBVALEURS_PLANI;
! for (int i = 0; i < ctrPasPlani_.length; i++)
! {
! ctrPasPlani_[i].v = (d * i) + profilMinOrdonnee_;
! ctrPasPlani_[i].visible = pasPlani_;
}
fullRepaint();
}
Index: LidoGrapheSeuilDenoye.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/lido/graphe/LidoGrapheSeuilDenoye.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** LidoGrapheSeuilDenoye.java 1 Apr 2003 16:13:35 -0000 1.6
--- LidoGrapheSeuilDenoye.java 4 Jul 2003 15:46:50 -0000 1.7
***************
*** 11,14 ****
--- 11,15 ----
import org.fudaa.ebli.graphe.*;
+ import org.fudaa.fudaa.lido.ihmhelper.gestion.LidoParamsHelper;
import org.fudaa.dodico.corba.lido.*;
import java.awt.*;
***************
*** 39,46 ****
super();
setName(""+Math.random());
! nf2_=NumberFormat.getInstance(Locale.US);
! nf2_.setMaximumFractionDigits(3);
! nf2_.setGroupingUsed(false);
cl_=null;
cotFond_=Double.POSITIVE_INFINITY;
setPreferredSize(new Dimension(640, 480));
--- 40,48 ----
super();
setName(""+Math.random());
! // nf2_=NumberFormat.getInstance(Locale.US);
! // nf2_.setMaximumFractionDigits(3);
! // nf2_.setGroupingUsed(false);
cl_=null;
+ nf2_=LidoParamsHelper.NUMBER_FORMAT;
cotFond_=Double.POSITIVE_INFINITY;
setPreferredSize(new Dimension(640, 480));
Index: LidoGrapheSeuilNoye.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/lido/graphe/LidoGrapheSeuilNoye.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** LidoGrapheSeuilNoye.java 1 Apr 2003 16:13:35 -0000 1.6
--- LidoGrapheSeuilNoye.java 4 Jul 2003 15:46:50 -0000 1.7
***************
*** 11,14 ****
--- 11,15 ----
import org.fudaa.ebli.graphe.*;
+ import org.fudaa.fudaa.lido.ihmhelper.gestion.LidoParamsHelper;
import org.fudaa.dodico.corba.lido.*;
import java.awt.*;
***************
*** 41,47 ****
{
super();
! nf2_=NumberFormat.getInstance(Locale.US);
! nf2_.setMaximumFractionDigits(3);
! nf2_.setGroupingUsed(false);
cl_=null;
setPreferredSize(new Dimension(640, 480));
--- 42,49 ----
{
super();
! nf2_=LidoParamsHelper.NUMBER_FORMAT;
! // nf2_=NumberFormat.getInstance(Locale.US);
! // nf2_.setMaximumFractionDigits(3);
! // nf2_.setGroupingUsed(false);
cl_=null;
setPreferredSize(new Dimension(640, 480));
Index: LidoGrapheSingulariteCourbe.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/lido/graphe/LidoGrapheSingulariteCourbe.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** LidoGrapheSingulariteCourbe.java 1 Apr 2003 16:13:36 -0000 1.5
--- LidoGrapheSingulariteCourbe.java 4 Jul 2003 15:46:50 -0000 1.6
***************
*** 65,76 ****
cl_=null;
setPreferredSize(new Dimension(640, 480));
- init();
}
- private void init()
- {
- if( cl_==null ) return;
- updateGraphe();
- }
public void setSingularite(SParametresSingBlocSNG s)
--- 65,70 ----
***************
*** 91,95 ****
SParametresSingBlocSNG nv=(SParametresSingBlocSNG)e.getNewValue();
setSingularite(nv);
- init();
}
}
--- 85,88 ----
|
Update of /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/ressource/appli In directory sc8-pr-cvs1:/tmp/cvs-serv14208 Added Files: reflux.jpg telemac.gif telemac2d.gif telemac_16.gif telemac_32.gif telemac_64.gif Log Message: Ajout icone pour les applis reflux telemac --- NEW FILE: reflux.jpg --- (This appears to be a binary file; contents omitted.) --- NEW FILE: telemac.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: telemac2d.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: telemac_16.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: telemac_32.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: telemac_64.gif --- (This appears to be a binary file; contents omitted.) |
|
From: <de...@us...> - 2003-07-04 15:42:51
|
Update of /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/ressource/appli In directory sc8-pr-cvs1:/tmp/cvs-serv14094/appli Log Message: Directory /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/ressource/appli added to the repository |
|
From: <de...@us...> - 2003-07-04 15:42:15
|
Update of /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/mascaret In directory sc8-pr-cvs1:/tmp/cvs-serv14015 Modified Files: MascaretImplementation.java Log Message: Ajout import org.fudaa.fudaa.projet Index: MascaretImplementation.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/mascaret/MascaretImplementation.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** MascaretImplementation.java 19 Mar 2003 07:27:03 -0000 1.2 --- MascaretImplementation.java 4 Jul 2003 15:42:12 -0000 1.3 *************** *** 30,33 **** --- 30,35 ---- import org.fudaa.fudaa.commun.*; + import org.fudaa.fudaa.commun.dodico.*; + import org.fudaa.fudaa.commun.projet.*; import org.fudaa.fudaa.hydraulique1d.*; import org.fudaa.fudaa.hydraulique1d.reseau.*; |
Update of /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr
In directory sc8-pr-cvs1:/tmp/cvs-serv12749
Modified Files:
Tr.java TrImplHelper.java TrImplementation.java TrLib.java
TrPreferences.java TrProjectManager.java TrProjet.java
Removed Files:
TrCellBooleanEditor.java TrCellBooleanRenderer.java
TrCellDecorator.java TrCellDialogEditor.java
TrCellRenderer.java TrCellTextRenderer.java TrEditor.java
TrEditorExterne.java TrEditorInterface.java
TrEditorInterne.java
Log Message:
Diverses refactorisation
Index: Tr.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/Tr.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** Tr.java 19 May 2003 14:31:47 -0000 1.1
--- Tr.java 4 Jul 2003 15:34:57 -0000 1.2
***************
*** 22,28 ****
import org.fudaa.fudaa.commun.FudaaLib;
import org.fudaa.fudaa.commun.FudaaSplashScreen;
/**
! * Classe de lancement de l'application Prert. Contient la methode main.
*
* @version $Id$
--- 22,29 ----
import org.fudaa.fudaa.commun.FudaaLib;
import org.fudaa.fudaa.commun.FudaaSplashScreen;
+ import org.fudaa.fudaa.commun.FudaaTee;
/**
! * Classe de lancement de l'application Tr. Contient la methode main.
*
* @version $Id$
***************
*** 31,37 ****
public class Tr
{
/**
- * put your documentation comment here
* @param args
*/
--- 32,38 ----
public class Tr
{
+
/**
* @param args
*/
***************
*** 55,58 ****
--- 56,64 ----
System.err.println("Options valides: " + flags.flagTotalText());
System.exit(1);
+ }
+ if(!flags.no_log)
+ {
+ new FudaaTee(true);
+ System.out.println("ts.log créé");
}
// Preferences
Index: TrImplHelper.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/TrImplHelper.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** TrImplHelper.java 19 May 2003 14:31:48 -0000 1.1
--- TrImplHelper.java 4 Jul 2003 15:34:57 -0000 1.2
***************
*** 9,20 ****
package org.fudaa.fudaa.tr;
/**
* @author deniger
* @version $Id$
*/
! public abstract class TrImplHelper
{
!
public abstract void ouvrir();
}
--- 9,155 ----
package org.fudaa.fudaa.tr;
+ import java.awt.event.ActionEvent;
+ import java.awt.event.ActionListener;
+ import java.io.File;
+
+ import com.memoire.bu.BuCommonImplementation;
+ import com.memoire.bu.BuDialogChoice;
+ import com.memoire.bu.BuDynamicMenu;
+ import com.memoire.bu.BuIcon;
+ import com.memoire.bu.BuMenu;
+ import com.memoire.bu.BuMenuItem;
+
+ import org.fudaa.ebli.dialog.EbliSimpleDialogPanel;
+ import org.fudaa.fudaa.commun.FudaaLib;
+ import org.fudaa.fudaa.commun.exec.FudaaExecServerManager;
+ import org.fudaa.fudaa.commun.exec.FudaaExecServerManagerPanel;
+ import org.fudaa.fudaa.ressource.FudaaResource;
+ import org.fudaa.fudaa.tr.reflux.TrRefluxImplHelper;
+ import org.fudaa.fudaa.tr.telemac.TrTelemacImplHelper;
+
/**
* @author deniger
* @version $Id$
*/
! public abstract class TrImplHelper implements ActionListener
{
! protected TrImplementation impl_;
!
! public TrImplHelper(TrImplementation _impl)
! {
! impl_ = _impl;
! impl_.getFrame().setTitle("Superviseur " + getID());
!
! }
!
! public TrImplementation getImpl()
! {
! return impl_;
! }
!
public abstract void ouvrir();
+ public abstract void ouvrir(File _f);
+
+ public BuIcon getIcon()
+ {
+ return FudaaResource.FUDAA.getToolIcon("appli/" + getID());
+ }
+
+ public abstract String getID();
+ public BuMenuItem[] getMenuItemsOuvrir()
+ {
+ return null;
+ }
+
+ public BuMenuItem[] getMenuItemsProjet()
+ {
+ return null;
+ }
+
+ public BuMenu getProjetMenu()
+ {
+ BuMenu projet = new BuDynamicMenu("Projet", "PROJET")
+ {
+ private boolean built_;
+ public boolean isActive()
+ {
+ return true;
+ }
+
+ public void build()
+ {
+ if (!built_)
+ {
+ BuMenuItem it = new BuMenuItem("Changer chaîne de calcul");
+ it.setActionCommand("MODIFIER_CHAINE");
+ add(it);
+ it.addActionListener(TrImplHelper.this);
+ built_ = true;
+ }
+ }
+ };
+ projet.setIcon(null);
+ return projet;
+ }
+
+ public static TrImplHelper getImplHelper(String _id, TrImplementation _impl)
+ {
+ if(FudaaLib.DEBUG) System.out.println("Choix impl helper");
+ System.out.println("id= \""+_id+"\"");
+ System.out.println("relfux= \""+TrProjet.REFLUX_ID+"\"");
+ if (_impl.getCurrentImplHelper() != null)
+ {
+ if (_id.equals(_impl.getCurrentImplHelper().getID()))
+ {
+ if(FudaaLib.DEBUG) System.out.println("impl courant");
+ return _impl.getCurrentImplHelper();
+ }
+ }
+ if (_id.equals(TrProjet.REFLUX_ID))
+ {
+ if(FudaaLib.DEBUG) System.out.println("impl reflux");
+ return new TrRefluxImplHelper(_impl);
+ }
+ else if (_id.equals(TrProjet.TELEMAC_ID))
+ {
+ if(FudaaLib.DEBUG) System.out.println("impl telemac");
+ return new TrTelemacImplHelper(_impl);
+ }
+ return null;
+ }
+
+ /**
+ *
+ */
+ public void actionPerformed(ActionEvent e)
+ {
+ String c = e.getActionCommand();
+ if (FudaaLib.DEBUG)
+ System.out.println(c);
+ if ("MODIFIER_CHAINE".equals(c))
+ {
+ String[] choix = new String[] { TrProjet.REFLUX_ID, TrProjet.TELEMAC_ID };
+ BuDialogChoice dialc =
+ new BuDialogChoice(
+ impl_,
+ impl_.informationsSoftware(),
+ "Configuration chaîne de calcul",
+ "Veuillez sélectionner la chaîne de calcul utilisée.\n"
+ + " La modification sera prise en compte au redémarrage de l'application",
+ choix);
+ dialc.setSize(200, 200);
+ if (FudaaLib.isOkResponse(dialc.activate()))
+ {
+
+ String id = dialc.getValue();
+ if (FudaaLib.DEBUG)
+ System.out.println("choix " + id);
+
+ TrPreferences.TR.putStringProperty("tr.code.id", id);
+ TrPreferences.TR.writeIniFile();
+ }
+ }
+
+ }
}
Index: TrImplementation.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/TrImplementation.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** TrImplementation.java 19 May 2003 14:31:48 -0000 1.1
--- TrImplementation.java 4 Jul 2003 15:34:57 -0000 1.2
***************
*** 12,35 ****
import java.awt.Dimension;
import java.awt.event.ActionEvent;
import java.io.File;
! import javax.swing.JScrollPane;
import com.memoire.bu.BuColumn;
! import com.memoire.bu.BuFileChooser;
! import com.memoire.bu.BuFileFilter;
import com.memoire.bu.BuInformationsDocument;
import com.memoire.bu.BuInformationsSoftware;
import com.memoire.bu.BuMainPanel;
import com.memoire.bu.BuPreferences;
import com.memoire.bu.BuResource;
import com.memoire.bu.BuScrollPane;
import com.memoire.bu.BuTaskView;
- import org.fudaa.dodico.h2d.H2dParametres;
import org.fudaa.ebli.calque.BArbreCalque;
! import org.fudaa.ebli.ressource.EbliResource;
! import org.fudaa.fudaa.commun.FudaaImplementation;
import org.fudaa.fudaa.commun.FudaaLib;
import org.fudaa.fudaa.tr.telemac.TrTelemacImplHelper;
--- 12,45 ----
import java.awt.Dimension;
import java.awt.event.ActionEvent;
+ import java.awt.event.KeyEvent;
import java.io.File;
! import javax.swing.JMenu;
import com.memoire.bu.BuColumn;
! import com.memoire.bu.BuDialogChoice;
! import com.memoire.bu.BuDynamicMenu;
! import com.memoire.bu.BuExplorer;
import com.memoire.bu.BuInformationsDocument;
import com.memoire.bu.BuInformationsSoftware;
import com.memoire.bu.BuMainPanel;
+ import com.memoire.bu.BuMenu;
+ import com.memoire.bu.BuMenuBar;
+ import com.memoire.bu.BuMenuItem;
import com.memoire.bu.BuPreferences;
import com.memoire.bu.BuResource;
import com.memoire.bu.BuScrollPane;
import com.memoire.bu.BuTaskView;
+ import com.memoire.fu.FuFile;
+ import com.memoire.fu.FuLib;
import org.fudaa.ebli.calque.BArbreCalque;
!
! import org.fudaa.fudaa.commun.FudaaCommonImplementation;
import org.fudaa.fudaa.commun.FudaaLib;
+ import org.fudaa.fudaa.commun.FudaaPreferences;
+ import org.fudaa.fudaa.commun.aide.FudaaAidePreferencesPanel;
+ import org.fudaa.fudaa.commun.exec.FudaaAppliExecManager;
+ import org.fudaa.fudaa.commun.fileChooser.FudaaFavoriteFiles;
import org.fudaa.fudaa.tr.telemac.TrTelemacImplHelper;
***************
*** 40,74 ****
* @author Fred Deniger
*/
! public class TrImplementation extends FudaaImplementation
{
! private final static BuInformationsSoftware isRt_ = new BuInformationsSoftware();
static {
isRt_.name = "Tr";
! isRt_.version = "0.0";
! isRt_.date = "29-avril-2003";
! isRt_.rights = "Tous droits réservés. CETMEF (c)2000";
! isRt_.contact = "deniger";
isRt_.license = "GPL2";
isRt_.languages = "fr";
isRt_.logo = null;
isRt_.banner = null;
! isRt_.http = "";
isRt_.update = "";
! isRt_.man = "";
isRt_.authors = new String[] { "Frédéric Deniger" };
isRt_.contributors = new String[] { "Equipes Dodico, Ebli et Fudaa" };
isRt_.documentors = new String[] { "" };
isRt_.testers = new String[] { "Frédéric Deniger" };
// idTr_.logo = EbliResource.EBLI.getIcon("minlogo.gif");
}
protected BArbreCalque arbre_;
- private String lastDir_;
private TrProjectManager projectManager_;
private TrImplHelper implHelper_;
-
BuTaskView taches_;
public void actionPerformed(ActionEvent _evt)
{
--- 50,133 ----
* @author Fred Deniger
*/
! public class TrImplementation extends FudaaCommonImplementation
{
! public final static String PREF_OUVRIR = "OUVRIR_";
! private final static BuInformationsSoftware isRt_ =
! new BuInformationsSoftware();
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...";
isRt_.license = "GPL2";
isRt_.languages = "fr";
isRt_.logo = null;
isRt_.banner = null;
! isRt_.http = "http://fudaa.sourceforge.net";
isRt_.update = "";
! isRt_.man = FudaaAidePreferencesPanel.getHelpUrl(TrPreferences.TR);
isRt_.authors = new String[] { "Frédéric Deniger" };
isRt_.contributors = new String[] { "Equipes Dodico, Ebli et Fudaa" };
isRt_.documentors = new String[] { "" };
isRt_.testers = new String[] { "Frédéric Deniger" };
+ isRt_.citation = "";
// idTr_.logo = EbliResource.EBLI.getIcon("minlogo.gif");
}
protected BArbreCalque arbre_;
private TrProjectManager projectManager_;
private TrImplHelper implHelper_;
BuTaskView taches_;
+ protected void ouvrir()
+ {
+ implHelper_.ouvrir();
+ }
+
+ protected void ouvrirId(String _id)
+ {
+
+ if (_id.equals(TrProjet.TELEMAC_DICO_ID))
+ {
+ TrTelemacImplHelper h =
+ (TrTelemacImplHelper) TrImplHelper.getImplHelper(
+ TrProjet.TELEMAC_ID,
+ this);
+ if (h == null)
+ error("Erreur interne", "impossible de trouver l'implantation telemac");
+ h.ouvrirDico();
+
+ }
+ else
+ {
+ TrImplHelper h = TrImplHelper.getImplHelper(_id, this);
+ if (h == null)
+ error("Erreur interne", "impossible de trouver l'implantation");
+ else
+ h.ouvrir();
+ }
+ }
+
+ protected void ouvrir(File _f)
+ {
+ implHelper_.ouvrir(_f);
+ }
+
+ public TrImplHelper getCurrentImplHelper()
+ {
+ return implHelper_;
+ }
+
+ protected void ouvrir(File _f, String _id)
+ {
+ TrImplHelper h = TrImplHelper.getImplHelper(_id, this);
+ if (h == null)
+ error("Erreur interne", "impossible de trouver l'implantation");
+ else
+ h.ouvrir(_f);
+ }
+
public void actionPerformed(ActionEvent _evt)
{
***************
*** 78,93 ****
if (FudaaLib.DEBUG)
System.err.println("ACTION=" + action);
! if("OUVRIR".equals(action))
{
! implHelper_.ouvrir();
}
- // if("IMPORT:IMAGE".equals(action)) importerImage();
- // else if(action.startsWith("IMPORT:MNT:"))
- // {
- // TrFormatMenuItem it=(TrFormatMenuItem)_evt.getSource();
- // importerMNT(it);
- // }
- // else if("CREER".equals(action)) creer();
-
}
--- 137,171 ----
if (FudaaLib.DEBUG)
System.err.println("ACTION=" + action);
! if ("OUVRIR".equals(action))
{
! ouvrir();
! }
! else if (action.startsWith(PREF_OUVRIR))
! {
! String id = action.substring(PREF_OUVRIR.length());
! if (FudaaLib.DEBUG)
! System.out.println("id= " + id);
! ouvrirId(id);
! }
! else if ("ENREGISTRER".equals(action))
! {
! projetCourant().save();
! }
! else if ("ENREGISTRERSOUS".equals(action))
! {
! projetCourant().saveAs();
! }
! else if ("ENREGISTRERCOPIE".equals(action))
! {
! projetCourant().saveCopy();
! }
! else if ("FERMER".equals(action))
! {
! projetCourant().close();
! }
! else
! {
! super.actionPerformed(_evt);
}
}
***************
*** 118,133 ****
return isRt_;
}
- private String getLastDir()
- {
- return lastDir_;
- }
public void init()
{
super.init();
! //BuMenuBar mb = getApp().getMainMenuBar();
! // BuMenu importer=(BuMenu)mb.getMenu("IMPORTER");
! // ajouteMNTImportMenus(importer,"IMPORT:MNT:");
! // importer.addMenuItem("Image","IMPORT:IMAGE",true);
BuMainPanel mp = getMainPanel();
BuColumn lc = mp.getLeftColumn();
--- 196,208 ----
return isRt_;
}
public void init()
{
super.init();
! BuMenuBar mb = getApp().getMainMenuBar();
! BuMenuItem it = new BuMenuItem("Enregister une copie");
! it.setActionCommand("ENREGISTRERCOPIE");
! it.addActionListener(this);
! mb.getMenu("MENU_FICHIER").add(it, 6);
BuMainPanel mp = getMainPanel();
BuColumn lc = mp.getLeftColumn();
***************
*** 139,197 ****
BuScrollPane sp = new BuScrollPane(taches_);
sp.setPreferredSize(new Dimension(150, 80));
! rc.addToggledComponent(BuResource.BU.getString("Tâches"), "TACHE", sp, this);
mp.setTaskView(taches_);
setEnabledForAction("CREER", false);
setEnabledForAction("OUVRIR", true);
! //setEnabledForAction("EXPORTER" ,true);
! setEnabledForAction("IMPORTER", false);
! setEnabledForAction("FERMER", true);
!
! projectManager_=new TrProjectManager();
! //DEBUG: a modifer
! implHelper_=new TrTelemacImplHelper(this);
!
! }
! public File ouvrirFileChooser(String[] _extension, String _desc)
! {
! return ouvrirFileChooser(_extension, _desc, getLastDir());
! }
!
! public File ouvrirFileChooser(String[] _extension, String _desc, String _defautDir)
! {
! BuFileChooser fileChooser = new BuFileChooser();
! fileChooser.setFileHidingEnabled(true);
! if (_defautDir == null)
! fileChooser.setCurrentDirectory(new File(System.getProperty("user.dir")));
! else
! fileChooser.setCurrentDirectory(new File(_defautDir));
! fileChooser.setMultiSelectionEnabled(false);
! BuFileFilter flt = new BuFileFilter(_extension, _desc);
! fileChooser.addChoosableFileFilter(flt);
! fileChooser.setFileFilter(flt);
! int returnVal = fileChooser.showOpenDialog(getFrame());
! if (returnVal == BuFileChooser.APPROVE_OPTION)
! {
! return fileChooser.getSelectedFile();
! }
! else
! return null;
}
! protected H2dParametres projetCourant()
{
return projectManager_.currentProjet_;
}
!
! protected void ouvrir()
{
!
}
!
public void addProjet(TrProjet _o)
{
projectManager_.addProjet(_o);
! _o.active(this);
}
--- 214,287 ----
BuScrollPane sp = new BuScrollPane(taches_);
sp.setPreferredSize(new Dimension(150, 80));
! rc.addToggledComponent(
! BuResource.BU.getString("Tâches"),
! "TACHE",
! sp,
! this);
mp.setTaskView(taches_);
+ BuExplorer explorer =
+ new BuExplorer(this, false, FuFile.createFile(FuLib.getUserHome()))
+ {
+ protected void fireFileAction(String _action)
+ {
+ if (_action.equals("OUVRIR"))
+ {
+ TrImplementation.this.ouvrir(getSelectedFile().getAbsoluteFuFile());
+ }
+ }
+ };
+ //explorer.set
+ lc.addToggledComponent(
+ "Explorateur",
+ "EXPLORATEUR",
+ BuResource.BU.getIcon("explorateur"),
+ explorer,
+ true,
+ this);
setEnabledForAction("CREER", false);
setEnabledForAction("OUVRIR", true);
! setEnabledForAction("QUITTER", true);
! setEnabledForAction("PREFERENCE", true);
! setEnabledForAction("ASTUCE", false);
! projectManager_ = new TrProjectManager();
! FudaaAppliExecManager execManager =
! new FudaaAppliExecManager(this.getApplicationPreferences(), this);
! JMenu menu = execManager.getMenu("Applications", "APPLICATIONS");
! menu.setMnemonic(KeyEvent.VK_P);
! // System.out.println("nb menu " + mb.getMenuCount());
! // System.out.println("nb menu sub" + mb.getSubElements().length);
! mb.add(menu, mb.getMenuCount() - 1);
! mp.setProgression(0);
}
! protected TrProjet projetCourant()
{
return projectManager_.currentProjet_;
}
!
! public void closeProjet(TrProjet _o)
{
! projectManager_.closeProjet(_o);
! setEnabledForAction("ENREGISTRER", false);
! setEnabledForAction("ENREGISTRERSOUS", false);
! setEnabledForAction("ENREGISTRERCOPIE", true);
! setEnabledForAction("FERMER", false);
}
!
public void addProjet(TrProjet _o)
{
+ if (projetCourant() != null)
+ {
+ projetCourant().close();
+ }
projectManager_.addProjet(_o);
! _o.active();
! setEnabledForAction("ENREGISTRER", true);
! setEnabledForAction("ENREGISTRERSOUS", true);
! setEnabledForAction("ENREGISTRERCOPIE", true);
! setEnabledForAction("FERMER", true);
!
}
***************
*** 201,209 ****
public void setLastDir(File _f)
{
! if (_f == null)
! return;
! File dir = _f.getParentFile();
! if (dir.isDirectory())
! lastDir_ = dir.getAbsolutePath();
}
--- 291,295 ----
public void setLastDir(File _f)
{
! FudaaLib.setLastDir(_f);
}
***************
*** 228,241 ****
// }
public void start()
{
super.start();
! // arbre_ = new BArbreCalque();
! // arbre_.setRootVisible(false);
! // arbre_.setModel(null);
! // JScrollPane sp = new JScrollPane(arbre_);
! // sp.setSize(150, 150);
! // sp.setVisible(false);
! // getMainPanel().getRightColumn().addToggledComponent(EbliResource.EBLI.getString("Calques"), "CALQUE", sp, this);
}
--- 314,405 ----
// }
+ private void initImplHelperFromPref()
+ {
+ String id =
+ TrPreferences.TR.getStringProperty(TrPreferences.KEY_CODE_ID, null);
+ if (id == null)
+ {
+ id = askForCode();
+ }
+ implHelper_ = TrImplHelper.getImplHelper(id, this);
+ if (implHelper_ == null)
+ {
+ id = askForCode();
+ implHelper_ = TrImplHelper.getImplHelper(id, this);
+ }
+ if (implHelper_ == null)
+ error("Erreur interne", "implementation non trouvée");
+
+ }
+
+ private String askForCode()
+ {
+ String id =
+ TrPreferences.TR.getStringProperty(
+ TrPreferences.KEY_CODE_ID,
+ TrProjet.REFLUX_ID);
+ String[] choix = new String[] { TrProjet.REFLUX_ID, TrProjet.TELEMAC_ID };
+ BuDialogChoice c =
+ new BuDialogChoice(
+ this,
+ informationsSoftware(),
+ "Configuration chaîne de calcul",
+ "Veuillez sélectionner la chaîne de calcul utilisée.",
+ choix);
+ c.setSize(200, 200);
+ c.activate();
+ id = c.getValue();
+ if (FudaaLib.DEBUG)
+ System.out.println("choix " + id);
+ TrPreferences.TR.putStringProperty("tr.code.id", id);
+ TrPreferences.TR.writeIniFile();
+ return id;
+ }
+
public void start()
{
super.start();
! initImplHelperFromPref();
! final BuMenuItem[] items_ = implHelper_.getMenuItemsOuvrir();
! if ((items_ != null) && (items_.length > 0))
! {
! BuMenu ouvrirAutre =
! new BuDynamicMenu("Ouvrir autre ...", "OUVRIR_AUTRE")
! {
! private boolean built_;
! public boolean isActive()
! {
! return true;
! }
!
! public void build()
! {
! if (!built_)
! {
! //addMenuItem("Projet Télémac", PREF_OUVRIR + TrProjet.TELEMAC_ID);
! int n = items_.length;
! for (int i = 0; i < n; i++)
! {
! add(items_[i]);
! items_[i].addActionListener(TrImplementation.this);
! }
! built_ = true;
! }
!
! }
!
! };
! BuMenuBar mb = getApp().getMainMenuBar();
! mb.getMenu("MENU_FICHIER").add(ouvrirAutre, 2);
! mb.add(implHelper_.getProjetMenu(), mb.getMenuCount() - 2);
! }
!
! // arbre_ = new BArbreCalque();
! // arbre_.setRootVisible(false);
! // arbre_.setModel(null);
! // JScrollPane sp = new JScrollPane(arbre_);
! // sp.setSize(150, 150);
! // sp.setVisible(false);
! // getMainPanel().getRightColumn().addToggledComponent(EbliResource.EBLI.getString("Calques"), "CALQUE", sp, this);
}
***************
*** 243,246 ****
--- 407,421 ----
{
return isRt_;
+ }
+
+ /**
+ *
+ */
+ public void exit()
+ {
+ super.exit();
+ TrPreferences.TR.writeIniFile();
+ FudaaFavoriteFiles.INSTANCE.saveFavorites();
+ FudaaPreferences.FUDAA.writeIniFile();
}
Index: TrLib.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/TrLib.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** TrLib.java 19 May 2003 14:31:48 -0000 1.1
--- TrLib.java 4 Jul 2003 15:34:57 -0000 1.2
***************
*** 27,31 ****
public static void decoreComponent(JComponent _c, boolean valide)
{
! _c.setForeground(valide ? Color.black : Color.white);
}
--- 27,31 ----
public static void decoreComponent(JComponent _c, boolean valide)
{
! _c.setForeground(valide ? Color.black : Color.red);
}
Index: TrPreferences.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/TrPreferences.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** TrPreferences.java 19 May 2003 14:31:48 -0000 1.1
--- TrPreferences.java 4 Jul 2003 15:34:57 -0000 1.2
***************
*** 10,14 ****
package org.fudaa.fudaa.tr;
! import com.memoire.bu.BuPreferences;
/**
--- 10,24 ----
package org.fudaa.fudaa.tr;
! import java.io.File;
! import java.io.FileInputStream;
! import java.io.FileNotFoundException;
! import java.io.IOException;
! import java.util.Enumeration;
!
! import com.memoire.fu.FuLib;
!
! import org.fudaa.dodico.commun.DodicoLib;
! import org.fudaa.dodico.commun.DodicoPreferences;
! import org.fudaa.fudaa.commun.FudaaPreferences;
/**
***************
*** 18,29 ****
* @author Fred Deniger
*/
! public class TrPreferences
! extends BuPreferences
{
! public final static TrPreferences TR=new TrPreferences();
public void applyOn(Object _o)
{
! if(!(_o instanceof TrImplementation))
! throw new RuntimeException(""+_o+" is not a TrImplementation.");
}
}
--- 28,168 ----
* @author Fred Deniger
*/
! public class TrPreferences extends FudaaPreferences
{
! public static final String KEY_SERVEUR_PREFIXE = "serveur";
! public static final String KEY_SERVEUR_SHOW_LOG = "serveur.log";
! public static final String KEY_CODE_ID = "tr.code.id";
!
! public final static TrPreferences TR = new TrPreferences();
!
! protected TrPreferences()
! {
! File f = new File("preferences/tr.base.pref");
! if (f.exists())
! {
! try
! {
! super.defaultValues_.load(new FileInputStream(f));
! }
! catch (FileNotFoundException e)
! {
! e.printStackTrace();
! }
! catch (IOException e)
! {
! e.printStackTrace();
! }
!
! }
! f = new File("preferences/tr.pref");
! if (f.exists())
! {
! try
! {
! super.defaultValues_.load(new FileInputStream(f));
! }
! catch (FileNotFoundException e)
! {
! e.printStackTrace();
! }
! catch (IOException e)
! {
! e.printStackTrace();
! }
!
! }
! if (super.defaultValues_!=null)
! {
! String[] sysPrefixes = new String[] { "linux.", "unix.", "win." };
! String sysPrefixe = null;
! if (FuLib.isLinux())
! {
! sysPrefixe = "linux.";
! }
! else if (FuLib.isUnix())
! {
! sysPrefixe = "unix.";
! }
! else if (FuLib.isWindows())
! {
! sysPrefixe = "win.";
! }
! if (sysPrefixe != null)
! {
! String s, s2, sProp;
! for (Enumeration e = super.defaultValues_.propertyNames();
! e.hasMoreElements();
! )
! {
! s = (String) e.nextElement();
! if (s.startsWith(sysPrefixe))
! {
! s2 = s.substring(sysPrefixe.length());
! sProp = super.defaultValues_.getProperty(s);
! super.defaultValues_.remove(s);
! super.defaultValues_.put(s2, sProp);
! }
! else
! {
! int i = s.indexOf('.');
! if (i > 0)
! {
! s2 = s.substring(0, i + 1);
! if (DodicoLib.findObject(sysPrefixes, s2) >= 0)
! {
! super.defaultValues_.remove(s);
! }
! }
! }
! }
! }
! }
! }
!
!
! public String getCodePrefPrefixeReflux()
! {
! return getCodePrefPrefixe(TrProjet.REFLUX_ID);
! }
!
! public boolean isCodeRefluxDef()
! {
! return TrProjet.REFLUX_ID.equals(getStringProperty(KEY_CODE_ID, null));
! }
!
! public boolean isCodeTelemacDef()
! {
! return TrProjet.TELEMAC_ID.equals(getStringProperty(KEY_CODE_ID, null));
! }
!
! public String getCodePrefPrefixeTelemac()
! {
! return getCodePrefPrefixe(TrProjet.TELEMAC_ID);
! }
!
! public String getCodePrefPrefixe(String appli)
! {
! return DodicoPreferences.buildPrefKey(
! appli,
! TrPreferences.KEY_SERVEUR_PREFIXE);
! }
!
public void applyOn(Object _o)
{
! if (!(_o instanceof TrImplementation))
! throw new RuntimeException("" + _o + " is not a TrImplementation.");
! }
!
! public static void main(String[] args)
! {
! TrPreferences pref = new TrPreferences();
! for (Enumeration e = pref.defaultValues_.propertyNames();
! e.hasMoreElements();
! )
! {
! String s = (String) e.nextElement();
! System.out.println(s + "= " + pref.defaultValues_.getProperty(s));
! }
}
+
}
Index: TrProjectManager.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/TrProjectManager.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** TrProjectManager.java 19 May 2003 14:31:48 -0000 1.1
--- TrProjectManager.java 4 Jul 2003 15:34:57 -0000 1.2
***************
*** 9,13 ****
--- 9,17 ----
package org.fudaa.fudaa.tr;
+ import java.util.ArrayList;
+ import java.util.HashSet;
import java.util.Hashtable;
+ import java.util.Iterator;
+ import java.util.Set;
import org.fudaa.dodico.h2d.H2dParametres;
***************
*** 19,28 ****
public class TrProjectManager
{
! H2dParametres currentProjet_;
! Hashtable nomProjet_;
public TrProjectManager()
{
! nomProjet_=new Hashtable(5);
}
--- 23,32 ----
public class TrProjectManager
{
! Set projets_;
! TrProjet currentProjet_;
public TrProjectManager()
{
! projets_=new HashSet(5);
}
***************
*** 31,42 ****
* Renvoie le projet courant.
*/
! public H2dParametres getCurrentProjet()
{
return currentProjet_;
}
! public boolean containsProjectTitre(String _s)
{
! return nomProjet_.containsKey(_s);
}
--- 35,52 ----
* Renvoie le projet courant.
*/
! public TrProjet getCurrentProjet()
{
return currentProjet_;
}
! public TrProjet containsProjectTitre(String _s)
{
! TrProjet p;
! for(Iterator it=projets_.iterator();it.hasNext();)
! {
! p=(TrProjet)it.next();
! if(p.getTitle().equals(_s)) return p;
! }
! return null;
}
***************
*** 46,61 ****
public boolean addProjet(TrProjet _pro)
{
! String n=_pro.getTitre();
! if(containsProjectTitre(n)) return false;
else
{
! nomProjet_.put(n,_pro);
return true;
}
}
! public H2dParametres getProjet(String _n)
{
! return (H2dParametres)nomProjet_.get(_n);
}
--- 56,78 ----
public boolean addProjet(TrProjet _pro)
{
! String n=_pro.getTitle();
! if(containsProjectTitre(n)!=null) return false;
else
{
! projets_.add(_pro);
! currentProjet_=_pro;
return true;
}
}
! public void closeProjet(TrProjet _pro)
{
! projets_.remove(_pro);
! currentProjet_=null;
! }
!
! public TrProjet getProjet(String _n)
! {
! return containsProjectTitre(_n);
}
Index: TrProjet.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/TrProjet.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** TrProjet.java 19 May 2003 14:31:48 -0000 1.1
--- TrProjet.java 4 Jul 2003 15:34:57 -0000 1.2
***************
*** 9,16 ****
package org.fudaa.fudaa.tr;
! import com.memoire.bu.BuCommonImplementation;
import com.memoire.bu.BuInformationsDocument;
import org.fudaa.dodico.h2d.H2dParametres;
/**
--- 9,20 ----
package org.fudaa.fudaa.tr;
! import java.io.File;
!
import com.memoire.bu.BuInformationsDocument;
import org.fudaa.dodico.h2d.H2dParametres;
+ import org.fudaa.dodico.objet.CExec;
+ import org.fudaa.fudaa.commun.calcul.FudaaCalculAction;
+ import org.fudaa.fudaa.commun.calcul.FudaaCalculSupportInterface;
/**
***************
*** 18,35 ****
* @version $Id$
*/
! public abstract class TrProjet
{
- public String getTitre()
- {
- return getParamatres().getTitre();
- }
! public BuInformationsDocument getInformationsDocument()
! {
! return getParamatres().getInformationsDocument();
! }
! public abstract H2dParametres getParamatres();
! public abstract void active(BuCommonImplementation _impl);
}
--- 22,47 ----
* @version $Id$
*/
! public interface TrProjet extends FudaaCalculSupportInterface
{
! public static final String TELEMAC_ID="telemac2d";
! public static final String TELEMAC_DICO_ID="dico";
! public static final String REFLUX_ID="reflux";
! public String getID();
! public BuInformationsDocument getInformationsDocument();
! public void save();
! public void saveAs();
! public void saveCopy();
! public void close();
!
!
! // public TrImplementation getImpl();
! public void active();
! public String getTitle();
!
! public File getParamsFile();
! public FudaaCalculAction getCalculActions();
!
}
--- TrCellBooleanEditor.java DELETED ---
--- TrCellBooleanRenderer.java DELETED ---
--- TrCellDecorator.java DELETED ---
--- TrCellDialogEditor.java DELETED ---
--- TrCellRenderer.java DELETED ---
--- TrCellTextRenderer.java DELETED ---
--- TrEditor.java DELETED ---
--- TrEditorExterne.java DELETED ---
--- TrEditorInterface.java DELETED ---
--- TrEditorInterne.java DELETED ---
|
|
From: <de...@us...> - 2003-07-04 15:40:26
|
Update of /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/hydraulique1d/ihmhelper In directory sc8-pr-cvs1:/tmp/cvs-serv13875/ihmhelper Modified Files: Hydraulique1dIHMRepository.java Log Message: Ajout de l'import org.fudaa.fudaa.commun.projet.* Index: Hydraulique1dIHMRepository.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/hydraulique1d/ihmhelper/Hydraulique1dIHMRepository.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Hydraulique1dIHMRepository.java 18 Mar 2003 17:55:45 -0000 1.3 --- Hydraulique1dIHMRepository.java 4 Jul 2003 15:40:23 -0000 1.4 *************** *** 11,14 **** --- 11,15 ---- import org.fudaa.fudaa.commun.*; + import org.fudaa.fudaa.commun.projet.*; import org.fudaa.dodico.corba.hydraulique1d.*; import org.fudaa.dodico.hydraulique1d.*; |
|
From: <de...@us...> - 2003-07-04 15:37:10
|
Update of /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/telemac
In directory sc8-pr-cvs1:/tmp/cvs-serv13200
Added Files:
TrDicoProjet.java TrTelemacCodePrefDialogPanel.java
TrTelemacServeur.java
Log Message:
...
--- NEW FILE: TrDicoProjet.java ---
/*
* @file TrDicoProjet.java
* @creation 16 juin 2003
* @modification $Date: 2003/07/04 15:37:05 $
* @license GNU General Public License 2
* @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne
* @mail de...@fu...
*/
package org.fudaa.fudaa.tr.telemac;
import java.awt.event.ActionListener;
import java.io.File;
import org.fudaa.dodico.commun.ProgressionInterface;
import org.fudaa.dodico.dico.DicoCasFileFormat;
import org.fudaa.fudaa.commun.FudaaCommonImplementation;
import org.fudaa.fudaa.dico.FDicoParams;
import org.fudaa.fudaa.dico.FDicoProjet;
import org.fudaa.fudaa.dico.FDicoProjetInterface;
import org.fudaa.fudaa.tr.TrImplementation;
import org.fudaa.fudaa.tr.TrProjet;
/**
* @author deniger
* @version $Id: TrDicoProjet.java,v 1.1 2003/07/04 15:37:05 deniger Exp $
*/
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,
DicoCasFileFormat _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);
}
/**
*
*/
public String getID()
{
return TrProjet.TELEMAC_DICO_ID;
}
/**
*
*/
public void setImpl(TrImplementation _impl)
{
impl_ = _impl;
}
}
--- NEW FILE: TrTelemacCodePrefDialogPanel.java ---
/*
* @file TrTelemacCodePreferencesPanel.java
* @creation 3 juin 2003
* @modification $Date: 2003/07/04 15:37:05 $
* @license GNU General Public License 2
* @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne
* @mail de...@fu...
*/
package org.fudaa.fudaa.tr.telemac;
import java.awt.event.FocusEvent;
import java.awt.event.FocusListener;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import java.io.File;
import javax.swing.BorderFactory;
import javax.swing.JFileChooser;
import javax.swing.JPanel;
import javax.swing.JTextField;
import javax.swing.event.CaretEvent;
import javax.swing.event.CaretListener;
import com.memoire.bu.BuBorderLayout;
import com.memoire.bu.BuGridLayout;
import com.memoire.bu.BuPanel;
import org.fudaa.ebli.dialog.EbliSimpleDialogPanel;
import org.fudaa.fudaa.commun.FudaaLib;
import org.fudaa.fudaa.commun.exec.FudaaExecManagerPanel;
import org.fudaa.fudaa.commun.exec.FudaaExecServerManager;
import org.fudaa.fudaa.commun.exec.FudaaExecServerManagerPanel;
import org.fudaa.fudaa.commun.tableau.FudaaCellFileEditor;
import org.fudaa.fudaa.commun.tableau.FudaaPanelListEditor;
import org.fudaa.fudaa.commun.tableau.FudaaPanelListEditorModel;
import org.fudaa.fudaa.tr.TrPreferences;
/**
* @author deniger
* @version $Id: TrTelemacCodePrefDialogPanel.java,v 1.1 2003/07/04 15:37:05 deniger Exp $
*/
public class TrTelemacCodePrefDialogPanel extends FudaaExecServerManagerPanel
{
JTextField txtRep_;
FudaaExecServerManager srv_;
FudaaExecManagerPanel exeEditor_;
//FudaaCellFileEditor cellFileEditor_;
/**
*
*/
public TrTelemacCodePrefDialogPanel(FudaaExecServerManager _srv)
{
super(_srv);
// addEmptyBorder(10);
// setLayout(new BuBorderLayout(5, 5));
// JPanel pn = new BuPanel();
// pn.setLayout(new BuGridLayout(2, 25, 5, true, false, false, false));
// exeEditor_=new FudaaExecManagerPanel(_srv);
//
//// editor.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), "Codes"));
//// cellFileEditor_ = new FudaaCellFileEditor();
//// cellFileEditor_.setMultipleSelection(false);
//// cellFileEditor_.setOnlyName(true);
//// cellFileEditor_.setFileChooserSelectionMode(JFileChooser.FILES_ONLY);
// add(pn, BuBorderLayout.NORTH);
// add(exeEditor_, BuBorderLayout.SOUTH);
// initFromPref();
}
private void initFromPref()
{
// txtRep_.setText(TrPreferences.getCodeDir(TrPreferences.TELEMAC));
// cellFileEditor_.setInitRep(new File(TrPreferences.getCodeDir(TrPreferences.TELEMAC)));
}
/**
*
*/
public void apply()
{
super.apply();
}
}
--- NEW FILE: TrTelemacServeur.java ---
/*
* @file TrTelemacServeur.java
* @creation 27 mai 2003
* @modification $Date: 2003/07/04 15:37:05 $
* @license GNU General Public License 2
* @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne
* @mail de...@fu...
*/
package org.fudaa.fudaa.tr.telemac;
/**
* @author deniger
* @version $Id: TrTelemacServeur.java,v 1.1 2003/07/04 15:37:05 deniger Exp $
*/
public class TrTelemacServeur
{
private boolean distant_;
public TrTelemacServeur()
{
this(false);
}
public TrTelemacServeur(boolean _distant)
{
distant_=true;
}
}
|
Update of /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/telemac
In directory sc8-pr-cvs1:/tmp/cvs-serv12749/telemac
Modified Files:
TrTelemacImplHelper.java TrTelemacParametres.java
TrTelemacProjet.java
Removed Files:
TrTelemacCasProcess.java TrTelemacFilleEntite.java
Log Message:
Diverses refactorisation
Index: TrTelemacImplHelper.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/telemac/TrTelemacImplHelper.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** TrTelemacImplHelper.java 19 May 2003 14:31:49 -0000 1.1
--- TrTelemacImplHelper.java 4 Jul 2003 15:34:57 -0000 1.2
***************
*** 9,21 ****
package org.fudaa.fudaa.tr.telemac;
import java.io.File;
! import com.memoire.bu.BuTask;
import com.memoire.bu.BuTaskOperation;
import org.fudaa.dodico.commun.ProgressionBuAdapter;
import org.fudaa.dodico.telemac.io.TelemacCasFileFormat;
import org.fudaa.fudaa.tr.TrImplHelper;
import org.fudaa.fudaa.tr.TrImplementation;
/**
--- 9,43 ----
package org.fudaa.fudaa.tr.telemac;
+ import java.awt.event.ActionEvent;
import java.io.File;
! import javax.swing.ComboBoxModel;
! import javax.swing.DefaultComboBoxModel;
! import javax.swing.JComboBox;
!
! import com.memoire.bu.BuBorderLayout;
! import com.memoire.bu.BuComboBox;
! import com.memoire.bu.BuDialogChoice;
! import com.memoire.bu.BuGridLayout;
! import com.memoire.bu.BuLabel;
! import com.memoire.bu.BuMenuItem;
import com.memoire.bu.BuTaskOperation;
+ import org.fudaa.dodico.commun.DodicoPreferences;
import org.fudaa.dodico.commun.ProgressionBuAdapter;
+ import org.fudaa.dodico.dico.DicoCasFileFormat;
+ import org.fudaa.dodico.dico.DicoLanguage;
+ import org.fudaa.dodico.dico.DicoManager;
+ import org.fudaa.dodico.dico.DicoModelAbstract;
+ import org.fudaa.dodico.telemac.TelemacDicoManager;
import org.fudaa.dodico.telemac.io.TelemacCasFileFormat;
+ import org.fudaa.ebli.dialog.EbliSimpleDialogPanel;
+ import org.fudaa.fudaa.commun.FudaaLib;
+ import org.fudaa.fudaa.commun.exec.FudaaExecServerManager;
+ import org.fudaa.fudaa.ressource.FudaaResource;
import org.fudaa.fudaa.tr.TrImplHelper;
import org.fudaa.fudaa.tr.TrImplementation;
+ import org.fudaa.fudaa.tr.TrPreferences;
+ import org.fudaa.fudaa.tr.TrProjet;
/**
***************
*** 25,46 ****
public class TrTelemacImplHelper extends TrImplHelper
{
! TrImplementation impl_;
!
public TrTelemacImplHelper(TrImplementation _impl)
{
! impl_=_impl;
}
public void ouvrir()
{
! final File fic = impl_.ouvrirFileChooser(TelemacCasFileFormat.getInstance().getExtensions(), "Télémac Fichier cas");
if (fic != null)
{
! impl_.setLastDir(fic);
new BuTaskOperation(impl_, "import fichier cas")
{
public void act()
{
! ouvrirOpr(fic, this);
}
}
--- 47,90 ----
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,
! TelemacCasFileFormat.getInstance(),
! new ProgressionBuAdapter(this),
! getImpl());
! setProgression(90);
! if (projet != null)
! {
! getImpl().addProjet(projet);
! }
}
}
***************
*** 49,61 ****
}
! public void ouvrirOpr(File _f, BuTask _t)
{
! TrTelemacCasProcess process = new TrTelemacCasProcess(new ProgressionBuAdapter(_t), impl_);
! TrTelemacParametres param = process.createProjet(_f, TelemacCasFileFormat.getInstance());
! if (param != null)
{
! TrTelemacProjet proj = new TrTelemacProjet(param);
! impl_.addProjet(proj);
}
}
--- 93,182 ----
}
! public void ouvrirDico()
{
! EbliSimpleDialogPanel s = new EbliSimpleDialogPanel();
! s.setLayout(new BuGridLayout(2, 5, 5, false, false, false, false));
! s.add(new BuLabel("dico :"));
! BuComboBox cb = new BuComboBox();
! ComboBoxModel descModel =
! TelemacDicoManager.getINSTANCE().createDicoDescComboBoxModel();
! cb.setModel(descModel);
! cb.setRenderer(TelemacDicoManager.getINSTANCE().getDicoDescCellRenderer());
! s.add(cb);
! s.add(new BuLabel("Langage :"));
! cb = new BuComboBox();
! DicoLanguage.LanguageComboBoxModel langModel =
! new DicoLanguage.LanguageComboBoxModel();
! cb.setModel(langModel);
! s.add(cb);
! int r = s.afficheModale(impl_.getFrame(), "Choix fichier dico");
! if (EbliSimpleDialogPanel.isOkResponse(r))
{
! final File fic = impl_.ouvrirFileChooser(null, "Fichier cas");
! if (fic != null)
! {
! _ouvrir(
! fic,
! (DicoManager.DicoDescription) descModel.getSelectedItem(),
! langModel.getSelectedLanguage());
! }
!
}
+
+ }
+
+ private void _ouvrir(
+ final File _fic,
+ final DicoManager.DicoDescription _des,
+ final int _language)
+ {
+ if (_fic != null)
+ {
+ new BuTaskOperation(impl_, "import fichier cas pour " + _des.getName())
+ {
+ public void act()
+ {
+
+ DicoModelAbstract m =
+ TelemacDicoManager.getINSTANCE().createDico(_des, _language);
+ if (m == null)
+ getImpl().error(
+ "INTERNE Impossible de créer le modele du dictionnaire");
+ else
+ {
+ TrDicoProjet projet = TrDicoProjet.init(_fic,new DicoCasFileFormat(m),new ProgressionBuAdapter(this), getImpl());
+ setProgression(90);
+ if (projet != null)
+ {
+ getImpl().addProjet(projet);
+ }
+ }
+ }
+ }
+ .start();
+ }
+ }
+
+ /**
+ *
+ */
+ public String getID()
+ {
+ return TrProjet.TELEMAC_ID;
+ }
+
+ /**
+ *
+ */
+ public BuMenuItem[] getMenuItemsOuvrir()
+ {
+ BuMenuItem r0 = new BuMenuItem("Projet dico");
+ r0.setActionCommand(impl_.PREF_OUVRIR + TrProjet.TELEMAC_DICO_ID);
+ BuMenuItem r =
+ new BuMenuItem(
+ FudaaResource.FUDAA.getToolIcon("appli/reflux"),
+ "Projet Reflux");
+ r.setActionCommand(impl_.PREF_OUVRIR + TrProjet.REFLUX_ID);
+ 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.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** TrTelemacParametres.java 19 May 2003 14:31:49 -0000 1.1
--- TrTelemacParametres.java 4 Jul 2003 15:34:57 -0000 1.2
***************
*** 10,31 ****
import java.io.File;
- import java.util.ArrayList;
- import java.util.Collections;
- import java.util.HashSet;
- import java.util.Hashtable;
- import java.util.Iterator;
import java.util.Map;
- import java.util.Set;
-
- import javax.swing.table.AbstractTableModel;
-
- import com.memoire.bu.BuInformationsDocument;
import org.fudaa.dodico.commun.DodicoLib;
import org.fudaa.dodico.corba.tr.LTrCodeCalcul;
import org.fudaa.dodico.corba.tr.STrProjetH2d;
! import org.fudaa.dodico.dico.DicoEntite;
import org.fudaa.dodico.dico.DicoModelAbstract;
! import org.fudaa.dodico.h2d.H2dFileFormat;
import org.fudaa.dodico.h2d.H2dLib;
import org.fudaa.dodico.h2d.H2dParametres;
--- 10,23 ----
import java.io.File;
import java.util.Map;
import org.fudaa.dodico.commun.DodicoLib;
+ import org.fudaa.dodico.commun.ProgressionInterface;
import org.fudaa.dodico.corba.tr.LTrCodeCalcul;
import org.fudaa.dodico.corba.tr.STrProjetH2d;
! import org.fudaa.dodico.dico.DicoCasFileFormat;
import org.fudaa.dodico.dico.DicoModelAbstract;
! import org.fudaa.dodico.dico.DicoParamsListener;
! import org.fudaa.dodico.fichiers.FileOperationSynthese;
import org.fudaa.dodico.h2d.H2dLib;
import org.fudaa.dodico.h2d.H2dParametres;
***************
*** 33,42 ****
import org.fudaa.dodico.telemac.io.TelemacCLInterface;
import org.fudaa.dodico.telemac.io.TelemacCasFileFormat;
- import org.fudaa.dodico.telemac.io.TelemacCasInterface;
import org.fudaa.dodico.telemac.io.TelemacLiquideInterface;
- import org.fudaa.fudaa.tr.TrEditor;
import org.fudaa.fudaa.tr.TrLib;
! import org.fudaa.fudaa.tr.dico.TrDicoEntiteFile;
! import org.fudaa.fudaa.tr.dico.TrDicoEntiteTableModel;
/**
--- 25,34 ----
import org.fudaa.dodico.telemac.io.TelemacCLInterface;
import org.fudaa.dodico.telemac.io.TelemacCasFileFormat;
import org.fudaa.dodico.telemac.io.TelemacLiquideInterface;
import org.fudaa.fudaa.tr.TrLib;
! import org.fudaa.fudaa.commun.FudaaUI;
! import org.fudaa.fudaa.dico.FDicoEntiteFile;
! import org.fudaa.fudaa.dico.FDicoMultiEntiteViewer;
! import org.fudaa.fudaa.dico.FDicoParams;
/**
***************
*** 44,241 ****
* @version $Id$
*/
! public class TrTelemacParametres extends H2dParametres
{
! public final class BaseFileEntiteTableModel extends AbstractTableModel
! {
! public int getRowCount()
! {
! return entiteFiles_.size();
! }
! public int getColumnCount()
! {
! return 2;
! }
!
!
!
! public Object getValueAt(int _r, int _c)
! {
! TrDicoEntiteFile ent = (TrDicoEntiteFile) entiteFiles_.get(_r);
! if (_c == 0)
! return ent;
! else if (_c == 1)
! {
! return ent.getValue();
! }
! return null;
! }
!
! public String getColumnName(int _c)
! {
! if (_c == 0)
! return "Description";
! else
! return "Fichier";
! }
!
! public void editer(int _r)
! {
! TrDicoEntiteFile entFile = (TrDicoEntiteFile) entiteFiles_.get(_r);
! TrEditor.getInstance().edit(entFile, DodicoLib.getAbsolutePath(dirBase_, entFile.getValue()));
! }
! }
!
!
! STrProjetH2d projet_;
!
! private String dirBase_;
! private TelemacCasFileFormat ft_;
! private BuInformationsDocument infosDoc_;
!
! /**
! * Entites-valeurs de ce projet.
! */
! private Hashtable entitesValeurs_;
!
! /**
! * contient l'id et la description des fichiers speciaux de ce projet
! */
! private ArrayList entiteFiles_;
!
! private TrDicoEntiteFile principal_;
!
! public TrTelemacParametres()
! {
! }
!
! private void initProjet(TelemacCasFileFormat _ft)
{
! projet_ = new STrProjetH2d();
! projet_.codeCalcul = LTrCodeCalcul.TELEMAC;
! projet_.version = _ft.getVersion();
! ft_ = _ft;
}
!
! public void updateKey(DicoEntite _ent, String _newValue)
{
! if (entitesValeurs_.containsKey(_ent))
! {
! entitesValeurs_.put(_ent, _newValue);
! }
! else
{
! System.out.println("Entite non trouve");
}
}
!
! public String getTitre()
! {
! return getEntiteValue(ft_.getTitreEntite());
! }
!
! public TrDicoEntiteFile getMainEntityFile()
! {
! return principal_;
! }
!
! public void setCas(TelemacCasFileFormat _ft, File _fichierCas, TrTelemacCasProcess _p)
{
! initProjet(_ft);
! dirBase_ = DodicoLib.getConanicalPath(_fichierCas.getParentFile());
! DicoEntite fichierPrincEntite = ft_.getFichierPrincipalEntite();
! if (fichierPrincEntite == null)
! {
! _p.error("La definition du fichier principal n'a pas été trouvée");
! return;
! }
!
! principal_ = new TrDicoEntiteFile(FICHIER_PRINCIPAL, fichierPrincEntite, _fichierCas.getName());
! TelemacCasInterface inter = (TelemacCasInterface) _p.read(_fichierCas, _ft, principal_);
! if ((principal_.containsErrors()))
! {
! _p.error("Le fichier cas est invalide");
! }
! else
! {
! entitesValeurs_ = inter.getInputs();
! //suppression de l'entite correspondante au fichier cas
! entitesValeurs_.remove(fichierPrincEntite);
! //Les entites representant des fichiers du fichier cas
! DicoEntite[] entFichiers = ft_.getDico().getFichierEntitesFor(entitesValeurs_);
! entiteFiles_ = new ArrayList(entFichiers.length + 3);
! synchronized (entiteFiles_)
! {
! entiteFiles_.add(principal_);
! int n = entFichiers.length - 1;
! DicoEntite e;
! String specialType;
! for (int i = n; i >= 0; i--)
! {
! e = entFichiers[i];
! specialType = ft_.getSpecialType(e);
! //si fichier special
! if (specialType != null)
! {
! //si ce n'est pas le principal, on l'ajoute
! if (!FICHIER_PRINCIPAL.equals(specialType))
! {
! entiteFiles_.add(new TrDicoEntiteFile(specialType, e, (String) entitesValeurs_.remove(e)));
! }
! }
! else
! {
! entiteFiles_.add(new TrDicoEntiteFile(null, e, (String) entitesValeurs_.remove(e)));
! }
! }
! }
! }
}
! public DicoModelAbstract getDico()
{
! return ft_.getDico();
}
! public boolean loadAll(TrTelemacCasProcess _p)
{
! return loadGeometrie(_p) && loadConditionsLimite(_p) && loadConditionsLimiteLiquide(_p);
}
- protected synchronized TrDicoEntiteFile getSpecialFileEntite(String _ID)
- {
- TrDicoEntiteFile ent;
- for (Iterator it = entiteFiles_.iterator(); it.hasNext();)
- {
- ent = (TrDicoEntiteFile) it.next();
- if (_ID.equals(ent.getId()))
- return ent;
-
- }
- return null;
- }
! protected String getEntiteValue(DicoEntite _e)
{
! return (String) entitesValeurs_.get(_e);
}
! public boolean loadGeometrie(TrTelemacCasProcess _p)
{
! TrDicoEntiteFile entFile = getSpecialFileEntite(H2dParametres.FICHIER_GEOMETRIE);
if (entFile == null)
{
! _p.error(TrLib.geti18n("Définition du fichier géométrie non trouvée."));
return false;
}
! SerafinInterface sInter = (SerafinInterface) read(_p, entFile, ft_.getDefaultSerafinFormat(), true);
if (sInter == null)
return false;
! String fond = ft_.getDefaultSerafinFormat().getVariableFond();
int numVariable = DodicoLib.findObject(sInter.getVariables(), fond);
if (numVariable < 0)
{
//pour l'instant
! _p.error("bathymétrie non trouvée variable FOND ou es-tu ?");
return false;
}
--- 36,118 ----
* @version $Id$
*/
! public class TrTelemacParametres
{
+ FDicoParams dicoParams_;
+ FudaaUI ui_;
! protected TrTelemacParametres(FDicoParams _dicoParams,FudaaUI _ui)
{
! dicoParams_=_dicoParams;
! ui_=_ui;
}
!
! public static TrTelemacParametres init(
! File _file,
! TelemacCasFileFormat _ft,
! ProgressionInterface _progress,
! FudaaUI _ui)
{
! FDicoParams dicoParams_=FDicoParams.init(_file, _ft, _progress, _ui);
! if(dicoParams_!=null)
{
! return new TrTelemacParametres(dicoParams_,_ui);
}
+ return null;
}
!
! public boolean isValide()
{
! return dicoParams_.isValide();
}
+
+
! public FDicoParams getDicoParams()
{
! return dicoParams_;
}
! public TelemacCasFileFormat getTelemacFileFormat()
{
! return (TelemacCasFileFormat)( dicoParams_.getFileFormat());
}
+
+
! public boolean loadAll(ProgressionInterface _prg)
{
! return loadGeometrie(_prg)
! && loadConditionsLimite(_prg)
! && loadConditionsLimiteLiquide(_prg);
}
! public boolean loadGeometrie(ProgressionInterface _prg)
{
! FDicoEntiteFile entFile =
! dicoParams_.getSpecialFileEntite(TelemacCasFileFormat.FICHIER_GEOMETRIE);
if (entFile == null)
{
! ui_.error(
! "Fichier de maillage",
! TrLib.geti18n("Définition du fichier géométrie non trouvée."));
return false;
}
! FileOperationSynthese op = new FileOperationSynthese();
! SerafinInterface sInter =
! getTelemacFileFormat().getDefaultSerafinFormat().read(
! dicoParams_.getFile(entFile),
! op,
! _prg);
! ui_.manageErrorOperation(op);
if (sInter == null)
return false;
! String fond =
! getTelemacFileFormat().getDefaultSerafinFormat().getVariableFond();
int numVariable = DodicoLib.findObject(sInter.getVariables(), fond);
if (numVariable < 0)
{
//pour l'instant
! ui_.error("Maillage", "bathymétrie non trouvée variable FOND ou es-tu ?");
return false;
}
***************
*** 246,379 ****
}
double[] fondValues = sInter.getDonnees(0, numVariable);
! projet_.maillage = sInter.getMaillage();
! return H2dLib.setBathymetrie(projet_.maillage, fondValues);
! }
!
! public boolean loadConditionsLimite(TrTelemacCasProcess _p)
! {
! TrDicoEntiteFile entFile = getSpecialFileEntite(H2dParametres.FICHIER_CL);
! if (entFile == null)
! {
! _p.error(TrLib.geti18n("Définition du fichier de conditions limites non trouvée."));
! return false;
! }
! TelemacCLInterface inter = (TelemacCLInterface) read(_p, entFile, ft_.getDefaultTelemacCLFormat(), true);
! if (inter == null)
! return false;
! projet_.conditionsLimites = inter.getLines();
! return true;
}
! public boolean loadConditionsLimiteLiquide(TrTelemacCasProcess _p)
{
! TrDicoEntiteFile entFile = getSpecialFileEntite(H2dParametres.FICHIER_CL_LIQUIDE);
if (entFile == null)
{
! _p.error(TrLib.geti18n("Définition du fichier de conditions limites liquides non trouvée."));
return false;
}
! TelemacLiquideInterface inter = (TelemacLiquideInterface) read(_p, entFile, ft_.getDefaultTelemacLiquideFormat(), false);
if (inter == null)
return false;
! projet_.evolutionFrontieresLiquides = inter.getEvolutionsFrontieresLiquides();
return true;
}
! public boolean loadFond(TrTelemacCasProcess _p)
! {
! _p.error("non supporté pour l'instant");
! return false;
! }
!
! private Object read(TrTelemacCasProcess _p, TrDicoEntiteFile _entiteFile, H2dFileFormat _fileFormat, boolean _isVideError)
{
! DicoEntite ent = _entiteFile.getEntite();
! if (ent == null)
! {
! if (_isVideError)
! {
! _p.error("ce n'est pas une entree valide du fichier dico !");
! }
! return null;
! }
! String value = getEntiteValue(ent);
! //ne devrait jamais arriver
! if (value == null)
! {
! if (_isVideError)
! {
! _p.error(ent.getNom() + " spécifié mais vide !!!");
! }
! return null;
! }
! Object r = _p.read(dirBase_, value, _fileFormat, _entiteFile);
! if (_entiteFile.containsErrors())
! {
! _p.error(ent.getNom() + " fichier invalide");
! _p.maj(_entiteFile);
! return null;
! }
! return r;
}
! /**
! * @return
! */
! public String getDirBase()
{
! return dirBase_;
}
! /**
! * @param _string
! */
! public void setDirBase(String _string)
{
! dirBase_ = _string;
}
! /**
! * @see org.fudaa.dodico.tr.TrProjetH2d#getInformationsDocument()
! */
! public BuInformationsDocument getInformationsDocument()
{
! if (infosDoc_ != null)
{
! infosDoc_ = new BuInformationsDocument();
}
! return infosDoc_;
}
! public BaseFileEntiteTableModel getBaseFileEntiteTableModel()
{
! return new BaseFileEntiteTableModel();
}
- public TrDicoEntiteTableModel getEntiteTableModel()
- {
- return new TrDicoEntiteTableModel(new HashSet(entitesValeurs_.keySet()))
- {
- public final Set getAllEntiteSet()
- {
- return new HashSet(entitesValeurs_.keySet());
- }
- public final void setValue(DicoEntite _ent, String _value)
- {
- TrTelemacParametres.this.updateKey(_ent, _value);
- }
-
- public Map getUnModifiableEntiteValue()
- {
- return Collections.unmodifiableMap(entitesValeurs_);
- }
-
- public final String getValue(DicoEntite _ent)
- {
- return (String) entitesValeurs_.get(_ent);
- }
! };
}
// public TableModel getEntiteTableModel()
// {
--- 123,210 ----
}
double[] fondValues = sInter.getDonnees(0, numVariable);
! // projet_.maillage = sInter.getMaillage();
! // return H2dLib.setBathymetrie(projet_.maillage, fondValues);
! return true;
}
! public boolean loadConditionsLimite(ProgressionInterface _prg)
{
! FDicoEntiteFile entFile =
! dicoParams_.getSpecialFileEntite(TelemacCasFileFormat.FICHIER_CL);
if (entFile == null)
{
! ui_.error(
! "Conditions limites",
! TrLib.geti18n(
! "Définition du fichier de conditions limites non trouvée."));
return false;
}
! FileOperationSynthese op = new FileOperationSynthese();
! TelemacCLInterface inter =
! getTelemacFileFormat().getDefaultTelemacCLFormat().read(
! dicoParams_.getFile(entFile),
! op,
! _prg);
! ui_.manageErrorOperation(op);
if (inter == null)
return false;
! // projet_.conditionsLimites = inter.getLines();
return true;
}
! public void saveCas(ProgressionInterface _progress)
{
! dicoParams_.saveCas(_progress);
}
! public void saveAs(File _f, ProgressionInterface _prg)
{
! dicoParams_.saveAs(_f, _prg);
}
! public void saveCopy(File _f, ProgressionInterface _prg)
{
! dicoParams_.saveCopy(_f, _prg);
}
! public boolean loadConditionsLimiteLiquide(ProgressionInterface _prg)
{
! FDicoEntiteFile entFile =
! dicoParams_.getSpecialFileEntite(TelemacCasFileFormat.FICHIER_CL_LIQUIDE);
! 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 = new FileOperationSynthese();
! TelemacLiquideInterface inter =
! getTelemacFileFormat().getDefaultTelemacLiquideFormat().read(
! dicoParams_.getFile(entFile),
! op,
! _prg);
! ui_.manageErrorOperation(op);
! if (inter == null)
! return false;
! //projet_.evolutionFrontieresLiquides =
! //inter.getEvolutionsFrontieresLiquides();
! return true;
}
! public boolean loadFond(ProgressionInterface _prg)
{
! ui_.error("Programme", "non supporté pour l'instant");
! return false;
}
! public File getFileCas()
! {
! return dicoParams_.getMainFile();
}
+
// public TableModel getEntiteTableModel()
// {
***************
*** 398,401 ****
--- 229,267 ----
//
// }
+
+ // /**
+ // *
+ // */
+ // public void init(
+ // File _fichierPrinc,
+ // DicoCasFileFormat _ft,
+ // Map _initialSetValues,
+ // long _timeloaded,
+ // boolean _launchEvent)
+ // {
+ // if(_ft instanceof TelemacCasFileFormat)
+ // {
+ // init(_fichierPrinc, (TelemacCasFileFormat)_ft, _initialSetValues, _timeloaded, _launchEvent);
+ // }
+ // else
+ //
+ // ui_.error("Format telemac 2d uniquement");
+ // }
+ //
+ // public void init(
+ // File _fichierPrinc,
+ // TelemacCasFileFormat _ft,
+ // Map _initialSetValues,
+ // long _timeloaded,
+ // boolean _launchEvent)
+ // {
+ // super.init(
+ // _fichierPrinc,
+ // _ft,
+ // _initialSetValues,
+ // _timeloaded,
+ // _launchEvent);
+ // }
+
}
Index: TrTelemacProjet.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/telemac/TrTelemacProjet.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** TrTelemacProjet.java 19 May 2003 14:31:49 -0000 1.1
--- TrTelemacProjet.java 4 Jul 2003 15:34:57 -0000 1.2
***************
*** 10,17 ****
import java.awt.Dimension;
! import com.memoire.bu.BuCommonImplementation;
import org.fudaa.dodico.h2d.H2dParametres;
import org.fudaa.fudaa.tr.TrProjet;
--- 10,52 ----
import java.awt.Dimension;
+ import java.awt.event.ActionEvent;
+ import java.awt.event.ActionListener;
+ import java.io.File;
! import javax.swing.BorderFactory;
! import javax.swing.JButton;
! import javax.swing.JMenuBar;
!
! import com.memoire.bu.BuBorderLayout;
! import com.memoire.bu.BuButton;
! import com.memoire.bu.BuInformationsDocument;
! import com.memoire.bu.BuInternalFrame;
! import com.memoire.bu.BuMainPanel;
! import com.memoire.bu.BuPanel;
! import com.memoire.bu.BuResource;
! import com.memoire.bu.BuScrollPane;
! import com.memoire.bu.BuTable;
! import com.memoire.bu.BuTaskOperation;
+ import org.fudaa.dodico.calcul.CalculLauncher;
+ import org.fudaa.dodico.commun.ProgressionBuAdapter;
+ import org.fudaa.dodico.commun.ProgressionInterface;
+ import org.fudaa.dodico.dico.DicoCasFileFormat;
+ import org.fudaa.dodico.dico.DicoCasInterface;
+ import org.fudaa.dodico.dico.DicoParamsListener;
+ import org.fudaa.dodico.fichiers.FileOperationSynthese;
import org.fudaa.dodico.h2d.H2dParametres;
+ import org.fudaa.dodico.telemac.io.TelemacCasFileFormat;
+ import org.fudaa.fudaa.commun.FudaaUI;
+ import org.fudaa.fudaa.commun.FudaaLib;
+ import org.fudaa.fudaa.commun.calcul.FudaaCalculAction;
+ import org.fudaa.fudaa.dico.FDicoCalculLocal;
+ import org.fudaa.fudaa.dico.FDicoComparator;
+ import org.fudaa.fudaa.dico.FDicoFilleProjet;
+ import org.fudaa.fudaa.dico.FDicoParams;
+ import org.fudaa.fudaa.dico.FDicoProjet;
+ import org.fudaa.fudaa.dico.FDicoProjetAbstract;
+ import org.fudaa.fudaa.dico.FDicoProjetInterface;
+ import org.fudaa.fudaa.tr.TrImplementation;
import org.fudaa.fudaa.tr.TrProjet;
***************
*** 20,62 ****
* @version $Id$
*/
! public class TrTelemacProjet extends TrProjet
{
TrTelemacParametres params_;
! TrTelemacFilleEntite entiteFille_;
!
!
! public TrTelemacProjet(TrTelemacParametres _p)
{
! params_=_p;
}
! public void active(BuCommonImplementation _impl)
{
! if(entiteFille_==null)
! {
! entiteFille_=new TrTelemacFilleEntite(this,params_.getBaseFileEntiteTableModel());
! Dimension dim=_impl.getMainPanel().getDesktop().getSize();
! entiteFille_.setSize((int)(dim.getWidth()*0.8),(int)(dim.getHeight()*0.8));
! entiteFille_.setLocation(0,0);
! _impl.addInternalFrame(entiteFille_);
! }
! entiteFille_.pack();
! entiteFille_.setVisible(true);
}
!
!
! public H2dParametres getParamatres()
{
! return getTelemacParamatres();
}
!
! public TrTelemacParametres getTelemacParamatres()
{
! return params_;
}
-
! }
--- 55,109 ----
* @version $Id$
*/
! public class TrTelemacProjet
! extends FDicoProjetAbstract implements TrProjet
!
{
TrTelemacParametres params_;
!
! public TrTelemacProjet(TrTelemacParametres _params,TrImplementation _impl)
{
! super( _impl);
! params_=_params;
! if(isValide()) actions_.setEnableCalcul(true);
}
! public final boolean isValide()
{
! return params_.isValide();
! }
!
! public FudaaUI getUI()
! {
! return impl_;
}
+ public static TrTelemacProjet init(
+ File _file,
+ TelemacCasFileFormat _fileFormat,
+ ProgressionInterface _progress,TrImplementation _ui)
+ {
+ //TODO: gerer si param deja present
+ TrTelemacParametres params_=TrTelemacParametres.init(_file, _fileFormat, _progress, _ui);
+ if(params_!=null) return new TrTelemacProjet(params_,_ui);
+ else return null;
+ }
+
! /**
! *
! */
! public String getID()
{
! return TrProjet.TELEMAC_ID;
}
!
! /**
! *
! */
! public FDicoParams getKeys()
{
! return params_.getDicoParams();
}
! }
\ No newline at end of file
--- TrTelemacCasProcess.java DELETED ---
--- TrTelemacFilleEntite.java DELETED ---
|
Update of /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/dico In directory sc8-pr-cvs1:/tmp/cvs-serv12574/dico Removed Files: TrDicoEntiteFile.java TrDicoEntitePanel.java TrDicoEntiteTableModel.java TrDicoMultiEntiteViewer.java TrDicoTableColumn.java TrDicoTableColumnIdentifier.java TrDicoTableEditorChooser.java TrDicoTableRendererChooser.java TrDicoTableSortIndicator.java Log Message: creation package fudaa/dico --- TrDicoEntiteFile.java DELETED --- --- TrDicoEntitePanel.java DELETED --- --- TrDicoEntiteTableModel.java DELETED --- --- TrDicoMultiEntiteViewer.java DELETED --- --- TrDicoTableColumn.java DELETED --- --- TrDicoTableColumnIdentifier.java DELETED --- --- TrDicoTableEditorChooser.java DELETED --- --- TrDicoTableRendererChooser.java DELETED --- --- TrDicoTableSortIndicator.java DELETED --- |
Update of /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/commun/dodico
In directory sc8-pr-cvs1:/tmp/cvs-serv10924/dodico
Added Files:
FudaaDodicoMonitor.java FudaaDodicoSelectionServeur.java
FudaaInfoConnexion.java FudaaPersonneServeur.java
Log Message:
refactorisation
--- NEW FILE: FudaaDodicoMonitor.java ---
/*
* @file FudaaDodicoMonitor.java
* @creation 2000-07-15
* @modification $Date: 2003/07/04 15:28:48 $
* @license GNU General Public License 2
* @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne
* @mail de...@fu...
*/
package org.fudaa.fudaa.commun.dodico;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.border.*;
import com.memoire.bu.*;
import org.fudaa.dodico.objet.*;
/**
* @version $Revision: 1.1 $ $Date: 2003/07/04 15:28:48 $ by $Author: deniger $
* @author Axel von Arnim
*/
public class FudaaDodicoMonitor
extends JComponent
implements Runnable
{
protected int[] actu_;
public FudaaDodicoMonitor()
{
super();
actu_=new int[] { 0,0 };
setName("FUDAA_DODICO_MONITOR");
setBackground(Color.gray);
setForeground(new Color(64,32,96));
setBorder(new LineBorder(Color.black));
setPreferredSize(new Dimension(64,14));
Thread monitor = new Thread(this,"Fudaa dodico monitor");
monitor.setDaemon(true);
monitor.setPriority(Thread.MIN_PRIORITY);
monitor.start();
}
public Point getToolTipLocation(MouseEvent _evt)
{
Point r=super.getToolTipLocation(_evt);
if(r==null)
{
JToolTip tt=new JToolTip();
tt.setToolTipText(getToolTipText());
r=new Point(0,-tt.getPreferredSize().height-1);
}
return r;
}
public void paint(Graphics _g)
{
Dimension size =getSize();
Insets insets=getInsets();
int w=size.width -insets.left-insets.right;
int h=size.height-insets.top-insets.bottom;
Color bg=getBackground();
Color fg=getForeground();
BuLib.setColor(_g,bg);
_g.fillRect(insets.left,insets.top,w,h);
int xmax=w*actu_[0]/Math.max(1,actu_[0]+actu_[1]);
BuLib.setColor(_g,bg.brighter());
_g.fillRect(insets.left,insets.top,xmax,h);
String m=actu_[0]+" - "+actu_[1];
int xm=(w-_g.getFontMetrics().stringWidth(m))/2+insets.left;
int ym=insets.top+h;
BuLib.setColor(_g,fg.darker());
_g.drawString(m,xm+2,ym-1);
_g.drawString(m,xm+2,ym-2);
_g.drawString(m,xm+1,ym-1);
BuLib.setColor(_g,fg.brighter().brighter());
_g.drawString(m,xm+1,ym-2);
super.paint(_g);
}
public void run()
{
while(true)
{
actu_=DDiffuseur.getNumbers();
BuUpdateGUI.repaintLater(this);
setToolTipText
(actu_[0]+" valid corba objects, "+actu_[1]+" invalid");
try { Thread.sleep(5000); }
catch(Exception ex) { }
}
}
}
--- NEW FILE: FudaaDodicoSelectionServeur.java ---
/*
* @file FudaaDodicoSelectionServeur.java
* @creation 2001-07-15
* @modification $Date: 2003/07/04 15:28:48 $
* @license GNU General Public License 2
* @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne
* @mail de...@fu...
*/
package org.fudaa.fudaa.commun.dodico;
import java.awt.Dimension;
import java.awt.FlowLayout;
import java.awt.Graphics;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.lang.reflect.Method;
import java.util.StringTokenizer;
import javax.swing.JComponent;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.border.BevelBorder;
import javax.swing.border.EmptyBorder;
import javax.swing.event.ListSelectionEvent;
import javax.swing.event.ListSelectionListener;
import org.fudaa.dodico.corba.objet.IActivateur;
import org.fudaa.dodico.corba.objet.IActivateurHelper;
import org.fudaa.dodico.corba.objet.IObjet;
import org.fudaa.dodico.corba.objet.IObjetHelper;
import org.fudaa.dodico.corba.objet.IOrganisme;
import org.fudaa.dodico.corba.objet.IPersonne;
import org.fudaa.dodico.corba.objet.IPersonneHelper;
import org.fudaa.dodico.corba.usine.IUsine;
import org.fudaa.dodico.objet.CDodico;
import org.fudaa.dodico.usine.UsineHelper;
import com.memoire.bu.BuBorderLayout;
import com.memoire.bu.BuButton;
import com.memoire.bu.BuCommonInterface;
import com.memoire.bu.BuDialog;
import com.memoire.bu.BuDialogError;
import com.memoire.bu.BuEmptyList;
import com.memoire.bu.BuInformationsSoftware;
import com.memoire.bu.BuLabel;
import com.memoire.bu.BuLib;
import com.memoire.bu.BuPanel;
import com.memoire.bu.BuResource;
import com.memoire.bu.BuScrollPane;
import com.memoire.bu.BuUpdateGUI;
import com.memoire.bu.BuVerticalLayout;
/**
* A standard dialog to select an active server.
*
* @version $Revision: 1.1 $ $Date: 2003/07/04 15:28:48 $ by $Author: deniger $
* @author Axel von Arnim
*/
public class FudaaDodicoSelectionServeur
extends BuDialog
implements ActionListener, ListSelectionListener
{
private final static String LOCAL_SERVER="serveur local";
private final static String LOCAL_PERSON="utilisateur local";
protected BuButton btValider_;
protected BuButton btAnnuler_;
protected BuEmptyList ltServeurs_, ltPersonnes_;
protected String label_;
protected String interface_;
private IObjet serveur_;
private IPersonne personne_;
private BuPanel component_;
private FudaaProgress fp_;
public FudaaDodicoSelectionServeur
(BuCommonInterface _parent,
BuInformationsSoftware _isoft,
String _title,
String _label,
String _interface)
{
super(_parent,_isoft,_title);
interface_=_interface;
serveur_=null;
personne_=null;
label_=_label;
ltServeurs_.setListData(new String[] {LOCAL_SERVER});
ltServeurs_.setSelectedIndex(0);
ltPersonnes_.setListData(new String[] {LOCAL_PERSON});
ltPersonnes_.setSelectedIndex(0);
JPanel pnb=new JPanel(new FlowLayout(FlowLayout.RIGHT));
btValider_=new BuButton(BuLib.loadCommandIcon("VALIDER"),
BuResource.BU.getString("Valider"));
btValider_.addActionListener(this);
getRootPane().setDefaultButton(btValider_);
pnb.add(btValider_);
btAnnuler_=new BuButton(BuLib.loadCommandIcon("ANNULER"),
BuResource.BU.getString("Annuler"));
btAnnuler_.addActionListener(this);
pnb.add(btAnnuler_);
content_.add(pnb,BuBorderLayout.SOUTH);
}
public void findServers()
{
String[] servernames=CDodico.findServerNames(interface_,4000);
String[] personnames=CDodico.findServerNames("::objet::IPersonne",4000);
if(servernames.length==0)
{
servernames=CDodico.findServerNames("::objet::IActivateur",4000);
for(int i=0;i<servernames.length;i++)
{
IActivateur activateur=IActivateurHelper.narrow
(CDodico.findServerByName(servernames[i],4000));
activateur.active(interface_);
activateur.active("::objet::IPersonne");
}
}
String[] allservernames=new String[servernames.length+1];
for(int i=0; i<servernames.length; i++) allservernames[i]=servernames[i];
allservernames[servernames.length]=LOCAL_SERVER;
ltServeurs_.setListData(allservernames);
String[] allpersonnames=new String[personnames.length+1];
for(int i=0; i<personnames.length; i++) allpersonnames[i]=personnames[i];
allpersonnames[personnames.length]=LOCAL_PERSON;
ltPersonnes_.setListData(allpersonnames);
repaint();
}
public JComponent getComponent()
{
initComponent();
return component_;
}
private void initComponent()
{
if( ltServeurs_==null ) {
ltServeurs_=new BuEmptyList();
ltServeurs_.setEmptyText("aucun serveur");
// ltServeurs_.addListSelectionListener(this);
}
if( ltPersonnes_==null ) {
ltPersonnes_=new BuEmptyList();
ltPersonnes_.setEmptyText("aucune personne");
// ltPersonnes_.addListSelectionListener(this);
}
BuButton b=new BuButton("rechercher");
b.setActionCommand("RECHERCHER");
b.addActionListener(this);
fp_=new FudaaProgress();
fp_.setSpeed(3);
BuPanel p=new BuPanel();
p.setLayout(new BuVerticalLayout());
p.setBorder(new EmptyBorder(5,5,5,5));
p.add(new BuLabel(label_));
p.add(new BuScrollPane(ltServeurs_));
p.add(new JPanel());
p.add(new BuLabel("Authentification"));
p.add(new BuScrollPane(ltPersonnes_));
p.add(new JPanel());
p.add(b);
p.add(fp_);
component_=p;
}
public void valueChanged(ListSelectionEvent _evt)
{
// JComponent source=(JComponent)_evt.getSource();
/*
String serverStr=(String)ltServeurs_.getSelectedValue();
String personStr=(String)ltPersonnes_.getSelectedValue();
if( serverStr==null && personStr==null ) return;
System.err.println(serverStr+" "+personStr);
if( source==ltServeurs_ ) {
if( LOCAL_SERVER.equals(serverStr) )
ltPersonnes_.setSelectedValue(LOCAL_PERSON, true);
else {
ltPersonnes_.setSelectedValue(LOCAL_PERSON, false);
ltServeurs_.setSelectedValue(LOCAL_SERVER, false);
}
} else
if( source==ltPersonnes_ ) {
if( LOCAL_PERSON.equals(personStr) )
ltServeurs_.setSelectedValue(LOCAL_SERVER, true);
else {
ltPersonnes_.setSelectedValue(LOCAL_PERSON, false);
ltServeurs_.setSelectedValue(LOCAL_SERVER, false);
}
}
*/
}
public void actionPerformed(ActionEvent _evt)
{
JComponent source=(JComponent)_evt.getSource();
String cmd=_evt.getActionCommand();
if((source==btValider_))
{
String serverStr=(String)ltServeurs_.getSelectedValue();
String personStr=(String)ltPersonnes_.getSelectedValue();
if( serverStr==null || personStr==null ) return;
reponse_=JOptionPane.OK_OPTION;
// SERVEUR
if( !LOCAL_SERVER.equals(serverStr) ) {
try {
serveur_ =IObjetHelper.narrow(CDodico.findServerByName
(serverStr,2000));
} catch( Throwable t ) {
new BuDialogError(
null,
null,
"Impossible de connecter le serveur:\n"+
serverStr+"\n"+
"Erreur: "+t.getMessage()).activate();
reponse_=JOptionPane.CANCEL_OPTION;
serveur_=null;
}
} else {
IUsine u=UsineHelper.creeUsineLocale();
StringTokenizer tok=new StringTokenizer(new String(interface_), "::");
String packagename=capitalize(tok.nextToken());
String classname=tok.nextToken().substring(1);
try {
System.out.println("SelectionServeur: démarrage du serveur local "+classname);
Class uc=u.getClass();
Method um=uc.getMethod("cree"+packagename+classname, new Class[0]);
serveur_=(IObjet)um.invoke(u, new Object[0]);
} catch( Throwable t ) {
new BuDialogError(
null,
null,
"Impossible de lancer le serveur local:\n"+
classname+"\n"+
"Erreur: "+t.getMessage()).activate();
reponse_=JOptionPane.CANCEL_OPTION;
serveur_=null;
t.printStackTrace();
}
}
// PERSONNE
// if( !LOCAL_PERSON.equals(personStr) ) {
if( !LOCAL_SERVER.equals(serverStr) ) {
try {
personne_ =IPersonneHelper.narrow(CDodico.findServerByName
(personStr,2000));
} catch( Throwable t ) {
new BuDialogError(
null,
null,
"Impossible de connecter la personne:\n"+
personStr+"\n"+
"Erreur: "+t.getMessage()).activate();
reponse_=JOptionPane.CANCEL_OPTION;
personne_=null;
}
} else {
System.out.println("SelectionPersonne: création de CPersonne("+LOCAL_PERSON+")");
IUsine u=UsineHelper.findUsine();
IOrganisme o=u.creeObjetOrganisme();
o.sigle("organisme local");
personne_=u.creeObjetPersonne();
personne_.organisme(o);
personne_.nom(LOCAL_PERSON);
}
setVisible(false);
}
if(source==btAnnuler_)
{
reponse_=JOptionPane.CANCEL_OPTION;
serveur_ =null;
setVisible(false);
}
if("RECHERCHER".equals(cmd))
{
Thread t=new Thread()
{
public void run()
{
findServers();
}
};
t.start();
fp_.start(t);
}
}
public IObjet getServeur()
{ return serveur_; }
public IPersonne getPersonne()
{ return personne_; }
private String capitalize(String msg)
{
return msg.substring(0, 1).toUpperCase()+msg.substring(1);
}
public static void main(String[] args)
{
FudaaDodicoSelectionServeur s=new FudaaDodicoSelectionServeur(null, null, "", "", "::vag::ICalculVag");
s.activate();
}
}
class FudaaProgress extends JComponent
{
int value_=-1;
boolean forwards_=true;
int speed_=1;
boolean stop_=true;
Thread t_=null;
int cursorValue_=20;
public FudaaProgress()
{
setPreferredSize(new Dimension(50, 20));
setSize(getPreferredSize());
setBorder(new BevelBorder(BevelBorder.LOWERED));
}
public void setSpeed(int s)
{
if( s<=0 ) speed_=1;
else
if( s>10 ) speed_=10;
else
speed_=s;
}
public int getSpeed() { return speed_; }
public void setCursorWidth(int s)
{
if( s<=0 ) cursorValue_=20;
cursorValue_=s;
}
public int getCursorWidth() { return cursorValue_; }
public void start(Thread t)
{
stop_=false;
final Thread ft=t;
if( ft!=null ) {
Thread th=new Thread() {
public void run()
{
value_=0;
boolean ftRunning=(ft==null)||(ft.isAlive());
while(!stop_ && ftRunning) {
if( value_>=100-cursorValue_ ) forwards_=false;
if( value_<=0 ) forwards_=true;
if( forwards_ ) value_+=speed_;
else value_-=speed_;
BuUpdateGUI.repaintNow(FudaaProgress.this);
try { sleep(50); }
catch( InterruptedException ie ) {
System.err.println("interrupted");
}
ftRunning=(ft==null)||(ft.isAlive());
}
value_=-1;
repaint();
}
};
th.setPriority(Thread.MIN_PRIORITY);
th.start();
}
}
public void stop()
{
stop_=true;
}
public void paintComponent(Graphics g)
{
super.paintComponent(g);
if(value_<0) return;
Dimension d=getSize();
g.fillRect((d.width*value_)/100, 0, (d.width*cursorValue_)/100, d.height);
}
}
--- NEW FILE: FudaaInfoConnexion.java ---
/*
* @file FudaaInfoConnexion.java
* @creation 2001-07-18
* @modification $Date: 2003/07/04 15:28:48 $
* @license GNU General Public License 2
* @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne
* @mail de...@fu...
*/
package org.fudaa.fudaa.commun.dodico;
import org.fudaa.dodico.corba.objet.*;
import org.fudaa.dodico.corba.calcul.*;
import javax.swing.event.*;
/**
* Cette classe stocke les informations du serveur utilise. Les donnees sont
* initialisees par la fenetre popConnexion (FudaaImplementation) et recuperees
* dans l'implementation grace a un evenement ChangeEvent envoye par
* popConnexion.
*
* @version $Revision: 1.1 $ $Date: 2003/07/04 15:28:48 $ by $Author: deniger $
* @author Axel von Arnim
*/
public class FudaaInfoConnexion
{
public final static boolean ERROR=true;
public final static boolean NO_ERROR=false;
public ITache SERVEUR;
public IParametres PARAMS;
public IResultats RESULTS;
public IPersonne PERSONNE;
public IConnexion CONNEXION;
private ChangeListener l;
private boolean error_;
public void addChangeListener(ChangeListener _l)
{
l=_l;
}
public void printInfo()
{
try {
System.err.println("FudaaInfoConnexion: SERVEUR = "+SERVEUR.enChaine());
System.err.println("FudaaInfoConnexion: CONNEXION= "+CONNEXION.enChaine());
System.err.println("FudaaInfoConnexion: PERSONNE = "+PERSONNE.enChaine());
if( ICalculHelper.narrow(SERVEUR)!=null )
{
if( PARAMS!=null)
System.err.println("FudaaInfoConnexion: PARAMS = "+PARAMS.enChaine());
else
System.out.println("Erreur: paramètres nulles.");
if( RESULTS!=null)
System.err.println("FudaaInfoConnexion: RESULTS = "+RESULTS.enChaine());
else
System.out.println("Erreur: Résultats nuls.");
}
} catch( Throwable t ) {}
}
public boolean errorOccurred()
{
return error_;
}
public void fireChangeEvent(boolean errorOccured)
{
error_=errorOccured;
ChangeEvent e=new ChangeEvent(this);
l.stateChanged(e);
}
}
--- NEW FILE: FudaaPersonneServeur.java ---
/*
* @file FudaaPersonneServeur.java
* @creation 2000-02-23
* @modification $Date: 2003/07/04 15:28:48 $
* @license GNU General Public License 2
* @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne
* @mail de...@fu...
*/
package org.fudaa.fudaa.commun.dodico;
import com.memoire.bu.BuPreferences;
import org.fudaa.dodico.corba.objet.IOrganisme;
import org.fudaa.dodico.corba.objet.IPersonne;
import org.fudaa.dodico.corba.usine.IUsine;
import org.fudaa.dodico.objet.CDodico;
import org.fudaa.dodico.usine.UsineHelper;
/**
* @version $Revision: 1.1 $ $Date: 2003/07/04 15:28:48 $ by $Author: deniger $
* @author Axel von Arnim
*/
public class FudaaPersonneServeur
{
public static void main(String[] args)
{
IUsine u=UsineHelper.findUsine();
IOrganisme o=u.creeObjetOrganisme();
o.sigle ("CETMEF");
o.intitule("Centre d'Etudes Techniques Maritimes et Fluviales");
o.adresse ("2 bd Gambetta, 60200 COMPIEGNE");
CDodico.rebind(o.sigle(),o);
IPersonne p=u.creeObjetPersonne();
p.prenom(BuPreferences.BU.getStringProperty("user.firstname",null));
p.nom (BuPreferences.BU.getStringProperty("user.lastname" ,null));
p.mel (BuPreferences.BU.getStringProperty("user.email" ,null));
p.telephone("03.44.92.60.34");
p.organisme(o);
String n=""+p.prenom()+" "+p.nom();
CDodico.rebind(n,p);
}
}
|
|
From: <de...@us...> - 2003-07-04 15:24:38
|
Update of /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/commun/modele
In directory sc8-pr-cvs1:/tmp/cvs-serv10326/modele
Modified Files:
ModeleSMaillageElement.java
Log Message:
Refactorisation de commun (ajout de module specifique)
Index: ModeleSMaillageElement.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/commun/modele/ModeleSMaillageElement.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** ModeleSMaillageElement.java 18 Mar 2003 17:11:23 -0000 1.3
--- ModeleSMaillageElement.java 4 Jul 2003 15:24:36 -0000 1.4
***************
*** 23,27 ****
*/
public class ModeleSMaillageElement
! implements ZModeleMaillageElement
{
--- 23,27 ----
*/
public class ModeleSMaillageElement
! // implements ZModeleMaillageElement
{
***************
*** 53,57 ****
* @return Le nombre de points
*/
! public int nombreNoeuds()
{
return smaillage_.noeuds.length;
--- 53,57 ----
* @return Le nombre de points
*/
! public int getNombreNoeuds()
{
return smaillage_.noeuds.length;
***************
*** 316,320 ****
{
int nb=nombrePolygones();
! Hashtable tableNoeud=new Hashtable(nombreNoeuds());
GrElement[] r=new GrElement[nb];
for(int i=nb-1;i>=0;i--)
--- 316,320 ----
{
int nb=nombrePolygones();
! Hashtable tableNoeud=new Hashtable(getNombreNoeuds());
GrElement[] r=new GrElement[nb];
for(int i=nb-1;i>=0;i--)
|
Update of /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/commun/projet
In directory sc8-pr-cvs1:/tmp/cvs-serv9843/projet
Added Files:
FudaaParamChangeLog.java FudaaParamEvent.java
FudaaParamEventProxy.java FudaaParamEventView.java
FudaaParamListener.java FudaaProjet.java FudaaProjetEvent.java
FudaaProjetInformations.java FudaaProjetInformationsFrame.java
FudaaProjetListener.java
Log Message:
refactorisation de commun
les classes qui permettent de gerer les projets sont rassemblees dans
projet
les classes concernant les JTable dans tableau
--- NEW FILE: FudaaParamChangeLog.java ---
/*
* @file FudaaParamChangeLog.java
* @creation 1999-11-24
* @modification $Date: 2003/07/04 15:22:47 $
* @license GNU General Public License 2
* @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne
* @mail de...@fu...
*/
package org.fudaa.fudaa.commun.projet;
import com.memoire.bu.*;
import java.util.*;
/**
* ChangeLog. Sert a logguer dans un vecteur de strings les changements apportes
* aux donnees du projet.
*
* @version $Revision: 1.1 $ $Date: 2003/07/04 15:22:47 $ by $Author: deniger $
* @author Axel von Arnim
*/
public class FudaaParamChangeLog
{
public static FudaaParamChangeLog CHANGE_LOG=new FudaaParamChangeLog();
private Vector changeLog_;
private BuApplication app_;
private FudaaParamEventView msgView_;
boolean dirty_;
protected FudaaParamChangeLog()
{
changeLog_=new Vector();
app_=null;
msgView_=null;
dirty_=false;
}
public void setApplication(BuApplication app, FudaaParamEventView v)
{
app_=app;
msgView_=v;
}
// ChangeLog
public boolean isDirty()
{
return dirty_;
}
public void setDirty(boolean d)
{
if( app_==null ) return;
if( dirty_==d ) return;
dirty_=d;
String title=app_.getTitle();
if( d ) app_.setTitle(title+" *");
else {
cleanChangeLog();
int index=title.lastIndexOf(" *");
if( index>0 ) title=title.substring(0, index);
app_.setTitle(title);
}
}
private void cleanChangeLog()
{
changeLog_.clear();
setDirty(false);
if( msgView_!=null ) msgView_.removeAllMessages();
}
public void addChangeLog(String log)
{
setDirty(true);
changeLog_.add(log);
if( msgView_!=null ) msgView_.addMessage(log);
}
public String[] getChangeLog()
{
String[] log=new String[changeLog_.size()];
for(int i=0; i<changeLog_.size(); i++) {
log[i]=(String)changeLog_.get(i);
}
return log;
}
}
--- NEW FILE: FudaaParamEvent.java ---
/*
* @file FudaaParamEvent.java
* @creation 1999-10-14
* @modification $Date: 2003/07/04 15:22:47 $
* @license GNU General Public License 2
* @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne
* @mail de...@fu...
*/
package org.fudaa.fudaa.commun.projet;
import java.util.*;
/**
* @version $Revision: 1.1 $ $Date: 2003/07/04 15:22:47 $ by $Author: deniger $
* @author Axel von Arnim
*/
public class FudaaParamEvent
extends EventObject
{
public static final int STRUCT_CREATED=0x00;
public static final int STRUCT_DELETED=0x01;
public static final int STRUCT_MODIFIED=0x02;
// public static final int CAL_GENERAL=0x04;
private int id_;
private String key_;
private String msg_;
private Object struct_;
private String field_;
public FudaaParamEvent(Object src, int id, Object s)
{
super(src);
id_=id;
key_=null;
msg_=null;
field_=null;
struct_=s;
if( struct_ instanceof String )
System.err.println("FudaaParamEvent: struct is of String type: error?");
}
public FudaaParamEvent(Object src, int id, String key, Object s)
{
this(src, id, s);
key_=key;
}
public FudaaParamEvent(Object src, int id, String key, Object s, String msg)
{
this(src, id, key, s);
msg_=msg;
}
public FudaaParamEvent(Object src, int id, String key, Object s, String msg, String field)
{
this(src, id, key, s, msg);
field_=field;
}
public String getMessage()
{
return msg_;
}
public void setMessage(String msg)
{
msg_=msg;
}
public int getID()
{
return id_;
}
public void setID(int id)
{
id_=id;
}
public String getKey()
{
return key_;
}
public Object getStruct()
{
return struct_;
}
public String getField()
{
return field_;
}
}
--- NEW FILE: FudaaParamEventProxy.java ---
/*
* @file FudaaParamEventProxy.java
* @creation 2000-01-19
* @modification $Date: 2003/07/04 15:22:47 $
* @license GNU General Public License 2
* @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne
* @mail de...@fu...
*/
package org.fudaa.fudaa.commun.projet;
import java.util.*;
/**
* @version $Revision: 1.1 $ $Date: 2003/07/04 15:22:47 $ by $Author: deniger $
* @author Axel von Arnim
*/
public class FudaaParamEventProxy
{
public final static FudaaParamEventProxy FUDAA_PARAM=new FudaaParamEventProxy();
Vector listeners_;
protected FudaaParamEventProxy()
{
listeners_=new Vector();
}
public synchronized void addFudaaParamListener(FudaaParamListener l)
{
if( !listeners_.contains(l) )
listeners_.add(l);
}
public synchronized void removeFudaaParamListener(FudaaParamListener l)
{
if( listeners_.contains(l) )
listeners_.remove(l);
}
public final Vector getFudaaParamListeners() { return listeners_; }
public synchronized void fireParamStructCreated(FudaaParamEvent e)
{
e.setID(e.getID()|FudaaParamEvent.STRUCT_CREATED);
String msg=e.getMessage();
if( (msg!=null)&&(
(msg.startsWith("+ "))||
(msg.startsWith("- "))||
(msg.startsWith("M "))) )
msg=msg.substring(2);
e.setMessage("+ "+msg);
for(int i=0; i<listeners_.size(); i++)
((FudaaParamListener)listeners_.get(i)).paramStructCreated(e);
}
public synchronized void fireParamStructDeleted(FudaaParamEvent e)
{
e.setID(e.getID()|FudaaParamEvent.STRUCT_DELETED);
String msg=e.getMessage();
if( (msg!=null)&&(
(msg.startsWith("+ "))||
(msg.startsWith("- "))||
(msg.startsWith("M "))) )
msg=msg.substring(2);
e.setMessage("- "+msg);
for(int i=0; i<listeners_.size(); i++)
((FudaaParamListener)listeners_.get(i)).paramStructDeleted(e);
}
public synchronized void fireParamStructModified(FudaaParamEvent e)
{
e.setID(e.getID()|FudaaParamEvent.STRUCT_MODIFIED);
String msg=e.getMessage();
if( (msg!=null)&&(
(msg.startsWith("+ "))||
(msg.startsWith("- "))||
(msg.startsWith("M "))) )
msg=msg.substring(2);
e.setMessage("M "+msg);
for(int i=0; i<listeners_.size(); i++)
((FudaaParamListener)listeners_.get(i)).paramStructModified(e);
}
}
--- NEW FILE: FudaaParamEventView.java ---
/*
* @file FudaaParamEventView.java
* @creation 1999-11-24
* @modification $Date: 2003/07/04 15:22:47 $
* @license GNU General Public License 2
* @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne
* @mail de...@fu...
*/
package org.fudaa.fudaa.commun.projet;
import com.memoire.bu.*;
import javax.swing.*;
import java.awt.*;
import java.util.*;
/**
* Message view. Sert a afficher dans le desktop le changeLog.
*
* @version $Revision: 1.1 $ $Date: 2003/07/04 15:22:47 $ by $Author: deniger $
* @author Axel von Arnim
*/
public class FudaaParamEventView
extends BuEmptyList
{
DefaultListModel model_;
public FudaaParamEventView()
{
super();
setName("fudaaPARAMEVENTVIEW");
model_=new DefaultListModel();
setModel(model_);
setEmptyText("Aucun message");
setCellRenderer(new CellRenderer());
setFont(BuLib.deriveFont("List",Font.PLAIN,-2));
}
public void addMessage(String _t)
{
model_.addElement(_t);
revalidate();
repaint(200);
}
public void removeMessage(String _t)
{
model_.removeElement(_t);
revalidate();
repaint(200);
}
public void removeAllMessages()
{
model_.removeAllElements();
revalidate();
repaint(200);
}
class Cell
extends JLabel
{
/**
* Constructor Cell.
*/
public Cell() {
}
public void setText(String _msg)
{
if( _msg==null ) return;
Color c;
if( _msg.startsWith("+") ) c=new Color(0,128,0);
if( _msg.startsWith("-") ) c=new Color(128,0,0);
if( _msg.startsWith("M") ) c=new Color(0,0,128);
else c=new Color(31,31,0);
super.setForeground(c);
super.setText(_msg);
}
}
class CellRenderer
implements ListCellRenderer
{
private Cell r_=new Cell();
public Component getListCellRendererComponent(
JList list,
Object value,
int index,
boolean isSelected,
boolean cellHasFocus)
{
r_.setText((String)value);
r_.setFont(list.getFont());
r_.setBackground(list.getBackground());
return r_;
}
}
}
--- NEW FILE: FudaaParamListener.java ---
/*
* @file FudaaParamListener.java
* @creation 1999-10-14
* @modification $Date: 2003/07/04 15:22:47 $
* @license GNU General Public License 2
* @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne
* @mail de...@fu...
*/
package org.fudaa.fudaa.commun.projet;
import java.beans.*;
/**
* @version $Revision: 1.1 $ $Date: 2003/07/04 15:22:47 $ by $Author: deniger $
* @author Axel von Arnim
*/
public interface FudaaParamListener
{
void paramStructCreated (FudaaParamEvent e);
void paramStructDeleted (FudaaParamEvent e);
void paramStructModified(FudaaParamEvent e);
}
--- NEW FILE: FudaaProjet.java ---
/*
* @file FudaaProjet.java
* @creation 1998-11-05
* @modification $Date: 2003/07/04 15:22:47 $
* @license GNU General Public License 2
* @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne
* @mail de...@fu...
*/
package org.fudaa.fudaa.commun.projet;
import java.awt.*;
import java.awt.event.*;
import java.io.*;
import java.util.*;
import java.util.zip.*;
import java.lang.reflect.*;
import javax.swing.*;
import com.memoire.bu.*;
[...1390 lines suppressed...]
class FudaaProjetAdapter
implements ActionListener
{
public static FudaaProjetAdapter ADAPTER=new FudaaProjetAdapter();
ActionListener listener=null;
public void addActionListener(ActionListener l)
{ if( l!=listener ) listener=l; }
public void removeActionListener()
{ listener=null; }
public void subscribeTo(AbstractButton b)
{
b.removeActionListener(this);
b.addActionListener(this);
}
public void actionPerformed(ActionEvent evt)
{
listener.actionPerformed(evt);
}
}
--- NEW FILE: FudaaProjetEvent.java ---
/*
* @file FudaaProjetEvent.java
* @creation 1999-10-09
* @modification $Date: 2003/07/04 15:22:47 $
* @license GNU General Public License 2
* @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne
* @mail de...@fu...
*/
package org.fudaa.fudaa.commun.projet;
import java.util.*;
/**
* @version $Revision: 1.1 $ $Date: 2003/07/04 15:22:47 $ by $Author: deniger $
* @author Axel von Arnim
*/
public class FudaaProjetEvent
extends EventObject
{
// type d'evenement :
// statusChanged
public final static int HEADER_CHANGED=0x01;
public final static int INTERNAL_HEADER_CHANGED=0x100;
public final static int PROJECT_OPENED=0x02;
public final static int PROJECT_CLOSED=0x04;
public final static int MODE_CHANGED =0x08;
// dataChanged
public final static int PARAM_ADDED =0x10;
public final static int RESULT_ADDED =0x20;
public final static int RESULTS_CLEARED=0x40;
public final static int PARAM_IMPORTED=0x80;
private int type_;
private String paramKey_;
public FudaaProjetEvent(Object src, int type)
{
this(src, type, "");
}
public FudaaProjetEvent(Object src, int type, String paramKey)
{
super(src);
type_=type;
paramKey_=paramKey;
}
public int getID()
{
return type_;
}
public String getEntryKey()
{
return paramKey_;
}
}
--- NEW FILE: FudaaProjetInformations.java ---
/*
* @file FudaaProjetInformations.java
* @creation 2000-02-28
* @modification $Date: 2003/07/04 15:22:47 $
* @license GNU General Public License 2
* @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne
* @mail de...@fu...
*/
package org.fudaa.fudaa.commun.projet;
import java.io.*;
import java.util.*;
import java.text.*;
import fr.dyade.koala.xml.koml.*;
import com.memoire.bu.BuPreferences;
import com.memoire.bu.BuInformationsDocument;
/**
* Informations Projet Fudaa.
*
* @version $Id: FudaaProjetInformations.java,v 1.1 2003/07/04 15:22:47 deniger Exp $
* @author Axel von Arnim
*/
public class FudaaProjetInformations
{
// IMPORTANT: NE PAS OUBLIER D'INCREMENTER CE NUMERO A CHAQUE MODIF DU FORMAT
public final static String FORMAT_VERSION="0.2";
public String titre;
public String auteur;
public String email;
public String organisation;
public String departement;
public int version;
public String dateCreation;
public String dateModif;
public String commentaire;
public String location;
private Calendar cal;
private NumberFormat nf;
public FudaaProjetInformations()
{
nf=NumberFormat.getInstance(Locale.US);
nf.setGroupingUsed(false);
nf.setMinimumIntegerDigits(2);
titre="";
auteur=BuPreferences.BU.getStringProperty("user.firstname")+" "+
BuPreferences.BU.getStringProperty("user.lastname");
email=BuPreferences.BU.getStringProperty("user.email");
organisation=BuPreferences.BU.getStringProperty("user.organization");
departement=BuPreferences.BU.getStringProperty("user.department");
version=0;
cal=Calendar.getInstance();
dateCreation=nf.format(cal.get(Calendar.DAY_OF_MONTH))+"/"+
nf.format(cal.get(Calendar.MONTH)+1)+"/"+
nf.format(cal.get(Calendar.YEAR))+", "+
nf.format(cal.get(Calendar.HOUR_OF_DAY))+":"+
nf.format(cal.get(Calendar.MINUTE));
dateModif=dateCreation;
commentaire="";
}
public BuInformationsDocument getInformationsDocument()
{
BuInformationsDocument r=new BuInformationsDocument();
r.author=auteur;
r.comment=commentaire;
r.contact=email;
r.department=departement;
r.organization=organisation;
r.version=""+version;
r.name=titre;
r.date=dateModif;
return r;
}
public void write(DataOutputStream out) throws IOException
{
touch();
out.writeUTF(FORMAT_VERSION);
out.writeUTF(titre);
out.writeUTF(auteur);
out.writeUTF(email);
out.writeUTF(organisation);
out.writeUTF(departement);
out.writeInt(version);
out.writeUTF(dateCreation);
out.writeUTF(dateModif);
out.writeUTF(commentaire);
}
public void read(DataInputStream in) throws IOException
{
//String format=in.readUTF();
in.readUTF();
// a gerer qd on modifie le format de l'en-tete
titre=in.readUTF();
auteur=in.readUTF();
email=in.readUTF();
organisation=in.readUTF();
departement=in.readUTF();
version=in.readInt();
dateCreation=in.readUTF();
dateModif=in.readUTF();
commentaire=in.readUTF();
}
public void write(ObjectOutputStream out) throws IOException
{
touch();
out.writeUTF(FORMAT_VERSION);
out.writeUTF(titre);
out.writeUTF(auteur);
out.writeUTF(email);
out.writeUTF(organisation);
out.writeUTF(departement);
out.writeInt(version);
out.writeUTF(dateCreation);
out.writeUTF(dateModif);
out.writeUTF(commentaire);
}
public void read(ObjectInputStream in) throws IOException
{
// String format=in.readUTF();
in.readUTF();
// a gerer qd on modifie le format de l'en-tete
titre=in.readUTF();
auteur=in.readUTF();
email=in.readUTF();
organisation=in.readUTF();
departement=in.readUTF();
version=in.readInt();
dateCreation=in.readUTF();
dateModif=in.readUTF();
commentaire=in.readUTF();
}
public void write(KOMLSerializer out) throws IOException
{
touch();
out.addObject(FORMAT_VERSION);
out.addObject(titre);
out.addObject(auteur);
out.addObject(email);
out.addObject(organisation);
out.addObject(departement);
out.addObject(new Integer(version));
out.addObject(dateCreation);
out.addObject(dateModif);
out.addObject(commentaire);
}
public void read(KOMLDeserializer in) throws IOException, ClassNotFoundException
{
// String format=(String)in.readObject();
in.readObject();
// a gerer qd on modifie le format de l'en-tete
titre=(String)in.readObject();
auteur=(String)in.readObject();
email=(String)in.readObject();
organisation=(String)in.readObject();
departement=(String)in.readObject();
version=((Integer)in.readObject()).intValue();
dateCreation=(String)in.readObject();
dateModif=(String)in.readObject();
commentaire=(String)in.readObject();
}
private void touch()
{
version++;
dateModif=nf.format(cal.get(Calendar.DAY_OF_MONTH))+"/"+
nf.format(cal.get(Calendar.MONTH)+1)+"/"+
nf.format(cal.get(Calendar.YEAR))+", "+
nf.format(cal.get(Calendar.HOUR_OF_DAY))+":"+
nf.format(cal.get(Calendar.MINUTE));
}
}
--- NEW FILE: FudaaProjetInformationsFrame.java ---
/*
* @file FudaaProjetInformationsFrame.java
* @creation 2000-02-28
* @modification $Date: 2003/07/04 15:22:47 $
* @license GNU General Public License 2
* @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne
* @mail de...@fu...
*/
package org.fudaa.fudaa.commun.projet;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.border.*;
import com.memoire.bu.*;
/**
* Fenetre Informations Projet Fudaa.
*
* @version $Revision: 1.1 $ $Date: 2003/07/04 15:22:47 $ by $Author: deniger $
* @author Axel von Arnim
*/
public class FudaaProjetInformationsFrame
extends BuInternalFrame
implements ActionListener,
FudaaProjetListener
{
private BuTextField tfTitre_;
private BuTextField tfAuteur_;
private BuTextField tfEmail_;
private BuTextField tfOrganisation_;
private BuTextField tfDepartement_;
private BuLabel lbVersion_;
private BuLabel lbDateCreation_;
private BuLabel lbDateModif_;
private JTextArea taCommentaire_;
private BuButton btValider_, btAnnuler_,btInitialiser_;
private FudaaProjet projet_;
public FudaaProjetInformationsFrame(BuCommonImplementation _app)
{
super("",false,true,false,true);
projet_=null;
setName("ifPROPRIETES");
if(_app!=null)
_app.installContextHelp(getRootPane(),"fudaa/proprietes.html");
//setShortcut(KeyEvent.VK_F2);
setTitle(BuResource.BU.getString("Propriétés"));
setFrameIcon(BuResource.BU.getIcon("propriete"));
Container cp=getContentPane();
cp.setLayout(new BorderLayout());
BuPanel pnMain=new BuPanel();
pnMain.setBorder(new EmptyBorder(new Insets(5, 5, 5, 5)));
pnMain.setLayout(new BuGridLayout(2, 5, 5));
int n=0;
pnMain.add(new BuLabel("Titre: "), n++);
tfTitre_=new BuTextField();
tfTitre_.setColumns(20);
pnMain.add(tfTitre_, n++);
pnMain.add(new BuLabel("Auteur: "), n++);
tfAuteur_=new BuTextField();
pnMain.add(tfAuteur_, n++);
pnMain.add(new BuLabel("Mél: "), n++);
tfEmail_=new BuTextField();
pnMain.add(tfEmail_, n++);
pnMain.add(new BuLabel("Organisation: "), n++);
tfOrganisation_=new BuTextField();
pnMain.add(tfOrganisation_, n++);
pnMain.add(new BuLabel("Département: "), n++);
tfDepartement_=new BuTextField();
pnMain.add(tfDepartement_, n++);
pnMain.add(new BuLabel("Version: "), n++);
lbVersion_=new BuLabel();
pnMain.add(lbVersion_, n++);
pnMain.add(new BuLabel("Date création: "), n++);
lbDateCreation_=new BuLabel();
pnMain.add(lbDateCreation_, n++);
pnMain.add(new BuLabel("Date modification: "), n++);
lbDateModif_=new BuLabel();
pnMain.add(lbDateModif_, n++);
pnMain.add(new BuLabel("Commentaire: "), n++);
taCommentaire_=new JTextArea();
taCommentaire_.setRows(5);
JScrollPane sp=new JScrollPane(taCommentaire_);
pnMain.add(sp, n++);
BuPanel pnBoutons=new BuPanel();
pnBoutons.setBorder(new EmptyBorder(new Insets(5, 5, 5, 5)));
pnBoutons.setLayout(new FlowLayout(FlowLayout.RIGHT));
btInitialiser_=new BuButton("Initialiser");
btInitialiser_.addActionListener(this);
pnBoutons.add(btInitialiser_);
btAnnuler_=new BuButton("Annuler");
btAnnuler_.addActionListener(this);
pnBoutons.add(btAnnuler_);
btValider_=new BuButton("Valider");
btValider_.addActionListener(this);
pnBoutons.add(btValider_);
cp.add(BorderLayout.CENTER, pnMain);
cp.add(BorderLayout.SOUTH, pnBoutons);
pack();
}
public void setProjet(FudaaProjet i)
{
if( i==projet_ ) return;
Object vp=projet_;
projet_=i;
i.addFudaaProjetListener(this);
setFields();
firePropertyChange("projet", vp, i);
}
public void actionPerformed(ActionEvent e)
{
Object src=e.getSource();
if( src==btAnnuler_ ) {
setFields();
setVisible(false);
}
else if( src==btValider_ ) {
getFields();
setVisible(false);
}
else if(src==btInitialiser_)
initialiser();
}
public void dataChanged(FudaaProjetEvent e) {}
public void statusChanged(FudaaProjetEvent e)
{
switch( e.getID() )
{
case FudaaProjetEvent.PROJECT_OPENED:
case FudaaProjetEvent.HEADER_CHANGED:
case FudaaProjetEvent.INTERNAL_HEADER_CHANGED:
case FudaaProjetEvent.PROJECT_CLOSED: {
setFields();
break;
}
}
}
private void setFields()
{
FudaaProjetInformations infos=projet_.getInformations();
tfTitre_.setText(infos==null?"":infos.titre);
tfAuteur_.setText(infos==null?"":infos.auteur);
tfEmail_.setText(infos==null?"":infos.email);
tfOrganisation_.setText(infos==null?"":infos.organisation);
tfDepartement_.setText(infos==null?"":infos.departement);
lbVersion_.setText(infos==null?"":""+infos.version);
lbDateCreation_.setText(infos==null?"":infos.dateCreation);
lbDateModif_.setText(infos==null?"":infos.dateModif);
taCommentaire_.setText(infos==null?"":infos.commentaire);
pack();
}
private void initialiser()
{
BuInformationsDocument infos=new BuInformationsDocument();
tfAuteur_.setText(infos==null?"":infos.author);
tfEmail_.setText(infos==null?"":infos.contact);
tfOrganisation_.setText(infos==null?"":infos.organization);
tfDepartement_.setText(infos==null?"":infos.department);
projet_.fireStatusChanged(new FudaaProjetEvent(projet_, FudaaProjetEvent.HEADER_CHANGED));
pack();
}
private void getFields()
{
if( projet_==null ) return;
FudaaProjetInformations infos=projet_.getInformations();
String old=null;
boolean changed=false;
old=infos.titre;
infos.titre=tfTitre_.getText();
if( !infos.titre.equals(old) ) changed=true;
old=infos.auteur;
infos.auteur=tfAuteur_.getText();
if( !infos.auteur.equals(old) ) changed=true;
old=infos.email;
infos.email=tfEmail_.getText();
if( !infos.email.equals(old) ) changed=true;
old=infos.organisation;
infos.organisation=tfOrganisation_.getText();
if( !infos.organisation.equals(old) ) changed=true;
old=infos.departement;
infos.departement=tfDepartement_.getText();
if( !infos.departement.equals(old) ) changed=true;
old=infos.commentaire;
infos.commentaire=taCommentaire_.getText();
if( !infos.commentaire.equals(old) ) changed=true;
if( changed ) {
System.err.println("FudaaProjetInformationsFrame: changed project info");
projet_.fireStatusChanged(new FudaaProjetEvent(projet_, FudaaProjetEvent.HEADER_CHANGED));
}
}
}
--- NEW FILE: FudaaProjetListener.java ---
/*
* @file FudaaProjetListener.java
* @creation 1999-10-09
* @modification $Date: 2003/07/04 15:22:47 $
* @license GNU General Public License 2
* @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne
* @mail de...@fu...
*/
package org.fudaa.fudaa.commun.projet;
/**
* @version $Revision: 1.1 $ $Date: 2003/07/04 15:22:47 $ by $Author: deniger $
* @author Axel von Arnim
*/
public interface FudaaProjetListener
{
void dataChanged (FudaaProjetEvent e);
void statusChanged(FudaaProjetEvent e);
}
|
|
From: <de...@us...> - 2003-07-04 15:20:08
|
Update of /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/commun/tableau In directory sc8-pr-cvs1:/tmp/cvs-serv9647/tableau Log Message: Directory /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/commun/tableau added to the repository |
|
From: <de...@us...> - 2003-07-04 15:20:07
|
Update of /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/commun/projet In directory sc8-pr-cvs1:/tmp/cvs-serv9647/projet Log Message: Directory /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/commun/projet added to the repository |
|
From: <de...@us...> - 2003-07-04 15:19:23
|
Update of /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/commun/fileChooser
In directory sc8-pr-cvs1:/tmp/cvs-serv9377/fileChooser
Added Files:
FudaaFavoriteFiles.java FudaaFileChooser.java
Log Message:
Un file chooser gerant des favoris
--- NEW FILE: FudaaFavoriteFiles.java ---
/*
* @file FudaaFavoriteFiles.java
* @creation 23 juin 2003
* @modification $Date: 2003/07/04 15:19:20 $
* @license GNU General Public License 2
* @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne
* @mail de...@fu...
*/
package org.fudaa.fudaa.commun.fileChooser;
import java.awt.Dimension;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
import java.io.File;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Enumeration;
import java.util.List;
import javax.swing.AbstractListModel;
import javax.swing.DefaultComboBoxModel;
import javax.swing.DefaultListModel;
import javax.swing.JComboBox;
import javax.swing.JComponent;
import javax.swing.JFileChooser;
import javax.swing.JMenu;
import javax.swing.MutableComboBoxModel;
import javax.swing.tree.DefaultMutableTreeNode;
import com.memoire.bu.BuBorderLayout;
import com.memoire.bu.BuButtonLayout;
import com.memoire.bu.BuDynamicMenu;
import com.memoire.bu.BuGridLayout;
import com.memoire.bu.BuHorizontalLayout;
import com.memoire.bu.BuLabel;
import com.memoire.bu.BuMenu;
import com.memoire.bu.BuMenuItem;
import com.memoire.bu.BuPanel;
import com.memoire.bu.BuResource;
import com.memoire.bu.BuToolButton;
import org.fudaa.dodico.commun.DodicoLib;
import org.fudaa.dodico.commun.DodicoPreferences;
import org.fudaa.ebli.dialog.EbliSimpleDialog;
import org.fudaa.ebli.dialog.EbliSimpleDialogPanel;
import org.fudaa.fudaa.commun.FudaaPreferences;
import org.fudaa.fudaa.commun.tableau.FudaaCellTextRenderer;
import org.fudaa.fudaa.commun.tableau.FudaaPanelListEditor;
import org.fudaa.fudaa.commun.tableau.FudaaPanelListEditorModel;
/**
* @author deniger
* @version $Id: FudaaFavoriteFiles.java,v 1.1 2003/07/04 15:19:20 deniger Exp $
*/
public class FudaaFavoriteFiles
{
public static final String PREF_ID = "filechooser.favorite";
public static final String PREF_LAST = "filechooser.last.dir";
public static final FudaaFavoriteFiles INSTANCE = new FudaaFavoriteFiles();
List list_;
/**
*
*/
private FudaaFavoriteFiles()
{
loadFavorites();
}
private void loadFavorites()
{
list_ = new ArrayList(20);
for (Enumeration e = FudaaPreferences.FUDAA.allKeysWithDefaults();
e.hasMoreElements();
)
{
String k = (String) e.nextElement();
if (k.startsWith(PREF_ID))
{
String val=FudaaPreferences.FUDAA.getStringProperty(k);
File f=new File(val);
if((!f.exists()) || (!f.isDirectory()) )
{
FudaaPreferences.FUDAA.removeProperty(k);
}
else
{
list_.add(val);
}
}
}
Collections.sort(list_);
}
private class FavoriteModel
extends AbstractListModel
implements MutableComboBoxModel
{
Object selected_;
/**
*
*/
public Object getSelectedItem()
{
return selected_;
}
public void setSelectedItem(Object anItem)
{
if (((anItem != null)
&& (!anItem.equals(selected_))
|| ((anItem == null) && selected_ != null)))
{
selected_ = anItem;
fireContentsChanged(this, -1, -1);
}
}
public boolean contains(Object o)
{
return list_.contains(o);
}
public void addElement( Object obj )
{
if(obj instanceof String)
{
list_.add(obj);
Collections.sort(list_);
fireContentsChanged(this, 0, list_.size());
}
}
/**
* Adds an item at a specific index
*/
public void insertElementAt( Object obj, int index )
{
addElement(obj);
}
/**
* Removes an item at a specific index
*/
public void removeElementAt( int _i )
{
if(_i>=0)
{
list_.remove(_i);
fireIntervalRemoved(this,_i,_i);
}
}
protected void update()
{
if(list_.contains(getSelectedItem()))
{
setSelectedItem(null);
}
fireContentsChanged(this, 0, list_.size());
}
/**
*
*/
public Object getElementAt(int arg0)
{
return list_.get(arg0);
}
/**
*
*/
public int getSize()
{
return list_.size();
}
/**
*
*/
public void removeElement(Object obj)
{
removeElementAt(list_.indexOf(obj));
}
}
public JComponent createComponent(final JFileChooser _f)
{
BuPanel pn = new BuPanel();
pn.setLayout(new BuBorderLayout(2, 2));
BuLabel lb = new BuLabel("favoris:");
lb.setVerticalTextPosition(BuLabel.CENTER);
pn.add(lb, BuBorderLayout.WEST);
final FavoriteModel model=new FavoriteModel();
final JComboBox j = new JComboBox(model);
FudaaCellTextRenderer cellRenderer = new FudaaCellTextRenderer()
{
protected void setValue(Object value)
{
String s = (String) value;
setToolTipText(s);
setText(s);
}
};
cellRenderer.setIcon(BuResource.BU.getToolIcon("ouvrir"));
j.setRenderer(cellRenderer);
j.addItemListener(new ItemListener()
{
public void itemStateChanged(ItemEvent e)
{
if (e.getStateChange() == ItemEvent.SELECTED)
{
if(model.getSelectedItem()!=null)
{
_f.setCurrentDirectory(new File((String) model.getSelectedItem()));
}
}
}
});
pn.add(j, BuBorderLayout.CENTER);
BuToolButton bt =
new BuToolButton(BuResource.BU.loadMenuCommandIcon("oui"));
bt.setToolTipText("Ajouter le répertoire courant aux favoris");
bt.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent _ae)
{
String s=_f.getCurrentDirectory().getAbsolutePath();
if(!list_.contains(s))
{
model.addElement(s);
}
}
});
BuPanel pnBt = new BuPanel();
pnBt.setLayout(new BuButtonLayout(1, BuButtonLayout.CENTER));
pnBt.add(bt);
bt = new BuToolButton(BuResource.BU.loadMenuCommandIcon("editer"));
bt.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent _ae)
{
FudaaPanelListEditorModel listmodel=new FudaaPanelListEditorModel(list_,false);
FudaaPanelListEditor editor=new FudaaPanelListEditor(listmodel,false,true,false)
{
public void initCellRendererEditor()
{
FudaaCellTextRenderer txt=new FudaaCellTextRenderer();
txt.setIcon(BuResource.BU.getToolIcon("ouvrir"));
table_.getColumnModel().getColumn(0).setCellRenderer(txt);
}
};
EbliSimpleDialogPanel pn=new EbliSimpleDialogPanel();
pn.setLayout(new BuBorderLayout());
pn.add(editor,BuBorderLayout.CENTER);
if(EbliSimpleDialogPanel.isOkResponse(pn.afficheModale(j, "Edition des favoris")))
{
list_=listmodel.getValuesInList();
model.update();
}
}
});
bt.setToolTipText("Editer les favoris");
pnBt.add(bt);
pn.add(pnBt, BuBorderLayout.EAST);
return pn;
}
/**
* Enregistre les preferences dans FudaaPreferences mais n'ecrit pas le fichier de pref.
*/
public void saveFavorites()
{
for (Enumeration e = FudaaPreferences.FUDAA.allKeysWithDefaults();
e.hasMoreElements();
)
{
String k = (String) e.nextElement();
if (k.startsWith(PREF_ID))
{
FudaaPreferences.FUDAA.removeProperty(k);
}
}
int n = list_.size();
for (int i = 0; i < n; i++)
{
FudaaPreferences.FUDAA.putStringProperty(
DodicoPreferences.buildPrefKey(PREF_ID, DodicoLib.getString(i)),
(String) list_.get(i));
}
}
}
--- NEW FILE: FudaaFileChooser.java ---
/*
* @file TestBrowser.java
* @creation 23 juin 2003
* @modification $Date: 2003/07/04 15:19:20 $
* @license GNU General Public License 2
* @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne
* @mail de...@fu...
*/
package org.fudaa.fudaa.commun.fileChooser;
import java.awt.Component;
import java.awt.Dialog;
import java.awt.Frame;
import java.io.File;
import java.util.ArrayList;
import java.util.List;
import javax.swing.BorderFactory;
import javax.swing.JDialog;
import javax.swing.JFileChooser;
import javax.swing.JFrame;
import javax.swing.SwingUtilities;
import javax.swing.filechooser.FileSystemView;
import com.memoire.bu.BuBorderLayout;
import com.memoire.bu.BuCheckBox;
import com.memoire.bu.BuComboBox;
import com.memoire.bu.BuFileChooser;
import com.memoire.bu.BuLabel;
import com.memoire.bu.BuPanel;
import com.memoire.fu.FuLib;
import org.fudaa.ebli.dialog.EbliSimpleDialogPanel;
import org.fudaa.ebli.dialog.EnhancedDialog;
import org.fudaa.fudaa.commun.FudaaPreferences;
/**
* @author deniger
* @version $Id: FudaaFileChooser.java,v 1.1 2003/07/04 15:19:20 deniger Exp $
*/
public class FudaaFileChooser extends BuFileChooser
{
int response_;
JDialog dial_;
public FudaaFileChooser()
{
this(true);
}
/**
* Si _lastDir, le fileChooser est ouvert dans le dernier repertoire ouvert.
*/
public FudaaFileChooser(boolean _lastDir)
{
super();
response_=BuFileChooser.ERROR_OPTION;
if(_lastDir)
setCurrentDirectory(new File(FudaaPreferences.FUDAA.getStringProperty(FudaaFavoriteFiles.PREF_LAST,FuLib.getUserHome())));
}
public static void main(String[] args)
{
JFrame f = new JFrame();
FudaaFileChooser tb=new FudaaFileChooser();
tb.setFileSelectionMode(FudaaFileChooser.FILES_ONLY);
f.setVisible(true);
int r=tb.showDialog(f);
if(r==BuFileChooser.APPROVE_OPTION)
System.out.println("approve");
else System.out.println("no approve");
FudaaFavoriteFiles.INSTANCE.saveFavorites();
FudaaPreferences.FUDAA.writeIniFile();
// JFileChooser jfc=new JFileChooser();
// jfc.setFileSelectionMode(FudaaFileChooser.FILES_ONLY);
// jfc.showOpenDialog(f);
}
/**
*
*/
public int showDialog(Frame parent)
{
dial_ = new JDialog(parent);
init(dial_);
rescanCurrentDirectory();
dial_.setLocationRelativeTo(parent);
dial_.show();
return response_;
}
private void init(JDialog _dial)
{
BuPanel pn = new BuPanel();
pn.setLayout(new BuBorderLayout());
pn.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
pn.add(this, BuBorderLayout.CENTER);
pn.add(FudaaFavoriteFiles.INSTANCE.createComponent(this),BuBorderLayout.NORTH);
_dial.setContentPane(pn);
String title = getUI().getDialogTitle(this);
_dial.setModal(true);
_dial.setTitle(title);
_dial.pack();
}
/**
*
*/
public int showOpenDialog(Frame parent)
{
setDialogType(BuFileChooser.OPEN_DIALOG);
return showDialog(parent);
}
/**
*
*/
public int showSaveDialog(Frame parent)
{
setDialogType(BuFileChooser.SAVE_DIALOG);
return showDialog(parent);
}
/**
*
*/
public int showDialog(Component parent, String approveButtonText)
{
Frame frame =
parent instanceof Frame
? (Frame) parent
: (Frame) SwingUtilities.getAncestorOfClass(Frame.class, parent);
return showDialog(frame);
}
/**
*
*/
public int showOpenDialog(Component parent)
{
Frame frame =
parent instanceof Frame
? (Frame) parent
: (Frame) SwingUtilities.getAncestorOfClass(Frame.class, parent);
return showOpenDialog(frame);
}
/**
*
*/
public int showSaveDialog(Component parent)
{
Frame frame =
parent instanceof Frame
? (Frame) parent
: (Frame) SwingUtilities.getAncestorOfClass(Frame.class, parent);
return showSaveDialog(frame);
}
/**
*
*/
public void approveSelection()
{
FudaaPreferences.FUDAA.putStringProperty(FudaaFavoriteFiles.PREF_LAST, getCurrentDirectory().getAbsolutePath());
response_=FudaaFileChooser.APPROVE_OPTION;
if(dial_!=null)
{
dial_.dispose();
dial_=null;
}
}
/**
*
*/
public void cancelSelection()
{
response_=FudaaFileChooser.CANCEL_OPTION;
if(dial_!=null)
{
dial_.dispose();
dial_=null;
}
}
}
|