You can subscribe to this list here.
2008 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(46) |
Jul
(37) |
Aug
(154) |
Sep
(140) |
Oct
(132) |
Nov
(104) |
Dec
(67) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2009 |
Jan
(113) |
Feb
(73) |
Mar
(102) |
Apr
(106) |
May
(114) |
Jun
(67) |
Jul
(116) |
Aug
(48) |
Sep
(108) |
Oct
(296) |
Nov
(56) |
Dec
(53) |
2010 |
Jan
(95) |
Feb
(31) |
Mar
(40) |
Apr
(12) |
May
(10) |
Jun
(27) |
Jul
(19) |
Aug
(81) |
Sep
(48) |
Oct
(45) |
Nov
(40) |
Dec
(7) |
2011 |
Jan
(16) |
Feb
(32) |
Mar
(55) |
Apr
(38) |
May
(24) |
Jun
(37) |
Jul
(12) |
Aug
(16) |
Sep
(97) |
Oct
(90) |
Nov
(101) |
Dec
(89) |
2012 |
Jan
(18) |
Feb
(2) |
Mar
(54) |
Apr
(69) |
May
(97) |
Jun
(131) |
Jul
(70) |
Aug
(48) |
Sep
(48) |
Oct
(119) |
Nov
(194) |
Dec
(60) |
2013 |
Jan
(73) |
Feb
(35) |
Mar
(42) |
Apr
(28) |
May
(7) |
Jun
(17) |
Jul
(27) |
Aug
(10) |
Sep
(38) |
Oct
(12) |
Nov
(4) |
Dec
(16) |
2014 |
Jan
(33) |
Feb
(37) |
Mar
(19) |
Apr
(3) |
May
(47) |
Jun
(26) |
Jul
(22) |
Aug
|
Sep
(10) |
Oct
(30) |
Nov
(24) |
Dec
(19) |
2015 |
Jan
(13) |
Feb
(16) |
Mar
(36) |
Apr
(19) |
May
(5) |
Jun
(5) |
Jul
(3) |
Aug
(11) |
Sep
(22) |
Oct
(7) |
Nov
(14) |
Dec
|
2016 |
Jan
|
Feb
(26) |
Mar
(13) |
Apr
(61) |
May
|
Jun
|
Jul
(4) |
Aug
|
Sep
|
Oct
(27) |
Nov
(14) |
Dec
(21) |
2017 |
Jan
(30) |
Feb
(4) |
Mar
(3) |
Apr
(5) |
May
(69) |
Jun
(29) |
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <emm...@us...> - 2008-12-17 17:44:56
|
Revision: 4305 http://fudaa.svn.sourceforge.net/fudaa/?rev=4305&view=rev Author: emmanuel_martin Date: 2008-12-17 17:44:49 +0000 (Wed, 17 Dec 2008) Log Message: ----------- modeleur1d : tous les points d'un profil sont d?\195?\169pla?\195?\167ables. Test unitaire couvrant DataGeometryAdapter. quelques autres modifications mineures. Modified Paths: -------------- branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/modeleur1d/Controller1d.java branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/modeleur1d/DataGeometry.java branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/modeleur1d/DataGeometryAdapter.java branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/modeleur1d/VueCourbe.java branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/modeleur1d/VueTableau.java Added Paths: ----------- branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/modeleur1d/DataGeometryException.java branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/test/testModeleur1d/ branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/test/testModeleur1d/TestDataGeometryAdapter.java Modified: branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/modeleur1d/Controller1d.java =================================================================== --- branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/modeleur1d/Controller1d.java 2008-12-15 16:28:55 UTC (rev 4304) +++ branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/modeleur1d/Controller1d.java 2008-12-17 17:44:49 UTC (rev 4305) @@ -69,20 +69,27 @@ private EbliFormatterInterface formater_=new EbliFormatter(); public Controller1d(MdlImplementation _appli, MdlFille1d _frame1d){ + if(_appli==null||_frame1d==null) + throw new IllegalArgumentException("Les param\xE8tres ne doivent pas \xEAtre null."); appli_=_appli; frame1d_=_frame1d; frame1d_.addInternalFrameListener(this); vueBief_=new VueBief(appli_, this); vueBief_.getScene().addSelectionListener(this); treeModel_=vueBief_.getArbreCalqueModel(); - dataGeomAdapter_=new DataGeometryAdapter(this, null, -1); + try { + dataGeomAdapter_=new DataGeometryAdapter(null, -1); + } + catch (DataGeometryException _exc) { + _exc.printStackTrace(); + } vueTableau_=new VueTableau(this, dataGeomAdapter_); vueTableau_.addSelectionListener(this); vueCourbe_=new VueCourbe(this, dataGeomAdapter_); vueCourbe_.addSelectionListener(this); vueError_=new BuLabel(); vueError_.setForeground(Color.RED); - vueError_.setText(""); + clearError(); } public VueBief getVueBief(){ @@ -105,11 +112,13 @@ // Gestion de l'affichage des erreurs. \\ public void showError(String _message){ + if(_message==null||_message.length()==0) + clearError(); vueError_.setText(_message); } public void clearError(){ - vueError_.setText(null); + vueError_.setText(" "); } // Gestion de l'arbre \\ @@ -184,8 +193,8 @@ int sceneIdSelected=scene.getSelectionHelper().getUniqueSelectedIdx(); boolean ok=true; // Indique si tout s'est bien pass\xE9. if (sceneIdSelected==-1) - // Aucune selection - dataGeomAdapter_.setData(null, -1); + try {dataGeomAdapter_.setData(null, -1);} + catch (DataGeometryException _exc) {_exc.printStackTrace();} else { int idSelected=scene.sceneId2LayerId(sceneIdSelected); // Extraction des diff\xE9rentes informations n\xE9c\xE9ssaires au changement de @@ -198,8 +207,8 @@ try { dataGeomAdapter_.setData(zone, idSelected); } - catch (IllegalArgumentException _exp) { - showError(_exp.getMessage()); + catch (DataGeometryException _exc) { + showError(_exc.getMessage()); } } else Modified: branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/modeleur1d/DataGeometry.java =================================================================== --- branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/modeleur1d/DataGeometry.java 2008-12-15 16:28:55 UTC (rev 4304) +++ branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/modeleur1d/DataGeometry.java 2008-12-17 17:44:49 UTC (rev 4305) @@ -12,7 +12,7 @@ * widgets tableau et courbe. * * @author Emmanuel MARTIN - * @version $Id:$ + * @version $Id$ */ public interface DataGeometry { @@ -43,15 +43,24 @@ /** Retourne la valeur minimal de z. */ public double getZMin(); - /** Enregistre l'abcisse curviligne du point indiqu\xE9 en param\xE8tre. */ - public void setCurv(int _idxPoint, double _value); + /** + * Enregistre l'abcisse curviligne du point indiqu\xE9 en param\xE8tre. + * Ce changement d'abscisse curviligne fonctionne sur tout les points. + * Si un points extr\xE9mit\xE9 est chang\xE9, le point 2D est d\xE9plac\xE9 sur son axe, + * la longueur globale n'est pas concerv\xE9e dans l'op\xE9ration. + * Si c'est un point de rupture le point 2D est d\xE9plac\xE9 de telle mani\xE8re + * que la longueur globale soit concerv\xE9e. + * Pour les autres points, le point 2D est d\xE9plac\xE9 sur son axe en concervant + * la longeur globale. + */ + public void setCurv(int _idxPoint, double _value) throws DataGeometryException; /** Enregistre la valeur de z du point indiqu\xE9 en param\xE8tre. */ public void setZ(int _idxPoint, double _value); /** Enregistre l'abcisse curviligne et la valeur de z du point indiqu\xE9 en param\xE8tre. */ - public void setValues(int _idxPoint, double _valueCurv, double _valueZ); + public void setValues(int _idxPoint, double _valueCurv, double _valueZ) throws DataGeometryException; /** Supprime le point indiqu\xE9 en param\xE8tre. */ - public void remove(int _idxPoint); + public void remove(int _idxPoint) throws DataGeometryException; } Modified: branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/modeleur1d/DataGeometryAdapter.java =================================================================== --- branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/modeleur1d/DataGeometryAdapter.java 2008-12-15 16:28:55 UTC (rev 4304) +++ branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/modeleur1d/DataGeometryAdapter.java 2008-12-17 17:44:49 UTC (rev 4305) @@ -10,15 +10,18 @@ import java.util.ArrayList; import java.util.List; +import org.fudaa.ctulu.CtuluListSelection; import org.fudaa.ctulu.collection.CtuluCollection; import org.fudaa.ctulu.gis.GISCoordinateSequenceContainerInterface; import org.fudaa.ctulu.gis.GISGeometryFactory; +import org.fudaa.ctulu.gis.GISPolyligne; import org.fudaa.ctulu.gis.GISZoneCollection; import org.fudaa.ctulu.gis.GISZoneCollectionLigneBrisee; import org.fudaa.fudaa.commun.FudaaLib; import com.vividsolutions.jts.geom.Coordinate; import com.vividsolutions.jts.geom.CoordinateSequence; +import com.vividsolutions.jts.geom.Geometry; /** * Cette classe permet d'adapter une GISZoneCollection en un model manipulable @@ -28,9 +31,8 @@ * @author Emmanuel MARTIN * @version $Id$ */ -class DataGeometryAdapter implements DataGeometry { - /** Le controller, pour afficher des messages d'erreur. */ - private Controller1d controller_; +public class DataGeometryAdapter implements DataGeometry { + private GISZoneCollectionLigneBrisee zone_; private int idxGeom_; private CtuluCollection z_; @@ -43,10 +45,7 @@ int idxRupture1_; int idxRupture2_; - public DataGeometryAdapter(Controller1d _controller, GISZoneCollectionLigneBrisee _zone, int _idxGeom) throws IllegalArgumentException { - if(_controller==null) - throw new IllegalArgumentException("Controller1d ne doit pas \xEAtre null."); - controller_=_controller; + public DataGeometryAdapter(GISZoneCollectionLigneBrisee _zone, int _idxGeom) throws IllegalArgumentException, DataGeometryException { setData(_zone, _idxGeom); } @@ -58,8 +57,9 @@ * * @param _zone la zone contenant la g\xE9om\xE9trie * @param _idxGeom l'indice de la g\xE9om\xE9trie dans _zone + * @throws DataGeometryException */ - public void setData(GISZoneCollectionLigneBrisee _zone, int _idxGeom) throws IllegalArgumentException { + public void setData(GISZoneCollectionLigneBrisee _zone, int _idxGeom) throws IllegalArgumentException, DataGeometryException { if (_zone==null&&_idxGeom==-1) { zone_=null; idxGeom_=-1; @@ -75,11 +75,11 @@ CoordinateSequence seq=((GISCoordinateSequenceContainerInterface)zone_.getGeometry(idxGeom_)).getCoordinateSequence(); // Verifie qu'on a bien au minimum deux points. \\ if (seq.size()<2) - throw new IllegalArgumentException(FudaaLib.getS("Le profil doit avoir au minimum deux points.")); + throw new DataGeometryException(FudaaLib.getS("Le profil doit avoir au minimum deux points.")); // Verifie que deux points cons\xE9cutifs ne sont pas confondus. \\ for (int i=1; i<seq.size(); i++) if (seq.getX(i-1)==seq.getX(i)&&seq.getY(i-1)==seq.getY(i)) - throw new IllegalArgumentException(FudaaLib.getS("Au moins deux points dans le profil sont confondus.")); + throw new DataGeometryException(FudaaLib.getS("Au moins deux points dans le profil sont confondus.")); // Calcul des acbscisses curvilignes => hypoth\xE8se d'ordonnancement // correcte des points \\ double curvPre=0; @@ -99,6 +99,23 @@ else if (val<(Double)z_.getObjectValueAt(idxZMin_)) idxZMin_=i; } + + // Verifie que le profil donn\xE9 ne poss\xE8de pas des axes qui se coupent entre eux \\ + for(int i=1;i<seq.size();i++){ + Geometry mainAxe=GISGeometryFactory.INSTANCE.createLineString(new Coordinate[]{seq.getCoordinate(i-1), seq.getCoordinate(i)}); + boolean ok=true; + // Un seul point d'intersection avec l'axe qui suit + if(i+1<seq.size()&&mainAxe.intersection(GISGeometryFactory.INSTANCE.createLineString(new Coordinate[]{seq.getCoordinate(i), seq.getCoordinate(i+1)})).getNumPoints()>1) + ok=false; + // Aucun point d'intersectin avec les axes qui suivent + int j=i; + while(ok&&++j+1<seq.size()) + ok=!mainAxe.intersects(GISGeometryFactory.INSTANCE.createLineString(new Coordinate[]{seq.getCoordinate(j), seq.getCoordinate(j+1)})); + // Traitement d'une \xE9ventuelle intersection + if(!ok) + throw new DataGeometryException(FudaaLib.getS("Le profil se coupe lui m\xEAme. Il n'est donc pas valide.")); + } + // / D\xE9termination des points de ruptures et verification qu'il y en a // au maximun deux. \\\ idxRupture1_=-1; @@ -144,14 +161,14 @@ else if (idxRupture2_==-1) idxRupture2_=idx-1; else - throw new IllegalArgumentException(FudaaLib.getS("Il y a plus que deux ruptures dans le profil.")); + throw new DataGeometryException(FudaaLib.getS("Il y a plus que deux ruptures dans le profil.")); } // Pr\xE9paration de l'it\xE9ration suivante coefDirecteur=newCoefDirecteur; coefDirX=newCoefDirX; } } - catch(IllegalArgumentException _exp) { + catch(DataGeometryException _exp) { // Remise dans un \xE9tat coh\xE9rent zone_=null; idxGeom_=-1; @@ -184,105 +201,293 @@ } public double getCurv(int _idxPoint) { - if(curv_==null) - return 0; - else - return curv_.get(_idxPoint); + if(curv_==null||_idxPoint<0||_idxPoint>=curv_.size()) + throw new IllegalArgumentException("Cet index n'existe pas."); + return curv_.get(_idxPoint); } public double getZ(int _idxPoint) { - if (z_==null) - return 0; - else - return ((Double)z_.getObjectValueAt(_idxPoint)).doubleValue(); + if (z_==null||_idxPoint<0||_idxPoint>=z_.getSize()) + throw new IllegalArgumentException("Cet index n'existe pas."); + return ((Double)z_.getObjectValueAt(_idxPoint)).doubleValue(); } - - public void setCurv(int _idxPoint, double _value) { - controller_.clearError(); - if(curv_==null) - return; + + public void setCurv(int _idxPoint, double _value) throws DataGeometryException { + if(curv_==null||_idxPoint<0||_idxPoint>=curv_.size()) // Si curv_!=null alors z et index_ ont des valeurs coh\xE9rentes + throw new IllegalArgumentException("Cet index n'existe pas."); + // Extraction des coordonn\xE9es de la g\xE9om\xE9trie pour pouvoir les modifier par la suite CoordinateSequence seq=((GISCoordinateSequenceContainerInterface)zone_.getGeometry(idxGeom_)).getCoordinateSequence(); Coordinate[] coords=seq.toCoordinateArray(); - if(_idxPoint==0||_idxPoint==seq.size()-1){ - controller_.showError(FudaaLib.getS("Le changement d'abscisse curviligne des extr\xE9mit\xE9s n'est pas g\xE9r\xE9 pour l'instant.")); - return; + // Les nouvelles valeurs du points \xE0 d\xE9placer + double newX; + double newY; + // Delta pour savoir si des doubles sont \xE9gaux + double tolerance=0.000001; + + // Verifie que le point reste encadr\xE9 par le(s) m\xEAme(s) point(s) + if((_idxPoint==0&&_value>=curv_.get(1))||(_idxPoint==seq.size()-1&&_value<=curv_.get(seq.size()-2))||(_idxPoint!=0&&_idxPoint!=seq.size()-1&&(_value<=curv_.get(_idxPoint-1)||_value>=curv_.get(_idxPoint+1)))) + throw new DataGeometryException(FudaaLib.getS("Il est interdit de d\xE9placer un point au dela des points l'encadrant.")); + + // Cas o\xF9 l'index n'est pas sur un point de rupture \\ + if (_idxPoint!=idxRupture1_&&_idxPoint!=idxRupture2_) { + // Le point reste encadr\xE9 par les deux m\xEAme points => le signe de xa-xb et + // de ya-yb ne change pas + // D\xE9termination des deux index \xE0 utiliser + int idx1; + int idx2; + double valCurv; + if (_idxPoint>0) { // Le premier point n'est pas selectionn\xE9 + idx1=_idxPoint-1; + idx2=_idxPoint; + valCurv=_value-curv_.get(idx1); + } + else { + idx1=_idxPoint+1; + idx2=_idxPoint; + valCurv=Math.abs(_value-curv_.get(idx1)); + } + // Calcul des nouvelles coordonn\xE9es + if (Math.abs(seq.getX(idx2)-seq.getX(idx1))>tolerance) { + // Extraction du signe de xa-xb + double sign=Math.signum(seq.getX(idx2)-seq.getX(idx1)); + double coefDirecteur=(seq.getY(idx2)-seq.getY(idx1))/(seq.getX(idx2)-seq.getX(idx1)); + newX=seq.getX(idx1)+sign*valCurv/Math.sqrt(1+coefDirecteur*coefDirecteur); + newY=seq.getY(idx1)+coefDirecteur*(newX-seq.getX(idx1)); + } + else { // Cas du bout de profil vertical + // Extraction du signe de ya-yb + double sign=Math.signum(seq.getY(idx2)-seq.getY(idx1)); + newX=seq.getX(idx1); + newY=seq.getY(idx1)+sign*valCurv; + } + coords[_idxPoint].x=newX; + coords[_idxPoint].y=newY; + // Mise a jour de la table des valeurs curvilignes + if (_idxPoint==0) + for (int i=1; i<curv_.size(); i++) + curv_.set(i, curv_.get(i)-_value); + else + curv_.set(_idxPoint, _value); } - if(_value<0) - return; - // Cas o\xF9 l'index n'est pas sur un point de rupture \\ - if(_idxPoint!=idxRupture1_&&_idxPoint!=idxRupture2_){ - // Cas o\xF9 le point reste encadr\xE9 par les deux m\xEAme points (noralement toujours le cas) => le signe de xa-xb et de ya-yb ne change pas - if((_idxPoint==0||_value>curv_.get(_idxPoint-1))&&(_idxPoint==curv_.size()-1||_value<curv_.get(_idxPoint+1))){ - // D\xE9termination des deux index \xE0 utiliser - int idx1; - int idx2; - double valCurv; - if(_idxPoint>0){ // On a pas selectionn\xE9 le premier point - idx1=_idxPoint-1; - idx2=_idxPoint; - valCurv=_value-curv_.get(idx1); + + // Cas complexe : l'index est sur un point de rupture \\ + else { + /* + * Abstract : + * Pour trouver le point restectant la concervation de labcisse curviligne, est + * utilis\xE9 par la suite une m\xE9thode d'intersection de deux cercles. + * - Soient A, B, C, trois points non confondus. Soit la polyligne A, C, B. + * On veut construire C' tq cruv(C')=c et que curv(B) reste constant. + * Donc : + * dist(AC)+dist(CB)=dist(AC')+dist(C'B) + * Ce probl\xE8me peut se r\xE9duire \xE0 la recherche de l'intersection de deux cercles : + * C1=cercle(centre=A, rayon=c-curv(A)) avec C2=cercle(centre=B, rayon=curv(B)-c) + * + * Cas 1 : ya-yb != 0: + * La r\xE9solution de ce probl\xE8me donne l'\xE9quation : + * x\xB2[M\xB2+1] + x[2yaM-2NM-2xa] + xa\xB2+ya\xB2+N\xB2-rayonC1\xB2-2yaN=0 + * avec N=(rayonC2\xB2-rayonC1\xB2-xb\xB2+xa\xB2-yb\xB2+ya\xB2)/(2(ya-yb)) + * et M=(xa-xb)/(ya-yb) + * C'est une \xE9quation du second degr\xE9. + * Pour la r\xE9solution de l'\xE9quation, nous nommerons : + * equA=[M\xB2+1] + * equB=[2yaM-2NM-2xa] + * equC=xa\xB2+ya\xB2+N\xB2-rayonC1\xB2-2yaN + * La r\xE9solution de l'\xE9quation r\xE9sultante donne deux solutions (c1' et c2'). + * Pour trouver celle qui nous interesse (si elle existe) la contrainte suivante doit \xEAtre v\xE9rifi\xE9e : + * vecteurNorm\xE9(C, Proj(C, AB)) = vecteurNorm\xE9(CX', Proj(CX', AB)) + * A noter que Proj(C1', AB)=Proj(C2', AB) de plus pour simplifier cette r\xE9solution sera faite sur z=0. + * + * Cas 2 : ya-yb = 0 et xa-xb != 0: + * La r\xE9solution de ce prol\xE8me donne l'\xE9quation : + * y\xB2-2yay+xa+K\xB2-2xaK-rayonC1\xB2=0 + * avec K=(rayonC2\xB2-rayonC1\xB2-xb\xB2+xa\xB2)/(2*(xa-xb)) + * # k est \xE9galement la valeur de x des deux solutions potentielles + * C'est un \xE9quation du second degr\xE9. + * Pour la r\xE9solution de l'aquation, nous nommerons : + * equA=1 + * equB=2ya + * equC=K\xB2-2xaK-rayonC1\xB2 + * La r\xE9solution de l'\xE9quation r\xE9sultante donne deux solutions (c1' et c2'). + * Pour trouver celle qui nous interesse (si elle existe) la contrainte suivante doit \xEAtre v\xE9rifi\xE9e : + * vecteurNorm\xE9(C, Proj(C, AB)) = vecteurNorm\xE9(CX', Proj(CX', AB)) + * A noter que Proj(C1', AB)=Proj(C2', AB) de plus pour simplifier cette r\xE9solution sera faite sur z=0. + * + * Cas 3 : ya-yb = 0 et xa-xb=0: + * quel qu'en soit le r\xE9sultat, c'est incoh\xE9rent pour notre contexte. + * + * De plus on verifie que le r\xE9sultat ne provoque pas de croisement avec les autres axes + * du profil. + * + * Une fois ce point trouv\xE9, on va \xE9galement d\xE9placer tous les points des deux axes adjacents, + * pour que le profil concerve sa forme g\xE9n\xE9rale. Ce r\xE9aligement se faire en concervant les + * abscisses curvilignes de chacun des points. + * Pour y parvenir le nouveau coefficient directeur des axes est calcul\xE9 et appliqu\xE9 au rapport de + * l'abcisse curviligne avec l'abscisse du point extr\xE9mit\xE9 de l'axe. + */ + + // Application de la m\xE9thode d\xE9crite ci dessus \\ + + // Valuation des variables d'entr\xE9es n\xE9c\xE9ssaires + final int idxPtdeb=_idxPoint==idxRupture1_?0:idxRupture1_; + final int idxPtFin=_idxPoint==idxRupture2_||idxRupture2_==-1?seq.size()-1:idxRupture2_; + final Coordinate a=seq.getCoordinate(idxPtdeb); + final Coordinate b=seq.getCoordinate(idxPtFin); + final Coordinate c=seq.getCoordinate(_idxPoint); + final double rayonC1=_value-curv_.get(idxPtdeb); + final double rayonC2=curv_.get(idxPtFin)-_value; + // Solutions + double x1; + double y1; + double x2; + double y2; + // Cas 1 + if(Math.abs(a.y-b.y)>tolerance){ + // Variables interm\xE9diaires + double n=(rayonC2*rayonC2-rayonC1*rayonC1-b.x*b.x+a.x*a.x-b.y*b.y+a.y*a.y)/(2*(a.y-b.y)); + double m=(a.x-b.x)/(a.y-b.y); + double equA=m*m+1; + double equB=2*(a.y*m-n*m-a.x); + double equC=a.x*a.x+a.y*a.y+n*n-rayonC1*rayonC1-2*a.y*n; + // Variables de r\xE9solution + double deltaTmp=equB*equB-4*equA*equC; + if(deltaTmp<0) + throw new DataGeometryException(FudaaLib.getS("Ce d\xE9placement n'est pas possible sans violer la contrainte de constance de la longueur du profil.")); + double delta=Math.sqrt(equB*equB-4*equA*equC); + x1=(-equB+delta)/(2*equA); + y1=n-x1*m; + x2=(-equB-delta)/(2*equA); + y2=n-x2*m; + } + // Cas 2 + else if(Math.abs(a.x-b.x)>tolerance){ + // Variables interm\xE9diaires + double k=(rayonC2*rayonC2-rayonC1*rayonC1-b.x*b.x+a.x*a.x)/(2*(a.x-b.x)); + double equA=1; + double equB=2*a.y; + double equC=k*k-2*a.x*k-rayonC1*rayonC1; + // Variables de r\xE9solution + double deltaTmp=equB*equB-4*equA*equC; + if(deltaTmp<0) + throw new DataGeometryException(FudaaLib.getS("Ce d\xE9placement n'est pas possible sans violer la contrainte de constance de la longueur du profil.")); + double delta=Math.sqrt(equB*equB-4*equA*equC); + y1=(-equB+delta)/(2*equA); + x1=k; + y2=(-equB-delta)/(2*equA); + x2=k; + } + // Cas 3 + else + throw new DataGeometryException(FudaaLib.getS("Ce d\xE9placement n'est pas valide. Ce cas ne devrait jamais arriver. CSI_1")); + // Recherche du r\xE9sultat nous interessant dans ce cas ci + Coordinate aZ0=new Coordinate(a.x, a.y, 0); + Coordinate bZ0=new Coordinate(b.x, b.y, 0); + Coordinate cZ0=new Coordinate(c.x, c.y, 0); + Coordinate vecReference=vec(cZ0, proj(cZ0, aZ0, bZ0)); + Coordinate cProj=proj(new Coordinate(x1, y1, 0), aZ0, bZ0); + assert(egal(cProj, proj(new Coordinate(x2, y2, 0), aZ0, bZ0), 0.0001, false)); + if(egal(vecReference, vec(new Coordinate(x1, y1, 0), cProj), 0.0001, true)){ + newX=x1; + newY=y1; + } + else if(egal(vecReference, vec(new Coordinate(x2, y2, 0), cProj), 0.0001, true)) { + newX=x2; + newY=y2; + } + else + throw new DataGeometryException(FudaaLib.getS("Ce d\xE9placement n'est pas valide. Ce cas ne devrait jamais arriver. CSI_2")); + + // Verifie que le point trouv\xE9 ne coupe pas un autre axe du profil \\ + boolean noCut=true; + Coordinate newP=new Coordinate(newX, newY); + GISPolyligne axe1=GISGeometryFactory.INSTANCE.createLineString(new Coordinate[]{a, newP}); + GISPolyligne axe2=GISGeometryFactory.INSTANCE.createLineString(new Coordinate[]{newP, b}); + if(idxPtdeb>0) { + /* + * Test de croisement entre les deux axes modifi\xE9s et l'axe avant. l'axe + * a, newP a normalement un point d'intersectino (a). + */ + GISPolyligne axeTest=GISGeometryFactory.INSTANCE.createLineString(new Coordinate[]{coords[0], coords[idxPtdeb]}); + noCut=axe1.intersection(axeTest).getNumPoints()==1; + noCut=noCut&&!axe2.intersects(axeTest); + } + if(idxPtFin<seq.size()-1) { + /* + * Test de croisement entre les deux axes modifi\xE9s et l'axe avant. l'axe + * newP, b a normalement un point d'intersectino (b). + */ + GISPolyligne axeTest=GISGeometryFactory.INSTANCE.createLineString(new Coordinate[]{coords[idxPtFin], coords[coords.length-1]}); + noCut=noCut&&axe2.intersection(axeTest).getNumPoints()==1; + noCut=noCut&&!axe1.intersects(axeTest); + } + // Traitement de l'\xE9ventuelle d\xE9tection d'un croisement + if(!noCut) + throw new DataGeometryException(FudaaLib.getS("Ce d\xE9placement est impossible sans obtenir un profil dont des axes se coupent.")); + // Enregistrement du nouveau point C' et de la nouvelle valeur curviligne + coords[_idxPoint].x=newX; + coords[_idxPoint].y=newY; + // Mise a jour de la table des valeurs curvilignes + curv_.set(_idxPoint, _value); + + // R\xE9alignement des points des axes adjacents \\ + for(int inc=0;inc<2;inc++){ + // D\xE9termination des points de d\xE9but et de fin d'axe + int idxDeb; + int idxFin; + if(inc==0) { // premi\xE8re it\xE9ration, axe : debut, C' + idxDeb=_idxPoint==idxRupture1_?0:idxRupture1_; + idxFin=_idxPoint; } - else { - idx1=_idxPoint+1; - idx2=_idxPoint; - valCurv=Math.abs(_value-curv_.get(idx1)); + else { // seconde it\xE9ration, axe : C', fin + idxDeb=_idxPoint; + idxFin=_idxPoint==idxRupture2_||idxRupture2_==-1 ? seq.size()-1:idxRupture2_; } - // Calcul des nouvelles coordonn\xE9es - if (seq.getX(idx2)!=seq.getX(idx1)) { - // Extraction du signe de xa-xb - double sign=Math.signum(seq.getX(idx2)-seq.getX(idx1)); - double coefDirecteur=(seq.getY(idx2)-seq.getY(idx1))/(seq.getX(idx2)-seq.getX(idx1)); - double newX=seq.getX(idx1)+sign*valCurv/Math.sqrt(1+coefDirecteur*coefDirecteur); - double newY=seq.getY(idx1)+coefDirecteur*(newX-seq.getX(idx1)); - coords[_idxPoint].x=newX; - coords[_idxPoint].y=newY; + // R\xE9alignement sur l'axe + if (Math.abs(coords[idxFin].x-coords[idxDeb].x)>tolerance) { + double sign=Math.signum(coords[idxFin].x-coords[idxDeb].x); + double newCoefDirecteur=(coords[idxFin].y-coords[idxDeb].y)/(coords[idxFin].x-coords[idxDeb].x); + for(int i=idxDeb+1;i<idxFin;i++){ + coords[i].x=coords[idxDeb].x+sign*(curv_.get(i)-curv_.get(idxDeb))/Math.sqrt(1+newCoefDirecteur*newCoefDirecteur); + coords[i].y=coords[idxDeb].y+newCoefDirecteur*(coords[i].x-coords[idxDeb].x); + } } else { // Cas du bout de profil vertical - // Extraction du signe de ya-yb - double sign=Math.signum(seq.getY(idx2)-seq.getY(idx1)); - double newY=seq.getY(idx1)+sign*(valCurv-curv_.get(idx1)); - coords[_idxPoint].y=newY; + double sign=Math.signum(coords[idxFin].y-coords[idxDeb].y); + for(int i=idxDeb+1;i<idxFin;i++){ + coords[i].x=coords[idxDeb].x; + coords[i].y=coords[idxDeb].y+sign*(curv_.get(i)-curv_.get(idxDeb)); + } } - zone_.setCoordinateSequence(idxGeom_, GISGeometryFactory.INSTANCE.getCoordinateSequenceFactory().create(coords), null); - // Mise a jour de la table des valeurs curvilignes - if (_idxPoint!=0) - curv_.set(_idxPoint, _value); - else - for (int i=1; i<curv_.size(); i++) - curv_.set(i, curv_.get(i)-_value); - fireDataGeometryChanged(); } - // Cas o\xF9 il y a d\xE9pacement d'un autre point => le signe de xa-xb va potentiellement chang\xE9 => cas interdit - else - controller_.showError(FudaaLib.getS("Il est interdit de d\xE9placer un point au dela des points l'encadrant.")); } - else - // Cas complexe : l'index est sur un point de rupture \\ - // TODO : d\xE9placement sur l'\xE9llipse avec verification de non croisement des axes du profil - controller_.showError(FudaaLib.getS("Le changement d'abscisse curviligne des points de ruptures n'est pas g\xE9r\xE9 pour l'instant.")); + + // Enregistrement des nouvelles coordonn\xE9es \\ + zone_.setCoordinateSequence(idxGeom_, GISGeometryFactory.INSTANCE.getCoordinateSequenceFactory().create(coords), null); + // Notification des changements de valeurs + fireDataGeometryChanged(); } public void setZ(int _idxPoint, double _value) { - if (z_!=null) { - z_.setObject(_idxPoint, _value, null); - // Mise \xE0 jour de idxZMin_ et idxZMax_ - if (_idxPoint==idxZMax_||_idxPoint==idxZMin_) { - idxZMax_=0; - idxZMin_=0; - for (int i=1; i<z_.getSize(); i++) { - double val=(Double)z_.getObjectValueAt(i); - if (val>(Double)z_.getObjectValueAt(idxZMax_)) - idxZMax_=i; - else if (val<(Double)z_.getObjectValueAt(idxZMin_)) - idxZMin_=i; - } + if (z_==null||_idxPoint<0||_idxPoint>=z_.getSize()) + throw new IllegalArgumentException("Cet index n'existe pas."); + z_.setObject(_idxPoint, _value, null); + // Mise \xE0 jour de idxZMin_ et idxZMax_ + if (_idxPoint==idxZMax_||_idxPoint==idxZMin_) { + idxZMax_=0; + idxZMin_=0; + for (int i=1; i<z_.getSize(); i++) { + double val=(Double)z_.getObjectValueAt(i); + if (val>(Double)z_.getObjectValueAt(idxZMax_)) + idxZMax_=i; + else if (val<(Double)z_.getObjectValueAt(idxZMin_)) + idxZMin_=i; } - else if (_value>(Double)z_.getObjectValueAt(idxZMax_)) - idxZMax_=_idxPoint; - else if (_value<(Double)z_.getObjectValueAt(idxZMin_)) - idxZMin_=_idxPoint; - fireDataGeometryChanged(); } + else if (_value>(Double)z_.getObjectValueAt(idxZMax_)) + idxZMax_=_idxPoint; + else if (_value<(Double)z_.getObjectValueAt(idxZMin_)) + idxZMin_=_idxPoint; + fireDataGeometryChanged(); } public double getCurvMax() { @@ -296,7 +501,7 @@ if(curv_==null) return 0; else - return curv_.get(0); + return curv_.get(0); // toujours 0 de toute fa\xE7on } public double getZMax() { @@ -313,57 +518,68 @@ return (Double) z_.getObjectValueAt(idxZMin_); } - public void setValues(int _idxPoint, double _valueCurv, double _valueZ){ + public void setValues(int _idxPoint, double _valueCurv, double _valueZ) throws DataGeometryException{ setZ(_idxPoint, _valueZ); setCurv(_idxPoint, _valueCurv); } - public void remove(int _idxPoint){ - if(zone_==null||z_==null||curv_==null) - return; - if(_idxPoint>=0&&_idxPoint<z_.getSize()){ - // Suppression du point dans la zone + public void remove(int _idxPoint) throws DataGeometryException { + if(zone_==null||z_==null||curv_==null||_idxPoint<0||_idxPoint>=curv_.size()) + throw new IllegalArgumentException("Cet index n'existe pas."); + if(curv_.size()==2) + throw new DataGeometryException("On ne peut pas enlever un point quand il n'en reste que deux."); + // Suppression du point dans la zone + zone_.removeAtomics(idxGeom_, new CtuluListSelection(new int[]{_idxPoint}), null, null); + z_=(CtuluCollection)zone_.getValue(zone_.getIndiceOf(zone_.getAttributeIsZ()), idxGeom_); + // Mise \xE0 jour des informations curvilignes \\ + if (_idxPoint==0) { + // Si _idxPoint est le premier point + curv_.remove(0); + for (int i=curv_.size()-1; i>=0; i--) + curv_.set(i, curv_.get(i)-curv_.get(0)); + } + else if (_idxPoint>0&&_idxPoint<curv_.size()-1) { + // Cas g\xE9n\xE9ral si _idxPoint est entre le premier et le dernier + // Attention curv_ contient toujours _idxPoint contrairement \xE0 seq CoordinateSequence seq=((GISCoordinateSequenceContainerInterface)zone_.getGeometry(idxGeom_)).getCoordinateSequence(); - Coordinate[] points=new Coordinate[seq.size()-1]; - for(int i=0;i<_idxPoint;i++) - points[i]=seq.getCoordinate(i); - for(int i=_idxPoint+1;i<seq.size();i++) - points[i]=seq.getCoordinate(i); - zone_.setGeometry(idxGeom_, GISGeometryFactory.INSTANCE.createGeometry(zone_.getGeometry(idxGeom_).getClass(), - GISGeometryFactory.INSTANCE.getCoordinateSequenceFactory().create(points)), null); - // Mise \xE0 jour des informations curvilignes \\ - if(_idxPoint==0){ - // Si _idxPoint est le premier point - curv_.remove(0); - for(int i=curv_.size();i>=0;i--) - curv_.set(i, curv_.get(i)-curv_.get(0)); + double delta=curv_.get(_idxPoint-1)-curv_.get(_idxPoint+1) + +Math.sqrt(Math.pow(seq.getCoordinate(_idxPoint-1).x-seq.getCoordinate(_idxPoint).x, 2) + +Math.pow(seq.getCoordinate(_idxPoint-1).y-seq.getCoordinate(_idxPoint).y, 2)); + curv_.remove(_idxPoint); + for (int i=_idxPoint; i<curv_.size(); i++) + curv_.set(i, curv_.get(i)+delta); + } + else + // Si _idxPoint est le dernier + curv_.remove(curv_.size()-1); + // Mise \xE0 jour de idxZMin_ et idxZMax_ + if (_idxPoint==idxZMax_||_idxPoint==idxZMin_) { + idxZMax_=0; + idxZMin_=0; + for (int i=1; i<z_.getSize(); i++) { + double val=(Double)z_.getObjectValueAt(i); + if (val>(Double)z_.getObjectValueAt(idxZMax_)) + idxZMax_=i; + else if (val<(Double)z_.getObjectValueAt(idxZMin_)) + idxZMin_=i; } - else if (_idxPoint>0&&_idxPoint<curv_.size()-1) { - // Cas g\xE9n\xE9ral si _idxPoint est entre le premier et le dernier - // Attention 'curv_' contient encore _idxPoint alors que 'points' ne le - // contient plus - double delta=-curv_.get(_idxPoint)-curv_.get(_idxPoint+1) - +Math.sqrt(Math.pow(points[_idxPoint-1].x-points[_idxPoint].x, 2) - +Math.pow(points[_idxPoint-1].y-points[_idxPoint].y, 2)); - curv_.remove(_idxPoint); - for(int i=_idxPoint;i<curv_.size();i++) - curv_.set(i, curv_.get(i)+delta); - } - else - // Si _idxPoint est le dernier - curv_.remove(curv_.size()-1); } + fireDataGeometryChanged(); } /** List de listener. */ List<DataGeometryListener> listeners_=new ArrayList<DataGeometryListener>(); public void addDataGeometryListener(DataGeometryListener _listener) { + if(_listener==null) + throw new IllegalArgumentException("_listener doit \xEAtre non null"); if(!listeners_.contains(_listener)) listeners_.add(_listener); } public void removeDataGeometryListener(DataGeometryListener _listener) { + if(_listener==null) + throw new IllegalArgumentException("_listener doit \xEAtre non null"); if(listeners_.contains(_listener)) listeners_.remove(_listener); } @@ -377,4 +593,55 @@ for(DataGeometryListener listener:listeners_) listener.dataGeometryNewGeom(); } + + // Quelques fonctions m\xE9th\xE9matiques \\ + + /** + * retourne le vecteur _a, _b sous forme de Coordinate. + */ + private Coordinate vec(Coordinate _a, Coordinate _b){ + return new Coordinate(_b.x-_a.x, _b.y-_a.y, _b.z-_a.z); + } + + /** + * Retourne la projection de _a sur la droite _b_c. + * Attention : Il s'agit bien d'une projection sur une + * droite et non un segment de droite : le r\xE9sultat + * peut \xEAtre en dehors de [_b, _c] + */ + private Coordinate proj(Coordinate _a, Coordinate _b, Coordinate _c){ + Coordinate vBC=vec(_b, _c); + Coordinate vBA=vec(_b, _a); + double normeBC=Math.sqrt(vBC.x*vBC.x+vBC.y*vBC.y+vBC.z*vBC.z); + double produitScalaireBCBA=vBC.x*vBA.x+vBC.y*vBA.y+vBC.z*vBA.z; + double rapportSurBC=produitScalaireBCBA/(normeBC*normeBC); + return new Coordinate(vBC.x*rapportSurBC+_b.x, vBC.y*rapportSurBC+_b.y, vBC.z*rapportSurBC+_b.z); + } + + /** + * Normalise le vecteur pass\xE9 en param\xE8tre. + */ + private Coordinate normalisation(Coordinate _a){ + double normeA=Math.sqrt(_a.x*_a.x+_a.y*_a.y+_a.z*_a.z); + _a.x=_a.x/normeA; + _a.y=_a.y/normeA; + _a.z=_a.z/normeA; + return _a; + } + + /** + * Compars les deux vecteurs avec la tol\xE9rance donn\xE9e. + * Le dernier param\xE8tre indique si un normalisation des + * deux vecteurs doit \xEAtre faite avec la comparaison. + * Les vecteurs ne sont pas modif\xE9s dans l'op\xE9ration. + */ + private boolean egal(Coordinate _a, Coordinate _b, double _tolerance, boolean _normalisation) { + if(_normalisation){ + normalisation(_a); + normalisation(_b); + } + Coordinate diff=vec(_a, _b); + return Math.abs(diff.x)<_tolerance&&Math.abs(diff.y)<_tolerance&&Math.abs(diff.z)<_tolerance; + } + } Added: branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/modeleur1d/DataGeometryException.java =================================================================== --- branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/modeleur1d/DataGeometryException.java (rev 0) +++ branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/modeleur1d/DataGeometryException.java 2008-12-17 17:44:49 UTC (rev 4305) @@ -0,0 +1,23 @@ +/* + * @creation 16 d\xE9c. 2008 + * @modification $Date:$ + * @license GNU General Public License 2 + * @copyright (c)1998-2008 CETMEF 2 bd Gambetta F-60231 Compiegne + * @mail fud...@li... + */ +package org.fudaa.fudaa.modeleur.modeleur1d; + +/** + * Exception lev\xE9e par les classes impl\xE9mentant DataGeometry pour indiqu\xE9 une + * impossibilit\xE9 dans le traitement demand\xE9. Un message d'erreur renseigne sur + * le probl\xE8me. + * + * @author Emmanuel MARTIN + * @version $Id:$ + */ +public class DataGeometryException extends Exception { + + public DataGeometryException(String _message) { + super(_message); + } +} Property changes on: branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/modeleur1d/DataGeometryException.java ___________________________________________________________________ Added: svn:keywords + Id Added: svn:eol-style + native Modified: branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/modeleur1d/VueCourbe.java =================================================================== --- branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/modeleur1d/VueCourbe.java 2008-12-15 16:28:55 UTC (rev 4304) +++ branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/modeleur1d/VueCourbe.java 2008-12-17 17:44:49 UTC (rev 4305) @@ -139,11 +139,7 @@ return data_.getZMin(); } - /* (non-Javadoc) - * @see org.fudaa.ebli.courbe.EGModel#isDuplicatable() - */ public boolean isDuplicatable() { - // TODO Auto-generated method stub return false; } @@ -172,8 +168,14 @@ } public boolean removeValue(int _i, CtuluCommandContainer _cmd) { - data_.remove(_i); - return true; + try { + data_.remove(_i); + return true; + } + catch (DataGeometryException _exc) { + controller_.showError(_exc.getMessage()); + return false; + } } /* (non-Javadoc) @@ -189,8 +191,15 @@ } public boolean setValue(int _i, double _x, double _y, CtuluCommandContainer _cmd) { - data_.setValues(_i, _x, _y); - return true; + controller_.clearError(); + try { + data_.setValues(_i, _x, _y); + return true; + } + catch (DataGeometryException _exc) { + controller_.showError(_exc.getMessage()); + return false; + } } public boolean setValues(int[] _idx, double[] _x, double[] _y, CtuluCommandContainer _cmd) { Modified: branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/modeleur1d/VueTableau.java =================================================================== --- branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/modeleur1d/VueTableau.java 2008-12-15 16:28:55 UTC (rev 4304) +++ branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/modeleur1d/VueTableau.java 2008-12-17 17:44:49 UTC (rev 4305) @@ -82,15 +82,20 @@ } public void setValueAt(Object value, int rowIndex, int columnIndex) { + controller_.clearError(); if(columnIndex==0) - data_.setCurv(rowIndex, (Double) value); + try { + data_.setCurv(rowIndex, (Double) value); + } + catch (DataGeometryException _exc) { + controller_.showError(_exc.getMessage()); + } else data_.setZ(rowIndex, (Double) value); } } /** Le controller de la fen\xEAtre 1d. */ - @SuppressWarnings("unused") private Controller1d controller_; /** La vue du tableau. */ private JTable table_; Added: branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/test/testModeleur1d/TestDataGeometryAdapter.java =================================================================== --- branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/test/testModeleur1d/TestDataGeometryAdapter.java (rev 0) +++ branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/test/testModeleur1d/TestDataGeometryAdapter.java 2008-12-17 17:44:49 UTC (rev 4305) @@ -0,0 +1,914 @@ +/* + * @creation 16 d\xE9c. 2008 + * @modification $Date:$ + * @license GNU General Public License 2 + * @copyright (c)1998-2008 CETMEF 2 bd Gambetta F-60231 Compiegne + * @mail fud...@li... + */ +package testModeleur1d; + +import junit.framework.TestCase; + +import org.fudaa.ctulu.gis.GISAttributeConstants; +import org.fudaa.ctulu.gis.GISAttributeInterface; +import org.fudaa.ctulu.gis.GISGeometryFactory; +import org.fudaa.ctulu.gis.GISPolyligne; +import org.fudaa.ctulu.gis.GISZoneCollectionLigneBrisee; +import org.fudaa.fudaa.modeleur.modeleur1d.DataGeometryAdapter; +import org.fudaa.fudaa.modeleur.modeleur1d.DataGeometryException; +import org.fudaa.fudaa.modeleur.modeleur1d.DataGeometryListener; + +import com.vividsolutions.jts.geom.Coordinate; + +/** + * Test pour DataGeometryAdapter. + * @author Emmanuel MARTIN + * @version $Id:$ + */ +public class TestDataGeometryAdapter extends TestCase { + + /** Tolerance pour les comparaisons de doubles. */ + private double tolerance=0.000001; + private DataGeometryAdapter geomAdapter_; + private GISZoneCollectionLigneBrisee zone0_; + private GISZoneCollectionLigneBrisee zone1_; + private GISZoneCollectionLigneBrisee zone3_; + private GISZoneCollectionLigneBrisee zone4_; + private GISZoneCollectionLigneBrisee zone5_; + private GISZoneCollectionLigneBrisee zone6_; + + /* + * (non-Javadoc) + * + * @see junit.framework.TestCase#setUp() + */ + @Override + protected void setUp() throws Exception { + super.setUp(); + geomAdapter_=new DataGeometryAdapter(null, -1); + // Zone6_ \\ + // Attribut z non d\xE9fini + zone6_=new GISZoneCollectionLigneBrisee(); + zone6_.setAttributes(new GISAttributeInterface[]{GISAttributeConstants.BATHY}, null); + zone6_.addPolyligne(GISGeometryFactory.INSTANCE.getCoordinateSequenceFactory().create( + new Coordinate[]{new Coordinate(0, 0, 0), new Coordinate(-10, -20, -20), + new Coordinate(50, 10, 10)}), null, null); + // Zone0_ \\ + // Quelconque + zone0_=new GISZoneCollectionLigneBrisee(); + zone0_.setAttributes(new GISAttributeInterface[]{GISAttributeConstants.BATHY}, null); + zone0_.setAttributeIsZ(GISAttributeConstants.BATHY); + zone0_.addPolyligne(GISGeometryFactory.INSTANCE.getCoordinateSequenceFactory().create( + new Coordinate[]{new Coordinate(0, 0, 0), new Coordinate(-10, -20, -20), + new Coordinate(50, 10, 10)}), null, null); + // Zone1_ \\ + // Quelconque + zone1_=new GISZoneCollectionLigneBrisee(); + zone1_.setAttributes(new GISAttributeInterface[]{GISAttributeConstants.BATHY}, null); + zone1_.setAttributeIsZ(GISAttributeConstants.BATHY); + zone1_.addPolyligne(GISGeometryFactory.INSTANCE.getCoordinateSequenceFactory() + .create( + new Coordinate[]{new Coordinate(8, 6, 0), new Coordinate(5.052590034554651, 6.559262456806686, 0), + new Coordinate(3, 2, 0)}), null, null); + // Zone3_ \\ + // Quelconque + zone3_=new GISZoneCollectionLigneBrisee(); + zone3_.setAttributes(new GISAttributeInterface[]{GISAttributeConstants.BATHY}, null); + zone3_.setAttributeIsZ(GISAttributeConstants.BATHY); + zone3_.addPolyligne(GISGeometryFactory.INSTANCE.getCoordinateSequenceFactory().create( + new Coordinate[]{new Coordinate(0, 0, 0), new Coordinate(-10, -20, -20), new Coordinate(50, 10, 10), + new Coordinate(30, 5, 5), new Coordinate(10, 0, 0)}), null, null); + zone3_.addPolyligne(GISGeometryFactory.INSTANCE.getCoordinateSequenceFactory().create( + new Coordinate[]{new Coordinate(5, 0, 0), new Coordinate(-15, -20, -20), new Coordinate(55, 10, 10), + new Coordinate(35, 5, -20), new Coordinate(15, 0, -20)}), null, null); + // zone4_ \\ + zone4_=new GISZoneCollectionLigneBrisee(); + zone4_.setAttributes(new GISAttributeInterface[]{GISAttributeConstants.BATHY}, null); + zone4_.setAttributeIsZ(GISAttributeConstants.BATHY); + // 0 : Points confondus + zone4_.addPolyligne(GISGeometryFactory.INSTANCE.getCoordinateSequenceFactory().create( + new Coordinate[]{new Coordinate(0, 0, 0), new Coordinate(-10, -20, -20), new Coordinate(-10, -20, -20), + new Coordinate(-20, -40, -40), new Coordinate(-30, -60, -60)}), null, null); + // 1 : nb ruptures > 2 + zone4_.addPolyligne(GISGeometryFactory.INSTANCE.getCoordinateSequenceFactory().create( + new Coordinate[]{new Coordinate(0, 0, 0), new Coordinate(10, 20, 5), new Coordinate(11, 100, 8), new Coordinate(41, 5, 9), new Coordinate(41, 0, 8)}), null, null); + // 2 : nb ruptures = 1 + zone4_.addPolyligne(GISGeometryFactory.INSTANCE.getCoordinateSequenceFactory().create( + new Coordinate[]{new Coordinate(0, 0, 0), new Coordinate(11, 100, 8), new Coordinate(12, 101, 10), new Coordinate(13, 102, -5)}), null, null); + // 3 : nb ruptures = 0 + zone4_.addPolyligne(GISGeometryFactory.INSTANCE.getCoordinateSequenceFactory().create( + new Coordinate[]{new Coordinate(0, 0, 0), new Coordinate(10, 20, 5), new Coordinate(20, 40, 8)}), null, null); + // 4 : nb ruptures = 2 + zone4_.addPolyligne(GISGeometryFactory.INSTANCE.getCoordinateSequenceFactory().create( + new Coordinate[]{new Coordinate(10, 10, 0), new Coordinate(20, 10, 5), new Coordinate(20, 20, 8), new Coordinate(25, 20, 8), new Coordinate(30, 20, 8)}), null, null); + // 5 : axes crois\xE9s + zone4_.addPolyligne(GISGeometryFactory.INSTANCE.getCoordinateSequenceFactory().create( + new Coordinate[]{new Coordinate(10, 10, 0), new Coordinate(20, 10, 5), new Coordinate(20, 20, 8), new Coordinate(10, 5, 8)}), null, null); + // Zone5_ \\ + zone5_=new GISZoneCollectionLigneBrisee(); + zone5_.setAttributes(new GISAttributeInterface[]{GISAttributeConstants.BATHY}, null); + zone5_.setAttributeIsZ(GISAttributeConstants.BATHY); + // 0 : 2 points align\xE9s (cas g\xE9n\xE9ral) + zone5_.addPolyligne(GISGeometryFactory.INSTANCE.getCoordinateSequenceFactory().create( + new Coordinate[]{new Coordinate(0, 0, 0), new Coordinate(10, 5, -4)}), null, null); + // 1 : 2 points align\xE9s parall\xE8le \xE0 l'axe des X + zone5_.addPolyligne(GISGeometryFactory.INSTANCE.getCoordinateSequenceFactory().create( + new Coordinate[]{new Coordinate(5, 10, 3), new Coordinate(20, 10, -7)}), null, null); + // 2 : 2 points align\xE9s parall\xE8le \xE0 l'axe des Y + zone5_.addPolyligne(GISGeometryFactory.INSTANCE.getCoordinateSequenceFactory().create( + new Coordinate[]{new Coordinate(5, 0, 0), new Coordinate(5, 10, 88)}), null, null); + // 3 : 3 points align\xE9s (cas g\xE9n\xE9ral) + zone5_.addPolyligne(GISGeometryFactory.INSTANCE.getCoordinateSequenceFactory().create( + new Coordinate[]{new Coordinate(0, 0, -2), new Coordinate(11, 5, 7), new Coordinate(16.5, 7.5, 0)}), null, null); + // 4 : 3 points align\xE9s parall\xE8le \xE0 l'axe des X + zone5_.addPolyligne(GISGeometryFactory.INSTANCE.getCoordinateSequenceFactory().create( + new Coordinate[]{new Coordinate(-5, 10, 3), new Coordinate(20, 10, 6), new Coordinate(20.4, 10, 2)}), null, null); + // 5 : 3 points align\xE9s parall\xE8le \xE0 l'axe des Y + zone5_.addPolyligne(GISGeometryFactory.INSTANCE.getCoordinateSequenceFactory().create( + new Coordinate[]{new Coordinate(-5, 10, 8), new Coordinate(-5, -2, -2), new Coordinate(-5, -50, 50)}), null, null); + // 6 : 4 points align\xE9s (cas g\xE9n\xE9ral) + zone5_.addPolyligne(GISGeometryFactory.INSTANCE.getCoordinateSequenceFactory().create( + new Coordinate[]{new Coordinate(1, 1, 0), new Coordinate(2, 1, 3), new Coordinate(8, 5, -9), new Coordinate(40, 25, 99)}), null, null); + // 7 : 4 points align\xE9s parall\xE8le \xE0 l'axe des X + zone5_.addPolyligne(GISGeometryFactory.INSTANCE.getCoordinateSequenceFactory().create( + new Coordinate[]{new Coordinate(1, 2.56, -2), new Coordinate(10, 2.56, 0), new Coordinate(99, 2.56, 84), new Coordinate(100.5, 2.56, 100)}), null, null); + // 8 : 4 points align\xE9s parall\xE8le \xE0 l'axe des Y + zone5_.addPolyligne(GISGeometryFactory.INSTANCE.getCoordinateSequenceFactory().create( + new Coordinate[]{new Coordinate(-9.1, 88, 0), new Coordinate(-9.1, 50, 8), new Coordinate(-9.1, 0, -87), new Coordinate(-9.1, -10, -10)}), null, null); + // 9 : 3 points avec un point de rupture + zone5_.addPolyligne(GISGeometryFactory.INSTANCE.getCoordinateSequenceFactory().create( + new Coordinate[]{new Coordinate(0, 0, 0), new Coordinate(10, 5, 2), new Coordinate(10, -5, 9)}), null, null); + // 10 : 4 points avec un point de rupture (deux points sur le premier axe) + zone5_.addPolyligne(GISGeometryFactory.INSTANCE.getCoordinateSequenceFactory().create( + new Coordinate[]{new Coordinate(0, 0, -2), new Coordinate(11, 5, 7), new Coordinate(16.5, 7.5, 0), new Coordinate(50, 60, 70)}), null, null); + // 11 : 5 points avec un point de rupture (deux points sur chaque axe) + zone5_.addPolyligne(GISGeometryFactory.INSTANCE.getCoordinateSequenceFactory().create( + new Coordinate[]{new Coordinate(0, 0, -2), new Coordinate(11, 5, 7), new Coordinate(16.5, 7.5, 0), new Coordinate(33, 3.75, 9), new Coordinate(11, 1.25, 9)}), null, null); + // 12 : 4 points avec deux points de ruptures + zone5_.addPolyligne(GISGeometryFactory.INSTANCE.getCoordinateSequenceFactory().create( + new Coordinate[]{new Coordinate(0, 0, 0), new Coordinate(10, 5, 2), new Coordinate(10, -5, 9), new Coordinate(20, 0, 0)}), null, null); + // 13 : 5 points avec deux points de ruptures (deux points sur le premier axe) + zone5_.addPolyligne(GISGeometryFactory.INSTANCE.getCoordinateSequenceFactory().create( + new Coordinate[]{new Coordinate(0, 0, 0), new Coordinate(5, 2.5, 88), new Coordinate(10, 5, 2), new Coordinate(10, -5, 9), new Coordinate(20, 0, 0)}), null, null); + // 14 : 6 points avec deux points de ruptures (deux points sur les deux premiers axes) + zone5_.addPolyligne(GISGeometryFactory.INSTANCE.getCoordinateSequenceFactory().create( + new Coordinate[]{new Coordinate(0, 0, 0), new Coordinate(5, 2.5, 88), new Coordinate(10, 5, 2), new Coordinate(10, 0, 44), new Coordinate(10, -5, 9), new Coordinate(20, 0, 0)}), null, null); + // 15 : 7 points avec deux points de ruptures (deux points sur chacun des axes) + zone5_.addPolyligne(GISGeometryFactory.INSTANCE.getCoordinateSequenceFactory().create( + new Coordinate[]{new Coordinate(0, 0, 0), new Coordinate(5, 2.5, 88), new Coordinate(10, 5, 2), new Coordinate(10, 0, 44), new Coordinate(10, -5, 9), new Coordinate(15, -2.5, 2), new Coordinate(20, 0, 0)}), null, null); + // 16 : 10 points avec deux points de ruptures (trois points sur chacun des axes) + zone5_.addPolyligne(GISGeometryFactory.INSTANCE.getCoordinateSequenceFactory().create( + new Coordinate[]{new Coordinate(0, 0, 0), new Coordinate(2.5, 1.25, 44), new Coordinate(5, 2.5, 88), new Coordinate(10, 5, 2), new Coordinate(10, 0, 44), new Coordinate(10, -2, 0), new Coordinate(10, -5, 9), new Coordinate(10/2., -5/2., 2), new Coordinate(10/4., -5/4., 0), new Coordinate(10/8., -5/8., 0)}), null, null); + // 17 : 3 points avec un point de rupture et le premier et le dernier points sont sur le m\xEAme axe des y + zone5_.addPolyligne(GISGeometryFactory.INSTANCE.getCoordinateSequenceFactory().create( + new Coordinate[]{new Coordinate(5, 5, -9), new Coordinate(10, 10, 0), new Coordinate(5, 20, 0)}), null, null); + // 18 : 3 points avec un point de rupture et le premier et le dernier points sont sur le m\xEAme axe des x + zone5_.addPolyligne(GISGeometryFactory.INSTANCE.getCoordinateSequenceFactory().create( + new Coordinate[]{new Coordinate(5, 5, -9), new Coordinate(10, 10, 0), new Coordinate(20, 5, 0)}), null, null); + } + + public void testDataGeometryAdapter() throws IllegalArgumentException, DataGeometryException { + // Points confondus + try { + new DataGeometryAdapter(zone4_, 0); + fail(); + } + catch (IllegalArgumentException _exc) { + fail(); + } + catch (DataGeometryException _exc) {} + // nb points > 2 + try { + new DataGeometryAdapter(zone4_, 1); + fail(); + } + catch (IllegalArgumentException _exc) { + fail(); + } + catch (DataGeometryException _exc) {} + // nb ruptures = 1 + try { + new DataGeometryAdapter(zone4_, 2); + } + catch (IllegalArgumentException _exc) { + fail(); + } + catch (DataGeometryException _exc) { + fail(); + } + // nb ruptures = 0 + try { + new DataGeometryAdapter(zone4_, 3); + } + catch (IllegalArgumentException _exc) { + fail(); + } + catch (DataGeometryException _exc) { + fail(); + } + // nb ruptures = 2 + try { + new DataGeometryAdapter(zone4_, 4); + } + catch (IllegalArgumentException _exc) { + fail(); + } + catch (DataGeometryException _exc) { + fail(); + } + // axes crois\xE9s + try { + new DataGeometryAdapter(zone4_, 5); + fail(); + } + catch (IllegalArgumentException _exc) { + fail(); + } + catch (DataGeometryException _exc) { + } + // aguments invalide + geomAdapter_=new DataGeometryAdapter(null, -1); + assertNull(geomAdapter_.getGISZoneCollection()); + assertEquals(-1, geomAdapter_.getIdxGeom()); + // aguments invalide + try { + geomAdapter_=new DataGeometryAdapter(null, 0); + fail(); + } + catch (IllegalArgumentException _exc) { + assertNull(geomAdapter_.getGISZoneCollection()); + assertEquals(-1, geomAdapter_.getIdxGeom()); + } + catch (DataGeometryException _exc) { + fail(); + } + // aguments invalide + try { + geomAdapter_=new DataGeometryAdapter(null, 1); + fail(); + } + catch (IllegalArgumentException _exc) { + assertNull(geomAdapter_.getGISZoneCollection()); + assertEquals(-1, geomAdapter_.getIdxGeom()); + } + catch (DataGeometryException _exc) { + fail(); + } + // aguments invalide + try { + geomAdapter_=new DataGeometryAdapter(zone4_, -1); + fail(); + } + catch (IllegalArgumentException _exc) { + assertNull(geomAdapter_.getGISZoneCollection()); + assertEquals(-1, geomAdapter_.getIdxGeom()); + } + catch (DataGeometryException _exc) { + fail(); + } + // aguments invalide + try { + geomAdapter_=new DataGeometryAdapter(zone4_, -10); + fail(); + } + catch (IllegalArgumentException _exc) { + assertNull(geomAdapter_.getGISZoneCollection()); + assertEquals(-1, geomAdapter_.getIdxGeom()); + } + catch (DataGeometryException _exc) { + fail(); + } + // aguments invalide + try { + geomAdapter_=new DataGeometryAdapter(zone4_, zone4_.getNbGeometries()); + fail(); + } + catch (IllegalArgumentException _exc) { + assertNull(geomAdapter_.getGISZoneCollection()); + assertEquals(-1, geomAdapter_.getIdxGeom()); + } + catch (DataGeometryException _exc) { + fail(); + } + // aguments invalide + try { + geomAdapter_=new DataGeometryAdapter(zone4_, zone4_.getNbGeometries()+1); + fail(); + } + catch (IllegalArgumentException _exc) { + assertNull(geomAdapter_.getGISZoneCollection()); + assertEquals(-1, geomAdapter_.getIdxGeom()); + } + catch (DataGeometryException _exc) { + fail(); + } + // aguments valide + try { + new DataGeometryAdapter(zone3_, zone3_.getNbGeometries()-1); + } + catch (IllegalArgumentException _exc) { + fail(); + } + catch (DataGeometryException _exc) { + fail(); + } + } + + public void testSetData() throws IllegalArgumentException, DataGeometryException { + // Zone sans attribut Z d\xE9fini + try{ + geomAdapter_.setData(zone6_, 0); + } + catch (DataGeometryException _exc) { + fail(); + } + catch(IllegalArgumentException _exc){} + // Points confondus + try { + new DataGeometryAdapter(zone4_, 0); + fail(); + } + catch (IllegalArgumentException _exc) { + fail(); + } + catch (DataGeometryException _exc) {} + // nb points > 2 + try { + new DataGeometryAdapter(zone4_, 1); + fail(); + } + catch (IllegalArgumentException _exc) { + fail(); + } + catch (DataGeometryException _exc) {} + // nb ruptures = 1 + try { + new DataGeometryAdapter(zone4_, 2); + } + catch (IllegalArgumentException _exc) { + fail(); + } + catch (DataGeometryException _exc) { + fail(); + } + // nb ruptures = 0 + try { + new DataGeometryAdapter(zone4_, 3); + } + catch (IllegalArgumentException _exc) { + fail(); + } + catch (DataGeometryException _exc) { + fail(); + } + // nb ruptures = 2 + try { + new DataGeometryAdapter(zone4_, 4); + } + catch (IllegalArgumentException _exc) { + fail(); + } + catch (DataGeometryException _exc) { + fail(); + } + // axes crois\xE9s + try { + new DataGeometryAdapter(zone4_, 5); + fail(); + } + catch (IllegalArgumentException _exc) { + fail(); + } + catch (DataGeometryException _exc) { + } + // aguments invalide + geomAdapter_=new DataGeometryAdapter(null, -1); + assertNull(geomAdapter_.getGISZoneCollection()); + assertEquals(-1, geomAdapter_.getIdxGeom()); + // aguments invalide + try { + geomAdapter_=new DataGeometryAdapter(null, 0); + fail(); + } + catch (IllegalArgumentException _exc) { + assertNull(geomAdapter_.getGISZoneCollection()); + assertEquals(-1, geomAdapter_.getIdxGeom()); + } + catch (DataGeometryException _exc) { + fail(); + } + // aguments invalide + try { + geomAdapter_=new DataGeometryAdapter(null, 1); + fail(); + } + catch (IllegalArgumentException _exc) { + assertNull(geomAdapter_.getGISZoneCollection()); + assertEquals(-1, geomAdapter_.getIdxGeom()); + } + catch (DataGeometryException _exc) { + fail(); + } + // aguments invalide + try { + geomAdapter_=new DataGeometryAdapter(zone4_, -1); + fail(); + } + catch (IllegalArgumentException _exc) { + assertNull(geomAdapter_.getGISZoneCollection()); + assertEquals(-1, geomAdapter_.getIdxGeom()); + } + catch (DataGeometryException _exc) { + fail(); + } + // aguments invalide + try { + geomAdapter_=new DataGeometryAdapter(zone4_, -10); + fail(); + } + catch (IllegalArgumentException _exc) { + assertNull(geomAdapter_.getGISZoneCollection()); + assertEquals(-1, geomAdapter_.getIdxGeom()); + } + catch (DataGeometryException _exc) { + fail(); + } + // aguments invalide + try { + geomAdapter_=new DataGeometryAdapter(zone4_, zone4_.getNbGeometries()); + fail(); + } + catch (IllegalArgumentException _exc) { + assertNull(geomAdapter_.getGISZoneCollection()); + assertEquals(-1, geomAdapter_.getIdxGeom()); + } + catch (DataGeometryException _exc) { + fail(); + } + // aguments invalide + try { + geomAdapter_=new DataGeometryAdapter(zone4_, zone4_.getNbGeometries()+1); + fail(); + } + ... [truncated message content] |
From: <emm...@us...> - 2008-12-15 16:28:59
|
Revision: 4304 http://fudaa.svn.sourceforge.net/fudaa/?rev=4304&view=rev Author: emmanuel_martin Date: 2008-12-15 16:28:55 +0000 (Mon, 15 Dec 2008) Log Message: ----------- Changement d'affichage des messages d'erreur ; suppression de plusieurs boutons ; correction du plantage sur le double clic ; am?\195?\169lioration de l'affichage des nombres ; correction d'un probl?\195?\168me de mise a jour de la courbe. Modified Paths: -------------- branches/FudaaModeleur_TC1Bis/fudaa_devel/ebli/src/org/fudaa/ebli/calque/ZEbliCalquePanelController.java branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/modeleur1d/Controller1d.java branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/modeleur1d/DataGeometryAdapter.java branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/modeleur1d/MdlFille1d.java branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/modeleur1d/VueBief.java branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/modeleur1d/VueCourbe.java branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/modeleur1d/VueTableau.java Modified: branches/FudaaModeleur_TC1Bis/fudaa_devel/ebli/src/org/fudaa/ebli/calque/ZEbliCalquePanelController.java =================================================================== --- branches/FudaaModeleur_TC1Bis/fudaa_devel/ebli/src/org/fudaa/ebli/calque/ZEbliCalquePanelController.java 2008-12-15 10:28:14 UTC (rev 4303) +++ branches/FudaaModeleur_TC1Bis/fudaa_devel/ebli/src/org/fudaa/ebli/calque/ZEbliCalquePanelController.java 2008-12-15 16:28:55 UTC (rev 4304) @@ -533,8 +533,8 @@ } } - public List getActions() { - final List actions = new ArrayList(); + public List<EbliActionInterface> getActions() { + final List<EbliActionInterface> actions = new ArrayList<EbliActionInterface>(); buildActions(); actions.addAll(Arrays.asList(selectedActionGroup_)); actions.add(null); Modified: branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/modeleur1d/Controller1d.java =================================================================== --- branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/modeleur1d/Controller1d.java 2008-12-15 10:28:14 UTC (rev 4303) +++ branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/modeleur1d/Controller1d.java 2008-12-15 16:28:55 UTC (rev 4304) @@ -7,8 +7,12 @@ */ package org.fudaa.fudaa.modeleur.modeleur1d; +import java.awt.Color; +import java.util.ArrayList; +import java.util.HashSet; import java.util.List; +import javax.swing.Action; import javax.swing.JComponent; import javax.swing.JDesktopPane; import javax.swing.event.InternalFrameAdapter; @@ -26,18 +30,22 @@ import org.fudaa.ebli.calque.ZSelectionEvent; import org.fudaa.ebli.calque.ZSelectionListener; import org.fudaa.ebli.calque.edition.ZModeleLigneBriseeEditable; +import org.fudaa.ebli.commun.EbliActionInterface; +import org.fudaa.ebli.commun.EbliFormatter; +import org.fudaa.ebli.commun.EbliFormatterInterface; import org.fudaa.ebli.commun.EbliLib; import org.fudaa.fudaa.commun.FudaaLib; import org.fudaa.fudaa.modeleur.MdlImplementation; import com.memoire.bu.BuDesktop; +import com.memoire.bu.BuLabel; /** * Cette classe a la charge et la responsabilit\xE9 de g\xE9rer toutes les actions, * interactions et r\xE9actions de la fen\xEAtre 1d dans son ensemble. * * @author Emmanuel MARTIN - * @version $Id:$ + * @version $Id$ */ public class Controller1d extends InternalFrameAdapter implements ZSelectionListener, ListSelectionListener, CtuluListSelectionListener { @@ -47,6 +55,8 @@ private VueTableau vueTableau_; /** La vue d'un profil via une courbe. */ private VueCourbe vueCourbe_; + /** Un label pour afficher les erreurs. */ + private BuLabel vueError_; /** Le lien avec le reste de l'application. */ private MdlImplementation appli_; /** La frame contenant tous les widgets 1d. */ @@ -55,6 +65,8 @@ private boolean listenEventSelection_=true; /** L'adapter des donn\xE9es de la geometry en cours de manipulation. */ private DataGeometryAdapter dataGeomAdapter_; + /** Formater */ + private EbliFormatterInterface formater_=new EbliFormatter(); public Controller1d(MdlImplementation _appli, MdlFille1d _frame1d){ appli_=_appli; @@ -63,11 +75,14 @@ vueBief_=new VueBief(appli_, this); vueBief_.getScene().addSelectionListener(this); treeModel_=vueBief_.getArbreCalqueModel(); - dataGeomAdapter_=new DataGeometryAdapter(null, -1); + dataGeomAdapter_=new DataGeometryAdapter(this, null, -1); vueTableau_=new VueTableau(this, dataGeomAdapter_); vueTableau_.addSelectionListener(this); vueCourbe_=new VueCourbe(this, dataGeomAdapter_); vueCourbe_.addSelectionListener(this); + vueError_=new BuLabel(); + vueError_.setForeground(Color.RED); + vueError_.setText(""); } public VueBief getVueBief(){ @@ -79,7 +94,24 @@ public VueCourbe getVueCourbe(){ return vueCourbe_; } + public JComponent getVueError(){ + return vueError_; + } + public EbliFormatterInterface getFormater(){ + return formater_; + } + + // Gestion de l'affichage des erreurs. \\ + + public void showError(String _message){ + vueError_.setText(_message); + } + + public void clearError(){ + vueError_.setText(null); + } + // Gestion de l'arbre \\ /** Le model de l'arbre a afficher sur la droite de l'\xE9cran. */ @@ -115,7 +147,22 @@ BuDesktop buJ=null; if (j instanceof BuDesktop) buJ=(BuDesktop)j; - final List<?> l=EbliLib.updateToolButtons(vueBief_.getController().getActions(), buJ); + List<EbliActionInterface> actionAbs=vueBief_.getController().getActions(); + // Selection des actions + String[] tmpAction=new String[]{"RECTANGLE_SELECTION", "POLYGON_SELECTION", "RESTORE", "ZOOM", "ZOOM_ON_SELECTED", + "LAST_VIEW", "MOVE_VIEW", "CHANGE_REFERENCE", "NAVIGATE"}; + // info : Actions not kept : "CHOOSE_COLOR_PALET", "EDIT_LEGEND", "CONFIGURE", "INFOS", "TABLE" + HashSet<String> actionsKept=new HashSet<String>(); + for (int i=0; i<tmpAction.length; i++) + actionsKept.add(tmpAction[i]); + List<EbliActionInterface> actions=new ArrayList<EbliActionInterface>(); + for (int i=0; i<actionAbs.size(); i++) + if (actionAbs.get(i)==null) + actions.add(actionAbs.get(i)); + else if (actionsKept.contains(actionAbs.get(i).getValue(Action.ACTION_COMMAND_KEY))) + actions.add(actionAbs.get(i)); + // Construction des boutons + final List<?> l=EbliLib.updateToolButtons(actions, buJ); specificTools_=new JComponent[l.size()]; l.toArray(specificTools_); } @@ -132,44 +179,46 @@ * Changement de la selection dans le widget de bief. */ public void selectionChanged(ZSelectionEvent _evt) { + clearError(); ZScene scene=vueBief_.getScene(); int sceneIdSelected=scene.getSelectionHelper().getUniqueSelectedIdx(); - if(sceneIdSelected==-1) + boolean ok=true; // Indique si tout s'est bien pass\xE9. + if (sceneIdSelected==-1) // Aucune selection dataGeomAdapter_.setData(null, -1); else { int idSelected=scene.sceneId2LayerId(sceneIdSelected); - // Seulement en cas de changement de selection - if (idSelected!=dataGeomAdapter_.getIdxGeom()) { - // Extraction des diff\xE9rentes informations n\xE9c\xE9ssaires au changement de - // courbe \\ - ZCalqueAffichageDonneesInterface calque=scene.getLayerForId(sceneIdSelected); - if (calque.modeleDonnees() instanceof ZModeleLigneBriseeEditable) { - GISZoneCollectionLigneBrisee zone=((ZModeleLigneBriseeEditable)calque.modeleDonnees()).getGeomData(); - if (zone.getIndiceOf(GISAttributeConstants.NATURE)!=-1) { - if (zone.getValue(zone.getIndiceOf(GISAttributeConstants.NATURE), idSelected)==GISAttributeConstants.ATT_NATURE_PF) { - try { - dataGeomAdapter_.setData(zone, idSelected); - } - catch (IllegalArgumentException _exp) { - appli_.warn(FudaaLib.getS("Profil incorrect"), _exp.getMessage()); - } + // Extraction des diff\xE9rentes informations n\xE9c\xE9ssaires au changement de + // courbe \\ + ZCalqueAffichageDonneesInterface calque=scene.getLayerForId(sceneIdSelected); + if (calque.modeleDonnees() instanceof ZModeleLigneBriseeEditable) { + GISZoneCollectionLigneBrisee zone=((ZModeleLigneBriseeEditable)calque.modeleDonnees()).getGeomData(); + if (zone.getIndiceOf(GISAttributeConstants.NATURE)!=-1) { + if (zone.getValue(zone.getIndiceOf(GISAttributeConstants.NATURE), idSelected)==GISAttributeConstants.ATT_NATURE_PF) { + try { + dataGeomAdapter_.setData(zone, idSelected); } - else { - // On a pas selectionn\xE9 un profil, on annule la selection - dataGeomAdapter_.setData(null, -1); - scene.clearSelection(); + catch (IllegalArgumentException _exp) { + showError(_exp.getMessage()); } } else - // Il n'y a pas d'attribut Nature, on annule la selection - scene.clearSelection(); + // On a pas selectionn\xE9 un profil, on annule la selection + ok=false; } else - // Le type de model ne correspond pas, on annule la selection - scene.clearSelection(); + // Il n'y a pas d'attribut Nature, on annule la selection + ok=false; } + else + // Le type de model ne correspond pas, on annule la selection + ok=false; } + if(!ok) { + //dataGeomAdapter_.setData(null, -1); + scene.clearSelection(); + showError(FudaaLib.getS("Seuls les profils sont selectionnables.")); + } } /** Modified: branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/modeleur1d/DataGeometryAdapter.java =================================================================== --- branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/modeleur1d/DataGeometryAdapter.java 2008-12-15 10:28:14 UTC (rev 4303) +++ branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/modeleur1d/DataGeometryAdapter.java 2008-12-15 16:28:55 UTC (rev 4304) @@ -26,9 +26,11 @@ * inutils et en ajoutant une information d'abcisse curviligne. * * @author Emmanuel MARTIN - * @version $Id:$ + * @version $Id$ */ class DataGeometryAdapter implements DataGeometry { + /** Le controller, pour afficher des messages d'erreur. */ + private Controller1d controller_; private GISZoneCollectionLigneBrisee zone_; private int idxGeom_; private CtuluCollection z_; @@ -41,7 +43,10 @@ int idxRupture1_; int idxRupture2_; - public DataGeometryAdapter(GISZoneCollectionLigneBrisee _zone, int _idxGeom) throws IllegalArgumentException { + public DataGeometryAdapter(Controller1d _controller, GISZoneCollectionLigneBrisee _zone, int _idxGeom) throws IllegalArgumentException { + if(_controller==null) + throw new IllegalArgumentException("Controller1d ne doit pas \xEAtre null."); + controller_=_controller; setData(_zone, _idxGeom); } @@ -70,11 +75,11 @@ CoordinateSequence seq=((GISCoordinateSequenceContainerInterface)zone_.getGeometry(idxGeom_)).getCoordinateSequence(); // Verifie qu'on a bien au minimum deux points. \\ if (seq.size()<2) - throw new IllegalArgumentException(FudaaLib.getS("La g\xE9ometrie doit avoir au minimum deux points.")); + throw new IllegalArgumentException(FudaaLib.getS("Le profil doit avoir au minimum deux points.")); // Verifie que deux points cons\xE9cutifs ne sont pas confondus. \\ for (int i=1; i<seq.size(); i++) if (seq.getX(i-1)==seq.getX(i)&&seq.getY(i-1)==seq.getY(i)) - throw new IllegalArgumentException(FudaaLib.getS("Au moins deux points dans la g\xE9om\xE9trie sont confondus.")); + throw new IllegalArgumentException(FudaaLib.getS("Au moins deux points dans le profil sont confondus.")); // Calcul des acbscisses curvilignes => hypoth\xE8se d'ordonnancement // correcte des points \\ double curvPre=0; @@ -139,7 +144,7 @@ else if (idxRupture2_==-1) idxRupture2_=idx-1; else - throw new IllegalArgumentException(FudaaLib.getS("Il y a plus que deux ruptures dans la g\xE9om\xE9trie.")); + throw new IllegalArgumentException(FudaaLib.getS("Il y a plus que deux ruptures dans le profil.")); } // Pr\xE9paration de l'it\xE9ration suivante coefDirecteur=newCoefDirecteur; @@ -193,12 +198,13 @@ } public void setCurv(int _idxPoint, double _value) { + controller_.clearError(); if(curv_==null) return; CoordinateSequence seq=((GISCoordinateSequenceContainerInterface)zone_.getGeometry(idxGeom_)).getCoordinateSequence(); Coordinate[] coords=seq.toCoordinateArray(); if(_idxPoint==0||_idxPoint==seq.size()-1){ - System.out.println("Le d\xE9placement curviligne est points extr\xE9mit\xE9s n'est pour l'instant pas g\xE9r\xE9."); + controller_.showError(FudaaLib.getS("Le changement d'abscisse curviligne des extr\xE9mit\xE9s n'est pas g\xE9r\xE9 pour l'instant.")); return; } if(_value<0) @@ -241,20 +247,19 @@ // Mise a jour de la table des valeurs curvilignes if (_idxPoint!=0) curv_.set(_idxPoint, _value); - else { + else for (int i=1; i<curv_.size(); i++) curv_.set(i, curv_.get(i)-_value); - } + fireDataGeometryChanged(); } // Cas o\xF9 il y a d\xE9pacement d'un autre point => le signe de xa-xb va potentiellement chang\xE9 => cas interdit else - //TODO : ne rien faire - System.out.println("le point est d\xE9plac\xE9 au dela de ses points l'encadrants, mouvement impossible."); + controller_.showError(FudaaLib.getS("Il est interdit de d\xE9placer un point au dela des points l'encadrant.")); } else // Cas complexe : l'index est sur un point de rupture \\ // TODO : d\xE9placement sur l'\xE9llipse avec verification de non croisement des axes du profil - System.out.println("Le point selectionn\xE9 est un point de rupture, cas non g\xE9r\xE9 pour l'instant."); + controller_.showError(FudaaLib.getS("Le changement d'abscisse curviligne des points de ruptures n'est pas g\xE9r\xE9 pour l'instant.")); } public void setZ(int _idxPoint, double _value) { Modified: branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/modeleur1d/MdlFille1d.java =================================================================== --- branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/modeleur1d/MdlFille1d.java 2008-12-15 10:28:14 UTC (rev 4303) +++ branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/modeleur1d/MdlFille1d.java 2008-12-15 16:28:55 UTC (rev 4304) @@ -21,6 +21,8 @@ import org.fudaa.fudaa.modeleur.MdlImplementation; import org.fudaa.fudaa.sig.FSigResource; +import com.memoire.bu.BuBorderLayout; + /** * La fenetre interne vue 2D des donn\xE9es du modeleur. Elle construit le composant arbre de * calques {@link org.fudaa.ebli.calque.BArbreCalque}. La plupart des traitements est @@ -45,7 +47,9 @@ setClosable(true); controller_=new Controller1d(_appli, this); // Construction des vues contenues dans la fen\xEAtre. \\ - add(new JSplitPane(JSplitPane.VERTICAL_SPLIT, controller_.getVueBief(), new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, controller_.getVueTableau(), controller_.getVueCourbe()))); + setLayout(new BuBorderLayout()); + add(new JSplitPane(JSplitPane.VERTICAL_SPLIT, controller_.getVueBief(), new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, controller_.getVueTableau(), controller_.getVueCourbe())), BuBorderLayout.CENTER); + add(controller_.getVueError(), BuBorderLayout.SOUTH); setPreferredSize(new Dimension(500, 500)); setSize(getPreferredSize()); } Modified: branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/modeleur1d/VueBief.java =================================================================== --- branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/modeleur1d/VueBief.java 2008-12-15 10:28:14 UTC (rev 4303) +++ branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/modeleur1d/VueBief.java 2008-12-15 16:28:55 UTC (rev 4304) @@ -15,6 +15,7 @@ import org.fudaa.ebli.calque.BGroupeCalque; import org.fudaa.ebli.calque.ZEbliCalquesPanel; import org.fudaa.ebli.calque.edition.ZCalqueLigneBriseeEditable; +import org.fudaa.ebli.calque.edition.ZEditorDefault; import org.fudaa.ebli.calque.edition.ZModeleLigneBriseeEditable; import org.fudaa.fudaa.modeleur.MdlImplementation; import org.fudaa.fudaa.modeleur.layer.MdlLayer2dLine; @@ -28,7 +29,7 @@ * \xE9dit\xE9 via la vue par graphe 1d. * * @author Emmanuel MARTIN - * @version $Id:$ + * @version $Id$ */ public class VueBief extends ZEbliCalquesPanel { @@ -46,6 +47,12 @@ addCalque(duplicateCalquesBiefs(impl_.get2dFrame().getVisuPanel().getArbreCalqueModel().getRootCalque().getCalqueParNom("gcBiefs")), true); setPreferredSize(new Dimension(200, 200)); setSize(getPreferredSize()); + // Simplement pour bloquer l'\xE9dition lors d'un double clic + getController().getCqSelectionI().setEditor(new ZEditorDefault(this) { + public String edit() { + return null; + } + }); } /** Modified: branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/modeleur1d/VueCourbe.java =================================================================== --- branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/modeleur1d/VueCourbe.java 2008-12-15 10:28:14 UTC (rev 4303) +++ branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/modeleur1d/VueCourbe.java 2008-12-15 16:28:55 UTC (rev 4304) @@ -9,15 +9,24 @@ import java.awt.Color; import java.awt.Dimension; +import java.text.DecimalFormat; +import java.util.ArrayList; import java.util.Arrays; +import java.util.HashSet; +import java.util.List; +import javax.swing.AbstractButton; +import javax.swing.Action; import javax.swing.JComponent; import org.fudaa.ctulu.CtuluCommandContainer; +import org.fudaa.ctulu.CtuluLib; import org.fudaa.ctulu.CtuluListSelectionInterface; import org.fudaa.ctulu.CtuluListSelectionListener; +import org.fudaa.ctulu.CtuluNumberFormatDefault; import org.fudaa.ebli.commun.EbliActionInterface; import org.fudaa.ebli.commun.EbliComponentFactory; +import org.fudaa.ebli.commun.EbliLib; import org.fudaa.ebli.courbe.EGAxeHorizontal; import org.fudaa.ebli.courbe.EGAxeVertical; import org.fudaa.ebli.courbe.EGCourbeSimple; @@ -39,7 +48,7 @@ * selectionn\xE9 dans la vue du bief). * * @author Emmanuel MARTIN - * @version $Id:$ + * @version $Id$ */ public class VueCourbe extends BuPanel { @@ -59,12 +68,12 @@ } public void dataGeometryChanged() { - grapheVue_.fullRepaint(); + grapheVue_.structureChanged(); } public void dataGeometryNewGeom(){ + grapheVue_.structureChanged(); grapheVue_.restore(); - grapheVue_.fullRepaint(); } /* (non-Javadoc) @@ -220,6 +229,9 @@ axeY.setGrille(new TraceLigneModel(TraceLigne.LISSE, 1, Color.LIGHT_GRAY)); axeY.setTitre(FudaaLib.getS("Ordonn\xE9e : z")); axeY.setUnite(FudaaLib.getS("m\xE8tre")); + DecimalFormat df=CtuluLib.getDecimalFormat(); + df.setMaximumFractionDigits(2); + axeY.setSpecificFormat(new CtuluNumberFormatDefault(df)); axeY.setBounds(0, 50); axeY.setLineColor(Color.BLACK); // Cr\xE9ation de la courbe \\ @@ -230,15 +242,25 @@ // Cr\xE9ation du panel contenant l'ensemble des courbes \\ containerCourbe_ = new EGFillePanel(grapheVue_); setLayout(new BuBorderLayout()); - + // G\xE9n\xE9ration des boutons d'int\xE9raction. \\ BuSpecificBar speBar=new BuSpecificBar(); EbliActionInterface[] actionAbs=containerCourbe_.getSpecificActions(); - JComponent[] actions=new JComponent[actionAbs.length]; - for(int i=0;i<actionAbs.length;i++){ - if(actionAbs[i]!=null) - actions[i]=actionAbs[i].buildToolButton(EbliComponentFactory.INSTANCE); - } - speBar.addTools(actions); + EbliLib.updateMapKeyStroke(this, actionAbs); + // Selection des actions a concerver. + String[] tmpAction = {"SELECT", "RESTORE", "AUTO_REST", "CONFIGURE_REPERE", "ZOOM", "SUIVI", "MOVE_POINT" , "CONFIGURE", "INFOS", "TABLE"}; + // info : Actions not kept : "SIMPLIFY", "NEW_CURVE" + HashSet<String> actionsKept = new HashSet<String>();; + for(int i=0;i<tmpAction.length;i++) + actionsKept.add(tmpAction[i]); + // Construction des boutons + List<JComponent> actions=new ArrayList<JComponent>(); + for(int i=0;i<actionAbs.length;i++) + if(actionAbs[i]!=null && actionsKept.contains(actionAbs[i].getValue(Action.ACTION_COMMAND_KEY))){ + AbstractButton button = actionAbs[i].buildToolButton(EbliComponentFactory.INSTANCE); + button.setText(""); + actions.add(button); + } + speBar.addTools(actions.toArray(new JComponent[0])); add(speBar, BuBorderLayout.NORTH); add(containerCourbe_, BuBorderLayout.CENTER); Modified: branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/modeleur1d/VueTableau.java =================================================================== --- branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/modeleur1d/VueTableau.java 2008-12-15 10:28:14 UTC (rev 4303) +++ branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/modeleur1d/VueTableau.java 2008-12-15 16:28:55 UTC (rev 4304) @@ -13,6 +13,8 @@ import javax.swing.event.ListSelectionListener; import javax.swing.table.DefaultTableModel; +import org.fudaa.ctulu.gui.CtuluTable; +import org.fudaa.ebli.commun.EbliFormatterInterface; import org.fudaa.fudaa.commun.FudaaLib; import com.memoire.bu.BuBorderLayout; @@ -26,7 +28,7 @@ * du point. * * @author Emmanuel MARTIN - * @version $Id:$ + * @version $Id$ */ public class VueTableau extends BuPanel { @@ -35,10 +37,12 @@ */ protected class TableGeomModel extends DefaultTableModel implements DataGeometryListener { - private DataGeometry data_; + protected DataGeometry data_; + protected EbliFormatterInterface formater_; - public TableGeomModel(DataGeometry _data){ + public TableGeomModel(DataGeometry _data, EbliFormatterInterface _formater){ super(new String[]{FudaaLib.getS("Abs curv"), FudaaLib.getS("Z")}, 0); + formater_=_formater; if(_data==null) throw new IllegalArgumentException("_data ne doit pas \xEAtre null."); data_=_data; @@ -66,9 +70,15 @@ public Object getValueAt(int rowIndex, int columnIndex) { if(columnIndex==0) - return data_.getCurv(rowIndex); + if(formater_!=null) + return formater_.getXYFormatter().format(data_.getCurv(rowIndex)); + else + return data_.getCurv(rowIndex); else - return data_.getZ(rowIndex); + if(formater_!=null) + return formater_.getXYFormatter().format(data_.getZ(rowIndex)); + else + return data_.getZ(rowIndex); } public void setValueAt(Object value, int rowIndex, int columnIndex) { @@ -90,8 +100,8 @@ public VueTableau(Controller1d _controller, DataGeometry _data){ controller_=_controller; setLayout(new BuBorderLayout(2, 2)); - modelTable_=new TableGeomModel(_data); - table_=new JTable(modelTable_); + modelTable_=new TableGeomModel(_data, controller_.getFormater()); + table_=new CtuluTable(modelTable_); add(new BuScrollPane(table_)); setPreferredSize(new Dimension(200, 200)); setSize(getPreferredSize()); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fa...@us...> - 2008-12-15 10:28:20
|
Revision: 4303 http://fudaa.svn.sourceforge.net/fudaa/?rev=4303&view=rev Author: fargeix Date: 2008-12-15 10:28:14 +0000 (Mon, 15 Dec 2008) Log Message: ----------- Compilateur izpack Added Paths: ----------- trunk/fudaa_devel/fudaa-distrib/commun/standalone-compiler.jar Added: trunk/fudaa_devel/fudaa-distrib/commun/standalone-compiler.jar =================================================================== (Binary files differ) Property changes on: trunk/fudaa_devel/fudaa-distrib/commun/standalone-compiler.jar ___________________________________________________________________ Added: svn:mime-type + application/octet-stream This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fa...@us...> - 2008-12-15 10:27:19
|
Revision: 4302 http://fudaa.svn.sourceforge.net/fudaa/?rev=4302&view=rev Author: fargeix Date: 2008-12-15 10:27:03 +0000 (Mon, 15 Dec 2008) Log Message: ----------- Fichiers pour la compilation de Fudaa-Albe. Modified Paths: -------------- trunk/fudaa_devel/fudaa-distrib/albe/build.xml Added Paths: ----------- trunk/fudaa_devel/fudaa-distrib/albe/albe.PNG trunk/fudaa_devel/fudaa-distrib/albe/albe.bat trunk/fudaa_devel/fudaa-distrib/albe/albe.ico trunk/fudaa_devel/fudaa-distrib/albe/albe.jpg trunk/fudaa_devel/fudaa-distrib/albe/izpack/ trunk/fudaa_devel/fudaa-distrib/albe/izpack/Unix_shortcutSpec.xml trunk/fudaa_devel/fudaa-distrib/albe/izpack/izpack_fudaa_albe.xml trunk/fudaa_devel/fudaa-distrib/albe/izpack/shortcutSpec.xml Added: trunk/fudaa_devel/fudaa-distrib/albe/albe.PNG =================================================================== (Binary files differ) Property changes on: trunk/fudaa_devel/fudaa-distrib/albe/albe.PNG ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/fudaa_devel/fudaa-distrib/albe/albe.bat =================================================================== --- trunk/fudaa_devel/fudaa-distrib/albe/albe.bat (rev 0) +++ trunk/fudaa_devel/fudaa-distrib/albe/albe.bat 2008-12-15 10:27:03 UTC (rev 4302) @@ -0,0 +1,6 @@ +echo off +cls +echo Execution de Fudaa-Albe en cours... +java.exe -Xmx256m -DFUDAA_SERVEUR=serveurs\albe -jar fudaa-albe.jar +cls +echo Fin d'execution de Fudaa-Albe \ No newline at end of file Added: trunk/fudaa_devel/fudaa-distrib/albe/albe.ico =================================================================== (Binary files differ) Property changes on: trunk/fudaa_devel/fudaa-distrib/albe/albe.ico ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/fudaa_devel/fudaa-distrib/albe/albe.jpg =================================================================== (Binary files differ) Property changes on: trunk/fudaa_devel/fudaa-distrib/albe/albe.jpg ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Modified: trunk/fudaa_devel/fudaa-distrib/albe/build.xml =================================================================== --- trunk/fudaa_devel/fudaa-distrib/albe/build.xml 2008-12-14 20:45:17 UTC (rev 4301) +++ trunk/fudaa_devel/fudaa-distrib/albe/build.xml 2008-12-15 10:27:03 UTC (rev 4302) @@ -1,16 +1,17 @@ <?xml version="1.0" encoding="ISO-8859-15"?> <!-- ! @creation 2006-9-28 -! @modification $Date: 2007-10-29 15:06:12 $ +! @modification $Date: 2008-11-28 12:00:00 $ ! @license GNU General Public License 2 ! @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne -! @version $Id: build.xml,v 1.1 2007-10-29 15:06:12 clavreul Exp $ +! @version $Id: build.xml,v 1.2 2008-11-28 12:00:00 fargeix Exp $ ! @author Nicolas Clavreul ! ! build permettant de construire le jar --> <project name="albe" default="deploy" basedir="."> <import file="../ant-deploy.xml" /> + <taskdef name="izpack" classpath="../commun/standalone-compiler.jar" classname="com.izforge.izpack.ant.IzPackTask" /> <property name="this.main.class" value="Albe" /> <!-- @@ -87,4 +88,9 @@ </genjar> </target> --> + + <taskdef resource="genjar.properties"/> + <target name="createInstaller" description="cree l'installeur Albe"> + <izpack input="izpack/izpack_fudaa_albe.xml" output="../../../distrib/build/jar/albe/Fudaa_Albe_Install.jar" basedir="." /> + </target> </project> Added: trunk/fudaa_devel/fudaa-distrib/albe/izpack/Unix_shortcutSpec.xml =================================================================== --- trunk/fudaa_devel/fudaa-distrib/albe/izpack/Unix_shortcutSpec.xml (rev 0) +++ trunk/fudaa_devel/fudaa-distrib/albe/izpack/Unix_shortcutSpec.xml 2008-12-15 10:27:03 UTC (rev 4302) @@ -0,0 +1,40 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> +<shortcuts> + <programGroup defaultName="Applications Fudaa\Albe" location="applications"/> + <shortcut + name="Lancer Albe" + programGroup="yes" + desktop="yes" + applications="no" + startMenu="no" + startup="no" + target="$JAVA_HOME/bin/java" + commandLine="-DINSTALLDIR=$INSTALL_PATH -DFUDAA_SERVEUR=$INSTALL_PATH/serveurs/albe -cp $INSTALL_PATH/fudaa-albe.jar org.fudaa.fudaa.albe.Albe" + workingDirectory="$INSTALL_PATH" + type="Application" + iconFile="$INSTALL_PATH/albe.png" + initialState="noShow" + description="Lance le logiciel Albe"> + <createForPack name="Albe"/> + </shortcut> + + <shortcut + name="Supprimer Albe" + programGroup="yes" + desktop="yes" + applications="no" + startMenu="no" + startup="no" + target="$JAVA_HOME/bin/java" + commandLine="-jar "$INSTALL_PATH/Uninstaller/uninstaller.jar"" + initialState="noShow" + iconFile="trashcan_full" + iconIndex="0" + workingDirectory="" + type="Application" + encoding="UTF-8" + description="Supprime le logiciel Albe"> + <createForPack name="Albe"/> + </shortcut> + +</shortcuts> \ No newline at end of file Added: trunk/fudaa_devel/fudaa-distrib/albe/izpack/izpack_fudaa_albe.xml =================================================================== --- trunk/fudaa_devel/fudaa-distrib/albe/izpack/izpack_fudaa_albe.xml (rev 0) +++ trunk/fudaa_devel/fudaa-distrib/albe/izpack/izpack_fudaa_albe.xml 2008-12-15 10:27:03 UTC (rev 4302) @@ -0,0 +1,91 @@ +<?xml version="1.0" encoding="iso-8859-1" standalone="yes" ?> + +<!-- + A sample installation file. + Use it as a base for your own installers :-) + + To compile it : + - go in the bin directory where you installed IzPack + - call "compile ../sample/install.xml -b ../sample" +--> + +<installation version="1.0"> + + <!-- + The info section. + The meaning of the tags should be natural ... + --> + <info> + <appname>Albe</appname> + <appversion>1.1</appversion> + <authors> + <author name="Sabrina DELATTRE" email="de...@fu..."/> + </authors> + <url>http://www.cetmef.developpement-durable.gouv.fr/</url> + </info> + + <!-- + The gui preferences indication. + Sets the installer window to 640x480. It will not be able to change the size. + --> + <guiprefs width="800" height="520" resizable="no"/> + + <variables> + <variable name="$DesktopShortcutCheckboxEnabled" value="true"/> + </variables> + + <!-- + The locale section. + Asks here to include the English and French langpacks. + --> + <locale> + <langpack iso3="fra"/> + </locale> + + <!-- + The resources section. + The ids must be these ones if you want to use the LicencePanel and/or the InfoPanel. + --> + <resources> + <res id="LicencePanel.licence" src="../commun/licence.txt"/> + <res id="shortcutSpec.xml" src="izpack/shortcutSpec.xml"/> + <res id="Unix_shortcutSpec.xml" src="izpack/Unix_shortcutSpec.xml"/> + <res src="albe.jpg" id="Installer.image.0"/> + </resources> + + <!-- + The panels section. + We indicate here which panels we want to use. The order will be respected. + --> + <panels> + <panel classname="HelloPanel" id="hellopanel"/> + <panel classname="LicencePanel" id="licensepanel"/> + <panel classname="TargetPanel" id="targetpanel"/> + <panel classname="PacksPanel" id="packspanel"/> + <panel classname="InstallPanel" id="installpanel"/> + <panel classname="ShortcutPanel" id="shortcutpanel"/> + <panel classname="FinishPanel" id="finishpanel"/> + </panels> + + <!-- + The packs section. + We specify here our packs. + --> + + <packs> + <pack name="Albe" required="yes"> + <description>Installe tous les composants du logiciel Albe</description> + <file src="../commun/licence.txt" targetdir="$INSTALL_PATH"/> + <file src="albe.bat" targetdir="$INSTALL_PATH"/> + <file src="albe.ico" targetdir="$INSTALL_PATH"/> + <file src="albe.png" targetdir="$INSTALL_PATH"/> + <file src="../../../distrib/build/jar/albe/fudaa-albe.jar" targetdir="$INSTALL_PATH"/> + <file src="../../aide/src/albe" targetdir="$INSTALL_PATH/aide"/> + <file src="../../fudaa/serveurs/albe" targetdir="$INSTALL_PATH/serveurs"/> + <executable targetfile="$INSTALL_PATH/serveurs/albe/bin/linux/albe_linux.x" stage="never"/> + </pack> + </packs> + + <native type="izpack" name="ShellLink.dll"/> + +</installation> Added: trunk/fudaa_devel/fudaa-distrib/albe/izpack/shortcutSpec.xml =================================================================== --- trunk/fudaa_devel/fudaa-distrib/albe/izpack/shortcutSpec.xml (rev 0) +++ trunk/fudaa_devel/fudaa-distrib/albe/izpack/shortcutSpec.xml 2008-12-15 10:27:03 UTC (rev 4302) @@ -0,0 +1,36 @@ +<shortcuts> + <skipIfNotSupported/> + <programGroup defaultName="Applications Fudaa\Albe" location="applications"/> + <shortcut + name="Lancer Albe" + programGroup="yes" + desktop="yes" + applications="no" + startMenu="no" + startup="no" + target="$INSTALL_PATH\albe.bat" + commandLine="" + workingDirectory="$INSTALL_PATH" + iconFile="$INSTALL_PATH\albe.ico" + initialState="noShow" + description="Lance le logiciel Albe"> + <createForPack name="Albe"/> + </shortcut> + + <shortcut + name="Supprimer Albe" + programGroup="yes" + desktop="no" + applications="no" + startMenu="no" + startup="no" + target="$INSTALL_PATH\Uninstaller\uninstaller.jar" + commandLine="" + iconFile="%SystemRoot%\system32\SHELL32.dll" + iconIndex="31" + description="Supprime le logiciel Albe"> + + <createForPack name="Albe"/> + </shortcut> + +</shortcuts> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <de...@us...> - 2008-12-14 20:45:22
|
Revision: 4301 http://fudaa.svn.sourceforge.net/fudaa/?rev=4301&view=rev Author: deniger Date: 2008-12-14 20:45:17 +0000 (Sun, 14 Dec 2008) Log Message: ----------- maquetee v7 Modified Paths: -------------- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/TrLauncherDefault.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/common/tr_en.fr_txt branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostInterpolatePoint.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostLayoutFille.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostLayoutPanelController.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostProjet.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostVisuPanel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/dialogSpec/TrPostWizardCourbeTemporelle.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/dialogSpec/TrPostWizardProfilSpatial.java Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/TrLauncherDefault.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/TrLauncherDefault.java 2008-12-14 20:44:06 UTC (rev 4300) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/TrLauncherDefault.java 2008-12-14 20:45:17 UTC (rev 4301) @@ -131,8 +131,8 @@ infoSoft = new BuInformationsSoftware(); infoSoft.name = "prepro"; - infoSoft.version = "0.92-MAQUETTE-V6"; - infoSoft.date = "2008-10-31"; + infoSoft.version = "0.92-MAQUETTE-V7"; + infoSoft.date = "2008-12-13"; infoSoft.rights = TrResource.getS("Tous droits r\xE9serv\xE9s") + ". CETMEF (c)2003-2007"; infoSoft.contact = "fre...@fu..."; infoSoft.license = "GPL2"; Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/common/tr_en.fr_txt =================================================================== (Binary files differ) Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostInterpolatePoint.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostInterpolatePoint.java 2008-12-14 20:44:06 UTC (rev 4300) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostInterpolatePoint.java 2008-12-14 20:45:17 UTC (rev 4301) @@ -18,7 +18,7 @@ public class TrPostInterpolatePoint { public final int idxElt_; - public final double x_; + final double x_; final double y_; private final GISPrecision precision_; @@ -95,11 +95,11 @@ return idxElt_; } - protected double getX() { + public double getX() { return x_; } - protected double getY() { + public double getY() { return y_; } } \ No newline at end of file Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostLayoutFille.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostLayoutFille.java 2008-12-14 20:44:06 UTC (rev 4300) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostLayoutFille.java 2008-12-14 20:45:17 UTC (rev 4301) @@ -221,8 +221,8 @@ * @param _node * @see org.fudaa.fudaa.tr.post.TrPostLayoutPanelController#addNode(org.fudaa.ebli.visuallibrary.EbliNode) */ - public void addNode(final EbliNode _node) { - controller_.addNode(_node); + public Widget addNode(final EbliNode _node) { + return controller_.addNode(_node); } /** Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostLayoutPanelController.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostLayoutPanelController.java 2008-12-14 20:44:06 UTC (rev 4300) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostLayoutPanelController.java 2008-12-14 20:45:17 UTC (rev 4301) @@ -68,6 +68,7 @@ import org.fudaa.fudaa.tr.post.actions.TrPostActionDuplicateLayout; import org.fudaa.fudaa.tr.post.dialogSpec.TrPostWizardCreateScope; import org.jdesktop.swingx.ScrollPaneSelector; +import org.netbeans.api.visual.widget.Widget; import com.memoire.bu.BuDesktop; import com.memoire.bu.BuMenu; @@ -325,20 +326,20 @@ return nodeFleche; } - + public EbliNode addFlecheSimple() { - // -- ajout du rectangle --// - final EbliNodeDefault nodeFleche = new EbliNodeDefault(); - nodeFleche.setTitle("Fleche simple"); - nodeFleche.setCreator(new EbliWidgetCreatorShape(new ShapeCreatorFlecheSimple())); - nodeFleche.setPreferedSize(new Dimension(100, 50)); - nodeFleche.setPreferedLocation(new Point(350, 125)); + // -- ajout du rectangle --// + final EbliNodeDefault nodeFleche = new EbliNodeDefault(); + nodeFleche.setTitle("Fleche simple"); + nodeFleche.setCreator(new EbliWidgetCreatorShape(new ShapeCreatorFlecheSimple())); + nodeFleche.setPreferedSize(new Dimension(100, 50)); + nodeFleche.setPreferedLocation(new Point(350, 125)); - // ajout du node au layout - addNode(nodeFleche); + // ajout du node au layout + addNode(nodeFleche); - return nodeFleche; - } + return nodeFleche; + } public EbliNode addDblFleche() { // -- ajout du rectangle --// @@ -359,8 +360,8 @@ * * @param node */ - public void addNode(final EbliNode node) { - getSceneCourante().addNode(node); + public Widget addNode(final EbliNode node) { + Widget addNode = getSceneCourante().addNode(node); // -- rafraichissement de la scene pour eviter les plantages --// getSceneCourante().refresh(); @@ -368,6 +369,7 @@ // -- commande undo/redo pour la creation de widget --// getSceneCourante().getCmdMng().addCmd( new CommandUndoRedoCreation(node, getSceneCourante(), node.getPreferedLocation())); + return addNode; } public EbliNode addRectangle() { @@ -443,7 +445,7 @@ addFleche(); } }); - + // -- palette double fleche --// // crystal_bu_scrollpane_corner.png _l.add(new EbliActionSimple(EbliResource.EBLI.getString("Double Fleche"), EbliResource.EBLI Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostProjet.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostProjet.java 2008-12-14 20:44:06 UTC (rev 4300) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostProjet.java 2008-12-14 20:45:17 UTC (rev 4301) @@ -14,6 +14,9 @@ import java.awt.event.ActionListener; import java.io.File; import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.HashSet; import java.util.Iterator; import java.util.List; import java.util.Observable; @@ -67,6 +70,8 @@ import org.fudaa.fudaa.tr.post.data.TrPostDataListener; import org.fudaa.fudaa.tr.post.persist.TrPostPersistenceManager; import org.fudaa.fudaa.tr.post.save.TrPostProjetSaver; +import org.netbeans.api.visual.model.ObjectState; +import org.netbeans.api.visual.widget.Widget; import com.memoire.bu.BuBorderLayout; import com.memoire.bu.BuButton; @@ -95,1285 +100,1287 @@ */ public class TrPostProjet implements ActionListener { - /** - * Manager de sauvegarder/charghement des donn\xE9es - */ - private TrPostPersistenceManager manager_; + /** + * Manager de sauvegarder/charghement des donn\xE9es + */ + private TrPostPersistenceManager manager_; - public TrPostPersistenceManager getManager() { - if (manager_ == null) manager_ = new TrPostPersistenceManager(this); + public TrPostPersistenceManager getManager() { + if (manager_ == null) manager_ = new TrPostPersistenceManager(this); - return manager_; - } + return manager_; + } - private class TimeContentUpdater implements ListDataListener { + private class TimeContentUpdater implements ListDataListener { - protected TimeContentUpdater() { + protected TimeContentUpdater() { - } + } - protected void updateAll() { - // TODO a revoir - // if (fille_ != null && fille_.isVisible()) { - // if (CtuluLibMessage.DEBUG) { - // CtuluLibMessage.debug("update fill time format"); - // } - // final TrPostVisuPanel panel = (TrPostVisuPanel) fille_.getVisuPanel(); - // final BCalque[] cqs = panel.getDonneesCalque().getCalques(); - // for (int i = cqs.length - 1; i >= 0; i--) { - // final BCalque calque = cqs[i]; - // if (calque instanceof TrPostFlecheLayer) { - // ((TrPostFlecheLayer) calque).timeStepFormatChanged(); - // } else if (calque instanceof TrIsoLayerDefault) { - // ((TrIsoLayerDefault) calque).timeStepFormatChanged(); - // } - // } - // final TrPostFlecheLayer flecheLayer = panel.getFlecheLayer(); - // if (flecheLayer != null) { - // flecheLayer.timeStepFormatChanged(); - // } - // final TrIsoLayer liso = panel.getIsoLayer(); - // if (liso != null && liso.isVisible()) { - // liso.timeStepFormatChanged(); - // } - // if (!fille_.getArbreCalqueModel().getTreeSelectionModel().isSelectionEmpty()) { - // final TreePath[] path = fille_.getArbreCalqueModel().getTreeSelectionModel().getSelectionPaths(); - // fille_.getArbreCalqueModel().getTreeSelectionModel().clearSelection(); - // fille_.getArbreCalqueModel().getTreeSelectionModel().setSelectionPaths(path); - // } - // } - setProjectModified(); - } + protected void updateAll() { + // TODO a revoir + // if (fille_ != null && fille_.isVisible()) { + // if (CtuluLibMessage.DEBUG) { + // CtuluLibMessage.debug("update fill time format"); + // } + // final TrPostVisuPanel panel = (TrPostVisuPanel) fille_.getVisuPanel(); + // final BCalque[] cqs = panel.getDonneesCalque().getCalques(); + // for (int i = cqs.length - 1; i >= 0; i--) { + // final BCalque calque = cqs[i]; + // if (calque instanceof TrPostFlecheLayer) { + // ((TrPostFlecheLayer) calque).timeStepFormatChanged(); + // } else if (calque instanceof TrIsoLayerDefault) { + // ((TrIsoLayerDefault) calque).timeStepFormatChanged(); + // } + // } + // final TrPostFlecheLayer flecheLayer = panel.getFlecheLayer(); + // if (flecheLayer != null) { + // flecheLayer.timeStepFormatChanged(); + // } + // final TrIsoLayer liso = panel.getIsoLayer(); + // if (liso != null && liso.isVisible()) { + // liso.timeStepFormatChanged(); + // } + // if (!fille_.getArbreCalqueModel().getTreeSelectionModel().isSelectionEmpty()) { + // final TreePath[] path = fille_.getArbreCalqueModel().getTreeSelectionModel().getSelectionPaths(); + // fille_.getArbreCalqueModel().getTreeSelectionModel().clearSelection(); + // fille_.getArbreCalqueModel().getTreeSelectionModel().setSelectionPaths(path); + // } + // } + setProjectModified(); + } - public void contentsChanged(final ListDataEvent _event) { - updateAll(); - } + public void contentsChanged(final ListDataEvent _event) { + updateAll(); + } - public void intervalAdded(final ListDataEvent _event) { - updateAll(); - } + public void intervalAdded(final ListDataEvent _event) { + updateAll(); + } - public void intervalRemoved(final ListDataEvent _event) { - updateAll(); - } - } + public void intervalRemoved(final ListDataEvent _event) { + updateAll(); + } + } - class ModifyObserver implements Observer { + class ModifyObserver implements Observer { - private boolean isModified_; + private boolean isModified_; - protected void clearModified() { - isModified_ = false; - updateFrameState(); - } + protected void clearModified() { + isModified_ = false; + updateFrameState(); + } - protected void updateFrameState() { - if (impl_ != null) { - impl_.setEnabledForAction("ENREGISTRER", isModified_); - impl_.setEnabledForAction("ENREGISTRERSOUS", isModified_); - changedMainFrameState(); - } - } + protected void updateFrameState() { + if (impl_ != null) { + impl_.setEnabledForAction("ENREGISTRER", isModified_); + impl_.setEnabledForAction("ENREGISTRERSOUS", isModified_); + changedMainFrameState(); + } + } - public boolean isModified() { - return isModified_; - } + public boolean isModified() { + return isModified_; + } - public void setModified() { - isModified_ = true; - updateFrameState(); - } + public void setModified() { + isModified_ = true; + updateFrameState(); + } - public void update(final Observable _o, final Object _arg) { - setModified(); - } + public void update(final Observable _o, final Object _arg) { + setModified(); + } - } + } - class VariableListener implements TrPostDataListener { + class VariableListener implements TrPostDataListener { - public void dataAdded(final boolean _isFleche) { - if (impl_ == null) { return; } - final JInternalFrame[] allFrames = impl_.getAllInternalFrames(); - if (allFrames != null) { - for (int i = allFrames.length - 1; i >= 0; i--) { - TrPostDataListener l = null; - if (allFrames[i] instanceof TrPostDataListener) { - l = (TrPostDataListener) allFrames[i]; - } else if (allFrames[i].getContentPane() instanceof TrPostDataListener) { - l = (TrPostDataListener) allFrames[i].getContentPane(); - } - if (l != null) { - l.dataAdded(_isFleche); - } - } - } - setProjectModified(); - } + public void dataAdded(final boolean _isFleche) { + if (impl_ == null) { return; } + final JInternalFrame[] allFrames = impl_.getAllInternalFrames(); + if (allFrames != null) { + for (int i = allFrames.length - 1; i >= 0; i--) { + TrPostDataListener l = null; + if (allFrames[i] instanceof TrPostDataListener) { + l = (TrPostDataListener) allFrames[i]; + } else if (allFrames[i].getContentPane() instanceof TrPostDataListener) { + l = (TrPostDataListener) allFrames[i].getContentPane(); + } + if (l != null) { + l.dataAdded(_isFleche); + } + } + } + setProjectModified(); + } - public void dataChanged(final H2dVariableType _old, final H2dVariableType _new, final boolean _contentChanged, - final boolean _isFleche, final Set _varDepending) { - if (impl_ == null) { return; } - final JInternalFrame[] allFrames = impl_.getAllInternalFrames(); - if (allFrames != null) { - for (int i = allFrames.length - 1; i >= 0; i--) { - TrPostDataListener l = null; - if (allFrames[i] instanceof TrPostDataListener) { - l = (TrPostDataListener) allFrames[i]; - } else if (allFrames[i].getContentPane() instanceof TrPostDataListener) { - l = (TrPostDataListener) allFrames[i].getContentPane(); - } - if (l != null) { - l.dataChanged(_old, _new, _contentChanged, _isFleche, _varDepending); - } - } - } - setProjectModified(); - } + public void dataChanged(final H2dVariableType _old, final H2dVariableType _new, final boolean _contentChanged, + final boolean _isFleche, final Set _varDepending) { + if (impl_ == null) { return; } + final JInternalFrame[] allFrames = impl_.getAllInternalFrames(); + if (allFrames != null) { + for (int i = allFrames.length - 1; i >= 0; i--) { + TrPostDataListener l = null; + if (allFrames[i] instanceof TrPostDataListener) { + l = (TrPostDataListener) allFrames[i]; + } else if (allFrames[i].getContentPane() instanceof TrPostDataListener) { + l = (TrPostDataListener) allFrames[i].getContentPane(); + } + if (l != null) { + l.dataChanged(_old, _new, _contentChanged, _isFleche, _varDepending); + } + } + } + setProjectModified(); + } - public void dataRemoved(final H2dVariableType[] _vars, final boolean _isFleche) { - if (impl_ == null) { return; } - final JInternalFrame[] allFrames = impl_.getAllInternalFrames(); - if (allFrames != null) { - for (int i = allFrames.length - 1; i >= 0; i--) { - TrPostDataListener l = null; - if (allFrames[i] instanceof TrPostDataListener) { - l = (TrPostDataListener) allFrames[i]; - } else if (allFrames[i].getContentPane() instanceof TrPostDataListener) { - l = (TrPostDataListener) allFrames[i].getContentPane(); - } - if (l != null) { - l.dataRemoved(_vars, _isFleche); - } - } - } - setProjectModified(); - } + public void dataRemoved(final H2dVariableType[] _vars, final boolean _isFleche) { + if (impl_ == null) { return; } + final JInternalFrame[] allFrames = impl_.getAllInternalFrames(); + if (allFrames != null) { + for (int i = allFrames.length - 1; i >= 0; i--) { + TrPostDataListener l = null; + if (allFrames[i] instanceof TrPostDataListener) { + l = (TrPostDataListener) allFrames[i]; + } else if (allFrames[i].getContentPane() instanceof TrPostDataListener) { + l = (TrPostDataListener) allFrames[i].getContentPane(); + } + if (l != null) { + l.dataRemoved(_vars, _isFleche); + } + } + } + setProjectModified(); + } - } + } - // transient TrPostFille fille_; - // - // /** - // * Fenetre fille qui contient le layout scene. Cette fenetre remplace petit a petit fille_ - // */ - // // protected transient TrPostLayoutFille filleLayout_; - // ArrayList<TrPostLayoutFille> listeFillesLayout = new ArrayList<TrPostLayoutFille>(); + // transient TrPostFille fille_; + // + // /** + // * Fenetre fille qui contient le layout scene. Cette fenetre remplace petit a petit fille_ + // */ + // // protected transient TrPostLayoutFille filleLayout_; + // ArrayList<TrPostLayoutFille> listeFillesLayout = new ArrayList<TrPostLayoutFille>(); - /** - * liste des noeuds pour gerer le cut/copy/paste avec en + le undo/redo - */ - // liste des noeuds copies - Set<EbliNode> nodesCopyied = null; - // liste des noeuuds coupes - Set<EbliNode> nodesCutted = null; + /** + * liste des noeuds pour gerer le cut/copy/paste avec en + le undo/redo + */ + // liste des noeuds copies + Set<EbliNode> nodesCopyied = null; + // liste des noeuuds coupes + Set<EbliNode> nodesCutted = null; - // /** - // *ajout une fillelayout a la liste des frame layout - // * - // * @param _fille - // */ - // public void addFillesLayout(TrPostLayoutFille _fille) { - // listeFillesLayout.add(_fille); - // } + // /** + // *ajout une fillelayout a la liste des frame layout + // * + // * @param _fille + // */ + // public void addFillesLayout(TrPostLayoutFille _fille) { + // listeFillesLayout.add(_fille); + // } - // /** - // * retourne la frame layout en cours d utilisation par le user. sinon retourne la premiere fille. IMPORTANT: il faut - // * passer par cette methode pour etre root\xE9 vers la bonne scene en cours de manip. - // * - // * @return - // */ - // public TrPostLayoutFille getSelectedFilleLayout() { - // for (Iterator<TrPostLayoutFille> it = listeFillesLayout.iterator(); it.hasNext();) { - // TrPostLayoutFille fille = it.next(); - // if (fille.isSelected()) return fille; - // } - // // sinon retourne la premier frame - // return listeFillesLayout.get(0); - // } + // /** + // * retourne la frame layout en cours d utilisation par le user. sinon retourne la premiere fille. IMPORTANT: il faut + // * passer par cette methode pour etre root\xE9 vers la bonne scene en cours de manip. + // * + // * @return + // */ + // public TrPostLayoutFille getSelectedFilleLayout() { + // for (Iterator<TrPostLayoutFille> it = listeFillesLayout.iterator(); it.hasNext();) { + // TrPostLayoutFille fille = it.next(); + // if (fille.isSelected()) return fille; + // } + // // sinon retourne la premier frame + // return listeFillesLayout.get(0); + // } - /** - * internalframe qui gere les multiProjets - */ - public TrPostProjetsManagerFille filleProjetctManager_; + /** + * internalframe qui gere les multiProjets + */ + public TrPostProjetsManagerFille filleProjetctManager_; - /** - * Le menu du post qui contient tout les sous menus des projets - */ - BuMenu menuPost_; - BuMenu menuLayout_ = new BuMenu(TrResource.getS("Layout"), "LAYOUTMANAGER");; - List<BuMenu> listeMenuProjets_; + /** + * Le menu du post qui contient tout les sous menus des projets + */ + BuMenu menuPost_; + BuMenu menuLayout_ = new BuMenu(TrResource.getS("Layout"), "LAYOUTMANAGER");; + List<BuMenu> listeMenuProjets_; - List<ArrayList<BuMenuItem>> listeSousMenuProjets_; + List<ArrayList<BuMenuItem>> listeSousMenuProjets_; - /** - * Observable custom reserv\xE9 aux modifs apport\xE9es a la liste des src. - * - * @author Adrien Hadoux - */ - class observableSupport extends Observable { - @Override - public void notifyObservers() { - this.setChanged(); - super.notifyObservers(); - } + /** + * Observable custom reserv\xE9 aux modifs apport\xE9es a la liste des src. + * + * @author Adrien Hadoux + */ + class observableSupport extends Observable { + @Override + public void notifyObservers() { + this.setChanged(); + super.notifyObservers(); + } - @Override - public void notifyObservers(final Object arg) { - this.setChanged(); - super.notifyObservers(arg); - } + @Override + public void notifyObservers(final Object arg) { + this.setChanged(); + super.notifyObservers(arg); + } - } + } - private observableSupport observable; + private observableSupport observable; - public observableSupport getObservable() { - if (observable == null) observable = new observableSupport(); - return observable; - } + public observableSupport getObservable() { + if (observable == null) observable = new observableSupport(); + return observable; + } - public void notifyObservers() { - // getObservable().setChanged(); + public void notifyObservers() { + // getObservable().setChanged(); - getObservable().notifyObservers(); + getObservable().notifyObservers(); - } + } - transient int idxFilleG_; + transient int idxFilleG_; - public transient TrPostCommonImplementation impl_; + public transient TrPostCommonImplementation impl_; - ModifyObserver modifyState_ = new ModifyObserver(); + ModifyObserver modifyState_ = new ModifyObserver(); - /** - * Donnees courantes du trpost. - */ - // transient TrPostSource src_; - /** - * liste des sources pour le multiProjet. - */ - public transient ArrayList<TrPostSource> listeSrc_ = new ArrayList<TrPostSource>(); + /** + * Donnees courantes du trpost. + */ + // transient TrPostSource src_; + /** + * liste des sources pour le multiProjet. + */ + public transient ArrayList<TrPostSource> listeSrc_ = new ArrayList<TrPostSource>(); - transient TimeContentUpdater timeUpdater_; + transient TimeContentUpdater timeUpdater_; - public TrPostProjet(final TrPostCommonImplementation _impl) { - this(null, _impl); + public TrPostProjet(final TrPostCommonImplementation _impl) { + this(null, _impl); - } + } - public TrPostProjet(final TrPostSource _src, final TrPostCommonImplementation _impl) { - if (_src != null) ajouterSource(_src); + public TrPostProjet(final TrPostSource _src, final TrPostCommonImplementation _impl) { + if (_src != null) ajouterSource(_src); - // -- creation de la frame de gestion multi projet --// - filleProjetctManager_ = new TrPostProjetsManagerFille(this); - impl_ = _impl; + // -- creation de la frame de gestion multi projet --// + filleProjetctManager_ = new TrPostProjetsManagerFille(this); + impl_ = _impl; - } + } - /** - * Permet d ajouter une source dans le projet afin de gerer le multi source. On doit toujorus passer par cette methode - * pour ajouter une source. - * - * @param _src - */ - public void ajouterSource(final TrPostSource _src) { - _src.addVariableListener(new VariableListener()); - if (_src.getFile() == null || !isSourceLoaded(_src.getFile().getAbsolutePath())) { - listeSrc_.add(_src); - _src.buildDefaultVarUpdateLists(); + /** + * Permet d ajouter une source dans le projet afin de gerer le multi source. On doit toujorus passer par cette methode + * pour ajouter une source. + * + * @param _src + */ + public void ajouterSource(final TrPostSource _src) { + _src.addVariableListener(new VariableListener()); + if (_src.getFile() == null || !isSourceLoaded(_src.getFile().getAbsolutePath())) { + listeSrc_.add(_src); + _src.buildDefaultVarUpdateLists(); - // -- ajout du menu correspondant uniquement a partir de la 2eme --// - // if (listeSrc_.size()>1 || (menuPost_!=null &&)) - construitMenuPostSpecifiqueSource(_src); + // -- ajout du menu correspondant uniquement a partir de la 2eme --// + // if (listeSrc_.size()>1 || (menuPost_!=null &&)) + construitMenuPostSpecifiqueSource(_src); - } else { - // -- messqge d erreur: le fichier est deja ouvert --// - new BuDialogMessage(impl_.getApp(), impl_.getInformationsSoftware(), "Le fichier est deja ouvert.").activate(); + } else { + // -- messqge d erreur: le fichier est deja ouvert --// + new BuDialogMessage(impl_.getApp(), impl_.getInformationsSoftware(), "Le fichier est deja ouvert.").activate(); - } + } - } + } - /** - * retourne la source dans la liste des sources correspondant au fichier. retourne null sinon. - * - * @param _file : path absolu du fichier - * @return - */ - public TrPostSource findSource(final String _file) { + /** + * retourne la source dans la liste des sources correspondant au fichier. retourne null sinon. + * + * @param _file : path absolu du fichier + * @return + */ + public TrPostSource findSource(final String _file) { - for (final Iterator<TrPostSource> it = listeSrc_.iterator(); it.hasNext();) { - final TrPostSource src = it.next(); - if (src.getFile().getAbsolutePath().equals(_file)) return src; - } + for (final Iterator<TrPostSource> it = listeSrc_.iterator(); it.hasNext();) { + final TrPostSource src = it.next(); + if (src.getFile().getAbsolutePath().equals(_file)) return src; + } - return null; - } + return null; + } - /** - * Retourne la source asscoi\xE9 a l id. - * @param _id - * @return - */ - public TrPostSource findSourceById(final String _id) { + /** + * Retourne la source asscoi\xE9 a l id. + * + * @param _id + * @return + */ + public TrPostSource findSourceById(final String _id) { - for (final Iterator<TrPostSource> it = listeSrc_.iterator(); it.hasNext();) { - final TrPostSource src = it.next(); - if (src.getId().equals(_id)) return src; - } + for (final Iterator<TrPostSource> it = listeSrc_.iterator(); it.hasNext();) { + final TrPostSource src = it.next(); + if (src.getId().equals(_id)) return src; + } - return null; - } - - /** - * indique si il existe une source portant le nom du fichier en param. - * - * @param _file : path absolu du fichier - * @return - */ - public boolean isSourceLoaded(final String _file) { - if (findSource(_file) == null) return false; - return true; - } + return null; + } - // /** - // * methode qui change la source courante et retourne true si la source existe bien, false sinon - // * - // * @param _file : path absolu du fichier - // * @return - // */ - // public boolean changeSource(final TrPostSource _src) { - // - // src_ = _src; - // - // return true; - // } + /** + * indique si il existe une source portant le nom du fichier en param. + * + * @param _file : path absolu du fichier + * @return + */ + public boolean isSourceLoaded(final String _file) { + if (findSource(_file) == null) return false; + return true; + } - /** - * Methode de suppression de la source - * - * @param src : TrPostSource, retourne true si la suppression a bien ete effectuee. - */ - public boolean removeSource(final TrPostSource src, final int n) { + // /** + // * methode qui change la source courante et retourne true si la source existe bien, false sinon + // * + // * @param _file : path absolu du fichier + // * @return + // */ + // public boolean changeSource(final TrPostSource _src) { + // + // src_ = _src; + // + // return true; + // } - if (isSourceLoaded(src.getFile().getAbsolutePath())) { - listeSrc_.remove(src); + /** + * Methode de suppression de la source + * + * @param src : TrPostSource, retourne true si la suppression a bien ete effectuee. + */ + public boolean removeSource(final TrPostSource src, final int n) { - // --recuperation du menu simul --// - final BuMenu menuSimul = getlisteMenuProjets_().get(n); + if (isSourceLoaded(src.getFile().getAbsolutePath())) { + listeSrc_.remove(src); - // --on retire les menus correspondants --// - // for (int i = 0; i < listeSousMenuProjets_.get(n).size(); i++) { - // BuMenuItem item = listeSousMenuProjets_.get(n).get(i); - // menuSimul.remove(item); - // } + // --recuperation du menu simul --// + final BuMenu menuSimul = getlisteMenuProjets_().get(n); - // -- on retire le menuSimul de la liste --// - menuPost_.remove(menuSimul); + // --on retire les menus correspondants --// + // for (int i = 0; i < listeSousMenuProjets_.get(n).size(); i++) { + // BuMenuItem item = listeSousMenuProjets_.get(n).get(i); + // menuSimul.remove(item); + // } - // -- on retire de la liste des menus le menusimul et la liste des sous - // menus --// - getlisteMenuProjets_().remove(n); - getlisteSousMenuProjets_().remove(n); + // -- on retire le menuSimul de la liste --// + menuPost_.remove(menuSimul); - // -- mise a jour de la barre des menus --// - impl_.getMainMenuBar().revalidate(); + // -- on retire de la liste des menus le menusimul et la liste des sous + // menus --// + getlisteMenuProjets_().remove(n); + getlisteSousMenuProjets_().remove(n); - //-- on met a jour la scene en enlevant tous les objets reli\xE9s \xE0 cette source --// - for(TrPostLayoutFille frame:impl_.getAllLayoutFille()){ - frame.getScene().removeAllWidgetLinkedToSrc(src); - } - - return true; - } else { - // -- messqge d erreur: le fichier est deja ouvert --// - new BuDialogMessage(impl_.getApp(), impl_.getInformationsSoftware(), - "Impossible de supprimer ce fichier de la liste.").activate(); + // -- mise a jour de la barre des menus --// + impl_.getMainMenuBar().revalidate(); - return false; - } + // -- on met a jour la scene en enlevant tous les objets reli\xE9s \xE0 cette source --// + for (TrPostLayoutFille frame : impl_.getAllLayoutFille()) { + frame.getScene().removeAllWidgetLinkedToSrc(src); + } - } + return true; + } else { + // -- messqge d erreur: le fichier est deja ouvert --// + new BuDialogMessage(impl_.getApp(), impl_.getInformationsSoftware(), + "Impossible de supprimer ce fichier de la liste.").activate(); - /** - * methode qui formatte les infos de la source - * - * @param _src - * @return - */ - public String formatInfoSource(final TrPostSource _src) { - // --ajout dans la liste des titres --// - return formatName(_src.getTitle()) + " | Fichier: " + formatFichier(_src.getFile()); - } + return false; + } - public String formatFichier(final File file) { - if (file == null) return ""; - final String nomFichier = file.getAbsolutePath(); - // int position = nomFichier.lastIndexOf(File.separator) + 1; - // if (position != -1) { - // nomFichier = nomFichier.substring(position); - // } - // position = nomFichier.lastIndexOf(CtuluLibString.DOT); - // if (position != -1) { - // nomFichier = nomFichier.substring(0, position); - // } - // FuLog.warning("nom du fichier: " + nomFichier); - return nomFichier; - } + } - /** - * formatte le titre - * - * @param file - * @return - */ - public String formatName(String title) { - // --suppression des trop long espaces du titre --// + /** + * methode qui formatte les infos de la source + * + * @param _src + * @return + */ + public String formatInfoSource(final TrPostSource _src) { + // --ajout dans la liste des titres --// + return formatName(_src.getTitle()) + " | Fichier: " + formatFichier(_src.getFile()); + } - title = title.replaceAll(" ", ""); + public String formatFichier(final File file) { + if (file == null) return ""; + final String nomFichier = file.getAbsolutePath(); + // int position = nomFichier.lastIndexOf(File.separator) + 1; + // if (position != -1) { + // nomFichier = nomFichier.substring(position); + // } + // position = nomFichier.lastIndexOf(CtuluLibString.DOT); + // if (position != -1) { + // nomFichier = nomFichier.substring(0, position); + // } + // FuLog.warning("nom du fichier: " + nomFichier); + return nomFichier; + } - return title; - } + /** + * formatte le titre + * + * @param file + * @return + */ + public String formatName(String title) { + // --suppression des trop long espaces du titre --// - /** - * Construit un menu specifique a la source choisie. A chaque fois que l on ajoute une source au projet, il faut - * ajouter un menu sp\xE9cifique. - * - * @param _src - */ - public void construitMenuPostSpecifiqueSource(final TrPostSource _src) { + title = title.replaceAll(" ", ""); - final BuMenu menuSimul = new BuMenu((listeSrc_.size()) + ". " + formatFichier(_src.getFile()), "SIMULATION" - + (listeSrc_.size())); + return title; + } - // -- ajout du menu au menu post --// - getMenuPost().add(menuSimul); + /** + * Construit un menu specifique a la source choisie. A chaque fois que l on ajoute une source au projet, il faut + * ajouter un menu sp\xE9cifique. + * + * @param _src + */ + public void construitMenuPostSpecifiqueSource(final TrPostSource _src) { - // -- sauvegarde d une trace du menu dans la liste pour une suppression - // ulterieure --// - getlisteMenuProjets_().add(menuSimul); + final BuMenu menuSimul = new BuMenu((listeSrc_.size()) + ". " + formatFichier(_src.getFile()), "SIMULATION" + + (listeSrc_.size())); - final ArrayList<BuMenuItem> listSousMenus = new ArrayList<BuMenuItem>(); + // -- ajout du menu au menu post --// + getMenuPost().add(menuSimul); - final BuIcon ic = BuResource.BU.getIcon("aucun"); + // -- sauvegarde d une trace du menu dans la liste pour une suppression + // ulterieure --// + getlisteMenuProjets_().add(menuSimul); - listSousMenus.add(menuSimul.addMenuItem(TrResource.getS("Extrema..."), "COMPUTE_EXTREMA", ic, TrPostProjet.this)); - listSousMenus.add(menuSimul.addMenuItem(CtuluLib.getS("Editer les variables..."), "VARIABLES", ic, - TrPostProjet.this)); - menuSimul.addSeparator(); - listSousMenus.add(menuSimul.addMenuItem(TrResource.getS("Palettes de couleurs"), "PALETTE_DEFAULT", ic, - TrPostProjet.this)); - listSousMenus.add(menuSimul.addMenuItem(TrResource.getS("Formater/modifier les pas de temps..."), "TIME_FORMAT", - ic, TrPostProjet.this)); + final ArrayList<BuMenuItem> listSousMenus = new ArrayList<BuMenuItem>(); - menuSimul.addSeparator(); - listSousMenus.add(menuSimul.addMenuItem(TrResource.getS("Comparer..."), "COMPARE", ic, TrPostProjet.this)); - listSousMenus.get(listSousMenus.size() - 1).setToolTipText( - TrResource.getS("Comparer les r\xE9sultats avec ceux d'un autre projet")); - listSousMenus.add(menuSimul.addMenuItem(TrResource.getS("Projeter..."), "PROJECT", ic, TrPostProjet.this)); - listSousMenus.get(listSousMenus.size() - 1).setToolTipText( - TrResource.getS("Projeter les r\xE9sultats sur un maillage diff\xE9rent")); - if (_src != null && _src.isInspectable()) { - menuSimul.addSeparator(); - listSousMenus.add(menuSimul.addMenuItem(TrResource.getS("Rafra\xEEchir les r\xE9sultats"), "MAJ_DATA", ic, - TrPostProjet.this)); - listSousMenus.get(listSousMenus.size() - 1).setToolTipText( - TrResource.getS("Les fichiers de r\xE9sultats seront relus")); - listSousMenus.add(menuSimul.addMenuItem(TrResource.getS("Rafra\xEEchir automatiquement"), "MAJ_DATA_ALWAYS", ic, - TrPostProjet.this)); - listSousMenus.get(listSousMenus.size() - 1).setToolTipText( - TrResource.getS("Les fichiers sont surveill\xE9s p\xE9riodiquement")); - menuSimul.addSeparator(); - listSousMenus.add(menuSimul.addMenuItem(TrResource.getS("Exporter"), "EXPORTDATA", TrPostProjet.this)); - _src.addSpecificItemInMainMenu(menuSimul, getImpl()); + final BuIcon ic = BuResource.BU.getIcon("aucun"); - // -- ajout de la sous liste de menus pour la garder en memoire --// - getlisteSousMenuProjets_().add(listSousMenus); + listSousMenus.add(menuSimul.addMenuItem(TrResource.getS("Extrema..."), "COMPUTE_EXTREMA", ic, TrPostProjet.this)); + listSousMenus.add(menuSimul.addMenuItem(CtuluLib.getS("Editer les variables..."), "VARIABLES", ic, + TrPostProjet.this)); + menuSimul.addSeparator(); + listSousMenus.add(menuSimul.addMenuItem(TrResource.getS("Palettes de couleurs"), "PALETTE_DEFAULT", ic, + TrPostProjet.this)); + listSousMenus.add(menuSimul.addMenuItem(TrResource.getS("Formater/modifier les pas de temps..."), "TIME_FORMAT", + ic, TrPostProjet.this)); - } - } + menuSimul.addSeparator(); + listSousMenus.add(menuSimul.addMenuItem(TrResource.getS("Comparer..."), "COMPARE", ic, TrPostProjet.this)); + listSousMenus.get(listSousMenus.size() - 1).setToolTipText( + TrResource.getS("Comparer les r\xE9sultats avec ceux d'un autre projet")); + listSousMenus.add(menuSimul.addMenuItem(TrResource.getS("Projeter..."), "PROJECT", ic, TrPostProjet.this)); + listSousMenus.get(listSousMenus.size() - 1).setToolTipText( + TrResource.getS("Projeter les r\xE9sultats sur un maillage diff\xE9rent")); + if (_src != null && _src.isInspectable()) { + menuSimul.addSeparator(); + listSousMenus.add(menuSimul.addMenuItem(TrResource.getS("Rafra\xEEchir les r\xE9sultats"), "MAJ_DATA", ic, + TrPostProjet.this)); + listSousMenus.get(listSousMenus.size() - 1).setToolTipText( + TrResource.getS("Les fichiers de r\xE9sultats seront relus")); + listSousMenus.add(menuSimul.addMenuItem(TrResource.getS("Rafra\xEEchir automatiquement"), "MAJ_DATA_ALWAYS", ic, + TrPostProjet.this)); + listSousMenus.get(listSousMenus.size() - 1).setToolTipText( + TrResource.getS("Les fichiers sont surveill\xE9s p\xE9riodiquement")); + menuSimul.addSeparator(); + listSousMenus.add(menuSimul.addMenuItem(TrResource.getS("Exporter"), "EXPORTDATA", TrPostProjet.this)); + _src.addSpecificItemInMainMenu(menuSimul, getImpl()); - /** - * Construit le menu Layout. Cette methode doit etre appelee une seule fois - */ - // public void setMenuLayout() { - // //filleLayout_.controller_.construitMenuMultiScenes(impl_.getMainMenuBar()); - // final BuMenuBar menubar = impl_.getMainMenuBar(); - // // -- creation du menu principal des scenes a cote de post --// - // - // menuLayout_.addMenuItem(TrResource.getS(("Ajouter une nouvelle fen\xEAtre")), - // "AJOUTFRAME", CtuluResource.CTULU - // .getIcon("crystal_ajouter"), getSelectedFilleLayout().controller_); - // /* - // * - // * menu.addMenuItem(TrResource.getS(("Ajouter un layout dans la vue")), - // * "AJOUTLAYOUT", CtuluResource.CTULU .getIcon("crystal_ajouter"), - // * filleLayout_.controller_); - // * menu.addMenuItem(TrResource.getS(("Retirer un layout de la vue")), - // * "RETIRELAYOUT", CtuluResource.CTULU .getIcon("crystal_enlever"), - // * filleLayout_.controller_); menu.addSeparator("Layouts"); - // * menu.addSubMenu(filleLayout_.controller_.menuScenes_, true); - // */ - // // ajout a cote de menu post - // // menuLayout_.addSeparator(TrResource.getS("Liste des fen\xEAtres")); - // // menuLayout_.addMenuItem(TrResource.getS(("Layout ")) + - // // listeFillesLayout.size(), "FILLELAYOUT" - // // + (listeFillesLayout.size() - 1), null, this); - // // - // - // menubar.add(menuLayout_, 2); - // - // } - public BuMenu getMenuPost() { - if (menuPost_ == null) menuPost_ = new BuMenu(TrResource.getS("Post"), "POST"); - return menuPost_; - } + // -- ajout de la sous liste de menus pour la garder en memoire --// + getlisteSousMenuProjets_().add(listSousMenus); - /** - * Creation par defaut du menu post de l interface. Cette methdoe est appelee une seule dfois au moment de la creation - * de l impl. - */ - public void setMenuPost() { - final BuMenuBar menubar = impl_.getMainMenuBar(); + } + } - Component comp = null; - if (getMenuPost().getMenuComponentCount() > 0) { - comp = getMenuPost().getMenuComponent(0); - // getMenuPost().remove(0); - } + /** + * Construit le menu Layout. Cette methode doit etre appelee une seule fois + */ + // public void setMenuLayout() { + // //filleLayout_.controller_.construitMenuMultiScenes(impl_.getMainMenuBar()); + // final BuMenuBar menubar = impl_.getMainMenuBar(); + // // -- creation du menu principal des scenes a cote de post --// + // + // menuLayout_.addMenuItem(TrResource.getS(("Ajouter une nouvelle fen\xEAtre")), + // "AJOUTFRAME", CtuluResource.CTULU + // .getIcon("crystal_ajouter"), getSelectedFilleLayout().controller_); + // /* + // * + // * menu.addMenuItem(TrResource.getS(("Ajouter un layout dans la vue")), + // * "AJOUTLAYOUT", CtuluResource.CTULU .getIcon("crystal_ajouter"), + // * filleLayout_.controller_); + // * menu.addMenuItem(TrResource.getS(("Retirer un layout de la vue")), + // * "RETIRELAYOUT", CtuluResource.CTULU .getIcon("crystal_enlever"), + // * filleLayout_.controller_); menu.addSeparator("Layouts"); + // * menu.addSubMenu(filleLayout_.controller_.menuScenes_, true); + // */ + // // ajout a cote de menu post + // // menuLayout_.addSeparator(TrResource.getS("Liste des fen\xEAtres")); + // // menuLayout_.addMenuItem(TrResource.getS(("Layout ")) + + // // listeFillesLayout.size(), "FILLELAYOUT" + // // + (listeFillesLayout.size() - 1), null, this); + // // + // + // menubar.add(menuLayout_, 2); + // + // } + public BuMenu getMenuPost() { + if (menuPost_ == null) menuPost_ = new BuMenu(TrResource.getS("Post"), "POST"); + return menuPost_; + } - getMenuPost().setIcon(null); - getMenuPost().setName("mnPost"); + /** + * Creation par defaut du menu post de l interface. Cette methdoe est appelee une seule dfois au moment de la creation + * de l impl. + */ + public void setMenuPost() { + final BuMenuBar menubar = impl_.getMainMenuBar(); - menubar.add(getMenuPost(), 2); + Component comp = null; + if (getMenuPost().getMenuComponentCount() > 0) { + comp = getMenuPost().getMenuComponent(0); + // getMenuPost().remove(0); + } - getMenuPost().addSeparator(TrResource.getS("Layout")); - // -- ajout de l action de creation du calque --// - // getMenuPost().add(new TrPostActionChooseAndCreateCalque(this)); - getMenuPost().addMenuItem(TrResource.getS("Vue 2D"), "VIEW_2D", BuResource.BU.getIcon("aucun"), TrPostProjet.this); - getMenuPost().addMenuItem(TrResource.getS(("Ajouter une nouvelle fen\xEAtre")), "AJOUTFRAME", - CtuluResource.CTULU.getIcon("crystal_ajouter"), new ActionListener() { + getMenuPost().setIcon(null); + getMenuPost().setName("mnPost"); - public void actionPerformed(final ActionEvent _e) { - createNewLayoutFrame(); + menubar.add(getMenuPost(), 2); - } - }); + getMenuPost().addSeparator(TrResource.getS("Layout")); + // -- ajout de l action de creation du calque --// + // getMenuPost().add(new TrPostActionChooseAndCreateCalque(this)); + getMenuPost().addMenuItem(TrResource.getS("Vue 2D"), "VIEW_2D", BuResource.BU.getIcon("aucun"), TrPostProjet.this); + getMenuPost().addMenuItem(TrResource.getS(("Ajouter une nouvelle fen\xEAtre")), "AJOUTFRAME", + CtuluResource.CTULU.getIcon("crystal_ajouter"), new ActionListener() { - getMenuPost().addSeparator(TrResource.getS("Gestion")); - // -- ajout de l action de gestion des simus dans post --// - final BuMenuItem item = new BuMenuItem(TrResource.getS("Gestion Multi-Fichiers r\xE9sultats")); - item.addActionListener(new ActionListener() { + public void actionPerformed(final ActionEvent _e) { + createNewLayoutFrame(); - public void actionPerformed(final ActionEvent e) { - // -- affichage de la fenetre de gestion multi projet --// + } + }); - if (!filleProjetctManager_.isVisible()) { - filleProjetctManager_.setSize(filleProjetctManager_.getSize().width, - filleProjetctManager_.getSize().height / 2); + getMenuPost().addSeparator(TrResource.getS("Gestion")); + // -- ajout de l action de gestion des simus dans post --// + final BuMenuItem item = new BuMenuItem(TrResource.getS("Gestion Multi-Fichiers r\xE9sultats")); + item.addActionListener(new ActionListener() { - impl_.addInternalFrame(filleProjetctManager_); - } + public void actionPerformed(final ActionEvent e) { + // -- affichage de la fenetre de gestion multi projet --// - } + if (!filleProjetctManager_.isVisible()) { + filleProjetctManager_.setSize(filleProjetctManager_.getSize().width, + filleProjetctManager_.getSize().height / 2); - }); - getMenuPost().add(item); - getMenuPost().addSeparator("Liste des Fichiers r\xE9sultats"); - // -- init de la liste des menus --// + impl_.addInternalFrame(filleProjetctManager_); + } - // -- construction par defaut du premier menu de simulation --// - // construitMenuPostSpecifiqueSource(getSource(0)); + } - if (comp != null) { - getMenuPost().add(comp); - } + }); + getMenuPost().add(item); + getMenuPost().addSeparator("Liste des Fichiers r\xE9sultats"); + // -- init de la liste des menus --// - } + // -- construction par defaut du premier menu de simulation --// + // construitMenuPostSpecifiqueSource(getSource(0)); - public List<BuMenu> getlisteMenuProjets_() { - if (listeMenuProjets_ == null) listeMenuProjets_ = new ArrayList<BuMenu>(); - return listeMenuProjets_; - } + if (comp != null) { + getMenuPost().add(comp); + } - public List<ArrayList<BuMenuItem>> getlisteSousMenuProjets_() { - if (listeSousMenuProjets_ == null) listeSousMenuProjets_ = new ArrayList<ArrayList<BuMenuItem>>(); - return listeSousMenuProjets_; - } + } - /** - * calcul les extrema en fonction de la source proposee - * - * @param indiceSource_ - */ - private void showExtremum(final int indiceSource_) { - final JTable table = TrPostMinMaxTableModel.createTableFor(getSource(indiceSource_)); - final TrPostMinMaxTableModel model = (TrPostMinMaxTableModel) table.getModel(); - final CtuluDialogPanel panel = new CtuluDialogPanel(); - final CtuluDialog dial = new CtuluDialog(getImpl().getFrame(), panel); - final BuButton btCalcul = new BuButton(TrResource.getS("Calcul des extrema")); - dial.setTitle(btCalcul.getText()); - btCalcul.setActionCommand("EXTREMUM"); - panel.setLayout(new BuHorizontalLayout(3, false, false)); - final BuPanel center = new BuPanel(); - center.setLayout(new BuBorderLayout(2, 2, true, true)); - final BuScrollPane scroll = new BuScrollPane(table); - scroll.setPreferredHeight((int) (table.getPreferredSize().height * 1.3)); - center.add(scroll, BuBorderLayout.CENTER); - center.add(model.createInfoPanel(table), BuBorderLayout.SOUTH); - panel.add(center); - btCalcul.setAlignmentX(1f); - btCalcul.setAlignmentY(0f); - panel.add(btCalcul); + public List<BuMenu> getlisteMenuProjets_() { + if (listeMenuProjets_ == null) listeMenuProjets_ = new ArrayList<BuMenu>(); + return listeMenuProjets_; + } - btCalcul.addActionListener(new ActionListener() { + public List<ArrayList<BuMenuItem>> getlisteSousMenuProjets_() { + if (listeSousMenuProjets_ == null) listeSousMenuProjets_ = new ArrayList<ArrayList<BuMenuItem>>(); + return listeSousMenuProjets_; + } - public void actionPerformed(final ActionEvent _event) { - final BuGlassPaneStop stop = new BuGlassPaneStop(); - dial.setGlassPane(stop); - stop.setVisible(true); - new CtuluTaskOperationGUI(impl_, CtuluLibString.EMPTY_STRING) { + /** + * calcul les extrema en fonction de la source proposee + * + * @param indiceSource_ + */ + private void showExtremum(final int indiceSource_) { + final JTable table = TrPostMinMaxTableModel.createTableFor(getSource(indiceSource_)); + final TrPostMinMaxTableModel model = (TrPostMinMaxTableModel) table.getModel(); + final CtuluDialogPanel panel = new CtuluDialogPanel(); + final CtuluDialog dial = new CtuluDialog(getImpl().getFrame(), panel); + final BuButton btCalcul = new BuButton(TrResource.getS("Calcul des extrema")); + dial.setTitle(btCalcul.getText()); + btCalcul.setActionCommand("EXTREMUM"); + panel.setLayout(new BuHorizontalLayout(3, false, false)); + final BuPanel center = new BuPanel(); + center.setLayout(new BuBorderLayout(2, 2, true, true)); + final BuScrollPane scroll = new BuScrollPane(table); + scroll.setPreferredHeight((int) (table.getPreferredSize().height * 1.3)); + center.add(scroll, BuBorderLayout.CENTER); + center.add(model.createInfoPanel(table), BuBorderLayout.SOUTH); + panel.add(center); + btCalcul.setAlignmentX(1f); + btCalcul.setAlignmentY(0f); + panel.add(btCalcul); - @Override - public void act() { - model.apply(new ProgressionBuAdapter(this), impl_); - BuLib.invokeLater(new Runnable() { - public void run() { - TrPostProjet.this.setProjectModified(); - stop.setVisible(false); - dial.getRootPane().remove(stop); - } + btCalcul.addActionListener(new ActionListener() { - }); - } - }.start(); - } - }); - dial.afficheDialogModal(); - } + public void actionPerformed(final ActionEvent _event) { + final BuGlassPaneStop stop = new BuGlassPaneStop(); + dial.setGlassPane(stop); + stop.setVisible(true); + new CtuluTaskOperationGUI(impl_, CtuluLibString.EMPTY_STRING) { - private void updatePaletteMin(final TrPostSource _src) { - final TrPostMinPaletteTableModel model = _src.getMinPaletteModel(); - final BuTable table = new BuTable(model); - final CtuluDialogPanel pnDial = new CtuluDialogPanel() { + @Override + public void act() { + model.apply(new ProgressionBuAdapter(this), impl_); + BuLib.invokeLater(new Runnable() { + public void run() { + TrPostProjet.this.setProjectModified(); + stop.setVisible(false); + dial.getRootPane().remove(stop); + } - @Override - public void apply() { - if (table.isEditing()) { - table.getCellEditor().stopCellEditing(); - } - model.apply(); - } - }; + }); + } + }.start(); + } + }); + dial.afficheDialogModal(); + } - final TableColumn col0 = table.getColumnModel().getColumn(0); - col0.setMaxWidth(20); - col0.setCellRenderer(new CtuluCellBooleanRenderer()); - pnDial.setLayout(new BuVerticalLayout(2, true, true)); - pnDial.addLabel(TrResource - .getS("Activer et pr\xE9ciser les valeurs minimales \xE0 utiliser par d\xE9faut pour les palettes")); - pnDial.add(new BuScrollPane(table)); - pnDial.afficheModale(impl_.getFrame(), TrResource.getS("Valeurs par d\xE9faut pour les palettes")); + private void updatePaletteMin(final TrPostSource _src) { + final TrPostMinPaletteTableModel model = _src.getMinPaletteModel(); + final BuTable table = new BuTable(model); + final CtuluDialogPanel pnDial = new CtuluDialogPanel() { - } + @Override + public void apply() { + if (table.isEditing()) { + table.getCellEditor().stopCellEditing(); + } + model.apply(); + } + }; - TrPostInspectorReader createWatcher(final TrPostSource _src) { - return _src.createWatcher(this, true); - } + final TableColumn col0 = table.getColumnModel().getColumn(0); + col0.setMaxWidth(20); + col0.setCellRenderer(new CtuluCellBooleanRenderer()); + pnDial.setLayout(new BuVerticalLayout(2, true, true)); + pnDial.addLabel(TrResource + .getS("Activer et pr\xE9ciser les valeurs minimales \xE0 utiliser par d\xE9faut pour les palettes")); + pnDial.add(new BuScrollPane(table)); + pnDial.afficheModale(impl_.getFrame(), TrResource.getS("Valeurs par d\xE9faut pour les palettes")); - boolean openSrcDataAndIsModified(final CtuluUI _ui, final ProgressionInterface _prog) { - return new TrPostProjetSaver(this).openSrcDataAndIsModified(_ui, _prog); - } + } - public void save(final CtuluUI _ui, final ProgressionInterface _prog) { - new TrPostProjetSaver(this).save(_ui, _prog); - } + TrPostInspectorReader createWatcher(final TrPostSource _src) { + return _src.createWatcher(this, true); + } - /** - * Methode qui qctive l'internalFrame layout. - */ - protected void activeFille(final TrPostLayoutFille _fille) { + boolean openSrcDataAndIsModified(final CtuluUI _ui, final ProgressionInterface _prog) { + return new TrPostProjetSaver(this).openSrcDataAndIsModified(_ui, _prog); + } - impl_.addInternalFrame(_fille); - } + public void save(final CtuluUI _ui, final ProgressionInterface _prog) { + new TrPostProjetSaver(this).save(_ui, _prog); + } - /** - * Methode appelee apres ouverture du fichier de resultats. - * - * @param _destGrid - * @param _prog - * @param _isInitGridDisplay - */ - protected void activeProjectionAction(final TrPostSource _src, final EfGridInterface _destGrid, - final ProgressionInterface _prog, final boolean _isInitGridDisplay) { - final CtuluAnalyze ana = new CtuluAnalyze(); - _destGrid.computeBord(_prog, ana); - getImpl().manageAnalyzeAndIsFatal(ana); - final TrPostSourceProjected projection = new TrPostSourceProjected(_src, _src.getAvailableVar(), _destGrid, null, - _src.isRubar(), false, getImpl()); - projection.openDatas(_prog, null, null, getImpl()); - projection.buildDefaultVectors(); + /** + * Methode qui qctive l'internalFrame layout. + */ + protected void activeFille(final TrPostLayoutFille _fille) { - // creation du postprojet - // final TrPostProjet trPostProjet = new TrPostProjet(projection, impl_); + impl_.addInternalFrame(_fille); + } - // creation du panel de visualisation du posttraitement - final TrPostVisuPanel pnVisu = new TrPostVisuPanel(impl_, this, projection.getNbFleche() == 0, - new BCalqueLegende(), projection); + /** + * Methode appelee apres ouverture du fichier de resultats. + * + * @param _destGrid + * @param _prog + * @param _isInitGridDisplay + */ + protected void activeProjectionAction(final TrPostSource _src, final EfGridInterface _destGrid, + final ProgressionInterface _prog, final boolean _isInitGridDisplay) { + final CtuluAnalyze ana = new CtuluAnalyze(); + _destGrid.computeBord(_prog, ana); + getImpl().manageAnalyzeAndIsFatal(ana); + final TrPostSourceProjected projection = new TrPostSourceProjected(_src, _src.getAvailableVar(), _destGrid, null, + _src.isRubar(), false, getImpl()); + projection.openDatas(_prog, null, null, getImpl()); + projection.buildDefaultVectors(); - // creation de l internalframe qui contient le panel de visu - // final TrPostFille compFille = new TrPostFille(pnVisu); - // creation de la scene layout identique a au dessus - final TrPostLayoutFille compFille = new TrPostLayoutFille(this); + // creation du postprojet + // final TrPostProjet trPostProjet = new TrPostProjet(projection, impl_); - // -- on ajoute le panel de visu comm widget calque au layout --// - compFille.addCalque(MvResource.getS("Maillage initial"), new Point(250, 170), new Dimension(400, 200), pnVisu, - new CalqueLegendeWidgetAdapter(compFille.getScene(), pnVisu.getArbreCalqueModel())); + // creation du panel de visualisation du posttraitement + final TrPostVisuPanel pnVisu = new TrPostVisuPanel(impl_, this, projection.getNbFleche() == 0, + new BCalqueLegende(), projection); - // test si il faut ajouter le calque - if (_isInitGridDisplay) { - final MvGridLayerGroup src = new MvGridLayerGroup(_src.getGrid()); - src.setTitle(MvResource.getS("Maillage initial")); - src.setVisible(false); + // creation de l internalframe qui contient le panel de visu + // final TrPostFille compFille = new TrPostFille(pnVisu); + // creation de la scene layout identique a au dessus + final TrPostLayoutFille compFille = new TrPostLayoutFille(this); - // on ajoute le calque dans le panel visu - pnVisu.addCalque(src); + // -- on ajoute le panel de visu comm widget calque au layout --// + compFille.addCalque(MvResource.getS("Maillage initial"), new Point(250, 170), new Dimension(400, 200), pnVisu, + new CalqueLegendeWidgetAdapter(compFille.getScene(), pnVisu.getArbreCalqueModel())); - src.monter(); - src.monter(); - } + // test si il faut ajouter le calque + if (_isInitGridDisplay) { + final MvGridLayerGroup src = new MvGridLayerGroup(_src.getGrid()); + src.setTitle(MvResource.getS("Maillage initial")); + src.setVisible(false); - // titre et action de la internalFrame - compFille.setTitle(FDicoLib.getS("Projection")); - compFille.setClosable(true); - compFille.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE); + // on ajoute le calque dans le panel visu + pnVisu.addCalque(src); - // ajout du listener associe a la fille - compFille.addInternalFrameListener(new InternalFrameListener() { + src.monter(); + src.monter(); + } - public void internalFrameActivated(final InternalFrameEvent _e) {} + // titre et action de la internalFrame + compFille.setTitle(FDicoLib.getS("Projection")); + compFille.setClosable(true); + compFille.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE); - public void internalFrameClosed(final InternalFrameEvent _e) { - projection.close(); - } + // ajout du listener associe a la fille + compFille.addInternalFrameListener(new InternalFrameListener() { - public void internalFrameClosing(final InternalFrameEvent _e) {} + public void internalFrameActivated(final InternalFrameEvent _e) {} - public void internalFrameDeactivated(final InternalFrameEvent _e) {} + public void internalFrameClosed(final InternalFrameEvent _e) { + projection.close(); + } - public void internalFrameDeiconified(final InternalFrameEvent _e) {} + public void internalFrameClosing(final InternalFrameEvent _e) {} - public void internalFrameIconified(final InternalFrameEvent _e) {} + public void internalFrameDeactivated(final InternalFrameEvent _e) {} - public void internalFrameOpened(final InternalFrameEvent _e) {} + public void internalFrameDeiconified(final InternalFrameEvent _e) {} - }); + public void internalFrameIconified(final InternalFrameEvent _e) {} - // trPostProjet.fille_ = compFille; - // trPostProjet.filleLayout_ = compFille; - // addFillesLayout(compFille); + public void internalFrameOpened(final InternalFrameEvent _e) {} - BuLib.invokeLater(new Runnable() { + }); - public void run() { - getImpl().addInternalFrame(compFille); - pnVisu.restaurer(); - } - }); + // trPostProjet.fille_ = compFille; + // trPostProjet.filleLayout_ = compFille; + // addFillesLayout(compFille); - } + BuLib.invokeLater(new Runnable() { - /** - * refonte de addFille qui ajoute des widgets - */ - public void addFille(final TrPostCourbeTreeModel _model, final String _titre, final ProgressionInterface _prog, - final TrPostVisuPanel calque) { - final EGGraphe graphe = new EGGraphe(_model); - graphe.setXAxe(EGAxeHorizontal.buildDefautTimeAxe(calque.getSource().getTimeFormatter())); - graphe.setCmd(new CtuluCommandManager()); - addEbliNode(new FudaaGrapheTimeAnimatedVisuPanel(graphe), calque); - } + public void run() { + getImpl().addInternalFrame(compFille); + pnVisu.re... [truncated message content] |
From: <de...@us...> - 2008-12-14 20:44:10
|
Revision: 4300 http://fudaa.svn.sourceforge.net/fudaa/?rev=4300&view=rev Author: deniger Date: 2008-12-14 20:44:06 +0000 (Sun, 14 Dec 2008) Log Message: ----------- maquetee v7 Modified Paths: -------------- branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/CtuluLibString.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGCourbe.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGCourbeConfigureTarget.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliScene.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetGraphe.java Modified: branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/CtuluLibString.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/CtuluLibString.java 2008-12-12 18:12:39 UTC (rev 4299) +++ branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/CtuluLibString.java 2008-12-14 20:44:06 UTC (rev 4300) @@ -55,9 +55,7 @@ public final static String EMPTY_STRING = ""; public static boolean containsVirgule(final String _num) { - if (isEmpty(_num)) { - return false; - } + if (isEmpty(_num)) { return false; } final String s = _num.trim(); try { Double.parseDouble(s); @@ -76,15 +74,11 @@ * @return true si la chaine est vide ou null ou si elle ne contient que des espaces */ public static boolean isEmpty(final String _s) { - if (_s == null || _s == EMPTY_STRING) { - return true; - } + if (_s == null || _s == EMPTY_STRING) { return true; } final int nb = _s.length(); for (int i = nb - 1; i >= 0; i--) { - if (!Character.isWhitespace(_s.charAt(i))) { - return false; - } + if (!Character.isWhitespace(_s.charAt(i))) { return false; } } return true; @@ -105,17 +99,13 @@ * @return true si c'est un nombre */ public static boolean isNumeric(final String _s) { - if (isEmpty(_s)) { - return false; - } + if (isEmpty(_s)) { return false; } final String s = _s.trim(); try { Double.parseDouble(s); return true; } catch (final NumberFormatException e) { - if (s.indexOf(',') > 0) { - return isNumeric(FuLib.replace(s, CtuluLibString.VIR, CtuluLibString.DOT)); - } + if (s.indexOf(',') > 0) { return isNumeric(FuLib.replace(s, CtuluLibString.VIR, CtuluLibString.DOT)); } return false; } } @@ -208,9 +198,7 @@ public static String adjustSize(final int _taille, final String _s, boolean _addSpaceBefore) { final String s = _s == null ? EMPTY_STRING : _s; final int l = s.length(); - if (l > _taille) { - return s.substring(0, _taille); - } + if (l > _taille) { return s.substring(0, _taille); } final StringBuffer r = new StringBuffer(_taille); if (!_addSpaceBefore) { r.append(s); @@ -260,9 +248,7 @@ public static String adjustSize(final int _taille, final String _s, boolean _addSpaceBefore, final char _charToUse) { final String s = _s == null ? EMPTY_STRING : _s; final int l = s.length(); - if (l > _taille) { - return s.substring(0, _taille); - } + if (l > _taille) { return s.substring(0, _taille); } final StringBuffer r = new StringBuffer(_taille); if (!_addSpaceBefore) { r.append(s); @@ -327,12 +313,8 @@ } public static String arrayToString(final double[] _o, final String _sep) { - if (_o == null) { - return getNullString(); - } - if (_o.length == 0) { - return getEmptyTableau(); - } + if (_o == null) { return getNullString(); } + if (_o.length == 0) { return getEmptyTableau(); } final StringBuffer r = new StringBuffer(); r.append(_o[0]); for (int i = 1; i < _o.length; i++) { @@ -346,12 +328,8 @@ * @return une chaine contenant tous les entiers separees par des virgules */ public static String arrayToString(final long[] _o) { - if (_o == null) { - return getNullString(); - } - if (_o.length == 0) { - return getEmptyTableau(); - } + if (_o == null) { return getNullString(); } + if (_o.length == 0) { return getEmptyTableau(); } final StringBuffer r = new StringBuffer(); r.append(_o[0]); for (int i = 1; i < _o.length; i++) { @@ -361,12 +339,8 @@ } public static String arrayToString(final float[] _o) { - if (_o == null) { - return getNullString(); - } - if (_o.length == 0) { - return getEmptyTableau(); - } + if (_o == null) { return getNullString(); } + if (_o.length == 0) { return getEmptyTableau(); } final StringBuffer r = new StringBuffer(); r.append(_o[0]); for (int i = 1; i < _o.length; i++) { @@ -380,12 +354,8 @@ * @return une chaine contenant tous les entiers separees par des virgules */ public static String arrayToString(final int[] _array) { - if (_array == null) { - return getNullString(); - } - if (_array.length == 0) { - return getEmptyTableau(); - } + if (_array == null) { return getNullString(); } + if (_array.length == 0) { return getEmptyTableau(); } final StringBuffer r = new StringBuffer(); r.append(_array[0]); for (int i = 1; i < _array.length; i++) { @@ -400,12 +370,8 @@ * virgules. */ public static String arrayToString(final Object[] _o) { - if (_o == null) { - return getNullString(); - } - if (_o.length == 0) { - return getEmptyTableau(); - } + if (_o == null) { return getNullString(); } + if (_o.length == 0) { return getEmptyTableau(); } final StringBuffer r = new StringBuffer(); r.append(_o[0].toString()); for (int i = 1; i < _o.length; i++) { @@ -415,9 +381,7 @@ } public static String arrayToHtmlString(final Object[] _o) { - if ((_o == null) || (_o.length == 1)) { - return EMPTY_STRING; - } + if ((_o == null) || (_o.length == 1)) { return EMPTY_STRING; } final StringBuffer r = new StringBuffer("<html><body>"); r.append(_o[0].toString()); for (int i = 1; i < _o.length; i++) { @@ -443,9 +407,7 @@ * @return la chaine */ public static String arrayToString(final String[] _tab, final String _sep) { - if (_tab == null) { - return CtuluLibString.EMPTY_STRING; - } + if (_tab == null) { return CtuluLibString.EMPTY_STRING; } final int n = _tab.length; if (n > 0) { final StringBuffer obj = new StringBuffer(); @@ -466,9 +428,7 @@ * @return la chaine avec la premier lettre en majuscule. */ public static String capitalyze(final String _s) { - if (isEmpty(_s)) { - return _s; - } + if (isEmpty(_s)) { return _s; } final String prem = _s.substring(0, 1); return prem.toUpperCase() + _s.substring(1); } @@ -478,9 +438,7 @@ * @return le tableau de string correspondant. Renvoie null si la taille est null ou si _v null. */ public static String[] enTableau(final Collection _v) { - if ((_v == null) || (_v.size() == 0)) { - return null; - } + if ((_v == null) || (_v.size() == 0)) { return null; } final String[] r = new String[_v.size()]; _v.toArray(r); return r; @@ -497,9 +455,7 @@ public static String findPrefixInTab(final String[] _tabToTest, final String _prefixe) { for (int i = _tabToTest.length - 1; i >= 0; i--) { final String s = _tabToTest[i]; - if (_prefixe.startsWith(s)) { - return s; - } + if (_prefixe.startsWith(s)) { return s; } } return null; } @@ -515,9 +471,7 @@ if (_tab != null) { for (int i = _tab.length - 1; i >= 0; i--) { final String s = _tab[i]; - if (s.endsWith(_end)) { - return s; - } + if (s.endsWith(_end)) { return s; } } } return null; @@ -533,9 +487,7 @@ public static String findStringIn(final String[] _stringToLookFor, final String _sToTest) { for (int i = _stringToLookFor.length - 1; i >= 0; i--) { final String s = _stringToLookFor[i]; - if (_sToTest.indexOf(s) >= 0) { - return s; - } + if (_sToTest.indexOf(s) >= 0) { return s; } } return null; } @@ -548,9 +500,7 @@ public static String findStringStartsWith(final String[] _tab, final String _start) { for (int i = _tab.length - 1; i >= 0; i--) { final String s = _tab[i]; - if (s.startsWith(_start)) { - return s; - } + if (s.startsWith(_start)) { return s; } } return null; } @@ -586,9 +536,7 @@ * @return descriprion */ public static String getObjectInString(final Object _o, final boolean _verbose) { - if (_o == null) { - return "null"; - } + if (_o == null) { return "null"; } final StringBuffer b = new StringBuffer(); if (_o.getClass().isArray()) { final int n = Array.getLength(_o); @@ -661,9 +609,7 @@ * @return table cle,valeur ( voir doc) */ public static synchronized Map parseArgs(final String[] _args) { - if (_args == null) { - return null; - } + if (_args == null) { return null; } final int l = _args.length; final Map r = new HashMap(l); int index; @@ -689,21 +635,17 @@ * @return le tableau des champs ou null si un des 2 parametres est nul. */ public static String[] parseString(final String _s, final String _sepChar) { - if ((_s == null) || (_sepChar == null)) { - return null; - } + if ((_s == null) || (_sepChar == null)) { return null; } return enTableau(parseStringList(_s, _sepChar)); } public static double[] parseStringDouble(final String _s, final String _sepChar) { - if ((_s == null) || (_sepChar == null)) { - return null; - } + if ((_s == null) || (_sepChar == null)) { return null; } final List l = (parseStringList(_s, _sepChar)); final TDoubleArrayList res = new TDoubleArrayList(); for (int i = 0; i < l.size(); i++) { try { - res.add(Double.parseDouble((String) l.get(i))); + res.add(CtuluDoubleParser.parseValue((String) l.get(i))); } catch (final NumberFormatException _evt) { FuLog.error(_evt); @@ -721,9 +663,7 @@ * @return le tableau des champs ou null si un des 2 parametres est nul. */ public static List parseStringList(final String _s, final String _sepChar) { - if ((_s == null) || (_sepChar == null)) { - return null; - } + if ((_s == null) || (_sepChar == null)) { return null; } final StringTokenizer tk = new StringTokenizer(_s, _sepChar); final List l = new ArrayList(); while (tk.hasMoreTokens()) { Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGCourbe.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGCourbe.java 2008-12-12 18:12:39 UTC (rev 4299) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGCourbe.java 2008-12-14 20:44:06 UTC (rev 4300) @@ -138,31 +138,32 @@ if (isMarkMaxLine() || isMarkMinLine()) { r = EGCourbeModelDefault.getLocalMinMax(_t.getXAxe(), getModel()); } - if (r != null && isMarkMinLine() && getAxeY().containsPoint(r.min_)) { + EGAxeVertical axeY = getAxeY(); + if (r != null && isMarkMinLine() && axeY.containsPoint(r.min_)) { trMarqueur = getLineMarkeur(); - final int yie = _t.getYEcran(r.min_, getAxeY()); + final int yie = _t.getYEcran(r.min_, axeY); trMarqueur.dessineTrait(_g, xmin, yie, xmax, yie); initTraceBox(); tbox_.setColorBoite(tLigneMarqueur_.getCouleur()); int x = xmin + 3; - final String str = getAxeY().getStringAffiche(r.min_); - if (getAxeY().isDroite()) { + final String str = axeY.getStringAffiche(r.min_); + if (axeY.isDroite()) { x = xmax - 6 - _g.getFontMetrics().stringWidth(str); } tbox_.paintBox(_g, x, yie, str); } - if (r != null && isMarkMaxLine() && getAxeY().containsPoint(r.max_)) { + if (r != null && isMarkMaxLine() && axeY.containsPoint(r.max_)) { if (trMarqueur == null) { trMarqueur = getLineMarkeur(); } - final int yie = _t.getYEcran(r.max_, getAxeY()); + final int yie = _t.getYEcran(r.max_, axeY); trMarqueur.dessineTrait(_g, xmin, yie, xmax, yie); initTraceBox(); tbox_.setColorBoite(tLigneMarqueur_.getCouleur()); int x = xmin + 3; - final String str = getAxeY().getStringAffiche(r.max_); - if (getAxeY().isDroite()) { + final String str = axeY.getStringAffiche(r.max_); + if (axeY.isDroite()) { x = xmax - 6 - _g.getFontMetrics().stringWidth(str); } tbox_.paintBox(_g, x, yie, str); @@ -174,11 +175,11 @@ initTraceBox(); tbox_.setColorBoite(tLigneMarqueur_.getCouleur()); for (int i = 0; i < markH_.length; i++) { - if (getAxeY().containsPoint(markH_[i])) { - final int yie = _t.getYEcran(markH_[i], getAxeY()); + if (axeY.containsPoint(markH_[i])) { + final int yie = _t.getYEcran(markH_[i], axeY); int x = xmin + 3; - final String str = getAxeY().getStringAffiche(markH_[i]); - if (getAxeY().isDroite()) { + final String str = axeY.getStringAffiche(markH_[i]); + if (axeY.isDroite()) { x = xmax - 6 - _g.getFontMetrics().stringWidth(str); } trMarqueur.dessineTrait(_g, xmin, yie, xmax, yie); Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGCourbeConfigureTarget.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGCourbeConfigureTarget.java 2008-12-12 18:12:39 UTC (rev 4299) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGCourbeConfigureTarget.java 2008-12-14 20:44:06 UTC (rev 4300) @@ -126,7 +126,7 @@ final double[] marks = target_.getMarks(); String res = null; - if (marks != null) { + if (marks != null&& marks.length>0) { res = CtuluLibString.arrayToString(marks, ";"); } return res == null ? CtuluLibString.EMPTY_STRING : res; Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliScene.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliScene.java 2008-12-12 18:12:39 UTC (rev 4299) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliScene.java 2008-12-14 20:44:06 UTC (rev 4300) @@ -6,7 +6,9 @@ import java.awt.image.BufferedImage; import java.beans.PropertyChangeListener; import java.beans.PropertyChangeSupport; +import java.util.Collections; import java.util.Iterator; +import java.util.List; import java.util.Map; import java.util.Set; @@ -16,11 +18,16 @@ import org.fudaa.ctulu.image.CtuluImageProducer; import org.fudaa.ctulu.image.CtuluLibImage; import org.fudaa.ebli.visuallibrary.tree.EbliWidgetJXTreeTableModel; +import org.netbeans.api.visual.action.InplaceEditorProvider; +import org.netbeans.api.visual.action.WidgetAction; +import org.netbeans.api.visual.action.WidgetAction.Chain; import org.netbeans.api.visual.graph.GraphScene; import org.netbeans.api.visual.widget.LayerWidget; import org.netbeans.api.visual.widget.Scene; import org.netbeans.api.visual.widget.Widget; +import sun.misc.Cleaner; + /** * classe de gestion de la scene principale * @@ -30,7 +37,7 @@ EbliWidgetInterface<EbliSceneController> { int idx_ = 0; - + CtuluUI ctuluUi_; /** @@ -47,6 +54,31 @@ ctuluUi_ = _ctuluUi; } + public void stopEditing() { + Set<?> objects2 = getSelectedObjects(); + if (objects2 != null) { + for (Iterator iterator = objects2.iterator(); iterator.hasNext();) { + Object object = (Object) iterator.next(); + stopEditing(findWidget(object)); + + } + } + } + + protected void stopEditing(Widget w) { + if(w==null) return; + Chain actions = w.getActions(); + for (WidgetAction widgetAction : actions.getActions()) { + if (widgetAction instanceof InplaceEditorProvider.EditorController + && ((InplaceEditorProvider.EditorController) widgetAction).isEditorVisible()) { + ((InplaceEditorProvider.EditorController) widgetAction).closeEditor(true); + } + } + for (Widget widget : w.getChildren()) { + stopEditing(widget); + } + } + protected String generateId() { // return CtuluLibString.getString(idx_++); return CtuluLibGenerator.getInstance().deliverUniqueStringId(); @@ -113,7 +145,6 @@ */ private final EbliSceneController controller_; - public static void refreshScene(final Scene _sc) { _sc.validate(); _sc.repaint(); @@ -320,66 +351,55 @@ return null; } - - + /** * Methode qui redimensionne proportionellement les widget \xE0 la scene + * * @param size */ - public void resizeInnerWidget(Dimension newSize,Dimension oldSize){ - // this.getVisu().setPreferredSize(newSize); - if(getNodes().size()==0) - return; - for (final Iterator<EbliNode> it2 = getNodes().iterator(); it2.hasNext();) { + public void resizeInnerWidget(Dimension newSize, Dimension oldSize) { + // this.getVisu().setPreferredSize(newSize); + if (getNodes().size() == 0) return; + for (final Iterator<EbliNode> it2 = getNodes().iterator(); it2.hasNext();) { - final EbliNode currentNode = it2.next(); - if (currentNode != null && currentNode.hasWidget()) { + final EbliNode currentNode = it2.next(); + if (currentNode != null && currentNode.hasWidget()) { - - Rectangle oldRectangle=currentNode.getWidget().getPreferredBounds(); + Rectangle oldRectangle = currentNode.getWidget().getPreferredBounds(); - double proportionW=newSize.width*oldRectangle.width/oldSize.width; - double proportionH=newSize.width*oldRectangle.height/oldSize.height; - - - // -- retaillage --// - currentNode.getWidget().setPreferredBounds( - new Rectangle(new Dimension((int)proportionW, (int)proportionH))); + double proportionW = newSize.width * oldRectangle.width / oldSize.width; + double proportionH = newSize.width * oldRectangle.height / oldSize.height; - - // -- rafraichissement de la scene --// - this.refresh(); + // -- retaillage --// + currentNode.getWidget().setPreferredBounds(new Rectangle(new Dimension((int) proportionW, (int) proportionH))); - } - } - - // this.setPreferredSize(newSize); - - + // -- rafraichissement de la scene --// + this.refresh(); + + } + } + + // this.setPreferredSize(newSize); + } - - - - public void moveWidgetTo(EbliWidget widget, int position){ - - //-- ne marche pas.......................... --// - - -// -// if (widget.getParentWidget() == null) -// return; -// List<Widget> children = getChildren(); -// int i = children.indexOf (widget); -// if (i < 0) -// return; -// children.remove (i); -// children.add (position, widget); -// widget.revalidate (); -// widget.getParentWidget().revalidate (); -// refresh(); - - + + public void moveWidgetTo(EbliWidget widget, int position) { + + // -- ne marche pas.......................... --// + + // + // if (widget.getParentWidget() == null) + // return; + // List<Widget> children = getChildren(); + // int i = children.indexOf (widget); + // if (i < 0) + // return; + // children.remove (i); + // children.add (position, widget); + // widget.revalidate (); + // widget.getParentWidget().revalidate (); + // refresh(); + } - - + } Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetGraphe.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetGraphe.java 2008-12-12 18:12:39 UTC (rev 4299) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetGraphe.java 2008-12-14 20:44:06 UTC (rev 4300) @@ -152,7 +152,7 @@ } // mode edition - if (imageGraphe == null || imageGraphe.getWidth() != rec.width || imageGraphe.getHeight() != rec.height) { + if (imageGraphe == null || imageGraphe.getWidth() != (rec.width-1) || imageGraphe.getHeight() != (rec.height-1)) { FuLog.debug("EWI: recreate image"); final Map params = new HashMap(); CtuluLibImage.setCompatibleImageAsked(params); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <had...@us...> - 2008-12-12 18:12:43
|
Revision: 4299 http://fudaa.svn.sourceforge.net/fudaa/?rev=4299&view=rev Author: hadouxad Date: 2008-12-12 18:12:39 +0000 (Fri, 12 Dec 2008) Log Message: ----------- - Resolution bug des menus du calques: les 3 (navigation,dessin,..) sont toujours pr?\195?\169sent lors du chargement/duplication - Correction affichage wizard scope: on peut visualiser les couples choisis pour scopGene/transfo profil spatial - Cr?\195?\169ation de l'option du menu configurer qui rend transparent les widget: cela marche avec le syst?\195?\168me widgetConfigure et TRANSPARENT est une propri?\195?\169t?\195?\169 graphique des widget (a l'instar de color, traceligne...) Gestion de l'info dans la sauvegarde. - Cr?\195?\169ation de l'option nuage de points pour tous les graphes et bien sur pour le bug 31b.(ajout dans l'interface des corr?\195?\169lations) Cette option est ?\195?\169galement sauvegard?\195?\169e dans le projet. - Correction des l?\195?\169gendes et titres pour les formats scope. Modified Paths: -------------- branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/mesure/EvolutionReguliere.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/mesure/EvolutionReguliereAbstract.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/mesure/EvolutionReguliereInterface.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/mesure/EvolutionReguliereTFixe.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/telemac/io/ScopeStructure.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGCourbe.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGCourbePersist.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGSpecificActions.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/palette/PaletteSelecteurCouleurPlage.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidget.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetBordureSingle.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetTextEditor.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/WidgetConfigure.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/CalqueLegendeWidgetAdapter.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/WidgetLegendeManager.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/persist/EbliWidgetSerializeXml.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/commun/courbe/FudaaCourbeImporterScope.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/commun/courbe/FudaaCourbeWizardImportScope.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvProfileTreeModel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/common/TrCourbeTemporelleManager.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/common/TrEvolutionManager.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostCourbeTreeModel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostProjet.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostVisuPanel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostVisuPanelPersistManager.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/dialogSpec/TrPostWizardCreateScope.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/dialogSpec/TrPostWizardImportScope.java Modified: branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/mesure/EvolutionReguliere.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/mesure/EvolutionReguliere.java 2008-12-12 17:04:43 UTC (rev 4298) +++ branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/mesure/EvolutionReguliere.java 2008-12-12 18:12:39 UTC (rev 4299) @@ -34,11 +34,22 @@ */ public class EvolutionReguliere extends EvolutionReguliereAbstract { - private class CommandAdd implements CtuluCommand { + private boolean nuagePoints_=false; + + public boolean isNuagePoints() { + return nuagePoints_; + } + + public void setNuagePoints_(boolean nuagePoints_) { + this.nuagePoints_ = nuagePoints_; + } + +private class CommandAdd implements CtuluCommand { + private final double newX_; private final double newY_; - + /** * @param _newX la nouvelle valeur ajoutee * @param _newY Modified: branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/mesure/EvolutionReguliereAbstract.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/mesure/EvolutionReguliereAbstract.java 2008-12-12 17:04:43 UTC (rev 4298) +++ branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/mesure/EvolutionReguliereAbstract.java 2008-12-12 18:12:39 UTC (rev 4299) @@ -80,6 +80,8 @@ return false; } + public abstract boolean isNuagePoints(); + /** * Initialise les tableaux et le nom. * Modified: branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/mesure/EvolutionReguliereInterface.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/mesure/EvolutionReguliereInterface.java 2008-12-12 17:04:43 UTC (rev 4298) +++ branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/mesure/EvolutionReguliereInterface.java 2008-12-12 18:12:39 UTC (rev 4299) @@ -118,7 +118,7 @@ */ int getUsed(); - + public boolean isNuagePoints(); /** * @param _e l'evolution a comparer Modified: branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/mesure/EvolutionReguliereTFixe.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/mesure/EvolutionReguliereTFixe.java 2008-12-12 17:04:43 UTC (rev 4298) +++ branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/mesure/EvolutionReguliereTFixe.java 2008-12-12 18:12:39 UTC (rev 4299) @@ -65,4 +65,10 @@ return super.isEquivalentTo(_e); } +@Override +public boolean isNuagePoints() { + // TODO Auto-generated method stub + return false; +} + } \ No newline at end of file Modified: branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/telemac/io/ScopeStructure.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/telemac/io/ScopeStructure.java 2008-12-12 17:04:43 UTC (rev 4298) +++ branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/telemac/io/ScopeStructure.java 2008-12-12 18:12:39 UTC (rev 4299) @@ -21,6 +21,10 @@ public abstract EvolutionReguliere[] returnEvolReguliere(); + public abstract String getTitleFormFile(); + + + /** * Structure pour les fichiers s ou t Par convention les x sont les premieres * variables. @@ -254,6 +258,16 @@ System.err.print("\n" + getListValuesofAllVariable(i)); } + +@Override +public String getTitleFormFile() { + // TODO Auto-generated method stub + String title=""; + for(String partie:titles_) + title+=" "+partie; + + return title; +} } @@ -352,8 +366,16 @@ insertX(x, pdt); } + @Override + public String getTitleFormFile() { + // TODO Auto-generated method stub + String title=""; + for(String partie:titles_) + title+=" "+partie; + + return title; + } - public void addSeparator(String ligne) { ligne = ligne.replace(KEY.getBlocCommentaireGENE(), ""); @@ -499,6 +521,7 @@ evolReg[i] = new EvolutionReguliere(tabX, tabY, false); evolReg[i].setNom("courbe de " + nomVar); + evolReg[i].setUnite(nomVar); } } @@ -545,8 +568,8 @@ } evolReg[i] = new EvolutionReguliere(tabX, tabY, false); evolReg[i].setNom("courbe de " + nomVar); + evolReg[i].setUnite(nomVar); - } return evolReg; @@ -574,8 +597,8 @@ } evolReg[0] = new EvolutionReguliere(tabX, tabY, false); - evolReg[0].setNom("courbe corr\xE9l\xE9e X="+getVariable(varX+1)+"/Y="+getVariable(varY+1)); - + evolReg[0].setNom("cor\xE9lation:(X="+getVariable(varX+1)+"//Y="+getVariable(varY+1)+")"); + evolReg[0].setUnite(getVariable(varX+1)); return evolReg; } Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGCourbe.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGCourbe.java 2008-12-12 17:04:43 UTC (rev 4298) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGCourbe.java 2008-12-12 18:12:39 UTC (rev 4299) @@ -380,6 +380,15 @@ getEGParent().descendre(this); } + /** + * Boolean si oui ou non le graphe est un nuage de points + */ + protected boolean nuagePoints_=false; + /** + * Taille des points du nuages symbolis\xE9s par des carr\xE9s. + */ + protected int largeurPointsNuage_=5; + public void dessine(final Graphics2D _g, final EGRepere _t) { if (!isVisible_) { return; @@ -433,8 +442,17 @@ rangeDisplayed.expandToInclude(xi, yi); } paintSurface(_g, _t, i); - trLigne.dessineTrait(_g, xie, yie, xpe, ype); - + + if(!nuagePoints_) + trLigne.dessineTrait(_g, xie, yie, xpe, ype); + else{ + //-- trace un + --// + //-- ligne | --// + trLigne.dessineTrait(_g, xie, yie-largeurPointsNuage_/2, xie, yie+largeurPointsNuage_/2); + //--ligne - --// + trLigne.dessineTrait(_g, xie-largeurPointsNuage_/2, yie, xie+largeurPointsNuage_/2, yie); + //dessineRectangle(_g, xie-largeurPointsNuage_/2, yie-largeurPointsNuage_/2, largeurPointsNuage_, largeurPointsNuage_); + } } xpVisible = xiVisible; xpe = xie; @@ -445,7 +463,15 @@ traceTitle(_g, _t, rangeDisplayed); } - public void enDernier() { + public boolean isNuagePoints_() { + return nuagePoints_; +} + +public void setNuagePoints_(boolean nuagePoints_) { + this.nuagePoints_ = nuagePoints_; +} + +public void enDernier() { getEGParent().enDernier(this); } Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGCourbePersist.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGCourbePersist.java 2008-12-12 17:04:43 UTC (rev 4298) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGCourbePersist.java 2008-12-12 18:12:39 UTC (rev 4299) @@ -12,6 +12,7 @@ String title_; int Idgroup; + boolean nuagePoints=false; ///-- les min et max sont purement informatifs --// double Xmin; double Xmax; @@ -33,6 +34,7 @@ private void fillInfoWith(EGCourbeChild courbe,int idgroupe){ this.Idgroup=idgroupe; title_=courbe.getTitle(); + this.nuagePoints=courbe.isNuagePoints_(); Xmin = courbe.getModel().getXMin(); Xmax = courbe.getModel().getXMax(); Ymin = courbe.getModel().getYMin(); @@ -74,6 +76,7 @@ if(tLigneMarqueur_!=null) courbe.setLigneMark(tLigneMarqueur_); + courbe.setNuagePoints_(this.nuagePoints); return courbe; } Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGSpecificActions.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGSpecificActions.java 2008-12-12 17:04:43 UTC (rev 4298) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGSpecificActions.java 2008-12-12 18:12:39 UTC (rev 4299) @@ -116,6 +116,16 @@ menu_.addMenuItem(EbliResource.EBLI.getString("Copier la courbe pour un autre jeu de donn\xE9es"), getCopieSrc(), EbliResource.EBLI.getIcon("crystal_copier"), true, this); + if(nbSelected==1){ + EGCourbe courbe=m.getSelectedComponent(); + if(!courbe.nuagePoints_) + menu_.addMenuItem(EbliResource.EBLI.getString("Nuage de points"), "NUAGE_POINTS", EbliResource.EBLI.getIcon("curves") + , true, this); + else + menu_.addMenuItem(EbliResource.EBLI.getString("Courbe classique"), "NUAGE_POINTS", BuResource.BU + .getIcon("crystal_oscilloscope"), true, this); + } + } @@ -151,6 +161,10 @@ if (n == 1) { target_.getModel().duplicateCourbe(cmd_, target_.getSelectedComponent()); } + }else if("NUAGE_POINTS".equals(com)){ + //-- on permutte entre nuage de points et classique --// + target_.getSelectedComponent().nuagePoints_=!target_.getSelectedComponent().nuagePoints_; + target_.getModel().fireCourbeAspectChanged(null, false); } else if ("COPIESRC".equals(com)) { target_.getModel().duplicateCourbeForSrc(cmd_, target_.getSelectedComponent()); Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/palette/PaletteSelecteurCouleurPlage.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/palette/PaletteSelecteurCouleurPlage.java 2008-12-12 17:04:43 UTC (rev 4298) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/palette/PaletteSelecteurCouleurPlage.java 2008-12-12 18:12:39 UTC (rev 4299) @@ -137,9 +137,12 @@ final int oldSize = plages_.size(); plages_.clear(); fireAllSupr(oldSize); - for (int i = 0; i < nb; i++) { - plages_.add(_pal.getPlageInterface(i).copy()); - } +// for (int i = 0; i < nb; i++) { +// plages_.add(_pal.getPlageInterface(i).copy()); +// } + for (int i = nb-1; i >= 0; i--) { + plages_.add(_pal.getPlageInterface(i).copy()); + } fireAdd(0, nb - 1); isAdjusting_ = false; list_.setSelectedIndex(0); Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidget.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidget.java 2008-12-12 17:04:43 UTC (rev 4298) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidget.java 2008-12-12 18:12:39 UTC (rev 4299) @@ -48,6 +48,8 @@ public final static String ROTATION = "rotation"; + public final static String TRANSPARENCE = "Transpa"; + protected EbliWidgetController controller_; /** * L'identifiant unique du widget @@ -92,6 +94,10 @@ // -- ajout de l angle de rotation par default PI --// propGraphique.put(ROTATION, Math.PI); + + //-- ajout de la trnaparence a false --// + propGraphique.put( EbliWidget.TRANSPARENCE,false); + } /** @@ -112,8 +118,19 @@ } - public boolean canColorBackground() { - return true; + + + + public boolean getTransparent() { + return (Boolean) propGraphique.get(TRANSPARENCE); +} + +public void setTransparent(boolean transparent) { + propGraphique.put(TRANSPARENCE, new Boolean(transparent)); +} + +public boolean canColorBackground() { + return true && !getTransparent(); } public boolean canColorForeground() { @@ -185,6 +202,7 @@ mapDupliquee.put(COLORFOND, getColorFond()); mapDupliquee.put(ROTATION, getRotation()); mapDupliquee.put(FONT, getFormeFont()); + mapDupliquee.put(TRANSPARENCE, getTransparent()); return mapDupliquee; } Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetBordureSingle.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetBordureSingle.java 2008-12-12 17:04:43 UTC (rev 4298) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetBordureSingle.java 2008-12-12 18:12:39 UTC (rev 4299) @@ -120,7 +120,7 @@ final TraceLigne l = new TraceLigne(getTraceLigneModel()); // // --test on autorise que si son widget fils le permet --// - if (this.getIntern().canColorBackground()) { + if (this.getIntern().canColorBackground() && !this.getTransparent()) { getGraphics().setColor(getColorFond()); getGraphics().fillRect(0, 0, (int) (rec.width - l.getEpaisseur()), (int) (rec.height - l.getEpaisseur())); } @@ -205,7 +205,7 @@ @Override protected void setPropertyCmd(final String _key, final Object _prop, final CtuluCommandContainer _cmd) { - if (_key.equals(LINEMODEL) || _key.equals(COLORCONTOUR) || _key.equals(COLORFOND)) { + if (_key.equals(LINEMODEL) || _key.equals(COLORCONTOUR) || _key.equals(COLORFOND) ||_key.equals(TRANSPARENCE)) { super.setPropertyCmd(_key, _prop, _cmd); } else { intern_.setPropertyCmd(_key, _prop, _cmd); @@ -226,6 +226,7 @@ mapMeltingPot.put(ROTATION, intern_.getRotation()); mapMeltingPot.put(FONT, intern_.getFormeFont()); mapMeltingPot.put(COLORFOND, intern_.getColorFond()); + mapMeltingPot.put(TRANSPARENCE, intern_.getTransparent()); return mapMeltingPot; } Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetTextEditor.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetTextEditor.java 2008-12-12 17:04:43 UTC (rev 4298) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetTextEditor.java 2008-12-12 18:12:39 UTC (rev 4299) @@ -50,9 +50,16 @@ final EbliWidgetControllerTextEditor controller = new EbliWidgetControllerTextEditor(this); controller.setEditable(true); setController(controller); + } - public boolean canRotate() { +// @Override +//public boolean canColorBackground() { +// // TODO Auto-generated method stub +// return false; +//} + +public boolean canRotate() { return false; } Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/WidgetConfigure.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/WidgetConfigure.java 2008-12-12 17:04:43 UTC (rev 4298) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/WidgetConfigure.java 2008-12-12 18:12:39 UTC (rev 4299) @@ -11,6 +11,7 @@ import org.fudaa.ebli.commun.EbliLib; import org.fudaa.ebli.controle.BConfigurableComposite; import org.fudaa.ebli.controle.BConfigurableInterface; +import org.fudaa.ebli.controle.BSelecteurCheckBox; import org.fudaa.ebli.controle.BSelecteurColorChooserBt; import org.fudaa.ebli.controle.BSelecteurFont; import org.fudaa.ebli.controle.BSelecteurInterface; @@ -130,6 +131,12 @@ listeComposants.add(modelF); } + + + BSelecteurCheckBox selectionTransparence=new BSelecteurCheckBox(EbliWidget.TRANSPARENCE, "Transparence"); + + listeComposants.add(selectionTransparence); + final BSelecteurInterface[] tableau = new BSelecteurInterface[listeComposants.size()]; return listeComposants.toArray(tableau); } Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/CalqueLegendeWidgetAdapter.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/CalqueLegendeWidgetAdapter.java 2008-12-12 17:04:43 UTC (rev 4298) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/CalqueLegendeWidgetAdapter.java 2008-12-12 18:12:39 UTC (rev 4299) @@ -98,7 +98,7 @@ final Widget ws = new Widget(_scene); ws.setLayout(new FlowLayout(true, SerialAlignment.LEFT_TOP, 5)); if (listeplages.getNbPlages() != 0) { - for (int j = 0; j < listeplages.getNbPlages(); j++) { + for (int j = listeplages.getNbPlages()-1; j >=0 ; j--) { final BPlageInterface plage = listeplages.getPlageInterface(j); Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/WidgetLegendeManager.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/WidgetLegendeManager.java 2008-12-12 17:04:43 UTC (rev 4298) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/WidgetLegendeManager.java 2008-12-12 18:12:39 UTC (rev 4299) @@ -86,16 +86,16 @@ return newBounds; } - - + + boolean suppressionOccured=false; - + public void majSuppression(){ suppressionOccured=true; repaint(); } - + @Override protected void paintWidget() { @@ -213,84 +213,89 @@ // le gap // res.setLayout(new OverlayLayout()); for (int i = 0; i < cs.length; i++) { - final EbliWidget line = new EbliWidget(scene); - line.setLayout(new FlowLayout(false, SerialAlignment.CENTER, 5)); - // creation de la widget titre - final EbliWidgetTitle tw = new EbliWidgetTitle(scene, cs[i], null); + if(cs[i].getTitle().equals("X")||cs[i].getTitle().equals("Y")){ + //-- on n'affiche pas les l\xE9gendes X et Y + }else{ + final EbliWidget line = new EbliWidget(scene); + line.setLayout(new FlowLayout(false, SerialAlignment.CENTER, 5)); - // creation de la widget ligne - final EbliWidgetLine lw = new EbliWidgetLine(scene, cs[i], null); - line.setUseBorder(false); - lw.setUseBorder(false); - tw.setUseBorder(false); + // creation de la widget titre + final EbliWidgetTitle tw = new EbliWidgetTitle(scene, cs[i], null); - lw.setEnabled(false); - line.addChild(lw); - line.addChild(tw); - res.addChild(line); + // creation de la widget ligne + final EbliWidgetLine lw = new EbliWidgetLine(scene, cs[i], null); + line.setUseBorder(false); + lw.setUseBorder(false); + tw.setUseBorder(false); - // -- ajouter le listener EGGraphe pour ecouter et \xE9ettre a jour els - // l\xE9gendes --// - g.getModel().addModelListener(new EGGrapheModelListener() { + lw.setEnabled(false); + line.addChild(lw); + line.addChild(tw); + res.addChild(line); - public void structureChanged() { - if(g.getModel().contains(lw.cb_)){ - line.repaint(); - tw.majLabel(); - }else{ - //-- il faut supprimer --// - res.removeChild(line); - res.majSuppression(); + // -- ajouter le listener EGGraphe pour ecouter et \xE9ettre a jour els + // l\xE9gendes --// + g.getModel().addModelListener(new EGGrapheModelListener() { + + public void structureChanged() { + if(g.getModel().contains(lw.cb_)){ + line.repaint(); + tw.majLabel(); + }else{ + //-- il faut supprimer --// + res.removeChild(line); + res.majSuppression(); + } + } - } + public void courbeContentChanged(final EGObject _c, final boolean restore) { + if(g.getModel().contains(lw.cb_)){ + line.repaint(); + tw.majLabel(); + }else{ + //-- il faut supprimer --// + res.removeChild(line); + res.majSuppression(); + } + } - public void courbeContentChanged(final EGObject _c, final boolean restore) { - if(g.getModel().contains(lw.cb_)){ - line.repaint(); - tw.majLabel(); - }else{ - //-- il faut supprimer --// - res.removeChild(line); - res.majSuppression(); + public void courbeAspectChanged(final EGObject _c, final boolean _visibil) { + if(g.getModel().contains(lw.cb_)){ + line.repaint(); + tw.majLabel(); + }else{ + //-- il faut supprimer --// + res.removeChild(line); + res.majSuppression(); + } } - } - public void courbeAspectChanged(final EGObject _c, final boolean _visibil) { - if(g.getModel().contains(lw.cb_)){ - line.repaint(); - tw.majLabel(); - }else{ - //-- il faut supprimer --// - res.removeChild(line); - res.majSuppression(); + public void axeContentChanged(final EGAxe _c) { + if(g.getModel().contains(lw.cb_)){ + line.repaint(); + tw.majLabel(); + }else{ + //-- il faut supprimer --// + res.removeChild(line); + res.majSuppression(); + } } - } - public void axeContentChanged(final EGAxe _c) { - if(g.getModel().contains(lw.cb_)){ - line.repaint(); - tw.majLabel(); - }else{ - //-- il faut supprimer --// - res.removeChild(line); - res.majSuppression(); + public void axeAspectChanged(final EGAxe _c) { + if(g.getModel().contains(lw.cb_)){ + line.repaint(); + tw.majLabel(); + }else{ + //-- il faut supprimer --// + res.removeChild(line); + res.majSuppression(); + } } - } + }); - public void axeAspectChanged(final EGAxe _c) { - if(g.getModel().contains(lw.cb_)){ - line.repaint(); - tw.majLabel(); - }else{ - //-- il faut supprimer --// - res.removeChild(line); - res.majSuppression(); - } - } - }); - + } } res.setController(new EbliWidgetControllerMenuOnly(res, false)); Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/persist/EbliWidgetSerializeXml.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/persist/EbliWidgetSerializeXml.java 2008-12-12 17:04:43 UTC (rev 4298) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/persist/EbliWidgetSerializeXml.java 2008-12-12 18:12:39 UTC (rev 4299) @@ -57,7 +57,7 @@ Color colorModel; Font font; double rotation; - + boolean transparent=false; /** * Donn\xE9es du traceligneModel */ @@ -115,7 +115,7 @@ this.typeTrait = widget.getParentBordure().getTraceLigneModel().getTypeTrait(); this.colorModel = widget.getParentBordure().getTraceLigneModel().getCouleur(); } - + this.transparent=widget.getParentBordure().getTransparent(); // --cas particulier, si widget non visible les dimension bonnes sont celles du parent preferredbounds--// if (!widget.getParentBordure().isVisible()) { if (widget.getParentBordure().getPreferredBounds() != null) { @@ -180,6 +180,7 @@ newNode.getWidget().setFormeFont(font); newNode.getWidget().setColorContour(foreground); newNode.getWidget().setRotation(rotation); + newNode.getWidget().setTransparent(transparent); final TraceLigneModel model = new TraceLigneModel(typeTrait, epaisseurTrait, colorModel); newNode.getWidget().setTraceLigneModel(model); newNode.getWidget().getParentBordure().setVisible(isVisible); @@ -356,4 +357,12 @@ IdGroup = idGroup; } +public boolean isTransparent() { + return transparent; } + +public void setTransparent(boolean transparent) { + this.transparent = transparent; +} + +} Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/commun/courbe/FudaaCourbeImporterScope.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/commun/courbe/FudaaCourbeImporterScope.java 2008-12-12 17:04:43 UTC (rev 4298) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/commun/courbe/FudaaCourbeImporterScope.java 2008-12-12 18:12:39 UTC (rev 4299) @@ -33,14 +33,20 @@ */ - public static void createGraphe(FudaaCourbeImporter.Target target,ScopeStructure _data, CtuluCommandManager _mng,ProgressionInterface _prog){ + public static void createGraphe(FudaaCourbeImporter.Target target,ScopeStructure _data, CtuluCommandManager _mng,ProgressionInterface _prog,boolean nuagePoints){ - createGraphe(target,_data.returnEvolReguliere(), _mng, _prog); + createGraphe(target,_data.returnEvolReguliere(), _mng, _prog,nuagePoints); } - public static void createGraphe(FudaaCourbeImporter.Target target,EvolutionReguliere[] _data, CtuluCommandManager _mng,ProgressionInterface _prog){ + public static void createGraphe(FudaaCourbeImporter.Target target,EvolutionReguliere[] _data, CtuluCommandManager _mng,ProgressionInterface _prog,boolean nuagePoints){ + //-- on indique si il faut prendre en compte comme \xE9tant un nuage de points --// + if(nuagePoints){ + for(int i=0;i<_data.length;i++){ + _data[i].setNuagePoints_(nuagePoints); + } + } target.importCourbes(_data, _mng, _prog); } Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/commun/courbe/FudaaCourbeWizardImportScope.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/commun/courbe/FudaaCourbeWizardImportScope.java 2008-12-12 17:04:43 UTC (rev 4298) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/commun/courbe/FudaaCourbeWizardImportScope.java 2008-12-12 18:12:39 UTC (rev 4299) @@ -13,6 +13,7 @@ import javax.swing.AbstractAction; import javax.swing.BorderFactory; import javax.swing.DefaultListModel; +import javax.swing.JCheckBox; import javax.swing.JComboBox; import javax.swing.JComponent; import javax.swing.JLabel; @@ -39,6 +40,7 @@ import org.fudaa.dodico.telemac.io.ScopeTFileFormat; import org.fudaa.ebli.commun.EbliActionSimple; import org.fudaa.ebli.courbe.EGGraphe; +import org.fudaa.ebli.ressource.EbliResource; import org.fudaa.fudaa.commun.FudaaLib; import org.fudaa.fudaa.commun.impl.FudaaCommonImplementation; import org.fudaa.fudaa.commun.impl.FudaaGuiLib; @@ -77,7 +79,7 @@ */ int typeFormat_; File fileChoosen_=null; - ScopeStructure data_; + protected ScopeStructure data_; EGGraphe result_; //choix du fichier @@ -401,6 +403,8 @@ } + + JCheckBox choixNuagePoints_; /** * Creation du panel scopGene pour choisir ses parametres * @return @@ -549,8 +553,10 @@ //-- panel reserv\xE9s au corr\xE9lations --// + JPanel panelCorrelation=new JPanel(new BorderLayout()); JPanel paramCorrel=new JPanel(new GridLayout(2,2)); - container.add(paramCorrel, TrResource.getS("Corr\xE9lation")); + panelCorrelation.add(paramCorrel,BorderLayout.CENTER); + container.add(panelCorrelation, TrResource.getS("Corr\xE9lation")); listeVar=new String[dataG().getNbVariables()-1]; for(int i=1;i<dataG().getNbVariables();i++) @@ -585,6 +591,9 @@ pane.setBorder(BorderFactory.createTitledBorder(TrResource.getS("Plage associ\xE9e \xE0 la variable Y"))); paramCorrel.add(pane); + choixNuagePoints_=new JCheckBox(EbliResource.EBLI.getString("Nuage de points")); + panelCorrelation.add(choixNuagePoints_,BorderLayout.SOUTH); + return content2; } @@ -654,7 +663,7 @@ dataST().restreindreStructure(listVariablesST_.getSelectedIndices(),Double.parseDouble(plageDeb_.getText()),Double.parseDouble(plageFin_.getText())); impl_.setMainProgression(30); impl_.setMainMessage(CtuluLib.getS("Cr\xE9ation du graphe")); - FudaaCourbeImporterScope.createGraphe(target_, data_, null, prog); + FudaaCourbeImporterScope.createGraphe(target_, data_, null, prog,false); } else{ //-- format scopeGen, selon le type de format g\xE9n\xE9r\xE9--// @@ -666,7 +675,7 @@ impl_.setMainProgression(30); impl_.setMainMessage(CtuluLib.getS("Cr\xE9ation du graphe")); - FudaaCourbeImporterScope.createGraphe(target_, tabEvol, null, prog); + FudaaCourbeImporterScope.createGraphe(target_, tabEvol, null, prog,false); }else if(comBoChoixTypeGraphe_.getSelectedIndex()==1){ //evol temporelle @@ -679,7 +688,7 @@ impl_.setMainProgression(30); impl_.setMainMessage(CtuluLib.getS("Cr\xE9ation du graphe")); //on cree les evol reguliere SPECIFIQUES pour ces courbes. - FudaaCourbeImporterScope.createGraphe(target_, dataG().returnEvolRegulierePourTemporelles(), null, prog); + FudaaCourbeImporterScope.createGraphe(target_, dataG().returnEvolRegulierePourTemporelles(), null, prog,false); }else{ //correlation @@ -692,7 +701,10 @@ int plageX=listSeparatorCorrel1_.getSelectedIndex(); int plageY=listSeparatorCorrel2_.getSelectedIndex(); - FudaaCourbeImporterScope.createGraphe(target_, dataG().returnEvolReguliereCorrelation(varX,varY,plageX,plageY), null, prog); + //-- recuperation du choix nuage de points ou non + boolean nuagePoints=choixNuagePoints_.isSelected(); + + FudaaCourbeImporterScope.createGraphe(target_, dataG().returnEvolReguliereCorrelation(varX,varY,plageX,plageY), null, prog,nuagePoints); } Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvProfileTreeModel.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvProfileTreeModel.java 2008-12-12 17:04:43 UTC (rev 4298) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvProfileTreeModel.java 2008-12-12 18:12:39 UTC (rev 4299) @@ -656,6 +656,10 @@ final List<EGCourbeChild> childs = new ArrayList<EGCourbeChild>(_crb.length); for (int i = 0; i < _crb.length; i++) { final EGCourbeChild child = new EGCourbeChild(gr, new FudaaCourbeModel(new EvolutionReguliere(_crb[i]))); + + //-- on met a jour si la courbe est un nuage de points ou non --// + child.setNuagePoints_(_crb[i].isNuagePoints()); + childs.add(child); gr.addEGComponent(child); } Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/common/TrCourbeTemporelleManager.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/common/TrCourbeTemporelleManager.java 2008-12-12 17:04:43 UTC (rev 4298) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/common/TrCourbeTemporelleManager.java 2008-12-12 18:12:39 UTC (rev 4299) @@ -141,6 +141,10 @@ final EGCourbeChild courbe = new EGCourbeChild(_g, new FudaaCourbeModel(_e)); // courbe.setTitre(_e.getNom()); courbe.setAspectContour(BPalettePlageDefault.getColor(_idx)); + + //-- on met a jour si la courbe est un nuage de points ou non --// + courbe.setNuagePoints_(_e.isNuagePoints()); + if (_g == null) { groupNull_.addEGComponent(courbe); } else { Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/common/TrEvolutionManager.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/common/TrEvolutionManager.java 2008-12-12 17:04:43 UTC (rev 4298) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/common/TrEvolutionManager.java 2008-12-12 18:12:39 UTC (rev 4299) @@ -97,6 +97,11 @@ final FudaaCourbeModel m = new FudaaCourbeModel(_e); testEvolutionAdded(_e); final EGCourbeSimple c = new EGCourbeSimple(_v, m); + + //-- on met a jour si la courbe est un nuage de points ou non --// + c.setNuagePoints_(_e.isNuagePoints()); + + // c.setTitre(m.e_.getNom()); c.setAspectContour(BPalettePlageDefault.getColor(getNbEGObject())); return c; Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostCourbeTreeModel.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostCourbeTreeModel.java 2008-12-12 17:04:43 UTC (rev 4298) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostCourbeTreeModel.java 2008-12-12 18:12:39 UTC (rev 4299) @@ -657,6 +657,10 @@ for (int i = 0; i < _crb.length; i++) { final EGCourbeChild child = new EGCourbeChild(gr, new FudaaCourbeModel(new EvolutionReguliere(_crb[i]))); childs.add(child); + + //-- on met a jour si la courbe est un nuage de points ou non --// + child.setNuagePoints_(_crb[i].isNuagePoints()); + gr.addEGComponent(child); } Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostProjet.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostProjet.java 2008-12-12 17:04:43 UTC (rev 4298) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostProjet.java 2008-12-12 18:12:39 UTC (rev 4299) @@ -909,7 +909,10 @@ public void addGrapheNodeInCurrentScene(final EGFillePanel _pn, final String _desc) { final EbliNodeDefault nodeG = new EbliNodeDefault(); nodeG.setCreator(new EbliWidgetCreatorGraphe(_pn)); + if(_desc==null) nodeG.setTitle("Graphe " + idxFilleG_++); + else + nodeG.setTitle("Graphe " + (idxFilleG_++)+":"+_desc); nodeG.setPreferedSize(new Dimension(600, 400)); nodeG.setPreferedLocation(new Point(20, 20)); Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostVisuPanel.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostVisuPanel.java 2008-12-12 17:04:43 UTC (rev 4298) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostVisuPanel.java 2008-12-12 18:12:39 UTC (rev 4299) @@ -326,6 +326,9 @@ // -- chargement de l etat dans le calque duplique --// duplic.getDonneesCalque().getPersistenceMng().restore(savedData, duplic, duplic.getDonneesCalque(), null); + //-- creation des actions specifiques au calque --// + duplic.getController().buildActions(); + return duplic; } Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostVisuPanelPersistManager.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostVisuPanelPersistManager.java 2008-12-12 17:04:43 UTC (rev 4298) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostVisuPanelPersistManager.java 2008-12-12 18:12:39 UTC (rev 4299) @@ -124,6 +124,9 @@ // if(zoom_!=null) // newPanel.getVueCalque().changeRepere(newPanel, zoom_); + //-- creation des actions specifiques au calque --// + newPanel.getController().buildActions(); + return newPanel; } Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/dialogSpec/TrPostWizardCreateScope.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/dialogSpec/TrPostWizardCreateScope.java 2008-12-12 17:04:43 UTC (rev 4298) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/dialogSpec/TrPostWizardCreateScope.java 2008-12-12 18:12:39 UTC (rev 4299) @@ -45,7 +45,7 @@ final TrPostWizardCreateScope wizard = new TrPostWizardCreateScope(projet_, model); final BuWizardDialog DialogWizard = new BuWizardDialog(ui_.getFrame(), wizard); // --affichage du wizard --// - DialogWizard.setSize(600, 500); + DialogWizard.setSize(600, 600); DialogWizard.setLocationRelativeTo(ui_.getFrame()); DialogWizard.setVisible(true); } @@ -62,7 +62,7 @@ @Override public void createGraphImported() { final EGGraphe graphe = new EGGraphe(modelTarget_); - projet_.addGrapheNodeInCurrentScene(new EGFillePanel(graphe), "Graphe import\xE9 (format scope)"); + projet_.addGrapheNodeInCurrentScene(new EGFillePanel(graphe), data_.getTitleFormFile()); } } Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/dialogSpec/TrPostWizardImportScope.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/dialogSpec/TrPostWizardImportScope.java 2008-12-12 17:04:43 UTC (rev 4298) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/dialogSpec/TrPostWizardImportScope.java 2008-12-12 18:12:39 UTC (rev 4299) @@ -38,7 +38,7 @@ final TrPostWizardImportScope wizard = new TrPostWizardImportScope(projet_, target_); final BuWizardDialog DialogWizard = new BuWizardDialog(ui_.getFrame(), wizard); // --affichage du wizard --// - DialogWizard.setSize(600, 500); + DialogWizard.setSize(600, 600); DialogWizard.setLocationRelativeTo(ui_.getFrame()); DialogWizard.setVisible(true); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <emm...@us...> - 2008-12-12 17:04:49
|
Revision: 4298 http://fudaa.svn.sourceforge.net/fudaa/?rev=4298&view=rev Author: emmanuel_martin Date: 2008-12-12 17:04:43 +0000 (Fri, 12 Dec 2008) Log Message: ----------- Commit de base sur le modeleur 1d : a consid?\195?\169r?\195?\169 comme une version alpha (bogu?\195?\169e et ne pr?\195?\169sentant pas toutes les fonctionnalit?\195?\169s attendues). Modified Paths: -------------- branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/MdlImplementation.java Added Paths: ----------- branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/modeleur1d/ branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/modeleur1d/Controller1d.java branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/modeleur1d/DataGeometry.java branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/modeleur1d/DataGeometryAdapter.java branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/modeleur1d/DataGeometryListener.java branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/modeleur1d/MdlFille1d.java branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/modeleur1d/VueBief.java branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/modeleur1d/VueCourbe.java branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/modeleur1d/VueTableau.java Removed Paths: ------------- branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/MdlFille1d.java Deleted: branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/MdlFille1d.java =================================================================== --- branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/MdlFille1d.java 2008-12-12 08:32:49 UTC (rev 4297) +++ branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/MdlFille1d.java 2008-12-12 17:04:43 UTC (rev 4298) @@ -1,71 +0,0 @@ -/* - * @creation 20 janv. 08 - * @modification $Date$ - * @license GNU General Public License 2 - * @copyright (c)1998-2008 CETMEF 2 bd Gambetta F-60231 Compiegne - * @mail fud...@li... - */ -package org.fudaa.fudaa.modeleur; - -import java.awt.Dimension; -import java.awt.Graphics; -import java.awt.print.PageFormat; - -import com.db4o.ObjectContainer; - -import com.memoire.bu.BuCutCopyPasteInterface; -import com.memoire.bu.BuInformationsDocument; -import com.memoire.bu.BuUndoRedoInterface; - -import org.fudaa.ctulu.CtuluCommandManager; -import org.fudaa.ctulu.CtuluExportDataInterface; -import org.fudaa.ctulu.CtuluUI; -import org.fudaa.ctulu.CtuluUndoRedoInterface; -import org.fudaa.ctulu.ProgressionInterface; -import org.fudaa.ctulu.image.CtuluImageImporter; -import org.fudaa.ctulu.image.CtuluImageProducer; - -import org.fudaa.ebli.calque.ZEbliFilleCalques; -import org.fudaa.ebli.impression.EbliFilleImprimable; - -import org.fudaa.fudaa.commun.impl.FudaaCommonImplementation; -import org.fudaa.fudaa.commun.save.FudaaFilleVisuPersistence; -import org.fudaa.fudaa.commun.save.FudaaSavable; -import org.fudaa.fudaa.commun.save.FudaaSaveZipWriter; -import org.fudaa.fudaa.sig.FSigResource; - -/** - * La fenetre interne vue 2D des donn\xE9es du modeleur. Elle construit le composant arbre de - * calques {@link org.fudaa.ebli.calque.BArbreCalque}. La plupart des traitements est - * d\xE9l\xE9gu\xE9e au composant {@link org.fudaa.ebli.calque.ZEbliCalquesPanel} encapsul\xE9. - * - * @author fred deniger - * @author bertrand marchand - * @version $Id$ - */ -public class MdlFille1d extends EbliFilleImprimable { - - public MdlFille1d(FudaaCommonImplementation _appli) { - super("", true, false, true, true, _appli, null); - setName("mdlFille1d"); - setTitle(FSigResource.FSIG.getString("Vue 1D")); - setPreferredSize(new Dimension(500, 400)); - setClosable(true); - } - - /* (non-Javadoc) - * @see org.fudaa.ebli.impression.EbliPageable#print(java.awt.Graphics, java.awt.print.PageFormat, int) - */ - public int print(Graphics _g, PageFormat _format, int _page) { - // TODO Auto-generated method stub - return 0; - } - - /* (non-Javadoc) - * @see java.awt.print.Pageable#getNumberOfPages() - */ - public int getNumberOfPages() { - // TODO Auto-generated method stub - return 0; - } -} Modified: branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/MdlImplementation.java =================================================================== --- branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/MdlImplementation.java 2008-12-12 08:32:49 UTC (rev 4297) +++ branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/MdlImplementation.java 2008-12-12 17:04:43 UTC (rev 4298) @@ -43,6 +43,7 @@ import org.fudaa.fudaa.commun.save.FudaaSaveZipLoader; import org.fudaa.fudaa.modeleur.action.MdlShow1DFrameAction; import org.fudaa.fudaa.modeleur.action.MdlShow2DFrameAction; +import org.fudaa.fudaa.modeleur.modeleur1d.MdlFille1d; import org.fudaa.fudaa.ressource.FudaaResource; import org.fudaa.fudaa.sig.FSigProjectPersistence; import org.fudaa.fudaa.sig.FSigResource; @@ -193,14 +194,14 @@ if (mdl1dFrame_==null) { mdl1dFrame_ = new MdlFille1d(this); } - boolean alwaysInstalled=false; + boolean alreadyInstalled=false; for (JInternalFrame f: getAllInternalFrames()) { if (f.equals(mdl1dFrame_)) { - alwaysInstalled=true; + alreadyInstalled=true; break; } } - if (!alwaysInstalled) addInternalFrame(mdl1dFrame_); + if (!alreadyInstalled) addInternalFrame(mdl1dFrame_); activateInternalFrame(mdl1dFrame_); } @@ -584,7 +585,7 @@ protected BuMenu buildProjectMenu() { BuMenu mn=new BuMenu(FudaaResource.FUDAA.getString("Projet"),"mnPROJECT"); mn.add(new MdlShow2DFrameAction(this)); -// mn.add(new MdlShow1DFrameAction(this)); + mn.add(new MdlShow1DFrameAction(this)); mn.setVisible(false); return mn; Added: branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/modeleur1d/Controller1d.java =================================================================== --- branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/modeleur1d/Controller1d.java (rev 0) +++ branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/modeleur1d/Controller1d.java 2008-12-12 17:04:43 UTC (rev 4298) @@ -0,0 +1,196 @@ +/* + * @creation 9 d\xE9c. 2008 + * @modification $Date:$ + * @license GNU General Public License 2 + * @copyright (c)1998-2008 CETMEF 2 bd Gambetta F-60231 Compiegne + * @mail fud...@li... + */ +package org.fudaa.fudaa.modeleur.modeleur1d; + +import java.util.List; + +import javax.swing.JComponent; +import javax.swing.JDesktopPane; +import javax.swing.event.InternalFrameAdapter; +import javax.swing.event.InternalFrameEvent; +import javax.swing.event.ListSelectionEvent; +import javax.swing.event.ListSelectionListener; + +import org.fudaa.ctulu.CtuluListSelectionEvent; +import org.fudaa.ctulu.CtuluListSelectionListener; +import org.fudaa.ctulu.gis.GISAttributeConstants; +import org.fudaa.ctulu.gis.GISZoneCollectionLigneBrisee; +import org.fudaa.ebli.calque.BArbreCalqueModel; +import org.fudaa.ebli.calque.ZCalqueAffichageDonneesInterface; +import org.fudaa.ebli.calque.ZScene; +import org.fudaa.ebli.calque.ZSelectionEvent; +import org.fudaa.ebli.calque.ZSelectionListener; +import org.fudaa.ebli.calque.edition.ZModeleLigneBriseeEditable; +import org.fudaa.ebli.commun.EbliLib; +import org.fudaa.fudaa.commun.FudaaLib; +import org.fudaa.fudaa.modeleur.MdlImplementation; + +import com.memoire.bu.BuDesktop; + +/** + * Cette classe a la charge et la responsabilit\xE9 de g\xE9rer toutes les actions, + * interactions et r\xE9actions de la fen\xEAtre 1d dans son ensemble. + * + * @author Emmanuel MARTIN + * @version $Id:$ + */ +public class Controller1d extends InternalFrameAdapter implements ZSelectionListener, ListSelectionListener, CtuluListSelectionListener { + + /** La vue du bief. */ + private VueBief vueBief_; + /** La vue d'un profil par tableau. */ + private VueTableau vueTableau_; + /** La vue d'un profil via une courbe. */ + private VueCourbe vueCourbe_; + /** Le lien avec le reste de l'application. */ + private MdlImplementation appli_; + /** La frame contenant tous les widgets 1d. */ + private MdlFille1d frame1d_; + /** Indique si on doit \xE9couter les \xE9venements de selection. */ + private boolean listenEventSelection_=true; + /** L'adapter des donn\xE9es de la geometry en cours de manipulation. */ + private DataGeometryAdapter dataGeomAdapter_; + + public Controller1d(MdlImplementation _appli, MdlFille1d _frame1d){ + appli_=_appli; + frame1d_=_frame1d; + frame1d_.addInternalFrameListener(this); + vueBief_=new VueBief(appli_, this); + vueBief_.getScene().addSelectionListener(this); + treeModel_=vueBief_.getArbreCalqueModel(); + dataGeomAdapter_=new DataGeometryAdapter(null, -1); + vueTableau_=new VueTableau(this, dataGeomAdapter_); + vueTableau_.addSelectionListener(this); + vueCourbe_=new VueCourbe(this, dataGeomAdapter_); + vueCourbe_.addSelectionListener(this); + } + + public VueBief getVueBief(){ + return vueBief_; + } + public VueTableau getVueTableau(){ + return vueTableau_; + } + public VueCourbe getVueCourbe(){ + return vueCourbe_; + } + + // Gestion de l'arbre \\ + + /** Le model de l'arbre a afficher sur la droite de l'\xE9cran. */ + private BArbreCalqueModel treeModel_; + + /** Retourne le model de l'abre a afficher sur la droite de l'\xE9can. */ + public BArbreCalqueModel getTreeModel(){ + return treeModel_; + } + + /** + * Mise \xE0 jour de l'arbre des calques a chaque activation de la fen\xEAtre 1d. La + * mise \xE0 jour s'effectue en fonction des calques 2d. + */ + public void internalFrameActivated(InternalFrameEvent e) { + vueBief_.updateTree(); + } + + // Gestion des actions \\ + + /** Les action \xE0 la fen\xEAtre 1d. */ + JComponent[] specificTools_; + + /** + * Renvoie les actions sp\xE9cifiques \xE0 la fen\xEAtre 1d. Ils seront affiches dans la + * tool bar de l'application. + * + * @return specificTools_ + */ + public JComponent[] getToolsActions() { + if (specificTools_==null) { + final JDesktopPane j=frame1d_.getDesktopPane(); + BuDesktop buJ=null; + if (j instanceof BuDesktop) + buJ=(BuDesktop)j; + final List<?> l=EbliLib.updateToolButtons(vueBief_.getController().getActions(), buJ); + specificTools_=new JComponent[l.size()]; + l.toArray(specificTools_); + } + if (specificTools_==null) + return null; + final JComponent[] r=new JComponent[specificTools_.length]; + System.arraycopy(specificTools_, 0, r, 0, r.length); + return r; + } + + // Gestion de la selection entre les trois widgets (tableau, bief et courbe) \\ + + /** + * Changement de la selection dans le widget de bief. + */ + public void selectionChanged(ZSelectionEvent _evt) { + ZScene scene=vueBief_.getScene(); + int sceneIdSelected=scene.getSelectionHelper().getUniqueSelectedIdx(); + if(sceneIdSelected==-1) + // Aucune selection + dataGeomAdapter_.setData(null, -1); + else { + int idSelected=scene.sceneId2LayerId(sceneIdSelected); + // Seulement en cas de changement de selection + if (idSelected!=dataGeomAdapter_.getIdxGeom()) { + // Extraction des diff\xE9rentes informations n\xE9c\xE9ssaires au changement de + // courbe \\ + ZCalqueAffichageDonneesInterface calque=scene.getLayerForId(sceneIdSelected); + if (calque.modeleDonnees() instanceof ZModeleLigneBriseeEditable) { + GISZoneCollectionLigneBrisee zone=((ZModeleLigneBriseeEditable)calque.modeleDonnees()).getGeomData(); + if (zone.getIndiceOf(GISAttributeConstants.NATURE)!=-1) { + if (zone.getValue(zone.getIndiceOf(GISAttributeConstants.NATURE), idSelected)==GISAttributeConstants.ATT_NATURE_PF) { + try { + dataGeomAdapter_.setData(zone, idSelected); + } + catch (IllegalArgumentException _exp) { + appli_.warn(FudaaLib.getS("Profil incorrect"), _exp.getMessage()); + } + } + else { + // On a pas selectionn\xE9 un profil, on annule la selection + dataGeomAdapter_.setData(null, -1); + scene.clearSelection(); + } + } + else + // Il n'y a pas d'attribut Nature, on annule la selection + scene.clearSelection(); + } + else + // Le type de model ne correspond pas, on annule la selection + scene.clearSelection(); + } + } + } + + /** + * Changement de la selection dans le widget du tableau. + */ + public void valueChanged(ListSelectionEvent e) { + if (listenEventSelection_) { + listenEventSelection_=false; + vueCourbe_.setSelection(vueTableau_.getSelection()); + listenEventSelection_=true; + } + } + + /** + * Changement de la selection dans le widget de la courbe. + */ + public void listeSelectionChanged(CtuluListSelectionEvent _e) { + if (listenEventSelection_) { + listenEventSelection_=false; + vueTableau_.setSelection(vueCourbe_.getSelection()); + listenEventSelection_=true; + } + } +} Property changes on: branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/modeleur1d/Controller1d.java ___________________________________________________________________ Added: svn:keywords + Id Added: svn:eol-style + native Added: branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/modeleur1d/DataGeometry.java =================================================================== --- branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/modeleur1d/DataGeometry.java (rev 0) +++ branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/modeleur1d/DataGeometry.java 2008-12-12 17:04:43 UTC (rev 4298) @@ -0,0 +1,57 @@ +/* + * @creation 10 d\xE9c. 2008 + * @modification $Date:$ + * @license GNU General Public License 2 + * @copyright (c)1998-2008 CETMEF 2 bd Gambetta F-60231 Compiegne + * @mail fud...@li... + */ +package org.fudaa.fudaa.modeleur.modeleur1d; + +/** + * Une interface permettant d'acc\xE9der aux informations manipul\xE9es par les + * widgets tableau et courbe. + * + * @author Emmanuel MARTIN + * @version $Id:$ + */ +public interface DataGeometry { + + /** Ajout d'un nouveau listener. */ + public void addDataGeometryListener(DataGeometryListener _listener); + + /** Supprime le listener. */ + public void removeDataGeometryListener(DataGeometryListener _listener); + + /** Retourne le nombre de points total de la geometry. */ + public int getNbPoint(); + + /** Retourne l'abcisse curviligne du point indiqu\xE9 en param\xE8tre. */ + public double getCurv(int _idxPoint); + + /** Retourne la valeur maximal de l'abcisse curviligne. */ + public double getCurvMax(); + + /** Retourne la valeur minimal de l'abcisse curvilgne. */ + public double getCurvMin(); + + /** Retourne la valeur de z du point indiqu\xE9 en param\xE8tre. */ + public double getZ(int _idxPoint); + + /** Retourne la valeur maximal de z. */ + public double getZMax(); + + /** Retourne la valeur minimal de z. */ + public double getZMin(); + + /** Enregistre l'abcisse curviligne du point indiqu\xE9 en param\xE8tre. */ + public void setCurv(int _idxPoint, double _value); + + /** Enregistre la valeur de z du point indiqu\xE9 en param\xE8tre. */ + public void setZ(int _idxPoint, double _value); + + /** Enregistre l'abcisse curviligne et la valeur de z du point indiqu\xE9 en param\xE8tre. */ + public void setValues(int _idxPoint, double _valueCurv, double _valueZ); + + /** Supprime le point indiqu\xE9 en param\xE8tre. */ + public void remove(int _idxPoint); +} Property changes on: branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/modeleur1d/DataGeometry.java ___________________________________________________________________ Added: svn:keywords + Id Added: svn:eol-style + native Added: branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/modeleur1d/DataGeometryAdapter.java =================================================================== --- branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/modeleur1d/DataGeometryAdapter.java (rev 0) +++ branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/modeleur1d/DataGeometryAdapter.java 2008-12-12 17:04:43 UTC (rev 4298) @@ -0,0 +1,375 @@ +/* + * @creation 10 d\xE9c. 2008 + * @modification $Date:$ + * @license GNU General Public License 2 + * @copyright (c)1998-2008 CETMEF 2 bd Gambetta F-60231 Compiegne + * @mail fud...@li... + */ +package org.fudaa.fudaa.modeleur.modeleur1d; + +import java.util.ArrayList; +import java.util.List; + +import org.fudaa.ctulu.collection.CtuluCollection; +import org.fudaa.ctulu.gis.GISCoordinateSequenceContainerInterface; +import org.fudaa.ctulu.gis.GISGeometryFactory; +import org.fudaa.ctulu.gis.GISZoneCollection; +import org.fudaa.ctulu.gis.GISZoneCollectionLigneBrisee; +import org.fudaa.fudaa.commun.FudaaLib; + +import com.vividsolutions.jts.geom.Coordinate; +import com.vividsolutions.jts.geom.CoordinateSequence; + +/** + * Cette classe permet d'adapter une GISZoneCollection en un model manipulable + * simplement. Cette simplification se fait en cachant toutes les informations + * inutils et en ajoutant une information d'abcisse curviligne. + * + * @author Emmanuel MARTIN + * @version $Id:$ + */ +class DataGeometryAdapter implements DataGeometry { + private GISZoneCollectionLigneBrisee zone_; + private int idxGeom_; + private CtuluCollection z_; + private List<Double> curv_; + // Caches \\ + int idxZMax_; + int idxZMin_; + // Le profil est potentiellement coup\xE9 en trois, les deux indices qui suivent + // indique l'index de chacune de ces ruptures. + int idxRupture1_; + int idxRupture2_; + + public DataGeometryAdapter(GISZoneCollectionLigneBrisee _zone, int _idxGeom) throws IllegalArgumentException { + setData(_zone, _idxGeom); + } + + /** + * Permet de choisir la g\xE9om\xE9trie sur lequel l'instance va travailler. + * Hypoth\xE8se importante : les points de la g\xE9om\xE9tries sont correctement + * ordonn\xE9s (les points sont ordonn\xE9s en ordre croissant de leur abscisse + * curviligne). La veracit\xE9 de cette hypoth\xE8se n'est PAS v\xE9rifi\xE9 dans setData. + * + * @param _zone la zone contenant la g\xE9om\xE9trie + * @param _idxGeom l'indice de la g\xE9om\xE9trie dans _zone + */ + public void setData(GISZoneCollectionLigneBrisee _zone, int _idxGeom) throws IllegalArgumentException { + if (_zone==null&&_idxGeom==-1) { + zone_=null; + idxGeom_=-1; + z_=null; + curv_=null; + } + else if (_zone!=null&&_idxGeom>=0&&_idxGeom<_zone.getNbGeometries()&&_zone.getAttributeIsZ()!=null) { + try { + zone_=_zone; + idxGeom_=_idxGeom; + z_=(CtuluCollection)zone_.getValue(zone_.getIndiceOf(zone_.getAttributeIsZ()), idxGeom_); + curv_=new ArrayList<Double>(); + CoordinateSequence seq=((GISCoordinateSequenceContainerInterface)zone_.getGeometry(idxGeom_)).getCoordinateSequence(); + // Verifie qu'on a bien au minimum deux points. \\ + if (seq.size()<2) + throw new IllegalArgumentException(FudaaLib.getS("La g\xE9ometrie doit avoir au minimum deux points.")); + // Verifie que deux points cons\xE9cutifs ne sont pas confondus. \\ + for (int i=1; i<seq.size(); i++) + if (seq.getX(i-1)==seq.getX(i)&&seq.getY(i-1)==seq.getY(i)) + throw new IllegalArgumentException(FudaaLib.getS("Au moins deux points dans la g\xE9om\xE9trie sont confondus.")); + // Calcul des acbscisses curvilignes => hypoth\xE8se d'ordonnancement + // correcte des points \\ + double curvPre=0; + curv_.add((double)0); + for (int i=1; i<seq.size(); i++) { + double partialCurv=Math.sqrt(Math.pow(seq.getX(i)-seq.getX(i-1), 2)+Math.pow(seq.getY(i)-seq.getY(i-1), 2)); + curvPre=curvPre+partialCurv; + curv_.add(curvPre); + } + // Remplissage du cache Z \\ + idxZMax_=0; + idxZMin_=0; + for (int i=1; i<z_.getSize(); i++) { + double val=(Double)z_.getObjectValueAt(i); + if (val>(Double)z_.getObjectValueAt(idxZMax_)) + idxZMax_=i; + else if (val<(Double)z_.getObjectValueAt(idxZMin_)) + idxZMin_=i; + } + // / D\xE9termination des points de ruptures et verification qu'il y en a + // au maximun deux. \\\ + idxRupture1_=-1; + idxRupture2_=-1; + double upsilon=0.0001; // Marge d'erreur des calculs sur double + double coefDirecteur=0; + // coefDirX : Indique si le coefficient directeur est calcul\xE9 sur les x + // ou sur les y (au d\xE9nominateur). + boolean coefDirX; + // Initialisation : calcul du premier cofficient directeur \\ + int idx=1; + // Calcul du coefficient directeur + if (seq.getX(idx)!=seq.getX(idx-1)) { + // Calcul sur les x + coefDirX=true; + coefDirecteur=(seq.getY(idx)-seq.getY(idx-1))/(seq.getX(idx)-seq.getX(idx-1)); + } + else { + // Calcul sur les y + coefDirX=false; + coefDirecteur=0; + } + // Coeur : Calcul de tous les coefficients directeur et m\xE9morisation des + // ruptures \\ + for (idx=2; idx<seq.size(); idx++) { + double newCoefDirecteur; + boolean newCoefDirX; + // Calcul du coefficient directeur + if (seq.getX(idx)!=seq.getX(idx-1)) { + // Calcul sur les x + newCoefDirX=true; + newCoefDirecteur=(seq.getY(idx)-seq.getY(idx-1))/(seq.getX(idx)-seq.getX(idx-1)); + } + else { + // Calcul sur les y + newCoefDirX=false; + newCoefDirecteur=0; + } + // D\xE9tection des ruptures + if (coefDirX!=newCoefDirX||Math.abs(coefDirecteur-newCoefDirecteur)>upsilon) { + if (idxRupture1_==-1) + idxRupture1_=idx-1; + else if (idxRupture2_==-1) + idxRupture2_=idx-1; + else + throw new IllegalArgumentException(FudaaLib.getS("Il y a plus que deux ruptures dans la g\xE9om\xE9trie.")); + } + // Pr\xE9paration de l'it\xE9ration suivante + coefDirecteur=newCoefDirecteur; + coefDirX=newCoefDirX; + } + } + catch(IllegalArgumentException _exp) { + // Remise dans un \xE9tat coh\xE9rent + zone_=null; + idxGeom_=-1; + z_=null; + curv_=null; + fireDataGeometryNewGeom(); + // Propagation de l'exception + throw _exp; + } + } + else + throw new IllegalArgumentException(FudaaLib.getS("Les arguments sont invalides.")); + // Fin des verifications, tous est ok => accept\xE9 + fireDataGeometryNewGeom(); + } + + public GISZoneCollection getGISZoneCollection(){ + return zone_; + } + + public int getIdxGeom(){ + return idxGeom_; + } + + public int getNbPoint() { + if (zone_==null) + return 0; + else + return zone_.getGeometry(idxGeom_).getNumPoints(); + } + + public double getCurv(int _idxPoint) { + if(curv_==null) + return 0; + else + return curv_.get(_idxPoint); + } + + public double getZ(int _idxPoint) { + if (z_==null) + return 0; + else + return ((Double)z_.getObjectValueAt(_idxPoint)).doubleValue(); + } + + public void setCurv(int _idxPoint, double _value) { + if(curv_==null) + return; + CoordinateSequence seq=((GISCoordinateSequenceContainerInterface)zone_.getGeometry(idxGeom_)).getCoordinateSequence(); + Coordinate[] coords=seq.toCoordinateArray(); + if(_idxPoint==0||_idxPoint==seq.size()-1){ + System.out.println("Le d\xE9placement curviligne est points extr\xE9mit\xE9s n'est pour l'instant pas g\xE9r\xE9."); + return; + } + if(_value<0) + return; + // Cas o\xF9 l'index n'est pas sur un point de rupture \\ + if(_idxPoint!=idxRupture1_&&_idxPoint!=idxRupture2_){ + // Cas o\xF9 le point reste encadr\xE9 par les deux m\xEAme points (noralement toujours le cas) => le signe de xa-xb et de ya-yb ne change pas + if((_idxPoint==0||_value>curv_.get(_idxPoint-1))&&(_idxPoint==curv_.size()-1||_value<curv_.get(_idxPoint+1))){ + // D\xE9termination des deux index \xE0 utiliser + int idx1; + int idx2; + double valCurv; + if(_idxPoint>0){ // On a pas selectionn\xE9 le premier point + idx1=_idxPoint-1; + idx2=_idxPoint; + valCurv=_value-curv_.get(idx1); + } + else { + idx1=_idxPoint+1; + idx2=_idxPoint; + valCurv=Math.abs(_value-curv_.get(idx1)); + } + // Calcul des nouvelles coordonn\xE9es + if (seq.getX(idx2)!=seq.getX(idx1)) { + // Extraction du signe de xa-xb + double sign=Math.signum(seq.getX(idx2)-seq.getX(idx1)); + double coefDirecteur=(seq.getY(idx2)-seq.getY(idx1))/(seq.getX(idx2)-seq.getX(idx1)); + double newX=seq.getX(idx1)+sign*valCurv/Math.sqrt(1+coefDirecteur*coefDirecteur); + double newY=seq.getY(idx1)+coefDirecteur*(newX-seq.getX(idx1)); + coords[_idxPoint].x=newX; + coords[_idxPoint].y=newY; + } + else { // Cas du bout de profil vertical + // Extraction du signe de ya-yb + double sign=Math.signum(seq.getY(idx2)-seq.getY(idx1)); + double newY=seq.getY(idx1)+sign*(valCurv-curv_.get(idx1)); + coords[_idxPoint].y=newY; + } + zone_.setCoordinateSequence(idxGeom_, GISGeometryFactory.INSTANCE.getCoordinateSequenceFactory().create(coords), null); + // Mise a jour de la table des valeurs curvilignes + if (_idxPoint!=0) + curv_.set(_idxPoint, _value); + else { + for (int i=1; i<curv_.size(); i++) + curv_.set(i, curv_.get(i)-_value); + } + } + // Cas o\xF9 il y a d\xE9pacement d'un autre point => le signe de xa-xb va potentiellement chang\xE9 => cas interdit + else + //TODO : ne rien faire + System.out.println("le point est d\xE9plac\xE9 au dela de ses points l'encadrants, mouvement impossible."); + } + else + // Cas complexe : l'index est sur un point de rupture \\ + // TODO : d\xE9placement sur l'\xE9llipse avec verification de non croisement des axes du profil + System.out.println("Le point selectionn\xE9 est un point de rupture, cas non g\xE9r\xE9 pour l'instant."); + } + + public void setZ(int _idxPoint, double _value) { + if (z_!=null) { + z_.setObject(_idxPoint, _value, null); + // Mise \xE0 jour de idxZMin_ et idxZMax_ + if (_idxPoint==idxZMax_||_idxPoint==idxZMin_) { + idxZMax_=0; + idxZMin_=0; + for (int i=1; i<z_.getSize(); i++) { + double val=(Double)z_.getObjectValueAt(i); + if (val>(Double)z_.getObjectValueAt(idxZMax_)) + idxZMax_=i; + else if (val<(Double)z_.getObjectValueAt(idxZMin_)) + idxZMin_=i; + } + } + else if (_value>(Double)z_.getObjectValueAt(idxZMax_)) + idxZMax_=_idxPoint; + else if (_value<(Double)z_.getObjectValueAt(idxZMin_)) + idxZMin_=_idxPoint; + fireDataGeometryChanged(); + } + } + + public double getCurvMax() { + if(curv_==null) + return 0; + else + return curv_.get(curv_.size()-1); + } + + public double getCurvMin() { + if(curv_==null) + return 0; + else + return curv_.get(0); + } + + public double getZMax() { + if(z_==null) + return 0; + else + return (Double) z_.getObjectValueAt(idxZMax_); + } + + public double getZMin() { + if(z_==null) + return 0; + else + return (Double) z_.getObjectValueAt(idxZMin_); + } + + public void setValues(int _idxPoint, double _valueCurv, double _valueZ){ + setZ(_idxPoint, _valueZ); + setCurv(_idxPoint, _valueCurv); + } + + public void remove(int _idxPoint){ + if(zone_==null||z_==null||curv_==null) + return; + if(_idxPoint>=0&&_idxPoint<z_.getSize()){ + // Suppression du point dans la zone + CoordinateSequence seq=((GISCoordinateSequenceContainerInterface)zone_.getGeometry(idxGeom_)).getCoordinateSequence(); + Coordinate[] points=new Coordinate[seq.size()-1]; + for(int i=0;i<_idxPoint;i++) + points[i]=seq.getCoordinate(i); + for(int i=_idxPoint+1;i<seq.size();i++) + points[i]=seq.getCoordinate(i); + zone_.setGeometry(idxGeom_, GISGeometryFactory.INSTANCE.createGeometry(zone_.getGeometry(idxGeom_).getClass(), + GISGeometryFactory.INSTANCE.getCoordinateSequenceFactory().create(points)), null); + // Mise \xE0 jour des informations curvilignes \\ + if(_idxPoint==0){ + // Si _idxPoint est le premier point + curv_.remove(0); + for(int i=curv_.size();i>=0;i--) + curv_.set(i, curv_.get(i)-curv_.get(0)); + } + else if (_idxPoint>0&&_idxPoint<curv_.size()-1) { + // Cas g\xE9n\xE9ral si _idxPoint est entre le premier et le dernier + // Attention 'curv_' contient encore _idxPoint alors que 'points' ne le + // contient plus + double delta=-curv_.get(_idxPoint)-curv_.get(_idxPoint+1) + +Math.sqrt(Math.pow(points[_idxPoint-1].x-points[_idxPoint].x, 2) + +Math.pow(points[_idxPoint-1].y-points[_idxPoint].y, 2)); + curv_.remove(_idxPoint); + for(int i=_idxPoint;i<curv_.size();i++) + curv_.set(i, curv_.get(i)+delta); + } + else + // Si _idxPoint est le dernier + curv_.remove(curv_.size()-1); + } + } + + /** List de listener. */ + List<DataGeometryListener> listeners_=new ArrayList<DataGeometryListener>(); + + public void addDataGeometryListener(DataGeometryListener _listener) { + if(!listeners_.contains(_listener)) + listeners_.add(_listener); + } + + public void removeDataGeometryListener(DataGeometryListener _listener) { + if(listeners_.contains(_listener)) + listeners_.remove(_listener); + } + + protected void fireDataGeometryChanged(){ + for(DataGeometryListener listener:listeners_) + listener.dataGeometryChanged(); + } + + protected void fireDataGeometryNewGeom(){ + for(DataGeometryListener listener:listeners_) + listener.dataGeometryNewGeom(); + } +} Property changes on: branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/modeleur1d/DataGeometryAdapter.java ___________________________________________________________________ Added: svn:keywords + Id Added: svn:eol-style + native Added: branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/modeleur1d/DataGeometryListener.java =================================================================== --- branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/modeleur1d/DataGeometryListener.java (rev 0) +++ branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/modeleur1d/DataGeometryListener.java 2008-12-12 17:04:43 UTC (rev 4298) @@ -0,0 +1,25 @@ +/* + * @creation 10 d\xE9c. 2008 + * @modification $Date:$ + * @license GNU General Public License 2 + * @copyright (c)1998-2008 CETMEF 2 bd Gambetta F-60231 Compiegne + * @mail fud...@li... + */ +package org.fudaa.fudaa.modeleur.modeleur1d; + +/** + * Listener de DataGeometry. + * @author Emmanuel MARTIN + * @version $Id:$ + */ +public interface DataGeometryListener { + /** + * Callback lors d'une modification dans le dataGeometry. + */ + public void dataGeometryChanged(); + + /** + * Callback lors que l'objet vis\xE9 par dataGeometry \xE0 \xE9t\xE9 chang\xE9. + */ + public void dataGeometryNewGeom(); +} Property changes on: branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/modeleur1d/DataGeometryListener.java ___________________________________________________________________ Added: svn:keywords + Id Added: svn:eol-style + native Added: branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/modeleur1d/MdlFille1d.java =================================================================== --- branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/modeleur1d/MdlFille1d.java (rev 0) +++ branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/modeleur1d/MdlFille1d.java 2008-12-12 17:04:43 UTC (rev 4298) @@ -0,0 +1,103 @@ +/* + * @creation 20 janv. 08 + * @modification $Date: 2008-12-05 15:33:27 +0100 (ven., 05 déc. 2008) $ + * @license GNU General Public License 2 + * @copyright (c)1998-2008 CETMEF 2 bd Gambetta F-60231 Compiegne + * @mail fud...@li... + */ +package org.fudaa.fudaa.modeleur.modeleur1d; + +import java.awt.Dimension; +import java.awt.Graphics; +import java.awt.print.PageFormat; + +import javax.swing.JComponent; +import javax.swing.JSplitPane; + +import org.fudaa.ctulu.gui.CtuluFilleWithComponent; +import org.fudaa.ebli.calque.BArbreCalque; +import org.fudaa.ebli.impression.EbliFilleImprimable; +import org.fudaa.ebli.ressource.EbliResource; +import org.fudaa.fudaa.modeleur.MdlImplementation; +import org.fudaa.fudaa.sig.FSigResource; + +/** + * La fenetre interne vue 2D des donn\xE9es du modeleur. Elle construit le composant arbre de + * calques {@link org.fudaa.ebli.calque.BArbreCalque}. La plupart des traitements est + * d\xE9l\xE9gu\xE9e au composant {@link org.fudaa.ebli.calque.ZEbliCalquesPanel} encapsul\xE9. + * + * @author fred deniger + * @author bertrand marchand + * @author Emmanuel Martin + * @version $Id$ + */ +public class MdlFille1d extends EbliFilleImprimable implements CtuluFilleWithComponent { + + /** Le controller 1d */ + private Controller1d controller_; + + public MdlFille1d(MdlImplementation _appli) { + super("", true, false, true, true, _appli, null); + // Configuration de la fen\xEAtre 1d \\ + setName("mdlFille1d"); + setTitle(FSigResource.FSIG.getString("Vue 1D")); + setPreferredSize(new Dimension(500, 400)); + setClosable(true); + controller_=new Controller1d(_appli, this); + // Construction des vues contenues dans la fen\xEAtre. \\ + add(new JSplitPane(JSplitPane.VERTICAL_SPLIT, controller_.getVueBief(), new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, controller_.getVueTableau(), controller_.getVueCourbe()))); + setPreferredSize(new Dimension(500, 500)); + setSize(getPreferredSize()); + } + + /* (non-Javadoc) + * @see org.fudaa.ebli.impression.EbliPageable#print(java.awt.Graphics, java.awt.print.PageFormat, int) + */ + public int print(Graphics _g, PageFormat _format, int _page) { + // TODO Auto-generated method stub + return 0; + } + + /* (non-Javadoc) + * @see java.awt.print.Pageable#getNumberOfPages() + */ + public int getNumberOfPages() { + // TODO Auto-generated method stub + return 0; + } + + /* (non-Javadoc) + * @see org.fudaa.ctulu.gui.CtuluFilleWithComponent#createComponent() + */ + public JComponent createComponent() { + BArbreCalque tree=new BArbreCalque(controller_.getTreeModel()); + tree.setRootVisible(false); + return tree; + } + + /* (non-Javadoc) + * @see org.fudaa.ctulu.gui.CtuluFilleWithComponent#getComponentClass() + */ + public Class<?> getComponentClass() { + return BArbreCalque.class; + } + + /* (non-Javadoc) + * @see org.fudaa.ctulu.gui.CtuluFilleWithComponent#getComponentTitle() + */ + public String getComponentTitle() { + return EbliResource.EBLI.getString("Calques"); + } + + /* (non-Javadoc) + * @see org.fudaa.ctulu.gui.CtuluFilleWithComponent#majComponent(java.lang.Object) + */ + public void majComponent(Object _o) { + if (_o instanceof BArbreCalque) + ((BArbreCalque) _o).setModel(controller_.getTreeModel()); + } + + public JComponent[] getSpecificTools() { + return controller_.getToolsActions(); + } +} Property changes on: branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/modeleur1d/MdlFille1d.java ___________________________________________________________________ Added: svn:keywords + Id Added: svn:eol-style + native Added: branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/modeleur1d/VueBief.java =================================================================== --- branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/modeleur1d/VueBief.java (rev 0) +++ branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/modeleur1d/VueBief.java 2008-12-12 17:04:43 UTC (rev 4298) @@ -0,0 +1,105 @@ +/* + * @creation 8 d\xE9c. 2008 + * @modification $Date:$ + * @license GNU General Public License 2 + * @copyright (c)1998-2008 CETMEF 2 bd Gambetta F-60231 Compiegne + * @mail fud...@li... + */ +package org.fudaa.fudaa.modeleur.modeleur1d; + +import java.awt.Dimension; +import java.lang.reflect.Constructor; +import java.lang.reflect.InvocationTargetException; + +import org.fudaa.ebli.calque.BCalque; +import org.fudaa.ebli.calque.BGroupeCalque; +import org.fudaa.ebli.calque.ZEbliCalquesPanel; +import org.fudaa.ebli.calque.edition.ZCalqueLigneBriseeEditable; +import org.fudaa.ebli.calque.edition.ZModeleLigneBriseeEditable; +import org.fudaa.fudaa.modeleur.MdlImplementation; +import org.fudaa.fudaa.modeleur.layer.MdlLayer2dLine; +import org.fudaa.fudaa.sig.layer.FSigEditor; + + +/** + * Cette classe permet le visionnage du bief sur lequel la fenetre 1d travail. + * La vue y est de dessus. + * Il est possible de selectionner les profils pour indiquer lequel doit \xEAtre + * \xE9dit\xE9 via la vue par graphe 1d. + * + * @author Emmanuel MARTIN + * @version $Id:$ + */ +public class VueBief extends ZEbliCalquesPanel { + + private MdlImplementation impl_; + /** Le controller de la fen\xEAtre 1d. */ + Controller1d controller_; + + public VueBief(MdlImplementation _impl, Controller1d _controller) { + super(_impl); + controller_=_controller; + getScene().setRestrictedToCalqueActif(false); + impl_=_impl; + gisEditor_=new FSigEditor(this); + gisEditor_.setUi(_impl); + addCalque(duplicateCalquesBiefs(impl_.get2dFrame().getVisuPanel().getArbreCalqueModel().getRootCalque().getCalqueParNom("gcBiefs")), true); + setPreferredSize(new Dimension(200, 200)); + setSize(getPreferredSize()); + } + + /** + * Duplique r\xE9cursivement la h\xE9rarchie de calque pass\xE9 en param\xE8tre. N'accepte + * que les BGroupeCalques et les calques du modeleur. + */ + private BCalque duplicateCalquesBiefs(BCalque _rootCalque) { + if (_rootCalque==null) + return null; + if (_rootCalque instanceof BGroupeCalque) { + BGroupeCalque bCalque; + try { + bCalque=(BGroupeCalque)_rootCalque.getClass().newInstance(); + } + catch (InstantiationException _exc) {return null;} + catch (IllegalAccessException _exc) {return null;} + // Reprise des param\xE8tres de l'instance + bCalque.setTitle(_rootCalque.getTitle()); + bCalque.setName(_rootCalque.getName()); + BCalque[] calquesFils=_rootCalque.getCalques(); + for (int i=0; i<calquesFils.length; i++) { + BCalque calqueFils=duplicateCalquesBiefs(calquesFils[i]); + if (calqueFils!=null) + bCalque.add(calqueFils); + } + return bCalque; + } + else if (_rootCalque instanceof MdlLayer2dLine) { + // R\xE9cup\xE9ration d'un constructeur pour cloner l'instance + Constructor<?> constructor; + try { + constructor=_rootCalque.getClass().getConstructor(FSigEditor.class); + } + catch (NoSuchMethodException excep) {return null;} + // Reprise des param\xE8tres de l'instance + ZCalqueLigneBriseeEditable calque; + try { + calque=(ZCalqueLigneBriseeEditable)constructor.newInstance((FSigEditor)gisEditor_); + } + catch (IllegalArgumentException _exc) {return null;} + catch (InstantiationException _exc) {return null;} + catch (IllegalAccessException _exc) {return null;} + catch (InvocationTargetException _exc) {return null;} + calque.modele((ZModeleLigneBriseeEditable)((MdlLayer2dLine)_rootCalque).modeleDonnees()); + calque.setTitle(_rootCalque.getTitle()); + calque.setName(_rootCalque.getName()); + return calque; + } + else + return null; + } + + /** Permet de mettre \xE0 jour les calques dans l'arbre en fonction des calques dans l'arbre 2d. */ + public void updateTree(){ + + } +} Property changes on: branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/modeleur1d/VueBief.java ___________________________________________________________________ Added: svn:keywords + Id Added: svn:eol-style + native Added: branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/modeleur1d/VueCourbe.java =================================================================== --- branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/modeleur1d/VueCourbe.java (rev 0) +++ branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/modeleur1d/VueCourbe.java 2008-12-12 17:04:43 UTC (rev 4298) @@ -0,0 +1,267 @@ +/* + * @creation 8 d\xE9c. 2008 + * @modification $Date:$ + * @license GNU General Public License 2 + * @copyright (c)1998-2008 CETMEF 2 bd Gambetta F-60231 Compiegne + * @mail fud...@li... + */ +package org.fudaa.fudaa.modeleur.modeleur1d; + +import java.awt.Color; +import java.awt.Dimension; +import java.util.Arrays; + +import javax.swing.JComponent; + +import org.fudaa.ctulu.CtuluCommandContainer; +import org.fudaa.ctulu.CtuluListSelectionInterface; +import org.fudaa.ctulu.CtuluListSelectionListener; +import org.fudaa.ebli.commun.EbliActionInterface; +import org.fudaa.ebli.commun.EbliComponentFactory; +import org.fudaa.ebli.courbe.EGAxeHorizontal; +import org.fudaa.ebli.courbe.EGAxeVertical; +import org.fudaa.ebli.courbe.EGCourbeSimple; +import org.fudaa.ebli.courbe.EGFillePanel; +import org.fudaa.ebli.courbe.EGGraphe; +import org.fudaa.ebli.courbe.EGGrapheSimpleModel; +import org.fudaa.ebli.courbe.EGModel; +import org.fudaa.ebli.palette.BPaletteInfo.InfoData; +import org.fudaa.ebli.trace.TraceLigne; +import org.fudaa.ebli.trace.TraceLigneModel; +import org.fudaa.fudaa.commun.FudaaLib; + +import com.memoire.bu.BuBorderLayout; +import com.memoire.bu.BuPanel; +import com.memoire.bu.BuSpecificBar; + +/** + * Cette vue permet la modification et le visionnage d'un profil (pr\xE9alablement + * selectionn\xE9 dans la vue du bief). + * + * @author Emmanuel MARTIN + * @version $Id:$ + */ +public class VueCourbe extends BuPanel { + + /** + * Ce nouveau model de courbe permet d'utiliser un model d\xE9j\xE0 existant sous la + * forme d'une DataGeometry. + */ + protected class CourbeGeomModel implements EGModel, DataGeometryListener { + + private DataGeometry data_; + + public CourbeGeomModel(DataGeometry _data) { + if(_data==null) + throw new IllegalArgumentException("_data ne doit pas \xEAtre null."); + data_=_data; + data_.addDataGeometryListener(this); + } + + public void dataGeometryChanged() { + grapheVue_.fullRepaint(); + } + + public void dataGeometryNewGeom(){ + grapheVue_.restore(); + grapheVue_.fullRepaint(); + } + + /* (non-Javadoc) + * @see org.fudaa.ebli.courbe.EGModel#addValue(double, double, org.fudaa.ctulu.CtuluCommandContainer) + */ + public boolean addValue(double _x, double _y, CtuluCommandContainer _cmd) { + // TODO Auto-generated method stub + return false; + } + + /* (non-Javadoc) + * @see org.fudaa.ebli.courbe.EGModel#addValue(double[], double[], org.fudaa.ctulu.CtuluCommandContainer) + */ + public boolean addValue(double[] _x, double[] _y, CtuluCommandContainer _cmd) { + // TODO Auto-generated method stub + return false; + } + + public boolean deplace(int[] idx, double _deltax, double _deltay, CtuluCommandContainer _cmd) { + Arrays.sort(idx); + // Selon le sens de d\xE9placement, il faut commencer par le d\xE9but ou la fin du tableau + if(_deltax<0) + for(int index:idx) + setValue(index, getX(index)+_deltax, getY(index)+_deltay, _cmd); + else + for(int i=idx.length-1;i>=0;i--) + setValue(idx[i], getX(idx[i])+_deltax, getY(idx[i])+_deltay, _cmd); + return true; + } + + public void fillWithInfo(InfoData _table, CtuluListSelectionInterface pt) { + } + + public int getNbValues() { + return data_.getNbPoint(); + } + + public String getTitle() { + return FudaaLib.getS("Courbe"); + } + + public double getX(int _idx) { + return data_.getCurv(_idx); + } + + public double getXMax() { + return data_.getCurvMax(); + } + + public double getXMin() { + return data_.getCurvMin(); + } + + public double getY(int _idx) { + return data_.getZ(_idx); + } + + public double getYMax() { + return data_.getZMax(); + } + + public double getYMin() { + return data_.getZMin(); + } + + /* (non-Javadoc) + * @see org.fudaa.ebli.courbe.EGModel#isDuplicatable() + */ + public boolean isDuplicatable() { + // TODO Auto-generated method stub + return false; + } + + public boolean isModifiable() { + return true; + } + + public boolean isPointDrawn(int _i) { + return true; + } + + public boolean isRemovable() { + return true; + } + + public boolean isSegmentDrawn(int _i) { + return true; + } + + public boolean isTitleModifiable() { + return false; + } + + public boolean isXModifiable() { + return true; + } + + public boolean removeValue(int _i, CtuluCommandContainer _cmd) { + data_.remove(_i); + return true; + } + + /* (non-Javadoc) + * @see org.fudaa.ebli.courbe.EGModel#removeValue(int[], org.fudaa.ctulu.CtuluCommandContainer) + */ + public boolean removeValue(int[] _i, CtuluCommandContainer _cmd) { + // TODO Auto-generated method stub + return false; + } + + public boolean setTitle(String name) { + return false; + } + + public boolean setValue(int _i, double _x, double _y, CtuluCommandContainer _cmd) { + data_.setValues(_i, _x, _y); + return true; + } + + public boolean setValues(int[] _idx, double[] _x, double[] _y, CtuluCommandContainer _cmd) { + for(int index: _idx) + setValue(index, _x[index], _y[index], _cmd); + return true; + } + } + + + /** Le controller de la fen\xEAtre 1d. */ + Controller1d controller_; + /** La courbe. */ + private EGCourbeSimple courbe_; + /** Le container principal de la courbe. */ + private EGGraphe grapheVue_; + /** Le container principal de la courbe. */ + private EGFillePanel containerCourbe_; + + public VueCourbe(Controller1d _controller, DataGeometry _dataGeom){ + controller_=_controller; + + // Cr\xE9ation du container des courbes \\ + EGGrapheSimpleModel grapheModel=new EGGrapheSimpleModel(); + grapheVue_=new EGGraphe(grapheModel); + // Axe X \\ + EGAxeHorizontal axeX = new EGAxeHorizontal(false); + axeX.setTitre(FudaaLib.getS("Abscisse curviligne")); + axeX.setUnite(FudaaLib.getS("m\xE8tre")); + axeX.setBounds(0, 500); // Minimum et maximum de l'axe + axeX.setGraduations(true); + grapheVue_.setXAxe(axeX); + // Axe Y \\ + EGAxeVertical axeY = new EGAxeVertical(); + axeY.setGraduations(true); + axeY.setGrille(new TraceLigneModel(TraceLigne.LISSE, 1, Color.LIGHT_GRAY)); + axeY.setTitre(FudaaLib.getS("Ordonn\xE9e : z")); + axeY.setUnite(FudaaLib.getS("m\xE8tre")); + axeY.setBounds(0, 50); + axeY.setLineColor(Color.BLACK); + // Cr\xE9ation de la courbe \\ + EGModel courbeModel=new CourbeGeomModel(_dataGeom); + courbe_=new EGCourbeSimple(axeY, courbeModel); + courbe_.setAspectContour(Color.RED); + grapheModel.addCourbe(courbe_, null); + // Cr\xE9ation du panel contenant l'ensemble des courbes \\ + containerCourbe_ = new EGFillePanel(grapheVue_); + setLayout(new BuBorderLayout()); + + BuSpecificBar speBar=new BuSpecificBar(); + EbliActionInterface[] actionAbs=containerCourbe_.getSpecificActions(); + JComponent[] actions=new JComponent[actionAbs.length]; + for(int i=0;i<actionAbs.length;i++){ + if(actionAbs[i]!=null) + actions[i]=actionAbs[i].buildToolButton(EbliComponentFactory.INSTANCE); + } + speBar.addTools(actions); + + add(speBar, BuBorderLayout.NORTH); + add(containerCourbe_, BuBorderLayout.CENTER); + + setPreferredSize(new Dimension(200, 200)); + setSize(getPreferredSize()); + } + + /** Ajout un listener \xE0 la selection dans le tableau. */ + public void addSelectionListener(CtuluListSelectionListener _listener){ + containerCourbe_.getSelection().addListeSelectionListener(_listener); + } + + /** Retourne un tableau contenant les index selectionn\xE9s. */ + public int[] getSelection(){ + return containerCourbe_.getSelection().getSelectedIndex(); + } + + /** Selectionne les points dont les indices sont pass\xE9s en param\xE8tre. */ + public void setSelection(int[] _idxSelection){ + containerCourbe_.getSelection().clear(); + if(_idxSelection!=null) + for(int i=0;i<_idxSelection.length;i++) + containerCourbe_.getSelection().add(_idxSelection[i]); + } +} Property changes on: branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/modeleur1d/VueCourbe.java ___________________________________________________________________ Added: svn:keywords + Id Added: svn:eol-style + native Added: branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/modeleur1d/VueTableau.java =================================================================== --- branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/modeleur1d/VueTableau.java (rev 0) +++ branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/modeleur1d/VueTableau.java 2008-12-12 17:04:43 UTC (rev 4298) @@ -0,0 +1,118 @@ +/* + * @creation 8 d\xE9c. 2008 + * @modification $Date:$ + * @license GNU General Public License 2 + * @copyright (c)1998-2008 CETMEF 2 bd Gambetta F-60231 Compiegne + * @mail fud...@li... + */ +package org.fudaa.fudaa.modeleur.modeleur1d; + +import java.awt.Dimension; + +import javax.swing.JTable; +import javax.swing.event.ListSelectionListener; +import javax.swing.table.DefaultTableModel; + +import org.fudaa.fudaa.commun.FudaaLib; + +import com.memoire.bu.BuBorderLayout; +import com.memoire.bu.BuPanel; +import com.memoire.bu.BuScrollPane; + +/** + * Cette classe permet le visionnage des informations sous forme d'un tableau. + * Chaque ligne repr\xE9sente un point de la courbe, la colonne de gauche indique + * l'abscisse curviligne et la colonne de droite indique la valeur bathym\xE9tique + * du point. + * + * @author Emmanuel MARTIN + * @version $Id:$ + */ +public class VueTableau extends BuPanel { + + /** + * Le model du tableau. Celui ci extrait les informations du DataGeometryAdapter. + */ + protected class TableGeomModel extends DefaultTableModel implements DataGeometryListener { + + private DataGeometry data_; + + public TableGeomModel(DataGeometry _data){ + super(new String[]{FudaaLib.getS("Abs curv"), FudaaLib.getS("Z")}, 0); + if(_data==null) + throw new IllegalArgumentException("_data ne doit pas \xEAtre null."); + data_=_data; + data_.addDataGeometryListener(this); + } + + public void dataGeometryChanged() { + fireTableDataChanged(); + } + + public void dataGeometryNewGeom(){ + fireTableDataChanged(); + } + + public Class<?> getColumnClass(int columnIndex) { + return Double.class; + } + + public int getRowCount() { + if(data_==null) + return 0; + else + return data_.getNbPoint(); + } + + public Object getValueAt(int rowIndex, int columnIndex) { + if(columnIndex==0) + return data_.getCurv(rowIndex); + else + return data_.getZ(rowIndex); + } + + public void setValueAt(Object value, int rowIndex, int columnIndex) { + if(columnIndex==0) + data_.setCurv(rowIndex, (Double) value); + else + data_.setZ(rowIndex, (Double) value); + } + } + + /** Le controller de la fen\xEAtre 1d. */ + @SuppressWarnings("unused") + private Controller1d controller_; + /** La vue du tableau. */ + private JTable table_; + /** Le model du tableau affich\xE9 par le panel. */ + private DefaultTableModel modelTable_; + + public VueTableau(Controller1d _controller, DataGeometry _data){ + controller_=_controller; + setLayout(new BuBorderLayout(2, 2)); + modelTable_=new TableGeomModel(_data); + table_=new JTable(modelTable_); + add(new BuScrollPane(table_)); + setPreferredSize(new Dimension(200, 200)); + setSize(getPreferredSize()); + } + + /** Ajout un listener \xE0 la selection dans le tableau. */ + public void addSelectionListener(ListSelectionListener _listener){ + table_.getSelectionModel().addListSelectionListener(_listener); + } + + /** Retourne un tableau contenant les index selectionn\xE9s. */ + public int[] getSelection(){ + return table_.getSelectedRows(); + } + + /** Selectionne les points dont les indices sont pass\xE9s en param\xE8tre. */ + public void setSelection(int[] _idxSelection){ + table_.getSelectionModel().clearSelection(); + if(_idxSelection!=null) + for(int i=0;i<_idxSelection.length;i++) + table_.getSelectionModel().addSelectionInterval(_idxSelection[i], _idxSelection[i]); + } + +} Property changes on: branches/FudaaModeleur_TC1Bis/fudaa_devel/fudaa/src/org/fudaa/fudaa/modeleur/modeleur1d/VueTableau.java ___________________________________________________________________ Added: svn:keywords + Id Added: svn:eol-style + native This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <had...@us...> - 2008-12-12 08:32:53
|
Revision: 4297 http://fudaa.svn.sourceforge.net/fudaa/?rev=4297&view=rev Author: hadouxad Date: 2008-12-12 08:32:49 +0000 (Fri, 12 Dec 2008) Log Message: ----------- Correction recette 9 d?\195?\169cembre Modified Paths: -------------- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGInteractionSuivi.java Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGInteractionSuivi.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGInteractionSuivi.java 2008-12-11 18:45:55 UTC (rev 4296) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGInteractionSuivi.java 2008-12-12 08:32:49 UTC (rev 4297) @@ -145,7 +145,8 @@ tb_.getTraceLigne().setCouleur(v_.getLineColor()); tb_.setHPosition(v_.isDroite() ? SwingConstants.LEFT : SwingConstants.RIGHT); tb_.setVPosition(SwingConstants.CENTER); - tb_.paintBox((Graphics2D) _g, v_.isDroite() ? xmax : xmin, y, v_.getStringInterpolatedAffiche(yreel_)); + //tb_.paintBox((Graphics2D) _g, v_.isDroite() ? xmax : xmin, y, v_.getStringInterpolatedAffiche(yreel_)); + tb_.paintBox((Graphics2D) _g,xmax , y, v_.getStringInterpolatedAffiche(yreel_)); if (logAndEcart) { tb_.paintBox((Graphics2D) _g, x + 5, yPressed_, v_.getStringInterpolatedAffiche(r.getYReel( yPressed_, v_))); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <had...@us...> - 2008-12-11 18:46:01
|
Revision: 4296 http://fudaa.svn.sourceforge.net/fudaa/?rev=4296&view=rev Author: hadouxad Date: 2008-12-11 18:45:55 +0000 (Thu, 11 Dec 2008) Log Message: ----------- Correction recette 9 d?\195?\169cembre Modified Paths: -------------- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/trace/TraceLigne.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetBordureSingle.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetWithBordure.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/commun/courbe/FudaaCourbeWizardImportScope.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostLayoutPanelController.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/persist/TrPostPersistenceManager.java Added Paths: ----------- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetFlecheSimple.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/creator/EbliWidgetCreatorFlecheSimple.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/creator/ShapeCreatorFlecheSimple.java Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/trace/TraceLigne.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/trace/TraceLigne.java 2008-12-11 18:44:43 UTC (rev 4295) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/trace/TraceLigne.java 2008-12-11 18:45:55 UTC (rev 4296) @@ -376,7 +376,9 @@ _g.setColor(oldColor); _g.setStroke(oldStroke); } - + + + /** * Trace un polygone. Il est trace avec le type definit par <i>typeTrait </i>. * Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetBordureSingle.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetBordureSingle.java 2008-12-11 18:44:43 UTC (rev 4295) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetBordureSingle.java 2008-12-11 18:45:55 UTC (rev 4296) @@ -140,9 +140,27 @@ layout_ = new OverlayLayoutGap(insets_); setLayout(layout_); + + + + //-- on redimensionne la frame correctement --// + if(oldTraceligne_.getEpaisseur()!=l.getEpaisseur()){ + //-- on ajoute le delta d'epaisseur --// + float delta=l.getEpaisseur()-oldTraceligne_.getEpaisseur(); + System.out.println("\n***Delta: "+delta); + Rectangle sizeWidget=this.getPreferredBounds(); + //-- on rajoute le double de delta pour l'\xE9paisseur des 2 cot\xE9s --// + sizeWidget.height+=2*delta; + sizeWidget.width+=2*delta; + this.setPreferredBounds(sizeWidget); + oldTraceligne_=new TraceLigne(l) ; + } + + revalidate(); } + TraceLigne oldTraceligne_=new TraceLigne(getTraceLigneModel().buildCopy()); public Insets createInset(final int epaisseur) { Added: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetFlecheSimple.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetFlecheSimple.java (rev 0) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetFlecheSimple.java 2008-12-11 18:45:55 UTC (rev 4296) @@ -0,0 +1,100 @@ +package org.fudaa.ebli.visuallibrary; + +import java.awt.Color; +import java.awt.Graphics2D; +import java.awt.Insets; +import java.awt.Rectangle; + +import org.fudaa.ebli.trace.TraceLigne; +import org.fudaa.ebli.visuallibrary.layout.OverlayLayoutGap; + +/** + * Legende Widget qui permet de construire une fleche simple sans contenu + * + * @author Adrien Hadoux + */ +public class EbliWidgetFlecheSimple extends EbliWidget { + + Insets inGaps_; + int largeurBorder = 15; + int espaceInterieur = 5; + public static int ORIENTATION_NORTH = 0; + public static int ORIENTATION_SOUTH = 1; + public static int ORIENTATION_EAST = 2; + public static int ORIENTATION_WEST = 3; + + public Color couleurContour = Color.black; + public Color couleurFond = Color.white; + + /** + * @param _scene + */ + public EbliWidgetFlecheSimple(final EbliScene _scene, final int orientation) { + super(_scene, true); + inGaps_ = new Insets(largeurBorder + espaceInterieur, largeurBorder + espaceInterieur, largeurBorder + + espaceInterieur, largeurBorder + espaceInterieur); + // Ce layout permet de placer le texte + + setLayout(new OverlayLayoutGap(inGaps_)); + + } + + /* + * protected Rectangle calculateClientArea() { Rectangle res = this.getPreferredBounds(); // TODO Auto-generated + * method stub return new Rectangle(0, 0, 2 (largeurBorder + espaceInterieur) + res.width, 2 (largeurBorder + + * espaceInterieur) + res.height); } + */ + + @Override + protected void paintWidget() { + final Graphics2D g = getGraphics(); + + final Rectangle rec = getClientArea(); + + // -- couleur de fond --// + g.setColor(couleurFond); + g.fillRect(0, 0, rec.width, rec.height); + + g.translate(rec.x, rec.y); + // la ligne + + final TraceLigne l = new TraceLigne(); + + l.setEpaisseur(largeurBorder); + + l.setCouleur(couleurContour); + + l.dessineFleche(g, (int) (l.getEpaisseur() / 2), (rec.height / 2), (int) (rec.width - l.getEpaisseur() / 2), + (rec.height / 2)); + + /* + * Shape shape; l.dessineShape(g, shape); + */ + + g.translate(-rec.x, -rec.y); + + } + + @Override + public void setColorContour(final Color newColor) { + couleurContour = newColor; + repaint(); + } + + @Override + public Color getColorContour() { + return couleurContour; + } + + @Override + public void setColorFond(final Color newColor) { + couleurFond = newColor; + repaint(); + } + + @Override + public Color getColorFond() { + return couleurFond; + } + +} Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetWithBordure.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetWithBordure.java 2008-12-11 18:44:43 UTC (rev 4295) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetWithBordure.java 2008-12-11 18:45:55 UTC (rev 4296) @@ -4,6 +4,7 @@ */ package org.fudaa.ebli.visuallibrary; +import java.awt.Dimension; import java.awt.Graphics2D; import java.awt.Insets; import java.awt.Rectangle; @@ -33,6 +34,9 @@ super(_scene, _controllerDefaut); } + + + @Override protected void paintWidget() { @@ -59,6 +63,7 @@ g.translate(-rec.x, -rec.y); // setBackground(getColorFond()); + } Added: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/creator/EbliWidgetCreatorFlecheSimple.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/creator/EbliWidgetCreatorFlecheSimple.java (rev 0) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/creator/EbliWidgetCreatorFlecheSimple.java 2008-12-11 18:45:55 UTC (rev 4296) @@ -0,0 +1,83 @@ +package org.fudaa.ebli.visuallibrary.creator; + +import java.awt.Point; +import java.util.Map; + +import org.fudaa.ebli.visuallibrary.EbliNode; +import org.fudaa.ebli.visuallibrary.EbliNodeDefault; +import org.fudaa.ebli.visuallibrary.EbliScene; +import org.fudaa.ebli.visuallibrary.EbliWidget; +import org.fudaa.ebli.visuallibrary.EbliWidgetFlecheSimple; + +import org.fudaa.ebli.visuallibrary.EbliWidgetWithBordure; + +/** + * Creator de fleche simple sans contenu. + * @author Adrien Hadoux + * + */ +public class EbliWidgetCreatorFlecheSimple implements EbliWidgetCreator { + + int orientation; + + EbliWidgetFlecheSimple res; + + public EbliWidgetCreatorFlecheSimple(final int orientation) { + super(); + this.orientation = orientation; + + } + + public EbliWidgetCreatorFlecheSimple() { + + } + + public int getG() { + return orientation; + } + + public void setG(final int orientation) { + this.orientation = orientation; + } + + public EbliWidget create(final EbliScene _scene) { + res = new EbliWidgetFlecheSimple(_scene, orientation); + + return res; + } + + public EbliWidget getWidget() { + // TODO Auto-generated method stub + return res; + } + + public EbliNode duplicate(final EbliNode _nodeAdupliquer) { + + final EbliNode duplique = new EbliNodeDefault(); + + duplique.setCreator(new EbliWidgetCreatorFlecheSimple(orientation)); + + duplique.setTitle(_nodeAdupliquer.getTitle()); + // recopie des tailles + duplique.setPreferedSize(_nodeAdupliquer.getPreferedSize()); + // -- calcul nouvelle position + final Point nouvellePosition = new Point(getWidget().getLocation().x, (getWidget().getLocation().y + getWidget() + .getClientArea().height)); + duplique.setPreferedLocation(nouvellePosition); + + return duplique; + } + + public EbliWidgetWithBordure getBordure() { + return null; + } + + public Object getPersistData(final Map parameters) { + return null; + } + + public void setPersistData(final Object data, final Map parameters) { + + } + +} Added: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/creator/ShapeCreatorFlecheSimple.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/creator/ShapeCreatorFlecheSimple.java (rev 0) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/creator/ShapeCreatorFlecheSimple.java 2008-12-11 18:45:55 UTC (rev 4296) @@ -0,0 +1,37 @@ +package org.fudaa.ebli.visuallibrary.creator; + + +import java.awt.Shape; +import java.awt.geom.GeneralPath; +import java.awt.geom.Rectangle2D; +import java.util.Map; + +/** + * Ctreator qui se charge de g\xE9n\xE9rer une fleche simple. + * @author Adrien Hadoux + * + */ +public class ShapeCreatorFlecheSimple implements ShapeCreator { + + public Shape createShapeFor(final Rectangle2D.Float rec, final Map options, final float largeurTrait) { + final Float ratioHeadW = (Float) options.get("arrow.ratioHeadW"); + final Float ratioBaseH = (Float) options.get("arrow.ratioBaseH"); + final float rb = ratioBaseH == null ? 0.3f : ratioBaseH.floatValue(); + final float rh = ratioHeadW == null ? 0.3f : ratioHeadW.floatValue(); + final float middleH = rec.y + rec.height / 2f; + final float hauteurBase = rec.height * rb; + final float largeurHead = rec.width * rh; + final GeneralPath path = new GeneralPath(); + path.moveTo(rec.x, middleH ); + path.lineTo(rec.x + rec.width - largeurTrait, middleH);//- + path.lineTo(rec.x + rec.width - largeurHead, rec.y + largeurTrait / 2);// \ + path.lineTo(rec.x + rec.width - largeurTrait , middleH);//- + path.lineTo(rec.x + rec.width - largeurHead, rec.y + rec.height - largeurTrait / 2);// / + path.lineTo(rec.x + rec.width - largeurTrait , middleH);//- + path.lineTo(rec.x, middleH ); + //path.lineTo(rec.x + rec.width - largeurHead, middleH + hauteurBase / 2); + //path.lineTo(rec.x, middleH + hauteurBase / 2); + path.closePath(); + return path; + } +} Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/commun/courbe/FudaaCourbeWizardImportScope.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/commun/courbe/FudaaCourbeWizardImportScope.java 2008-12-11 18:44:43 UTC (rev 4295) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/commun/courbe/FudaaCourbeWizardImportScope.java 2008-12-11 18:45:55 UTC (rev 4296) @@ -669,7 +669,7 @@ FudaaCourbeImporterScope.createGraphe(target_, tabEvol, null, prog); }else if(comBoChoixTypeGraphe_.getSelectedIndex()==1){ - //profil spatial + //evol temporelle int debSeparator=listSeparatorDebPlage_.getSelectedIndex(); int finSeparator=listSeparatorFinPlage_.getSelectedIndex(); int[] selectedVariables= listVariablesGENE2_.getSelectedIndices(); Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostLayoutPanelController.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostLayoutPanelController.java 2008-12-11 18:44:43 UTC (rev 4295) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostLayoutPanelController.java 2008-12-11 18:45:55 UTC (rev 4296) @@ -58,6 +58,7 @@ import org.fudaa.ebli.visuallibrary.creator.ShapeCreatorDblFleche; import org.fudaa.ebli.visuallibrary.creator.ShapeCreatorEllipse; import org.fudaa.ebli.visuallibrary.creator.ShapeCreatorFleche; +import org.fudaa.ebli.visuallibrary.creator.ShapeCreatorFlecheSimple; import org.fudaa.ebli.visuallibrary.creator.ShapeCreatorLine; import org.fudaa.ebli.visuallibrary.creator.ShapeCreatorRectangle; import org.fudaa.fudaa.tr.common.TrResource; @@ -324,7 +325,21 @@ return nodeFleche; } + + public EbliNode addFlecheSimple() { + // -- ajout du rectangle --// + final EbliNodeDefault nodeFleche = new EbliNodeDefault(); + nodeFleche.setTitle("Fleche simple"); + nodeFleche.setCreator(new EbliWidgetCreatorShape(new ShapeCreatorFlecheSimple())); + nodeFleche.setPreferedSize(new Dimension(100, 50)); + nodeFleche.setPreferedLocation(new Point(350, 125)); + // ajout du node au layout + addNode(nodeFleche); + + return nodeFleche; + } + public EbliNode addDblFleche() { // -- ajout du rectangle --// final EbliNodeDefault nodeFleche = new EbliNodeDefault(); @@ -411,6 +426,15 @@ } }); + // -- palette fleche simple--// + _l.add(new EbliActionSimple(EbliResource.EBLI.getString("Fleche"), + EbliResource.EBLI.getToolIcon("crystal_bu_link"), "WIDGETFLECHESIMPLE") { + @Override + public void actionPerformed(final ActionEvent _evt) { + addFlecheSimple(); + } + }); + // -- palette fleche --// _l.add(new EbliActionSimple(EbliResource.EBLI.getString("Fleche"), EbliResource.EBLI.getToolIcon("crystal_bu_link"), "WIDGETFLECHE") { @@ -419,7 +443,7 @@ addFleche(); } }); - + // -- palette double fleche --// // crystal_bu_scrollpane_corner.png _l.add(new EbliActionSimple(EbliResource.EBLI.getString("Double Fleche"), EbliResource.EBLI Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/persist/TrPostPersistenceManager.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/persist/TrPostPersistenceManager.java 2008-12-11 18:44:43 UTC (rev 4295) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/persist/TrPostPersistenceManager.java 2008-12-11 18:45:55 UTC (rev 4296) @@ -595,7 +595,9 @@ * @throws IOException * @throws ClassNotFoundException */ - public void loadSource(final File file) { + public boolean loadSource(final File file) { + + boolean reussite=true; // -- outputstream du xstream --// ObjectInputStream in = null; try { @@ -646,6 +648,8 @@ } }else{ managerError.addMessageError("setup: path "+path+" invalide. Fichier r\xE9sultat non charg\xE9"); + messageError(true); + reussite= false; } } } @@ -665,11 +669,14 @@ } finally { try { in.close(); + } catch (final IOException e) { // TODO Auto-generated catch block e.printStackTrace(); messageError(false); + } + return reussite; } } @@ -920,7 +927,11 @@ // -- etape 2 sauvegarde du fichier contenant tous les sources ouverts progression("Chargement du fichier descripteur de sources", 15); file = new File(projet_.getAbsolutePath() + File.separator + setupProject); - loadSource(file); + if(! loadSource(file)){ + managerError.addMessageError("Veuillez corriger les chemins des fichiers r\xE9sultats dans le fichier setup et r\xE9it\xE9rez l'op\xE9ration."); + managerError.showDialog(ui_); + return false; + } // -- etape 6; lecture des variables --// progression("Lecture variables", 20); loadVariables(pathVariables); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <had...@us...> - 2008-12-11 18:44:53
|
Revision: 4295 http://fudaa.svn.sourceforge.net/fudaa/?rev=4295&view=rev Author: hadouxad Date: 2008-12-11 18:44:43 +0000 (Thu, 11 Dec 2008) Log Message: ----------- corrections bugs Modified Paths: -------------- branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/telemac/io/ScopeStructure.java Modified: branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/telemac/io/ScopeStructure.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/telemac/io/ScopeStructure.java 2008-12-11 09:14:38 UTC (rev 4294) +++ branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/telemac/io/ScopeStructure.java 2008-12-11 18:44:43 UTC (rev 4295) @@ -474,7 +474,7 @@ public EvolutionReguliere[] returnEvolReguliere() { - EvolutionReguliere[] evolReg = new EvolutionReguliere[getNbSeparator() * getNbVariables()]; + EvolutionReguliere[] evolReg = new EvolutionReguliere[getNbSeparator() * (getNbVariables()-1)]; // -- on parcours tous les pas de temps --// for (int h = 0; h < getNbSeparator(); h++) { @@ -482,11 +482,11 @@ String pdt = getSeparator(h); // -- on parcours toutes les variables et non les x --// - for (int i = 1; i < getNbVariables(); i++) { - String nomVar = getVariable(i); + for (int i = 0; i < getNbVariables()-1; i++) { + String nomVar = getVariable(i+1); List<Double> listeX = getAllX(pdt); - List<Double> listeY = getListValueForVariableForSeparator(pdt, i); + List<Double> listeY = getListValueForVariableForSeparator(pdt, i+1); double[] tabX = new double[listeX.size()]; double[] tabY = new double[listeY.size()]; @@ -511,12 +511,13 @@ * @return */ public EvolutionReguliere[] returnEvolRegulierePourTemporelles() { - EvolutionReguliere[] evolReg = new EvolutionReguliere[getNbVariables()]; + EvolutionReguliere[] evolReg = new EvolutionReguliere[getNbVariables()-1]; // -- on parcours toutes les variables et non les x, on a une seule variable --// - for (int i = 1; i < getNbVariables(); i++) { - String nomVar = getVariable(i); + for (int i = 0; i < getNbVariables()-1; i++) { + //-- on recupere les variables i+1 car la var 0 = les X --// + String nomVar = getVariable(i+1); List<Double> listeTOTALX =new ArrayList<Double>(); List<Double> listeTOTALY = new ArrayList<Double>(); @@ -526,7 +527,7 @@ //on recupere les x de ce separator List<Double> listX=getListValueForVariableForSeparator(getSeparator(k), 0); //on recupere les y de la variable de la courbe - List<Double> listY=getListValueForVariableForSeparator(getSeparator(k), i); + List<Double> listY=getListValueForVariableForSeparator(getSeparator(k), i+1); //on ajoute tout cela au x et y totaux listeTOTALX.addAll(listX); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <had...@us...> - 2008-12-11 09:14:49
|
Revision: 4294 http://fudaa.svn.sourceforge.net/fudaa/?rev=4294&view=rev Author: hadouxad Date: 2008-12-11 09:14:38 +0000 (Thu, 11 Dec 2008) Log Message: ----------- r?\195?\169solution bug 8b Modified Paths: -------------- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/controle/BSelecteurListComboBox.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetControllerCalque.java Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/controle/BSelecteurListComboBox.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/controle/BSelecteurListComboBox.java 2008-12-10 23:38:37 UTC (rev 4293) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/controle/BSelecteurListComboBox.java 2008-12-11 09:14:38 UTC (rev 4294) @@ -7,6 +7,8 @@ */ package org.fudaa.ebli.controle; +import java.awt.Dimension; + import javax.swing.JComponent; import javax.swing.ListModel; import javax.swing.ListSelectionModel; @@ -81,19 +83,32 @@ public boolean isUpdatingFromSrc_; public BSelecteurListComboBox() { - setLayout(new BuBorderLayout()); - cb_ = new BuComboBox(); - adapter_ = new CtuluComboBoxModelAdapter(CtuluListModelEmpty.EMPTY); - cb_.setModel(adapter_); - cbListener_ = new CbDataListener(); - listSelectionListener_ = new TargetSelectionListener(); - adapter_.addListDataListener(cbListener_); - cb_.setEnabled(false); - add(cb_, BuBorderLayout.CENTER); + this(null); } + + public BSelecteurListComboBox(Dimension sizeCombo) { + setLayout(new BuBorderLayout()); + cb_ = new BuComboBox(); + adapter_ = new CtuluComboBoxModelAdapter(CtuluListModelEmpty.EMPTY); + cb_.setModel(adapter_); + cbListener_ = new CbDataListener(); + listSelectionListener_ = new TargetSelectionListener(); + adapter_.addListDataListener(cbListener_); + cb_.setEnabled(false); + + if(sizeCombo!=null){ + cb_.setMinimumSize(sizeCombo); + cb_.setMaximumSize(sizeCombo); + cb_.setSize(sizeCombo); + } + add(cb_, BuBorderLayout.CENTER); + + } + + boolean isTargetUpdatable() { return target_ != null && target_.getListSelectionModel() != null; } Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetControllerCalque.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetControllerCalque.java 2008-12-10 23:38:37 UTC (rev 4293) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetControllerCalque.java 2008-12-11 09:14:38 UTC (rev 4294) @@ -1,5 +1,6 @@ package org.fudaa.ebli.visuallibrary.calque; +import java.awt.Dimension; import java.awt.Point; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; @@ -508,13 +509,19 @@ comboVar_ = new BSelecteurListComboBox(); // pour mettre \xE0 jour la combo d\xE8s que la s\xE9lection de l'arbre change majComboVar(); - // combo.setPalettePanelTarget(listselector.getTarget()); - comboVar_.setMinimumSize(comboVar_.getPreferredSize()); - comboVar_.setMaximumSize(comboVar_.getPreferredSize()); // ajout combobox toolbarCalque_.add(comboVar_); - + + comboVar_.setPreferredSize(new Dimension(Math.max(comboVar_.getPreferredSize().width,200),comboVar_.getPreferredSize().height)); + comboVar_.getCb().setMaximumSize(new Dimension(Math.max(comboVar_.getPreferredSize().width,200),comboVar_.getPreferredSize().height)); + comboVar_.getCb().setMinimumSize(new Dimension(Math.max(comboVar_.getPreferredSize().width,200),comboVar_.getPreferredSize().height)); + comboVar_.getCb().setSize(new Dimension(Math.max(comboVar_.getPreferredSize().width,200),comboVar_.getPreferredSize().height)); + comboVar_.getCb().setPreferredSize(new Dimension(Math.max(comboVar_.getPreferredSize().width,200),comboVar_.getPreferredSize().height)); + + comboVar_.revalidate(); + toolbarCalque_.revalidate(); + // -- ajout des combo des pas de temps --// final EbliCalqueActionTimeChooser chooserT = new EbliCalqueActionTimeChooser(getVisuPanel().getArbreCalqueModel() .getTreeSelectionModel(), true); @@ -522,12 +529,16 @@ chooserT.setSelected(true); final BSelecteurListComboBox combo = (BSelecteurListComboBox) chooserT.buildContentPane(); chooserT.updateBeforeShow(); - combo.setMaximumSize(combo.getPreferredSize()); - combo.setMinimumSize(combo.getPreferredSize()); - + // ajout combobox toolbarCalque_.add(combo); - + combo.setPreferredSize(new Dimension(Math.max(comboVar_.getPreferredSize().width,200),comboVar_.getPreferredSize().height)); + combo.getCb().setMaximumSize(new Dimension(Math.max(comboVar_.getPreferredSize().width,200),comboVar_.getPreferredSize().height)); + combo.getCb().setMinimumSize(new Dimension(Math.max(comboVar_.getPreferredSize().width,200),comboVar_.getPreferredSize().height)); + combo.getCb().setSize(new Dimension(Math.max(comboVar_.getPreferredSize().width,200),comboVar_.getPreferredSize().height)); + combo.getCb().setPreferredSize(new Dimension(Math.max(comboVar_.getPreferredSize().width,200),comboVar_.getPreferredSize().height)); + combo.revalidate(); + toolbarCalque_.revalidate(); } // -- mise a jour de la combo de variables pour le cas ou l on ajoute des // var dans editer les var This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <de...@us...> - 2008-12-10 23:38:42
|
Revision: 4293 http://fudaa.svn.sourceforge.net/fudaa/?rev=4293&view=rev Author: deniger Date: 2008-12-10 23:38:37 +0000 (Wed, 10 Dec 2008) Log Message: ----------- Modified Paths: -------------- branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/operation/EfLineIntersectionsCorrectionActivity.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/operation/EfLineIntersectionsCorrectionTester.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/operation/EfLineIntersectionsResultsDefault.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/operation/EfLineIntersectionsResultsI.java branches/Prepro-0.92-SNAPSHOT/dodico/test/org/fudaa/dodico/ef/TestJLineIntersection.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/BGroupeCalque.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZCalqueRepereInteraction.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZCalqueSelectionInteractionAbstract.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZCalqueSelectionInteractionMulti.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZCalqueSelectionInteractionSimple.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZEbliCalquePanelController.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZebliCalquePersist.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/commun/EbliLib.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGGraphe.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGInteractionSelection.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliScene.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliSceneController.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetCreatorVueCalque.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetVueCalque.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetControllerGraphe.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetTitle.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/layer/MvVisuPanel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvProfileCoteTester.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostLayoutFille.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostVisuPanelPersistManager.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/data/TrPostDataCreationPanel.java Modified: branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/operation/EfLineIntersectionsCorrectionActivity.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/operation/EfLineIntersectionsCorrectionActivity.java 2008-12-10 14:52:21 UTC (rev 4292) +++ branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/operation/EfLineIntersectionsCorrectionActivity.java 2008-12-10 23:38:37 UTC (rev 4293) @@ -13,6 +13,7 @@ import java.util.List; import org.fudaa.ctulu.CtuluActivity; +import org.fudaa.ctulu.CtuluVariable; import org.fudaa.ctulu.ProgressionInterface; import org.fudaa.ctulu.ProgressionUpdater; @@ -31,7 +32,7 @@ public EfLineIntersectionsResultsI correct(EfLineIntersectionsResultsI _res, EfLineIntersectionsCorrectionTester _tester, int _tidx, ProgressionInterface _prog) { stop_ = false; - if (_tester == null || _res == null || _res.isEmpty()) return _res; + if (_tester == null || _res == null || _res.isEmpty() || !_tester.isEnableFor(_res)) return _res; int nbNew = _res.getNbIntersect() + 15; BitSet isOut = new BitSet(nbNew); final List setIn = new ArrayList(2); @@ -130,5 +131,9 @@ return out_.get(_idxInters); } + public boolean isDataAvailable(CtuluVariable _v) { + return res_.isDataAvailable(_v); + } + } } Modified: branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/operation/EfLineIntersectionsCorrectionTester.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/operation/EfLineIntersectionsCorrectionTester.java 2008-12-10 14:52:21 UTC (rev 4292) +++ branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/operation/EfLineIntersectionsCorrectionTester.java 2008-12-10 23:38:37 UTC (rev 4293) @@ -14,6 +14,12 @@ * @version $Id: EfLineIntersectionsCorrectionTester.java,v 1.1 2007-06-13 12:55:42 deniger Exp $ */ public interface EfLineIntersectionsCorrectionTester { + + /** + * @param _res le r\xE9sultat qui sera corrig\xE9 + * @return true si cette correction est active pour le resultat donne + */ + boolean isEnableFor(EfLineIntersectionsResultsI _res); boolean createNews(int _tidx, EfLineIntersection _i1, EfLineIntersection _i2, List _setNewIn); Modified: branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/operation/EfLineIntersectionsResultsDefault.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/operation/EfLineIntersectionsResultsDefault.java 2008-12-10 14:52:21 UTC (rev 4292) +++ branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/operation/EfLineIntersectionsResultsDefault.java 2008-12-10 23:38:37 UTC (rev 4293) @@ -7,6 +7,8 @@ */ package org.fudaa.dodico.ef.operation; +import org.fudaa.ctulu.CtuluVariable; + /** * @author fred deniger * @version $Id: EfLineIntersectionsResultsDefault.java,v 1.1 2007-06-13 12:55:43 deniger Exp $ @@ -52,4 +54,8 @@ return mng_.isSegmentOut(_idxInters); } + public boolean isDataAvailable(CtuluVariable _v) { + return mng_.getGridData().getData().isDefined(_v); + } + } Modified: branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/operation/EfLineIntersectionsResultsI.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/operation/EfLineIntersectionsResultsI.java 2008-12-10 14:52:21 UTC (rev 4292) +++ branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/operation/EfLineIntersectionsResultsI.java 2008-12-10 23:38:37 UTC (rev 4293) @@ -7,6 +7,8 @@ */ package org.fudaa.dodico.ef.operation; +import org.fudaa.ctulu.CtuluVariable; + /** * @author fred deniger * @version $Id: EfLineIntersectionsResultsI.java,v 1.1 2007-06-13 12:55:42 deniger Exp $ @@ -28,5 +30,11 @@ boolean isSegmentOut(final int _idxInters); boolean isForMesh(); + + /** + * @param _v la variable a tester + * @return true si des donnees sont disponibles pour la variable _v + */ + boolean isDataAvailable(CtuluVariable _v); } \ No newline at end of file Modified: branches/Prepro-0.92-SNAPSHOT/dodico/test/org/fudaa/dodico/ef/TestJLineIntersection.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/dodico/test/org/fudaa/dodico/ef/TestJLineIntersection.java 2008-12-10 14:52:21 UTC (rev 4292) +++ branches/Prepro-0.92-SNAPSHOT/dodico/test/org/fudaa/dodico/ef/TestJLineIntersection.java 2008-12-10 23:38:37 UTC (rev 4293) @@ -129,6 +129,8 @@ } protected class DefaultTester implements EfLineIntersectionsCorrectionTester { + + public boolean createNews(int _tidx, EfLineIntersection _i1, EfLineIntersection _i2, List _setNewIn) { EfLineIntersectionParent parent = _i1.getParent(); @@ -144,6 +146,10 @@ return false; } + + public boolean isEnableFor(EfLineIntersectionsResultsI _res) { + return true; + } } private EfDataNode createDataNodes(EfGridInterface _grid) { Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/BGroupeCalque.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/BGroupeCalque.java 2008-12-10 14:52:21 UTC (rev 4292) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/BGroupeCalque.java 2008-12-10 23:38:37 UTC (rev 4293) @@ -12,11 +12,14 @@ import java.awt.Component; import java.awt.Graphics; import java.awt.Graphics2D; +import java.awt.Image; import java.util.ArrayList; import java.util.Arrays; +import java.util.HashMap; import java.util.List; import org.fudaa.ctulu.CtuluLibString; +import org.fudaa.ctulu.image.CtuluLibImage; import org.fudaa.ebli.commun.EbliLib; import org.fudaa.ebli.controle.BConfigurableInterface; import org.fudaa.ebli.geometrie.GrBoite; @@ -82,11 +85,35 @@ } } + boolean useCache_; + Image cache_; + + @Override + public void paint(Graphics _g) { + if (useCache_) { + Graphics cg = null; + if (cache_ == null) { + try { + HashMap param = new HashMap(); + CtuluLibImage.setCompatibleImageAsked(param); + cache_ = CtuluLibImage.createImage(getWidth(), getHeight(), param); + cg = cache_.getGraphics(); + } catch (final NullPointerException e) { + cache_ = null; + cg = _g; + } + super.paint(cg); + } + if (cg != _g && cache_ != null) { + _g.drawImage(cache_, 0, 0, this); + } + + } else super.paint(_g); + } + public Color getCouleur() { final BCalque[] cq = getCalques(); - if (cq == null) { - return null; - } + if (cq == null) { return null; } boolean init = false; Color res = null; for (int i = cq.length - 1; i >= 0; i--) { @@ -98,9 +125,7 @@ } else if (!init) { res = c; init = true; - } else if (!c.equals(res)) { - return null; - } + } else if (!c.equals(res)) { return null; } } } return res; @@ -201,9 +226,7 @@ */ public static int getIdx(final String _cqName) { final int idxTmp = _cqName.lastIndexOf('_'); - if (idxTmp < 0) { - return -1; - } + if (idxTmp < 0) { return -1; } try { return Integer.parseInt(_cqName.substring(idxTmp + 1)); } catch (final Exception e) { @@ -219,9 +242,7 @@ private static String findUniqueName(final String _pref, final BCalque _parent, final int _idx) { final BCalque[] cqs = _parent.getCalques(); final String defaultName = _pref + '_' + CtuluLibString.getString(_idx); - if (cqs == null || cqs.length == 0) { - return defaultName; - } + if (cqs == null || cqs.length == 0) { return defaultName; } final String[] name = new String[cqs.length]; final int nb = name.length; boolean found = false; @@ -231,9 +252,7 @@ found = true; } } - if (!found) { - return defaultName; - } + if (!found) { return defaultName; } int lastIdx = 0; String r = null; Arrays.sort(name); @@ -257,15 +276,29 @@ } r = BGroupeCalque.buildName(_pref, lastIdx + 1); } - if (Arrays.binarySearch(name, r) >= 0) { - throw new IllegalArgumentException("cant find unique name " + r); - } + if (Arrays.binarySearch(name, r) >= 0) { throw new IllegalArgumentException("cant find unique name " + r); } if (FuLog.isTrace()) { FuLog.trace("TRL: find unique name " + r); } return r; } - - - + + /** + * @return the useCache + */ + public boolean isUseCache() { + return useCache_; + } + + /** + * @param _useCache the useCache to set + */ + public void setUseCache(boolean _useCache) { + useCache_ = _useCache; + if (!_useCache && cache_ != null) { + cache_.flush(); + cache_ = null; + } + } + } Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZCalqueRepereInteraction.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZCalqueRepereInteraction.java 2008-12-10 14:52:21 UTC (rev 4292) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZCalqueRepereInteraction.java 2008-12-10 23:38:37 UTC (rev 4293) @@ -29,17 +29,23 @@ private Point pointDeb_, pointFinPrec_; private final BVueCalque vc_; private double coefZoomClick_ = 1.5; // Coefficient de zoom (AVANT/ARRIERE) + private final BGroupeCalque gcDonnees_; - public ZCalqueRepereInteraction(final BVueCalque _vc) { + public ZCalqueRepereInteraction(final BVueCalque _vc,BGroupeCalque _gcDonnees) { super(); vc_ = _vc; pointDeb_ = null; pointFinPrec_ = null; _vc.addKeyListener(this); + gcDonnees_=_gcDonnees; /* * addMouseListener(this); addMouseMotionListener(this); addMouseWheelListener(this); */ } + + public boolean alwaysPaint() { + return true; + } public String getDescription() { return EbliLib.getS("Zoom") + (zoomMoins_ ? " -" : " +"); @@ -48,8 +54,8 @@ /** * Dessin de l'icone. * - * @param _c composant dont l'icone peut deriver des proprietes (couleur, ...). Ce parametre peut etre <I>null</I>. - * Il est ignore ici. + * @param _c composant dont l'icone peut deriver des proprietes (couleur, ...). Ce parametre peut etre <I>null</I>. Il + * est ignore ici. * @param _g le graphics sur lequel dessiner l'icone * @param _x lieu cible de l'icone (x) * @param _y lieu cible de l'icone (y) @@ -91,26 +97,27 @@ // EVENEMENTS public void mouseClicked(final MouseEvent _evt) {} - public void mouseEntered(final MouseEvent _evt) {} + public void mouseEntered(final MouseEvent _evt) { + // System.err.println(_evt); - public void mouseExited(final MouseEvent _evt) {} + } + public void mouseExited(final MouseEvent _evt) { + // System.err.println(_evt); + + } + public void mousePressed(final MouseEvent _evt) { - if (!isOkLeftEvent(_evt)) { - return; - } + if (!isOkLeftEvent(_evt)) { return; } + gcDonnees_.setUseCache(true); pointDeb_ = _evt.getPoint(); } - public void mouseReleased(final MouseEvent _evt) { - if (!isOkLeftEvent(_evt)) { - return; - } + gcDonnees_.setUseCache(false); + if (!isOkLeftEvent(_evt)) { return; } - if (pointDeb_ == null) { - return; - } + if (pointDeb_ == null) { return; } GrPoint pointO; GrPoint pointE; @@ -134,30 +141,42 @@ } public void mouseDragged(final MouseEvent _evt) { - if (!isOkLeftEvent(_evt)) { - return; - } - if (pointDeb_ == null) { - return; - } +// if (!isOkLeftEvent(_evt)) { return; } +// if (pointDeb_ == null) { return; } final Point pointFin = _evt.getPoint(); - final Graphics g = getGraphics(); - g.setXORMode(getBackground()); - g.setColor(Color.black); - if (pointFinPrec_ != null) { - g.drawLine(pointDeb_.x, pointDeb_.y, pointFinPrec_.x, pointDeb_.y); - g.drawLine(pointFinPrec_.x, pointDeb_.y, pointFinPrec_.x, pointFinPrec_.y); - g.drawLine(pointFinPrec_.x, pointFinPrec_.y, pointDeb_.x, pointFinPrec_.y); - g.drawLine(pointDeb_.x, pointFinPrec_.y, pointDeb_.x, pointDeb_.y); + if (!contains(pointFin)) { + EbliLib.setIn(pointFin, this); } - g.drawLine(pointDeb_.x, pointDeb_.y, pointFin.x, pointDeb_.y); - g.drawLine(pointFin.x, pointDeb_.y, pointFin.x, pointFin.y); - g.drawLine(pointFin.x, pointFin.y, pointDeb_.x, pointFin.y); - g.drawLine(pointDeb_.x, pointFin.y, pointDeb_.x, pointDeb_.y); +// final Graphics g = getGraphics(); +// g.setXORMode(getBackground()); +// g.setColor(Color.black); +// if (pointFinPrec_ != null) { +// g.drawLine(pointDeb_.x, pointDeb_.y, pointFinPrec_.x, pointDeb_.y); +// g.drawLine(pointFinPrec_.x, pointDeb_.y, pointFinPrec_.x, pointFinPrec_.y); +// g.drawLine(pointFinPrec_.x, pointFinPrec_.y, pointDeb_.x, pointFinPrec_.y); +// g.drawLine(pointDeb_.x, pointFinPrec_.y, pointDeb_.x, pointDeb_.y); +// } +// g.drawLine(pointDeb_.x, pointDeb_.y, pointFin.x, pointDeb_.y); +// g.drawLine(pointFin.x, pointDeb_.y, pointFin.x, pointFin.y); +// g.drawLine(pointFin.x, pointFin.y, pointDeb_.x, pointFin.y); +// g.drawLine(pointDeb_.x, pointFin.y, pointDeb_.x, pointDeb_.y); pointFinPrec_ = pointFin; + repaint(); } + + @Override + public void paintComponent(Graphics _g) { + if (pointDeb_ == null|| pointFinPrec_==null) { return; } + _g.setXORMode(getBackground()); + _g.setColor(Color.black); + _g.drawLine(pointDeb_.x, pointDeb_.y, pointFinPrec_.x, pointDeb_.y); + _g.drawLine(pointFinPrec_.x, pointDeb_.y, pointFinPrec_.x, pointFinPrec_.y); + _g.drawLine(pointFinPrec_.x, pointFinPrec_.y, pointDeb_.x, pointFinPrec_.y); + _g.drawLine(pointDeb_.x, pointFinPrec_.y, pointDeb_.x, pointDeb_.y); + } public void mouseMoved(final MouseEvent _evt) {} + private boolean zoomMoins_; private void setZoomMoins(final boolean _b) { Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZCalqueSelectionInteractionAbstract.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZCalqueSelectionInteractionAbstract.java 2008-12-10 14:52:21 UTC (rev 4292) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZCalqueSelectionInteractionAbstract.java 2008-12-10 23:38:37 UTC (rev 4293) @@ -122,17 +122,21 @@ return trace_; } - public void paintAllInImage(final Graphics2D _g, final GrMorphisme _versEcran, final GrMorphisme _versReel, final GrBoite _clipReel) { + public void paintAllInImage(final Graphics2D _g, final GrMorphisme _versEcran, final GrMorphisme _versReel, + final GrBoite _clipReel) { if (isVisible()) { paintDonnees(_g, _versEcran, _versReel, _clipReel); } } + final BGroupeCalque donnees_; + /** * Cr\xE9ation d'un calque de s\xE9lection sans objets s\xE9lectionnables. */ - public ZCalqueSelectionInteractionAbstract() { + public ZCalqueSelectionInteractionAbstract(final BGroupeCalque _donnees) { super(); + donnees_ = _donnees; setDestructible(false); setTypeTrait(TraceLigne.LISSE); setModeSelection(RECTANGLE); @@ -154,13 +158,29 @@ public final void paintComponent(final Graphics _g) { paintDonnees((Graphics2D) _g, getVersEcran(), getVersReel(), getClipReel(_g)); + if (enCours_) { + donnees_.setUseCache(true); + _g.setXORMode(Color.white); + initTrace(_g); + if (mode_ == RECTANGLE) { + tg_.dessineRectangle((Graphics2D) _g, ptOrig_, ptExt_, false); + } else if (mode_ == POLYGONE) { + if (plHelper_.nombre() < 3) { + tg_.dessinePolyligne((Graphics2D) _g, plHelper_, false); + } else { + tg_.dessinePolygone((Graphics2D) _g, plHelper_, false, false); + } + } + } else { + donnees_.setUseCache(false); + } } // // Appel\xE9 avant chaque trac\xE9 pour d\xE9finir le contexte graphique // private void initTrace(final Graphics _g) { - _g.setXORMode(Color.white); + if (tg_ == null) { tg_ = new TraceGeometrie(GrMorphisme.identite()); } @@ -174,8 +194,7 @@ final String old = modificateur_.getControleDesc(); modificateur_.majControleDesc(_e); if (modificateur_.getControleDesc() != old) { - firePropertyChange(ZEbliCalquePanelController.STATE, old, modificateur_ - .getControleDesc()); + firePropertyChange(ZEbliCalquePanelController.STATE, old, modificateur_.getControleDesc()); } } @@ -183,26 +202,25 @@ final String old = modificateur_.getControleDesc(); modificateur_.majControleDesc(_e); if (modificateur_.getControleDesc() != old) { - firePropertyChange(ZEbliCalquePanelController.STATE, old, modificateur_ - .getControleDesc()); + firePropertyChange(ZEbliCalquePanelController.STATE, old, modificateur_.getControleDesc()); } } - private void paintSelectionPath() { - final Graphics2D g = (Graphics2D) getGraphics(); - if (enCours_) { - initTrace(g); - if (mode_ == RECTANGLE) { - tg_.dessineRectangle(g, ptOrig_, ptExt_, false); - } else if (mode_ == POLYGONE) { - if (plHelper_.nombre() < 3) { - tg_.dessinePolyligne(g, plHelper_, false); - } else { - tg_.dessinePolygone(g, plHelper_, false, false); - } - } - } - } + // private void paintSelectionPath() { + // final Graphics2D g = (Graphics2D) getGraphics(); + // if (enCours_) { + // initTrace(g); + // if (mode_ == RECTANGLE) { + // tg_.dessineRectangle(g, ptOrig_, ptExt_, false); + // } else if (mode_ == POLYGONE) { + // if (plHelper_.nombre() < 3) { + // tg_.dessinePolyligne(g, plHelper_, false); + // } else { + // tg_.dessinePolygone(g, plHelper_, false, false); + // } + // } + // } + // } public abstract void addCalqueActif(ZCalqueAffichageDonneesInterface _calque); @@ -230,7 +248,7 @@ /** * Accesseur de la propriete <I>typeTrait </I>. Elle fixe le type de trait (pointille, tirete, ...) en prenant ses * valeurs dans les champs statiques de <I>TraceLigne </I>. - * + * * @see org.fudaa.ebli.trace.TraceLigne */ public final int getTypeTrait() { @@ -259,14 +277,12 @@ * cr\xE9ation */ public final void mouseDragged(final MouseEvent _evt) { - if (!isOkEvent(_evt)) { - return; - } + if (!isOkEvent(_evt)) { return; } final GrPoint ptSo = new GrPoint(_evt.getX(), _evt.getY(), 0.); if (mode_ == RECTANGLE && enCours_) { - paintSelectionPath(); + // paintSelectionPath(); ptExt_ = ptSo; - paintSelectionPath(); + repaint(); } } @@ -288,21 +304,19 @@ // extr\xE9mit\xE9s du polygone en cours de cr\xE9ation // public final void mouseMoved(final MouseEvent _evt) { - if (!isOkEvent(_evt)) { - return; - } + if (!isOkEvent(_evt)) { return; } if (mode_ == POLYGONE && enCours_) { // effacer ancien chemin - paintSelectionPath(); + // paintSelectionPath(); final GrPoint ptSo = new GrPoint(_evt.getX(), _evt.getY(), 0.); listePoints_.remplace(ptSo, listePoints_.nombre() - 1); - paintSelectionPath(); + repaint(); } } /* - * Ev\xE8nements souris Rectangle : <br> PRESSED => Debut de rectangle <br> DRAGGED => Trac\xE9 du rectangle <br> RELEASED => - * Fin du rectangle Polygone : RELEASED => D\xE9but de cr\xE9ation ou nouveau point cr\xE9\xE9 MOVED => Trac\xE9 des 2 droites + * Ev\xE8nements souris Rectangle : <br> PRESSED => Debut de rectangle <br> DRAGGED => Trac\xE9 du rectangle <br> RELEASED + * => Fin du rectangle Polygone : RELEASED => D\xE9but de cr\xE9ation ou nouveau point cr\xE9\xE9 MOVED => Trac\xE9 des 2 droites * DRAGGED => M\xEAme effet 2 RELEASED => Fin du polygone Button Mask : Rien => Remplacement des anciennes s\xE9lections * SHIFT => Ajout des nouvelles s\xE9lections, suppression si d\xE9j\xE0 s\xE9lectionn\xE9 */ @@ -311,9 +325,7 @@ * Methode invoquee quand on appuie sur un bouton de la souris. Rectangle : D\xE9but de cr\xE9ation. */ public final void mousePressed(final MouseEvent _evt) { - if (!isOkLeftEvent(_evt)) { - return; - } + if (!isOkLeftEvent(_evt)) { return; } if (mode_ == RECTANGLE) { enCours_ = true; // initTrace(); @@ -322,7 +334,7 @@ ptExt_ = ptOrig_; // tg_.dessineRectangle((Graphics2D) getGraphics(), ptOrig_, ptExt_, false); listePoints_.ajoute(ptOrig_); - paintSelectionPath(); + repaint(); } } @@ -337,19 +349,13 @@ * Polygone : Saisie d'un point du polygone, d\xE9but de cr\xE9ation ou fin (si 2 released) <br> */ public final void mouseReleased(final MouseEvent _evt) { - if(isGele()) { - return; - } - if(!_evt.isControlDown() && !_evt.isAltDown()&&!isOkLeftEvent(_evt)) { - return; - } + if (isGele()) { return; } + if (!_evt.isControlDown() && !_evt.isAltDown() && !isOkLeftEvent(_evt)) { return; } majControleDesc(_evt); final GrPoint ptSo = new GrPoint(_evt.getX(), _evt.getY(), 0.); // Saisie d'un seul point if (mode_ == PONCTUEL) { - if (_evt.getClickCount() >= 2 && editionAsked()) { - return; - } + if (_evt.getClickCount() >= 2 && editionAsked()) { return; } listePoints_.vide(); listePoints_.ajoute(ptSo); enCours_ = false; @@ -359,7 +365,7 @@ else if (mode_ == RECTANGLE) { if (enCours_) { // effacer ancien trace - paintSelectionPath(); + // paintSelectionPath(); // Effacement du rectangle pr\xE9c\xE9dent listePoints_.ajoute(new GrPoint(ptSo.x_, ptOrig_.y_, 0.)); listePoints_.ajoute(new GrPoint(ptSo.x_, ptSo.y_, 0.)); @@ -372,16 +378,16 @@ // fin de polygone => Creation du point de fin et du polygone if (_evt.getClickCount() == 2) { // Effacer ancien trace - paintSelectionPath(); + // paintSelectionPath(); enCours_ = false; formeSaisie(); } // Saisie d'un nouveau point else { // Effacer ancien trace - paintSelectionPath(); + // paintSelectionPath(); listePoints_.ajoute(ptSo); - paintSelectionPath(); + repaint(); } } // Premier point saisi @@ -391,14 +397,14 @@ listePoints_.ajoute(ptSo); // Le 2ieme point correspond au point flottant avant clic. listePoints_.ajoute(ptSo); - paintSelectionPath(); + repaint(); } } } /** * Dessin de l'icone. - * + * * @param _c composant dont l'icone peut deriver des proprietes (couleur, ...). Ce parametre peut etre <I>null </I>. * Il est ignore ici. * @param _g le graphics sur lequel dessiner l'icone Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZCalqueSelectionInteractionMulti.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZCalqueSelectionInteractionMulti.java 2008-12-10 14:52:21 UTC (rev 4292) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZCalqueSelectionInteractionMulti.java 2008-12-10 23:38:37 UTC (rev 4293) @@ -39,8 +39,8 @@ /** * Cr\xE9ation d'un calque de s\xE9lection sans objets s\xE9lectionnables. */ - public ZCalqueSelectionInteractionMulti() { - super(); + public ZCalqueSelectionInteractionMulti( final BGroupeCalque _donnees) { + super(_donnees); } private void clearSelectionsCalquesActifs() { Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZCalqueSelectionInteractionSimple.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZCalqueSelectionInteractionSimple.java 2008-12-10 14:52:21 UTC (rev 4292) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZCalqueSelectionInteractionSimple.java 2008-12-10 23:38:37 UTC (rev 4293) @@ -34,8 +34,8 @@ /** * Cr\xE9ation d'un calque de s\xE9lection sans objets s\xE9lectionnables. */ - public ZCalqueSelectionInteractionSimple() { - super(); + public ZCalqueSelectionInteractionSimple( final BGroupeCalque _donnees) { + super(_donnees); } protected boolean editionAsked() { Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZEbliCalquePanelController.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZEbliCalquePanelController.java 2008-12-10 14:52:21 UTC (rev 4292) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZEbliCalquePanelController.java 2008-12-10 23:38:37 UTC (rev 4293) @@ -135,6 +135,8 @@ cqSelectionI_.setCalqueActif(z); if (cqActif_ != null) { cqActif_.addPropertyChangeListener("mode", this); + // pour eventuellement modifie l'etat de la selection + cqActif_.addPropertyChangeListener("visible", this); } } else { cqSelectionI_.setCalqueActif(null); @@ -153,12 +155,16 @@ if (standardActionGroup_ == null) { buildButtonGroupStandard(); } - if (standardActionGroup_ == null) { + if (standardActionGroup_ == null) { buildButtonGroupSpecifique(); - } - - + } + } + + + public void setUseCacheInDonnees(boolean b){ + pn_.getGcDonnees().setUseCache(b); + } protected EbliActionInterface createRepereAction() { final EbliActionPaletteAbstract plAction = new EbliActionPaletteAbstract(EbliResource.EBLI.getString("Rep\xE8re"), @@ -323,11 +329,10 @@ // this.updateMapKeyStroke(standardActionGroup_); } - public EbliActionInterface[] buildButtonGroupSpecifique() { return null; } - + protected final EbliActionInterface[] getSpecificActionGroup() { return specificActionGroup_; } @@ -345,7 +350,7 @@ public final CtuluUI getUI() { return ui_; } - + /** * A overrider. * @@ -398,7 +403,7 @@ addCalqueInteraction(suivi); // cqAdmin_.add(suivi); // S\xE9lection - cqSelectionI_ = new ZCalqueSelectionInteractionSimple(); + cqSelectionI_ = new ZCalqueSelectionInteractionSimple(pn_.getDonneesCalque()); cqSelectionI_.setTitle(EbliResource.EBLI.getString("Interaction")); cqSelectionI_.setName("cqSELECTION"); cqSelectionI_.setDestructible(false); @@ -407,7 +412,7 @@ pn_.getVueCalque().addKeyListener(cqSelectionI_); addCalqueInteraction(cqSelectionI_); // Calque de zoom - cqZoomI_ = new ZCalqueRepereInteraction(pn_.getVueCalque()); + cqZoomI_ = new ZCalqueRepereInteraction(pn_.getVueCalque(),pn_.getDonneesCalque()); cqZoomI_.addPropertyChangeListener(ZEbliCalquePanelController.STATE, this); cqZoomI_.setTitle(EbliResource.EBLI.getString("Agrandir")); cqZoomI_.setName("cqAGRANDIR"); @@ -445,8 +450,6 @@ return r; } - - /** Methode pour vider la selection. */ public void clearSelections() { cqSelectionI_.clearSelections(); @@ -534,8 +537,7 @@ public void initTabAndSpecificAction() { } - - + protected EbliActionInterface[] getApplicationActions() { return pn_.getApplicationActions(); } @@ -591,7 +593,10 @@ } public void propertyChange(final PropertyChangeEvent _evt) { - if ((_evt.getSource() == cqActif_) || ((cqInteractionActif_ != null) && (_evt.getSource() == cqInteractionActif_))) { + if ("visible".equals(_evt.getPropertyName())) { + activeActionForSelectedLayer(); + } else if ((_evt.getSource() == cqActif_) + || ((cqInteractionActif_ != null) && (_evt.getSource() == cqInteractionActif_))) { updateModeText(); } } @@ -721,6 +726,7 @@ public void valueChanged(final TreeSelectionEvent _evt) { if (cqActif_ != null) { cqActif_.removePropertyChangeListener("mode", this); + cqActif_.removePropertyChangeListener("visible", this); cqActif_.setActionsEnable(false); } cqActif_ = pn_.getArbreCalqueModel().getSelectedCalque(); Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZebliCalquePersist.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZebliCalquePersist.java 2008-12-10 14:52:21 UTC (rev 4292) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZebliCalquePersist.java 2008-12-10 23:38:37 UTC (rev 4293) @@ -10,6 +10,7 @@ import org.fudaa.ebli.geometrie.GrBoite; +import com.memoire.fu.FuLog; import com.thoughtworks.xstream.XStream; import com.thoughtworks.xstream.io.xml.DomDriver; @@ -19,26 +20,26 @@ * * @author Adrien Hadoux */ -public class ZebliCalquePersist { +public class ZebliCalquePersist { /** * Path du repertoire dans lequel seront enregistr\xE9 toute les courbes, groupes et model... */ protected String directoryPath_; - + protected XStream parser_; - + protected GrBoite zoom_; - -/** - * Fichier principal qui contient une instance de la classe ZEbliCalquesPanelPersistenceManager - */ + + /** + * Fichier principal qui contient une instance de la classe ZEbliCalquesPanelPersistenceManager + */ private static String MAINFILE = "descriptorCalque.xml"; private static String DATA = "datas.xml"; private static String SPECIFIQUEFILE = "SPECIFICDATAS"; public ZebliCalquePersist(String directoryPath) { - directoryPath_=directoryPath; + directoryPath_ = directoryPath; } /** @@ -47,7 +48,7 @@ * @return */ protected XStream getParser() { - if (parser_ == null) parser_ = initXmlParser(); + if (parser_ == null) parser_ = initXmlParser(); return parser_; } @@ -59,14 +60,10 @@ protected XStream initXmlParser() { XStream xstream = new XStream(new DomDriver()); // -- creation des alias pour que ce soit + parlant dans le xml file --// - - return xstream; } - - /** * Path vers els datas classique du calque * @@ -100,105 +97,95 @@ * @param parameters des parametres supplementaires utiles. * @throws IOException */ - public void savePersitCalqueXml(ZEbliCalquesPanel panelTopersist, Map params) { - - ObjectOutputStream out = null; - try { - out = getParser().createObjectOutputStream(new FileWriter(new File(getMainFilePath()))); - - //-- recuperation des datats persistantes specifiques au panel --// - ZEbliCalquesPanelPersistManager dataPersistantes = panelTopersist.getPersistenceManager(); - - //-- enregistrement des don\xE9nes sp\xE9cifiques du calque -// - //TODO je prefere que fillInfoWith renvoie un objet et de donnees et c'est ce dernier qui est sauve - //dans le out, il suffit d'ecrire la nom de classe du persistManager - dataPersistantes.fillInfoWith(panelTopersist,new File(getSpecifiqueDataFilePath())); - - //-- sauvegarde de la classe dataPersistantes dans le fichier specifiqueData - out.writeObject(dataPersistantes); - - } catch (IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } finally { - try { - out.close(); - } catch (IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - } - } + public void savePersitCalqueXml(ZEbliCalquesPanel panelTopersist, Map params) { - + ObjectOutputStream out = null; + try { + out = getParser().createObjectOutputStream(new FileWriter(new File(getMainFilePath()))); + // -- recuperation des datats persistantes specifiques au panel --// + ZEbliCalquesPanelPersistManager dataPersistantes = panelTopersist.getPersistenceManager(); + + // -- enregistrement des don\xE9nes sp\xE9cifiques du calque -// + // TODO je prefere que fillInfoWith renvoie un objet et de donnees et c'est ce dernier qui est sauve + // dans le out, il suffit d'ecrire la nom de classe du persistManager + dataPersistantes.fillInfoWith(panelTopersist, new File(getSpecifiqueDataFilePath())); + + // -- sauvegarde de la classe dataPersistantes dans le fichier specifiqueData + out.writeObject(dataPersistantes); + + } catch (IOException e) { + e.printStackTrace(); + } finally { + try { + out.close(); + } catch (IOException e) { + e.printStackTrace(); + } + } + } + // TODO il faut generer la classe du persistencemanager -// public ZEbliCalquesPanel generateCalqueInstance(String className) throws ClassNotFoundException, -// InstantiationException, IllegalAccessException { -// if (className.startsWith("class ")) className = className.substring("class ".length()); -// Class myclass = Class.forName(className, true, Thread.currentThread().getContextClassLoader()); -// Object myModel = myclass.newInstance(); -// if (myModel instanceof ZEbliCalquesPanel) return (ZEbliCalquesPanel) myModel; -// return null; -// -// } + // public ZEbliCalquesPanel generateCalqueInstance(String className) throws ClassNotFoundException, + // InstantiationException, IllegalAccessException { + // if (className.startsWith("class ")) className = className.substring("class ".length()); + // Class myclass = Class.forName(className, true, Thread.currentThread().getContextClassLoader()); + // Object myModel = myclass.newInstance(); + // if (myModel instanceof ZEbliCalquesPanel) return (ZEbliCalquesPanel) myModel; + // return null; + // + // } /** * Methode qui remplit le panel fournit en parametre avec les donn\xE9es sauvegardees. * * @param panelToFill */ - public ZEbliCalquesPanel loadPersitCalqueXml(Map param) - { - - ObjectInputStream in = null; - ZEbliCalquesPanel veritablePanel = null; - - try { - // -- Init: on lit les donn\xE9es sp\xE9cifiques pour avoir la bonne classe zeblicalquepanel --// - // in=getParser().createObjectInputStream(new FileReader(new File(getMainFilePath()))); - - // donnee bidon - // in.readInt(); - // -- lire le type de classe du calque--// - // String className=(String) in.readObject(); - - // -- on creer le type d'objet lu - // ZEbliCalquesPanel panelUseAsStatic; - - // panelUseAsStatic = generateCalqueInstance(className); - - // -- etape 1: on lit les donn\xE9es sp\xE9cifiques pour avoir la data persistantes - in = getParser().createObjectInputStream(new FileReader(new File(getMainFilePath()))); - ZEbliCalquesPanelPersistManager dataPersistantes = (ZEbliCalquesPanelPersistManager) in.readObject(); - zoom_=dataPersistantes.getZoom(); - // -- etape 2 on creer l'obejt calque correspondant a partir des datas persitantes - veritablePanel = dataPersistantes.generateCalquePanel(param,new File(getSpecifiqueDataFilePath())); - - } catch (ClassNotFoundException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } catch (IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } finally { - try { - in.close(); - } catch (IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - } - - return veritablePanel; + public ZEbliCalquesPanel loadPersitCalqueXml(Map param) { + + ObjectInputStream in = null; + ZEbliCalquesPanel veritablePanel = null; + + try { + // -- Init: on lit les donn\xE9es sp\xE9cifiques pour avoir la bonne classe zeblicalquepanel --// + // in=getParser().createObjectInputStream(new FileReader(new File(getMainFilePath()))); + + // donnee bidon + // in.readInt(); + // -- lire le type de classe du calque--// + // String className=(String) in.readObject(); + + // -- on creer le type d'objet lu + // ZEbliCalquesPanel panelUseAsStatic; + + // panelUseAsStatic = generateCalqueInstance(className); + + // -- etape 1: on lit les donn\xE9es sp\xE9cifiques pour avoir la data persistantes + in = getParser().createObjectInputStream(new FileReader(new File(getMainFilePath()))); + ZEbliCalquesPanelPersistManager dataPersistantes = (ZEbliCalquesPanelPersistManager) in.readObject(); + zoom_ = dataPersistantes.getZoom(); + // -- etape 2 on creer l'obejt calque correspondant a partir des datas persitantes + veritablePanel = dataPersistantes.generateCalquePanel(param, new File(getSpecifiqueDataFilePath())); + + } catch (Exception _e) { + FuLog.error(_e); + } finally { + try { + in.close(); + } catch (IOException _e) { + FuLog.error(_e); + } + } + + return veritablePanel; } -public GrBoite getZoom_() { - return zoom_; -} + public GrBoite getZoom() { + return zoom_; + } -public void setZoom_(GrBoite zoom_) { - this.zoom_ = zoom_; -} + public void setZoom_(GrBoite zoom_) { + this.zoom_ = zoom_; + } } Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/commun/EbliLib.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/commun/EbliLib.java 2008-12-10 14:52:21 UTC (rev 4292) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/commun/EbliLib.java 2008-12-10 23:38:37 UTC (rev 4293) @@ -9,6 +9,7 @@ package org.fudaa.ebli.commun; import java.awt.Color; +import java.awt.Point; import java.awt.event.MouseEvent; import java.util.ArrayList; import java.util.Arrays; @@ -23,10 +24,10 @@ import javax.swing.JDialog; import javax.swing.KeyStroke; +import org.fudaa.ebli.ressource.EbliResource; + import com.memoire.bu.BuDesktop; -import org.fudaa.ebli.ressource.EbliResource; - /** * Ensemble de methodes utilitaires non classees. * @@ -46,9 +47,31 @@ public static Color getAlphaColor(final Color _init, final int _alpha) { if (_init == null || _alpha <= 0 || _alpha >= 255) { return _init; } return new Color(_init.getRed(), _init.getGreen(), _init.getBlue(), _alpha); + } + /** + * @param _initValue la valeur initiale + * @param _min la valeur min autorisee + * @param _max la valeur max autorisee + * @return la valeur _initValue si elle est comprise entre les bornes min,max. Sinon, min si valeur inferieur et max + * si max + */ + private static int setIn(int _initValue, int _min, int _max) { + if (_initValue < _min) return _min; + if (_initValue > _max) return _max; + return _initValue; } + /** + * @param _p Le point a modifier pour qu'il soi a l'interieur de jc + * @param jc le composant a utiliser + */ + public static void setIn(Point _p, JComponent _jc) { + _p.x = setIn(_p.x, 0, _jc.getWidth()); + _p.y = setIn(_p.y, 0, _jc.getHeight()); + + } + public static String getZoomDesc() { return "<table cellpadding='1'><tr><td>" + EbliLib.getS("Un clic gauche") + "</td><td>:" + EbliLib.getS("Zoom centr\xE9 sur le point cliqu\xE9") + "</tr><tr><td>" + EbliLib.getS("Rectangle dessin\xE9") Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGGraphe.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGGraphe.java 2008-12-10 14:52:21 UTC (rev 4292) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGGraphe.java 2008-12-10 23:38:37 UTC (rev 4293) @@ -11,6 +11,7 @@ import gnu.trove.TObjectIntIterator; import java.awt.Color; +import java.awt.Cursor; import java.awt.Dimension; import java.awt.Font; import java.awt.Graphics; @@ -102,6 +103,7 @@ model_.addModelListener(this); cmd_ = new CtuluCommandManager(); repereController_ = new RepereMouseKeyController(this); + setCursor(new Cursor(Cursor.CROSSHAIR_CURSOR)); } private void ajusteXAxe() { Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGInteractionSelection.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGInteractionSelection.java 2008-12-10 14:52:21 UTC (rev 4292) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/courbe/EGInteractionSelection.java 2008-12-10 23:38:37 UTC (rev 4293) @@ -56,6 +56,7 @@ } private void updateSelection(final int _idxSelected) { + repaint(); boolean b = false; if (_idxSelected < 0) { if (select_.isReplaceMode()) { @@ -84,6 +85,7 @@ a_.repaint(); } lastIndex_ = _idxSelected; + getParent().repaint(); } public void inverseSelection() { Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliScene.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliScene.java 2008-12-10 14:52:21 UTC (rev 4292) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliScene.java 2008-12-10 23:38:37 UTC (rev 4293) @@ -113,26 +113,6 @@ */ private final EbliSceneController controller_; - // private class ObjectSelectProvider implements SelectProvider { - // - // public boolean isAimingAllowed(final Widget widget, final Point localLocation, final boolean invertSelection) { - // return false; - // } - // - // public boolean isSelectionAllowed(final Widget widget, final Point localLocation, final boolean invertSelection) { - // return findObject(widget) != null; - // } - // - // public void select(final Widget widget, final Point localLocation, final boolean invertSelection) { - // final Object object = findObject(widget); - // - // setFocusedObject(object); - // if (object != null) { - // if (!invertSelection && getSelectedObjects().contains(object)) return; - // userSelectionSuggested(Collections.singleton(object), invertSelection); - // } else userSelectionSuggested(Collections.emptySet(), invertSelection); - // } - // } public static void refreshScene(final Scene _sc) { _sc.validate(); Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliSceneController.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliSceneController.java 2008-12-10 14:52:21 UTC (rev 4292) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliSceneController.java 2008-12-10 23:38:37 UTC (rev 4293) @@ -64,7 +64,8 @@ rectangularSelection_ = ActionFactory.createRectangularSelectAction(scene_, scene_.getInteractionLayer()); // -- ajoute l'action du zoom ( ctrl + clic) - scene_.getActions().addAction(ActionFactory.createCenteredZoomAction(1.1)); + //suppression pour eviter les bugs sioux +// scene_.getActions().addAction(ActionFactory.createCenteredZoomAction(1.1)); scene_.getActions().addAction(rectangularSelection_); // -- ajouter le menu popup de base Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetCreatorVueCalque.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetCreatorVueCalque.java 2008-12-10 14:52:21 UTC (rev 4292) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetCreatorVueCalque.java 2008-12-10 23:38:37 UTC (rev 4293) @@ -35,9 +35,7 @@ } public EbliWidgetCreatorVueCalque() { - - - + } public EbliWidgetCreatorVueCalque(ZEbliCalquesPanel calque, GrBoite _initZoom) { @@ -56,8 +54,9 @@ positionLegende.x = _dest.getLocation().x + _dest.getIntern().getPreferredSize().width + 5; positionLegende.y = _dest.getPreferredLocation().y; EbliWidgetVueCalque vue = (EbliWidgetVueCalque) _dest.getIntern(); - vue.nodeLegende = _legende.createLegende(positionLegende, _legende.getScene(), getBordure().getIntern().getId(),calque_.getCalqueActif()); - ((EbliWidgetControllerCalque) vue.getController()).setLegendeWidget(_legende,calque_.getCalqueActif()); + vue.nodeLegende = _legende.createLegende(positionLegende, _legende.getScene(), getBordure().getIntern().getId(), + calque_.getCalqueActif()); + ((EbliWidgetControllerCalque) vue.getController()).setLegendeWidget(_legende, calque_.getCalqueActif()); } public EbliWidget create(EbliScene _scene) { @@ -76,7 +75,7 @@ duplicOptions.put("scene", getWidget().getEbliScene()); EbliWidgetCreatorVueCalque creator = new EbliWidgetCreatorVueCalque(getCalque().duplicate(duplicOptions), - /*((EbliWidgetVueCalque)getWidget().getIntern()).getZoom_()*/getCalque().getVueCalque().getViewBoite()); + /* ((EbliWidgetVueCalque)getWidget().getIntern()).getZoom_() */getCalque().getVueCalque().getViewBoite()); duplique.setCreator(creator); // -- ajout de la reference de la legende dans le widget calque --// @@ -98,7 +97,7 @@ public EbliWidgetWithBordure getBordure() { return res; } - + public void initSize(final Dimension rec) { final BCalque[] tousCalques = calque_.getVueCalque().getCalque().getTousCalques(); calque_.getVueCalque().setSize(rec.width, rec.height); @@ -108,6 +107,7 @@ tousCalques[i].setSize(rec.width, rec.height); } } + /** * parametre qui n est rensginee que dans le cas d une duplication. Sinon c est cree des le debut avec le bon * ebliwidgetCalqueLegende qui va. @@ -142,26 +142,27 @@ File createRep = new File(pathUnique); if (createRep.mkdir() || createRep.isDirectory()) { // (new FudaaFilleVisuPersistence(getCalque())).saveZEbliCalquesPanelIn - // getCalque().getPersistenceManager().savePersitCalqueXml(getCalque(), createRep, parameters); - (new ZebliCalquePersist(pathUnique)).savePersitCalqueXml(getCalque(),parameters); + // getCalque().getPersistenceManager().savePersitCalqueXml(getCalque(), createRep, parameters); + (new ZebliCalquePersist(pathUnique)).savePersitCalqueXml(getCalque(), parameters); } - String pathRelative=CtuluLibFile.getRelativeFile(new File(pathUnique), new File((String)parameters.get("pathLayout")), 4); + String pathRelative = CtuluLibFile.getRelativeFile(new File(pathUnique), new File((String) parameters + .get("pathLayout")), 4); return pathRelative; } public void setPersistData(Object data, Map parameters) { - //comment on recupere le dossier ? - //il faut reconstruire le PersistenceManager par reflexion et c'est lui qui produire le ZEbliCalquesPanel + // comment on recupere le dossier ? + // il faut reconstruire le PersistenceManager par reflexion et c'est lui qui produire le ZEbliCalquesPanel if (data == null) calque_ = new ZEbliCalquesPanel(null); else { - String pathCalque = (String)parameters.get("pathLayout")+File.separator+(String) data; + String pathCalque = (String) parameters.get("pathLayout") + File.separator + (String) data; - ZebliCalquePersist persistance=new ZebliCalquePersist(pathCalque); - + ZebliCalquePersist persistance = new ZebliCalquePersist(pathCalque); + calque_ = persistance.loadPersitCalqueXml(parameters); - if(calque_.getVueCalque()!=null && calque_.getVueCalque().getViewBoite()!=null) - initZoom_ = persistance.getZoom_(); + if (calque_ != null && calque_.getVueCalque() != null && calque_.getVueCalque().getViewBoite() != null) initZoom_ = persistance + .getZoom(); } } Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetVueCalque.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetVueCalque.java 2008-12-10 14:52:21 UTC (rev 4292) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetVueCalque.java 2008-12-10 23:38:37 UTC (rev 4293) @@ -219,7 +219,7 @@ public void notifyOpened(final org.netbeans.api.visual.action.InplaceEditorProvider.EditorController controller, final Widget widget, final BuPanel editor) { editingStart(); - calquePanel_.setBorder(BorderFactory.createLineBorder(Color.GRAY, 1)); +// calquePanel_.setBorder(BorderFactory.createLineBorder(Color.GRAY, 1)); } // public void setColorFond(Color newColor) { Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetControllerGraphe.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetControllerGraphe.java 2008-12-10 14:52:21 UTC (rev 4292) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetControllerGraphe.java 2008-12-10 23:38:37 UTC (rev 4293) @@ -1,5 +1,6 @@ package org.fudaa.ebli.visuallibrary.graphe; +import java.awt.Dimension; import java.awt.Point; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; @@ -13,6 +14,7 @@ import javax.swing.JMenuItem; import javax.swing.JPopupMenu; import javax.swing.JScrollPane; +import javax.swing.JSplitPane; import javax.swing.JToolBar; import org.fudaa.ctulu.CtuluCommandContainer; @@ -25,6 +27,7 @@ import org.fudaa.ebli.courbe.EGGraphe; import org.fudaa.ebli.courbe.EGGrapheTreeModel; import org.fudaa.ebli.courbe.EGSpecificActions; +import org.fudaa.ebli.courbe.EGTableGraphePanel; import org.fudaa.ebli.courbe.EGTree; import org.fudaa.ebli.ressource.EbliResource; import org.fudaa.ebli.visuallibrary.EbliNode; @@ -36,7 +39,6 @@ import org.fudaa.ebli.visuallibrary.actions.CommandMasquer; import org.fudaa.ebli.visuallibrary.actions.EbliActionEditorOneClick; import org.fudaa.ebli.visuallibrary.actions.EbliWidgetActionConfigure; -import org.fudaa.ebli.visuallibrary.actions.EbliWidgetActionRatio; import com.memoire.bu.BuMenuBar; import com.memoire.bu.BuPanel; @@ -71,17 +73,16 @@ public EbliWidgetControllerGraphe(final EbliWidgetGraphe widget_, final EbliNodeDefault nodeLegende) { super(widget_); - + widgetGraphe_ = widget_; labelTrace_ = (JLabel) CtuluLibSwing.findChildByName(getGraphePanel(), "lbTools"); // getGraphePanel().remove(labelTrace_); addActionSpecifiques(); - - + setProportional(true); - + } @Override @@ -120,7 +121,8 @@ * Methode a surcharger si on veut effectuer un traitement particulier apres duplication du widget. */ - public void postActionDuplication(final EbliNode node, final EbliNode duplique, ArrayList<EbliNode> listeNodeUndo) { + public void postActionDuplication(final EbliNode node, final EbliNode duplique, + final ArrayList<EbliNode> listeNodeUndo) { listeNodeUndo.add(duplique); // -- il faut verifier que les le node a bien une legende sinon on n ajoute // pas de legende pour le dupliqu\xE9 --// @@ -134,7 +136,7 @@ // -- on ajoute la legende apres duplication --// - if (((EbliWidgetControllerGraphe)widgetGraphe_.getController()).hasLegende()) { + if (((EbliWidgetControllerGraphe) widgetGraphe_.getController()).hasLegende()) { controllerDuDuplique.ajoutLegende(); listeNodeUndo.add(widgetGrapheDuplic.getNodeLegende()); @@ -147,7 +149,8 @@ } - public EbliNode duplication(final ArrayList<EbliNode> listeNodeUndo, EbliScene sceneDestination) { + @Override + public EbliNode duplication(final ArrayList<EbliNode> listeNodeUndo, final EbliScene sceneDestination) { // -- recuperation du node a dupliquer --// final EbliNode n = (EbliNode) widget_.getEbliScene().findObject(widget_); @@ -176,7 +179,8 @@ return duplique; } - public void suppression(final ArrayList<EbliNode> listeNodeUndo, ArrayList<Point> listLocation) { + @Override + public void suppression(final ArrayList<EbliNode> listeNodeUndo, final ArrayList<Point> listLocation) { final EbliNode n = (EbliNode) widget_.getEbliScene().findObject(widget_); listeNodeUndo.add(n); @@ -286,6 +290,7 @@ * * @param _popup */ + @Override public void constructPopupMenuBaseGraphique(final JPopupMenu _popup) { final JMenuItem menuItem4 = _popup.add(EbliResource.EBLI.getString("Configuration graphique")); @@ -445,12 +450,21 @@ final EGGrapheTreeModel treeModel = (EGGrapheTreeModel) getGraphe().getModel(); tree.setModel(treeModel); tree.setSelectionModel(treeModel.getSelectionModel()); - // JSplitPane pane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT); - // pane.setDividerLocation(200);// 0.3D); - // pane.setTopComponent(new JScrollPane(tree)); - // final EGTableGraphePanel tablePanel = new EGTableGraphePanel(); - // tablePanel.setGraphe(getGraphe()); - // pane.setBottomComponent(tablePanel); + + final EGTableGraphePanel tablePanel = new EGTableGraphePanel(); + tablePanel.setGraphe(getGraphe()); + tablePanel.addPanelAction(getGraphePanel()); + final JSplitPane pane = new JSplitPane(JSplitPane.VERTICAL_SPLIT); + + final JScrollPane compTop = new JScrollPane(tree); + compTop.setPreferredSize(new Dimension(150, 400)); + pane.setTopComponent(compTop); + final JScrollPane comp = new JScrollPane(tablePanel); + comp.setPreferredSize(new Dimension(150, 200)); + pane.setBottomComponent(comp); + pane.setDividerLocation(0.5D); + pane.resetToPreferredSizes(); + getGraphePanel().majSelectionListener(tablePanel); // // JSplitPane paneGlobal = new JSplitPane(JSplitPane.VERTICAL_SPLIT); // @@ -459,7 +473,7 @@ // paneGlobal.setTopComponent(getGraphePanel().getInfoPanel()); // paneGlobal.setBottomComponent(new JScrollPane(tree)); - panelTreeGraphe_ = new JScrollPane(tree);// paneGlobal; + panelTreeGraphe_ = pane;// paneGlobal; } return panelTreeGraphe_; Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetTitle.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetTitle.java 2008-12-10 14:52:21 UTC (rev 4292) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetTitle.java 2008-12-10 23:38:37 UTC (rev 4293) @@ -11,6 +11,7 @@ import org.netbeans.api.visual.layout.LayoutFactory.SerialAlignment; import org.netbeans.api.visual.widget.LabelWidget; import org.netbeans.api.visual.widget.Widget; +import org.netbeans.api.visual.widget.LabelWidget.VerticalAlignment; import org.netbeans.modules.visual.layout.FlowLayout; /** @@ -37,9 +38,10 @@ */ public EbliWidgetTitle(final EbliScene _scene, final EGCourbe _cb, final Point preferedLocation) { super(_scene); - setLayout(new FlowLayout(true, SerialAlignment.LEFT_TOP, 0)); + setLayout(new FlowLayout(true, SerialAlignment.CENTER, 0)); intern_ = new LabelWidget(_scene); intern_.setForeground(_cb.getAspectContour()); + intern_.setVerticalAlignment(VerticalAlignment.CENTER); addChild(intern_); setCourbe(_cb); // -- ajouter l option de remplacer le text dans le label --// Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/layer/MvVisuPanel.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/layer/MvVisuPanel.java 2008-12-10 14:52:21 UTC (rev 4292) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/layer/MvVisuPanel.java 2008-12-10 23:38:37 UTC (rev 4293) @@ -125,7 +125,7 @@ } protected void updateState() { - final boolean isAll = support_.isAll(); + final boolean isAll = support_!=null && support_.isAll(); allEdge_.setEnabled(!isAll); clearEdge_.setEnabled(support_.isSomethingToView()); addEdge_.setEnabled((pn_.getCalqueActif() instanceof MvLayerGrid) Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvProfileCoteTester.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvProfileCoteTester.java 2008-12-10 14:52:21 UTC (rev 4292) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MvProfileCoteTester.java 2008-12-10 23:38:37 UTC (rev 4293) @@ -16,6 +16,7 @@ import org.fudaa.dodico.ef.operation.EfLineIntersection; import org.fudaa.dodico.ef.operation.EfLineIntersectionParent; import org.fudaa.dodico.ef.operation.EfLineIntersectionsCorrectionTester; +import org.fudaa.dodico.ef.operation.EfLineIntersectionsResultsI; import org.fudaa.dodico.h2d.type.H2dVariableType; import com.memoire.fu.FuLog; @@ -37,6 +38,8 @@ bathy_ = H2dVariableType.BATHYMETRIE; cote_ = H2dVariableType.COTE_EAU; } + + private boolean addIntersection(final int _tidx, final EfLineIntersection _sup1, final EfLineIntersection _min2, final List _setNewIn) { @@ -108,4 +111,8 @@ ... [truncated message content] |
From: <had...@us...> - 2008-12-10 14:52:25
|
Revision: 4292 http://fudaa.svn.sourceforge.net/fudaa/?rev=4292&view=rev Author: hadouxad Date: 2008-12-10 14:52:21 +0000 (Wed, 10 Dec 2008) Log Message: ----------- - Correction de bugs g?\195?\170nants duplication/couper de l?\195?\169gendes. - Correction des g?\195?\169n?\195?\169rations de frames - Correction du filtre propre - Chargement de projet uniquement r?\195?\169pertoires avec filtre POST - Sauvegarde du projet avec .POST (pris en compte qu'on ajoute .POST manuellement ou non) (toutes les m?\195?\169thodes utiles sont dans TrpostFileFilter) - tentative correction bug lignes de courants: visiblement il y a des valeurs qu'il n'aime pas... - Test des valeurs null pour les legendes: update titres.... - Correction test value non null pour la ligne EfGridDataInterpolator.interpolateFromValue 180 - Compatibilit?\195?\169 maximum entre os via la methode TrPostPersistenceManager.updatePathForOs() Modified Paths: -------------- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetVueCalque.java branches/Prepro-0.92-SNAPSHOT/ebli/test/org/fudaa/ebli/all/TestVisualLibrary.java Added Paths: ----------- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActionForeGround.java Added: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActionForeGround.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActionForeGround.java (rev 0) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActionForeGround.java 2008-12-10 14:52:21 UTC (rev 4292) @@ -0,0 +1,70 @@ +package org.fudaa.ebli.visuallibrary.actions; + +import java.awt.event.ActionEvent; +import java.util.ArrayList; +import java.util.Iterator; +import java.util.Set; + +import org.fudaa.ctulu.CtuluCommandContainer; +import org.fudaa.ctulu.CtuluResource; +import org.fudaa.ebli.ressource.EbliResource; +import org.fudaa.ebli.visuallibrary.EbliNode; +import org.fudaa.ebli.visuallibrary.EbliScene; +import org.fudaa.ebli.visuallibrary.EbliWidget; + +/** + * classe qui permet de placer les widgets selectionnes en arriere plan. + * + * @author genesis + */ +public class EbliWidgetActionForeGround extends EbliWidgetActionSimple { + + CtuluCommandContainer cmd_; + + public EbliWidgetActionForeGround(final EbliScene _scene) { + super(_scene, EbliResource.EBLI.getString("Avant plan"), CtuluResource.CTULU.getIcon("crystal_disposerdevant"), + "FOREGROUND"); + + cmd_ = _scene.getCmdMng(); + putValue(NAME, "Avant plan"); + } + + private static final long serialVersionUID = 1L; + + @Override + public void actionPerformed(final ActionEvent e) { + + // -- recuperation de la liste des nodes de la scene --// + final Set<EbliNode> listeNode = (Set<EbliNode>) scene_.getSelectedObjects(); + + // -- liste des widget selectionnees --// + final java.util.List<EbliWidget> listeWidget = new ArrayList<EbliWidget>(); + + // -- parcours des nodes + for (final Iterator<EbliNode> it = listeNode.iterator(); it.hasNext();) { + + final EbliNode currentNode = it.next(); + if (currentNode != null && currentNode.isMovable()) { + + // -- ajout au premier plan du node --// + // scene_.getVisu().addChild(currentNode.getCreator().getWidget()); + + currentNode.getWidget().bringToFront(); + + listeWidget.add(currentNode.getWidget()); + + // -- rafraichissement de la scene --// + scene_.refresh(); + + } + + } + + // -- enregistrement de la commande undoRedo --// + if (cmd_ != null) { + cmd_.addCmd(new CommandBringToFront(listeWidget)); + } + + } + +} Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetVueCalque.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetVueCalque.java 2008-12-10 14:31:18 UTC (rev 4291) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetVueCalque.java 2008-12-10 14:52:21 UTC (rev 4292) @@ -161,6 +161,10 @@ first_ = false; if (initZoom_ != null && initZoom_.getDeltaX() > 0 && initZoom_.getDeltaY() > 0) { calquePanel_.getVueCalque().changeRepere(this, initZoom_); + + //-- tres important!!: le zoom doit prendre la valeur initial du zoom pour conserver le bon angle si on fais le cas suivant: + //-- lros du chargement d un calque avec zoom specifique, suivi d'un agrandissement ou reduction: il faut que le zoom!=null pour ne pas reinitialiser le repere (cf boucle suivante) + zoom_=initZoom_; initZoom_ = null; } else calquePanel_.restaurer(); Modified: branches/Prepro-0.92-SNAPSHOT/ebli/test/org/fudaa/ebli/all/TestVisualLibrary.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/test/org/fudaa/ebli/all/TestVisualLibrary.java 2008-12-10 14:31:18 UTC (rev 4291) +++ branches/Prepro-0.92-SNAPSHOT/ebli/test/org/fudaa/ebli/all/TestVisualLibrary.java 2008-12-10 14:52:21 UTC (rev 4292) @@ -58,6 +58,7 @@ import org.fudaa.ebli.visuallibrary.actions.EbliWidgetActionFont; import org.fudaa.ebli.visuallibrary.actions.EbliWidgetActionForeGround; + import org.fudaa.ebli.visuallibrary.actions.EbliWidgetActionImageChooser; import org.fudaa.ebli.visuallibrary.actions.EbliWidgetActionRetaillageHorizontal; import org.fudaa.ebli.visuallibrary.actions.EbliWidgetActionRetaillageVertical; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <had...@us...> - 2008-12-10 14:31:23
|
Revision: 4291 http://fudaa.svn.sourceforge.net/fudaa/?rev=4291&view=rev Author: hadouxad Date: 2008-12-10 14:31:18 +0000 (Wed, 10 Dec 2008) Log Message: ----------- - Correction de bugs g?\195?\170nants duplication/couper de l?\195?\169gendes. - Correction des g?\195?\169n?\195?\169rations de frames - Correction du filtre propre - Chargement de projet uniquement r?\195?\169pertoires avec filtre POST - Sauvegarde du projet avec .POST (pris en compte qu'on ajoute .POST manuellement ou non) (toutes les m?\195?\169thodes utiles sont dans TrpostFileFilter) - tentative correction bug lignes de courants: visiblement il y a des valeurs qu'il n'aime pas... - Test des valeurs null pour les legendes: update titres.... - Correction test value non null pour la ligne EfGridDataInterpolator.interpolateFromValue 180 - Compatibilit?\195?\169 maximum entre os via la methode TrPostPersistenceManager.updatePathForOs() Removed Paths: ------------- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActionForeGround.java Deleted: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActionForeGround.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActionForeGround.java 2008-12-10 14:27:36 UTC (rev 4290) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActionForeGround.java 2008-12-10 14:31:18 UTC (rev 4291) @@ -1,69 +0,0 @@ -package org.fudaa.ebli.visuallibrary.actions; - -import java.awt.event.ActionEvent; -import java.util.ArrayList; -import java.util.Iterator; -import java.util.Set; - -import org.fudaa.ctulu.CtuluCommandContainer; -import org.fudaa.ctulu.CtuluResource; -import org.fudaa.ebli.ressource.EbliResource; -import org.fudaa.ebli.visuallibrary.EbliNode; -import org.fudaa.ebli.visuallibrary.EbliScene; -import org.fudaa.ebli.visuallibrary.EbliWidget; - -/** - * classe qui permet de placer les widgets selectionnes au premier plan. - * - * @author genesis - */ -public class EbliWidgetActionForeGround extends EbliWidgetActionSimple { - - CtuluCommandContainer cmd_; - - public EbliWidgetActionForeGround(final EbliScene _scene) { - super(_scene, EbliResource.EBLI.getString("Premier plan"), CtuluResource.CTULU.getIcon("crystal_disposerdevant"), - "FORGROUND"); - - cmd_ = _scene.getCmdMng(); - putValue(NAME, "Premier plan"); - } - - private static final long serialVersionUID = 1L; - - @Override - public void actionPerformed(final ActionEvent e) { - // -- recuperation de la liste des nodes de la scene --// - final Set<EbliNode> listeNode = (Set<EbliNode>) scene_.getSelectedObjects(); - - // -- liste des widget selectionnees --// - final java.util.List<EbliWidget> listeWidget = new ArrayList<EbliWidget>(); - - // -- parcours des nodes - for (final Iterator<EbliNode> it = listeNode.iterator(); it.hasNext();) { - - final EbliNode currentNode = it.next(); - if (currentNode != null && currentNode.isMovable()) { - - // -- ajout au premier plan du node --// - // scene_.getVisu().addChild(currentNode.getWidget()); - - currentNode.getWidget().bringToFront(); - - listeWidget.add(currentNode.getWidget()); - - // -- rafraichissement de la scene --// - scene_.refresh(); - - } - - } - - // -- enregistrement de la commande undoRedo --// - if (cmd_ != null) { - cmd_.addCmd(new CommandBringToFront(listeWidget)); - } - - } - -} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <had...@us...> - 2008-12-10 14:27:40
|
Revision: 4290 http://fudaa.svn.sourceforge.net/fudaa/?rev=4290&view=rev Author: hadouxad Date: 2008-12-10 14:27:36 +0000 (Wed, 10 Dec 2008) Log Message: ----------- - Correction de bugs g?\195?\170nants duplication/couper de l?\195?\169gendes. - Correction des g?\195?\169n?\195?\169rations de frames - Correction du filtre propre - Chargement de projet uniquement r?\195?\169pertoires avec filtre POST - Sauvegarde du projet avec .POST (pris en compte qu'on ajoute .POST manuellement ou non) (toutes les m?\195?\169thodes utiles sont dans TrpostFileFilter) - tentative correction bug lignes de courants: visiblement il y a des valeurs qu'il n'aime pas... - Test des valeurs null pour les legendes: update titres.... - Correction test value non null pour la ligne EfGridDataInterpolator.interpolateFromValue 180 - Compatibilit?\195?\169 maximum entre os via la methode TrPostPersistenceManager.updatePathForOs() Modified Paths: -------------- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MVProfileCourbeModel.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/common/tr_en.fr_txt branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostProjet.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/persist/TrPostFileFilter.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/persist/TrPostPersistenceManager.java Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MVProfileCourbeModel.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MVProfileCourbeModel.java 2008-12-10 14:27:03 UTC (rev 4289) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/meshviewer/profile/MVProfileCourbeModel.java 2008-12-10 14:27:36 UTC (rev 4290) @@ -60,7 +60,8 @@ title_ = _variable.toString(); time_ = _timeStep; builder_ = _builder; - res_ = builder_.createResults(_timeStep, _prog); + if(builder_!=null) + res_ = builder_.createResults(_timeStep, _prog); y_ = new TDoubleArrayList(res_.getNbIntersect()); computeY(_prog); } Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/common/tr_en.fr_txt =================================================================== (Binary files differ) Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostProjet.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostProjet.java 2008-12-10 14:27:03 UTC (rev 4289) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostProjet.java 2008-12-10 14:27:36 UTC (rev 4290) @@ -1355,15 +1355,17 @@ // // } - int idx; + /** * Cree une nouvelle fenetre dans le post contenant son jeu de layouts */ public TrPostLayoutFille createNewLayoutFrame() { + int indiceNbframes=impl_.getAllLayoutFille().size()+1; + final TrPostLayoutFille newLayoutFille = new TrPostLayoutFille(this); - newLayoutFille.setTitle(newLayoutFille.getTitle() + " N\xB0 " + (++idx)); + newLayoutFille.setTitle(newLayoutFille.getTitle() + " N\xB0 " + indiceNbframes); // addFillesLayout(newLayoutFille); impl_.addInternalFrame(newLayoutFille); Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/persist/TrPostFileFilter.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/persist/TrPostFileFilter.java 2008-12-10 14:27:03 UTC (rev 4289) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/persist/TrPostFileFilter.java 2008-12-10 14:27:36 UTC (rev 4290) @@ -2,6 +2,10 @@ import java.io.File; +import javax.swing.filechooser.FileFilter; + +import org.fudaa.fudaa.tr.common.TrResource; + import com.memoire.bu.BuFileFilter; /** @@ -10,90 +14,116 @@ * @author Adrien Hadoux */ public class TrPostFileFilter extends BuFileFilter { - /** - * Utilis\xE9 pour l'extension de tous les fichiers, repertoire et ficheirs inclus. - */ - public final static String DEFAULT_EXTENSION = "POST"; + /** + * Utilis\xE9 pour l'extension de tous les fichiers, repertoire et ficheirs inclus. + */ + public final static String DEFAULT_EXTENSION = "POST"; - public TrPostFileFilter(final TrPostFileFormat _ft) { - super(new String[] { DEFAULT_EXTENSION }, _ft.getName()); - } + /** + * Filtre utilis\xE9 pour les chooser de selection de projet .POST. + * @author Adrien Hadoux + * + */ + public static class DirectoryPOSTFilter extends FileFilter{ - @Override - public boolean accept(final File _d, final String _fn) { - if (_d == null) return accept(_fn); - return accept(_d.getAbsolutePath()); - } + @Override + public boolean accept(File f) { + // TODO Auto-generated method stub + + String s = f.getName(); + + if(s.contains("."+DEFAULT_EXTENSION)) + return true; - @Override - public boolean accept(final String _f) { - if (_f == null) { return false; } - final String name = _f; - if (name == null) { return false; } - if (name.equals(TrPostPersistenceManager.setupProject)) return true; - return false; - } + return false; + } - @Override - public boolean accept(final File _f) { - if (_f == null) { return false; } - final String name = _f.getName(); - if (name == null) { return false; } - if (name.equals(TrPostPersistenceManager.setupProject)) return true; - return false; + @Override + public String getDescription() { + // TODO Auto-generated method stub + return DEFAULT_EXTENSION; + } - } - - /** - * Indique si le repertoire concern\xE9 est bien un r\xE9pertoire de type POST - * @param _f - * @return - * @author Adrien Hadoux - */ - public static boolean acceptDirectoryPOST(final File _f){ - if(!_f.isDirectory() || !_f.getName().contains("."+DEFAULT_EXTENSION)) - return false; - - //-- test du contenu si il est bien form\xE9: --// - File[] children=_f.listFiles(); - - boolean setupFound=false; - for(int i=0;!setupFound && i<children.length;i++){ - if (children[i] == null) { setupFound= false; } - else{ - final String name = children[i].getName(); - if (name == null) { setupFound= false; } - else - if (name.equals(TrPostPersistenceManager.setupProject)) setupFound= true; - } - } - - - return setupFound; - } - - /** - * Recupere le fichier setup depuis le un r\xE9pertoire de type POST - * @param _f - * @return - * @author Adrien Hadoux - */ - public static File getSetupFormDirectoryPOST(final File _f){ - File[] children=_f.listFiles(); - - - for(int i=0; i<children.length;i++){ - if (children[i] == null) {} - else{ - final String name = children[i].getName(); - if (name == null) { } - else - if (name.equals(TrPostPersistenceManager.setupProject)) return children[i]; - } - } - return null; - } - + } + public TrPostFileFilter(final TrPostFileFormat _ft) { + super(new String[] { DEFAULT_EXTENSION }, _ft.getName()); + + } + + @Override + public boolean accept(final File _d, final String _fn) { + if (_d == null) return accept(_fn); + return accept(_d.getAbsolutePath()); + } + + @Override + public boolean accept(final String _f) { + if (_f == null) { return false; } + final String name = _f; + if (name == null) { return false; } + if (name.equals(TrPostPersistenceManager.setupProject)) return true; + return false; + } + + @Override + public boolean accept(final File _f) { + if (_f == null) { return false; } + final String name = _f.getName(); + if (name == null) { return false; } + if (name.equals(TrPostPersistenceManager.setupProject)) return true; + return false; + + } + + /** + * Indique si le repertoire concern\xE9 est bien un r\xE9pertoire de type POST + * @param _f + * @return + * @author Adrien Hadoux + */ + public static boolean acceptDirectoryPOST(final File _f){ + if(!_f.isDirectory() || !_f.getName().contains("."+DEFAULT_EXTENSION)) + return false; + + //-- test du contenu si il est bien form\xE9: --// + File[] children=_f.listFiles(); + + boolean setupFound=false; + for(int i=0;!setupFound && i<children.length;i++){ + if (children[i] == null) { setupFound= false; } + else{ + final String name = children[i].getName(); + if (name == null) { setupFound= false; } + else + if (name.equals(TrPostPersistenceManager.setupProject)) setupFound= true; + } + } + + + return setupFound; + } + + /** + * Recupere le fichier setup depuis le un r\xE9pertoire de type POST + * @param _f + * @return + * @author Adrien Hadoux + */ + public static File getSetupFormDirectoryPOST(final File _f){ + File[] children=_f.listFiles(); + for(int i=0; i<children.length;i++){ + if (children[i] == null) {} + else{ + final String name = children[i].getName(); + if (name == null) { } + else + if (name.equals(TrPostPersistenceManager.setupProject)) return children[i]; + } + } + return null; + } + + } Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/persist/TrPostPersistenceManager.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/persist/TrPostPersistenceManager.java 2008-12-10 14:27:03 UTC (rev 4289) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/persist/TrPostPersistenceManager.java 2008-12-10 14:27:36 UTC (rev 4290) @@ -3,6 +3,7 @@ import java.awt.Dimension; import java.awt.Point; import java.io.File; +import java.io.FileFilter; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.FileWriter; @@ -152,6 +153,7 @@ fileChooser.setDialogTitle(EbliResource.EBLI.getString("S\xE9lectionnez l'emplacement de votre projet")); fileChooser.setAcceptAllFileFilterUsed(false); fileChooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY); + fileChooser.addChoosableFileFilter(new TrPostFileFilter.DirectoryPOSTFilter()); if (projet_ != null){ // initialiser le saveas dans le meme rep // fileChooser.setSelectedFile(projet_); } @@ -208,6 +210,7 @@ fileChooser.setDialogTitle(EbliResource.EBLI.getString("S\xE9lectionnez l'emplacement de votre r\xE9pertoire POST")); fileChooser.setAcceptAllFileFilterUsed(false); fileChooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY); + fileChooser.addChoosableFileFilter(new TrPostFileFilter.DirectoryPOSTFilter()); // -- init avec les param noms projet et autre --// if (projet_ != null) { fileChooser.setSelectedFile(projet_); @@ -1337,6 +1340,23 @@ } + /** + * Methode qui se charge de modifier les paths relatifs dans les cas ou l'on sauvegarde un projet POST sous linux + * et que l'on charge ce projet sous windows. Il faut changer dynamiquement les / par des \ au chargement du projet + * @param path + * @return + */ + public static String updatePathForOs(String path){ + final String os = System.getProperty("os.name"); + if (os.startsWith("Windows")) { + path=path.replace('/', File.separatorChar); + } else { + path=path.replace('\\', File.separatorChar); + } + return path; + } + + public void writeCommentaire(OutputStream out){ } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <had...@us...> - 2008-12-10 14:27:12
|
Revision: 4289 http://fudaa.svn.sourceforge.net/fudaa/?rev=4289&view=rev Author: hadouxad Date: 2008-12-10 14:27:03 +0000 (Wed, 10 Dec 2008) Log Message: ----------- - Correction de bugs g?\195?\170nants duplication/couper de l?\195?\169gendes. - Correction des g?\195?\169n?\195?\169rations de frames - Correction du filtre propre - Chargement de projet uniquement r?\195?\169pertoires avec filtre POST - Sauvegarde du projet avec .POST (pris en compte qu'on ajoute .POST manuellement ou non) (toutes les m?\195?\169thodes utiles sont dans TrpostFileFilter) - tentative correction bug lignes de courants: visiblement il y a des valeurs qu'il n'aime pas... - Test des valeurs null pour les legendes: update titres.... - Correction test value non null pour la ligne EfGridDataInterpolator.interpolateFromValue 180 - Compatibilit?\195?\169 maximum entre os via la methode TrPostPersistenceManager.updatePathForOs() Modified Paths: -------------- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/palette/BPalettePlageLegende.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetControllerGraphe.java Removed Paths: ------------- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActionForeground.java Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/palette/BPalettePlageLegende.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/palette/BPalettePlageLegende.java 2008-12-10 14:26:05 UTC (rev 4288) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/palette/BPalettePlageLegende.java 2008-12-10 14:27:03 UTC (rev 4289) @@ -42,406 +42,409 @@ */ public class BPalettePlageLegende extends JPanel implements BPalettePlageListener { - public void setFont(final Font _font) { - super.setFont(_font); - if (pnPlages_ != null) { - internSetFont(pnPlages_, _font); - } - if (pnTitre_ != null) { - internSetFont(pnTitre_, _font); - } - if (reduit_ != null) { - reduit_.setFont(_font); - } - } + public void setFont(final Font _font) { + super.setFont(_font); + if (pnPlages_ != null) { + internSetFont(pnPlages_, _font); + } + if (pnTitre_ != null) { + internSetFont(pnTitre_, _font); + } + if (reduit_ != null) { + reduit_.setFont(_font); + } + } - public void addUserComponent(final JComponent _c) { - if (_c != null) { - pnTitre_.add(_c); - pnTitre_.doLayout(); - } - } + public void addUserComponent(final JComponent _c) { + if (_c != null) { + pnTitre_.add(_c); + pnTitre_.doLayout(); + } + } - public void removeUserComponent(final JComponent _c) { - if (_c != null) { - pnTitre_.remove(_c); - pnTitre_.doLayout(); - } - } + public void removeUserComponent(final JComponent _c) { + if (_c != null) { + pnTitre_.remove(_c); + pnTitre_.doLayout(); + } + } - private void internSetFont(final JComponent _c, final Font _font) { - for (int i = _c.getComponentCount() - 1; i >= 0; i--) { - _c.getComponent(i).setFont(_font); - } - } + private void internSetFont(final JComponent _c, final Font _font) { + for (int i = _c.getComponentCount() - 1; i >= 0; i--) { + _c.getComponent(i).setFont(_font); + } + } - BPalettePlageInterface model_; - public BPalettePlageInterface getModel_() { - return model_; - } + BPalettePlageInterface model_; + public BPalettePlageInterface getModel_() { + return model_; + } - public void setModel_(BPalettePlageInterface model_) { - this.model_ = model_; - } + public void setModel_(BPalettePlageInterface model_) { + this.model_ = model_; + } - // Le symbole par d\xE9faut pour les plages - private final JLabel lbTitre_ = new JLabel(); - private final JPanel pnPlages_ = new JPanel(); - // private JList lbPlages_; - private PlageTableModel listModel_; - private JLabel lbAutres_ = new JLabel(); - BuPanel pnTitre_; - private final JLabel lbSSTitre_ = new JLabel(); - final JList listPlages_; + // Le symbole par d\xE9faut pour les plages + private final JLabel lbTitre_ = new JLabel(); + private final JPanel pnPlages_ = new JPanel(); + // private JList lbPlages_; + private PlageTableModel listModel_; + private JLabel lbAutres_ = new JLabel(); + BuPanel pnTitre_; + private final JLabel lbSSTitre_ = new JLabel(); + final JList listPlages_; - public JList getListPlages_() { - return listPlages_; - } + public JList getListPlages_() { + return listPlages_; + } - /** - * Cr\xE9ation d'une palette vide. - */ - public BPalettePlageLegende() { - setLayout(new BuBorderLayout(0, 0, true, false)); - final Border bdPlages = BorderFactory.createEmptyBorder(5, 5, 5, 5); - pnTitre_ = new BuPanel(); - pnTitre_.setOpaque(false); - pnTitre_.setLayout(new BuVerticalLayout(4, true, true)); - lbTitre_.setHorizontalAlignment(SwingConstants.CENTER); - lbTitre_.setFont(getFont()); - lbTitre_.setAlignmentX((float) 0.5); - final BuGridLayout lyPlages = new BuGridLayout(); - lyPlages.setColumns(1); - lyPlages.setHgap(5); - pnPlages_.setLayout(lyPlages); - pnPlages_.setBorder(bdPlages); - pnPlages_.setOpaque(false); - listPlages_ = new JList(); - listPlages_.setFocusable(false); - listPlages_.setFont(getFont()); - final BPalettePlageLegende.PlageCellRenderer r = new BPalettePlageLegende.PlageCellRenderer(); - r.setOpaque(false); - listPlages_.setCellRenderer(r); - listModel_ = new PlageTableModel(); - listPlages_.setModel(listModel_); - listPlages_.setOpaque(false); - listPlages_.setSelectionModel(new ListSelectionModel() { + /** + * Cr\xE9ation d'une palette vide. + */ + public BPalettePlageLegende() { + setLayout(new BuBorderLayout(0, 0, true, false)); + final Border bdPlages = BorderFactory.createEmptyBorder(5, 5, 5, 5); + pnTitre_ = new BuPanel(); + pnTitre_.setOpaque(false); + pnTitre_.setLayout(new BuVerticalLayout(4, true, true)); + lbTitre_.setHorizontalAlignment(SwingConstants.CENTER); + lbTitre_.setFont(getFont()); + lbTitre_.setAlignmentX((float) 0.5); + final BuGridLayout lyPlages = new BuGridLayout(); + lyPlages.setColumns(1); + lyPlages.setHgap(5); + pnPlages_.setLayout(lyPlages); + pnPlages_.setBorder(bdPlages); + pnPlages_.setOpaque(false); + listPlages_ = new JList(); + listPlages_.setFocusable(false); + listPlages_.setFont(getFont()); + final BPalettePlageLegende.PlageCellRenderer r = new BPalettePlageLegende.PlageCellRenderer(); + r.setOpaque(false); + listPlages_.setCellRenderer(r); + listModel_ = new PlageTableModel(); + listPlages_.setModel(listModel_); + listPlages_.setOpaque(false); + listPlages_.setSelectionModel(new ListSelectionModel() { - public void setValueIsAdjusting(final boolean _valueIsAdjusting) {} + public void setValueIsAdjusting(final boolean _valueIsAdjusting) {} - public void setSelectionMode(final int _selectionMode) {} + public void setSelectionMode(final int _selectionMode) {} - public void setSelectionInterval(final int _index0, final int _index1) {} + public void setSelectionInterval(final int _index0, final int _index1) {} - public void setLeadSelectionIndex(final int _index) {} + public void setLeadSelectionIndex(final int _index) {} - public void setAnchorSelectionIndex(final int _index) {} + public void setAnchorSelectionIndex(final int _index) {} - public void removeSelectionInterval(final int _index0, final int _index1) {} + public void removeSelectionInterval(final int _index0, final int _index1) {} - public void removeListSelectionListener(final ListSelectionListener _x) {} + public void removeListSelectionListener(final ListSelectionListener _x) {} - public void removeIndexInterval(final int _index0, final int _index1) {} + public void removeIndexInterval(final int _index0, final int _index1) {} - public boolean isSelectionEmpty() { - return false; - } + public boolean isSelectionEmpty() { + return false; + } - public boolean isSelectedIndex(final int _index) { - return false; - } + public boolean isSelectedIndex(final int _index) { + return false; + } - public void insertIndexInterval(final int _index, final int _length, final boolean _before) {} + public void insertIndexInterval(final int _index, final int _length, final boolean _before) {} - public boolean getValueIsAdjusting() { - return false; - } + public boolean getValueIsAdjusting() { + return false; + } - public int getSelectionMode() { - return 0; - } + public int getSelectionMode() { + return 0; + } - public int getMinSelectionIndex() { - return 0; - } + public int getMinSelectionIndex() { + return 0; + } - public int getMaxSelectionIndex() { - return 0; - } + public int getMaxSelectionIndex() { + return 0; + } - public int getLeadSelectionIndex() { - return 0; - } + public int getLeadSelectionIndex() { + return 0; + } - public int getAnchorSelectionIndex() { - return 0; - } + public int getAnchorSelectionIndex() { + return 0; + } - public void clearSelection() {} + public void clearSelection() {} - public void addSelectionInterval(final int _index0, final int _index1) {} + public void addSelectionInterval(final int _index0, final int _index1) {} - public void addListSelectionListener(final ListSelectionListener _x) {} + public void addListSelectionListener(final ListSelectionListener _x) {} - }); - pnPlages_.add(listPlages_); - lbSSTitre_.setHorizontalAlignment(SwingConstants.CENTER); - lbSSTitre_.setFont(getFont()); - lbSSTitre_.setAlignmentX((float) 0.5); - this.setOpaque(false); + }); + pnPlages_.add(listPlages_); + lbSSTitre_.setHorizontalAlignment(SwingConstants.CENTER); + lbSSTitre_.setFont(getFont()); + lbSSTitre_.setAlignmentX((float) 0.5); + this.setOpaque(false); - pnTitre_.add(lbTitre_, null); - pnTitre_.add(lbSSTitre_, null); - this.add(pnTitre_, BorderLayout.NORTH); - add(pnPlages_, BorderLayout.CENTER); + pnTitre_.add(lbTitre_, null); + pnTitre_.add(lbSSTitre_, null); + this.add(pnTitre_, BorderLayout.NORTH); + add(pnPlages_, BorderLayout.CENTER); - } - JComponent reduit_; + } + JComponent reduit_; - /** - * Construit la legende et la met a jour. - * - * @param _model le modele - */ - public BPalettePlageLegende(final BPalettePlageAbstract _model) { - this(); - setModel(_model); - } + /** + * Construit la legende et la met a jour. + * + * @param _model le modele + */ + public BPalettePlageLegende(final BPalettePlageAbstract _model) { + this(); + setModel(_model); + } - class PlageTableModel extends AbstractListModel { + class PlageTableModel extends AbstractListModel { - public Object getElementAt(final int _index) { - return model_.getPlageInterface(_index); - } + public Object getElementAt(final int _index) { + return model_.getPlageInterface(_index); + } - public void fireAllRemoved(final int _oldSize) { + public void fireAllRemoved(final int _oldSize) { - if (_oldSize > 0) { - fireIntervalRemoved(this, 0, _oldSize - 1); - } - } + if (_oldSize > 0) { + fireIntervalRemoved(this, 0, _oldSize - 1); + } + } - public void fireAllAdd() { + public void fireAllAdd() { - if (model_ == null) { - fireIntervalAdded(this, 0, 0); - } else { - fireIntervalAdded(this, 0, model_.getNbPlages()); - } - } + if (model_ == null) { + fireIntervalAdded(this, 0, 0); + } else { + fireIntervalAdded(this, 0, model_.getNbPlages()); + } + } - public void fireModified(final int _i) { + public void fireModified(final int _i) { - fireContentsChanged(this, _i, _i); - } + fireContentsChanged(this, _i, _i); + } - public int getSize() { - return model_ == null ? 0 : model_.getNbPlages(); - } - } + public int getSize() { + return model_ == null ? 0 : model_.getNbPlages(); + } + } - /** - * Un cell renderer pour afficher une plage. - * - * @author Fred Deniger - * @version $Id: BPalettePlageLegende.java,v 1.23 2007-05-04 13:49:42 deniger Exp $ - */ - public static class PlageCellRenderer extends JLabel implements ListCellRenderer { + /** + * Un cell renderer pour afficher une plage. + * + * @author Fred Deniger + * @version $Id: BPalettePlageLegende.java,v 1.23 2007-05-04 13:49:42 deniger Exp $ + */ + public static class PlageCellRenderer extends JLabel implements ListCellRenderer { - TraceIcon icone_; + TraceIcon icone_; - public PlageCellRenderer() { - icone_ = new TraceIcon(); - setIcon(icone_); - setOpaque(true); - } + public PlageCellRenderer() { + icone_ = new TraceIcon(); + setIcon(icone_); + setOpaque(true); + } - public Component getListCellRendererComponent(final JList _list, final Object _value, final int _index, - final boolean _isSelected, final boolean _cellHasFocus) { - if (_isSelected) { - super.setForeground(_list.getSelectionForeground()); - super.setBackground(_list.getSelectionBackground()); - } else { - super.setForeground(_list.getForeground()); - super.setBackground(_list.getBackground()); - } - setFont(_list.getFont()); - if (_value instanceof BPlageInterface) { - final BPlageInterface p = (BPlageInterface) _value; - icone_.setCouleur(p.getCouleur()); - icone_.setTaille(p.getIconeTaille()); - icone_.setType(p.getIconeType()); - setText(p.getLegende()); - setToolTipText(p.getLegende()); - } else { - final String val = _value == null ? CtuluLibString.EMPTY_STRING : _value.toString(); - setText(val); - setToolTipText(val); - icone_.setType(TraceIcon.RIEN); - } + public Component getListCellRendererComponent(final JList _list, final Object _value, final int _index, + final boolean _isSelected, final boolean _cellHasFocus) { + if (_isSelected) { + super.setForeground(_list.getSelectionForeground()); + super.setBackground(_list.getSelectionBackground()); + } else { + super.setForeground(_list.getForeground()); + super.setBackground(_list.getBackground()); + } + setFont(_list.getFont()); + if (_value instanceof BPlageInterface) { + final BPlageInterface p = (BPlageInterface) _value; + icone_.setCouleur(p.getCouleur()); + icone_.setTaille(p.getIconeTaille()); + icone_.setType(p.getIconeType()); + setText(p.getLegende()); + setToolTipText(p.getLegende()); + } else { + final String val = _value == null ? CtuluLibString.EMPTY_STRING : _value.toString(); + setText(val); + setToolTipText(val); + icone_.setType(TraceIcon.RIEN); + } - return this; - } - } + return this; + } + } - /** - * @param _model le nouveau modele utilise pour dessiner la legende - */ - public final void setModel(final BPalettePlageInterface _model) { + /** + * @param _model le nouveau modele utilise pour dessiner la legende + */ + public final void setModel(final BPalettePlageInterface _model) { - if (model_ != _model) { - model_ = _model; - if (_model != null) { - _model.setPlageListener(this); - } - if (reduit_ != null) { - pnPlages_.remove(reduit_); - } - pnPlages_.remove(listPlages_); - JComponent cp = listPlages_; - if (model_ != null && (model_.isReduit() || (model_.isReduitEnable() && model_.getNbPlages() > 15))) { - cp = model_.createReduit(); + if (model_ != _model) { + model_ = _model; + if (_model != null) { + _model.setPlageListener(this); + } + if (reduit_ != null) { + pnPlages_.remove(reduit_); + } + pnPlages_.remove(listPlages_); + JComponent cp = listPlages_; + if (model_ != null && (model_.isReduit() || (model_.isReduitEnable() && model_.getNbPlages() > 15))) { + cp = model_.createReduit(); - } - if (cp == null) { - cp = listPlages_; - } else { - cp.setFont(getFont()); - } + } + if (cp == null) { + cp = listPlages_; + } else { + cp.setFont(getFont()); + } - pnPlages_.add(cp, 0); - updateAllLegende(); - } - } + pnPlages_.add(cp, 0); + updateAllLegende(); + } + } - public boolean isReduitEnable() { - return model_ != null && model_.isReduitEnable(); - } + public boolean isReduitEnable() { + return model_ != null && model_.isReduitEnable(); + } - public boolean isReduit() { - return model_ != null && model_.isReduit(); - } + public boolean isReduit() { + return model_ != null && model_.isReduit(); + } - /** - * @return le model utilise - */ - public BPalettePlageInterface getModel() { - return model_; - } + /** + * @return le model utilise + */ + public BPalettePlageInterface getModel() { + return model_; + } - /** - * Redessine enti\xE8rment la legende. Appele lorsque la structure de la palette a ete modifiee - */ - public final void updateAllLegende() { - if (model_ != null) { - updateTitres(); - listModel_.fireAllRemoved(model_.getNbPlages()); - listModel_.fireAllAdd(); - if (model_.isAutresVisible()) { - lbAutres_ = buildLabel(model_.getPlageAutresInterface()); - pnPlages_.add(lbAutres_); - } else { - pnPlages_.remove(lbAutres_); - } - } - revalidate(); - doLayout(); - repaint(); - } + /** + * Redessine enti\xE8rment la legende. Appele lorsque la structure de la palette a ete modifiee + */ + public final void updateAllLegende() { + if (model_ != null) { + updateTitres(); + listModel_.fireAllRemoved(model_.getNbPlages()); + listModel_.fireAllAdd(); + if (model_.isAutresVisible()) { + lbAutres_ = buildLabel(model_.getPlageAutresInterface()); + pnPlages_.add(lbAutres_); + } else { + pnPlages_.remove(lbAutres_); + } + } + revalidate(); + doLayout(); + repaint(); + } - private JLabel buildLabel(final BPlageInterface _p) { - final JLabel r = new JLabel(); - r.setFont(getFont()); - final TraceIcon ic = new TraceIcon(_p.getIconeType(), _p.getIconeTaille()); - ic.setCouleur(_p.getCouleur()); - r.setIcon(ic); - r.setText(_p.getLegende()); - return r; + private JLabel buildLabel(final BPlageInterface _p) { + final JLabel r = new JLabel(); + r.setFont(getFont()); + final TraceIcon ic = new TraceIcon(_p.getIconeType(), _p.getIconeTaille()); + ic.setCouleur(_p.getCouleur()); + r.setIcon(ic); + r.setText(_p.getLegende()); + return r; - } + } - protected final void updateTitres() { + protected final void updateTitres() { + if(model_==null) + return; + if(lbTitre_!=null) + lbTitre_.setText(model_.getTitre()); + if(lbSSTitre_!=null) + lbSSTitre_.setText(model_.getSousTitre()); + } - lbTitre_.setText(model_.getTitre()); - lbSSTitre_.setText(model_.getSousTitre()); - } + protected final void updateLabel(final int _idx) { + listModel_.fireModified(_idx); + } - protected final void updateLabel(final int _idx) { - listModel_.fireModified(_idx); - } + protected final void updateLabelAutre() { + if (lbAutres_ != null) { + updateLabel(lbAutres_, model_.getPlageAutresInterface()); + } + } - protected final void updateLabelAutre() { - if (lbAutres_ != null) { - updateLabel(lbAutres_, model_.getPlageAutresInterface()); - } - } + protected final void updateLabel(final JLabel _lb, final BPlageInterface _p) { + final TraceIcon ic = (TraceIcon) _lb.getIcon(); + ic.setCouleur(_p.getCouleur()); + ic.setTaille(_p.getIconeTaille()); + ic.setType(_p.getIconeType()); + _lb.setText(_p.getLegende()); + _lb.repaint(); + } - protected final void updateLabel(final JLabel _lb, final BPlageInterface _p) { - final TraceIcon ic = (TraceIcon) _lb.getIcon(); - ic.setCouleur(_p.getCouleur()); - ic.setTaille(_p.getIconeTaille()); - ic.setType(_p.getIconeType()); - _lb.setText(_p.getLegende()); - _lb.repaint(); - } + public void allPaletteModified(final BPalettePlageInterface _src) { + if (_src == model_) { + pnPlages_.removeAll(); + reduit_ = null; + if (_src != null && _src.isReduitEnable() && model_.isReduit()) { + reduit_ = model_.createReduit(); + pnPlages_.add(reduit_); + } else { + pnPlages_.add(listPlages_); + } + updateAllLegende(); - public void allPaletteModified(final BPalettePlageInterface _src) { - if (_src == model_) { - pnPlages_.removeAll(); - reduit_ = null; - if (_src != null && _src.isReduitEnable() && model_.isReduit()) { - reduit_ = model_.createReduit(); - pnPlages_.add(reduit_); - } else { - pnPlages_.add(listPlages_); - } - updateAllLegende(); + } + } - } - } + public void plageModified(final BPalettePlageInterface _src, final int _i) { - public void plageModified(final BPalettePlageInterface _src, final int _i) { + if (_src == model_) { + updateLabel(_i); + } + } - if (_src == model_) { - updateLabel(_i); - } - } + public void paletteTitreModified(final BPalettePlageInterface _src) { - public void paletteTitreModified(final BPalettePlageInterface _src) { + if (_src == model_) { + updateTitres(); + } + } - if (_src == model_) { - updateTitres(); - } - } + public boolean isUseReduit() { + return model_ != null && model_.isReduit(); + } - public boolean isUseReduit() { - return model_ != null && model_.isReduit(); - } + public void setUseReduit(final boolean _useReduit) { + if (reduit_ != null) { + pnPlages_.remove(reduit_); + } + pnPlages_.remove(listPlages_); + JComponent cp = null; + reduit_ = null; + if (model_ != null && model_.isReduitEnable()) { + model_.setReduit(_useReduit); + if (_useReduit) { + reduit_ = model_.createReduit(); + reduit_.setFont(getFont()); + cp = reduit_; - public void setUseReduit(final boolean _useReduit) { - if (reduit_ != null) { - pnPlages_.remove(reduit_); - } - pnPlages_.remove(listPlages_); - JComponent cp = null; - reduit_ = null; - if (model_ != null && model_.isReduitEnable()) { - model_.setReduit(_useReduit); - if (_useReduit) { - reduit_ = model_.createReduit(); - reduit_.setFont(getFont()); - cp = reduit_; + } else { + cp = listPlages_; + } + } + if (cp == null) { + cp = listPlages_; + } + pnPlages_.add(cp, 0); + pnPlages_.invalidate(); + allPaletteModified(model_); - } else { - cp = listPlages_; - } - } - if (cp == null) { - cp = listPlages_; - } - pnPlages_.add(cp, 0); - pnPlages_.invalidate(); - allPaletteModified(model_); - - } + } } \ No newline at end of file Deleted: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActionForeground.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActionForeground.java 2008-12-10 14:26:05 UTC (rev 4288) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActionForeground.java 2008-12-10 14:27:03 UTC (rev 4289) @@ -1,69 +0,0 @@ -package org.fudaa.ebli.visuallibrary.actions; - -import java.awt.event.ActionEvent; -import java.util.ArrayList; -import java.util.Iterator; -import java.util.Set; - -import org.fudaa.ctulu.CtuluCommandContainer; -import org.fudaa.ctulu.CtuluResource; -import org.fudaa.ebli.ressource.EbliResource; -import org.fudaa.ebli.visuallibrary.EbliNode; -import org.fudaa.ebli.visuallibrary.EbliScene; -import org.fudaa.ebli.visuallibrary.EbliWidget; - -/** - * classe qui permet de placer les widgets selectionnes au premier plan. - * - * @author genesis - */ -public class EbliWidgetActionForeground extends EbliWidgetActionSimple { - - CtuluCommandContainer cmd_; - - public EbliWidgetActionForeground(final EbliScene _scene) { - super(_scene, EbliResource.EBLI.getString("Premier plan"), CtuluResource.CTULU.getIcon("crystal_disposerdevant"), - "FORGROUND"); - - cmd_ = _scene.getCmdMng(); - putValue(NAME, "Premier plan"); - } - - private static final long serialVersionUID = 1L; - - @Override - public void actionPerformed(final ActionEvent e) { - // -- recuperation de la liste des nodes de la scene --// - final Set<EbliNode> listeNode = (Set<EbliNode>) scene_.getSelectedObjects(); - - // -- liste des widget selectionnees --// - final java.util.List<EbliWidget> listeWidget = new ArrayList<EbliWidget>(); - - // -- parcours des nodes - for (final Iterator<EbliNode> it = listeNode.iterator(); it.hasNext();) { - - final EbliNode currentNode = it.next(); - if (currentNode != null && currentNode.isMovable()) { - - // -- ajout au premier plan du node --// - // scene_.getVisu().addChild(currentNode.getWidget()); - - currentNode.getWidget().bringToFront(); - - listeWidget.add(currentNode.getWidget()); - - // -- rafraichissement de la scene --// - scene_.refresh(); - - } - - } - - // -- enregistrement de la commande undoRedo --// - if (cmd_ != null) { - cmd_.addCmd(new CommandBringToFront(listeWidget)); - } - - } - -} Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetControllerGraphe.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetControllerGraphe.java 2008-12-10 14:26:05 UTC (rev 4288) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetControllerGraphe.java 2008-12-10 14:27:03 UTC (rev 4289) @@ -134,7 +134,7 @@ // -- on ajoute la legende apres duplication --// - if (widgetGraphe_.getNodeLegende() != null) { + if (((EbliWidgetControllerGraphe)widgetGraphe_.getController()).hasLegende()) { controllerDuDuplique.ajoutLegende(); listeNodeUndo.add(widgetGrapheDuplic.getNodeLegende()); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <had...@us...> - 2008-12-10 14:26:09
|
Revision: 4288 http://fudaa.svn.sourceforge.net/fudaa/?rev=4288&view=rev Author: hadouxad Date: 2008-12-10 14:26:05 +0000 (Wed, 10 Dec 2008) Log Message: ----------- - Correction de bugs g?\195?\170nants duplication/couper de l?\195?\169gendes. - Correction des g?\195?\169n?\195?\169rations de frames - Correction du filtre propre - Chargement de projet uniquement r?\195?\169pertoires avec filtre POST - Sauvegarde du projet avec .POST (pris en compte qu'on ajoute .POST manuellement ou non) (toutes les m?\195?\169thodes utiles sont dans TrpostFileFilter) - tentative correction bug lignes de courants: visiblement il y a des valeurs qu'il n'aime pas... - Test des valeurs null pour les legendes: update titres.... - Correction test value non null pour la ligne EfGridDataInterpolator.interpolateFromValue 180 - Compatibilit?\195?\169 maximum entre os via la methode TrPostPersistenceManager.updatePathForOs() Modified Paths: -------------- branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/interpolation/EfGridDataInterpolator.java Modified: branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/interpolation/EfGridDataInterpolator.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/interpolation/EfGridDataInterpolator.java 2008-12-09 16:44:46 UTC (rev 4287) +++ branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/ef/interpolation/EfGridDataInterpolator.java 2008-12-10 14:26:05 UTC (rev 4288) @@ -177,7 +177,7 @@ public double interpolateFromValue(int _idxElt, double _x, double _y, CtuluVariable _value, EfData _data, int _tIdx) throws IOException { EfData data = _data; - if (!data.isElementData() && isVect(_value)) { + if (_value!=null && !data.isElementData() && isVect(_value)) { CtuluVariable vx = null; CtuluVariable vy = null; EfData vxData = null; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <had...@us...> - 2008-12-09 16:44:49
|
Revision: 4287 http://fudaa.svn.sourceforge.net/fudaa/?rev=4287&view=rev Author: hadouxad Date: 2008-12-09 16:44:46 +0000 (Tue, 09 Dec 2008) Log Message: ----------- - Initialisation du bouton resize proportionnel du calque - Prise en compte du zoom du calque pour les duplications de calque - Prise en compte du zoom dans la sauvegarde des donn?\195?\169es cf: TrPostVisuPanelPersistManager: recuperation du zoom pour le zeblicalquepanel - ajout des fichiers .resu pour les fichiers r?\195?\169sultats ajout dans : SerafinFileFormat: { "ser", "res", "geo", "sel", "res2d", "res3d","resu" }; SerafinFileFilter: isResFile() (J'espere que j'ai rien oubli?\195?\169...) - Am?\195?\169lioration: clic direct sur l'explorer pour ouvrir un repertoire .POST la logique est dans le TrPostFileFilter et il y a surcharge de la methode updateLists0 dans TrExplorer pour ouvrir les repertoires .POST dans la vue files... |_ v?\195?\169rifie la r?\195?\168gle suivante: REPERTOIRE && contient .POST && contient fichier setup - Modification de l'option 'charger' du projet: charger uniquement des r?\195?\169pertoires. Modified Paths: -------------- branches/Prepro-0.92-SNAPSHOT/ctulu/src/com/memoire/bu/BuExplorer.java branches/Prepro-0.92-SNAPSHOT/ctulu/src/com/memoire/bu/BuFileViewer.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/telemac/io/SerafinFileFilter.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/telemac/io/SerafinFileFormat.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZEbliCalquesPanelPersistManager.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZebliCalquePersist.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/ressource/Thumbs.db branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetController.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetControllerCalque.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetCreatorVueCalque.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetVueCalque.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetControllerGraphe.java branches/Prepro-0.92-SNAPSHOT/ebli/test/org/fudaa/ebli/all/TestVisualLibrary.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/common/TrApplicationManager.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/common/TrExplorer.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/common/TrFileRenderer.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostLayoutPanelController.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostVisuPanelPersistManager.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/persist/TrPostFileFilter.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/persist/TrPostPersistenceManager.java Added Paths: ----------- branches/Prepro-0.92-SNAPSHOT/fudaa/.metadata/ branches/Prepro-0.92-SNAPSHOT/fudaa/.metadata/.mylyn/ Modified: branches/Prepro-0.92-SNAPSHOT/ctulu/src/com/memoire/bu/BuExplorer.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ctulu/src/com/memoire/bu/BuExplorer.java 2008-12-08 22:59:46 UTC (rev 4286) +++ branches/Prepro-0.92-SNAPSHOT/ctulu/src/com/memoire/bu/BuExplorer.java 2008-12-09 16:44:46 UTC (rev 4287) @@ -1201,7 +1201,7 @@ } } - static class Model implements Serializable, ListModel { + protected static class Model implements Serializable, ListModel { private VfsFile[] els_; private int nb_; private Vector ldl_; @@ -1391,13 +1391,13 @@ // utils - static final Cursor WAIT_CURSOR = Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR); + protected static final Cursor WAIT_CURSOR = Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR); - final void setProgression(int _p) { + public final void setProgression(int _p) { if (app_ != null && app_.getMainPanel() != null) app_.getMainPanel().setProgression(_p); } - private int liststamp(String[] _s) { + protected int liststamp(String[] _s) { int r = 0; if (_s != null) { for (int i = 0; i < _s.length; i++) @@ -1410,7 +1410,7 @@ return r; } - boolean updating_ = false; + protected boolean updating_ = false; protected void updateLists(final VfsFile _dir, VfsFile _sel) { final boolean showing = isShowing(); @@ -1480,7 +1480,7 @@ } } - void updateLists0(final VfsFile _dir, BuFileFilter _filter, final Cursor _cursor, final VfsFile _sel, + protected void updateLists0(final VfsFile _dir, BuFileFilter _filter, final Cursor _cursor, final VfsFile _sel, final boolean _showing) { if (EventQueue.isDispatchThread()) throw new RuntimeException("In swing thread. " + "Use updateLists() instead"); @@ -1554,7 +1554,21 @@ VfsFile f = _dir.createChild(els[i]); - if (f == null) {} else if (f.isDirectory()) { + + + if (f == null) {} + + //--cas particulier: si le fichier est un repertoire .POST + //-- on place les repertoire .POST avec les fichiers --// + else + if(f.isDirectory() && f.getName().contains(".POST")){ + + files[nb_files] = f; + nb_files++; + } + + + else if (f.isDirectory()) { dirs[nb_dirs] = f; nb_dirs++; } else if (f.isFile()) { @@ -1589,6 +1603,10 @@ final int fnb_dirs = nb_dirs; final int fnb_files = nb_files; + + + + if (_sel != null) _sel.build(); runnable = new Runnable() { @@ -1624,7 +1642,7 @@ // FuLog.debug("end "+(System.currentTimeMillis()-before)); } - private FuComparator getSorter() { + protected FuComparator getSorter() { FuComparator r; /* * String s=(String)sorters_.getSelectedItem(); if("Date".equals(s)) r=DATE_COMPARATOR; else if("Size".equals(s)) Modified: branches/Prepro-0.92-SNAPSHOT/ctulu/src/com/memoire/bu/BuFileViewer.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ctulu/src/com/memoire/bu/BuFileViewer.java 2008-12-08 22:59:46 UTC (rev 4286) +++ branches/Prepro-0.92-SNAPSHOT/ctulu/src/com/memoire/bu/BuFileViewer.java 2008-12-09 16:44:46 UTC (rev 4287) @@ -16,6 +16,7 @@ import java.awt.Dimension; import java.awt.Point; +import javax.swing.JLabel; import javax.swing.JViewport; import javax.swing.SwingUtilities; @@ -133,6 +134,7 @@ if(ref!=runnable_) break; add(v[i]); } + Container p=getParent(); if(p instanceof JViewport) Modified: branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/telemac/io/SerafinFileFilter.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/telemac/io/SerafinFileFilter.java 2008-12-08 22:59:46 UTC (rev 4286) +++ branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/telemac/io/SerafinFileFilter.java 2008-12-09 16:44:46 UTC (rev 4287) @@ -71,7 +71,7 @@ * @return true si c'est un fichier r\xE9sultat */ public boolean isResFile(final String _name) { - return _name.endsWith(".res3d")|| _name.endsWith(".res2d")|| _name.endsWith(".res") || ((_name.startsWith("res") || _name.endsWith("RES")) && (_name.indexOf('.') < 0)); + return _name.endsWith(".resu")|| _name.endsWith(".res3d")|| _name.endsWith(".res2d")|| _name.endsWith(".res") || ((_name.startsWith("res") || _name.endsWith("RES")) && (_name.indexOf('.') < 0)); } /** Modified: branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/telemac/io/SerafinFileFormat.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/telemac/io/SerafinFileFormat.java 2008-12-08 22:59:46 UTC (rev 4286) +++ branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/telemac/io/SerafinFileFormat.java 2008-12-09 16:44:46 UTC (rev 4287) @@ -120,7 +120,7 @@ protected SerafinFileFormat() { super(1); - extensions_ = new String[] { "ser", "res", "geo", "sel", "res2d", "res3d" }; + extensions_ = new String[] { "ser", "res", "geo", "sel", "res2d", "res3d","resu" }; id_ = "SERAFIN"; nom_ = "Serafin"; description_ = H2dResource Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZEbliCalquesPanelPersistManager.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZEbliCalquesPanelPersistManager.java 2008-12-08 22:59:46 UTC (rev 4286) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZEbliCalquesPanelPersistManager.java 2008-12-09 16:44:46 UTC (rev 4287) @@ -3,6 +3,8 @@ import java.io.File; import java.util.Map; +import org.fudaa.ebli.geometrie.GrBoite; + /** * Interface des datas persistantes du calques. * Sont enregistrees dans un ficheir xml. @@ -32,5 +34,7 @@ * @return */ + + public GrBoite getZoom(); } Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZebliCalquePersist.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZebliCalquePersist.java 2008-12-08 22:59:46 UTC (rev 4286) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZebliCalquePersist.java 2008-12-09 16:44:46 UTC (rev 4287) @@ -8,6 +8,8 @@ import java.io.ObjectOutputStream; import java.util.Map; +import org.fudaa.ebli.geometrie.GrBoite; + import com.thoughtworks.xstream.XStream; import com.thoughtworks.xstream.io.xml.DomDriver; @@ -26,6 +28,8 @@ protected XStream parser_; + protected GrBoite zoom_; + /** * Fichier principal qui contient une instance de la classe ZEbliCalquesPanelPersistenceManager */ @@ -167,7 +171,7 @@ // -- etape 1: on lit les donn\xE9es sp\xE9cifiques pour avoir la data persistantes in = getParser().createObjectInputStream(new FileReader(new File(getMainFilePath()))); ZEbliCalquesPanelPersistManager dataPersistantes = (ZEbliCalquesPanelPersistManager) in.readObject(); - + zoom_=dataPersistantes.getZoom(); // -- etape 2 on creer l'obejt calque correspondant a partir des datas persitantes veritablePanel = dataPersistantes.generateCalquePanel(param,new File(getSpecifiqueDataFilePath())); @@ -189,4 +193,12 @@ return veritablePanel; } +public GrBoite getZoom_() { + return zoom_; } + +public void setZoom_(GrBoite zoom_) { + this.zoom_ = zoom_; +} + +} Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/ressource/Thumbs.db =================================================================== (Binary files differ) Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetController.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetController.java 2008-12-08 22:59:46 UTC (rev 4286) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetController.java 2008-12-09 16:44:46 UTC (rev 4287) @@ -213,9 +213,15 @@ private boolean isProportional = false; public void constructMenuResizeProportional(final JPopupMenu _popup, final CtuluCommandContainer cmd_) { - +if(!isProportional()){ final EbliWidgetActionSimple actionBloque = new EbliWidgetActionRatio.Proportional(widget_); boutonProportion = actionBloque.buildMenuItem(EbliComponentFactory.INSTANCE); +} +else{ + final EbliWidgetActionSimple actionBloque = new EbliWidgetActionRatio.Classical(widget_); + boutonProportion = actionBloque.buildMenuItem(EbliComponentFactory.INSTANCE); + +} _popup.add(boutonProportion); } Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetControllerCalque.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetControllerCalque.java 2008-12-08 22:59:46 UTC (rev 4286) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetControllerCalque.java 2008-12-09 16:44:46 UTC (rev 4287) @@ -48,6 +48,7 @@ import org.fudaa.ebli.visuallibrary.EbliWidgetWithBordure; import org.fudaa.ebli.visuallibrary.actions.CommandMasquer; import org.fudaa.ebli.visuallibrary.actions.EbliActionEditorOneClick; +import org.fudaa.ebli.visuallibrary.actions.EbliWidgetActionRatio; import com.memoire.bu.BuBorderLayout; import com.memoire.bu.BuMenuBar; @@ -91,6 +92,7 @@ widgetParent_ = _parent; addActionSpecifiques(); setProportional(true); + } Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetCreatorVueCalque.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetCreatorVueCalque.java 2008-12-08 22:59:46 UTC (rev 4286) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetCreatorVueCalque.java 2008-12-09 16:44:46 UTC (rev 4287) @@ -35,7 +35,9 @@ } public EbliWidgetCreatorVueCalque() { - + + + } public EbliWidgetCreatorVueCalque(ZEbliCalquesPanel calque, GrBoite _initZoom) { @@ -74,7 +76,7 @@ duplicOptions.put("scene", getWidget().getEbliScene()); EbliWidgetCreatorVueCalque creator = new EbliWidgetCreatorVueCalque(getCalque().duplicate(duplicOptions), - getCalque().getVueCalque().getViewBoite()); + /*((EbliWidgetVueCalque)getWidget().getIntern()).getZoom_()*/getCalque().getVueCalque().getViewBoite()); duplique.setCreator(creator); // -- ajout de la reference de la legende dans le widget calque --// @@ -155,7 +157,11 @@ else { String pathCalque = (String)parameters.get("pathLayout")+File.separator+(String) data; - calque_ = (new ZebliCalquePersist(pathCalque)).loadPersitCalqueXml(parameters); + ZebliCalquePersist persistance=new ZebliCalquePersist(pathCalque); + + calque_ = persistance.loadPersitCalqueXml(parameters); + if(calque_.getVueCalque()!=null && calque_.getVueCalque().getViewBoite()!=null) + initZoom_ = persistance.getZoom_(); } } Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetVueCalque.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetVueCalque.java 2008-12-08 22:59:46 UTC (rev 4286) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetVueCalque.java 2008-12-09 16:44:46 UTC (rev 4287) @@ -163,6 +163,12 @@ calquePanel_.getVueCalque().changeRepere(this, initZoom_); initZoom_ = null; } else calquePanel_.restaurer(); + + //-- ACHTUNG!!! si on enleve la creation de l'image ici, elle se fera dans l'autre if et ecrasera le zoom init!! --// + final Map params = new HashMap(); + CtuluLibImage.setCompatibleImageAsked(params); + image = calquePanel_.produceImage(rec.width, rec.height, params); + } // mode edition @@ -298,4 +304,12 @@ this.image = image; } +public GrBoite getZoom_() { + return zoom_; } + +public void setZoom_(GrBoite zoom_) { + this.zoom_ = zoom_; +} + +} Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetControllerGraphe.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetControllerGraphe.java 2008-12-08 22:59:46 UTC (rev 4286) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetControllerGraphe.java 2008-12-09 16:44:46 UTC (rev 4287) @@ -36,6 +36,7 @@ import org.fudaa.ebli.visuallibrary.actions.CommandMasquer; import org.fudaa.ebli.visuallibrary.actions.EbliActionEditorOneClick; import org.fudaa.ebli.visuallibrary.actions.EbliWidgetActionConfigure; +import org.fudaa.ebli.visuallibrary.actions.EbliWidgetActionRatio; import com.memoire.bu.BuMenuBar; import com.memoire.bu.BuPanel; @@ -70,13 +71,17 @@ public EbliWidgetControllerGraphe(final EbliWidgetGraphe widget_, final EbliNodeDefault nodeLegende) { super(widget_); - setProportional(true); + widgetGraphe_ = widget_; labelTrace_ = (JLabel) CtuluLibSwing.findChildByName(getGraphePanel(), "lbTools"); // getGraphePanel().remove(labelTrace_); addActionSpecifiques(); + + + setProportional(true); + } @Override Modified: branches/Prepro-0.92-SNAPSHOT/ebli/test/org/fudaa/ebli/all/TestVisualLibrary.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/test/org/fudaa/ebli/all/TestVisualLibrary.java 2008-12-08 22:59:46 UTC (rev 4286) +++ branches/Prepro-0.92-SNAPSHOT/ebli/test/org/fudaa/ebli/all/TestVisualLibrary.java 2008-12-09 16:44:46 UTC (rev 4287) @@ -56,7 +56,8 @@ import org.fudaa.ebli.visuallibrary.actions.EbliWidgetActionConfigure; import org.fudaa.ebli.visuallibrary.actions.EbliWidgetActionDuplicate; import org.fudaa.ebli.visuallibrary.actions.EbliWidgetActionFont; -import org.fudaa.ebli.visuallibrary.actions.EbliWidgetActionForeground; +import org.fudaa.ebli.visuallibrary.actions.EbliWidgetActionForeGround; + import org.fudaa.ebli.visuallibrary.actions.EbliWidgetActionImageChooser; import org.fudaa.ebli.visuallibrary.actions.EbliWidgetActionRetaillageHorizontal; import org.fudaa.ebli.visuallibrary.actions.EbliWidgetActionRetaillageVertical; @@ -449,7 +450,7 @@ bar.add(new EbliWidgetActionDuplicate(scene)); - bar.add(new EbliWidgetActionForeground(scene)); + bar.add(new EbliWidgetActionForeGround(scene)); bar.add(new EbliWidgetActionBackGround(scene)); Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/common/TrApplicationManager.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/common/TrApplicationManager.java 2008-12-08 22:59:46 UTC (rev 4286) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/common/TrApplicationManager.java 2008-12-09 16:44:46 UTC (rev 4287) @@ -34,6 +34,7 @@ import org.fudaa.fudaa.ressource.FudaaResource; import org.fudaa.fudaa.tr.TrEditorImplementation; import org.fudaa.fudaa.tr.post.TrPostAnalyze; +import org.fudaa.fudaa.tr.post.persist.TrPostFileFilter; import org.fudaa.fudaa.tr.post.persist.TrPostFileFormat; import org.fudaa.fudaa.tr.rubar.TrRubarImplHelper; import org.fudaa.fudaa.tr.telemac.TrMatisseConvertGUI; @@ -545,7 +546,18 @@ _lb.setIcon(TrResource.getPostLayoutIcon()); } return res; - } + }else + if(TrPostFileFilter.acceptDirectoryPOST(_f)) + { + final String res = TrResource.getPostName(); + if (_lb == null) { + launcher_.openLayoutPost(TrPostFileFilter.getSetupFormDirectoryPOST(_f)); + } else { + _lb.setIcon(TrResource.getPostLayoutIcon()); + } + return res; + + } return null; } @@ -568,14 +580,17 @@ protected String ouvrir(final VfsFile _f, final AbstractButton _lb) { String res = ouvrirEditor(_f, _lb); if (res != null) { return res; } + + // -- tentative ouverture fichier type layout --// + res = ouvrirPostLayout(_f, _lb); + if (res != null) { return res; } + res = ouvrirMesh(_f, _lb); if (res != null) { return res; } res = ouvrirPost(_f, _lb); if (res != null) { return res; } - // -- tentative ouverture fichier type layout --// - res = ouvrirPostLayout(_f, _lb); - if (res != null) { return res; } + final String name = _f.getName(); if (getTxtFileFilter().accept(null, name)) { Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/common/TrExplorer.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/common/TrExplorer.java 2008-12-08 22:59:46 UTC (rev 4286) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/common/TrExplorer.java 2008-12-09 16:44:46 UTC (rev 4287) @@ -8,9 +8,13 @@ */ package org.fudaa.fudaa.tr.common; +import java.awt.Cursor; +import java.awt.EventQueue; import java.awt.event.ActionEvent; import java.io.File; +import javax.swing.SwingUtilities; + import org.fudaa.ctulu.CtuluLib; import org.fudaa.ctulu.fileformat.FileFormat; import org.fudaa.fudaa.commun.FudaaLib; @@ -18,14 +22,19 @@ import org.fudaa.fudaa.commun.exec.FudaaExec; import org.fudaa.fudaa.commun.impl.FudaaCommonImplementation; import org.fudaa.fudaa.commun.impl.FudaaExplorer; +import org.fudaa.fudaa.tr.post.persist.TrPostFileFilter; import com.memoire.bu.BuActionEnabler; import com.memoire.bu.BuFileFilter; import com.memoire.bu.BuIcon; import com.memoire.bu.BuMenuItem; import com.memoire.bu.BuResource; + +import com.memoire.bu.BuExplorer.Root; import com.memoire.fu.FuLib; +import com.memoire.fu.FuSort; import com.memoire.vfs.VfsFile; +import com.memoire.vfs.VfsFileFile; /** * @author Fred Deniger @@ -249,4 +258,174 @@ TrPreferences.TR.putStringProperty("superviseur.last.dir", getCurrentDirectory().getAbsolutePath()); } } + + + /** + * Surcharge du filtrage des fichiers et repertoires de l'explorer. + * Dans le cas du tr, cela affiche els repertoire .POST propre au post traitement dasn la vue des fichiers. + * @author Adrien Hadoux + */ + protected void updateLists0(final VfsFile _dir, BuFileFilter _filter, final Cursor _cursor, final VfsFile _sel, + final boolean _showing) { + if (EventQueue.isDispatchThread()) throw new RuntimeException("In swing thread. " + "Use updateLists() instead"); + + // long before=System.currentTimeMillis(); + // FuLog.debug("BEX: showing="+_showing); + + if (!updating_) throw new RuntimeException("updating_ should be true"); + + last_ = _dir; + setProgression(10); + + // Cursor old_cursor=null; + Runnable runnable = null; + + runnable = new Runnable() { + public void run() { + if (!WAIT_CURSOR.equals(_cursor)) setCursor(WAIT_CURSOR); + + current_.setText(FuLib.reducedPath(_dir.getAbsolutePath())); + current_.setToolTipText(_dir.getAbsolutePath()); + current_.revalidate(); + updateMenuCurrent(); + } + }; + + if (_showing) SwingUtilities.invokeLater(runnable); + else + runnable.run(); + + // FuLog.debug("read "+(System.currentTimeMillis()-before)); + timestamp_ = _dir.lastModified();// System.currentTimeMillis(); + + String[] els = _dir.list(); + liststamp_ = liststamp(els); + // FuLog.debug("update liststamp="+liststamp_+" for "+_dir); + if (els == null) els = STRING0; + // FuLog.debug("%%% DIR="+_dir+" ["+els.length+"]"); + + setProgression(20); + + int l = els.length; + + final VfsFile[] dirs = new VfsFile[l + 1]; + final VfsFile[] files = new VfsFile[l]; + int nb_dirs = 0; + int nb_files = 0; + + VfsFile pf = _dir.getParentVfsFile(); + // FuLog.debug("%%% PF="+pf); + if (pf instanceof VfsFileFile) { + String p = pf.getAbsolutePath(); + pf = new Root(p, p, ".."); + } + + if (pf != null) { + pf.setViewName(".."); + dirs[0] = pf; + nb_dirs++; + } + + setProgression(30); + + // cleanFilters(); + // addFilter(filter); + // filters_.setSelectedItem(filter); + + for (int i = 0; i < l; i++) { + if (els[i].startsWith(".")) continue; + if (els[i].endsWith("~")) continue; + if ("CVS".equals(els[i])) continue; + + VfsFile f = _dir.createChild(els[i]); + + + + if (f == null) {} + + //--cas particulier: si le fichier est un repertoire .POST + //-- on place les repertoire .POST avec les fichiers --// + else + if(TrPostFileFilter.acceptDirectoryPOST(f)){ + + files[nb_files] = f; + nb_files++; + } + + + else if (f.isDirectory()) { + dirs[nb_dirs] = f; + nb_dirs++; + } else if (f.isFile()) { + // if(viewer_!=null) + // { + // String n=f.getName(); + // int p=n.lastIndexOf('.'); + // if(p>0) + // { + // String e=n.substring(p+1).toLowerCase(); + // addFilter(new BuFileFilter(e,_("Fichiers")+ + // " "+e.toUpperCase()),true); + // } + // } + + if ((_filter == null) || _filter.accept(f)) { + files[nb_files] = f; + nb_files++; + } + } else { + // FuLog.debug("BEX: ignore entry "+f); + } + } + + // FuLog.debug("sort "+(System.currentTimeMillis()-before)); + els = null; + setProgression(40); + FuSort.sort(dirs, 0, nb_dirs); + setProgression(50); + FuSort.sort(files, 0, nb_files, getSorter()); + + final int fnb_dirs = nb_dirs; + final int fnb_files = nb_files; + + + + + + if (_sel != null) _sel.build(); + + runnable = new Runnable() { + public void run() { + // FuLog.debug("model"); + // dirs_.setEnabled(true); + dirs_.setEmptyText("No directory"); + dirs_.setModel(new Model(dirs, fnb_dirs)); + dirs_.revalidate(); + setProgression(60); + + // files_.setEnabled(true); + files_.setEmptyText("No file"); + files_.setModel(new Model(files, fnb_files)); + files_.revalidate(); + setProgression(70); + + setProgression(80); + // FuLog.debug("end"); + repaint(); + + if ((_sel != null) && !_sel.isDirectory()) files_.setSelectedValue(_sel, true); + if (!WAIT_CURSOR.equals(_cursor)) setCursor(_cursor); + + setProgression(100); + updating_ = false; + } + }; + + if (_showing) SwingUtilities.invokeLater(runnable); + else + runnable.run(); + // FuLog.debug("end "+(System.currentTimeMillis()-before)); + } + + } \ No newline at end of file Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/common/TrFileRenderer.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/common/TrFileRenderer.java 2008-12-08 22:59:46 UTC (rev 4286) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/common/TrFileRenderer.java 2008-12-09 16:44:46 UTC (rev 4287) @@ -19,6 +19,7 @@ import org.fudaa.dodico.telemac.io.SerafinFileFormat; import org.fudaa.fudaa.commun.FudaaUI; import org.fudaa.fudaa.commun.exec.FudaaExec; +import org.fudaa.fudaa.tr.post.persist.TrPostFileFilter; import org.fudaa.fudaa.tr.rubar.TrRubarImplHelper; import com.memoire.bu.BuFileRenderer; @@ -111,7 +112,9 @@ if (mng_.isPostFormat(_file)) { return TrResource.getPostIcon(); } if (mng_.isPostLayoutFormat(_file)) { return TrResource.getPostLayoutIcon(); } if (mng_.getTxtFileFilter().accept(_file)) { return BuResource.BU.getToolIcon("texte"); } - } + }else + if(TrPostFileFilter.acceptDirectoryPOST(_file)) + { return TrResource.getPostLayoutIcon(); } return super.getIcon(_file); } } \ No newline at end of file Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostLayoutPanelController.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostLayoutPanelController.java 2008-12-08 22:59:46 UTC (rev 4286) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostLayoutPanelController.java 2008-12-09 16:44:46 UTC (rev 4287) @@ -40,7 +40,8 @@ import org.fudaa.ebli.visuallibrary.actions.EbliWidgetActionBackGround; import org.fudaa.ebli.visuallibrary.actions.EbliWidgetActionColorBackground; import org.fudaa.ebli.visuallibrary.actions.EbliWidgetActionConfigure; -import org.fudaa.ebli.visuallibrary.actions.EbliWidgetActionForeground; +import org.fudaa.ebli.visuallibrary.actions.EbliWidgetActionForeGround; + import org.fudaa.ebli.visuallibrary.actions.EbliWidgetActionImageChooser; import org.fudaa.ebli.visuallibrary.actions.EbliWidgetActionRetaillageHorizontal; import org.fudaa.ebli.visuallibrary.actions.EbliWidgetActionRetaillageVertical; @@ -516,7 +517,7 @@ init.add(new EbliWidgetActionAlign.Bottom(getSceneCourante())); init.add(null); - init.add(new EbliWidgetActionForeground(getSceneCourante())); + init.add(new EbliWidgetActionForeGround(getSceneCourante())); init.add(new EbliWidgetActionBackGround(getSceneCourante())); init.add(null); Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostVisuPanelPersistManager.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostVisuPanelPersistManager.java 2008-12-08 22:59:46 UTC (rev 4286) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostVisuPanelPersistManager.java 2008-12-09 16:44:46 UTC (rev 4287) @@ -14,6 +14,7 @@ import org.fudaa.ebli.calque.ZebliCalquePersist; import org.fudaa.ebli.calque.ZEbliCalquesPanelPersistManager; import org.fudaa.ebli.courbe.EGGroupPersist; +import org.fudaa.ebli.geometrie.GrBoite; import org.fudaa.ebli.visuallibrary.EbliScene; import org.fudaa.ebli.visuallibrary.calque.CalqueLegendeWidgetAdapter; import org.fudaa.fudaa.commun.save.FudaaFilleVisuPersistence; @@ -37,7 +38,7 @@ boolean simplified; String idSource; - + GrBoite zoom_; TrPostVisuPanelPersistManager() { } @@ -51,7 +52,7 @@ TrPostVisuPanel panel = (TrPostVisuPanel) p; simplified = panel.simplifiedInit; idSource = panel.getSource().getId(); - + zoom_=panel.getVueCalque().getViewBoite(); // //-- etape 2: on sauvegarde les donnees --// FudaaSaveZipWriter writer = null; try { @@ -117,9 +118,20 @@ if (loader != null) loader.safeClose(); } + + //-- restoration du zoom --// +// if(zoom_!=null) +// newPanel.getVueCalque().changeRepere(newPanel, zoom_); + return newPanel; } +@Override +public GrBoite getZoom() { + // TODO Auto-generated method stub + return zoom_; +} + // @Override // public ZEbliCalquesPanel loadPersitCalqueXml(Map _param, File _dir) { // Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/persist/TrPostFileFilter.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/persist/TrPostFileFilter.java 2008-12-08 22:59:46 UTC (rev 4286) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/persist/TrPostFileFilter.java 2008-12-09 16:44:46 UTC (rev 4287) @@ -44,5 +44,56 @@ return false; } + + /** + * Indique si le repertoire concern\xE9 est bien un r\xE9pertoire de type POST + * @param _f + * @return + * @author Adrien Hadoux + */ + public static boolean acceptDirectoryPOST(final File _f){ + if(!_f.isDirectory() || !_f.getName().contains("."+DEFAULT_EXTENSION)) + return false; + + //-- test du contenu si il est bien form\xE9: --// + File[] children=_f.listFiles(); + + boolean setupFound=false; + for(int i=0;!setupFound && i<children.length;i++){ + if (children[i] == null) { setupFound= false; } + else{ + final String name = children[i].getName(); + if (name == null) { setupFound= false; } + else + if (name.equals(TrPostPersistenceManager.setupProject)) setupFound= true; + } + } + + + return setupFound; + } + + /** + * Recupere le fichier setup depuis le un r\xE9pertoire de type POST + * @param _f + * @return + * @author Adrien Hadoux + */ + public static File getSetupFormDirectoryPOST(final File _f){ + File[] children=_f.listFiles(); + + + for(int i=0; i<children.length;i++){ + if (children[i] == null) {} + else{ + final String name = children[i].getName(); + if (name == null) { } + else + if (name.equals(TrPostPersistenceManager.setupProject)) return children[i]; + } + } + return null; + } + } Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/persist/TrPostPersistenceManager.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/persist/TrPostPersistenceManager.java 2008-12-08 22:59:46 UTC (rev 4286) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/persist/TrPostPersistenceManager.java 2008-12-09 16:44:46 UTC (rev 4287) @@ -205,16 +205,24 @@ if (!executeByExplorer) { // -- creation d un chooser --// final CtuluFileChooser fileChooser = new CtuluFileChooser(true); - fileChooser.setDialogTitle(EbliResource.EBLI.getString("S\xE9lectionnez l'emplacement de votre fichier setup")); + fileChooser.setDialogTitle(EbliResource.EBLI.getString("S\xE9lectionnez l'emplacement de votre r\xE9pertoire POST")); fileChooser.setAcceptAllFileFilterUsed(false); - fileChooser.setFileSelectionMode(JFileChooser.FILES_ONLY); + fileChooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY); // -- init avec les param noms projet et autre --// if (projet_ != null) { fileChooser.setSelectedFile(projet_); } final int reponse = fileChooser.showOpenDialog(CtuluLibSwing.getFrameAncestor(ui_.getParentComponent())); if (reponse == JFileChooser.APPROVE_OPTION) { + + //-- Recuperation du fichier du chooser --// fichierSetup = fileChooser.getSelectedFile(); + if(TrPostFileFilter.acceptDirectoryPOST(fichierSetup)) { + fichierSetup=TrPostFileFilter.getSetupFormDirectoryPOST(fichierSetup); + }else{ + ui_.error(EbliResource.EBLI.getString("Impossible de charger ce r\xE9pertoire, Soit il n'est pas de type ."+TrPostFileFilter.DEFAULT_EXTENSION+"\n soit il ne contient pas de fichier setup.")); + return false; + } } else return false; } else { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <de...@us...> - 2008-12-08 22:59:57
|
Revision: 4286 http://fudaa.svn.sourceforge.net/fudaa/?rev=4286&view=rev Author: deniger Date: 2008-12-08 22:59:46 +0000 (Mon, 08 Dec 2008) Log Message: ----------- Modified Paths: -------------- branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/telemac/TelemacDicoManager.java Modified: branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/telemac/TelemacDicoManager.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/telemac/TelemacDicoManager.java 2008-12-08 22:54:11 UTC (rev 4285) +++ branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/telemac/TelemacDicoManager.java 2008-12-08 22:59:46 UTC (rev 4286) @@ -31,10 +31,11 @@ public final static TelemacDicoManager INSTANCE = new TelemacDicoManager(); static { - final String[] versions = new String[] { "v5p4", "v5p5", "v5p6", "v5p7" }; + final String[] versions = new String[] { "v5p4", "v5p5", "v5p6", "v5p7", "v5p8" }; final Map map = new HashMap(11); map.put(new TelemacDicoFileFormat(H2dTelemacDicoParams.getArtemisId()), versions); - map.put(new TelemacDicoFileFormat(H2dTelemacDicoParams.getEstel2dId()), new String[] { "v5p4", "v5p5", "v5p7" }); + map.put(new TelemacDicoFileFormat(H2dTelemacDicoParams.getEstel2dId()), new String[] { "v5p4", "v5p5", "v5p7", + "v5p8" }); map.put(new TelemacDicoFileFormat(H2dTelemacDicoParams.getPostel3dId()), versions); map.put(new TelemacDicoFileFormat(H2dTelemacDicoParams.getSisypheId()), versions); map.put(new TelemacDicoFileFormat(H2dTelemacDicoParams.getStbtelId()), versions); @@ -59,9 +60,7 @@ } protected DicoCasFileFormat createFormat(final String _s) { - if (_s.equals(Telemac2dFileFormat.getInstance().getID())) { - return Telemac2dFileFormat.getInstance(); - } + if (_s.equals(Telemac2dFileFormat.getInstance().getID())) { return Telemac2dFileFormat.getInstance(); } return new TelemacDicoFileFormat(_s); } @@ -117,19 +116,14 @@ public TelemacDicoFileFormatVersion createTelemacVersionImpl(final DicoCasFileFormat _ft, final String _v, final int _language) { - if (Telemac2dFileFormat.getInstance() == _ft) { - return createTelemac2dVersionImpl((Telemac2dFileFormat) _ft, _v, _language); - } + if (Telemac2dFileFormat.getInstance() == _ft) { return createTelemac2dVersionImpl((Telemac2dFileFormat) _ft, _v, + _language); } final DicoModelAbstract model = createDico(_ft.getName(), _v, _language); - if (model == null) { - return null; - } - if (_ft.getName().equals(H2dTelemacDicoParams.getSubief2dId())) { - return new TelemacSubief2dFileFormatVersion(_ft, model); - } - if (_ft.getName().equals(H2dTelemacDicoParams.getStbtelId())) { - return new TelemacStbtelFileFormatVersion(_ft, model); - } + if (model == null) { return null; } + if (_ft.getName().equals(H2dTelemacDicoParams.getSubief2dId())) { return new TelemacSubief2dFileFormatVersion(_ft, + model); } + if (_ft.getName().equals(H2dTelemacDicoParams.getStbtelId())) { return new TelemacStbtelFileFormatVersion(_ft, + model); } return new TelemacDicoFileFormatVersion(_ft, model); } } \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <de...@us...> - 2008-12-08 22:54:21
|
Revision: 4285 http://fudaa.svn.sourceforge.net/fudaa/?rev=4285&view=rev Author: deniger Date: 2008-12-08 22:54:11 +0000 (Mon, 08 Dec 2008) Log Message: ----------- Added Paths: ----------- branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/telemac/dico/DicoEstel2dv5p8.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/telemac/dico/DicoPostel3dv5p8.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/telemac/dico/DicoSisyphev5p8.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/telemac/dico/DicoSpartacus2dv5p8.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/telemac/dico/DicoStbtelv5p8.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/telemac/dico/DicoSubief2dv5p8.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/telemac/dico/DicoSubief3dv5p8.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/telemac/dico/DicoTelemac2dv5p8.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/telemac/dico/DicoTelemac3dv5p8.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/telemac/dico/DicoTomawacv5p8.java Added: branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/telemac/dico/DicoEstel2dv5p8.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/telemac/dico/DicoEstel2dv5p8.java (rev 0) +++ branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/telemac/dico/DicoEstel2dv5p8.java 2008-12-08 22:54:11 UTC (rev 4285) @@ -0,0 +1,2065 @@ +/* + *File generated by fudaa + */ + +package + org.fudaa.dodico.telemac.dico; + +import org.fudaa.dodico.dico.*; +/** + * @author deniger + */ + +public class + DicoEstel2dv5p8 + extends DicoModelAbstract +{ + public + DicoEstel2dv5p8 + () + { + super(); + } + public + DicoEstel2dv5p8 +(int _l) + { + super(_l); + } + public + DicoEstel2dv5p8 +(String _l) + { + super(_l); + } + public final String getCodeName() + { + return "estel2d"; + } + public final String getVersion() + { + return "v5p8"; + } + protected String[] createNoms() + { + String[] noms; + if(languageIndex_==0) + { + noms=new String[]{"ADAPTATION DU PAS DE TEMPS HYDRAULIQUE","ADAPTATION DU PAS DE TEMPS PARTICULAIRE","ADAPTATION DU PAS DE TEMPS TRANSPORT","ALGORITHME POUR L'INFILTRATION","BIBLIOTHEQUES","BILAN DE MASSE POUR L'HYDRAULIQUE","BILAN DE MASSE POUR LE TRANSPORT","BINAIRE DU FICHIER DE GEOMETRIE","BINAIRE DU FICHIER DES RESULTATS 2D","BINAIRE DU FICHIER DU CALCUL PRECEDENT", + "CALCUL DE LA VITESSE DE DARCY","CALCUL DU TRANSPORT","CALCUL PARALLELE AVEC DECOMPOSITION DOMAINE","CALCUL PARTICULAIRE","CAS SATURE","COEFFICIENT DE DIVISION POUR LE PAS DE TEMPS","COEFFICIENT DE MASS-LUMPING POUR L'EQUATION DE TRANSPORT","COEFFICIENT DE MASS-LUMPING POUR L'HYDRAULIQUE","COEFFICIENT DE MASS-LUMPING POUR LA VITESSE DE DARCY","CONCENTRATIONS DANS LE FICHIER DU CALCUL PRECEDENT", + "CONDITIONS INITIALES CONSTANTES POUR L'HYDRAULIQUE","CONDITIONS INITIALES CONSTANTES POUR LE TRANSPORT","COOEFFICIENT MULTIPLICATIF POUR LE PAS DE TEMPS","CRITERE DE CONVERGENCE DU SCHEMA ITERATIF POUR L'HYDRAULIQUE","CRITERE DE CONVERGENCE POUR L'INFILTRATION","DESCRIPTION DES LIBRAIRIES","DICTIONNAIRE","DIMENSION DE L'ESPACE DE KRYLOV POUR L'EQUATION DE TRANSPORT","DIMENSION DE L'ESPACE DE KRYLOV POUR L'HYDRAULIQUE","DIMENSION DE L'ESPACE DE KRYLOV POUR LA VITESSE DE DARCY", + "DIRECTION 2D DE LA GRAVITE","DIRICHLET EN FORMULATION FAIBLE POUR L'HYDRAULIQUE","DIRICHLET EN FORMULATION FAIBLE POUR LE TRANSPORT AVEC CVFE","ENTIERS PRIVES","EXECUTABLE PAR DEFAUT","EXECUTABLE PARALLELE PAR DEFAUT","FICHIER BASE DE DONNEES DES SOLS","FICHIER DE DEFINITION DES TRACEURS","FICHIER DE DONNEES BINAIRE 1","FICHIER DE DONNEES BINAIRE 2", + "FICHIER DE DONNEES FORMATE 1","FICHIER DE DONNEES FORMATE 2","FICHIER DE GEOMETRIE","FICHIER DE REFERENCE","FICHIER DE RESULTATS PARTICULAIRE","FICHIER DE RESULTATS POUR LES FLUX","FICHIER DE RESULTATS SCALAIRES","FICHIER DE RESULTATS SERAFIN","FICHIER DE RESULTATS VOLFIN","FICHIER DES CONDITIONS AUX LIMITES", + "FICHIER DES PARAMETRES","FICHIER DES SOURCES PONCTUELLES","FICHIER DU CALCUL PRECEDENT","FICHIER FORTRAN","HYDRAULIQUE TRANSITOIRE","IGNORE LES ERREURS POUR LE PARTICULAIRE","IMPLICITATION POUR LA CHARGE HYDRAULIQUE","IMPLICITATION POUR LES CONCENTRATIONS","INFORMATION SUR LES BILANS DE MASSE A CHAQUE SORTIE LISTING","INFORMATIONS SUR LES SOLVEURS", + "LIMITE POUR L'ADAPTATION DU PAS DE TEMPS HYDRAULIQUE","LISTE DES FICHIERS","LONGUEUR DU VECTEUR","MOT DE PASSE CRAY","NOM DES UNITES D'ESPACE ET DE TEMPS","NOMBRE DE COURANT MAXIMUM","NOMBRE DE PAS DE TEMPS ENTRE CHAQUE SORTIE GRAPHIQUE","NOMBRE DE PAS DE TEMPS ENTRE CHAQUE SORTIE LISTING","NOMBRE DE POLYGONES","NOMBRE DE SECTIONS POUR LES FLUX", + "NOMBRE DE TABLEAUX 2D PRIVES","NOMBRE DE TRACEURS","NOMBRE DE ZONES SOURCE","NOMBRE MAXIMAL D'ITERATIONS POUR L'INFILTRATION","NOMBRE MAXIMAL D'ITERATIONS POUR LE SUITEMENT","NOMBRE MAXIMAL DE PARTICULES","NOMBRE MAXIMUM D'ITERATIONS DU SCHEMA ITERATIF","NOMBRE MAXIMUM D'ITERATIONS DU SOLVEUR POUR L'HYDRAULIQUE","NOMBRE MAXIMUM D'ITERATIONS DU SOLVEUR POUR LA VITESSE DE DARCY","NOMBRE MAXIMUM D'ITERATIONS DU SOLVEUR POUR LE TRANSPORT", + "NOMBRE MAXIMUM D'ITERATIONS POUR TROUVER UN DEPLACEMENT","NOMBRE MAXIMUM DE MODIFICATIONS POUR TROUVER UN DEPLACEMENT","NOMBRE MAXIMUM DE PAS DE TEMPS","NOMBRE MAXIMUM DE SOLS","NUMERO DE COMPTE","NUMERO DE VERSION","NUMERO DU PAS DE TEMPS DE REPRISE DE CALCUL","NUMERO DU PREMIER PAS DE TEMPS POUR LES SORTIES GRAPHIQUES","NUMERO DU PREMIER PAS DE TEMPS POUR LES SORTIES LISTING","NUMERO DU SOL UNIFORME", + "OPTION DE CALCUL DU TERME DE DERIVE POUR LE PARTICULAIRE","OPTION DE DECENTREMENT POUR LE TRANSPORT AVEC CVFE","OPTION DE DECENTREMENT POUR LE TRANSPORT AVEC SUPG","OPTION VITESSES EN P0","PAS DE TEMPS","PAS DE TEMPS INITIAL","PAS DE TEMPS MAXIMUM","PAS DE TEMPS MINIMUM","PERIODE POUR LES SORTIES GRAPHIQUES ET LISTING","PERMANENT POUR CONDITIONS INITIALES HYDRAULIQUES", + "PLACE MEMOIRE CRAY","PRECISION DU SCHEMA ITERATIF POUR LA TENEUR EN EAU","PRECISION DU SCHEMA ITERATIF POUR LE POTENTIEL HYDRAULIQUE","PRECISION DU SOLVEUR DE L'EQUATION DE TRANSPORT","PRECISION DU SOLVEUR DE L'HYDRAULIQUE","PRECISION DU SOLVEUR POUR LA VITESSE DE DARCY","PRECISION DU SUINTEMENT POUR LA TENEUR EN EAU","PRECISION DU SUINTEMENT POUR LE POTENTIEL HYDRAULIQUE","PRECONDITIONNEMENT POUR L'EQUATION DE TRANSPORT","PRECONDITIONNEMENT POUR L'HYDRAULIQUE", + "PRECONDITIONNEMENT POUR LA VITESSE DE DARCY","PRIORITE","PRISE EN COMPTE DE LA GRAVITE","PRISE EN COMPTE DE LA PRECIPITATION","PROCESSEURS PARALLELES","REELS PRIVES","REPRISE DU DERNIER PAS DE TEMPS","SCHEMA ITERATIF POUR LA RESOLUTION DE L'HYDRAULIQUE","SCHEMA NUMERIQUE POUR L'EQUATION DE TRANSPORT","SOLVEUR POUR L'EQUATION DE TRANSPORT", + "SOLVEUR POUR L'HYDRAULIQUE","SOLVEUR POUR LA VITESSE DE DARCY","SORTIE SYSTEMATIQUE DES PARAMETRES SCALAIRES","SUITE DE CALCUL","TEMPS FINAL","TEMPS INITIAL","TEMPS INITIAL POUR LES SORTIES GRAPHIQUES ET LISTING","TEMPS MACHINE CRAY","TITRE","TRAITEMENT DES SORTIES LIBRES POUR LE TRANSPORT AVEC CVFE", + "TRAITEMENT DU PARTICULAIRE","TYPE DE DISTRIBUTION POUR LES NOMBRES ALEATOIRES","TYPE DE REFLECTION POUR LE PARTICULAIRE","TYPE DE STOCKAGE DES MATRICES","USER CRAY","UTILISATION DU MOT CLE TEMPS INITIAL","VALIDATION","VARIABLES POUR LES SORTIES GRAPHIQUES 2D","VERIFICATION DES CONDITIONS AUX LIMITES POUR L'HYDRAULIQUE","VITESSE IMPOSEE SELON X", + "VITESSE IMPOSEE UNIFORME POUR LE TRANSPORT 1D DANS UNE COLONNE","VITESSES DANS LE FICHIER DU CALCUL PRECEDENT"}; + } + else if(languageIndex_==1) + { + noms=new String[]{"2D DIRECTION OF GRAVITY","2D RESULTS FILE BINARY","ACCOUNT NUMBER","ACCURACY OF THE ITERATIVE SCHEME FOR THE MOISTURE CONTENT","ACCURACY OF THE ITERATIVE SCHEME FOR THE PRESSURE HEAD","ACCURACY OF THE SEEPAGE FACE FOR THE MOISTURE CONTENT","ACCURACY OF THE SEEPAGE FACE FOR THE PRESSURE HEAD","ACCURACY OF THE SOLVER FOR THE DARCIAN VELOCITY","ACCURACY OF THE SOLVER FOR THE HYDROLOGY","ACCURACY OF THE SOLVER FOR THE TRANSPORT EQUATION", + "ADAPTATION OF THE TIME STEP FOR THE HYDROLOGY","ADAPTATION OF THE TIME STEP FOR THE PARTICLE TRACKING","ADAPTATION OF THE TIME STEP FOR THE TRANSPORT","BINARY DATA FILE 1","BINARY DATA FILE 2","BOUNDARY CONDITIONS CHECK FOR THE HYDROLOGY","BOUNDARY CONDITIONS FILE","CALCULATION OPTION FOR THE DRIFT TERM FOR PARTICLE TRACKING","COMPUTATION CONTINUED","COMPUTATION OF THE DARCIAN VELOCITY", + "CONCENTRATIONS IN THE PREVIOUS COMPUTATION FILE","CONSTANT INITIAL CONDITIONS FOR THE HYDROLOGY","CONSTANT INITIAL CONDITIONS FOR THE TRANSPORT","CONVERGENCE CRITERION FOR THE INFILTRATION","CONVERGENCE CRITERION FOR THE ITERATIVE SCHEME FOR THE HYDROLOGY","CPU TIME ON CRAY","DEFAULT EXECUTABLE","DEFAULT PARALLEL EXECUTABLE","DESCRIPTION OF LIBRARIES","DICTIONARY", + "DIMENSION OF THE KRYLOV SPACE FOR THE DARCIAN VELOCITY","DIMENSION OF THE KRYLOV SPACE FOR THE HYDROLOGY","DIMENSION OF THE KRYLOV SPACE FOR THE TRANSPORT EQUATION","DIVISION COEFFICIENT ON THE TIME STEP","FINAL TIME","FLUX RESULTS FILE","FORMATTED DATA FILE 1","FORMATTED DATA FILE 2","FORTRAN FILE","FULLY SATURATED CASE", + "GEOMETRY FILE","GEOMETRY FILE BINARY","GRAPHICAL AND LISTING PRINTOUT PERIOD","IGNORE ERRORS IN PARTICLE TRACKING","IMPLICITATION FOR THE CONCENTRATIONS","IMPLICITATION FOR THE PRESSURE HEAD","IMPOSED VELOCITY ALONG X","INDEX OF THE UNIFORM SOIL","INFILTRATION ALGORITHM","INFLUENCE OF GRAVITY", + "INFLUENCE OF PRECIPITATION","INFORMATION ABOUT THE SOLVERS","INITIAL TIME","INITIAL TIME FOR GRAPHICAL AND LISTING PRINTOUTS","INITIAL TIME STEP","ITERATIVE SCHEME FOR SOLVING THE HYDROLOGY","LAST TIME STEP CONTINUED","LIBRARIES","LIMIT FOR THE ADAPTATION OF THE TIME STEP FOR THE HYDROLOGY","LIST OF FILES", + "MASS-BALANCE FOR THE HYDROLOGY","MASS-BALANCE FOR THE TRANSPORT","MASS-BALANCE INFORMATION IN EACH LISTING PRINTOUT","MASS-LUMPING COEFFICIENT FOR THE DARCIAN VELOCITY","MASS-LUMPING COEFFICIENT FOR THE HYDROLOGY","MASS-LUMPING COEFFICIENT FOR THE TRANSPORT EQUATION","MAXIMUM COURANT NUMBER","MAXIMUM NUMBER OF ITERATION TO FIND A DISPLACEMENT","MAXIMUM NUMBER OF ITERATIONS FOR THE INFILTRATION","MAXIMUM NUMBER OF ITERATIONS FOR THE ITERATIVE SCHEME", + "MAXIMUM NUMBER OF ITERATIONS FOR THE SEEPAGE FACE","MAXIMUM NUMBER OF ITERATIONS FOR THE SOLVER FOR THE DARCIAN VELOCITY","MAXIMUM NUMBER OF ITERATIONS FOR THE SOLVER FOR THE HYDROLOGY","MAXIMUM NUMBER OF ITERATIONS FOR THE SOLVER FOR THE TRANSPORT","MAXIMUM NUMBER OF MODIFICATIONS TO FIND A DISPLACEMENT","MAXIMUM NUMBER OF PARTICLES","MAXIMUM NUMBER OF SOILS","MAXIMUM NUMBER OF TIME STEPS","MAXIMUM TIME STEP","MEMORY SPACE ON CRAY", + "MINIMUM TIME STEP","MULTIPLICATION COEFFICIENT ON THE TIME STEP","NUMBER OF 2D PRIVATE ARRAYS","NUMBER OF CROSS SECTIONS FOR THE FLUXES","NUMBER OF POLYGONES","NUMBER OF SOURCE ZONES","NUMBER OF THE FIRST TIME STEP FOR GRAPHICAL PRINTOUTS","NUMBER OF THE FIRST TIME STEP FOR LISTING PRINTOUTS","NUMBER OF THE PREVIOUS TIME STEP","NUMBER OF TIME STEPS BETWEEN EACH GRAPHICAL PRINTOUT", + "NUMBER OF TIME STEPS BETWEEN EACH LISTING PRINTOUT","NUMBER OF TRACERS","NUMERICAL SCHEME FOR THE TRANSPORT EQUATION","OPTION VELOCITIES IN P0","PARALLEL COMPUTATION WITH DOMAIN DECOMPOSITION","PARALLEL PROCESSORS","PARTICLE TRACKING","PARTICLE TRACKING POST-PROCESSING","PARTICLE TRACKING RESULTS FILE","PASSWORD ON CRAY", + "PRECONDITIONING FOR THE DARCIAN VELOCITY","PRECONDITIONING FOR THE HYDROLOGY","PRECONDITIONING FOR THE TRANSPORT EQUATION","PREVIOUS COMPUTATION FILE","PREVIOUS COMPUTATION FILE BINARY","PRIORITY","PRIVATE INTEGERS","PRIVATE REALS","REFERENCE FILE","RELEASE", + "SCALAR RESULTS FILE","SERAFIN RESULTS FILE","SOIL DATABASE FILE","SOLVER FOR THE DARCIAN VELOCITY","SOLVER FOR THE HYDROLOGY","SOLVER FOR THE TRANSPORT EQUATION","SOURCE POINTS FILE","SPACE AND TIME UNITS","STEADY STATE FOR INITIAL CONDITIONS FOR THE HYDROLOGY","STEERING FILE", + "SYSTEMATIC OUTPUT OF THE SCALAR PARAMETERS","TIME STEP","TITLE","TRACERS DEFINITION FILE","TRANSIENT HYDROLOGY","TRANSPORT CALCULATION","TREATMENT OF FREE EXITS FOR THE TRANSPORT WITH CVFE","TYPE OF DISTRIBUTION FOR THE RANDOM NUMBERS","TYPE OF REFLECTION FOR PARTICLE TRACKING","TYPE OF STORAGE FOR THE MATRICES", + "UNIFORM IMPOSED VELOCITY FOR 1D TRANSPORT IN A COLUMN","UPWINDING OPTION FOR THE TRANSPORT WITH CVFE","UPWINDING OPTION FOR THE TRANSPORT WITH SUPG","USE KEYWORD INITIAL TIME","USER ON CRAY","VALIDATION","VARIABLES FOR 2D GRAPHICAL PRINTOUTS","VECTOR LENGTH","VELOCITIES IN THE PREVIOUS COMPUTATION FILE","VOLFIN RESULTS FILE", + "WEAK DIRICHLET FORMULATION FOR THE HYDROLOGY","WEAK DIRICHLET FORMULATION FOR THE TRANSPORT WITH CVFE"}; + } + else noms=null; + return noms; + } + protected final DicoEntite[] createEntites() + { + DicoComportValues[] comportValues; + DicoEntite.Simple entiteSimple; + DicoEntite.Tableau entiteTableau; + DicoEntite.Vecteur entiteVecteur; + DicoDataType.Entier typeEntier; + DicoDataType.Binaire typeBinaire; + DicoDataType.Chaine typeChaine; + DicoDataType.Reel typeReel; + String[] choiceKeys; + String[][] choiceValues; + String[] valueByLanguage=new String[2]; + DicoEntite[] entites=new DicoEntite[142]; + + //start NOMBRE MAXIMUM DE PAS DE TEMPS + typeEntier=new DicoDataType.Entier(); + + valueByLanguage[0]="NOMBRE MAXIMUM DE PAS DE TEMPS"; + valueByLanguage[1]="MAXIMUM NUMBER OF TIME STEPS"; + entiteSimple=new DicoEntite.Simple(valueByLanguage[languageIndex_],typeEntier); + entiteSimple.setNiveau(0); + valueByLanguage[0]="100"; + valueByLanguage[1]="100"; + entiteSimple.setDefautValue(valueByLanguage[languageIndex_]); + entites[0]=entiteSimple.getImmutable(); + + + //start NOMBRE MAXIMUM DE SOLS + typeEntier=new DicoDataType.Entier(); + + valueByLanguage[0]="NOMBRE MAXIMUM DE SOLS"; + valueByLanguage[1]="MAXIMUM NUMBER OF SOILS"; + entiteSimple=new DicoEntite.Simple(valueByLanguage[languageIndex_],typeEntier); + entiteSimple.setNiveau(0); + valueByLanguage[0]="10"; + valueByLanguage[1]="10"; + entiteSimple.setDefautValue(valueByLanguage[languageIndex_]); + entites[1]=entiteSimple.getImmutable(); + + + //start PROCESSEURS PARALLELES + typeEntier=new DicoDataType.Entier(); + typeEntier.setControle(0,256); + + valueByLanguage[0]="PROCESSEURS PARALLELES"; + valueByLanguage[1]="PARALLEL PROCESSORS"; + entiteSimple=new DicoEntite.Simple(valueByLanguage[languageIndex_],typeEntier); + entiteSimple.setNiveau(2); + valueByLanguage[0]="NOMBRE DE PROCESSEURS EN CALCUL PARALLELE" + +"\n0 : 1 machine, compilation sans bibliotheque de parallelisme" + +"\n1 : 1 machine, compilation avec bibliotheque de parallelisme" + +"\n2 : 2 processeurs ou machines en parallele" + +"\netc..."; + valueByLanguage[1]="NUMBER OF PROCESSORS FOR PARALLEL PROCESSING" + +"\n0 : 1 machine, compiling without parallel library" + +"\n1 : 1 machine, compiling with a parallel library" + +"\n2 : 2 processors or machines in parallel" + +"\netc...."; + entiteSimple.setAide(valueByLanguage[languageIndex_]); + valueByLanguage[0]="PARAMETRES NUMERIQUES"; + valueByLanguage[1]="NUMERICAL PARAMETERS"; + entiteSimple.setRubrique(valueByLanguage[languageIndex_]); + valueByLanguage[0]="0"; + valueByLanguage[1]="0"; + entiteSimple.setDefautValue(valueByLanguage[languageIndex_]); + entites[2]=entiteSimple.getImmutable(); + + + //start SCHEMA ITERATIF POUR LA RESOLUTION DE L'HYDRAULIQUE + typeEntier=new DicoDataType.Entier(); + typeEntier.setControle(1,2); + choiceKeys=new String[]{"1","2"}; + choiceValues=new String[][] {{"SCHEMA MODIFIE DE PICARD (forme mixte)","SCHEMA CLASSIQUE DE PICARD (forme h)"} + ,{"MODIFIED PICARD SCHEME (mixed form)","CLASSIC PICARD SCHEME (h based)"} }; + typeEntier.setChoice(choiceKeys,choiceValues[languageIndex_]); + + valueByLanguage[0]="SCHEMA ITERATIF POUR LA RESOLUTION DE L'HYDRAULIQUE"; + valueByLanguage[1]="ITERATIVE SCHEME FOR SOLVING THE HYDROLOGY"; + entiteSimple=new DicoEntite.Simple(valueByLanguage[languageIndex_],typeEntier); + entiteSimple.setNiveau(0); + valueByLanguage[0]="1"; + valueByLanguage[1]="1"; + entiteSimple.setDefautValue(valueByLanguage[languageIndex_]); + entites[3]=entiteSimple.getImmutable(); + + + //start CRITERE DE CONVERGENCE DU SCHEMA ITERATIF POUR L'HYDRAULIQUE + typeEntier=new DicoDataType.Entier(); + typeEntier.setControle(0,2); + choiceKeys=new String[]{"0","1","2","3","4"}; + choiceValues=new String[][] {{"pas de critere de convergence","critere relatif de convergence","critere de convergence de Huang","Huang modifie","critere absolu de convergence"} + ,{"no convergence criterion","relative convergence criterion","Huang convergence criterion","Modified Huang","absolute convergence criterion"} }; + typeEntier.setChoice(choiceKeys,choiceValues[languageIndex_]); + + valueByLanguage[0]="CRITERE DE CONVERGENCE DU SCHEMA ITERATIF POUR L'HYDRAULIQUE"; + valueByLanguage[1]="CONVERGENCE CRITERION FOR THE ITERATIVE SCHEME FOR THE HYDROLOGY"; + entiteSimple=new DicoEntite.Simple(valueByLanguage[languageIndex_],typeEntier); + entiteSimple.setNiveau(0); + valueByLanguage[0]="3"; + valueByLanguage[1]="3"; + entiteSimple.setDefautValue(valueByLanguage[languageIndex_]); + entites[4]=entiteSimple.getImmutable(); + + + //start PRECONDITIONNEMENT POUR L'HYDRAULIQUE + typeEntier=new DicoDataType.Entier(); + choiceKeys=new String[]{"0","2","3","7","14","21"}; + choiceValues=new String[][] {{"AUCUN","DIAGONAL","DIAGONAL CONDENSEE","CROUT","DIAGONAL ET CROUT","DIAGONAL CONDENSE ET CROUT"} + ,{"no preconditioning","diagonal","diagonal condensed","crout","diagonal and crout","diagonal condensed and crout"} }; + typeEntier.setChoice(choiceKeys,choiceValues[languageIndex_]); + + valueByLanguage[0]="PRECONDITIONNEMENT POUR L'HYDRAULIQUE"; + valueByLanguage[1]="PRECONDITIONING FOR THE HYDROLOGY"; + entiteSimple=new DicoEntite.Simple(valueByLanguage[languageIndex_],typeEntier); + entiteSimple.setNiveau(0); + valueByLanguage[0]="14"; + valueByLanguage[1]="14"; + entiteSimple.setDefautValue(valueByLanguage[languageIndex_]); + entites[5]=entiteSimple.getImmutable(); + + + //start SOLVEUR POUR L'HYDRAULIQUE + typeEntier=new DicoDataType.Entier(); + typeEntier.setControle(1,7); + choiceKeys=new String[]{"1","2","3","4","5","6","7"}; + choiceValues=new String[][] {{"GRADIENT CONJUGE","RESIDU CONJUGE","GRADIENT CONJUGE SUR EQUATION NORMALE","ERREUR MINIMALE","GRADIENT CONJUGE CARRE","CGSTAB","GMRES"} + ,{"conjugate gradient","conjugate residual","conjugate gradient on a normal equation","minimum error","squared conjugate gradient","cgstab","gmres"} }; + typeEntier.setChoice(choiceKeys,choiceValues[languageIndex_]); + + valueByLanguage[0]="SOLVEUR POUR L'HYDRAULIQUE"; + valueByLanguage[1]="SOLVER FOR THE HYDROLOGY"; + entiteSimple=new DicoEntite.Simple(valueByLanguage[languageIndex_],typeEntier); + entiteSimple.setNiveau(0); + valueByLanguage[0]="1"; + valueByLanguage[1]="1"; + entiteSimple.setDefautValue(valueByLanguage[languageIndex_]); + entites[6]=entiteSimple.getImmutable(); + + + //start NOMBRE MAXIMUM D'ITERATIONS DU SOLVEUR POUR L'HYDRAULIQUE + typeEntier=new DicoDataType.Entier(); + + valueByLanguage[0]="NOMBRE MAXIMUM D'ITERATIONS DU SOLVEUR POUR L'HYDRAULIQUE"; + valueByLanguage[1]="MAXIMUM NUMBER OF ITERATIONS FOR THE SOLVER FOR THE HYDROLOGY"; + entiteSimple=new DicoEntite.Simple(valueByLanguage[languageIndex_],typeEntier); + entiteSimple.setNiveau(0); + valueByLanguage[0]="500"; + valueByLanguage[1]="500"; + entiteSimple.setDefautValue(valueByLanguage[languageIndex_]); + entites[7]=entiteSimple.getImmutable(); + + + //start LIMITE POUR L'ADAPTATION DU PAS DE TEMPS HYDRAULIQUE + typeEntier=new DicoDataType.Entier(); + + valueByLanguage[0]="LIMITE POUR L'ADAPTATION DU PAS DE TEMPS HYDRAULIQUE"; + valueByLanguage[1]="LIMIT FOR THE ADAPTATION OF THE TIME STEP FOR THE HYDROLOGY"; + entiteSimple=new DicoEntite.Simple(valueByLanguage[languageIndex_],typeEntier); + entiteSimple.setNiveau(0); + valueByLanguage[0]="10"; + valueByLanguage[1]="10"; + entiteSimple.setDefautValue(valueByLanguage[languageIndex_]); + entites[8]=entiteSimple.getImmutable(); + + + //start PRECONDITIONNEMENT POUR LA VITESSE DE DARCY + typeEntier=new DicoDataType.Entier(); + choiceKeys=new String[]{"0","2","3","7","14","21"}; + choiceValues=new String[][] {{"AUCUN","DIAGONAL","DIAGONAL CONDENSEE","CROUT","DIAGONAL ET CROUT","DIAGONAL CONDENSE ET CROUT"} + ,{"no preconditioning","diagonal","diagonal condensed","crout","diagonal and crout","diagonal condensed and crout"} }; + typeEntier.setChoice(choiceKeys,choiceValues[languageIndex_]); + + valueByLanguage[0]="PRECONDITIONNEMENT POUR LA VITESSE DE DARCY"; + valueByLanguage[1]="PRECONDITIONING FOR THE DARCIAN VELOCITY"; + entiteSimple=new DicoEntite.Simple(valueByLanguage[languageIndex_],typeEntier); + entiteSimple.setNiveau(0); + valueByLanguage[0]="14"; + valueByLanguage[1]="14"; + entiteSimple.setDefautValue(valueByLanguage[languageIndex_]); + entites[9]=entiteSimple.getImmutable(); + + + //start SOLVEUR POUR LA VITESSE DE DARCY + typeEntier=new DicoDataType.Entier(); + typeEntier.setControle(1,7); + choiceKeys=new String[]{"1","2","3","4","5","6","7"}; + choiceValues=new String[][] {{"GRADIENT CONJUGE","RESIDU CONJUGE","GRADIENT CONJUGE SUR EQUATION NORMALE","ERREUR MINIMALE","GRADIENT CONJUGE CARRE","CGSTAB","GMRES"} + ,{"conjugate gradient","conjugate residual","conjugate gradient on a normal equation","minimum error","squared conjugate gradient","cgstab","gmres"} }; + typeEntier.setChoice(choiceKeys,choiceValues[languageIndex_]); + + valueByLanguage[0]="SOLVEUR POUR LA VITESSE DE DARCY"; + valueByLanguage[1]="SOLVER FOR THE DARCIAN VELOCITY"; + entiteSimple=new DicoEntite.Simple(valueByLanguage[languageIndex_],typeEntier); + entiteSimple.setNiveau(0); + valueByLanguage[0]="1"; + valueByLanguage[1]="1"; + entiteSimple.setDefautValue(valueByLanguage[languageIndex_]); + entites[10]=entiteSimple.getImmutable(); + + + //start NOMBRE MAXIMUM D'ITERATIONS DU SOLVEUR POUR LA VITESSE DE DARCY + typeEntier=new DicoDataType.Entier(); + + valueByLanguage[0]="NOMBRE MAXIMUM D'ITERATIONS DU SOLVEUR POUR LA VITESSE DE DARCY"; + valueByLanguage[1]="MAXIMUM NUMBER OF ITERATIONS FOR THE SOLVER FOR THE DARCIAN VELOCITY"; + entiteSimple=new DicoEntite.Simple(valueByLanguage[languageIndex_],typeEntier); + entiteSimple.setNiveau(0); + valueByLanguage[0]="500"; + valueByLanguage[1]="500"; + entiteSimple.setDefautValue(valueByLanguage[languageIndex_]); + entites[11]=entiteSimple.getImmutable(); + + + //start NUMERO DU PREMIER PAS DE TEMPS POUR LES SORTIES GRAPHIQUES + typeEntier=new DicoDataType.Entier(); + + valueByLanguage[0]="NUMERO DU PREMIER PAS DE TEMPS POUR LES SORTIES GRAPHIQUES"; + valueByLanguage[1]="NUMBER OF THE FIRST TIME STEP FOR GRAPHICAL PRINTOUTS"; + entiteSimple=new DicoEntite.Simple(valueByLanguage[languageIndex_],typeEntier); + entiteSimple.setNiveau(0); + valueByLanguage[0]="0"; + valueByLanguage[1]="0"; + entiteSimple.setDefautValue(valueByLanguage[languageIndex_]); + entites[12]=entiteSimple.getImmutable(); + + + //start NOMBRE DE PAS DE TEMPS ENTRE CHAQUE SORTIE GRAPHIQUE + typeEntier=new DicoDataType.Entier(); + + valueByLanguage[0]="NOMBRE DE PAS DE TEMPS ENTRE CHAQUE SORTIE GRAPHIQUE"; + valueByLanguage[1]="NUMBER OF TIME STEPS BETWEEN EACH GRAPHICAL PRINTOUT"; + entiteSimple=new DicoEntite.Simple(valueByLanguage[languageIndex_],typeEntier); + entiteSimple.setNiveau(0); + valueByLanguage[0]="1"; + valueByLanguage[1]="1"; + entiteSimple.setDefautValue(valueByLanguage[languageIndex_]); + entites[13]=entiteSimple.getImmutable(); + + + //start NOMBRE MAXIMUM D'ITERATIONS DU SCHEMA ITERATIF + typeEntier=new DicoDataType.Entier(); + + valueByLanguage[0]="NOMBRE MAXIMUM D'ITERATIONS DU SCHEMA ITERATIF"; + valueByLanguage[1]="MAXIMUM NUMBER OF ITERATIONS FOR THE ITERATIVE SCHEME"; + entiteSimple=new DicoEntite.Simple(valueByLanguage[languageIndex_],typeEntier); + entiteSimple.setNiveau(0); + valueByLanguage[0]="40"; + valueByLanguage[1]="40"; + entiteSimple.setDefautValue(valueByLanguage[languageIndex_]); + entites[14]=entiteSimple.getImmutable(); + + + //start NUMERO DU SOL UNIFORME + typeEntier=new DicoDataType.Entier(); + + valueByLanguage[0]="NUMERO DU SOL UNIFORME"; + valueByLanguage[1]="INDEX OF THE UNIFORM SOIL"; + entiteSimple=new DicoEntite.Simple(valueByLanguage[languageIndex_],typeEntier); + entiteSimple.setNiveau(0); + valueByLanguage[0]="1"; + valueByLanguage[1]="1"; + entiteSimple.setDefautValue(valueByLanguage[languageIndex_]); + entites[15]=entiteSimple.getImmutable(); + + + //start ENTIERS PRIVES + typeEntier=new DicoDataType.Entier(); + + valueByLanguage[0]="ENTIERS PRIVES"; + valueByLanguage[1]="PRIVATE INTEGERS"; + entiteTableau=new DicoEntite.Tableau(valueByLanguage[languageIndex_],typeEntier); + entiteTableau.setTaille(10); + entiteTableau.setDynamique(true); + entiteTableau.setNiveau(0); + valueByLanguage[0]="-99;-99;-99;-99;-99;-99;-99;-99;-99;-99"; + valueByLanguage[1]="-99;-99;-99;-99;-99;-99;-99;-99;-99;-99"; + entiteTableau.setDefautValue(valueByLanguage[languageIndex_]); + entites[16]=entiteTableau.getImmutable(); + + + //start NUMERO DU PREMIER PAS DE TEMPS POUR LES SORTIES LISTING + typeEntier=new DicoDataType.Entier(); + + valueByLanguage[0]="NUMERO DU PREMIER PAS DE TEMPS POUR LES SORTIES LISTING"; + valueByLanguage[1]="NUMBER OF THE FIRST TIME STEP FOR LISTING PRINTOUTS"; + entiteSimple=new DicoEntite.Simple(valueByLanguage[languageIndex_],typeEntier); + entiteSimple.setNiveau(0); + valueByLanguage[0]="0"; + valueByLanguage[1]="0"; + entiteSimple.setDefautValue(valueByLanguage[languageIndex_]); + entites[17]=entiteSimple.getImmutable(); + + + //start NOMBRE DE PAS DE TEMPS ENTRE CHAQUE SORTIE LISTING + typeEntier=new DicoDataType.Entier(); + + valueByLanguage[0]="NOMBRE DE PAS DE TEMPS ENTRE CHAQUE SORTIE LISTING"; + valueByLanguage[1]="NUMBER OF TIME STEPS BETWEEN EACH LISTING PRINTOUT"; + entiteSimple=new DicoEntite.Simple(valueByLanguage[languageIndex_],typeEntier); + entiteSimple.setNiveau(0); + valueByLanguage[0]="1"; + valueByLanguage[1]="1"; + entiteSimple.setDefautValue(valueByLanguage[languageIndex_]); + entites[18]=entiteSimple.getImmutable(); + + + //start LONGUEUR DU VECTEUR + typeEntier=new DicoDataType.Entier(); + + valueByLanguage[0]="LONGUEUR DU VECTEUR"; + valueByLanguage[1]="VECTOR LENGTH"; + entiteSimple=new DicoEntite.Simple(valueByLanguage[languageIndex_],typeEntier); + entiteSimple.setNiveau(0); + valueByLanguage[0]="Non utilise"; + valueByLanguage[1]="Not used"; + entiteSimple.setRubrique(valueByLanguage[languageIndex_]); + valueByLanguage[0]="1"; + valueByLanguage[1]="1"; + entiteSimple.setDefautValue(valueByLanguage[languageIndex_]); + entites[19]=entiteSimple.getImmutable(); + + + //start DIMENSION DE L'ESPACE DE KRYLOV POUR L'HYDRAULIQUE + typeEntier=new DicoDataType.Entier(); + + valueByLanguage[0]="DIMENSION DE L'ESPACE DE KRYLOV POUR L'HYDRAULIQUE"; + valueByLanguage[1]="DIMENSION OF THE KRYLOV SPACE FOR THE HYDROLOGY"; + entiteSimple=new DicoEntite.Simple(valueByLanguage[languageIndex_],typeEntier); + entiteSimple.setNiveau(0); + valueByLanguage[0]="3"; + valueByLanguage[1]="3"; + entiteSimple.setDefautValue(valueByLanguage[languageIndex_]); + entites[20]=entiteSimple.getImmutable(); + + + //start DIMENSION DE L'ESPACE DE KRYLOV POUR LA VITESSE DE DARCY + typeEntier=new DicoDataType.Entier(); + + valueByLanguage[0]="DIMENSION DE L'ESPACE DE KRYLOV POUR LA VITESSE DE DARCY"; + valueByLanguage[1]="DIMENSION OF THE KRYLOV SPACE FOR THE DARCIAN VELOCITY"; + entiteSimple=new DicoEntite.Simple(valueByLanguage[languageIndex_],typeEntier); + entiteSimple.setNiveau(0); + valueByLanguage[0]="3"; + valueByLanguage[1]="3"; + entiteSimple.setDefautValue(valueByLanguage[languageIndex_]); + entites[21]=entiteSimple.getImmutable(); + + + //start NOMBRE DE TABLEAUX 2D PRIVES + typeEntier=new DicoDataType.Entier(); + + valueByLanguage[0]="NOMBRE DE TABLEAUX 2D PRIVES"; + valueByLanguage[1]="NUMBER OF 2D PRIVATE ARRAYS"; + entiteSimple=new DicoEntite.Simple(valueByLanguage[languageIndex_],typeEntier); + entiteSimple.setNiveau(0); + valueByLanguage[0]="4"; + valueByLanguage[1]="4"; + entiteSimple.setDefautValue(valueByLanguage[languageIndex_]); + entites[22]=entiteSimple.getImmutable(); + + + //start TYPE DE STOCKAGE DES MATRICES + typeEntier=new DicoDataType.Entier(); + + valueByLanguage[0]="TYPE DE STOCKAGE DES MATRICES"; + valueByLanguage[1]="TYPE OF STORAGE FOR THE MATRICES"; + entiteSimple=new DicoEntite.Simple(valueByLanguage[languageIndex_],typeEntier); + entiteSimple.setNiveau(0); + valueByLanguage[0]="1"; + valueByLanguage[1]="1"; + entiteSimple.setDefautValue(valueByLanguage[languageIndex_]); + entites[23]=entiteSimple.getImmutable(); + + + //start CRITERE DE CONVERGENCE POUR L'INFILTRATION + typeEntier=new DicoDataType.Entier(); + + valueByLanguage[0]="CRITERE DE CONVERGENCE POUR L'INFILTRATION"; + valueByLanguage[1]="CONVERGENCE CRITERION FOR THE INFILTRATION"; + entiteSimple=new DicoEntite.Simple(valueByLanguage[languageIndex_],typeEntier); + entiteSimple.setNiveau(0); + valueByLanguage[0]="3"; + valueByLanguage[1]="3"; + entiteSimple.setDefautValue(valueByLanguage[languageIndex_]); + entites[24]=entiteSimple.getImmutable(); + + + //start NOMBRE MAXIMAL D'ITERATIONS POUR L'INFILTRATION + typeEntier=new DicoDataType.Entier(); + + valueByLanguage[0]="NOMBRE MAXIMAL D'ITERATIONS POUR L'INFILTRATION"; + valueByLanguage[1]="MAXIMUM NUMBER OF ITERATIONS FOR THE INFILTRATION"; + entiteSimple=new DicoEntite.Simple(valueByLanguage[languageIndex_],typeEntier); + entiteSimple.setNiveau(0); + valueByLanguage[0]="2000"; + valueByLanguage[1]="2000"; + entiteSimple.setDefautValue(valueByLanguage[languageIndex_]); + entites[25]=entiteSimple.getImmutable(); + + + //start NOMBRE MAXIMAL D'ITERATIONS POUR LE SUITEMENT + typeEntier=new DicoDataType.Entier(); + + valueByLanguage[0]="NOMBRE MAXIMAL D'ITERATIONS POUR LE SUITEMENT"; + valueByLanguage[1]="MAXIMUM NUMBER OF ITERATIONS FOR THE SEEPAGE FACE"; + entiteSimple=new DicoEntite.Simple(valueByLanguage[languageIndex_],typeEntier); + entiteSimple.setNiveau(0); + valueByLanguage[0]="-99"; + valueByLanguage[1]="-99"; + entiteSimple.setDefautValue(valueByLanguage[languageIndex_]); + entites[26]=entiteSimple.getImmutable(); + + + //start OPTION DE CALCUL DU TERME DE DERIVE POUR LE PARTICULAIRE + typeEntier=new DicoDataType.Entier(); + choiceKeys=new String[]{"1","2"}; + choiceValues=new String[][] {{"UFFINK","LABOLLE"} + ,{"UFFINK","LABOLLE"} }; + typeEntier.setChoice(choiceKeys,choiceValues[languageIndex_]); + + valueByLanguage[0]="OPTION DE CALCUL DU TERME DE DERIVE POUR LE PARTICULAIRE"; + valueByLanguage[1]="CALCULATION OPTION FOR THE DRIFT TERM FOR PARTICLE TRACKING"; + entiteSimple=new DicoEntite.Simple(valueByLanguage[languageIndex_],typeEntier); + entiteSimple.setNiveau(0); + valueByLanguage[0]="1"; + valueByLanguage[1]="1"; + entiteSimple.setDefautValue(valueByLanguage[languageIndex_]); + entites[27]=entiteSimple.getImmutable(); + + + //start TYPE DE REFLECTION POUR LE PARTICULAIRE + typeEntier=new DicoDataType.Entier(); + + valueByLanguage[0]="TYPE DE REFLECTION POUR LE PARTICULAIRE"; + valueByLanguage[1]="TYPE OF REFLECTION FOR PARTICLE TRACKING"; + entiteSimple=new DicoEntite.Simple(valueByLanguage[languageIndex_],typeEntier); + entiteSimple.setNiveau(0); + valueByLanguage[0]="1"; + valueByLanguage[1]="1"; + entiteSimple.setDefautValue(valueByLanguage[languageIndex_]); + entites[28]=entiteSimple.getImmutable(); + + + //start NOMBRE MAXIMAL DE PARTICULES + typeEntier=new DicoDataType.Entier(); + + valueByLanguage[0]="NOMBRE MAXIMAL DE PARTICULES"; + valueByLanguage[1]="MAXIMUM NUMBER OF PARTICLES"; + entiteSimple=new DicoEntite.Simple(valueByLanguage[languageIndex_],typeEntier); + entiteSimple.setNiveau(0); + valueByLanguage[0]="50000"; + valueByLanguage[1]="50000"; + entiteSimple.setDefautValue(valueByLanguage[languageIndex_]); + entites[29]=entiteSimple.getImmutable(); + + + //start NOMBRE DE POLYGONES + typeEntier=new DicoDataType.Entier(); + + valueByLanguage[0]="NOMBRE DE POLYGONES"; + valueByLanguage[1]="NUMBER OF POLYGONES"; + entiteSimple=new DicoEntite.Simple(valueByLanguage[languageIndex_],typeEntier); + entiteSimple.setNiveau(0); + valueByLanguage[0]="1"; + valueByLanguage[1]="1"; + entiteSimple.setDefautValue(valueByLanguage[languageIndex_]); + entites[30]=entiteSimple.getImmutable(); + + + //start NOMBRE DE TRACEURS + typeEntier=new DicoDataType.Entier(); + + valueByLanguage[0]="NOMBRE DE TRACEURS"; + valueByLanguage[1]="NUMBER OF TRACERS"; + entiteSimple=new DicoEntite.Simple(valueByLanguage[languageIndex_],typeEntier); + entiteSimple.setNiveau(0); + valueByLanguage[0]="1"; + valueByLanguage[1]="1"; + entiteSimple.setDefautValue(valueByLanguage[languageIndex_]); + entites[31]=entiteSimple.getImmutable(); + + + //start SCHEMA NUMERIQUE POUR L'EQUATION DE TRANSPORT + typeEntier=new DicoDataType.Entier(); + typeEntier.setControle(1,7); + choiceKeys=new String[]{"1","2"}; + choiceValues=new String[][] {{"CVFE","SUPG"} + ,{"CVFE","SUPG"} }; + typeEntier.setChoice(choiceKeys,choiceValues[languageIndex_]); + + valueByLanguage[0]="SCHEMA NUMERIQUE POUR L'EQUATION DE TRANSPORT"; + valueByLanguage[1]="NUMERICAL SCHEME FOR THE TRANSPORT EQUATION"; + entiteSimple=new DicoEntite.Simple(valueByLanguage[languageIndex_],typeEntier); + entiteSimple.setNiveau(0); + valueByLanguage[0]="1"; + valueByLanguage[1]="1"; + entiteSimple.setDefautValue(valueByLanguage[languageIndex_]); + entites[32]=entiteSimple.getImmutable(); + + + //start SOLVEUR POUR L'EQUATION DE TRANSPORT + typeEntier=new DicoDataType.Entier(); + typeEntier.setControle(1,7); + choiceKeys=new String[]{"1","2","3","4","5","6","7"}; + choiceValues=new String[][] {{"GRADIENT CONJUGE","RESIDU CONJUGE","GRADIENT CONJUGE SUR EQUATION NORMALE","ERREUR MINIMALE","GRADIENT CONJUGE CARRE","CGSTAB","GMRES"} + ,{"conjugate gradient","conjugate residual","conjugate gradient on a normal equation","minimum error","squared conjugate gradient","cgstab","gmres"} }; + typeEntier.setChoice(choiceKeys,choiceValues[languageIndex_]); + + valueByLanguage[0]="SOLVEUR POUR L'EQUATION DE TRANSPORT"; + valueByLanguage[1]="SOLVER FOR THE TRANSPORT EQUATION"; + entiteSimple=new DicoEntite.Simple(valueByLanguage[languageIndex_],typeEntier); + entiteSimple.setNiveau(0); + valueByLanguage[0]="3"; + valueByLanguage[1]="3"; + entiteSimple.setDefautValue(valueByLanguage[languageIndex_]); + entites[33]=entiteSimple.getImmutable(); + + + //start PRECONDITIONNEMENT POUR L'EQUATION DE TRANSPORT + typeEntier=new DicoDataType.Entier(); + choiceKeys=new String[]{"0","2","3","7","14","21"}; + choiceValues=new String[][] {{"AUCUN","DIAGONAL","DIAGONAL CONDENSEE","CROUT","DIAGONAL ET CROUT","DIAGONAL CONDENSE ET CROUT"} + ,{"no preconditioning","diagonal","diagonal condensed","crout","diagonal and crout","diagonal condensed and crout"} }; + typeEntier.setChoice(choiceKeys,choiceValues[languageIndex_]); + + valueByLanguage[0]="PRECONDITIONNEMENT POUR L'EQUATION DE TRANSPORT"; + valueByLanguage[1]="PRECONDITIONING FOR THE TRANSPORT EQUATION"; + entiteSimple=new DicoEntite.Simple(valueByLanguage[languageIndex_],typeEntier); + entiteSimple.setNiveau(0); + valueByLanguage[0]="2"; + valueByLanguage[1]="2"; + entiteSimple.setDefautValue(valueByLanguage[languageIndex_]); + entites[34]=entiteSimple.getImmutable(); + + + //start NOMBRE MAXIMUM D'ITERATIONS DU SOLVEUR POUR LE TRANSPORT + typeEntier=new DicoDataType.Entier(); + + valueByLanguage[0]="NOMBRE MAXIMUM D'ITERATIONS DU SOLVEUR POUR LE TRANSPORT"; + valueByLanguage[1]="MAXIMUM NUMBER OF ITERATIONS FOR THE SOLVER FOR THE TRANSPORT"; + entiteSimple=new DicoEntite.Simple(valueByLanguage[languageIndex_],typeEntier); + entiteSimple.setNiveau(0); + valueByLanguage[0]="50"; + valueByLanguage[1]="50"; + entiteSimple.setDefautValue(valueByLanguage[languageIndex_]); + entites[35]=entiteSimple.getImmutable(); + + + //start DIMENSION DE L'ESPACE DE KRYLOV POUR L'EQUATION DE TRANSPORT + typeEntier=new DicoDataType.Entier(); + + valueByLanguage[0]="DIMENSION DE L'ESPACE DE KRYLOV POUR L'EQUATION DE TRANSPORT"; + valueByLanguage[1]="DIMENSION OF THE KRYLOV SPACE FOR THE TRANSPORT EQUATION"; + entiteSimple=new DicoEntite.Simple(valueByLanguage[languageIndex_],typeEntier); + entiteSimple.setNiveau(0); + valueByLanguage[0]="2"; + valueByLanguage[1]="2"; + entiteSimple.setDefautValue(valueByLanguage[languageIndex_]); + entites[36]=entiteSimple.getImmutable(); + + + //start OPTION DE DECENTREMENT POUR LE TRANSPORT AVEC CVFE + typeEntier=new DicoDataType.Entier(); + choiceKeys=new String[]{"1","2","3"}; + choiceValues=new String[][] {{"AMONT - UPWIND = 1","VARIABLE","CENTRE - UPWIND = 0.5"} + ,{"UPSTREAM - UPWIND = 1","VARIABLE","CENTRED - UPWIND = 0.5"} }; + typeEntier.setChoice(choiceKeys,choiceValues[languageIndex_]); + + valueByLanguage[0]="OPTION DE DECENTREMENT POUR LE TRANSPORT AVEC CVFE"; + valueByLanguage[1]="UPWINDING OPTION FOR THE TRANSPORT WITH CVFE"; + entiteSimple=new DicoEntite.Simple(valueByLanguage[languageIndex_],typeEntier); + entiteSimple.setNiveau(0); + valueByLanguage[0]="1"; + valueByLanguage[1]="1"; + entiteSimple.setDefautValue(valueByLanguage[languageIndex_]); + entites[37]=entiteSimple.getImmutable(); + + + //start TRAITEMENT DES SORTIES LIBRES POUR LE TRANSPORT AVEC CVFE + typeEntier=new DicoDataType.Entier(); + + valueByLanguage[0]="TRAITEMENT DES SORTIES LIBRES POUR LE TRANSPORT AVEC CVFE"; + valueByLanguage[1]="TREATMENT OF FREE EXITS FOR THE TRANSPORT WITH CVFE"; + entiteSimple=new DicoEntite.Simple(valueByLanguage[languageIndex_],typeEntier); + entiteSimple.setNiveau(0); + valueByLanguage[0]="1"; + valueByLanguage[1]="1"; + entiteSimple.setDefautValue(valueByLanguage[languageIndex_]); + entites[38]=entiteSimple.getImmutable(); + + + //start TYPE DE DISTRIBUTION POUR LES NOMBRES ALEATOIRES + typeEntier=new DicoDataType.Entier(); + choiceKeys=new String[]{"1","2"}; + choiceValues=new String[][] {{"GAUSSIENNE","UNIFORME"} + ,{"GAUSSIAN","UNIFORM"} }; + typeEntier.setChoice(choiceKeys,choiceValues[languageIndex_]); + + valueByLanguage[0]="TYPE DE DISTRIBUTION POUR LES NOMBRES ALEATOIRES"; + valueByLanguage[1]="TYPE OF DISTRIBUTION FOR THE RANDOM NUMBERS"; + entiteSimple=new DicoEntite.Simple(valueByLanguage[languageIndex_],typeEntier); + entiteSimple.setNiveau(0); + valueByLanguage[0]="2"; + valueByLanguage[1]="2"; + entiteSimple.setDefautValue(valueByLanguage[languageIndex_]); + entites[39]=entiteSimple.getImmutable(); + + + //start NOMBRE MAXIMUM D'ITERATIONS POUR TROUVER UN DEPLACEMENT + typeEntier=new DicoDataType.Entier(); + + valueByLanguage[0]="NOMBRE MAXIMUM D'ITERATIONS POUR TROUVER UN DEPLACEMENT"; + valueByLanguage[1]="MAXIMUM NUMBER OF ITERATION TO FIND A DISPLACEMENT"; + entiteSimple=new DicoEntite.Simple(valueByLanguage[languageIndex_],typeEntier); + entiteSimple.setNiveau(0); + valueByLanguage[0]="50"; + valueByLanguage[1]="50"; + entiteSimple.setDefautValue(valueByLanguage[languageIndex_]); + entites[40]=entiteSimple.getImmutable(); + + + //start NOMBRE MAXIMUM DE MODIFICATIONS POUR TROUVER UN DEPLACEMENT + typeEntier=new DicoDataType.Entier(); + + valueByLanguage[0]="NOMBRE MAXIMUM DE MODIFICATIONS POUR TROUVER UN DEPLACEMENT"; + valueByLanguage[1]="MAXIMUM NUMBER OF MODIFICATIONS TO FIND A DISPLACEMENT"; + entiteSimple=new DicoEntite.Simple(valueByLanguage[languageIndex_],typeEntier); + entiteSimple.setNiveau(0); + valueByLanguage[0]="10"; + valueByLanguage[1]="10"; + entiteSimple.setDefautValue(valueByLanguage[languageIndex_]); + entites[41]=entiteSimple.getImmutable(); + + + //start OPTION DE DECENTREMENT POUR LE TRANSPORT AVEC SUPG + typeEntier=new DicoDataType.Entier(); + + valueByLanguage[0]="OPTION DE DECENTREMENT POUR LE TRANSPORT AVEC SUPG"; + valueByLanguage[1]="UPWINDING OPTION FOR THE TRANSPORT WITH SUPG"; + entiteSimple=new DicoEntite.Simple(valueByLanguage[languageIndex_],typeEntier); + entiteSimple.setNiveau(0); + valueByLanguage[0]="2"; + valueByLanguage[1]="2"; + entiteSimple.setDefautValue(valueByLanguage[languageIndex_]); + entites[42]=entiteSimple.getImmutable(); + + + //start NOMBRE DE SECTIONS POUR LES FLUX + typeEntier=new DicoDataType.Entier(); + + valueByLanguage[0]="NOMBRE DE SECTIONS POUR LES FLUX"; + valueByLanguage[1]="NUMBER OF CROSS SECTIONS FOR THE FLUXES"; + entiteSimple=new DicoEntite.Simple(valueByLanguage[languageIndex_],typeEntier); + entiteSimple.setNiveau(0); + valueByLanguage[0]="0"; + valueByLanguage[1]="0"; + entiteSimple.setDefautValue(valueByLanguage[languageIndex_]); + entites[43]=entiteSimple.getImmutable(); + + + //start NOMBRE DE ZONES SOURCE + typeEntier=new DicoDataType.Entier(); + + valueByLanguage[0]="NOMBRE DE ZONES SOURCE"; + valueByLanguage[1]="NUMBER OF SOURCE ZONES"; + entiteSimple=new DicoEntite.Simple(valueByLanguage[languageIndex_],typeEntier); + entiteSimple.setNiveau(0); + valueByLanguage[0]="0"; + valueByLanguage[1]="0"; + entiteSimple.setDefautValue(valueByLanguage[languageIndex_]); + entites[44]=entiteSimple.getImmutable(); + + + //start NUMERO DU PAS DE TEMPS DE REPRISE DE CALCUL + typeEntier=new DicoDataType.Entier(); + + valueByLanguage[0]="NUMERO DU PAS DE TEMPS DE REPRISE DE CALCUL"; + valueByLanguage[1]="NUMBER OF THE PREVIOUS TIME STEP"; + entiteSimple=new DicoEntite.Simple(valueByLanguage[languageIndex_],typeEntier); + entiteSimple.setNiveau(0); + valueByLanguage[0]="0"; + valueByLanguage[1]="0"; + entiteSimple.setDefautValue(valueByLanguage[languageIndex_]); + entites[45]=entiteSimple.getImmutable(); + + + //start PERIODE POUR LES SORTIES GRAPHIQUES ET LISTING + typeReel=new DicoDataType.Reel(); + + valueByLanguage[0]="PERIODE POUR LES SORTIES GRAPHIQUES ET LISTING"; + valueByLanguage[1]="GRAPHICAL AND LISTING PRINTOUT PERIOD"; + entiteSimple=new DicoEntite.Simple(valueByLanguage[languageIndex_],typeReel); + entiteSimple.setNiveau(0); + valueByLanguage[0]="1."; + valueByLanguage[1]="1."; + entiteSimple.setDefautValue(valueByLanguage[languageIndex_]); + entites[46]=entiteSimple.getImmutable(); + + + //start TEMPS INITIAL POUR LES SORTIES GRAPHIQUES ET LISTING + typeReel=new DicoDataType.Reel(); + + valueByLanguage[0]="TEMPS INITIAL POUR LES SORTIES GRAPHIQUES ET LISTING"; + valueByLanguage[1]="INITIAL TIME FOR GRAPHICAL AND LISTING PRINTOUTS"; + entiteSimple=new DicoEntite.Simple(valueByLanguage[languageIndex_],typeReel); + entiteSimple.setNiveau(0); + valueByLanguage[0]="0."; + valueByLanguage[1]="0."; + entiteSimple.setDefautValue(valueByLanguage[languageIndex_]); + entites[47]=entiteSimple.getImmutable(); + + + //start PAS DE TEMPS INITIAL + typeReel=new DicoDataType.Reel(); + + valueByLanguage[0]="PAS DE TEMPS INITIAL"; + valueByLanguage[1]="INITIAL TIME STEP"; + entiteSimple=new DicoEntite.Simple(valueByLanguage[languageIndex_],typeReel); + entiteSimple.setNiveau(0); + valueByLanguage[0]="1."; + valueByLanguage[1]="1."; + entiteSimple.setDefautValue(valueByLanguage[languageIndex_]); + entites[48]=entiteSimple.getImmutable(); + + + //start PAS DE TEMPS MINIMUM + typeReel=new DicoDataType.Reel(); + + valueByLanguage[0]="PAS DE TEMPS MINIMUM"; + valueByLanguage[1]="MINIMUM TIME STEP"; + entiteSimple=new DicoEntite.Simple(valueByLanguage[languageIndex_],typeReel); + entiteSimple.setNiveau(0); + valueByLanguage[0]="1."; + valueByLanguage[1]="1."; + entiteSimple.setDefautValue(valueByLanguage[languageIndex_]); + entites[49]=entiteSimple.getImmutable(); + + + //start PAS DE TEMPS MAXIMUM + typeReel=new DicoDataType.Reel(); + + valueByLanguage[0]="PAS DE TEMPS MAXIMUM"; + valueByLanguage[1]="MAXIMUM TIME STEP"; + entiteSimple=new DicoEntite.Simple(valueByLanguage[languageIndex_],typeReel); + entiteSimple.setNiveau(0); + valueByLanguage[0]="1."; + valueByLanguage[1]="1."; + entiteSimple.setDefautValue(valueByLanguage[languageIndex_]); + entites[50]=entiteSimple.getImmutable(); + + + //start COOEFFICIENT MULTIPLICATIF POUR LE PAS DE TEMPS + typeReel=new DicoDataType.Reel(); + + valueByLanguage[0]="COOEFFICIENT MULTIPLICATIF POUR LE PAS DE TEMPS"; + valueByLanguage[1]="MULTIPLICATION COEFFICIENT ON THE TIME STEP"; + entiteSimple=new DicoEntite.Simple(valueByLanguage[languageIndex_],typeReel); + entiteSimple.setNiveau(0); + valueByLanguage[0]="1."; + valueByLanguage[1]="1."; + entiteSimple.setDefautValue(valueByLanguage[languageIndex_]); + entites[51]=entiteSimple.getImmutable(); + + + //start COEFFICIENT DE DIVISION POUR LE PAS DE TEMPS + typeReel=new DicoDataType.Reel(); + + valueByLanguage[0]="COEFFICIENT DE DIVISION POUR LE PAS DE TEMPS"; + valueByLanguage[1]="DIVISION COEFFICIENT ON THE TIME STEP"; + entiteSimple=new DicoEntite.Simple(valueByLanguage[languageIndex_],typeReel); + entiteSimple.setNiveau(0); + valueByLanguage[0]="1."; + valueByLanguage[1]="1."; + entiteSimple.setDefautValue(valueByLanguage[languageIndex_]); + entites[52]=entiteSimple.getImmutable(); + + + //start PRECISION DU SOLVEUR DE L'HYDRAULIQUE + typeReel=new DicoDataType.Reel(); + + valueByLanguage[0]="PRECISION DU SOLVEUR DE L'HYDRAULIQUE"; + valueByLanguage[1]="ACCURACY OF THE SOLVER FOR THE HYDROLOGY"; + entiteSimple=new DicoEntite.Simple(valueByLanguage[languageIndex_],typeReel); + entiteSimple.setNiveau(0); + valueByLanguage[0]="1.E-6"; + valueByLanguage[1]="1.E-6"; + entiteSimple.setDefautValue(valueByLanguage[languageIndex_]); + entites[53]=entiteSimple.getImmutable(); + + + //start IMPLICITATION POUR LA CHARGE HYDRAULIQUE + typeReel=new DicoDataType.Reel(); + + valueByLanguage[0]="IMPLICITATION POUR LA CHARGE HYDRAULIQUE"; + valueByLanguage[1]="IMPLICITATION FOR THE PRESSURE HEAD"; + entiteSimple=new DicoEntite.Simple(valueByLanguage[languageIndex_],typeReel); + entiteSimple.setNiveau(0); + valueByLanguage[0]="0.55"; + valueByLanguage[1]="0.55"; + entiteSimple.setDefautValue(valueByLanguage[languageIndex_]); + entites[54]=entiteSimple.getImmutable(); + + + //start COEFFICIENT DE MASS-LUMPING POUR L'HYDRAULIQUE + typeReel=new DicoDataType.Reel(); + + valueByLanguage[0]="COEFFICIENT DE MASS-LUMPING POUR L'HYDRAULIQUE"; + valueByLanguage[1]="MASS-LUMPING COEFFICIENT FOR THE HYDROLOGY"; + entiteSimple=new DicoEntite.Simple(valueByLanguage[languageIndex_],typeReel); + entiteSimple.setNiveau(0); + valueByLanguage[0]="0."; + valueByLanguage[1]="0."; + entiteSimple.setDefautValue(valueByLanguage[languageIndex_]); + entites[55]=entiteSimple.getImmutable(); + + + //start PRECISION DU SOLVEUR POUR LA VITESSE DE DARCY + typeReel=new DicoDataType.Reel(); + + valueByLanguage[0]="PRECISION DU SOLVEUR POUR LA VITESSE DE DARCY"; + valueByLanguage[1]="ACCURACY OF THE SOLVER FOR THE DARCIAN VELOCITY"; + entiteSimple=new DicoEntite.Simple(valueByLanguage[languageIndex_],typeReel); + entiteSimple.setNiveau(0); + valueByLanguage[0]="1.E-6"; + valueByLanguage[1]="1.E-6"; + entiteSimple.setDefautValue(valueByLanguage[languageIndex_]); + entites[56]=entiteSimple.getImmutable(); + + + //start DIRECTION 2D DE LA GRAVITE + typeReel=new DicoDataType.Reel(); + + valueByLanguage[0]="DIRECTION 2D DE LA GRAVITE"; + valueByLanguage[1]="2D DIRECTION OF GRAVITY"; + entiteTableau=new DicoEntite.Tableau(valueByLanguage[languageIndex_],typeReel); + entiteTableau.setTaille(2); + entiteTableau.setDynamique(true); + entiteTableau.setNiveau(0); + valueByLanguage[0]="0.;-1."; + valueByLanguage[1]="0.;-1."; + entiteTableau.setDefautValue(valueByLanguage[languageIndex_]); + entites[57]=entiteTableau.getImmutable(); + + + //start COEFFICIENT DE MASS-LUMPING POUR LA VITESSE DE DARCY + typeReel=new DicoDataType.Reel(); + + valueByLanguage[0]="COEFFICIENT DE MASS-LUMPING POUR LA VITESSE DE DARCY"; + valueByLanguage[1]="MASS-LUMPING COEFFICIENT FOR THE DARCIAN VELOCITY"; + entiteSimple=new DicoEntite.Simple(valueByLanguage[languageIndex_],typeReel); + entiteSimple.setNiveau(0); + valueByLanguage[0]="0."; + valueByLanguage[1]="0."; + entiteSimple.setDefautValue(valueByLanguage[languageIndex_]); + entites[58]=entiteSimple.getImmutable(); + + + //start PAS DE TEMPS + typeReel=new DicoDataType.Reel(); + + valueByLanguage[0]="PAS DE TEMPS"; + valueByLanguage[1]="TIME STEP"; + entiteSimple=new DicoEntite.Simple(valueByLanguage[languageIndex_],typeReel); + entiteSimple.setNiveau(0); + valueByLanguage[0]="1."; + valueByLanguage[1]="1."; + entiteSimple.setDefautValue(valueByLanguage[languageIndex_]); + entites[59]=entiteSimple.getImmutable(); + + + //start CONDITIONS INITIALES CONSTANTES POUR L'HYDRAULIQUE + typeReel=new DicoDataType.Reel(); + + valueByLanguage[0]="CONDITIONS INITIALES CONSTANTES POUR L'HYDRAULIQUE"; + valueByLanguage[1]="CONSTANT INITIAL CONDITIONS FOR THE HYDROLOGY"; + entiteSimple=new DicoEntite.Simple(valueByLanguage[languageIndex_],typeReel); + entiteSimple.setNiveau(0); + valueByLanguage[0]="0."; + valueByLanguage[1]="0."; + entiteSimple.setDefautValue(valueByLanguage[languageIndex_]); + entites[60]=entiteSimple.getImmutable(); + + + //start TEMPS INITIAL + typeReel=new DicoDataType.Reel(); + + valueByLanguage[0]="TEMPS INITIAL"; + valueByLanguage[1]="INITIAL TIME"; + entiteSimple=new DicoEntite.Simple(valueByLanguage[languageIndex_],typeReel); + entiteSimple.setNiveau(0); + valueByLanguage[0]="0."; + valueByLanguage[1]="0."; + entiteSimple.setDefautValue(valueByLanguage[languageIndex_]); + entites[61]=entiteSimple.getImmutable(); + + + //start TEMPS FINAL + typeReel=new DicoDataType.Reel(); + + valueByLanguage[0]="TEMPS FINAL"; + valueByLanguage[1]="FINAL TIME"; + entiteSimple=new DicoEntite.Simple(valueByLanguage[languageIndex_],typeReel); + entiteSimple.setNiveau(0); + valueByLanguage[0]="1."; + valueByLanguage[1]="1."; + entiteSimple.setDefautValue(valueByLanguage[languageIndex_]); + entites[62]=entiteSimple.getImmutable(); + + + //start REELS PRIVES + typeReel=new DicoDataType.Reel(); + + valueByLanguage[0]="REELS PRIVES"; + valueByLanguage[1]="PRIVATE REALS"; + entiteTableau=new DicoEntite.Tableau(valueByLanguage[languageIndex_],typeReel); + entiteTableau.setTaille(10); + entiteTableau.setDynamique(true); + entiteTableau.setNiveau(0); + valueByLanguage[0]="-99.;-99.;-99.;-99.;-99.;-99.;-99.;-99.;-99.;-99."; + valueByLanguage[1]="-99.;-99.;-99.;-99.;-99.;-99.;-99.;-99.;-99.;-99."; + entiteTableau.setDefautValue(valueByLanguage[languageIndex_]); + entites[63]=entiteTableau.getImmutable(); + + + //start PRECISION DU SUINTEMENT POUR LE POTENTIEL HYDRAULIQUE + typeReel=new DicoDataType.Reel(); + + valueByLanguage[0]="PRECISION DU SUINTEMENT POUR LE POTENTIEL HYDRAULIQUE"; + valueByLanguage[1]="ACCURACY OF THE SEEPAGE FACE FOR THE PRESSURE HEAD"; + entiteSimple=new DicoEntite.Simple(valueByLanguage[languageIndex_],typeReel); + entiteSimple.setNiveau(0); + valueByLanguage[0]="1.D-5"; + valueByLanguage[1]="1.D-5"; + entiteSimple.setDefautValue(valueByLanguage[languageIndex_]); + entites[64]=entiteSimple.getImmutable(); + + + //start PRECISION DU SCHEMA ITERATIF POUR LA TENEUR EN EAU + typeReel=new DicoDataType.Reel(); + + valueByLanguage[0]="PRECISION DU SCHEMA ITERATIF POUR LA TENEUR EN EAU"; + valueByLanguage[1]="ACCURACY OF THE ITERATIVE SCHEME FOR THE MOISTURE CONTENT"; + entiteSimple=new DicoEntite.Simple(valueByLanguage[languageIndex_],typeReel); + entiteSimple.setNiveau(0); + valueByLanguage[0]="1.E-4"; + valueByLanguage[1]="1.E-4"; + entiteSimple.setDefautValue(valueByLanguage[languageIndex_]); + entites[65]=entiteSimple.getImmutable(); + + + //start PRECISION DU SCHEMA ITERATIF POUR LE POTENTIEL HYDRAULIQUE + typeReel=new DicoDataType.Reel(); + + valueByLanguage[0]="PRECISION DU SCHEMA ITERATIF POUR LE POTENTIEL HYDRAULIQUE"; + valueByLanguage[1]="ACCURACY OF THE ITERATIVE SCHEME FOR THE PRESSURE HEAD"; + entiteSimple=new DicoEntite.Simple(valueByLanguage[languageIndex_],typeReel); + entiteSimple.setNiveau(0); + valueByLanguage[0]="1.E-3"; + valueByLanguage[1]="1.E-3"; + entiteSimple.setDefautValue(valueByLanguage[languageIndex_]); + entites[66]=entiteSimple.getImmutable(); + + + //start PRECISION DU SUINTEMENT POUR LA TENEUR EN EAU + typeReel=new DicoDataType.Reel(); + + valueByLanguage[0]="PRECISION DU SUINTEMENT POUR LA TENEUR EN EAU"; + valueByLanguage[1]="ACCURACY OF THE SEEPAGE FACE FOR THE MOISTURE CONTENT"; + entiteSimple=new DicoEntite.Simple(valueByLanguage[languageIndex_],typeReel); + entiteSimple.setNiveau(0); + valueByLanguage[0]="1.E-5"; + valueByLanguage[1]="1.E-5"; + entiteSimple.setDefautValue(valueByLanguage[languageIndex_]); + entites[67]=entiteSimple.getImmutable(); + + + //start PRECISION DU SOLVEUR DE L'EQUATION DE TRANSPORT + typeReel=new DicoDataType.Reel(); + + valueByLanguage[0]="PRECISION DU SOLVEUR DE L'EQUATION DE TRANSPORT"; + valueByLanguage[1]="ACCURACY OF THE SOLVER FOR THE TRANSPORT EQUATION"; + entiteSimple=new DicoEntite.Simple(valueByLanguage[languageIndex_],typeReel); + entiteSimple.setNiveau(0); + valueByLanguage[0]="1.E-4"; + valueByLanguage[1]="1.E-4"; + entiteSimple.setDefautValue(valueByLanguage[languageIndex_]); + entites[68]=entiteSimple.getImmutable(); + + + //start IMPLICITATION POUR LES CONCENTRATIONS + typeReel=new DicoDataType.Reel(); + + valueByLanguage[0]="IMPLICITATION POUR LES CONCENTRATIONS"; + valueByLanguage[1]="IMPLICITATION FOR THE CONCENTRATIONS"; + entiteSimple=new DicoEntite.Simple(valueByLanguage[languageIndex_],typeReel); + entiteSimple.setNiveau(0); + valueByLanguage[0]="0.45"; + valueByLanguage[1]="0.45"; + entiteSimple.setDefautValue(valueByLanguage[languageIndex_]); + entites[69]=entiteSimple.getImmutable(); + + + //start COEFFICIENT DE MASS-LUMPING POUR L'EQUATION DE TRANSPORT + typeReel=new DicoDataType.Reel(); + + valueByLanguage[0]="COEFFICIENT DE MASS-LUMPING POUR L'EQUATION DE TRANSPORT"; + valueByLanguage[1]="MASS-LUMPING COEFFICIENT FOR THE TRANSPORT EQUATION"; + entiteSimple=new DicoEntite.Simple(valueByLanguage[languageIndex_],typeReel); + entiteSimple.setNiveau(0); + valueByLanguage[0]="0.D0"; + valueByLanguage[1]="0.D0"; + entiteSimple.setDefautValue(valueByLanguage[languageIndex_]); + entites[70]=entiteSimple.getImmutable(); + + + //start VITESSE IMPOSEE SELON X + typeReel=new DicoDataType.Reel(); + + valueByLanguage[0]="VITESSE IMPOSEE SELON X"; + valueByLanguage[1]="IMPOSED VELOCITY ALONG X"; + entiteSimple=new DicoEntite.Simple(valueByLanguage[languageIndex_],typeReel); + entiteSimple.setNiveau(0); + valueByLanguage[0]="0.D0"; + valueByLanguage[1]="0.D0"; + entiteSimple.setDefautValue(valueByLanguage[languageIndex_]); + entites[71]=entiteSimple.getImmutable(); + + + //start NOMBRE DE COURANT MAXIMUM + typeReel=new DicoDataType.Reel(); + + valueByLanguage[0]="NOMBRE DE COURANT MAXIMUM"; + valueByLanguage[1]="MAXIMUM COURANT NUMBER"; + entiteSimple=new DicoEntite.Simple(valueByLanguage[languageIndex_],typeReel); + entiteSimple.setNiveau(0); + valueByLanguage[0]="1.D0"; + valueByLanguage[1]="1.D0"; + entiteSimple.setDefautValue(valueByLanguage[languageIndex_]); + entites[72]=entiteSimple.getImmutable(); + + + //start CONDITIONS INITIALES CONSTANTES POUR LE TRANSPORT + typeReel=new DicoDataType.Reel(); + + valueByLanguage[0]="CONDITIONS INITIALES CONSTANTES POUR LE TRANSPORT"; + valueByLanguage[1]="CONSTANT INITIAL CONDITIONS FOR THE TRANSPORT"; + entiteSimple=new DicoEntite.Simple(valueByLanguage[languageIndex_],typeReel); + entiteSimple.setNiveau(0); + valueByLanguage[0]="0."; + valueByLanguage[1]="0."; + entiteSimple.setDefautValue(valueByLanguage[languageIndex_]); + entites[73]=entiteSimple.getImmutable(); + + + //start TITRE + typeChaine=new DicoDataType.Chaine(); + + valueByLanguage[0]="TITRE"; + valueByLanguage[1]="TITLE"; + entiteSimple=new DicoEntite.Simple(valueByLanguage[languageIndex_],typeChaine); + entiteSimple.setNiveau(0); + valueByLanguage[0]="Pas de titre dans le fichier cas"; + valueByLanguage[1]="No title in the steering file"; + entiteSimple.setDefautValue(valueByLanguage[languageIndex_]); + entites[74]=entiteSimple.getImmutable(); + + + //start VARIABLES POUR LES SORTIES GRAPHIQUES 2D + typeChaine=new DicoDataType.Chaine(); + choiceKeys=new String[]{"H","THETA","KXX","KYY","KXY","KUNSAT","SAT","CAP","VX","VY", + "ZG","HH","IMAT","PRV1","PRV2","PRV3","PRV4"}; + choiceValues=new String[][] {{"charge hydraulique (L/T)","teneur en eau volumetrique (L3/L3)","conductivite hydraulique kxx(L/T)","conductivite hydraulique kyy (L/T)","conductivite hydraulique kxy (L/T)","conductivite hydraulique relative non saturee (-)","saturation effective (%)","capacite hydraulique (1/L)","vitesse de Darcy vx (L/T)","vitesse de Darcy vy (L/T)", + "elevation (L)","potentiel hydraulique (L)","indice des sols (-)","variable privee 1 (??)","variable privee 2 (??)","variable privee 3 (??)","variable privee 4 (??)"} + ,{"pressure head (L/T)","volumetric moisture content (L3/L3)","hydraulic conductivity kxx (L/T)","hydraulic conductivity kyy (L/T)","hydraulic conductivity kxy (L/T)","relative unsaturated hydraulic conductivity (-)","effective saturation (%)","hydraulic capacity (1/L)","Darcian velocity vx (L/T)","Darcian velocity vy (L/T)", + "elevation (L)","hydraulic head (L)","soil's index (-)","private variable 1 (??)","private variable 2 (??)","private variable 3 (??)","private variable 4 (??)"} }; + typeChaine.setChoice(choiceKeys,choiceValues[languageIndex_]); + typeChaine.setEditable(true); + + valueByLanguage[0]="VARIABLES POUR LES SORTIES GRAPHIQUES 2D"; + valueByLanguage[1]="VARIABLES FOR 2D GRAPHICAL PRINTOUTS"; + entiteSimple=new DicoEntite.Simple(valueByLanguage[languageIndex_],typeChaine); + entiteSimple.setNiveau(0); + valueByLanguage[0]="H,THETA,IMAT"; + valueByLanguage[1]="H,THETA,IMAT"; + entiteSimple.setDefautValue(valueByLanguage[languageIndex_]); + entites[75]=entiteSimple.getImmutable(); + + + //start USER CRAY + typeChaine=new DicoDataType.Chaine(); + + valueByLanguage[0]="USER CRAY"; + valueByLanguage[1]="USER ON CRAY"; + entiteSimple=new DicoEntite.S... [truncated message content] |
From: <de...@us...> - 2008-12-08 22:53:17
|
Revision: 4284 http://fudaa.svn.sourceforge.net/fudaa/?rev=4284&view=rev Author: deniger Date: 2008-12-08 22:53:11 +0000 (Mon, 08 Dec 2008) Log Message: ----------- Added Paths: ----------- branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/telemac/dico/DicoArtemisv5p8.java Added: branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/telemac/dico/DicoArtemisv5p8.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/telemac/dico/DicoArtemisv5p8.java (rev 0) +++ branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/telemac/dico/DicoArtemisv5p8.java 2008-12-08 22:53:11 UTC (rev 4284) @@ -0,0 +1,2705 @@ +/* + *File generated by fudaa + */ + +package + org.fudaa.dodico.telemac.dico; + +import org.fudaa.dodico.dico.*; +/** + * @author deniger + */ + +public class + DicoArtemisv5p8 + extends DicoModelAbstract +{ + public + DicoArtemisv5p8 + () + { + super(); + } + public + DicoArtemisv5p8 +(int _l) + { + super(_l); + } + public + DicoArtemisv5p8 +(String _l) + { + super(_l); + } + public final String getCodeName() + { + return "artemis"; + } + public final String getVersion() + { + return "v5p8"; + } + protected String[] createNoms() + { + String[] noms; + if(languageIndex_==0) + { + noms=new String[]{"ACCELERATION DE LA PESANTEUR","ALPHA","ANGLE MAXIMUM DE PROPAGATION","ANGLE MINIMUM DE PROPAGATION","BALAYAGE EN PERIODE","BIBLIOTHEQUES","BINAIRE DU FICHIER DE GEOMETRIE","BINAIRE DU FICHIER DES RESULTATS","CHAINE BIDON","COEFFICIENT DE FROTTEMENT", + "COEFFICIENT DE RELAXATION","COEFFICIENT DE RIDES","CONDITIONS INITIALES","COORDONNEES DE L'ORIGINE","COTE INITIALE","DATE DE L'ORIGINE DES TEMPS","DEFERLEMENT","DESCRIPTION DES LIBRAIRIES","DIAMETRE50","DIAMETRE90", + "DICTIONNAIRE","DIRECTION DE PROPAGATION DE LA HOULE","DISCRETISATION EN ESPACE","EXECUTABLE PAR DEFAUT","EXECUTABLE PARALLELE PAR DEFAUT","EXPOSANT S","FACTEUR DE FROTTEMENT","FACTEUR DE FROTTEMENT IMPOSE","FICHIER DE DONNEES BINAIRE 1","FICHIER DE DONNEES BINAIRE 2", + "FICHIER DE DONNEES FORMATE 1","FICHIER DE DONNEES FORMATE 2","FICHIER DE GEOMETRIE","FICHIER DE REFERENCE","FICHIER DES CONDITIONS AUX LIMITES","FICHIER DES FONDS","FICHIER DES PARAMETRES","FICHIER DES RESULTATS","FICHIER DES RESULTATS BINAIRE","FICHIER DES RESULTATS FORMATE", + "FICHIER FORTRAN","FORMULATION DU DEFERLEMENT","FORMULATION DU FROTTEMENT DE FOND","FROTTEMENT","GAMMA","GAMMAS","GDALLY","HAUTEUR INITIALE","HEURE DE L'ORIGINE DES TEMPS","HOULE ALEATOIRE MONODIRECTIONNELLE", + "HOULE ALEATOIRE MULTIDIRECTIONNELLE","INFORMATIONS SUR LE SOLVEUR","KDALLY","LISSAGE DES HAUTEURS DE HOULE","LISSAGES DU FOND","LISTE DES FICHIERS","LOI DE FROTTEMENT SUR LE FOND","LONGUEUR DU VECTEUR","MASSE VOLUMIQUE DU FLUIDE","MASSE VOLUMIQUE DU SEDIMENT", + "MAXIMUM D'ITERATIONS POUR LE SOLVEUR","MAXIMUM DE SOUS-ITERATIONS","MOT DE PASSE CRAY","NOMBRE DE DIRECTIONS DE DISCRETISATION","NOMBRE DE PERIODES DE DISCRETISATION","NOMBRE DE VARIABLES PRIVEES","NUMERO DE COMPTE","NUMERO DE VERSION","OPTION DU SOLVEUR","PAS POUR LE BALAYAGE EN PERIODE", + "PERIODE DE DEBUT POUR LE BALAYAGE EN PERIODE","PERIODE DE FIN POUR LE BALAYAGE EN PERIODE","PERIODE DE LA HOULE","PERIODE DE PIC","PERIODE DE SORTIE GRAPHIQUE","PERIODE DE SORTIE LISTING","PERIODE MAXIMUM DU SPECTRE","PERIODE MINIMUM DU SPECTRE","PLACE MEMOIRE CRAY","PRECISION DU SOLVEUR", + "PRECISION SUR LES SOUS-ITERATIONS","PRECONDITIONNEMENT","PRIORITE","PROCESSEURS PARALLELES","PRODUIT MATRICE-VECTEUR","REGIME HYDRAULIQUE IMPOSE","RELAXATION SUR LA DISSIPATION","RUGOSITE DE PEAU SEULE","SOLVEUR","SORTIE LISTING", + "STANDARD DU FICHIER DE GEOMETRIE","STANDARD DU FICHIER DES RESULTATS","STOCKAGE DES MATRICES","TEMPS MACHINE CRAY","TITRE","TYPE DU REGIME HYDRAULIQUE","USER CRAY","VALEUR MINIMUM DE H","VALIDATION","VARIABLES A IMPRIMER", + "VARIABLES POUR LES SORTIES GRAPHIQUES","VISCOSITE CINEMATIQUE DU FLUIDE","ZERO"}; + } + else if(languageIndex_==1) + { + noms=new String[]{"ACCOUNT NUMBER","ALPHA","BEGINNING PERIOD FOR PERIOD SCANNING","BIDON STRING","BINARY DATA FILE 1","BINARY DATA FILE 2","BINARY RESULTS FILE","BOTTOM FRICTION LAW","BOTTOM TOPOGRAPHY FILE","BOTTOM TOPOGRAPHY SMOOTHING", + "BOUNDARY CONDITIONS FILE","BREAKING","BREAKING LAW","CPU TIME","DEFAULT EXECUTABLE","DEFAULT PARALLEL EXECUTABLE","DESCRIPTION DES LIBRARIES","DIAMETER50","DIAMETER90","DICTIONARY", + "DIRECTION OF WAVE PROPAGATION","DISCRETIZATION IN SPACE","DISSIPATION RELAXATION","ENDING PERIOD FOR PERIOD SCANNING","FLUID KINEMATIC VISCOSITY","FLUID SPECIFIC MASS","FORMATTED DATA FILE 1","FORMATTED DATA FILE 2","FORMATTED RESULTS FILE","FORTRAN FILE", + "FRICTION","FRICTION COEFFICIENT","FRICTION FACTOR","FRICTION FACTOR IMPOSED","GAMMA","GAMMAS","GDALLY","GEOMETRY FILE","GEOMETRY FILE BINARY","GEOMETRY FILE STANDARD", + "GRAPHIC PRINTOUT PERIOD","GRAVITY ACCELERATION","HYDRAULIC REGIME IMPOSED","HYDRAULIC REGIME TYPE","INFORMATIONS ABOUT SOLVER","INITIAL CONDITIONS","INITIAL DEPTH","INITIAL WATER LEVEL","KDALLY","LAW OF BOTTOM FRICTION", + "LIBRARIES","LIST OF FILES","LISTING PRINTOUT","LISTING PRINTOUT PERIOD","MATRIX STORAGE","MATRIX-VECTOR PRODUCT","MAXIMUM ANGLE OF PROPAGATION","MAXIMUM NUMBER OF ITERATIONS FOR SOLVER","MAXIMUM OF SUB-ITERATIONS","MAXIMUM SPECTRAL PERIOD", + "MEMORY SPACE","MINIMUM ANGLE OF PROPAGATION","MINIMUM SPECTRAL PERIOD","MINIMUM VALUE FOR H","MONODIRECTIONAL RANDOM WAVE","MULTIDIRECTIONAL RANDOM WAVE","NUMBER OF DIRECTIONS","NUMBER OF PERIODS","NUMBER OF PRIVATE VARIABLES","ORIGIN COORDINATES", + "ORIGINAL DATE OF TIME","ORIGINAL HOUR OF TIME","PARALLEL PROCESSORS","PASSWORD","PEAK PERIOD","PERIOD SCANNING","PRECONDITIONING","PRIORITY","REFERENCE FILE","RELAXATION COEFFICIENT", + "RELEASE","RESULTS FILE","RESULTS FILE BINARY","RESULTS FILE STANDARD","RIPPLES COEFFICIENT","S EXPONENT","SEDIMENT SPECIFIC WEIGHT","SKIN ROUGHNESS ONLY","SOLVER","SOLVER ACCURACY", + "SOLVER OPTION","STEERING FILE","STEP FOR PERIOD SCANNING","SUB-ITERATIONS ACCURACY","TITLE","USER CRAY","VALIDATION","VARIABLES FOR GRAPHIC PRINTOUTS","VARIABLES TO BE PRINTED","VECTOR LENGTH", + "WAVE HEIGHTS SMOOTHING","WAVE PERIOD","ZERO"}; + } + else noms=null; + return noms; + } + protected final DicoEntite[] createEntites() + { + DicoComportValues[] comportValues; + DicoEntite.Simple entiteSimple; + DicoEntite.Tableau entiteTableau; + DicoEntite.Vecteur entiteVecteur; + DicoDataType.Entier typeEntier; + DicoDataType.Binaire typeBinaire; + DicoDataType.Chaine typeChaine; + DicoDataType.Reel typeReel; + String[] choiceKeys; + String[][] choiceValues; + String[] valueByLanguage=new String[2]; + DicoEntite[] entites=new DicoEntite[103]; + + //start FICHIER DE GEOMETRIE + typeChaine=new DicoDataType.Chaine(); + typeChaine.setFileType(true); + choiceKeys=null; + choiceValues=new String[][] {{"geo"} + ,{"geo"} }; + typeChaine.setChoice(choiceValues[languageIndex_],choiceKeys); + typeChaine.setEditable(true); + + valueByLanguage[0]="FICHIER DE GEOMETRIE"; + valueByLanguage[1]="GEOMETRY FILE"; + entiteSimple=new DicoEntite.Simple(valueByLanguage[languageIndex_],typeChaine); + entiteSimple.setNiveau(1); + valueByLanguage[0]="Nom du fichier contenant le maillage du calcul a realiser."; + valueByLanguage[1]="Name of the file which contains the computational mesh."; + entiteSimple.setAide(valueByLanguage[languageIndex_]); + valueByLanguage[0]="ENTREES-SORTIES,FICHIERS"; + valueByLanguage[1]="INPUT-OUTPUT,FILES"; + entiteSimple.setRubrique(valueByLanguage[languageIndex_]); + entites[0]=entiteSimple.getImmutable(); + + + //start BINAIRE DU FICHIER DES RESULTATS + typeChaine=new DicoDataType.Chaine(); + choiceKeys=null; + choiceValues=new String[][] {{"IBM","I3E","STD"} + ,{"IBM","I3E","STD"} }; + typeChaine.setChoice(choiceValues[languageIndex_],choiceKeys); + typeChaine.setEditable(true); + + valueByLanguage[0]="BINAIRE DU FICHIER DES RESULTATS"; + valueByLanguage[1]="RESULTS FILE BINARY"; + entiteSimple=new DicoEntite.Simple(valueByLanguage[languageIndex_],typeChaine); + entiteSimple.setNiveau(2); + valueByLanguage[0]="Type du binaire utilise pour l'ecriture du fichier des resultats." + +"\nCe type depend de la machine sur laquelle le fichier a ete genere." + +"\nLes valeurs possibles sont les memes que pour le fichier de geometrie."; + valueByLanguage[1]="Binary type used to write on the results file. This type depends on " + +"\nthe machine used to create this file. Allowed values are the same" + +"\nas used for the geometry file."; + entiteSimple.setAide(valueByLanguage[languageIndex_]); + valueByLanguage[0]="ENTREES-SORTIES,FICHIERS"; + valueByLanguage[1]="INPUT-OUTPUT,FILES"; + entiteSimple.setRubrique(valueByLanguage[languageIndex_]); + valueByLanguage[0]="STD"; + valueByLanguage[1]="STD"; + entiteSimple.setDefautValue(valueByLanguage[languageIndex_]); + entites[1]=entiteSimple.getImmutable(); + + + //start TITRE + typeChaine=new DicoDataType.Chaine(); + + valueByLanguage[0]="TITRE"; + valueByLanguage[1]="TITLE"; + entiteSimple=new DicoEntite.Simple(valueByLanguage[languageIndex_],typeChaine); + entiteSimple.setNiveau(1); + valueByLanguage[0]="Titre du cas etudie."; + valueByLanguage[1]="Title of the studied case."; + entiteSimple.setAide(valueByLanguage[languageIndex_]); + valueByLanguage[0]="ENTREES-SORTIES,GENERALITES"; + valueByLanguage[1]="INPUT-OUTPUT,INFORMATION"; + entiteSimple.setRubrique(valueByLanguage[languageIndex_]); + valueByLanguage[0]="PAS DE TITRE DANS LE FICHIER CAS"; + valueByLanguage[1]="NO TITLE IN THE STEERING FILE"; + entiteSimple.setDefautValue(valueByLanguage[languageIndex_]); + entites[2]=entiteSimple.getImmutable(); + + + //start LONGUEUR DU VECTEUR + typeEntier=new DicoDataType.Entier(); + + valueByLanguage[0]="LONGUEUR DU VECTEUR"; + valueByLanguage[1]="VECTOR LENGTH"; + entiteSimple=new DicoEntite.Simple(valueByLanguage[languageIndex_],typeEntier); + entiteSimple.setNiveau(2); + valueByLanguage[0]="LONGUEUR DU VECTEUR POUR LES MACHINES VECTORIELLES"; + valueByLanguage[1]="VECTOR LENGTH ON VECTOR MACHINES"; + entiteSimple.setAide(valueByLanguage[languageIndex_]); + valueByLanguage[0]="ENTREES-SORTIES,GENERALITES"; + valueByLanguage[1]="INPUT-OUTPUT,INFORMATION"; + entiteSimple.setRubrique(valueByLanguage[languageIndex_]); + valueByLanguage[0]="128"; + valueByLanguage[1]="128"; + entiteSimple.setDefautValue(valueByLanguage[languageIndex_]); + entites[3]=entiteSimple.getImmutable(); + + + //start LOI DE FROTTEMENT SUR LE FOND + typeEntier=new DicoDataType.Entier(); + + valueByLanguage[0]="LOI DE FROTTEMENT SUR LE FOND"; + valueByLanguage[1]="LAW OF BOTTOM FRICTION"; + entiteSimple=new DicoEntite.Simple(valueByLanguage[languageIndex_],typeEntier); + entiteSimple.setNiveau(2); + valueByLanguage[0]="Non utilise dans ARTEMIS. On le laisse par coherence avec TELEMAC2D"; + valueByLanguage[1]="Not used in ARTEMIS. It is kept for consistence with TELEMAC2D"; + entiteSimple.setAide(valueByLanguage[languageIndex_]); + valueByLanguage[0]="DISSIPATION"; + valueByLanguage[1]="DISSIPATION"; + entiteSimple.setRubrique(valueByLanguage[languageIndex_]); + valueByLanguage[0]="0"; + valueByLanguage[1]="0"; + entiteSimple.setDefautValue(valueByLanguage[languageIndex_]); + entites[4]=entiteSimple.getImmutable(); + + + //start STOCKAGE DES MATRICES + typeEntier=new DicoDataType.Entier(); + + valueByLanguage[0]="STOCKAGE DES MATRICES"; + valueByLanguage[1]="MATRIX STORAGE"; + entiteSimple=new DicoEntite.Simple(valueByLanguage[languageIndex_],typeEntier); + entiteSimple.setNiveau(2); + valueByLanguage[0]="1 : EBE classique 2 : EBE assemble 3 : par segment" + +"\n attention, avec 2, il faut une numerotation speciale des points"; + valueByLanguage[1]="1 : classical EBE 2 : assembled EBE 3 : edge by edge" + +"\n beware, with option 2, a special numbering of points is required"; + entiteSimple.setAide(valueByLanguage[languageIndex_]); + valueByLanguage[0]="PARAMETRES NUMERIQUES"; + valueByLanguage[1]="NUMERICAL PARAMETERS"; + entiteSimple.setRubrique(valueByLanguage[languageIndex_]); + valueByLanguage[0]="3"; + valueByLanguage[1]="3"; + entiteSimple.setDefautValue(valueByLanguage[languageIndex_]); + entites[5]=entiteSimple.getImmutable(); + + + //start PRODUIT MATRICE-VECTEUR + typeEntier=new DicoDataType.Entier(); + + valueByLanguage[0]="PRODUIT MATRICE-VECTEUR"; + valueByLanguage[1]="MATRIX-VECTOR PRODUCT"; + entiteSimple=new DicoEntite.Simple(valueByLanguage[languageIndex_],typeEntier); + entiteSimple.setNiveau(2); + valueByLanguage[0]="1 : Ancien Produit 2 : Nouveau Produit Frontal"; + valueByLanguage[1]="1 : Classical Product 2 : New Frontal Product"; + entiteSimple.setAide(valueByLanguage[languageIndex_]); + valueByLanguage[0]="PARAMETRES NUMERIQUES"; + valueByLanguage[1]="NUMERICAL PARAMETERS"; + entiteSimple.setRubrique(valueByLanguage[languageIndex_]); + valueByLanguage[0]="1"; + valueByLanguage[1]="1"; + entiteSimple.setDefautValue(valueByLanguage[languageIndex_]); + entites[6]=entiteSimple.getImmutable(); + + + //start USER CRAY + typeChaine=new DicoDataType.Chaine(); + + valueByLanguage[0]="USER CRAY"; + valueByLanguage[1]="USER CRAY"; + entiteSimple=new DicoEntite.Simple(valueByLanguage[languageIndex_],typeChaine); + entiteSimple.setNiveau(1); + valueByLanguage[0]="Userid CRAY de l'utilisateur."; + valueByLanguage[1]="Userid CRAY of the user."; + entiteSimple.setAide(valueByLanguage[languageIndex_]); + valueByLanguage[0]="ENTREES-SORTIES,GENERALITES"; + valueByLanguage[1]="INPUT-OUTPUT,INFORMATION"; + entiteSimple.setRubrique(valueByLanguage[languageIndex_]); + entites[7]=entiteSimple.getImmutable(); + + + //start PERIODE DE SORTIE GRAPHIQUE + typeEntier=new DicoDataType.Entier(); + + valueByLanguage[0]="PERIODE DE SORTIE GRAPHIQUE"; + valueByLanguage[1]="GRAPHIC PRINTOUT PERIOD"; + entiteSimple=new DicoEntite.Simple(valueByLanguage[languageIndex_],typeEntier); + entiteSimple.setNiveau(1); + valueByLanguage[0]="Determine la periode, en nombre de periodes de houle," + +"\nd'impression des VARIABLES POUR LES SORTIES GRAPHIQUES (voir ce mot-" + +"\ncle) dans le FICHIER DES RESULTATS"; + valueByLanguage[1]="Fixes the period, in number of wave periods, for the writing" + +"\nof the VARIABLES FOR GRAPHIC PRINTOUTS (see this key-word) in the" + +"\nRESULTS FILE"; + entiteSimple.setAide(valueByLanguage[languageIndex_]); + valueByLanguage[0]="ENTREES-SORTIES,GRAPHIQUES ET LISTING"; + valueByLanguage[1]="INPUT-OUTPUT,GRAPHICS AND LISTING"; + entiteSimple.setRubrique(valueByLanguage[languageIndex_]); + valueByLanguage[0]="1"; + valueByLanguage[1]="1"; + entiteSimple.setDefautValue(valueByLanguage[languageIndex_]); + entites[8]=entiteSimple.getImmutable(); + + + //start PERIODE DE SORTIE LISTING + typeEntier=new DicoDataType.Entier(); + + valueByLanguage[0]="PERIODE DE SORTIE LISTING"; + valueByLanguage[1]="LISTING PRINTOUT PERIOD"; + entiteSimple=new DicoEntite.Simple(valueByLanguage[languageIndex_],typeEntier); + entiteSimple.setNiveau(1); + valueByLanguage[0]="Determine la periode, en nombre de periodes de houle," + +"\nd'impression des VARIABLES A IMPRIMER (voir ce mot-cle). Pour la mise" + +"\nau point, il faut savoir que la sortie des resultats est effectuee" + +"\nsystematiquement sur le fichier de retour d'execution du code" + +"\n(actuellement accessible par le menu 3.e de SPF sur IBM)"; + valueByLanguage[1]="Fixes the period, in number of wave periods, for the writing" + +"\nof the VARIABLES TO BE PRINTED (see this key-word)"; + entiteSimple.setAide(valueByLanguage[languageIndex_]); + valueByLanguage[0]="ENTREES-SORTIES,GRAPHIQUES ET LISTING"; + valueByLanguage[1]="INPUT-OUTPUT,GRAPHICS AND LISTING"; + entiteSimple.setRubrique(valueByLanguage[languageIndex_]); + valueByLanguage[0]="1"; + valueByLanguage[1]="1"; + entiteSimple.setDefautValue(valueByLanguage[languageIndex_]); + entites[9]=entiteSimple.getImmutable(); + + + //start MAXIMUM D'ITERATIONS POUR LE SOLVEUR + typeEntier=new DicoDataType.Entier(); + + valueByLanguage[0]="MAXIMUM D'ITERATIONS POUR LE SOLVEUR"; + valueByLanguage[1]="MAXIMUM NUMBER OF ITERATIONS FOR SOLVER"; + entiteSimple=new DicoEntite.Simple(valueByLanguage[languageIndex_],typeEntier); + entiteSimple.setNiveau(2); + valueByLanguage[0]="Les algorithmes utilises pour la resolution du systeme" + +"\nmatriciel etant iteratifs, il est necessaire de limiter le nombre" + +"\nd'iterations autorisees"; + valueByLanguage[1]="Algorithms used for solving the matrix system are iterative." + +"\nIt is then necessary to limit the maximum number of iterations"; + entiteSimple.setAide(valueByLanguage[languageIndex_]); + valueByLanguage[0]="PARAMETRES NUMERIQUES,SOLVEUR"; + valueByLanguage[1]="NUMERICAL PARAMETERS,SOLVER"; + entiteSimple.setRubrique(valueByLanguage[languageIndex_]); + valueByLanguage[0]="60000"; + valueByLanguage[1]="60000"; + entiteSimple.setDefautValue(valueByLanguage[languageIndex_]); + entites[10]=entiteSimple.getImmutable(); + + + //start NOMBRE DE PERIODES DE DISCRETISATION + typeEntier=new DicoDataType.Entier(); + + valueByLanguage[0]="NOMBRE DE PERIODES DE DISCRETISATION"; + valueByLanguage[1]="NUMBER OF PERIODS"; + entiteSimple=new DicoEntite.Simple(valueByLanguage[languageIndex_],typeEntier); + entiteSimple.setNiveau(1); + valueByLanguage[0]="Valeur utilisee avec l'option :" + +"\n HOULE ALEATOIRE MONODIRECTIONNELLE = OUI" + +"\n ou avec l'option" + +"\n HOULE ALEATOIRE MULTIDIRECTIONNELLE = OUI" + +"\nPour un calcul en houle aleatoire monodirectionnelle ou" + +"\nmultidirectionnelle, nombre de bandes d'egale energie servant a" + +"\ndiscretiser le spectre d'energie en frequence."; + valueByLanguage[1]="Used with otion :" + +"\n MONODIRECTIONAL RANDOM WAVE = YES" + +"\n or" + +"\n MULTIDIRECTIONAL RANDOM WAVE = YES" + +"\nIt fixes the number of iso-energy frequency bands which discretize" + +"\nthe enrgy spectrum."; + entiteSimple.setAide(valueByLanguage[languageIndex_]); + valueByLanguage[0]="PARAMETRES PHYSIQUES"; + valueByLanguage[1]="PHYSICAL PARAMETERS"; + entiteSimple.setRubrique(valueByLanguage[languageIndex_]); + valueByLanguage[0]="5"; + valueByLanguage[1]="5"; + entiteSimple.setDefautValue(valueByLanguage[languageIndex_]); + entites[11]=entiteSimple.getImmutable(); + + + //start LISSAGES DU FOND + typeEntier=new DicoDataType.Entier(); + + valueByLanguage[0]="LISSAGES DU FOND"; + valueByLanguage[1]="BOTTOM TOPOGRAPHY SMOOTHING"; + entiteSimple=new DicoEntite.Simple(valueByLanguage[languageIndex_],typeEntier); + entiteSimple.setNiveau(2); + valueByLanguage[0]="Nombre de lissages effectues sur la topographie." + +"\nchaque lissage, effectue a l'aide d'une matrice de masse," + +"\nest conservatif." + +"\nUtilise lorsque les donnees de bathymetrie donnent des resultats" + +"\ntrop irreguliers apres interpolation."; + valueByLanguage[1]="Number of smoothings done on the topography." + +"\nEach smoothing, using a mass matrix, is conservative." + +"\nIt is used when bathymetric data provide too irregular results" + +"\nafter interpolation."; + entiteSimple.setAide(valueByLanguage[languageIndex_]); + valueByLanguage[0]="EQUATIONS,LISSAGE"; + valueByLanguage[1]="EQUATIONS,SMOOTHINGS"; + entiteSimple.setRubrique(valueByLanguage[languageIndex_]); + valueByLanguage[0]="0"; + valueByLanguage[1]="0"; + entiteSimple.setDefautValue(valueByLanguage[languageIndex_]); + entites[12]=entiteSimple.getImmutable(); + + + //start COTE INITIALE + typeReel=new DicoDataType.Reel(); + + valueByLanguage[0]="COTE INITIALE"; + valueByLanguage[1]="INITIAL WATER LEVEL"; + entiteSimple=new DicoEntite.Simple(valueByLanguage[languageIndex_],typeReel); + entiteSimple.setNiveau(1); + valueByLanguage[0]="Valeur utilisee avec l'option CONDITIONS INITIALES : COTE CONSTANTE."; + valueByLanguage[1]="Used with the option INITIAL CONDITIONS : CONSTANT ELEVATION."; + entiteSimple.setAide(valueByLanguage[languageIndex_]); + valueByLanguage[0]="EQUATIONS CONDITIONS INITIALES"; + valueByLanguage[1]="INITIAL CONDITIONS EQUATIONS"; + entiteSimple.setRubrique(valueByLanguage[languageIndex_]); + valueByLanguage[0]="0."; + valueByLanguage[1]="0."; + entiteSimple.setDefautValue(valueByLanguage[languageIndex_]); + entites[13]=entiteSimple.getImmutable(); + + + //start PRECONDITIONNEMENT + typeEntier=new DicoDataType.Entier(); + choiceKeys=new String[]{"0","2","3","5","7"}; + choiceValues=new String[][] {{"pas de preconditionnement","preconditionnement diagonal","preconditionnement bloc-diagonal","preconditionnement diagonal en valeur absolue","preconditionnement de Crout par element"} + ,{"no preconditioning","diagonal preconditioning","block-diagonal preconditioning","absolute value diagonal preconditioning","Crout preconditioning"} }; + typeEntier.setChoice(choiceKeys,choiceValues[languageIndex_]); + + valueByLanguage[0]="PRECONDITIONNEMENT"; + valueByLanguage[1]="PRECONDITIONING"; + entiteSimple=new DicoEntite.Simple(valueByLanguage[languageIndex_],typeEntier); + entiteSimple.setNiveau(2); + valueByLanguage[0]="Permet de preconditionner le systeme de l'etape de propagation afin" + +"\nd'accelerer la convergence lors de sa resolution." + +"\n - 0 : pas de preconditionnement," + +"\n - 2 : preconditionnement diagonal." + +"\n - 3 : preconditionnement bloc-diagonal." + +"\n - 5 : preconditionnement diagonal en valeur absolue." + +"\n - 7 : preconditionnement de Crout par element." + +"\nCertains preconditionnements sont cumulables" + +"\n(les diagonaux 2 ou 3 avec les autres)" + +"\nPour cette raison on ne retient que les nombres premiers pour" + +"\ndesigner les preconditionnements. Si l'on souhaite en cumuler" + +"\nplusieurs on formera le produit des options correspondantes."; + valueByLanguage[1]="Enables to apply preconditionning the matrix system to accelerate" + +"\nthe convergence of the solver." + +"\n - 0 : no preconditionning" + +"\n - 2 : diagonal preconditionning" + +"\n - 3 : block-diagonal preconditionning" + +"\n - 5 : diagonal preconditionning in absolute value" + +"\n - 7 : Element Crout preconditionning." + +"\nFew of them can be combined" + +"\n(numbers 2 or 3 with the other)" + +"\nTo combine some preconditionning, impose the product of the previous" + +"\nnumbers : example 6 means preconditionnig 2 and 3 applied."; + entiteSimple.setAide(valueByLanguage[languageIndex_]); + valueByLanguage[0]="PARAMETRES NUMERIQUES,SOLVEUR"; + valueByLanguage[1]="NUMERICAL PARAMETERS,SOLVER"; + entiteSimple.setRubrique(valueByLanguage[languageIndex_]); + valueByLanguage[0]="2"; + valueByLanguage[1]="2"; + entiteSimple.setDefautValue(valueByLanguage[languageIndex_]); + entites[14]=entiteSimple.getImmutable(); + + + //start SOLVEUR + typeEntier=new DicoDataType.Entier(); + choiceKeys=new String[]{"1","2","3","4","5","6","7","8"}; + choiceValues=new String[][] {{"gradient conjugue","residu conjugue","gradient conjugue sur equation normale","erreur minimale","gradient conjugue carre (non programme)","CGSTAB","GMRES","direct"} + ,{"conjugate gradient","conjugate residual","conjugate gradient on a normal equation","minimum error","squared conjugate gradient","CGSTAB","GMRES","direct"} }; + typeEntier.setChoice(choiceKeys,choiceValues[languageIndex_]); + + valueByLanguage[0]="SOLVEUR"; + valueByLanguage[1]="SOLVER"; + entiteSimple=new DicoEntite.Simple(valueByLanguage[languageIndex_],typeEntier); + entiteSimple.setNiveau(2); + valueByLanguage[0]="Permet de choisir le solveur utilise pour la resolution de l'etape de" + +"\npropagation. Toutes les methodes proposees actuellement s'apparentent" + +"\nau Gradient Conjugue. Ce sont :" + +"\n 1 : gradient conjugue" + +"\n 2 : residu conjugue" + +"\n 3 : gradient conjugue sur equation normale" + +"\n 4 : erreur minimale" + +"\n 5 : gradient conjugue carre (non programme)" + +"\n 6 : gradient conjugue de type CGSTAB" + +"\n 7 : GMRES" + +"\n 8 : solveur direct"; + valueByLanguage[1]="Enables to choose the solver used for solving the matrix system." + +"\nThey are :" + +"\n 1 : conjugate gradient" + +"\n 2 : conjugate residual" + +"\n 3 : conjugate gradient on the normal equation" + +"\n 4 : minimum error" + +"\n 5 : squarred conjugate gradient (not programmed)" + +"\n 6 : CGSTAB conjugate gradient" + +"\n 7 : GMRES" + +"\n 8 : direct solver"; + entiteSimple.setAide(valueByLanguage[languageIndex_]); + valueByLanguage[0]="PARAMETRES NUMERIQUES,SOLVEUR"; + valueByLanguage[1]="NUMERICAL PARAMETERS,SOLVER"; + entiteSimple.setRubrique(valueByLanguage[languageIndex_]); + valueByLanguage[0]="3"; + valueByLanguage[1]="3"; + entiteSimple.setDefautValue(valueByLanguage[languageIndex_]); + entites[15]=entiteSimple.getImmutable(); + + + //start OPTION DU SOLVEUR + typeEntier=new DicoDataType.Entier(); + + valueByLanguage[0]="OPTION DU SOLVEUR"; + valueByLanguage[1]="SOLVER OPTION"; + entiteSimple=new DicoEntite.Simple(valueByLanguage[languageIndex_],typeEntier); + entiteSimple.setNiveau(2); + valueByLanguage[0]="Parametre definissant la dimension de l'espace de Krylov" + +"\npour le solveur 7 (GMRES)"; + valueByLanguage[1]="Defines the dimension of the Krylov space when using" + +"\nthe solver 7 (GMRES)"; + entiteSimple.setAide(valueByLanguage[languageIndex_]); + valueByLanguage[0]="PARAMETRES NUMERIQUES,SOLVEUR"; + valueByLanguage[1]="NUMERICAL PARAMETERS,SOLVER"; + entiteSimple.setRubrique(valueByLanguage[languageIndex_]); + valueByLanguage[0]="3"; + valueByLanguage[1]="3"; + entiteSimple.setDefautValue(valueByLanguage[languageIndex_]); + entites[16]=entiteSimple.getImmutable(); + + + //start STANDARD DU FICHIER DE GEOMETRIE + typeEntier=new DicoDataType.Entier(); + choiceKeys=new String[]{"1","2","3"}; + choiceValues=new String[][] {{"LEONARD","RUBENS","SELAFIN"} + ,{"LEONARD","RUBENS","SELAFIN"} }; + typeEntier.setChoice(choiceKeys,choiceValues[languageIndex_]); + typeEntier.setEditable(true); + + valueByLanguage[0]="STANDARD DU FICHIER DE GEOMETRIE"; + valueByLanguage[1]="GEOMETRY FILE STANDARD"; + entiteSimple=new DicoEntite.Simple(valueByLanguage[languageIndex_],typeEntier); + entiteSimple.setNiveau(2); + valueByLanguage[0]="Adapte la lecture du FICHIER DE GEOMETRIE au standard choisi pour" + +"\ncelui-ci. Ce peut etre :" + +"\n - 1 : un maillage regulier au standard LEONARD," + +"\n - 2 : un maillage quelconque au standard RUBENS," + +"\n - 3 : un maillage quelconque au standard SELAFIN."; + valueByLanguage[1]="Adapts the reading of the GEOMETRY FILE to the specific standard :" + +"\n - 1 : regular mesh on standard LEONARD" + +"\n - 2 : any mesh on standard RUBENS" + +"\n - 3 : any mesh on standard SELAFIN"; + entiteSimple.setAide(valueByLanguage[languageIndex_]); + valueByLanguage[0]="ENTREES-SORTIES,FICHIERS"; + valueByLanguage[1]="INPUT-OUTPUT,FILES"; + entiteSimple.setRubrique(valueByLanguage[languageIndex_]); + valueByLanguage[0]="3"; + valueByLanguage[1]="3"; + entiteSimple.setDefautValue(valueByLanguage[languageIndex_]); + entites[17]=entiteSimple.getImmutable(); + + + //start STANDARD DU FICHIER DES RESULTATS + typeEntier=new DicoDataType.Entier(); + choiceKeys=new String[]{"1","2","3"}; + choiceValues=new String[][] {{"LEONARD","RUBENS","SELAFIN"} + ,{"LEONARD","RUBENS","SELAFIN"} }; + typeEntier.setChoice(choiceKeys,choiceValues[languageIndex_]); + typeEntier.setEditable(true); + + valueByLanguage[0]="STANDARD DU FICHIER DES RESULTATS"; + valueByLanguage[1]="RESULTS FILE STANDARD"; + entiteSimple=new DicoEntite.Simple(valueByLanguage[languageIndex_],typeEntier); + entiteSimple.setNiveau(2); + valueByLanguage[0]="Standard du fichier des resultats :" + +"\n - 1 : un maillage regulier au standard LEONARD," + +"\n - 2 : un maillage quelconque au standard RUBENS," + +"\n - 3 : un maillage quelconque au standard SELAFIN."; + valueByLanguage[1]="Specific standard of the results file :" + +"\n - 1 : regular mesh on standard LEONARD" + +"\n - 2 : any mesh on standard RUBENS" + +"\n - 3 : any mesh on standard SELAFIN"; + entiteSimple.setAide(valueByLanguage[languageIndex_]); + valueByLanguage[0]="ENTREES-SORTIES,FICHIERS"; + valueByLanguage[1]="INPUT-OUTPUT,FILES"; + entiteSimple.setRubrique(valueByLanguage[languageIndex_]); + valueByLanguage[0]="3"; + valueByLanguage[1]="3"; + entiteSimple.setDefautValue(valueByLanguage[languageIndex_]); + entites[18]=entiteSimple.getImmutable(); + + + //start PERIODE DE PIC + typeReel=new DicoDataType.Reel(); + + valueByLanguage[0]="PERIODE DE PIC"; + valueByLanguage[1]="PEAK PERIOD"; + entiteSimple=new DicoEntite.Simple(valueByLanguage[languageIndex_],typeReel); + entiteSimple.setNiveau(1); + valueByLanguage[0]="Valeur utilisee avec l'option :" + +"\n HOULE ALEATOIRE MONODIRECTIONNELLE = OUI" + +"\n ou avec l'option" + +"\n HOULE ALEATOIRE MULTIDIRECTIONNELLE = OUI" + +"\nFixe la periode de pic (en sec) du spectre d'energie."; + valueByLanguage[1]="Used with otion :" + +"\n MONODIRECTIONAL RANDOM WAVE = YES" + +"\n or" + +"\n MULTIDIRECTIONAL RANDOM WAVE = YES" + +"\nFixes the peak period (in sec) of the energy spectrum"; + entiteSimple.setAide(valueByLanguage[languageIndex_]); + valueByLanguage[0]="PARAMETRES PHYSIQUES"; + valueByLanguage[1]="PHYSICAL PARAMETERS"; + entiteSimple.setRubrique(valueByLanguage[languageIndex_]); + valueByLanguage[0]="10.0"; + valueByLanguage[1]="10.0"; + entiteSimple.setDefautValue(valueByLanguage[languageIndex_]); + entites[19]=entiteSimple.getImmutable(); + + + //start GAMMA + typeReel=new DicoDataType.Reel(); + choiceKeys=new String[]{"1.0","3.3","0.0"}; + choiceValues=new String[][] {{"spectre de Pierson-Moskowitz","spectre de JONSWAP moyen","spectre au choix"} + ,{"Pierson-Moskowitz","JONSWAP moyen","any spectre"} }; + typeReel.setChoice(choiceKeys,choiceValues[languageIndex_]); + + valueByLanguage[0]="GAMMA"; + valueByLanguage[1]="GAMMA"; + entiteSimple=new DicoEntite.Simple(valueByLanguage[languageIndex_],typeReel); + entiteSimple.setNiveau(1); + valueByLanguage[0]="Valeur utilisee avec l'option :" + +"\n HOULE ALEATOIRE MONODIRECTIONNELLE = OUI" + +"\n ou avec l'option" + +"\n HOULE ALEATOIRE MULTIDIRECTIONNELLE = OUI" + +"\nIndique la valeur de gamma pour le spectre d'energie" + +"\n GAMMA = 1 spectre de Pierson-Moskowitz" + +"\n GAMMA = 3.3 spectre de JONSWAP moyen (valeur par defaut)."; + valueByLanguage[1]="Used with otion :" + +"\n MONODIRECTIONAL RANDOM WAVE = YES" + +"\n or" + +"\n MULTIDIRECTIONAL RANDOM WAVE = YES" + +"\nFixes the gamma value tor the JONSWAP wave energy spectrum :" + +"\n GAMMA = 1 : Pierson-Moskowitz" + +"\n GAMMA = 3.3 : mean JONSWAP spectrum (default value)."; + entiteSimple.setAide(valueByLanguage[languageIndex_]); + valueByLanguage[0]="PARAMETRES PHYSIQUES"; + valueByLanguage[1]="PHYSICAL PARAMETERS"; + entiteSimple.setRubrique(valueByLanguage[languageIndex_]); + valueByLanguage[0]="3.3"; + valueByLanguage[1]="3.3"; + entiteSimple.setDefautValue(valueByLanguage[languageIndex_]); + entites[20]=entiteSimple.getImmutable(); + + + //start HOULE ALEATOIRE MONODIRECTIONNELLE + typeBinaire=DicoDataType.Binaire.EMPTY; + + valueByLanguage[0]="HOULE ALEATOIRE MONODIRECTIONNELLE"; + valueByLanguage[1]="MONODIRECTIONAL RANDOM WAVE"; + entiteSimple=new DicoEntite.Simple(valueByLanguage[languageIndex_],typeBinaire); + entiteSimple.setNiveau(1); + valueByLanguage[0]="oui, si l'on veut effectuer un calcul en houle aleatoire" + +"\nmonodirectionnelle (voir reels index 12, 13 et entier index 10)."; + valueByLanguage[1]="Yes, if one wants to run computation in random monodirectional waves" + +"\n(see reals key-words of index 12, 13 and integer of index 10)."; + entiteSimple.setAide(valueByLanguage[languageIndex_]); + valueByLanguage[0]="PARAMETRES PHYSIQUES"; + valueByLanguage[1]="PHYSICAL PARAMETERS"; + entiteSimple.setRubrique(valueByLanguage[languageIndex_]); + valueByLanguage[0]="false"; + valueByLanguage[1]="false"; + entiteSimple.setDefautValue(valueByLanguage[languageIndex_]); + entites[21]=entiteSimple.getImmutable(); + comportValues=new DicoComportValues[1]; + choiceValues =new String[][] {{"PERIODE MAXIMUM DU SPECTRE","PERIODE MINIMUM DU SPECTRE","GAMMA","PERIODE DE PIC","NOMBRE DE PERIODES DE DISCRETISATION"} + ,{"MAXIMUM SPECTRAL PERIOD","MINIMUM SPECTRAL PERIOD","GAMMA","PEAK PERIOD","NUMBER OF PERIODS"} }; + comportValues[0]=new DicoComportValues(null,false, choiceValues [languageIndex_]); + entiteComportValues_.put(entites[21],comportValues); + + + //start HOULE ALEATOIRE MULTIDIRECTIONNELLE + typeBinaire=DicoDataType.Binaire.EMPTY; + + valueByLanguage[0]="HOULE ALEATOIRE MULTIDIRECTIONNELLE"; + valueByLanguage[1]="MULTIDIRECTIONAL RANDOM WAVE"; + entiteSimple=new DicoEntite.Simple(valueByLanguage[languageIndex_],typeBinaire); + entiteSimple.setNiveau(1); + valueByLanguage[0]="oui, si l'on veut effectuer un calcul en houle aleatoire" + +"\nmultidirectionnelle (voir les reels index 12, 13, 14, 15 et 16 et" + +"\nles entiers index 10 et 11."; + valueByLanguage[1]="Yes, if one wants to run computation in random multidirectional waves" + +"\n(see reals key-words of index 12, 13 and integer of index 10)."; + entiteSimple.setAide(valueByLanguage[languageIndex_]); + valueByLanguage[0]="PARAMETRES PHYSIQUES"; + valueByLanguage[1]="PHYSICAL PARAMETERS"; + entiteSimple.setRubrique(valueByLanguage[languageIndex_]); + valueByLanguage[0]="false"; + valueByLanguage[1]="false"; + entiteSimple.setDefautValue(valueByLanguage[languageIndex_]); + entites[22]=entiteSimple.getImmutable(); + comportValues=new DicoComportValues[2]; + choiceValues =new String[][] {{"PERIODE MAXIMUM DU SPECTRE","PERIODE MINIMUM DU SPECTRE","GAMMA","PERIODE DE PIC","NOMBRE DE PERIODES DE DISCRETISATION"} + ,{"MAXIMUM SPECTRAL PERIOD","MINIMUM SPECTRAL PERIOD","GAMMA","PEAK PERIOD","NUMBER OF PERIODS"} }; + comportValues[0]=new DicoComportValues(null,false, choiceValues [languageIndex_]); + choiceValues =new String[][] {{"EXPOSANT S","ANGLE MAXIMUM DE PROPAGATION","ANGLE MINIMUM DE PROPAGATION","NOMBRE DE DIRECTIONS DE DISCRETISATION"} + ,{"S EXPONENT","MAXIMUM ANGLE OF PROPAGATION","MINIMUM ANGLE OF PROPAGATION","NUMBER OF DIRECTIONS"} }; + comportValues[1]=new DicoComportValues(null,false, choiceValues [languageIndex_]); + entiteComportValues_.put(entites[22],comportValues); + + + //start BALAYAGE EN PERIODE + typeBinaire=DicoDataType.Binaire.EMPTY; + + valueByLanguage[0]="BALAYAGE EN PERIODE"; + valueByLanguage[1]="PERIOD SCANNING"; + entiteSimple=new DicoEntite.Simple(valueByLanguage[languageIndex_],typeBinaire); + entiteSimple.setNiveau(1); + valueByLanguage[0]="oui, si l'on veut effectuer plusieurs calculs en balayant un" + +"\nintervalle de periodes (voir reels index 8,9 et 10)."; + valueByLanguage[1]="Yes, if one wants to run computations by scanning a period range" + +"\n(resonance computations, see also reals of index 8, 9, and 10)."; + entiteSimple.setAide(valueByLanguage[languageIndex_]); + valueByLanguage[0]="PARAMETRES PHYSIQUES"; + valueByLanguage[1]="PHYSICAL PARAMETERS"; + entiteSimple.setRubrique(valueByLanguage[languageIndex_]); + valueByLanguage[0]="false"; + valueByLanguage[1]="false"; + entiteSimple.setDefautValue(valueByLanguage[languageIndex_]); + entites[23]=entiteSimple.getImmutable(); + comportValues=new DicoComportValues[1]; + choiceValues =new String[][] {{"PAS POUR LE BALAYAGE EN PERIODE","PERIODE DE FIN POUR LE BALAYAGE EN PERIODE","PERIODE DE DEBUT POUR LE BALAYAGE EN PERIODE"} + ,{"STEP FOR PERIOD SCANNING","ENDING PERIOD FOR PERIOD SCANNING","BEGINNING PERIOD FOR PERIOD SCANNING"} }; + comportValues[0]=new DicoComportValues(null,false, choiceValues [languageIndex_]); + entiteComportValues_.put(entites[23],comportValues); + + + //start PRECISION DU SOLVEUR + typeReel=new DicoDataType.Reel(); + + valueByLanguage[0]="PRECISION DU SOLVEUR"; + valueByLanguage[1]="SOLVER ACCURACY"; + entiteSimple=new DicoEntite.Simple(valueByLanguage[languageIndex_],typeReel); + entiteSimple.setNiveau(2); + valueByLanguage[0]="Precision demandee pour la resolution de l'equation de Berkhoff."; + valueByLanguage[1]="Accuracy requested for the linear system solver."; + entiteSimple.setAide(valueByLanguage[languageIndex_]); + valueByLanguage[0]="PARAMETRES NUMERIQUES,SOLVEUR"; + valueByLanguage[1]="NUMERICAL PARAMETERS,SOLVER"; + entiteSimple.setRubrique(valueByLanguage[languageIndex_]); + valueByLanguage[0]="1.E-4"; + valueByLanguage[1]="1.E-4"; + entiteSimple.setDefautValue(valueByLanguage[languageIndex_]); + entites[24]=entiteSimple.getImmutable(); + + + //start VALEUR MINIMUM DE H + typeReel=new DicoDataType.Reel(); + + valueByLanguage[0]="VALEUR MINIMUM DE H"; + valueByLanguage[1]="MINIMUM VALUE FOR H"; + entiteSimple=new DicoEntite.Simple(valueByLanguage[languageIndex_],typeReel); + entiteSimple.setNiveau(3); + valueByLanguage[0]="Fixe la valeur minimale de H" + +"\nNon active pour l'instant."; + valueByLanguage[1]="Fixes the minimum value of H" + +"\nNon active at the moment."; + entiteSimple.setAide(valueByLanguage[languageIndex_]); + valueByLanguage[0]="PARAMETRES PHYSIQUES"; + valueByLanguage[1]="PHYSICAL PARAMETERS"; + entiteSimple.setRubrique(valueByLanguage[languageIndex_]); + valueByLanguage[0]="1.E-7"; + valueByLanguage[1]="1.E-7"; + entiteSimple.setDefautValue(valueByLanguage[languageIndex_]); + entites[25]=entiteSimple.getImmutable(); + + + //start HAUTEUR INITIALE + typeReel=new DicoDataType.Reel(); + + valueByLanguage[0]="HAUTEUR INITIALE"; + valueByLanguage[1]="INITIAL DEPTH"; + entiteSimple=new DicoEntite.Simple(valueByLanguage[languageIndex_],typeReel); + entiteSimple.setNiveau(1); + valueByLanguage[0]="Valeur utilisee avec l'option :" + +"\n CONDITIONS INITIALES : HAUTEUR CONSTANTE."; + valueByLanguage[1]="Value specified when using the option :" + +"\n INITIAL CONDITIONS : CONSTANT DEPTH."; + entiteSimple.setAide(valueByLanguage[languageIndex_]); + valueByLanguage[0]="EQUATIONS CONDITIONS INITIALES"; + valueByLanguage[1]="INITIAL CONDITIONS EQUATIONS"; + entiteSimple.setRubrique(valueByLanguage[languageIndex_]); + valueByLanguage[0]="0."; + valueByLanguage[1]="0."; + entiteSimple.setDefautValue(valueByLanguage[languageIndex_]); + entites[26]=entiteSimple.getImmutable(); + + + //start PERIODE DE LA HOULE + typeReel=new DicoDataType.Reel(); + + valueByLanguage[0]="PERIODE DE LA HOULE"; + valueByLanguage[1]="WAVE PERIOD"; + entiteSimple=new DicoEntite.Simple(valueByLanguage[languageIndex_],typeReel); + entiteSimple.setNiveau(1); + valueByLanguage[0]="Definit la periode de la houle en mode monochromatique."; + valueByLanguage[1]="Defines the wave period for monochromatic mode."; + entiteSimple.setAide(valueByLanguage[languageIndex_]); + valueByLanguage[0]="PARAMETRES PHYSIQUES"; + valueByLanguage[1]="PHYSICAL PARAMETERS"; + entiteSimple.setRubrique(valueByLanguage[languageIndex_]); + valueByLanguage[0]="10."; + valueByLanguage[1]="10."; + entiteSimple.setDefautValue(valueByLanguage[languageIndex_]); + entites[27]=entiteSimple.getImmutable(); + + + //start ACCELERATION DE LA PESANTEUR + typeReel=new DicoDataType.Reel(); + + valueByLanguage[0]="ACCELERATION DE LA PESANTEUR"; + valueByLanguage[1]="GRAVITY ACCELERATION"; + entiteSimple=new DicoEntite.Simple(valueByLanguage[languageIndex_],typeReel); + entiteSimple.setNiveau(1); + valueByLanguage[0]="Fixe la valeur de l'acceleration de la pesanteur."; + valueByLanguage[1]="Fixes the gravity acceleration value."; + entiteSimple.setAide(valueByLanguage[languageIndex_]); + valueByLanguage[0]="CONSTANTES PHYSIQUES"; + valueByLanguage[1]="PHYSICAL CONSTANTS"; + entiteSimple.setRubrique(valueByLanguage[languageIndex_]); + valueByLanguage[0]="9.81"; + valueByLanguage[1]="9.81"; + entiteSimple.setDefautValue(valueByLanguage[languageIndex_]); + entites[28]=entiteSimple.getImmutable(); + + + //start CONDITIONS INITIALES + typeChaine=new DicoDataType.Chaine(); + choiceKeys=null; + choiceValues=new String[][] {{"COTE NULLE","COTE CONSTANTE","HAUTEUR NULLE","HAUTEUR CONSTANTE","PARTICULIERES"} + ,{"ZERO ELEVATION","CONSTANT ELEVATION","ZERO DEPTH","CONSTANT DEPTH","SPECIAL"} }; + typeChaine.setChoice(choiceValues[languageIndex_],choiceKeys); + + valueByLanguage[0]="CONDITIONS INITIALES"; + valueByLanguage[1]="INITIAL CONDITIONS"; + entiteSimple=new DicoEntite.Simple(valueByLanguage[languageIndex_],typeChaine); + entiteSimple.setNiveau(1); + valueByLanguage[0]="Permet de definir les conditions initiales sur les hauteurs d'eau." + +"\nLes valeurs possibles sont :" + +"\n - COTE NULLE. Initialise la cote de surface libre a 0." + +"\n Les hauteurs d'eau initiales sont alors retrouvees en" + +"\n faisant la difference entre les cotes de surface libre" + +"\n et du fond." + +"\n - COTE CONSTANTE .Initialise la cote de surface libre a la" + +"\n valeur donnee par le mot-cle COTE INITIALE. Les hauteurs" + +"\n d'eau initiales sont calculees comme precedemment." + +"\n - HAUTEUR NULLE .Initialise les hauteurs d'eau a 0." + +"\n - HAUTEUR CONSTANTE. Initialise les hauteurs d'eau a la valeur" + +"\n donnee par le mot-cle HAUTEUR INITIALE." + +"\n - PARTICULIERES. Les conditions initiales sur la hauteur d'eau" + +"\n doivent etre precisees dans le sous-programme CONDIH."; + valueByLanguage[1]="Enables to define the initial conditions on water depths." + +"\nAllowable values are :" + +"\n - ZERO ELEVATION : fixes the free surface level to 0." + +"\n Water depths are then equal to the difference between" + +"\n free surface level and bottom level." + +"\n - CONSTANT ELEVATION : fixes the free surface level to the value" + +"\n specified by the key-word INITIAL WATER LEVEL. Water " + +"\n level are then computed as before." + +"\n - ZERO DEPTH : initializes the water depths to 0." + +"\n - CONSTANT DEPTH : initializes the water depths to the value" + +"\n specified by the key-word INITIAL DEPTH. " + +"\n - SPECIAL : initial conditions on water depths are to be" + +"\n precised in the sub-routine CONDIH."; + entiteSimple.setAide(valueByLanguage[languageIndex_]); + valueByLanguage[0]="EQUATIONS CONDITIONS INITIALES"; + valueByLanguage[1]="INITIAL CONDITIONS EQUATIONS"; + entiteSimple.setRubrique(valueByLanguage[languageIndex_]); + valueByLanguage[0]="COTE NULLE"; + valueByLanguage[1]="ZERO ELEVATION"; + entiteSimple.setDefautValue(valueByLanguage[languageIndex_]); + entites[29]=entiteSimple.getImmutable(); + + + //start COEFFICIENT DE RELAXATION + typeReel=new DicoDataType.Reel(); + + valueByLanguage[0]="COEFFICIENT DE RELAXATION"; + valueByLanguage[1]="RELAXATION COEFFICIENT"; + entiteSimple=new DicoEntite.Simple(valueByLanguage[languageIndex_],typeReel); + entiteSimple.setNiveau(1); + valueByLanguage[0]="Non utilise dans la version 3.0 ." + +"\n Ce coefficient doit etre compris entre 0 et 2." + +"\n coefficient de relaxation dans le cas d'une resolution par la" + +"\n methode de panchang et al." + +"\n voir Solution of the Mild Slope Wave Problem by Iteration" + +"\n Applied Ocean Research, 1991, Vol. 13, No. 4."; + valueByLanguage[1]="Not used in version 3.0 ." + +"\n This coefficient is a real between 0 and 2." + +"\n It is a relaxation coefficient used in the solving method proposed" + +"\n by Panchang et al." + +"\n See Solution of the Mild Slope Wave Problem by Iteration" + +"\n Applied Ocean Research, 1991, Vol. 13, No. 4."; + entiteSimple.setAide(valueByLanguage[languageIndex_]); + valueByLanguage[0]="ENTREES-SORTIES,GRAPHIQUES ET LISTING"; + valueByLanguage[1]="INPUT-OUTPUT,GRAPHICS AND LISTING"; + entiteSimple.setRubrique(valueByLanguage[languageIndex_]); + valueByLanguage[0]="1.4"; + valueByLanguage[1]="1.4"; + entiteSimple.setDefautValue(valueByLanguage[languageIndex_]); + entites[30]=entiteSimple.getImmutable(); + + + //start DISCRETISATION EN ESPACE + typeEntier=new DicoDataType.Entier(); + + valueByLanguage[0]="DISCRETISATION EN ESPACE"; + valueByLanguage[1]="DISCRETIZATION IN SPACE"; + entiteSimple=new DicoEntite.Simple(valueByLanguage[languageIndex_],typeEntier); + entiteSimple.setNiveau(13); + valueByLanguage[0]="NON ACTIVE POUR LE MOMENT"; + valueByLanguage[1]="NOT ACTIVE FOR THE MOMENT"; + entiteSimple.setAide(valueByLanguage[languageIndex_]); + valueByLanguage[0]="PARAMETRES NUMERIQUES,SOLVEUR"; + valueByLanguage[1]="NUMERICAL PARAMETERS,SOLVER"; + entiteSimple.setRubrique(valueByLanguage[languageIndex_]); + valueByLanguage[0]="1"; + valueByLanguage[1]="1"; + entiteSimple.setDefautValue(valueByLanguage[languageIndex_]); + entites[31]=entiteSimple.getImmutable(); + + + //start NOMBRE DE DIRECTIONS DE DISCRETISATION + typeEntier=new DicoDataType.Entier(); + + valueByLanguage[0]="NOMBRE DE DIRECTIONS DE DISCRETISATION"; + valueByLanguage[1]="NUMBER OF DIRECTIONS"; + entiteSimple=new DicoEntite.Simple(valueByLanguage[languageIndex_],typeEntier); + entiteSimple.setNiveau(0); + valueByLanguage[0]="Valeur utilisee avec l'option :" + +"\n HOULE ALEATOIRE MULTIDIRECTIONNELLE = OUI" + +"\nPour un calcul en houle aleatoire multidirectionnelle," + +"\nnombre de bandes d'egale energie servant a discretiser le spectre" + +"\ndirectionnel d'energie."; + valueByLanguage[1]="Used with the option :" + +"\n MULTIDIRECTIONAL RANDOM WAVE = YES" + +"\nIt fixes the number of iso-energy bands which discretizes the wave" + +"\ndirectional spectrum."; + entiteSimple.setAide(valueByLanguage[languageIndex_]); + valueByLanguage[0]="PARAMETRES PHYSIQUES"; + valueByLanguage[1]="PHYSICAL PARAMETERS"; + entiteSimple.setRubrique(valueByLanguage[languageIndex_]); + valueByLanguage[0]="5"; + valueByLanguage[1]="5"; + entiteSimple.setDefautValue(valueByLanguage[languageIndex_]); + entites[32]=entiteSimple.getImmutable(); + + + //start DIRECTION DE PROPAGATION DE LA HOULE + typeReel=new DicoDataType.Reel(); + + valueByLanguage[0]="DIRECTION DE PROPAGATION DE LA HOULE"; + valueByLanguage[1]="DIRECTION OF WAVE PROPAGATION"; + entiteSimple=new DicoEntite.Simple(valueByLanguage[languageIndex_],typeReel); + entiteSimple.setNiveau(1); + valueByLanguage[0]="Donne la direction du vecteur d'onde de la houle incidente. L'angle" + +"\nest donne en degres et est compte positivement dans le sens direct" + +"\na partir de l'axe des x." + +"\nIl s'agit de la direction principale de propagation." + +"\nCette direction est la meme a toutes les frontieres maritimes." + +"\nSi l'utilisateur veut specifier des directions differentes sur" + +"\ndifferentes frontieres, il doit le faire dans son FORTRAN dans le" + +"\nsous-programme BORH en specifiant la variable TETAB."; + valueByLanguage[1]="Fixes the direction towards the incident waves at boundaries go to." + +"\nIt is counted in degress and positively in the trigonometric sense" + +"\nrelatively to the x axis." + +"\nThis value is prescribed as a constant value along all the wave" + +"\nincident type boundaries. If one wants to specify a non uniform value," + +"\nthe user has to specify the value TETAB in the sub-routine BORH."; + entiteSimple.setAide(valueByLanguage[languageIndex_]); + valueByLanguage[0]="PARAMETRES PHYSIQUES"; + valueByLanguage[1]="PHYSICAL PARAMETERS"; + entiteSimple.setRubrique(valueByLanguage[languageIndex_]); + valueByLanguage[0]="0.0"; + valueByLanguage[1]="0.0"; + entiteSimple.setDefautValue(valueByLanguage[languageIndex_]); + entites[33]=entiteSimple.getImmutable(); + + + //start ZERO + typeReel=new DicoDataType.Reel(); + + valueByLanguage[0]="ZERO"; + valueByLanguage[1]="ZERO"; + entiteSimple=new DicoEntite.Simple(valueByLanguage[languageIndex_],typeReel); + entiteSimple.setNiveau(13); + valueByLanguage[0]="Non active pour l'instant."; + valueByLanguage[1]="Non active at the moment."; + entiteSimple.setAide(valueByLanguage[languageIndex_]); + valueByLanguage[0]="PARAMETRES NUMERIQUES,SOLVEUR"; + valueByLanguage[1]="NUMERICAL PARAMETERS,SOLVER"; + entiteSimple.setRubrique(valueByLanguage[languageIndex_]); + valueByLanguage[0]="1.E-12"; + valueByLanguage[1]="1.E-12"; + entiteSimple.setDefautValue(valueByLanguage[languageIndex_]); + entites[34]=entiteSimple.getImmutable(); + + + //start PERIODE DE DEBUT POUR LE BALAYAGE EN PERIODE + typeReel=new DicoDataType.Reel(); + + valueByLanguage[0]="PERIODE DE DEBUT POUR LE BALAYAGE EN PERIODE"; + valueByLanguage[1]="BEGINNING PERIOD FOR PERIOD SCANNING"; + entiteSimple=new DicoEntite.Simple(valueByLanguage[languageIndex_],typeReel); + entiteSimple.setNiveau(1); + valueByLanguage[0]="Valeur utilisee avec l'option :" + +"\n BALAYAGE EN PERIODE = OUI" + +"\n indique la borne gauche de l'intervalle de periodes a parcourir" + +"\n (pour par exemple rechercher les periodes de resonances)."; + valueByLanguage[1]="Used with the option :" + +"\n PERIOD SCANNING = YES" + +"\nFixes the minimum value (in sec) of the period range to be used for" + +"\nthe period scanning."; + entiteSimple.setAide(valueByLanguage[languageIndex_]); + valueByLanguage[0]="PARAMETRES PHYSIQUES"; + valueByLanguage[1]="PHYSICAL PARAMETERS"; + entiteSimple.setRubrique(valueByLanguage[languageIndex_]); + valueByLanguage[0]="0."; + valueByLanguage[1]="0."; + entiteSimple.setDefautValue(valueByLanguage[languageIndex_]); + entites[35]=entiteSimple.getImmutable(); + + + //start PERIODE DE FIN POUR LE BALAYAGE EN PERIODE + typeReel=new DicoDataType.Reel(); + + valueByLanguage[0]="PERIODE DE FIN POUR LE BALAYAGE EN PERIODE"; + valueByLanguage[1]="ENDING PERIOD FOR PERIOD SCANNING"; + entiteSimple=new DicoEntite.Simple(valueByLanguage[languageIndex_],typeReel); + entiteSimple.setNiveau(1); + valueByLanguage[0]="Valeur utilisee avec l'option :" + +"\n BALAYAGE EN PERIODE = OUI" + +"\n indique la borne droite de l'intervalle de periodes a parcourir" + +"\n (pour par exemple rechercher les periodes de resonances)."; + valueByLanguage[1]="Used with the option :" + +"\n PERIOD SCANNING = YES" + +"\nFixes the maximum value (in sec) of the period range to be used for" + +"\nthe period scanning."; + entiteSimple.setAide(valueByLanguage[languageIndex_]); + valueByLanguage[0]="PARAMETRES PHYSIQUES"; + valueByLanguage[1]="PHYSICAL PARAMETERS"; + entiteSimple.setRubrique(valueByLanguage[languageIndex_]); + valueByLanguage[0]="0."; + valueByLanguage[1]="0."; + entiteSimple.setDefautValue(valueByLanguage[languageIndex_]); + entites[36]=entiteSimple.getImmutable(); + + + //start PAS POUR LE BALAYAGE EN PERIODE + typeReel=new DicoDataType.Reel(); + + valueByLanguage[0]="PAS POUR LE BALAYAGE EN PERIODE"; + valueByLanguage[1]="STEP FOR PERIOD SCANNING"; + entiteSimple=new DicoEntite.Simple(valueByLanguage[languageIndex_],typeReel); + entiteSimple.setNiveau(1); + valueByLanguage[0]="Valeur utilisee avec l'option :" + +"\n BALAYAGE EN PERIODE = OUI" + +"\n indique le pas a prendre pour effectuer le balayage en periodes" + +"\n (pour par exemple rechercher les periodes de resonances)."; + valueByLanguage[1]="Used with the option :" + +"\n PERIOD SCANNING = YES" + +"\nFixes the value of the period step (in sec) to be used for" + +"\nthe period scanning."; + entiteSimple.setAide(valueByLanguage[languageIndex_]); + valueByLanguage[0]="PARAMETRES PHYSIQUES"; + valueByLanguage[1]="PHYSICAL PARAMETERS"; + entiteSimple.setRubrique(valueByLanguage[languageIndex_]); + valueByLanguage[0]="0."; + valueByLanguage[1]="0."; + entiteSimple.setDefautValue(valueByLanguage[languageIndex_]); + entites[37]=entiteSimple.getImmutable(); + + + //start ANGLE MINIMUM DE PROPAGATION + typeReel=new DicoDataType.Reel(); + + valueByLanguage[0]="ANGLE MINIMUM DE PROPAGATION"; + valueByLanguage[1]="MINIMUM ANGLE OF PROPAGATION"; + entiteSimple=new DicoEntite.Simple(valueByLanguage[languageIndex_],typeReel); + entiteSimple.setNiveau(1); + valueByLanguage[0]="Valeur utilisee avec l'option :" + +"\n HOULE ALEATOIRE MULTIDIRECTIONNELLE = OUI" + +"\n indique la borne inferieure de l'intervalle des directions de" + +"\n propagation dans le cas d'une houle aleatoire multidirectionnelle" + +"\n L'angle est donne en degres et est compte positivement dans le sens" + +"\n direct a partir de l'axe x."; + valueByLanguage[1]="Used with the option :" + +"\n MULTIDIRECTIONAL RANDOM WAVE = YES" + +"\nFixes the minimum value (in deg) of the directions range. It is" + +"\ncounted positively in the trigonometric sense relatively to the x" + +"\naxis."; + entiteSimple.setAide(valueByLanguage[languageIndex_]); + valueByLanguage[0]="PARAMETRES PHYSIQUES"; + valueByLanguage[1]="PHYSICAL PARAMETERS"; + entiteSimple.setRubrique(valueByLanguage[languageIndex_]); + valueByLanguage[0]="-180."; + valueByLanguage[1]="-180."; + entiteSimple.setDefautValue(valueByLanguage[languageIndex_]); + entites[38]=entiteSimple.getImmutable(); + + + //start ANGLE MAXIMUM DE PROPAGATION + typeReel=new DicoDataType.Reel(); + + valueByLanguage[0]="ANGLE MAXIMUM DE PROPAGATION"; + valueByLanguage[1]="MAXIMUM ANGLE OF PROPAGATION"; + entiteSimple=new DicoEntite.Simple(valueByLanguage[languageIndex_],typeReel); + entiteSimple.setNiveau(1); + valueByLanguage[0]="Valeur utilisee avec l'option :" + +"\n HOULE ALEATOIRE MULTIDIRECTIONNELLE = OUI" + +"\n indique la borne superieure de l'intervalle des directions de" + +"\n propagation dans le cas d'une houle aleatoire multidirectionnelle" + +"\n L'angle est donne en degres et est compte positivement dans le sens" + +"\n direct a partir de l'axe x."; + valueByLanguage[1]="Used with the option :" + +"\n MULTIDIRECTIONAL RANDOM WAVE = YES" + +"\nFixes the maximum value (in deg) of the directions range. It is" + +"\ncounted positively in the trigonometric sense relatively to the x" + +"\naxis."; + entiteSimple.setAide(valueByLanguage[languageIndex_]); + valueByLanguage[0]="PARAMETRES PHYSIQUES"; + valueByLanguage[1]="PHYSICAL PARAMETERS"; + entiteSimple.setRubrique(valueByLanguage[languageIndex_]); + valueByLanguage[0]="180."; + valueByLanguage[1]="180."; + entiteSimple.setDefautValue(valueByLanguage[languageIndex_]); + entites[39]=entiteSimple.getImmutable(); + + + //start EXPOSANT S + typeReel=new DicoDataType.Reel(); + + valueByLanguage[0]="EXPOSANT S"; + valueByLanguage[1]="S EXPONENT"; + entiteSimple=new DicoEntite.Simple(valueByLanguage[languageIndex_],typeReel); + entiteSimple.setNiveau(1); + valueByLanguage[0]="Valeur utilisee avec l'option :" + +"\n HOULE ALEATOIRE MULTIDIRECTIONNELLE = OUI" + +"\n indique la valeur maximale de l'exposant s dans l'expression donnant" + +"\n la repartition directionnelle de la houle." + +"\n Cette expression est celle donnee par Goda dans Random Seas and" + +"\n Design of Maritime Structures - University of Tokyo Press :" + +"\n G(f,teta) = G0 * (cos(teta/2))**2s. f est la frequence et teta est" + +"\n la direction de propagation de la houle."; + valueByLanguage[1]="Used with the option :" + +"\n MULTIDIRECTIONAL RANDOM WAVE = YES" + +"\nFixes the maximum value of exponent S in the Goda formula used to" + +"\nexpress the directional wave energy spreading." + +"\nSee GODA Y., Random Seas and Design of Maritime Structures - Univ." + +"\nof Tokyo Press, 1987."; + entiteSimple.setAide(valueByLanguage[languageIndex_]); + valueByLanguage[0]="PARAMETRES PHYSIQUES"; + valueByLanguage[1]="PHYSICAL PARAMETERS"; + entiteSimple.setRubrique(valueByLanguage[languageIndex_]); + valueByLanguage[0]="20."; + valueByLanguage[1]="20."; + entiteSimple.setDefautValue(valueByLanguage[languageIndex_]); + entites[40]=entiteSimple.getImmutable(); + + + //start SORTIE LISTING + typeBinaire=DicoDataType.Binaire.EMPTY; + + valueByLanguage[0]="SORTIE LISTING"; + valueByLanguage[1]="LISTING PRINTOUT"; + entiteSimple=new DicoEntite.Simple(valueByLanguage[languageIndex_],typeBinaire); + entiteSimple.setNiveau(0); + valueByLanguage[0]="Sortie des resultats sur support papier." + +"\nSi l'on met NON le listing ne contient que l'en-tete et la mention" + +"\nFIN NORMALE DU PROGRAMME" + +"\nCommande a eviter."; + valueByLanguage[1]="If NOT is specified for this key-word, the printout listing just" + +"\ncontains the head and the sentence END OF PROGRAM." + +"\nIt is adviced not to use this way."; + entiteSimple.setAide(valueByLanguage[languageIndex_]); + valueByLanguage[0]="ENTREES-SORTIES,GRAPHIQUES ET LISTING"; + valueByLanguage[1]="INPUT-OUTPUT,GRAPHICS AND LISTING"; + entiteSimple.setRubrique(valueByLanguage[languageIndex_]); + valueByLanguage[0]="true"; + valueByLanguage[1]="true"; + entiteSimple.setDefautValue(valueByLanguage[languageIndex_]); + entites[41]=entiteSimple.getImmutable(); + + + //start INFORMATIONS SUR LE SOLVEUR + typeBinaire=DicoDataType.Binaire.EMPTY; + + valueByLanguage[0]="INFORMATIONS SUR LE SOLVEUR"; + valueByLanguage[1]="INFORMATIONS ABOUT SOLVER"; + entiteSimple=new DicoEntite.Simple(valueByLanguage[languageIndex_],typeBinaire); + entiteSimple.setNiveau(1); + valueByLanguage[0]="Donne le nombre d'iterations necessaires a la convergence du solveur."; + valueByLanguage[1]="Gives the iterations number which was necessary for the solver " + +"\nto converge."; + entiteSimple.setAide(valueByLanguage[languageIndex_]); + valueByLanguage[0]="ENTREES-SORTIES,GRAPHIQUES ET LISTING"; + valueByLanguage[1]="INPUT-OUTPUT,GRAPHICS AND LISTING"; + entiteSimple.setRubrique(valueByLanguage[languageIndex_]); + valueByLanguage[0]="true"; + valueByLanguage[1]="true"; + entiteSimple.setDefautValue(valueByLanguage[languageIndex_]); + entites[42]=entiteSimple.getImmutable(); + + + //start VARIABLES POUR LES SORTIES GRAPHIQUES + typeChaine=new DicoDataType.Chaine(); + choiceKeys=new String[]{"HS","PHAS","U0","V0","ZS","ZF","HW","C","CG","K", + "PHIR","PHII","U1","V1","INC"... [truncated message content] |
From: <de...@us...> - 2008-12-08 22:24:45
|
Revision: 4283 http://fudaa.svn.sourceforge.net/fudaa/?rev=4283&view=rev Author: deniger Date: 2008-12-08 22:24:36 +0000 (Mon, 08 Dec 2008) Log Message: ----------- Modified Paths: -------------- branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/jdesktop/swingx/ScrollPaneSelector.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/dico/DicoAnalyzer.java branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/telemac/io/SerafinFileFilter.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZEbliCalquesPanel.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliScene.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidget.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetController.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetGroup.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActionDuplicateLayout.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActionRatio.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActiontextEditor.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetGroupAction.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetUngroupAction.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/behavior/AlignWithResizeProportionalStrategy.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/behavior/EbliWidgetActionFactory.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetControllerCalque.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetVueCalque.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetControllerGraphe.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetCreatorGraphe.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetCreatorLegende.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetGraphe.java branches/Prepro-0.92-SNAPSHOT/ebli/test/org/fudaa/ebli/all/TestVisualLibrary.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostLayoutFille.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostLayoutPanelController.java branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostVisuPanel.java Added Paths: ----------- branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/gui/CtuluSelectorPopupButton.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActionForeground.java Property Changed: ---------------- branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/telemac/dico/ Added: branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/gui/CtuluSelectorPopupButton.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/gui/CtuluSelectorPopupButton.java (rev 0) +++ branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/fudaa/ctulu/gui/CtuluSelectorPopupButton.java 2008-12-08 22:24:36 UTC (rev 4283) @@ -0,0 +1,85 @@ +/** + * Licence GPL + * Copyright Genesis + */ +package org.fudaa.ctulu.gui; + +import java.awt.BorderLayout; +import java.awt.Component; +import java.awt.Dimension; +import java.awt.Point; +import java.awt.Robot; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; + +import javax.swing.JButton; +import javax.swing.JComponent; +import javax.swing.JPopupMenu; +import javax.swing.JScrollPane; +import javax.swing.ScrollPaneConstants; +import javax.swing.SwingUtilities; + +import org.jdesktop.swingx.ScrollPaneSelector; + +import com.memoire.fu.FuLog; + +/** + * @author deniger + */ +public abstract class CtuluSelectorPopupButton { + + JButton jb; + private JPopupMenu menu_; + + public ActionListener createActionActionListener() { + return new ActionListener() { + + public void actionPerformed(ActionEvent _e) { + JPopupMenu menu = createPopup(); + JComponent jc = (JComponent) _e.getSource(); + final Dimension pref = menu.getPreferredSize(); + final Point popupLocation = new Point((jc.getWidth() - pref.width) / 2, (jc.getHeight() - pref.height) / 2); + try { + final Point center = new Point(jc.getWidth() / 2, jc.getHeight() / 2); + SwingUtilities.convertPointToScreen(center, jc); + new Robot().mouseMove(center.x, center.y); + } catch (Exception ex) { + FuLog.error(ex); + } + menu.show(jc, popupLocation.x, popupLocation.y); + } + }; + } + + public abstract JComponent createComponent(); + + private JPopupMenu createPopup() { + if (menu_ == null) { + menu_ = new JPopupMenu(); + menu_.setLayout(new BorderLayout()); + menu_.add(createComponent()); + } + return menu_; + } + + public JButton getButton() { + if (jb == null) { + jb = new JButton(ScrollPaneSelector.LAUNCH_SELECTOR_ICON); + jb.setFocusable(false); + jb.setPreferredSize(new Dimension(16, 16)); + jb.setMaximumSize(jb.getPreferredSize()); + jb.addActionListener(createActionActionListener()); + } + return jb; + + } + + public void installButton(JScrollPane _jc) { + + try { + _jc.setCorner(ScrollPaneConstants.LOWER_TRAILING_CORNER, getButton()); + } catch (final IllegalArgumentException _evt) { + _jc.setCorner(ScrollPaneConstants.LOWER_RIGHT_CORNER, getButton()); + } + } +} Modified: branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/jdesktop/swingx/ScrollPaneSelector.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/jdesktop/swingx/ScrollPaneSelector.java 2008-12-08 18:25:47 UTC (rev 4282) +++ branches/Prepro-0.92-SNAPSHOT/ctulu/src/org/jdesktop/swingx/ScrollPaneSelector.java 2008-12-08 22:24:36 UTC (rev 4283) @@ -37,8 +37,8 @@ */ public final class ScrollPaneSelector extends JComponent { // static final fields - static final double MAX_SIZE = 200; - static final Icon LAUNCH_SELECTOR_ICON = new Icon() { + public static final double MAX_SIZE = 200; + public static final Icon LAUNCH_SELECTOR_ICON = new Icon() { public void paintIcon(Component c, Graphics g, int x, int y) { Color tmpColor = g.getColor(); g.setColor(Color.BLACK); Modified: branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/dico/DicoAnalyzer.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/dico/DicoAnalyzer.java 2008-12-08 18:25:47 UTC (rev 4282) +++ branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/dico/DicoAnalyzer.java 2008-12-08 22:24:36 UTC (rev 4283) @@ -50,8 +50,8 @@ } /** - * Recupere a partir du nom de fichier dico <code>_s</code> le nom et la version du code correspondant. Il est - * suppose que la version est codee sur 4 caractere. Par exemple pour le fichier Telemac2dv2p5, la methode renvoie + * Recupere a partir du nom de fichier dico <code>_s</code> le nom et la version du code correspondant. Il est suppose + * que la version est codee sur 4 caractere. Par exemple pour le fichier Telemac2dv2p5, la methode renvoie * [telemac2d,v5p3] (nom en minuscule et version telle quelle). * * @param _s la chaine a analyser @@ -107,9 +107,7 @@ } private boolean computeChoice(final DicoDataTypeGenerate _type, final String[] _choiceByLanguage, final int _index) { - if (_choiceByLanguage == null) { - throw new IllegalArgumentException("argument _choice nul"); - } + if (_choiceByLanguage == null) { throw new IllegalArgumentException("argument _choice nul"); } final int t = _choiceByLanguage.length; String[] choiceList = CtuluLibString.parseString(_choiceByLanguage[0], DicoKeyword.getChoiceSep()); int nbChoix = choiceList.length; @@ -247,21 +245,15 @@ } else { String key = stemp.substring(0, index).trim(); if (key.startsWith(getQuoteString())) { - if (!key.endsWith(getQuoteString())) { - return false; - } + if (!key.endsWith(getQuoteString())) { return false; } key = key.substring(1, key.length() - 1); } _destArray[0] = key.trim(); value = stemp.substring(index + 1).trim(); } - if (value == null) { - return false; - } + if (value == null) { return false; } if (value.startsWith(getQuoteString())) { - if (!value.endsWith(getQuoteString())) { - return false; - } + if (!value.endsWith(getQuoteString())) { return false; } _destArray[1] = value.substring(1, value.length() - 1).trim(); } else { _destArray[1] = value.trim(); @@ -289,12 +281,8 @@ private String[] computeDefautValues(final String[] _initValues, final boolean _isMulti, final String _sep, final int _indexEntite) { - if (_initValues == null) { - return null; - } - if (_initValues.length == 0) { - return _initValues; - } + if (_initValues == null) { return null; } + if (_initValues.length == 0) { return _initValues; } final StringBuffer b = new StringBuffer(_initValues[0].length()); final int t = _initValues.length; final String[] r = new String[t]; @@ -361,14 +349,10 @@ t++; } } - if (t == 0) { - return null; - } + if (t == 0) { return null; } String[] noms = new String[t]; stemp = (String) _map.get(_prefixKey); - if ((stemp == null) || (stemp.trim().length() == 0)) { - return null; - } + if ((stemp == null) || (stemp.trim().length() == 0)) { return null; } if (_compute) { noms[0] = DicoKeyword.computeValue(stemp); } else { @@ -520,7 +504,7 @@ */ stemp = (String) mapEncours.get(kw_.getTaille()); boolean isMulti = false; - String sepChar = null; + int temp = 0; if (stemp != null) { temp = Integer.parseInt(stemp); @@ -528,9 +512,13 @@ final String compose = DicoKeyword.computeValue((String) mapEncours.get(kw_.getCompose())); boolean isComposedVect = (compose != null) && (compose.length() > 0); + final String sepChar = isComposedVect ? compose : DicoKeyword.SEPARATEUR_TABLEAU; + // String sep=isComposedVect // Correction du 7 mai 2007 // les mot-cl\xE9s qui ont une taille de 2 sont \xE9galement consid\xE9r\xE9s comme \xE9tant a taille variable - boolean isVect = (temp == 2 && isComposedVect); + boolean isVect = (temp == 2); + // if(temp==2 || ) + // si une taille est donnee et est differente de 2, c'est un tableau if (temp > 0 && !isVect) { final DicoEntiteGenerate.Tableau tab = new DicoEntiteGenerate.Tableau(type); tab.setTaille(temp); @@ -540,12 +528,13 @@ tab.setDataColumn(uniqueValueInTab); entite = tab; isMulti = true; - sepChar = DicoKeyword.SEPARATEUR_TABLEAU; - } else if (isComposedVect) { + // sepChar = DicoKeyword.SEPARATEUR_TABLEAU; + // vecteur si taille vaut 2 ou si un separateur est donne + } else if (isComposedVect || isVect) { entite = new DicoEntiteGenerate.Vecteur(type, compose); ((DicoEntiteGenerate.Vecteur) entite).setDataColumn(uniqueValueInTab); isMulti = true; - sepChar = compose; + // sepChar = compose; } else { entite = new DicoEntiteGenerate.Simple(type); } @@ -775,9 +764,7 @@ } } } - if (analyze_.containsFatalError()) { - return analyze_; - } + if (analyze_.containsFatalError()) { return analyze_; } // A partir des proprietes lues construit les entites utiles // a la generation. parseProprietes(props, nomLigne); Property changes on: branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/telemac/dico ___________________________________________________________________ Added: svn:mergeinfo + /branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/telemac/dico:3704-4282 Modified: branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/telemac/io/SerafinFileFilter.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/telemac/io/SerafinFileFilter.java 2008-12-08 18:25:47 UTC (rev 4282) +++ branches/Prepro-0.92-SNAPSHOT/dodico/src/org/fudaa/dodico/telemac/io/SerafinFileFilter.java 2008-12-08 22:24:36 UTC (rev 4283) @@ -71,7 +71,7 @@ * @return true si c'est un fichier r\xE9sultat */ public boolean isResFile(final String _name) { - return _name.endsWith(".res") || ((_name.startsWith("res") || _name.endsWith("RES")) && (_name.indexOf('.') < 0)); + return _name.endsWith(".res3d")|| _name.endsWith(".res2d")|| _name.endsWith(".res") || ((_name.startsWith("res") || _name.endsWith("RES")) && (_name.indexOf('.') < 0)); } /** Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZEbliCalquesPanel.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZEbliCalquesPanel.java 2008-12-08 18:25:47 UTC (rev 4282) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/calque/ZEbliCalquesPanel.java 2008-12-08 22:24:36 UTC (rev 4283) @@ -283,6 +283,7 @@ } BuLabel info_; + BuPanel suiviPanel_; /** * Constructeur minimal. Les groupes de navigation et standard seront construits. @@ -341,15 +342,15 @@ vc_.setListener(this); add(vc_, BuBorderLayout.CENTER); if (_addSouth) { - final BuPanel south = new BuPanel(); - south.setName("pnSuivis"); - south.setLayout(new BuBorderLayout()); - south.setOpaque(false); - south.setBorder(BorderFactory.createMatteBorder(1, 0, 0, 0, Color.gray)); - south.add(getLabelSuiviSouris(), BuBorderLayout.WEST); - south.add(mode_, BuBorderLayout.EAST); - south.add(info_, BuBorderLayout.CENTER); - add(south, BuBorderLayout.SOUTH); + suiviPanel_ = new BuPanel(); + suiviPanel_.setName("pnSuivis"); + suiviPanel_.setLayout(new BuBorderLayout()); + suiviPanel_.setOpaque(false); + suiviPanel_.setBorder(BorderFactory.createMatteBorder(1, 0, 0, 0, Color.gray)); + suiviPanel_.add(getLabelSuiviSouris(), BuBorderLayout.WEST); + suiviPanel_.add(mode_, BuBorderLayout.EAST); + suiviPanel_.add(info_, BuBorderLayout.CENTER); + add(suiviPanel_, BuBorderLayout.SOUTH); } modelArbre_.refresh(); @@ -384,6 +385,13 @@ return res; } + /** + * @return the suiviPanel + */ + public JComponent getSuiviPanel() { + return suiviPanel_; + } + protected void fillCmdContextuelles(final BuPopupMenu _menu) { final BCalque cqActif = getCalqueActif(); if (cqActif != null) { @@ -633,18 +641,12 @@ final Graphics2D g = i.createGraphics(); CtuluLibImage.setBestQuality(g); g.scale(CtuluLibImage.getRatio(_w, vc_.getWidth()), CtuluLibImage.getRatio(_h, vc_.getHeight())); - - - - vc_.paintImage(g, _params); - - - - - g.dispose(); + + vc_.paintImage(g, _params); + + g.dispose(); i.flush(); - - + return i; } @@ -806,9 +808,10 @@ public final void setModeVisible(final boolean _b) { mode_.setVisible(_b); } - + /** * Retourne les donn\xE9es persistantes. + * * @return */ public ZEbliCalquesPanelPersistManager getPersistenceManager() { @@ -921,5 +924,4 @@ return null; } - } \ No newline at end of file Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliScene.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliScene.java 2008-12-08 18:25:47 UTC (rev 4282) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliScene.java 2008-12-08 22:24:36 UTC (rev 4283) @@ -7,7 +7,6 @@ import java.beans.PropertyChangeListener; import java.beans.PropertyChangeSupport; import java.util.Iterator; -import java.util.List; import java.util.Map; import java.util.Set; Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidget.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidget.java 2008-12-08 18:25:47 UTC (rev 4282) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidget.java 2008-12-08 22:24:36 UTC (rev 4283) @@ -425,9 +425,9 @@ // System.err.println("parent not null"+ toString()); setBorder(lookFeel.getBorderInGroup(_newState)); parent.setBorder(lookFeel.getBorder(_newState, parent.getController().canResize_, - parent.getController().isProportional)); + parent.getController().isProportional())); } else { - setBorder(lookFeel.getBorder(_newState, getController().canResize_, getController().isProportional)); + setBorder(lookFeel.getBorder(_newState, getController().canResize_, getController().isProportional())); } } @@ -527,7 +527,7 @@ propGraphique.put(ROTATION, rotation); } - public void setSattelite(List<EbliWidget> liste) { + public void setSatellite(List<EbliWidget> liste) { } Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetController.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetController.java 2008-12-08 18:25:47 UTC (rev 4282) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetController.java 2008-12-08 22:24:36 UTC (rev 4283) @@ -210,7 +210,7 @@ } public AbstractButton boutonProportion = null; - public boolean isProportional = false; + private boolean isProportional = false; public void constructMenuResizeProportional(final JPopupMenu _popup, final CtuluCommandContainer cmd_) { @@ -542,4 +542,18 @@ menuExport.setIcon(null); return menuExport; } + + /** + * @return the isProportional + */ + public final boolean isProportional() { + return isProportional; + } + + /** + * @param _isProportional the isProportional to set + */ + public final void setProportional(boolean _isProportional) { + isProportional = _isProportional; + } } Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetGroup.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetGroup.java 2008-12-08 18:25:47 UTC (rev 4282) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliWidgetGroup.java 2008-12-08 22:24:36 UTC (rev 4283) @@ -1,10 +1,7 @@ package org.fudaa.ebli.visuallibrary; import java.awt.Dimension; -import java.awt.Point; -import java.util.ArrayList; import java.util.HashMap; -import java.util.List; import java.util.Map; import org.netbeans.api.visual.widget.Widget; Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActionDuplicateLayout.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActionDuplicateLayout.java 2008-12-08 18:25:47 UTC (rev 4282) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActionDuplicateLayout.java 2008-12-08 22:24:36 UTC (rev 4283) @@ -14,7 +14,6 @@ import org.fudaa.ebli.visuallibrary.calque.EbliWidgetVueCalque; import org.fudaa.ebli.visuallibrary.graphe.EbliWidgetControllerGraphe; import org.fudaa.ebli.visuallibrary.graphe.EbliWidgetGraphe; -import org.fudaa.ebli.visuallibrary.graphe.EbliWidgetGrapheController; /** Copied: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActionForeground.java (from rev 4282, branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActionForeGround.java) =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActionForeground.java (rev 0) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActionForeground.java 2008-12-08 22:24:36 UTC (rev 4283) @@ -0,0 +1,69 @@ +package org.fudaa.ebli.visuallibrary.actions; + +import java.awt.event.ActionEvent; +import java.util.ArrayList; +import java.util.Iterator; +import java.util.Set; + +import org.fudaa.ctulu.CtuluCommandContainer; +import org.fudaa.ctulu.CtuluResource; +import org.fudaa.ebli.ressource.EbliResource; +import org.fudaa.ebli.visuallibrary.EbliNode; +import org.fudaa.ebli.visuallibrary.EbliScene; +import org.fudaa.ebli.visuallibrary.EbliWidget; + +/** + * classe qui permet de placer les widgets selectionnes au premier plan. + * + * @author genesis + */ +public class EbliWidgetActionForeground extends EbliWidgetActionSimple { + + CtuluCommandContainer cmd_; + + public EbliWidgetActionForeground(final EbliScene _scene) { + super(_scene, EbliResource.EBLI.getString("Premier plan"), CtuluResource.CTULU.getIcon("crystal_disposerdevant"), + "FORGROUND"); + + cmd_ = _scene.getCmdMng(); + putValue(NAME, "Premier plan"); + } + + private static final long serialVersionUID = 1L; + + @Override + public void actionPerformed(final ActionEvent e) { + // -- recuperation de la liste des nodes de la scene --// + final Set<EbliNode> listeNode = (Set<EbliNode>) scene_.getSelectedObjects(); + + // -- liste des widget selectionnees --// + final java.util.List<EbliWidget> listeWidget = new ArrayList<EbliWidget>(); + + // -- parcours des nodes + for (final Iterator<EbliNode> it = listeNode.iterator(); it.hasNext();) { + + final EbliNode currentNode = it.next(); + if (currentNode != null && currentNode.isMovable()) { + + // -- ajout au premier plan du node --// + // scene_.getVisu().addChild(currentNode.getWidget()); + + currentNode.getWidget().bringToFront(); + + listeWidget.add(currentNode.getWidget()); + + // -- rafraichissement de la scene --// + scene_.refresh(); + + } + + } + + // -- enregistrement de la commande undoRedo --// + if (cmd_ != null) { + cmd_.addCmd(new CommandBringToFront(listeWidget)); + } + + } + +} Property changes on: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActionForeground.java ___________________________________________________________________ Added: svn:mergeinfo + Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActionRatio.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActionRatio.java 2008-12-08 18:25:47 UTC (rev 4282) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActionRatio.java 2008-12-08 22:24:36 UTC (rev 4283) @@ -75,7 +75,7 @@ if (resizeProportionnel_) { // controller.switchToResizeProportionnal(); widget_.getController().boutonProportion.setAction(new EbliWidgetActionRatio.Classical(widget_)); - widget_.getController().isProportional = true; + widget_.getController().setProportional(true); // -- enregistrement de la commande undoRedo --// if (cmd_ != null) { cmd_.addCmd(new CtuluCommand() { @@ -83,13 +83,13 @@ public void redo() { // controller.switchToResizeProportionnal(); widget_.getController().boutonProportion.setAction(new EbliWidgetActionRatio.Classical(widget_)); - widget_.getController().isProportional = true; + widget_.getController().setProportional(true); } public void undo() { // controller.switchToResizeClassical(); widget_.getController().boutonProportion.setAction(new EbliWidgetActionRatio.Proportional(widget_)); - widget_.getController().isProportional = false; + widget_.getController().setProportional(false); } }); @@ -98,7 +98,7 @@ } else { // controller.switchToResizeClassical(); widget_.getController().boutonProportion.setAction(new EbliWidgetActionRatio.Proportional(widget_)); - widget_.getController().isProportional = false; + widget_.getController().setProportional(false); // -- enregistrement de la commande undoRedo --// if (cmd_ != null) { cmd_.addCmd(new CtuluCommand() { @@ -106,13 +106,13 @@ public void redo() { // controller.switchToResizeClassical(); widget_.getController().boutonProportion.setAction(new EbliWidgetActionRatio.Proportional(widget_)); - widget_.getController().isProportional = false; + widget_.getController().setProportional(false); } public void undo() { // controller.switchToResizeProportionnal(); widget_.getController().boutonProportion.setAction(new EbliWidgetActionRatio.Classical(widget_)); - widget_.getController().isProportional = true; + widget_.getController().setProportional(true); } }); Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActiontextEditor.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActiontextEditor.java 2008-12-08 18:25:47 UTC (rev 4282) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActiontextEditor.java 2008-12-08 22:24:36 UTC (rev 4283) @@ -5,7 +5,6 @@ import java.awt.event.ActionEvent; import org.fudaa.ctulu.gui.CtuluHtmlEditorPanel; -import org.fudaa.ctulu.gui.CtuluLibSwing; import org.fudaa.ebli.commun.EbliLib; import org.fudaa.ebli.visuallibrary.EbliNodeDefault; import org.fudaa.ebli.visuallibrary.EbliScene; Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetGroupAction.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetGroupAction.java 2008-12-08 18:25:47 UTC (rev 4282) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetGroupAction.java 2008-12-08 22:24:36 UTC (rev 4283) @@ -13,7 +13,6 @@ import java.util.Arrays; import java.util.Collection; import java.util.HashSet; -import java.util.List; import java.util.Set; import org.fudaa.ctulu.CtuluCommand; Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetUngroupAction.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetUngroupAction.java 2008-12-08 18:25:47 UTC (rev 4282) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetUngroupAction.java 2008-12-08 22:24:36 UTC (rev 4283) @@ -71,7 +71,7 @@ _scene.addNode(n).setPreferredLocation(toScene); n.getWidget().getController().replaceActionResize(); if(listeSattellites!=null) - n.getWidget().getIntern().setSattelite(listeSattellites); + n.getWidget().getIntern().setSatellite(listeSattellites); } _scene.removeNode(_n); Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/behavior/AlignWithResizeProportionalStrategy.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/behavior/AlignWithResizeProportionalStrategy.java 2008-12-08 18:25:47 UTC (rev 4282) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/behavior/AlignWithResizeProportionalStrategy.java 2008-12-08 22:24:36 UTC (rev 4283) @@ -6,7 +6,6 @@ import org.fudaa.ctulu.image.CtuluLibImage; import org.fudaa.ebli.visuallibrary.EbliWidget; -import org.fudaa.ebli.visuallibrary.calque.EbliWidgetVueCalque; import org.netbeans.api.visual.action.AlignWithMoveDecorator; import org.netbeans.api.visual.action.AlignWithWidgetCollector; import org.netbeans.api.visual.action.ResizeProvider; @@ -189,7 +188,7 @@ } if (widget instanceof EbliWidget) { - if (((EbliWidget) widget).getController().isProportional) { + if (((EbliWidget) widget).getController().isProportional()) { // -- proportions respectees --// // double coeff = ((double) suggestedBounds.height) / ((double) oldHeight); if (suggestedBounds.height != originalBounds.height) { Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/behavior/EbliWidgetActionFactory.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/behavior/EbliWidgetActionFactory.java 2008-12-08 18:25:47 UTC (rev 4282) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/behavior/EbliWidgetActionFactory.java 2008-12-08 22:24:36 UTC (rev 4283) @@ -59,7 +59,7 @@ public ControlPoint resolveControlPoint(Widget _widget, Point _point) { ControlPoint pt = super.resolveControlPoint(_widget, _point); if (_widget instanceof EbliWidget) { - if (((EbliWidget) _widget).getController().isProportional) { + if (((EbliWidget) _widget).getController().isProportional()) { if (pt == ControlPoint.BOTTOM_LEFT || pt == ControlPoint.BOTTOM_RIGHT || pt == ControlPoint.TOP_LEFT || pt == ControlPoint.TOP_RIGHT) { return null; } } Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetControllerCalque.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetControllerCalque.java 2008-12-08 18:25:47 UTC (rev 4282) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetControllerCalque.java 2008-12-08 22:24:36 UTC (rev 4283) @@ -12,10 +12,10 @@ import java.util.Map; import javax.swing.JComponent; -import javax.swing.JLabel; import javax.swing.JMenu; import javax.swing.JMenuBar; import javax.swing.JMenuItem; +import javax.swing.JPanel; import javax.swing.JPopupMenu; import javax.swing.JScrollPane; import javax.swing.JSplitPane; @@ -24,6 +24,7 @@ import org.fudaa.ctulu.CtuluCommandContainer; import org.fudaa.ctulu.CtuluLibArray; import org.fudaa.ctulu.CtuluResource; +import org.fudaa.ctulu.gui.CtuluSelectorPopupButton; import org.fudaa.ebli.calque.BArbreCalque; import org.fudaa.ebli.calque.BCalque; import org.fudaa.ebli.calque.BCalqueAffichage; @@ -37,6 +38,7 @@ import org.fudaa.ebli.commun.EbliLib; import org.fudaa.ebli.controle.BSelecteurListComboBox; import org.fudaa.ebli.palette.PaletteEditAction; +import org.fudaa.ebli.repere.ZTransformationDomaine; import org.fudaa.ebli.ressource.EbliResource; import org.fudaa.ebli.visuallibrary.EbliNode; import org.fudaa.ebli.visuallibrary.EbliScene; @@ -47,6 +49,7 @@ import org.fudaa.ebli.visuallibrary.actions.CommandMasquer; import org.fudaa.ebli.visuallibrary.actions.EbliActionEditorOneClick; +import com.memoire.bu.BuBorderLayout; import com.memoire.bu.BuMenuBar; import com.memoire.bu.BuPanel; import com.memoire.bu.BuTabbedPane; @@ -60,7 +63,7 @@ */ public class EbliWidgetControllerCalque extends EbliWidgetControllerMenuOnly { - JLabel labelTrace_; + JComponent labelTrace_; public boolean hasAlreadyFusion = false; @@ -87,6 +90,7 @@ widgetCalque_ = _widget; widgetParent_ = _parent; addActionSpecifiques(); + setProportional(true); } @@ -536,7 +540,18 @@ public JComponent getTracableComponent() { if (labelTrace_ == null) { - labelTrace_ = getVisuPanel().getLabelSuiviSouris(); + labelTrace_ = new JPanel(new BuBorderLayout(0, 2, true, false)); + JComponent suiviPanel = getVisuPanel().getSuiviPanel(); + suiviPanel.setBorder(null); + labelTrace_.add(suiviPanel); + CtuluSelectorPopupButton bt = new CtuluSelectorPopupButton() { + + @Override + public JComponent createComponent() { + return new ZTransformationDomaine(getVisuPanel().getVueCalque()); + } + }; + labelTrace_.add(bt.getButton(), BuBorderLayout.WEST); } return labelTrace_; Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetVueCalque.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetVueCalque.java 2008-12-08 18:25:47 UTC (rev 4282) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetVueCalque.java 2008-12-08 22:24:36 UTC (rev 4283) @@ -41,277 +41,261 @@ public class EbliWidgetVueCalque extends EbliWidget implements /* EditProvider */InplaceEditorProvider<BuPanel> { - ZEbliCalquesPanel calquePanel_; + ZEbliCalquesPanel calquePanel_; - - - public EbliNode nodeLegende = null; - Window frame_; + Window frame_; - BufferedImage image; - + BufferedImage image; - public GrBoite initZoom_; + public GrBoite initZoom_; - BuPanel conteneurEditor; + BuPanel conteneurEditor; - // GrBoite zoom_; - public EbliWidgetVueCalque(final EbliScene _scene, final ZEbliCalquesPanel _vue) { - this(_scene, _vue, null); + GrBoite zoom_; - } + public EbliWidgetVueCalque(final EbliScene _scene, final ZEbliCalquesPanel _vue) { + this(_scene, _vue, null); - /** - * TODO a am\xE9liorer avec une Map - * - * @param _scene - * @param _vue - * @param _initZoom - */ - public EbliWidgetVueCalque(final EbliScene _scene, final ZEbliCalquesPanel _vue, final GrBoite _initZoom) { - super(_scene); - calquePanel_ = _vue; - initZoom_ = _initZoom; - calquePanel_.setBorder(null); + } - setPreferredSize(new Dimension(500, 400)); - initSize(new Rectangle(0, 0, 500, 400)); - calquePanel_.getArbreCalqueModel().getObservable().addObserver(new Observer() { + /** + * TODO a am\xE9liorer avec une Map + * + * @param _scene + * @param _vue + * @param _initZoom + */ + public EbliWidgetVueCalque(final EbliScene _scene, final ZEbliCalquesPanel _vue, final GrBoite _initZoom) { + super(_scene); + calquePanel_ = _vue; + initZoom_ = _initZoom; + calquePanel_.setBorder(null); - public void update(final Observable _o, final Object _arg) { - if (!isInEditMode() && "t".equals(_arg)) { - image = null; - // repaint(); - } + setPreferredSize(new Dimension(500, 400)); + initSize(new Rectangle(0, 0, 500, 400)); + calquePanel_.getArbreCalqueModel().getObservable().addObserver(new Observer() { - } - }); + public void update(final Observable _o, final Object _arg) { + if (!isInEditMode() && "t".equals(_arg)) { + image = null; + // repaint(); + } - } + } + }); - - public ZEbliCalquesPanel getCalquePanel() { + } + + public ZEbliCalquesPanel getCalquePanel() { return calquePanel_; } - public BuPanel createEditorComponent( - final org.netbeans.api.visual.action.InplaceEditorProvider.EditorController controller, final Widget widget) { - return calquePanel_; - } + public BuPanel createEditorComponent( + final org.netbeans.api.visual.action.InplaceEditorProvider.EditorController controller, final Widget widget) { + return calquePanel_; + } - /** - * appel\xE9 lors de la fermeture de l editeur. Il faut redessiner la widget. - */ - public void notifyClosing(final org.netbeans.api.visual.action.InplaceEditorProvider.EditorController controller, - final Widget widget, final BuPanel editor, final boolean commit) { - editingStop(); - // zoom_ = calquePanel_.getVueCalque().getViewBoite(); - image = null; + /** + * appel\xE9 lors de la fermeture de l editeur. Il faut redessiner la widget. + */ + public void notifyClosing(final org.netbeans.api.visual.action.InplaceEditorProvider.EditorController controller, + final Widget widget, final BuPanel editor, final boolean commit) { + editingStop(); + zoom_ = calquePanel_.getVueCalque().getViewBoite(); + image = null; - getEbliScene().refresh(); - // calquePanel_.setBorder(BuBorders.EMPTY1111); - this.repaint(); - } + getEbliScene().refresh(); + // calquePanel_.setBorder(BuBorders.EMPTY1111); + this.repaint(); + } - /** - * @return une interface non null si la widget peut etre animee - */ - @Override - public EbliAnimatedInterface getAnimatedInterface() { - if (calquePanel_ instanceof EbliAnimatedInterface) return (EbliAnimatedInterface) calquePanel_; - return null; - } + /** + * @return une interface non null si la widget peut etre animee + */ + @Override + public EbliAnimatedInterface getAnimatedInterface() { + if (calquePanel_ instanceof EbliAnimatedInterface) return (EbliAnimatedInterface) calquePanel_; + return null; + } - @Override - public Color getColorFond() { - return null; - } + @Override + public Color getColorFond() { + return null; + } - private void initSize(final Rectangle rec) { - final BCalque[] tousCalques = calquePanel_.getVueCalque().getCalque().getTousCalques(); - calquePanel_.getVueCalque().setSize(rec.width, rec.height); - // calquePanel_.setPreferredSize(new Dimension(rec.width, rec.height)); - calquePanel_.getVueCalque().getCalque().setSize(rec.width, rec.height); - for (int i = 0; i < tousCalques.length; i++) { - tousCalques[i].setSize(rec.width, rec.height); - } - } + private void initSize(final Rectangle rec) { + final BCalque[] tousCalques = calquePanel_.getVueCalque().getCalque().getTousCalques(); + calquePanel_.getVueCalque().setSize(rec.width, rec.height); + // calquePanel_.setPreferredSize(new Dimension(rec.width, rec.height)); + calquePanel_.getVueCalque().getCalque().setSize(rec.width, rec.height); + for (int i = 0; i < tousCalques.length; i++) { + tousCalques[i].setSize(rec.width, rec.height); + } + } - public GrBoite getViewBoite() { - return calquePanel_.getVueCalque().getViewBoite(); - } + public GrBoite getViewBoite() { + return calquePanel_.getVueCalque().getViewBoite(); + } - public EbliWidgetControllerCalque getCalqueController() { - return (EbliWidgetControllerCalque) getController(); - } + public EbliWidgetControllerCalque getCalqueController() { + return (EbliWidgetControllerCalque) getController(); + } - boolean first_ = true; + boolean first_ = true; - @SuppressWarnings("unchecked") - @Override - protected void paintWidget() { + @Override + protected void paintWidget() { - final Rectangle rec = getClientArea(); + final Rectangle rec = getClientArea(); + rec.width -= 1; + rec.height -= 1; + if (rec.width > 0 && rec.height > 0) { + final Graphics2D g = getGraphics(); - rec.width -= 1; - rec.height -= 1; + initSize(rec); + if (first_) { + first_ = false; + if (initZoom_ != null && initZoom_.getDeltaX() > 0 && initZoom_.getDeltaY() > 0) { + calquePanel_.getVueCalque().changeRepere(this, initZoom_); + initZoom_ = null; + } else calquePanel_.restaurer(); + } - if(rec.width>0 && rec.height>0){ - final Graphics2D g = getGraphics(); + // mode edition + if (image == null || image.getWidth() != rec.width || image.getHeight() != rec.height) { + FuLog.debug("EWI: recreate image"); + if (zoom_ != null) { + calquePanel_.getVueCalque().changeRepere(this, zoom_); - if (frame_ == null) { - initSize(rec); - if (first_) { - first_ = false; - if (initZoom_ != null && initZoom_.getDeltaX() > 0 && initZoom_.getDeltaY() > 0) { - calquePanel_.getVueCalque().changeRepere(this, initZoom_); - initZoom_ = null; - } else calquePanel_.restaurer(); - } - // if (zoom_ != null) { - // // image=null; - // calquePanel_.getVueCalque().changeRepere(this, zoom_); - // - // } else calquePanel_.restaurer(); - } + } else calquePanel_.restaurer(); + final Map params = new HashMap(); + CtuluLibImage.setCompatibleImageAsked(params); + // a ameliorer: il ne faudrait pas recreer l'image a chaque fois + // CtuluLibImage.setCompatibleImageAsked(params); - // mode edition - if (image == null || image.getWidth() != rec.width || image.getHeight() != rec.height) { - FuLog.debug("EWI: recreate image"); - final Map params = new HashMap(); - CtuluLibImage.setCompatibleImageAsked(params); - // a ameliorer: il ne faudrait pas recreer l'image a chaque fois - CtuluLibImage.setCompatibleImageAsked(params); - - - //- on enregistre le zoom en memoire --// - //GrBoite zoomMemoire=calquePanel_.getVueCalque().getViewBoite(); - - //-- on redessinne --// - image = calquePanel_.produceImage(rec.width, rec.height, params); - - //-- on remet le repere au max de la clientArea de la widget --// - //calquePanel_.getVueCalque().changeRepere(this, zoomMemoire); - - - calquePanel_.restaurer(); - } - - g.drawImage(image, rec.x, rec.y, rec.width, rec.height, null); + // - on enregistre le zoom en memoire --// + // GrBoite zoomMemoire=calquePanel_.getVueCalque().getViewBoite(); - } - } + // -- on redessinne --// + image = calquePanel_.produceImage(rec.width, rec.height, params); - public EnumSet<org.netbeans.api.visual.action.InplaceEditorProvider.ExpansionDirection> getExpansionDirections( - final org.netbeans.api.visual.action.InplaceEditorProvider.EditorController controller, final Widget widget, - final BuPanel editor) { - return null; - } + // -- on remet le repere au max de la clientArea de la widget --// + // calquePanel_.getVueCalque().changeRepere(this, zoomMemoire); - public Rectangle getInitialEditorComponentBounds( - final org.netbeans.api.visual.action.InplaceEditorProvider.EditorController controller, final Widget widget, - final BuPanel editor, final Rectangle viewBounds) { - return convertLocalToScene(getClientArea()); - } + // calquePanel_.restaurer(); + } - public void notifyOpened(final org.netbeans.api.visual.action.InplaceEditorProvider.EditorController controller, - final Widget widget, final BuPanel editor) { - editingStart(); - calquePanel_.setBorder(BorderFactory.createLineBorder(Color.GRAY, 1)); - } + g.drawImage(image, rec.x, rec.y, rec.width, rec.height, null); - // public void setColorFond(Color newColor) { - // couleurFond = newColor; - // repaint(); - // } - // - // public void update(Observable _o, Object _arg) { - // image = null; - // getEbliScene().refresh(); - // } - @Override - public boolean canRotate() { - return false; - } + } + } - @Override - public boolean canColorForeground() { - return false; - } + public EnumSet<org.netbeans.api.visual.action.InplaceEditorProvider.ExpansionDirection> getExpansionDirections( + final org.netbeans.api.visual.action.InplaceEditorProvider.EditorController controller, final Widget widget, + final BuPanel editor) { + return null; + } - @Override - public boolean canColorBackground() { - return false; - } + public Rectangle getInitialEditorComponentBounds( + final org.netbeans.api.visual.action.InplaceEditorProvider.EditorController controller, final Widget widget, + final BuPanel editor, final Rectangle viewBounds) { + return convertLocalToScene(getClientArea()); + } - @Override - public boolean canTraceLigneModel() { - return false; - } + public void notifyOpened(final org.netbeans.api.visual.action.InplaceEditorProvider.EditorController controller, + final Widget widget, final BuPanel editor) { + editingStart(); + calquePanel_.setBorder(BorderFactory.createLineBorder(Color.GRAY, 1)); + } - @Override - public boolean canFont() { - return false; - } + // public void setColorFond(Color newColor) { + // couleurFond = newColor; + // repaint(); + // } + // + // public void update(Observable _o, Object _arg) { + // image = null; + // getEbliScene().refresh(); + // } + @Override + public boolean canRotate() { + return false; + } - @Override - public List<EbliWidgetAnimatedItem> getAnimatedItems() { - final BCalque[] cqs = calquePanel_.getVueCalque().getCalque().getTousCalques(); - final List<EbliWidgetAnimatedItem> res = new ArrayList<EbliWidgetAnimatedItem>(20); - for (int i = 0; i < cqs.length; i++) { - if (cqs[i].isVisible() && cqs[i] instanceof EbliAnimationAdapterInterface) { - res.add(new EbliWidgetAnimatedItem((EbliAnimationAdapterInterface) cqs[i], cqs[i], getId(), cqs[i].getName(), - cqs[i].getTitle())); - } - } - return res; - } + @Override + public boolean canColorForeground() { + return false; + } - @Override - public boolean isAnimatedItemAlive(final String _id) { - final BCalque cq = calquePanel_.getVueCalque().getCalque().getCalqueParNom(_id); - return cq != null && cq.isVisible(); - } + @Override + public boolean canColorBackground() { + return false; + } - public boolean hasSattelite() { - if (getCalqueController().hasLegende()) - return true; - return false; + @Override + public boolean canTraceLigneModel() { + return false; } - + + @Override + public boolean canFont() { + return false; + } + + @Override + public List<EbliWidgetAnimatedItem> getAnimatedItems() { + final BCalque[] cqs = calquePanel_.getVueCalque().getCalque().getTousCalques(); + final List<EbliWidgetAnimatedItem> res = new ArrayList<EbliWidgetAnimatedItem>(20); + for (int i = 0; i < cqs.length; i++) { + if (cqs[i].isVisible() && cqs[i] instanceof EbliAnimationAdapterInterface) { + res.add(new EbliWidgetAnimatedItem((EbliAnimationAdapterInterface) cqs[i], cqs[i], getId(), cqs[i].getName(), + cqs[i].getTitle())); + } + } + return res; + } + + @Override + public boolean isAnimatedItemAlive(final String _id) { + final BCalque cq = calquePanel_.getVueCalque().getCalque().getCalqueParNom(_id); + return cq != null && cq.isVisible(); + } + + public boolean hasSattelite() { + if (getCalqueController().hasLegende()) return true; + return false; + } + public List<EbliWidget> getSattelite() { - if (!hasSattelite()) - return null; + if (!hasSattelite()) return null; List<EbliWidget> liste = new ArrayList<EbliWidget>(); - + liste.add(getCalqueController().getNodeLegende().getWidget()); - + return liste; - + } - - public void setSattelite(List<EbliWidget> liste) { - if(liste.size()<=0) - return; - - EbliWidget widg=liste.get(0); - - EbliNodeDefault node= (EbliNodeDefault) getEbliScene().findObject(widg); - getCalqueController().setNodeLegende( node); - - + + public void setSatellite(List<EbliWidget> liste) { + if (liste.size() <= 0) return; + + EbliWidget widg = liste.get(0); + + EbliNodeDefault node = (EbliNodeDefault) getEbliScene().findObject(widg); + getCalqueController().setNodeLegende(node); + } - + public BufferedImage getImage() { - return image; - } + return image; + } - public void setImage(BufferedImage image) { - this.image = image; - } - + public void setImage(BufferedImage image) { + this.image = image; + } + } Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetControllerGraphe.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetControllerGraphe.java 2008-12-08 18:25:47 UTC (rev 4282) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetControllerGraphe.java 2008-12-08 22:24:36 UTC (rev 4283) @@ -70,7 +70,7 @@ public EbliWidgetControllerGraphe(final EbliWidgetGraphe widget_, final EbliNodeDefault nodeLegende) { super(widget_); - isProportional = true; + setProportional(true); widgetGraphe_ = widget_; labelTrace_ = (JLabel) CtuluLibSwing.findChildByName(getGraphePanel(), "lbTools"); @@ -454,7 +454,7 @@ // paneGlobal.setTopComponent(getGraphePanel().getInfoPanel()); // paneGlobal.setBottomComponent(new JScrollPane(tree)); - panelTreeGraphe_ = new JScrollPane(tree);;// paneGlobal; + panelTreeGraphe_ = new JScrollPane(tree);// paneGlobal; } return panelTreeGraphe_; Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetCreatorGraphe.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetCreatorGraphe.java 2008-12-08 18:25:47 UTC (rev 4282) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetCreatorGraphe.java 2008-12-08 22:24:36 UTC (rev 4283) @@ -6,7 +6,6 @@ import java.util.Map; import org.fudaa.ctulu.CtuluLibFile; -import org.fudaa.ctulu.CtuluUI; import org.fudaa.ebli.courbe.EGFillePanel; import org.fudaa.ebli.courbe.EGGraphe; import org.fudaa.ebli.courbe.EGGrapheModel; Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetCreatorLegende.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetCreatorLegende.java 2008-12-08 18:25:47 UTC (rev 4282) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetCreatorLegende.java 2008-12-08 22:24:36 UTC (rev 4283) @@ -3,9 +3,6 @@ import java.util.List; import java.util.Map; -import org.fudaa.ebli.calque.BCalque; -import org.fudaa.ebli.calque.BCalqueLegendePanel; -import org.fudaa.ebli.calque.ZEbliCalquesPanel; import org.fudaa.ebli.courbe.EGGraphe; import org.fudaa.ebli.courbe.EGGrapheTreeModel; import org.fudaa.ebli.visuallibrary.EbliNode; @@ -14,9 +11,6 @@ import org.fudaa.ebli.visuallibrary.EbliWidget; import org.fudaa.ebli.visuallibrary.EbliWidgetBordureSingle; import org.fudaa.ebli.visuallibrary.EbliWidgetWithBordure; -import org.fudaa.ebli.visuallibrary.calque.CalqueLegendeWidgetAdapter; -import org.fudaa.ebli.visuallibrary.calque.EbliWidgetControllerCalque; -import org.fudaa.ebli.visuallibrary.calque.EbliWidgetVueCalque; import org.fudaa.ebli.visuallibrary.creator.EbliWidgetCreator; public class EbliWidgetCreatorLegende implements EbliWidgetCreator { Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetGraphe.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetGraphe.java 2008-12-08 18:25:47 UTC (rev 4282) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/graphe/EbliWidgetGraphe.java 2008-12-08 22:24:36 UTC (rev 4283) @@ -15,19 +15,16 @@ import org.fudaa.ctulu.image.CtuluLibImage; import org.fudaa.ebli.animation.EbliAnimatedInterface; import org.fudaa.ebli.animation.EbliAnimationAdapterInterface; -import org.fudaa.ebli.calque.BCalque; import org.fudaa.ebli.courbe.EGAxe; import org.fudaa.ebli.courbe.EGCourbe; import org.fudaa.ebli.courbe.EGFillePanel; import org.fudaa.ebli.courbe.EGGraphe; import org.fudaa.ebli.courbe.EGGrapheModelListener; import org.fudaa.ebli.courbe.EGObject; -import org.fudaa.ebli.visuallibrary.EbliNode; import org.fudaa.ebli.visuallibrary.EbliNodeDefault; import org.fudaa.ebli.visuallibrary.EbliScene; import org.fudaa.ebli.visuallibrary.EbliWidget; import org.fudaa.ebli.visuallibrary.animation.EbliWidgetAnimatedItem; -import org.geotools.xml.xsi.XSISimpleTypes.Int; import org.netbeans.api.visual.action.InplaceEditorProvider; import org.netbeans.api.visual.widget.Widget; @@ -329,7 +326,7 @@ } - public void setSattelite(List<EbliWidget> liste) { + public void setSatellite(List<EbliWidget> liste) { if (liste.size() <= 0) return; EbliWidget widg = liste.get(0); Modified: branches/Prepro-0.92-SNAPSHOT/ebli/test/org/fudaa/ebli/all/TestVisualLibrary.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/test/org/fudaa/ebli/all/TestVisualLibrary.java 2008-12-08 18:25:47 UTC (rev 4282) +++ branches/Prepro-0.92-SNAPSHOT/ebli/test/org/fudaa/ebli/all/TestVisualLibrary.java 2008-12-08 22:24:36 UTC (rev 4283) @@ -56,7 +56,7 @@ import org.fudaa.ebli.visuallibrary.actions.EbliWidgetActionConfigure; import org.fudaa.ebli.visuallibrary.actions.EbliWidgetActionDuplicate; import org.fudaa.ebli.visuallibrary.actions.EbliWidgetActionFont; -import org.fudaa.ebli.visuallibrary.actions.EbliWidgetActionForeGround; +import org.fudaa.ebli.visuallibrary.actions.EbliWidgetActionForeground; import org.fudaa.ebli.visuallibrary.actions.EbliWidgetActionImageChooser; import org.fudaa.ebli.visuallibrary.actions.EbliWidgetActionRetaillageHorizontal; import org.fudaa.ebli.visuallibrary.actions.EbliWidgetActionRetaillageVertical; @@ -449,7 +449,7 @@ bar.add(new EbliWidgetActionDuplicate(scene)); - bar.add(new EbliWidgetActionForeGround(scene)); + bar.add(new EbliWidgetActionForeground(scene)); bar.add(new EbliWidgetActionBackGround(scene)); Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostLayoutFille.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostLayoutFille.java 2008-12-08 18:25:47 UTC (rev 4282) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostLayoutFille.java 2008-12-08 22:24:36 UTC (rev 4283) @@ -3,8 +3,6 @@ import java.awt.BorderLayout; import java.awt.Dimension; import java.awt.Point; -import java.awt.event.ComponentEvent; -import java.awt.event.ComponentListener; import java.awt.image.BufferedImage; import java.util.ArrayList; import java.util.HashSet; @@ -19,8 +17,6 @@ import javax.swing.JMenuBar; import javax.swing.JPanel; import javax.swing.JToolBar; -import javax.swing.event.InternalFrameEvent; -import javax.swing.event.InternalFrameListener; import org.fudaa.ctulu.CtuluCommandManager; import org.fudaa.ctulu.CtuluUndoRedoInterface; @@ -149,42 +145,42 @@ panelSouthSuiviSouris_ = new JLabel(); this.add(panelSouthSuiviSouris_, BorderLayout.SOUTH); - oldSize_=getSize(); +// oldSize_=getSize(); //-- ajout du controller en cas de resize --// - this.addComponentListener(new ComponentListener(){ - - @Override - public void componentHidden(ComponentEvent e) { - // TODO Auto-generated method stub - - } - - @Override - public void componentMoved(ComponentEvent e) { - // TODO Auto-generated method stub - - } - - @Override - public void componentResized(ComponentEvent e) { - // TODO Auto-generated method stub -// Dimension size=getSize(); -// System.out.println("Size nouvelle:"+size); -// if(size!=oldSize_ ){ -// controller_.getSceneCourante().resizeInnerWidget(size,oldSize_); +// this.addComponentListener(new ComponentListener(){ +// +// @Override +// public void componentHidden(ComponentEvent e) { +// // TODO Auto-generated method stub // -// //-- stockage de la taille comme ancienne size --// -// oldSize_=size; -// } - } - - @Override - public void componentShown(ComponentEvent e) { - // TODO Auto-generated method stub - - } - - }); +// } +// +// @Override +// public void componentMoved(ComponentEvent e) { +// // TODO Auto-generated method stub +// +// } +// +// @Override +// public void componentResized(ComponentEvent e) { +// // TODO Auto-generated method stub +//// Dimension size=getSize(); +//// System.out.println("Size nouvelle:"+size); +//// if(size!=oldSize_ ){ +//// controller_.getSceneCourante().resizeInnerWidget(size,oldSize_); +//// +//// //-- stockage de la taille comme ancienne size --// +//// oldSize_=size; +//// } +// } +// +// @Override +// public void componentShown(ComponentEvent e) { +// // TODO Auto-generated method stub +// +// } +// +// }); Modified: branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostLayoutPanelController.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostLayoutPanelController.java 2008-12-08 18:25:47 UTC (rev 4282) +++ branches/Prepro-0.92-SNAPSHOT/fudaa/src/org/fudaa/fudaa/tr/post/TrPostLayoutPanelController.java 2008-12-08 22:24:36 UTC (rev 4283) @@ -13,11 +13,14 @@ import javax.swing.JDesktopPane; import javax.swing.JMenu; import javax.swing.JPanel; +import javax.swing.JPopupMenu; import javax.swing.JScrollPane; import javax.swing.JTabbedPane; import javax.swing.SwingConstants; import org.fudaa.ctulu.CtuluCommandManager; +import org.fudaa.ctulu.gui.CtuluButtonForPopup; +import org.fudaa.ctulu.gui.CtuluSelectorPopupButton; import org.fudaa.ebli.calque.BCalqueLegende; import org.fudaa.ebli.calque.ZEbliCalquesPanel; import org.fudaa.ebli.commun.EbliActionAbstract; @@ -37,7 +40,7 @@ import org.fudaa.ebli.visuallibrary.actions.EbliWidgetActionBackGround; import org.fudaa.ebli.visuallibrary.actions.EbliWidgetActionColorBackground; import org.fudaa.ebli.visuallibrary.actions.EbliWidgetActionConfigure; -import org.fudaa.ebli.visuallibrary.actions.EbliWidgetActionForeGround; +import org.fudaa.ebli.visuallibrary.actions.EbliWidgetActionForeground; import org.fudaa.ebli.visuallibrary.actions.EbliWidgetActionImageChooser; import org.fudaa.ebli.visuallibrary.actions.EbliWidgetActionRetaillageHorizontal; import org.fudaa.ebli.visuallibrary.actions.EbliWidgetActionRetaillageVertical; @@ -194,10 +197,7 @@ // comboMultiScenes_.addActionListener(this); // comboMultiScenes_.setMaximumSize(comboMultiScenes_.getPreferredSize()); // comboMultiScenes_.setMinimumSize(comboMultiScenes_.getPreferredSize()); - - - - + } // public BuComboBox getComboMultiScenes() { @@ -255,7 +255,7 @@ // -- ajout du rectangle --// final EbliNodeDefault nodeLegende = new EbliNodeDefault(); nodeLegende.setTitle("Legende calque"); - nodeLegende.setCreator(new EbliWidgetCreatorLegende(legende.getLegendePanel(0), "x",null)); + nodeLegende.setCreator(new EbliWidgetCreatorLegende(legende.getLegendePanel(0), "x", null)); nodeLegende.setPreferedSize(new Dimension(200, 100)); nodeLegende.setPreferedLocation(new Point(350, 125)); // ajout du node au layout @@ -278,7 +278,7 @@ return nodeLigne; } - + public EbliNode addCercle() { // -- ajout du rectangle --// final EbliNodeDefault nodeCercle = new EbliNodeDefault(); @@ -323,20 +323,20 @@ return nodeFleche; } - + public EbliNode addDblFleche() { - // -- ajout du rectangle --// - final EbliNodeDefault nodeFleche = new EbliNodeDefault(); - nodeFleche.setTitle("Double Fleche"); - nodeFleche.setCreator(new EbliWidgetCreatorShape(new ShapeCreatorDblFleche())); - nodeFleche.setPreferedSize(new Dimension(100, 50)); - nodeFleche.setPreferedLocation(new Point(350, 125)); + // -- ajout du rectangle --// + final EbliNodeDefault nodeFleche = new EbliNodeDefault(); + nodeFleche.setTitle("Double Fleche"); + nodeFleche.setCreator(new EbliWidgetCreatorShape(new ShapeCreatorDblFleche())); + nodeFleche.setPreferedSize(new Dimension(100, 50)); + nodeFleche.setPreferedLocation(new Point(3... [truncated message content] |
From: <had...@us...> - 2008-12-08 18:25:50
|
Revision: 4282 http://fudaa.svn.sourceforge.net/fudaa/?rev=4282&view=rev Author: hadouxad Date: 2008-12-08 18:25:47 +0000 (Mon, 08 Dec 2008) Log Message: ----------- ***** Correction du Bug zoom:***** l'affichage du calque est op?\195?\169rationnel et proportionnel a sa widget! en utilisant la m?\195?\169thode calquePanel_.restaurer(); Mais the question is: Is the method optimized? (tout est dans EbliWidgetVueCalque) **** Evolution: Fonction duplcation layout **** possibilit?\195?\169 via le clic sur un bouton de dupliquer int?\195?\169gralement le contenu d'un layout et de g?\195?\169n?\195?\169rer une nouvelle trpostLayoutfille pour l'occasion Menu actions du trpostlayout Modified Paths: -------------- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/ressource/ebli_en.fr_txt Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/ressource/ebli_en.fr_txt =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/ressource/ebli_en.fr_txt 2008-12-08 18:25:30 UTC (rev 4281) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/ressource/ebli_en.fr_txt 2008-12-08 18:25:47 UTC (rev 4282) @@ -631,4 +631,5 @@ Redimensionnement classique de la taille de la frame=Classical resize of the frame Redimensionner proportionnellement la taille de la frame=Proportional resizing of the frame Conserver le ratio hauteur/largeur=Preserve width/height ratio -Ne pas conserver le ratio hauteur/largeur=Do not preserve width/height ratio \ No newline at end of file +Ne pas conserver le ratio hauteur/largeur=Do not preserve width/height ratio +Dupliquer la sc\xE8ne= Duplicate the scene \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <had...@us...> - 2008-12-08 18:25:41
|
Revision: 4281 http://fudaa.svn.sourceforge.net/fudaa/?rev=4281&view=rev Author: hadouxad Date: 2008-12-08 18:25:30 +0000 (Mon, 08 Dec 2008) Log Message: ----------- ***** Correction du Bug zoom:***** l'affichage du calque est op?\195?\169rationnel et proportionnel a sa widget! en utilisant la m?\195?\169thode calquePanel_.restaurer(); Mais the question is: Is the method optimized? (tout est dans EbliWidgetVueCalque) **** Evolution: Fonction duplcation layout **** possibilit?\195?\169 via le clic sur un bouton de dupliquer int?\195?\169gralement le contenu d'un layout et de g?\195?\169n?\195?\169rer une nouvelle trpostLayoutfille pour l'occasion Menu actions du trpostlayout Modified Paths: -------------- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliScene.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/behavior/AlignWithResizeProportionalStrategy.java branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetVueCalque.java Added Paths: ----------- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActionDuplicateLayout.java Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliScene.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliScene.java 2008-12-08 18:24:57 UTC (rev 4280) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/EbliScene.java 2008-12-08 18:25:30 UTC (rev 4281) @@ -343,6 +343,44 @@ } + /** + * Methode qui redimensionne proportionellement les widget \xE0 la scene + * @param size + */ + public void resizeInnerWidget(Dimension newSize,Dimension oldSize){ + // this.getVisu().setPreferredSize(newSize); + if(getNodes().size()==0) + return; + for (final Iterator<EbliNode> it2 = getNodes().iterator(); it2.hasNext();) { + + final EbliNode currentNode = it2.next(); + if (currentNode != null && currentNode.hasWidget()) { + + + Rectangle oldRectangle=currentNode.getWidget().getPreferredBounds(); + + double proportionW=newSize.width*oldRectangle.width/oldSize.width; + double proportionH=newSize.width*oldRectangle.height/oldSize.height; + + + // -- retaillage --// + currentNode.getWidget().setPreferredBounds( + new Rectangle(new Dimension((int)proportionW, (int)proportionH))); + + + // -- rafraichissement de la scene --// + this.refresh(); + + } + } + + // this.setPreferredSize(newSize); + + + } + + + public void moveWidgetTo(EbliWidget widget, int position){ //-- ne marche pas.......................... --// Added: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActionDuplicateLayout.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActionDuplicateLayout.java (rev 0) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/actions/EbliWidgetActionDuplicateLayout.java 2008-12-08 18:25:30 UTC (rev 4281) @@ -0,0 +1,129 @@ +package org.fudaa.ebli.visuallibrary.actions; + +import java.awt.Point; +import java.awt.event.ActionEvent; +import java.util.ArrayList; +import java.util.Iterator; +import java.util.Set; + +import org.fudaa.ctulu.CtuluCommandContainer; +import org.fudaa.ctulu.CtuluResource; +import org.fudaa.ebli.ressource.EbliResource; +import org.fudaa.ebli.visuallibrary.EbliNode; +import org.fudaa.ebli.visuallibrary.EbliScene; +import org.fudaa.ebli.visuallibrary.calque.EbliWidgetVueCalque; +import org.fudaa.ebli.visuallibrary.graphe.EbliWidgetControllerGraphe; +import org.fudaa.ebli.visuallibrary.graphe.EbliWidgetGraphe; +import org.fudaa.ebli.visuallibrary.graphe.EbliWidgetGrapheController; + + +/** + * Action qui duplique l'ensemble des widget d'un layout vers un autre + * @author Adrien Hadoux + * + */ +public class EbliWidgetActionDuplicateLayout extends EbliWidgetActionSimple { + + /** + * + */ + + /** + * Possibilit\xE9 de changer la scene de destination + */ + EbliScene sceneDestination_ = null; + + private static final long serialVersionUID = 1L; + + final CtuluCommandContainer cmd_; + + public EbliWidgetActionDuplicateLayout(final EbliScene _scene) { + super(_scene, EbliResource.EBLI.getString("Dupliquer la sc\xE8ne"), CtuluResource.CTULU + .getIcon("crystal_cascade.png"), "DUPLICATE"); + + putValue(NAME, EbliResource.EBLI.getString("Dupliquer la sc\xE8ne")); + cmd_ = _scene.getCmdMng(); + + } + + @Override + public void actionPerformed(final ActionEvent e) { + // -- recuperation de la liste des widgets selectionnees --// + + final Set<EbliNode> listeNode = (Set<EbliNode>) scene_.getNodes(); + + final ArrayList<EbliNode> listeNodeADupliquer = new ArrayList<EbliNode>(listeNode); + + ArrayList<EbliNode> listeNodeUndo = new ArrayList<EbliNode>(); + + + sceneDestination_ = selectionneSceneNode(); + + // -- duplication des noeuds saisis --// + for (final Iterator<EbliNode> it = listeNodeADupliquer.iterator(); it.hasNext();) { + final EbliNode currentNode = it.next(); + + // -- duplication du node --// + + EbliNode node = currentNode.getWidget().getController().duplication(listeNodeUndo, sceneDestination_); + + //--repositionnement des nodes dans le layout a la position initiale --// + if(node!=null){ + node.getWidget().setPreferredLocation(currentNode.getWidget().getLocation()); + + + + //cas particuliers: les l\xE9gendes calques + if(node.getWidget().getIntern() instanceof EbliWidgetVueCalque){ + EbliWidgetVueCalque calque=(EbliWidgetVueCalque)node.getWidget().getIntern(); + //-- on verifie si il y a legende ou pas --// + if(calque.getCalqueController().hasLegende()){ + //-- on recupere la location de la legende duplicata --// + Point legendeLocation=((EbliWidgetVueCalque)currentNode.getWidget().getIntern()).nodeLegende.getWidget().getLocation(); + if(legendeLocation!=null){ + calque.nodeLegende.getWidget().setPreferredLocation(legendeLocation); + } + + } + + } + + //cas particuliers: les l\xE9gendes graphes + if(node.getWidget().getIntern() instanceof EbliWidgetGraphe){ + EbliWidgetGraphe graphe=(EbliWidgetGraphe)node.getWidget().getIntern(); + //-- on verifie si il y a legende ou pas --// + if(((EbliWidgetControllerGraphe)graphe.getController()).hasLegende()){ + //-- on recupere la location de la legende duplicata --// + Point legendeLocation=((EbliWidgetGraphe)currentNode.getWidget().getIntern()).getNodeLegende().getWidget().getLocation(); + if(legendeLocation!=null){ + graphe.getNodeLegende().getWidget().setPreferredLocation(legendeLocation); + } + + } + + } + + + sceneDestination_.refresh(); + } + + + } + + + cmd_.addCmd(new CommandeDuplicate(listeNodeUndo, sceneDestination_)); + // -- creation de l action undo/redo pour les nodes --// + // cmd_.addCmd(new CommandeDuplicate(listeNouveauxNodes, + // sceneDestination_)); + + } + + /** + * methode qui doit etre surchargee par les filles pour selectionner la scene de destination + */ + protected EbliScene selectionneSceneNode() { + + return scene_; + } + + } Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/behavior/AlignWithResizeProportionalStrategy.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/behavior/AlignWithResizeProportionalStrategy.java 2008-12-08 18:24:57 UTC (rev 4280) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/behavior/AlignWithResizeProportionalStrategy.java 2008-12-08 18:25:30 UTC (rev 4281) @@ -6,6 +6,7 @@ import org.fudaa.ctulu.image.CtuluLibImage; import org.fudaa.ebli.visuallibrary.EbliWidget; +import org.fudaa.ebli.visuallibrary.calque.EbliWidgetVueCalque; import org.netbeans.api.visual.action.AlignWithMoveDecorator; import org.netbeans.api.visual.action.AlignWithWidgetCollector; import org.netbeans.api.visual.action.ResizeProvider; @@ -197,8 +198,11 @@ suggestedBounds.height = (int) (hDivParW * suggestedBounds.width); } } - + } + + + return widget.convertSceneToLocal(suggestedBounds); } Modified: branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetVueCalque.java =================================================================== --- branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetVueCalque.java 2008-12-08 18:24:57 UTC (rev 4280) +++ branches/Prepro-0.92-SNAPSHOT/ebli/src/org/fudaa/ebli/visuallibrary/calque/EbliWidgetVueCalque.java 2008-12-08 18:25:30 UTC (rev 4281) @@ -51,6 +51,8 @@ Window frame_; BufferedImage image; + + public GrBoite initZoom_; BuPanel conteneurEditor; @@ -183,10 +185,22 @@ final Map params = new HashMap(); CtuluLibImage.setCompatibleImageAsked(params); // a ameliorer: il ne faudrait pas recreer l'image a chaque fois - + CtuluLibImage.setCompatibleImageAsked(params); + + + //- on enregistre le zoom en memoire --// + //GrBoite zoomMemoire=calquePanel_.getVueCalque().getViewBoite(); + + //-- on redessinne --// image = calquePanel_.produceImage(rec.width, rec.height, params); - + + //-- on remet le repere au max de la clientArea de la widget --// + //calquePanel_.getVueCalque().changeRepere(this, zoomMemoire); + + + calquePanel_.restaurer(); } + g.drawImage(image, rec.x, rec.y, rec.width, rec.height, null); } @@ -291,5 +305,13 @@ } + + public BufferedImage getImage() { + return image; + } + + public void setImage(BufferedImage image) { + this.image = image; + } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |