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: Frederic D. <de...@us...> - 2004-04-02 14:14:47
|
Update of /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/refonde In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25282/src/org/fudaa/fudaa/refonde Modified Files: RefondeRefonde.java RefondeCalqueContourInteraction.java Log Message: Maj pour matisse test Index: RefondeCalqueContourInteraction.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/refonde/RefondeCalqueContourInteraction.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** RefondeCalqueContourInteraction.java 25 Nov 2003 10:14:11 -0000 1.4 --- RefondeCalqueContourInteraction.java 2 Apr 2004 14:02:38 -0000 1.5 *************** *** 147,150 **** --- 147,152 ---- int hi= i.getHeight(this); int r= Math.max(wi / w, hi / h); + //DEBUG FRED + if(r!=0) _g.drawImage(i, _x + 1, _y + 1, wi / r - 1, hi / r - 1, _c); } Index: RefondeRefonde.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/refonde/RefondeRefonde.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** RefondeRefonde.java 25 Nov 2003 10:14:17 -0000 1.5 --- RefondeRefonde.java 2 Apr 2004 14:02:38 -0000 1.6 *************** *** 52,55 **** --- 52,61 ---- // Transfert des informations dans un format de parametres serveur versParametresRefonde(par, _projet); + // DEBUG Fred + if(par.parametresINP().domainePoreux==null){ + System.err.println("les fonds poreux ne sont pas definis"); + } + else System.out.println("Fonds poreux definis"); + // DEBUG FIN // Calcul par.typeCalcul(_tpCal); *************** *** 897,901 **** --- 903,918 ---- _params.domainePoreux= rdmps; } + // DEBUG Fred il y a un prob ici : les structures idl ne doivent + //jamais etre nulles + else{ + //lors de l'ecriture des parametres ce tableau n'est pas ecrit + //si le boolean fondPoreux est a false. Donc, creer un tableau + //vide ne devrait pas avoir d'incidence + //Verif dans DParametresRefonde + _params.domainePoreux=new SParametresRefondeDomainePoreux[0]; + } + //DEBUG FIN } + //-------------------------------------------------------------------------- //--- Bloc 'ONDE' -------------------------------------------------------- |
From: Frederic D. <de...@us...> - 2004-04-02 14:06:47
|
Update of /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/telemac/io In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23513/src/org/fudaa/dodico/telemac/io Modified Files: SinusxWriter.java SinusxReader.java Added Files: MatisseReader.java MatisseFileFormat.java Log Message: Support de Matisse --- NEW FILE: MatisseFileFormat.java --- /* * @file TrFileFormatSerafin.java * @creation 12 mars 2003 * @modification $Date: 2004/04/02 13:54:07 $ * @license GNU General Public License 2 * @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne * @mail de...@fu... */ package org.fudaa.dodico.telemac.io; import java.io.File; import java.util.Arrays; import java.util.Locale; import org.fudaa.dodico.commun.DodicoLib; import org.fudaa.dodico.commun.ProgressionInterface; import org.fudaa.dodico.ef.EfGrid; import org.fudaa.dodico.ef.EfGridSource; import org.fudaa.dodico.ef.FileFormatGridVersion; import org.fudaa.dodico.fichiers.FileFormat; import org.fudaa.dodico.fichiers.FileFormatSoftware; import org.fudaa.dodico.fichiers.FileFormatVersion; import org.fudaa.dodico.fichiers.FileOperationSynthese; import org.fudaa.dodico.fichiers.FileReadOperationAbstract; import org.fudaa.dodico.fichiers.FileWriteOperationAbstract; import org.fudaa.dodico.h2d.H2dResource; import org.fudaa.dodico.h2d.type.H2dFileFormatType; import org.fudaa.dodico.mnt.FileFormatListMNTPoint; /** * * @author deniger * @version $Id: MatisseFileFormat.java,v 1.1 2004/04/02 13:54:07 deniger Exp $ */ public class MatisseFileFormat extends FileFormat { public final static int NB_FILE= 1; private static final MatisseFileFormat INSTANCE= new MatisseFileFormat(); public static final MatisseFileFormat getInstance() { return INSTANCE; } protected MatisseFileFormat() { super(NB_FILE); extensions_= new String[] { }; Arrays.sort(extensions_); ID_= "MATISSE"; nom_= "matisse"; description_= H2dResource.getS( "Fichier binaire BATHYGEO de matisse"); mode_= MODE_BINAIRE; software_= FileFormatSoftware.TELEMAC_IS; type_= -1; } public boolean containsGrid() { return false; } public FileFormatVersion getLastVersionInstance() { return getLastVersionImpl(); } public class MatisseVersion extends FileFormatVersion implements FileFormatListMNTPoint{ MatisseVersion(String _nom) { super(getInstance(), _nom); } /** * */ public FileOperationSynthese readListPoint( File _f, ProgressionInterface _prog) { FileOperationSynthese s= read(_f, _prog); s.setSource(((SerafinInterface)s.getSource()).getGrid()); return s; } public MatisseReader createSerafinReader() { return new MatisseReader(this); } public SerafinWriter createSerafinWriter() { return null; } /** * @see org.fudaa.dodico.fichiers.FileFormatVersion#createReader() */ public FileReadOperationAbstract createReader() { return createSerafinReader(); } /** * @see org.fudaa.dodico.fichiers.FileFormatVersion#createWriter() */ public FileWriteOperationAbstract createWriter() { return null; } } /** * */ public MatisseVersion getLastVersionImpl() { return new MatisseVersion("1.0"); } public String getLastVersion() { return "1.0"; } } Index: SinusxReader.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/telemac/io/SinusxReader.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** SinusxReader.java 12 Feb 2004 15:32:49 -0000 1.6 --- SinusxReader.java 2 Apr 2004 13:54:07 -0000 1.7 *************** *** 11,24 **** import java.io.File; import java.io.IOException; - import java.io.Reader; import java.util.ArrayList; import org.fudaa.ctulu.CtuluLib; - import org.fudaa.dodico.commun.DodicoLib; - import org.fudaa.dodico.commun.ProgressionInterface; import org.fudaa.dodico.fichiers.FileFormatVersion; import org.fudaa.dodico.fichiers.FileOpReadCharSimpleAbstract; - import org.fudaa.dodico.fortran.FortranReader; import org.fudaa.dodico.h2d.H2dResource; import org.fudaa.dodico.mnt.MNTEntite; --- 11,20 ---- Index: SinusxWriter.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/telemac/io/SinusxWriter.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** SinusxWriter.java 12 Feb 2004 15:32:49 -0000 1.5 --- SinusxWriter.java 2 Apr 2004 13:54:06 -0000 1.6 *************** *** 9,13 **** package org.fudaa.dodico.telemac.io; import java.io.IOException; - import java.io.Writer; import java.text.DecimalFormat; import java.text.DecimalFormatSymbols; --- 9,12 ---- *************** *** 17,30 **** import org.fudaa.ctulu.CtuluLib; - - import org.fudaa.dodico.commun.DodicoResource; - import org.fudaa.dodico.commun.ProgressionInterface; import org.fudaa.dodico.commun.ProgressionUpdater; import org.fudaa.dodico.fichiers.FileFormatVersion; import org.fudaa.dodico.fichiers.FileOpWriterCharSimpleAbstract; import org.fudaa.dodico.h2d.H2dResource; ! import org.fudaa.dodico.mnt.MNTPointMutable; import org.fudaa.dodico.mnt.MNTEntite; import org.fudaa.dodico.mnt.MNTEntiteLineaire; import org.fudaa.dodico.mnt.MNTPolygone; import org.fudaa.dodico.mnt.MNTPolyligne; --- 16,27 ---- import org.fudaa.ctulu.CtuluLib; import org.fudaa.dodico.commun.ProgressionUpdater; import org.fudaa.dodico.fichiers.FileFormatVersion; import org.fudaa.dodico.fichiers.FileOpWriterCharSimpleAbstract; import org.fudaa.dodico.h2d.H2dResource; ! import org.fudaa.dodico.mnt.MNT; import org.fudaa.dodico.mnt.MNTEntite; import org.fudaa.dodico.mnt.MNTEntiteLineaire; + import org.fudaa.dodico.mnt.MNTPointMutable; import org.fudaa.dodico.mnt.MNTPolygone; import org.fudaa.dodico.mnt.MNTPolyligne; *************** *** 241,244 **** --- 238,244 ---- writeZones((MNTZone[])_o); } + else if( _o instanceof MNT){ + writeZones(((MNT)_o).createZoneArray()); + } } } \ No newline at end of file --- NEW FILE: MatisseReader.java --- /* * @file SerafinReader.java @creation 2002-11-20 @modification $Date: 2004/04/02 13:54:07 $ @license * GNU General Public License 2 @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne @mail * de...@fu... */ package org.fudaa.dodico.telemac.io; import java.io.BufferedInputStream; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStream; import org.fudaa.ctulu.CtuluLib; import org.fudaa.dodico.commun.DodicoAnalyze; import org.fudaa.dodico.commun.DodicoResource; import org.fudaa.dodico.commun.ProgressionUpdater; import org.fudaa.dodico.fichiers.FileFormat; import org.fudaa.dodico.fichiers.FileFormatVersion; import org.fudaa.dodico.fichiers.FileReadOperationAbstract; import org.fudaa.dodico.fortran.FortranBinaryInputStream; import org.fudaa.dodico.fortran.FortranInterface; import org.fudaa.dodico.fortran.NativeBinaryInputStream; import org.fudaa.dodico.mnt.MNT; import org.fudaa.dodico.mnt.MNTEntiteLineaireAbstraite; import org.fudaa.dodico.mnt.MNTPoint; import org.fudaa.dodico.mnt.MNTPolygone; import org.fudaa.dodico.mnt.MNTPolyligne; import org.fudaa.dodico.mnt.MNTSemis; import org.fudaa.dodico.mnt.MNTZone; /** * lecture d'un fichier serafin. Les donnees sont enregistrees en tant que double par simplicite. * Les donnees de la deuxieme discretisation sont ignorees. Attention : la numerotation des tableaux * commencent a 0 (java!!!). * * @version $Id: MatisseReader.java,v 1.1 2004/04/02 13:54:07 deniger Exp $ * @author Fred Deniger */ public class MatisseReader extends FileReadOperationAbstract { /** */ private int nbOctetsFichier_; /** */ BufferedInputStream in_; /** */ private String machineID_; /** */ private MatisseFileFormat.MatisseVersion version_; /** * _machineID=null ( voir le constructeur complet). */ public MatisseReader(MatisseFileFormat.MatisseVersion _f) { version_ = _f; machineID_ = NativeBinaryInputStream.getLocalMachineId(); } public void setFile(File[] f) { setFile(f[0]); } /** * @see org.fudaa.dodico.fichiers.FileOperationAbstract#setFile(java.io.File) */ public void setFile(File _f) { analyze_ = new DodicoAnalyze(); analyze_.setRessource(_f.getAbsolutePath()); FileInputStream in = null; try { in = new FileInputStream(_f); } catch (FileNotFoundException _e) { if (CtuluLib.DEBUG) _e.printStackTrace(); // analyze_.addFatalError(DodicoLib.geti18n("Fichier non trouvé")); } if (in != null) { setFile(in); } } private void setFile(InputStream _in) { setFile(new BufferedInputStream(_in)); } private void setFile(BufferedInputStream _in) { in_ = _in; } public void setMachineId(String _id) { machineID_ = NativeBinaryInputStream.getMachineId(_id); } public String getMachineId() { return machineID_; } /** * Calcule, a partir de _bytesAvailable et nbOctetsFichier_, le pourcentage du fichier lu. * * @param _bytesAvailable Progression */ private void setProgression(int _bytesAvailable) { int etat = nbOctetsFichier_ - _bytesAvailable; progress_.setProgression((100 * etat) / nbOctetsFichier_); } /** * Lecture du flux entrant ( utilise un BufferedInputStream). Les erreur graves (bloquantes) sont * renvoyees sous forme d' IOException. Les erreurs non bloquantes sont renvoyées par la methode. * Le flux est ferme a la fin. * * @return Description des erreurs non bloquantes rencontrees ( null si aucune erreur). */ private final synchronized MNT readMatisse() { MNT inter_ = new MNT(); try { FortranBinaryInputStream in = new FortranBinaryInputStream(in_, false, machineID_); nbOctetsFichier_ = in.available(); ProgressionUpdater up=new ProgressionUpdater(progress_); //TITRE //Lecture du titre //je ne sais pas a quoi sert les 5 premier bytes in.skipBytes(5); // out.println(in.readCharacter(5)); int nbPoint = in.readInteger(); int nbLigne = in.readInteger(); int nbSemis = in.readInteger(); int nbDonnees = in.readInteger(); int temp, idx; for (int i = nbDonnees; i > 0; i--) { temp = in.readInteger(); in.readCharacter(temp); //marqueur in.readUInt_16(); //couleur in.readInteger(); } up.setValue(4,nbPoint,0,40); up.majProgessionStateOnly(); MNTPoint[] pts = new MNTPoint[nbPoint]; for (int i = 0; i < nbPoint; i++) { pts[i] = new MNTPoint(in.readDoublePrecision(), in.readDoublePrecision(), in .readDoublePrecision()); up.majAvancement(); } up.setValue(3,nbSemis,40,30); up.majProgessionStateOnly(); for (int i = 0; i < nbSemis; i++) { MNTZone z = new MNTZone(); z.setNom("z " + in.readInteger()); //Le nombre de point temp = in.readInteger() - 1; MNTSemis semis = z.getSemis(); for (int j = temp; j >= 0; j--) { idx = in.readInteger(); if (FormatInvalid(idx, nbPoint)) return null; semis.ajoutePoint(pts[idx]); } inter_.ajouteZone(z); up.majAvancement(); } if (nbLigne > 0) { MNTZone ligneZone = new MNTZone(); inter_.ajouteZone(ligneZone); ligneZone.setNom(DodicoResource.getS("Ligne")); up.setValue(3,nbSemis,70,30); up.majProgessionStateOnly(); for (int i = nbLigne - 1; i >= 0; i--) { int id = in.readInteger(); int nature = in.readInteger(); int type = in.readInteger(); int contour = in.readInteger(); int ferme = in.readInteger(); if (nature != 0) { in.readDoublePrecision(); in.readDoublePrecision(); in.readInteger(); in.readDoublePrecision(); in.readDoublePrecision(); in.readDoublePrecision(); } MNTEntiteLineaireAbstraite ent = null; if (ferme == 1) { ent = new MNTPolygone(); ligneZone.ajoutePolygone((MNTPolygone) ent); } else { ent = new MNTPolyligne(); ligneZone.ajoutePolyligne((MNTPolyligne) ent); } temp = in.readInteger() - 1; for (int j = temp; j >= 0; j--) { idx = in.readInteger(); if (FormatInvalid(idx, nbPoint)) return null; ent.ajoutePoint(pts[idx]); } up.majAvancement(); } } } catch (IOException _e) { analyze_.manageException(_e); return null; } return inter_; } /** * @param idx l'index a tester * @param maxIdx l'index max * @return true si invalide */ private boolean FormatInvalid(int idx, int maxIdx) { if ((idx < 0) || (idx >= maxIdx)) { analyze_.addFatalError(DodicoResource.getS("invalid data")); return true; } return false; } /** * @return le format matisse utilise */ public MatisseFileFormat getMatisseFileFormat() { return (MatisseFileFormat) version_.getFileFormat(); } /** * @return le format utilise */ public FileFormat getFileFormat() { return getMatisseFileFormat(); } /** * */ protected Object _read() { return readMatisse(); } /** * */ protected FortranInterface getFortranInterface() { return new FortranInterface() { public void close() throws IOException { if (in_ != null) in_.close(); } }; } /** * */ public FileFormatVersion getVersion() { return version_; } } |
From: Frederic D. <de...@us...> - 2004-04-02 14:06:20
|
Update of /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/fortran In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23513/src/org/fudaa/dodico/fortran Modified Files: NativeBinaryInputStream.java Log Message: Support de Matisse Index: NativeBinaryInputStream.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/fortran/NativeBinaryInputStream.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** NativeBinaryInputStream.java 25 Nov 2003 10:11:35 -0000 1.7 --- NativeBinaryInputStream.java 2 Apr 2004 13:54:09 -0000 1.8 *************** *** 57,60 **** --- 57,70 ---- buf= new byte[8]; } + + /** + * @param _name le nom SPARC_NAME ou X86_NAME + * @return null si non trouve + */ + public static String getIdFromName(String _name){ + if(SPARC_NAME.equals(_name)) return SPARC; + if(X86_NAME.equals(_name)) return X86; + return null; + } /** * Lecture d'un champ chaine de caractères "<I>character</I>" Fortran *************** *** 123,126 **** --- 133,154 ---- return null; } + + + public static String getMachineName(String _id){ + if(X86.equals(_id)) return X86_NAME; + if(SPARC.equals(_id)) return SPARC_NAME; + return null; + } + + /** + * @return le nom SPARC_NAME ou X86_NAME de la machine local + */ + public static String getLocalMachineName(){ + return getMachineName(getLocalMachineId()); + } + + + + /** * Renvoie true si <code>_machine</code> est du type X86 ( si la chaine finit |
From: Frederic D. <de...@us...> - 2004-04-02 14:06:19
|
Update of /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/test/telemac In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23513/src/org/fudaa/dodico/test/telemac Added Files: Bathygeo01.mat TestJMatisse.java Log Message: Support de Matisse --- NEW FILE: TestJMatisse.java --- /* * @file TestMatisse.java * @creation 2 avr. 2004 * @modification $Date: 2004/04/02 13:54:09 $ * @license GNU General Public License 2 * @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne * @mail fud...@li... */ package org.fudaa.dodico.test.telemac; import java.io.File; import org.fudaa.dodico.fichiers.FileOperationSynthese; import org.fudaa.dodico.mnt.MNT; import org.fudaa.dodico.mnt.MNTPolygone; import org.fudaa.dodico.mnt.MNTZone; import org.fudaa.dodico.telemac.io.MatisseReader; import org.fudaa.dodico.test.TestIO; /** * @author Fred Deniger * @version $Id: TestJMatisse.java,v 1.1 2004/04/02 13:54:09 deniger Exp $ */ public class TestJMatisse extends TestIO { /** * Bathygeo */ public TestJMatisse() { super("Bathygeo01.mat"); } public void testReader(){ File f=fic_; MatisseReader r=new MatisseReader(null); r.setFile(f); FileOperationSynthese s=r.read(); if(s.containsMessages()) s.getAnalyze().printResume("Message: "); MNT mnt=(MNT)s.getSource(); System.out.println(mnt.nbZones()); MNTZone z1=mnt.zone(0); System.out.println(z1.getNbPolygones()); MNTPolygone poly=z1.getPolygone(0); System.out.println(poly.getNbPoints()); } } --- NEW FILE: Bathygeo01.mat --- (This appears to be a binary file; contents omitted.) |
From: Frederic D. <de...@us...> - 2004-04-02 14:06:19
|
Update of /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/mnt In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23513/src/org/fudaa/dodico/mnt Modified Files: MNT.java MNTEntiteAbstraite.java Log Message: Support de Matisse Index: MNTEntiteAbstraite.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/mnt/MNTEntiteAbstraite.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** MNTEntiteAbstraite.java 12 Feb 2004 15:32:46 -0000 1.5 --- MNTEntiteAbstraite.java 2 Apr 2004 13:54:09 -0000 1.6 *************** *** 53,56 **** --- 53,67 ---- limitesAjustees_= false; } + + /** + * @param _p le point a ajouter + */ + public void ajoutePoint(MNTPoint _p) { + points_.ajouteCoord(_p); + limitesAjustees_= false; + } + + + public String toString() { return getNom() + " (" + getNbPoints() + ")"; Index: MNT.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/mnt/MNT.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** MNT.java 25 Nov 2003 10:11:43 -0000 1.4 --- MNT.java 2 Apr 2004 13:54:09 -0000 1.5 *************** *** 26,29 **** --- 26,62 ---- zones_.remove(_zone); } + + + public int getNbPointTotal(){ + int r=0; + for(int i=zones_.size()-1;i>=0;i--){ + r+=zone(i).getNbTotalPoint(); + } + return r; + } + + public MNTZone[] createZoneArray(){ + MNTZone[] r=new MNTZone[zones_.size()]; + System.out.println(zones_.size()); + zones_.toArray(r); + return r; + } + + public int getNbPolygoneTotal(){ + int r=0; + for(int i=zones_.size()-1;i>=0;i--){ + r+=zone(i).getNbPolygones(); + } + return r; + } + + public int getNbPolyligneTotal(){ + int r=0; + for(int i=zones_.size()-1;i>=0;i--){ + r+=zone(i).getNbPolylignes(); + } + return r; + } + public MNTZone zone(int i) { return (MNTZone)zones_.elementAt(i); |
From: Frederic D. <de...@us...> - 2004-04-02 14:06:18
|
Update of /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/refonde In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23513/src/org/fudaa/dodico/refonde Modified Files: DCalculRefonde.java Log Message: Support de Matisse Index: DCalculRefonde.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/refonde/DCalculRefonde.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** DCalculRefonde.java 25 Nov 2003 10:11:52 -0000 1.5 --- DCalculRefonde.java 2 Apr 2004 13:54:08 -0000 1.6 *************** *** 261,265 **** } finally { // Suppression des fichiers d'entrée ! DParametresRefonde.clearFichiers(pathFic + fichier); // Suppression des fichiers de résultats si interruption. if (arretDemande_) --- 261,265 ---- } finally { // Suppression des fichiers d'entrée ! //DParametresRefonde.clearFichiers(pathFic + fichier); // Suppression des fichiers de résultats si interruption. if (arretDemande_) |
From: Frederic D. <de...@us...> - 2004-04-02 14:06:16
|
Update of /cvsroot/fudaa/fudaa_devel/dodico/idl/code In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23513/idl/code Removed Files: tr.idl Log Message: Support de Matisse --- tr.idl DELETED --- |
From: Frederic D. <de...@us...> - 2004-03-31 08:30:08
|
Update of /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/fdico In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10634/src/org/fudaa/fudaa/fdico Modified Files: FDicoMultiEntiteViewer.java FDicoParams.java FDicoComparator.java FDicoFilleProjet.java FDicoEntitePanel.java FDIcoFiltreChooserMode.java FDicoProjectPanel.java FDicoChooserPanel.java FDicoProjet.java FDicoNewProjectPanel.java FDicoTableEditorChooser.java Log Message: Maj post Index: FDicoNewProjectPanel.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/fdico/FDicoNewProjectPanel.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** FDicoNewProjectPanel.java 12 Feb 2004 16:15:20 -0000 1.1 --- FDicoNewProjectPanel.java 31 Mar 2004 08:17:49 -0000 1.2 *************** *** 19,24 **** import org.fudaa.dodico.dico.DicoManager; - - import org.fudaa.ebli.dialog.EbliSimpleDialogPanel; /** * @author deniger --- 19,22 ---- *************** *** 26,48 **** */ public class FDicoNewProjectPanel ! extends EbliSimpleDialogPanel implements CaretListener { BuLabelMultiLine lbWarn; - FDicoChooserPanel chooserPn; /** * */ public FDicoNewProjectPanel(DicoManager _m) { ! setLayout(new BuBorderLayout(10, 5)); ! addEmptyBorder(5); ! chooserPn= new FDicoChooserPanel(_m); ! add(chooserPn, BuBorderLayout.CENTER); ! chooserPn.fic_.addCaretListener(this); ! } ! public FDicoChooserPanel getChooserPanel() { ! return chooserPn; } public File getFile() { ! return chooserPn.getSelectedFile(); } private void noWarn() { --- 24,40 ---- */ public class FDicoNewProjectPanel ! extends FDicoChooserPanel implements CaretListener { BuLabelMultiLine lbWarn; /** * */ public FDicoNewProjectPanel(DicoManager _m) { ! super(_m); ! fic_.addCaretListener(this); } + public File getFile() { ! return getSelectedFile(); } private void noWarn() { *************** *** 50,53 **** --- 42,47 ---- lbWarn.setVisible(false); } + + private void warn(String s) { if (lbWarn == null) { *************** *** 66,70 **** */ public void caretUpdate(CaretEvent e) { ! String s= chooserPn.fic_.getText(); if (s != null) { File f= new File(s); --- 60,64 ---- */ public void caretUpdate(CaretEvent e) { ! String s= fic_.getText(); if (s != null) { File f= new File(s); *************** *** 78,80 **** --- 72,82 ---- noWarn(); } + /** + * @see java.lang.Object#finalize() + */ + protected void finalize() throws Throwable { + super.finalize(); + if(fic_!=null) fic_.removeCaretListener(this); + } + } Index: FDicoEntitePanel.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/fdico/FDicoEntitePanel.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** FDicoEntitePanel.java 12 Feb 2004 16:15:19 -0000 1.1 --- FDicoEntitePanel.java 31 Mar 2004 08:17:48 -0000 1.2 *************** *** 8,11 **** --- 8,12 ---- */ package org.fudaa.fudaa.fdico; + import java.awt.Color; import java.awt.Component; *************** *** 18,22 **** import java.awt.event.MouseListener; import java.util.Iterator; [...1287 lines suppressed...] ! CtuluLib.debug("entite panel unactive"); if (table_.getCellEditor() != null) { table_.getCellEditor().stopCellEditing(); ! if (pnInfos_ != null) ! pnInfos_.saveCurrentComment(); } ! int i = colModel_.getColumnIndex(FDicoTableColumnIdentifier.COLUMN_NOM); table_.setColumnSelectionInterval(i, i); } } + + /** + * @see org.fudaa.fudaa.commun.undo.FudaaUndoCmdMngContainer#clearCmd(org.fudaa.dodico.commun.DodicoCommandManager) + */ + public void clearCmd(DodicoCommandManager _source) { + if (tableModel_.getCmdMng() != _source) + tableModel_.getCmdMng().clean(); + } } \ No newline at end of file Index: FDicoComparator.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/fdico/FDicoComparator.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** FDicoComparator.java 12 Feb 2004 16:15:19 -0000 1.1 --- FDicoComparator.java 31 Mar 2004 08:17:48 -0000 1.2 *************** *** 8,11 **** --- 8,12 ---- */ package org.fudaa.fudaa.fdico; + import java.util.ArrayList; import java.util.Arrays; *************** *** 22,35 **** import javax.swing.table.TableModel; - import org.fudaa.ctulu.CtuluLib; - import com.memoire.bu.BuIcon; import com.memoire.bu.BuResource; ! import org.fudaa.dodico.commun.DodicoLib; import org.fudaa.dodico.commun.ProgressionInterface; ! import org.fudaa.dodico.dico.DicoCasInterface; import org.fudaa.dodico.dico.DicoEntite; - import org.fudaa.ebli.tableau.EbliCellTextRenderer; /** --- 23,33 ---- import javax.swing.table.TableModel; import com.memoire.bu.BuIcon; import com.memoire.bu.BuResource; ! import org.fudaa.ctulu.CtuluLib; import org.fudaa.dodico.commun.ProgressionInterface; ! import org.fudaa.dodico.commun.ProgressionUpdater; import org.fudaa.dodico.dico.DicoEntite; import org.fudaa.ebli.tableau.EbliCellTextRenderer; /** *************** *** 38,173 **** */ public class FDicoComparator { ! Map entiteBase_; ! String titleBase_; ! Map entiteCompare_; ! String titleCompare_; ! ComparaisonField[] compFields_; ProgressionInterface progression_; ! BuIcon ajout_= BuResource.BU.getIcon("oui_16"); ! BuIcon supp_= BuResource.BU.getIcon("non_16"); ! BuIcon mod_= BuResource.BU.getIcon("editer_16"); public FDicoComparator( ! Map _base, ! String _titleBase, ! Map _compare, ! String _titleCompare) { ! entiteBase_= _base; ! entiteCompare_= _compare; ! titleBase_= _titleBase; ! titleCompare_= _titleCompare; compare(); } public void setProgressionInterface(ProgressionInterface _prog) { ! progression_= _prog; } private void compare() { ! ArrayList compTemp= new ArrayList(entiteBase_.size()); ! List compareValues= new ArrayList(entiteCompare_.keySet()); DicoEntite ent; String value; String valueCompare; ! int index= 0; ! int pourc= 0; ! boolean afficheAvance= (progression_ == null ? false : true); ! if (afficheAvance) ! progression_.setProgression(pourc); ! int nb= (int) (entiteBase_.size() * 1.5); ! int step= DodicoLib.getStep(nb); ! int pourcStep= (int) (50 / step); ! int pas= (int) (nb / step); ! int pMax= pas; ! for (Iterator it= entiteBase_.keySet().iterator(); it.hasNext();) { index++; ! ent= (DicoEntite)it.next(); ! value= (String)entiteBase_.get(ent); if (entiteCompare_.containsKey(ent)) { compareValues.remove(ent); ! valueCompare= (String)entiteCompare_.get(ent); if (!valueCompare.equals(value)) { ! ComparaisonField c= new ComparaisonField(); ! c.ent_= ent; ! c.valueBase_= value; ! c.valueCompare_= valueCompare; ! c.state_= ComparaisonField.CHANGE; compTemp.add(c); } } else { ! ComparaisonField c= new ComparaisonField(); ! c.ent_= ent; ! c.valueBase_= value; ! c.valueCompare_= null; ! c.state_= ComparaisonField.ADD; compTemp.add(c); } ! if (afficheAvance) { ! if (index > pMax) { ! pourc += pourcStep; ! progression_.setProgression(pourc); ! pMax += pas; ! } ! } } ! for (Iterator it= compareValues.iterator(); it.hasNext();) { ! ent= (DicoEntite)it.next(); ! ComparaisonField c= new ComparaisonField(); ! c.ent_= ent; ! c.valueBase_= null; ! c.valueCompare_= (String)entiteCompare_.get(ent); ! c.state_= ComparaisonField.REMOVE; compTemp.add(c); } ! compFields_= new ComparaisonField[compTemp.size()]; compTemp.toArray(compFields_); Arrays.sort(compFields_, new ComparaisonFieldComparator()); ! if (afficheAvance) ! progression_.setProgression(100); } public class ComparaisonFieldComparator implements Comparator { /** ! * ! */ public int compare(Object o1, Object o2) { ! return compare((ComparaisonField)o1, (ComparaisonField)o2); } public int compare(ComparaisonField _f1, ComparaisonField _f2) { return _f1.getEntite().compareTo(_f2.getEntite()); } } public TableModel createTableModel() { return new ComparaisonTableModel(); } public void createRenderer(JTable _t) { ! TableColumnModel colModel= _t.getColumnModel(); ! EbliCellTextRenderer textRender= new EbliCellTextRenderer(); ! EbliCellTextRenderer iconRender= new EbliCellTextRenderer() { public void setValue(Object o) { ! setIcon((Icon)o); } }; ! TableColumn col= colModel.getColumn(0); col.setCellRenderer(iconRender); ! int n= colModel.getColumnCount() - 1; ! for (int i= n; i >= 1; i--) { colModel.getColumn(i).setCellRenderer(textRender); } } private class ComparaisonTableModel extends AbstractTableModel { /** ! * ! */ public int getColumnCount() { return 4; } /** ! * */ public int getRowCount() { return compFields_.length; } /** ! * */ public Object getValueAt(int _row, int _col) { ! ComparaisonField f= compFields_[_row]; if (_col == 0) return f.getStateIcon(); --- 36,204 ---- */ public class FDicoComparator { ! ! Map entiteBase_; ! String titleBase_; ! Map entiteCompare_; ! String titleCompare_; ! ComparaisonField[] compFields_; ProgressionInterface progression_; ! BuIcon ajout_ = BuResource.BU.getIcon("oui_16"); ! BuIcon supp_ = BuResource.BU.getIcon("non_16"); ! BuIcon mod_ = BuResource.BU.getIcon("editer_16"); ! ! /** ! * @param _base les mots-clés de base a comparer ! * @param _titleBase le titre pour les mot-clés de base ! * @param _compare les mot-clés de dest a comparer ! * @param _titleCompare le titre des mot-clés de dest ! */ public FDicoComparator( ! Map _base, ! String _titleBase, ! Map _compare, ! String _titleCompare) { ! entiteBase_ = _base; ! entiteCompare_ = _compare; ! titleBase_ = _titleBase; ! titleCompare_ = _titleCompare; compare(); } + public void setProgressionInterface(ProgressionInterface _prog) { ! progression_ = _prog; } + private void compare() { ! ArrayList compTemp = new ArrayList(entiteBase_.size()); ! List compareValues = new ArrayList(entiteCompare_.keySet()); DicoEntite ent; String value; String valueCompare; ! int index = 0; ! int pourc = 0; ! boolean afficheAvance = (progression_ == null ? false : true); ! if (afficheAvance) ! progression_.setProgression(pourc); ! int nb = (int) (entiteBase_.size() * 1.5); ! ProgressionUpdater up = new ProgressionUpdater(progression_); ! up.setValue(2, nb, 0, 50); ! up.majProgessionStateOnly(); ! for (Iterator it = entiteBase_.keySet().iterator(); it.hasNext();) { index++; ! ent = (DicoEntite) it.next(); ! value = (String) entiteBase_.get(ent); if (entiteCompare_.containsKey(ent)) { compareValues.remove(ent); ! valueCompare = (String) entiteCompare_.get(ent); if (!valueCompare.equals(value)) { ! ComparaisonField c = new ComparaisonField(); ! c.ent_ = ent; ! c.valueBase_ = value; ! c.valueCompare_ = valueCompare; ! c.state_ = ComparaisonField.CHANGE; compTemp.add(c); } } else { ! ComparaisonField c = new ComparaisonField(); ! c.ent_ = ent; ! c.valueBase_ = value; ! c.valueCompare_ = null; ! c.state_ = ComparaisonField.ADD; compTemp.add(c); } ! up.majAvancement(); } ! for (Iterator it = compareValues.iterator(); it.hasNext();) { ! ent = (DicoEntite) it.next(); ! ComparaisonField c = new ComparaisonField(); ! c.ent_ = ent; ! c.valueBase_ = null; ! c.valueCompare_ = (String) entiteCompare_.get(ent); ! c.state_ = ComparaisonField.REMOVE; compTemp.add(c); } ! compFields_ = new ComparaisonField[compTemp.size()]; compTemp.toArray(compFields_); Arrays.sort(compFields_, new ComparaisonFieldComparator()); ! if (afficheAvance) ! progression_.setProgression(100); } + + /** + * Un comparateur pour les noms de mots-clés + * @author Fred Deniger + * @version $Id$ + */ public class ComparaisonFieldComparator implements Comparator { + + /** ! * Compare les "ComparaisonField" ! * @see java.util.Comparator#compare(java.lang.Object, java.lang.Object) ! */ public int compare(Object o1, Object o2) { ! return compare((ComparaisonField) o1, (ComparaisonField) o2); } + + /** + * @param _f1 le premier field a comparer + * @param _f2 le deuxieme + * @return le resultat qui va bien + */ public int compare(ComparaisonField _f1, ComparaisonField _f2) { return _f1.getEntite().compareTo(_f2.getEntite()); } } + + /** + * @return un modele pour les JTable + */ public TableModel createTableModel() { return new ComparaisonTableModel(); } + + /** + * Cree des renderer pour le modele JTable de cette classe + * @param _t la table de dest + */ public void createRenderer(JTable _t) { ! TableColumnModel colModel = _t.getColumnModel(); ! EbliCellTextRenderer textRender = new EbliCellTextRenderer(); ! EbliCellTextRenderer iconRender = new EbliCellTextRenderer() { ! public void setValue(Object o) { ! setIcon((Icon) o); } }; ! TableColumn col = colModel.getColumn(0); col.setCellRenderer(iconRender); ! int n = colModel.getColumnCount() - 1; ! for (int i = n; i >= 1; i--) { colModel.getColumn(i).setCellRenderer(textRender); } } + private class ComparaisonTableModel extends AbstractTableModel { + /** ! * @see javax.swing.table.TableModel#getColumnCount() ! */ public int getColumnCount() { return 4; } + /** ! * @see javax.swing.table.TableModel#getRowCount() */ public int getRowCount() { return compFields_.length; } + + /** ! * @see javax.swing.table.TableModel#getValueAt(int, int) */ public Object getValueAt(int _row, int _col) { ! ComparaisonField f = compFields_[_row]; if (_col == 0) return f.getStateIcon(); *************** *** 176,185 **** else if (_col == 2) return f.valueBase_; ! else if (_col == 3) ! return f.valueCompare_; return null; } /** ! * */ public String getColumnName(int _col) { --- 207,218 ---- else if (_col == 2) return f.valueBase_; ! else if (_col == 3) ! return f.valueCompare_; return null; } + + /** ! * @see javax.swing.table.TableModel#getColumnName(int) */ public String getColumnName(int _col) { *************** *** 190,206 **** else if (_col == 2) return titleBase_; ! else if (_col == 3) ! return titleCompare_; return CtuluLib.EMPTY_STRING; } } private class ComparaisonField { ! private final static int ADD= 0; ! private final static int REMOVE= 1; ! private final static int CHANGE= 2; ! DicoEntite ent_; ! String valueBase_; ! String valueCompare_; ! int state_; public String getState() { if (state_ == ADD) --- 223,245 ---- else if (_col == 2) return titleBase_; ! else if (_col == 3) ! return titleCompare_; return CtuluLib.EMPTY_STRING; } } + private class ComparaisonField { ! ! private final static int ADD = 0; ! private final static int REMOVE = 1; ! private final static int CHANGE = 2; ! DicoEntite ent_; ! String valueBase_; ! String valueCompare_; ! int state_; ! ! /** ! * @return l'etat du champ ! */ public String getState() { if (state_ == ADD) *************** *** 208,218 **** else if (state_ == REMOVE) return FDicoResource.getS("Supprimé"); ! else if (state_ == CHANGE) ! return FDicoResource.getS("Modifié"); return CtuluLib.EMPTY_STRING; } public DicoEntite getEntite() { return ent_; } public BuIcon getStateIcon() { if (state_ == ADD) --- 247,265 ---- else if (state_ == REMOVE) return FDicoResource.getS("Supprimé"); ! else if (state_ == CHANGE) ! return FDicoResource.getS("Modifié"); return CtuluLib.EMPTY_STRING; } + + /** + * @return l'entite du comparateur + */ public DicoEntite getEntite() { return ent_; } + + /** + * @return l'icone associe + */ public BuIcon getStateIcon() { if (state_ == ADD) *************** *** 220,225 **** else if (state_ == REMOVE) return FDicoComparator.this.supp_; ! else if (state_ == CHANGE) ! return FDicoComparator.this.mod_; return null; } --- 267,272 ---- else if (state_ == REMOVE) return FDicoComparator.this.supp_; ! else if (state_ == CHANGE) ! return FDicoComparator.this.mod_; return null; } Index: FDIcoFiltreChooserMode.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/fdico/FDIcoFiltreChooserMode.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** FDIcoFiltreChooserMode.java 12 Feb 2004 16:15:19 -0000 1.1 --- FDIcoFiltreChooserMode.java 31 Mar 2004 08:17:48 -0000 1.2 *************** *** 9,21 **** package org.fudaa.fudaa.fdico; import javax.swing.JMenuItem; ! import org.fudaa.dodico.commun.DodicoLib; import org.fudaa.dodico.dico.DicoEntite; import org.fudaa.fudaa.ressource.FudaaResource; public final class FDIcoFiltreChooserMode extends FDicoFiltreChooserSimple { public FDIcoFiltreChooserMode() { ! super(DodicoLib.copy(DicoEntite.NIVEAU)); } /** ! * */ public String getName() { --- 9,30 ---- package org.fudaa.fudaa.fdico; import javax.swing.JMenuItem; ! ! import org.fudaa.ctulu.CtuluLib; import org.fudaa.dodico.dico.DicoEntite; import org.fudaa.fudaa.ressource.FudaaResource; + /** + * @author Fred Deniger + * @version $Id$ + */ public final class FDIcoFiltreChooserMode extends FDicoFiltreChooserSimple { + /** + * Filtre selon le mode des mot-clés + */ public FDIcoFiltreChooserMode() { ! super(CtuluLib.copy(DicoEntite.NIVEAU)); } + /** ! * @see org.fudaa.fudaa.fdico.FDicoFiltreChooserAbstract#getName() */ public String getName() { *************** *** 23,27 **** } /** ! * */ public boolean accept(DicoEntite _ent) { --- 32,36 ---- } /** ! * @see org.fudaa.fudaa.fdico.FDicoFiltre#accept(org.fudaa.dodico.dico.DicoEntite) */ public boolean accept(DicoEntite _ent) { *************** *** 33,38 **** return true; } /** ! * */ public JMenuItem[] getActionFor(DicoEntite _ent) { --- 42,48 ---- return true; } + /** ! * @see org.fudaa.fudaa.fdico.FDicoFiltreChooserAbstract#getActionFor(org.fudaa.dodico.dico.DicoEntite) */ public JMenuItem[] getActionFor(DicoEntite _ent) { Index: FDicoParams.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/fdico/FDicoParams.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** FDicoParams.java 12 Feb 2004 16:15:20 -0000 1.1 --- FDicoParams.java 31 Mar 2004 08:17:48 -0000 1.2 *************** *** 18,25 **** import javax.swing.table.AbstractTableModel; ! import org.fudaa.ctulu.CtuluLib; ! import com.memoire.bu.BuResource; import org.fudaa.dodico.commun.DodicoCommandManager; import org.fudaa.dodico.commun.DodicoLib; --- 18,25 ---- import javax.swing.table.AbstractTableModel; ! import com.memoire.bu.BuInformationsDocument; import com.memoire.bu.BuResource; + import org.fudaa.ctulu.CtuluLib; import org.fudaa.dodico.commun.DodicoCommandManager; import org.fudaa.dodico.commun.DodicoLib; *************** *** 38,42 **** import org.fudaa.dodico.dico.DicoParamsListener; import org.fudaa.dodico.fichiers.FileOperationSynthese; - import org.fudaa.fudaa.commun.FudaaLib; import org.fudaa.fudaa.commun.FudaaUI; --- 38,41 ---- *************** *** 57,60 **** --- 56,60 ---- protected FudaaUI ui_; private boolean isValide_; + BuInformationsDocument idoc_; //private List newEntiteFileToSave_; /** *************** *** 69,72 **** --- 69,82 ---- manageName(); } + + /** + * @return les informations sur le document + */ + public BuInformationsDocument getInformationsDocument() { + if (idoc_ == null) + idoc_= new BuInformationsDocument(); + return idoc_; + } + public final DicoParams getDicoParams() { return dicoParams_; Index: FDicoChooserPanel.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/fdico/FDicoChooserPanel.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** FDicoChooserPanel.java 12 Mar 2004 10:17:04 -0000 1.3 --- FDicoChooserPanel.java 31 Mar 2004 08:17:48 -0000 1.4 *************** *** 18,30 **** import javax.swing.DefaultComboBoxModel; import javax.swing.DefaultListCellRenderer; ! import javax.swing.JFileChooser; import javax.swing.JList; import javax.swing.JTextField; import javax.swing.ListCellRenderer; - import javax.swing.ListModel; import javax.swing.UIManager; ! import org.fudaa.ctulu.CtuluLib; ! import com.memoire.bu.BuComboBox; import com.memoire.bu.BuGridLayout; --- 18,29 ---- import javax.swing.DefaultComboBoxModel; import javax.swing.DefaultListCellRenderer; ! import javax.swing.JComboBox; ! import javax.swing.JLabel; import javax.swing.JList; import javax.swing.JTextField; import javax.swing.ListCellRenderer; import javax.swing.UIManager; ! import com.memoire.bu.BuAbstractCellRenderer; import com.memoire.bu.BuComboBox; import com.memoire.bu.BuGridLayout; *************** *** 32,41 **** import com.memoire.bu.BuResource; import org.fudaa.dodico.dico.DicoCasFileFormat; import org.fudaa.dodico.dico.DicoLanguage; import org.fudaa.dodico.dico.DicoManager; - import org.fudaa.ebli.dialog.EbliSimpleDialogPanel; - import org.fudaa.ebli.filechooser.EbliFileChooser; /** * @author deniger --- 31,39 ---- import com.memoire.bu.BuResource; + import org.fudaa.ctulu.CtuluLib; import org.fudaa.dodico.dico.DicoCasFileFormat; import org.fudaa.dodico.dico.DicoLanguage; import org.fudaa.dodico.dico.DicoManager; import org.fudaa.ebli.dialog.EbliSimpleDialogPanel; /** * @author deniger *************** *** 49,53 **** DefaultComboBoxModel versionChooser_; DicoLanguage.LanguageComboBoxModel langChooser_; ! JTextField fic_; /** * @param _m les dico a prendre en compte --- 47,51 ---- DefaultComboBoxModel versionChooser_; DicoLanguage.LanguageComboBoxModel langChooser_; ! protected JTextField fic_; /** * @param _m les dico a prendre en compte *************** *** 73,76 **** --- 71,78 ---- fic_.setText(_f); } + /** + * @param _m + * @param _fileChooser + */ public FDicoChooserPanel(DicoManager _m, boolean _fileChooser) { dicoMng_= _m; *************** *** 81,86 **** fic_= addLabelFileChooserPanel(BuResource.BU.getString("Fichier") + s); } ! add(new BuLabel(FDicoResource.getS("Dictionnaire") + s)); ! BuComboBox cb= new BuComboBox(); dicoChooser_= new FormatComboBoxModel(dicoMng_.formats_); cb.setModel(dicoChooser_); --- 83,88 ---- fic_= addLabelFileChooserPanel(BuResource.BU.getString("Fichier") + s); } ! add(new JLabel(FDicoResource.getS("Dictionnaire") + s)); ! JComboBox cb= new JComboBox(); dicoChooser_= new FormatComboBoxModel(dicoMng_.formats_); cb.setModel(dicoChooser_); *************** *** 90,110 **** DicoCasFileFormat f= (DicoCasFileFormat)dicoMng_.formats_.get(0); dicoChooser_.setSelectedItem(f); ! add(new BuLabel(BuResource.BU.getString("Version") + s)); cb= new BuComboBox(); versionChooser_= new DefaultComboBoxModel(dicoMng_.getVersions(f)); cb.setModel(versionChooser_); add(cb); add(new BuLabel(BuResource.BU.getString("Langage") + s)); ! cb= new BuComboBox(); langChooser_= new DicoLanguage.LanguageComboBoxModel(); cb.setModel(langChooser_); add(cb); } public DicoCasFileFormat getFileFormatSelected() { return (DicoCasFileFormat)dicoChooser_.getSelectedItem(); } public String getVersionSelected() { return (String)versionChooser_.getSelectedItem(); } public int getLanguageSelected() { return langChooser_.getSelectedLanguage(); --- 92,122 ---- DicoCasFileFormat f= (DicoCasFileFormat)dicoMng_.formats_.get(0); dicoChooser_.setSelectedItem(f); ! add(new JLabel(BuResource.BU.getString("Version") + s)); cb= new BuComboBox(); + // cb.setRenderer(new DefaultListCellRenderer()); versionChooser_= new DefaultComboBoxModel(dicoMng_.getVersions(f)); cb.setModel(versionChooser_); add(cb); add(new BuLabel(BuResource.BU.getString("Langage") + s)); ! cb= new JComboBox(); langChooser_= new DicoLanguage.LanguageComboBoxModel(); cb.setModel(langChooser_); add(cb); } + /** + * @return le format selectionne + */ public DicoCasFileFormat getFileFormatSelected() { return (DicoCasFileFormat)dicoChooser_.getSelectedItem(); } + /** + * @return la version selectionnee + */ public String getVersionSelected() { return (String)versionChooser_.getSelectedItem(); } + /** + * @return le langage + */ public int getLanguageSelected() { return langChooser_.getSelectedLanguage(); *************** *** 210,218 **** } } ! /** ! * ! */ ! public JFileChooser createFileChooser() { ! return new EbliFileChooser(); ! } } --- 222,225 ---- } } ! } Index: FDicoTableEditorChooser.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/fdico/FDicoTableEditorChooser.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** FDicoTableEditorChooser.java 12 Feb 2004 16:15:20 -0000 1.1 --- FDicoTableEditorChooser.java 31 Mar 2004 08:17:49 -0000 1.2 *************** *** 31,34 **** --- 31,35 ---- import org.fudaa.dodico.dico.DicoDataType; import org.fudaa.dodico.dico.DicoEntite; + import org.fudaa.ebli.dialog.EbliSimpleDialog; import org.fudaa.ebli.dialog.EbliSimpleDialogPanel; import org.fudaa.ebli.tableau.EbliCellBooleanEditor; *************** *** 106,110 **** if (multiEditor_ == null) { dialog_= new FDicoMultiEntiteViewer(); ! multiEditor_= new MultiDialogEditor(dialog_, null); } dialog_.setVecteurEntite(_ent); --- 107,116 ---- if (multiEditor_ == null) { dialog_= new FDicoMultiEntiteViewer(); ! EbliSimpleDialog s=new EbliSimpleDialog(dialog_); ! s.setTitle(_ent.getNom()); ! multiEditor_= new MultiDialogEditor(s, null); ! } ! else{ ! multiEditor_.getDialog().setTitle(_ent.getNom()); } dialog_.setVecteurEntite(_ent); *************** *** 114,120 **** if (multiEditor_ == null) { dialog_= new FDicoMultiEntiteViewer(); ! multiEditor_= new MultiDialogEditor(dialog_, null); } dialog_.setVecteurEntite(_ent); editor_= multiEditor_; } --- 120,132 ---- if (multiEditor_ == null) { dialog_= new FDicoMultiEntiteViewer(); ! EbliSimpleDialog s=new EbliSimpleDialog(dialog_); ! s.setTitle(_ent.getNom()); ! multiEditor_= new MultiDialogEditor(s, null); ! } ! else{ ! multiEditor_.getDialog().setTitle(_ent.getNom()); } dialog_.setVecteurEntite(_ent); + editor_= multiEditor_; } *************** *** 145,149 **** implements FDicoEditorInterface { public MultiDialogEditor( ! EbliSimpleDialogPanel _dialog, EbliCellDecorator _deco) { super(_dialog, _deco); --- 157,161 ---- implements FDicoEditorInterface { public MultiDialogEditor( ! EbliSimpleDialog _dialog, EbliCellDecorator _deco) { super(_dialog, _deco); *************** *** 363,372 **** FDicoMultiEntiteViewer dialog= new FDicoMultiEntiteViewer(); dialog.setVecteurEntite(_ent); ! editor_= new MultiDialogEditor(dialog, null); } public void visitVecteur(DicoEntite.Vecteur _ent) { FDicoMultiEntiteViewer dialog= new FDicoMultiEntiteViewer(); dialog.setVecteurEntite(_ent); ! editor_= new MultiDialogEditor(dialog, null); } } --- 375,388 ---- FDicoMultiEntiteViewer dialog= new FDicoMultiEntiteViewer(); dialog.setVecteurEntite(_ent); ! EbliSimpleDialog s=new EbliSimpleDialog(dialog); ! s.setTitle(_ent.getNom()); ! editor_= new MultiDialogEditor(s, null); } public void visitVecteur(DicoEntite.Vecteur _ent) { FDicoMultiEntiteViewer dialog= new FDicoMultiEntiteViewer(); dialog.setVecteurEntite(_ent); ! EbliSimpleDialog s=new EbliSimpleDialog(dialog); ! s.setTitle(_ent.getNom()); ! editor_= new MultiDialogEditor(s, null); } } Index: FDicoMultiEntiteViewer.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/fdico/FDicoMultiEntiteViewer.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** FDicoMultiEntiteViewer.java 12 Feb 2004 16:15:20 -0000 1.1 --- FDicoMultiEntiteViewer.java 31 Mar 2004 08:17:48 -0000 1.2 *************** *** 115,119 **** private void setEntite(DicoEntite.Vecteur _v, int _taille) { entite_= _v; - setTitle(entite_.getNom()); table_.setValueListCellRenderer( FDicoTableRendererChooser.createCellRenderer( --- 115,118 ---- Index: FDicoProjet.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/fdico/FDicoProjet.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FDicoProjet.java 12 Mar 2004 10:17:04 -0000 1.2 --- FDicoProjet.java 31 Mar 2004 08:17:48 -0000 1.3 *************** *** 50,54 **** protected FudaaCalculAction actions_; private EbliSimpleAction actionDiff_; ! BuInformationsDocument idoc_; protected FDicoFilleProjet entiteFille_; FudaaCommonImplementation impl_; --- 50,54 ---- protected FudaaCalculAction actions_; private EbliSimpleAction actionDiff_; ! protected FDicoFilleProjet entiteFille_; FudaaCommonImplementation impl_; *************** *** 137,148 **** } } ! /** ! * @return les informations sur le document ! */ ! public BuInformationsDocument getInformationsDocument() { ! if (idoc_ == null) ! idoc_= new BuInformationsDocument(); ! return idoc_; ! } /** * @see org.fudaa.fudaa.fdico.FDicoProjetInterface#getParamsFile() --- 137,141 ---- } } ! /** * @see org.fudaa.fudaa.fdico.FDicoProjetInterface#getParamsFile() *************** *** 429,446 **** return r; } /** ! * */ public DicoParams getDicoParams() { return params_.getDicoParams(); } public FDicoParams getFDicoParams() { return params_; } /** ! * */ public File getDirBase() { return params_.getDirBase(); } } --- 422,451 ---- return r; } + /** ! * @see org.fudaa.fudaa.fdico.FDicoProjetInterface#getDicoParams() */ public DicoParams getDicoParams() { return params_.getDicoParams(); } + /** + * @return les parametres dico issus de fudaa + */ public FDicoParams getFDicoParams() { return params_; } + /** ! * @see org.fudaa.fudaa.fdico.FDicoProjetInterface#getDirBase() */ public File getDirBase() { return params_.getDirBase(); } + + /** + * @return les informations sur le document + */ + public BuInformationsDocument getInformationsDocument() { + return params_.getInformationsDocument(); + } } Index: FDicoFilleProjet.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/fdico/FDicoFilleProjet.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FDicoFilleProjet.java 12 Mar 2004 10:17:04 -0000 1.2 --- FDicoFilleProjet.java 31 Mar 2004 08:17:48 -0000 1.3 *************** *** 54,58 **** */ public FDicoFilleProjet(FDicoProjet _proj, FudaaCommonImplementation _impl, Component _leftUp) { ! super(_proj.getTitle(), true, true, true, true, _impl.getUndoCmdListener()); impl_ = _impl; FDicoProjectPanel projPane = new FDicoProjectPanel(_proj); --- 54,58 ---- */ public FDicoFilleProjet(FDicoProjet _proj, FudaaCommonImplementation _impl, Component _leftUp) { ! super(_proj.getTitle(), true, true, true, true,_impl.getUndoCmdListener()); impl_ = _impl; FDicoProjectPanel projPane = new FDicoProjectPanel(_proj); Index: FDicoProjectPanel.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/fdico/FDicoProjectPanel.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** FDicoProjectPanel.java 12 Feb 2004 16:15:20 -0000 1.1 --- FDicoProjectPanel.java 31 Mar 2004 08:17:48 -0000 1.2 *************** *** 451,453 **** --- 451,460 ---- } + /** + * @see org.fudaa.fudaa.commun.undo.FudaaUndoCmdMngContainer#clearCmd(org.fudaa.dodico.commun.DodicoCommandManager) + */ + public void clearCmd(DodicoCommandManager _source) { + if(cmdMng!=_source) cmdMng.clean(); + } + } |
From: Frederic D. <de...@us...> - 2004-03-31 08:30:08
|
Update of /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/data In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10634/src/org/fudaa/fudaa/tr/data Modified Files: TrPalierSurface.java TrSolutionInitModelDefault.java TrSolutionInitLayer.java TrSolutionInitModel.java TrNodeData.java TrFindActionDefault.java Added Files: TrSiPlanLayer.java TrNodeDataDefault.java Log Message: Maj post Index: TrSolutionInitModelDefault.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/data/TrSolutionInitModelDefault.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** TrSolutionInitModelDefault.java 19 Mar 2004 17:40:24 -0000 1.1 --- TrSolutionInitModelDefault.java 31 Mar 2004 08:17:47 -0000 1.2 *************** *** 9,13 **** --- 9,16 ---- package org.fudaa.fudaa.tr.data; + import org.fudaa.dodico.ef.EfElement; + import org.fudaa.dodico.ef.EfElementType; import org.fudaa.dodico.ef.EfGrid; + import org.fudaa.dodico.ef.EfNode; import org.fudaa.dodico.h2d.reflux.H2dRefluxSolutionInitialeInterface; import org.fudaa.dodico.h2d.type.H2dVariableType; *************** *** 16,20 **** import org.fudaa.ebli.geometrie.GrBoite; import org.fudaa.ebli.geometrie.GrPoint; ! import org.fudaa.fudaa.meshviewer.layer.MvInfoDelegate; import org.fudaa.fudaa.meshviewer.layer.MvInfoDelegateAbstract; import org.fudaa.fudaa.meshviewer.layer.MvNodeModelDefault; --- 19,24 ---- import org.fudaa.ebli.geometrie.GrBoite; import org.fudaa.ebli.geometrie.GrPoint; ! import org.fudaa.ebli.geometrie.GrPolygone; ! import org.fudaa.fudaa.meshviewer.layer.MvGridLayerGroup; import org.fudaa.fudaa.meshviewer.layer.MvInfoDelegateAbstract; import org.fudaa.fudaa.meshviewer.layer.MvNodeModelDefault; *************** *** 31,34 **** --- 35,40 ---- H2dRefluxSolutionInitialeInterface si_; H2dVariableType[] vs_; + boolean isT6_ = false; + boolean isT3_ = false; /** *************** *** 41,44 **** --- 47,54 ---- super(_g, _delegate); si_ = _si; + EfElementType t = _g.getEltType(); + isT3_ = (t == EfElementType.T3); + isT6_ = (t == EfElementType.T6); + if (!isT3_ && !isT6_) throw new IllegalArgumentException("bad grid type"); } *************** *** 49,54 **** return null; } ! ! /** --- 59,64 ---- return null; } ! ! /** *************** *** 57,71 **** */ public void fillWithInfo(InfoData _m, EbliListeSelectionInterface _l) { ! MvInfoDelegateAbstract d=(MvInfoDelegateAbstract)getDelegate(); ! if(d==null) return; if ((_l != null) && (_l.isOnlyOnIndexSelected())) { if (vs_ == null) vs_ = si_.getVariables(); if (vs_ != null) { - int idx = _l.getMaxIndex(); int m = vs_.length; - d.fillWithXYZPointInfo(_m,idx); for (int i = 0; i < m; i++) { _m.put(vs_[i].getNom(), MvPanelInfo.TWO_DIGITS_FORMAT.format(si_.getSolutionInitiale( ! vs_[i], idx))); } } --- 67,82 ---- */ public void fillWithInfo(InfoData _m, EbliListeSelectionInterface _l) { ! MvInfoDelegateAbstract d = (MvInfoDelegateAbstract) getDelegate(); ! if (d == null) return; if ((_l != null) && (_l.isOnlyOnIndexSelected())) { if (vs_ == null) vs_ = si_.getVariables(); + int idx = _l.getMaxIndex(); + d.fillWithXYZPointInfo(_m, idx); if (vs_ != null) { int m = vs_.length; for (int i = 0; i < m; i++) { + if( (getGrid().isExtremePoint(idx)) || (vs_[i]!=H2dVariableType.HAUTEUR_EAU)) _m.put(vs_[i].getNom(), MvPanelInfo.TWO_DIGITS_FORMAT.format(si_.getSolutionInitiale( ! vs_[i], idx))); } } *************** *** 77,81 **** --- 88,96 ---- */ public void setGrid(EfGrid _g) { + if (!isT3_ && !isT6_) throw new IllegalArgumentException("bad grid type"); super.setGrid(_g); + EfElementType t = _g.getEltType(); + isT3_ = (t == EfElementType.T3); + isT6_ = (t == EfElementType.T6); } *************** *** 102,105 **** --- 117,128 ---- /** + * @param _idx + * @return + */ + public double getH(int _idx) { + return si_.getH(_idx); + } + + /** * @see org.fudaa.ebli.calque.ZModeleDonnees#getObject(int) */ *************** *** 113,115 **** --- 136,207 ---- public void setListener(ZModeleDonneesListener _l) { } + + /** + * @see org.fudaa.fudaa.tr.data.TrSolutionInitModel#getEltNb() + */ + public int getEltNb(){ + return getGrid().getEltNb(); + } + + /** + * @see org.fudaa.fudaa.tr.data.TrSolutionInitModel#polygone(org.fudaa.ebli.geometrie.GrPolygone, + * int) + */ + public boolean polygone(GrPolygone _p, int _i) { + EfGrid g = getGrid(); + EfElement e = g.getElement(_i); + int n = 3; + if (_p.nombre() != n) { + _p.sommets.setSize(n); + } + GrPoint grpt; + EfNode hpt; + if (isT3_) { + for (int i = 0; i < n; i++) { + hpt = g.getPt(e.getPtIndex(i)); + grpt = _p.sommets.renvoie(i); + if (grpt != null) + MvGridLayerGroup.initGrPoint(hpt, grpt); + else { + grpt = new GrPoint(hpt.getX(), hpt.getY(), hpt.getZ()); + _p.sommets.remplace(grpt, i); + } + } + } + else if(isT6_){ + for (int i = 0; i < 6; i+=2) { + hpt = g.getPt(e.getPtIndex(i)); + grpt = _p.sommets.renvoie(i/2); + if (grpt != null) + MvGridLayerGroup.initGrPoint(hpt, grpt); + else { + grpt = new GrPoint(hpt.getX(), hpt.getY(), hpt.getZ()); + _p.sommets.remplace(grpt, i/2); + } + } + + } + return true; + } + + /** + * @see org.fudaa.fudaa.tr.data.TrSolutionInitModel#getCote(double[], int) + */ + public boolean getCote(double[] _v, int _i) { + EfElement g=getGrid().getElement(_i); + if(isT3_){ + _v[0]=si_.getH(g.getPtIndex(0)); + _v[1]=si_.getH(g.getPtIndex(1)); + _v[2]=si_.getH(g.getPtIndex(2)); + return true; + } + else if(isT6_){ + _v[0]=si_.getH(g.getPtIndex(0)); + _v[1]=si_.getH(g.getPtIndex(2)); + _v[2]=si_.getH(g.getPtIndex(4)); + return true; + } + else + return false; + } } Index: TrSolutionInitModel.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/data/TrSolutionInitModel.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** TrSolutionInitModel.java 19 Mar 2004 17:40:24 -0000 1.1 --- TrSolutionInitModel.java 31 Mar 2004 08:17:47 -0000 1.2 *************** *** 9,12 **** --- 9,13 ---- package org.fudaa.fudaa.tr.data; + import org.fudaa.ebli.geometrie.GrPolygone; import org.fudaa.fudaa.meshviewer.layer.MvNodeModel; *************** *** 18,21 **** public interface TrSolutionInitModel extends MvNodeModel{ ! public TrNodeData getNodeData(); } --- 19,40 ---- public interface TrSolutionInitModel extends MvNodeModel{ ! ! /** ! * 3 elements ! * @param _poly ! * @param _i ! * @return ! */ ! public boolean polygone(GrPolygone _poly,int _i); ! /** ! * @return le nombre d'element ! */ ! public int getEltNb(); ! /** ! * Remplit le tableau avec les 3 cotes au 3 points extremites ! * @param _v le tableau a modifier de taille 3 ! * @param _i l'indice de l'element ! * @return true si le tableau a ete initialise ! */ ! public boolean getCote(double[] _v,int _i); } --- NEW FILE: TrNodeDataDefault.java --- /* * @file TrNodeDataDefault.java * @creation 24 mars 2004 * @modification $Date: 2004/03/31 08:17:47 $ * @license GNU General Public License 2 * @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne * @mail fud...@li... */ package org.fudaa.fudaa.tr.data; /** * @author Fred Deniger * @version $Id: TrNodeDataDefault.java,v 1.1 2004/03/31 08:17:47 deniger Exp $ */ public class TrNodeDataDefault implements TrNodeData { double[] v_; boolean isCompute_; double min_; double max_; /** * Initialise avec les valeurs. Attention:elles ne sont pas recopiees * @param _v les valeurs */ public TrNodeDataDefault(double[] _v) { v_ = _v; } /** * @see org.fudaa.fudaa.tr.data.TrNodeData#getValue(int) */ public double getValue(int _idxPt) { return v_[_idxPt]; } /** * @see org.fudaa.fudaa.tr.data.TrNodeData#getMinValue() */ public double getMinValue() { if (!isCompute_) compute(); return min_; } private void compute() { min_ = Double.MAX_VALUE; max_ = Double.MIN_VALUE; double t; for (int i = v_.length - 1; i >= 0; i--) { t = v_[i]; if (t < min_) min_ = t; if (t > max_) max_ = t; } isCompute_ = true; } /** * @see org.fudaa.fudaa.tr.data.TrNodeData#getMaxValue() */ public double getMaxValue() { if (!isCompute_) compute(); return max_; } } Index: TrFindActionDefault.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/data/TrFindActionDefault.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** TrFindActionDefault.java 12 Feb 2004 16:15:21 -0000 1.2 --- TrFindActionDefault.java 31 Mar 2004 08:17:47 -0000 1.3 *************** *** 8,24 **** */ package org.fudaa.fudaa.tr.data; - import gnu.trove.TIntArrayList; import gnu.trove.TIntHashSet; import java.util.StringTokenizer; ! import org.fudaa.dodico.commun.DodicoLib; import org.fudaa.ebli.calque.ZCalqueAffichageDonnees; import org.fudaa.ebli.geometrie.GrBoite; ! ! import org.fudaa.fudaa.meshviewer.layer.*; ! import org.fudaa.fudaa.tr.TrFilleVisu; import org.fudaa.fudaa.tr.TrResource; import org.fudaa.fudaa.tr.TrVisuPanel; - - import sun.misc.Launcher; /** * @author deniger --- 8,22 ---- */ package org.fudaa.fudaa.tr.data; import gnu.trove.TIntHashSet; + import java.util.StringTokenizer; ! import org.fudaa.ebli.calque.ZCalqueAffichageDonnees; import org.fudaa.ebli.geometrie.GrBoite; ! import org.fudaa.fudaa.meshviewer.layer.MvElementLayer; ! import org.fudaa.fudaa.meshviewer.layer.MvLayer; ! import org.fudaa.fudaa.meshviewer.layer.MvNodeLayer; import org.fudaa.fudaa.tr.TrResource; import org.fudaa.fudaa.tr.TrVisuPanel; /** * @author deniger Index: TrSolutionInitLayer.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/data/TrSolutionInitLayer.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** TrSolutionInitLayer.java 19 Mar 2004 17:40:24 -0000 1.1 --- TrSolutionInitLayer.java 31 Mar 2004 08:17:47 -0000 1.2 *************** *** 9,14 **** --- 9,19 ---- package org.fudaa.fudaa.tr.data; + import java.awt.Color; import java.awt.Graphics; + import java.awt.Graphics2D; + import org.fudaa.ebli.geometrie.GrBoite; + import org.fudaa.ebli.geometrie.GrMorphisme; + import org.fudaa.ebli.geometrie.GrPolygone; import org.fudaa.fudaa.meshviewer.layer.MvNodeLayer; *************** *** 18,24 **** * @version $Id$ */ ! public class TrSolutionInitLayer extends MvNodeLayer{ ! ! boolean paintInonde_; --- 23,30 ---- * @version $Id$ */ ! public class TrSolutionInitLayer extends MvNodeLayer { ! ! boolean paintInonde_; ! private TrPalierSurface surfPainter_; *************** *** 28,42 **** public TrSolutionInitLayer(TrSolutionInitModel _m) { super(_m); } ! ! /** * @see javax.swing.JComponent#paintComponent(java.awt.Graphics) */ public void paintComponent(Graphics _g) { ! //on ne dessine que les selections ! super.paintSpecificComponent(_g,true); } - } --- 34,83 ---- public TrSolutionInitLayer(TrSolutionInitModel _m) { super(_m); + paintInonde_ = true; + surfPainter_ = new TrPalierSurface(); + surfPainter_.setPalier(0.001); + setForeground(new Color(204,204,255)); } ! ! /** * @see javax.swing.JComponent#paintComponent(java.awt.Graphics) */ public void paintComponent(Graphics _g) { ! if (!isVisible()) return; ! if ((modele_ == null) || (modele_.getNombre() <= 0)) ! return; ! GrBoite clip = getClipReel(_g); ! GrBoite domaine = modele_.getDomaine(); ! if (!domaine.intersectXY(clip)) { ! return; ! } ! GrMorphisme versEcran = getVersEcran(); ! boolean attenue = isAttenue(); ! boolean rapide = isRapide(); ! // BPaletteCouleur paletteCouleur = getPaletteCouleur(); ! // BPaletteIcone paletteIcone = getPaletteIcone(); ! ! Color foreground = getForeground(); ! if (attenue) ! foreground = attenueCouleur(foreground); ! if (!rapide && paintInonde_) { ! GrPolygone p = new GrPolygone(); ! GrBoite bPoly = new GrBoite(); ! double[] cote = new double[3]; ! TrSolutionInitModel m = (TrSolutionInitModel) modele_; ! for (int i = m.getEltNb()-1; i >=0; i--) { ! m.polygone(p, i); ! p.boite(bPoly); ! if (bPoly.intersectXY(clip)) { ! p.autoApplique(versEcran); ! m.getCote(cote, i); ! surfPainter_.paint((Graphics2D) _g, p.sommets.renvoie(0), p.sommets.renvoie(1), p.sommets ! .renvoie(2), cote[0], cote[1], cote[2],foreground,Color.white); ! } ! } ! } //on ne dessine que les selections ! super.paintSpecificComponent(_g, true); } } Index: TrNodeData.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/data/TrNodeData.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** TrNodeData.java 19 Mar 2004 17:40:24 -0000 1.1 --- TrNodeData.java 31 Mar 2004 08:17:47 -0000 1.2 *************** *** 16,20 **** public interface TrNodeData { - public String getName(); public double getValue(int _idxPt); public double getMinValue(); --- 16,19 ---- Index: TrPalierSurface.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/data/TrPalierSurface.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** TrPalierSurface.java 19 Mar 2004 17:40:24 -0000 1.1 --- TrPalierSurface.java 31 Mar 2004 08:17:47 -0000 1.2 *************** *** 10,13 **** --- 10,14 ---- import java.awt.Color; + import java.awt.Graphics2D; import org.fudaa.ebli.geometrie.GrPoint; *************** *** 15,26 **** /** ! * Un classe permettant de remplir des triangles selon la valeur en chaque point ! * et un palier. * @author Fred Deniger * @version $Id$ */ public class TrPalierSurface { double palier_; ! Color palierColor_; /** --- 16,29 ---- /** ! * Un classe permettant de remplir des triangles selon la valeur en chaque point et un palier. ! * * @author Fred Deniger * @version $Id$ */ public class TrPalierSurface { + double palier_; ! int[] x; ! int[] y; /** *************** *** 29,33 **** --- 32,39 ---- public TrPalierSurface() { super(); + x = new int[3]; + y = new int[3]; } + /** * @return Returns the palier. *************** *** 44,65 **** } - /** - * @return Returns the palierColor. - */ - public Color getPalierColor() { - return palierColor_; - } /** ! * @param _palierColor The palierColor to set. ! */ ! public void setPalierColor(Color _palierColor) { ! palierColor_ = _palierColor; ! } ! ! /** ! * Remplit le triangle _p1,_p2,_p3 selon les valeurs associees. ! * Si une valeur est supérieure au palier la partie du triangle associée ! * sera remplie. * @param _p1 le point 1 * @param _p2 le point 2 --- 50,58 ---- } /** ! * Remplit le triangle _p1,_p2,_p3 selon les valeurs associees. Si une valeur est supérieure au ! * palier la partie du triangle associée sera remplie. ! * * @param _p1 le point 1 * @param _p2 le point 2 *************** *** 68,80 **** * @param _v2 la valeur au point 2 * @param _v3 la valeur au point 3 */ ! public void paint(GrPoint _p1,GrPoint _p2,GrPoint _p3,double _v1,double _v2,double _v3){ ! if( (_v1<=palier_) && (_v2<=palier_) && (_v3<=palier_)){ ! return; } ! if( (_v1>palier_) && (_v2>palier_) && (_v3>palier_)){ return; } } - } --- 61,180 ---- * @param _v2 la valeur au point 2 * @param _v3 la valeur au point 3 + * @param _auDessous LA couleur a utiliser pour surface au-dessous du palier + * @param _auDessus La couleur a utiliser pour surface au-dessus du palier + * @param _g le support */ ! public void paint(Graphics2D _g, GrPoint _p1, GrPoint _p2, GrPoint _p3, double _v1, double _v2, ! double _v3, Color _auDessus, Color _auDessous) { ! if ((_v1 <= palier_) && (_v2 <= palier_) && (_v3 <= palier_)) { ! return; } ! x[0] = (int) _p1.x; ! x[1] = (int) _p2.x; ! x[2] = (int) _p3.x; ! y[0] = (int) _p1.y; ! y[1] = (int) _p2.y; ! y[2] = (int) _p3.y; ! if ((_v1 > palier_) && (_v2 > palier_) && (_v3 > palier_)) { ! Color old = _g.getColor(); ! _g.setColor(_auDessus); ! _g.fillPolygon(x, y, 3); ! _g.setColor(old); return; } + int up = 0; + boolean v1Up = false; + boolean v2Up = false; + boolean v3Up = false; + if (_v1 > palier_) { + up++; + v1Up = true; + } + if (_v2 > palier_) { + up++; + v2Up = true; + } + if (_v3 > palier_) { + up++; + v3Up = true; + } + if (up == 2) { + Color old = _g.getColor(); + _g.setColor(_auDessus); + _g.fillPolygon(x, y, 3); + if (!v1Up) { + double fact2 = (palier_ - _v1) / (_v2 - _v1); + double fact3 = (palier_ - _v1) / (_v3 - _v1); + x[0] = (int) _p1.x; + x[1] = (int) (fact2 * (_p2.x - _p1.x)+_p1.x); + x[2] = (int) (fact3 * (_p3.x - _p1.x)+_p1.x); + y[0] = (int) _p1.y; + y[1] = (int) (fact2 * (_p2.y - _p1.y)+_p1.y); + y[2] = (int) (fact3 * (_p3.y - _p1.y)+_p1.y); + } + else if (!v2Up) { + double fact2 = (palier_ - _v2) / (_v1 - _v2); + double fact3 = (palier_ - _v2) / (_v3 - _v2); + x[0] = (int) _p2.x; + x[1] = (int) (fact2 * (_p1.x - _p2.x)+_p2.x); + x[2] = (int) (fact3 * (_p3.x - _p2.x)+_p2.x); + y[0] = (int) _p2.y; + y[1] = (int) (fact2 * (_p1.y - _p2.y)+_p2.y); + y[2] = (int) (fact3 * (_p3.y - _p2.y)+_p2.y); + } + else if (!v3Up) { + double fact2 = (palier_ - _v3) / (_v2 - _v3); + double fact3 = (palier_ - _v3) / (_v1 - _v3); + x[0] = (int) _p3.x; + x[1] = (int) (fact2 * (_p2.x - _p3.x)+_p3.x); + x[2] = (int) (fact3 * (_p1.x - _p3.x)+_p3.x); + y[0] = (int) _p3.y; + y[1] = (int) (fact2 * (_p2.y - _p3.y)+_p3.y); + y[2] = (int) (fact3 * (_p1.y - _p3.y)+_p3.y); + } + else new Throwable().printStackTrace(); + _g.setColor(_auDessous); + _g.fillPolygon(x, y, 3); + _g.setColor(old); + } + else if (up == 1) { + Color old = _g.getColor(); + _g.setColor(_auDessous); + _g.fillPolygon(x, y, 3); + if (v1Up) { + double fact2 = (palier_ - _v1) / (_v2 - _v1); + double fact3 = (palier_ - _v1) / (_v3 - _v1); + x[0] = (int) _p1.x; + x[1] = (int) (fact2 * (_p2.x - _p1.x)+_p1.x); + x[2] = (int) (fact3 * (_p3.x - _p1.x)+_p1.x); + y[0] = (int) _p1.y; + y[1] = (int) (fact2 * (_p2.y - _p1.y)+_p1.y); + y[2] = (int) (fact3 * (_p3.y - _p1.y)+_p1.y); + } + else if (v2Up) { + double fact2 = (palier_ - _v2) / (_v1 - _v2); + double fact3 = (palier_ - _v2) / (_v3 - _v2); + x[0] = (int) _p2.x; + x[1] = (int) (fact2 * (_p1.x - _p2.x)+_p2.x); + x[2] = (int) (fact3 * (_p3.x - _p2.x)+_p2.x); + y[0] = (int) _p2.y; + y[1] = (int) (fact2 * (_p1.y - _p2.y)+_p2.y); + y[2] = (int) (fact3 * (_p3.y - _p2.y)+_p2.y); + } + else if (v3Up) { + double fact2 = (palier_ - _v3) / (_v2 - _v3); + double fact3 = (palier_ - _v3) / (_v1 - _v3); + x[0] = (int) _p3.x; + x[1] = (int) (fact2 * (_p2.x - _p3.x)+_p3.x); + x[2] = (int) (fact3 * (_p1.x - _p3.x)+_p3.x); + y[0] = (int) _p3.y; + y[1] = (int) (fact2 * (_p2.y - _p3.y)+_p3.y); + y[2] = (int) (fact3 * (_p1.y - _p3.y)+_p3.y); + } + else new Throwable().printStackTrace(); + _g.setColor(_auDessus); + _g.fillPolygon(x, y, 3); + _g.setColor(old); + } } } --- NEW FILE: TrSiPlanLayer.java --- /* * @file TrSiPlanLayer.java * @creation 22 mars 2004 * @modification $Date: 2004/03/31 08:17:47 $ * @license GNU General Public License 2 * @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne * @mail fud...@li... */ package org.fudaa.fudaa.tr.data; import java.awt.Color; import org.fudaa.ctulu.CtuluLib; import org.fudaa.ebli.calque.ZCalquePoint; import org.fudaa.ebli.calque.ZModelePoint; import org.fudaa.ebli.geometrie.GrBoite; import org.fudaa.ebli.geometrie.GrPoint; import org.fudaa.ebli.trace.TraceIcone; import org.fudaa.fudaa.meshviewer.MvPanelViewer; import org.fudaa.fudaa.meshviewer.layer.MvLayer; import org.fudaa.fudaa.meshviewer.layer.MvPanelInfo; import org.fudaa.fudaa.meshviewer.layer.MvPanelInfo.InfoData; import org.fudaa.fudaa.tr.TrResource; /** * @author Fred Deniger * @version $Id: TrSiPlanLayer.java,v 1.1 2004/03/31 08:17:47 deniger Exp $ */ public class TrSiPlanLayer extends ZCalquePoint implements MvLayer { /** * @param _m les 3 points du plan */ public TrSiPlanLayer(ZModelePoint _m) { super(_m); setIcone(new TraceIcone(TraceIcone.DISQUE, 4)); setForeground(Color.red); setTitle(TrResource.getS("Plan")); } /** * @see org.fudaa.fudaa.meshviewer.layer.MvLayer#fillWithInfo(org.fudaa.fudaa.meshviewer.layer.MvPanelInfo.InfoData) */ public void fillWithInfo(InfoData _m) { _m.setTitle(TrResource.getS("Plan solutions initiales")); GrPoint p = new GrPoint(); for (int i = 0; i < 3; i++) { modele_.point(p, i); _m.put(TrResource.getS("Point") + CtuluLib.ESPACE + (i + 1), MvPanelInfo.TWO_DIGITS_FORMAT .format(p.x) + ";" + MvPanelInfo.TWO_DIGITS_FORMAT.format(p.y) + ";" + MvPanelInfo.TWO_DIGITS_FORMAT.format(p.z)); } } /** * @see org.fudaa.fudaa.meshviewer.layer.MvLayer#getElementIdx() */ public int[] getElementIdx() { return null; } /** * @see org.fudaa.fudaa.meshviewer.layer.MvLayer#getPtIdx() */ public int[] getPtIdx() { if (isSelectionEmpty()) return null; else return getSelectedIndex(); } /** * @see org.fudaa.fudaa.meshviewer.layer.MvLayer#getZoomOnSelected() */ public GrBoite getZoomOnSelected() { if (isSelectionEmpty()) return null; int m = selection_.getMaxIndex(); if (m > modele_.getNombre()) m = modele_.getNombre() - 1; GrBoite r = new GrBoite(); GrPoint p = new GrPoint(); for (int i = selection_.getMinIndex(); i <= m; i++) { if (selection_.isSelected(i)) { modele_.point(p, i); r.ajuste(p); } } double coef = 1.1; r.e.x = r.e.x * coef; r.e.y = r.e.y * coef; r.o.x = r.o.x / coef; r.o.y = r.o.y / coef; return r; } /** * @see org.fudaa.fudaa.meshviewer.layer.MvLayer#isSelectionElementEmpty() */ public boolean isSelectionElementEmpty() { return true; } /** * @see org.fudaa.fudaa.meshviewer.layer.MvLayer#isSelectionPointEmpty() */ public boolean isSelectionPointEmpty() { return super.isSelectionEmpty(); } } |
From: Frederic D. <de...@us...> - 2004-03-31 08:30:07
|
Update of /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/ressource In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10634/src/org/fudaa/fudaa/ressource Modified Files: fudaa_en.fr_txt Added Files: pause_20.gif Log Message: Maj post Index: fudaa_en.fr_txt =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/ressource/fudaa_en.fr_txt,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** fudaa_en.fr_txt 12 Mar 2004 10:17:07 -0000 1.13 --- fudaa_en.fr_txt 31 Mar 2004 08:17:49 -0000 1.14 *************** *** 210,212 **** Contrôles=Controls Ouvrir avec=Open with ! Exécuter application Télémac=Execute Telemac soft \ No newline at end of file --- 210,215 ---- Contrôles=Controls Ouvrir avec=Open with ! Exécuter application Télémac=Execute Telemac soft ! Modifier les informations=Modify general informations ! Importation réussie=Importation succeed ! Pas de modificaction=No changes \ No newline at end of file --- NEW FILE: pause_20.gif --- (This appears to be a binary file; contents omitted.) |
From: Frederic D. <de...@us...> - 2004-03-31 08:30:07
|
Update of /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/meshviewer/layer In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10634/src/org/fudaa/fudaa/meshviewer/layer Modified Files: MvElementModelDefault.java MvLayer.java MvPanelInfo.java MvNodeModelDefault.java MvNodeLayer.java MvInfoDelegateAbstract.java Log Message: Maj post Index: MvInfoDelegateAbstract.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/meshviewer/layer/MvInfoDelegateAbstract.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** MvInfoDelegateAbstract.java 19 Mar 2004 17:40:23 -0000 1.2 --- MvInfoDelegateAbstract.java 31 Mar 2004 08:17:48 -0000 1.3 *************** *** 10,20 **** import org.fudaa.ctulu.CtuluLib; - import org.fudaa.dodico.ef.EfElement; import org.fudaa.dodico.ef.EfGrid; import org.fudaa.dodico.ef.EfNode; - import org.fudaa.ebli.commun.EbliListeSelectionInterface; - import org.fudaa.fudaa.meshviewer.layer.MvPanelInfo.InfoData; import org.fudaa.fudaa.ressource.FudaaResource; --- 10,17 ---- *************** *** 29,43 **** /** ! * */ public final void fillWithPointInfo( ! InfoData _m, ! EbliListeSelectionInterface _selection) { ! int n= _selection.getNbSelectedIndex(); if (n > 1) { _m.setTitle(FudaaResource.getS("Noeuds")); _m.put( ! FudaaResource.getS("Nombre de noeuds sélectionnés"), ! CtuluLib.getString(n)); } else { fillWithPointInfo(_m, _selection.getMaxIndex()); --- 26,40 ---- /** ! * * */ public final void fillWithPointInfo( ! InfoData _m, ! EbliListeSelectionInterface _selection) { ! int n = _selection.getNbSelectedIndex(); if (n > 1) { _m.setTitle(FudaaResource.getS("Noeuds")); _m.put( ! FudaaResource.getS("Nombre de noeuds sélectionnés"), ! CtuluLib.getString(n)); } else { fillWithPointInfo(_m, _selection.getMaxIndex()); *************** *** 50,56 **** */ public final void fillWithPointInfo(InfoData _m, int _idx) { ! fillWithXYZPointInfo(_m,_idx); } ! /** * @param _m les donnees a mettre a jour --- 47,55 ---- */ public final void fillWithPointInfo(InfoData _m, int _idx) { ! int[] idx = new int[2]; ! int idxOnFr = getGrid().getFrontiers().getIdxOnFrontier(_idx, idx); ! fillWithPointInfo(_m, _idx, idxOnFr, idx[0], idx[1]); } ! /** * @param _m les donnees a mettre a jour *************** *** 58,85 **** */ public final void fillWithXYZPointInfo(InfoData _m, int _idx) { ! int[] idx=new int[2]; ! int frGlob=getGrid().getFrontiers().getIdxOnFrontier(_idx, idx); ! fillWithPointInfo(_m, _idx,frGlob,idx[0],idx[1]); } /** ! * @param _m ! * @param _idxGlobal ! * @param _idxGlobOnFr ! * @param _frIdx ! * @param _idxLocaloOnFr */ ! public void fillWithPointInfo( ! InfoData _m, ! int _idxGlobal, ! int _idxGlobOnFr, ! int _frIdx, ! int _idxLocaloOnFr) { ! String title= ! FudaaResource.getS("Noeud n° {0}", CtuluLib.getString(_idxGlobal + 1)); ! if (_idxGlobOnFr >=0) ! title += " (" + CtuluLib.getString(_idxGlobOnFr + 1) + ")"; _m.setTitle(title); ! EfNode p= getGrid().getPt(_idxGlobal); _m.put("x", MvPanelInfo.TWO_DIGITS_FORMAT.format(p.getX())); _m.put("y", MvPanelInfo.TWO_DIGITS_FORMAT.format(p.getY())); --- 57,75 ---- */ public final void fillWithXYZPointInfo(InfoData _m, int _idx) { ! fillWithXYZPointInfo(_m, _idx, getGrid().getFrontiers().getIdxOnFrontier(_idx)); } /** ! * @param _m le receveur des infos ! * @param _idx l'indice global du point ! * @param _idxOnFr l'indice sur les frontiere ( selon spec telemac) */ ! public final void fillWithXYZPointInfo(InfoData _m, int _idx, int _idxOnFr) { ! String title = ! FudaaResource.getS("Noeud n° {0}", CtuluLib.getString(_idx + 1)); ! if (_idxOnFr >= 0) ! title += " (" + CtuluLib.getString(_idxOnFr + 1) + ")"; _m.setTitle(title); ! EfNode p = getGrid().getPt(_idx); _m.put("x", MvPanelInfo.TWO_DIGITS_FORMAT.format(p.getX())); _m.put("y", MvPanelInfo.TWO_DIGITS_FORMAT.format(p.getY())); *************** *** 88,131 **** /** ! * */ public void fillWithElementInfo( ! InfoData _m, ! EbliListeSelectionInterface _selection) { if (!_selection.isOnlyOnIndexSelected()) { _m.setTitle(FudaaResource.getS("Eléments")); _m.put( ! FudaaResource.getS("Nombre d'éléments sélectionnés"), ! CtuluLib.getString(_selection.getNbSelectedIndex())); } else { ! int idxElt= _selection.getMaxIndex(); _m.setTitle( ! FudaaResource.getS("Element n° {0}", CtuluLib.getString(idxElt + 1))); ! EfGrid g= getGrid(); ! ! EfElement el= g.getElement(idxElt); ! int nb= el.getPtNb(); int indice; ! for (int i= 0; i < nb; i++) { ! indice= el.getPtIndex(i); ! EfNode p= getGrid().getPt(indice); ! String idx= CtuluLib.getString(i + 1); ! int idxOnFr= getGrid().getFrontiers().getIdxOnFrontier(indice); _m.put( ! FudaaResource.getS("Point n° {0}", idx), ! CtuluLib.getString(el.getPtIndex(i) + 1) ! + (idxOnFr >= 0 ! ? " (" + CtuluLib.getString(idxOnFr + 1) + ")" ! : CtuluLib.EMPTY_STRING)); _m.put( ! FudaaResource.getS("Point n° {0}", idx) + " x;y;z", ! MvPanelInfo.TWO_DIGITS_FORMAT.format(p.getX()) ! + "; " ! + MvPanelInfo.TWO_DIGITS_FORMAT.format(p.getY()) ! + "; " ! + MvPanelInfo.TWO_DIGITS_FORMAT.format(p.getZ())); } } } - } --- 78,136 ---- /** ! * @param _m le receveur des infos ! * @param _idxGlobal l'indice global ! * @param _idxGlobOnFr ! * @param _frIdx l'indice de la frontiere ! * @param _idxLocaloOnFr l'indice du point sur la frontiere en question ! */ ! public void fillWithPointInfo( ! InfoData _m, ! int _idxGlobal, ! int _idxGlobOnFr, ! int _frIdx, ! int _idxLocaloOnFr) { ! fillWithXYZPointInfo(_m, _idxGlobal, _idxGlobOnFr); ! } ! ! ! /** ! * @see org.fudaa.fudaa.meshviewer.layer.MvInfoDelegate#fillWithElementInfo(org.fudaa.fudaa.meshviewer.layer.MvPanelInfo.InfoData, org.fudaa.ebli.commun.EbliListeSelectionInterface) */ public void fillWithElementInfo( ! InfoData _m, ! EbliListeSelectionInterface _selection) { if (!_selection.isOnlyOnIndexSelected()) { _m.setTitle(FudaaResource.getS("Eléments")); _m.put( ! FudaaResource.getS("Nombre d'éléments sélectionnés"), ! CtuluLib.getString(_selection.getNbSelectedIndex())); } else { ! int idxElt = _selection.getMaxIndex(); _m.setTitle( ! FudaaResource.getS("Element n° {0}", CtuluLib.getString(idxElt + 1))); ! EfGrid g = getGrid(); ! EfElement el = g.getElement(idxElt); ! int nb = el.getPtNb(); int indice; ! for (int i = 0; i < nb; i++) { ! indice = el.getPtIndex(i); ! EfNode p = getGrid().getPt(indice); ! String idx = CtuluLib.getString(i + 1); ! int idxOnFr = getGrid().getFrontiers().getIdxOnFrontier(indice); _m.put( ! FudaaResource.getS("Point n° {0}", idx), ! CtuluLib.getString(el.getPtIndex(i) + 1) ! + (idxOnFr >= 0 ! ? " (" + CtuluLib.getString(idxOnFr + 1) + ")" ! : CtuluLib.EMPTY_STRING)); _m.put( ! FudaaResource.getS("Point n° {0}", idx) + " x;y;z", ! MvPanelInfo.TWO_DIGITS_FORMAT.format(p.getX()) ! + "; " ! + MvPanelInfo.TWO_DIGITS_FORMAT.format(p.getY()) ! + "; " ! + MvPanelInfo.TWO_DIGITS_FORMAT.format(p.getZ())); } } } } Index: MvLayer.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/meshviewer/layer/MvLayer.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** MvLayer.java 12 Feb 2004 16:27:40 -0000 1.1 --- MvLayer.java 31 Mar 2004 08:17:48 -0000 1.2 *************** *** 17,23 **** --- 17,32 ---- */ public interface MvLayer { + /** + * @return true si aucun point selectionne + */ public boolean isSelectionPointEmpty(); + /** + * @return les indices des points selectionnes + */ public int[] getPtIdx(); + /** + * @return true si acun element selectionne + */ public boolean isSelectionElementEmpty(); public int[] getElementIdx(); Index: MvPanelInfo.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/meshviewer/layer/MvPanelInfo.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** MvPanelInfo.java 12 Feb 2004 16:27:40 -0000 1.1 --- MvPanelInfo.java 31 Mar 2004 08:17:48 -0000 1.2 *************** *** 12,15 **** --- 12,17 ---- import java.awt.Font; import java.text.DecimalFormat; + import java.util.ArrayList; + import java.util.List; import java.util.Vector; *************** *** 110,119 **** tableModel_.fireTableDataChanged(); } public class PanelTableModel extends AbstractTableModel implements InfoData { ! private Vector name_; ! private Vector value_; public PanelTableModel() { ! name_= new Vector(); ! value_= new Vector(); } public String getLine(int _row) { --- 112,128 ---- tableModel_.fireTableDataChanged(); } + /** + * @author Fred Deniger + * @version $Id$ + */ public class PanelTableModel extends AbstractTableModel implements InfoData { ! private List name_; ! private List value_; ! /** ! * ! */ public PanelTableModel() { ! name_= new ArrayList(); ! value_= new ArrayList(); } public String getLine(int _row) { Index: MvNodeLayer.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/meshviewer/layer/MvNodeLayer.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** MvNodeLayer.java 19 Mar 2004 17:40:23 -0000 1.2 --- MvNodeLayer.java 31 Mar 2004 08:17:48 -0000 1.3 *************** *** 31,42 **** return null; } /** ! * */ public int[] getElementIdx() { return null; } /** ! * */ public boolean isSelectionElementEmpty() { --- 31,44 ---- return null; } + /** ! * @see org.fudaa.fudaa.meshviewer.layer.MvLayer#getElementIdx() */ public int[] getElementIdx() { return null; } + /** ! * @see org.fudaa.fudaa.meshviewer.layer.MvLayer#isSelectionElementEmpty() */ public boolean isSelectionElementEmpty() { *************** *** 44,48 **** } /** ! * */ public boolean isSelectionPointEmpty() { --- 46,50 ---- } /** ! * @see org.fudaa.fudaa.meshviewer.layer.MvLayer#isSelectionPointEmpty() */ public boolean isSelectionPointEmpty() { *************** *** 50,55 **** } /** ! * */ public GrBoite getZoomOnSelected() { --- 52,58 ---- } + /** ! * @see org.fudaa.fudaa.meshviewer.layer.MvLayer#getZoomOnSelected() */ public GrBoite getZoomOnSelected() { Index: MvElementModelDefault.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/meshviewer/layer/MvElementModelDefault.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** MvElementModelDefault.java 12 Feb 2004 16:27:40 -0000 1.1 --- MvElementModelDefault.java 31 Mar 2004 08:17:48 -0000 1.2 *************** *** 23,31 **** import org.fudaa.fudaa.meshviewer.layer.MvPanelInfo.InfoData; public class MvElementModelDefault extends ZModeleDonnesAbstract implements MvElementModel { ! EfGrid g_; ! MvInfoDelegate delegate_; public MvElementModelDefault(EfGrid _g) { --- 23,35 ---- import org.fudaa.fudaa.meshviewer.layer.MvPanelInfo.InfoData; + /** + * @author Fred Deniger + * @version $Id$ + */ public class MvElementModelDefault extends ZModeleDonnesAbstract implements MvElementModel { ! protected EfGrid g_; ! protected MvInfoDelegate delegate_; public MvElementModelDefault(EfGrid _g) { Index: MvNodeModelDefault.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/meshviewer/layer/MvNodeModelDefault.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** MvNodeModelDefault.java 19 Mar 2004 17:40:23 -0000 1.2 --- MvNodeModelDefault.java 31 Mar 2004 08:17:48 -0000 1.3 *************** *** 48,51 **** --- 48,55 ---- grid_= _g; } + + public final EfGrid getGrid(){ + return grid_; + } /** |
From: Frederic D. <de...@us...> - 2004-03-31 08:30:07
|
Update of /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/telemac In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10634/src/org/fudaa/fudaa/tr/telemac Modified Files: TrTelemacAppliManager.java TrTelemacImplHelper.java TrTelemacCommunParametres.java TrTelemacBoundaryEditor.java TrTelemacProjectFactory.java Log Message: Maj post Index: TrTelemacCommunParametres.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/telemac/TrTelemacCommunParametres.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** TrTelemacCommunParametres.java 12 Mar 2004 10:16:58 -0000 1.11 --- TrTelemacCommunParametres.java 31 Mar 2004 08:17:48 -0000 1.12 *************** *** 11,14 **** --- 11,16 ---- import java.util.Map; + import com.memoire.bu.BuInformationsDocument; + import org.fudaa.ctulu.CtuluLib; import org.fudaa.dodico.commun.ProgressionInterface; *************** *** 401,403 **** --- 403,407 ---- + + } \ No newline at end of file Index: TrTelemacBoundaryEditor.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/telemac/TrTelemacBoundaryEditor.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** TrTelemacBoundaryEditor.java 12 Feb 2004 16:15:22 -0000 1.3 --- TrTelemacBoundaryEditor.java 31 Mar 2004 08:17:48 -0000 1.4 *************** *** 83,87 **** DodicoCommandComposite _mng, H2dEvolutionManager _evolMng) { ! super(EbliSimpleDialogPanel.OK_CANCEL_OPTION); bord_= _bord; clMng_= _clMng; --- 83,87 ---- DodicoCommandComposite _mng, H2dEvolutionManager _evolMng) { ! super(); bord_= _bord; clMng_= _clMng; Index: TrTelemacProjectFactory.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/telemac/TrTelemacProjectFactory.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** TrTelemacProjectFactory.java 10 Mar 2004 09:13:29 -0000 1.6 --- TrTelemacProjectFactory.java 31 Mar 2004 08:17:48 -0000 1.7 *************** *** 31,34 **** --- 31,41 ---- } + /** + * @param _f le fichier cas a creer + * @param _v la version voulu + * @param _ui l'imp parent + * @param _gridFile le maillage (peut etre nul) + * @return + */ public static TrProjet createNewTelemacProjet( File _f, *************** *** 38,41 **** --- 45,58 ---- } + /** + * Cree un nouveau projet ( 2d si necessaire) + * @param _f le fichier + * @param _v la version + * @param _ui l'impl parent + * @param _m les mot-clés (peut etre null) + * @param _commentaire les commentaires (peut etre null) + * @param _gridFile le fichier de maillage (peut etre null) + * @return le nouveau projet + */ public static TrProjet createNewTelemacProjet( File _f, *************** *** 52,55 **** --- 69,83 ---- } + /** + * Creer un projet telemac2D + * @param _f le fichier + * @param _v la version + * @param _ui l'impl parent + * @param _m les mot-clés (peut etre null) + * @param _com les commentaires (peut etre null) + * @param _gridFile le fichier de maillage (peut etre null) + * @return le nouveau projet + + */ public static TrTelemac2dProject createNewTelemac2dProjet( File _f, *************** *** 60,63 **** --- 88,98 ---- } + /** + * @param _file le fichier cas + * @param _fileFormat le format + * @param _progress la barre de progression + * @param _ui l'impl + * @return le nouveau projet ou nul si erreur + */ public static TrProjet createTelemacProjet( File _file, *************** *** 91,94 **** --- 126,136 ---- } + /** + * @param _file le fichier cas + * @param _fileFormat le format voulu + * @param _progress la barre de progress + * @param _ui l'impl + * @return le nouveau projet ou nul + */ public static TrProjet createTelemac2dProject( File _file, Index: TrTelemacImplHelper.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/telemac/TrTelemacImplHelper.java,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** TrTelemacImplHelper.java 12 Mar 2004 10:16:58 -0000 1.15 --- TrTelemacImplHelper.java 31 Mar 2004 08:17:48 -0000 1.16 *************** *** 10,18 **** import java.io.File; import com.memoire.bu.BuMenuItem; import com.memoire.bu.BuTask; import org.fudaa.ctulu.CtuluLib; import org.fudaa.dodico.commun.ProgressionInterface; - import org.fudaa.dodico.dico.DicoLanguage; import org.fudaa.dodico.dico.DicoModelAbstract; import org.fudaa.dodico.fichiers.FileFormatSoftware; --- 10,19 ---- import java.io.File; + import com.memoire.bu.BuMenuItem; import com.memoire.bu.BuTask; + import org.fudaa.ctulu.CtuluLib; import org.fudaa.dodico.commun.ProgressionInterface; import org.fudaa.dodico.dico.DicoModelAbstract; import org.fudaa.dodico.fichiers.FileFormatSoftware; *************** *** 25,29 **** import org.fudaa.fudaa.fdico.FDicoNewProjectPanel; import org.fudaa.fudaa.ressource.FudaaResource; - import org.fudaa.fudaa.tr.TrApplicationManager; import org.fudaa.fudaa.tr.TrImplHelper; import org.fudaa.fudaa.tr.TrImplementation; --- 26,29 ---- *************** *** 123,131 **** FDicoNewProjectPanel p = new FDicoNewProjectPanel(TelemacDicoManager.getINSTANCE()); - FDicoChooserPanel cp = p.getChooserPanel(); if(_gridFile!=null){ ! cp.setDefaultFile(new File(_gridFile.getParentFile(),"cas").getAbsolutePath()); } ! cp.setDicoSelected(Telemac2dFileFormat.getInstance()); int r = p.afficheModale(getImpl().getFrame()); if (EbliSimpleDialogPanel.isOkResponse(r)) { --- 123,130 ---- FDicoNewProjectPanel p = new FDicoNewProjectPanel(TelemacDicoManager.getINSTANCE()); if(_gridFile!=null){ ! p.setDefaultFile(new File(_gridFile.getParentFile(),"cas").getAbsolutePath()); } ! p.setDicoSelected(Telemac2dFileFormat.getInstance()); int r = p.afficheModale(getImpl().getFrame()); if (EbliSimpleDialogPanel.isOkResponse(r)) { *************** *** 134,140 **** TelemacDicoFileFormatVersion ft = TelemacDicoManager.getINSTANCE().createTelemacVersionImpl( ! cp.getFileFormatSelected(), ! cp.getVersionSelected(), ! cp.getLanguageSelected()); if (ft != null) { return TrTelemacProjectFactory.createNewTelemacProjet( --- 133,139 ---- TelemacDicoFileFormatVersion ft = TelemacDicoManager.getINSTANCE().createTelemacVersionImpl( ! p.getFileFormatSelected(), ! p.getVersionSelected(), ! p.getLanguageSelected()); if (ft != null) { return TrTelemacProjectFactory.createNewTelemacProjet( *************** *** 183,186 **** --- 182,186 ---- FDicoChooserPanel s = new FDicoChooserPanel(TelemacDicoManager.getINSTANCE()); + s.setDicoSelected(TelemacDicoManager.getINSTANCE().getFileFormat("telemac2d")); if (_f != null) s.setSelectedFic(_f.getAbsolutePath()); int r = Index: TrTelemacAppliManager.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/telemac/TrTelemacAppliManager.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** TrTelemacAppliManager.java 12 Mar 2004 10:16:58 -0000 1.2 --- TrTelemacAppliManager.java 31 Mar 2004 08:17:48 -0000 1.3 *************** *** 217,220 **** --- 217,222 ---- execTelemac_=_explorer.createFileAction(new FudaaExecLaunchTelemac()); _m.add(execTelemac_); + postItem_ = _explorer.createFileAction(new FudaaExecPostView()); + _m.add(postItem_); } |
From: Frederic D. <de...@us...> - 2004-03-31 08:29:39
|
Update of /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/commun/projet In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10634/src/org/fudaa/fudaa/commun/projet Added Files: FudaaProjetInformationPanel.java Log Message: Maj post --- NEW FILE: FudaaProjetInformationPanel.java --- /* * @file FudaaProjetInformationPanel.java * @creation 23 mars 2004 * @modification $Date: 2004/03/31 08:17:52 $ * @license GNU General Public License 2 * @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne * @mail fud...@li... */ package org.fudaa.fudaa.commun.projet; import java.awt.Frame; import com.memoire.bu.BuBorderLayout; import com.memoire.bu.BuGridLayout; import com.memoire.bu.BuInformationsDocument; import com.memoire.bu.BuPanel; import com.memoire.bu.BuScrollPane; import com.memoire.bu.BuTextArea; import com.memoire.bu.BuTextField; import org.fudaa.ebli.dialog.EbliSimpleDialogPanel; import org.fudaa.fudaa.ressource.FudaaResource; /** * @author Fred Deniger * @version $Id: FudaaProjetInformationPanel.java,v 1.1 2004/03/31 08:17:52 deniger Exp $ */ public class FudaaProjetInformationPanel extends EbliSimpleDialogPanel { BuInformationsDocument d_; BuTextField author_; BuTextField date_; BuTextArea com_; /** * @param _d les infos non nulles */ public FudaaProjetInformationPanel(BuInformationsDocument _d) { super(); d_ = _d; addEmptyBorder(10); BuPanel pn = new BuPanel(); pn.setLayout(new BuGridLayout(2, 5, 5)); author_ = addLabelStringText(pn, FudaaResource.getS("Auteur")); author_.setText(d_.author); date_ = addLabelStringText(pn, FudaaResource.getS("Date")); date_.setText(d_.date); setLayout(new BuBorderLayout(10, 10)); add(pn, BuBorderLayout.CENTER); com_ = new BuTextArea(); com_.setText(d_.comment); add(new BuScrollPane(com_),BuBorderLayout.SOUTH); } /** * @return les nouvelles info sur le doc si modifie. null sinon */ public BuInformationsDocument getModifyDoc(){ BuInformationsDocument r=null; boolean change=false; if(!d_.author.equals(author_.getText().trim())){ change=true; } if(!d_.date.equals(date_.getText().trim())){ change=true; } if(!d_.comment.equals(com_.getText().trim())){ change=true; } if(change){ r=new BuInformationsDocument(); r.author=author_.getText().trim(); r.date=date_.getText().trim(); r.comment=com_.getText().trim(); } return r; } /** * @param _f la fenetre * @param _init le document init * @return le doc modifie ou nul si pas de modif */ public static BuInformationsDocument editInfoDoc(Frame _f,BuInformationsDocument _init){ BuInformationsDocument init=_init; if(init==null){ init=new BuInformationsDocument(); } FudaaProjetInformationPanel pn=new FudaaProjetInformationPanel(init); if(EbliSimpleDialogPanel.isOkResponse(pn.afficheModale(_f))){ BuInformationsDocument d=pn.getModifyDoc(); if(d!=null) return d; else if(_init==null) return init; } return null; } } |
From: Frederic D. <de...@us...> - 2004-03-31 08:29:38
|
Update of /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/commun In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10634/src/org/fudaa/fudaa/commun Modified Files: FudaaLib.java FudaaCommonImplementation.java Log Message: Maj post Index: FudaaCommonImplementation.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/commun/FudaaCommonImplementation.java,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** FudaaCommonImplementation.java 10 Mar 2004 09:13:30 -0000 1.16 --- FudaaCommonImplementation.java 31 Mar 2004 08:17:51 -0000 1.17 *************** *** 8,23 **** */ package org.fudaa.fudaa.commun; import java.awt.Component; import java.awt.event.ActionEvent; import java.awt.print.PrinterJob; import java.io.File; - import java.io.IOException; import java.net.MalformedURLException; import java.net.URL; import javax.swing.JInternalFrame; import javax.swing.JMenu; ! ! import org.fudaa.ctulu.CtuluLib; import com.memoire.bu.BuBrowserPreferencesPanel; --- 8,24 ---- */ package org.fudaa.fudaa.commun; + import java.awt.Component; import java.awt.event.ActionEvent; import java.awt.print.PrinterJob; import java.io.File; import java.net.MalformedURLException; import java.net.URL; + import java.util.Timer; + import java.util.TimerTask; import javax.swing.JInternalFrame; import javax.swing.JMenu; ! import javax.swing.event.InternalFrameEvent; import com.memoire.bu.BuBrowserPreferencesPanel; *************** *** 39,50 **** import com.memoire.bu.BuTaskOperation; import com.memoire.bu.BuUserPreferencesPanel; - import com.memoire.fu.FuLib; import org.fudaa.dodico.commun.DodicoAnalyze; - import org.fudaa.dodico.commun.DodicoLib; import org.fudaa.dodico.commun.ProgressionBuAdapter; import org.fudaa.dodico.commun.ProgressionInterface; import org.fudaa.dodico.fichiers.FileOperationSynthese; - import org.fudaa.ebli.filechooser.EbliFileChooser; import org.fudaa.ebli.impression.EbliFillePrevisualisation; --- 40,49 ---- import com.memoire.bu.BuTaskOperation; import com.memoire.bu.BuUserPreferencesPanel; + import org.fudaa.ctulu.CtuluLib; import org.fudaa.dodico.commun.DodicoAnalyze; import org.fudaa.dodico.commun.ProgressionBuAdapter; import org.fudaa.dodico.commun.ProgressionInterface; import org.fudaa.dodico.fichiers.FileOperationSynthese; import org.fudaa.ebli.filechooser.EbliFileChooser; import org.fudaa.ebli.impression.EbliFillePrevisualisation; *************** *** 52,56 **** import org.fudaa.ebli.impression.EbliMiseEnPagePreferencesPanel; import org.fudaa.ebli.impression.EbliPageable; - import org.fudaa.fudaa.commun.aide.FudaaAidePreferencesPanel; import org.fudaa.fudaa.commun.aide.FudaaAstuces; --- 51,54 ---- *************** *** 62,205 **** */ public abstract class FudaaCommonImplementation ! extends BuCommonImplementation ! implements FudaaUI { /** * Description du champ */ ! protected BuPreferencesFrame preferences_; protected EbliFillePrevisualisation previsuFille_; ! protected FudaaUndoCmdMngListener cmdListener_; /** * Description du champ */ ! protected BuHelpFrame aide_; ! /** * URL pour l'aide locale. */ ! public final static String LOCAL_MAN=getUserDirUrl()+"/aide/"; /** * URL pour l'aide distante. */ ! public final static String REMOTE_MAN= ! "http://www.utc.fr/fudaa/aide/aide_html/"; ! ! /** ! * Return le chemin de la propriete user.dir dans le format ! * file://.... ! * @return le chemin de l'utilisateur sous forme d'url valide ! */ public static final String getUserDirUrl() { return FudaaLib.pathToUrl(System.getProperty("user.dir")); } - - public FudaaUndoCmdMngListener getUndoCmdListener() { ! if (cmdListener_ == null) ! cmdListener_= new FudaaUndoCmdMngListener(this); return cmdListener_; } public void addMenu(JMenu _m, int _idx) { ! BuMenuBar b= getMainMenuBar(); b.add(_m, _idx); b.computeMnemonics(); b.revalidate(); } public int getNbMenuInMenuBar() { return getMainMenuBar().getMenuCount(); } /** ! * Permet d'afficher une url <code>_url</code> dans un browser. Le ! * browser est choisi en fonction des preferences (<code>browser.type</code>) ! * */ public void displayURL(String _url) { ! if ((_url == null) || (_url.length() == 0)) ! _url= FudaaImplementation.LOCAL_MAN; ! if ((_url.startsWith("file")) && (_url.endsWith("/"))) ! _url= _url + "index.html"; ! if (CtuluLib.DEBUG) ! CtuluLib.debug("FudaaCommonImplementation.displayURL " + _url); if (BuPreferences.BU.getIntegerProperty("browser.type") == 1) { ! if (aide_ == null) ! aide_= new BuHelpFrame(); addInternalFrame(aide_); aide_.setDocumentUrl(_url); } else { if (_url == null) { ! BuInformationsSoftware il= getInformationsSoftware(); ! _url= il.http; } FudaaBrowserControl.displayURL(_url); } } /** ! * Permet d'afficher l'url correspondant a la chaine <code>_s</code>. ! * Si la chaine n'est pas une URL valide un panneau d'erreur est ! * renvoye. * @see #displayURL(String) */ public void displayURLFormString(String _s) { try { ! String url= new URL(_s).toString(); ! if (CtuluLib.DEBUG) ! CtuluLib.debug(getClass().getName() + CtuluLib.ESPACE + "url= " + url); ! if (url != null) ! displayURL(url); } catch (MalformedURLException e) { FudaaLib.showError( ! this, ! FudaaResource.getS("Erreur"), ! FudaaResource.getS("Le document est introuvable") ! + CtuluLib.ESPACE ! + _s); e.printStackTrace(); } } /** * Permet d'afficher le contenu du fichier f dans un browser. * @see #displayURL(String) */ public void displayURL(File _f) { try { ! String url= _f.toURL().toString(); ! if (CtuluLib.DEBUG) ! CtuluLib.debug(getClass().getName() + " " + "url= " + url); ! if (url != null) ! displayURL(url); } catch (MalformedURLException e) { FudaaLib.showError( ! this, ! FudaaResource.getS("Erreur"), ! FudaaResource.getS("Le document est introuvable") ! + _f.getAbsolutePath()); e.printStackTrace(); } } /** ! * @return valeur Astuces */ public FudaaAstuces getAstuces() { return FudaaAstuces.FUDAA; } /** * Renvoie les preferences de l'application */ public abstract BuPreferences getApplicationPreferences(); /** * Description de la methode ! * * @param _evt */ public void actionPerformed(ActionEvent _evt) { ! String action= _evt.getActionCommand(); ! int i= action.indexOf('('); if (i >= 0) { ! action= action.substring(i + 1, action.length() - 1); } if (("PREVISUALISER".equals(action)) ! || ("MISEENPAGE".equals(action)) ! || ("IMPRIMER".equals(action))) { gestionnaireImpression(action); } else if (action.equals("PREFERENCE")) { --- 60,210 ---- */ public abstract class FudaaCommonImplementation ! extends BuCommonImplementation ! implements FudaaUI { ! /** * Description du champ */ ! protected BuPreferencesFrame preferences_; protected EbliFillePrevisualisation previsuFille_; ! protected FudaaUndoCmdMngListener cmdListener_; /** * Description du champ */ ! protected BuHelpFrame aide_; ! /** * URL pour l'aide locale. */ ! public final static String LOCAL_MAN = getUserDirUrl() + "/aide/"; /** * URL pour l'aide distante. */ ! public final static String REMOTE_MAN = ! "http://www.utc.fr/fudaa/aide/aide_html/"; ! ! /** ! * Return le chemin de la propriete user.dir dans le format file://.... ! * ! * @return le chemin de l'utilisateur sous forme d'url valide ! */ public static final String getUserDirUrl() { return FudaaLib.pathToUrl(System.getProperty("user.dir")); } public FudaaUndoCmdMngListener getUndoCmdListener() { ! if (cmdListener_ == null) ! cmdListener_ = new FudaaUndoCmdMngListener(this); return cmdListener_; } + public void addMenu(JMenu _m, int _idx) { ! BuMenuBar b = getMainMenuBar(); b.add(_m, _idx); b.computeMnemonics(); b.revalidate(); } + public int getNbMenuInMenuBar() { return getMainMenuBar().getMenuCount(); } + /** ! * Permet d'afficher une url <code>_url</code> dans un browser. Le browser est choisi en ! * fonction des preferences (<code>browser.type</code>) */ public void displayURL(String _url) { ! if ((_url == null) || (_url.length() == 0)) ! _url = FudaaImplementation.LOCAL_MAN; ! if ((_url.startsWith("file")) && (_url.endsWith("/"))) ! _url = _url + "index.html"; ! if (CtuluLib.DEBUG) ! CtuluLib.debug("FudaaCommonImplementation.displayURL " + _url); if (BuPreferences.BU.getIntegerProperty("browser.type") == 1) { ! if (aide_ == null) ! aide_ = new BuHelpFrame(); addInternalFrame(aide_); aide_.setDocumentUrl(_url); } else { if (_url == null) { ! BuInformationsSoftware il = getInformationsSoftware(); ! _url = il.http; } FudaaBrowserControl.displayURL(_url); } } + /** ! * Permet d'afficher l'url correspondant a la chaine <code>_s</code>. Si la chaine n'est pas ! * une URL valide un panneau d'erreur est renvoye. ! * * @see #displayURL(String) */ public void displayURLFormString(String _s) { try { ! String url = new URL(_s).toString(); ! if (CtuluLib.DEBUG) ! CtuluLib.debug(getClass().getName() + CtuluLib.ESPACE + "url= " + url); ! if (url != null) ! displayURL(url); } catch (MalformedURLException e) { FudaaLib.showError( ! this, ! FudaaResource.getS("Erreur"), ! FudaaResource.getS("Le document est introuvable") ! + CtuluLib.ESPACE ! + _s); e.printStackTrace(); } } + /** * Permet d'afficher le contenu du fichier f dans un browser. + * * @see #displayURL(String) */ public void displayURL(File _f) { try { ! String url = _f.toURL().toString(); ! if (CtuluLib.DEBUG) ! CtuluLib.debug(getClass().getName() + " " + "url= " + url); ! if (url != null) ! displayURL(url); } catch (MalformedURLException e) { FudaaLib.showError( ! this, ! FudaaResource.getS("Erreur"), ! FudaaResource.getS("Le document est introuvable") ! + _f.getAbsolutePath()); e.printStackTrace(); } } + /** ! * @return valeur Astuces */ public FudaaAstuces getAstuces() { return FudaaAstuces.FUDAA; } + /** * Renvoie les preferences de l'application */ public abstract BuPreferences getApplicationPreferences(); + /** * Description de la methode ! * * @param _evt */ public void actionPerformed(ActionEvent _evt) { ! String action = _evt.getActionCommand(); ! int i = action.indexOf('('); if (i >= 0) { ! action = action.substring(i + 1, action.length() - 1); } if (("PREVISUALISER".equals(action)) ! || ("MISEENPAGE".equals(action)) ! || ("IMPRIMER".equals(action))) { gestionnaireImpression(action); } else if (action.equals("PREFERENCE")) { *************** *** 209,212 **** --- 214,218 ---- } } + /** * Description de la methode *************** *** 222,238 **** super.print(); } private void gestionnaireImpression(String _commande) { ! JInternalFrame frame= getCurrentInternalFrame(); final EbliPageable target; if (frame instanceof EbliPageable) ! target= (EbliPageable)frame; else if (frame instanceof EbliFillePrevisualisation) ! target= ((EbliFillePrevisualisation)frame).getEbliPageable(); else { new BuDialogWarning( ! this, ! getInformationsSoftware(), ! FudaaResource.getS("Cette fenêtre n'est pas imprimable")) ! .activate(); return; } --- 228,245 ---- super.print(); } + private void gestionnaireImpression(String _commande) { ! JInternalFrame frame = getCurrentInternalFrame(); final EbliPageable target; if (frame instanceof EbliPageable) ! target = (EbliPageable) frame; else if (frame instanceof EbliFillePrevisualisation) ! target = ((EbliFillePrevisualisation) frame).getEbliPageable(); else { new BuDialogWarning( ! this, ! getInformationsSoftware(), ! FudaaResource.getS("Cette fenêtre n'est pas imprimable")) ! .activate(); return; } *************** *** 241,257 **** } else if ("MISEENPAGE".equals(_commande)) cmdMiseEnPage(target); ! else if ("PREVISUALISER".equals(_commande)) ! cmdPrevisualisation(target); } /** * Impression de la page <code>_target</code> dans un nouveau thread. */ public void cmdImprimer(EbliPageable _target) { ! final PrinterJob printJob= PrinterJob.getPrinterJob(); ! final BuMainPanel mp= getMainPanel(); printJob.setPageable(_target); if (printJob.printDialog()) { mp.setProgression(5); new BuTaskOperation(this, FudaaResource.FUDAA.getString("Impression")) { public void act() { try { --- 248,266 ---- } else if ("MISEENPAGE".equals(_commande)) cmdMiseEnPage(target); ! else if ("PREVISUALISER".equals(_commande)) ! cmdPrevisualisation(target); } + /** * Impression de la page <code>_target</code> dans un nouveau thread. */ public void cmdImprimer(EbliPageable _target) { ! final PrinterJob printJob = PrinterJob.getPrinterJob(); ! final BuMainPanel mp = getMainPanel(); printJob.setPageable(_target); if (printJob.printDialog()) { mp.setProgression(5); new BuTaskOperation(this, FudaaResource.FUDAA.getString("Impression")) { + public void act() { try { *************** *** 268,278 **** } } public void cmdMiseEnPage(EbliPageable _target) { new EbliMiseEnPageDialog(_target, getApp(), getInformationsSoftware()) ! .activate(); } public void cmdPrevisualisation(EbliPageable _target) { if (previsuFille_ == null) { ! previsuFille_= new EbliFillePrevisualisation(getApp(), _target); } else { previsuFille_.setEbliPageable(_target); --- 277,289 ---- } } + public void cmdMiseEnPage(EbliPageable _target) { new EbliMiseEnPageDialog(_target, getApp(), getInformationsSoftware()) ! .activate(); } + public void cmdPrevisualisation(EbliPageable _target) { if (previsuFille_ == null) { ! previsuFille_ = new EbliFillePrevisualisation(getApp(), _target); } else { previsuFille_.setEbliPageable(_target); *************** *** 280,292 **** addInternalFrame(previsuFille_); } public void contextHelp(String _url) { ! String url= new String(_url.trim()); if ((url == null) || (url.length() == 0) || (url.startsWith("#"))) { ! url= "index.html"; } super.contextHelp(url); } protected void buildPreferences() { ! preferences_= new BuPreferencesFrame(); preferences_.addTab(new BuUserPreferencesPanel(this)); preferences_.addTab(new BuLanguagePreferencesPanel(this)); --- 291,305 ---- addInternalFrame(previsuFille_); } + public void contextHelp(String _url) { ! String url = new String(_url.trim()); if ((url == null) || (url.length() == 0) || (url.startsWith("#"))) { ! url = "index.html"; } super.contextHelp(url); } + protected void buildPreferences() { ! preferences_ = new BuPreferencesFrame(); preferences_.addTab(new BuUserPreferencesPanel(this)); preferences_.addTab(new BuLanguagePreferencesPanel(this)); *************** *** 296,326 **** preferences_.addTab(new EbliMiseEnPagePreferencesPanel()); preferences_.addTab( ! new FudaaAidePreferencesPanel(this, getApplicationPreferences())); } /** * Description de la methode */ protected final void preferences() { ! if (preferences_ == null) ! buildPreferences(); addInternalFrame(preferences_); } public void error(String _titre, String _text) { error(_titre, _text, true); } /** ! * */ public void error(String _titre, String _text, boolean printErr) { FudaaLib.showError(this, _titre, _text); ! if (printErr) ! CtuluLib.error(_titre + CtuluLib.ESPACE + _text); } /** ! * */ public void message(String _titre, String _text) { FudaaLib.showMessage(this, _titre, _text); } /** * @see org.fudaa.fudaa.commun.FudaaUI#confirmation(java.lang.String, java.lang.String) --- 309,344 ---- preferences_.addTab(new EbliMiseEnPagePreferencesPanel()); preferences_.addTab( ! new FudaaAidePreferencesPanel(this, getApplicationPreferences())); } + /** * Description de la methode */ protected final void preferences() { ! if (preferences_ == null) ! buildPreferences(); addInternalFrame(preferences_); } + public void error(String _titre, String _text) { error(_titre, _text, true); } + /** ! * * */ public void error(String _titre, String _text, boolean printErr) { FudaaLib.showError(this, _titre, _text); ! if (printErr) ! CtuluLib.error(_titre + CtuluLib.ESPACE + _text); } + /** ! * * */ public void message(String _titre, String _text) { FudaaLib.showMessage(this, _titre, _text); } + /** * @see org.fudaa.fudaa.commun.FudaaUI#confirmation(java.lang.String, java.lang.String) *************** *** 329,332 **** --- 347,351 ---- return FudaaLib.showConfirmation(this, _titre, _text); } + /** * @see org.fudaa.fudaa.commun.FudaaUI#manageErrorOperationAndIsFatal(org.fudaa.dodico.fichiers.FileOperationSynthese) *************** *** 335,345 **** if (_opResult.getClosingException() != null) { CtuluLib.error( ! "FATAL :can't close " + _opResult.getAnalyze().getResource()); } ! if (_opResult.getAnalyze() != null) { ! return manageAnalyzeAndIsFatal(_opResult.getAnalyze()); } return false; } /** * @param _msg --- 354,365 ---- if (_opResult.getClosingException() != null) { CtuluLib.error( ! "FATAL :can't close " + _opResult.getAnalyze().getResource()); } ! if (_opResult.getAnalyze() != null) { ! return manageAnalyzeAndIsFatal(_opResult.getAnalyze()); } return false; } + /** * @param _msg *************** *** 348,351 **** --- 368,372 ---- error(BuResource.BU.getString("Erreur"), _msg); } + /** * @param _msg *************** *** 354,427 **** message(BuResource.BU.getString("Message"), _msg); } public File ouvrirFileChooser(String[] _extension, String _desc) { return ouvrirFileChooser(_extension, _desc, getFrame(), false); } public File ouvrirFileChooser( ! String[] _extension, ! String _desc, ! boolean _newFile) { return ouvrirFileChooser(_extension, _desc, getFrame(), _newFile); } public static File ouvrirFileChooser( ! String[] _extension, ! String _desc, ! Component _parent) { return ouvrirFileChooser(_extension, _desc, _parent, false); } public static File ouvrirFileChooser( ! String[] _extension, ! String _desc, ! Component _parent, ! boolean _saveDialog) { ! BuFileFilter flt= null; ! String titre= _desc; if (_extension != null) { ! flt= new BuFileFilter(_extension, _desc); } return ouvrirFileChooser(titre, flt, _parent, _saveDialog); } public static File ouvrirFileChooser( ! String _titre, ! BuFileFilter _filtre, ! Component _parent, ! boolean _saveDialog) { ! BuFileChooser fileChooser= new EbliFileChooser(true); fileChooser.setFileHidingEnabled(true); fileChooser.setMultiSelectionEnabled(false); fileChooser.setDialogTitle(_titre); ! if (_filtre != null) ! fileChooser.setFileFilter(_filtre); ! int returnVal= ! _saveDialog ! ? fileChooser.showSaveDialog(_parent) ! : fileChooser.showOpenDialog(_parent); if (returnVal == BuFileChooser.APPROVE_OPTION) { ! File f= fileChooser.getSelectedFile(); return f; ! } else ! return null; } ! /** * Renvoie true si fatal error. */ public boolean manageAnalyzeAndIsFatal(DodicoAnalyze _analyze) { ! if (_analyze == null) ! return false; if (!_analyze.isEmpty()) { _analyze.printResume(); } if (_analyze.getFatalError() != null) { ! DodicoAnalyze.Field f= _analyze.getFatalError(); error( ! _analyze.getDesc(), ! f.getOffset() < 0 ? f.getMessage() : f.toString(), ! false); return true; } return false; } /** ! * */ public ProgressionInterface createProgressionInterface(BuTask _bu) { --- 375,454 ---- message(BuResource.BU.getString("Message"), _msg); } + public File ouvrirFileChooser(String[] _extension, String _desc) { return ouvrirFileChooser(_extension, _desc, getFrame(), false); } + public File ouvrirFileChooser( ! String[] _extension, ! String _desc, ! boolean _newFile) { return ouvrirFileChooser(_extension, _desc, getFrame(), _newFile); } + public static File ouvrirFileChooser( ! String[] _extension, ! String _desc, ! Component _parent) { return ouvrirFileChooser(_extension, _desc, _parent, false); } + public static File ouvrirFileChooser( ! String[] _extension, ! String _desc, ! Component _parent, ! boolean _saveDialog) { ! BuFileFilter flt = null; ! String titre = _desc; if (_extension != null) { ! flt = new BuFileFilter(_extension, _desc); } return ouvrirFileChooser(titre, flt, _parent, _saveDialog); } + public static File ouvrirFileChooser( ! String _titre, ! BuFileFilter _filtre, ! Component _parent, ! boolean _saveDialog) { ! BuFileChooser fileChooser = new EbliFileChooser(true); fileChooser.setFileHidingEnabled(true); fileChooser.setMultiSelectionEnabled(false); fileChooser.setDialogTitle(_titre); ! if (_filtre != null) ! fileChooser.setFileFilter(_filtre); ! int returnVal = ! _saveDialog ! ? fileChooser.showSaveDialog(_parent) ! : fileChooser.showOpenDialog(_parent); if (returnVal == BuFileChooser.APPROVE_OPTION) { ! File f = fileChooser.getSelectedFile(); return f; ! } else ! return null; } ! /** * Renvoie true si fatal error. */ public boolean manageAnalyzeAndIsFatal(DodicoAnalyze _analyze) { ! if (_analyze == null) ! return false; if (!_analyze.isEmpty()) { _analyze.printResume(); } if (_analyze.getFatalError() != null) { ! DodicoAnalyze.Field f = _analyze.getFatalError(); error( ! _analyze.getDesc(), ! f.getOffset() < 0 ? f.getMessage() : f.toString(), ! false); return true; } return false; } + /** ! * * */ public ProgressionInterface createProgressionInterface(BuTask _bu) { *************** *** 439,456 **** /** ! * */ public void setMainMessage(String _s) { getMainPanel().setMessage(_s); } public void unsetMainMessage() { getMainPanel().setMessage(CtuluLib.EMPTY_STRING); getMainPanel().setProgression(0); } public void setMainProgression(int _i) { getMainPanel().setProgression(_i); } public void unsetMainProgression() { getMainPanel().setProgression(0); } } --- 466,588 ---- /** ! * * */ public void setMainMessage(String _s) { getMainPanel().setMessage(_s); } + + + /** + * @param _sec le nombre de secondes a attendre avant d'effacer le message principal + */ + public void clearMainMessage(int _sec) { + new Timer().schedule(new TimerTask() { + + public void run() { + unsetMainMessage(); + } + }, _sec * 1000); + } + + /** + * Efface le message principal apres 2 sec. + */ + public void clearMainMessageInTwoSec() { + clearMainMessage(2); + } + + /** + * Ecrit temporairement un message + * @param _msg le message a ecrire + * @param _nbSec le nombre de seconde avant de l'effacer + */ + public void setMainMessageAndClear(String _msg, int _nbSec) { + setMainMessage(_msg); + clearMainMessage(_nbSec); + } + + /** + * @param _msg le message a afficher pendant 2 secondes + */ + public void setMainMessageAndClear(String _msg) { + setMainMessageAndClear(_msg, 2); + } + + /** + * @see org.fudaa.fudaa.commun.FudaaUI#unsetMainMessage() + */ public void unsetMainMessage() { getMainPanel().setMessage(CtuluLib.EMPTY_STRING); getMainPanel().setProgression(0); } + + /** + * @see org.fudaa.fudaa.commun.FudaaUI#setMainProgression(int) + */ public void setMainProgression(int _i) { getMainPanel().setProgression(_i); } + + /** + * @see org.fudaa.fudaa.commun.FudaaUI#unsetMainProgression() + */ public void unsetMainProgression() { getMainPanel().setProgression(0); } + /** + * @see javax.swing.event.InternalFrameListener#internalFrameActivated(javax.swing.event.InternalFrameEvent) + */ + public void internalFrameActivated(InternalFrameEvent _evt) { + super.internalFrameActivated(_evt); + if(cmdListener_!=null) cmdListener_.internalFrameActivated(_evt); + } + + /** + * @see javax.swing.event.InternalFrameListener#internalFrameClosed(javax.swing.event.InternalFrameEvent) + */ + public void internalFrameClosed(InternalFrameEvent _evt) { + super.internalFrameClosed(_evt); + if(cmdListener_!=null) cmdListener_.internalFrameClosed(_evt); + } + + /** + * @see javax.swing.event.InternalFrameListener#internalFrameClosing(javax.swing.event.InternalFrameEvent) + */ + public void internalFrameClosing(InternalFrameEvent _evt) { + super.internalFrameClosing(_evt); + if(cmdListener_!=null) cmdListener_.internalFrameClosing(_evt); + } + + /** + * @see javax.swing.event.InternalFrameListener#internalFrameDeactivated(javax.swing.event.InternalFrameEvent) + */ + public void internalFrameDeactivated(InternalFrameEvent _evt) { + super.internalFrameDeactivated(_evt); + if(cmdListener_!=null) cmdListener_.internalFrameDeactivated(_evt); + } + + /** + * @see javax.swing.event.InternalFrameListener#internalFrameDeiconified(javax.swing.event.InternalFrameEvent) + */ + public void internalFrameDeiconified(InternalFrameEvent _evt) { + super.internalFrameDeiconified(_evt); + if(cmdListener_!=null) cmdListener_.internalFrameDeiconified(_evt); + } + + /** + * @see javax.swing.event.InternalFrameListener#internalFrameIconified(javax.swing.event.InternalFrameEvent) + */ + public void internalFrameIconified(InternalFrameEvent _evt) { + super.internalFrameIconified(_evt); + if(cmdListener_!=null) cmdListener_.internalFrameIconified(_evt); + } + + /** + * @see javax.swing.event.InternalFrameListener#internalFrameOpened(javax.swing.event.InternalFrameEvent) + */ + public void internalFrameOpened(InternalFrameEvent _evt) { + super.internalFrameOpened(_evt); + if(cmdListener_!=null) cmdListener_.internalFrameOpened(_evt); + } + } Index: FudaaLib.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/commun/FudaaLib.java,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** FudaaLib.java 10 Mar 2004 09:13:30 -0000 1.16 --- FudaaLib.java 31 Mar 2004 08:17:51 -0000 1.17 *************** *** 289,319 **** } ! /** ! * ! * @param _fileName le nom de fichier ! * @param _fileFormatList la liste des formats ! * @return le format correspondant au nom de fichier ! */ ! public static FileFormat guessFormat( ! String _fileName, ! List _fileFormatList) { ! if ((_fileName == null) || (_fileFormatList == null)) ! return null; ! int idx= _fileName.indexOf('.'); ! if ((idx > 0) && (idx < _fileName.length())) { ! String ext= _fileName.substring(idx + 1); ! FileFormat temp= null; ! for (int i= _fileFormatList.size() - 1; i >= 0; i--) { ! temp= (FileFormat)_fileFormatList.get(i); ! if (temp.isExtension(ext)) ! return temp; ! } ! } else if ( ! _fileFormatList.contains(SerafinFileFormat.getInstance()) ! && (_fileName.startsWith("geo"))) { ! return SerafinFileFormat.getInstance(); ! } ! return null; ! } } --- 289,293 ---- } ! } |
From: Frederic D. <de...@us...> - 2004-03-31 08:29:38
|
Update of /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/commun/exec In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10634/src/org/fudaa/fudaa/commun/exec Modified Files: FudaaExecPanel.java FudaaExecCellEditor.java Log Message: Maj post Index: FudaaExecCellEditor.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/commun/exec/FudaaExecCellEditor.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** FudaaExecCellEditor.java 12 Dec 2003 10:58:41 -0000 1.4 --- FudaaExecCellEditor.java 31 Mar 2004 08:17:51 -0000 1.5 *************** *** 9,14 **** package org.fudaa.fudaa.commun.exec; import javax.swing.CellEditor; - import javax.swing.ComboBoxModel; import org.fudaa.ebli.tableau.EbliCellDialogEditor; /** --- 9,14 ---- package org.fudaa.fudaa.commun.exec; import javax.swing.CellEditor; + import org.fudaa.ebli.dialog.EbliSimpleDialog; import org.fudaa.ebli.tableau.EbliCellDialogEditor; /** *************** *** 23,27 **** */ public FudaaExecCellEditor() { ! super(new FudaaExecPanel()); } public void setValue(Object o) { --- 23,27 ---- */ public FudaaExecCellEditor() { ! super(new EbliSimpleDialog(new FudaaExecPanel())); } public void setValue(Object o) { Index: FudaaExecPanel.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/commun/exec/FudaaExecPanel.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** FudaaExecPanel.java 12 Mar 2004 10:17:01 -0000 1.8 --- FudaaExecPanel.java 31 Mar 2004 08:17:51 -0000 1.9 *************** *** 17,22 **** import javax.swing.JTextField; - import org.fudaa.ctulu.CtuluLib; - import com.memoire.bu.BuButton; import com.memoire.bu.BuFileChooser; --- 17,20 ---- *************** *** 26,32 **** import com.memoire.fu.FuLib; import org.fudaa.ebli.dialog.EbliSimpleDialogPanel; import org.fudaa.ebli.filechooser.EbliFileChooser; - import org.fudaa.fudaa.ressource.FudaaResource; /** --- 24,31 ---- import com.memoire.fu.FuLib; + import org.fudaa.ctulu.CtuluLib; import org.fudaa.ebli.dialog.EbliSimpleDialogPanel; + import org.fudaa.ebli.filechooser.EbliFavoriteFiles; import org.fudaa.ebli.filechooser.EbliFileChooser; import org.fudaa.fudaa.ressource.FudaaResource; /** *************** *** 63,67 **** bf.setCurrentDirectory(FuLib.getParentFile(new File(iconURL_))); else ! bf.setCurrentDirectory(EbliFileChooser.getLastDir()); bf.setDialogTitle( (fudaaExec_ != null --- 62,66 ---- bf.setCurrentDirectory(FuLib.getParentFile(new File(iconURL_))); else ! bf.setCurrentDirectory(EbliFavoriteFiles.getLastDir()); bf.setDialogTitle( (fudaaExec_ != null |
From: Frederic D. <de...@us...> - 2004-03-31 08:29:38
|
Update of /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/meshviewer In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10634/src/org/fudaa/fudaa/meshviewer Modified Files: MvActLoadDefault.java MvPanelLayer.java MvActCheckDefault.java MvPanelMain.java Added Files: MvPointEditor.java Log Message: Maj post Index: MvActCheckDefault.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/meshviewer/MvActCheckDefault.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** MvActCheckDefault.java 12 Feb 2004 16:15:20 -0000 1.1 --- MvActCheckDefault.java 31 Mar 2004 08:17:50 -0000 1.2 *************** *** 21,24 **** --- 21,25 ---- import org.fudaa.dodico.ef.EfGridSource; + import org.fudaa.ebli.dialog.EbliSimpleDialog; import org.fudaa.ebli.dialog.EbliSimpleDialogPanel; *************** *** 63,67 **** if (descValue.size() > 0) { EbliSimpleDialogPanel d= ! new EbliSimpleDialogPanel(EbliSimpleDialogPanel.OK_OPTION); d.setLayout(new BuBorderLayout()); d.addEmptyBorder(10); --- 64,68 ---- if (descValue.size() > 0) { EbliSimpleDialogPanel d= ! new EbliSimpleDialogPanel(); d.setLayout(new BuBorderLayout()); d.addEmptyBorder(10); *************** *** 76,80 **** new BuScrollPane(new BuTable(values, name)), BuBorderLayout.CENTER); ! d.afficheModale(f_.getParentComponent()); } } --- 77,81 ---- new BuScrollPane(new BuTable(values, name)), BuBorderLayout.CENTER); ! d.afficheModale(f_.getParentComponent(),EbliSimpleDialog.OK_OPTION); } } --- NEW FILE: MvPointEditor.java --- /* * @file MvPointEditor.java * @creation 22 mars 2004 * @modification $Date: 2004/03/31 08:17:50 $ * @license GNU General Public License 2 * @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne * @mail fud...@li... */ package org.fudaa.fudaa.meshviewer; import com.memoire.bu.BuGridLayout; import com.memoire.bu.BuTextField; import org.fudaa.dodico.ef.EfNode; import org.fudaa.ebli.dialog.EbliSimpleDialogPanel; /** * @author Fred Deniger * @version $Id: MvPointEditor.java,v 1.1 2004/03/31 08:17:50 deniger Exp $ */ public class MvPointEditor extends EbliSimpleDialogPanel { BuTextField x_, y_, z_; /** * @param _n le noeud pour initialiser les champs */ public MvPointEditor(EfNode _n) { super(); setLayout(new BuGridLayout(2, 10, 10)); addEmptyBorder(10); x_ = addLabelDoubleText("x: "); y_ = addLabelDoubleText("y: "); z_ = addLabelDoubleText("z: "); x_.setText(Double.toString(_n.getX())); y_.setText(Double.toString(_n.getY())); z_.setText(Double.toString(_n.getZ())); } private double getData(BuTextField f) { return Double.parseDouble(f.getText()); } /** * @return le noeuds modifie */ public EfNode getNode() { return new EfNode(Double.parseDouble(x_.getText()), Double.parseDouble(y_.getText()), Double .parseDouble(z_.getText())); } /** * @return x modifie */ public double getNodeX() { return getData(x_); } /** * @return y modifie */ public double getNodeY() { return getData(y_); } /** * @return z modifie */ public double getNodeZ() { return getData(z_); } } Index: MvPanelLayer.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/meshviewer/MvPanelLayer.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** MvPanelLayer.java 12 Feb 2004 16:15:20 -0000 1.1 --- MvPanelLayer.java 31 Mar 2004 08:17:50 -0000 1.2 *************** *** 155,159 **** _i.setProgression(60); BArbreCalque b= new BArbreCalque(pn_.getArbreCalqueModel()); ! pn_.updateArbreCalque(); b.setRootVisible(false); BuSplit2Pane spRight= new BuSplit2Pane(BuSplit2Pane.VERTICAL); --- 155,159 ---- _i.setProgression(60); BArbreCalque b= new BArbreCalque(pn_.getArbreCalqueModel()); ! b.refresh(); b.setRootVisible(false); BuSplit2Pane spRight= new BuSplit2Pane(BuSplit2Pane.VERTICAL); Index: MvPanelMain.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/meshviewer/MvPanelMain.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** MvPanelMain.java 12 Feb 2004 16:15:20 -0000 1.1 --- MvPanelMain.java 31 Mar 2004 08:17:50 -0000 1.2 *************** *** 17,22 **** import javax.swing.JPanel; - import org.fudaa.ctulu.CtuluLib; - import com.memoire.bu.BuButton; import com.memoire.bu.BuGridLayout; --- 17,20 ---- *************** *** 27,37 **** import com.memoire.bu.BuVerticalLayout; import org.fudaa.dodico.commun.DodicoAnalyze; import org.fudaa.dodico.ef.EfGridSource; import org.fudaa.dodico.ef.EfGridSourceMutable; import org.fudaa.dodico.fichiers.FileOperationSynthese; ! import org.fudaa.ebli.dialog.EbliSimpleDialogPanel; - import org.fudaa.fudaa.meshviewer.controle.MvControlResult; import org.fudaa.fudaa.ressource.FudaaResource; --- 25,35 ---- import com.memoire.bu.BuVerticalLayout; + import org.fudaa.ctulu.CtuluLib; import org.fudaa.dodico.commun.DodicoAnalyze; import org.fudaa.dodico.ef.EfGridSource; import org.fudaa.dodico.ef.EfGridSourceMutable; import org.fudaa.dodico.fichiers.FileOperationSynthese; ! import org.fudaa.ebli.dialog.EbliSimpleDialog; import org.fudaa.ebli.dialog.EbliSimpleDialogPanel; import org.fudaa.fudaa.meshviewer.controle.MvControlResult; import org.fudaa.fudaa.ressource.FudaaResource; *************** *** 149,158 **** txtOuverture.setEditable(false); EbliSimpleDialogPanel pn= ! new EbliSimpleDialogPanel(EbliSimpleDialogPanel.OK_OPTION); pn.addEmptyBorder(10); pn.add(new BuScrollPane(txtOuverture)); pn.afficheModale( this, ! FudaaResource.getS("Messages à l'ouverture du fichier")); } --- 147,156 ---- txtOuverture.setEditable(false); EbliSimpleDialogPanel pn= ! new EbliSimpleDialogPanel(); pn.addEmptyBorder(10); pn.add(new BuScrollPane(txtOuverture)); pn.afficheModale( this, ! FudaaResource.getS("Messages à l'ouverture du fichier"),EbliSimpleDialog.OK_OPTION); } Index: MvActLoadDefault.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/meshviewer/MvActLoadDefault.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** MvActLoadDefault.java 12 Mar 2004 10:17:06 -0000 1.3 --- MvActLoadDefault.java 31 Mar 2004 08:17:50 -0000 1.4 *************** *** 12,16 **** import java.io.File; import java.util.List; - import javax.swing.JTextField; import javax.swing.event.DocumentEvent; --- 12,15 ---- *************** *** 18,28 **** import javax.swing.text.BadLocationException; import javax.swing.text.Document; - import org.fudaa.ctulu.CtuluLib; - import com.memoire.bu.BuComboBox; import com.memoire.bu.BuGridLayout; import com.memoire.bu.BuTaskOperation; - import org.fudaa.dodico.commun.DodicoLib; import org.fudaa.dodico.commun.DodicoPermanentList; --- 17,24 ---- *************** *** 39,45 **** import org.fudaa.dodico.telemac.io.SerafinInterface; import org.fudaa.dodico.trigrid.TrigridFileFormat; - import org.fudaa.ebli.dialog.EbliSimpleDialogPanel; - import org.fudaa.fudaa.commun.FudaaLib; import org.fudaa.fudaa.ressource.FudaaResource; --- 35,39 ---- *************** *** 51,80 **** public class MvActLoadDefault implements MvActLoad { ! public static DodicoPermanentList FT_LIST= ! new DodicoPermanentList( ! DodicoLib.sort( ! new FileFormat[] { ! INPFileFormat.getInstance(), ! DunesFileFormat.getInstance(), ! CorEleBthFileFormat.getInstance(), ! SerafinFileFormat.getInstance(), ! TrigridFileFormat.getInstance()})); ! ! MvParentInterface parent_; /** ! * */ public void load(File _f, final MvControllerSrc _s) { ! File file= _f; ! FileFormat ft= null; if (file == null) { ! EbliSimpleDialogPanel pn= new EbliSimpleDialogPanel(); pn.addEmptyBorder(5); pn.setLayout(new BuGridLayout(1, 5, 5, false, false)); ! final BuComboBox cb= new BuComboBox(FT_LIST.toArray()); ! JTextField f= ! pn.addLabelFileChooserPanel(FudaaResource.getS("Fichier"), null, false); f.getDocument().addDocumentListener(new DocumentListener() { public void insertUpdate(DocumentEvent e) { updateCB(e.getDocument()); --- 45,74 ---- public class MvActLoadDefault implements MvActLoad { ! public static DodicoPermanentList FT_LIST = ! new DodicoPermanentList( ! DodicoLib.sort( ! new FileFormat[] { ! INPFileFormat.getInstance(), ! DunesFileFormat.getInstance(), ! CorEleBthFileFormat.getInstance(), ! SerafinFileFormat.getInstance(), ! TrigridFileFormat.getInstance()})); ! MvParentInterface parent_; /** ! * * */ public void load(File _f, final MvControllerSrc _s) { ! File file = _f; ! FileFormat ft = null; if (file == null) { ! EbliSimpleDialogPanel pn = new EbliSimpleDialogPanel(); pn.addEmptyBorder(5); pn.setLayout(new BuGridLayout(1, 5, 5, false, false)); ! final BuComboBox cb = new BuComboBox(FT_LIST.toArray()); ! JTextField f = ! pn.addLabelFileChooserPanel(FudaaResource.getS("Fichier"), null, false); f.getDocument().addDocumentListener(new DocumentListener() { + public void insertUpdate(DocumentEvent e) { updateCB(e.getDocument()); *************** *** 92,142 **** try { cb.setSelectedItem( ! guessFormat( ! new File(d.getText(0, d.getLength())).getName(), ! FT_LIST)); } catch (BadLocationException e) {} } }); pn.add(cb); ! int i= pn.afficheModale(parent_.getParentComponent()); if (EbliSimpleDialogPanel.isOkResponse(i)) { ! String filename= f.getText(); if (filename != null) { ! file= new File(filename); ! ft= (FileFormat)cb.getSelectedItem(); } } } else { ! ft= guessFormat(file.getName(), FT_LIST); } ! if( (file != null) && (ft!=null)){ loadFileAct( ! _s, ! file, ! (FileFormatGridVersion)ft.getLastVersionInstance()); } } private void loadFileAct( ! final MvControllerSrc _s, ! final File _file, ! final FileFormatGridVersion _v) { if (_file.exists()) { ! MvTask op= new MvTask(parent_) { public void act() { ! FileOperationSynthese s= _v.readGrid(_file, prog_); ! EfGridSource src= (EfGridSource)s.getSource(); if (src != null) { if (_v.getFileFormat().getID() ! == SerafinFileFormat.getInstance().getID()) { ! SerafinInterface i= (SerafinInterface)src; i.getGrid().computeBordFast( ! i.getGrid(), ! i.getPtsFrontiere(), ! prog_); ! } else { src.getGrid().computeBord(prog_); - } } --- 86,135 ---- try { cb.setSelectedItem( ! guessFormat( ! new File(d.getText(0, d.getLength())).getName(), ! FT_LIST)); } catch (BadLocationException e) {} } }); pn.add(cb); ! int i = pn.afficheModale(parent_.getParentComponent()); if (EbliSimpleDialogPanel.isOkResponse(i)) { ! String filename = f.getText(); if (filename != null) { ! file = new File(filename); ! ft = (FileFormat) cb.getSelectedItem(); } } } else { ! ft = guessFormat(file.getName(), FT_LIST); } ! if ((file != null) && (ft != null)) { loadFileAct( ! _s, ! file, ! (FileFormatGridVersion) ft.getLastVersionInstance()); } } private void loadFileAct( ! final MvControllerSrc _s, ! final File _file, ! final FileFormatGridVersion _v) { if (_file.exists()) { ! MvTask op = new MvTask(parent_) { ! public void act() { ! FileOperationSynthese s = _v.readGrid(_file, prog_); ! EfGridSource src = (EfGridSource) s.getSource(); if (src != null) { if (_v.getFileFormat().getID() ! == SerafinFileFormat.getInstance().getID()) { ! SerafinInterface i = (SerafinInterface) src; i.getGrid().computeBordFast( ! i.getGrid(), ! i.getPtsFrontiere(), ! prog_); } else { src.getGrid().computeBord(prog_); } } *************** *** 149,169 **** /** ! * */ public void setParent(MvParentInterface _c) { ! parent_= _c; } /** ! * @param _fileName ! * @param _fileFormatList ! * @return ! * @see FudaaLib#guessFormat(String, List) */ public static FileFormat guessFormat( ! String _fileName, ! List _fileFormatList) { ! return FudaaLib.guessFormat(_fileName,_fileFormatList); } } --- 142,193 ---- /** ! * * */ public void setParent(MvParentInterface _c) { ! parent_ = _c; } + /** ! * @param _fileName le nom de fichier ! * @param _fileFormatList la liste des formats ! * @return le format correspondant au nom de fichier */ public static FileFormat guessFormat( ! String _fileName, ! List _fileFormatList) { ! if ((_fileName == null) || (_fileFormatList == null)) ! return null; ! int idx = _fileName.indexOf('.'); ! if ((idx > 0) && (idx < _fileName.length())) { ! String ext = _fileName.substring(idx + 1); ! FileFormat temp = null; ! for (int i = _fileFormatList.size() - 1; i >= 0; i--) { ! temp = (FileFormat) _fileFormatList.get(i); ! if (temp.isExtension(ext)) ! return temp; ! } ! } else if ( ! _fileFormatList.contains(SerafinFileFormat.getInstance()) ! && (_fileName.startsWith("geo"))) { ! return SerafinFileFormat.getInstance(); ! } ! return null; } + + /** + * @param _fileName le nom du fichier + * @return si le nom s'apparent a un fichier serafin + */ + public static boolean isSerafinFile(String _fileName){ + int idx = _fileName.indexOf('.'); + if ((idx > 0) && (idx < _fileName.length())) { + String ext = _fileName.substring(idx + 1); + return SerafinFileFormat.getInstance().isExtension(ext); + } + if(_fileName.startsWith("geo")) return true; + if(_fileName.startsWith("res")) return true; + return false; + } } |
From: Frederic D. <de...@us...> - 2004-03-31 08:29:38
|
Update of /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/commun/undo In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10634/src/org/fudaa/fudaa/commun/undo Modified Files: FudaaUndoCmdMngListener.java FudaaUndoCmdMngContainer.java FudaaUndoPaneFille.java Log Message: Maj post Index: FudaaUndoCmdMngContainer.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/commun/undo/FudaaUndoCmdMngContainer.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FudaaUndoCmdMngContainer.java 25 Nov 2003 10:13:36 -0000 1.2 --- FudaaUndoCmdMngContainer.java 31 Mar 2004 08:17:50 -0000 1.3 *************** *** 14,18 **** */ public interface FudaaUndoCmdMngContainer { ! public DodicoCommandManager getCmdMng(); public void setActive(boolean _b); } --- 14,19 ---- */ public interface FudaaUndoCmdMngContainer { ! public void clearCmd(DodicoCommandManager _source); public void setActive(boolean _b); + public DodicoCommandManager getCmdMng(); } Index: FudaaUndoPaneFille.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/commun/undo/FudaaUndoPaneFille.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** FudaaUndoPaneFille.java 19 Dec 2003 12:10:55 -0000 1.4 --- FudaaUndoPaneFille.java 31 Mar 2004 08:17:50 -0000 1.5 *************** *** 9,19 **** package org.fudaa.fudaa.commun.undo; import java.awt.Component; ! import java.beans.PropertyVetoException; import javax.swing.Icon; import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; import com.memoire.bu.BuInternalFrame; import com.memoire.bu.BuTabbedPane; import com.memoire.bu.BuUndoRedoInterface; import org.fudaa.dodico.commun.DodicoCommandManager; /** --- 9,21 ---- package org.fudaa.fudaa.commun.undo; import java.awt.Component; ! import javax.swing.Icon; import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; + import com.memoire.bu.BuInternalFrame; import com.memoire.bu.BuTabbedPane; import com.memoire.bu.BuUndoRedoInterface; + import org.fudaa.dodico.commun.DodicoCommandManager; /** *************** *** 23,29 **** public class FudaaUndoPaneFille extends BuInternalFrame ! implements ChangeListener, BuUndoRedoInterface { private BuTabbedPane pane_; ! FudaaUndoCmdMngListener listener; /** * --- 25,31 ---- public class FudaaUndoPaneFille extends BuInternalFrame ! implements ChangeListener, BuUndoRedoInterface,FudaaUndoCmdMngContainer { private BuTabbedPane pane_; ! FudaaUndoCmdMngListener l_; /** * *************** *** 31,36 **** public FudaaUndoPaneFille(FudaaUndoCmdMngListener _l) { pane_= new BuTabbedPane(); - listener= _l; setContentPane(pane_); pane_.getModel().addChangeListener(this); } --- 33,38 ---- public FudaaUndoPaneFille(FudaaUndoCmdMngListener _l) { pane_= new BuTabbedPane(); setContentPane(pane_); + l_=_l; pane_.getModel().addChangeListener(this); } *************** *** 47,56 **** boolean _closable, boolean _maximizable, ! boolean _iconifiable, ! FudaaUndoCmdMngListener _l) { super(_title, _resizable, _closable, _maximizable, _iconifiable); pane_= new BuTabbedPane(); - listener= _l; setContentPane(pane_); pane_.getModel().addChangeListener(this); } --- 49,57 ---- boolean _closable, boolean _maximizable, ! boolean _iconifiable,FudaaUndoCmdMngListener _l) { super(_title, _resizable, _closable, _maximizable, _iconifiable); pane_= new BuTabbedPane(); setContentPane(pane_); + l_=_l; pane_.getModel().addChangeListener(this); } *************** *** 62,67 **** DodicoCommandManager _mng) { pane_.addTab(title, icon, c, tooltip); ! if (_mng != null) ! listener.add(_mng); } public Component getSelectedComponent() { --- 63,68 ---- DodicoCommandManager _mng) { pane_.addTab(title, icon, c, tooltip); ! if(_mng!=null) _mng.setListener(l_); ! } public Component getSelectedComponent() { *************** *** 85,90 **** ((FudaaUndoCmdMngContainer)pane_.getComponent(j)).setActive(false); } ! listener.setActive(selected.getCmdMng(), isSelected); ! selected.setActive(true); } public void redo() { --- 86,90 ---- ((FudaaUndoCmdMngContainer)pane_.getComponent(j)).setActive(false); } ! l_.setActive(selected,true); } public void redo() { *************** *** 103,114 **** } } ! public void setSelected(boolean b) throws PropertyVetoException { ! if (b != isSelected) { ! super.setSelected(b); ! FudaaUndoCmdMngContainer cpt= ! (FudaaUndoCmdMngContainer)pane_.getSelectedComponent(); ! listener.setActive(cpt.getCmdMng(), isSelected); ! cpt.setActive(isSelected); } } } --- 103,133 ---- } } ! ! /** ! * @see org.fudaa.fudaa.commun.undo.FudaaUndoCmdMngContainer#getCmdMng() ! */ ! public DodicoCommandManager getCmdMng() { ! return getActiveCmdMng(); ! } ! ! /** ! * @see org.fudaa.fudaa.commun.undo.FudaaUndoCmdMngContainer#setActive(boolean) ! */ ! public void setActive(boolean _b) { ! ((FudaaUndoCmdMngContainer)pane_.getSelectedComponent()).setActive(_b); ! } ! ! /** ! * @see org.fudaa.fudaa.commun.undo.FudaaUndoCmdMngContainer#clearCmd(org.fudaa.dodico.commun.DodicoCommandManager) ! */ ! public void clearCmd(DodicoCommandManager _source) { ! System.out.println("clear"); ! Component[] c= pane_.getComponents(); ! for (int j= c.length - 1; j >= 0; j--) { ! if(pane_.getComponent(j)!=this) ! ((FudaaUndoCmdMngContainer)pane_.getComponent(j)).clearCmd(_source); } + } + } Index: FudaaUndoCmdMngListener.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/commun/undo/FudaaUndoCmdMngListener.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** FudaaUndoCmdMngListener.java 12 Dec 2003 10:58:42 -0000 1.3 --- FudaaUndoCmdMngListener.java 31 Mar 2004 08:17:50 -0000 1.4 *************** *** 8,80 **** */ package org.fudaa.fudaa.commun.undo; - import java.util.HashSet; - import java.util.Iterator; - import java.util.Set; - - import org.fudaa.ctulu.CtuluLib; import com.memoire.bu.BuCommonImplementation; - import org.fudaa.dodico.commun.DodicoCmdMngListener; import org.fudaa.dodico.commun.DodicoCommandManager; - - import org.fudaa.fudaa.commun.FudaaLib; /** * Class for undoredo manager with concurrent access * @author deniger * @version $Id$ */ ! public class FudaaUndoCmdMngListener implements DodicoCmdMngListener { ! Set cmds_; ! DodicoCommandManager active_; BuCommonImplementation impl_; /** ! * */ public FudaaUndoCmdMngListener(BuCommonImplementation _impl) { ! cmds_= new HashSet(); ! impl_= _impl; } ! public void add(DodicoCommandManager _m) { ! if (_m != null) { ! cmds_.add(_m); ! _m.setListener(this); } } ! public void setActive(DodicoCommandManager _m, boolean b) { ! if ((_m != null) && (cmds_.contains(_m))) { ! if (b && (active_ != _m)) { ! active_= _m; ! impl_.setEnabledForAction("DEFAIRE", active_.canUndo()); ! impl_.setEnabledForAction("REFAIRE", active_.canRedo()); ! if (CtuluLib.DEBUG) ! CtuluLib.debug("setActif undoredo Manager"); ! } else if (!b && (active_ == _m)) { ! active_= null; ! impl_.setEnabledForAction("DEFAIRE", false); ! impl_.setEnabledForAction("REFAIRE", false); ! if (CtuluLib.DEBUG) ! CtuluLib.debug("setUnactif undoredo Manager"); ! } } } /** ! * */ public void undoredoStateChange(DodicoCommandManager _source) { ! if (_source == active_) { ! if (active_ != null) { ! impl_.setEnabledForAction("DEFAIRE", active_.canUndo()); ! impl_.setEnabledForAction("REFAIRE", active_.canRedo()); ! for (Iterator it= cmds_.iterator(); it.hasNext();) { ! DodicoCommandManager cmd= (DodicoCommandManager)it.next(); ! if (cmd != active_) { ! if (CtuluLib.DEBUG) ! CtuluLib.debug("clean undoredo Manager"); ! cmd.clean(); ! } } - } else { - CtuluLib.error("problem with undoredo manager"); } } --- 8,126 ---- */ package org.fudaa.fudaa.commun.undo; + import javax.swing.JInternalFrame; + import javax.swing.event.InternalFrameEvent; + import javax.swing.event.InternalFrameListener; import com.memoire.bu.BuCommonImplementation; import org.fudaa.dodico.commun.DodicoCmdMngListener; import org.fudaa.dodico.commun.DodicoCommandManager; /** * Class for undoredo manager with concurrent access + * * @author deniger * @version $Id$ */ ! public class FudaaUndoCmdMngListener implements DodicoCmdMngListener, InternalFrameListener { ! BuCommonImplementation impl_; + DodicoCommandManager cmdActif_; + /** ! * @param _impl l'impl parent */ public FudaaUndoCmdMngListener(BuCommonImplementation _impl) { ! impl_ = _impl; } ! ! ! /** ! * @see javax.swing.event.InternalFrameListener#internalFrameActivated(javax.swing.event.InternalFrameEvent) ! */ ! public void internalFrameActivated(InternalFrameEvent _e) { ! if (_e.getInternalFrame() instanceof FudaaUndoCmdMngContainer) { ! System.out.println("yes activated"); ! FudaaUndoCmdMngContainer c = (FudaaUndoCmdMngContainer) _e.getInternalFrame(); ! if (c.getCmdMng().getListener() != this) { ! c.getCmdMng().setListener(this); ! } ! setActive(c, true); } } ! ! /** ! * @see javax.swing.event.InternalFrameListener#internalFrameClosed(javax.swing.event.InternalFrameEvent) ! */ ! public void internalFrameClosed(InternalFrameEvent _e) { ! } ! ! /** ! * @see javax.swing.event.InternalFrameListener#internalFrameClosing(javax.swing.event.InternalFrameEvent) ! */ ! public void internalFrameClosing(InternalFrameEvent _e) { ! } ! ! /** ! * @see javax.swing.event.InternalFrameListener#internalFrameDeactivated(javax.swing.event.InternalFrameEvent) ! */ ! public void internalFrameDeactivated(InternalFrameEvent _evt) { ! if (_evt.getInternalFrame() instanceof FudaaUndoCmdMngContainer) { ! FudaaUndoCmdMngContainer c = (FudaaUndoCmdMngContainer) _evt.getInternalFrame(); ! setActive(c, false); } + else setActive(null, false); } + /** ! * @see javax.swing.event.InternalFrameListener#internalFrameDeiconified(javax.swing.event.InternalFrameEvent) ! */ ! public void internalFrameDeiconified(InternalFrameEvent _e) { ! } ! ! /** ! * @see javax.swing.event.InternalFrameListener#internalFrameIconified(javax.swing.event.InternalFrameEvent) ! */ ! public void internalFrameIconified(InternalFrameEvent _e) { ! } ! ! /** ! * @see javax.swing.event.InternalFrameListener#internalFrameOpened(javax.swing.event.InternalFrameEvent) ! */ ! public void internalFrameOpened(InternalFrameEvent _e) { ! } ! ! /** ! * @param _m la manager a activer ! * @param b le nouvel etat ! */ ! public void setActive(FudaaUndoCmdMngContainer _m, boolean b) { ! if (b && (_m != null) && (_m.getCmdMng() != null)) { ! impl_.setEnabledForAction("DEFAIRE", _m.getCmdMng().canUndo()); ! impl_.setEnabledForAction("REFAIRE", _m.getCmdMng().canRedo()); ! } else { ! impl_.setEnabledForAction("DEFAIRE", false); ! impl_.setEnabledForAction("REFAIRE", false); ! } ! if (_m != null) ! _m.setActive(b); ! if(b && (_m!=null)) cmdActif_=_m.getCmdMng(); ! else cmdActif_=null; ! } ! ! ! ! /** ! * @see org.fudaa.dodico.commun.DodicoCmdMngListener#undoredoStateChange(org.fudaa.dodico.commun.DodicoCommandManager) */ public void undoredoStateChange(DodicoCommandManager _source) { ! if(_source!=cmdActif_) return; ! impl_.setEnabledForAction("DEFAIRE", _source.canUndo()); ! impl_.setEnabledForAction("REFAIRE", _source.canRedo()); ! JInternalFrame[] fs = impl_.getAllInternalFrames(); ! if (fs != null) { ! for (int i = fs.length - 1; i >= 0; i--) { ! if (fs[i] instanceof FudaaUndoCmdMngContainer) { ! FudaaUndoCmdMngContainer c = (FudaaUndoCmdMngContainer) fs[i]; ! c.clearCmd(_source); } } } |
From: Frederic D. <de...@us...> - 2004-03-31 08:29:37
|
Update of /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10634/src/org/fudaa/fudaa/test Added Files: TestJFudaaMaillage.java Removed Files: TestJMaillage.java Log Message: Maj post --- TestJMaillage.java DELETED --- --- NEW FILE: TestJFudaaMaillage.java --- /* * @file TestJMaillage.java * @creation 22 mars 2004 * @modification $Date: 2004/03/31 08:17:51 $ * @license GNU General Public License 2 * @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne * @mail fud...@li... */ package org.fudaa.fudaa.test; import junit.framework.TestCase; import org.fudaa.dodico.corba.geometrie.LTypeElement; import org.fudaa.dodico.corba.geometrie.SElement; import org.fudaa.dodico.corba.geometrie.SMaillage; import org.fudaa.dodico.corba.geometrie.SNoeud; import org.fudaa.dodico.corba.geometrie.SPoint; import org.fudaa.ebli.geometrie.GrElement; import org.fudaa.ebli.geometrie.GrMaillageElement; import org.fudaa.ebli.geometrie.GrNoeud; import org.fudaa.fudaa.commun.conversion.FudaaMaillageElement; /** * @author Fred Deniger * @version $Id: TestJFudaaMaillage.java,v 1.1 2004/03/31 08:17:51 deniger Exp $ */ public class TestJFudaaMaillage extends TestCase { /** * Test les conversions structures/objet Gr */ public void testSToGr(){ SMaillage s=new SMaillage(); SNoeud[] nds=new SNoeud[10]; for(int i=nds.length-1;i>=0;i--){ nds[i]=new SNoeud(new SPoint(Math.random()*100,Math.random()*100,Math.random()*100)); } SElement[] elts=new SElement[15]; for(int i=elts.length-1;i>=0;i--){ elts[i]=new SElement(); elts[i].type=LTypeElement.T3; elts[i].noeudsIdx=new int[3]; for(int j=2;j>=0;j--){ int t=(int)Math.random()*nds.length; if(t<0) t=0; if(t>9) t=9; elts[i].noeudsIdx[j]=t; } } s.noeuds=nds; s.elements=elts; GrMaillageElement m=FudaaMaillageElement.s2Gr(s); assertNotNull(m); GrNoeud[] grNds=m.noeuds(); GrElement[] grElt=m.elements(); assertNotNull(grNds); assertEquals(grNds.length,nds.length); assertEquals(grElt.length,elts.length); for(int i=grNds.length-1;i>=0;i--){ internTest(grNds[i],nds[i]); } for(int i=grElt.length-1;i>=0;i--){ internTest(nds,grElt[i],elts[i]); } SMaillage newM=FudaaMaillageElement.gr2S(m); assertNotNull(newM); assertEquals(newM.noeuds.length,s.noeuds.length); assertEquals(newM.elements.length,s.elements.length); for(int i=newM.noeuds.length-1;i>=0;i--){ internTest(newM.noeuds[i],s.noeuds[i]); } for(int i=newM.elements.length-1;i>=0;i--){ internTest(newM.elements[i],s.elements[i]); } } /** * Test l'equivalence entre un snoeud et un grnoeud. * @param _n le grNoeud a tester * @param _s le SNoeud a tester */ public void internTest(GrNoeud _n,SNoeud _s){ assertEquals(_n.point.x,_s.point.x,1e-15); assertEquals(_n.point.y,_s.point.y,1e-15); assertEquals(_n.point.z,_s.point.z,1e-15); } /** * Test l'egalite entre 2 Snoeuds * @param _n le SNoeud a tester * @param _s le SNoeud a tester */ public void internTest(SNoeud _n,SNoeud _s){ assertEquals(_n.point.x,_s.point.x,1e-15); assertEquals(_n.point.y,_s.point.y,1e-15); assertEquals(_n.point.z,_s.point.z,1e-15); } /** * Test l'equivalence entre un selement et un grelement. * @param _listNds liste des snoeuds * @param _n le grelement a tester * @param _s la structure a tester */ public void internTest(SNoeud[] _listNds,GrElement _n,SElement _s){ assertEquals(_n.noeuds.length,_s.noeudsIdx.length); for(int i=_n.noeuds.length-1;i>=0;i--){ internTest(_n.noeuds[i],_listNds[_s.noeudsIdx[i]]); } } public void internTest(SElement _n,SElement _s){ assertEquals(_n.noeudsIdx.length,_s.noeudsIdx.length); assertEquals(_n.type,_s.type); for(int i=_n.noeudsIdx.length-1;i>=0;i--){ assertEquals(_n.noeudsIdx[i],_s.noeudsIdx[i]); } } } |
From: Frederic D. <de...@us...> - 2004-03-31 08:29:36
|
Update of /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/commun/calcul In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10634/src/org/fudaa/fudaa/commun/calcul Modified Files: FudaaCalculOp.java Log Message: Maj post Index: FudaaCalculOp.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/commun/calcul/FudaaCalculOp.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** FudaaCalculOp.java 12 Mar 2004 10:17:06 -0000 1.8 --- FudaaCalculOp.java 31 Mar 2004 08:17:50 -0000 1.9 *************** *** 36,48 **** --- 36,60 ---- boolean stop_; Process p_; + /** + * @param _exe l'exe a lancer + */ public FudaaCalculOp(CalculExec _exe) { exe_= _exe; } + /** + * @return le nom du process + */ protected String getTaskName() { return FudaaResource.getS("Calcul"); } + /** + * @param _impl l'impl parent + */ public void setImpl(FudaaUI _impl) { impl_= _impl; } + /** + * @see org.fudaa.dodico.calcul.CalculLauncher#execute() + */ public void execute() { new BuTaskOperation(null, getTaskName()) { *************** *** 56,59 **** --- 68,76 ---- .start(); } + /** + * Methode appele pour sauvegarder le fichier du calcul + * @param _inter la barre de progression + * @return le fichier parametres + */ public abstract File proceedParamFile(ProgressionInterface _inter); protected void setEtat(String _msg, int _p) { |
From: Frederic D. <de...@us...> - 2004-03-31 08:29:16
|
Update of /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/post In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10612/src/org/fudaa/fudaa/tr/post Log Message: Directory /cvsroot/fudaa/fudaa_devel/fudaa/src/org/fudaa/fudaa/tr/post added to the repository |
From: Frederic D. <de...@us...> - 2004-03-31 08:27:48
|
Update of /cvsroot/fudaa/fudaa_devel/ebli/src/org/fudaa/ebli/calque In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10281/src/org/fudaa/ebli/calque Modified Files: ZEbliCalquesPanel.java BArbreCalque.java BArbreCalqueModel.java EbliFilleCalques.java ZEbliFilleCalques.java BCalqueLegende.java EbliFilleCalquesInterface.java Log Message: Correction design Index: ZEbliFilleCalques.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/ebli/src/org/fudaa/ebli/calque/ZEbliFilleCalques.java,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** ZEbliFilleCalques.java 12 Feb 2004 15:58:51 -0000 1.21 --- ZEbliFilleCalques.java 31 Mar 2004 08:15:43 -0000 1.22 *************** *** 8,48 **** */ package org.fudaa.ebli.calque; - import java.awt.Color; import java.awt.Component; - import java.awt.Cursor; import java.awt.Dimension; - import java.awt.Font; import java.awt.Graphics; - import java.awt.Graphics2D; - import java.awt.Rectangle; - import java.awt.Shape; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.print.PageFormat; - import java.awt.print.Printable; - import java.beans.PropertyChangeEvent; - import java.beans.PropertyChangeListener; - import java.text.DecimalFormat; import java.util.ArrayList; - import java.util.Arrays; import javax.swing.Action; - import javax.swing.ActionMap; import javax.swing.BorderFactory; import javax.swing.DefaultCellEditor; import javax.swing.Icon; - import javax.swing.InputMap; - import javax.swing.JColorChooser; import javax.swing.JComponent; import javax.swing.JDesktopPane; - import javax.swing.JLabel; import javax.swing.JMenu; import javax.swing.JTable; import javax.swing.JViewport; - import javax.swing.KeyStroke; import javax.swing.event.InternalFrameEvent; import javax.swing.event.TableModelListener; - import javax.swing.event.TreeSelectionEvent; - import javax.swing.event.TreeSelectionListener; import javax.swing.table.TableCellRenderer; import javax.swing.table.TableColumn; --- 8,30 ---- *************** *** 50,55 **** import javax.swing.tree.TreeSelectionModel; - import org.fudaa.ctulu.CtuluLib; - import com.memoire.bu.BuBorderLayout; import com.memoire.bu.BuCheckBox; --- 32,35 ---- *************** *** 58,83 **** import com.memoire.bu.BuInformationsDocument; import com.memoire.bu.BuLabel; - import com.memoire.bu.BuLib; import com.memoire.bu.BuMenu; - import com.memoire.bu.BuPanel; import com.memoire.bu.BuPopupMenu; import com.memoire.bu.BuScrollPane; - import com.memoire.bu.BuSeparator; import com.memoire.bu.BuTable; import org.fudaa.ebli.calque.action.EbliActionInterface; - import org.fudaa.ebli.calque.action.EbliChangeStateAction; import org.fudaa.ebli.calque.action.EbliComponentFactory; import org.fudaa.ebli.calque.action.EbliPaletteAction; - import org.fudaa.ebli.calque.action.EbliSimpleAction; import org.fudaa.ebli.commun.EbliPreferences; import org.fudaa.ebli.dialog.EbliSimpleDialogPanel; - import org.fudaa.ebli.geometrie.GrBoite; import org.fudaa.ebli.impression.EbliFilleImprimable; - import org.fudaa.ebli.impression.EbliPrinter; - import org.fudaa.ebli.palette.BSelecteurReduitFonteNewVersion; - import org.fudaa.ebli.palette.BSelecteurReduitPaletteCouleur; - import org.fudaa.ebli.repere.BControleNavigation; - import org.fudaa.ebli.repere.BControleRepereTexte; import org.fudaa.ebli.ressource.EbliResource; /** --- 38,53 ---- import com.memoire.bu.BuInformationsDocument; import com.memoire.bu.BuLabel; import com.memoire.bu.BuMenu; import com.memoire.bu.BuPopupMenu; import com.memoire.bu.BuScrollPane; import com.memoire.bu.BuTable; import org.fudaa.ebli.calque.action.EbliActionInterface; import org.fudaa.ebli.calque.action.EbliComponentFactory; import org.fudaa.ebli.calque.action.EbliPaletteAction; import org.fudaa.ebli.commun.EbliPreferences; + import org.fudaa.ebli.dialog.EbliSimpleDialog; import org.fudaa.ebli.dialog.EbliSimpleDialogPanel; import org.fudaa.ebli.impression.EbliFilleImprimable; import org.fudaa.ebli.ressource.EbliResource; /** *************** *** 104,108 **** * seront construits. * @param _vc la vue calque associee - * @param _arbre le model 'arbre associe */ public ZEbliFilleCalques(BCalque _vc) { --- 74,77 ---- *************** *** 118,123 **** /** * @param _vc la vue calque associee - * @param _arbre l'arbre associe - * @param _groupSelection si true ce groupe sera construit. idem pour les * autres * @param _appli l'appli associee --- 87,90 ---- *************** *** 134,137 **** --- 101,105 ---- this(_vc, _appli, _id, false, true, true); } + public ZEbliFilleCalques( boolean _groupSelection, *************** *** 262,268 **** */ public void setSelected(boolean b) throws java.beans.PropertyVetoException { - if (b) { - pn_.updateArbreCalque(); - } super.setSelected(b); } --- 230,233 ---- *************** *** 292,304 **** if (specificToolsPrefView_ == null) { specificToolsPrefView_= new ViewPreferences(); - specificToolsPrefView_.setTitle(EbliResource.getS("Affichage")); } else specificToolsPrefView_.init(); ! specificToolsPrefView_.affiche(this); } /** * @return SpecificMenus */ - protected JMenu[] mnSpecifics_= null; public JMenu[] getSpecificMenus() { if (mnSpecifics_ == null) { --- 257,270 ---- if (specificToolsPrefView_ == null) { specificToolsPrefView_= new ViewPreferences(); } else specificToolsPrefView_.init(); ! EbliSimpleDialog p=new EbliSimpleDialog(specificToolsPrefView_); ! p.setTitle(EbliResource.getS("Affichage")); ! specificToolsPrefView_.afficheModale(this); } + protected JMenu[] mnSpecifics_= null; /** * @return SpecificMenus */ public JMenu[] getSpecificMenus() { if (mnSpecifics_ == null) { *************** *** 336,340 **** _dest.add(null); for (int i= 0; i < n; i++) { ! if (isPreferencesVisible(_r[i])) { _dest.add(_r[i].buildToolButton(EbliComponentFactory.INSTANCE)); if ((_bu != null) && (_r[i] instanceof EbliPaletteAction)) { --- 302,307 ---- _dest.add(null); for (int i= 0; i < n; i++) { ! if(_r[i]==null) _dest.add(null); ! else if (isPreferencesVisible(_r[i])) { _dest.add(_r[i].buildToolButton(EbliComponentFactory.INSTANCE)); if ((_bu != null) && (_r[i] instanceof EbliPaletteAction)) { *************** *** 342,345 **** --- 309,313 ---- } } + } } *************** *** 367,370 **** --- 335,339 ---- buildToolButtonFor(pn_.navigationActionGroup_, l, buJ, true); buildToolButtonFor(pn_.standardActionGroup_, l, buJ, true); + buildToolButtonFor(pn_.specificTools_, l, buJ, true); specificTools_= new JComponent[l.size()]; l.toArray(specificTools_); *************** *** 486,490 **** protected GroupModel model_; ViewPreferences() { ! super(EbliSimpleDialogPanel.OK_CANCEL_APPLY_OPTION); this.setLayout(new BuBorderLayout()); this.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10)); --- 455,459 ---- protected GroupModel model_; ViewPreferences() { ! super(); this.setLayout(new BuBorderLayout()); this.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10)); *************** *** 667,669 **** --- 636,646 ---- return null; } + /** + * @see java.lang.Object#finalize() + */ + protected void finalize() throws Throwable { + super.finalize(); + System.out.println("finalize"); + } + } Index: BCalqueLegende.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/ebli/src/org/fudaa/ebli/calque/BCalqueLegende.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** BCalqueLegende.java 25 Nov 2003 10:06:37 -0000 1.5 --- BCalqueLegende.java 31 Mar 2004 08:15:43 -0000 1.6 *************** *** 8,40 **** */ package org.fudaa.ebli.calque; ! import com.memoire.bu.*; ! import org.fudaa.ebli.palette.*; import org.fudaa.ebli.ressource.EbliResource; - import java.awt.*; - import java.util.*; - import javax.swing.*; - import javax.swing.border.*; /** [...1055 lines suppressed...] + } + /** * Recalcul de la hauteur du cadre */ /* ! * private void updateTaille(Graphics _g) { FontMetrics fm=_g.getFontMetrics(); int ! * totalHeight=inter_; int totalWidth=0; int textWidth=0; int textHeight=fm.getHeight(); for(int ! * i=0; i <icones_.length; i++) { if( i <textes_.length ) textWidth=fm.stringWidth(textes_[i]); ! * else textWidth=fm.stringWidth(defaultText); totalHeight+=Math.max(icones_[i].getIconHeight(), ! * textHeight)+inter_; totalWidth=Math.max(totalWidth, ! * icones_[i].getIconWidth()+inter_+textWidth); } inter_; taille_.width=Math.max(taille_.width, ! * totalWidth); taille_.height=Math.max(taille_.height, totalHeight); } ! */ } + class ParamsPanel { + // public String title; public Color bg; Index: BArbreCalque.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/ebli/src/org/fudaa/ebli/calque/BArbreCalque.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** BArbreCalque.java 11 Dec 2003 12:41:51 -0000 1.8 --- BArbreCalque.java 31 Mar 2004 08:15:43 -0000 1.9 *************** *** 8,36 **** */ package org.fudaa.ebli.calque; ! import com.memoire.bu.*; ! import org.fudaa.ebli.commun.EbliLib; ! import org.fudaa.ebli.geometrie.*; ! import org.fudaa.ebli.palette.*; ! //import org.fudaa.ebli.repere.*; ! import org.fudaa.ebli.ressource.*; ! import javax.swing.*; ! import javax.swing.border.*; [...1132 lines suppressed...] + public JMenuItem addMenuItem( ! String _s, ! String _cmd, ! BuIcon _icon, ! boolean _enabled) { ! JMenuItem r = new JMenuItem(); r.setName("mi" + _cmd); r.setActionCommand(_cmd); *************** *** 636,639 **** } /** ! * Modele de donnees pour l'arbre de calques. ! */ --- 735,738 ---- } /** ! * Modele de donnees pour l'arbre de calques. ! */ Index: BArbreCalqueModel.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/ebli/src/org/fudaa/ebli/calque/BArbreCalqueModel.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** BArbreCalqueModel.java 12 Feb 2004 15:58:50 -0000 1.5 --- BArbreCalqueModel.java 31 Mar 2004 08:15:43 -0000 1.6 *************** *** 10,22 **** import java.awt.event.ActionEvent; import java.awt.event.ActionListener; - import java.awt.event.ComponentListener; import java.awt.event.ContainerEvent; import java.awt.event.ContainerListener; - import java.awt.event.HierarchyEvent; - import java.awt.event.HierarchyListener; import java.beans.PropertyChangeEvent; import java.beans.PropertyChangeListener; import java.util.ArrayList; import java.util.Iterator; import javax.swing.JMenuItem; import javax.swing.event.TreeModelEvent; --- 10,20 ---- import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.ContainerEvent; import java.awt.event.ContainerListener; import java.beans.PropertyChangeEvent; import java.beans.PropertyChangeListener; import java.util.ArrayList; import java.util.Iterator; + import javax.swing.JMenuItem; import javax.swing.event.TreeModelEvent; *************** *** 27,33 **** --- 25,33 ---- import javax.swing.tree.TreePath; import javax.swing.tree.TreeSelectionModel; + import com.memoire.bu.BuMenu; import com.memoire.bu.BuPopupMenu; import com.memoire.bu.BuResource; + import org.fudaa.ebli.ressource.EbliResource; /** *************** *** 58,62 **** return p == null ? null : (BCalque)p.getLastPathComponent(); } ! public final void setCalque(BCalque _cq) { if (_cq != calque_) { if ((calque_ != null) && (calque_.isGroupeCalque())) { --- 58,62 ---- return p == null ? null : (BCalque)p.getLastPathComponent(); } ! private final void setCalque(BCalque _cq) { if (_cq != calque_) { if ((calque_ != null) && (calque_.isGroupeCalque())) { Index: EbliFilleCalques.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/ebli/src/org/fudaa/ebli/calque/EbliFilleCalques.java,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** EbliFilleCalques.java 12 Mar 2004 10:17:42 -0000 1.12 --- EbliFilleCalques.java 31 Mar 2004 08:15:43 -0000 1.13 *************** *** 328,340 **** pack(); } - public void setSelected(boolean b) throws java.beans.PropertyVetoException { - if (b && (arbreModel_.getRootCalque() != vc_.getCalque())) { - arbreModel_.setCalque(vc_.getCalque()); - arbreModel_.refresh(); - // if( pbRepere.getDesktop()==null ) - // pbRepere.setDesktop((BuDesktop)getDesktopPane()); - } - super.setSelected(b); - } /** * Methode pour vider programmatiquement la selection. --- 328,331 ---- Index: EbliFilleCalquesInterface.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/ebli/src/org/fudaa/ebli/calque/EbliFilleCalquesInterface.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** EbliFilleCalquesInterface.java 25 Nov 2003 10:06:37 -0000 1.2 --- EbliFilleCalquesInterface.java 31 Mar 2004 08:15:43 -0000 1.3 *************** *** 13,16 **** --- 13,19 ---- */ public interface EbliFilleCalquesInterface { + /** + * @return le model pour l'arbre calque + */ public BArbreCalqueModel getArbreCalqueModel(); } Index: ZEbliCalquesPanel.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/ebli/src/org/fudaa/ebli/calque/ZEbliCalquesPanel.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ZEbliCalquesPanel.java 12 Feb 2004 15:58:51 -0000 1.1 --- ZEbliCalquesPanel.java 31 Mar 2004 08:15:43 -0000 1.2 *************** *** 38,46 **** import javax.swing.event.TreeSelectionListener; - import org.fudaa.ctulu.CtuluLib; - import com.memoire.bu.BuBorderLayout; - import com.memoire.bu.BuCommonInterface; - import com.memoire.bu.BuInformationsDocument; import com.memoire.bu.BuLabel; import com.memoire.bu.BuLib; --- 38,42 ---- *************** *** 49,60 **** import com.memoire.bu.BuPopupMenu; import com.memoire.bu.BuSeparator; - import com.memoire.bu.BuTabbedPane; import org.fudaa.ebli.calque.action.EbliActionInterface; import org.fudaa.ebli.calque.action.EbliChangeStateAction; import org.fudaa.ebli.calque.action.EbliComponentFactory; import org.fudaa.ebli.calque.action.EbliPaletteAction; - import org.fudaa.ebli.calque.action.EbliSimpleAction; import org.fudaa.ebli.calque.action.EbliShowPanelAction; import org.fudaa.ebli.geometrie.GrBoite; import org.fudaa.ebli.impression.EbliPrinter; --- 45,56 ---- import com.memoire.bu.BuPopupMenu; import com.memoire.bu.BuSeparator; + import org.fudaa.ctulu.CtuluLib; import org.fudaa.ebli.calque.action.EbliActionInterface; import org.fudaa.ebli.calque.action.EbliChangeStateAction; import org.fudaa.ebli.calque.action.EbliComponentFactory; import org.fudaa.ebli.calque.action.EbliPaletteAction; import org.fudaa.ebli.calque.action.EbliShowPanelAction; + import org.fudaa.ebli.calque.action.EbliSimpleAction; import org.fudaa.ebli.geometrie.GrBoite; import org.fudaa.ebli.impression.EbliPrinter; *************** *** 106,110 **** protected BGroupeCalque gcDonnees_; /* Variable stockant les specifics tools*/ ! protected JComponent[] specificTools_; protected BuLabel mode_; private boolean customize_; --- 102,106 ---- protected BGroupeCalque gcDonnees_; /* Variable stockant les specifics tools*/ ! protected EbliActionInterface[] specificTools_; protected BuLabel mode_; private boolean customize_; *************** *** 117,121 **** * seront construits. * @param _vc la vue calque associee - * @param _arbre le model 'arbre associe */ public ZEbliCalquesPanel(BCalque _vc) { --- 113,116 ---- *************** *** 347,351 **** gcDonnees_.detruire(calques[i]); } ! gcDonnees_.add(_c); modelArbre_.refresh(); } --- 342,348 ---- gcDonnees_.detruire(calques[i]); } ! if(_c!=null){ ! gcDonnees_.add(_c); ! } modelArbre_.refresh(); } *************** *** 577,586 **** } - public void updateArbreCalque() { - if (modelArbre_.getRootCalque() != gcDonnees_) { - modelArbre_.setCalque(gcDonnees_); - modelArbre_.refresh(); - } - } void setCalqueInteractionActif(BCalqueInteraction _b) { if (cqInteractionActif_ == _b) { --- 574,577 ---- *************** *** 812,816 **** ZCalqueAffichageDonneesInterface z= (ZCalqueAffichageDonneesInterface)cqActif_; ! if (z.modeleDonnees().getNombre() != 0) { enable= true; } --- 803,807 ---- ZCalqueAffichageDonneesInterface z= (ZCalqueAffichageDonneesInterface)cqActif_; ! if ((z.modeleDonnees()!=null) && (z.modeleDonnees().getNombre() != 0) ){ enable= true; } |
From: Frederic D. <de...@us...> - 2004-03-31 08:27:35
|
Update of /cvsroot/fudaa/fudaa_devel/ebli/src/org/fudaa/ebli/dialog In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10281/src/org/fudaa/ebli/dialog Modified Files: EbliSimpleDialogPanel.java EbliSimpleDialog.java EnhancedDialog.java Log Message: Correction design Index: EbliSimpleDialog.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/ebli/src/org/fudaa/ebli/dialog/EbliSimpleDialog.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** EbliSimpleDialog.java 25 Nov 2003 10:06:41 -0000 1.8 --- EbliSimpleDialog.java 31 Mar 2004 08:15:43 -0000 1.9 *************** *** 8,15 **** --- 8,31 ---- */ package org.fudaa.ebli.dialog; + + import java.awt.Component; import java.awt.Dialog; + import java.awt.Dimension; + import java.awt.FlowLayout; import java.awt.Frame; + import java.awt.Toolkit; + import java.awt.event.ActionEvent; + import java.awt.event.ActionListener; + import java.awt.event.KeyEvent; import java.awt.event.WindowEvent; import java.awt.event.WindowListener; + import javax.swing.BorderFactory; + import javax.swing.JButton; + import javax.swing.JDialog; + import javax.swing.JOptionPane; + import com.memoire.bu.BuBorderLayout; + import com.memoire.bu.BuButton; + import com.memoire.bu.BuPanel; + import org.fudaa.ebli.ressource.EbliResource; /** * @author deniger *************** *** 17,76 **** */ public class EbliSimpleDialog ! extends EnhancedDialog ! implements WindowListener { ! EbliSimpleDialogPanel dial_; ! public EbliSimpleDialog(Frame parent, EbliSimpleDialogPanel _dial) { ! super(parent); ! init(_dial); ! } public EbliSimpleDialog(Dialog _c, EbliSimpleDialogPanel _dial) { super(_c); init(_dial); } public EbliSimpleDialog(EbliSimpleDialogPanel _dial) { super(); init(_dial); } private void init(EbliSimpleDialogPanel _dial) { ! dial_= _dial; ! setTitle(_dial.getTitle()); addWindowListener(this); } ! public void ok() { ! dial_.actionOK(); } public void cancel() { dial_.actionCancel(); } /** ! * */ public void windowActivated(WindowEvent e) {} /** ! * */ public void windowClosed(WindowEvent e) { ! if (dial_.isResponseUndefinied()) ! dial_.cancel(); } /** ! * */ public void windowClosing(WindowEvent e) {} /** ! * */ public void windowDeactivated(WindowEvent e) {} /** ! * */ public void windowDeiconified(WindowEvent e) {} /** ! * */ public void windowIconified(WindowEvent e) {} /** ! * */ public void windowOpened(WindowEvent e) {} } --- 33,273 ---- */ public class EbliSimpleDialog ! extends EnhancedDialog ! implements WindowListener, ActionListener { ! ! public static final int CANCEL_OPTION = 4; ! public static final int OK_APPLY_OPTION = 2; ! public static final int OK_CANCEL_APPLY_OPTION = 3; ! public static final int OK_CANCEL_OPTION = 1; ! ! /** ! * Option : uniquement un bouton ok sera affiche. Reponse donnee par le dialogue si le bouton ! * "ok" utilise. ! */ ! public static final int OK_OPTION = 0; ! EbliSimpleDialogPanel dial_; ! int option_; ! int response_; ! public EbliSimpleDialog(Dialog _c, EbliSimpleDialogPanel _dial) { super(_c); init(_dial); } + + public void setValue(Object o){ + dial_.setValue(o); + } + + public Object getValue(){ + return dial_.getValue(); + } + public EbliSimpleDialog(EbliSimpleDialogPanel _dial) { super(); init(_dial); } + + public EbliSimpleDialog(Frame parent, EbliSimpleDialogPanel _dial) { + super(parent); + init(_dial); + } + + /** + * Affiche le dialogue et le positionne par rapport a <code>_parent</code>. + */ + public int afficheDialogModal() { + setModal(true); + afficheDialog(); + return response_; + } + + public void afficheDialog() { + setContentPane(construitDialogPanel()); + pack(); + Dimension dialogSize = getSize(); + Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); + boolean set = false; + if (dialogSize.width > screenSize.width * 3 / 4) { + dialogSize.width = screenSize.width * 3 / 4; + set = true; + } + if (dialogSize.height > screenSize.height * 3 / 4) { + set = true; + dialogSize.height = screenSize.height * 3 / 4; + } + if (set) + setSize(dialogSize); + setLocation( + (screenSize.width - dialogSize.width) / 2, + (screenSize.height - dialogSize.height) / 2); + show(); + } + + private JButton construireApply() { + JButton bt = construireBuButton(EbliResource.getS("Appliquer"), "APPLY"); + bt.setMnemonic(KeyEvent.VK_A); + return bt; + } + + /** + * Construit le panel de la boite de dialogue. + */ + private BuPanel construitDialogPanel() { + BuPanel princ = new BuPanel(); + princ.setLayout(new BuBorderLayout()); + /* if (isoft_ != null) { + princ.add(getInfosPanel(isoft_), BuBorderLayout.WEST); + }*/ + princ.add(dial_.getError(), BuBorderLayout.NORTH); + princ.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5)); + princ.add(dial_, BuBorderLayout.CENTER); + BuPanel pnAction = new BuPanel(); + pnAction.setLayout(new FlowLayout(FlowLayout.RIGHT, 5, 0)); + pnAction.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5)); + switch (option_) { + case OK_CANCEL_APPLY_OPTION: + pnAction.add(construireOk()); + pnAction.add(construireApply()); + pnAction.add(construireCancel()); + break; + case OK_CANCEL_OPTION: + pnAction.add(construireOk()); + pnAction.add(construireCancel()); + break; + case OK_OPTION: + pnAction.add(construireOk()); + break; + case OK_APPLY_OPTION: + pnAction.add(construireOk()); + pnAction.add(construireApply()); + break; + case CANCEL_OPTION: + pnAction.add(construireCancel()); + break; + } + princ.add(pnAction, BuBorderLayout.SOUTH); + princ.doLayout(); + return princ; + } + private void init(EbliSimpleDialogPanel _dial) { ! dial_ = _dial; addWindowListener(this); + setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); + response_ = JOptionPane.DEFAULT_OPTION; + option_ = JOptionPane.OK_CANCEL_OPTION; } ! ! /** ! * Construit un bouton ayant comme label <code>_text</code> et comme "ActionCommand" <code>_action</code>. ! */ ! protected JButton construireBuButton(String _text, String _action) { ! BuButton r = new BuButton(_text); ! r.setActionCommand(_action); ! r.addActionListener(this); ! return r; ! } ! ! protected JButton construireCancel() { ! JButton bt = construireBuButton(EbliResource.getS("Annuler"), "CANCEL"); ! bt.setMnemonic(KeyEvent.VK_N); ! return bt; ! } ! ! protected JButton construireOk() { ! JButton bt = construireBuButton(EbliResource.getS("Continuer"), "OK"); ! bt.setMnemonic(KeyEvent.VK_C); ! return bt; ! } ! ! ! /** ! * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent) ! */ ! public void actionPerformed(ActionEvent _e) { ! String com = _e.getActionCommand(); ! if ("OK".equals(com)) { ! ok(); ! } else if ("CANCEL".equals(com)) { ! cancel(); ! } else if ("APPLY".equals(com)) { ! apply(); ! } ! } ! ! public void apply() { ! dial_.apply(); } + public void cancel() { + response_ = JOptionPane.CANCEL_OPTION; dial_.actionCancel(); + dispose(); } + /** ! * Renvoie true si la reponse est egale a JOptionPane.DEFAULT_OPTION. Cela veut dire que ! * l'utilisateur n'a pas valide ou annule son choix. ! */ ! public boolean isResponseUndefinied() { ! return response_ == JOptionPane.DEFAULT_OPTION; ! } ! ! public void ok() { ! response_ = JOptionPane.OK_OPTION; ! dial_.actionOK(); ! dispose(); ! } ! ! /** ! * * */ public void windowActivated(WindowEvent e) {} + /** ! * * */ public void windowClosed(WindowEvent e) { ! if (isResponseUndefinied()) ! dial_.actionCancel(); } + /** ! * * */ public void windowClosing(WindowEvent e) {} + /** ! * * */ public void windowDeactivated(WindowEvent e) {} + /** ! * * */ public void windowDeiconified(WindowEvent e) {} + /** ! * * */ public void windowIconified(WindowEvent e) {} + /** ! * * */ public void windowOpened(WindowEvent e) {} + + /** + * @return Returns the option. + */ + public int getOption() { + return option_; + } + + /** + * @param _option The option to set. + */ + public void setOption(int _option) { + option_ = _option; + } } Index: EbliSimpleDialogPanel.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/ebli/src/org/fudaa/ebli/dialog/EbliSimpleDialogPanel.java,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** EbliSimpleDialogPanel.java 12 Feb 2004 15:58:52 -0000 1.14 --- EbliSimpleDialogPanel.java 31 Mar 2004 08:15:43 -0000 1.15 *************** *** 8,11 **** --- 8,12 ---- */ package org.fudaa.ebli.dialog; + import java.awt.Color; import java.awt.Component; *************** *** 16,20 **** import java.awt.Font; import java.awt.Frame; [...1305 lines suppressed...] + public boolean valide() { + return true; + } + public void windowActivated(WindowEvent e) {} + public void windowClosed(WindowEvent e) {} + public void windowClosing(WindowEvent e) { actionCancel(); } + public void windowDeactivated(WindowEvent e) {} + public void windowDeiconified(WindowEvent e) {} + public void windowIconified(WindowEvent e) {} + public void windowOpened(WindowEvent e) {} } Index: EnhancedDialog.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/ebli/src/org/fudaa/ebli/dialog/EnhancedDialog.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** EnhancedDialog.java 25 Nov 2003 10:06:41 -0000 1.3 --- EnhancedDialog.java 31 Mar 2004 08:15:43 -0000 1.4 *************** *** 43,52 **** } private void init() { ! ((Container)getLayeredPane()).addContainerListener(new ContainerHandler()); getContentPane().addContainerListener(new ContainerHandler()); keyHandler= new KeyHandler(); addKeyListener(keyHandler); addWindowListener(new WindowHandler()); ! setDefaultCloseOperation(DO_NOTHING_ON_CLOSE); } public void ok() {} --- 43,52 ---- } private void init() { ! /* ((Container)getLayeredPane()).addContainerListener(new ContainerHandler()); getContentPane().addContainerListener(new ContainerHandler()); keyHandler= new KeyHandler(); addKeyListener(keyHandler); addWindowListener(new WindowHandler()); ! setDefaultCloseOperation(DO_NOTHING_ON_CLOSE);*/ } public void ok() {} *************** *** 89,93 **** if (evt.isConsumed()) return; ! if (evt.getKeyCode() == KeyEvent.VK_ENTER) { // crusty workaround Component comp= getFocusOwner(); --- 89,93 ---- if (evt.isConsumed()) return; ! /* if (evt.getKeyCode() == KeyEvent.VK_ENTER) { // crusty workaround Component comp= getFocusOwner(); *************** *** 106,110 **** ok(); evt.consume(); ! } else if (evt.getKeyCode() == KeyEvent.VK_ESCAPE) { cancel(); evt.consume(); --- 106,110 ---- ok(); evt.consume(); ! } else*/ if (evt.getKeyCode() == KeyEvent.VK_ESCAPE) { cancel(); evt.consume(); |
From: Frederic D. <de...@us...> - 2004-03-31 08:27:33
|
Update of /cvsroot/fudaa/fudaa_devel/ebli/src/org/fudaa/ebli/filechooser In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10281/src/org/fudaa/ebli/filechooser Modified Files: EbliFavoriteFiles.java EbliFileChooser.java Log Message: Correction design Index: EbliFavoriteFiles.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/ebli/src/org/fudaa/ebli/filechooser/EbliFavoriteFiles.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** EbliFavoriteFiles.java 10 Mar 2004 09:10:03 -0000 1.3 --- EbliFavoriteFiles.java 31 Mar 2004 08:15:43 -0000 1.4 *************** *** 31,34 **** --- 31,36 ---- import com.memoire.bu.BuResource; import com.memoire.bu.BuToolButton; + import com.memoire.fu.FuLib; + import org.fudaa.ctulu.CtuluLib; import org.fudaa.ebli.dialog.EbliSimpleDialogPanel; *************** *** 73,76 **** --- 75,95 ---- loadFavorites(); } + + /** + * @return le dernier dossier visite selon la pref PREF_LAST + */ + public static File getLastDir() { + return new File(getLastDirPath()); + } + + /** + * @return le dernier dossier visite selon la pref PREF_LAST + */ + public static String getLastDirPath() { + return + BuPreferences.BU.getStringProperty( + EbliFavoriteFiles.PREF_LAST, + FuLib.getUserHome()); + } /** *************** *** 177,180 **** --- 196,201 ---- addElement(obj); } + + /** Index: EbliFileChooser.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/ebli/src/org/fudaa/ebli/filechooser/EbliFileChooser.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** EbliFileChooser.java 19 Mar 2004 17:40:13 -0000 1.2 --- EbliFileChooser.java 31 Mar 2004 08:15:43 -0000 1.3 *************** *** 11,17 **** import java.awt.Dimension; import java.awt.Frame; - import java.awt.Point; import java.awt.Toolkit; - import java.io.File; import javax.swing.BorderFactory; --- 11,15 ---- *************** *** 24,28 **** import com.memoire.bu.BuPanel; import com.memoire.bu.BuPreferences; - import com.memoire.fu.FuLib; /** * @author deniger --- 22,25 ---- *************** *** 37,53 **** /** * Si _lastDir, le fileChooser est ouvert dans le dernier repertoire ouvert. */ public EbliFileChooser(boolean _lastDir) { super(); response_= BuFileChooser.ERROR_OPTION; ! if (_lastDir) ! setCurrentDirectory(getLastDir()); ! } ! public static File getLastDir() { ! return new File( ! BuPreferences.BU.getStringProperty( ! EbliFavoriteFiles.PREF_LAST, ! FuLib.getUserHome())); } public static void main(String[] args) { JFrame f= new JFrame(); --- 34,48 ---- /** * Si _lastDir, le fileChooser est ouvert dans le dernier repertoire ouvert. + * @param _lastDir si true le rep courant est le dernier rep ouvert */ public EbliFileChooser(boolean _lastDir) { super(); response_= BuFileChooser.ERROR_OPTION; ! if (_lastDir){ ! setCurrentDirectory(EbliFavoriteFiles.getLastDir()); ! } ! } + public static void main(String[] args) { JFrame f= new JFrame(); |
From: Frederic D. <de...@us...> - 2004-03-31 08:27:32
|
Update of /cvsroot/fudaa/fudaa_devel/ebli/src/org/fudaa/ebli/tableau In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10281/src/org/fudaa/ebli/tableau Modified Files: EbliCellDialogEditor.java Log Message: Correction design Index: EbliCellDialogEditor.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/ebli/src/org/fudaa/ebli/tableau/EbliCellDialogEditor.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** EbliCellDialogEditor.java 19 Dec 2003 12:06:42 -0000 1.2 --- EbliCellDialogEditor.java 31 Mar 2004 08:15:44 -0000 1.3 *************** *** 8,28 **** */ package org.fudaa.ebli.tableau; ! import java.awt.Component; ! import java.awt.event.ActionEvent; ! import java.awt.event.ActionListener; ! import java.awt.event.MouseEvent; ! import java.awt.event.MouseListener; ! import java.util.EventObject; ! import javax.swing.DefaultCellEditor; ! import javax.swing.JButton; ! import javax.swing.JOptionPane; ! import javax.swing.JTable; ! import javax.swing.SwingUtilities; ! import javax.swing.UIManager; ! import javax.swing.event.CellEditorListener; ! import javax.swing.event.ChangeEvent; ! import javax.swing.table.DefaultTableCellRenderer; ! import javax.swing.table.TableCellEditor; ! import com.memoire.bu.BuButton; import org.fudaa.ebli.dialog.EbliSimpleDialogPanel; /** --- 8,12 ---- */ package org.fudaa.ebli.tableau; ! import org.fudaa.ebli.dialog.EbliSimpleDialog; import org.fudaa.ebli.dialog.EbliSimpleDialogPanel; /** *************** *** 32,41 **** public class EbliCellDialogEditor extends EbliCellButtonEditor{ ! protected EbliSimpleDialogPanel dialog_; ! public EbliCellDialogEditor(EbliSimpleDialogPanel _dialog) { this(_dialog, null); } public EbliCellDialogEditor( ! EbliSimpleDialogPanel _dialog, EbliCellDecorator _deco) { super(_deco); --- 16,25 ---- public class EbliCellDialogEditor extends EbliCellButtonEditor{ ! protected EbliSimpleDialog dialog_; ! public EbliCellDialogEditor(EbliSimpleDialog _dialog) { this(_dialog, null); } public EbliCellDialogEditor( ! EbliSimpleDialog _dialog, EbliCellDecorator _deco) { super(_deco); *************** *** 46,50 **** dialog_.setValue(value_); dialog_.doLayout(); ! int r= dialog_.afficheModale(this); if (EbliSimpleDialogPanel.isOkResponse(r)) { value_= dialog_.getValue(); --- 30,34 ---- dialog_.setValue(value_); dialog_.doLayout(); ! int r= dialog_.afficheDialogModal(); if (EbliSimpleDialogPanel.isOkResponse(r)) { value_= dialog_.getValue(); *************** *** 58,61 **** --- 42,49 ---- } } + + public EbliSimpleDialog getDialog(){ + return dialog_; + } } |
From: Frederic D. <de...@us...> - 2004-03-31 08:27:03
|
Update of /cvsroot/fudaa/fudaa_devel/ctulu/src/org/fudaa/ctulu In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10256/src/org/fudaa/ctulu Modified Files: CtuluLib.java Log Message: Maj doc Index: CtuluLib.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/ctulu/src/org/fudaa/ctulu/CtuluLib.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** CtuluLib.java 10 Mar 2004 09:25:54 -0000 1.3 --- CtuluLib.java 31 Mar 2004 08:15:17 -0000 1.4 *************** *** 9,12 **** --- 9,15 ---- package org.fudaa.ctulu; + import gnu.trove.TObjectDoubleHashMap; + import gnu.trove.TObjectDoubleIterator; + import java.io.File; import java.io.IOException; *************** *** 375,377 **** --- 378,429 ---- return "fr".equals(Locale.getDefault().getLanguage()); } + + /** + * @param _init le tableau a copier + * @return le tableau copie + */ + public static String[] copy(String[] _init) { + if (_init == null) + return null; + String[] r= new String[_init.length]; + System.arraycopy(_init, 0, r, 0, _init.length); + return r; + } + + /** + * @param _init le tableau a copier + * @return le tableau copie + */ + public static double[] copy(double[] _init) { + if (_init == null) + return null; + double[] r= new double[_init.length]; + System.arraycopy(_init, 0, r, 0, _init.length); + return r; + } + /** + * @param _m le table a copier + * @return la table copiee + */ + public static TObjectDoubleHashMap copy(TObjectDoubleHashMap _m){ + TObjectDoubleHashMap r=new TObjectDoubleHashMap(_m); + TObjectDoubleIterator it=_m.iterator(); + for(int i=_m.size();i-->0;){ + it.advance(); + r.put(it.key(),it.value()); + } + return r; + } + + /** + * @param _name le nom du fichier sans point + * @param _ext l'extension du fichier sans point + * @return _name+"."+_ext + */ + public static String getFileName(String _name,String _ext){ + StringBuffer r=new StringBuffer(_name.length()+_ext.length()+1); + return r.append(_name).append(".").append(_ext).toString(); + + } + } |