|
From: Frederic D. <de...@us...> - 2004-06-01 11:23:37
|
Update of /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/commun In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22883/src/org/fudaa/dodico/commun Modified Files: DodicoCommandManager.java DodicoCommandComposite.java dodico_en.fr_txt Log Message: Index: DodicoCommandComposite.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/commun/DodicoCommandComposite.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** DodicoCommandComposite.java 11 Dec 2003 12:41:26 -0000 1.4 --- DodicoCommandComposite.java 1 Jun 2004 11:23:26 -0000 1.5 *************** *** 1,11 **** /* ! * @file DodicoCommandComposite.java ! * @creation 21 oct. 2003 ! * @modification $Date$ ! * @license GNU General Public License 2 ! * @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne ! * @mail de...@fu... */ package org.fudaa.dodico.commun; import java.util.ArrayList; import java.util.Iterator; --- 1,9 ---- /* ! * @file DodicoCommandComposite.java @creation 21 oct. 2003 @modification $Date$ ! * @license GNU General Public License 2 @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 ! * Compiegne @mail de...@fu... */ package org.fudaa.dodico.commun; + import java.util.ArrayList; import java.util.Iterator; *************** *** 16,20 **** --- 14,20 ---- */ public class DodicoCommandComposite implements DodicoCommand { + private List command_; + /** * *************** *** 23,33 **** super(); } public boolean isEmpty() { return ((command_ == null) || (command_.size() == 0)); } public boolean addCmd(DodicoCommand _cmd) { if (_cmd != null) { ! if (command_ == null) ! command_= new ArrayList(10); command_.add(_cmd); return true; --- 23,45 ---- super(); } + public boolean isEmpty() { return ((command_ == null) || (command_.size() == 0)); } + + /** + * @return la commande simplifiee + */ + public DodicoCommand getSimplify() { + int n = getNbCmd(); + if (n == 0) return null; + else if (n == 1) return (DodicoCommand) command_.get(0); + else return this; + + } + public boolean addCmd(DodicoCommand _cmd) { if (_cmd != null) { ! if (command_ == null) command_ = new ArrayList(10); command_.add(_cmd); return true; *************** *** 35,38 **** --- 47,51 ---- return false; } + public void removeCmd(DodicoCommand _cmd) { if ((command_ != null) && (_cmd != null)) { *************** *** 40,46 **** --- 53,61 ---- } } + public int getNbCmd() { return command_ == null ? 0 : command_.size(); } + /** * *************** *** 48,56 **** public void undo() { if (command_ != null) { ! for (int i= command_.size() - 1; i >= 0; i--) { ! ((DodicoCommand)command_.get(i)).undo(); } } } /** * --- 63,73 ---- public void undo() { if (command_ != null) { ! int n = command_.size(); ! for (int i = 0; i < n; i++) { ! ((DodicoCommand) command_.get(i)).undo(); } } } + /** * *************** *** 58,65 **** public void redo() { if (command_ != null) { ! for (Iterator it= command_.iterator(); it.hasNext();) { ! ((DodicoCommand)it.next()).redo(); } } } ! } --- 75,83 ---- public void redo() { if (command_ != null) { ! int n = command_.size(); ! for (int i = 0; i < n; i++) { ! ((DodicoCommand) command_.get(i)).redo(); } } } ! } \ No newline at end of file Index: DodicoCommandManager.java =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/commun/DodicoCommandManager.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** DodicoCommandManager.java 31 Mar 2004 08:14:32 -0000 1.4 --- DodicoCommandManager.java 1 Jun 2004 11:23:26 -0000 1.5 *************** *** 31,34 **** --- 31,35 ---- public void setListener(DodicoCmdMngListener _l) { if ((_l != null) && (_l != listener_)) { + if(listener_!=null) new Throwable().printStackTrace(); listener_= _l; } Index: dodico_en.fr_txt =================================================================== RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/commun/dodico_en.fr_txt,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** dodico_en.fr_txt 31 Mar 2004 08:14:32 -0000 1.10 --- dodico_en.fr_txt 1 Jun 2004 11:23:26 -0000 1.11 *************** *** 92,96 **** Eléments surcontraints=Overstressed elements Recherche valable uniquement pour les triangles=Search available only in the case of triangle ! Triangle surcontraint\: triangle dont dont les 3 extrémités appartiennent à une frontière=Overstressed triangle\: triangle which 3 extremities belonging to a frontier Recherche des éléments surcontraints=Search for overstressed elements Recherche des éléments dont l'aire est inférieure à {0}=Search for elements wich area is less than {0} --- 92,96 ---- Eléments surcontraints=Overstressed elements Recherche valable uniquement pour les triangles=Search available only in the case of triangle ! Triangle surcontraint\= triangle dont les 3 extrémités appartiennent à une frontière=Overstressed triangle\= triangle which 3 extremities belonging to a frontier Recherche des éléments surcontraints=Search for overstressed elements Recherche des éléments dont l'aire est inférieure à {0}=Search for elements wich area is less than {0} |